import{ag as R,bD as J,ae as q,af as K,ah as G,ai as l,aj as r,ak as I,al as E,am as c,aA as ie,bz as se,an as e,at as w,ap as S,aP as Q,b6 as y,aW as Z,aY as re,bm as _e,bn as me,aE as ee,aX as te,bE as ge,aw as pe,a$ as ue,N as z,k as ce,d as V,z as X,v as fe,J as de,b as Ae,aK as ve,j as Se,bT as we,aC as P,as as T,ao as C,aF as he,aO as be,az as M,aN as $,aD as De}from"./index-D68iA7pN.js";import{M as ne}from"./index-AOcxwHT9.js";const Ce=""+new URL("ACAD_ISO02W100-CgczrAa0.png",import.meta.url).href,Ie=""+new URL("ACAD_ISO03W100-AzcC3_-f.png",import.meta.url).href,Re=""+new URL("ACAD_ISO04W100-IbgtVBfA.png",import.meta.url).href,Le=""+new URL("ACAD_ISO05W100-CEGXYqwd.png",import.meta.url).href,Ue=""+new URL("ACAD_ISO06W100-DJBzAH1k.png",import.meta.url).href,Oe=""+new URL("ACAD_ISO07W100-D_Mm-GmR.png",import.meta.url).href,Ne=""+new URL("ACAD_ISO08W100-Cq7PdjEU.png",import.meta.url).href,We=""+new URL("ACAD_ISO09W100-HuEA3bgs.png",import.meta.url).href,xe=""+new URL("ACAD_ISO10W100-CpfOB3wW.png",import.meta.url).href,Ve=""+new URL("ACAD_ISO11W100-C-YvJa_U.png",import.meta.url).href,Ee=""+new URL("ACAD_ISO12W100-BJObCzYl.png",import.meta.url).href,Be=""+new URL("ACAD_ISO13W100-CnVTTEXT.png",import.meta.url).href,ke=""+new URL("ACAD_ISO14W100-Dt_4eew3.png",import.meta.url).href,ye=""+new URL("ACAD_ISO15W100-DQCL7ZHX.png",import.meta.url).href,Pe=""+new URL("ANGLE-C0JXMnJI.png",import.meta.url).href,Te=""+new URL("ANSI31-DNoWrKeq.png",import.meta.url).href,Me=""+new URL("ANSI32-C1D8NgmN.png",import.meta.url).href,Fe=""+new URL("ANSI33-ChicYIJo.png",import.meta.url).href,He=""+new URL("ANSI34-VGH_akWK.png",import.meta.url).href,je=""+new URL("ANSI35-Di7w2V2Y.png",import.meta.url).href,Ye=""+new URL("ANSI36-XpcWXjaS.png",import.meta.url).href,Ge=""+new URL("ANSI37-D7GYIXmO.png",import.meta.url).href,ze=""+new URL("ANSI38-BFp_zzVO.png",import.meta.url).href,Xe=""+new URL("AR-B816-DX1HtyXm.png",import.meta.url).href,$e=""+new URL("AR-B816C-CIka6EB3.png",import.meta.url).href,Je=""+new URL("AR-SAND-BpLNDMKH.png",import.meta.url).href,qe=""+new URL("BRASS-5al0fgci.png",import.meta.url).href,Ke=""+new URL("BRSTONE-BxLw_BHN.png",import.meta.url).href,Qe=""+new URL("CLAY-9bOpp4wn.png",import.meta.url).href,Ze=""+new URL("CROSS-PtiPbaRk.png",import.meta.url).href,et=""+new URL("DASH-CZmcszsI.png",import.meta.url).href,tt=""+new URL("DOLMIT-Ds4N0lwQ.png",import.meta.url).href,nt=""+new URL("DOTS-DFwG-nhe.png",import.meta.url).href,lt=""+new URL("EARTH-C5ec_3YI.png",import.meta.url).href,ot=""+new URL("ESCHER-DfDvcwpb.png",import.meta.url).href,at=""+new URL("GRASS-Bos1Dol8.png",import.meta.url).href,it=""+new URL("GRATE-ntK-iw_6.png",import.meta.url).href,st=""+new URL("HEX-DvwF6L-t.png",import.meta.url).href,rt=""+new URL("HONEY-BwjEJk47.png",import.meta.url).href,_t=""+new URL("INSUL-DdipjSEk.png",import.meta.url).href,mt=""+new URL("SOLID-BE-LInwT.png",import.meta.url).href;function le(_){const i=[];let o=null;return _.split(` `).forEach(g=>{if(g.trim()!=="")if(g.startsWith("*")){o&&(o.value+=")",i.push(o));const p=g.substring(1).split(",").map(m=>m.trim());o={id:p[0],name:p[1],value:"(",imgPath:new URL(Object.assign({"../imgs/ACAD_ISO02W100.png":Ce,"../imgs/ACAD_ISO03W100.png":Ie,"../imgs/ACAD_ISO04W100.png":Re,"../imgs/ACAD_ISO05W100.png":Le,"../imgs/ACAD_ISO06W100.png":Ue,"../imgs/ACAD_ISO07W100.png":Oe,"../imgs/ACAD_ISO08W100.png":Ne,"../imgs/ACAD_ISO09W100.png":We,"../imgs/ACAD_ISO10W100.png":xe,"../imgs/ACAD_ISO11W100.png":Ve,"../imgs/ACAD_ISO12W100.png":Ee,"../imgs/ACAD_ISO13W100.png":Be,"../imgs/ACAD_ISO14W100.png":ke,"../imgs/ACAD_ISO15W100.png":ye,"../imgs/ANGLE.png":Pe,"../imgs/ANSI31.png":Te,"../imgs/ANSI32.png":Me,"../imgs/ANSI33.png":Fe,"../imgs/ANSI34.png":He,"../imgs/ANSI35.png":je,"../imgs/ANSI36.png":Ye,"../imgs/ANSI37.png":Ge,"../imgs/ANSI38.png":ze,"../imgs/AR-B816.png":Xe,"../imgs/AR-B816C.png":$e,"../imgs/AR-SAND.png":Je,"../imgs/BRASS.png":qe,"../imgs/BRSTONE.png":Ke,"../imgs/CLAY.png":Qe,"../imgs/CROSS.png":Ze,"../imgs/DASH.png":et,"../imgs/DOLMIT.png":tt,"../imgs/DOTS.png":nt,"../imgs/EARTH.png":lt,"../imgs/ESCHER.png":ot,"../imgs/GRASS.png":at,"../imgs/GRATE.png":it,"../imgs/HEX.png":st,"../imgs/HONEY.png":rt,"../imgs/INSUL.png":_t,"../imgs/SOLID.png":mt})[`../imgs/${p[0]}.png`],import.meta.url).href}}else{if(!o){console.error("Invalid pattern file format. Missing pattern start marker (*)");return}const p=g.trim().split(",").map(h=>h.startsWith(".")?"0"+h:h).join(),m=(o.value==="("?"(":" (")+p+")";o.value+=m}}),o&&i.push(o),i}var L=(_=>(_.ANSI="ANSI",_.ISO="ISO",_.ANY="ANY",_))(L||{});const F={ANSI:new URL(""+new URL("mx-CCuJTE_q.pat",import.meta.url).href,import.meta.url).href,ISO:new URL(""+new URL("mxiso-BxzaJzF8.pat",import.meta.url).href,import.meta.url).href,ANY:new URL(""+new URL("mxuser-tWg2Arwx.pat",import.meta.url).href,import.meta.url).href},A=R(),U=R(0),H={};Object.keys(F).forEach(async _=>{const i=F[_],v=await(await fetch(i)).blob(),g=await J(v);H[_]=le(g)});const O=R(""),B=_=>{O.value=F[_],A.value=H[_];let i=0;N.value&&(i=A.value.indexOf(N.value)),N.value=A.value[i]},N=R(),gt=_=>{if(A.value){const i=A.value.indexOf(_);i>=0&&(U.value=i)}N.value=_},pt=()=>({patContent:A,activeIndex:U,defaultPatContents:H,switchPath:B,filePath:O,item:N,onchange:gt}),ut={class:"px-3"},ct={class:"d-flex algin-center mt-3"},ft={class:"mt-2"},dt={class:"fill_box"},At=["onClick"],vt={class:"d-inline-block text-truncate"},St=q({__name:"FillSelectDialog",emits:["change"],setup(_,{expose:i,emit:o}){const{isShow:v,showDialog:g}=K(!1),p=R(),m=()=>{p.value&&p.value.click()},h=async u=>{const n=u.target,a=n.files;if(!a)return;const b=a[0],d=await ge(b);if(typeof d!="object")return;n.value="";const x=await J(d);A.value=le(x)},k=o,W=()=>{if(A.value){const u=A.value[U.value];k("change",u)}g(!1)},D=[{name:"确定",fun:W,primary:!0},{name:"关闭",fun:()=>g(!1)}];return i({showDialog:g}),(u,n)=>(E(),G(ne,{title:u.t("664"),"max-width":"400",modelValue:r(v),"onUpdate:modelValue":n[4]||(n[4]=a=>I(v)?v.value=a:null),footerBtnList:D},{default:l(()=>[c("div",ut,[c("div",ct,[ie(c("input",{class:"form__inset w-100",disabled:!0,"onUpdate:modelValue":n[0]||(n[0]=a=>I(O)?O.value=a:null)},null,512),[[se,r(O)]]),e(Q,{onClick:m,class:"ml-1"},{default:l(()=>[w(S(u.t("203"))+"(F)...",1)]),_:1})]),c("input",{type:"file",ref_key:"fillFileSelect",ref:p,onChange:h,style:{display:"none"},accept:".pat"},null,544),c("div",ft,[e(y,{density:"compact",class:"mr-2",onClick:n[1]||(n[1]=a=>r(B)(r(L).ANSI))},{default:l(()=>n[5]||(n[5]=[w("ANSI")])),_:1}),e(y,{density:"compact",class:"mr-2",onClick:n[2]||(n[2]=a=>r(B)(r(L).ISO))},{default:l(()=>n[6]||(n[6]=[w("ISO")])),_:1}),e(y,{density:"compact",onClick:n[3]||(n[3]=a=>r(B)(r(L).ANY))},{default:l(()=>[w(S(u.t("665")),1)]),_:1})]),c("div",dt,[(E(!0),Z(te,null,re(r(A),(a,b)=>(E(),G(_e,{text:a.id+" "+a.name,location:"bottom","open-delay":800},{activator:l(({props:d})=>[c("div",me({ref_for:!0},d,{class:["fill_pattern",r(U)===b?"fill_pattern_active":""],onClick:x=>U.value=b,onDblclick:W}),[e(ee,{src:a.imgPath||"",width:"32",height:"32"},null,8,["src"]),c("span",vt,S(a.id),1)],16,At)]),_:2},1032,["text"]))),256))])])]),_:1},8,["title","modelValue"]))}}),wt=pe(St,[["__scopeId","data-v-7f7d957f"]]),ht={class:"px-3"},bt={class:"d-flex align-center"},Dt={class:"mr-2"},Rt=q({__name:"index",setup(_){const{isShow:i,showDialog:o}=K(!1,"Mx_Hatch"),v=R(),{patContent:g,onchange:p,item:m,switchPath:h}=pt(),k=ue(i,t=>{t&&!g.value&&(h(L.ANSI),k())}),W=t=>{v.value?.showDialog(t)},D=z(0,"PatternFillingDialog_angle"),u=z(11,"PatternFillingDialog_proportion");let n,a;const b=async()=>{o(!1);const t=new ce;t.clearLastInputPoint(),t.setMessage(` `+V("指定填充区域内部一点")+":"),t.disableAllTrace(!0),t.setDisableOsnap(!0);const s=await t.go();s&&(a=s,n="point"),o(!0)};let d;const x=async()=>{o(!1);const t=await X.userSelect(V("选择对象"));if(t&&t.length>0){const f=t[0].getMcDbEntity();f&&(d=f),n="object"}o(!0)},j=async()=>{if(n==="point"&&a){const t=X.builderHatchFromPoint(a);if(!t){fe.acutPrintf(V("没有找到闭合区域")+` `),de().error(V("没有找到闭合区域"));return}let s=Ae.getCurrentMxCAD();m.value&&(s.addPatternDefinition(m.value.id,m.value.value),s.drawPatternDefinition=m.value.id),t.patternAngle=D.value,s.drawHatch(t,u.value*10),o(!1),ve(),n=a=void 0}n==="object"&&d&&(d instanceof Se&&new we,d=n=void 0,o(!1))},Y=()=>{n=d=a=void 0,o(!1)},oe=[{name:"确定",fun:j,primary:!0,disabled:()=>typeof n>"u"},{name:"关闭",fun:Y}],ae={enter:()=>{document.activeElement?.tagName!=="INPUT"&&j()},esc:Y,k:b,b:x};return(t,s)=>(E(),Z(te,null,[e(ne,{title:t.t("666"),"max-width":"360",modelValue:r(i),"onUpdate:modelValue":s[4]||(s[4]=f=>I(i)?i.value=f:null),footerBtnList:oe,keys:ae},{default:l(()=>[c("div",ht,[e(P,{title:t.t("667"),class:"mt-2"},{default:l(()=>[e(T,null,{default:l(()=>[e(C,{cols:"8"},{default:l(()=>[e(he,{items:r(g),"item-title":"id",modelValue:r(m),"onUpdate:modelValue":[s[0]||(s[0]=f=>I(m)?m.value=f:null),r(p)],"return-object":""},{prepend:l(()=>[w(S(t.t("422"))+": ",1)]),_:1},8,["items","modelValue","onUpdate:modelValue"])]),_:1}),e(C,{cols:"4"},{default:l(()=>[e(Q,{style:{"min-width":"60px"},onClick:s[1]||(s[1]=f=>W(!0))},{default:l(()=>[e(be,{icon:"class:iconfont more"})]),_:1})]),_:1})]),_:1}),e(T,null,{default:l(()=>[e(C,{cols:"8"},{default:l(()=>[c("div",bt,[c("span",Dt,S(t.t("668"))+":",1),e(ee,{src:r(m)?.imgPath||"",width:"32",height:"32",style:{flex:"unset"}},null,8,["src"])])]),_:1}),e(C,{cols:"4"})]),_:1})]),_:1},8,["title"]),e(P,{title:t.t("669"),class:"mt-2"},{default:l(()=>[e(T,null,{default:l(()=>[e(C,{cols:"6"},{default:l(()=>[e(M,{"key-name":"G",colon:""},{default:l(()=>[w(S(t.t("235")),1)]),_:1}),e($,{modelValue:r(D),"onUpdate:modelValue":s[2]||(s[2]=f=>I(D)?D.value=f:null),items:[0,5,10,15,20,30,45,60,90,95,100,120,135,150]},null,8,["modelValue"])]),_:1}),e(C,{cols:"6"},{default:l(()=>[e(M,{"key-name":"S",colon:""},{default:l(()=>[w(S(t.t("169")),1)]),_:1}),e($,{modelValue:r(u),"onUpdate:modelValue":s[3]||(s[3]=f=>I(u)?u.value=f:null),items:[.25,.5,.75,1,1.25,1.5,1.75,2,11]},null,8,["modelValue"])]),_:1})]),_:1})]),_:1},8,["title"]),e(P,{title:t.t("670"),class:"mt-2"},{default:l(()=>[c("div",null,[e(De,{onClick:b}),e(M,{"key-name":"K"},{default:l(()=>[w(S(t.t("671"))+": "+S(t.t("145")),1)]),_:1})])]),_:1},8,["title"])])]),_:1},8,["title","modelValue"]),e(wt,{ref_key:"fillSelectDialog",ref:v,onChange:r(p)},null,8,["onChange"])],64))}});export{Rt as default};