goview_vue/dist/static/js/index-35415123.js
2023-06-06 13:24:29 +08:00

2 lines
35 KiB
JavaScript

var wt=Object.defineProperty,Et=Object.defineProperties;var bt=Object.getOwnPropertyDescriptors;var Qe=Object.getOwnPropertySymbols;var Lt=Object.prototype.hasOwnProperty,kt=Object.prototype.propertyIsEnumerable;var et=(e,o,t)=>o in e?wt(e,o,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[o]=t,H=(e,o)=>{for(var t in o||(o={}))Lt.call(o,t)&&et(e,t,o[t]);if(Qe)for(var t of Qe(o))kt.call(o,t)&&et(e,t,o[t]);return e},ge=(e,o)=>Et(e,bt(o));var de=(e,o,t)=>new Promise((a,s)=>{var _=p=>{try{f(t.next(p))}catch(u){s(u)}},c=p=>{try{f(t.throw(p))}catch(u){s(u)}},f=p=>p.done?a(p.value):Promise.resolve(p.value).then(_,c);f((t=t.apply(e,o)).next())});import{m as Ve,a2 as dt,cU as Dt,aK as Be,cV as K,bf as He,ab as It,d as j,be as fe,O as he,a1 as M,o as w,c as P,a as We,F as re,q as ue,av as ne,au as q,u as r,a6 as ye,n as $,h as ee,aC as pt,D as B,w as T,E as ve,aw as Ne,ax as De,ay as Ge,az as vt,aa as Z,a0 as _t,l as qe,ac as tt,J as ae,bq as ft,r as I,cW as $t,$ as Se,j as X,cX as ot,s as Me,x as Re,b as x,g as Mt,e as _e,t as Q,aX as Rt,cH as N,cI as F,aY as pe,cG as Ut,Q as be,U as Le,b8 as Ot,cY as Ht,aJ as At,cZ as Pt,ad as Yt,c_ as Xt,B as Bt,ag as st,bj as Nt,M as Gt,c$ as Ft,aL as Kt,N as zt,aj as Vt,ak as Ee,aI as Ae,bw as Wt}from"./index-4ec2ce15.js";import{u as je,d as qt}from"./index-04f5d9ae.js";import{u as te,f as W,h as D,i as ke,a as jt}from"./chartEditStore-bfc6c223.js";import{e as Jt,l as Ie,S as Zt}from"./index-96c3a075.js";import{a as Qt}from"./useKeyboard.hook-f82db81a.js";import{u as ht}from"./useSync.hook-dcdbd18a.js";import{a as eo,b as nt,l as to,g as oo}from"./plugin-ae137233.js";import{C as so}from"./index-f119bf30.js";import{u as gt,C as mt}from"./chartLayoutStore-810503fe.js";import{i as le}from"./icon-42fa39e7.js";import{G as no}from"./index.vue_vue_type_script_setup_true_lang-4f4dbba3.js";import{F as at}from"./fileTypeEnum-21359a08.js";import{u as ao}from"./useSyncUpdate.hook-4756cfae.js";import"./index-64867e41.js";import"./SettingItem-35031211.js";/* empty css */import"./SettingItemBox-f60eaa4e.js";import"./CollapseItem.vue_vue_type_script_setup_true_lang-77b092a0.js";import"./index.esm.min-2eecdcbd.js";import"./project.api-0931840b.js";const me=te(),ro=e=>{let o=()=>{};Ve(()=>de(void 0,null,function*(){me.setEditCanvas(W.EDIT_LAYOUT_DOM,document.getElementById("go-chart-edit-layout")),me.setEditCanvas(W.EDIT_CONTENT_DOM,document.getElementById("go-chart-edit-content")),yield e(),o=me.listenerScale()})),dt(()=>{me.setEditCanvas(W.EDIT_LAYOUT_DOM,null),me.setEditCanvas(W.EDIT_CONTENT_DOM,null),o()})},y=te(),{onClickOutSide:co}=je(),lo=e=>de(void 0,null,function*(){e.preventDefault();try{eo();const o=e.dataTransfer.getData(Dt.DRAG_KEY);if(!o){nt();return}y.setEditCanvas(W.IS_CREATE,!1);const t=Be(o);if(t.disabled)return;let a=yield Jt(t);t.redirectComponent&&(t.dataset&&(a.option.dataset=t.dataset),a.chartConfig.title=t.title,a.chartConfig.chartFrame=t.chartFrame),K(a,e.offsetX-a.attr.w/2,e.offsetY-a.attr.h/2),y.addComponentList(a,!1,!0),y.setTargetSelectChart(a.id),nt()}catch(o){to(),window.$message.warning("图表正在研发中, 敬请期待...")}}),rt=e=>{e.preventDefault(),e.stopPropagation(),e.dataTransfer&&(e.dataTransfer.dropEffect="copy")},Ct=(e,o)=>{if(o){y.setTargetSelectChart(o.id);return}y.setTargetSelectChart(void 0)},io=(e,o)=>{var u;if(e.which==2||(u=window.$KeyboardActive)!=null&&u.space)return;Ct();const t=e.offsetX,a=e.offsetY,s=e.screenX,_=e.screenY,c=y.getEditCanvas.scale;y.setMousePosition(void 0,void 0,t,a);const f=Ie.throttle(v=>{y.setTargetSelectChart(),y.setEditCanvas(W.IS_SELECT,!0);const l=t+v.screenX-s,n=a+v.screenY-_;y.setMousePosition(l,n);const h={x1:0,y1:0,x2:0,y2:0};l>t&&n>a?(h.x1=t,h.y1=a,h.x2=Math.round(t+(v.screenX-s)/c),h.y2=Math.round(a+(v.screenY-_)/c)):l>t&&n<a?(h.x1=t,h.y1=Math.round(a-(_-v.screenY)/c),h.x2=Math.round(t+(v.screenX-s)/c),h.y2=a):l<t&&n>a?(h.x1=Math.round(t-(s-v.screenX)/c),h.y1=a,h.x2=t,h.y2=Math.round(a+(v.screenY-_)/c)):(h.x1=Math.round(t-(s-v.screenX)/c),h.y1=Math.round(a-(_-v.screenY)/c),h.x2=t,h.y2=a),y.getComponentList.forEach(i=>{if(!y.getTargetChart.selectId.includes(i.id)){const{x:d,y:S,w:g,h:L}=i.attr,E={x1:d,y1:S,x2:d+g,y2:S+L};E.x1-h.x1>=0&&E.y1-h.y1>=0&&E.x2-h.x2<=0&&E.y2-h.y2<=0&&!i.status.lock&&!i.status.hide&&y.setTargetSelectChart(i.id,!0)}})},30),p=()=>{f.cancel(),y.setEditCanvas(W.IS_SELECT,!1),y.setMousePosition(0,0,0,0),document.removeEventListener("mousemove",f),document.removeEventListener("mouseup",p)};document.addEventListener("mousemove",f),document.addEventListener("mouseup",p)},yt=()=>({mouseClickHandle:(s,_)=>{var c;if(s.preventDefault(),s.stopPropagation(),!_.status.lock&&(c=window.$KeyboardActive)!=null&&c.ctrl)if(y.targetChart.selectId.includes(_.id)){const f=y.targetChart.selectId.filter(p=>p!==_.id);y.setTargetSelectChart(f)}else y.setTargetSelectChart(_.id,!0)},mousedownHandle:(s,_)=>{var S;if(s.preventDefault(),s.stopPropagation(),_.status.lock||(co(),s.buttons===He.LEFT&&((S=window.$KeyboardActive)!=null&&S.ctrl)))return;const c=y.getTargetChart.selectId;if(s.buttons===He.RIGHT&&c.length>1&&c.includes(_.id)||(y.setTargetSelectChart(_.id),s.buttons===He.RIGHT))return;const f=y.getEditCanvas.scale,p=y.getEditCanvasConfig.width,u=y.getEditCanvasConfig.height,v=new Map;y.getTargetChart.selectId.forEach(g=>{const L=y.fetchTargetIndex(g);if(L!==-1){const{x:E,y:b,w:Y,h:G}=It(y.getComponentList[L]).attr;v.set(g,{x:E,y:b,w:Y,h:G})}});const l=s.screenX,n=s.screenY;let h=[];y.getTargetChart.selectId.forEach(g=>{if(!v.has(g))return;const L=y.fetchTargetIndex(g);h.push(Ie.cloneDeep(y.getComponentList[L]))}),y.setMousePosition(void 0,void 0,l,n);const i=Ie.throttle(g=>{y.setEditCanvas(W.IS_DRAG,!0),y.setMousePosition(g.screenX,g.screenY);let L=(g.screenX-l)/f,E=(g.screenY-n)/f;y.getTargetChart.selectId.forEach(b=>{if(!v.has(b))return;const Y=y.fetchTargetIndex(b),{x:G,y:se,w:A,h:m}=v.get(b),R=y.getComponentList[Y];let C=Math.round(G+L),k=Math.round(se+E);const U=50;C=C<-A+U?-A+U:C,k=k<-m+U?-m+U:k,C=C>p-U?p-U:C,k=k>u-U?u-U:k,R&&(R.attr=Object.assign(R.attr,{x:C,y:k}))})},20),d=()=>{try{y.setMousePosition(0,0,0,0),y.setEditCanvas(W.IS_DRAG,!1),h.length&&(y.getTargetChart.selectId.forEach(g=>{if(!v.has(g))return;const L=y.fetchTargetIndex(g),E=y.getComponentList[L];h.forEach(b=>{b.id===g&&(b.attr=Object.assign(b.attr,{offsetX:E.attr.x-b.attr.x,offsetY:E.attr.y-b.attr.y}))})}),y.moveComponentList(h)),document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",d)}catch(g){console.log(g)}};document.addEventListener("mousemove",i),document.addEventListener("mouseup",d)},mouseenterHandle:(s,_)=>{s.preventDefault(),s.stopPropagation(),y.getEditCanvas.isSelect||y.setTargetHoverChart(_.id)},mouseleaveHandle:(s,_)=>{s.preventDefault(),s.stopPropagation(),y.setEditCanvas(W.IS_DRAG,!1),y.setTargetHoverChart(void 0)}}),uo=(e,o,t)=>{e.stopPropagation(),e.preventDefault(),y.setEditCanvas(W.IS_DRAG,!0);const a=y.getEditCanvas.scale,s=t.x,_=t.y,c=t.w,f=t.h,p=e.screenX,u=e.screenY;y.setMousePosition(p,u);const v=Ie.throttle(n=>{y.setMousePosition(n.screenX,n.screenY);let h=Math.round((n.screenX-p)/a),i=Math.round((n.screenY-u)/a);const d=/t/.test(o),S=/b/.test(o),g=/l/.test(o),L=/r/.test(o),E=f+(d?-i:S?i:0),b=c+(g?-h:L?h:0);t.h=E>0?E:0,t.w=b>0?b:0,t.x=s+(g?h:0),t.y=_+(d?i:0)},50),l=()=>{y.setEditCanvas(W.IS_DRAG,!1),y.setMousePosition(0,0,0,0),document.removeEventListener("mousemove",v),document.removeEventListener("mouseup",l)};document.addEventListener("mousemove",v),document.addEventListener("mouseup",l)},$e=(e,o)=>e?{zIndex:o+1,left:`${e.x}px`,top:`${e.y}px`}:{},ie=(e,o)=>e?{width:`${o?o*e.w:e.w}px`,height:`${o?o*e.h:e.h}px`}:{},po=(e,o,t,a)=>{const{w:s,h:_}=t,c=/t/.test(e),f=/b/.test(e),p=/l/.test(e),u=/r/.test(e);let v=0,l=0;return e.length===2?(v=p?0:s,l=c?0:_):((c||f)&&(v=s/2,l=c?0:_),(p||u)&&(v=p?0:s,l=Math.floor(_/2))),{left:`${v}px`,top:`${l}px`,cursor:a[o]+"-resize"}},vo=["onMousedown"],_o=j({__name:"index",props:{item:{type:Object,required:!0},hiddenPoint:{type:Boolean,required:!1}},setup(e){const o=e;fe(l=>({"2d925dfa":c.value}));const t=he(),a=te(),s=["t","r","b","l","lt","rt","lb","rb"],_=["n","e","s","w","nw","ne","sw","se"],c=M(()=>t.getAppTheme),f=M(()=>a.getEditCanvas[W.IS_DRAG]||o.item.status.lock?!1:o.item.id===a.getTargetChart.hoverId),p=M(()=>{const l=o.item.id;return o.item.status.lock?!1:a.getTargetChart.selectId.find(n=>n===l)}),u=M(()=>o.item.status.lock),v=M(()=>o.item.status.hide);return(l,n)=>(w(),P("div",{class:ne(["go-shape-box",{lock:u.value,hide:v.value}])},[We(l.$slots,"default",{},void 0,!0),e.hiddenPoint?ye("",!0):(w(!0),P(re,{key:0},ue(p.value?s:[],(h,i)=>(w(),P("div",{class:ne(`shape-point ${h}`),key:i,style:q(r(po)(h,i,e.item.attr,_)),onMousedown:d=>r(uo)(d,h,e.item.attr)},null,46,vo))),128)),$("div",{class:"shape-modal",style:q(r(ie)(e.item.attr))},[$("div",{class:ne(["shape-modal-select",{active:p.value}])},null,2),$("div",{class:ne(["shape-modal-change",{selectActive:p.value,hoverActive:f.value}])},null,2)],4)],2))}});const Fe=ee(_o,[["__scopeId","data-v-25c3c11c"]]),fo={class:"go-edit-group-box"},ho=j({__name:"index",props:{groupData:{type:Object,required:!0},groupIndex:{type:Number,required:!0}},setup(e){const o=te(),{handleContextMenu:t}=je(),{mouseenterHandle:a,mouseleaveHandle:s,mousedownHandle:_,mouseClickHandle:c}=yt(),f=(v,l,n)=>{const h=i=>l.filter(d=>i.includes(d.key));if(o.getTargetChart.selectId.length>1)return h([Z.GROUP,Z.DELETE]);{const i=[];n.status.lock?i.push(Z.LOCK):i.push(Z.UNLOCK),n.status.hide?i.push(Z.HIDE):i.push(Z.SHOW);const d=[Z.UN_GROUP];return[...h(d),qt(),...v.filter(S=>!i.includes(S.key))]}},p=M(()=>pt(o.getEditCanvasConfig.chartCustomThemeColorInfo)[o.getEditCanvasConfig.chartThemeColor]),u=M(()=>o.getEditCanvasConfig.chartThemeSetting);return(v,l)=>(w(),P("div",fo,[(w(),B(r(Fe),{key:e.groupData.id,"data-id":e.groupData.id,index:e.groupIndex,item:e.groupData,hiddenPoint:!0,class:ne(r(Ne)(e.groupData.styles.animations)),style:q(H(H(H(H(H({},r($e)(e.groupData.attr,e.groupIndex)),r(ie)(e.groupData.attr)),r(De)(e.groupData.styles)),r(Ge)(e.groupData.styles)),r(vt)(e.groupData.styles))),onClick:l[0]||(l[0]=n=>r(c)(n,e.groupData)),onMousedown:l[1]||(l[1]=n=>r(_)(n,e.groupData)),onMouseenter:l[2]||(l[2]=n=>r(a)(n,e.groupData)),onMouseleave:l[3]||(l[3]=n=>r(s)(n,e.groupData)),onContextmenu:l[4]||(l[4]=n=>r(t)(n,e.groupData,f))},{default:T(()=>[(w(!0),P(re,null,ue(e.groupData.groupList,n=>(w(),B(r(Fe),{key:n.id,"data-id":n.id,index:e.groupIndex,item:n,hiddenPoint:!0,style:q(H({},r($e)(n.attr,e.groupIndex)))},{default:T(()=>[(w(),B(ve(n.chartConfig.chartKey),{class:ne(["edit-content-chart",r(Ne)(n.styles.animations)]),chartConfig:n,themeSetting:u.value,themeColor:p.value,style:q(H(H(H({},r(ie)(n.attr)),r(De)(n.styles)),r(Ge)(n.styles)))},null,8,["class","chartConfig","themeSetting","themeColor","style"]))]),_:2},1032,["data-id","index","item","style"]))),128))]),_:1},8,["data-id","index","item","class","style"]))]))}}),go={class:"go-edit-align-line"},mo=j({__name:"index",setup(e){fe(i=>({"2a25621e":c.value}));const o=he(),t=te(),a=_t(),s=qe({lineArr:["rowt","rowc","rowb","coll","colc","colr"],select:new Map,sorptioned:{x:!1,y:!1}}),_=i=>i?{left:`${i.x?i.x:0}px`,top:`${i.y?i.y:0}px`}:{},c=M(()=>o.getAppTheme),f=M(()=>a.getChartAlignRange),p=M(()=>t.getEditCanvas[W.IS_DRAG]),u=(i,d)=>Math.abs(i-d)<=f.value,v=M(()=>t.getTargetChart.selectId),l=M(()=>t.getComponentList[t.fetchTargetIndex()]),n=M(()=>{var i;return((i=l.value)==null?void 0:i.attr)||{}}),h=M(()=>({id:"0",attr:{w:tt(t.getEditCanvasConfig.width),h:tt(t.getEditCanvasConfig.height),x:0,y:0,offsetX:0,offsetY:0,zIndex:0}}));return ae(()=>t.getMousePosition,ft(()=>{try{if(!p.value||v.value.length!==1)return;const i=n.value.w,d=n.value.h,S=n.value.x,g=S+i/2,L=S+i,E=[S,g,L],b=n.value.y,Y=b+d/2,G=b+d,se=[b,Y,G];s.select.clear(),s.sorptioned.y=!1;const A=t.getComponentList.map(m=>({id:m.id,attr:m.attr}));A.push(h.value),s.lineArr.forEach(m=>{A.forEach(R=>{if(v.value[0]===R.id)return;const C=R.attr.w,k=R.attr.h,U=R.attr.x,V=U+C/2,O=U+C,Te=[U,V,O],z=R.attr.y,J=z+k/2,oe=z+k,Ze=[z,J,oe];m.includes("rowt")&&(u(b,z)&&(s.select.set(m,{y:z}),K(l.value,S,z)),u(b,J)&&(s.select.set(m,{y:J}),K(l.value,S,J)),u(b,oe)&&(s.select.set(m,{y:oe}),K(l.value,S,oe))),m.includes("rowc")&&(u(Y,z)&&(s.select.set(m,{y:z}),K(l.value,S,z-d/2)),u(Y,J)&&(s.select.set(m,{y:J}),K(l.value,S,J-d/2)),u(Y,oe)&&(s.select.set(m,{y:oe}),K(l.value,S,oe-d/2))),m.includes("rowb")&&(u(G,z)&&(s.select.set(m,{y:z}),K(l.value,S,z-d)),u(G,J)&&(s.select.set(m,{y:J}),K(l.value,S,J-d)),u(G,oe)&&(s.select.set(m,{y:oe}),K(l.value,S,oe-d))),m.includes("coll")&&(u(S,U)&&(s.select.set(m,{x:U}),K(l.value,U,b)),u(S,V)&&(s.select.set(m,{x:V}),K(l.value,V,b)),u(S,O)&&(s.select.set(m,{x:O}),K(l.value,O,b))),m.includes("colc")&&(u(g,U)&&(s.select.set(m,{x:U}),K(l.value,U-i/2,b)),u(g,V)&&(s.select.set(m,{x:V}),K(l.value,V-i/2,b)),u(g,O)&&(s.select.set(m,{x:O}),K(l.value,O-i/2,b))),m.includes("colr")&&(u(L,U)&&(s.select.set(m,{x:U}),K(l.value,U-i,b)),u(L,V)&&(s.select.set(m,{x:V}),K(l.value,V-i,b)),u(L,O)&&(s.select.set(m,{x:O}),K(l.value,O-i,b)))})})}catch(i){console.log(i)}},200),{deep:!0}),ae(()=>p.value,i=>{i||(s.select.clear(),s.sorptioned.y=!1)}),(i,d)=>(w(),P("div",go,[(w(!0),P(re,null,ue(s.lineArr,S=>(w(),P("div",{class:ne(["line",[S.includes("row")?"row":"col",s.select.has(S)&&"visible"]]),key:S,style:q(_(s.select.get(S)))},null,6))),128))]))}});const Co=ee(mo,[["__scopeId","data-v-792c43f5"]]),yo=j({__name:"index",setup(e){return(o,t)=>{const a=I("n-watermark");return w(),B(a,{id:"go-edit-watermark",content:r($t),cross:"",selectable:"","font-size":16,"line-height":16,width:500,height:150,"x-offset":12,"y-offset":80,rotate:-15},null,8,["content"])}}});const So=ee(yo,[["__scopeId","data-v-15e7d440"]]),St=e=>(Me("data-v-fd03a995"),e=e(),Re(),e),To=St(()=>$("div",{class:"select-background"},null,-1)),xo=St(()=>$("div",{class:"select-border"},null,-1)),wo=[To,xo],Eo=j({__name:"index",setup(e){fe(f=>({"3a6a09b6":_.value}));const o=he(),t=te(),{isSelect:a,scale:s}=Se(t.getEditCanvas),_=M(()=>o.getAppTheme),c=X();return ae(()=>t.getMousePosition,f=>{if(!a.value)return;const{startX:p,startY:u,x:v,y:l}=f,n={zIndex:ot,x:0,y:0,w:0,h:0,offsetX:0,offsetY:0};v>p&&l>u?(n.x=p,n.y=u,n.w=Math.round((v-p)/s.value),n.h=Math.round((l-u)/s.value)):v>p&&l<u?(n.x=p,n.w=Math.round((v-p)/s.value),n.h=Math.round((u-l)/s.value),n.y=u-n.h):v<p&&l>u?(n.y=u,n.w=Math.round((p-v)/s.value),n.h=Math.round((l-u)/s.value),n.x=p-n.w):(n.w=Math.round((p-v)/s.value),n.h=Math.round((u-l)/s.value),n.x=p-n.w,n.y=u-n.h),c.value=H(H({},$e(n,ot)),ie(n))},{deep:!0}),(f,p)=>r(a)?(w(),P("div",{key:0,class:"go-edit-select",style:q(c.value)},wo,4)):ye("",!0)}});const bo=ee(Eo,[["__scopeId","data-v-fd03a995"]]),Lo=j({__name:"index",setup(e){const o=te(),{getEditCanvasConfig:t,getEditCanvas:a}=Se(o),s=M(()=>({w:t.value.width,h:t.value.height})),_=M(()=>{const f={transform:`scale(${a.value.scale})`};return H(H({},ie(s.value)),f)}),c=M(()=>{const f=a.value.isCreate&&{"z-index":99999};return H(H({},ie(s.value)),f)});return(f,p)=>(w(),P("div",{class:"go-edit-range go-transition",style:q(_.value),onMousedown:p[0]||(p[0]=u=>r(io)(u,void 0))},[We(f.$slots,"default",{},void 0,!0),x(r(So)),x(r(Co)),x(r(bo)),$("div",{class:"go-edit-range-model",style:q(c.value)},null,4)],36))}});const ko=ee(Lo,[["__scopeId","data-v-d34efa6e"]]),Tt=!!(typeof window!="undefined"&&window.document&&window.document.createElement);var Ke=!1,ze=!1;try{var Pe={get passive(){return Ke=!0},get once(){return ze=Ke=!0}};Tt&&(window.addEventListener("test",Pe,Pe),window.removeEventListener("test",Pe,!0))}catch(e){}function Do(e,o,t,a){if(a&&typeof a!="boolean"&&!ze){var s=a.once,_=a.capture,c=t;!ze&&s&&(c=t.__once||function f(p){this.removeEventListener(o,f,_),t.call(this,p)},t.__once=c),e.addEventListener(o,c,Ke?a:_)}e.addEventListener(o,t,a)}function Io(e,o,t,a){var s=a&&typeof a!="boolean"?a.capture:a;e.removeEventListener(o,t,s),t.__once&&e.removeEventListener(o,t.__once,s)}function ct(e,o,t,a){return Do(e,o,t,a),function(){Io(e,o,t,a)}}var lt=new Date().getTime();function $o(e){var o=new Date().getTime(),t=Math.max(0,16-(o-lt)),a=setTimeout(e,t);return lt=o,a}var Mo=["","webkit","moz","o","ms"],it=$o,ut=function(o,t){return o+(o?t[0].toUpperCase()+t.substr(1):t)+"AnimationFrame"};Tt&&Mo.some(function(e){var o=ut(e,"request");return o in window&&(ut(e,"cancel"),it=function(a){return window[o](a)}),!!it});Function.prototype.bind.call(Function.prototype.call,[].slice);Function.prototype.bind.call(Function.prototype.call,[].slice);const Ro={class:"go-sketch-rule"},Uo={key:1,class:"fix-edit-screens-block"},Ye=20,Oo=j({__name:"index",setup(e){fe(C=>({"68cf994b":b.value,"117fb376":L.value,e7cb282c:l.value}));const o=te(),t=gt(),a=he();let s=[0,0],_=[0,0];const c=X(),f=X(!0),p=X(),u=X(),v=X(!1),l=X("auto"),{width:n,height:h}=Se(o.getEditCanvasConfig),i=X(0),d=X(0),S=qe({h:[],v:[]}),g=M(()=>o.getEditCanvas.scale),L=M(()=>`${h.value*2}px`),E=M(()=>a.getDarkTheme?{bgColor:"#18181c",longfgColor:"#4d4d4d",shortfgColor:"#4d4d4d",fontColor:"#4d4d4d",shadowColor:"#18181c",borderColor:"#18181c",cornerActiveColor:"#18181c"}:{}),b=M(()=>a.getAppTheme),Y=C=>{if(C.ctrlKey||C.metaKey){C.preventDefault();let k=g.value;if(C.wheelDelta>=0&&g.value<2){k=g.value+.05,o.setScale(k);return}C.wheelDelta<0&&g.value>.1&&(k=g.value-.05,o.setScale(k))}},G=()=>{if(!c.value)return;const C=c.value.getBoundingClientRect(),k=p.value.getBoundingClientRect();i.value=(C.left+Ye-k.left)/g.value,d.value=(C.top+Ye-k.top)/g.value},se=C=>{var Te,z;if(C.preventDefault(),C.stopPropagation(),C.which==2)v.value=!0;else if(!((Te=window.$KeyboardActive)!=null&&Te.space))return;(z=document.activeElement)==null||z.blur();const k=C.pageX,U=C.pageY,V=ct(window,"mousemove",J=>{const oe=J.pageX-k,Ze=J.pageY-U,[Ue,xe]=s,[Oe,we]=_;s=[xe,oe],_=[we,Ze],c.value.scrollLeft-=xe>Ue?Math.abs(xe-Ue):-Math.abs(xe-Ue),c.value.scrollTop-=we>Oe?Math.abs(we-Oe):-Math.abs(we-Oe)}),O=ct(window,"mouseup",()=>{V(),O(),s=[0,0],_=[0,0],v.value=!1})},A=()=>{const C=document.getElementById("go-chart-edit-layout");return C?{height:C.clientHeight-25,width:C.clientWidth}:{width:n.value,height:h.value}},m=()=>{f.value=!1,setTimeout(()=>{f.value=!0},10)},R=()=>{const{width:C,height:k}=u.value.getBoundingClientRect(),{width:U,height:V}=A();c.value.scrollLeft=C/2-U/2,c.value.scrollTop=k/2-V/2};return ae(()=>a.getDarkTheme,()=>{m()}),ae(()=>g.value,(C,k)=>{k!==C&&t.getRePositionCanvas?(t.setItemUnHandle(mt.RE_POSITION_CANVAS,!1),G(),setTimeout(()=>{R(),m()},400)):ft(m,20)}),ae(()=>v.value,C=>{l.value=C?"grab":"auto"}),Ve(()=>{c.value&&(c.value.addEventListener("wheel",Y,{passive:!1}),R())}),dt(()=>{c.value&&c.value.removeEventListener("wheel",Y)}),window.onKeySpacePressHold=C=>{v.value=C},(C,k)=>{const U=I("sketch-rule");return w(),P("div",Ro,[f.value?(w(),B(U,{key:0,thick:Ye,scale:g.value,width:A().width,height:A().height,startX:i.value,startY:d.value,lines:S,palette:E.value},null,8,["scale","width","height","startX","startY","lines","palette"])):ye("",!0),$("div",{ref_key:"$app",ref:c,class:"edit-screens",onScroll:G},[$("div",{ref_key:"$container",ref:u,class:"edit-screen-container",style:q({width:r(n)*2+"px"})},[$("div",{ref_key:"refSketchRuleBox",ref:p,class:"canvas",onMousedown:se,style:q({marginLeft:"-"+(A().width/2-25)+"px"})},[$("div",{style:q({pointerEvents:v.value?"none":"auto"})},[We(C.$slots,"default",{},void 0,!0)],4)],36)],4)],544),r(a).getDarkTheme?(w(),P("div",Uo)):ye("",!0)])}}});const Ho=ee(Oo,[["__scopeId","data-v-c504d30f"]]),Xe={[D.ADD]:"新增",[D.DELETE]:"删除",[D.UPDATE]:"更新",[D.MOVE]:"移动",[D.PASTE]:"粘贴",[D.COPY]:"复制",[D.CUT]:"剪切",[D.TOP]:"置顶",[D.BOTTOM]:"置底",[D.UP]:"上移",[D.DOWN]:"下移",[D.GROUP]:"成组",[D.UN_GROUP]:"解组",[D.LOCK]:"锁定",[D.UNLOCK]:"解锁",[D.HIDE]:"隐藏",[D.SHOW]:"显示",[ke.CANVAS]:"画布初始化"};var Ao=Array.prototype,Po=Ao.reverse;function Yo(e){return e==null?e:Po.call(e)}var Xo=Yo;const Bo=Mt(Xo),xt=e=>(Me("data-v-78517dbe"),e=e(),Re(),e),No={class:"go-flex-items-center"},Go=xt(()=>$("span",{class:"btn-text"},"历史记录",-1)),Fo={class:"history-list-box"},Ko=["title"],zo=xt(()=>$("div",{class:"popover-modal"},null,-1)),Vo=j({__name:"index",setup(e){const{DesktopOutlineIcon:o,PencilIcon:t,TrashIcon:a,CopyIcon:s,LayersIcon:_,DuplicateIcon:c,HelpOutlineIcon:f,LockClosedOutlineIcon:p,LockOpenOutlineIcon:u,EyeOffOutlineIcon:v,EyeOutlineIcon:l}=le.ionicons5,{StackedMoveIcon:n,Carbon3DCursorIcon:h,Carbon3DSoftwareIcon:i}=le.carbon,d=jt(),S=E=>{if(E.targetType===ke.CANVAS)return o;switch(E.actionType){case D.UPDATE:return t;case D.DELETE:return a;case D.PASTE:return s;case D.TOP:return _;case D.BOTTOM:return _;case D.UP:return _;case D.DOWN:return _;case D.MOVE:return n;case D.ADD:return c;case D.GROUP:return h;case D.UN_GROUP:return i;case D.LOCK:return p;case D.UNLOCK:return u;case D.HIDE:return v;case D.SHOW:return l;default:return t}},g=E=>{if(E.targetType===ke.CANVAS)return Xe[ke.CANVAS];if(E.actionType===D.GROUP||E.actionType===D.UN_GROUP)return`${Xe[E.actionType]}`;if(E.historyData.length)return`${Xe[E.actionType]} - ${E.historyData[0].chartConfig.title}`},L=M(()=>{const b=d.getBackStack.map(Y=>({label:g(Y),icon:S(Y)}));return Bo(b.filter(Y=>Y.label))});return(E,b)=>{const Y=I("n-button"),G=I("n-icon"),se=I("n-text"),A=I("n-scrollbar"),m=I("n-popover"),R=I("n-tooltip");return w(),P("div",No,[x(m,{class:"edit-history-popover","show-arrow":!1,size:"small",trigger:"click",placement:"top-start"},{trigger:T(()=>[x(Y,{class:"mr-10",secondary:"",size:"small",disabled:L.value.length===0},{default:T(()=>[Go]),_:1},8,["disabled"])]),default:T(()=>[$("div",Fo,[x(A,{style:{"max-height":"500px"}},{default:T(()=>[(w(!0),P(re,null,ue(L.value,(C,k)=>(w(),P("div",{class:"list-item go-flex-items-center go-ellipsis-1",key:k,title:C.label},[x(G,{class:"item-icon",size:"16",depth:2,component:C.icon},null,8,["component"]),x(se,{depth:"2"},{default:T(()=>[_e(Q(C.label),1)]),_:2},1024)],8,Ko))),128))]),_:1}),zo])]),_:1}),x(R,{trigger:"hover"},{trigger:T(()=>[x(G,{size:"21",depth:3},{default:T(()=>[x(r(f))]),_:1})]),default:T(()=>[$("span",null,"最多只保留"+Q(r(Rt))+"条记录",1)]),_:1})])}}});const Wo=ee(Vo,[["__scopeId","data-v-78517dbe"]]),Je=e=>(Me("data-v-bbdb0a72"),e=e(),Re(),e),qo=Je(()=>$("th",null,"功能",-1)),jo=Je(()=>$("th",null,"Win 快捷键",-1)),Jo=Je(()=>$("span",null," Mac 快捷键 ",-1)),Zo={key:0},Qo={key:1},es=j({__name:"ShortcutKeyModal",props:{modelShow:Boolean},emits:["update:modelShow"],setup(e,{emit:o}){const t=e,{CloseIcon:a}=le.ionicons5,s=X(!1);ae(()=>t.modelShow,f=>{s.value=f});const _=[{label:"拖拽画布",win:`${N.SPACE.toUpperCase()} + 🖱️ `,mac:`${F.SPACE.toUpperCase()} + 🖱️ `,macSource:!0},{label:"向 上/右/下/左 移动",win:`${N.CTRL.toUpperCase()} + ↑ 或 → 或 ↓ 或 ←`,mac:`${F.CTRL.toUpperCase()} + ↑ `},{label:"锁定",win:`${N.CTRL.toUpperCase()} + L `,mac:`${F.CTRL.toUpperCase()} + L `},{label:"解锁",win:`${N.CTRL.toUpperCase()} + ${N.SHIFT.toUpperCase()}+ L `,mac:`${F.CTRL.toUpperCase()} + ${F.SHIFT.toUpperCase()} + L `},{label:"展示",win:`${N.CTRL.toUpperCase()} + H `,mac:`${F.CTRL.toUpperCase()} + H `},{label:"隐藏",win:`${N.CTRL.toUpperCase()} + ${N.SHIFT.toUpperCase()} + H `,mac:`${F.CTRL.toUpperCase()} + ${F.SHIFT.toUpperCase()} + H `},{label:"删除",win:"Delete".toUpperCase(),mac:`${F.CTRL.toUpperCase()} + Backspace `},{label:"复制",win:`${N.CTRL.toUpperCase()} + C `,mac:`${F.CTRL.toUpperCase()} + C `},{label:"剪切",win:`${N.CTRL.toUpperCase()} + X `,mac:`${F.CTRL.toUpperCase()} + X `},{label:"粘贴",win:`${N.CTRL.toUpperCase()} + V `,mac:`${F.CTRL.toUpperCase()} + V `},{label:"后退",win:`${N.CTRL.toUpperCase()} + Z `,mac:`${F.CTRL.toUpperCase()} + Z `},{label:"前进",win:`${N.CTRL.toUpperCase()} + ${N.SHIFT.toUpperCase()} + Z `,mac:`${F.CTRL.toUpperCase()} + ${F.SHIFT.toUpperCase()} + Z `},{label:"保存",win:`${N.CTRL.toUpperCase()} + S `,mac:`${F.CTRL.toUpperCase()} + S `},{label:"多选",win:`${N.CTRL.toUpperCase()} + 🖱️ `,mac:`${F.CTRL.toUpperCase()} + 🖱️ `},{label:"创建分组",win:`${N.CTRL.toUpperCase()} + G / 🖱️ `,mac:`${F.CTRL.toUpperCase()} + G / 🖱️`},{label:"解除分组",win:`${N.CTRL.toUpperCase()} + ${N.SHIFT.toUpperCase()} + G `,mac:`${F.CTRL.toUpperCase()} + ${N.SHIFT.toUpperCase()} + G `}],c=()=>{o("update:modelShow",!1)};return(f,p)=>{const u=I("n-icon"),v=I("n-space"),l=I("n-gradient-text"),n=I("n-table"),h=I("n-modal");return w(),B(h,{show:s.value,"onUpdate:show":p[0]||(p[0]=i=>s.value=i),"mask-closable":!0,onAfterLeave:c},{default:T(()=>[x(n,{class:"model-content",bordered:!1,"single-line":!1},{default:T(()=>[$("thead",null,[$("tr",null,[qo,jo,$("th",null,[x(v,{justify:"space-between"},{default:T(()=>[Jo,x(u,{size:"20",class:"go-cursor-pointer",onClick:c},{default:T(()=>[x(r(a))]),_:1})]),_:1})])])]),$("tbody",null,[(w(),P(re,null,ue(_,(i,d)=>$("tr",{key:d},[$("td",null,Q(i.label),1),$("td",null,Q(i.win),1),i.macSource?(w(),P("td",Zo,Q(i.mac),1)):(w(),P("td",Qo,[x(l,{size:22},{default:T(()=>[_e(Q(i.mac.substr(0,1)),1)]),_:2},1024),_e(" + "+Q(i.mac.substr(3)),1)]))])),64))])]),_:1})]),_:1},8,["show"])}}});const ts=ee(es,[["__scopeId","data-v-bbdb0a72"]]),os=e=>(Me("data-v-f48c63d8"),e=e(),Re(),e),ss={class:"go-edit-shortcut"},ns=os(()=>$("span",null,"快捷键",-1)),as=j({__name:"index",setup(e){const{DicomOverlayIcon:o}=le.carbon,t=X(!1);return(a,s)=>{const _=I("n-icon"),c=I("n-button"),f=I("n-tooltip");return w(),P("div",ss,[x(ts,{modelShow:t.value,"onUpdate:modelShow":s[0]||(s[0]=p=>t.value=p)},null,8,["modelShow"]),x(f,{trigger:"hover"},{trigger:T(()=>[x(c,{class:"scale-btn",secondary:"",size:"small",onClick:s[1]||(s[1]=p=>t.value=!0)},{default:T(()=>[x(_,{size:"21",depth:3},{default:T(()=>[x(r(o))]),_:1})]),_:1})]),default:T(()=>[ns]),_:1})])}}});const rs=ee(as,[["__scopeId","data-v-f48c63d8"]]),cs={class:"go-edit-data-sync go-flex-items-center"},ls=j({__name:"index",setup(e){fe(v=>({"07b59586":_.value}));const{ReloadIcon:o}=le.ionicons5,t=te(),a=he(),{saveStatus:s}=Se(t.getEditCanvas),_=X(a.getAppTheme),c=X(""),f=X("");let p=setTimeout(()=>{});const u={[pe.PENDING]:{text:"等待自动同步",type:""},[pe.START]:{text:"正在同步中",type:"success"},[pe.SUCCESS]:{text:"同步成功!",type:"success"},[pe.FAILURE]:{text:"同步失败!",type:"error"}};return ae(()=>s.value,v=>{clearTimeout(p),c.value=u[v].text,f.value=u[v].type,p=setTimeout(()=>{c.value=u[pe.PENDING].text,f.value=u[pe.PENDING].type},3e3)},{immediate:!0}),(v,l)=>{const n=I("n-text"),h=I("n-tooltip"),i=I("n-icon"),d=I("n-spin");return w(),P("div",cs,[x(h,{trigger:"hover"},{trigger:T(()=>[x(n,{class:"status-desc go-ml-2",type:f.value,depth:"3"},{default:T(()=>[_e(Q(c.value),1)]),_:1},8,["type"])]),default:T(()=>[$("span",null,Q(r(Ut))+"s 更新一次",1)]),_:1}),be(x(d,{class:"go-ml-2",size:"small"},{icon:T(()=>[x(i,{size:"13"},{default:T(()=>[x(r(o))]),_:1})]),_:1},512),[[Le,c.value===u[1].text]])])}}});const is=ee(ls,[["__scopeId","data-v-18522cbc"]]),us={class:"go-edit-bottom"},ds=j({__name:"index",setup(e){fe(L=>({"66b99d9b":s.value}));const{LockClosedOutlineIcon:o,LockOpenOutlineIcon:t}=le.ionicons5,a=he(),s=X(a.getAppTheme),_=gt(),c=te(),{lockScale:f,scale:p}=Se(c.getEditCanvas),u=X(null);let v=[{label:"200%",value:200},{label:"150%",value:150},{label:"100%",value:100},{label:"50%",value:50},{label:"自适应",value:0}];const l=X(""),n=L=>{var E;if((E=u.value)==null||E.blur(),L===0){_.setItemUnHandle(mt.RE_POSITION_CANVAS,!0),c.computedScale();return}c.setScale(L/100)},h=()=>{c.setEditCanvas(W.LOCK_SCALE,!f.value)},i=X(100),d=L=>`${L}%`,S=L=>{c.setScale(L/100)},g=qe({100:""});return Ot(()=>{const L=(p.value*100).toFixed(0);l.value=`${L}%`,i.value=parseInt(L)}),(L,E)=>{const b=I("n-text"),Y=I("n-divider"),G=I("n-space"),se=I("n-select"),A=I("n-icon"),m=I("n-button"),R=I("n-tooltip"),C=I("n-slider");return w(),P("div",us,[x(G,null,{default:T(()=>[x(r(Wo)),x(b,{id:"keyboard-dress-show",depth:"3"}),x(Y,{vertical:""}),x(r(is))]),_:1}),x(G,{class:"bottom-ri"},{default:T(()=>[x(r(rs)),x(se,{ref_key:"selectInstRef",ref:u,class:"scale-btn",value:l.value,"onUpdate:value":[E[0]||(E[0]=k=>l.value=k),n],size:"mini",disabled:r(f),options:r(v)},null,8,["value","disabled","options"]),x(R,{trigger:"hover"},{trigger:T(()=>[x(m,{onClick:h,text:""},{default:T(()=>[x(A,{class:ne(["lock-icon",{color:r(f)}]),size:"18",depth:2},{default:T(()=>[r(f)?(w(),B(r(o),{key:0})):(w(),B(r(t),{key:1}))]),_:1},8,["class"])]),_:1})]),default:T(()=>[$("span",null,Q(r(f)?"解锁":"锁定")+"当前比例",1)]),_:1}),x(C,{class:"scale-slider",value:i.value,"onUpdate:value":[E[1]||(E[1]=k=>i.value=k),S],"default-value":50,min:10,max:200,step:5,"format-tooltip":d,disabled:r(f),marks:g},null,8,["value","disabled","marks"])]),_:1})])}}});const ps=ee(ds,[["__scopeId","data-v-b2aae0a1"]]),Ce=te(),vs=()=>{Ce.setTargetSelectChart(void 0),Ht(At(Ce.getStorageInfo||[]),void 0,"json");const e=document.querySelector(".go-edit-range"),o=document.getElementById("go-edit-watermark");if(!e||!o){window.$message.error("导出失败!");return}const t=Ce.getEditCanvas.scale;Ce.setScale(1,!0),o.style.display="block",setTimeout(()=>{Pt(e,()=>{o&&(o.style.display="none"),Ce.setScale(t,!0)})},600)},_s=()=>{const e=X(),{updateComponent:o}=ht();return{importUploadFileListRef:e,importBeforeUpload:({file:s})=>{e.value=[];const _=s.file.type;return _!==at.JSON&&_!==at.TXT?(window.$message.warning("仅支持上传 【JSON】 格式文件,请重新上传!"),!1):!0},importCustomRequest:s=>{const{file:_}=s;Yt(()=>{_.file?Xt(_.file).then(c=>{oo({message:"请选择导入方式:",positiveText:"新增(可撤回)",negativeText:"覆盖(不可撤回)",negativeButtonProps:{type:"info",ghost:!1},onPositiveCallback:()=>de(void 0,null,function*(){try{c=Be(c),yield o(c,!1,!0),window.$message.success("导入成功!")}catch(f){console.log(f),window.$message.error("组件导入失败,请检查文件完整性!")}}),onNegativeCallback:()=>de(void 0,null,function*(){try{c=Be(c),yield o(c,!0,!0),window.$message.success("导入成功!")}catch(f){console.log(f),window.$message.error("组件导入失败,请检查文件完整性!")}})})}):window.$message.error("导入失败,请检查数据或联系管理员!")})}}};var ce=(e=>(e.BUTTON="button",e.IMPORTUPLOAD="importUpload",e))(ce||{});const fs={class:"btn-item"},hs=j({__name:"index",setup(e){const{DownloadIcon:o,ShareIcon:t,PawIcon:a,SettingsSharpIcon:s,CreateIcon:_}=le.ionicons5,c=_t(),f=te();Bt(),ao();let p=null;const u=X(!1),v=X(!0),l=X(!0),{importUploadFileListRef:n,importCustomRequest:h,importBeforeUpload:i}=_s(),d=M(()=>c.getChartToolsStatus===st.ASIDE),S=M(()=>c.getChartToolsStatusHide),g=M(()=>v.value&&S.value),L=M(()=>{if(!d.value)return se;const A=[];return se.map(m=>{A.unshift(m)}),A}),E=()=>{p=setTimeout(()=>{v.value&&(v.value=!1,l.value=!0)},200),setTimeout(()=>{l.value=!1},400)},b=()=>{clearTimeout(p),v.value||(v.value=!0)},Y=()=>{window.$message.warning("请通过顶部【同步内容】按钮同步最新数据!"),f.setEditCanvas(W.IS_CODE_EDIT,!0),setTimeout(()=>{const A=Gt(Ft.CHART_EDIT_NAME,"href");if(!A)return;const m=Kt();G(m),zt(A,[m],void 0,!0)},2e3)},G=A=>{const m=f.getStorageInfo,R=Vt(Ee.GO_CHART_STORAGE_LIST)||[];if(R!=null&&R.length){const C=R.findIndex(k=>k.id===A);C!==-1?(R.splice(C,1,ge(H({},m),{id:A})),Ae(Ee.GO_CHART_STORAGE_LIST,R)):(R.push(ge(H({},m),{id:A})),Ae(Ee.GO_CHART_STORAGE_LIST,R))}else Ae(Ee.GO_CHART_STORAGE_LIST,[ge(H({},m),{id:A})])},se=[{key:"import",type:ce.IMPORTUPLOAD,name:"导入",icon:t},{key:"export",type:ce.BUTTON,name:"导出",icon:o,handle:vs},{key:"edit",type:ce.BUTTON,name:"编辑",icon:_,handle:Y},{key:"setting",type:ce.BUTTON,name:"设置",icon:s,handle:()=>{u.value=!0}}];return(A,m)=>{const R=I("n-icon"),C=I("n-text"),k=I("n-button"),U=I("n-upload"),V=I("n-tooltip");return w(),P(re,null,[$("div",{class:ne(["go-chart-edit-tools",[r(c).getChartToolsStatus,g.value?"isMini":"unMini"]]),onClick:m[1]||(m[1]=O=>v.value&&(v.value=!1)),onMouseenter:E,onMouseleave:b},[be(x(R,{class:"asideLogo",size:"22"},{default:T(()=>[x(r(a))]),_:1},512),[[Le,r(c).getChartToolsStatus===r(st).ASIDE&&g.value]]),(w(!0),P(re,null,ue(L.value,(O,Te)=>(w(),B(V,{key:O.key,disabled:!d.value||S.value&&l.value,trigger:"hover",placement:"left"},{trigger:T(()=>[$("div",fs,[O.type===r(ce).BUTTON?(w(),B(k,{key:0,circle:d.value,secondary:"",onClick:O.handle},{icon:T(()=>[d.value?(w(),B(R,{key:0,size:"22"},{default:T(()=>[(w(),B(ve(O.icon)))]),_:2},1024)):(w(),B(ve(O.icon),{key:1}))]),default:T(()=>[be(x(C,{depth:"3"},{default:T(()=>[_e(Q(O.name),1)]),_:2},1536),[[Le,!d.value]])]),_:2},1032,["circle","onClick"])):O.type===r(ce).IMPORTUPLOAD?(w(),B(U,{key:1,"file-list":r(n),"onUpdate:fileList":m[0]||(m[0]=z=>Nt(n)?n.value=z:null),"show-file-list":!1,customRequest:r(h),onBeforeUpload:r(i)},{default:T(()=>[x(k,{circle:d.value,secondary:""},{icon:T(()=>[d.value?(w(),B(R,{key:0,size:"22"},{default:T(()=>[(w(),B(ve(O.icon)))]),_:2},1024)):(w(),B(ve(O.icon),{key:1}))]),default:T(()=>[be(x(C,{depth:"3"},{default:T(()=>[_e(Q(O.name),1)]),_:2},1536),[[Le,!d.value]])]),_:2},1032,["circle"])]),_:2},1032,["file-list","customRequest","onBeforeUpload"])):ye("",!0)])]),default:T(()=>[$("span",null,Q(O.name),1)]),_:2},1032,["disabled"]))),128))],34),x(r(no),{modelShow:u.value,"onUpdate:modelShow":m[2]||(m[2]=O=>u.value=O)},null,8,["modelShow"])],64)}}});const gs=ee(hs,[["__scopeId","data-v-3649ae11"]]),ms=j({__name:"index",setup(e){const o=te(),{handleContextMenu:t}=je(),{dataSyncFetch:a,intervalDataSyncUpdate:s}=ht();Wt(Zt,null),ro(()=>de(this,null,function*(){}));const{mouseenterHandle:_,mouseleaveHandle:c,mousedownHandle:f,mouseClickHandle:p}=yt(),u=(h,i,d)=>{if(o.getTargetChart.selectId.length>1)return i.filter(g=>[Z.GROUP,Z.DELETE].includes(g.key));const S=[];return d.status.lock?S.push(Z.LOCK):S.push(Z.UNLOCK),d.status.hide?S.push(Z.HIDE):S.push(Z.SHOW),h.filter(g=>!S.includes(g.key))},v=M(()=>o.getEditCanvasConfig.chartThemeSetting),l=M(()=>pt(o.getEditCanvasConfig.chartCustomThemeColorInfo)[o.getEditCanvasConfig.chartThemeColor]);M(()=>o.getEditCanvasConfig.filterShow);const n=M(()=>{const h=o.getEditCanvasConfig.background,i=o.getEditCanvasConfig.backgroundImage,g=o.getEditCanvasConfig.selectColor?{background:h||void 0}:{background:`url(${i}) no-repeat center center / cover !important`};return ge(H({},g),{width:"inherit",height:"inherit"})});return Ve(()=>{Qt(),a(),s()}),(h,i)=>(w(),B(r(so),{id:"go-chart-edit-layout",flex:!0,showTop:!1,showBottom:!0,depth:1,xScroll:!0,disabledScroll:!0,onMousedown:r(Ct),onDrop:r(lo),onDragover:r(rt),onDragenter:r(rt)},{aside:T(()=>[x(r(gs))]),bottom:T(()=>[x(r(ps))]),default:T(()=>[x(r(Ho),null,{default:T(()=>[$("div",{id:"go-chart-edit-content",onContextmenu:i[0]||(i[0]=(...d)=>r(t)&&r(t)(...d))},[x(r(ko),null,{default:T(()=>[$("div",{style:q(H(H({},r(De)(r(o).getEditCanvasConfig)),n.value))},[(w(!0),P(re,null,ue(r(o).getComponentList,(d,S)=>(w(),P("div",{key:d.id},[d.isGroup?(w(),B(r(ho),{key:0,groupData:d,groupIndex:S},null,8,["groupData","groupIndex"])):(w(),B(r(Fe),{key:1,"data-id":d.id,index:S,style:q(H(H({},r($e)(d.attr,S)),r(vt)(d.styles))),item:d,onClick:g=>r(p)(g,d),onMousedown:g=>r(f)(g,d),onMouseenter:g=>r(_)(g,d),onMouseleave:g=>r(c)(g,d),onContextmenu:g=>r(t)(g,d,u)},{default:T(()=>[(w(),B(ve(d.chartConfig.chartKey),{class:ne(["edit-content-chart",r(Ne)(d.styles.animations)]),chartConfig:d,themeSetting:v.value,themeColor:l.value,style:q(H(H(H({},r(ie)(d.attr)),r(De)(d.styles)),r(Ge)(d.styles)))},null,8,["class","chartConfig","themeSetting","themeColor","style"]))]),_:2},1032,["data-id","index","style","item","onClick","onMousedown","onMouseenter","onMouseleave","onContextmenu"]))]))),128))],4)]),_:1})],32)]),_:1})]),_:1},8,["onMousedown","onDrop","onDragover","onDragenter"]))}});const Xs=ee(ms,[["__scopeId","data-v-7357bdca"]]);export{Xs as default};