@zhangqingcq/vgce 0.0.24 → 0.0.25

Sign up to get free protection for your applications and to get access to all the features.
package/dist/vgce.umd.cjs CHANGED
@@ -204,7 +204,7 @@ echarts.use([`+Dt+"]);":"Unknown series "+Ve))}return}if(ae==="tooltip"){if(ze){
204
204
  if (customElements.get(tag) == null) {
205
205
  customElements.define(tag, EChartsElement);
206
206
  }
207
- `)("x-vue-echarts")}catch{return w=!1}return w=!0}(),U="ecTheme",S=vue.defineComponent({name:"echarts",props:O(O({option:Object,theme:{type:[Object,String]},initOptions:Object,updateOptions:Object,group:String,manualUpdate:Boolean},_),L),emits:{},inheritAttrs:!1,setup:function(i,n){var r=n.attrs,g=vue.shallowRef(),V=vue.shallowRef(),k=vue.shallowRef(),$=vue.inject("ecTheme",null),oe=vue.inject("ecInitOptions",null),re=vue.inject("ecUpdateOptions",null),Ce=vue.toRefs(i),ie=Ce.autoresize,ae=Ce.manualUpdate,le=Ce.loading,Ie=Ce.loadingOptions,ue=vue.computed(function(){return k.value||i.option||null}),de=vue.computed(function(){return i.theme||j($,{})}),Ne=vue.computed(function(){return i.initOptions||j(oe,{})}),he=vue.computed(function(){return i.updateOptions||j(re,{})}),pe=vue.computed(function(){return function($e){var Fe={};for(var Ue in $e)x(Ue)||(Fe[Ue]=$e[Ue]);return Fe}(r)}),ze=vue.getCurrentInstance().proxy.$listeners;function xe($e){if(g.value){var Fe=V.value=init(g.value,de.value,Ne.value);i.group&&(Fe.group=i.group);var Ue=ze;Ue||(Ue={},Object.keys(r).filter(function(Dt){return Dt.indexOf("on")===0&&Dt.length>2}).forEach(function(Dt){var qe=Dt.charAt(2).toLowerCase()+Dt.slice(3);qe.substring(qe.length-4)==="Once"&&(qe="~".concat(qe.substring(0,qe.length-4))),Ue[qe]=r[Dt]})),Object.keys(Ue).forEach(function(Dt){var qe=Ue[Dt];if(qe){var kt=Dt.toLowerCase();kt.charAt(0)==="~"&&(kt=kt.substring(1),qe.__once__=!0);var Et=Fe;if(kt.indexOf("zr:")===0&&(Et=Fe.getZr(),kt=kt.substring(3)),qe.__once__){delete qe.__once__;var jt=qe;qe=function(){for(var ti=[],Lt=0;Lt<arguments.length;Lt++)ti[Lt]=arguments[Lt];jt.apply(void 0,ti),Et.off(kt,qe)}}Et.on(kt,qe)}}),ie.value?vue.nextTick(function(){Fe&&!Fe.isDisposed()&&Fe.resize(),Ve()}):Ve()}function Ve(){var Dt=$e||ue.value;Dt&&Fe.setOption(Dt,he.value)}}function Oe(){V.value&&(V.value.dispose(),V.value=void 0)}var _e=null;vue.watch(ae,function($e){typeof _e=="function"&&(_e(),_e=null),$e||(_e=vue.watch(function(){return i.option},function(Fe,Ue){Fe&&(V.value?V.value.setOption(Fe,O({notMerge:Fe.value!==(Ue==null?void 0:Ue.value)},he.value)):xe())},{deep:!0}))},{immediate:!0}),vue.watch([de,Ne],function(){Oe(),xe()},{deep:!0}),vue.watchEffect(function(){i.group&&V.value&&(V.value.group=i.group)});var At=y(V);return function($e,Fe,Ue){var Ve=vue.inject("ecLoadingOptions",{}),Dt=vue.computed(function(){return O(O({},j(Ve,{})),Ue==null?void 0:Ue.value)});vue.watchEffect(function(){var qe=$e.value;qe&&(Fe.value?qe.showLoading(Dt.value):qe.hideLoading())})}(V,le,Ie),function($e,Fe,Ue){var Ve=null;vue.watch([Ue,$e,Fe],function(Dt,qe,kt){var Et=Dt[0],jt=Dt[1],ti=Dt[2];Et&&jt&&ti&&(Ve=throttle$1(function(){jt.resize()},100),addListener(Et,Ve)),kt(function(){Ve&&Et&&removeListener(Et,Ve)})})}(V,ie,g),vue.onMounted(function(){xe()}),vue.onBeforeUnmount(function(){T&&g.value?g.value.__dispose=Oe:Oe()}),O({chart:V,root:g,setOption:function($e,Fe){i.manualUpdate&&(k.value=$e),V.value?V.value.setOption($e,Fe||{}):xe($e)},nonEventAttrs:pe},At)},render:function(){var i=O({},this.nonEventAttrs);return i.ref="root",i.class=i.class?["echarts"].concat(i.class):"echarts",vue.h("x-vue-echarts",i)}});const _sfc_main$m=vue.defineComponent({__name:"pie-charts",props:{title:{type:String,default:"标题"},seriesName:{type:String,default:"详情"},seriesData:{type:Array,default:()=>[]}},setup(i){const n=i;use([install$7,install$6,install$3,install$4,install]),vue.provide(U,"dark");const r=vue.reactive({title:{text:n.title,left:"center"},tooltip:{trigger:"item",formatter:"{a} <br/>{b} : {c} ({d}%)"},legend:{orient:"vertical",left:"left"},series:[{name:n.seriesName,type:"pie",radius:"55%",center:["50%","60%"],data:n.seriesData,emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}}}]});return vue.watch(n,g=>{r.title.text=g.title,r.series[0].name=g.seriesName,r.series[0].data=g.seriesData}),(g,V)=>(vue.openBlock(),vue.createBlock(vue.unref(S),{class:"chart",option:vue.unref(r),autoresize:""},null,8,["option"]))}}),pieCharts_vue_vue_type_style_index_0_scoped_0a4c1b1f_lang="",_export_sfc=(i,n)=>{const r=i.__vccOpts||i;for(const[g,V]of n)r[g]=V;return r},PieCharts=_export_sfc(_sfc_main$m,[["__scopeId","data-v-0a4c1b1f"]]),_hoisted_1$g=["id"],_hoisted_2$e=["id"],_hoisted_3$c=["fill"],_hoisted_4$a=["fill"],_hoisted_5$8=["fill"],_hoisted_6$6=vue.createElementVNode("path",{d:"M375.466667 709.214815l-25.6 137.481481c0 2.844444 1.896296 5.688889 7.585185 10.42963l65.422222 54.992593c5.688889 4.740741 15.17037 8.533333 23.703704 10.429629l36.029629-193.422222-107.14074-19.911111z",fill:"#2D4375"},null,-1),_hoisted_7$6=vue.createElementVNode("path",{d:"M482.607407 729.125926l-36.029629 193.422222c9.481481 1.896296 18.014815 1.896296 25.6-0.948148l80.592592-27.496296c6.637037-1.896296 10.42963-4.740741 11.377778-6.637037L589.748148 749.037037l-107.140741-19.911111z",fill:"#1E2D4F"},null,-1),_hoisted_8$5=["fill-opacity"],_hoisted_9$5=["fill-opacity"],_hoisted_10$4=["fill-opacity"],_hoisted_11$4=vue.createElementVNode("path",{d:"M593.540741 807.822222c1.896296-7.585185-3.792593-15.17037-11.377778-16.118518l-107.140741-19.911111-4.740741 27.496296 107.140741 19.911111c6.637037 0.948148 14.222222-3.792593 16.118519-11.377778z",fill:"#CEEFF6"},null,-1),_hoisted_12$3=vue.createElementVNode("path",{d:"M366.933333 750.933333c-7.585185-1.896296-15.17037 3.792593-16.118518 11.377778-1.896296 7.585185 3.792593 15.17037 11.377778 16.118519l107.14074 19.911111 4.740741-27.496297-107.140741-19.911111zM356.503704 808.77037c-7.585185-1.896296-15.17037 3.792593-16.118519 11.377778-1.896296 7.585185 3.792593 15.17037 11.377778 16.118519l107.140741 19.911111 4.74074-27.496297-107.14074-19.911111z",fill:"#FFFFFF"},null,-1),_hoisted_13$3=vue.createElementVNode("path",{d:"M570.785185 848.592593l-107.140741-19.911112-4.74074 27.496297 107.14074 19.911111c7.585185 1.896296 15.17037-3.792593 16.118519-11.377778 1.896296-7.585185-2.844444-15.17037-11.377778-16.118518z",fill:"#CEEFF6"},null,-1),_hoisted_14$3=["xlink:href"],_sfc_main$l=vue.defineComponent({__name:"light-a",props:{id:{default:""},isOpen:{type:Boolean,default:!1}},emits:["onChange"],setup(i,{emit:n}){const r=i;return vue.watch(()=>r.isOpen,()=>{n("onChange")}),(g,V)=>(vue.openBlock(),vue.createElementBlock("g",{id:r.id,style:{cursor:"pointer"}},[vue.createElementVNode("symbol",{id:`${r.id}light-121`,viewBox:"0 0 1024 1024"},[vue.createElementVNode("path",{d:"M565.096296 289.185185s-0.948148 0 0 0c-110.933333-20.859259-208.592593 40.77037-237.985185 148.859259-14.222222 53.096296-24.651852 101.451852 44.562963 221.866667 14.222222 25.6 11.377778 70.162963 8.533333 95.762963-1.896296 14.222222 64.474074 36.02963 89.125926 42.666667l95.762963-509.155556z",fill:r.isOpen?"#FDB813":"#cccccc"},null,8,_hoisted_3$c),vue.createElementVNode("path",{d:"M732.918519 513.896296c11.377778-111.881481-56.888889-203.851852-166.874075-224.711111h-0.948148L469.333333 798.340741c25.6 2.844444 94.814815 6.637037 98.607408-7.585185 6.637037-25.6 20.859259-67.318519 42.666666-86.281482C719.644444 618.192593 727.22963 568.888889 732.918519 513.896296z",fill:r.isOpen?"#FD9B13":"#bbbbbb"},null,8,_hoisted_4$a),vue.createElementVNode("path",{d:"M467.437037 806.874074c-7.585185-0.948148-12.325926-7.585185-14.222222-14.222222l-38.874074-256c-0.948148-5.688889 0.948148-11.377778 4.74074-15.170371 3.792593-3.792593 9.481481-5.688889 15.170371-4.74074l167.822222 31.288889c5.688889 0.948148 10.42963 4.740741 12.325926 9.481481 1.896296 4.740741 1.896296 11.377778-0.948148 16.118519L486.4 798.340741c-3.792593 6.637037-11.377778 10.42963-18.962963 8.533333z m-14.222222-251.259259l27.496296 182.992592L572.681481 578.37037l-119.466666-22.755555z",fill:r.isOpen?"#F12A3F":"#666666"},null,8,_hoisted_5$8),_hoisted_6$6,_hoisted_7$6,vue.createElementVNode("path",{d:"M612.503704 217.125926c-3.792593 18.014815-20.859259 29.392593-38.874074 26.548148-18.014815-3.792593-30.340741-20.859259-26.548149-38.874074l18.962963-100.503704c3.792593-18.014815 20.859259-29.392593 38.874075-26.548148 18.014815 3.792593 30.340741 20.859259 26.548148 38.874074l-18.962963 100.503704z",fill:"#FDB813","fill-opacity":r.isOpen?1:0},null,8,_hoisted_8$5),vue.createElementVNode("path",{d:"M382.103704 228.503704c10.42963 15.17037 6.637037 36.02963-8.533334 46.459259-15.17037 10.42963-36.02963 6.637037-46.459259-8.533333l-57.837037-84.385186c-10.42963-15.17037-6.637037-36.02963 8.533333-46.459259 15.17037-10.42963 36.02963-6.637037 46.45926 8.533334l57.837037 84.385185zM757.57037 298.666667c-15.17037 10.42963-18.962963 31.288889-8.533333 46.459259 10.42963 15.17037 31.288889 18.962963 46.459259 8.533333l84.385185-57.837037c15.17037-10.42963 18.962963-31.288889 8.533334-46.459259-10.42963-15.17037-31.288889-18.962963-46.459259-8.533333l-84.385186 57.837037z",fill:"#FDB813","fill-opacity":r.isOpen?1:0},null,8,_hoisted_9$5),vue.createElementVNode("path",{d:"M252.207407 361.244444c18.014815 3.792593 30.340741 20.859259 26.548149 38.874075-3.792593 18.014815-20.859259 29.392593-38.874075 26.548148l-100.503703-18.962963c-18.014815-3.792593-30.340741-20.859259-26.548148-38.874074 3.792593-18.014815 20.859259-29.392593 38.874074-26.548149l100.503703 18.962963zM931.081481 488.296296c18.014815 3.792593 30.340741 20.859259 26.548149 38.874074-3.792593 18.014815-20.859259 29.392593-38.874074 26.548149l-100.503704-18.962963c-18.014815-3.792593-30.340741-20.859259-26.548148-38.874075 3.792593-18.014815 20.859259-29.392593 38.874074-26.548148l100.503703 18.962963z",fill:"#FDB813","fill-opacity":r.isOpen?1:0},null,8,_hoisted_10$4),_hoisted_11$4,_hoisted_12$3,_hoisted_13$3],8,_hoisted_2$e),vue.createElementVNode("use",{"xlink:href":`#${r.id}light-121`,width:"100",height:"100"},null,8,_hoisted_14$3)],8,_hoisted_1$g))}}),_hoisted_1$f=["id"],_hoisted_2$d=["id"],_hoisted_3$b=vue.createElementVNode("path",{d:"M512.3 518.9m-469.2 0a469.2 469.2 0 1 0 938.4 0 469.2 469.2 0 1 0-938.4 0Z",fill:"#429BCF"},null,-1),_hoisted_4$9=vue.createElementVNode("path",{d:"M512.3 518.9m-392.5 0a392.5 392.5 0 1 0 785 0 392.5 392.5 0 1 0-785 0Z",fill:"#FFFFFF"},null,-1),_hoisted_5$7={d:"M512.3 523.8c-4.5 0-9-1.7-12.4-5.1-6.8-6.8-6.8-17.9 0-24.8l130.8-130.8c6.8-6.8 17.9-6.8 24.8 0 6.8 6.8 6.8 17.9 0 24.8L524.7 518.7c-3.5 3.4-7.9 5.1-12.4 5.1z",fill:"#2D416C"},_hoisted_6$5=["from","to"],_hoisted_7$5={d:"M512.3 523.8c-4.5 0-9-1.7-12.4-5.1L318.3 337.1c-6.8-6.8-6.8-17.9 0-24.8 6.8-6.8 17.9-6.8 24.8 0L524.7 494c6.8 6.8 6.8 17.9 0 24.8-3.5 3.3-7.9 5-12.4 5z",fill:"#365087"},_hoisted_8$4=["from","to"],_hoisted_9$4=vue.createElementVNode("path",{d:"M512.3 506.3m-47.5 0a47.5 47.5 0 1 0 95 0 47.5 47.5 0 1 0-95 0Z",fill:"#365087"},null,-1),_hoisted_10$3=vue.createElementVNode("path",{d:"M512.3 218.8c-9 0-16.3-7.3-16.3-16.3v-29.1c0-9 7.3-16.3 16.3-16.3s16.3 7.3 16.3 16.3v29.1c0 9-7.4 16.3-16.3 16.3zM512.3 880.8c-9 0-16.3-7.3-16.3-16.3v-29.1c0-9 7.3-16.3 16.3-16.3s16.3 7.3 16.3 16.3v29.1c0 9-7.4 16.3-16.3 16.3zM812.4 518.9c0-9 7.3-16.3 16.3-16.3h29.1c9 0 16.3 7.3 16.3 16.3s-7.3 16.3-16.3 16.3h-29.1c-8.9 0-16.3-7.3-16.3-16.3zM150.4 518.9c0-9 7.3-16.3 16.3-16.3h29.1c9 0 16.3 7.3 16.3 16.3s-7.3 16.3-16.3 16.3h-29.1c-8.9 0-16.3-7.3-16.3-16.3z",fill:"#2D416C"},null,-1),_hoisted_11$3={d:"M296.9 733.5c-2.2 0-4.5-0.9-6.2-2.6-3.4-3.4-3.4-9 0-12.4L540 469.2c3.4-3.4 9-3.4 12.4 0 3.4 3.4 3.4 9 0 12.4L303.1 731c-1.7 1.7-4 2.5-6.2 2.5z",fill:"#C11B16"},_hoisted_12$2=["from","to"],_hoisted_13$2=vue.createElementVNode("path",{d:"M512.3 506.3m-22.8 0a22.8 22.8 0 1 0 45.6 0 22.8 22.8 0 1 0-45.6 0Z",fill:"#fff"},null,-1),_hoisted_14$2=["xlink:href"],_sfc_main$k=vue.defineComponent({__name:"clock-a",props:{id:{default:""}},setup(i){const n=i,r=vue.ref(new Date),g=r.value.getSeconds(),V=r.value.getMinutes(),k=Math.floor((r.value.getHours()+(V+g/60)/60)*30);return($,oe)=>(vue.openBlock(),vue.createElementBlock("g",{id:n.id},[vue.createElementVNode("symbol",{id:`${n.id}clock-a-n`,viewBox:"0 0 1024 1024"},[_hoisted_3$b,_hoisted_4$9,vue.createElementVNode("path",_hoisted_5$7,[vue.createElementVNode("animateTransform",{attributeName:"transform",attributeType:"XML",type:"rotate",from:`${-45+vue.unref(k)} 512.3 506.3`,to:`${315+vue.unref(k)} 512.3 506.3`,dur:"43200s",repeatCount:"indefinite"},null,8,_hoisted_6$5)]),vue.createElementVNode("path",_hoisted_7$5,[vue.createElementVNode("animateTransform",{attributeName:"transform",attributeType:"XML",type:"rotate",from:`${45+vue.unref(V)*6} 512.3 506.3`,to:`${405+vue.unref(V)*6} 512.3 506.3`,dur:"3600s",repeatCount:"indefinite"},null,8,_hoisted_8$4)]),_hoisted_9$4,_hoisted_10$3,vue.createElementVNode("path",_hoisted_11$3,[vue.createElementVNode("animateTransform",{attributeName:"transform",attributeType:"XML",type:"rotate",from:`${135.5+vue.unref(g)*6} 512.3 506.3`,to:`${495.5+vue.unref(g)*6} 512.3 506.3`,dur:"60s",repeatCount:"indefinite"},null,8,_hoisted_12$2)]),_hoisted_13$2],8,_hoisted_2$d),vue.createElementVNode("use",{"xlink:href":`#${n.id}clock-a-n`,width:"100",height:"100"},null,8,_hoisted_14$2)],8,_hoisted_1$f))}}),vueComp={"svg-text":_sfc_main$p,"el-button":ElButton,"progress-a":_sfc_main$r,"el-tag":ElTag,"common-table":_sfc_main$o,"pie-charts":PieCharts,"switch-a":_sfc_main$q,"now-time":_sfc_main$n,"light-a":_sfc_main$l,"clock-a":_sfc_main$k},config=[...svg_config,...vue_config],useGlobalStore=pinia$1.defineStore("global-store",{state:()=>({config_center:config,intention:EGlobalStoreIntention.None,create_svg_info:null,done_json:[],mouse_info:{state:EMouseInfoState.Up,position_x:0,position_y:0,now_position_x:0,now_position_y:0,new_position_x:0,new_position_y:0},handle_svg_info:null,scale_info:{type:EScaleInfoType.None,scale_times:{x:1,y:1},scale_item_info:{x:0,y:0},symmetric_point:{x:0,y:0}},rotate_info:{angle:0},connection_line_node_info:{init_pos:{x:0,y:0},point_index:0}}),actions:{setCreateInfo(i){this.intention=EGlobalStoreIntention.Create,this.create_svg_info=i},setDoneJson(i){isOfType(i,"id")?(this.done_json.push(i),vue.nextTick(()=>{setSvgActualInfo(i)})):this.done_json=objectDeepClone(i),vue.nextTick(()=>{useHistoryRecord(objectDeepClone(this.done_json))})},setHandleSvgInfo(i,n){let r=n;i?(!r&&r!=0&&(r=this.done_json.findIndex(g=>g.id===i.id)??-1),this.handle_svg_info={info:i,index:r}):this.handle_svg_info=i},spliceDoneJson(i){const n=useGlobalStore();n.done_json.splice(i,1),useHistoryRecord(n.done_json)}}}),useSvgEditLayoutStore=pinia$1.defineStore("svg-edit-layout-store",{state:()=>({left_nav:!0,right_nav:!0,center_offset:{x:0,y:0},canvasInfo:{with:0,height:0,top:0,left:0}})}),randomString=i=>{i=i||10;const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=n.length;let g="";for(let V=0;V<i;V++){let k=r;V===0&&(k=r-10),g+=n.charAt(Math.floor(Math.random()*k))}return g},isOfType=(i,n)=>i[n]!==void 0,getCoordinateOffset=(i,n)=>i/2*(n-1),angleToRadian=i=>i*Math.PI/180,calculateRotatedPointCoordinate=(i,n,r)=>({x:parseFloat(((i.x-n.x)*Math.cos(angleToRadian(r))-(i.y-n.y)*Math.sin(angleToRadian(r))+n.x).toFixed(1)),y:parseFloat(((i.x-n.x)*Math.sin(angleToRadian(r))+(i.y-n.y)*Math.cos(angleToRadian(r))+n.y).toFixed(1))}),getCenterPoint=(i,n)=>({x:i.x+(n.x-i.x)/2,y:i.y+(n.y-i.y)/2}),positionArrToPath=i=>{let n="";for(let r=0;r<i.length;r++)r===0?n+=`M ${i[r].x} ${i[r].y}`:n+=` L ${i[r].x} ${i[r].y}`;return n},getSvgNowPosition=(i,n,r)=>r+(n-i),objectDeepClone=(i,n={})=>i?JSON.parse(JSON.stringify(i)):n,setSvgActualInfo=(i,n)=>{const r=document.querySelector(`#${i.id}`),g=document.querySelector(`#rect${i.id}`);if(r){let V=0,k=0,$=0,oe=0;if(i.type!==EDoneJsonType.Vue){const re=r.getBBox();V=parseFloat(re.x.toFixed(0)),k=parseFloat(re.y.toFixed(0)),$=parseFloat(re.width.toFixed(0)),oe=parseFloat(re.height.toFixed(0))}else{$=r.offsetWidth,oe=r.offsetHeight,$=$===0?100:$,oe=oe===0?100:oe,V=50-$/2,k=50-oe/2;const re=document.querySelector(`#foreign-object${i.id}`);re&&re.getAttribute("x")==="0"&&re.getAttribute("y")==="0"&&re.getAttribute("width")==="0"&&re.getAttribute("height")==="0"&&(re.setAttribute("x",V.toString()),re.setAttribute("y",k.toString()),re.setAttribute("width",$.toString()),re.setAttribute("height",oe.toString()))}g&&g.getAttribute("x")==="0"&&g.getAttribute("y")==="0"&&g.getAttribute("width")==="0"&&g.getAttribute("height")==="0"&&(g.setAttribute("x",V.toString()),g.setAttribute("y",k.toString()),g.setAttribute("width",$.toString()),g.setAttribute("height",oe.toString())),(i.actual_bound.x===0&&i.actual_bound.y===0&&i.actual_bound.width===0&&i.actual_bound.height===0||n)&&(i.actual_bound={x:V,y:k,width:$,height:oe}),i.center_position={x:i.x+i.actual_bound.x+$/2,y:i.y+i.actual_bound.y+oe/2},i.point_coordinate.tl={x:i.center_position.x-$*i.scale_x/2,y:i.center_position.y-oe*i.scale_y/2},i.point_coordinate.tc={x:i.center_position.x,y:i.center_position.y-oe*i.scale_y/2},i.point_coordinate.tr={x:i.center_position.x+$*i.scale_x/2,y:i.center_position.y-oe*i.scale_y/2},i.point_coordinate.l={x:i.center_position.x-$*i.scale_x/2,y:i.center_position.y},i.point_coordinate.r={x:i.center_position.x+$*i.scale_x/2,y:i.center_position.y},i.point_coordinate.bl={x:i.center_position.x-$*i.scale_x/2,y:i.center_position.y+oe*i.scale_y/2},i.point_coordinate.bc={x:i.center_position.x,y:i.center_position.y+oe*i.scale_y/2},i.point_coordinate.br={x:i.center_position.x+$*i.scale_x/2,y:i.center_position.y+oe*i.scale_y/2},i.rotate!==0&&setAfterRotationPointCoordinate(i),moveAnchors(i)}},resetHandlePointOld=i=>{for(const n of Object.keys(i.point_coordinate))i.point_coordinate_old&&(i.point_coordinate_old[n].x=0,i.point_coordinate_old[n].y=0)},moveHandlePoint=(i,n,r)=>{const g=useGlobalStore(pinia),V=n??g.mouse_info.new_position_x-g.mouse_info.position_x,k=r??g.mouse_info.new_position_y-g.mouse_info.position_y;for(const $ of Object.keys(i.point_coordinate))n!==void 0&&r!==void 0?(i.point_coordinate[$].x+=V,i.point_coordinate[$].y+=k):i.point_coordinate_old&&(i.point_coordinate[$].x=i.point_coordinate_old[$].x+V,i.point_coordinate[$].y=i.point_coordinate_old[$].y+k)},moveAnchors=i=>{var r,g,V,k;const n=useGlobalStore(pinia);for(let $ of n.done_json)if($.type===EDoneJsonType.ConnectionLine){if(((g=(r=$.bind_anchors)==null?void 0:r.start)==null?void 0:g.target_id)===i.id){const oe=getAnchorPosByAnchorType($.bind_anchors.start.type,i);$.props.point_position.val[0]={x:oe.x-$.x,y:oe.y-$.y}}if(((k=(V=$.bind_anchors)==null?void 0:V.end)==null?void 0:k.target_id)===i.id){const oe=getAnchorPosByAnchorType($.bind_anchors.end.type,i);$.props.point_position.val[$.props.point_position.val.length-1]={x:oe.x-$.x,y:oe.y-$.y}}}},getAnchorPosByAnchorType=(i,n)=>i===ELineBindAnchors.BottomCenter?n.point_coordinate.bc:i===ELineBindAnchors.Left?n.point_coordinate.l:i===ELineBindAnchors.Right?n.point_coordinate.r:n.point_coordinate.tc,setAfterRotationPointCoordinate=i=>{i.point_coordinate={tl:calculateRotatedPointCoordinate(i.point_coordinate.tl,i.center_position,i.rotate),tc:calculateRotatedPointCoordinate(i.point_coordinate.tc,i.center_position,i.rotate),tr:calculateRotatedPointCoordinate(i.point_coordinate.tr,i.center_position,i.rotate),l:calculateRotatedPointCoordinate(i.point_coordinate.l,i.center_position,i.rotate),r:calculateRotatedPointCoordinate(i.point_coordinate.r,i.center_position,i.rotate),bl:calculateRotatedPointCoordinate(i.point_coordinate.bl,i.center_position,i.rotate),bc:calculateRotatedPointCoordinate(i.point_coordinate.bc,i.center_position,i.rotate),br:calculateRotatedPointCoordinate(i.point_coordinate.br,i.center_position,i.rotate)}},prosToVBind=i=>{var r,g,V,k;let n={};if(i.state){for(const $ in i.state)if($==="OnOff")for(const oe in(r=i.state[$])==null?void 0:r.props)n={...n,[oe]:(g=i.state[$])!=null&&g.default?(V=i.state[$])==null?void 0:V.props[oe].openVal:(k=i.state[$])==null?void 0:k.props[oe].closeVal}}for(const $ in i.props)n={...n,[$]:i.props[$].val};return n},setArrItemByID=(id,key,val,json_arr)=>new Promise(res=>{const find_item=json_arr.find(i=>i.id===id);find_item||res({status:!1,msg:"要设置的id不存在"}),eval(`find_item.${key} = val;`),res({status:!0,msg:"操作成功"})}),getCommonClass=i=>!i.common_animations||!i.common_animations.val?"":`common-ani animate__animated animate__${i.common_animations.val} animate__${i.common_animations.speed} animate__${i.common_animations.repeat} animate__${i.common_animations.delay}`,numberArray=i=>{let n=[];for(let r=0;r<i;r++)n.push(r);return n},getStringWidth=(i,n=12)=>{if(i.length>0){let r=document.createElement("span");r.style.fontSize=n+"px",r.style.fontFamily="inherit",r.innerHTML=i,r.style.opacity="0",r.style.position="fixed",r.style.top="3000px",document.body.append(r);const g=r.clientWidth;return document.body.removeChild(r),g}return 0},valFormat=i=>/false|true/.test(i)?i!=="false":/^\d+(\.\d+)?$/.test(i)?Number(i):i,createLine=(i,n,r)=>{i.preventDefault();const g=useGlobalStore(pinia),V=useConfigStore(pinia),k=useSvgEditLayoutStore(pinia),{clientX:$,clientY:oe}=i;let re=objectDeepClone(V.connection_line),Ce=0,ie=0;if(n&&r){re.bind_anchors.start={type:n,target_id:r.id};let le=getAnchorPosByAnchorType(n,r);Ce=le.x,ie=le.y}else Ce=Math.round(($-k.canvasInfo.left)/V.svg.scale-k.center_offset.x),ie=Math.round((oe-k.canvasInfo.top)/V.svg.scale-k.center_offset.y);const ae={id:straight_line_system.name+randomString(),x:Ce,y:ie,client:{x:Ce,y:ie},scale_x:1,scale_y:1,rotate:0,actual_bound:{x:0,y:0,width:0,height:0},center_position:{x:0,y:0},point_coordinate:{tl:{x:0,y:0},tc:{x:0,y:0},tr:{x:0,y:0},l:{x:0,y:0},r:{x:0,y:0},bl:{x:0,y:0},bc:{x:0,y:0},br:{x:0,y:0}},...re};ae.props.point_position.val.push({x:0,y:0}),g.setDoneJson(ae),g.setHandleSvgInfo(ae,g.done_json.length-1),g.intention=EGlobalStoreIntention.Connection,g.mouse_info={state:EMouseInfoState.Down,position_x:Ce,position_y:ie,now_position_x:Ce,now_position_y:ie,new_position_x:0,new_position_y:0}};let l=localStorage.getItem("svg-editor-config"),s,t;if(l){let i=JSON.parse(l);t=i.connection_line,s=i.svg}else t=objectDeepClone(connection_line_system),s={background_color:"#fff",scale:1,grid:!0,grid_color:"#ebebeb",ruler:!0};const useConfigStore=pinia$1.defineStore("config-store",{state:()=>({svg:s,connection_line:t,net:{mqtt:{url:"",user:"",pwd:"",topics:""}}}),getters:{},actions:{}});var EContextMenuInfoType=(i=>(i.Copy="Copy",i.Delete="Delete",i.MoveUpOneLevel="MoveUpOneLevel",i.MoveDownOneLevel="MoveDownOneLevel",i.MoveUpTopLevel="MoveUpTopLevel",i.MoveDownTopLevel="MoveDownTopLevel",i))(EContextMenuInfoType||{});const useEditPrivateStore=pinia$1.defineStore("edit-private-store",{state:()=>({old_done_components:[],history_doneComponent:[],history_now_index:0,is_record_history:!0,max_record_times:10}),getters:{getTopBtnUndoStatus(i){return i.history_now_index>=1},getTopBtnRedoStatus(i){return i.history_now_index+1!=i.history_doneComponent.length}},actions:{topUndoBtnClick(){if(console.log("撤销"),this.history_now_index<1)return;const i=useGlobalStore();this.is_record_history=!1,this.history_now_index-=1,i.setDoneJson(this.history_doneComponent[this.history_now_index])},topRedoBtnClick(){if(console.log("重做"),this.history_now_index+1==this.history_doneComponent.length)return;const i=useGlobalStore();this.is_record_history=!1,this.history_now_index+=1,i.setDoneJson(this.history_doneComponent[this.history_now_index])}}}),useContextMenuStore=pinia$1.defineStore("context-menu-store",{state:()=>({display:!1,info:{[EContextMenuInfoType.Copy]:{title:"复制",hot_key:"Ctrl+C",enable:!0},[EContextMenuInfoType.Delete]:{title:"删除",hot_key:"Delete",enable:!0},[EContextMenuInfoType.MoveUpTopLevel]:{title:"置于顶层",hot_key:"Ctrl+→",enable:!0},[EContextMenuInfoType.MoveDownTopLevel]:{title:"置于底层",hot_key:"Ctrl+←",enable:!0},[EContextMenuInfoType.MoveUpOneLevel]:{title:"置于上一层",hot_key:"Ctrl+↑",enable:!0},[EContextMenuInfoType.MoveDownOneLevel]:{title:"置于下一层",hot_key:"Ctrl+↓",enable:!0}}}),actions:{onContextMenuClick(i){const n=useGlobalStore();if(n.handle_svg_info)switch(n.intention=EGlobalStoreIntention.Select,i){case EContextMenuInfoType.Copy:const r=objectDeepClone(n.handle_svg_info.info);r.id=r.name+randomString(),r.title+="-copy",r.x+=10,r.y+=10,n.setDoneJson(r),this.display=!1,n.setHandleSvgInfo(r,n.done_json.length);break;case EContextMenuInfoType.Delete:n.spliceDoneJson(n.handle_svg_info.index),this.display=!1,n.setHandleSvgInfo(null),n.intention=EGlobalStoreIntention.None;break;case EContextMenuInfoType.MoveUpOneLevel:if(n.done_json.length===1||n.handle_svg_info.index===n.done_json.length-1)return;const g=n.handle_svg_info.info;n.done_json[n.handle_svg_info.index]=n.done_json[n.handle_svg_info.index+1],n.done_json[n.handle_svg_info.index+1]=g,useHistoryRecord(n.done_json),this.display=!1,n.setHandleSvgInfo(g,n.handle_svg_info.index+1);break;case EContextMenuInfoType.MoveDownOneLevel:if(n.done_json.length===1||n.handle_svg_info.index===0)return;const V=n.handle_svg_info.info;n.done_json[n.handle_svg_info.index]=n.done_json[n.handle_svg_info.index-1],n.done_json[n.handle_svg_info.index-1]=V,useHistoryRecord(n.done_json),this.display=!1,n.setHandleSvgInfo(V,n.handle_svg_info.index-1);break;case EContextMenuInfoType.MoveDownTopLevel:if(n.done_json.length===1||n.handle_svg_info.index===0)return;const k=n.handle_svg_info.info;n.done_json.splice(n.handle_svg_info.index,1),n.done_json.unshift(k),useHistoryRecord(n.done_json),this.display=!1,n.setHandleSvgInfo(k,0);break;case EContextMenuInfoType.MoveUpTopLevel:if(n.done_json.length===1||n.handle_svg_info.index===n.done_json.length)return;const $=n.handle_svg_info.info;n.done_json.splice(n.handle_svg_info.index,1),n.done_json.push($),useHistoryRecord(n.done_json),this.display=!1,n.setHandleSvgInfo($,n.done_json.length-1);break}}}}),pinia=pinia$1.createPinia(),useHistoryRecord=i=>{const n=useEditPrivateStore();n.is_record_history&&(n.history_now_index+1<n.history_doneComponent.length&&n.history_doneComponent.splice(n.history_now_index+1),n.history_doneComponent.push(i),n.history_now_index=n.history_doneComponent.length-1,n.history_doneComponent.length>n.max_record_times&&(n.history_doneComponent.shift(),n.history_now_index=n.history_doneComponent.length-1)),n.is_record_history=!0},useImportDataModel=i=>{try{const n=JSON.parse(i);if(!n.config||!n.layout_center||!n.done_json)return ElMessage.error("请导入正确的数据模型!"),!1;const r=useGlobalStore(pinia),g=useSvgEditLayoutStore(pinia),V=useConfigStore(pinia);return V.$state=n.config,g.center_offset=n.layout_center,r.setDoneJson(n.done_json),!0}catch(n){return ElMessage.error("请导入正确的数据模型!"),console.error(n),!1}},_hoisted_1$e={"aria-hidden":"true"},_hoisted_2$c=["xlink:href"],_sfc_main$j=vue.defineComponent({__name:"index",props:{name:{},props:{default:()=>({})}},setup(i){const n=i,r=vue.computed(()=>`#svg-${n.name}`);return(g,V)=>(vue.openBlock(),vue.createElementBlock("svg",_hoisted_1$e,[vue.createElementVNode("use",vue.mergeProps({"xlink:href":vue.unref(r)},n.props),null,16,_hoisted_2$c)]))}});var EVisibleConfKey=(i=>(i.ImportJson="ImportJson",i.ExportJson="ExportJson",i.ImportFile="ImportFile",i))(EVisibleConfKey||{});const _withScopeId$2=i=>(vue.pushScopeId("data-v-64ac5be6"),i=i(),vue.popScopeId(),i),_hoisted_1$d={class:"flex justify-between",style:{width:"100%"}},_hoisted_2$b={class:"flex items-center justify-between",style:{width:"250px"}},_hoisted_3$a=_withScopeId$2(()=>vue.createElementVNode("div",{class:"flex items-center"},[vue.createElementVNode("span",{class:"logo-title"},"Svg Editor")],-1)),_hoisted_4$8={class:"flex justify-between",style:{width:"calc(100% - 440px)"}},_hoisted_5$6={class:"flex items-center"},_hoisted_6$4={class:"flex items-center mr-20px"},_hoisted_7$4={class:"flex items-center",style:{width:"250px"}},_hoisted_8$3=_withScopeId$2(()=>vue.createElementVNode("div",{class:"font-bold mb-10px text-15px guide-title",style:{"padding-top":"16px"}},"多选",-1)),_hoisted_9$3=_withScopeId$2(()=>vue.createElementVNode("div",null,"鼠标按住左键可以框选,也可以按住ctrl+鼠标左键点图形进行多选",-1)),_hoisted_10$2=_withScopeId$2(()=>vue.createElementVNode("div",{class:"el-divider el-divider--horizontal",role:"separator",style:{"--el-border-style":"solid"}},null,-1)),_hoisted_11$2=_withScopeId$2(()=>vue.createElementVNode("div",{class:"font-bold mb-10px text-15px guide-title"},"拖动画布",-1)),_hoisted_12$1=_withScopeId$2(()=>vue.createElementVNode("div",null,"右键画布然后拖动即可,右侧面板‘图纸’栏可微调或重置位置",-1)),_hoisted_13$1=_withScopeId$2(()=>vue.createElementVNode("div",{class:"el-divider el-divider--horizontal",role:"separator",style:{"--el-border-style":"solid"}},null,-1)),_hoisted_14$1=_withScopeId$2(()=>vue.createElementVNode("div",{class:"font-bold mb-10px text-15px guide-title"},"画布缩放",-1)),_hoisted_15$1=_withScopeId$2(()=>vue.createElementVNode("div",null,"使用鼠标滚轮或者右侧面板‘图纸’栏可控制画布缩放",-1)),_hoisted_16$1=_withScopeId$2(()=>vue.createElementVNode("div",{class:"el-divider el-divider--horizontal",role:"separator",style:{"--el-border-style":"solid"}},null,-1)),_hoisted_17=_withScopeId$2(()=>vue.createElementVNode("div",{class:"font-bold mb-10px text-15px guide-title"},"标尺辅助线",-1)),_hoisted_18=_withScopeId$2(()=>vue.createElementVNode("div",null,"在标尺区域按住鼠标左键并拖动即可创建标尺辅助线,将标尺辅助线拖动到标尺区域即可删除标尺辅助线",-1)),_hoisted_19=_withScopeId$2(()=>vue.createElementVNode("div",{class:"el-divider el-divider--horizontal",role:"separator",style:{"--el-border-style":"solid"}},null,-1)),_hoisted_20=_withScopeId$2(()=>vue.createElementVNode("div",{class:"font-bold mb-10px text-15px guide-title"},"连线样式",-1)),_hoisted_21=_withScopeId$2(()=>vue.createElementVNode("div",null,"在右侧‘连线’栏可以统一配置连线样式,配置后先增加的线会应用新样式,之前的线样式不变,如需改变,可选中线手动更改或删除重画 ",-1)),_hoisted_22=_withScopeId$2(()=>vue.createElementVNode("div",{class:"el-divider el-divider--horizontal",role:"separator",style:{"--el-border-style":"solid"}},null,-1)),_hoisted_23=_withScopeId$2(()=>vue.createElementVNode("div",{class:"font-bold mb-10px text-15px guide-title"},"横线和竖线",-1)),_hoisted_24=_withScopeId$2(()=>vue.createElementVNode("div",null,"画线的时候按住ctrl即可画竖线,按住shift即可画横线",-1)),_hoisted_25=_withScopeId$2(()=>vue.createElementVNode("div",{class:"el-divider el-divider--horizontal",role:"separator",style:{"--el-border-style":"solid"}},null,-1)),_hoisted_26=_withScopeId$2(()=>vue.createElementVNode("div",{class:"font-bold mb-10px text-15px guide-title"},"线段选中",-1)),_hoisted_27=_withScopeId$2(()=>vue.createElementVNode("div",{style:{"padding-bottom":"14px"}}," 若线段绑定了锚点,移动线段,绑定的锚点不会移动。若是想将线段整体移动,需要先选中线段,在右侧‘数据’栏里解除绑定 ",-1)),_sfc_main$i=vue.defineComponent({__name:"index",emits:["changeVisible","onReturn","onPreview","onSave"],setup(i,{emit:n}){const r=useSvgEditLayoutStore(pinia),g=useGlobalStore(pinia),V=useEditPrivateStore(pinia),k=useConfigStore(pinia),$=()=>{g.done_json.length<=0||g.setDoneJson([]),g.intention=EGlobalStoreIntention.None},oe=ie=>{const ae={layout_center:r.center_offset,config:k.$state,done_json:g.done_json};n(ie,ae)},re=vue.ref(!1),Ce=vue.computed({get:()=>g.intention===EGlobalStoreIntention.Connection,set(ie){g.intention=ie?EGlobalStoreIntention.Connection:EGlobalStoreIntention.None,ie&&g.setHandleSvgInfo(null)}});return(ie,ae)=>(vue.openBlock(),vue.createElementBlock(vue.Fragment,null,[vue.createElementVNode("div",_hoisted_1$d,[vue.createElementVNode("div",_hoisted_2$b,[_hoisted_3$a,vue.createVNode(vue.unref(ElIcon),{size:24,class:"bt-Icon",onClick:ae[0]||(ae[0]=le=>vue.unref(r).left_nav=!vue.unref(r).left_nav),title:vue.unref(r).left_nav?"隐藏左侧菜单":"显示左侧菜单"},{default:vue.withCtx(()=>[vue.unref(r).left_nav?(vue.openBlock(),vue.createBlock(_sfc_main$j,{key:0,name:"menu-unfold"})):(vue.openBlock(),vue.createBlock(_sfc_main$j,{key:1,name:"menu-fold"}))]),_:1},8,["title"])]),vue.createElementVNode("div",_hoisted_4$8,[vue.createElementVNode("div",_hoisted_5$6,[vue.createVNode(vue.unref(ElIcon),{title:"撤销 ctrl+z",size:24,class:vue.normalizeClass(`${vue.unref(V).getTopBtnUndoStatus?"bt-Icon":"icon-disable"} ml-20px`),onClick:ae[1]||(ae[1]=()=>vue.unref(V).topUndoBtnClick())},{default:vue.withCtx(()=>[vue.createVNode(_sfc_main$j,{name:vue.unref(V).getTopBtnUndoStatus?"undo":"undo-gray"},null,8,["name"])]),_:1},8,["class"]),vue.createVNode(vue.unref(ElIcon),{title:"重做 ctrl+shift+z",class:vue.normalizeClass(`${vue.unref(V).getTopBtnRedoStatus?"bt-Icon":"icon-disable"} ml-5px`),size:24,onClick:ae[2]||(ae[2]=()=>vue.unref(V).topRedoBtnClick())},{default:vue.withCtx(()=>[vue.createVNode(_sfc_main$j,{name:vue.unref(V).getTopBtnRedoStatus?"redo":"redo-gray"},null,8,["name"])]),_:1},8,["class"]),vue.createVNode(vue.unref(ElDivider),{direction:"vertical"}),vue.createVNode(vue.unref(ElIcon),{title:"清空 ctrl+delete",class:vue.normalizeClass(vue.unref(g).done_json.length>0?"bt-Icon":"icon-disable"),size:24,onClick:$},{default:vue.withCtx(()=>[vue.createVNode(_sfc_main$j,{name:vue.unref(g).done_json.length>0?"delete":"delete-gray"},null,8,["name"])]),_:1},8,["class"]),vue.createVNode(vue.unref(ElDivider),{direction:"vertical"}),vue.createVNode(vue.unref(ElIcon),{title:"导入数据模型",class:"bt-Icon",size:24,onClick:ae[3]||(ae[3]=le=>n("changeVisible",vue.unref(EVisibleConfKey).ImportJson,!0))},{default:vue.withCtx(()=>[vue.createVNode(_sfc_main$j,{name:"import"})]),_:1}),vue.createVNode(vue.unref(ElIcon),{title:"导出数据模型",size:24,class:"bt-Icon ml-5px",onClick:ae[4]||(ae[4]=le=>n("changeVisible",vue.unref(EVisibleConfKey).ExportJson,!0))},{default:vue.withCtx(()=>[vue.createVNode(_sfc_main$j,{name:"export"})]),_:1}),vue.createVNode(vue.unref(ElDivider),{direction:"vertical"}),vue.createVNode(vue.unref(ElIcon),{title:"创建连线",class:vue.normalizeClass(["bt-Icon",{active:vue.unref(Ce)}]),size:24,onClick:ae[5]||(ae[5]=le=>Ce.value=!vue.unref(Ce))},{default:vue.withCtx(()=>[vue.createVNode(_sfc_main$j,{name:vue.unref(Ce)?"line-active":"line"},null,8,["name"])]),_:1},8,["class"]),vue.createVNode(vue.unref(ElDivider),{direction:"vertical"}),vue.createVNode(vue.unref(ElIcon),{title:"说明",class:"bt-Icon",size:24,onClick:ae[6]||(ae[6]=le=>re.value=!vue.unref(re))},{default:vue.withCtx(()=>[vue.createVNode(_sfc_main$j,{name:"question"})]),_:1})]),vue.createElementVNode("div",_hoisted_6$4,[vue.createVNode(vue.unref(ElIcon),{title:"返回",class:"bt-Icon",size:24,onClick:ae[7]||(ae[7]=le=>oe("onReturn"))},{default:vue.withCtx(()=>[vue.createVNode(_sfc_main$j,{name:"return"})]),_:1}),vue.createVNode(vue.unref(ElDivider),{direction:"vertical"}),vue.createVNode(vue.unref(ElIcon),{title:"保存",class:"bt-Icon",size:24,onClick:ae[8]||(ae[8]=le=>oe("onSave"))},{default:vue.withCtx(()=>[vue.createVNode(_sfc_main$j,{name:"save"})]),_:1}),vue.createVNode(vue.unref(ElDivider),{direction:"vertical"}),vue.createVNode(vue.unref(ElIcon),{title:"预览",class:"bt-Icon",size:22,onClick:ae[9]||(ae[9]=le=>oe("onPreview"))},{default:vue.withCtx(()=>[vue.createVNode(_sfc_main$j,{name:"preview"})]),_:1})])]),vue.createElementVNode("div",_hoisted_7$4,[vue.createVNode(vue.unref(ElIcon),{size:24,class:"bt-Icon",onClick:ae[10]||(ae[10]=le=>vue.unref(r).right_nav=!vue.unref(r).right_nav),title:vue.unref(r).right_nav?"隐藏右侧菜单":"显示右侧菜单"},{default:vue.withCtx(()=>[vue.unref(r).right_nav?(vue.openBlock(),vue.createBlock(_sfc_main$j,{key:0,name:"menu-fold"})):(vue.openBlock(),vue.createBlock(_sfc_main$j,{key:1,name:"menu-unfold"}))]),_:1},8,["title"])])]),vue.createVNode(vue.unref(ElDialog),{modelValue:vue.unref(re),"onUpdate:modelValue":ae[11]||(ae[11]=le=>vue.isRef(re)?re.value=le:null),title:"使用说明",width:"60%",class:"guide-dialog"},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(ElScrollbar),{"max-height":"60vh"},{default:vue.withCtx(()=>[_hoisted_8$3,_hoisted_9$3,_hoisted_10$2,_hoisted_11$2,_hoisted_12$1,_hoisted_13$1,_hoisted_14$1,_hoisted_15$1,_hoisted_16$1,_hoisted_17,_hoisted_18,_hoisted_19,_hoisted_20,_hoisted_21,_hoisted_22,_hoisted_23,_hoisted_24,_hoisted_25,_hoisted_26,_hoisted_27]),_:1})]),_:1},8,["modelValue"])],64))}}),index_vue_vue_type_style_index_0_scoped_64ac5be6_lang="",index_vue_vue_type_style_index_1_lang$1="",TopPanel=_export_sfc(_sfc_main$i,[["__scopeId","data-v-64ac5be6"]]),_hoisted_1$c={class:"component-group flex flex-wrap"},_hoisted_2$a=["onDragstart","title"],_sfc_main$h=vue.defineComponent({__name:"index",props:{customToolbar:{}},setup(i){const n=i,r=useGlobalStore(pinia),g=vue.ref(n.customToolbar&&Object.keys(n.customToolbar).length>0?n.customToolbar:r.config_center),V=vue.ref(["stateful","stateless","have_animation","custom_svg_group","element-ui","custom-vue","echarts"]),k=oe=>{r.setCreateInfo(oe)},$=oe=>{var re;if(((re=oe.dataTransfer)==null?void 0:re.dropEffect)!=="copy"){ElMessage.warning("请将组件拖到画布中!"),r.intention=EGlobalStoreIntention.None;return}};return(oe,re)=>(vue.openBlock(),vue.createElementBlock("div",null,[vue.createVNode(vue.unref(ElCollapse),{modelValue:vue.unref(V),"onUpdate:modelValue":re[0]||(re[0]=Ce=>vue.isRef(V)?V.value=Ce:null),style:{"border-top":"none"}},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(g),Ce=>(vue.openBlock(),vue.createBlock(vue.unref(ElCollapseItem),{name:Ce.groupType,key:Ce.title},{title:vue.withCtx(()=>[vue.createElementVNode("div",null,vue.toDisplayString(Ce.title),1)]),default:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_1$c,[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(Ce.list,ie=>(vue.openBlock(),vue.createElementBlock("div",{class:"ideal",key:ie.name,draggable:"true",onDragstart:ae=>k(ie),onDragend:$,title:ie.title},[vue.createVNode(vue.unref(ElIcon),{size:35,class:"flex items-center"},{default:vue.withCtx(()=>[vue.createVNode(_sfc_main$j,{name:ie.name,props:vue.unref(prosToVBind)(ie)},null,8,["name","props"])]),_:2},1024)],40,_hoisted_2$a))),128))])]),_:2},1032,["name"]))),128))]),_:1},8,["modelValue"])]))}}),index_vue_vue_type_style_index_0_scoped_c7e50a4b_lang="",LeftPanel=_export_sfc(_sfc_main$h,[["__scopeId","data-v-c7e50a4b"]]),calculateLeftTop=(i,n,r)=>{const g=getCenterPoint(i,n),V=calculateRotatedPointCoordinate(i,g,-r),k=calculateRotatedPointCoordinate(n,g,-r);return{width:k.x-V.x,height:k.y-V.y,is_old_width:!1,is_old_height:!1}},calculateRightTop=(i,n,r)=>{const g=getCenterPoint(i,n),V=calculateRotatedPointCoordinate(i,g,-r),k=calculateRotatedPointCoordinate(n,g,-r);return{width:V.x-k.x,height:k.y-V.y,is_old_width:!1,is_old_height:!1}},calculateRightBottom=(i,n,r)=>{const g=getCenterPoint(i,n),V=calculateRotatedPointCoordinate(n,g,-r),k=calculateRotatedPointCoordinate(i,g,-r);return{width:k.x-V.x,height:k.y-V.y,is_old_width:!1,is_old_height:!1}},calculateLeftBottom=(i,n,r)=>{const g=getCenterPoint(i,n),V=calculateRotatedPointCoordinate(n,g,-r),k=calculateRotatedPointCoordinate(i,g,-r);return{width:V.x-k.x,height:k.y-V.y,is_old_width:!1,is_old_height:!1}},calculateTop=(i,n,r,g)=>{const V=calculateRotatedPointCoordinate(i,g,-r),k=calculateRotatedPointCoordinate({x:g.x,y:V.y},g,r),$=Math.sqrt((k.x-n.x)**2+(k.y-n.y)**2);return{width:1,height:Math.round($),is_old_width:!0,is_old_height:!1}},calculateRight=(i,n,r,g)=>{const V=calculateRotatedPointCoordinate(i,g,-r),k=calculateRotatedPointCoordinate({x:V.x,y:g.y},g,r),$=Math.sqrt((k.x-n.x)**2+(k.y-n.y)**2);return{width:Math.round($),height:1,is_old_width:!1,is_old_height:!0}},calculateBottom=(i,n,r,g)=>{const V=calculateRotatedPointCoordinate(i,g,-r),k=calculateRotatedPointCoordinate({x:g.x,y:V.y},g,r),$=Math.sqrt((k.x-n.x)**2+(k.y-n.y)**2);return{width:1,height:Math.round($),is_old_width:!0,is_old_height:!1}},calculateLeft=(i,n,r,g)=>{const V=calculateRotatedPointCoordinate(i,g,-r),k=calculateRotatedPointCoordinate({x:V.x,y:g.y},g,r),$=Math.sqrt((k.x-n.x)**2+(k.y-n.y)**2);return{width:Math.round($),height:1,is_old_width:!1,is_old_height:!0}},_hoisted_1$b={style:{"vector-effect":"non-scaling-stroke"}},_hoisted_2$9=["fill","x","y"],_hoisted_3$9=["cx","cy"],_hoisted_4$7=["x1","y1","x2","y2"],_hoisted_5$5=["fill","x","y"],_hoisted_6$3=["fill","x","y"],_hoisted_7$3=["fill","x","y"],_hoisted_8$2=["fill","x","y"],_hoisted_9$2=["fill","x","y"],_hoisted_10$1=["fill","x","y"],_hoisted_11$1=["fill","x","y"],_sfc_main$g=vue.defineComponent({__name:"index",props:{itemInfo:{}},setup(i){const n=i;vue.useCssVars(ae=>({"70f7dc54":vue.unref($)}));const r=useGlobalStore(pinia),g=useConfigStore(pinia),V=useSvgEditLayoutStore(pinia),k=vue.ref(4),$=vue.ref("#ab712e"),oe=[{start:338,end:23,cursor:"nw",type:EScaleInfoType.TopLeft},{start:23,end:68,cursor:"n",type:EScaleInfoType.TopCenter},{start:68,end:113,cursor:"ne",type:EScaleInfoType.TopRight},{start:293,end:338,cursor:"w",type:EScaleInfoType.Left},{start:113,end:158,cursor:"e",type:EScaleInfoType.Right},{start:248,end:293,cursor:"sw",type:EScaleInfoType.BottomLeft},{start:203,end:248,cursor:"s",type:EScaleInfoType.BottomCenter},{start:158,end:203,cursor:"se",type:EScaleInfoType.BottomRight}],re=(ae,le)=>{console.log("handMousedown",le);const{clientX:Ie,clientY:ue}=le;le.stopPropagation(),r.intention=EGlobalStoreIntention.Zoom;const de=Math.round((Ie-V.canvasInfo.left)/g.svg.scale-V.center_offset.x),Ne=Math.round((ue-V.canvasInfo.top)/g.svg.scale-V.center_offset.y);r.mouse_info={state:EMouseInfoState.Down,position_x:de,position_y:Ne,now_position_x:de,now_position_y:Ne,new_position_x:0,new_position_y:0},r.scale_info={type:ae,scale_times:{x:n.itemInfo.scale_x,y:n.itemInfo.scale_y},scale_item_info:{x:n.itemInfo.x,y:n.itemInfo.y},symmetric_point:{x:de+Math.abs(de-n.itemInfo.center_position.x)*2*(de>n.itemInfo.center_position.x?-1:1),y:Ne+Math.abs(Ne-n.itemInfo.center_position.y)*2*(Ne>n.itemInfo.center_position.y?-1:1)}}},Ce=ae=>{const{clientX:le,clientY:Ie}=ae,ue=Math.round((le-V.canvasInfo.left)/g.svg.scale-V.center_offset.x),de=Math.round((Ie-V.canvasInfo.top)/g.svg.scale-V.center_offset.y);ae.stopPropagation(),r.intention=EGlobalStoreIntention.Rotate,r.rotate_info={angle:n.itemInfo.rotate},r.mouse_info={state:EMouseInfoState.Down,position_x:ue,position_y:de,now_position_x:ue,now_position_y:de,new_position_x:0,new_position_y:0}},ie=ae=>{const le=(ae+n.itemInfo.rotate)%360,Ie=oe.find(ue=>ue.start<=le&&ue.end>le);return Ie?{cursor:Ie.cursor+"-resize",type:Ie.type}:{cursor:"nw-resize",type:EScaleInfoType.TopLeft}};return(ae,le)=>(vue.openBlock(),vue.createElementBlock("g",_hoisted_1$b,[vue.createElementVNode("rect",{id:"resize_tl",width:"8",height:"8",fill:vue.unref($),style:vue.normalizeStyle({cursor:ie(0).cursor,"vector-effect":"non-scaling-stroke"}),"pointer-events":"all",x:n.itemInfo.actual_bound.x-vue.unref(k)-vue.unref(getCoordinateOffset)(n.itemInfo.actual_bound.width,n.itemInfo.scale_x),y:n.itemInfo.actual_bound.y-vue.unref(k)-vue.unref(getCoordinateOffset)(n.itemInfo.actual_bound.height,n.itemInfo.scale_y),stroke:"rgba(0,0,0,0)",onMousedown:le[0]||(le[0]=Ie=>re(vue.unref(EScaleInfoType).TopLeft,Ie))},null,44,_hoisted_2$9),vue.createElementVNode("circle",{cx:n.itemInfo.actual_bound.x+n.itemInfo.actual_bound.width/2,cy:n.itemInfo.actual_bound.y-vue.unref(k)-vue.unref(getCoordinateOffset)(n.itemInfo.actual_bound.height,n.itemInfo.scale_y)-24,r:4,class:"rotate-circle",onMousedown:Ce},null,40,_hoisted_3$9),vue.createElementVNode("line",{x1:n.itemInfo.actual_bound.x+n.itemInfo.actual_bound.width/2,y1:n.itemInfo.actual_bound.y-vue.unref(k)-vue.unref(getCoordinateOffset)(n.itemInfo.actual_bound.height,n.itemInfo.scale_y),x2:n.itemInfo.actual_bound.x+n.itemInfo.actual_bound.width/2,y2:n.itemInfo.actual_bound.y-vue.unref(k)-vue.unref(getCoordinateOffset)(n.itemInfo.actual_bound.height,n.itemInfo.scale_y)-20,style:vue.normalizeStyle({stroke:vue.unref($),"stroke-width":2})},null,12,_hoisted_4$7),vue.createElementVNode("rect",{id:"resize_tc",width:"8",height:"8",fill:vue.unref($),style:vue.normalizeStyle({cursor:ie(45).cursor,"vector-effect":"non-scaling-stroke"}),"pointer-events":"all",x:n.itemInfo.actual_bound.x+n.itemInfo.actual_bound.width/2-vue.unref(k),y:n.itemInfo.actual_bound.y-vue.unref(k)-vue.unref(getCoordinateOffset)(n.itemInfo.actual_bound.height,n.itemInfo.scale_y),stroke:"rgba(0,0,0,0)",onMousedown:le[1]||(le[1]=Ie=>re(vue.unref(EScaleInfoType).TopCenter,Ie))},null,44,_hoisted_5$5),vue.createElementVNode("rect",{id:"resize_tr",width:"8",height:"8",fill:vue.unref($),style:vue.normalizeStyle({cursor:ie(90).cursor,"vector-effect":"non-scaling-stroke"}),"pointer-events":"all",x:n.itemInfo.actual_bound.x+n.itemInfo.actual_bound.width-vue.unref(k)+vue.unref(getCoordinateOffset)(n.itemInfo.actual_bound.width,n.itemInfo.scale_x),y:n.itemInfo.actual_bound.y-vue.unref(k)-vue.unref(getCoordinateOffset)(n.itemInfo.actual_bound.height,n.itemInfo.scale_y),stroke:"rgba(0,0,0,0)",onMousedown:le[2]||(le[2]=Ie=>re(vue.unref(EScaleInfoType).TopRight,Ie))},null,44,_hoisted_6$3),vue.createElementVNode("rect",{id:"resize_l",width:"8",height:"8",fill:vue.unref($),style:vue.normalizeStyle({cursor:ie(315).cursor,"vector-effect":"non-scaling-stroke"}),"pointer-events":"all",x:n.itemInfo.actual_bound.x-vue.unref(k)-vue.unref(getCoordinateOffset)(n.itemInfo.actual_bound.width,n.itemInfo.scale_x),y:n.itemInfo.actual_bound.y-vue.unref(k)+n.itemInfo.actual_bound.height*n.itemInfo.scale_y/2-vue.unref(getCoordinateOffset)(n.itemInfo.actual_bound.height,n.itemInfo.scale_y),stroke:"rgba(0,0,0,0)",onMousedown:le[3]||(le[3]=Ie=>re(vue.unref(EScaleInfoType).Left,Ie))},null,44,_hoisted_7$3),vue.createElementVNode("rect",{id:"resize_r",width:"8",height:"8",fill:vue.unref($),style:vue.normalizeStyle({cursor:ie(135).cursor,"vector-effect":"non-scaling-stroke"}),"pointer-events":"all",x:n.itemInfo.actual_bound.x-vue.unref(k)+n.itemInfo.actual_bound.width+vue.unref(getCoordinateOffset)(n.itemInfo.actual_bound.width,n.itemInfo.scale_x),y:n.itemInfo.actual_bound.y-vue.unref(k)+n.itemInfo.actual_bound.height*n.itemInfo.scale_y/2-vue.unref(getCoordinateOffset)(n.itemInfo.actual_bound.height,n.itemInfo.scale_y),stroke:"rgba(0,0,0,0)",onMousedown:le[4]||(le[4]=Ie=>re(vue.unref(EScaleInfoType).Right,Ie))},null,44,_hoisted_8$2),vue.createElementVNode("rect",{id:"resize_bl",width:"8",height:"8",fill:vue.unref($),style:vue.normalizeStyle({cursor:ie(270).cursor,"vector-effect":"non-scaling-stroke"}),"pointer-events":"all",x:n.itemInfo.actual_bound.x-vue.unref(k)-vue.unref(getCoordinateOffset)(n.itemInfo.actual_bound.width,n.itemInfo.scale_x),y:n.itemInfo.actual_bound.y-vue.unref(k)+n.itemInfo.actual_bound.height*n.itemInfo.scale_y-vue.unref(getCoordinateOffset)(n.itemInfo.actual_bound.height,n.itemInfo.scale_y),stroke:"rgba(0,0,0,0)",onMousedown:le[5]||(le[5]=Ie=>re(vue.unref(EScaleInfoType).BottomLeft,Ie))},null,44,_hoisted_9$2),vue.createElementVNode("rect",{id:"resize_bc",width:"8",height:"8",fill:vue.unref($),style:vue.normalizeStyle({cursor:ie(225).cursor,"vector-effect":"non-scaling-stroke"}),"pointer-events":"all",x:n.itemInfo.actual_bound.x-vue.unref(k)+n.itemInfo.actual_bound.width/2,y:n.itemInfo.actual_bound.y-vue.unref(k)+n.itemInfo.actual_bound.height+vue.unref(getCoordinateOffset)(n.itemInfo.actual_bound.height,n.itemInfo.scale_y),stroke:"rgba(0,0,0,0)",onMousedown:le[6]||(le[6]=Ie=>re(vue.unref(EScaleInfoType).BottomCenter,Ie))},null,44,_hoisted_10$1),vue.createElementVNode("rect",{id:"resize_br",width:"8",height:"8",fill:vue.unref($),style:vue.normalizeStyle({cursor:ie(180).cursor,"vector-effect":"non-scaling-stroke"}),"pointer-events":"all",x:n.itemInfo.actual_bound.x-vue.unref(k)+n.itemInfo.actual_bound.width+vue.unref(getCoordinateOffset)(n.itemInfo.actual_bound.width,n.itemInfo.scale_x),y:n.itemInfo.actual_bound.y-vue.unref(k)+n.itemInfo.actual_bound.height+vue.unref(getCoordinateOffset)(n.itemInfo.actual_bound.height,n.itemInfo.scale_y),stroke:"rgba(0,0,0,0)",onMousedown:le[7]||(le[7]=Ie=>re(vue.unref(EScaleInfoType).BottomRight,Ie))},null,44,_hoisted_11$1)]))}}),index_vue_vue_type_style_index_0_scoped_cbb58aff_lang="",HandlePanel=_export_sfc(_sfc_main$g,[["__scopeId","data-v-cbb58aff"]]),_hoisted_1$a=["fill"],_hoisted_2$8=["cx","cy","r"],_hoisted_3$8=["cx","cy","r"],_hoisted_4$6=["cx","cy","r"],_hoisted_5$4=["cx","cy","r"],_hoisted_6$2=["cx","cy","r"],_hoisted_7$2=["cx","cy","r"],_hoisted_8$1=["cx","cy","r"],_hoisted_9$1=["cx","cy","r"],_sfc_main$f=vue.defineComponent({__name:"index",props:{itemInfo:{}},setup(i){const n=i,r=vue.ref(4),g=vue.ref("#ab712e"),V=vue.ref(4),k=vue.ref(12),$=useGlobalStore(pinia),oe=vue.computed(()=>n.itemInfo.actual_bound.x+n.itemInfo.actual_bound.width/2-r.value+V.value),re=vue.computed(()=>n.itemInfo.actual_bound.y-r.value-getCoordinateOffset(n.itemInfo.actual_bound.height,n.itemInfo.scale_y)+V.value),Ce=vue.computed(()=>n.itemInfo.actual_bound.x-r.value+n.itemInfo.actual_bound.width+getCoordinateOffset(n.itemInfo.actual_bound.width,n.itemInfo.scale_x)+V.value),ie=vue.computed(()=>n.itemInfo.actual_bound.y-r.value+n.itemInfo.actual_bound.height*n.itemInfo.scale_y/2-getCoordinateOffset(n.itemInfo.actual_bound.height,n.itemInfo.scale_y)+V.value),ae=vue.computed(()=>n.itemInfo.actual_bound.x-r.value+n.itemInfo.actual_bound.width/2+V.value),le=vue.computed(()=>n.itemInfo.actual_bound.y-r.value+n.itemInfo.actual_bound.height+getCoordinateOffset(n.itemInfo.actual_bound.height,n.itemInfo.scale_y)+V.value),Ie=vue.computed(()=>n.itemInfo.actual_bound.x-r.value-getCoordinateOffset(n.itemInfo.actual_bound.width,n.itemInfo.scale_x)+V.value),ue=vue.computed(()=>n.itemInfo.actual_bound.y-r.value+n.itemInfo.actual_bound.height*n.itemInfo.scale_y/2-getCoordinateOffset(n.itemInfo.actual_bound.height,n.itemInfo.scale_y)+V.value),de=(Ne,he)=>{var pe;$.intention===EGlobalStoreIntention.None?createLine(Ne,he,n.itemInfo):$.intention===EGlobalStoreIntention.Connection&&(Ne.stopPropagation(),(pe=$.handle_svg_info)!=null&&pe.info.bind_anchors&&($.handle_svg_info.info.bind_anchors.end={type:he,target_id:n.itemInfo.id},$.intention=EGlobalStoreIntention.None,$.setHandleSvgInfo(null),vue.nextTick(function(){moveAnchors(n.itemInfo)})))};return(Ne,he)=>(vue.openBlock(),vue.createElementBlock("g",{style:{"vector-effect":"non-scaling-stroke"},class:"connect-points",fill:vue.unref(g),"stroke-width":"2",stroke:"rgba(0,0,0,0)"},[vue.createElementVNode("g",{onMousedown:he[0]||(he[0]=pe=>de(pe,vue.unref(ELineBindAnchors).TopCenter))},[vue.createElementVNode("circle",{class:"out-circle",cx:vue.unref(oe),cy:vue.unref(re),r:vue.unref(k),"fill-opacity":".3"},null,8,_hoisted_2$8),vue.createElementVNode("circle",{id:"connection_tc",cx:vue.unref(oe),cy:vue.unref(re),r:vue.unref(V),"pointer-events":"all"},null,8,_hoisted_3$8)],32),vue.createElementVNode("g",{onMousedown:he[1]||(he[1]=pe=>de(pe,vue.unref(ELineBindAnchors).Right))},[vue.createElementVNode("circle",{class:"out-circle",cx:vue.unref(Ce),cy:vue.unref(ie),r:vue.unref(k),"fill-opacity":".3"},null,8,_hoisted_4$6),vue.createElementVNode("circle",{id:"connection_r",cx:vue.unref(Ce),cy:vue.unref(ie),r:vue.unref(V),"pointer-events":"all"},null,8,_hoisted_5$4)],32),vue.createElementVNode("g",{onMousedown:he[2]||(he[2]=pe=>de(pe,vue.unref(ELineBindAnchors).BottomCenter))},[vue.createElementVNode("circle",{class:"out-circle",cx:vue.unref(ae),cy:vue.unref(le),r:vue.unref(k),"fill-opacity":".3"},null,8,_hoisted_6$2),vue.createElementVNode("circle",{id:"connection_bc",cx:vue.unref(ae),cy:vue.unref(le),r:vue.unref(V),"pointer-events":"all"},null,8,_hoisted_7$2)],32),vue.createElementVNode("g",{onMousedown:he[3]||(he[3]=pe=>de(pe,vue.unref(ELineBindAnchors).Left))},[vue.createElementVNode("circle",{class:"out-circle",cx:vue.unref(Ie),cy:vue.unref(ue),r:vue.unref(k),"fill-opacity":".3"},null,8,_hoisted_8$1),vue.createElementVNode("circle",{id:"connection_l",cx:vue.unref(Ie),cy:vue.unref(ue),r:vue.unref(V),style:{cursor:"crosshair"},"pointer-events":"all"},null,8,_hoisted_9$1)],32)],8,_hoisted_1$a))}}),index_vue_vue_type_style_index_0_scoped_8f6796a1_lang="",ConnectionPanel=_export_sfc(_sfc_main$f,[["__scopeId","data-v-8f6796a1"]]),_hoisted_1$9=["id","d","stroke","stroke-width","stroke-dasharray"],_hoisted_2$7=["from","to","dur","repeatCount"],_hoisted_3$7=["d","stroke","stroke-width","stroke-dasharray"],_hoisted_4$5=["from","to","dur","repeatCount"],_hoisted_5$3=["r","fill"],_hoisted_6$1=["path","dur","repeatCount"],_hoisted_7$1=["cx","cy","stroke","onMousedown"],_sfc_main$e=vue.defineComponent({__name:"index",props:{itemInfo:{},pointVisible:{type:Boolean,default:!1}},setup(i){const n=i,r=useGlobalStore(pinia),g=useConfigStore(pinia),V=useSvgEditLayoutStore(pinia),k=($,oe,re,Ce)=>{if(r.intention===EGlobalStoreIntention.Connection)return;r.setHandleSvgInfo(n.itemInfo);const{clientX:ie,clientY:ae}=oe;oe.stopPropagation(),r.connection_line_node_info={init_pos:{x:re,y:Ce},point_index:$},r.intention=EGlobalStoreIntention.SetConnectionLineNode,r.mouse_info={state:EMouseInfoState.Down,position_x:Math.round((ie-V.canvasInfo.left)/g.svg.scale),position_y:Math.round((ae-V.canvasInfo.top)/g.svg.scale),now_position_x:0,now_position_y:0,new_position_x:0,new_position_y:0}};return($,oe)=>{var re,Ce,ie,ae,le;return vue.openBlock(),vue.createElementBlock("g",null,[vue.createElementVNode("path",{id:n.itemInfo.id,d:vue.unref(positionArrToPath)(n.itemInfo.props.point_position.val),fill:"none",stroke:((re=n.itemInfo.animations)==null?void 0:re.type.val)===vue.unref(EConfigAnimationsType).Electricity?n.itemInfo.animations.color.val:n.itemInfo.props.stroke.val,"stroke-width":n.itemInfo.props["stroke-width"].val,style:vue.normalizeStyle({cursor:vue.unref(r).intention===vue.unref(EGlobalStoreIntention).Connection?"crosshair":"move"}),"stroke-dashoffset":"0","stroke-dasharray":((Ce=n.itemInfo.animations)==null?void 0:Ce.type.val)===vue.unref(EConfigAnimationsType).Electricity?n.itemInfo.props["stroke-width"].val*3:0},[((ie=n.itemInfo.animations)==null?void 0:ie.type.val)===vue.unref(EConfigAnimationsType).Electricity?(vue.openBlock(),vue.createElementBlock("animate",{key:0,attributeName:"stroke-dashoffset",from:n.itemInfo.animations.reverse.val?0:1e3,to:n.itemInfo.animations.reverse.val?1e3:0,dur:`${n.itemInfo.animations.dur.val}s`,repeatCount:n.itemInfo.animations.repeatCount.val},null,8,_hoisted_2$7)):vue.createCommentVNode("",!0)],12,_hoisted_1$9),((ae=n.itemInfo.animations)==null?void 0:ae.type.val)===vue.unref(EConfigAnimationsType).WaterDrop?(vue.openBlock(),vue.createElementBlock("path",{key:0,d:vue.unref(positionArrToPath)(n.itemInfo.props.point_position.val),fill:"none","fill-opacity":"0",stroke:n.itemInfo.animations.color.val,"stroke-width":n.itemInfo.props["stroke-width"].val,"stroke-dasharray":n.itemInfo.props["stroke-width"].val*3,"stroke-dashoffset":"0","stroke-linecap":"round"},[vue.createElementVNode("animate",{attributeName:"stroke-dashoffset",from:n.itemInfo.animations.reverse.val?0:1e3,to:n.itemInfo.animations.reverse.val?1e3:0,dur:`${n.itemInfo.animations.dur.val}s`,repeatCount:n.itemInfo.animations.repeatCount.val,fill:"freeze"},null,8,_hoisted_4$5)],8,_hoisted_3$7)):((le=n.itemInfo.animations)==null?void 0:le.type.val)===vue.unref(EConfigAnimationsType).Track?(vue.openBlock(),vue.createElementBlock("circle",{key:1,cx:"0",cy:"0",r:n.itemInfo.props["stroke-width"].val*2,fill:n.itemInfo.animations.color.val},[vue.createElementVNode("animateMotion",{path:vue.unref(positionArrToPath)(n.itemInfo.animations.reverse.val?[...n.itemInfo.props.point_position.val].reverse():n.itemInfo.props.point_position.val),dur:`${n.itemInfo.animations.dur.val}s`,repeatCount:n.itemInfo.animations.repeatCount.val},null,8,_hoisted_6$1)],8,_hoisted_5$3)):vue.createCommentVNode("",!0),vue.createElementVNode("g",null,[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(n.itemInfo.props.point_position.val,(Ie,ue)=>(vue.openBlock(),vue.createElementBlock("circle",{key:ue,cx:Ie.x,cy:Ie.y,r:"6","stroke-width":"1",stroke:n.itemInfo.props.stroke.val,fill:"#fff",style:{cursor:"pointer"},onMousedown:de=>k(ue,de,Ie.x,Ie.y)},null,40,_hoisted_7$1))),128))])])}}}),_hoisted_1$8={id:"pattern_grid",patternUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20"},_hoisted_2$6=["stroke"],_hoisted_3$6=["stroke"],_hoisted_4$4=["stroke"],_hoisted_5$2=["stroke"],_hoisted_6={key:0,width:"100%",height:"100%",fill:"url(#pattern_grid)"},_hoisted_7=["transform"],_hoisted_8=["transform"],_hoisted_9=["transform","onMousedown","onMouseup","onMouseenter","onMouseleave","onContextmenu"],_hoisted_10=["xlink:href","id","transform"],_hoisted_11=["id"],_hoisted_12=["id","x1","y1","x2","y2"],_hoisted_13=["id"],_hoisted_14=["x","y","height","width"],_hoisted_15=["onClick"],_hoisted_16={class:"shortcut"},_sfc_main$d=vue.defineComponent({__name:"index",setup(i){vue.useCssVars(jt=>({"0f010360":ie.value}));const n=vue.getCurrentInstance();Object.keys(vueComp).forEach(jt=>{var ti;Object.keys((ti=n==null?void 0:n.appContext)==null?void 0:ti.components).includes(jt)||n==null||n.appContext.app.component(jt,vueComp[jt])});const r=useGlobalStore(pinia),g=useConfigStore(pinia),V=useSvgEditLayoutStore(pinia),k=useEditPrivateStore(pinia),$=useContextMenuStore(pinia),oe=vue.ref(),re=vue.ref(),Ce={MoveCanvas:"grab",Rotate:"url('/src/assets/icons/rotate.svg'), auto",Connection:"crosshair"},ie=vue.computed(()=>Object.keys(Ce).indexOf(r.intention)>-1?Ce[r.intention]:"default"),ae=vue.reactive({handle_panel:vue.computed(()=>r.intention===EGlobalStoreIntention.Select||r.intention===EGlobalStoreIntention.Zoom||r.intention===EGlobalStoreIntention.Rotate),connection_panel:!1,connection_line:!1,select_item:{info:null,index:-1}}),le=vue.ref({a:{x:0,y:0},b:{x:0,y:0}}),Ie=vue.computed(()=>r.intention===EGlobalStoreIntention.SelectArea&&le.value.b.x&&le.value.b.y?{with:Math.abs(le.value.b.x-le.value.a.x),height:Math.abs(le.value.b.y-le.value.a.y),x:le.value.a.x<le.value.b.x?le.value.a.x:le.value.b.x,y:le.value.a.y<le.value.b.y?le.value.a.y:le.value.b.y}:{with:0,height:0,x:0,y:0}),ue=vue.computed(()=>{let jt=0;for(let ti of r.done_json)ti.selected&&jt++;return jt>0});let de=!1;const Ne=jt=>{var ti;if(r.intention!=EGlobalStoreIntention.None){if(r.intention==EGlobalStoreIntention.Create){if(!r.create_svg_info){console.error("要创建的数据获取失败");return}const Lt=Math.floor(jt.offsetX/g.svg.scale-V.center_offset.x),Pt=Math.floor(jt.offsetY/g.svg.scale-V.center_offset.y),ni={id:randomString(),x:Lt,y:Pt,client:{x:Lt,y:Pt},scale_x:1,scale_y:1,rotate:0,actual_bound:{x:0,y:0,width:0,height:0},center_position:{x:0,y:0},point_coordinate:{tl:{x:0,y:0},tc:{x:0,y:0},tr:{x:0,y:0},l:{x:0,y:0},r:{x:0,y:0},bl:{x:0,y:0},bc:{x:0,y:0},br:{x:0,y:0}},selected:!1,...objectDeepClone(r.create_svg_info)};r.setDoneJson(ni),r.setHandleSvgInfo(ni,r.done_json.length),r.intention=EGlobalStoreIntention.None}(ti=re.value)==null||ti.focus()}},he=jt=>{jt.preventDefault()},pe=jt=>{jt.preventDefault()},ze=(jt,ti,Lt)=>{var Pt,ni;if((Pt=re.value)==null||Pt.focus(),r.intention!==EGlobalStoreIntention.Connection)if(Lt.preventDefault(),Lt.stopPropagation(),Lt.ctrlKey&&Lt.button===0)(ni=r.handle_svg_info)!=null&&ni.index&&(r.done_json[r.handle_svg_info.index].selected=!0,r.setHandleSvgInfo(null),jt.selected=!jt.selected);else if(ue.value){r.intention=EGlobalStoreIntention.GroupMove,r.mouse_info={state:EMouseInfoState.Down,position_x:Math.round((Lt.clientX-V.canvasInfo.left)/g.svg.scale),position_y:Math.round((Lt.clientY-V.canvasInfo.top)/g.svg.scale),now_position_x:0,now_position_y:0,new_position_x:0,new_position_y:0};for(let ri of r.done_json)ri.selected&&(ri.old_position={x:ri.x,y:ri.y},ri.point_coordinate_old=objectDeepClone(ri.point_coordinate))}else r.intention=EGlobalStoreIntention.Select,r.setHandleSvgInfo(jt,ti),r.mouse_info={state:EMouseInfoState.Down,position_x:Math.round((Lt.clientX-V.canvasInfo.left)/g.svg.scale),position_y:Math.round((Lt.clientY-V.canvasInfo.top)/g.svg.scale),now_position_x:jt.x,now_position_y:jt.y,new_position_x:0,new_position_y:0},jt.point_coordinate_old=objectDeepClone(jt.point_coordinate)},xe=(jt,ti,Lt)=>{if(!(r.intention===EGlobalStoreIntention.Connection||r.mouse_info.state!=EMouseInfoState.Down)&&ue.value&&!de&&["SelectArea","Move","Select"].indexOf(r.intention)<0){for(let Pt of r.done_json)Pt.selected=!1,Pt.old_position={x:0,y:0},resetHandlePointOld(Pt);r.intention=EGlobalStoreIntention.Select,r.setHandleSvgInfo(jt,ti),r.mouse_info={state:EMouseInfoState.Down,position_x:Math.round((Lt.clientX-V.canvasInfo.left)/g.svg.scale),position_y:Math.round((Lt.clientY-V.canvasInfo.top)/g.svg.scale),now_position_x:jt.x,now_position_y:jt.y,new_position_x:0,new_position_y:0}}},Oe=(jt,ti,Lt)=>{Lt.preventDefault(),Lt.stopPropagation(),ae.connection_panel=!0,ae.connection_line=!0,!((r.intention===EGlobalStoreIntention.Connection||r.intention===EGlobalStoreIntention.SetConnectionLineNode)&&jt.type===EDoneJsonType.ConnectionLine)&&(ae.select_item.info=jt,ae.select_item.index=ti)},_e=(jt,ti,Lt)=>{Lt.preventDefault(),Lt.stopPropagation(),!((r.intention===EGlobalStoreIntention.Connection||r.intention===EGlobalStoreIntention.SetConnectionLineNode)&&jt.type===EDoneJsonType.ConnectionLine)&&(ae.connection_panel=!1,ae.connection_line=!1,ae.select_item.info=null,ae.select_item.index=-1)},At=jt=>{var ri,ui,Ci,gi,di,hi,ci,Ai,yi,wi,li;if(r.mouse_info.state!=EMouseInfoState.Down&&r.intention!==EGlobalStoreIntention.Connection)return;const{clientX:ti,clientY:Lt}=jt;r.mouse_info.new_position_x=Math.round((ti-V.canvasInfo.left)/g.svg.scale),r.mouse_info.new_position_y=Math.round((Lt-V.canvasInfo.top)/g.svg.scale);const Pt=Math.round(r.mouse_info.new_position_x-r.mouse_info.position_x+r.mouse_info.now_position_x),ni=Math.round(r.mouse_info.new_position_y-r.mouse_info.position_y+r.mouse_info.now_position_y);if((ri=r.handle_svg_info)!=null&&ri.info&&(r.intention===EGlobalStoreIntention.Select||r.intention===EGlobalStoreIntention.Move)){if(r.handle_svg_info.info.x=Pt,r.handle_svg_info.info.y=ni,r.handle_svg_info.info.client={x:Pt,y:ni},r.intention=EGlobalStoreIntention.Move,moveHandlePoint(r.handle_svg_info.info),moveAnchors(r.handle_svg_info.info),r.handle_svg_info.info.type===EDoneJsonType.ConnectionLine){if((ui=r.handle_svg_info.info.bind_anchors)!=null&&ui.start){let fi=null;for(let Mi of r.done_json)Mi.id===((gi=(Ci=r.handle_svg_info.info.bind_anchors)==null?void 0:Ci.start)==null?void 0:gi.target_id)&&(fi=Mi);fi&&moveAnchors(fi)}if((di=r.handle_svg_info.info.bind_anchors)!=null&&di.end){let fi=null;for(let Mi of r.done_json)Mi.id===((ci=(hi=r.handle_svg_info.info.bind_anchors)==null?void 0:hi.end)==null?void 0:ci.target_id)&&(fi=Mi);fi&&moveAnchors(fi)}}}else if(r.intention===EGlobalStoreIntention.MoveCanvas)V.center_offset.x=Pt,V.center_offset.y=ni;else if(r.intention===EGlobalStoreIntention.SelectArea)le.value.b.x=r.mouse_info.new_position_x-V.center_offset.x,le.value.b.y=r.mouse_info.new_position_y-V.center_offset.y;else if(r.intention===EGlobalStoreIntention.GroupMove){de=!0;for(let fi of r.done_json)if(fi.selected&&fi.old_position){const Mi=Math.round(r.mouse_info.new_position_x-r.mouse_info.position_x+fi.old_position.x),Ni=Math.round(r.mouse_info.new_position_y-r.mouse_info.position_y+fi.old_position.y);if(fi.x=Mi,fi.y=Ni,fi.client={x:Mi,y:Ni},moveHandlePoint(fi),moveAnchors(fi),fi.type===EDoneJsonType.ConnectionLine&&((Ai=fi.bind_anchors)!=null&&Ai.end)){let pi=null;for(let vi of r.done_json)vi.id===((wi=(yi=fi.bind_anchors)==null?void 0:yi.end)==null?void 0:wi.target_id)&&(pi=vi);pi&&moveAnchors(pi)}}}else if(r.intention===EGlobalStoreIntention.Zoom){if(!r.handle_svg_info)return;const fi={x:r.mouse_info.new_position_x-V.center_offset.x,y:r.mouse_info.new_position_y-V.center_offset.y};let Mi={width:0,height:0,is_old_width:!1,is_old_height:!1};if(r.scale_info.type===EScaleInfoType.TopLeft?Mi=calculateLeftTop(fi,r.scale_info.symmetric_point,r.handle_svg_info.info.rotate):r.scale_info.type===EScaleInfoType.TopRight?Mi=calculateRightTop(fi,r.scale_info.symmetric_point,r.handle_svg_info.info.rotate):r.scale_info.type===EScaleInfoType.BottomRight?Mi=calculateRightBottom(fi,r.scale_info.symmetric_point,r.handle_svg_info.info.rotate):r.scale_info.type===EScaleInfoType.BottomLeft?Mi=calculateLeftBottom(fi,r.scale_info.symmetric_point,r.handle_svg_info.info.rotate):r.scale_info.type===EScaleInfoType.TopCenter?Mi=calculateTop(fi,r.scale_info.symmetric_point,r.handle_svg_info.info.rotate,r.handle_svg_info.info.client):r.scale_info.type===EScaleInfoType.Right?Mi=calculateRight(fi,r.scale_info.symmetric_point,r.handle_svg_info.info.rotate,r.handle_svg_info.info.client):r.scale_info.type===EScaleInfoType.BottomCenter?Mi=calculateBottom(fi,r.scale_info.symmetric_point,r.handle_svg_info.info.rotate,r.handle_svg_info.info.client):r.scale_info.type===EScaleInfoType.Left&&(Mi=calculateLeft(fi,r.scale_info.symmetric_point,r.handle_svg_info.info.rotate,r.handle_svg_info.info.client)),r.handle_svg_info&&Mi.width>0&&Mi.height>0){const Ni=Mi.is_old_width?1:parseFloat((Mi.width/r.handle_svg_info.info.actual_bound.width).toFixed(3)),pi=Mi.is_old_height?1:parseFloat((Mi.height/r.handle_svg_info.info.actual_bound.height).toFixed(3)),vi=getCenterPoint(fi,r.scale_info.symmetric_point);Ni>0&&r.scale_info.type!==EScaleInfoType.TopCenter&&r.scale_info.type!==EScaleInfoType.BottomCenter&&(r.handle_svg_info.info.scale_x=Ni,r.handle_svg_info.info.x=Math.round(getSvgNowPosition(r.handle_svg_info.info.center_position.x,vi.x,r.handle_svg_info.info.client.x))),pi>0&&r.scale_info.type!==EScaleInfoType.Left&&r.scale_info.type!==EScaleInfoType.Right&&(r.handle_svg_info.info.scale_y=pi,r.handle_svg_info.info.y=Math.round(getSvgNowPosition(r.handle_svg_info.info.center_position.y,vi.y,r.handle_svg_info.info.client.y)))}}else if(r.intention===EGlobalStoreIntention.Rotate){if(!r.handle_svg_info)return;const fi=Math.atan2(r.mouse_info.position_y-r.handle_svg_info.info.y,r.mouse_info.position_x-r.handle_svg_info.info.x)/(Math.PI/180),Mi=Math.atan2(r.mouse_info.new_position_y-V.center_offset.y-r.handle_svg_info.info.y,r.mouse_info.new_position_x-V.center_offset.x-r.handle_svg_info.info.x)/(Math.PI/180);r.handle_svg_info.info.rotate=parseFloat((r.rotate_info.angle+Mi-fi).toFixed(2))}else if(r.intention===EGlobalStoreIntention.Connection&&r.handle_svg_info){const fi=(li=r.handle_svg_info)==null?void 0:li.info.props.point_position.val.length,Mi=r.mouse_info.new_position_x-r.mouse_info.position_x-V.center_offset.x,Ni=r.mouse_info.new_position_y-r.mouse_info.position_y-V.center_offset.y,pi=r.handle_svg_info.info.props.point_position.val[fi-2];let vi=pi.x<Mi?-5:pi.x>Mi?5:0,bi=pi.y<Ni?-5:pi.y>Ni?5:0;jt.ctrlKey?r.handle_svg_info.info.props.point_position.val[fi-1]={x:pi.x,y:Ni+bi}:jt.shiftKey?r.handle_svg_info.info.props.point_position.val[fi-1]={x:Mi+vi,y:pi.y}:r.handle_svg_info.info.props.point_position.val[fi-1]={x:Mi+vi,y:Ni+bi}}else r.intention===EGlobalStoreIntention.SetConnectionLineNode&&r.handle_svg_info&&(r.handle_svg_info.info.props.point_position.val[r.connection_line_node_info.point_index]={x:getSvgNowPosition(r.mouse_info.position_x,r.mouse_info.new_position_x,r.connection_line_node_info.init_pos.x),y:getSvgNowPosition(r.mouse_info.position_y,r.mouse_info.new_position_y,r.connection_line_node_info.init_pos.y)})},$e=()=>{var jt,ti,Lt;if(r.mouse_info.state==EMouseInfoState.Down){if((jt=r.handle_svg_info)!=null&&jt.info&&r.intention==EGlobalStoreIntention.Move)setSvgActualInfo(r.done_json[r.handle_svg_info.index]),r.intention=EGlobalStoreIntention.None,r.setDoneJson(r.done_json);else if(r.intention==EGlobalStoreIntention.GroupMove)de&&(de=!1,r.intention=EGlobalStoreIntention.None);else if((ti=r.handle_svg_info)!=null&&ti.info&&r.intention==EGlobalStoreIntention.Zoom)r.handle_svg_info.info.client={x:r.handle_svg_info.info.x,y:r.handle_svg_info.info.y},r.intention=EGlobalStoreIntention.None,setSvgActualInfo(r.done_json[r.handle_svg_info.index]),r.setDoneJson(r.done_json);else if(r.intention===EGlobalStoreIntention.Rotate&&((Lt=r.handle_svg_info)!=null&&Lt.info))setSvgActualInfo(r.done_json[r.handle_svg_info.index]),r.setDoneJson(r.done_json),r.intention=EGlobalStoreIntention.None;else{if(r.intention===EGlobalStoreIntention.Connection)return;if(r.intention===EGlobalStoreIntention.SelectArea){r.setHandleSvgInfo(null);for(let Pt of r.done_json){const ni=Ie.value;Pt.selected=Pt.x>ni.x&&Pt.x<ni.x+ni.with&&Pt.y>ni.y&&Pt.y<ni.y+ni.height}r.intention=EGlobalStoreIntention.None}else r.intention!=EGlobalStoreIntention.Select&&(r.intention=EGlobalStoreIntention.None)}r.mouse_info={state:EMouseInfoState.Up,position_x:0,position_y:0,now_position_x:0,now_position_y:0,new_position_x:0,new_position_y:0},$.display=!1}},Fe=jt=>{const{clientX:ti,clientY:Lt}=jt;if(r.intention===EGlobalStoreIntention.Connection){r.handle_svg_info||createLine(jt),r.handle_svg_info&&(jt.button===0?r.handle_svg_info.info.props.point_position.val.length!==1?r.handle_svg_info.info.props.point_position.val.push({x:r.mouse_info.new_position_x-r.mouse_info.position_x-V.center_offset.x,y:r.mouse_info.new_position_y-r.mouse_info.position_y-V.center_offset.y}):r.handle_svg_info.info.props.point_position.val.push({x:0,y:0}):jt.button===2&&(r.intention=EGlobalStoreIntention.None,setSvgActualInfo(r.done_json[r.handle_svg_info.index]),r.setHandleSvgInfo(null)));return}jt.button===0?(r.intention=EGlobalStoreIntention.SelectArea,r.mouse_info={state:EMouseInfoState.Down,position_x:Math.round((ti-V.canvasInfo.left)/g.svg.scale-V.center_offset.x),position_y:Math.round((Lt-V.canvasInfo.top)/g.svg.scale-V.center_offset.y),now_position_x:0,now_position_y:0,new_position_x:0,new_position_y:0},le.value={a:{x:r.mouse_info.position_x,y:r.mouse_info.position_y},b:{x:0,y:0}}):jt.button===2&&(r.intention=EGlobalStoreIntention.MoveCanvas,r.mouse_info={state:EMouseInfoState.Down,position_x:Math.round((ti-V.canvasInfo.left)/g.svg.scale),position_y:Math.round((Lt-V.canvasInfo.top)/g.svg.scale),now_position_x:V.center_offset.x,now_position_y:V.center_offset.y,new_position_x:0,new_position_y:0})};function Ue(jt){jt!=null&&jt.wheelDelta&&(jt.wheelDelta>0?g.svg.scale=parseFloat((g.svg.scale+.1).toFixed(1)):g.svg.scale=parseFloat((g.svg.scale-.1).toFixed(1)))}const Ve=jt=>{jt.stopPropagation(),jt.preventDefault()},Dt=(jt,ti,Lt)=>{r.intention!==EGlobalStoreIntention.Connection&&oe.value&&(r.intention=EGlobalStoreIntention.ContextMenu,r.setHandleSvgInfo(jt,ti),oe.value.style.left=Lt.pageX+"px",oe.value.style.top=Lt.pageY+"px",$.info.MoveUpOneLevel.enable=$.info.MoveUpTopLevel.enable=$.info.MoveDownOneLevel.enable=$.info.MoveDownTopLevel.enable=!0,ti===r.done_json.length-1&&($.info.MoveUpOneLevel.enable=$.info.MoveUpTopLevel.enable=!1),ti===0&&($.info.MoveDownOneLevel.enable=$.info.MoveDownTopLevel.enable=!1),$.display=!0)},qe=(jt,ti,Lt)=>({x:parseFloat((jt.x-jt.width/2*ti+jt.width/2).toFixed(1)),y:parseFloat((jt.y-jt.height/2*Lt+jt.height/2).toFixed(1)),width:parseFloat((jt.width*ti).toFixed(1)),height:parseFloat((jt.height*Lt).toFixed(1))}),kt=jt=>{jt.preventDefault();let ti=[];if(!jt.ctrlKey&&["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].indexOf(jt.key)>-1&&(ue.value?ti=r.done_json.map((Lt,Pt)=>({selected:Lt.selected,i:Pt})).filter(Lt=>Lt.selected).map(Lt=>Lt.i):r.handle_svg_info&&ti.push(r.handle_svg_info.index)),!jt.ctrlKey&&jt.key=="ArrowUp"){for(let Lt of ti)r.done_json[Lt].y-=1,r.done_json[Lt].client.y-=1,moveHandlePoint(r.done_json[Lt],0,-1),moveAnchors(r.done_json[Lt]);useHistoryRecord(r.done_json)}else if(!jt.ctrlKey&&jt.key=="ArrowDown"){for(let Lt of ti)r.done_json[Lt].y+=1,r.done_json[Lt].client.y+=1,moveHandlePoint(r.done_json[Lt],0,1),moveAnchors(r.done_json[Lt]);useHistoryRecord(r.done_json)}else if(!jt.ctrlKey&&jt.key=="ArrowLeft"){for(let Lt of ti)r.done_json[Lt].x-=1,r.done_json[Lt].client.x-=1,moveHandlePoint(r.done_json[Lt],-1,0),moveAnchors(r.done_json[Lt]);useHistoryRecord(r.done_json)}else if(!jt.ctrlKey&&jt.key=="ArrowRight"){for(let Lt of ti)r.done_json[Lt].x+=1,r.done_json[Lt].client.x+=1,moveHandlePoint(r.done_json[Lt],1,0),moveAnchors(r.done_json[Lt]);useHistoryRecord(r.done_json)}else jt.ctrlKey&&jt.key.toLowerCase()=="c"?$.onContextMenuClick(EContextMenuInfoType.Copy):!jt.ctrlKey&&jt.key=="Delete"?ue.value?(r.setDoneJson(r.done_json.filter(Lt=>!Lt.selected)),r.setHandleSvgInfo(r.done_json[r.done_json.length-1],r.done_json.length-1)):$.onContextMenuClick(EContextMenuInfoType.Delete):jt.ctrlKey&&jt.key=="ArrowUp"?$.onContextMenuClick(EContextMenuInfoType.MoveUpOneLevel):jt.ctrlKey&&jt.key=="ArrowDown"?$.onContextMenuClick(EContextMenuInfoType.MoveDownOneLevel):jt.ctrlKey&&jt.key=="ArrowLeft"?$.onContextMenuClick(EContextMenuInfoType.MoveDownTopLevel):jt.ctrlKey&&jt.key=="ArrowRight"?$.onContextMenuClick(EContextMenuInfoType.MoveUpTopLevel):jt.ctrlKey&&jt.shiftKey&&jt.key.toLowerCase()=="z"?k.topRedoBtnClick():jt.ctrlKey&&jt.key.toLowerCase()=="z"?k.topUndoBtnClick():jt.ctrlKey&&jt.key.toLowerCase()=="delete"&&(r.done_json.length<=0||r.setDoneJson([]))},Et=()=>{setSvgActualInfo(r.done_json[r.handle_svg_info.index],!0)};return vue.onMounted(()=>{var jt;(jt=re.value)==null||jt.focus(),vue.nextTick(function(){var Lt;const ti=(Lt=re.value)==null?void 0:Lt.getBoundingClientRect();V.canvasInfo={height:(ti==null?void 0:ti.height)||0,with:(ti==null?void 0:ti.width)||0,top:(ti==null?void 0:ti.top)||0,left:(ti==null?void 0:ti.left)||0}})}),(jt,ti)=>(vue.openBlock(),vue.createElementBlock("div",{class:"canvas",tabindex:"0",ref_key:"canvasRef",ref:re,onDrop:Ne,onDragenter:he,onDragover:pe,onMousedown:Fe,onMousemove:At,onMouseup:$e,onContextmenu:Ve,onKeydown:kt,onMousewheel:Ue},[(vue.openBlock(),vue.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",style:vue.normalizeStyle({backgroundColor:vue.unref(g).svg.background_color}),width:"100%",height:"100%"},[vue.createElementVNode("defs",null,[vue.createElementVNode("pattern",_hoisted_1$8,[vue.createElementVNode("line",{x1:"0",y1:"0",x2:"0",y2:"20",stroke:vue.unref(g).svg.grid_color},null,8,_hoisted_2$6),vue.createElementVNode("line",{x1:"10",y1:"0",x2:"10",y2:"20",stroke:vue.unref(g).svg.grid_color},null,8,_hoisted_3$6),vue.createElementVNode("line",{x1:"0",y1:"0",x2:"20",y2:"0",stroke:vue.unref(g).svg.grid_color},null,8,_hoisted_4$4),vue.createElementVNode("line",{x1:"0",y1:"10",x2:"20",y2:"10",stroke:vue.unref(g).svg.grid_color},null,8,_hoisted_5$2)])]),vue.unref(g).svg.grid?(vue.openBlock(),vue.createElementBlock("rect",_hoisted_6)):vue.createCommentVNode("",!0),vue.createElementVNode("g",{transform:`translate(${vue.unref(V).center_offset.x*vue.unref(g).svg.scale},${vue.unref(V).center_offset.y*vue.unref(g).svg.scale})rotate(0)scale(${vue.unref(g).svg.scale})`},[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(r).done_json,(Lt,Pt)=>{var ni,ri,ui,Ci,gi,di;return vue.withDirectives((vue.openBlock(),vue.createElementBlock("g",{key:Lt.id,transform:`translate(${Lt.x},${Lt.y})rotate(0)scale(1)`},[vue.createElementVNode("g",{class:vue.normalizeClass(`${vue.unref(getCommonClass)(Lt)}`)},[vue.createElementVNode("g",{transform:`translate(${Lt.actual_bound.x+Lt.actual_bound.width/2},${Lt.actual_bound.y+Lt.actual_bound.height/2})rotate(${Lt.rotate}) scale(1) translate(${-(Lt.actual_bound.x+Lt.actual_bound.width/2)},${-(Lt.actual_bound.y+Lt.actual_bound.height/2)})`,onMousedown:hi=>ze(Lt,Pt,hi),onMouseup:hi=>xe(Lt,Pt,hi),onMouseenter:hi=>Oe(Lt,Pt,hi),onMouseleave:hi=>_e(Lt,Pt,hi),onContextmenu:hi=>Dt(Lt,Pt,hi)},[Lt.type===vue.unref(EDoneJsonType).ConnectionLine?(vue.openBlock(),vue.createBlock(_sfc_main$e,{key:0,"item-info":Lt,"point-visible":vue.unref(ae).connection_line&&((ni=vue.unref(ae).select_item.info)==null?void 0:ni.id)==Lt.id},null,8,["item-info","point-visible"])):Lt.type===vue.unref(EDoneJsonType).File?(vue.openBlock(),vue.createElementBlock("use",vue.mergeProps({key:1,"xlink:href":`#svg-${Lt.name}`},vue.unref(prosToVBind)(Lt),{width:"100",height:"100",id:Lt.id,transform:`translate(${Lt.actual_bound.x+Lt.actual_bound.width/2},${Lt.actual_bound.y+Lt.actual_bound.height/2}) scale(${Lt.scale_x},${Lt.scale_y}) translate(${-(Lt.actual_bound.x+Lt.actual_bound.width/2)},${-(Lt.actual_bound.y+Lt.actual_bound.height/2)})`}),null,16,_hoisted_10)):Lt.type===vue.unref(EDoneJsonType).CustomSvg?(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(Lt.tag),vue.mergeProps({key:2},vue.unref(prosToVBind)(Lt),{width:"100",height:"100",id:Lt.id,onResize:Et,transform:`translate(${Lt.actual_bound.x+Lt.actual_bound.width/2},${Lt.actual_bound.y+Lt.actual_bound.height/2}) scale(${Lt.scale_x},${Lt.scale_y}) translate(${-(Lt.actual_bound.x+Lt.actual_bound.width/2)},${-(Lt.actual_bound.y+Lt.actual_bound.height/2)})`}),null,16,["id","transform"])):Lt.type===vue.unref(EDoneJsonType).Vue?(vue.openBlock(),vue.createElementBlock("foreignObject",vue.mergeProps({key:3},qe(Lt.actual_bound,Lt.scale_x,Lt.scale_y),{id:`foreign-object${Lt.id}`}),[(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(Lt.tag),vue.mergeProps(vue.unref(prosToVBind)(Lt),{id:Lt.id,transform:`translate(${Lt.actual_bound.x+Lt.actual_bound.width/2},${Lt.actual_bound.y+Lt.actual_bound.height/2}) scale(${Lt.scale_x},${Lt.scale_y}) translate(${-(Lt.actual_bound.x+Lt.actual_bound.width/2)},${-(Lt.actual_bound.y+Lt.actual_bound.height/2)})`}),{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(Lt.tag_slot),1)]),_:2},1040,["id","transform"]))],16,_hoisted_11)):Lt.type===vue.unref(EDoneJsonType).StraightLine?(vue.openBlock(),vue.createElementBlock("line",{key:4,id:Lt.id,x1:Lt.props.start_x.val,y1:Lt.props.start_y.val,x2:Lt.props.end_x.val,y2:Lt.props.end_y.val,fill:"#FF0000",stroke:"#FF0000","stroke-width":"2"},null,8,_hoisted_12)):vue.createCommentVNode("",!0),Lt.config.actual_rect?(vue.openBlock(),vue.createElementBlock("rect",vue.mergeProps({key:5,id:`rect${Lt.id}`,fill:"black","fill-opacity":"0"},qe(Lt.actual_bound,Lt.scale_x,Lt.scale_y),{style:{stroke:"none","stroke-width":"2","stroke-miterlimit":"10"},class:{"svg-item-none":!Lt.selected&&(vue.unref(r).intention==vue.unref(EGlobalStoreIntention).None||vue.unref(r).intention==vue.unref(EGlobalStoreIntention).Select),"svg-item-move":vue.unref(r).intention==vue.unref(EGlobalStoreIntention).Move&&((ri=vue.unref(r).handle_svg_info)==null?void 0:ri.info.id)==Lt.id,"svg-item-select":vue.unref(r).intention==vue.unref(EGlobalStoreIntention).Select&&((ui=vue.unref(r).handle_svg_info)==null?void 0:ui.info.id)==Lt.id,"svg-item-in-group":Lt.selected}}),null,16,_hoisted_13)):vue.createCommentVNode("",!0),((Ci=vue.unref(r).handle_svg_info)==null?void 0:Ci.info.id)===Lt.id&&vue.unref(ae).handle_panel&&Lt.config.can_zoom?(vue.openBlock(),vue.createBlock(HandlePanel,{key:6,"item-info":Lt},null,8,["item-info"])):vue.createCommentVNode("",!0),!Lt.selected&&((gi=vue.unref(ae).select_item.info)==null?void 0:gi.id)==Lt.id&&vue.unref(ae).connection_panel&&Lt.config.have_anchor&&vue.unref(r).intention!==vue.unref(EGlobalStoreIntention).SelectArea&&(vue.unref(r).intention!==vue.unref(EGlobalStoreIntention).Select||Lt.id!==((di=vue.unref(r).handle_svg_info)==null?void 0:di.info.id))?(vue.openBlock(),vue.createBlock(ConnectionPanel,{key:7,onContextmenu:Ve,"item-info":Lt},null,8,["item-info"])):vue.createCommentVNode("",!0)],40,_hoisted_9)],2)],8,_hoisted_8)),[[vue.vShow,Lt.display]])}),128)),vue.createElementVNode("rect",{x:Ie.value.x,y:Ie.value.y,height:Ie.value.height,width:Ie.value.with,stroke:"#107cec",fill:"#107cec","fill-opacity":".2"},null,8,_hoisted_14)],8,_hoisted_7)],4)),vue.withDirectives(vue.createElementVNode("ul",{ref_key:"contextMenuRef",ref:oe,class:"contextMenu"},[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref($).info,(Lt,Pt)=>(vue.openBlock(),vue.createElementBlock("li",{key:Lt.title,onClick:ni=>vue.unref($).onContextMenuClick(Pt)},[vue.createElementVNode("p",{class:vue.normalizeClass(Lt.enable?"":"disabled")},[vue.createTextVNode(vue.toDisplayString(Lt.title)+" ",1),vue.createElementVNode("span",_hoisted_16,vue.toDisplayString(Lt.hot_key),1)],2)],8,_hoisted_15))),128))],512),[[vue.vShow,vue.unref($).display]])],544))}}),index_vue_vue_type_style_index_0_scoped_6ab802ed_lang="",CenterPanel=_export_sfc(_sfc_main$d,[["__scopeId","data-v-6ab802ed"]]);var ace$2={exports:{}};(function(i,n){(function(){var r="ace",g=function(){return this}();!g&&typeof window<"u"&&(g=window);var V=function(ie,ae,le){if(typeof ie!="string"){V.original?V.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(le=ae),V.modules[ie]||(V.payloads[ie]=le,V.modules[ie]=null)};V.modules={},V.payloads={};var k=function(ie,ae,le){if(typeof ae=="string"){var Ie=re(ie,ae);if(Ie!=null)return le&&le(),Ie}else if(Object.prototype.toString.call(ae)==="[object Array]"){for(var ue=[],de=0,Ne=ae.length;de<Ne;++de){var he=re(ie,ae[de]);if(he==null&&$.original)return;ue.push(he)}return le&&le.apply(null,ue)||!0}},$=function(ie,ae){var le=k("",ie,ae);return le==null&&$.original?$.original.apply(this,arguments):le},oe=function(ie,ae){if(ae.indexOf("!")!==-1){var le=ae.split("!");return oe(ie,le[0])+"!"+oe(ie,le[1])}if(ae.charAt(0)=="."){var Ie=ie.split("/").slice(0,-1).join("/");for(ae=Ie+"/"+ae;ae.indexOf(".")!==-1&&ue!=ae;){var ue=ae;ae=ae.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return ae},re=function(ie,ae){ae=oe(ie,ae);var le=V.modules[ae];if(!le){if(le=V.payloads[ae],typeof le=="function"){var Ie={},ue={id:ae,uri:"",exports:Ie,packaged:!0},de=function(he,pe){return k(ae,he,pe)},Ne=le(de,Ie,ue);Ie=Ne||ue.exports,V.modules[ae]=Ie,delete V.payloads[ae]}le=V.modules[ae]=Ie||le}return le};function Ce(ie){var ae=g;ie&&(g[ie]||(g[ie]={}),ae=g[ie]),(!ae.define||!ae.define.packaged)&&(V.original=ae.define,ae.define=V,ae.define.packaged=!0),(!ae.require||!ae.require.packaged)&&($.original=ae.require,ae.require=$,ae.require.packaged=!0)}Ce(r)})(),ace.define("ace/lib/es6-shim",["require","exports","module"],function(r,g,V){function k($,oe,re){Object.defineProperty($,oe,{value:re,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||k(String.prototype,"startsWith",function($,oe){return oe=oe||0,this.lastIndexOf($,oe)===oe}),String.prototype.endsWith||k(String.prototype,"endsWith",function($,oe){var re=this;(oe===void 0||oe>re.length)&&(oe=re.length),oe-=$.length;var Ce=re.indexOf($,oe);return Ce!==-1&&Ce===oe}),String.prototype.repeat||k(String.prototype,"repeat",function($){for(var oe="",re=this;$>0;)$&1&&(oe+=re),($>>=1)&&(re+=re);return oe}),String.prototype.includes||k(String.prototype,"includes",function($,oe){return this.indexOf($,oe)!=-1}),Object.assign||(Object.assign=function($){if($==null)throw new TypeError("Cannot convert undefined or null to object");for(var oe=Object($),re=1;re<arguments.length;re++){var Ce=arguments[re];Ce!=null&&Object.keys(Ce).forEach(function(ie){oe[ie]=Ce[ie]})}return oe}),Object.values||(Object.values=function($){return Object.keys($).map(function(oe){return $[oe]})}),Array.prototype.find||k(Array.prototype,"find",function($){for(var oe=this.length,re=arguments[1],Ce=0;Ce<oe;Ce++){var ie=this[Ce];if($.call(re,ie,Ce,this))return ie}}),Array.prototype.findIndex||k(Array.prototype,"findIndex",function($){for(var oe=this.length,re=arguments[1],Ce=0;Ce<oe;Ce++){var ie=this[Ce];if($.call(re,ie,Ce,this))return Ce}}),Array.prototype.includes||k(Array.prototype,"includes",function($,oe){return this.indexOf($,oe)!=-1}),Array.prototype.fill||k(Array.prototype,"fill",function($){for(var oe=this,re=oe.length>>>0,Ce=arguments[1],ie=Ce>>0,ae=ie<0?Math.max(re+ie,0):Math.min(ie,re),le=arguments[2],Ie=le===void 0?re:le>>0,ue=Ie<0?Math.max(re+Ie,0):Math.min(Ie,re);ae<ue;)oe[ae]=$,ae++;return oe}),Array.of||k(Array,"of",function(){return Array.prototype.slice.call(arguments)})}),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/es6-shim"],function(r,g,V){r("./es6-shim")}),ace.define("ace/lib/lang",["require","exports","module"],function(r,g,V){g.last=function(oe){return oe[oe.length-1]},g.stringReverse=function(oe){return oe.split("").reverse().join("")},g.stringRepeat=function(oe,re){for(var Ce="";re>0;)re&1&&(Ce+=oe),(re>>=1)&&(oe+=oe);return Ce};var k=/^\s\s*/,$=/\s\s*$/;g.stringTrimLeft=function(oe){return oe.replace(k,"")},g.stringTrimRight=function(oe){return oe.replace($,"")},g.copyObject=function(oe){var re={};for(var Ce in oe)re[Ce]=oe[Ce];return re},g.copyArray=function(oe){for(var re=[],Ce=0,ie=oe.length;Ce<ie;Ce++)oe[Ce]&&typeof oe[Ce]=="object"?re[Ce]=this.copyObject(oe[Ce]):re[Ce]=oe[Ce];return re},g.deepCopy=function oe(re){if(typeof re!="object"||!re)return re;var Ce;if(Array.isArray(re)){Ce=[];for(var ie=0;ie<re.length;ie++)Ce[ie]=oe(re[ie]);return Ce}if(Object.prototype.toString.call(re)!=="[object Object]")return re;Ce={};for(var ie in re)Ce[ie]=oe(re[ie]);return Ce},g.arrayToMap=function(oe){for(var re={},Ce=0;Ce<oe.length;Ce++)re[oe[Ce]]=1;return re},g.createMap=function(oe){var re=Object.create(null);for(var Ce in oe)re[Ce]=oe[Ce];return re},g.arrayRemove=function(oe,re){for(var Ce=0;Ce<=oe.length;Ce++)re===oe[Ce]&&oe.splice(Ce,1)},g.escapeRegExp=function(oe){return oe.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},g.escapeHTML=function(oe){return(""+oe).replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/'/g,"&#39;").replace(/</g,"&#60;")},g.getMatchOffsets=function(oe,re){var Ce=[];return oe.replace(re,function(ie){Ce.push({offset:arguments[arguments.length-2],length:ie.length})}),Ce},g.deferredCall=function(oe){var re=null,Ce=function(){re=null,oe()},ie=function(ae){return ie.cancel(),re=setTimeout(Ce,ae||0),ie};return ie.schedule=ie,ie.call=function(){return this.cancel(),oe(),ie},ie.cancel=function(){return clearTimeout(re),re=null,ie},ie.isPending=function(){return re},ie},g.delayedCall=function(oe,re){var Ce=null,ie=function(){Ce=null,oe()},ae=function(le){Ce==null&&(Ce=setTimeout(ie,le||re))};return ae.delay=function(le){Ce&&clearTimeout(Ce),Ce=setTimeout(ie,le||re)},ae.schedule=ae,ae.call=function(){this.cancel(),oe()},ae.cancel=function(){Ce&&clearTimeout(Ce),Ce=null},ae.isPending=function(){return Ce},ae}}),ace.define("ace/lib/oop",["require","exports","module"],function(r,g,V){g.inherits=function(k,$){k.super_=$,k.prototype=Object.create($.prototype,{constructor:{value:k,enumerable:!1,writable:!0,configurable:!0}})},g.mixin=function(k,$){for(var oe in $)k[oe]=$[oe];return k},g.implement=function(k,$){g.mixin(k,$)}}),ace.define("ace/lib/useragent",["require","exports","module"],function(r,g,V){g.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},g.getOS=function(){return g.isMac?g.OS.MAC:g.isLinux?g.OS.LINUX:g.OS.WINDOWS};var k=typeof navigator=="object"?navigator:{},$=(/mac|win|linux/i.exec(k.platform)||["other"])[0].toLowerCase(),oe=k.userAgent||"",re=k.appName||"";g.isWin=$=="win",g.isMac=$=="mac",g.isLinux=$=="linux",g.isIE=re=="Microsoft Internet Explorer"||re.indexOf("MSAppHost")>=0?parseFloat((oe.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((oe.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),g.isOldIE=g.isIE&&g.isIE<9,g.isGecko=g.isMozilla=oe.match(/ Gecko\/\d+/),g.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",g.isWebKit=parseFloat(oe.split("WebKit/")[1])||void 0,g.isChrome=parseFloat(oe.split(" Chrome/")[1])||void 0,g.isEdge=parseFloat(oe.split(" Edge/")[1])||void 0,g.isAIR=oe.indexOf("AdobeAIR")>=0,g.isAndroid=oe.indexOf("Android")>=0,g.isChromeOS=oe.indexOf(" CrOS ")>=0,g.isIOS=/iPad|iPhone|iPod/.test(oe)&&!window.MSStream,g.isIOS&&(g.isMac=!0),g.isMobile=g.isIOS||g.isAndroid}),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],function(r,g,V){var k=r("./useragent"),$="http://www.w3.org/1999/xhtml";g.buildDom=function le(Ie,ue,de){if(typeof Ie=="string"&&Ie){var Ne=document.createTextNode(Ie);return ue&&ue.appendChild(Ne),Ne}if(!Array.isArray(Ie))return Ie&&Ie.appendChild&&ue&&ue.appendChild(Ie),Ie;if(typeof Ie[0]!="string"||!Ie[0]){for(var he=[],pe=0;pe<Ie.length;pe++){var ze=le(Ie[pe],ue,de);ze&&he.push(ze)}return he}var xe=document.createElement(Ie[0]),Oe=Ie[1],_e=1;Oe&&typeof Oe=="object"&&!Array.isArray(Oe)&&(_e=2);for(var pe=_e;pe<Ie.length;pe++)le(Ie[pe],xe,de);return _e==2&&Object.keys(Oe).forEach(function(At){var $e=Oe[At];At==="class"?xe.className=Array.isArray($e)?$e.join(" "):$e:typeof $e=="function"||At=="value"||At[0]=="$"?xe[At]=$e:At==="ref"?de&&(de[$e]=xe):At==="style"?typeof $e=="string"&&(xe.style.cssText=$e):$e!=null&&xe.setAttribute(At,$e)}),ue&&ue.appendChild(xe),xe},g.getDocumentHead=function(le){return le||(le=document),le.head||le.getElementsByTagName("head")[0]||le.documentElement},g.createElement=function(le,Ie){return document.createElementNS?document.createElementNS(Ie||$,le):document.createElement(le)},g.removeChildren=function(le){le.innerHTML=""},g.createTextNode=function(le,Ie){var ue=Ie?Ie.ownerDocument:document;return ue.createTextNode(le)},g.createFragment=function(le){var Ie=le?le.ownerDocument:document;return Ie.createDocumentFragment()},g.hasCssClass=function(le,Ie){var ue=(le.className+"").split(/\s+/g);return ue.indexOf(Ie)!==-1},g.addCssClass=function(le,Ie){g.hasCssClass(le,Ie)||(le.className+=" "+Ie)},g.removeCssClass=function(le,Ie){for(var ue=le.className.split(/\s+/g);;){var de=ue.indexOf(Ie);if(de==-1)break;ue.splice(de,1)}le.className=ue.join(" ")},g.toggleCssClass=function(le,Ie){for(var ue=le.className.split(/\s+/g),de=!0;;){var Ne=ue.indexOf(Ie);if(Ne==-1)break;de=!1,ue.splice(Ne,1)}return de&&ue.push(Ie),le.className=ue.join(" "),de},g.setCssClass=function(le,Ie,ue){ue?g.addCssClass(le,Ie):g.removeCssClass(le,Ie)},g.hasCssString=function(le,Ie){var ue=0,de;if(Ie=Ie||document,de=Ie.querySelectorAll("style")){for(;ue<de.length;)if(de[ue++].id===le)return!0}},g.removeElementById=function(le,Ie){Ie=Ie||document,Ie.getElementById(le)&&Ie.getElementById(le).remove()};var oe,re=[];g.useStrictCSP=function(le){oe=le,le==!1?Ce():re||(re=[])};function Ce(){var le=re;re=null,le&&le.forEach(function(Ie){ie(Ie[0],Ie[1])})}function ie(le,Ie,ue){if(!(typeof document>"u")){if(re){if(ue)Ce();else if(ue===!1)return re.push([le,Ie])}if(!oe){var de=ue;!ue||!ue.getRootNode?de=document:(de=ue.getRootNode(),(!de||de==ue)&&(de=document));var Ne=de.ownerDocument||de;if(Ie&&g.hasCssString(Ie,de))return null;Ie&&(le+=`
207
+ `)("x-vue-echarts")}catch{return w=!1}return w=!0}(),U="ecTheme",S=vue.defineComponent({name:"echarts",props:O(O({option:Object,theme:{type:[Object,String]},initOptions:Object,updateOptions:Object,group:String,manualUpdate:Boolean},_),L),emits:{},inheritAttrs:!1,setup:function(i,n){var r=n.attrs,g=vue.shallowRef(),V=vue.shallowRef(),k=vue.shallowRef(),$=vue.inject("ecTheme",null),oe=vue.inject("ecInitOptions",null),re=vue.inject("ecUpdateOptions",null),Ce=vue.toRefs(i),ie=Ce.autoresize,ae=Ce.manualUpdate,le=Ce.loading,Ie=Ce.loadingOptions,ue=vue.computed(function(){return k.value||i.option||null}),de=vue.computed(function(){return i.theme||j($,{})}),Ne=vue.computed(function(){return i.initOptions||j(oe,{})}),he=vue.computed(function(){return i.updateOptions||j(re,{})}),pe=vue.computed(function(){return function($e){var Fe={};for(var Ue in $e)x(Ue)||(Fe[Ue]=$e[Ue]);return Fe}(r)}),ze=vue.getCurrentInstance().proxy.$listeners;function xe($e){if(g.value){var Fe=V.value=init(g.value,de.value,Ne.value);i.group&&(Fe.group=i.group);var Ue=ze;Ue||(Ue={},Object.keys(r).filter(function(Dt){return Dt.indexOf("on")===0&&Dt.length>2}).forEach(function(Dt){var qe=Dt.charAt(2).toLowerCase()+Dt.slice(3);qe.substring(qe.length-4)==="Once"&&(qe="~".concat(qe.substring(0,qe.length-4))),Ue[qe]=r[Dt]})),Object.keys(Ue).forEach(function(Dt){var qe=Ue[Dt];if(qe){var kt=Dt.toLowerCase();kt.charAt(0)==="~"&&(kt=kt.substring(1),qe.__once__=!0);var Et=Fe;if(kt.indexOf("zr:")===0&&(Et=Fe.getZr(),kt=kt.substring(3)),qe.__once__){delete qe.__once__;var jt=qe;qe=function(){for(var ti=[],Lt=0;Lt<arguments.length;Lt++)ti[Lt]=arguments[Lt];jt.apply(void 0,ti),Et.off(kt,qe)}}Et.on(kt,qe)}}),ie.value?vue.nextTick(function(){Fe&&!Fe.isDisposed()&&Fe.resize(),Ve()}):Ve()}function Ve(){var Dt=$e||ue.value;Dt&&Fe.setOption(Dt,he.value)}}function Oe(){V.value&&(V.value.dispose(),V.value=void 0)}var _e=null;vue.watch(ae,function($e){typeof _e=="function"&&(_e(),_e=null),$e||(_e=vue.watch(function(){return i.option},function(Fe,Ue){Fe&&(V.value?V.value.setOption(Fe,O({notMerge:Fe.value!==(Ue==null?void 0:Ue.value)},he.value)):xe())},{deep:!0}))},{immediate:!0}),vue.watch([de,Ne],function(){Oe(),xe()},{deep:!0}),vue.watchEffect(function(){i.group&&V.value&&(V.value.group=i.group)});var At=y(V);return function($e,Fe,Ue){var Ve=vue.inject("ecLoadingOptions",{}),Dt=vue.computed(function(){return O(O({},j(Ve,{})),Ue==null?void 0:Ue.value)});vue.watchEffect(function(){var qe=$e.value;qe&&(Fe.value?qe.showLoading(Dt.value):qe.hideLoading())})}(V,le,Ie),function($e,Fe,Ue){var Ve=null;vue.watch([Ue,$e,Fe],function(Dt,qe,kt){var Et=Dt[0],jt=Dt[1],ti=Dt[2];Et&&jt&&ti&&(Ve=throttle$1(function(){jt.resize()},100),addListener(Et,Ve)),kt(function(){Ve&&Et&&removeListener(Et,Ve)})})}(V,ie,g),vue.onMounted(function(){xe()}),vue.onBeforeUnmount(function(){T&&g.value?g.value.__dispose=Oe:Oe()}),O({chart:V,root:g,setOption:function($e,Fe){i.manualUpdate&&(k.value=$e),V.value?V.value.setOption($e,Fe||{}):xe($e)},nonEventAttrs:pe},At)},render:function(){var i=O({},this.nonEventAttrs);return i.ref="root",i.class=i.class?["echarts"].concat(i.class):"echarts",vue.h("x-vue-echarts",i)}});const _sfc_main$m=vue.defineComponent({__name:"pie-charts",props:{title:{type:String,default:"标题"},seriesName:{type:String,default:"详情"},seriesData:{type:Array,default:()=>[]}},setup(i){const n=i;use([install$7,install$6,install$3,install$4,install]),vue.provide(U,"dark");const r=vue.reactive({title:{text:n.title,left:"center"},tooltip:{trigger:"item",formatter:"{a} <br/>{b} : {c} ({d}%)"},legend:{orient:"vertical",left:"left"},series:[{name:n.seriesName,type:"pie",radius:"55%",center:["50%","60%"],data:n.seriesData,emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}}}]});return vue.watch(n,g=>{r.title.text=g.title,r.series[0].name=g.seriesName,r.series[0].data=g.seriesData}),(g,V)=>(vue.openBlock(),vue.createBlock(vue.unref(S),{class:"chart",option:vue.unref(r),autoresize:""},null,8,["option"]))}}),pieCharts_vue_vue_type_style_index_0_scoped_0a4c1b1f_lang="",_export_sfc=(i,n)=>{const r=i.__vccOpts||i;for(const[g,V]of n)r[g]=V;return r},PieCharts=_export_sfc(_sfc_main$m,[["__scopeId","data-v-0a4c1b1f"]]),_hoisted_1$g=["id"],_hoisted_2$e=["id"],_hoisted_3$c=["fill"],_hoisted_4$a=["fill"],_hoisted_5$8=["fill"],_hoisted_6$6=vue.createElementVNode("path",{d:"M375.466667 709.214815l-25.6 137.481481c0 2.844444 1.896296 5.688889 7.585185 10.42963l65.422222 54.992593c5.688889 4.740741 15.17037 8.533333 23.703704 10.429629l36.029629-193.422222-107.14074-19.911111z",fill:"#2D4375"},null,-1),_hoisted_7$6=vue.createElementVNode("path",{d:"M482.607407 729.125926l-36.029629 193.422222c9.481481 1.896296 18.014815 1.896296 25.6-0.948148l80.592592-27.496296c6.637037-1.896296 10.42963-4.740741 11.377778-6.637037L589.748148 749.037037l-107.140741-19.911111z",fill:"#1E2D4F"},null,-1),_hoisted_8$5=["fill-opacity"],_hoisted_9$5=["fill-opacity"],_hoisted_10$4=["fill-opacity"],_hoisted_11$4=vue.createElementVNode("path",{d:"M593.540741 807.822222c1.896296-7.585185-3.792593-15.17037-11.377778-16.118518l-107.140741-19.911111-4.740741 27.496296 107.140741 19.911111c6.637037 0.948148 14.222222-3.792593 16.118519-11.377778z",fill:"#CEEFF6"},null,-1),_hoisted_12$3=vue.createElementVNode("path",{d:"M366.933333 750.933333c-7.585185-1.896296-15.17037 3.792593-16.118518 11.377778-1.896296 7.585185 3.792593 15.17037 11.377778 16.118519l107.14074 19.911111 4.740741-27.496297-107.140741-19.911111zM356.503704 808.77037c-7.585185-1.896296-15.17037 3.792593-16.118519 11.377778-1.896296 7.585185 3.792593 15.17037 11.377778 16.118519l107.140741 19.911111 4.74074-27.496297-107.14074-19.911111z",fill:"#FFFFFF"},null,-1),_hoisted_13$3=vue.createElementVNode("path",{d:"M570.785185 848.592593l-107.140741-19.911112-4.74074 27.496297 107.14074 19.911111c7.585185 1.896296 15.17037-3.792593 16.118519-11.377778 1.896296-7.585185-2.844444-15.17037-11.377778-16.118518z",fill:"#CEEFF6"},null,-1),_hoisted_14$3=["xlink:href"],_sfc_main$l=vue.defineComponent({__name:"light-a",props:{id:{default:""},isOpen:{type:Boolean,default:!1}},emits:["onChange"],setup(i,{emit:n}){const r=i;return vue.watch(()=>r.isOpen,()=>{n("onChange")}),(g,V)=>(vue.openBlock(),vue.createElementBlock("g",{id:r.id,style:{cursor:"pointer"}},[vue.createElementVNode("symbol",{id:`${r.id}light-121`,viewBox:"0 0 1024 1024"},[vue.createElementVNode("path",{d:"M565.096296 289.185185s-0.948148 0 0 0c-110.933333-20.859259-208.592593 40.77037-237.985185 148.859259-14.222222 53.096296-24.651852 101.451852 44.562963 221.866667 14.222222 25.6 11.377778 70.162963 8.533333 95.762963-1.896296 14.222222 64.474074 36.02963 89.125926 42.666667l95.762963-509.155556z",fill:r.isOpen?"#FDB813":"#cccccc"},null,8,_hoisted_3$c),vue.createElementVNode("path",{d:"M732.918519 513.896296c11.377778-111.881481-56.888889-203.851852-166.874075-224.711111h-0.948148L469.333333 798.340741c25.6 2.844444 94.814815 6.637037 98.607408-7.585185 6.637037-25.6 20.859259-67.318519 42.666666-86.281482C719.644444 618.192593 727.22963 568.888889 732.918519 513.896296z",fill:r.isOpen?"#FD9B13":"#bbbbbb"},null,8,_hoisted_4$a),vue.createElementVNode("path",{d:"M467.437037 806.874074c-7.585185-0.948148-12.325926-7.585185-14.222222-14.222222l-38.874074-256c-0.948148-5.688889 0.948148-11.377778 4.74074-15.170371 3.792593-3.792593 9.481481-5.688889 15.170371-4.74074l167.822222 31.288889c5.688889 0.948148 10.42963 4.740741 12.325926 9.481481 1.896296 4.740741 1.896296 11.377778-0.948148 16.118519L486.4 798.340741c-3.792593 6.637037-11.377778 10.42963-18.962963 8.533333z m-14.222222-251.259259l27.496296 182.992592L572.681481 578.37037l-119.466666-22.755555z",fill:r.isOpen?"#F12A3F":"#666666"},null,8,_hoisted_5$8),_hoisted_6$6,_hoisted_7$6,vue.createElementVNode("path",{d:"M612.503704 217.125926c-3.792593 18.014815-20.859259 29.392593-38.874074 26.548148-18.014815-3.792593-30.340741-20.859259-26.548149-38.874074l18.962963-100.503704c3.792593-18.014815 20.859259-29.392593 38.874075-26.548148 18.014815 3.792593 30.340741 20.859259 26.548148 38.874074l-18.962963 100.503704z",fill:"#FDB813","fill-opacity":r.isOpen?1:0},null,8,_hoisted_8$5),vue.createElementVNode("path",{d:"M382.103704 228.503704c10.42963 15.17037 6.637037 36.02963-8.533334 46.459259-15.17037 10.42963-36.02963 6.637037-46.459259-8.533333l-57.837037-84.385186c-10.42963-15.17037-6.637037-36.02963 8.533333-46.459259 15.17037-10.42963 36.02963-6.637037 46.45926 8.533334l57.837037 84.385185zM757.57037 298.666667c-15.17037 10.42963-18.962963 31.288889-8.533333 46.459259 10.42963 15.17037 31.288889 18.962963 46.459259 8.533333l84.385185-57.837037c15.17037-10.42963 18.962963-31.288889 8.533334-46.459259-10.42963-15.17037-31.288889-18.962963-46.459259-8.533333l-84.385186 57.837037z",fill:"#FDB813","fill-opacity":r.isOpen?1:0},null,8,_hoisted_9$5),vue.createElementVNode("path",{d:"M252.207407 361.244444c18.014815 3.792593 30.340741 20.859259 26.548149 38.874075-3.792593 18.014815-20.859259 29.392593-38.874075 26.548148l-100.503703-18.962963c-18.014815-3.792593-30.340741-20.859259-26.548148-38.874074 3.792593-18.014815 20.859259-29.392593 38.874074-26.548149l100.503703 18.962963zM931.081481 488.296296c18.014815 3.792593 30.340741 20.859259 26.548149 38.874074-3.792593 18.014815-20.859259 29.392593-38.874074 26.548149l-100.503704-18.962963c-18.014815-3.792593-30.340741-20.859259-26.548148-38.874075 3.792593-18.014815 20.859259-29.392593 38.874074-26.548148l100.503703 18.962963z",fill:"#FDB813","fill-opacity":r.isOpen?1:0},null,8,_hoisted_10$4),_hoisted_11$4,_hoisted_12$3,_hoisted_13$3],8,_hoisted_2$e),vue.createElementVNode("use",{"xlink:href":`#${r.id}light-121`,width:"100",height:"100"},null,8,_hoisted_14$3)],8,_hoisted_1$g))}}),_hoisted_1$f=["id"],_hoisted_2$d=["id"],_hoisted_3$b=vue.createElementVNode("path",{d:"M512.3 518.9m-469.2 0a469.2 469.2 0 1 0 938.4 0 469.2 469.2 0 1 0-938.4 0Z",fill:"#429BCF"},null,-1),_hoisted_4$9=vue.createElementVNode("path",{d:"M512.3 518.9m-392.5 0a392.5 392.5 0 1 0 785 0 392.5 392.5 0 1 0-785 0Z",fill:"#FFFFFF"},null,-1),_hoisted_5$7={d:"M512.3 523.8c-4.5 0-9-1.7-12.4-5.1-6.8-6.8-6.8-17.9 0-24.8l130.8-130.8c6.8-6.8 17.9-6.8 24.8 0 6.8 6.8 6.8 17.9 0 24.8L524.7 518.7c-3.5 3.4-7.9 5.1-12.4 5.1z",fill:"#2D416C"},_hoisted_6$5=["from","to"],_hoisted_7$5={d:"M512.3 523.8c-4.5 0-9-1.7-12.4-5.1L318.3 337.1c-6.8-6.8-6.8-17.9 0-24.8 6.8-6.8 17.9-6.8 24.8 0L524.7 494c6.8 6.8 6.8 17.9 0 24.8-3.5 3.3-7.9 5-12.4 5z",fill:"#365087"},_hoisted_8$4=["from","to"],_hoisted_9$4=vue.createElementVNode("path",{d:"M512.3 506.3m-47.5 0a47.5 47.5 0 1 0 95 0 47.5 47.5 0 1 0-95 0Z",fill:"#365087"},null,-1),_hoisted_10$3=vue.createElementVNode("path",{d:"M512.3 218.8c-9 0-16.3-7.3-16.3-16.3v-29.1c0-9 7.3-16.3 16.3-16.3s16.3 7.3 16.3 16.3v29.1c0 9-7.4 16.3-16.3 16.3zM512.3 880.8c-9 0-16.3-7.3-16.3-16.3v-29.1c0-9 7.3-16.3 16.3-16.3s16.3 7.3 16.3 16.3v29.1c0 9-7.4 16.3-16.3 16.3zM812.4 518.9c0-9 7.3-16.3 16.3-16.3h29.1c9 0 16.3 7.3 16.3 16.3s-7.3 16.3-16.3 16.3h-29.1c-8.9 0-16.3-7.3-16.3-16.3zM150.4 518.9c0-9 7.3-16.3 16.3-16.3h29.1c9 0 16.3 7.3 16.3 16.3s-7.3 16.3-16.3 16.3h-29.1c-8.9 0-16.3-7.3-16.3-16.3z",fill:"#2D416C"},null,-1),_hoisted_11$3={d:"M296.9 733.5c-2.2 0-4.5-0.9-6.2-2.6-3.4-3.4-3.4-9 0-12.4L540 469.2c3.4-3.4 9-3.4 12.4 0 3.4 3.4 3.4 9 0 12.4L303.1 731c-1.7 1.7-4 2.5-6.2 2.5z",fill:"#C11B16"},_hoisted_12$2=["from","to"],_hoisted_13$2=vue.createElementVNode("path",{d:"M512.3 506.3m-22.8 0a22.8 22.8 0 1 0 45.6 0 22.8 22.8 0 1 0-45.6 0Z",fill:"#fff"},null,-1),_hoisted_14$2=["xlink:href"],_sfc_main$k=vue.defineComponent({__name:"clock-a",props:{id:{default:""}},setup(i){const n=i,r=vue.ref(new Date),g=r.value.getSeconds(),V=r.value.getMinutes(),k=Math.floor((r.value.getHours()+(V+g/60)/60)*30);return($,oe)=>(vue.openBlock(),vue.createElementBlock("g",{id:n.id},[vue.createElementVNode("symbol",{id:`${n.id}clock-a-n`,viewBox:"0 0 1024 1024"},[_hoisted_3$b,_hoisted_4$9,vue.createElementVNode("path",_hoisted_5$7,[vue.createElementVNode("animateTransform",{attributeName:"transform",attributeType:"XML",type:"rotate",from:`${-45+vue.unref(k)} 512.3 506.3`,to:`${315+vue.unref(k)} 512.3 506.3`,dur:"43200s",repeatCount:"indefinite"},null,8,_hoisted_6$5)]),vue.createElementVNode("path",_hoisted_7$5,[vue.createElementVNode("animateTransform",{attributeName:"transform",attributeType:"XML",type:"rotate",from:`${45+vue.unref(V)*6} 512.3 506.3`,to:`${405+vue.unref(V)*6} 512.3 506.3`,dur:"3600s",repeatCount:"indefinite"},null,8,_hoisted_8$4)]),_hoisted_9$4,_hoisted_10$3,vue.createElementVNode("path",_hoisted_11$3,[vue.createElementVNode("animateTransform",{attributeName:"transform",attributeType:"XML",type:"rotate",from:`${135.5+vue.unref(g)*6} 512.3 506.3`,to:`${495.5+vue.unref(g)*6} 512.3 506.3`,dur:"60s",repeatCount:"indefinite"},null,8,_hoisted_12$2)]),_hoisted_13$2],8,_hoisted_2$d),vue.createElementVNode("use",{"xlink:href":`#${n.id}clock-a-n`,width:"100",height:"100"},null,8,_hoisted_14$2)],8,_hoisted_1$f))}}),vueComp={"svg-text":_sfc_main$p,"el-button":ElButton,"progress-a":_sfc_main$r,"el-tag":ElTag,"common-table":_sfc_main$o,"pie-charts":PieCharts,"switch-a":_sfc_main$q,"now-time":_sfc_main$n,"light-a":_sfc_main$l,"clock-a":_sfc_main$k},config=[...svg_config,...vue_config],useGlobalStore=pinia$1.defineStore("global-store",{state:()=>({config_center:config,intention:EGlobalStoreIntention.None,create_svg_info:null,done_json:[],mouse_info:{state:EMouseInfoState.Up,position_x:0,position_y:0,now_position_x:0,now_position_y:0,new_position_x:0,new_position_y:0},handle_svg_info:null,scale_info:{type:EScaleInfoType.None,scale_times:{x:1,y:1},scale_item_info:{x:0,y:0},symmetric_point:{x:0,y:0}},rotate_info:{angle:0},connection_line_node_info:{init_pos:{x:0,y:0},point_index:0}}),actions:{setCreateInfo(i){this.intention=EGlobalStoreIntention.Create,this.create_svg_info=i},setDoneJson(i){isOfType(i,"id")?(this.done_json.push(i),vue.nextTick(()=>{setSvgActualInfo(i)})):this.done_json=objectDeepClone(i),vue.nextTick(()=>{useHistoryRecord(objectDeepClone(this.done_json))})},setHandleSvgInfo(i,n){let r=n;i?(!r&&r!=0&&(r=this.done_json.findIndex(g=>g.id===i.id)??-1),this.handle_svg_info={info:i,index:r}):this.handle_svg_info=i},spliceDoneJson(i){const n=useGlobalStore();n.done_json.splice(i,1),useHistoryRecord(n.done_json)}}}),useSvgEditLayoutStore=pinia$1.defineStore("svg-edit-layout-store",{state:()=>({left_nav:!0,right_nav:!0,center_offset:{x:0,y:0},canvasInfo:{with:0,height:0,top:0,left:0}})}),randomString=i=>{i=i||10;const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=n.length;let g="";for(let V=0;V<i;V++){let k=r;V===0&&(k=r-10),g+=n.charAt(Math.floor(Math.random()*k))}return g},isOfType=(i,n)=>i[n]!==void 0,getCoordinateOffset=(i,n)=>i/2*(n-1),angleToRadian=i=>i*Math.PI/180,calculateRotatedPointCoordinate=(i,n,r)=>({x:parseFloat(((i.x-n.x)*Math.cos(angleToRadian(r))-(i.y-n.y)*Math.sin(angleToRadian(r))+n.x).toFixed(1)),y:parseFloat(((i.x-n.x)*Math.sin(angleToRadian(r))+(i.y-n.y)*Math.cos(angleToRadian(r))+n.y).toFixed(1))}),getCenterPoint=(i,n)=>({x:i.x+(n.x-i.x)/2,y:i.y+(n.y-i.y)/2}),positionArrToPath=i=>{let n="";for(let r=0;r<i.length;r++)r===0?n+=`M ${i[r].x} ${i[r].y}`:n+=` L ${i[r].x} ${i[r].y}`;return n},getSvgNowPosition=(i,n,r)=>r+(n-i),objectDeepClone=(i,n={})=>i?JSON.parse(JSON.stringify(i)):n,setSvgActualInfo=(i,n)=>{const r=document.querySelector(`#${i.id}`),g=document.querySelector(`#rect${i.id}`);if(r){let V=0,k=0,$=0,oe=0;if(i.type!==EDoneJsonType.Vue){const re=r.getBBox();V=parseFloat(re.x.toFixed(0)),k=parseFloat(re.y.toFixed(0)),$=parseFloat(re.width.toFixed(0)),oe=parseFloat(re.height.toFixed(0))}else{$=r.offsetWidth,oe=r.offsetHeight,$=$===0?100:$,oe=oe===0?100:oe,V=50-$/2,k=50-oe/2;const re=document.querySelector(`#foreign-object${i.id}`);re&&re.getAttribute("x")==="0"&&re.getAttribute("y")==="0"&&re.getAttribute("width")==="0"&&re.getAttribute("height")==="0"&&(re.setAttribute("x",V.toString()),re.setAttribute("y",k.toString()),re.setAttribute("width",$.toString()),re.setAttribute("height",oe.toString()))}g&&g.getAttribute("x")==="0"&&g.getAttribute("y")==="0"&&g.getAttribute("width")==="0"&&g.getAttribute("height")==="0"&&(g.setAttribute("x",V.toString()),g.setAttribute("y",k.toString()),g.setAttribute("width",$.toString()),g.setAttribute("height",oe.toString())),(i.actual_bound.x===0&&i.actual_bound.y===0&&i.actual_bound.width===0&&i.actual_bound.height===0||n)&&(i.actual_bound={x:V,y:k,width:$,height:oe}),i.center_position={x:i.x+i.actual_bound.x+$/2,y:i.y+i.actual_bound.y+oe/2},i.point_coordinate.tl={x:i.center_position.x-$*i.scale_x/2,y:i.center_position.y-oe*i.scale_y/2},i.point_coordinate.tc={x:i.center_position.x,y:i.center_position.y-oe*i.scale_y/2},i.point_coordinate.tr={x:i.center_position.x+$*i.scale_x/2,y:i.center_position.y-oe*i.scale_y/2},i.point_coordinate.l={x:i.center_position.x-$*i.scale_x/2,y:i.center_position.y},i.point_coordinate.r={x:i.center_position.x+$*i.scale_x/2,y:i.center_position.y},i.point_coordinate.bl={x:i.center_position.x-$*i.scale_x/2,y:i.center_position.y+oe*i.scale_y/2},i.point_coordinate.bc={x:i.center_position.x,y:i.center_position.y+oe*i.scale_y/2},i.point_coordinate.br={x:i.center_position.x+$*i.scale_x/2,y:i.center_position.y+oe*i.scale_y/2},i.rotate!==0&&setAfterRotationPointCoordinate(i),moveAnchors(i)}},resetHandlePointOld=i=>{for(const n of Object.keys(i.point_coordinate))i.point_coordinate_old&&(i.point_coordinate_old[n].x=0,i.point_coordinate_old[n].y=0)},moveHandlePoint=(i,n,r)=>{const g=useGlobalStore(pinia),V=n??g.mouse_info.new_position_x-g.mouse_info.position_x,k=r??g.mouse_info.new_position_y-g.mouse_info.position_y;for(const $ of Object.keys(i.point_coordinate))n!==void 0&&r!==void 0?(i.point_coordinate[$].x+=V,i.point_coordinate[$].y+=k):i.point_coordinate_old&&(i.point_coordinate[$].x=i.point_coordinate_old[$].x+V,i.point_coordinate[$].y=i.point_coordinate_old[$].y+k)},moveAnchors=i=>{var r,g,V,k;const n=useGlobalStore(pinia);for(let $ of n.done_json)if($.type===EDoneJsonType.ConnectionLine){if(((g=(r=$.bind_anchors)==null?void 0:r.start)==null?void 0:g.target_id)===i.id){const oe=getAnchorPosByAnchorType($.bind_anchors.start.type,i);$.props.point_position.val[0]={x:oe.x-$.x,y:oe.y-$.y}}if(((k=(V=$.bind_anchors)==null?void 0:V.end)==null?void 0:k.target_id)===i.id){const oe=getAnchorPosByAnchorType($.bind_anchors.end.type,i);$.props.point_position.val[$.props.point_position.val.length-1]={x:oe.x-$.x,y:oe.y-$.y}}}},getAnchorPosByAnchorType=(i,n)=>i===ELineBindAnchors.BottomCenter?n.point_coordinate.bc:i===ELineBindAnchors.Left?n.point_coordinate.l:i===ELineBindAnchors.Right?n.point_coordinate.r:n.point_coordinate.tc,setAfterRotationPointCoordinate=i=>{i.point_coordinate={tl:calculateRotatedPointCoordinate(i.point_coordinate.tl,i.center_position,i.rotate),tc:calculateRotatedPointCoordinate(i.point_coordinate.tc,i.center_position,i.rotate),tr:calculateRotatedPointCoordinate(i.point_coordinate.tr,i.center_position,i.rotate),l:calculateRotatedPointCoordinate(i.point_coordinate.l,i.center_position,i.rotate),r:calculateRotatedPointCoordinate(i.point_coordinate.r,i.center_position,i.rotate),bl:calculateRotatedPointCoordinate(i.point_coordinate.bl,i.center_position,i.rotate),bc:calculateRotatedPointCoordinate(i.point_coordinate.bc,i.center_position,i.rotate),br:calculateRotatedPointCoordinate(i.point_coordinate.br,i.center_position,i.rotate)}},prosToVBind=i=>{var r,g,V,k;let n={};if(i.state){for(const $ in i.state)if($==="OnOff")for(const oe in(r=i.state[$])==null?void 0:r.props)n={...n,[oe]:(g=i.state[$])!=null&&g.default?(V=i.state[$])==null?void 0:V.props[oe].openVal:(k=i.state[$])==null?void 0:k.props[oe].closeVal}}for(const $ in i.props)n={...n,[$]:i.props[$].val};return n},setArrItemByID=(id,key,val,json_arr)=>new Promise(res=>{const find_item=json_arr.find(i=>i.id===id);find_item||res({status:!1,msg:"要设置的id不存在"}),eval(`find_item.${key} = val;`),res({status:!0,msg:"操作成功"})}),getCommonClass=i=>!i.common_animations||!i.common_animations.val?"":`common-ani animate__animated animate__${i.common_animations.val} animate__${i.common_animations.speed} animate__${i.common_animations.repeat} animate__${i.common_animations.delay}`,numberArray=i=>{let n=[];for(let r=0;r<i;r++)n.push(r);return n},getStringWidth=(i,n=12)=>{if(i.length>0){let r=document.createElement("span");r.style.fontSize=n+"px",r.style.fontFamily="inherit",r.innerHTML=i,r.style.opacity="0",r.style.position="fixed",r.style.top="3000px",document.body.append(r);const g=r.clientWidth;return document.body.removeChild(r),g}return 0},valFormat=i=>/false|true/.test(i)?i!=="false":/^\d+(\.\d+)?$/.test(i)?Number(i):i,createLine=(i,n,r)=>{i.preventDefault();const g=useGlobalStore(pinia),V=useConfigStore(pinia),k=useSvgEditLayoutStore(pinia),{clientX:$,clientY:oe}=i;let re=objectDeepClone(V.connection_line),Ce=0,ie=0;if(n&&r){re.bind_anchors.start={type:n,target_id:r.id};let le=getAnchorPosByAnchorType(n,r);Ce=le.x,ie=le.y}else Ce=Math.round(($-k.canvasInfo.left)/V.svg.scale-k.center_offset.x),ie=Math.round((oe-k.canvasInfo.top)/V.svg.scale-k.center_offset.y);const ae={id:straight_line_system.name+randomString(),x:Ce,y:ie,client:{x:Ce,y:ie},scale_x:1,scale_y:1,rotate:0,actual_bound:{x:0,y:0,width:0,height:0},center_position:{x:0,y:0},point_coordinate:{tl:{x:0,y:0},tc:{x:0,y:0},tr:{x:0,y:0},l:{x:0,y:0},r:{x:0,y:0},bl:{x:0,y:0},bc:{x:0,y:0},br:{x:0,y:0}},...re};ae.props.point_position.val.push({x:0,y:0}),g.setDoneJson(ae),g.setHandleSvgInfo(ae,g.done_json.length-1),g.intention=EGlobalStoreIntention.Connection,g.mouse_info={state:EMouseInfoState.Down,position_x:Ce,position_y:ie,now_position_x:Ce,now_position_y:ie,new_position_x:0,new_position_y:0}};let l=localStorage.getItem("svg-editor-config"),s,t;if(l){let i=JSON.parse(l);t=i.connection_line,s=i.svg}else t=objectDeepClone(connection_line_system),s={background_color:"#fff",scale:1,grid:!0,grid_color:"#ebebeb",ruler:!0};const useConfigStore=pinia$1.defineStore("config-store",{state:()=>({svg:s,connection_line:t,net:{mqtt:{url:"",user:"",pwd:"",topics:""}}}),getters:{},actions:{}});var EContextMenuInfoType=(i=>(i.Copy="Copy",i.Delete="Delete",i.MoveUpOneLevel="MoveUpOneLevel",i.MoveDownOneLevel="MoveDownOneLevel",i.MoveUpTopLevel="MoveUpTopLevel",i.MoveDownTopLevel="MoveDownTopLevel",i))(EContextMenuInfoType||{});const useEditPrivateStore=pinia$1.defineStore("edit-private-store",{state:()=>({old_done_components:[],history_doneComponent:[],history_now_index:0,is_record_history:!0,max_record_times:10}),getters:{getTopBtnUndoStatus(i){return i.history_now_index>=1},getTopBtnRedoStatus(i){return i.history_now_index+1!=i.history_doneComponent.length}},actions:{topUndoBtnClick(){if(console.log("撤销"),this.history_now_index<1)return;const i=useGlobalStore();this.is_record_history=!1,this.history_now_index-=1,i.setDoneJson(this.history_doneComponent[this.history_now_index])},topRedoBtnClick(){if(console.log("重做"),this.history_now_index+1==this.history_doneComponent.length)return;const i=useGlobalStore();this.is_record_history=!1,this.history_now_index+=1,i.setDoneJson(this.history_doneComponent[this.history_now_index])}}}),useContextMenuStore=pinia$1.defineStore("context-menu-store",{state:()=>({display:!1,info:{[EContextMenuInfoType.Copy]:{title:"复制",hot_key:"Ctrl+C",enable:!0},[EContextMenuInfoType.Delete]:{title:"删除",hot_key:"Delete",enable:!0},[EContextMenuInfoType.MoveUpTopLevel]:{title:"置于顶层",hot_key:"Ctrl+→",enable:!0},[EContextMenuInfoType.MoveDownTopLevel]:{title:"置于底层",hot_key:"Ctrl+←",enable:!0},[EContextMenuInfoType.MoveUpOneLevel]:{title:"置于上一层",hot_key:"Ctrl+↑",enable:!0},[EContextMenuInfoType.MoveDownOneLevel]:{title:"置于下一层",hot_key:"Ctrl+↓",enable:!0}}}),actions:{onContextMenuClick(i){const n=useGlobalStore();if(n.handle_svg_info)switch(n.intention=EGlobalStoreIntention.Select,i){case EContextMenuInfoType.Copy:const r=objectDeepClone(n.handle_svg_info.info);r.id=r.name+randomString(),r.title+="-copy",r.x+=10,r.y+=10,n.setDoneJson(r),this.display=!1,n.setHandleSvgInfo(r,n.done_json.length);break;case EContextMenuInfoType.Delete:n.spliceDoneJson(n.handle_svg_info.index),this.display=!1,n.setHandleSvgInfo(null),n.intention=EGlobalStoreIntention.None;break;case EContextMenuInfoType.MoveUpOneLevel:if(n.done_json.length===1||n.handle_svg_info.index===n.done_json.length-1)return;const g=n.handle_svg_info.info;n.done_json[n.handle_svg_info.index]=n.done_json[n.handle_svg_info.index+1],n.done_json[n.handle_svg_info.index+1]=g,useHistoryRecord(n.done_json),this.display=!1,n.setHandleSvgInfo(g,n.handle_svg_info.index+1);break;case EContextMenuInfoType.MoveDownOneLevel:if(n.done_json.length===1||n.handle_svg_info.index===0)return;const V=n.handle_svg_info.info;n.done_json[n.handle_svg_info.index]=n.done_json[n.handle_svg_info.index-1],n.done_json[n.handle_svg_info.index-1]=V,useHistoryRecord(n.done_json),this.display=!1,n.setHandleSvgInfo(V,n.handle_svg_info.index-1);break;case EContextMenuInfoType.MoveDownTopLevel:if(n.done_json.length===1||n.handle_svg_info.index===0)return;const k=n.handle_svg_info.info;n.done_json.splice(n.handle_svg_info.index,1),n.done_json.unshift(k),useHistoryRecord(n.done_json),this.display=!1,n.setHandleSvgInfo(k,0);break;case EContextMenuInfoType.MoveUpTopLevel:if(n.done_json.length===1||n.handle_svg_info.index===n.done_json.length)return;const $=n.handle_svg_info.info;n.done_json.splice(n.handle_svg_info.index,1),n.done_json.push($),useHistoryRecord(n.done_json),this.display=!1,n.setHandleSvgInfo($,n.done_json.length-1);break}}}}),pinia=pinia$1.createPinia(),useHistoryRecord=i=>{const n=useEditPrivateStore();n.is_record_history&&(n.history_now_index+1<n.history_doneComponent.length&&n.history_doneComponent.splice(n.history_now_index+1),n.history_doneComponent.push(i),n.history_now_index=n.history_doneComponent.length-1,n.history_doneComponent.length>n.max_record_times&&(n.history_doneComponent.shift(),n.history_now_index=n.history_doneComponent.length-1)),n.is_record_history=!0},useImportDataModel=i=>{try{const n=JSON.parse(i);if(!n.config||!n.layout_center||!n.done_json)return ElMessage.error("请导入正确的数据模型!"),!1;const r=useGlobalStore(pinia),g=useSvgEditLayoutStore(pinia),V=useConfigStore(pinia);return V.$state=n.config,g.center_offset=n.layout_center,r.setDoneJson(n.done_json),!0}catch(n){return ElMessage.error("请导入正确的数据模型!"),console.error(n),!1}},_hoisted_1$e={"aria-hidden":"true"},_hoisted_2$c=["xlink:href"],_sfc_main$j=vue.defineComponent({__name:"index",props:{name:{},props:{default:()=>({})}},setup(i){const n=i,r=vue.computed(()=>`#svg-${n.name}`);return(g,V)=>(vue.openBlock(),vue.createElementBlock("svg",_hoisted_1$e,[vue.createElementVNode("use",vue.mergeProps({"xlink:href":vue.unref(r)},n.props),null,16,_hoisted_2$c)]))}});var EVisibleConfKey=(i=>(i.ImportJson="ImportJson",i.ExportJson="ExportJson",i.ImportFile="ImportFile",i))(EVisibleConfKey||{});const _withScopeId$2=i=>(vue.pushScopeId("data-v-64ac5be6"),i=i(),vue.popScopeId(),i),_hoisted_1$d={class:"flex justify-between",style:{width:"100%"}},_hoisted_2$b={class:"flex items-center justify-between",style:{width:"250px"}},_hoisted_3$a=_withScopeId$2(()=>vue.createElementVNode("div",{class:"flex items-center"},[vue.createElementVNode("span",{class:"logo-title"},"Svg Editor")],-1)),_hoisted_4$8={class:"flex justify-between",style:{width:"calc(100% - 440px)"}},_hoisted_5$6={class:"flex items-center"},_hoisted_6$4={class:"flex items-center mr-20px"},_hoisted_7$4={class:"flex items-center",style:{width:"250px"}},_hoisted_8$3=_withScopeId$2(()=>vue.createElementVNode("div",{class:"font-bold mb-10px text-15px guide-title",style:{"padding-top":"16px"}},"多选",-1)),_hoisted_9$3=_withScopeId$2(()=>vue.createElementVNode("div",null,"鼠标按住左键可以框选,也可以按住ctrl+鼠标左键点图形进行多选",-1)),_hoisted_10$2=_withScopeId$2(()=>vue.createElementVNode("div",{class:"el-divider el-divider--horizontal",role:"separator",style:{"--el-border-style":"solid"}},null,-1)),_hoisted_11$2=_withScopeId$2(()=>vue.createElementVNode("div",{class:"font-bold mb-10px text-15px guide-title"},"拖动画布",-1)),_hoisted_12$1=_withScopeId$2(()=>vue.createElementVNode("div",null,"右键画布然后拖动即可,右侧面板‘图纸’栏可微调或重置位置",-1)),_hoisted_13$1=_withScopeId$2(()=>vue.createElementVNode("div",{class:"el-divider el-divider--horizontal",role:"separator",style:{"--el-border-style":"solid"}},null,-1)),_hoisted_14$1=_withScopeId$2(()=>vue.createElementVNode("div",{class:"font-bold mb-10px text-15px guide-title"},"画布缩放",-1)),_hoisted_15$1=_withScopeId$2(()=>vue.createElementVNode("div",null,"使用鼠标滚轮或者右侧面板‘图纸’栏可控制画布缩放",-1)),_hoisted_16$1=_withScopeId$2(()=>vue.createElementVNode("div",{class:"el-divider el-divider--horizontal",role:"separator",style:{"--el-border-style":"solid"}},null,-1)),_hoisted_17=_withScopeId$2(()=>vue.createElementVNode("div",{class:"font-bold mb-10px text-15px guide-title"},"标尺辅助线",-1)),_hoisted_18=_withScopeId$2(()=>vue.createElementVNode("div",null,"在标尺区域按住鼠标左键并拖动即可创建标尺辅助线,将标尺辅助线拖动到标尺区域即可删除标尺辅助线",-1)),_hoisted_19=_withScopeId$2(()=>vue.createElementVNode("div",{class:"el-divider el-divider--horizontal",role:"separator",style:{"--el-border-style":"solid"}},null,-1)),_hoisted_20=_withScopeId$2(()=>vue.createElementVNode("div",{class:"font-bold mb-10px text-15px guide-title"},"连线样式",-1)),_hoisted_21=_withScopeId$2(()=>vue.createElementVNode("div",null,"在右侧‘连线’栏可以统一配置连线样式,配置后先增加的线会应用新样式,之前的线样式不变,如需改变,可选中线手动更改或删除重画 ",-1)),_hoisted_22=_withScopeId$2(()=>vue.createElementVNode("div",{class:"el-divider el-divider--horizontal",role:"separator",style:{"--el-border-style":"solid"}},null,-1)),_hoisted_23=_withScopeId$2(()=>vue.createElementVNode("div",{class:"font-bold mb-10px text-15px guide-title"},"横线和竖线",-1)),_hoisted_24=_withScopeId$2(()=>vue.createElementVNode("div",null,"画线的时候按住ctrl即可画竖线,按住shift即可画横线",-1)),_hoisted_25=_withScopeId$2(()=>vue.createElementVNode("div",{class:"el-divider el-divider--horizontal",role:"separator",style:{"--el-border-style":"solid"}},null,-1)),_hoisted_26=_withScopeId$2(()=>vue.createElementVNode("div",{class:"font-bold mb-10px text-15px guide-title"},"线段选中",-1)),_hoisted_27=_withScopeId$2(()=>vue.createElementVNode("div",{style:{"padding-bottom":"14px"}}," 若线段绑定了锚点,移动线段,绑定的锚点不会移动。若是想将线段整体移动,需要先选中线段,在右侧‘数据’栏里解除绑定 ",-1)),_sfc_main$i=vue.defineComponent({__name:"index",emits:["changeVisible","onReturn","onPreview","onSave"],setup(i,{emit:n}){const r=useSvgEditLayoutStore(pinia),g=useGlobalStore(pinia),V=useEditPrivateStore(pinia),k=useConfigStore(pinia),$=()=>{g.done_json.length<=0||g.setDoneJson([]),g.intention=EGlobalStoreIntention.None},oe=ie=>{const ae={layout_center:r.center_offset,config:k.$state,done_json:g.done_json};n(ie,ae)},re=vue.ref(!1),Ce=vue.computed({get:()=>g.intention===EGlobalStoreIntention.Connection,set(ie){g.intention=ie?EGlobalStoreIntention.Connection:EGlobalStoreIntention.None,ie&&g.setHandleSvgInfo(null)}});return(ie,ae)=>(vue.openBlock(),vue.createElementBlock(vue.Fragment,null,[vue.createElementVNode("div",_hoisted_1$d,[vue.createElementVNode("div",_hoisted_2$b,[_hoisted_3$a,vue.createVNode(vue.unref(ElIcon),{size:24,class:"bt-Icon",onClick:ae[0]||(ae[0]=le=>vue.unref(r).left_nav=!vue.unref(r).left_nav),title:vue.unref(r).left_nav?"隐藏左侧菜单":"显示左侧菜单"},{default:vue.withCtx(()=>[vue.unref(r).left_nav?(vue.openBlock(),vue.createBlock(_sfc_main$j,{key:0,name:"menu-unfold"})):(vue.openBlock(),vue.createBlock(_sfc_main$j,{key:1,name:"menu-fold"}))]),_:1},8,["title"])]),vue.createElementVNode("div",_hoisted_4$8,[vue.createElementVNode("div",_hoisted_5$6,[vue.createVNode(vue.unref(ElIcon),{title:"撤销 ctrl+z",size:24,class:vue.normalizeClass(`${vue.unref(V).getTopBtnUndoStatus?"bt-Icon":"icon-disable"} ml-20px`),onClick:ae[1]||(ae[1]=()=>vue.unref(V).topUndoBtnClick())},{default:vue.withCtx(()=>[vue.createVNode(_sfc_main$j,{name:vue.unref(V).getTopBtnUndoStatus?"undo":"undo-gray"},null,8,["name"])]),_:1},8,["class"]),vue.createVNode(vue.unref(ElIcon),{title:"重做 ctrl+shift+z",class:vue.normalizeClass(`${vue.unref(V).getTopBtnRedoStatus?"bt-Icon":"icon-disable"} ml-5px`),size:24,onClick:ae[2]||(ae[2]=()=>vue.unref(V).topRedoBtnClick())},{default:vue.withCtx(()=>[vue.createVNode(_sfc_main$j,{name:vue.unref(V).getTopBtnRedoStatus?"redo":"redo-gray"},null,8,["name"])]),_:1},8,["class"]),vue.createVNode(vue.unref(ElDivider),{direction:"vertical"}),vue.createVNode(vue.unref(ElIcon),{title:"清空 ctrl+delete",class:vue.normalizeClass(vue.unref(g).done_json.length>0?"bt-Icon":"icon-disable"),size:24,onClick:$},{default:vue.withCtx(()=>[vue.createVNode(_sfc_main$j,{name:vue.unref(g).done_json.length>0?"delete":"delete-gray"},null,8,["name"])]),_:1},8,["class"]),vue.createVNode(vue.unref(ElDivider),{direction:"vertical"}),vue.createVNode(vue.unref(ElIcon),{title:"导入数据模型",class:"bt-Icon",size:24,onClick:ae[3]||(ae[3]=le=>n("changeVisible",vue.unref(EVisibleConfKey).ImportJson,!0))},{default:vue.withCtx(()=>[vue.createVNode(_sfc_main$j,{name:"import"})]),_:1}),vue.createVNode(vue.unref(ElIcon),{title:"导出数据模型",size:24,class:"bt-Icon ml-5px",onClick:ae[4]||(ae[4]=le=>n("changeVisible",vue.unref(EVisibleConfKey).ExportJson,!0))},{default:vue.withCtx(()=>[vue.createVNode(_sfc_main$j,{name:"export"})]),_:1}),vue.createVNode(vue.unref(ElDivider),{direction:"vertical"}),vue.createVNode(vue.unref(ElIcon),{title:"创建连线",class:vue.normalizeClass(["bt-Icon",{active:vue.unref(Ce)}]),size:24,onClick:ae[5]||(ae[5]=le=>Ce.value=!vue.unref(Ce))},{default:vue.withCtx(()=>[vue.createVNode(_sfc_main$j,{name:vue.unref(Ce)?"line-active":"line"},null,8,["name"])]),_:1},8,["class"]),vue.createVNode(vue.unref(ElDivider),{direction:"vertical"}),vue.createVNode(vue.unref(ElIcon),{title:"说明",class:"bt-Icon",size:24,onClick:ae[6]||(ae[6]=le=>re.value=!vue.unref(re))},{default:vue.withCtx(()=>[vue.createVNode(_sfc_main$j,{name:"question"})]),_:1})]),vue.createElementVNode("div",_hoisted_6$4,[vue.createVNode(vue.unref(ElIcon),{title:"返回",class:"bt-Icon",size:24,onClick:ae[7]||(ae[7]=le=>oe("onReturn"))},{default:vue.withCtx(()=>[vue.createVNode(_sfc_main$j,{name:"return"})]),_:1}),vue.createVNode(vue.unref(ElDivider),{direction:"vertical"}),vue.createVNode(vue.unref(ElIcon),{title:"保存",class:"bt-Icon",size:24,onClick:ae[8]||(ae[8]=le=>oe("onSave"))},{default:vue.withCtx(()=>[vue.createVNode(_sfc_main$j,{name:"save"})]),_:1}),vue.createVNode(vue.unref(ElDivider),{direction:"vertical"}),vue.createVNode(vue.unref(ElIcon),{title:"预览",class:"bt-Icon",size:22,onClick:ae[9]||(ae[9]=le=>oe("onPreview"))},{default:vue.withCtx(()=>[vue.createVNode(_sfc_main$j,{name:"preview"})]),_:1})])]),vue.createElementVNode("div",_hoisted_7$4,[vue.createVNode(vue.unref(ElIcon),{size:24,class:"bt-Icon",onClick:ae[10]||(ae[10]=le=>vue.unref(r).right_nav=!vue.unref(r).right_nav),title:vue.unref(r).right_nav?"隐藏右侧菜单":"显示右侧菜单"},{default:vue.withCtx(()=>[vue.unref(r).right_nav?(vue.openBlock(),vue.createBlock(_sfc_main$j,{key:0,name:"menu-fold"})):(vue.openBlock(),vue.createBlock(_sfc_main$j,{key:1,name:"menu-unfold"}))]),_:1},8,["title"])])]),vue.createVNode(vue.unref(ElDialog),{modelValue:vue.unref(re),"onUpdate:modelValue":ae[11]||(ae[11]=le=>vue.isRef(re)?re.value=le:null),title:"使用说明",width:"60%",class:"guide-dialog"},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(ElScrollbar),{"max-height":"60vh"},{default:vue.withCtx(()=>[_hoisted_8$3,_hoisted_9$3,_hoisted_10$2,_hoisted_11$2,_hoisted_12$1,_hoisted_13$1,_hoisted_14$1,_hoisted_15$1,_hoisted_16$1,_hoisted_17,_hoisted_18,_hoisted_19,_hoisted_20,_hoisted_21,_hoisted_22,_hoisted_23,_hoisted_24,_hoisted_25,_hoisted_26,_hoisted_27]),_:1})]),_:1},8,["modelValue"])],64))}}),index_vue_vue_type_style_index_0_scoped_64ac5be6_lang="",index_vue_vue_type_style_index_1_lang$1="",TopPanel=_export_sfc(_sfc_main$i,[["__scopeId","data-v-64ac5be6"]]),_hoisted_1$c={class:"component-group flex flex-wrap"},_hoisted_2$a=["onDragstart","title"],_sfc_main$h=vue.defineComponent({__name:"index",props:{customToolbar:{}},setup(i){const n=i,r=useGlobalStore(pinia),g=vue.ref(n.customToolbar&&Object.keys(n.customToolbar).length>0?n.customToolbar:r.config_center),V=vue.ref(["stateful","stateless","have_animation","custom_svg_group","element-ui","custom-vue","echarts"]),k=oe=>{r.setCreateInfo(oe)},$=oe=>{var re;if(((re=oe.dataTransfer)==null?void 0:re.dropEffect)!=="copy"){ElMessage.warning("请将组件拖到画布中!"),r.intention=EGlobalStoreIntention.None;return}};return(oe,re)=>(vue.openBlock(),vue.createElementBlock("div",null,[vue.createVNode(vue.unref(ElCollapse),{modelValue:vue.unref(V),"onUpdate:modelValue":re[0]||(re[0]=Ce=>vue.isRef(V)?V.value=Ce:null),style:{"border-top":"none"}},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(g),Ce=>(vue.openBlock(),vue.createBlock(vue.unref(ElCollapseItem),{name:Ce.groupType,key:Ce.title},{title:vue.withCtx(()=>[vue.createElementVNode("div",null,vue.toDisplayString(Ce.title),1)]),default:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_1$c,[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(Ce.list,ie=>(vue.openBlock(),vue.createElementBlock("div",{class:"ideal",key:ie.name,draggable:"true",onDragstart:ae=>k(ie),onDragend:$,title:ie.title},[vue.createVNode(vue.unref(ElIcon),{size:35,class:"flex items-center"},{default:vue.withCtx(()=>[vue.createVNode(_sfc_main$j,{name:ie.name,props:vue.unref(prosToVBind)(ie)},null,8,["name","props"])]),_:2},1024)],40,_hoisted_2$a))),128))])]),_:2},1032,["name"]))),128))]),_:1},8,["modelValue"])]))}}),index_vue_vue_type_style_index_0_scoped_c7e50a4b_lang="",LeftPanel=_export_sfc(_sfc_main$h,[["__scopeId","data-v-c7e50a4b"]]),calculateLeftTop=(i,n,r)=>{const g=getCenterPoint(i,n),V=calculateRotatedPointCoordinate(i,g,-r),k=calculateRotatedPointCoordinate(n,g,-r);return{width:k.x-V.x,height:k.y-V.y,is_old_width:!1,is_old_height:!1}},calculateRightTop=(i,n,r)=>{const g=getCenterPoint(i,n),V=calculateRotatedPointCoordinate(i,g,-r),k=calculateRotatedPointCoordinate(n,g,-r);return{width:V.x-k.x,height:k.y-V.y,is_old_width:!1,is_old_height:!1}},calculateRightBottom=(i,n,r)=>{const g=getCenterPoint(i,n),V=calculateRotatedPointCoordinate(n,g,-r),k=calculateRotatedPointCoordinate(i,g,-r);return{width:k.x-V.x,height:k.y-V.y,is_old_width:!1,is_old_height:!1}},calculateLeftBottom=(i,n,r)=>{const g=getCenterPoint(i,n),V=calculateRotatedPointCoordinate(n,g,-r),k=calculateRotatedPointCoordinate(i,g,-r);return{width:V.x-k.x,height:k.y-V.y,is_old_width:!1,is_old_height:!1}},calculateTop=(i,n,r,g)=>{const V=calculateRotatedPointCoordinate(i,g,-r),k=calculateRotatedPointCoordinate({x:g.x,y:V.y},g,r),$=Math.sqrt((k.x-n.x)**2+(k.y-n.y)**2);return{width:1,height:Math.round($),is_old_width:!0,is_old_height:!1}},calculateRight=(i,n,r,g)=>{const V=calculateRotatedPointCoordinate(i,g,-r),k=calculateRotatedPointCoordinate({x:V.x,y:g.y},g,r),$=Math.sqrt((k.x-n.x)**2+(k.y-n.y)**2);return{width:Math.round($),height:1,is_old_width:!1,is_old_height:!0}},calculateBottom=(i,n,r,g)=>{const V=calculateRotatedPointCoordinate(i,g,-r),k=calculateRotatedPointCoordinate({x:g.x,y:V.y},g,r),$=Math.sqrt((k.x-n.x)**2+(k.y-n.y)**2);return{width:1,height:Math.round($),is_old_width:!0,is_old_height:!1}},calculateLeft=(i,n,r,g)=>{const V=calculateRotatedPointCoordinate(i,g,-r),k=calculateRotatedPointCoordinate({x:V.x,y:g.y},g,r),$=Math.sqrt((k.x-n.x)**2+(k.y-n.y)**2);return{width:Math.round($),height:1,is_old_width:!1,is_old_height:!0}},_hoisted_1$b={style:{"vector-effect":"non-scaling-stroke"}},_hoisted_2$9=["fill","x","y"],_hoisted_3$9=["cx","cy"],_hoisted_4$7=["x1","y1","x2","y2"],_hoisted_5$5=["fill","x","y"],_hoisted_6$3=["fill","x","y"],_hoisted_7$3=["fill","x","y"],_hoisted_8$2=["fill","x","y"],_hoisted_9$2=["fill","x","y"],_hoisted_10$1=["fill","x","y"],_hoisted_11$1=["fill","x","y"],_sfc_main$g=vue.defineComponent({__name:"index",props:{itemInfo:{}},setup(i){const n=i;vue.useCssVars(ae=>({"70f7dc54":vue.unref($)}));const r=useGlobalStore(pinia),g=useConfigStore(pinia),V=useSvgEditLayoutStore(pinia),k=vue.ref(4),$=vue.ref("#ab712e"),oe=[{start:338,end:23,cursor:"nw",type:EScaleInfoType.TopLeft},{start:23,end:68,cursor:"n",type:EScaleInfoType.TopCenter},{start:68,end:113,cursor:"ne",type:EScaleInfoType.TopRight},{start:293,end:338,cursor:"w",type:EScaleInfoType.Left},{start:113,end:158,cursor:"e",type:EScaleInfoType.Right},{start:248,end:293,cursor:"sw",type:EScaleInfoType.BottomLeft},{start:203,end:248,cursor:"s",type:EScaleInfoType.BottomCenter},{start:158,end:203,cursor:"se",type:EScaleInfoType.BottomRight}],re=(ae,le)=>{console.log("handMousedown",le);const{clientX:Ie,clientY:ue}=le;le.stopPropagation(),r.intention=EGlobalStoreIntention.Zoom;const de=Math.round((Ie-V.canvasInfo.left)/g.svg.scale-V.center_offset.x),Ne=Math.round((ue-V.canvasInfo.top)/g.svg.scale-V.center_offset.y);r.mouse_info={state:EMouseInfoState.Down,position_x:de,position_y:Ne,now_position_x:de,now_position_y:Ne,new_position_x:0,new_position_y:0},r.scale_info={type:ae,scale_times:{x:n.itemInfo.scale_x,y:n.itemInfo.scale_y},scale_item_info:{x:n.itemInfo.x,y:n.itemInfo.y},symmetric_point:{x:de+Math.abs(de-n.itemInfo.center_position.x)*2*(de>n.itemInfo.center_position.x?-1:1),y:Ne+Math.abs(Ne-n.itemInfo.center_position.y)*2*(Ne>n.itemInfo.center_position.y?-1:1)}}},Ce=ae=>{const{clientX:le,clientY:Ie}=ae,ue=Math.round((le-V.canvasInfo.left)/g.svg.scale-V.center_offset.x),de=Math.round((Ie-V.canvasInfo.top)/g.svg.scale-V.center_offset.y);ae.stopPropagation(),r.intention=EGlobalStoreIntention.Rotate,r.rotate_info={angle:n.itemInfo.rotate},r.mouse_info={state:EMouseInfoState.Down,position_x:ue,position_y:de,now_position_x:ue,now_position_y:de,new_position_x:0,new_position_y:0}},ie=ae=>{const le=(ae+n.itemInfo.rotate)%360,Ie=oe.find(ue=>ue.start<=le&&ue.end>le);return Ie?{cursor:Ie.cursor+"-resize",type:Ie.type}:{cursor:"nw-resize",type:EScaleInfoType.TopLeft}};return(ae,le)=>(vue.openBlock(),vue.createElementBlock("g",_hoisted_1$b,[vue.createElementVNode("rect",{id:"resize_tl",width:"8",height:"8",fill:vue.unref($),style:vue.normalizeStyle({cursor:ie(0).cursor,"vector-effect":"non-scaling-stroke"}),"pointer-events":"all",x:n.itemInfo.actual_bound.x-vue.unref(k)-vue.unref(getCoordinateOffset)(n.itemInfo.actual_bound.width,n.itemInfo.scale_x),y:n.itemInfo.actual_bound.y-vue.unref(k)-vue.unref(getCoordinateOffset)(n.itemInfo.actual_bound.height,n.itemInfo.scale_y),stroke:"rgba(0,0,0,0)",onMousedown:le[0]||(le[0]=Ie=>re(vue.unref(EScaleInfoType).TopLeft,Ie))},null,44,_hoisted_2$9),vue.createElementVNode("circle",{cx:n.itemInfo.actual_bound.x+n.itemInfo.actual_bound.width/2,cy:n.itemInfo.actual_bound.y-vue.unref(k)-vue.unref(getCoordinateOffset)(n.itemInfo.actual_bound.height,n.itemInfo.scale_y)-24,r:4,class:"rotate-circle",onMousedown:Ce},null,40,_hoisted_3$9),vue.createElementVNode("line",{x1:n.itemInfo.actual_bound.x+n.itemInfo.actual_bound.width/2,y1:n.itemInfo.actual_bound.y-vue.unref(k)-vue.unref(getCoordinateOffset)(n.itemInfo.actual_bound.height,n.itemInfo.scale_y),x2:n.itemInfo.actual_bound.x+n.itemInfo.actual_bound.width/2,y2:n.itemInfo.actual_bound.y-vue.unref(k)-vue.unref(getCoordinateOffset)(n.itemInfo.actual_bound.height,n.itemInfo.scale_y)-20,style:vue.normalizeStyle({stroke:vue.unref($),"stroke-width":2})},null,12,_hoisted_4$7),vue.createElementVNode("rect",{id:"resize_tc",width:"8",height:"8",fill:vue.unref($),style:vue.normalizeStyle({cursor:ie(45).cursor,"vector-effect":"non-scaling-stroke"}),"pointer-events":"all",x:n.itemInfo.actual_bound.x+n.itemInfo.actual_bound.width/2-vue.unref(k),y:n.itemInfo.actual_bound.y-vue.unref(k)-vue.unref(getCoordinateOffset)(n.itemInfo.actual_bound.height,n.itemInfo.scale_y),stroke:"rgba(0,0,0,0)",onMousedown:le[1]||(le[1]=Ie=>re(vue.unref(EScaleInfoType).TopCenter,Ie))},null,44,_hoisted_5$5),vue.createElementVNode("rect",{id:"resize_tr",width:"8",height:"8",fill:vue.unref($),style:vue.normalizeStyle({cursor:ie(90).cursor,"vector-effect":"non-scaling-stroke"}),"pointer-events":"all",x:n.itemInfo.actual_bound.x+n.itemInfo.actual_bound.width-vue.unref(k)+vue.unref(getCoordinateOffset)(n.itemInfo.actual_bound.width,n.itemInfo.scale_x),y:n.itemInfo.actual_bound.y-vue.unref(k)-vue.unref(getCoordinateOffset)(n.itemInfo.actual_bound.height,n.itemInfo.scale_y),stroke:"rgba(0,0,0,0)",onMousedown:le[2]||(le[2]=Ie=>re(vue.unref(EScaleInfoType).TopRight,Ie))},null,44,_hoisted_6$3),vue.createElementVNode("rect",{id:"resize_l",width:"8",height:"8",fill:vue.unref($),style:vue.normalizeStyle({cursor:ie(315).cursor,"vector-effect":"non-scaling-stroke"}),"pointer-events":"all",x:n.itemInfo.actual_bound.x-vue.unref(k)-vue.unref(getCoordinateOffset)(n.itemInfo.actual_bound.width,n.itemInfo.scale_x),y:n.itemInfo.actual_bound.y-vue.unref(k)+n.itemInfo.actual_bound.height*n.itemInfo.scale_y/2-vue.unref(getCoordinateOffset)(n.itemInfo.actual_bound.height,n.itemInfo.scale_y),stroke:"rgba(0,0,0,0)",onMousedown:le[3]||(le[3]=Ie=>re(vue.unref(EScaleInfoType).Left,Ie))},null,44,_hoisted_7$3),vue.createElementVNode("rect",{id:"resize_r",width:"8",height:"8",fill:vue.unref($),style:vue.normalizeStyle({cursor:ie(135).cursor,"vector-effect":"non-scaling-stroke"}),"pointer-events":"all",x:n.itemInfo.actual_bound.x-vue.unref(k)+n.itemInfo.actual_bound.width+vue.unref(getCoordinateOffset)(n.itemInfo.actual_bound.width,n.itemInfo.scale_x),y:n.itemInfo.actual_bound.y-vue.unref(k)+n.itemInfo.actual_bound.height*n.itemInfo.scale_y/2-vue.unref(getCoordinateOffset)(n.itemInfo.actual_bound.height,n.itemInfo.scale_y),stroke:"rgba(0,0,0,0)",onMousedown:le[4]||(le[4]=Ie=>re(vue.unref(EScaleInfoType).Right,Ie))},null,44,_hoisted_8$2),vue.createElementVNode("rect",{id:"resize_bl",width:"8",height:"8",fill:vue.unref($),style:vue.normalizeStyle({cursor:ie(270).cursor,"vector-effect":"non-scaling-stroke"}),"pointer-events":"all",x:n.itemInfo.actual_bound.x-vue.unref(k)-vue.unref(getCoordinateOffset)(n.itemInfo.actual_bound.width,n.itemInfo.scale_x),y:n.itemInfo.actual_bound.y-vue.unref(k)+n.itemInfo.actual_bound.height*n.itemInfo.scale_y-vue.unref(getCoordinateOffset)(n.itemInfo.actual_bound.height,n.itemInfo.scale_y),stroke:"rgba(0,0,0,0)",onMousedown:le[5]||(le[5]=Ie=>re(vue.unref(EScaleInfoType).BottomLeft,Ie))},null,44,_hoisted_9$2),vue.createElementVNode("rect",{id:"resize_bc",width:"8",height:"8",fill:vue.unref($),style:vue.normalizeStyle({cursor:ie(225).cursor,"vector-effect":"non-scaling-stroke"}),"pointer-events":"all",x:n.itemInfo.actual_bound.x-vue.unref(k)+n.itemInfo.actual_bound.width/2,y:n.itemInfo.actual_bound.y-vue.unref(k)+n.itemInfo.actual_bound.height+vue.unref(getCoordinateOffset)(n.itemInfo.actual_bound.height,n.itemInfo.scale_y),stroke:"rgba(0,0,0,0)",onMousedown:le[6]||(le[6]=Ie=>re(vue.unref(EScaleInfoType).BottomCenter,Ie))},null,44,_hoisted_10$1),vue.createElementVNode("rect",{id:"resize_br",width:"8",height:"8",fill:vue.unref($),style:vue.normalizeStyle({cursor:ie(180).cursor,"vector-effect":"non-scaling-stroke"}),"pointer-events":"all",x:n.itemInfo.actual_bound.x-vue.unref(k)+n.itemInfo.actual_bound.width+vue.unref(getCoordinateOffset)(n.itemInfo.actual_bound.width,n.itemInfo.scale_x),y:n.itemInfo.actual_bound.y-vue.unref(k)+n.itemInfo.actual_bound.height+vue.unref(getCoordinateOffset)(n.itemInfo.actual_bound.height,n.itemInfo.scale_y),stroke:"rgba(0,0,0,0)",onMousedown:le[7]||(le[7]=Ie=>re(vue.unref(EScaleInfoType).BottomRight,Ie))},null,44,_hoisted_11$1)]))}}),index_vue_vue_type_style_index_0_scoped_cbb58aff_lang="",HandlePanel=_export_sfc(_sfc_main$g,[["__scopeId","data-v-cbb58aff"]]),_hoisted_1$a=["fill"],_hoisted_2$8=["cx","cy","r"],_hoisted_3$8=["cx","cy","r"],_hoisted_4$6=["cx","cy","r"],_hoisted_5$4=["cx","cy","r"],_hoisted_6$2=["cx","cy","r"],_hoisted_7$2=["cx","cy","r"],_hoisted_8$1=["cx","cy","r"],_hoisted_9$1=["cx","cy","r"],_sfc_main$f=vue.defineComponent({__name:"index",props:{itemInfo:{}},setup(i){const n=i,r=vue.ref(4),g=vue.ref("#ab712e"),V=vue.ref(4),k=vue.ref(12),$=useGlobalStore(pinia),oe=vue.computed(()=>n.itemInfo.actual_bound.x+n.itemInfo.actual_bound.width/2-r.value+V.value),re=vue.computed(()=>n.itemInfo.actual_bound.y-r.value-getCoordinateOffset(n.itemInfo.actual_bound.height,n.itemInfo.scale_y)+V.value),Ce=vue.computed(()=>n.itemInfo.actual_bound.x-r.value+n.itemInfo.actual_bound.width+getCoordinateOffset(n.itemInfo.actual_bound.width,n.itemInfo.scale_x)+V.value),ie=vue.computed(()=>n.itemInfo.actual_bound.y-r.value+n.itemInfo.actual_bound.height*n.itemInfo.scale_y/2-getCoordinateOffset(n.itemInfo.actual_bound.height,n.itemInfo.scale_y)+V.value),ae=vue.computed(()=>n.itemInfo.actual_bound.x-r.value+n.itemInfo.actual_bound.width/2+V.value),le=vue.computed(()=>n.itemInfo.actual_bound.y-r.value+n.itemInfo.actual_bound.height+getCoordinateOffset(n.itemInfo.actual_bound.height,n.itemInfo.scale_y)+V.value),Ie=vue.computed(()=>n.itemInfo.actual_bound.x-r.value-getCoordinateOffset(n.itemInfo.actual_bound.width,n.itemInfo.scale_x)+V.value),ue=vue.computed(()=>n.itemInfo.actual_bound.y-r.value+n.itemInfo.actual_bound.height*n.itemInfo.scale_y/2-getCoordinateOffset(n.itemInfo.actual_bound.height,n.itemInfo.scale_y)+V.value),de=(Ne,he)=>{var pe;$.intention===EGlobalStoreIntention.None?createLine(Ne,he,n.itemInfo):$.intention===EGlobalStoreIntention.Connection&&(Ne.stopPropagation(),(pe=$.handle_svg_info)!=null&&pe.info.bind_anchors&&($.handle_svg_info.info.bind_anchors.end={type:he,target_id:n.itemInfo.id},$.intention=EGlobalStoreIntention.None,$.setHandleSvgInfo(null),vue.nextTick(function(){moveAnchors(n.itemInfo)})))};return(Ne,he)=>(vue.openBlock(),vue.createElementBlock("g",{style:{"vector-effect":"non-scaling-stroke"},class:"connect-points",fill:vue.unref(g),"stroke-width":"2",stroke:"rgba(0,0,0,0)"},[vue.createElementVNode("g",{onMousedown:he[0]||(he[0]=pe=>de(pe,vue.unref(ELineBindAnchors).TopCenter))},[vue.createElementVNode("circle",{class:"out-circle",cx:vue.unref(oe),cy:vue.unref(re),r:vue.unref(k),"fill-opacity":".3"},null,8,_hoisted_2$8),vue.createElementVNode("circle",{id:"connection_tc",cx:vue.unref(oe),cy:vue.unref(re),r:vue.unref(V),"pointer-events":"all"},null,8,_hoisted_3$8)],32),vue.createElementVNode("g",{onMousedown:he[1]||(he[1]=pe=>de(pe,vue.unref(ELineBindAnchors).Right))},[vue.createElementVNode("circle",{class:"out-circle",cx:vue.unref(Ce),cy:vue.unref(ie),r:vue.unref(k),"fill-opacity":".3"},null,8,_hoisted_4$6),vue.createElementVNode("circle",{id:"connection_r",cx:vue.unref(Ce),cy:vue.unref(ie),r:vue.unref(V),"pointer-events":"all"},null,8,_hoisted_5$4)],32),vue.createElementVNode("g",{onMousedown:he[2]||(he[2]=pe=>de(pe,vue.unref(ELineBindAnchors).BottomCenter))},[vue.createElementVNode("circle",{class:"out-circle",cx:vue.unref(ae),cy:vue.unref(le),r:vue.unref(k),"fill-opacity":".3"},null,8,_hoisted_6$2),vue.createElementVNode("circle",{id:"connection_bc",cx:vue.unref(ae),cy:vue.unref(le),r:vue.unref(V),"pointer-events":"all"},null,8,_hoisted_7$2)],32),vue.createElementVNode("g",{onMousedown:he[3]||(he[3]=pe=>de(pe,vue.unref(ELineBindAnchors).Left))},[vue.createElementVNode("circle",{class:"out-circle",cx:vue.unref(Ie),cy:vue.unref(ue),r:vue.unref(k),"fill-opacity":".3"},null,8,_hoisted_8$1),vue.createElementVNode("circle",{id:"connection_l",cx:vue.unref(Ie),cy:vue.unref(ue),r:vue.unref(V),style:{cursor:"crosshair"},"pointer-events":"all"},null,8,_hoisted_9$1)],32)],8,_hoisted_1$a))}}),index_vue_vue_type_style_index_0_scoped_8f6796a1_lang="",ConnectionPanel=_export_sfc(_sfc_main$f,[["__scopeId","data-v-8f6796a1"]]),_hoisted_1$9=["id","d","stroke","stroke-width","stroke-dasharray"],_hoisted_2$7=["from","to","dur","repeatCount"],_hoisted_3$7=["d","stroke","stroke-width","stroke-dasharray"],_hoisted_4$5=["from","to","dur","repeatCount"],_hoisted_5$3=["r","fill"],_hoisted_6$1=["path","dur","repeatCount"],_hoisted_7$1=["cx","cy","stroke","onMousedown"],_sfc_main$e=vue.defineComponent({__name:"index",props:{itemInfo:{},pointVisible:{type:Boolean,default:!1}},setup(i){const n=i,r=useGlobalStore(pinia),g=useConfigStore(pinia),V=useSvgEditLayoutStore(pinia),k=($,oe,re,Ce)=>{if(r.intention===EGlobalStoreIntention.Connection)return;r.setHandleSvgInfo(n.itemInfo);const{clientX:ie,clientY:ae}=oe;oe.stopPropagation(),r.connection_line_node_info={init_pos:{x:re,y:Ce},point_index:$},r.intention=EGlobalStoreIntention.SetConnectionLineNode,r.mouse_info={state:EMouseInfoState.Down,position_x:Math.round((ie-V.canvasInfo.left)/g.svg.scale),position_y:Math.round((ae-V.canvasInfo.top)/g.svg.scale),now_position_x:0,now_position_y:0,new_position_x:0,new_position_y:0}};return($,oe)=>{var re,Ce,ie,ae,le;return vue.openBlock(),vue.createElementBlock("g",null,[vue.createElementVNode("path",{id:n.itemInfo.id,d:vue.unref(positionArrToPath)(n.itemInfo.props.point_position.val),fill:"none",stroke:((re=n.itemInfo.animations)==null?void 0:re.type.val)===vue.unref(EConfigAnimationsType).Electricity?n.itemInfo.animations.color.val:n.itemInfo.props.stroke.val,"stroke-width":n.itemInfo.props["stroke-width"].val,style:vue.normalizeStyle({cursor:vue.unref(r).intention===vue.unref(EGlobalStoreIntention).Connection?"crosshair":"move"}),"stroke-dashoffset":"0","stroke-dasharray":((Ce=n.itemInfo.animations)==null?void 0:Ce.type.val)===vue.unref(EConfigAnimationsType).Electricity?n.itemInfo.props["stroke-width"].val*3:0},[((ie=n.itemInfo.animations)==null?void 0:ie.type.val)===vue.unref(EConfigAnimationsType).Electricity?(vue.openBlock(),vue.createElementBlock("animate",{key:0,attributeName:"stroke-dashoffset",from:n.itemInfo.animations.reverse.val?0:1e3,to:n.itemInfo.animations.reverse.val?1e3:0,dur:`${n.itemInfo.animations.dur.val}s`,repeatCount:n.itemInfo.animations.repeatCount.val},null,8,_hoisted_2$7)):vue.createCommentVNode("",!0)],12,_hoisted_1$9),((ae=n.itemInfo.animations)==null?void 0:ae.type.val)===vue.unref(EConfigAnimationsType).WaterDrop?(vue.openBlock(),vue.createElementBlock("path",{key:0,d:vue.unref(positionArrToPath)(n.itemInfo.props.point_position.val),fill:"none","fill-opacity":"0",stroke:n.itemInfo.animations.color.val,"stroke-width":n.itemInfo.props["stroke-width"].val,"stroke-dasharray":n.itemInfo.props["stroke-width"].val*3,"stroke-dashoffset":"0","stroke-linecap":"round"},[vue.createElementVNode("animate",{attributeName:"stroke-dashoffset",from:n.itemInfo.animations.reverse.val?0:1e3,to:n.itemInfo.animations.reverse.val?1e3:0,dur:`${n.itemInfo.animations.dur.val}s`,repeatCount:n.itemInfo.animations.repeatCount.val,fill:"freeze"},null,8,_hoisted_4$5)],8,_hoisted_3$7)):((le=n.itemInfo.animations)==null?void 0:le.type.val)===vue.unref(EConfigAnimationsType).Track?(vue.openBlock(),vue.createElementBlock("circle",{key:1,cx:"0",cy:"0",r:n.itemInfo.props["stroke-width"].val*2,fill:n.itemInfo.animations.color.val},[vue.createElementVNode("animateMotion",{path:vue.unref(positionArrToPath)(n.itemInfo.animations.reverse.val?[...n.itemInfo.props.point_position.val].reverse():n.itemInfo.props.point_position.val),dur:`${n.itemInfo.animations.dur.val}s`,repeatCount:n.itemInfo.animations.repeatCount.val},null,8,_hoisted_6$1)],8,_hoisted_5$3)):vue.createCommentVNode("",!0),vue.createElementVNode("g",null,[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(n.itemInfo.props.point_position.val,(Ie,ue)=>(vue.openBlock(),vue.createElementBlock("circle",{key:ue,cx:Ie.x,cy:Ie.y,r:"6","stroke-width":"1",stroke:n.itemInfo.props.stroke.val,fill:"#fff",style:{cursor:"pointer"},onMousedown:de=>k(ue,de,Ie.x,Ie.y)},null,40,_hoisted_7$1))),128))])])}}}),_hoisted_1$8={id:"pattern_grid",patternUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20"},_hoisted_2$6=["stroke"],_hoisted_3$6=["stroke"],_hoisted_4$4=["stroke"],_hoisted_5$2=["stroke"],_hoisted_6={key:0,width:"100%",height:"100%",fill:"url(#pattern_grid)"},_hoisted_7=["transform"],_hoisted_8=["transform"],_hoisted_9=["transform","onMousedown","onMouseup","onMouseenter","onMouseleave","onContextmenu"],_hoisted_10=["xlink:href","id","transform"],_hoisted_11=["id"],_hoisted_12=["id","x1","y1","x2","y2"],_hoisted_13=["id"],_hoisted_14=["x","y","height","width"],_hoisted_15=["onClick"],_hoisted_16={class:"shortcut"},_sfc_main$d=vue.defineComponent({__name:"index",setup(i){vue.useCssVars(jt=>({"7007d8eb":ie.value}));const n=vue.getCurrentInstance();Object.keys(vueComp).forEach(jt=>{var ti;Object.keys((ti=n==null?void 0:n.appContext)==null?void 0:ti.components).includes(jt)||n==null||n.appContext.app.component(jt,vueComp[jt])});const r=useGlobalStore(pinia),g=useConfigStore(pinia),V=useSvgEditLayoutStore(pinia),k=useEditPrivateStore(pinia),$=useContextMenuStore(pinia),oe=vue.ref(),re=vue.ref(),Ce={MoveCanvas:"grab",Rotate:"url('/src/assets/icons/rotate.svg'), auto",Connection:"crosshair"},ie=vue.computed(()=>Object.keys(Ce).indexOf(r.intention)>-1?Ce[r.intention]:"default"),ae=vue.reactive({handle_panel:vue.computed(()=>r.intention===EGlobalStoreIntention.Select||r.intention===EGlobalStoreIntention.Zoom||r.intention===EGlobalStoreIntention.Rotate),connection_panel:!1,connection_line:!1,select_item:{info:null,index:-1}}),le=vue.ref({a:{x:0,y:0},b:{x:0,y:0}}),Ie=vue.computed(()=>r.intention===EGlobalStoreIntention.SelectArea&&le.value.b.x&&le.value.b.y?{with:Math.abs(le.value.b.x-le.value.a.x),height:Math.abs(le.value.b.y-le.value.a.y),x:le.value.a.x<le.value.b.x?le.value.a.x:le.value.b.x,y:le.value.a.y<le.value.b.y?le.value.a.y:le.value.b.y}:{with:0,height:0,x:0,y:0}),ue=vue.computed(()=>{let jt=0;for(let ti of r.done_json)ti.selected&&jt++;return jt>0});let de=!1;const Ne=jt=>{var ti;if(r.intention!=EGlobalStoreIntention.None){if(r.intention==EGlobalStoreIntention.Create){if(!r.create_svg_info){console.error("要创建的数据获取失败");return}const Lt=Math.floor(jt.offsetX/g.svg.scale-V.center_offset.x),Pt=Math.floor(jt.offsetY/g.svg.scale-V.center_offset.y),ni={id:randomString(),x:Lt,y:Pt,client:{x:Lt,y:Pt},scale_x:1,scale_y:1,rotate:0,actual_bound:{x:0,y:0,width:0,height:0},center_position:{x:0,y:0},point_coordinate:{tl:{x:0,y:0},tc:{x:0,y:0},tr:{x:0,y:0},l:{x:0,y:0},r:{x:0,y:0},bl:{x:0,y:0},bc:{x:0,y:0},br:{x:0,y:0}},selected:!1,...objectDeepClone(r.create_svg_info)};r.setDoneJson(ni),r.setHandleSvgInfo(ni,r.done_json.length),r.intention=EGlobalStoreIntention.None}(ti=re.value)==null||ti.focus()}},he=jt=>{jt.preventDefault()},pe=jt=>{jt.preventDefault()},ze=(jt,ti,Lt)=>{var Pt,ni;if((Pt=re.value)==null||Pt.focus(),r.intention!==EGlobalStoreIntention.Connection)if(Lt.preventDefault(),Lt.stopPropagation(),Lt.ctrlKey&&Lt.button===0)(ni=r.handle_svg_info)!=null&&ni.index&&(r.done_json[r.handle_svg_info.index].selected=!0,r.setHandleSvgInfo(null),jt.selected=!jt.selected);else if(ue.value){r.intention=EGlobalStoreIntention.GroupMove,r.mouse_info={state:EMouseInfoState.Down,position_x:Math.round((Lt.clientX-V.canvasInfo.left)/g.svg.scale),position_y:Math.round((Lt.clientY-V.canvasInfo.top)/g.svg.scale),now_position_x:0,now_position_y:0,new_position_x:0,new_position_y:0};for(let ri of r.done_json)ri.selected&&(ri.old_position={x:ri.x,y:ri.y},ri.point_coordinate_old=objectDeepClone(ri.point_coordinate))}else r.intention=EGlobalStoreIntention.Select,r.setHandleSvgInfo(jt,ti),r.mouse_info={state:EMouseInfoState.Down,position_x:Math.round((Lt.clientX-V.canvasInfo.left)/g.svg.scale),position_y:Math.round((Lt.clientY-V.canvasInfo.top)/g.svg.scale),now_position_x:jt.x,now_position_y:jt.y,new_position_x:0,new_position_y:0},jt.point_coordinate_old=objectDeepClone(jt.point_coordinate)},xe=(jt,ti,Lt)=>{if(!(r.intention===EGlobalStoreIntention.Connection||r.mouse_info.state!=EMouseInfoState.Down)&&ue.value&&!de&&["SelectArea","Move","Select"].indexOf(r.intention)<0){for(let Pt of r.done_json)Pt.selected=!1,Pt.old_position={x:0,y:0},resetHandlePointOld(Pt);r.intention=EGlobalStoreIntention.Select,r.setHandleSvgInfo(jt,ti),r.mouse_info={state:EMouseInfoState.Down,position_x:Math.round((Lt.clientX-V.canvasInfo.left)/g.svg.scale),position_y:Math.round((Lt.clientY-V.canvasInfo.top)/g.svg.scale),now_position_x:jt.x,now_position_y:jt.y,new_position_x:0,new_position_y:0}}},Oe=(jt,ti,Lt)=>{Lt.preventDefault(),Lt.stopPropagation(),ae.connection_panel=!0,ae.connection_line=!0,!((r.intention===EGlobalStoreIntention.Connection||r.intention===EGlobalStoreIntention.SetConnectionLineNode)&&jt.type===EDoneJsonType.ConnectionLine)&&(ae.select_item.info=jt,ae.select_item.index=ti)},_e=(jt,ti,Lt)=>{Lt.preventDefault(),Lt.stopPropagation(),!((r.intention===EGlobalStoreIntention.Connection||r.intention===EGlobalStoreIntention.SetConnectionLineNode)&&jt.type===EDoneJsonType.ConnectionLine)&&(ae.connection_panel=!1,ae.connection_line=!1,ae.select_item.info=null,ae.select_item.index=-1)},At=jt=>{var ri,ui,Ci,gi,di,hi,ci,Ai,yi,wi,li;if(r.mouse_info.state!=EMouseInfoState.Down&&r.intention!==EGlobalStoreIntention.Connection)return;const{clientX:ti,clientY:Lt}=jt;r.mouse_info.new_position_x=Math.round((ti-V.canvasInfo.left)/g.svg.scale),r.mouse_info.new_position_y=Math.round((Lt-V.canvasInfo.top)/g.svg.scale);const Pt=Math.round(r.mouse_info.new_position_x-r.mouse_info.position_x+r.mouse_info.now_position_x),ni=Math.round(r.mouse_info.new_position_y-r.mouse_info.position_y+r.mouse_info.now_position_y);if((ri=r.handle_svg_info)!=null&&ri.info&&(r.intention===EGlobalStoreIntention.Select||r.intention===EGlobalStoreIntention.Move)){if(r.handle_svg_info.info.x=Pt,r.handle_svg_info.info.y=ni,r.handle_svg_info.info.client={x:Pt,y:ni},r.intention=EGlobalStoreIntention.Move,moveHandlePoint(r.handle_svg_info.info),moveAnchors(r.handle_svg_info.info),r.handle_svg_info.info.type===EDoneJsonType.ConnectionLine){if((ui=r.handle_svg_info.info.bind_anchors)!=null&&ui.start){let fi=null;for(let Mi of r.done_json)Mi.id===((gi=(Ci=r.handle_svg_info.info.bind_anchors)==null?void 0:Ci.start)==null?void 0:gi.target_id)&&(fi=Mi);fi&&moveAnchors(fi)}if((di=r.handle_svg_info.info.bind_anchors)!=null&&di.end){let fi=null;for(let Mi of r.done_json)Mi.id===((ci=(hi=r.handle_svg_info.info.bind_anchors)==null?void 0:hi.end)==null?void 0:ci.target_id)&&(fi=Mi);fi&&moveAnchors(fi)}}}else if(r.intention===EGlobalStoreIntention.MoveCanvas)V.center_offset.x=Pt,V.center_offset.y=ni;else if(r.intention===EGlobalStoreIntention.SelectArea)le.value.b.x=r.mouse_info.new_position_x-V.center_offset.x,le.value.b.y=r.mouse_info.new_position_y-V.center_offset.y;else if(r.intention===EGlobalStoreIntention.GroupMove){de=!0;for(let fi of r.done_json)if(fi.selected&&fi.old_position){const Mi=Math.round(r.mouse_info.new_position_x-r.mouse_info.position_x+fi.old_position.x),Ni=Math.round(r.mouse_info.new_position_y-r.mouse_info.position_y+fi.old_position.y);if(fi.x=Mi,fi.y=Ni,fi.client={x:Mi,y:Ni},moveHandlePoint(fi),moveAnchors(fi),fi.type===EDoneJsonType.ConnectionLine&&((Ai=fi.bind_anchors)!=null&&Ai.end)){let pi=null;for(let vi of r.done_json)vi.id===((wi=(yi=fi.bind_anchors)==null?void 0:yi.end)==null?void 0:wi.target_id)&&(pi=vi);pi&&moveAnchors(pi)}}}else if(r.intention===EGlobalStoreIntention.Zoom){if(!r.handle_svg_info)return;const fi={x:r.mouse_info.new_position_x-V.center_offset.x,y:r.mouse_info.new_position_y-V.center_offset.y};let Mi={width:0,height:0,is_old_width:!1,is_old_height:!1};if(r.scale_info.type===EScaleInfoType.TopLeft?Mi=calculateLeftTop(fi,r.scale_info.symmetric_point,r.handle_svg_info.info.rotate):r.scale_info.type===EScaleInfoType.TopRight?Mi=calculateRightTop(fi,r.scale_info.symmetric_point,r.handle_svg_info.info.rotate):r.scale_info.type===EScaleInfoType.BottomRight?Mi=calculateRightBottom(fi,r.scale_info.symmetric_point,r.handle_svg_info.info.rotate):r.scale_info.type===EScaleInfoType.BottomLeft?Mi=calculateLeftBottom(fi,r.scale_info.symmetric_point,r.handle_svg_info.info.rotate):r.scale_info.type===EScaleInfoType.TopCenter?Mi=calculateTop(fi,r.scale_info.symmetric_point,r.handle_svg_info.info.rotate,r.handle_svg_info.info.client):r.scale_info.type===EScaleInfoType.Right?Mi=calculateRight(fi,r.scale_info.symmetric_point,r.handle_svg_info.info.rotate,r.handle_svg_info.info.client):r.scale_info.type===EScaleInfoType.BottomCenter?Mi=calculateBottom(fi,r.scale_info.symmetric_point,r.handle_svg_info.info.rotate,r.handle_svg_info.info.client):r.scale_info.type===EScaleInfoType.Left&&(Mi=calculateLeft(fi,r.scale_info.symmetric_point,r.handle_svg_info.info.rotate,r.handle_svg_info.info.client)),r.handle_svg_info&&Mi.width>0&&Mi.height>0){const Ni=Mi.is_old_width?1:parseFloat((Mi.width/r.handle_svg_info.info.actual_bound.width).toFixed(3)),pi=Mi.is_old_height?1:parseFloat((Mi.height/r.handle_svg_info.info.actual_bound.height).toFixed(3)),vi=getCenterPoint(fi,r.scale_info.symmetric_point);Ni>0&&r.scale_info.type!==EScaleInfoType.TopCenter&&r.scale_info.type!==EScaleInfoType.BottomCenter&&(r.handle_svg_info.info.scale_x=Ni,r.handle_svg_info.info.x=Math.round(getSvgNowPosition(r.handle_svg_info.info.center_position.x,vi.x,r.handle_svg_info.info.client.x))),pi>0&&r.scale_info.type!==EScaleInfoType.Left&&r.scale_info.type!==EScaleInfoType.Right&&(r.handle_svg_info.info.scale_y=pi,r.handle_svg_info.info.y=Math.round(getSvgNowPosition(r.handle_svg_info.info.center_position.y,vi.y,r.handle_svg_info.info.client.y)))}}else if(r.intention===EGlobalStoreIntention.Rotate){if(!r.handle_svg_info)return;const fi=Math.atan2(r.mouse_info.position_y-r.handle_svg_info.info.y,r.mouse_info.position_x-r.handle_svg_info.info.x)/(Math.PI/180),Mi=Math.atan2(r.mouse_info.new_position_y-V.center_offset.y-r.handle_svg_info.info.y,r.mouse_info.new_position_x-V.center_offset.x-r.handle_svg_info.info.x)/(Math.PI/180);r.handle_svg_info.info.rotate=parseFloat((r.rotate_info.angle+Mi-fi).toFixed(2))}else if(r.intention===EGlobalStoreIntention.Connection&&r.handle_svg_info){const fi=(li=r.handle_svg_info)==null?void 0:li.info.props.point_position.val.length,Mi=r.mouse_info.new_position_x-r.mouse_info.position_x-V.center_offset.x,Ni=r.mouse_info.new_position_y-r.mouse_info.position_y-V.center_offset.y,pi=r.handle_svg_info.info.props.point_position.val[fi-2];let vi=pi.x<Mi?-5:pi.x>Mi?5:0,bi=pi.y<Ni?-5:pi.y>Ni?5:0;jt.ctrlKey?r.handle_svg_info.info.props.point_position.val[fi-1]={x:pi.x,y:Ni+bi}:jt.shiftKey?r.handle_svg_info.info.props.point_position.val[fi-1]={x:Mi+vi,y:pi.y}:r.handle_svg_info.info.props.point_position.val[fi-1]={x:Mi+vi,y:Ni+bi}}else r.intention===EGlobalStoreIntention.SetConnectionLineNode&&r.handle_svg_info&&(r.handle_svg_info.info.props.point_position.val[r.connection_line_node_info.point_index]={x:getSvgNowPosition(r.mouse_info.position_x,r.mouse_info.new_position_x,r.connection_line_node_info.init_pos.x),y:getSvgNowPosition(r.mouse_info.position_y,r.mouse_info.new_position_y,r.connection_line_node_info.init_pos.y)})},$e=()=>{var jt,ti,Lt;if(r.mouse_info.state==EMouseInfoState.Down){if((jt=r.handle_svg_info)!=null&&jt.info&&r.intention==EGlobalStoreIntention.Move)setSvgActualInfo(r.done_json[r.handle_svg_info.index]),r.intention=EGlobalStoreIntention.None,r.setDoneJson(r.done_json);else if(r.intention==EGlobalStoreIntention.GroupMove)de&&(de=!1,r.intention=EGlobalStoreIntention.None);else if((ti=r.handle_svg_info)!=null&&ti.info&&r.intention==EGlobalStoreIntention.Zoom)r.handle_svg_info.info.client={x:r.handle_svg_info.info.x,y:r.handle_svg_info.info.y},r.intention=EGlobalStoreIntention.None,setSvgActualInfo(r.done_json[r.handle_svg_info.index]),r.setDoneJson(r.done_json);else if(r.intention===EGlobalStoreIntention.Rotate&&((Lt=r.handle_svg_info)!=null&&Lt.info))setSvgActualInfo(r.done_json[r.handle_svg_info.index]),r.setDoneJson(r.done_json),r.intention=EGlobalStoreIntention.None;else{if(r.intention===EGlobalStoreIntention.Connection)return;if(r.intention===EGlobalStoreIntention.SelectArea){r.setHandleSvgInfo(null);for(let Pt of r.done_json){const ni=Ie.value;Pt.selected=Pt.x>ni.x&&Pt.x<ni.x+ni.with&&Pt.y>ni.y&&Pt.y<ni.y+ni.height}r.intention=EGlobalStoreIntention.None}else r.intention!=EGlobalStoreIntention.Select&&(r.intention=EGlobalStoreIntention.None)}r.mouse_info={state:EMouseInfoState.Up,position_x:0,position_y:0,now_position_x:0,now_position_y:0,new_position_x:0,new_position_y:0},$.display=!1}},Fe=jt=>{const{clientX:ti,clientY:Lt}=jt;if(r.intention===EGlobalStoreIntention.Connection){r.handle_svg_info||createLine(jt),r.handle_svg_info&&(jt.button===0?r.handle_svg_info.info.props.point_position.val.length!==1?r.handle_svg_info.info.props.point_position.val.push({x:r.mouse_info.new_position_x-r.mouse_info.position_x-V.center_offset.x,y:r.mouse_info.new_position_y-r.mouse_info.position_y-V.center_offset.y}):r.handle_svg_info.info.props.point_position.val.push({x:0,y:0}):jt.button===2&&(r.intention=EGlobalStoreIntention.None,setSvgActualInfo(r.done_json[r.handle_svg_info.index]),r.setHandleSvgInfo(null)));return}jt.button===0?(r.intention=EGlobalStoreIntention.SelectArea,r.mouse_info={state:EMouseInfoState.Down,position_x:Math.round((ti-V.canvasInfo.left)/g.svg.scale-V.center_offset.x),position_y:Math.round((Lt-V.canvasInfo.top)/g.svg.scale-V.center_offset.y),now_position_x:0,now_position_y:0,new_position_x:0,new_position_y:0},le.value={a:{x:r.mouse_info.position_x,y:r.mouse_info.position_y},b:{x:0,y:0}}):jt.button===2&&(r.intention=EGlobalStoreIntention.MoveCanvas,r.mouse_info={state:EMouseInfoState.Down,position_x:Math.round((ti-V.canvasInfo.left)/g.svg.scale),position_y:Math.round((Lt-V.canvasInfo.top)/g.svg.scale),now_position_x:V.center_offset.x,now_position_y:V.center_offset.y,new_position_x:0,new_position_y:0})};function Ue(jt){jt!=null&&jt.wheelDelta&&(jt.wheelDelta>0?g.svg.scale=parseFloat((g.svg.scale+.1).toFixed(1)):g.svg.scale=parseFloat((g.svg.scale-.1).toFixed(1)))}const Ve=jt=>{jt.stopPropagation(),jt.preventDefault()},Dt=(jt,ti,Lt)=>{r.intention!==EGlobalStoreIntention.Connection&&oe.value&&(r.intention=EGlobalStoreIntention.ContextMenu,r.setHandleSvgInfo(jt,ti),oe.value.style.left=Lt.pageX+"px",oe.value.style.top=Lt.pageY+"px",$.info.MoveUpOneLevel.enable=$.info.MoveUpTopLevel.enable=$.info.MoveDownOneLevel.enable=$.info.MoveDownTopLevel.enable=!0,ti===r.done_json.length-1&&($.info.MoveUpOneLevel.enable=$.info.MoveUpTopLevel.enable=!1),ti===0&&($.info.MoveDownOneLevel.enable=$.info.MoveDownTopLevel.enable=!1),$.display=!0)},qe=(jt,ti,Lt)=>({x:parseFloat((jt.x-jt.width/2*ti+jt.width/2).toFixed(1)),y:parseFloat((jt.y-jt.height/2*Lt+jt.height/2).toFixed(1)),width:parseFloat((jt.width*ti).toFixed(1)),height:parseFloat((jt.height*Lt).toFixed(1))}),kt=jt=>{jt.preventDefault();let ti=[];if(!jt.ctrlKey&&["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].indexOf(jt.key)>-1&&(ue.value?ti=r.done_json.map((Lt,Pt)=>({selected:Lt.selected,i:Pt})).filter(Lt=>Lt.selected).map(Lt=>Lt.i):r.handle_svg_info&&ti.push(r.handle_svg_info.index)),!jt.ctrlKey&&jt.key=="ArrowUp"){for(let Lt of ti)r.done_json[Lt].y-=1,r.done_json[Lt].client.y-=1,moveHandlePoint(r.done_json[Lt],0,-1),moveAnchors(r.done_json[Lt]);useHistoryRecord(r.done_json)}else if(!jt.ctrlKey&&jt.key=="ArrowDown"){for(let Lt of ti)r.done_json[Lt].y+=1,r.done_json[Lt].client.y+=1,moveHandlePoint(r.done_json[Lt],0,1),moveAnchors(r.done_json[Lt]);useHistoryRecord(r.done_json)}else if(!jt.ctrlKey&&jt.key=="ArrowLeft"){for(let Lt of ti)r.done_json[Lt].x-=1,r.done_json[Lt].client.x-=1,moveHandlePoint(r.done_json[Lt],-1,0),moveAnchors(r.done_json[Lt]);useHistoryRecord(r.done_json)}else if(!jt.ctrlKey&&jt.key=="ArrowRight"){for(let Lt of ti)r.done_json[Lt].x+=1,r.done_json[Lt].client.x+=1,moveHandlePoint(r.done_json[Lt],1,0),moveAnchors(r.done_json[Lt]);useHistoryRecord(r.done_json)}else jt.ctrlKey&&jt.key.toLowerCase()=="c"?$.onContextMenuClick(EContextMenuInfoType.Copy):!jt.ctrlKey&&jt.key=="Delete"?ue.value?(r.setDoneJson(r.done_json.filter(Lt=>!Lt.selected)),r.setHandleSvgInfo(r.done_json[r.done_json.length-1],r.done_json.length-1)):$.onContextMenuClick(EContextMenuInfoType.Delete):jt.ctrlKey&&jt.key=="ArrowUp"?$.onContextMenuClick(EContextMenuInfoType.MoveUpOneLevel):jt.ctrlKey&&jt.key=="ArrowDown"?$.onContextMenuClick(EContextMenuInfoType.MoveDownOneLevel):jt.ctrlKey&&jt.key=="ArrowLeft"?$.onContextMenuClick(EContextMenuInfoType.MoveDownTopLevel):jt.ctrlKey&&jt.key=="ArrowRight"?$.onContextMenuClick(EContextMenuInfoType.MoveUpTopLevel):jt.ctrlKey&&jt.shiftKey&&jt.key.toLowerCase()=="z"?k.topRedoBtnClick():jt.ctrlKey&&jt.key.toLowerCase()=="z"?k.topUndoBtnClick():jt.ctrlKey&&jt.key.toLowerCase()=="delete"&&(r.done_json.length<=0||r.setDoneJson([]))},Et=()=>{setSvgActualInfo(r.done_json[r.handle_svg_info.index],!0)};return vue.onMounted(()=>{var jt;(jt=re.value)==null||jt.focus(),vue.nextTick(function(){var Lt;const ti=(Lt=re.value)==null?void 0:Lt.getBoundingClientRect();V.canvasInfo={height:(ti==null?void 0:ti.height)||0,with:(ti==null?void 0:ti.width)||0,top:(ti==null?void 0:ti.top)||0,left:(ti==null?void 0:ti.left)||0}})}),(jt,ti)=>(vue.openBlock(),vue.createElementBlock(vue.Fragment,null,[vue.createElementVNode("div",{class:"canvas",tabindex:"0",ref_key:"canvasRef",ref:re,onDrop:Ne,onDragenter:he,onDragover:pe,onMousedown:Fe,onMousemove:At,onMouseup:$e,onContextmenu:Ve,onKeydown:kt,onMousewheel:Ue},[(vue.openBlock(),vue.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",style:vue.normalizeStyle({backgroundColor:vue.unref(g).svg.background_color}),width:"100%",height:"100%"},[vue.createElementVNode("defs",null,[vue.createElementVNode("pattern",_hoisted_1$8,[vue.createElementVNode("line",{x1:"0",y1:"0",x2:"0",y2:"20",stroke:vue.unref(g).svg.grid_color},null,8,_hoisted_2$6),vue.createElementVNode("line",{x1:"10",y1:"0",x2:"10",y2:"20",stroke:vue.unref(g).svg.grid_color},null,8,_hoisted_3$6),vue.createElementVNode("line",{x1:"0",y1:"0",x2:"20",y2:"0",stroke:vue.unref(g).svg.grid_color},null,8,_hoisted_4$4),vue.createElementVNode("line",{x1:"0",y1:"10",x2:"20",y2:"10",stroke:vue.unref(g).svg.grid_color},null,8,_hoisted_5$2)])]),vue.unref(g).svg.grid?(vue.openBlock(),vue.createElementBlock("rect",_hoisted_6)):vue.createCommentVNode("",!0),vue.createElementVNode("g",{transform:`translate(${vue.unref(V).center_offset.x*vue.unref(g).svg.scale},${vue.unref(V).center_offset.y*vue.unref(g).svg.scale})rotate(0)scale(${vue.unref(g).svg.scale})`},[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(r).done_json,(Lt,Pt)=>{var ni,ri,ui,Ci,gi,di;return vue.withDirectives((vue.openBlock(),vue.createElementBlock("g",{key:Lt.id,transform:`translate(${Lt.x},${Lt.y})rotate(0)scale(1)`},[vue.createElementVNode("g",{class:vue.normalizeClass(`${vue.unref(getCommonClass)(Lt)}`)},[vue.createElementVNode("g",{transform:`translate(${Lt.actual_bound.x+Lt.actual_bound.width/2},${Lt.actual_bound.y+Lt.actual_bound.height/2})rotate(${Lt.rotate}) scale(1) translate(${-(Lt.actual_bound.x+Lt.actual_bound.width/2)},${-(Lt.actual_bound.y+Lt.actual_bound.height/2)})`,onMousedown:hi=>ze(Lt,Pt,hi),onMouseup:hi=>xe(Lt,Pt,hi),onMouseenter:hi=>Oe(Lt,Pt,hi),onMouseleave:hi=>_e(Lt,Pt,hi),onContextmenu:hi=>Dt(Lt,Pt,hi)},[Lt.type===vue.unref(EDoneJsonType).ConnectionLine?(vue.openBlock(),vue.createBlock(_sfc_main$e,{key:0,"item-info":Lt,"point-visible":vue.unref(ae).connection_line&&((ni=vue.unref(ae).select_item.info)==null?void 0:ni.id)==Lt.id},null,8,["item-info","point-visible"])):Lt.type===vue.unref(EDoneJsonType).File?(vue.openBlock(),vue.createElementBlock("use",vue.mergeProps({key:1,"xlink:href":`#svg-${Lt.name}`},vue.unref(prosToVBind)(Lt),{width:"100",height:"100",id:Lt.id,transform:`translate(${Lt.actual_bound.x+Lt.actual_bound.width/2},${Lt.actual_bound.y+Lt.actual_bound.height/2}) scale(${Lt.scale_x},${Lt.scale_y}) translate(${-(Lt.actual_bound.x+Lt.actual_bound.width/2)},${-(Lt.actual_bound.y+Lt.actual_bound.height/2)})`}),null,16,_hoisted_10)):Lt.type===vue.unref(EDoneJsonType).CustomSvg?(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(Lt.tag),vue.mergeProps({key:2},vue.unref(prosToVBind)(Lt),{width:"100",height:"100",id:Lt.id,onResize:Et,transform:`translate(${Lt.actual_bound.x+Lt.actual_bound.width/2},${Lt.actual_bound.y+Lt.actual_bound.height/2}) scale(${Lt.scale_x},${Lt.scale_y}) translate(${-(Lt.actual_bound.x+Lt.actual_bound.width/2)},${-(Lt.actual_bound.y+Lt.actual_bound.height/2)})`}),null,16,["id","transform"])):Lt.type===vue.unref(EDoneJsonType).Vue?(vue.openBlock(),vue.createElementBlock("foreignObject",vue.mergeProps({key:3},qe(Lt.actual_bound,Lt.scale_x,Lt.scale_y),{id:`foreign-object${Lt.id}`}),[(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(Lt.tag),vue.mergeProps(vue.unref(prosToVBind)(Lt),{id:Lt.id,transform:`translate(${Lt.actual_bound.x+Lt.actual_bound.width/2},${Lt.actual_bound.y+Lt.actual_bound.height/2}) scale(${Lt.scale_x},${Lt.scale_y}) translate(${-(Lt.actual_bound.x+Lt.actual_bound.width/2)},${-(Lt.actual_bound.y+Lt.actual_bound.height/2)})`}),{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(Lt.tag_slot),1)]),_:2},1040,["id","transform"]))],16,_hoisted_11)):Lt.type===vue.unref(EDoneJsonType).StraightLine?(vue.openBlock(),vue.createElementBlock("line",{key:4,id:Lt.id,x1:Lt.props.start_x.val,y1:Lt.props.start_y.val,x2:Lt.props.end_x.val,y2:Lt.props.end_y.val,fill:"#FF0000",stroke:"#FF0000","stroke-width":"2"},null,8,_hoisted_12)):vue.createCommentVNode("",!0),Lt.config.actual_rect?(vue.openBlock(),vue.createElementBlock("rect",vue.mergeProps({key:5,id:`rect${Lt.id}`,fill:"black","fill-opacity":"0"},qe(Lt.actual_bound,Lt.scale_x,Lt.scale_y),{style:{stroke:"none","stroke-width":"2","stroke-miterlimit":"10"},class:{"svg-item-none":!Lt.selected&&(vue.unref(r).intention==vue.unref(EGlobalStoreIntention).None||vue.unref(r).intention==vue.unref(EGlobalStoreIntention).Select),"svg-item-move":vue.unref(r).intention==vue.unref(EGlobalStoreIntention).Move&&((ri=vue.unref(r).handle_svg_info)==null?void 0:ri.info.id)==Lt.id,"svg-item-select":vue.unref(r).intention==vue.unref(EGlobalStoreIntention).Select&&((ui=vue.unref(r).handle_svg_info)==null?void 0:ui.info.id)==Lt.id,"svg-item-in-group":Lt.selected}}),null,16,_hoisted_13)):vue.createCommentVNode("",!0),((Ci=vue.unref(r).handle_svg_info)==null?void 0:Ci.info.id)===Lt.id&&vue.unref(ae).handle_panel&&Lt.config.can_zoom?(vue.openBlock(),vue.createBlock(HandlePanel,{key:6,"item-info":Lt},null,8,["item-info"])):vue.createCommentVNode("",!0),!Lt.selected&&((gi=vue.unref(ae).select_item.info)==null?void 0:gi.id)==Lt.id&&vue.unref(ae).connection_panel&&Lt.config.have_anchor&&vue.unref(r).intention!==vue.unref(EGlobalStoreIntention).SelectArea&&(vue.unref(r).intention!==vue.unref(EGlobalStoreIntention).Select||Lt.id!==((di=vue.unref(r).handle_svg_info)==null?void 0:di.info.id))?(vue.openBlock(),vue.createBlock(ConnectionPanel,{key:7,onContextmenu:Ve,"item-info":Lt},null,8,["item-info"])):vue.createCommentVNode("",!0)],40,_hoisted_9)],2)],8,_hoisted_8)),[[vue.vShow,Lt.display]])}),128)),vue.createElementVNode("rect",{x:Ie.value.x,y:Ie.value.y,height:Ie.value.height,width:Ie.value.with,stroke:"#107cec",fill:"#107cec","fill-opacity":".2"},null,8,_hoisted_14)],8,_hoisted_7)],4))],544),vue.withDirectives(vue.createElementVNode("ul",{ref_key:"contextMenuRef",ref:oe,class:"contextMenu"},[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref($).info,(Lt,Pt)=>(vue.openBlock(),vue.createElementBlock("li",{key:Lt.title,onClick:ni=>vue.unref($).onContextMenuClick(Pt)},[vue.createElementVNode("p",{class:vue.normalizeClass(Lt.enable?"":"disabled")},[vue.createTextVNode(vue.toDisplayString(Lt.title)+" ",1),vue.createElementVNode("span",_hoisted_16,vue.toDisplayString(Lt.hot_key),1)],2)],8,_hoisted_15))),128))],512),[[vue.vShow,vue.unref($).display]])],64))}}),index_vue_vue_type_style_index_0_scoped_a0b7be17_lang="",CenterPanel=_export_sfc(_sfc_main$d,[["__scopeId","data-v-a0b7be17"]]);var ace$2={exports:{}};(function(i,n){(function(){var r="ace",g=function(){return this}();!g&&typeof window<"u"&&(g=window);var V=function(ie,ae,le){if(typeof ie!="string"){V.original?V.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(le=ae),V.modules[ie]||(V.payloads[ie]=le,V.modules[ie]=null)};V.modules={},V.payloads={};var k=function(ie,ae,le){if(typeof ae=="string"){var Ie=re(ie,ae);if(Ie!=null)return le&&le(),Ie}else if(Object.prototype.toString.call(ae)==="[object Array]"){for(var ue=[],de=0,Ne=ae.length;de<Ne;++de){var he=re(ie,ae[de]);if(he==null&&$.original)return;ue.push(he)}return le&&le.apply(null,ue)||!0}},$=function(ie,ae){var le=k("",ie,ae);return le==null&&$.original?$.original.apply(this,arguments):le},oe=function(ie,ae){if(ae.indexOf("!")!==-1){var le=ae.split("!");return oe(ie,le[0])+"!"+oe(ie,le[1])}if(ae.charAt(0)=="."){var Ie=ie.split("/").slice(0,-1).join("/");for(ae=Ie+"/"+ae;ae.indexOf(".")!==-1&&ue!=ae;){var ue=ae;ae=ae.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return ae},re=function(ie,ae){ae=oe(ie,ae);var le=V.modules[ae];if(!le){if(le=V.payloads[ae],typeof le=="function"){var Ie={},ue={id:ae,uri:"",exports:Ie,packaged:!0},de=function(he,pe){return k(ae,he,pe)},Ne=le(de,Ie,ue);Ie=Ne||ue.exports,V.modules[ae]=Ie,delete V.payloads[ae]}le=V.modules[ae]=Ie||le}return le};function Ce(ie){var ae=g;ie&&(g[ie]||(g[ie]={}),ae=g[ie]),(!ae.define||!ae.define.packaged)&&(V.original=ae.define,ae.define=V,ae.define.packaged=!0),(!ae.require||!ae.require.packaged)&&($.original=ae.require,ae.require=$,ae.require.packaged=!0)}Ce(r)})(),ace.define("ace/lib/es6-shim",["require","exports","module"],function(r,g,V){function k($,oe,re){Object.defineProperty($,oe,{value:re,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||k(String.prototype,"startsWith",function($,oe){return oe=oe||0,this.lastIndexOf($,oe)===oe}),String.prototype.endsWith||k(String.prototype,"endsWith",function($,oe){var re=this;(oe===void 0||oe>re.length)&&(oe=re.length),oe-=$.length;var Ce=re.indexOf($,oe);return Ce!==-1&&Ce===oe}),String.prototype.repeat||k(String.prototype,"repeat",function($){for(var oe="",re=this;$>0;)$&1&&(oe+=re),($>>=1)&&(re+=re);return oe}),String.prototype.includes||k(String.prototype,"includes",function($,oe){return this.indexOf($,oe)!=-1}),Object.assign||(Object.assign=function($){if($==null)throw new TypeError("Cannot convert undefined or null to object");for(var oe=Object($),re=1;re<arguments.length;re++){var Ce=arguments[re];Ce!=null&&Object.keys(Ce).forEach(function(ie){oe[ie]=Ce[ie]})}return oe}),Object.values||(Object.values=function($){return Object.keys($).map(function(oe){return $[oe]})}),Array.prototype.find||k(Array.prototype,"find",function($){for(var oe=this.length,re=arguments[1],Ce=0;Ce<oe;Ce++){var ie=this[Ce];if($.call(re,ie,Ce,this))return ie}}),Array.prototype.findIndex||k(Array.prototype,"findIndex",function($){for(var oe=this.length,re=arguments[1],Ce=0;Ce<oe;Ce++){var ie=this[Ce];if($.call(re,ie,Ce,this))return Ce}}),Array.prototype.includes||k(Array.prototype,"includes",function($,oe){return this.indexOf($,oe)!=-1}),Array.prototype.fill||k(Array.prototype,"fill",function($){for(var oe=this,re=oe.length>>>0,Ce=arguments[1],ie=Ce>>0,ae=ie<0?Math.max(re+ie,0):Math.min(ie,re),le=arguments[2],Ie=le===void 0?re:le>>0,ue=Ie<0?Math.max(re+Ie,0):Math.min(Ie,re);ae<ue;)oe[ae]=$,ae++;return oe}),Array.of||k(Array,"of",function(){return Array.prototype.slice.call(arguments)})}),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/es6-shim"],function(r,g,V){r("./es6-shim")}),ace.define("ace/lib/lang",["require","exports","module"],function(r,g,V){g.last=function(oe){return oe[oe.length-1]},g.stringReverse=function(oe){return oe.split("").reverse().join("")},g.stringRepeat=function(oe,re){for(var Ce="";re>0;)re&1&&(Ce+=oe),(re>>=1)&&(oe+=oe);return Ce};var k=/^\s\s*/,$=/\s\s*$/;g.stringTrimLeft=function(oe){return oe.replace(k,"")},g.stringTrimRight=function(oe){return oe.replace($,"")},g.copyObject=function(oe){var re={};for(var Ce in oe)re[Ce]=oe[Ce];return re},g.copyArray=function(oe){for(var re=[],Ce=0,ie=oe.length;Ce<ie;Ce++)oe[Ce]&&typeof oe[Ce]=="object"?re[Ce]=this.copyObject(oe[Ce]):re[Ce]=oe[Ce];return re},g.deepCopy=function oe(re){if(typeof re!="object"||!re)return re;var Ce;if(Array.isArray(re)){Ce=[];for(var ie=0;ie<re.length;ie++)Ce[ie]=oe(re[ie]);return Ce}if(Object.prototype.toString.call(re)!=="[object Object]")return re;Ce={};for(var ie in re)Ce[ie]=oe(re[ie]);return Ce},g.arrayToMap=function(oe){for(var re={},Ce=0;Ce<oe.length;Ce++)re[oe[Ce]]=1;return re},g.createMap=function(oe){var re=Object.create(null);for(var Ce in oe)re[Ce]=oe[Ce];return re},g.arrayRemove=function(oe,re){for(var Ce=0;Ce<=oe.length;Ce++)re===oe[Ce]&&oe.splice(Ce,1)},g.escapeRegExp=function(oe){return oe.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},g.escapeHTML=function(oe){return(""+oe).replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/'/g,"&#39;").replace(/</g,"&#60;")},g.getMatchOffsets=function(oe,re){var Ce=[];return oe.replace(re,function(ie){Ce.push({offset:arguments[arguments.length-2],length:ie.length})}),Ce},g.deferredCall=function(oe){var re=null,Ce=function(){re=null,oe()},ie=function(ae){return ie.cancel(),re=setTimeout(Ce,ae||0),ie};return ie.schedule=ie,ie.call=function(){return this.cancel(),oe(),ie},ie.cancel=function(){return clearTimeout(re),re=null,ie},ie.isPending=function(){return re},ie},g.delayedCall=function(oe,re){var Ce=null,ie=function(){Ce=null,oe()},ae=function(le){Ce==null&&(Ce=setTimeout(ie,le||re))};return ae.delay=function(le){Ce&&clearTimeout(Ce),Ce=setTimeout(ie,le||re)},ae.schedule=ae,ae.call=function(){this.cancel(),oe()},ae.cancel=function(){Ce&&clearTimeout(Ce),Ce=null},ae.isPending=function(){return Ce},ae}}),ace.define("ace/lib/oop",["require","exports","module"],function(r,g,V){g.inherits=function(k,$){k.super_=$,k.prototype=Object.create($.prototype,{constructor:{value:k,enumerable:!1,writable:!0,configurable:!0}})},g.mixin=function(k,$){for(var oe in $)k[oe]=$[oe];return k},g.implement=function(k,$){g.mixin(k,$)}}),ace.define("ace/lib/useragent",["require","exports","module"],function(r,g,V){g.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},g.getOS=function(){return g.isMac?g.OS.MAC:g.isLinux?g.OS.LINUX:g.OS.WINDOWS};var k=typeof navigator=="object"?navigator:{},$=(/mac|win|linux/i.exec(k.platform)||["other"])[0].toLowerCase(),oe=k.userAgent||"",re=k.appName||"";g.isWin=$=="win",g.isMac=$=="mac",g.isLinux=$=="linux",g.isIE=re=="Microsoft Internet Explorer"||re.indexOf("MSAppHost")>=0?parseFloat((oe.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((oe.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),g.isOldIE=g.isIE&&g.isIE<9,g.isGecko=g.isMozilla=oe.match(/ Gecko\/\d+/),g.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",g.isWebKit=parseFloat(oe.split("WebKit/")[1])||void 0,g.isChrome=parseFloat(oe.split(" Chrome/")[1])||void 0,g.isEdge=parseFloat(oe.split(" Edge/")[1])||void 0,g.isAIR=oe.indexOf("AdobeAIR")>=0,g.isAndroid=oe.indexOf("Android")>=0,g.isChromeOS=oe.indexOf(" CrOS ")>=0,g.isIOS=/iPad|iPhone|iPod/.test(oe)&&!window.MSStream,g.isIOS&&(g.isMac=!0),g.isMobile=g.isIOS||g.isAndroid}),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],function(r,g,V){var k=r("./useragent"),$="http://www.w3.org/1999/xhtml";g.buildDom=function le(Ie,ue,de){if(typeof Ie=="string"&&Ie){var Ne=document.createTextNode(Ie);return ue&&ue.appendChild(Ne),Ne}if(!Array.isArray(Ie))return Ie&&Ie.appendChild&&ue&&ue.appendChild(Ie),Ie;if(typeof Ie[0]!="string"||!Ie[0]){for(var he=[],pe=0;pe<Ie.length;pe++){var ze=le(Ie[pe],ue,de);ze&&he.push(ze)}return he}var xe=document.createElement(Ie[0]),Oe=Ie[1],_e=1;Oe&&typeof Oe=="object"&&!Array.isArray(Oe)&&(_e=2);for(var pe=_e;pe<Ie.length;pe++)le(Ie[pe],xe,de);return _e==2&&Object.keys(Oe).forEach(function(At){var $e=Oe[At];At==="class"?xe.className=Array.isArray($e)?$e.join(" "):$e:typeof $e=="function"||At=="value"||At[0]=="$"?xe[At]=$e:At==="ref"?de&&(de[$e]=xe):At==="style"?typeof $e=="string"&&(xe.style.cssText=$e):$e!=null&&xe.setAttribute(At,$e)}),ue&&ue.appendChild(xe),xe},g.getDocumentHead=function(le){return le||(le=document),le.head||le.getElementsByTagName("head")[0]||le.documentElement},g.createElement=function(le,Ie){return document.createElementNS?document.createElementNS(Ie||$,le):document.createElement(le)},g.removeChildren=function(le){le.innerHTML=""},g.createTextNode=function(le,Ie){var ue=Ie?Ie.ownerDocument:document;return ue.createTextNode(le)},g.createFragment=function(le){var Ie=le?le.ownerDocument:document;return Ie.createDocumentFragment()},g.hasCssClass=function(le,Ie){var ue=(le.className+"").split(/\s+/g);return ue.indexOf(Ie)!==-1},g.addCssClass=function(le,Ie){g.hasCssClass(le,Ie)||(le.className+=" "+Ie)},g.removeCssClass=function(le,Ie){for(var ue=le.className.split(/\s+/g);;){var de=ue.indexOf(Ie);if(de==-1)break;ue.splice(de,1)}le.className=ue.join(" ")},g.toggleCssClass=function(le,Ie){for(var ue=le.className.split(/\s+/g),de=!0;;){var Ne=ue.indexOf(Ie);if(Ne==-1)break;de=!1,ue.splice(Ne,1)}return de&&ue.push(Ie),le.className=ue.join(" "),de},g.setCssClass=function(le,Ie,ue){ue?g.addCssClass(le,Ie):g.removeCssClass(le,Ie)},g.hasCssString=function(le,Ie){var ue=0,de;if(Ie=Ie||document,de=Ie.querySelectorAll("style")){for(;ue<de.length;)if(de[ue++].id===le)return!0}},g.removeElementById=function(le,Ie){Ie=Ie||document,Ie.getElementById(le)&&Ie.getElementById(le).remove()};var oe,re=[];g.useStrictCSP=function(le){oe=le,le==!1?Ce():re||(re=[])};function Ce(){var le=re;re=null,le&&le.forEach(function(Ie){ie(Ie[0],Ie[1])})}function ie(le,Ie,ue){if(!(typeof document>"u")){if(re){if(ue)Ce();else if(ue===!1)return re.push([le,Ie])}if(!oe){var de=ue;!ue||!ue.getRootNode?de=document:(de=ue.getRootNode(),(!de||de==ue)&&(de=document));var Ne=de.ownerDocument||de;if(Ie&&g.hasCssString(Ie,de))return null;Ie&&(le+=`
208
208
  /*# sourceURL=ace/css/`+Ie+" */");var he=g.createElement("style");he.appendChild(Ne.createTextNode(le)),Ie&&(he.id=Ie),de==Ne&&(de=g.getDocumentHead(Ne)),de.insertBefore(he,de.firstChild)}}}if(g.importCssString=ie,g.importCssStylsheet=function(le,Ie){g.buildDom(["link",{rel:"stylesheet",href:le}],g.getDocumentHead(Ie))},g.scrollbarWidth=function(le){var Ie=g.createElement("ace_inner");Ie.style.width="100%",Ie.style.minWidth="0px",Ie.style.height="200px",Ie.style.display="block";var ue=g.createElement("ace_outer"),de=ue.style;de.position="absolute",de.left="-10000px",de.overflow="hidden",de.width="200px",de.minWidth="0px",de.height="150px",de.display="block",ue.appendChild(Ie);var Ne=le&&le.documentElement||document&&document.documentElement;if(!Ne)return 0;Ne.appendChild(ue);var he=Ie.offsetWidth;de.overflow="scroll";var pe=Ie.offsetWidth;return he===pe&&(pe=ue.clientWidth),Ne.removeChild(ue),he-pe},g.computedStyle=function(le,Ie){return window.getComputedStyle(le,"")||{}},g.setStyle=function(le,Ie,ue){le[Ie]!==ue&&(le[Ie]=ue)},g.HAS_CSS_ANIMATION=!1,g.HAS_CSS_TRANSFORMS=!1,g.HI_DPI=k.isWin?typeof window<"u"&&window.devicePixelRatio>=1.5:!0,k.isChromeOS&&(g.HI_DPI=!1),typeof document<"u"){var ae=document.createElement("div");g.HI_DPI&&ae.style.transform!==void 0&&(g.HAS_CSS_TRANSFORMS=!0),!k.isEdge&&typeof ae.style.animationName<"u"&&(g.HAS_CSS_ANIMATION=!0),ae=null}g.HAS_CSS_TRANSFORMS?g.translate=function(le,Ie,ue){le.style.transform="translate("+Math.round(Ie)+"px, "+Math.round(ue)+"px)"}:g.translate=function(le,Ie,ue){le.style.top=Math.round(ue)+"px",le.style.left=Math.round(Ie)+"px"}}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(r,g,V){/*
209
209
  * based on code from:
210
210
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zhangqingcq/vgce",
3
- "version": "0.0.24",
3
+ "version": "0.0.25",
4
4
  "description": "Vector graphics configure editor. svg组态编辑器。基于vue3.3+ts+element-plus+vite",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -1089,20 +1089,20 @@
1089
1089
  />
1090
1090
  </g>
1091
1091
  </svg>
1092
- <!-- 右键菜单 -->
1093
- <ul ref="contextMenuRef" class="contextMenu" v-show="contextMenuStore.display">
1094
- <li
1095
- v-for="(item, key) in contextMenuStore.info"
1096
- :key="item.title"
1097
- @click="contextMenuStore.onContextMenuClick(key)"
1098
- >
1099
- <p :class="item.enable ? '' : 'disabled'">
1100
- {{ item.title }}
1101
- <span class="shortcut">{{ item.hot_key }}</span>
1102
- </p>
1103
- </li>
1104
- </ul>
1105
1092
  </div>
1093
+ <!-- 右键菜单 -->
1094
+ <ul ref="contextMenuRef" class="contextMenu" v-show="contextMenuStore.display">
1095
+ <li
1096
+ v-for="(item, key) in contextMenuStore.info"
1097
+ :key="item.title"
1098
+ @click="contextMenuStore.onContextMenuClick(key)"
1099
+ >
1100
+ <p :class="item.enable ? '' : 'disabled'">
1101
+ {{ item.title }}
1102
+ <span class="shortcut">{{ item.hot_key }}</span>
1103
+ </p>
1104
+ </li>
1105
+ </ul>
1106
1106
  </template>
1107
1107
 
1108
1108
  <style lang="less" scoped>