@wyltils/ems-editor 1.0.53 → 1.0.55
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es.js +65 -24
- package/dist/index.umd.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +46 -46
package/dist/index.umd.js
CHANGED
|
@@ -890,7 +890,7 @@ echarts.use([`+I+"]);":"Unknown series "+T))}return}if(d==="tooltip"){if(b){proc
|
|
|
890
890
|
`,"Illegal config:",h,`.
|
|
891
891
|
`)),zi(i));var _=f?Pwe(f):null;f&&!_&&(process.env.NODE_ENV!=="production"&&(i=nl("Invalid parser name "+f+`.
|
|
892
892
|
`,"Illegal config:",h,`.
|
|
893
|
-
`)),zi(i)),s.push({dimIdx:v.index,parser:_,comparator:new Vwe(u,g)})});var o=e.sourceFormat;o!==xa&&o!==Bh&&(process.env.NODE_ENV!=="production"&&(i='sourceFormat "'+o+'" is not supported yet'),zi(i));for(var a=[],l=0,c=e.count();l<c;l++)a.push(e.getRawDataItem(l));return a.sort(function(h,d){for(var u=0;u<s.length;u++){var f=s[u],g=e.retrieveValueFromItem(h,f.dimIdx),p=e.retrieveValueFromItem(d,f.dimIdx);f.parser&&(g=f.parser(g),p=f.parser(p));var m=f.comparator.evaluate(g,p);if(m!==0)return m}return 0}),{data:a}}};function _St(n){n.registerTransform(mSt),n.registerTransform(vSt)}var bSt=function(n){de(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type="dataset",t}return e.prototype.init=function(t,i,r){n.prototype.init.call(this,t,i,r),this._sourceManager=new $we(this),Uwe(this)},e.prototype.mergeOption=function(t,i){n.prototype.mergeOption.call(this,t,i),Uwe(this)},e.prototype.optionUpdated=function(){this._sourceManager.dirty()},e.prototype.getSourceManager=function(){return this._sourceManager},e.type="dataset",e.defaultOption={seriesLayoutBy:df},e}(ei),ySt=function(n){de(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type="dataset",t}return e.type="dataset",e}(ur);function wSt(n){n.registerComponentModel(bSt),n.registerComponentView(ySt)}var yf=lf.CMD;function gL(n,e){return Math.abs(n-e)<1e-5}function AZ(n){var e=n.data,t=n.len(),i=[],r,s=0,o=0,a=0,l=0;function c(N,M){r&&r.length>2&&i.push(r),r=[N,M]}function h(N,M,P,R){gL(N,P)&&gL(M,R)||r.push(N,M,P,R,P,R)}function d(N,M,P,R,W,z){var $=Math.abs(M-N),G=Math.tan($/4)*4/3,Y=M<N?-1:1,K=Math.cos(N),Z=Math.sin(N),Q=Math.cos(M),ae=Math.sin(M),Ie=K*W+P,$e=Z*z+R,Ee=Q*W+P,le=ae*z+R,we=W*G*Y,be=z*G*Y;r.push(Ie-we*Z,$e+be*K,Ee+we*ae,le-be*Q,Ee,le)}for(var u,f,g,p,m=0;m<t;){var v=e[m++],_=m===1;switch(_&&(s=e[m],o=e[m+1],a=s,l=o,(v===yf.L||v===yf.C||v===yf.Q)&&(r=[a,l])),v){case yf.M:s=a=e[m++],o=l=e[m++],c(a,l);break;case yf.L:u=e[m++],f=e[m++],h(s,o,u,f),s=u,o=f;break;case yf.C:r.push(e[m++],e[m++],e[m++],e[m++],s=e[m++],o=e[m++]);break;case yf.Q:u=e[m++],f=e[m++],g=e[m++],p=e[m++],r.push(s+2/3*(u-s),o+2/3*(f-o),g+2/3*(u-g),p+2/3*(f-p),g,p),s=g,o=p;break;case yf.A:var b=e[m++],y=e[m++],C=e[m++],x=e[m++],L=e[m++],D=e[m++]+L;m+=1;var E=!e[m++];u=Math.cos(L)*C+b,f=Math.sin(L)*x+y,_?(a=u,l=f,c(a,l)):h(s,o,u,f),s=Math.cos(D)*C+b,o=Math.sin(D)*x+y;for(var k=(E?-1:1)*Math.PI/2,T=L;E?T>D:T<D;T+=k){var I=E?Math.max(T+k,D):Math.min(T+k,D);d(T,I,b,y,C,x)}break;case yf.R:a=s=e[m++],l=o=e[m++],u=a+e[m++],f=l+e[m++],c(u,l),h(u,l,u,f),h(u,f,a,f),h(a,f,a,l),h(a,l,u,l);break;case yf.Z:r&&h(s,o,a,l),s=a,o=l;break}}return r&&r.length>2&&i.push(r),i}function RZ(n,e,t,i,r,s,o,a,l,c){if(gL(n,t)&&gL(e,i)&&gL(r,o)&&gL(s,a)){l.push(o,a);return}var h=2/c,d=h*h,u=o-n,f=a-e,g=Math.sqrt(u*u+f*f);u/=g,f/=g;var p=t-n,m=i-e,v=r-o,_=s-a,b=p*p+m*m,y=v*v+_*_;if(b<d&&y<d){l.push(o,a);return}var C=u*p+f*m,x=-u*v-f*_,L=b-C*C,D=y-x*x;if(L<d&&C>=0&&D<d&&x>=0){l.push(o,a);return}var E=[],k=[];Av(n,t,r,o,.5,E),Av(e,i,s,a,.5,k),RZ(E[0],k[0],E[1],k[1],E[2],k[2],E[3],k[3],l,c),RZ(E[4],k[4],E[5],k[5],E[6],k[6],E[7],k[7],l,c)}function CSt(n,e){var t=AZ(n),i=[];e=e||1;for(var r=0;r<t.length;r++){var s=t[r],o=[],a=s[0],l=s[1];o.push(a,l);for(var c=2;c<s.length;){var h=s[c++],d=s[c++],u=s[c++],f=s[c++],g=s[c++],p=s[c++];RZ(a,l,h,d,u,f,g,p,o,e),a=g,l=p}i.push(o)}return i}function sIe(n,e,t){var i=n[e],r=n[1-e],s=Math.abs(i/r),o=Math.ceil(Math.sqrt(s*t)),a=Math.floor(t/o);a===0&&(a=1,o=t);for(var l=[],c=0;c<o;c++)l.push(a);var h=o*a,d=t-h;if(d>0)for(var c=0;c<d;c++)l[c%o]+=1;return l}function oIe(n,e,t){for(var i=n.r0,r=n.r,s=n.startAngle,o=n.endAngle,a=Math.abs(o-s),l=a*r,c=r-i,h=l>Math.abs(c),d=sIe([l,c],h?0:1,e),u=(h?a:c)/d.length,f=0;f<d.length;f++)for(var g=(h?c:a)/d[f],p=0;p<d[f];p++){var m={};h?(m.startAngle=s+u*f,m.endAngle=s+u*(f+1),m.r0=i+g*p,m.r=i+g*(p+1)):(m.startAngle=s+g*p,m.endAngle=s+g*(p+1),m.r0=i+u*f,m.r=i+u*(f+1)),m.clockwise=n.clockwise,m.cx=n.cx,m.cy=n.cy,t.push(m)}}function SSt(n,e,t){for(var i=n.width,r=n.height,s=i>r,o=sIe([i,r],s?0:1,e),a=s?"width":"height",l=s?"height":"width",c=s?"x":"y",h=s?"y":"x",d=n[a]/o.length,u=0;u<o.length;u++)for(var f=n[l]/o[u],g=0;g<o[u];g++){var p={};p[c]=u*d,p[h]=g*f,p[a]=d,p[l]=f,p.x+=n.x,p.y+=n.y,t.push(p)}}function aIe(n,e,t,i){return n*i-t*e}function xSt(n,e,t,i,r,s,o,a){var l=t-n,c=i-e,h=o-r,d=a-s,u=aIe(h,d,l,c);if(Math.abs(u)<1e-6)return null;var f=n-r,g=e-s,p=aIe(f,g,h,d)/u;return p<0||p>1?null:new Vt(p*l+n,p*c+e)}function LSt(n,e,t){var i=new Vt;Vt.sub(i,t,e),i.normalize();var r=new Vt;Vt.sub(r,n,e);var s=r.dot(i);return s}function pL(n,e){var t=n[n.length-1];t&&t[0]===e[0]&&t[1]===e[1]||n.push(e)}function DSt(n,e,t){for(var i=n.length,r=[],s=0;s<i;s++){var o=n[s],a=n[(s+1)%i],l=xSt(o[0],o[1],a[0],a[1],e.x,e.y,t.x,t.y);l&&r.push({projPt:LSt(l,e,t),pt:l,idx:s})}if(r.length<2)return[{points:n},{points:n}];r.sort(function(m,v){return m.projPt-v.projPt});var c=r[0],h=r[r.length-1];if(h.idx<c.idx){var d=c;c=h,h=d}for(var u=[c.pt.x,c.pt.y],f=[h.pt.x,h.pt.y],g=[u],p=[f],s=c.idx+1;s<=h.idx;s++)pL(g,n[s].slice());pL(g,f),pL(g,u);for(var s=h.idx+1;s<=c.idx+i;s++)pL(p,n[s%i].slice());return pL(p,u),pL(p,f),[{points:g},{points:p}]}function lIe(n){var e=n.points,t=[],i=[];x4(e,t,i);var r=new Bt(t[0],t[1],i[0]-t[0],i[1]-t[1]),s=r.width,o=r.height,a=r.x,l=r.y,c=new Vt,h=new Vt;return s>o?(c.x=h.x=a+s/2,c.y=l,h.y=l+o):(c.y=h.y=l+o/2,c.x=a,h.x=a+s),DSt(e,c,h)}function H6(n,e,t,i){if(t===1)i.push(e);else{var r=Math.floor(t/2),s=n(e);H6(n,s[0],r,i),H6(n,s[1],t-r,i)}return i}function ESt(n,e){for(var t=[],i=0;i<e;i++)t.push(nq(n));return t}function kSt(n,e){e.setStyle(n.style),e.z=n.z,e.z2=n.z2,e.zlevel=n.zlevel}function TSt(n){for(var e=[],t=0;t<n.length;)e.push([n[t++],n[t++]]);return e}function ISt(n,e){var t=[],i=n.shape,r;switch(n.type){case"rect":SSt(i,e,t),r=_i;break;case"sector":oIe(i,e,t),r=ol;break;case"circle":oIe({r0:0,r:i.r,startAngle:0,endAngle:Math.PI*2,cx:i.cx,cy:i.cy},e,t),r=ol;break;default:var s=n.getComputedTransform(),o=s?Math.sqrt(Math.max(s[0]*s[0]+s[1]*s[1],s[2]*s[2]+s[3]*s[3])):1,a=Le(CSt(n.getUpdatedPathProxy(),o),function(v){return TSt(v)}),l=a.length;if(l===0)H6(lIe,{points:a[0]},e,t);else if(l===e)for(var c=0;c<l;c++)t.push({points:a[c]});else{var h=0,d=Le(a,function(v){var _=[],b=[];x4(v,_,b);var y=(b[1]-_[1])*(b[0]-_[0]);return h+=y,{poly:v,area:y}});d.sort(function(v,_){return _.area-v.area});for(var u=e,c=0;c<l;c++){var f=d[c];if(u<=0)break;var g=c===l-1?u:Math.ceil(f.area/h*e);g<0||(H6(lIe,{points:f.poly},g,t),u-=g)}}r=al;break}if(!r)return ESt(n,e);for(var p=[],c=0;c<t.length;c++){var m=new r;m.setShape(t[c]),kSt(n,m),p.push(m)}return p}function NSt(n,e){var t=n.length,i=e.length;if(t===i)return[n,e];for(var r=[],s=[],o=t<i?n:e,a=Math.min(t,i),l=Math.abs(i-t)/6,c=(a-2)/6,h=Math.ceil(l/c)+1,d=[o[0],o[1]],u=l,f=2;f<a;){var g=o[f-2],p=o[f-1],m=o[f++],v=o[f++],_=o[f++],b=o[f++],y=o[f++],C=o[f++];if(u<=0){d.push(m,v,_,b,y,C);continue}for(var x=Math.min(u,h-1)+1,L=1;L<=x;L++){var D=L/x;Av(g,m,_,y,D,r),Av(p,v,b,C,D,s),g=r[3],p=s[3],d.push(r[1],s[1],r[2],s[2],g,p),m=r[5],v=s[5],_=r[6],b=s[6]}u-=x-1}return o===n?[d,e]:[n,d]}function cIe(n,e){for(var t=n.length,i=n[t-2],r=n[t-1],s=[],o=0;o<e.length;)s[o++]=i,s[o++]=r;return s}function MSt(n,e){for(var t,i,r,s=[],o=[],a=0;a<Math.max(n.length,e.length);a++){var l=n[a],c=e[a],h=void 0,d=void 0;l?c?(t=NSt(l,c),h=t[0],d=t[1],i=h,r=d):(d=cIe(r||l,l),h=l):(h=cIe(i||c,c),d=c),s.push(h),o.push(d)}return[s,o]}function hIe(n){for(var e=0,t=0,i=0,r=n.length,s=0,o=r-2;s<r;o=s,s+=2){var a=n[o],l=n[o+1],c=n[s],h=n[s+1],d=a*h-c*l;e+=d,t+=(a+c)*d,i+=(l+h)*d}return e===0?[n[0]||0,n[1]||0]:[t/e/3,i/e/3,e]}function ASt(n,e,t,i){for(var r=(n.length-2)/6,s=1/0,o=0,a=n.length,l=a-2,c=0;c<r;c++){for(var h=c*6,d=0,u=0;u<a;u+=2){var f=u===0?h:(h+u-2)%l+2,g=n[f]-t[0],p=n[f+1]-t[1],m=e[u]-i[0],v=e[u+1]-i[1],_=m-g,b=v-p;d+=_*_+b*b}d<s&&(s=d,o=c)}return o}function RSt(n){for(var e=[],t=n.length,i=0;i<t;i+=2)e[i]=n[t-i-2],e[i+1]=n[t-i-1];return e}function PSt(n,e,t,i){for(var r=[],s,o=0;o<n.length;o++){var a=n[o],l=e[o],c=hIe(a),h=hIe(l);s==null&&(s=c[2]<0!=h[2]<0);var d=[],u=[],f=0,g=1/0,p=[],m=a.length;s&&(a=RSt(a));for(var v=ASt(a,l,c,h)*6,_=m-2,b=0;b<_;b+=2){var y=(v+b)%_+2;d[b+2]=a[y]-c[0],d[b+3]=a[y+1]-c[1]}d[0]=a[v]-c[0],d[1]=a[v+1]-c[1];for(var C=i/t,x=-i/2;x<=i/2;x+=C){for(var L=Math.sin(x),D=Math.cos(x),E=0,b=0;b<a.length;b+=2){var k=d[b],T=d[b+1],I=l[b]-h[0],N=l[b+1]-h[1],M=I*D-N*L,P=I*L+N*D;p[b]=M,p[b+1]=P;var R=M-k,W=P-T;E+=R*R+W*W}if(E<g){g=E,f=x;for(var z=0;z<p.length;z++)u[z]=p[z]}}r.push({from:d,to:u,fromCp:c,toCp:h,rotation:-f})}return r}function z6(n){return n.__isCombineMorphing}var dIe="__mOriginal_";function $6(n,e,t){var i=dIe+e,r=n[i]||n[e];n[i]||(n[i]=n[e]);var s=t.replace,o=t.after,a=t.before;n[e]=function(){var l=arguments,c;return a&&a.apply(this,l),s?c=s.apply(this,l):c=r.apply(this,l),o&&o.apply(this,l),c}}function sN(n,e){var t=dIe+e;n[t]&&(n[e]=n[t],n[t]=null)}function uIe(n,e){for(var t=0;t<n.length;t++)for(var i=n[t],r=0;r<i.length;){var s=i[r],o=i[r+1];i[r++]=e[0]*s+e[2]*o+e[4],i[r++]=e[1]*s+e[3]*o+e[5]}}function fIe(n,e){var t=n.getUpdatedPathProxy(),i=e.getUpdatedPathProxy(),r=MSt(AZ(t),AZ(i)),s=r[0],o=r[1],a=n.getComputedTransform(),l=e.getComputedTransform();function c(){this.transform=null}a&&uIe(s,a),l&&uIe(o,l),$6(e,"updateTransform",{replace:c}),e.transform=null;var h=PSt(s,o,10,Math.PI),d=[];$6(e,"buildPath",{replace:function(u){for(var f=e.__morphT,g=1-f,p=[],m=0;m<h.length;m++){var v=h[m],_=v.from,b=v.to,y=v.rotation*f,C=v.fromCp,x=v.toCp,L=Math.sin(y),D=Math.cos(y);U3(p,C,x,f);for(var E=0;E<_.length;E+=2){var k=_[E],T=_[E+1],I=b[E],N=b[E+1],M=k*g+I*f,P=T*g+N*f;d[E]=M*D-P*L+p[0],d[E+1]=M*L+P*D+p[1]}var R=d[0],W=d[1];u.moveTo(R,W);for(var E=2;E<_.length;){var I=d[E++],N=d[E++],z=d[E++],$=d[E++],G=d[E++],Y=d[E++];R===I&&W===N&&z===G&&$===Y?u.lineTo(G,Y):u.bezierCurveTo(I,N,z,$,G,Y),R=G,W=Y}}}})}function PZ(n,e,t){if(!n||!e)return e;var i=t.done,r=t.during;fIe(n,e),e.__morphT=0;function s(){sN(e,"buildPath"),sN(e,"updateTransform"),e.__morphT=-1,e.createPathProxy(),e.dirtyShape()}return e.animateTo({__morphT:1},dt({during:function(o){e.dirtyShape(),r&&r(o)},done:function(){s(),i&&i()}},t)),e}function OSt(n,e,t,i,r,s){var o=16;n=r===t?0:Math.round(32767*(n-t)/(r-t)),e=s===i?0:Math.round(32767*(e-i)/(s-i));for(var a=0,l,c=(1<<o)/2;c>0;c/=2){var h=0,d=0;(n&c)>0&&(h=1),(e&c)>0&&(d=1),a+=c*c*(3*h^d),d===0&&(h===1&&(n=c-1-n,e=c-1-e),l=n,n=e,e=l)}return a}function U6(n){var e=1/0,t=1/0,i=-1/0,r=-1/0,s=Le(n,function(a){var l=a.getBoundingRect(),c=a.getComputedTransform(),h=l.x+l.width/2+(c?c[4]:0),d=l.y+l.height/2+(c?c[5]:0);return e=Math.min(h,e),t=Math.min(d,t),i=Math.max(h,i),r=Math.max(d,r),[h,d]}),o=Le(s,function(a,l){return{cp:a,z:OSt(a[0],a[1],e,t,i,r),path:n[l]}});return o.sort(function(a,l){return a.z-l.z}).map(function(a){return a.path})}function gIe(n){return ISt(n.path,n.count)}function OZ(){return{fromIndividuals:[],toIndividuals:[],count:0}}function VSt(n,e,t){var i=[];function r(C){for(var x=0;x<C.length;x++){var L=C[x];z6(L)?r(L.childrenRef()):L instanceof Jt&&i.push(L)}}r(n);var s=i.length;if(!s)return OZ();var o=t.dividePath||gIe,a=o({path:e,count:s});if(a.length!==s)return console.error("Invalid morphing: unmatched splitted path"),OZ();i=U6(i),a=U6(a);for(var l=t.done,c=t.during,h=t.individualDelay,d=new ep,u=0;u<s;u++){var f=i[u],g=a[u];g.parent=e,g.copyTransform(d),h||fIe(f,g)}e.__isCombineMorphing=!0,e.childrenRef=function(){return a};function p(C){for(var x=0;x<a.length;x++)a[x].addSelfToZr(C)}$6(e,"addSelfToZr",{after:function(C){p(C)}}),$6(e,"removeSelfFromZr",{after:function(C){for(var x=0;x<a.length;x++)a[x].removeSelfFromZr(C)}});function m(){e.__isCombineMorphing=!1,e.__morphT=-1,e.childrenRef=null,sN(e,"addSelfToZr"),sN(e,"removeSelfFromZr")}var v=a.length;if(h)for(var _=v,b=function(){_--,_===0&&(m(),l&&l())},u=0;u<v;u++){var y=h?dt({delay:(t.delay||0)+h(u,v,i[u],a[u]),done:b},t):t;PZ(i[u],a[u],y)}else e.__morphT=0,e.animateTo({__morphT:1},dt({during:function(C){for(var x=0;x<v;x++){var L=a[x];L.__morphT=e.__morphT,L.dirtyShape()}c&&c(C)},done:function(){m();for(var C=0;C<n.length;C++)sN(n[C],"updateTransform");l&&l()}},t));return e.__zr&&p(e.__zr),{fromIndividuals:i,toIndividuals:a,count:v}}function FSt(n,e,t){var i=e.length,r=[],s=t.dividePath||gIe;function o(f){for(var g=0;g<f.length;g++){var p=f[g];z6(p)?o(p.childrenRef()):p instanceof Jt&&r.push(p)}}if(z6(n)){o(n.childrenRef());var a=r.length;if(a<i)for(var l=0,c=a;c<i;c++)r.push(nq(r[l++%a]));r.length=i}else{r=s({path:n,count:i});for(var h=n.getComputedTransform(),c=0;c<r.length;c++)r[c].setLocalTransform(h);if(r.length!==i)return console.error("Invalid morphing: unmatched splitted path"),OZ()}r=U6(r),e=U6(e);for(var d=t.individualDelay,c=0;c<i;c++){var u=d?dt({delay:(t.delay||0)+d(c,i,r[c],e[c])},t):t;PZ(r[c],e[c],u)}return{fromIndividuals:r,toIndividuals:e,count:e.length}}function pIe(n){return xe(n[0])}function mIe(n,e){for(var t=[],i=n.length,r=0;r<i;r++)t.push({one:n[r],many:[]});for(var r=0;r<e.length;r++){var s=e[r].length,o=void 0;for(o=0;o<s;o++)t[o%i].many.push(e[r][o])}for(var a=0,r=i-1;r>=0;r--)if(!t[r].many.length){var l=t[a].many;if(l.length<=1)if(a)a=0;else return t;var s=l.length,c=Math.ceil(s/2);t[r].many=l.slice(c,s),t[a].many=l.slice(0,c),a++}return t}var BSt={clone:function(n){for(var e=[],t=1-Math.pow(1-n.path.style.opacity,1/n.count),i=0;i<n.count;i++){var r=nq(n.path);r.setStyle("opacity",t),e.push(r)}return e},split:null};function VZ(n,e,t,i,r,s){if(!n.length||!e.length)return;var o=Sx("update",i,r);if(!(o&&o.duration>0))return;var a=i.getModel("universalTransition").get("delay"),l=Object.assign({setToFinal:!0},o),c,h;pIe(n)&&(c=n,h=e),pIe(e)&&(c=e,h=n);function d(v,_,b,y,C){var x=v.many,L=v.one;if(x.length===1&&!C){var D=_?x[0]:L,E=_?L:x[0];if(z6(D))d({many:[D],one:E},!0,b,y,!0);else{var k=a?dt({delay:a(b,y)},l):l;PZ(D,E,k),s(D,E,D,E,k)}}else for(var T=dt({dividePath:BSt[t],individualDelay:a&&function(W,z,$,G){return a(W+b,y)}},l),I=_?VSt(x,L,T):FSt(L,x,T),N=I.fromIndividuals,M=I.toIndividuals,P=N.length,R=0;R<P;R++){var k=a?dt({delay:a(R,P)},l):l;s(N[R],M[R],_?x[R]:v.one,_?v.one:x[R],k)}}for(var u=c?c===n:n.length>e.length,f=c?mIe(h,c):mIe(u?e:n,[u?n:e]),g=0,p=0;p<f.length;p++)g+=f[p].many.length;for(var m=0,p=0;p<f.length;p++)d(f[p],u,m,g),m+=f[p].many.length}function Rb(n){if(!n)return[];if(xe(n)){for(var e=[],t=0;t<n.length;t++)e.push(Rb(n[t]));return e}var i=[];return n.traverse(function(r){r instanceof Jt&&!r.disableMorphing&&!r.invisible&&!r.ignore&&i.push(r)}),i}var vIe=1e4,WSt=0,_Ie=1,bIe=2,HSt=vi();function zSt(n,e){for(var t=n.dimensions,i=0;i<t.length;i++){var r=n.getDimensionInfo(t[i]);if(r&&r.otherDims[e]===0)return t[i]}}function $St(n,e,t){var i=n.getDimensionInfo(t),r=i&&i.ordinalMeta;if(i){var s=n.get(i.name,e);return r&&r.categories[s]||s+""}}function yIe(n,e,t,i){var r=i?"itemChildGroupId":"itemGroupId",s=zSt(n,r);if(s){var o=$St(n,e,s);return o}var a=n.getRawDataItem(e),l=i?"childGroupId":"groupId";if(a&&a[l])return a[l]+"";if(!i)return t||n.getId(e)}function wIe(n){var e=[];return V(n,function(t){var i=t.data,r=t.dataGroupId;if(i.count()>vIe){process.env.NODE_ENV!=="production"&&yr("Universal transition is disabled on large data > 10k.");return}for(var s=i.getIndices(),o=0;o<s.length;o++)e.push({data:i,groupId:yIe(i,o,r,!1),childGroupId:yIe(i,o,r,!0),divide:t.divide,dataIndex:o})}),e}function FZ(n,e,t){n.traverse(function(i){i instanceof Jt&&nr(i,{style:{opacity:0}},e,{dataIndex:t,isFrom:!0})})}function BZ(n){if(n.parent){var e=n.getComputedTransform();n.setLocalTransform(e),n.parent.remove(n)}}function mL(n){n.stopAnimation(),n.isGroup&&n.traverse(function(e){e.stopAnimation()})}function USt(n,e,t){var i=Sx("update",t,e);i&&n.traverse(function(r){if(r instanceof Rh){var s=Pat(r);s&&r.animateFrom({style:s},i)}})}function GSt(n,e){var t=n.length;if(t!==e.length)return!1;for(var i=0;i<t;i++){var r=n[i],s=e[i];if(r.data.getId(r.dataIndex)!==s.data.getId(s.dataIndex))return!1}return!0}function CIe(n,e,t){var i=wIe(n),r=wIe(e);function s(b,y,C,x,L){(C||b)&&y.animateFrom({style:C&&C!==b?_e(_e({},C.style),b.style):b.style},L)}var o=!1,a=WSt,l=Qe(),c=Qe();i.forEach(function(b){b.groupId&&l.set(b.groupId,!0),b.childGroupId&&c.set(b.childGroupId,!0)});for(var h=0;h<r.length;h++){var d=r[h].groupId;if(c.get(d)){a=_Ie;break}var u=r[h].childGroupId;if(u&&l.get(u)){a=bIe;break}}function f(b,y){return function(C){var x=C.data,L=C.dataIndex;return y?x.getId(L):b?a===_Ie?C.childGroupId:C.groupId:a===bIe?C.childGroupId:C.groupId}}var g=GSt(i,r),p={};if(!g)for(var h=0;h<r.length;h++){var m=r[h],v=m.data.getItemGraphicEl(m.dataIndex);v&&(p[v.id]=!0)}function _(b,y){var C=i[y],x=r[b],L=x.data.hostModel,D=C.data.getItemGraphicEl(C.dataIndex),E=x.data.getItemGraphicEl(x.dataIndex);if(D===E){E&&USt(E,x.dataIndex,L);return}D&&p[D.id]||E&&(mL(E),D?(mL(D),BZ(D),o=!0,VZ(Rb(D),Rb(E),x.divide,L,b,s)):FZ(E,L,b))}new hp(i,r,f(!0,g),f(!1,g),null,"multiple").update(_).updateManyToOne(function(b,y){var C=r[b],x=C.data,L=x.hostModel,D=x.getItemGraphicEl(C.dataIndex),E=Hi(Le(y,function(k){return i[k].data.getItemGraphicEl(i[k].dataIndex)}),function(k){return k&&k!==D&&!p[k.id]});D&&(mL(D),E.length?(V(E,function(k){mL(k),BZ(k)}),o=!0,VZ(Rb(E),Rb(D),C.divide,L,b,s)):FZ(D,L,C.dataIndex))}).updateOneToMany(function(b,y){var C=i[y],x=C.data.getItemGraphicEl(C.dataIndex);if(!(x&&p[x.id])){var L=Hi(Le(b,function(E){return r[E].data.getItemGraphicEl(r[E].dataIndex)}),function(E){return E&&E!==x}),D=r[b[0]].data.hostModel;L.length&&(V(L,function(E){return mL(E)}),x?(mL(x),BZ(x),o=!0,VZ(Rb(x),Rb(L),C.divide,D,b[0],s)):V(L,function(E){return FZ(E,D,b[0])}))}}).updateManyToMany(function(b,y){new hp(y,b,function(C){return i[C].data.getId(i[C].dataIndex)},function(C){return r[C].data.getId(r[C].dataIndex)}).update(function(C,x){_(b[C],y[x])}).execute()}).execute(),o&&V(e,function(b){var y=b.data,C=y.hostModel,x=C&&t.getViewOfSeriesModel(C),L=Sx("update",C,0);x&&C.isAnimationEnabled()&&L&&L.duration>0&&x.group.traverse(function(D){D instanceof Jt&&!D.animators.length&&D.animateFrom({style:{opacity:0}},L)})})}function SIe(n){var e=n.getModel("universalTransition").get("seriesKey");return e||n.id}function xIe(n){return xe(n)?n.sort().join(","):n}function a_(n){if(n.hostModel)return n.hostModel.getModel("universalTransition").get("divideShape")}function jSt(n,e){var t=Qe(),i=Qe(),r=Qe();V(n.oldSeries,function(o,a){var l=n.oldDataGroupIds[a],c=n.oldData[a],h=SIe(o),d=xIe(h);i.set(d,{dataGroupId:l,data:c}),xe(h)&&V(h,function(u){r.set(u,{key:d,dataGroupId:l,data:c})})});function s(o){t.get(o)&&yr("Duplicated seriesKey in universalTransition "+o)}return V(e.updatedSeries,function(o){if(o.isUniversalTransitionEnabled()&&o.isAnimationEnabled()){var a=o.get("dataGroupId"),l=o.getData(),c=SIe(o),h=xIe(c),d=i.get(h);if(d)process.env.NODE_ENV!=="production"&&s(h),t.set(h,{oldSeries:[{dataGroupId:d.dataGroupId,divide:a_(d.data),data:d.data}],newSeries:[{dataGroupId:a,divide:a_(l),data:l}]});else if(xe(c)){process.env.NODE_ENV!=="production"&&s(h);var u=[];V(c,function(p){var m=i.get(p);m.data&&u.push({dataGroupId:m.dataGroupId,divide:a_(m.data),data:m.data})}),u.length&&t.set(h,{oldSeries:u,newSeries:[{dataGroupId:a,data:l,divide:a_(l)}]})}else{var f=r.get(c);if(f){var g=t.get(f.key);g||(g={oldSeries:[{dataGroupId:f.dataGroupId,data:f.data,divide:a_(f.data)}],newSeries:[]},t.set(f.key,g)),g.newSeries.push({dataGroupId:a,data:l,divide:a_(l)})}}}}),t}function LIe(n,e){for(var t=0;t<n.length;t++){var i=e.seriesIndex!=null&&e.seriesIndex===n[t].seriesIndex||e.seriesId!=null&&e.seriesId===n[t].id;if(i)return t}}function qSt(n,e,t,i){var r=[],s=[];V(fn(n.from),function(o){var a=LIe(e.oldSeries,o);a>=0&&r.push({dataGroupId:e.oldDataGroupIds[a],data:e.oldData[a],divide:a_(e.oldData[a]),groupIdDim:o.dimension})}),V(fn(n.to),function(o){var a=LIe(t.updatedSeries,o);if(a>=0){var l=t.updatedSeries[a].getData();s.push({dataGroupId:e.oldDataGroupIds[a],data:l,divide:a_(l),groupIdDim:o.dimension})}}),r.length>0&&s.length>0&&CIe(r,s,i)}function KSt(n){n.registerUpdateLifecycle("series:beforeupdate",function(e,t,i){V(fn(i.seriesTransition),function(r){V(fn(r.to),function(s){for(var o=i.updatedSeries,a=0;a<o.length;a++)(s.seriesIndex!=null&&s.seriesIndex===o[a].seriesIndex||s.seriesId!=null&&s.seriesId===o[a].id)&&(o[a][c5]=!0)})})}),n.registerUpdateLifecycle("series:transition",function(e,t,i){var r=HSt(t);if(r.oldSeries&&i.updatedSeries&&i.optionChanged){var s=i.seriesTransition;if(s)V(fn(s),function(f){qSt(f,r,i,t)});else{var o=jSt(r,i);V(o.keys(),function(f){var g=o.get(f);CIe(g.oldSeries,g.newSeries,t)})}V(i.updatedSeries,function(f){f[c5]&&(f[c5]=!1)})}for(var a=e.getSeries(),l=r.oldSeries=[],c=r.oldDataGroupIds=[],h=r.oldData=[],d=0;d<a.length;d++){var u=a[d].getData();u.count()<vIe&&(l.push(a[d]),c.push(a[d].get("dataGroupId")),h.push(u))}})}Kt([sft]),Kt([eft]),Kt([Lft,Wft,Xft,Tgt,Wgt,Dpt,emt,Vmt,svt,dvt,yvt,g_t,B_t,X_t,u0t,m0t,D0t,A0t,U0t,X0t,o1t,z1t]),Kt(abt),Kt(Abt),Kt(v2e),Kt(jbt),Kt(FDe),Kt(Xbt),Kt(syt),Kt(jyt),Kt(dwt),Kt(XI),Kt(kwt),Kt(Nwt),Kt(Hwt),Kt(Kwt),Kt(eCt),Kt(oCt),Kt(mCt),Kt(RCt),Kt(MTe),Kt(OTe),Kt(eSt),Kt(JTe),Kt(eIe),Kt(sSt),Kt(_St),Kt(wSt),Kt(KSt),Kt(yut);const YSt=bn({__name:"echartsNode",setup(n){const e=w.inject("width"),t=w.inject("height"),i=w.inject("x6NodeData"),r=w.ref(null);let s=null,o=null;const a=w.computed(()=>{var d,u;return(u=(d=i.value)==null?void 0:d.chart)==null?void 0:u.option}),l=w.computed(()=>{var d,u;return(u=(d=i.value)==null?void 0:d.chart)==null?void 0:u.data}),c=d=>{if(!(!s||!d)&&Array.isArray(l.value.x)&&Array.isArray(l.value.y)){if(d.xAxis&&d.yAxis){d.xAxis.data=l.value.x??[],l.value.y[0]&&Array.isArray(l.value.y[0])?d.series.forEach((u,f)=>{d.series[f].data=l.value.y[f]??[]}):d.series.length>0&&(d.series[0].data=l.value.y),s.setOption(d,!0);return}else if(d.series[0]){const u=[];let f=(l.value.x??[]).length;for(let g=0;g<f;g++)u.push({value:l.value.y[g],name:l.value.x[g]});d.series[0].data=u,s.setOption(d,!0)}}},h=P0e(()=>{s&&s.resize()},200);return w.onMounted(()=>{a.value&&setTimeout(()=>{s=zht(r.value),c(a.value)},200),r.value&&(o=new ResizeObserver(()=>{h()}),o.observe(r.value))}),w.watch(a,()=>{c(JSON.parse(JSON.stringify(a.value)))},{deep:!0}),w.watch(l,()=>{c(JSON.parse(JSON.stringify(a.value)))},{deep:!0}),w.onBeforeUnmount(()=>{o&&(o.disconnect(),o=null),s&&(s.dispose(),s=null)}),(d,u)=>(w.openBlock(),w.createElementBlock("div",{ref_key:"chartEl",ref:r,class:"echartsNode",style:w.normalizeStyle({width:w.unref(e)+"px",height:w.unref(t)+"px"})},null,4))}},[["__scopeId","data-v-cdd874b3"]]),XSt={class:"arrow-wrapper"},ZSt=bn({__name:"arrow",setup(n){w.useCssVars(r=>({v476e7b86:i.value}));const e=w.inject("x6NodeData"),t=w.computed(()=>`rotate(${e.value.arrow}deg)`),i=w.computed(()=>e.value.arrowColor||"#89fce6");return(r,s)=>(w.openBlock(),w.createElementBlock("div",{class:"arrow-container",style:w.normalizeStyle({transform:t.value})},[w.createElementVNode("div",XSt,[(w.openBlock(),w.createElementBlock(w.Fragment,null,w.renderList(4,o=>w.createElementVNode("div",{class:"arrow-triangle",key:o,style:w.normalizeStyle({animationDelay:`${(o-1)*-.4}s`})},null,4)),64))])],4))}},[["__scopeId","data-v-4435f521"]]),JSt={class:"switchBox"},QSt={class:"switch"},ext=bn({__name:"switch",setup(n){w.useCssVars(i=>({ec58845e:t.value}));const e=w.inject("x6NodeData");w.computed(()=>e.value.isOpen);const t=w.computed(()=>e.value.switchColor||"rgb(68, 205, 234)");return(i,r)=>(w.openBlock(),w.createElementBlock("div",JSt,[w.createElementVNode("div",QSt,[r[0]||(r[0]=w.createElementVNode("div",{class:"switchLeft"},null,-1)),r[1]||(r[1]=w.createElementVNode("div",{class:"switchRight"},null,-1)),w.createElementVNode("div",{class:w.normalizeClass({switchLine:!0,open:w.unref(e).isOpen})},null,2),r[2]||(r[2]=w.createElementVNode("div",{class:"switchLeftLine"},null,-1)),r[3]||(r[3]=w.createElementVNode("div",{class:"switchRightLine"},null,-1))])]))}},[["__scopeId","data-v-fece4d9d"]]),txt={class:"formNode"},ixt=bn({__name:"planTimeNode",setup(n){const e=w.inject("x6NodeData");let i=w.inject("getNode")();const r=w.ref(e.value.model.modelValue||[]);return w.watch(()=>r.value,s=>{const o=i.getData();JSON.stringify(o.model.modelValue)!=JSON.stringify(s)&&(o.model.modelValue=s,i.setData(o,{deep:!1}))}),w.watch(()=>e.value.model.modelValue,s=>{r.value=s}),(s,o)=>{const a=w.resolveComponent("el-table-column"),l=w.resolveComponent("el-input-number"),c=w.resolveComponent("el-table");return w.openBlock(),w.createElementBlock("div",txt,[w.createVNode(c,{data:r.value,border:"",style:{width:"100%",height:"100%"},size:"small"},{default:w.withCtx(()=>[w.createVNode(a,{prop:"startTime",label:"开始时间"}),w.createVNode(a,{prop:"endTime",label:"结束时间"}),w.createVNode(a,{prop:"activePower",label:"计划功率(kW)",width:"180"},{default:w.withCtx(h=>[w.createVNode(l,{modelValue:r.value[h.$index].activePower,"onUpdate:modelValue":d=>r.value[h.$index].activePower=d,controls:!1,size:"small",style:{width:"160px"}},null,8,["modelValue","onUpdate:modelValue"])]),_:1})]),_:1},8,["data"])])}}},[["__scopeId","data-v-c0e670a9"]]),nxt={name:"",visible:!0,borderStyle:"none",borderRadius:0,borderWidth:0,borderColor:"#5F95FF",opacity:1,backgroundImage:"none",backgroundColor:"transparent",color:"#ffffff",toFix:2,dataSource:{bindNode:[],type:"none",path:"",point:{},httpType:"GET",httpUrl:"",params:[],httpTimer:-1,parse:null,fields:{文本:"text",字体颜色:"color",背景颜色:"backgroundColor",绑定值:"model.modelValue",选项值:"model.option",是否可见:"visible",层级:"zIndex"}},model:{modelValue:null,option:[],buttonConfirmTips:"确认要执行此操作吗?",buttonSuccess:!1,buttonConfirm:!1,buttonSuccessTips:"操作成功!"},status:[]},WZ={"image-node":Gnt,"svg-node":Pnt,"text-node":Vnt,"form-node":znt,"table-node":Znt,"echart-node":YSt,"arrow-node":ZSt,"switch-node":ext,"planTime-node":ixt},HZ=()=>{Object.keys(WZ).forEach(n=>{Ent({shape:n,width:50,height:50,data:{...nxt},component:{render(){return w.h(Int,null,{default:()=>w.h(WZ[n])})}}})})},DIe={Blank:"blank"},vL=Fg.defineStore("property",{state:()=>({targetType:DIe.Blank,cellId:null,tabs:["画布"],activeTab:0,globalVars:[]}),getters:{},actions:{setTarget(n,e){this.targetType=n,n===DIe.Blank?this.tabs=["画布"]:this.tabs=["外观","数据"],this.activeTab=0,this.cellId=e}}}),zZ={backgroundColor:"#6b6b6b26",backgroundImage:null},Ds=Fg.defineStore("editor-graph",{state:()=>({el:null,graph:null,dnd:null,style:{...zZ,width:1920,height:1080},name:"",id:"",zoom:100}),getters:{hasGraph:n=>!!n.graph},actions:{init(){if(this.el===null)return;this.graph&&this.graph.dispose(),this.graph=new ye({container:this.el,autoResize:!0,mousewheel:{enabled:!0,factor:.1},panning:!1,scaling:{min:.5,max:2},background:{color:"#000000"},grid:{size:5,visible:!0,type:"mesh",args:{color:"rgba(100, 100, 100, 0.6)",thickness:1}},translating:{restrict:!0},connecting:{router:"orth",connector:{name:"normal"},args:{padding:0,direction:"H"},anchor:"center",connectionPoint:"anchor",allowBlank:!0,allowLoop:!1,allowMulti:!1,snap:{radius:20},validateConnection({targetMagnet:e}){return!!e}},highlighting:{magnetAdsorbed:{name:"stroke",args:{attrs:{fill:"#5F95FF",stroke:"#5F95FF"}}}}}),this.graph.use(new k0e({enabled:!0}));const n=new L0e({pageWidth:this.style.width,pageHeight:this.style.height,enabled:!0,pannable:!0,autoResize:!1});this.graph.use(n),this.dnd=new uG({target:this.graph,validateNode(){return!0}}),this.graph.use(new N0e({resizing:!0,rotating:!0})),this.graph.use(new B_e({enabled:!0})),this.graph.use(new m0e({enabled:!0,global:!1})).use(new b0e({rubberband:!0,showNodeSelectionBox:!0,showEdgeSelectionBox:!1,modifiers:["meta","shift","ctrl"]})).use(new d0e),HZ(),this.initEvent()},loadMenu({name:n,id:e,value:t,style:i}){if(!this.graph)return;this.name=n,this.id=e,this.graph.fromJSON(t||{}),i?this.style={...this.style,...zZ,...i}:this.style={...this.style,...zZ};const r=Math.min(1280/this.style.width,840/this.style.height);this.graph.zoomTo(r),setTimeout(()=>{this.graph.center(),vL().setTarget("blank",null)},100)},setZoom(n){this.zoom=Number(n),this.graph.zoomTo(n)},updateSize(n,e,t){this.style.width=n,this.style.height=e,this.init(),setTimeout(()=>{t&&t()},100)},syncDataToAttrs(n){if(!n||Object.keys(WZ).includes(n.shape))return;const e=n.getData?n.getData()||{}:{};e.type==="line"&&(n.attr("line/stroke",e.color),e.flow?n.attr("line1/style/animation","ant-line1 30s infinite linear"):n.attr("line1/style/animation","ant-line 30s infinite linear"))},groupSelectedNodes(){if(!this.graph)return null;const n=this.graph.getSelectedCells(),e=n.filter(a=>a.isNode()&&!a.id.includes("group"));if(e.length<2)return null;const t=n.filter(a=>a.isNode()&&a.id.includes("group"));t.length>0&&this.graph.removeCells(t);const i=e.reduce((a,l)=>{const c=l.getBBox();return a.minX=Math.min(a.minX,c.x),a.minY=Math.min(a.minY,c.y),a.maxX=Math.max(a.maxX,c.x+c.width),a.maxY=Math.max(a.maxY,c.y+c.height),a},{minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}),r=10,s=this.graph.addNode({id:`group-${Date.now()}`,shape:"rect",x:i.minX-r,y:i.minY-r,width:i.maxX-i.minX+r*2,height:i.maxY-i.minY+r*2,attrs:{body:{fill:"rgba(69, 131, 255, 0.08)",stroke:"#4583ff",strokeWidth:1,strokeDasharray:"6 4"}},data:{type:"group",name:"组合",opacity:1,borderStyle:"dashed",borderRadius:0,borderWidth:1,borderColor:"#4583ff",backgroundColor:"rgba(69, 131, 255, 0.08)"},zIndex:1e3});return e.forEach(a=>{s.addChild(a)}),this.graph.cleanSelection(),this.graph.select(s),vL().setTarget("node",s.id),s},initEvent(){this.graph.on("node:moving",r=>{}),this.graph.on("scale",({sx:r,sy:s})=>{this.zoom=Number((r*100).toFixed(0))});const n=vL();this.graph.on("blank:click",({e:r,x:s,y:o})=>{n.setTarget("blank",null)}),this.graph.on("edge:click",({e:r,x:s,y:o,edge:a})=>{n.setTarget("edge",a.id),this.graph.select([a.getSourceNode(),a.getTargetNode()])}),this.graph.on("node:click",({e:r,x:s,y:o,node:a})=>{var l;if((l=a.id)!=null&&l.includes("line")){this.graph.clearTransformWidgets(),r.stopPropagation();return}n.setTarget("node",a.id)}),this.graph.on("edge:change:data",({edge:r})=>{this.syncDataToAttrs(r)}),this.graph.on("node:added",({node:r})=>{this.syncDataToAttrs(r)}),this.graph.on("edge:mouseenter",({cell:r})=>{r.addTools([{name:"vertices",args:{attrs:{fill:"#666"},modifiers:["meta","shift","ctrl"]}}])}),this.graph.on("edge:mouseleave",({cell:r})=>{r.hasTool("vertices")&&r.removeTool("vertices"),r.hasTool("source-arrowhead")&&r.removeTool("source-arrowhead"),r.hasTool("target-arrowhead")&&r.removeTool("target-arrowhead")}),this.graph.bindKey(["meta+c","ctrl+c"],()=>{const r=this.graph.getSelectedCells();if(!r.length)return!1;const o=r.filter(u=>u.isNode()&&u.id.includes("group")).flatMap(u=>u.getChildren?u.getChildren()||[]:[]),a=r.filter(u=>u.isNode()),l=r.filter(u=>u.isEdge()),c=[...a,...o],h=this.graph.getEdges().filter(u=>{const f=u.getSourceCell&&u.getSourceCell(),g=u.getTargetCell&&u.getTargetCell();return c.includes(f)||c.includes(g)}),d=[...r,...c,...l,...h].reduce((u,f)=>(u.set(f.id,f),u),new Map);return this.graph.copy([...d.values()]),!1}),this.graph.bindKey(["meta+x","ctrl+x"],()=>{const r=this.graph.getSelectedCells();return r.length&&this.graph.cut(r),!1}),this.graph.bindKey(["meta+v","ctrl+v"],()=>{if(!this.graph.isClipboardEmpty()){const r=this.graph.paste({offset:32});this.graph.cleanSelection(),this.graph.select(r)}return!1}),this.graph.bindKey(["meta+z","ctrl+z"],()=>(this.graph.canUndo()&&this.graph.undo(),!1)),this.graph.bindKey(["meta+shift+z","ctrl+shift+z"],()=>(this.graph.canRedo()&&this.graph.redo(),!1)),this.graph.bindKey(["meta+a","ctrl+alt+a"],()=>{const r=this.graph.getNodes();r&&this.graph.select(r)}),this.graph.bindKey(["Backspace","Delete"],()=>{const r=this.graph.getSelectedCells();r.length&&(this.graph.removeCells(r),n.setTarget("blank",null))},"keydown");const e=(r=0,s=0)=>{const o=this.graph.getSelectedCells().filter(a=>a.isNode());if(o.length)return o.forEach(a=>{const{x:l,y:c}=a.getPosition();a.position(l+r,c+s)}),!1},t=5;this.graph.bindKey(["meta+up","ctrl+up"],()=>e(0,-t)),this.graph.bindKey(["meta+down","ctrl+down"],()=>e(0,t)),this.graph.bindKey(["meta+left","ctrl+left"],()=>e(-t,0)),this.graph.bindKey(["meta+right","ctrl+right"],()=>e(t,0));const i=(r,s)=>{for(let o=0,a=r.length;o<a;o+=1)r[o].style.visibility=s?"visible":"hidden"};this.graph.on("node:mouseenter",()=>{const r=this.el.querySelectorAll(".x6-port-body");i(r,!0)}),this.graph.on("node:mouseleave",()=>{const r=this.el.querySelectorAll(".x6-port-body");i(r,!1)})}}}),_L=Fg.defineStore("menus",{state:()=>({menus:[],current:[],services:{}}),getters:{currentMenu:n=>{var e;return(e=n.menus.find(t=>t.id===n.current[0]))==null?void 0:e.children.find(t=>t.id===n.current[1])}},actions:{async setCurrentMenu(n,e=!1){const t=Ds();if(JSON.stringify(n)===JSON.stringify(this.current)&&e===!1)return!1;this.current=n,t.loadMenu(await this.services.getMenu(n[1]))},async loadAllMenus(n=!1){var e;this.menus=await((e=this.services)==null?void 0:e.getAllMenus()),n&&this.menus[0]&&this.menus[0].children[0]&&this.setCurrentMenu([this.menus[0].id,this.menus[0].children[0].id])},async addMenu(n,e){var i;const t=await((i=this.services)==null?void 0:i.addMenu(n));this.loadAllMenus(),this.setCurrentMenu([t.parentId,t.id]),e&&e()},async saveMenu(n){const e=Ds(),t={name:e.name,id:this.current[1],parentId:this.current[0],style:e.style,value:e.graph.toJSON()};await this.services.saveMenus(t),n&&n()},clearMenu(n){const e=Ds(),t={name:e.name,id:this.current[1],parentId:this.current[0],style:e.style,value:{}};this.services.saveMenus(t),e.graph.clearCells(),n&&n()},async removeMenu(n){if(await this.services.removeMenu(this.current[1]),await this.loadAllMenus(),this.menus[0]&&this.menus[0].children[0])this.setCurrentMenu([this.menus[0].id,this.menus[0].children[0].id]);else{const e=Ds();e.graph.clearCells(),e.name="",e.id=""}n&&n()}}}),rxt={class:"dialog-footer"},sxt={__name:"addMenu",emits:["close"],setup(n,{emit:e}){const t=_L(),{menus:i}=Fg.storeToRefs(t),r=e,s=w.ref(!1);function o(){s.value=!1,r("close")}const a=w.ref(null),l=w.ref({parent:null,parentNameNew:"",name:""}),c=w.ref({parent:[{required:!0,message:"请选择上级目录",trigger:"change"}],parentNameNew:{required:!0,message:"请输入一级目录名称",trigger:"blur"},name:[{required:!0,message:"请输入二级目录名称",trigger:"blur"}]}),h=w.ref(!1),d=async()=>{if(a.value){h.value=!0;try{await a.value.validate((u,f)=>{u&&t.addMenu(l.value,()=>{o()})})}catch{}finally{h.value=!1}}};return w.onMounted(()=>{s.value=!0}),(u,f)=>{const g=w.resolveComponent("el-option"),p=w.resolveComponent("el-select"),m=w.resolveComponent("el-form-item"),v=w.resolveComponent("el-input"),_=w.resolveComponent("el-form"),b=w.resolveComponent("el-button"),y=w.resolveComponent("el-dialog");return w.openBlock(),w.createBlock(y,{modelValue:s.value,"onUpdate:modelValue":f[3]||(f[3]=C=>s.value=C),title:"新增目录",width:"500"},{footer:w.withCtx(()=>[w.createElementVNode("div",rxt,[w.createVNode(b,{onClick:o},{default:w.withCtx(()=>[...f[4]||(f[4]=[w.createTextVNode("取消",-1)])]),_:1}),w.createVNode(b,{type:"primary",onClick:d},{default:w.withCtx(()=>[...f[5]||(f[5]=[w.createTextVNode("确定",-1)])]),_:1})])]),default:w.withCtx(()=>[w.createVNode(_,{ref_key:"formRef",ref:a,model:l.value,"label-width":"auto",style:{padding:"10px 20px"},rules:c.value},{default:w.withCtx(()=>[w.createVNode(m,{label:"上级目录",prop:"parent"},{default:w.withCtx(()=>[w.createVNode(p,{modelValue:l.value.parent,"onUpdate:modelValue":f[0]||(f[0]=C=>l.value.parent=C),placeholder:"请选择上级目录"},{default:w.withCtx(()=>[w.createVNode(g,{value:"0",label:"根目录"}),(w.openBlock(!0),w.createElementBlock(w.Fragment,null,w.renderList(w.unref(i),C=>(w.openBlock(),w.createBlock(g,{key:C.id,label:C.name,value:C.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),l.value.parent=="0"?(w.openBlock(),w.createBlock(m,{key:0,label:"一级目录名称",prop:"parentNameNew"},{default:w.withCtx(()=>[w.createVNode(v,{modelValue:l.value.parentNameNew,"onUpdate:modelValue":f[1]||(f[1]=C=>l.value.parentNameNew=C)},null,8,["modelValue"])]),_:1})):w.createCommentVNode("",!0),w.createVNode(m,{label:"二级目录名称",prop:"name"},{default:w.withCtx(()=>[w.createVNode(v,{modelValue:l.value.name,"onUpdate:modelValue":f[2]||(f[2]=C=>l.value.name=C)},null,8,["modelValue"])]),_:1})]),_:1},8,["model","rules"])]),_:1},8,["modelValue"])}}},oxt=bn({__name:"previewBox",emits:["close"],setup(n,{emit:e}){const t=Ds(),i=w.ref(null);HZ();const r=pG(),s=e;function o(){s("close")}let a=null;return w.onMounted(()=>{const{width:l,height:c}=t.style;a=new ye({container:i.value,width:l,height:c,interacting:{nodeMovable:!1,edgeMovable:!1,magnetConnectable:!1,arrowheadMovable:!1,vertexMovable:!1},selecting:!1,keyboard:!1,mousewheel:!1,panning:!1});const h=t.graph.toJSON();a.fromJSON(h),a.drawBackground({color:t.style.backgroundColor,image:t.style.backgroundImage,size:"cover"})}),w.onBeforeUnmount(()=>{a&&a.dispose()}),(l,c)=>(w.openBlock(),w.createElementBlock("div",{class:"previewBox",onClick:w.withModifiers(o,["self"])},[w.createElementVNode("div",{ref_key:"container",ref:i,class:"ems-preview"},null,512),w.createVNode(w.unref(r))]))}},[["__scopeId","data-v-2dc9daa6"]]),axt={class:"toolBox"},lxt={class:"left"},cxt={class:"right"},hxt={key:0,class:"iconfont icon-suoding1",style:{color:"#4583ff"}},dxt={key:1,class:"iconfont icon-jiesuo1"},uxt=bn({__name:"index",setup(n){const e=_L(),t=Ds(),{zoom:i}=Fg.storeToRefs(t),r=w.ref(!1),s=()=>{r.value=!0},o=()=>{e.saveMenu(()=>{Ii.ElMessage.success("保存成功!"),e.loadAllMenus()})};function a(y){const C=/Mac|iPod|iPhone|iPad/.test(navigator.platform);(C&&y.metaKey&&y.key==="s"||!C&&y.ctrlKey&&y.key==="s")&&(y.preventDefault(),o())}const l=()=>{Ii.ElMessageBox.confirm("确认清空画布吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{e.clearMenu(()=>{Ii.ElMessage.success("清空成功!")})})},c=()=>{if(!t.groupSelectedNodes()){Ii.ElMessage.warning("请先框选至少两个节点后再组合");return}Ii.ElMessage.success("组合完成")},h=()=>{Ii.ElMessageBox.confirm("确认删除画布吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{e.removeMenu(()=>{Ii.ElMessage.success("删除成功!")})})},d=w.ref(!1),u=()=>{d.value=!0},f=y=>{t.setZoom(+y*.1)},g=t.graph;g.on("blank:click",({x:y,y:C})=>{}),g.on("mousemove",({x:y,y:C})=>{}),g.on("blank:contextmenu",({e:y})=>{});const p=w.ref(!1),m=()=>{g.isMouseWheelEnabled()?(p.value=!0,g.disablePanning(),g.disableMouseWheel()):(p.value=!1,g.enablePanning(),g.enableMouseWheel())},v=()=>{Bnt(JSON.stringify(g.toJSON()),t.name+".json","application/json")},_=async y=>{console.log(y),y.file.type==="application/json"&&Ii.ElMessageBox.confirm("确认导入画布吗? 此操作将覆盖当前画布","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(async()=>{const C=await Wnt(y.file);g.fromJSON(C)})},b=y=>{const C=t.graph;if(!C)return;const x=C.getSelectedCells().filter(T=>{var I;return T.isNode&&T.isNode()&&!((I=T.id)!=null&&I.includes("line"))});if(x.length<2){Ii.ElMessage.warning("请先框选至少两个节点");return}const L=x.reduce((T,I)=>{const N=I.getBBox();return T.minX=Math.min(T.minX,N.x),T.minY=Math.min(T.minY,N.y),T.maxX=Math.max(T.maxX,N.x+N.width),T.maxY=Math.max(T.maxY,N.y+N.height),T},{minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}),D=String(y),E=(L.minY+L.maxY)/2,k=(L.minX+L.maxX)/2;x.forEach(T=>{const I=T.getBBox(),{x:N,y:M}=T.getPosition();let P=N,R=M;D==="1"?R=L.minY:D==="2"?R=E-I.height/2:D==="3"?R=L.maxY-I.height:D==="4"?P=L.minX:D==="5"?P=k-I.width/2:D==="6"&&(P=L.maxX-I.width),T.position(P,R)})};return w.onMounted(()=>{window.addEventListener("keydown",a)}),w.onBeforeUnmount(()=>{window.removeEventListener("keydown",a)}),(y,C)=>{const x=w.resolveComponent("el-tooltip"),L=w.resolveComponent("el-dropdown-item"),D=w.resolveComponent("el-dropdown-menu"),E=w.resolveComponent("el-dropdown"),k=w.resolveComponent("el-button"),T=w.resolveComponent("el-upload");return w.openBlock(),w.createElementBlock(w.Fragment,null,[w.createElementVNode("div",axt,[w.createElementVNode("div",lxt,[w.createElementVNode("a",{onClick:s},[w.createVNode(x,{effect:"light",content:"新增",placement:"bottom","popper-class":"tooltipcolor"},{default:w.withCtx(()=>[...C[2]||(C[2]=[w.createElementVNode("i",{class:"iconfont icon-xinjian"},null,-1)])]),_:1})]),w.createElementVNode("a",{onClick:o},[w.createVNode(x,{effect:"light",content:"保存",placement:"bottom","popper-class":"tooltipcolor"},{default:w.withCtx(()=>[...C[3]||(C[3]=[w.createElementVNode("i",{class:"iconfont icon-baocun"},null,-1)])]),_:1})]),w.createElementVNode("a",{onClick:l},[w.createVNode(x,{effect:"light",content:"清空",placement:"bottom","popper-class":"tooltipcolor"},{default:w.withCtx(()=>[...C[4]||(C[4]=[w.createElementVNode("i",{class:"iconfont icon-qingkong"},null,-1)])]),_:1})]),w.createElementVNode("a",{onClick:c},[w.createVNode(x,{effect:"light",content:"组合",placement:"bottom","popper-class":"tooltipcolor"},{default:w.withCtx(()=>[...C[5]||(C[5]=[w.createElementVNode("i",{class:"iconfont icon-jianlizuhe1"},null,-1)])]),_:1})]),w.createElementVNode("a",{onClick:h},[w.createVNode(x,{effect:"light",content:"删除",placement:"bottom","popper-class":"tooltipcolor"},{default:w.withCtx(()=>[...C[6]||(C[6]=[w.createElementVNode("i",{class:"iconfont icon-shanchu"},null,-1)])]),_:1})])]),C[17]||(C[17]=w.createElementVNode("div",{style:{flex:"1"}},null,-1)),w.createElementVNode("div",null,[w.createVNode(E,{onCommand:f,"split-button":"",type:"primary",plain:"",size:"small",style:{"line-height":"40px",width:"100px"}},{dropdown:w.withCtx(()=>[w.createVNode(D,null,{default:w.withCtx(()=>[(w.openBlock(),w.createElementBlock(w.Fragment,null,w.renderList(20,I=>(w.openBlock(),w.createElementBlock(w.Fragment,null,[I>=5&&I<=20?(w.openBlock(),w.createBlock(L,{key:0,command:I},{default:w.withCtx(()=>[w.createTextVNode(w.toDisplayString(I)+"0%",1)]),_:2},1032,["command"])):w.createCommentVNode("",!0)],64))),64))]),_:1})]),default:w.withCtx(()=>[w.createTextVNode(w.toDisplayString(w.unref(i))+"% ",1)]),_:1}),w.createVNode(E,{placement:"top-start",onCommand:b},{dropdown:w.withCtx(()=>[w.createVNode(D,null,{default:w.withCtx(()=>[w.createVNode(L,{command:"1"},{default:w.withCtx(()=>[...C[8]||(C[8]=[w.createTextVNode("水平居上对齐",-1)])]),_:1}),w.createVNode(L,{command:"2"},{default:w.withCtx(()=>[...C[9]||(C[9]=[w.createTextVNode("水平居中对齐",-1)])]),_:1}),w.createVNode(L,{command:"3"},{default:w.withCtx(()=>[...C[10]||(C[10]=[w.createTextVNode("水平居下对齐",-1)])]),_:1}),w.createVNode(L,{command:"4"},{default:w.withCtx(()=>[...C[11]||(C[11]=[w.createTextVNode("垂直居左对齐",-1)])]),_:1}),w.createVNode(L,{command:"5"},{default:w.withCtx(()=>[...C[12]||(C[12]=[w.createTextVNode("垂直居中对齐",-1)])]),_:1}),w.createVNode(L,{command:"6"},{default:w.withCtx(()=>[...C[13]||(C[13]=[w.createTextVNode("垂直居右对齐",-1)])]),_:1})]),_:1})]),default:w.withCtx(()=>[w.createVNode(k,{size:"small",style:{height:"26px"}},{default:w.withCtx(()=>[...C[7]||(C[7]=[w.createTextVNode(" 对齐 ",-1)])]),_:1})]),_:1})]),C[18]||(C[18]=w.createElementVNode("div",{style:{flex:"1"}},null,-1)),w.createElementVNode("div",cxt,[w.createElementVNode("a",{onClick:m},[w.createVNode(x,{effect:"light",content:"锁定/解锁画布",placement:"bottom","popper-class":"tooltipcolor"},{default:w.withCtx(()=>[p.value?(w.openBlock(),w.createElementBlock("i",hxt)):(w.openBlock(),w.createElementBlock("i",dxt))]),_:1})]),w.createElementVNode("a",{onClick:u},[w.createVNode(x,{effect:"light",content:"预览",placement:"bottom","popper-class":"tooltipcolor"},{default:w.withCtx(()=>[...C[14]||(C[14]=[w.createElementVNode("i",{class:"iconfont icon-yulan"},null,-1)])]),_:1})]),w.createElementVNode("a",{onClick:v},[w.createVNode(x,{effect:"light",content:"导出",placement:"bottom","popper-class":"tooltipcolor"},{default:w.withCtx(()=>[...C[15]||(C[15]=[w.createElementVNode("i",{class:"iconfont icon-daochu"},null,-1)])]),_:1})]),w.createVNode(T,{style:{"margin-top":"3px"},accept:".json","http-request":_,"show-file-list":!1},{default:w.withCtx(()=>[w.createElementVNode("a",null,[w.createVNode(x,{effect:"light",content:"导入",placement:"bottom","popper-class":"tooltipcolor"},{default:w.withCtx(()=>[...C[16]||(C[16]=[w.createElementVNode("i",{class:"iconfont icon-daoru"},null,-1)])]),_:1})])]),_:1})])]),r.value?(w.openBlock(),w.createBlock(sxt,{key:0,onClose:C[0]||(C[0]=I=>r.value=!1)})):w.createCommentVNode("",!0),d.value?(w.openBlock(),w.createBlock(oxt,{key:1,onClose:C[1]||(C[1]=I=>d.value=!1)})):w.createCommentVNode("",!0)],64)}}},[["__scopeId","data-v-ab102958"]]),fxt={class:"editorArea"},gxt={class:"drawBox"},pxt={style:{width:"100%",height:"100%"}},mxt=bn({__name:"editorArea",props:["width","height"],setup(n){const e=_L(),t=Ds(),{style:i}=Fg.storeToRefs(t),r=n,s=w.ref(null),o=pG(),a=w.inject("topoApi");return w.provide("graph",()=>t.graph),w.onMounted(()=>{t.el=s.value,t.style.height=r.height||1080,t.style.width=r.width||1920,t.init(),e.services=a,e.loadAllMenus(!0)}),w.onBeforeUnmount(()=>{t.graph&&t.graph.dispose()}),(l,c)=>(w.openBlock(),w.createElementBlock("div",fxt,[w.unref(t).graph?(w.openBlock(),w.createBlock(uxt,{key:0})):w.createCommentVNode("",!0),w.createElementVNode("div",gxt,[w.createElementVNode("div",pxt,[w.createElementVNode("div",{ref_key:"container",ref:s,class:"editor-container",style:w.normalizeStyle({backgroundColor:w.unref(i).backgroundColor,backgroundImage:w.unref(i).backgroundImage?`url(${w.unref(i).backgroundImage})`:"none"})},null,4),w.createVNode(w.unref(o))])])]))}},[["__scopeId","data-v-2cac8846"]]);/*! Element Plus Icons Vue v2.3.2 */var vxt=w.defineComponent({name:"Document",__name:"document",setup(n){return(e,t)=>(w.openBlock(),w.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[w.createElementVNode("path",{fill:"currentColor",d:"M832 384H576V128H192v768h640zm-26.496-64L640 154.496V320zM160 64h480l256 256v608a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32m160 448h384v64H320zm0-192h160v64H320zm0 384h384v64H320z"})]))}}),EIe=vxt,_xt=w.defineComponent({name:"Edit",__name:"edit",setup(n){return(e,t)=>(w.openBlock(),w.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[w.createElementVNode("path",{fill:"currentColor",d:"M832 512a32 32 0 1 1 64 0v352a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h352a32 32 0 0 1 0 64H192v640h640z"}),w.createElementVNode("path",{fill:"currentColor",d:"m469.952 554.24 52.8-7.552L847.104 222.4a32 32 0 1 0-45.248-45.248L477.44 501.44l-7.552 52.8zm422.4-422.4a96 96 0 0 1 0 135.808l-331.84 331.84a32 32 0 0 1-18.112 9.088L436.8 623.68a32 32 0 0 1-36.224-36.224l15.104-105.6a32 32 0 0 1 9.024-18.112l331.904-331.84a96 96 0 0 1 135.744 0z"})]))}}),$Z=_xt,bxt=w.defineComponent({name:"FolderOpened",__name:"folder-opened",setup(n){return(e,t)=>(w.openBlock(),w.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[w.createElementVNode("path",{fill:"currentColor",d:"M878.08 448H241.92l-96 384h636.16zM832 384v-64H485.76L357.504 192H128v448l57.92-231.744A32 32 0 0 1 216.96 384zm-24.96 512H96a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h287.872l128.384 128H864a32 32 0 0 1 32 32v96h23.04a32 32 0 0 1 31.04 39.744l-112 448A32 32 0 0 1 807.04 896"})]))}}),yxt=bxt,wxt=w.defineComponent({name:"Folder",__name:"folder",setup(n){return(e,t)=>(w.openBlock(),w.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[w.createElementVNode("path",{fill:"currentColor",d:"M128 192v640h768V320H485.76L357.504 192zm-32-64h287.872l128.384 128H928a32 32 0 0 1 32 32v576a32 32 0 0 1-32 32H96a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32"})]))}}),Cxt=wxt,Sxt=w.defineComponent({name:"Menu",__name:"menu",setup(n){return(e,t)=>(w.openBlock(),w.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[w.createElementVNode("path",{fill:"currentColor",d:"M160 448a32 32 0 0 1-32-32V160.064a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V416a32 32 0 0 1-32 32zm448 0a32 32 0 0 1-32-32V160.064a32 32 0 0 1 32-32h255.936a32 32 0 0 1 32 32V416a32 32 0 0 1-32 32zM160 896a32 32 0 0 1-32-32V608a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32v256a32 32 0 0 1-32 32zm448 0a32 32 0 0 1-32-32V608a32 32 0 0 1 32-32h255.936a32 32 0 0 1 32 32v256a32 32 0 0 1-32 32z"})]))}}),xxt=Sxt,Lxt=w.defineComponent({name:"Plus",__name:"plus",setup(n){return(e,t)=>(w.openBlock(),w.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[w.createElementVNode("path",{fill:"currentColor",d:"M480 480V128a32 32 0 0 1 64 0v352h352a32 32 0 1 1 0 64H544v352a32 32 0 1 1-64 0V544H128a32 32 0 0 1 0-64z"})]))}}),UZ=Lxt,Dxt=w.defineComponent({name:"Search",__name:"search",setup(n){return(e,t)=>(w.openBlock(),w.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[w.createElementVNode("path",{fill:"currentColor",d:"m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704"})]))}}),kIe=Dxt;const Ext={class:"groups-menus"},kxt=bn({__name:"menus",setup(n){const e=_L(),{menus:t,current:i}=Fg.storeToRefs(e),r=(s,o)=>{e.setCurrentMenu(o)};return w.onMounted(()=>{}),(s,o)=>{const a=w.resolveComponent("el-icon"),l=w.resolveComponent("el-menu-item"),c=w.resolveComponent("el-sub-menu"),h=w.resolveComponent("el-menu");return w.openBlock(),w.createElementBlock("div",Ext,[w.createVNode(h,{"default-active":w.unref(i)[1],onSelect:r,"background-color":"transparent"},{default:w.withCtx(()=>[(w.openBlock(!0),w.createElementBlock(w.Fragment,null,w.renderList(w.unref(t),d=>(w.openBlock(),w.createBlock(c,{key:d.id,index:d.id,"popper-offset":100},{title:w.withCtx(()=>[w.createVNode(a,null,{default:w.withCtx(()=>[w.createVNode(w.unref(xxt))]),_:1}),w.createElementVNode("span",null,w.toDisplayString(d.name),1)]),default:w.withCtx(()=>[(w.openBlock(!0),w.createElementBlock(w.Fragment,null,w.renderList(d.children,u=>(w.openBlock(),w.createBlock(l,{key:u.id,index:u.id},{title:w.withCtx(()=>[w.createTextVNode(w.toDisplayString(u.name),1)]),default:w.withCtx(()=>[w.createVNode(a,null,{default:w.withCtx(()=>[w.createVNode(w.unref(EIe))]),_:1})]),_:2},1032,["index"]))),128))]),_:2},1032,["index"]))),128))]),_:1},8,["default-active"])])}}},[["__scopeId","data-v-65d960c6"]]),Txt=Object.assign({"../../../assets/iconfont/svg/A相手车刀闸合.svg":'<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M511.9872 921.5232l-0.0896 0.0768-31.6736-31.68 0.0768-0.0768-76.864-76.864 31.6736-31.68 76.8768 76.864 76.864-76.864 31.6736 31.68-76.864 76.864 0.0768 0.0768L512.064 921.6z m0-102.4l-0.0896 0.0768-31.6736-31.68 0.0768-0.0768-76.864-76.864 31.6736-31.68 54.4896 54.4832V290.6176l-54.4896 54.464-31.6736-31.68 76.864-76.8384-0.0768-0.0704 31.6736-31.68 0.0896 0.0768 0.0768-0.0768 31.6736 31.68-0.0768 0.0704 76.864 76.8384-31.6736 31.68-54.4512-54.432v442.7008l54.4512-54.4512 31.6736 31.68-76.864 76.864 0.0768 0.0768L512.064 819.2z m0-653.2864L435.1104 242.6816l-31.6736-31.68 76.864-76.8384-0.0768-0.0704 31.6736-31.68 0.0896 0.0768 0.0768-0.0768 31.6736 31.68-0.0768 0.0704 76.864 76.8384-31.6736 31.68z" fill="#EF5317" /></svg>',"../../../assets/iconfont/svg/三绕组变压器.svg":'<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M544 64v268.256a192.064 192.064 0 0 1 147.84 256.704A192 192 0 1 1 512 904.608a192 192 0 1 1-179.84-315.68A192.064 192.064 0 0 1 480 332.256V64h64z m-197.44 555.072l-5.856 0.832A160.032 160.032 0 0 0 368 937.6a159.68 159.68 0 0 0 124.48-59.456 190.72 190.72 0 0 1-28.48-100.544c0-23.68 4.288-46.4 12.16-67.36a192 192 0 0 1-125.12-83.904l-4.48-7.264z m330.88-0.064l-0.8 1.44a192.192 192.192 0 0 1-128.832 89.824A190.72 190.72 0 0 1 560 777.6a191.104 191.104 0 0 1-28.384 100.544 160 160 0 1 0 145.824-259.104zM509.344 713.6l-2.016 4.8A159.584 159.584 0 0 0 496 777.6c0 25.024 5.76 48.672 16 69.76a158.72 158.72 0 0 0 16-69.76c0-22.784-4.768-44.448-13.344-64.064l-5.312 0.032z m-124.608-95.104l1.28 1.76a159.84 159.84 0 0 0 104.544 59.968l1.824-3.136a159.456 159.456 0 0 0-107.648-58.592z m254.56 0.064l-3.872 0.384a159.808 159.808 0 0 0-103.872 58.144l1.92 3.072a159.488 159.488 0 0 0 100.96-55.52l4.864-6.08zM512 361.6a160 160 0 0 0-146.656 224.064l2.656-0.064c57.344 0 108.8 25.152 144 64.992a191.552 191.552 0 0 1 144-64.992h2.688a160 160 0 0 0-146.688-224z" /></svg>',"../../../assets/iconfont/svg/变压器_1.svg":'<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M533.0944 534.3232c-82.1248 0-148.8896-66.7648-148.8896-148.8896s66.7648-148.8896 148.8896-148.8896 148.8896 66.7648 148.8896 148.8896-66.7648 148.8896-148.8896 148.8896z m0-277.504c-70.8608 0-128.4096 57.5488-128.4096 128.4096s57.5488 128.4096 128.4096 128.4096c70.8608 0 128.4096-57.5488 128.4096-128.4096s-57.5488-128.4096-128.4096-128.4096z" fill="#E60012" /><path d="M633.6512 459.9808h-200.704l98.7136-158.1056 101.9904 158.1056z m-163.84-20.48h126.1568l-64.1024-99.5328-62.0544 99.5328z" fill="#E60012" /><path d="M533.0944 694.272c-82.1248 0-148.8896-66.7648-148.8896-148.8896s66.7648-148.8896 148.8896-148.8896 148.8896 66.7648 148.8896 148.8896c0 81.92-66.7648 148.8896-148.8896 148.8896z m0-277.504c-70.8608 0-128.4096 57.5488-128.4096 128.4096s57.5488 128.4096 128.4096 128.4096c70.8608 0 128.4096-57.5488 128.4096-128.4096s-57.5488-128.4096-128.4096-128.4096z" fill="#EF7C1B" /><path d="M522.8544 611.9424h20.48v317.0304h-20.48z" fill="#EF7C1B" /><path d="M522.8544 57.9584h20.48v192.512h-20.48z" fill="#E60012" /><path d="M534.7328 632.832l-90.9312-101.9904 15.1552-13.5168 75.3664 84.3776 72.704-84.3776 15.5648 13.5168z" fill="#EF7C1B" /></svg>',"../../../assets/iconfont/svg/变压器_2.svg":'<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M512 170.666667c-117.824 0-213.333333 95.509333-213.333333 213.333333s95.509333 213.333333 213.333333 213.333333 213.333333-95.509333 213.333333-213.333333S629.824 170.666667 512 170.666667zM256 384c0-141.376 114.624-256 256-256s256 114.624 256 256-114.624 256-256 256-256-114.624-256-256z" fill="#000000" /><path d="M512 426.666667c-117.824 0-213.333333 95.509333-213.333333 213.333333s95.509333 213.333333 213.333333 213.333333 213.333333-95.509333 213.333333-213.333333-95.509333-213.333333-213.333333-213.333333zM256 640c0-141.376 114.624-256 256-256s256 114.624 256 256-114.624 256-256 256-256-114.624-256-256z" fill="#000000" /><path d="M490.666667 981.333333v-106.666666h42.666666v106.666666h-42.666666zM490.666667 149.333333V42.666667h42.666666v106.666666h-42.666666z" fill="#000000" /></svg>',"../../../assets/iconfont/svg/手持开关盒.svg":'<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M431.431671 299.041479h159.572225v426.308151H431.431671z" fill="#d81e06" /><path d="M609.777099 744.122832H412.658468v-463.854556h197.118631v463.854556z m-159.572225-37.546405h122.025819v-388.761745H450.204874v388.761745z" fill="#d81e06" /><path d="M492.44458 131.568864h37.546406v186.167596h-37.546406zM492.44458 707.280422h37.546406v186.167596h-37.546406z" fill="#d81e06" /><path d="M594.993201 252.656023L511.06134 145.414101 427.129478 252.656023l-29.567794-23.153617L511.06134 84.479413l113.499656 145.022993z" fill="#d81e06" /><path d="M594.993201 168.17661L511.06134 60.934688 427.129478 168.17661l-29.567794-23.153617 113.499656-145.022993L624.560996 145.022993z" fill="#d81e06" /><path d="M511.06134 939.520587L397.561684 794.497594l29.567794-23.075396 83.931862 107.241922L594.993201 771.422198l29.567795 23.075396z" fill="#d81e06" /><path d="M511.06134 1024L397.561684 878.977007l29.567794-23.075395 83.931862 107.241922L594.993201 855.901612l29.567795 23.075395z" fill="#d81e06" /></svg>',"../../../assets/iconfont/svg/手持断路器.svg":'<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M494.481834 206.967196l-8.668783-7.223986 71.51746-87.410229c1.083598-1.444797 2.889594-2.167196 4.695591-2.167196s3.611993 0.722399 4.695591 2.167196l71.51746 87.410229-8.668783 7.223986-67.544268-82.714639-67.544268 82.714639zM566.360494 119.195767c0 0.361199 0 0.361199 0 0z" fill="#FF0000" /><path d="M494.481834 148.091711l-8.668783-7.223986 71.51746-87.410229c1.083598-1.444797 2.889594-2.167196 4.695591-2.167196s3.611993 0.722399 4.695591 2.167196L638.600353 140.867725l-8.668783 7.223986-67.544268-82.714639L494.481834 148.091711z m71.87866-87.771429c0 0.361199 0 0.361199 0 0zM562.026102 913.834215c-1.805996 0-3.250794-0.722399-4.334391-2.167196l-71.87866-87.771428 8.668783-7.223986 67.544268 82.714638 67.544268-82.714638 8.668783 7.223986-71.878659 87.771428c-1.083598 1.444797-2.528395 2.167196-4.334392 2.167196z" fill="#FF0000" /><path d="M562.026102 972.7097c-1.805996 0-3.250794-0.722399-4.334391-2.167196l-71.87866-87.771428 8.668783-7.223986 67.544268 82.714638 67.544268-82.714638 8.668783 7.223986-71.878659 87.771428c-1.083598 1.444797-2.528395 2.167196-4.334392 2.167196zM567.805291 849.179541h-11.197178V617.650794l-171.208466-252.839507 9.391182-6.140388 171.930864 254.284304c0.722399 1.083598 1.083598 2.167196 1.083598 3.250793v232.973545zM556.608113 178.071252h11.197178v183.489242h-11.197178z" fill="#FF0000" /><path d="M510.898342 402.654138l94.446392-90.429856 7.740501 8.087252-94.44278 90.429856z" fill="#FF0000" /><path d="M511.158406 320.35849l7.744113-8.087252 94.457227 90.415408-7.744113 8.090864zM556.608113 849.179541h11.197178v58.875485h-11.197178zM556.608113 119.195767h11.197178v58.875485h-11.197178z" fill="#FF0000" /></svg>',"../../../assets/iconfont/svg/抽屉式断路器断开.svg":'<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M85.18656007 375.38588444l-13.9264 0 0-387.28817777 13.9264 0z" fill="#EF1616" /><path d="M12.7726934 188.10538666l-9.84746666-9.84746666 72.41500444-72.41500444 9.84746666 9.84746666z" fill="#EF1616" /><path d="M71.25674674 115.69038222l9.84746666-9.84746665 72.41500443 72.41500443-9.84746665 9.84746667zM12.77496896 261.79811556l-9.84746667-9.84746667 72.41500445-72.41500445 9.84746666 9.84746667z" fill="#EF1616" /><path d="M71.25447117 189.38311111l9.84746667-9.84746667 72.41500445 72.41500445-9.84746667 9.84746667zM85.1797334 1037.94346667l-13.9264 0 0-387.28817778 13.9264 0z" fill="#EF1616" /><path d="M85.18769784 910.336l-9.84746665 9.84746667-72.41500445-72.41500445 9.84746666-9.84746666z" fill="#EF1616" /><path d="M143.67175118 837.92099556l9.84746666 9.84746665-72.41500444 72.41500446-9.84746666-9.84746667z" fill="#EF1616" /><path d="M85.18542229 836.64668444l-9.84746667 9.84746667-72.41500444-72.41500444 9.84746666-9.84746667z" fill="#EF1616" /><path d="M143.67402674 764.23168l9.84746666 9.84746667-72.41614222 72.41500444-9.84632889-9.84746667z" fill="#EF1616" /><path d="M19.62666674 375.38702222l118.32888888 0L137.95555561 650.33102222l-118.32888886 0-1e-8-274.944z m104.41386666 13.91502222l-90.48746666 0L33.55306674 636.40462222l90.48746666 0 0-247.10257778z" fill="#EF1616" /></svg>',"../../../assets/iconfont/svg/接地_1.svg":'<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M531.791456 701.961295a17.407498 17.407498 0 0 1-15.824998-16.616247v-316.499956a15.824998 15.824998 0 0 1 15.824998-15.824998 17.407498 17.407498 0 0 1 15.824998 16.616248v320.456205a15.824998 15.824998 0 0 1-15.824998 11.868748zM533.373956 377.548841a18.989997 18.989997 0 0 1-11.077499 0L172.564006 27.02514a15.033748 15.033748 0 0 1 0-22.154997 15.033748 15.033748 0 0 1 22.154997 0l349.732451 345.776202a15.033748 15.033748 0 0 1 0 22.154996 14.242498 14.242498 0 0 1-11.077498 4.7475zM609.333945 1024H455.040217a15.824998 15.824998 0 0 1 0-31.649996h158.249977a15.824998 15.824998 0 0 1 0 31.649996zM762.836423 870.497522H300.746488a15.824998 15.824998 0 0 1 0-31.649996h462.089935a15.824998 15.824998 0 1 1 0 31.649996zM840.378913 716.203793H223.995249a15.824998 15.824998 0 0 1-15.824998-15.824998 15.824998 15.824998 0 0 1 15.824998-16.616247H840.378913a15.824998 15.824998 0 0 1 15.824997 16.616247 15.824998 15.824998 0 0 1-15.824997 15.824998z" /></svg>',"../../../assets/iconfont/svg/接地_2.svg":'<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M810.666667 704H213.333333v-42.666667h597.333334v42.666667zM725.333333 810.666667H298.666667v-42.666667h426.666666v42.666667zM640 917.333333H384v-42.666666h256v42.666666z" fill="#000000" /><path d="M490.666667 704V106.666667h42.666666v597.333333h-42.666666z" fill="#000000" /></svg>',"../../../assets/iconfont/svg/断路器-he.svg":'<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M640 176H528V0h-32v176H384v672h112v176h32V848h112z" fill="#D81E06" /></svg>',"../../../assets/iconfont/svg/断路器.svg":'<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M700.16 341.333333l55.04-55.04a42.666667 42.666667 0 0 0-60.16-60.16l-12.373333 12.373334V42.666667a42.666667 42.666667 0 0 0-85.333334 0v195.84l-12.373333-12.373334a42.666667 42.666667 0 0 0-60.16 60.16L579.84 341.333333l-55.466667 55.04a42.666667 42.666667 0 1 0 60.16 60.16L640 401.493333l55.04 55.04a42.666667 42.666667 0 1 0 60.16-60.16zM333.226667 230.826667a42.666667 42.666667 0 0 0-69.12 50.346666L597.333333 739.413333V981.333333a42.666667 42.666667 0 0 0 85.333334 0v-256a42.666667 42.666667 0 0 0-8.106667-25.173333z" /></svg>',"../../../assets/iconfont/svg/母线.svg":'<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="98.08px" viewBox="0 0 2088 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M2088.44 442.576H5.726v138.848H2088.44V442.576z" fill="#FF0000" /></svg>',"../../../assets/iconfont/svg/电池.svg":'<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="100.64px" viewBox="0 0 2035 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M2538.89999992 217.3c2.9-0.1 5.7-0.1 8.6-0.1" /><path d="M1344.19999992 960.2H703.99999992V130.3h640.1v829.9z m-567.5-70.1h494.8V200.4H776.69999992v689.7z" fill="#03E086" /><path d="M896.09999992 61h254.4v70H896.09999992zM1064.99999992 755.9l-80.7-39.7 63.6-129.1H855.49999992l128.3-255.3 80.4 40.5-62.7 124.8h191z" fill="#03E086" /></svg>',"../../../assets/iconfont/svg/直流逆变器.svg":'<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M207.36 359.936l58.624-58.624c9.216-9.216 21.418667-14.250667 34.389333-14.250667s25.173333 5.034667 34.389334 14.250667l41.557333 41.557333c17.749333 17.749333 40.96 26.88 64.341333 26.88 18.773333 0 37.632-5.802667 53.930667-17.749333l45.909333-33.621333c9.472-6.912 11.52-20.224 4.608-29.696a21.265067 21.265067 0 0 0-29.696-4.608l-45.909333 33.621333a48.452267 48.452267 0 0 1-63.146667-4.864l-41.557333-41.557333c-17.237333-17.237333-40.106667-26.709333-64.426667-26.709334-24.32 0-47.274667 9.472-64.426666 26.709334l-58.624 58.624c-8.277333 8.277333-8.277333 21.76 0 30.037333 8.277333 8.277333 21.76 8.277333 30.037333 0zM119.466667 119.466667v785.066666h785.066666V119.466667H119.466667z m706.645333 42.496L161.962667 826.112V161.962667h664.149333z m-640 700.074666l675.925333-675.925333v675.925333H186.112zM490.837333 685.568h339.882667v42.496H490.837333zM736.682667 790.101333h94.122666v42.496H736.682667zM613.717333 790.101333h94.122667v42.496H613.717333zM490.837333 790.101333h94.122667v42.496H490.837333z" /></svg>'});function Ixt(n){return n?(n=n.replace(/fill="(?!none)[^"]*"/gi,'fill="currentColor"').replace(/stroke="(?!none)[^"]*"/gi,'stroke="currentColor"'),n=n.replace(/<([a-z]+)([^>]*?)\/?>/gi,(e,t,i)=>{const r=e.endsWith("/>")?"/>":">";return!/(fill=)/i.test(i)&&/^(path|circle|rect|polygon|polyline)$/i.test(t)?`<${t}${i} fill="currentColor"${r}`:e}),n):""}const TIe="__node_panel_svg_sprite__";function Nxt(){if(typeof document>"u")return null;let n=document.getElementById(TIe);n||(n=document.createElementNS("http://www.w3.org/2000/svg","svg"),n.setAttribute("aria-hidden","true"),n.style.position="absolute",n.style.width="0",n.style.height="0",n.style.overflow="hidden",n.id=TIe,document.body.prepend(n));let e=n.querySelector("defs");return e||(e=document.createElementNS("http://www.w3.org/2000/svg","defs"),n.appendChild(e)),e}function Mxt(n){const e=n.match(/viewBox="([^"]+)"/i),t=n.match(/<svg[^>]*>([\s\S]*?)<\/svg>/i);return{viewBox:e?e[1]:"",content:t?t[1]:n}}function Axt(n,e){const t=Nxt();if(!t||t.querySelector(`#${n}`))return n;const{viewBox:i,content:r}=Mxt(Ixt(e)),s=document.createElementNS("http://www.w3.org/2000/svg","symbol");return s.setAttribute("id",n),i&&s.setAttribute("viewBox",i),s.innerHTML=r,t.appendChild(s),n}const Rxt=Object.entries(Txt).map(([n,e])=>({name:n.split("/").pop().replace(".svg",""),id:Axt(`node-icon-${n.split("/").pop().replace(".svg","")}`,e)})),oN={title:{show:!1},tooltip:{trigger:"axis",backgroundColor:"rgba(59,59,59,0.8)",textStyle:{color:"#fff"},borderWidth:0},legend:{show:!0,left:"center",top:20,textStyle:{color:"#ffffff"},itemGap:10,itemWidth:25,itemHeight:14,orient:"horizontal"},yAxis:{name:"电压(V)",type:"value",axisLine:{show:"true",lineStyle:{color:"#ffffff",width:1,type:"solid"}},axisTick:{show:"auto"},show:!0,axisLabel:{show:!0,fontSize:12,color:"#ffffff"},splitLine:{show:!0,lineStyle:{color:"rgb(79, 79, 79)",width:1,type:"solid"}}},xAxis:{type:"category",axisPointer:{type:"line"},data:[],boundaryGap:!0,splitLine:{show:!1,lineStyle:{color:"rgb(79, 79, 79)",width:1,type:"solid"}},axisTick:{show:!0},axisLabel:{show:!0,fontSize:12,color:"#ffffff"},show:!0,axisLine:{show:!0,lineStyle:{color:"#FFFFFF",width:1,type:"solid"}}},grid:{left:20,top:50,right:20,bottom:10,containLabel:!0},series:[],dataZoom:!1},IIe={tabTitle:"系列1",name:"电压",type:"bar",showBackground:!1,areaStyle:{color:{type:"linear",x:0,y:0,x2:1,y2:0,colorStops:[{offset:0,color:"rgba(0, 0, 0, 0)"},{offset:1,color:"rgba(0, 0, 0, 0)"}]}},itemStyle:{color:"#1AF2FFaa"},emphasis:{focus:"series"},data:[]},aN={tabTitle:"系列1",lineStyle:{width:2},name:"电压",smooth:!1,symbolSize:0,type:"line",areaStyle:{color:{type:"linear",x:0,y:0,x2:1,y2:0,colorStops:[{offset:0,color:"rgba(0, 0, 0, 0)"},{offset:1,color:"rgba(0, 0, 0, 0)"}]}},symbol:null,itemStyle:{color:"#1AF2FFaa"},showSymbol:!1,emphasis:{focus:"series"},edgeLabel:{show:!1},step:!1,data:[]},NIe={darkMode:!0,tooltip:{trigger:"item",backgroundColor:"rgba(59,59,59,0.8)",textStyle:{color:"#fff"},borderWidth:0},legend:{show:!0,left:"center",top:20,textStyle:{color:"#ffffff"},itemGap:10,itemWidth:25,itemHeight:14,orient:"horizontal"},series:[{tabTitle:"系列1",name:"Access From",type:"pie",center:["50%","55%"],radius:[0,"60%"],label:{show:!0,position:"outside",textBorderWidth:0},itemStyle:{borderWidth:0,shadowColor:"rgba(0, 0, 0, 0)"},emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}},data:[{value:1048,name:"Search Engine"},{value:735,name:"Direct"},{value:580,name:"Email"},{value:484,name:"Union Ads"},{value:300,name:"Video Ads"}]}]},Pxt={echart_1:()=>{const n=JSON.parse(JSON.stringify(oN));n.xAxis.data=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"];const e=JSON.parse(JSON.stringify(aN));return e.data=[150,230,224,218,135,147,260],n.series.push(e),n},echart_2:()=>{let n=+new Date(1968,9,3),e=24*3600*1e3,t=[],i=[Math.random()*300];for(let a=1;a<2e3;a++){var r=new Date(n+=e);t.push([r.getFullYear(),r.getMonth()+1,r.getDate()].join("/")),i.push(Math.round((Math.random()-.5)*20+i[a-1]))}const s=JSON.parse(JSON.stringify(oN));s.xAxis.data=t;const o=JSON.parse(JSON.stringify(aN));return o.data=i,o.itemStyle={color:"rgb(255, 70, 131)"},o.areaStyle={color:{type:"linear",x:0,y:0,x2:1,y2:0,colorStops:[{offset:0,color:"#ff4d4f"},{offset:1,color:"#ffa940"}]}},s.series.push(o),s},echart_3:()=>{let n=+new Date(2026,1,1),e=24*3600*1e3,t=[],i=[Math.random()*200],r=[Math.random()*10];for(let h=1;h<2e3;h++){var s=new Date(n+=e);t.push([s.getFullYear(),s.getMonth()+1,s.getDate()].join("/")),i.push(Math.round((Math.random()-.5)*20+i[h-1])),r.push(Math.round((Math.random()-.5)*20+r[h-1]*100)/100)}const o=JSON.parse(JSON.stringify(oN));o.xAxis.data=t;const a=JSON.parse(JSON.stringify(o.yAxis));a.name="电流(A)",a.splitLine.show=!1,o.yAxis=[o.yAxis,a];const l=JSON.parse(JSON.stringify(aN));l.data=i,l.yAxisIndex=0;const c=JSON.parse(JSON.stringify(aN));return c.data=r,c.tabTitle="系列2",c.name="电流",c.itemStyle={color:"rgb(255, 70, 131)"},c.yAxisIndex=1,o.series.push(l),o.series.push(c),o},echart_4:()=>{const n=JSON.parse(JSON.stringify(oN));n.xAxis.data=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],n.xAxis.axisPointer={type:"shadow"};const e=JSON.parse(JSON.stringify(IIe));return e.data=[10,52,200,334,390,330,220],n.series.push(e),n},echart_5:()=>{const n=[{name:"Direct",type:"bar",emphasis:{focus:"series"},data:[320,332,301,334,390,330,320]},{name:"Email",type:"bar",stack:"Ad",emphasis:{focus:"series"},data:[120,132,101,134,90,230,210]},{name:"Union Ads",type:"bar",stack:"Ad",emphasis:{focus:"series"},data:[220,182,191,234,290,330,310]},{name:"Video Ads",type:"bar",stack:"Ad",emphasis:{focus:"series"},data:[150,232,201,154,190,330,410]},{name:"Search Engine",type:"bar",data:[862,1018,964,1026,1679,1600,1570],emphasis:{focus:"series"},markLine:{lineStyle:{type:"dashed"},data:[[{type:"min"},{type:"max"}]]}},{name:"Baidu",type:"bar",barWidth:5,stack:"Search Engine",emphasis:{focus:"series"},data:[620,732,701,734,1090,1130,1120]},{name:"Google",type:"bar",stack:"Search Engine",emphasis:{focus:"series"},data:[120,132,101,134,290,230,220]},{name:"Bing",type:"bar",stack:"Search Engine",emphasis:{focus:"series"},data:[60,72,71,74,190,130,110]},{name:"Others",type:"bar",stack:"Search Engine",emphasis:{focus:"series"},data:[62,82,91,84,109,110,120]}],e=JSON.parse(JSON.stringify(oN));return e.xAxis.data=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],e.xAxis.axisPointer={type:"shadow"},n.forEach((t,i)=>{const r=JSON.parse(JSON.stringify(IIe));r.name=t.name,r.tabTitle=`系列${i}`,r.stack=t.stack,r.data=t.data,r.barWidth=t.barWidth,r.itemStyle.color="",e.series.push(r)}),e.grid.top=60,e.yAxis.name="",e.legend.top=10,e},echart_6:()=>JSON.parse(JSON.stringify(NIe)),echart_7:()=>{const n=JSON.parse(JSON.stringify(NIe)),e=n.series[0];return e.radius=["40%","70%"],n},echart_8:()=>({tooltip:{formatter:"{a} <br/>{b} : {c}%"},series:[{name:"Pressure",type:"gauge",detail:{formatter:"{value}"},data:[{value:50,name:"SCORE"}]}]}),echart_9:()=>({series:[{type:"gauge",progress:{show:!0,width:18},axisLine:{lineStyle:{width:18}},axisTick:{show:!1},splitLine:{length:15,lineStyle:{width:2,color:"#999"}},axisLabel:{distance:25,color:"#999",fontSize:20},anchor:{show:!0,showAbove:!0,size:25,itemStyle:{borderWidth:10}},title:{show:!1},detail:{valueAnimation:!0,fontSize:80,offsetCenter:[0,"70%"]},data:[{value:70}]}]}),echart_10:()=>({series:[{type:"gauge",axisLine:{lineStyle:{width:30,color:[[.3,"#67e0e3"],[.7,"#37a2da"],[1,"#fd666d"]]}},pointer:{itemStyle:{color:"auto"}},axisTick:{distance:-30,length:8,lineStyle:{color:"#fff",width:2}},splitLine:{distance:-30,length:30,lineStyle:{color:"#fff",width:4}},axisLabel:{color:"inherit",distance:40,fontSize:20},detail:{valueAnimation:!0,formatter:"{value} km/h",color:"inherit"},data:[{value:70}]}]}),echart_11:()=>({series:[{type:"gauge",center:["50%","60%"],startAngle:200,endAngle:-20,min:0,max:60,splitNumber:12,itemStyle:{color:"#FFAB91"},progress:{show:!0,width:30},pointer:{show:!1},axisLine:{lineStyle:{width:30}},axisTick:{distance:-45,splitNumber:5,lineStyle:{width:2,color:"#999"}},splitLine:{distance:-52,length:14,lineStyle:{width:3,color:"#999"}},axisLabel:{distance:-20,color:"#999",fontSize:20},anchor:{show:!1},title:{show:!1},detail:{valueAnimation:!0,width:"60%",lineHeight:40,borderRadius:8,offsetCenter:[0,"-15%"],fontSize:60,fontWeight:"bolder",formatter:"{value} °C",color:"inherit"},data:[{value:20}]},{type:"gauge",center:["50%","60%"],startAngle:200,endAngle:-20,min:0,max:60,itemStyle:{color:"#FD7347"},progress:{show:!0,width:8},pointer:{show:!1},axisLine:{show:!1},axisTick:{show:!1},splitLine:{show:!1},axisLabel:{show:!1},detail:{show:!1},data:[{value:20}]}]})},Oxt={class:"nodes"},Vxt={class:"groups"},Fxt=["onClick"],Bxt={class:"list"},Wxt={style:{width:"100%",display:"flex","justify-content":"space-between","align-items":"center",padding:"20px 10px 10px 10px"}},Hxt={style:{padding:"10px"}},zxt=["onMousedown","title"],$xt={key:1,class:"svg-icon"},Uxt={"aria-hidden":"true"},Gxt=["xlink:href"],jxt=bn({__name:"nodes",setup(n){const e=Ds(),t={IMG:"img"},i=w.ref(0),r=w.ref([{name:"控件",icon:"iconfont icon-icon-relativity",active:[],children:[{name:"基础",layout:"1fr 1fr 1fr",list:[{name:"线段",renderType:"svg",icon:"icon-xianduan",data:{type:"line"}},{name:"文本",renderType:"text",icon:"icon-wenzi",data:{type:"text",text:"测试"}},{name:"图标",renderType:"svg",icon:"icon-tubiao",data:{type:"svg"}},{name:"图片",renderType:"image",icon:"icon-tupian",data:{type:"img",imgData:O0e,imgWidth:48,imgHeight:48}},{name:"矩形",renderType:"text",icon:"icon-xingzhuang-juxing",data:{type:"text",text:"",borderWidth:1,borderStyle:"solid"}},{name:"圆形",renderType:"text",icon:"icon-radio-on-full",data:{type:"text",text:"",borderRadius:25,backgroundColor:"rgb(242, 255, 0)"}}]},{name:"表单",layout:"1fr 1fr 1fr",list:[{name:"按钮",renderType:"form",icon:"icon-biaodanzujian-anniu",data:{type:"button"}},{name:"开关",renderType:"form",icon:"icon-kaiguan-1",data:{type:"switch"}},{name:"文本输入框",renderType:"form",icon:"icon-biaodanzujian-shurukuang",data:{type:"input"}},{name:"数字输入框",renderType:"form",icon:"icon-shuzhi",data:{type:"number"}},{name:"单选框",renderType:"form",icon:"icon-biaodanzujian-xialakuang",data:{type:"select"}},{name:"多选框",renderType:"form",icon:"icon-biaodanzujian-xialakuang",data:{type:"selectMore"}},{name:"日期框",renderType:"form",icon:"icon-riqikuang",data:{type:"date"}},{name:"日期范围",renderType:"form",icon:"icon-riqifanwei",data:{type:"dateRange"}},{name:"计划时间面板",renderType:"planTime",icon:"icon-jihuashijian",data:{type:"planTime"}}]},{name:"表格",layout:"1fr 1fr 1fr",list:[{name:"列表",renderType:"table",icon:"icon-biaodanzujian-biaoge",data:{type:"table-1"}}]}]},{name:"图表",icon:"iconfont icon-icon_chart",active:[],children:[{name:"折线图",layout:"1fr 1fr 1fr",list:[{name:"折线图",renderType:"echart",icon:"icon-tubiao-zhexiantu",data:{type:"echart_1"}},{name:"面积图",renderType:"echart",icon:"icon-tubiao-zhexiantu",data:{type:"echart_2"}},{name:"双Y轴折线图",renderType:"echart",icon:"icon-tubiao-zhexiantu",data:{type:"echart_3"}}]},{name:"柱状图",layout:"1fr 1fr 1fr",list:[{name:"柱状图",renderType:"echart",icon:"icon-icon_chart",data:{type:"echart_4"}},{name:"堆叠柱状图",renderType:"echart",icon:"icon-icon_chart",data:{type:"echart_5"}}]},{name:"饼图",layout:"1fr 1fr 1fr",list:[{name:"基础饼图",renderType:"echart",icon:"icon-bingtu",data:{type:"echart_6"}},{name:"环状图",renderType:"echart",icon:"icon-bingtu",data:{type:"echart_7"}}]}]},{name:"素材",icon:"iconfont icon-icon_image",children:[{name:"定制",layout:"1fr 1fr 1fr",list:[{name:"流动箭头",renderType:"arrow",icon:"icon-liudongjiantou",data:{type:"arrowNode",arrowColor:"#89fce6",arrow:0}},{name:"开关",renderType:"switch",icon:"icon-zhadao",data:{type:"switchNode",switchColor:"rgb(68, 205, 234)",isOpen:!0}}]},{name:"电器svg",layout:"1fr 1fr 1fr",list:Rxt.map(h=>({name:h.name,renderType:"svg",icon:h.id,data:{type:"svg"}}))}],active:[]}]),s=w.ref(""),o=h=>{i.value=h},a=()=>{if(r.value[i.value].active.length>0)r.value[i.value].active=[];else{const h=[];r.value[i.value].children.forEach((d,u)=>{h.push(u)}),r.value[i.value].active=h}},l=(h,d)=>{let u=e.graph.createNode({shape:d.renderType+"-node"});u.setData({icon:d.icon,name:P3(d.name),...d.data}),e.dnd.start(u,h)},c=({node:h})=>{var d,u,f,g,p,m,v,_,b,y,C,x,L,D,E,k,T,I,N;if(((d=h.data)==null?void 0:d.type)==="line"){const M=h.position();h.remove();const P=e.graph.addNode({id:"line"+crypto.randomUUID(),x:M.x-50,y:M.y,width:5,height:5,attrs:{body:{fill:"transparent",stroke:"transparent"}},zIndex:1}),R=e.graph.addNode({id:"line"+crypto.randomUUID(),x:M.x+50,y:M.y,width:5,height:5,attrs:{body:{fill:"transparent",stroke:"transparent"}},zIndex:1}),W=e.graph.addEdge({source:P,target:R,router:"normal",markup:[{tagName:"path",selector:"line"},{tagName:"path",selector:"line1"}],attrs:{line:{stroke:"#1bc8de80",strokeWidth:2,connection:!0,sourceMarker:"",targetMarker:""},line1:{display:"none",connection:!0,x:0,y:0,strokeWidth:4,stroke:"#91f4ffff",fill:"none",strokeDasharray:"8 8",pointerEvents:"none",style:{animation:"ant-line1 30s infinite linear"}}},zIndex:0,data:{name:P3("line"),type:"line",color:"#1bc8de80",flow:!0,dataSource:{bindNode:[],type:"none",path:"",point:{},httpType:"GET",httpUrl:"",params:[],httpTimer:-1,parse:null,fields:{动画流向:"flow",颜色:"color"}}}});e.graph.select(W)}if(["button","input","number","select","date","selectMore","dateRange","switch"].includes((u=h.data)==null?void 0:u.type)&&(h.prop("size",{width:150,height:30}),((f=h.data)==null?void 0:f.type)==="button"&&h.setData({model:{modelValue:"按钮",size:"default"}}),((g=h.data)==null?void 0:g.type)==="input"&&h.setData({model:{modelValue:"",placeholder:"请输入",inputType:"input"}}),((p=h.data)==null?void 0:p.type)==="number"&&h.setData({model:{modelValue:"",placeholder:"请输入"}}),((m=h.data)==null?void 0:m.type)==="select"&&h.setData({model:{modelValue:"",size:"default",placeholder:"请输入",option:[{label:"选项一",value:1},{label:"选项二",value:2}]}}),((v=h.data)==null?void 0:v.type)==="selectMore"&&h.setData({model:{modelValue:[],size:"default",placeholder:"请输入",option:[{label:"选项一",value:1},{label:"选项二",value:2}]}}),((_=h.data)==null?void 0:_.type)==="date"&&h.setData({model:{modelValue:"",size:"default",placeholder:"请输入",dateType:"date"}}),((b=h.data)==null?void 0:b.type)==="dateRange"&&h.setData({model:{modelValue:[],size:"default",placeholder:"请输入",dateType:"daterange"}}),((y=h.data)==null?void 0:y.type)==="switch"&&(h.prop("size",{width:40,height:30}),h.setData({model:{modelValue:!0,size:"default",buttonOnColor:"#13ce66",buttonOffColor:"#ff4949"}}))),["table-1"].includes((C=h.data)==null?void 0:C.type)){h.resize(600,200);const M={rows:4,cols:3,rowHeight:32,colWidth:120,rowHeights:[36,32,32,32],colWidths:[140,120,120],header:{enabled:!0,height:36,backgroundColor:"#1f2a3a",color:"#e5e7eb",fontSize:12,fontWeight:600,borderColor:"#303746",borderWidth:1,textAlign:"center"},cell:{backgroundColor:"#121924",color:"#cbd5f5",fontSize:12,borderColor:"#303746",borderWidth:1,textAlign:"center"},data:{header:["名称","数值","单位"],rows:[["温度","23.6","°C"],["湿度","45","%"],["压力","101.3","kPa"],["","",""]]}};h.setData({backgroundColor:"rgba(177, 191, 255, 0.2)",table:M,dataSource:{fields:{表头数据:"table.data.header",表格数据:"table.data.rows"}}})}if((x=h.data)!=null&&x.type.includes("echart")){h.resize(500,300);const M=Pxt[h.data.type]();if(["echart_1","echart_2","echart_3","echart_4","echart_5"].includes((L=h.data)==null?void 0:L.type)){const P={data:{x:M.xAxis.data??[],y:M.series.map(R=>R.data??[])},option:M};h.setData({backgroundColor:"rgba(0, 0, 0, 0.3)",chart:P,dataSource:{fields:{X轴数据:"chart.data.x",Y轴数据:"chart.data.y"}}})}if(["echart_6","echart_7"].includes((D=h.data)==null?void 0:D.type)){const P={data:{x:((E=M.series[0])==null?void 0:E.data.map(R=>R.name))||[],y:((k=M.series[0])==null?void 0:k.data.map(R=>R.value))||[]},option:M};h.setData({backgroundColor:"rgba(0, 0, 0, 0.3)",chart:P,dataSource:{fields:{X轴数据:"chart.data.x",Y轴数据:"chart.data.y"}}})}}if(((T=h.data)==null?void 0:T.type)==="arrowNode"&&h.setData({dataSource:{fields:{箭头颜色:"arrowColor",箭头朝向:"arrow"}}}),((I=h.data)==null?void 0:I.type)==="switchNode"&&h.setData({dataSource:{fields:{开关颜色:"switchColor",开关状态:"isOpen"}}}),((N=h.data)==null?void 0:N.type)==="planTime"){h.resize(500,470);const M=[];for(let P=0;P<96;P++){const R=P*15,W=R+15,z=$=>{const G=String(Math.floor($/60)).padStart(2,"0"),Y=String($%60).padStart(2,"0");return`${G}:${Y}`};M.push({startTime:z(R),endTime:z(W),activePower:0})}h.setData({model:{modelValue:M}})}};return w.onMounted(()=>{var h;(h=e.graph)==null||h.on("node:added",c)}),w.onBeforeUnmount(()=>{var h;(h=e.graph)==null||h.off("node:added",c)}),(h,d)=>{const u=w.resolveComponent("el-input"),f=w.resolveComponent("el-tooltip"),g=w.resolveComponent("el-image"),p=w.resolveComponent("el-collapse-item"),m=w.resolveComponent("el-collapse");return w.openBlock(),w.createElementBlock("div",Oxt,[w.createElementVNode("div",Vxt,[(w.openBlock(!0),w.createElementBlock(w.Fragment,null,w.renderList(r.value,(v,_)=>(w.openBlock(),w.createElementBlock("div",{key:v.index,class:w.normalizeClass(["group",{active:i.value===_}]),onClick:b=>o(_)},[w.createElementVNode("i",{class:w.normalizeClass(v.icon)},null,2),w.createElementVNode("span",null,w.toDisplayString(v.name),1)],10,Fxt))),128))]),w.createElementVNode("div",Bxt,[w.createElementVNode("div",Wxt,[w.createVNode(u,{modelValue:s.value,"onUpdate:modelValue":d[0]||(d[0]=v=>s.value=v),style:{width:"180px"},placeholder:"请输入过滤","prefix-icon":w.unref(kIe),clearable:""},null,8,["modelValue","prefix-icon"]),w.createVNode(f,{effect:"light",content:"展开/折叠",placement:"top"},{default:w.withCtx(()=>[w.createElementVNode("div",{style:{cursor:"pointer","font-size":"20px"},onClick:a},[...d[2]||(d[2]=[w.createElementVNode("i",{class:"iconfont icon-menu-fold"},null,-1)])])]),_:1})]),w.createElementVNode("div",Hxt,[w.createVNode(m,{modelValue:r.value[i.value].active,"onUpdate:modelValue":d[1]||(d[1]=v=>r.value[i.value].active=v),"expand-icon-position":"left",style:{border:"none","background-color":"transparent"}},{default:w.withCtx(()=>[(w.openBlock(!0),w.createElementBlock(w.Fragment,null,w.renderList(r.value[i.value].children,(v,_)=>(w.openBlock(),w.createBlock(p,{key:_,title:v.name,name:_},{default:w.withCtx(()=>[w.createElementVNode("div",{class:"expand-content",style:w.normalizeStyle({gridTemplateColumns:v.layout?v.layout:"1fr 1fr 1fr"})},[(w.openBlock(!0),w.createElementBlock(w.Fragment,null,w.renderList(v.list.filter(b=>b.name.includes(s.value)),(b,y)=>(w.openBlock(),w.createElementBlock("div",{key:y,class:"graphic",onMousedown:C=>l(C,b),title:b.name},[b.renderType===t.IMG?(w.openBlock(),w.createBlock(g,{key:0,src:b.icon,style:{width:"100px",height:"60px",margin:"auto"}},null,8,["src"])):(w.openBlock(),w.createElementBlock("div",$xt,[(w.openBlock(),w.createElementBlock("svg",Uxt,[w.createElementVNode("use",{"xlink:href":"#"+b.icon},null,8,Gxt)]))])),w.createElementVNode("p",null,w.toDisplayString(b.name),1)],40,zxt))),128))],4)]),_:2},1032,["title","name"]))),128))]),_:1},8,["modelValue"])])])])}}},[["__scopeId","data-v-5460cad9"]]),qxt={class:"datas"},Kxt={class:"groups"},Yxt=["onClick"],Xxt={class:"list"},Zxt={style:{padding:"10px"}},Jxt=["onMousedown","title"],Qxt={key:1},eLt=["onClick"],tLt=bn({__name:"datas",setup(n){const e=Ds(),t=w.inject("topoApi"),i=w.inject("storage"),r=w.ref([]),s=w.ref(!1),o=w.ref([{name:"Opcua",icon:"iconfont icon-control-platform",children:[]},{name:"Redis",icon:"iconfont icon-icon_chart",children:[]}]),a=w.ref(0),l=w.ref(""),c=y=>{if(a.value!==y){if(s.value){ElMessage.warning("正在加载数据,请稍后再试");return}a.value=y,l.value="",h(),f()}},h=async()=>{s.value=!0,a.value===0?r.value=await t.getDeviceList():a.value===1&&(r.value=await t.getRedisDeviceList()),s.value=!1};h();const d=w.ref(null),u={value:"id",label:"label",data:"data",children:"children"},f=()=>{d.value.filter(l.value)},g=(y,C,x)=>x.label.includes(y),p=y=>{var E;const C=((E=y.data)==null?void 0:E.data)||{},x=P3(y.label),L=`const description = data.pointTemp.description;
|
|
893
|
+
`)),zi(i)),s.push({dimIdx:v.index,parser:_,comparator:new Vwe(u,g)})});var o=e.sourceFormat;o!==xa&&o!==Bh&&(process.env.NODE_ENV!=="production"&&(i='sourceFormat "'+o+'" is not supported yet'),zi(i));for(var a=[],l=0,c=e.count();l<c;l++)a.push(e.getRawDataItem(l));return a.sort(function(h,d){for(var u=0;u<s.length;u++){var f=s[u],g=e.retrieveValueFromItem(h,f.dimIdx),p=e.retrieveValueFromItem(d,f.dimIdx);f.parser&&(g=f.parser(g),p=f.parser(p));var m=f.comparator.evaluate(g,p);if(m!==0)return m}return 0}),{data:a}}};function _St(n){n.registerTransform(mSt),n.registerTransform(vSt)}var bSt=function(n){de(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type="dataset",t}return e.prototype.init=function(t,i,r){n.prototype.init.call(this,t,i,r),this._sourceManager=new $we(this),Uwe(this)},e.prototype.mergeOption=function(t,i){n.prototype.mergeOption.call(this,t,i),Uwe(this)},e.prototype.optionUpdated=function(){this._sourceManager.dirty()},e.prototype.getSourceManager=function(){return this._sourceManager},e.type="dataset",e.defaultOption={seriesLayoutBy:df},e}(ei),ySt=function(n){de(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type="dataset",t}return e.type="dataset",e}(ur);function wSt(n){n.registerComponentModel(bSt),n.registerComponentView(ySt)}var yf=lf.CMD;function gL(n,e){return Math.abs(n-e)<1e-5}function AZ(n){var e=n.data,t=n.len(),i=[],r,s=0,o=0,a=0,l=0;function c(N,M){r&&r.length>2&&i.push(r),r=[N,M]}function h(N,M,P,R){gL(N,P)&&gL(M,R)||r.push(N,M,P,R,P,R)}function d(N,M,P,R,W,z){var $=Math.abs(M-N),G=Math.tan($/4)*4/3,Y=M<N?-1:1,K=Math.cos(N),Z=Math.sin(N),Q=Math.cos(M),ae=Math.sin(M),Ie=K*W+P,$e=Z*z+R,Ee=Q*W+P,le=ae*z+R,we=W*G*Y,be=z*G*Y;r.push(Ie-we*Z,$e+be*K,Ee+we*ae,le-be*Q,Ee,le)}for(var u,f,g,p,m=0;m<t;){var v=e[m++],_=m===1;switch(_&&(s=e[m],o=e[m+1],a=s,l=o,(v===yf.L||v===yf.C||v===yf.Q)&&(r=[a,l])),v){case yf.M:s=a=e[m++],o=l=e[m++],c(a,l);break;case yf.L:u=e[m++],f=e[m++],h(s,o,u,f),s=u,o=f;break;case yf.C:r.push(e[m++],e[m++],e[m++],e[m++],s=e[m++],o=e[m++]);break;case yf.Q:u=e[m++],f=e[m++],g=e[m++],p=e[m++],r.push(s+2/3*(u-s),o+2/3*(f-o),g+2/3*(u-g),p+2/3*(f-p),g,p),s=g,o=p;break;case yf.A:var b=e[m++],y=e[m++],C=e[m++],x=e[m++],L=e[m++],D=e[m++]+L;m+=1;var E=!e[m++];u=Math.cos(L)*C+b,f=Math.sin(L)*x+y,_?(a=u,l=f,c(a,l)):h(s,o,u,f),s=Math.cos(D)*C+b,o=Math.sin(D)*x+y;for(var k=(E?-1:1)*Math.PI/2,T=L;E?T>D:T<D;T+=k){var I=E?Math.max(T+k,D):Math.min(T+k,D);d(T,I,b,y,C,x)}break;case yf.R:a=s=e[m++],l=o=e[m++],u=a+e[m++],f=l+e[m++],c(u,l),h(u,l,u,f),h(u,f,a,f),h(a,f,a,l),h(a,l,u,l);break;case yf.Z:r&&h(s,o,a,l),s=a,o=l;break}}return r&&r.length>2&&i.push(r),i}function RZ(n,e,t,i,r,s,o,a,l,c){if(gL(n,t)&&gL(e,i)&&gL(r,o)&&gL(s,a)){l.push(o,a);return}var h=2/c,d=h*h,u=o-n,f=a-e,g=Math.sqrt(u*u+f*f);u/=g,f/=g;var p=t-n,m=i-e,v=r-o,_=s-a,b=p*p+m*m,y=v*v+_*_;if(b<d&&y<d){l.push(o,a);return}var C=u*p+f*m,x=-u*v-f*_,L=b-C*C,D=y-x*x;if(L<d&&C>=0&&D<d&&x>=0){l.push(o,a);return}var E=[],k=[];Av(n,t,r,o,.5,E),Av(e,i,s,a,.5,k),RZ(E[0],k[0],E[1],k[1],E[2],k[2],E[3],k[3],l,c),RZ(E[4],k[4],E[5],k[5],E[6],k[6],E[7],k[7],l,c)}function CSt(n,e){var t=AZ(n),i=[];e=e||1;for(var r=0;r<t.length;r++){var s=t[r],o=[],a=s[0],l=s[1];o.push(a,l);for(var c=2;c<s.length;){var h=s[c++],d=s[c++],u=s[c++],f=s[c++],g=s[c++],p=s[c++];RZ(a,l,h,d,u,f,g,p,o,e),a=g,l=p}i.push(o)}return i}function sIe(n,e,t){var i=n[e],r=n[1-e],s=Math.abs(i/r),o=Math.ceil(Math.sqrt(s*t)),a=Math.floor(t/o);a===0&&(a=1,o=t);for(var l=[],c=0;c<o;c++)l.push(a);var h=o*a,d=t-h;if(d>0)for(var c=0;c<d;c++)l[c%o]+=1;return l}function oIe(n,e,t){for(var i=n.r0,r=n.r,s=n.startAngle,o=n.endAngle,a=Math.abs(o-s),l=a*r,c=r-i,h=l>Math.abs(c),d=sIe([l,c],h?0:1,e),u=(h?a:c)/d.length,f=0;f<d.length;f++)for(var g=(h?c:a)/d[f],p=0;p<d[f];p++){var m={};h?(m.startAngle=s+u*f,m.endAngle=s+u*(f+1),m.r0=i+g*p,m.r=i+g*(p+1)):(m.startAngle=s+g*p,m.endAngle=s+g*(p+1),m.r0=i+u*f,m.r=i+u*(f+1)),m.clockwise=n.clockwise,m.cx=n.cx,m.cy=n.cy,t.push(m)}}function SSt(n,e,t){for(var i=n.width,r=n.height,s=i>r,o=sIe([i,r],s?0:1,e),a=s?"width":"height",l=s?"height":"width",c=s?"x":"y",h=s?"y":"x",d=n[a]/o.length,u=0;u<o.length;u++)for(var f=n[l]/o[u],g=0;g<o[u];g++){var p={};p[c]=u*d,p[h]=g*f,p[a]=d,p[l]=f,p.x+=n.x,p.y+=n.y,t.push(p)}}function aIe(n,e,t,i){return n*i-t*e}function xSt(n,e,t,i,r,s,o,a){var l=t-n,c=i-e,h=o-r,d=a-s,u=aIe(h,d,l,c);if(Math.abs(u)<1e-6)return null;var f=n-r,g=e-s,p=aIe(f,g,h,d)/u;return p<0||p>1?null:new Vt(p*l+n,p*c+e)}function LSt(n,e,t){var i=new Vt;Vt.sub(i,t,e),i.normalize();var r=new Vt;Vt.sub(r,n,e);var s=r.dot(i);return s}function pL(n,e){var t=n[n.length-1];t&&t[0]===e[0]&&t[1]===e[1]||n.push(e)}function DSt(n,e,t){for(var i=n.length,r=[],s=0;s<i;s++){var o=n[s],a=n[(s+1)%i],l=xSt(o[0],o[1],a[0],a[1],e.x,e.y,t.x,t.y);l&&r.push({projPt:LSt(l,e,t),pt:l,idx:s})}if(r.length<2)return[{points:n},{points:n}];r.sort(function(m,v){return m.projPt-v.projPt});var c=r[0],h=r[r.length-1];if(h.idx<c.idx){var d=c;c=h,h=d}for(var u=[c.pt.x,c.pt.y],f=[h.pt.x,h.pt.y],g=[u],p=[f],s=c.idx+1;s<=h.idx;s++)pL(g,n[s].slice());pL(g,f),pL(g,u);for(var s=h.idx+1;s<=c.idx+i;s++)pL(p,n[s%i].slice());return pL(p,u),pL(p,f),[{points:g},{points:p}]}function lIe(n){var e=n.points,t=[],i=[];x4(e,t,i);var r=new Bt(t[0],t[1],i[0]-t[0],i[1]-t[1]),s=r.width,o=r.height,a=r.x,l=r.y,c=new Vt,h=new Vt;return s>o?(c.x=h.x=a+s/2,c.y=l,h.y=l+o):(c.y=h.y=l+o/2,c.x=a,h.x=a+s),DSt(e,c,h)}function H6(n,e,t,i){if(t===1)i.push(e);else{var r=Math.floor(t/2),s=n(e);H6(n,s[0],r,i),H6(n,s[1],t-r,i)}return i}function ESt(n,e){for(var t=[],i=0;i<e;i++)t.push(nq(n));return t}function kSt(n,e){e.setStyle(n.style),e.z=n.z,e.z2=n.z2,e.zlevel=n.zlevel}function TSt(n){for(var e=[],t=0;t<n.length;)e.push([n[t++],n[t++]]);return e}function ISt(n,e){var t=[],i=n.shape,r;switch(n.type){case"rect":SSt(i,e,t),r=_i;break;case"sector":oIe(i,e,t),r=ol;break;case"circle":oIe({r0:0,r:i.r,startAngle:0,endAngle:Math.PI*2,cx:i.cx,cy:i.cy},e,t),r=ol;break;default:var s=n.getComputedTransform(),o=s?Math.sqrt(Math.max(s[0]*s[0]+s[1]*s[1],s[2]*s[2]+s[3]*s[3])):1,a=Le(CSt(n.getUpdatedPathProxy(),o),function(v){return TSt(v)}),l=a.length;if(l===0)H6(lIe,{points:a[0]},e,t);else if(l===e)for(var c=0;c<l;c++)t.push({points:a[c]});else{var h=0,d=Le(a,function(v){var _=[],b=[];x4(v,_,b);var y=(b[1]-_[1])*(b[0]-_[0]);return h+=y,{poly:v,area:y}});d.sort(function(v,_){return _.area-v.area});for(var u=e,c=0;c<l;c++){var f=d[c];if(u<=0)break;var g=c===l-1?u:Math.ceil(f.area/h*e);g<0||(H6(lIe,{points:f.poly},g,t),u-=g)}}r=al;break}if(!r)return ESt(n,e);for(var p=[],c=0;c<t.length;c++){var m=new r;m.setShape(t[c]),kSt(n,m),p.push(m)}return p}function NSt(n,e){var t=n.length,i=e.length;if(t===i)return[n,e];for(var r=[],s=[],o=t<i?n:e,a=Math.min(t,i),l=Math.abs(i-t)/6,c=(a-2)/6,h=Math.ceil(l/c)+1,d=[o[0],o[1]],u=l,f=2;f<a;){var g=o[f-2],p=o[f-1],m=o[f++],v=o[f++],_=o[f++],b=o[f++],y=o[f++],C=o[f++];if(u<=0){d.push(m,v,_,b,y,C);continue}for(var x=Math.min(u,h-1)+1,L=1;L<=x;L++){var D=L/x;Av(g,m,_,y,D,r),Av(p,v,b,C,D,s),g=r[3],p=s[3],d.push(r[1],s[1],r[2],s[2],g,p),m=r[5],v=s[5],_=r[6],b=s[6]}u-=x-1}return o===n?[d,e]:[n,d]}function cIe(n,e){for(var t=n.length,i=n[t-2],r=n[t-1],s=[],o=0;o<e.length;)s[o++]=i,s[o++]=r;return s}function MSt(n,e){for(var t,i,r,s=[],o=[],a=0;a<Math.max(n.length,e.length);a++){var l=n[a],c=e[a],h=void 0,d=void 0;l?c?(t=NSt(l,c),h=t[0],d=t[1],i=h,r=d):(d=cIe(r||l,l),h=l):(h=cIe(i||c,c),d=c),s.push(h),o.push(d)}return[s,o]}function hIe(n){for(var e=0,t=0,i=0,r=n.length,s=0,o=r-2;s<r;o=s,s+=2){var a=n[o],l=n[o+1],c=n[s],h=n[s+1],d=a*h-c*l;e+=d,t+=(a+c)*d,i+=(l+h)*d}return e===0?[n[0]||0,n[1]||0]:[t/e/3,i/e/3,e]}function ASt(n,e,t,i){for(var r=(n.length-2)/6,s=1/0,o=0,a=n.length,l=a-2,c=0;c<r;c++){for(var h=c*6,d=0,u=0;u<a;u+=2){var f=u===0?h:(h+u-2)%l+2,g=n[f]-t[0],p=n[f+1]-t[1],m=e[u]-i[0],v=e[u+1]-i[1],_=m-g,b=v-p;d+=_*_+b*b}d<s&&(s=d,o=c)}return o}function RSt(n){for(var e=[],t=n.length,i=0;i<t;i+=2)e[i]=n[t-i-2],e[i+1]=n[t-i-1];return e}function PSt(n,e,t,i){for(var r=[],s,o=0;o<n.length;o++){var a=n[o],l=e[o],c=hIe(a),h=hIe(l);s==null&&(s=c[2]<0!=h[2]<0);var d=[],u=[],f=0,g=1/0,p=[],m=a.length;s&&(a=RSt(a));for(var v=ASt(a,l,c,h)*6,_=m-2,b=0;b<_;b+=2){var y=(v+b)%_+2;d[b+2]=a[y]-c[0],d[b+3]=a[y+1]-c[1]}d[0]=a[v]-c[0],d[1]=a[v+1]-c[1];for(var C=i/t,x=-i/2;x<=i/2;x+=C){for(var L=Math.sin(x),D=Math.cos(x),E=0,b=0;b<a.length;b+=2){var k=d[b],T=d[b+1],I=l[b]-h[0],N=l[b+1]-h[1],M=I*D-N*L,P=I*L+N*D;p[b]=M,p[b+1]=P;var R=M-k,W=P-T;E+=R*R+W*W}if(E<g){g=E,f=x;for(var z=0;z<p.length;z++)u[z]=p[z]}}r.push({from:d,to:u,fromCp:c,toCp:h,rotation:-f})}return r}function z6(n){return n.__isCombineMorphing}var dIe="__mOriginal_";function $6(n,e,t){var i=dIe+e,r=n[i]||n[e];n[i]||(n[i]=n[e]);var s=t.replace,o=t.after,a=t.before;n[e]=function(){var l=arguments,c;return a&&a.apply(this,l),s?c=s.apply(this,l):c=r.apply(this,l),o&&o.apply(this,l),c}}function sN(n,e){var t=dIe+e;n[t]&&(n[e]=n[t],n[t]=null)}function uIe(n,e){for(var t=0;t<n.length;t++)for(var i=n[t],r=0;r<i.length;){var s=i[r],o=i[r+1];i[r++]=e[0]*s+e[2]*o+e[4],i[r++]=e[1]*s+e[3]*o+e[5]}}function fIe(n,e){var t=n.getUpdatedPathProxy(),i=e.getUpdatedPathProxy(),r=MSt(AZ(t),AZ(i)),s=r[0],o=r[1],a=n.getComputedTransform(),l=e.getComputedTransform();function c(){this.transform=null}a&&uIe(s,a),l&&uIe(o,l),$6(e,"updateTransform",{replace:c}),e.transform=null;var h=PSt(s,o,10,Math.PI),d=[];$6(e,"buildPath",{replace:function(u){for(var f=e.__morphT,g=1-f,p=[],m=0;m<h.length;m++){var v=h[m],_=v.from,b=v.to,y=v.rotation*f,C=v.fromCp,x=v.toCp,L=Math.sin(y),D=Math.cos(y);U3(p,C,x,f);for(var E=0;E<_.length;E+=2){var k=_[E],T=_[E+1],I=b[E],N=b[E+1],M=k*g+I*f,P=T*g+N*f;d[E]=M*D-P*L+p[0],d[E+1]=M*L+P*D+p[1]}var R=d[0],W=d[1];u.moveTo(R,W);for(var E=2;E<_.length;){var I=d[E++],N=d[E++],z=d[E++],$=d[E++],G=d[E++],Y=d[E++];R===I&&W===N&&z===G&&$===Y?u.lineTo(G,Y):u.bezierCurveTo(I,N,z,$,G,Y),R=G,W=Y}}}})}function PZ(n,e,t){if(!n||!e)return e;var i=t.done,r=t.during;fIe(n,e),e.__morphT=0;function s(){sN(e,"buildPath"),sN(e,"updateTransform"),e.__morphT=-1,e.createPathProxy(),e.dirtyShape()}return e.animateTo({__morphT:1},dt({during:function(o){e.dirtyShape(),r&&r(o)},done:function(){s(),i&&i()}},t)),e}function OSt(n,e,t,i,r,s){var o=16;n=r===t?0:Math.round(32767*(n-t)/(r-t)),e=s===i?0:Math.round(32767*(e-i)/(s-i));for(var a=0,l,c=(1<<o)/2;c>0;c/=2){var h=0,d=0;(n&c)>0&&(h=1),(e&c)>0&&(d=1),a+=c*c*(3*h^d),d===0&&(h===1&&(n=c-1-n,e=c-1-e),l=n,n=e,e=l)}return a}function U6(n){var e=1/0,t=1/0,i=-1/0,r=-1/0,s=Le(n,function(a){var l=a.getBoundingRect(),c=a.getComputedTransform(),h=l.x+l.width/2+(c?c[4]:0),d=l.y+l.height/2+(c?c[5]:0);return e=Math.min(h,e),t=Math.min(d,t),i=Math.max(h,i),r=Math.max(d,r),[h,d]}),o=Le(s,function(a,l){return{cp:a,z:OSt(a[0],a[1],e,t,i,r),path:n[l]}});return o.sort(function(a,l){return a.z-l.z}).map(function(a){return a.path})}function gIe(n){return ISt(n.path,n.count)}function OZ(){return{fromIndividuals:[],toIndividuals:[],count:0}}function VSt(n,e,t){var i=[];function r(C){for(var x=0;x<C.length;x++){var L=C[x];z6(L)?r(L.childrenRef()):L instanceof Jt&&i.push(L)}}r(n);var s=i.length;if(!s)return OZ();var o=t.dividePath||gIe,a=o({path:e,count:s});if(a.length!==s)return console.error("Invalid morphing: unmatched splitted path"),OZ();i=U6(i),a=U6(a);for(var l=t.done,c=t.during,h=t.individualDelay,d=new ep,u=0;u<s;u++){var f=i[u],g=a[u];g.parent=e,g.copyTransform(d),h||fIe(f,g)}e.__isCombineMorphing=!0,e.childrenRef=function(){return a};function p(C){for(var x=0;x<a.length;x++)a[x].addSelfToZr(C)}$6(e,"addSelfToZr",{after:function(C){p(C)}}),$6(e,"removeSelfFromZr",{after:function(C){for(var x=0;x<a.length;x++)a[x].removeSelfFromZr(C)}});function m(){e.__isCombineMorphing=!1,e.__morphT=-1,e.childrenRef=null,sN(e,"addSelfToZr"),sN(e,"removeSelfFromZr")}var v=a.length;if(h)for(var _=v,b=function(){_--,_===0&&(m(),l&&l())},u=0;u<v;u++){var y=h?dt({delay:(t.delay||0)+h(u,v,i[u],a[u]),done:b},t):t;PZ(i[u],a[u],y)}else e.__morphT=0,e.animateTo({__morphT:1},dt({during:function(C){for(var x=0;x<v;x++){var L=a[x];L.__morphT=e.__morphT,L.dirtyShape()}c&&c(C)},done:function(){m();for(var C=0;C<n.length;C++)sN(n[C],"updateTransform");l&&l()}},t));return e.__zr&&p(e.__zr),{fromIndividuals:i,toIndividuals:a,count:v}}function FSt(n,e,t){var i=e.length,r=[],s=t.dividePath||gIe;function o(f){for(var g=0;g<f.length;g++){var p=f[g];z6(p)?o(p.childrenRef()):p instanceof Jt&&r.push(p)}}if(z6(n)){o(n.childrenRef());var a=r.length;if(a<i)for(var l=0,c=a;c<i;c++)r.push(nq(r[l++%a]));r.length=i}else{r=s({path:n,count:i});for(var h=n.getComputedTransform(),c=0;c<r.length;c++)r[c].setLocalTransform(h);if(r.length!==i)return console.error("Invalid morphing: unmatched splitted path"),OZ()}r=U6(r),e=U6(e);for(var d=t.individualDelay,c=0;c<i;c++){var u=d?dt({delay:(t.delay||0)+d(c,i,r[c],e[c])},t):t;PZ(r[c],e[c],u)}return{fromIndividuals:r,toIndividuals:e,count:e.length}}function pIe(n){return xe(n[0])}function mIe(n,e){for(var t=[],i=n.length,r=0;r<i;r++)t.push({one:n[r],many:[]});for(var r=0;r<e.length;r++){var s=e[r].length,o=void 0;for(o=0;o<s;o++)t[o%i].many.push(e[r][o])}for(var a=0,r=i-1;r>=0;r--)if(!t[r].many.length){var l=t[a].many;if(l.length<=1)if(a)a=0;else return t;var s=l.length,c=Math.ceil(s/2);t[r].many=l.slice(c,s),t[a].many=l.slice(0,c),a++}return t}var BSt={clone:function(n){for(var e=[],t=1-Math.pow(1-n.path.style.opacity,1/n.count),i=0;i<n.count;i++){var r=nq(n.path);r.setStyle("opacity",t),e.push(r)}return e},split:null};function VZ(n,e,t,i,r,s){if(!n.length||!e.length)return;var o=Sx("update",i,r);if(!(o&&o.duration>0))return;var a=i.getModel("universalTransition").get("delay"),l=Object.assign({setToFinal:!0},o),c,h;pIe(n)&&(c=n,h=e),pIe(e)&&(c=e,h=n);function d(v,_,b,y,C){var x=v.many,L=v.one;if(x.length===1&&!C){var D=_?x[0]:L,E=_?L:x[0];if(z6(D))d({many:[D],one:E},!0,b,y,!0);else{var k=a?dt({delay:a(b,y)},l):l;PZ(D,E,k),s(D,E,D,E,k)}}else for(var T=dt({dividePath:BSt[t],individualDelay:a&&function(W,z,$,G){return a(W+b,y)}},l),I=_?VSt(x,L,T):FSt(L,x,T),N=I.fromIndividuals,M=I.toIndividuals,P=N.length,R=0;R<P;R++){var k=a?dt({delay:a(R,P)},l):l;s(N[R],M[R],_?x[R]:v.one,_?v.one:x[R],k)}}for(var u=c?c===n:n.length>e.length,f=c?mIe(h,c):mIe(u?e:n,[u?n:e]),g=0,p=0;p<f.length;p++)g+=f[p].many.length;for(var m=0,p=0;p<f.length;p++)d(f[p],u,m,g),m+=f[p].many.length}function Rb(n){if(!n)return[];if(xe(n)){for(var e=[],t=0;t<n.length;t++)e.push(Rb(n[t]));return e}var i=[];return n.traverse(function(r){r instanceof Jt&&!r.disableMorphing&&!r.invisible&&!r.ignore&&i.push(r)}),i}var vIe=1e4,WSt=0,_Ie=1,bIe=2,HSt=vi();function zSt(n,e){for(var t=n.dimensions,i=0;i<t.length;i++){var r=n.getDimensionInfo(t[i]);if(r&&r.otherDims[e]===0)return t[i]}}function $St(n,e,t){var i=n.getDimensionInfo(t),r=i&&i.ordinalMeta;if(i){var s=n.get(i.name,e);return r&&r.categories[s]||s+""}}function yIe(n,e,t,i){var r=i?"itemChildGroupId":"itemGroupId",s=zSt(n,r);if(s){var o=$St(n,e,s);return o}var a=n.getRawDataItem(e),l=i?"childGroupId":"groupId";if(a&&a[l])return a[l]+"";if(!i)return t||n.getId(e)}function wIe(n){var e=[];return V(n,function(t){var i=t.data,r=t.dataGroupId;if(i.count()>vIe){process.env.NODE_ENV!=="production"&&yr("Universal transition is disabled on large data > 10k.");return}for(var s=i.getIndices(),o=0;o<s.length;o++)e.push({data:i,groupId:yIe(i,o,r,!1),childGroupId:yIe(i,o,r,!0),divide:t.divide,dataIndex:o})}),e}function FZ(n,e,t){n.traverse(function(i){i instanceof Jt&&nr(i,{style:{opacity:0}},e,{dataIndex:t,isFrom:!0})})}function BZ(n){if(n.parent){var e=n.getComputedTransform();n.setLocalTransform(e),n.parent.remove(n)}}function mL(n){n.stopAnimation(),n.isGroup&&n.traverse(function(e){e.stopAnimation()})}function USt(n,e,t){var i=Sx("update",t,e);i&&n.traverse(function(r){if(r instanceof Rh){var s=Pat(r);s&&r.animateFrom({style:s},i)}})}function GSt(n,e){var t=n.length;if(t!==e.length)return!1;for(var i=0;i<t;i++){var r=n[i],s=e[i];if(r.data.getId(r.dataIndex)!==s.data.getId(s.dataIndex))return!1}return!0}function CIe(n,e,t){var i=wIe(n),r=wIe(e);function s(b,y,C,x,L){(C||b)&&y.animateFrom({style:C&&C!==b?_e(_e({},C.style),b.style):b.style},L)}var o=!1,a=WSt,l=Qe(),c=Qe();i.forEach(function(b){b.groupId&&l.set(b.groupId,!0),b.childGroupId&&c.set(b.childGroupId,!0)});for(var h=0;h<r.length;h++){var d=r[h].groupId;if(c.get(d)){a=_Ie;break}var u=r[h].childGroupId;if(u&&l.get(u)){a=bIe;break}}function f(b,y){return function(C){var x=C.data,L=C.dataIndex;return y?x.getId(L):b?a===_Ie?C.childGroupId:C.groupId:a===bIe?C.childGroupId:C.groupId}}var g=GSt(i,r),p={};if(!g)for(var h=0;h<r.length;h++){var m=r[h],v=m.data.getItemGraphicEl(m.dataIndex);v&&(p[v.id]=!0)}function _(b,y){var C=i[y],x=r[b],L=x.data.hostModel,D=C.data.getItemGraphicEl(C.dataIndex),E=x.data.getItemGraphicEl(x.dataIndex);if(D===E){E&&USt(E,x.dataIndex,L);return}D&&p[D.id]||E&&(mL(E),D?(mL(D),BZ(D),o=!0,VZ(Rb(D),Rb(E),x.divide,L,b,s)):FZ(E,L,b))}new hp(i,r,f(!0,g),f(!1,g),null,"multiple").update(_).updateManyToOne(function(b,y){var C=r[b],x=C.data,L=x.hostModel,D=x.getItemGraphicEl(C.dataIndex),E=Hi(Le(y,function(k){return i[k].data.getItemGraphicEl(i[k].dataIndex)}),function(k){return k&&k!==D&&!p[k.id]});D&&(mL(D),E.length?(V(E,function(k){mL(k),BZ(k)}),o=!0,VZ(Rb(E),Rb(D),C.divide,L,b,s)):FZ(D,L,C.dataIndex))}).updateOneToMany(function(b,y){var C=i[y],x=C.data.getItemGraphicEl(C.dataIndex);if(!(x&&p[x.id])){var L=Hi(Le(b,function(E){return r[E].data.getItemGraphicEl(r[E].dataIndex)}),function(E){return E&&E!==x}),D=r[b[0]].data.hostModel;L.length&&(V(L,function(E){return mL(E)}),x?(mL(x),BZ(x),o=!0,VZ(Rb(x),Rb(L),C.divide,D,b[0],s)):V(L,function(E){return FZ(E,D,b[0])}))}}).updateManyToMany(function(b,y){new hp(y,b,function(C){return i[C].data.getId(i[C].dataIndex)},function(C){return r[C].data.getId(r[C].dataIndex)}).update(function(C,x){_(b[C],y[x])}).execute()}).execute(),o&&V(e,function(b){var y=b.data,C=y.hostModel,x=C&&t.getViewOfSeriesModel(C),L=Sx("update",C,0);x&&C.isAnimationEnabled()&&L&&L.duration>0&&x.group.traverse(function(D){D instanceof Jt&&!D.animators.length&&D.animateFrom({style:{opacity:0}},L)})})}function SIe(n){var e=n.getModel("universalTransition").get("seriesKey");return e||n.id}function xIe(n){return xe(n)?n.sort().join(","):n}function a_(n){if(n.hostModel)return n.hostModel.getModel("universalTransition").get("divideShape")}function jSt(n,e){var t=Qe(),i=Qe(),r=Qe();V(n.oldSeries,function(o,a){var l=n.oldDataGroupIds[a],c=n.oldData[a],h=SIe(o),d=xIe(h);i.set(d,{dataGroupId:l,data:c}),xe(h)&&V(h,function(u){r.set(u,{key:d,dataGroupId:l,data:c})})});function s(o){t.get(o)&&yr("Duplicated seriesKey in universalTransition "+o)}return V(e.updatedSeries,function(o){if(o.isUniversalTransitionEnabled()&&o.isAnimationEnabled()){var a=o.get("dataGroupId"),l=o.getData(),c=SIe(o),h=xIe(c),d=i.get(h);if(d)process.env.NODE_ENV!=="production"&&s(h),t.set(h,{oldSeries:[{dataGroupId:d.dataGroupId,divide:a_(d.data),data:d.data}],newSeries:[{dataGroupId:a,divide:a_(l),data:l}]});else if(xe(c)){process.env.NODE_ENV!=="production"&&s(h);var u=[];V(c,function(p){var m=i.get(p);m.data&&u.push({dataGroupId:m.dataGroupId,divide:a_(m.data),data:m.data})}),u.length&&t.set(h,{oldSeries:u,newSeries:[{dataGroupId:a,data:l,divide:a_(l)}]})}else{var f=r.get(c);if(f){var g=t.get(f.key);g||(g={oldSeries:[{dataGroupId:f.dataGroupId,data:f.data,divide:a_(f.data)}],newSeries:[]},t.set(f.key,g)),g.newSeries.push({dataGroupId:a,data:l,divide:a_(l)})}}}}),t}function LIe(n,e){for(var t=0;t<n.length;t++){var i=e.seriesIndex!=null&&e.seriesIndex===n[t].seriesIndex||e.seriesId!=null&&e.seriesId===n[t].id;if(i)return t}}function qSt(n,e,t,i){var r=[],s=[];V(fn(n.from),function(o){var a=LIe(e.oldSeries,o);a>=0&&r.push({dataGroupId:e.oldDataGroupIds[a],data:e.oldData[a],divide:a_(e.oldData[a]),groupIdDim:o.dimension})}),V(fn(n.to),function(o){var a=LIe(t.updatedSeries,o);if(a>=0){var l=t.updatedSeries[a].getData();s.push({dataGroupId:e.oldDataGroupIds[a],data:l,divide:a_(l),groupIdDim:o.dimension})}}),r.length>0&&s.length>0&&CIe(r,s,i)}function KSt(n){n.registerUpdateLifecycle("series:beforeupdate",function(e,t,i){V(fn(i.seriesTransition),function(r){V(fn(r.to),function(s){for(var o=i.updatedSeries,a=0;a<o.length;a++)(s.seriesIndex!=null&&s.seriesIndex===o[a].seriesIndex||s.seriesId!=null&&s.seriesId===o[a].id)&&(o[a][c5]=!0)})})}),n.registerUpdateLifecycle("series:transition",function(e,t,i){var r=HSt(t);if(r.oldSeries&&i.updatedSeries&&i.optionChanged){var s=i.seriesTransition;if(s)V(fn(s),function(f){qSt(f,r,i,t)});else{var o=jSt(r,i);V(o.keys(),function(f){var g=o.get(f);CIe(g.oldSeries,g.newSeries,t)})}V(i.updatedSeries,function(f){f[c5]&&(f[c5]=!1)})}for(var a=e.getSeries(),l=r.oldSeries=[],c=r.oldDataGroupIds=[],h=r.oldData=[],d=0;d<a.length;d++){var u=a[d].getData();u.count()<vIe&&(l.push(a[d]),c.push(a[d].get("dataGroupId")),h.push(u))}})}Kt([sft]),Kt([eft]),Kt([Lft,Wft,Xft,Tgt,Wgt,Dpt,emt,Vmt,svt,dvt,yvt,g_t,B_t,X_t,u0t,m0t,D0t,A0t,U0t,X0t,o1t,z1t]),Kt(abt),Kt(Abt),Kt(v2e),Kt(jbt),Kt(FDe),Kt(Xbt),Kt(syt),Kt(jyt),Kt(dwt),Kt(XI),Kt(kwt),Kt(Nwt),Kt(Hwt),Kt(Kwt),Kt(eCt),Kt(oCt),Kt(mCt),Kt(RCt),Kt(MTe),Kt(OTe),Kt(eSt),Kt(JTe),Kt(eIe),Kt(sSt),Kt(_St),Kt(wSt),Kt(KSt),Kt(yut);const YSt=bn({__name:"echartsNode",setup(n){const e=w.inject("width"),t=w.inject("height"),i=w.inject("x6NodeData"),r=w.ref(null);let s=null,o=null;const a=w.computed(()=>{var d,u;return(u=(d=i.value)==null?void 0:d.chart)==null?void 0:u.option}),l=w.computed(()=>{var d,u;return(u=(d=i.value)==null?void 0:d.chart)==null?void 0:u.data}),c=d=>{if(!(!s||!d)&&Array.isArray(l.value.x)&&Array.isArray(l.value.y)){if(d.xAxis&&d.yAxis){d.xAxis.data=l.value.x??[],l.value.y[0]&&Array.isArray(l.value.y[0])?d.series.forEach((u,f)=>{d.series[f].data=l.value.y[f]??[]}):d.series.length>0&&(d.series[0].data=l.value.y),s.setOption(d,!0);return}else if(d.series[0]){const u=[];let f=(l.value.x??[]).length;for(let g=0;g<f;g++)u.push({value:l.value.y[g],name:l.value.x[g]});d.series[0].data=u,s.setOption(d,!0)}}},h=P0e(()=>{s&&s.resize()},200);return w.onMounted(()=>{a.value&&setTimeout(()=>{s=zht(r.value),c(a.value)},200),r.value&&(o=new ResizeObserver(()=>{h()}),o.observe(r.value))}),w.watch(a,()=>{c(JSON.parse(JSON.stringify(a.value)))},{deep:!0}),w.watch(l,()=>{c(JSON.parse(JSON.stringify(a.value)))},{deep:!0}),w.onBeforeUnmount(()=>{o&&(o.disconnect(),o=null),s&&(s.dispose(),s=null)}),(d,u)=>(w.openBlock(),w.createElementBlock("div",{ref_key:"chartEl",ref:r,class:"echartsNode",style:w.normalizeStyle({width:w.unref(e)+"px",height:w.unref(t)+"px"})},null,4))}},[["__scopeId","data-v-cdd874b3"]]),XSt={class:"arrow-wrapper"},ZSt=bn({__name:"arrow",setup(n){w.useCssVars(r=>({v476e7b86:i.value}));const e=w.inject("x6NodeData"),t=w.computed(()=>`rotate(${e.value.arrow}deg)`),i=w.computed(()=>e.value.arrowColor||"#89fce6");return(r,s)=>(w.openBlock(),w.createElementBlock("div",{class:"arrow-container",style:w.normalizeStyle({transform:t.value})},[w.createElementVNode("div",XSt,[(w.openBlock(),w.createElementBlock(w.Fragment,null,w.renderList(4,o=>w.createElementVNode("div",{class:"arrow-triangle",key:o,style:w.normalizeStyle({animationDelay:`${(o-1)*-.4}s`})},null,4)),64))])],4))}},[["__scopeId","data-v-4435f521"]]),JSt={class:"switchBox"},QSt={class:"switch"},ext=bn({__name:"switch",setup(n){w.useCssVars(i=>({ec58845e:t.value}));const e=w.inject("x6NodeData");w.computed(()=>e.value.isOpen);const t=w.computed(()=>e.value.switchColor||"rgb(68, 205, 234)");return(i,r)=>(w.openBlock(),w.createElementBlock("div",JSt,[w.createElementVNode("div",QSt,[r[0]||(r[0]=w.createElementVNode("div",{class:"switchLeft"},null,-1)),r[1]||(r[1]=w.createElementVNode("div",{class:"switchRight"},null,-1)),w.createElementVNode("div",{class:w.normalizeClass({switchLine:!0,open:w.unref(e).isOpen})},null,2),r[2]||(r[2]=w.createElementVNode("div",{class:"switchLeftLine"},null,-1)),r[3]||(r[3]=w.createElementVNode("div",{class:"switchRightLine"},null,-1))])]))}},[["__scopeId","data-v-fece4d9d"]]),txt={class:"formNode"},ixt=bn({__name:"planTimeNode",setup(n){const e=w.inject("x6NodeData"),i=w.inject("getNode")(),r=(a={})=>{const l=Number(a.activePower??0),c=a.direction||(l<0?"discharge":"charge");return{...a,direction:c,activePower:Math.abs(l)}},s=(a={})=>{const l=Math.abs(Number(a.activePower??0));return{...a,activePower:a.direction==="discharge"?-l:l}},o=w.ref((e.value.model.modelValue||[]).map(r));return w.watch(()=>o.value,a=>{const l=i.getData(),c=a.map(s);JSON.stringify(l.model.modelValue)!==JSON.stringify(c)&&(l.model.modelValue=c,i.setData(l,{deep:!1}))},{deep:!0}),w.watch(()=>e.value.model.modelValue,a=>{o.value=(a||[]).map(r)},{deep:!0}),(a,l)=>{const c=w.resolveComponent("el-table-column"),h=w.resolveComponent("el-option"),d=w.resolveComponent("el-select"),u=w.resolveComponent("el-input-number"),f=w.resolveComponent("el-table");return w.openBlock(),w.createElementBlock("div",txt,[w.createVNode(f,{data:o.value,border:"",style:{width:"100%",height:"100%"},size:"small"},{default:w.withCtx(()=>[w.createVNode(c,{prop:"startTime",label:"开始时间"}),w.createVNode(c,{prop:"endTime",label:"结束时间"}),w.createVNode(c,{prop:"direction",label:"充/放电",width:"120"},{default:w.withCtx(g=>[w.createVNode(d,{modelValue:o.value[g.$index].direction,"onUpdate:modelValue":p=>o.value[g.$index].direction=p,size:"small",style:{width:"100%"}},{default:w.withCtx(()=>[w.createVNode(h,{label:"充电",value:"charge"}),w.createVNode(h,{label:"放电",value:"discharge"})]),_:1},8,["modelValue","onUpdate:modelValue"])]),_:1}),w.createVNode(c,{prop:"activePower",label:"计划功率(kW)",width:"180"},{default:w.withCtx(g=>[w.createVNode(u,{modelValue:o.value[g.$index].activePower,"onUpdate:modelValue":p=>o.value[g.$index].activePower=p,min:0,controls:!1,size:"small",style:{width:"160px"}},null,8,["modelValue","onUpdate:modelValue"])]),_:1})]),_:1},8,["data"])])}}},[["__scopeId","data-v-2747bdd7"]]),nxt={name:"",visible:!0,borderStyle:"none",borderRadius:0,borderWidth:0,borderColor:"#5F95FF",opacity:1,backgroundImage:"none",backgroundColor:"transparent",color:"#ffffff",toFix:2,dataSource:{bindNode:[],type:"none",path:"",point:{},httpType:"GET",httpUrl:"",params:[],httpTimer:-1,parse:null,fields:{文本:"text",字体颜色:"color",背景颜色:"backgroundColor",绑定值:"model.modelValue",选项值:"model.option",是否可见:"visible",层级:"zIndex"}},model:{modelValue:null,option:[],buttonConfirmTips:"确认要执行此操作吗?",buttonSuccess:!1,buttonConfirm:!1,buttonSuccessTips:"操作成功!"},status:[]},WZ={"image-node":Gnt,"svg-node":Pnt,"text-node":Vnt,"form-node":znt,"table-node":Znt,"echart-node":YSt,"arrow-node":ZSt,"switch-node":ext,"planTime-node":ixt},HZ=()=>{Object.keys(WZ).forEach(n=>{Ent({shape:n,width:50,height:50,data:{...nxt},component:{render(){return w.h(Int,null,{default:()=>w.h(WZ[n])})}}})})},DIe={Blank:"blank"},vL=Fg.defineStore("property",{state:()=>({targetType:DIe.Blank,cellId:null,tabs:["画布"],activeTab:0,globalVars:[]}),getters:{},actions:{setTarget(n,e){this.targetType=n,n===DIe.Blank?this.tabs=["画布"]:this.tabs=["外观","数据"],this.activeTab=0,this.cellId=e}}}),zZ={backgroundColor:"#6b6b6b26",backgroundImage:null},Ds=Fg.defineStore("editor-graph",{state:()=>({el:null,graph:null,dnd:null,style:{...zZ,width:1920,height:1080},name:"",id:"",zoom:100}),getters:{hasGraph:n=>!!n.graph},actions:{init(){if(this.el===null)return;this.graph&&this.graph.dispose(),this.graph=new ye({container:this.el,autoResize:!0,mousewheel:{enabled:!0,factor:.1},panning:!1,scaling:{min:.5,max:2},background:{color:"#000000"},grid:{size:5,visible:!0,type:"mesh",args:{color:"rgba(100, 100, 100, 0.6)",thickness:1}},translating:{restrict:!0},connecting:{router:"orth",connector:{name:"normal"},args:{padding:0,direction:"H"},anchor:"center",connectionPoint:"anchor",allowBlank:!0,allowLoop:!1,allowMulti:!1,snap:{radius:20},validateConnection({targetMagnet:e}){return!!e}},highlighting:{magnetAdsorbed:{name:"stroke",args:{attrs:{fill:"#5F95FF",stroke:"#5F95FF"}}}}}),this.graph.use(new k0e({enabled:!0}));const n=new L0e({pageWidth:this.style.width,pageHeight:this.style.height,enabled:!0,pannable:!0,autoResize:!1});this.graph.use(n),this.dnd=new uG({target:this.graph,validateNode(){return!0}}),this.graph.use(new N0e({resizing:!0,rotating:!0})),this.graph.use(new B_e({enabled:!0})),this.graph.use(new m0e({enabled:!0,global:!1})).use(new b0e({rubberband:!0,showNodeSelectionBox:!0,showEdgeSelectionBox:!1,modifiers:["meta","shift","ctrl"]})).use(new d0e),HZ(),this.initEvent()},loadMenu({name:n,id:e,value:t,style:i}){if(!this.graph)return;this.name=n,this.id=e,this.graph.fromJSON(t||{}),i?this.style={...this.style,...zZ,...i}:this.style={...this.style,...zZ};const r=Math.min(1280/this.style.width,840/this.style.height);this.graph.zoomTo(r),setTimeout(()=>{this.graph.center(),vL().setTarget("blank",null)},100)},setZoom(n){this.zoom=Number(n),this.graph.zoomTo(n)},updateSize(n,e,t){this.style.width=n,this.style.height=e,this.init(),setTimeout(()=>{t&&t()},100)},syncDataToAttrs(n){if(!n||Object.keys(WZ).includes(n.shape))return;const e=n.getData?n.getData()||{}:{};e.type==="line"&&(n.attr("line/stroke",e.color),e.flow?n.attr("line1/style/animation","ant-line1 30s infinite linear"):n.attr("line1/style/animation","ant-line 30s infinite linear"))},groupSelectedNodes(){if(!this.graph)return null;const n=this.graph.getSelectedCells(),e=n.filter(a=>a.isNode()&&!a.id.includes("group"));if(e.length<2)return null;const t=n.filter(a=>a.isNode()&&a.id.includes("group"));t.length>0&&this.graph.removeCells(t);const i=e.reduce((a,l)=>{const c=l.getBBox();return a.minX=Math.min(a.minX,c.x),a.minY=Math.min(a.minY,c.y),a.maxX=Math.max(a.maxX,c.x+c.width),a.maxY=Math.max(a.maxY,c.y+c.height),a},{minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}),r=10,s=this.graph.addNode({id:`group-${Date.now()}`,shape:"rect",x:i.minX-r,y:i.minY-r,width:i.maxX-i.minX+r*2,height:i.maxY-i.minY+r*2,attrs:{body:{fill:"rgba(69, 131, 255, 0.08)",stroke:"#4583ff",strokeWidth:1,strokeDasharray:"6 4"}},data:{type:"group",name:"组合",opacity:1,borderStyle:"dashed",borderRadius:0,borderWidth:1,borderColor:"#4583ff",backgroundColor:"rgba(69, 131, 255, 0.08)"},zIndex:1e3});return e.forEach(a=>{s.addChild(a)}),this.graph.cleanSelection(),this.graph.select(s),vL().setTarget("node",s.id),s},initEvent(){this.graph.on("node:moving",r=>{}),this.graph.on("scale",({sx:r,sy:s})=>{this.zoom=Number((r*100).toFixed(0))});const n=vL();this.graph.on("blank:click",({e:r,x:s,y:o})=>{n.setTarget("blank",null)}),this.graph.on("edge:click",({e:r,x:s,y:o,edge:a})=>{n.setTarget("edge",a.id),this.graph.select([a.getSourceNode(),a.getTargetNode()])}),this.graph.on("node:click",({e:r,x:s,y:o,node:a})=>{var l;if((l=a.id)!=null&&l.includes("line")){this.graph.clearTransformWidgets(),r.stopPropagation();return}n.setTarget("node",a.id)}),this.graph.on("edge:change:data",({edge:r})=>{this.syncDataToAttrs(r)}),this.graph.on("node:added",({node:r})=>{this.syncDataToAttrs(r)}),this.graph.on("edge:mouseenter",({cell:r})=>{r.addTools([{name:"vertices",args:{attrs:{fill:"#666"},modifiers:["meta","shift","ctrl"]}}])}),this.graph.on("edge:mouseleave",({cell:r})=>{r.hasTool("vertices")&&r.removeTool("vertices"),r.hasTool("source-arrowhead")&&r.removeTool("source-arrowhead"),r.hasTool("target-arrowhead")&&r.removeTool("target-arrowhead")}),this.graph.bindKey(["meta+c","ctrl+c"],()=>{const r=this.graph.getSelectedCells();if(!r.length)return!1;const o=r.filter(u=>u.isNode()&&u.id.includes("group")).flatMap(u=>u.getChildren?u.getChildren()||[]:[]),a=r.filter(u=>u.isNode()),l=r.filter(u=>u.isEdge()),c=[...a,...o],h=this.graph.getEdges().filter(u=>{const f=u.getSourceCell&&u.getSourceCell(),g=u.getTargetCell&&u.getTargetCell();return c.includes(f)||c.includes(g)}),d=[...r,...c,...l,...h].reduce((u,f)=>(u.set(f.id,f),u),new Map);return this.graph.copy([...d.values()]),!1}),this.graph.bindKey(["meta+x","ctrl+x"],()=>{const r=this.graph.getSelectedCells();return r.length&&this.graph.cut(r),!1}),this.graph.bindKey(["meta+v","ctrl+v"],()=>{if(!this.graph.isClipboardEmpty()){const r=this.graph.paste({offset:32});this.graph.cleanSelection(),this.graph.select(r)}return!1}),this.graph.bindKey(["meta+z","ctrl+z"],()=>(this.graph.canUndo()&&this.graph.undo(),!1)),this.graph.bindKey(["meta+shift+z","ctrl+shift+z"],()=>(this.graph.canRedo()&&this.graph.redo(),!1)),this.graph.bindKey(["meta+a","ctrl+alt+a"],()=>{const r=this.graph.getNodes();r&&this.graph.select(r)}),this.graph.bindKey(["Backspace","Delete"],()=>{const r=this.graph.getSelectedCells();r.length&&(this.graph.removeCells(r),n.setTarget("blank",null))},"keydown");const e=(r=0,s=0)=>{const o=this.graph.getSelectedCells().filter(a=>a.isNode());if(o.length)return o.forEach(a=>{const{x:l,y:c}=a.getPosition();a.position(l+r,c+s)}),!1},t=5;this.graph.bindKey(["meta+up","ctrl+up"],()=>e(0,-t)),this.graph.bindKey(["meta+down","ctrl+down"],()=>e(0,t)),this.graph.bindKey(["meta+left","ctrl+left"],()=>e(-t,0)),this.graph.bindKey(["meta+right","ctrl+right"],()=>e(t,0));const i=(r,s)=>{for(let o=0,a=r.length;o<a;o+=1)r[o].style.visibility=s?"visible":"hidden"};this.graph.on("node:mouseenter",()=>{const r=this.el.querySelectorAll(".x6-port-body");i(r,!0)}),this.graph.on("node:mouseleave",()=>{const r=this.el.querySelectorAll(".x6-port-body");i(r,!1)})}}}),_L=Fg.defineStore("menus",{state:()=>({menus:[],current:[],services:{}}),getters:{currentMenu:n=>{var e;return(e=n.menus.find(t=>t.id===n.current[0]))==null?void 0:e.children.find(t=>t.id===n.current[1])}},actions:{async setCurrentMenu(n,e=!1){const t=Ds();if(JSON.stringify(n)===JSON.stringify(this.current)&&e===!1)return!1;this.current=n,t.loadMenu(await this.services.getMenu(n[1]))},async loadAllMenus(n=!1){var e;this.menus=await((e=this.services)==null?void 0:e.getAllMenus()),n&&this.menus[0]&&this.menus[0].children[0]&&this.setCurrentMenu([this.menus[0].id,this.menus[0].children[0].id])},async addMenu(n,e){var i;const t=await((i=this.services)==null?void 0:i.addMenu(n));this.loadAllMenus(),this.setCurrentMenu([t.parentId,t.id]),e&&e()},async saveMenu(n){const e=Ds(),t={name:e.name,id:this.current[1],parentId:this.current[0],style:e.style,value:e.graph.toJSON()};await this.services.saveMenus(t),n&&n()},clearMenu(n){const e=Ds(),t={name:e.name,id:this.current[1],parentId:this.current[0],style:e.style,value:{}};this.services.saveMenus(t),e.graph.clearCells(),n&&n()},async removeMenu(n){if(await this.services.removeMenu(this.current[1]),await this.loadAllMenus(),this.menus[0]&&this.menus[0].children[0])this.setCurrentMenu([this.menus[0].id,this.menus[0].children[0].id]);else{const e=Ds();e.graph.clearCells(),e.name="",e.id=""}n&&n()}}}),rxt={class:"dialog-footer"},sxt={__name:"addMenu",emits:["close"],setup(n,{emit:e}){const t=_L(),{menus:i}=Fg.storeToRefs(t),r=e,s=w.ref(!1);function o(){s.value=!1,r("close")}const a=w.ref(null),l=w.ref({parent:null,parentNameNew:"",name:""}),c=w.ref({parent:[{required:!0,message:"请选择上级目录",trigger:"change"}],parentNameNew:{required:!0,message:"请输入一级目录名称",trigger:"blur"},name:[{required:!0,message:"请输入二级目录名称",trigger:"blur"}]}),h=w.ref(!1),d=async()=>{if(a.value){h.value=!0;try{await a.value.validate((u,f)=>{u&&t.addMenu(l.value,()=>{o()})})}catch{}finally{h.value=!1}}};return w.onMounted(()=>{s.value=!0}),(u,f)=>{const g=w.resolveComponent("el-option"),p=w.resolveComponent("el-select"),m=w.resolveComponent("el-form-item"),v=w.resolveComponent("el-input"),_=w.resolveComponent("el-form"),b=w.resolveComponent("el-button"),y=w.resolveComponent("el-dialog");return w.openBlock(),w.createBlock(y,{modelValue:s.value,"onUpdate:modelValue":f[3]||(f[3]=C=>s.value=C),title:"新增目录",width:"500"},{footer:w.withCtx(()=>[w.createElementVNode("div",rxt,[w.createVNode(b,{onClick:o},{default:w.withCtx(()=>[...f[4]||(f[4]=[w.createTextVNode("取消",-1)])]),_:1}),w.createVNode(b,{type:"primary",onClick:d},{default:w.withCtx(()=>[...f[5]||(f[5]=[w.createTextVNode("确定",-1)])]),_:1})])]),default:w.withCtx(()=>[w.createVNode(_,{ref_key:"formRef",ref:a,model:l.value,"label-width":"auto",style:{padding:"10px 20px"},rules:c.value},{default:w.withCtx(()=>[w.createVNode(m,{label:"上级目录",prop:"parent"},{default:w.withCtx(()=>[w.createVNode(p,{modelValue:l.value.parent,"onUpdate:modelValue":f[0]||(f[0]=C=>l.value.parent=C),placeholder:"请选择上级目录"},{default:w.withCtx(()=>[w.createVNode(g,{value:"0",label:"根目录"}),(w.openBlock(!0),w.createElementBlock(w.Fragment,null,w.renderList(w.unref(i),C=>(w.openBlock(),w.createBlock(g,{key:C.id,label:C.name,value:C.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),l.value.parent=="0"?(w.openBlock(),w.createBlock(m,{key:0,label:"一级目录名称",prop:"parentNameNew"},{default:w.withCtx(()=>[w.createVNode(v,{modelValue:l.value.parentNameNew,"onUpdate:modelValue":f[1]||(f[1]=C=>l.value.parentNameNew=C)},null,8,["modelValue"])]),_:1})):w.createCommentVNode("",!0),w.createVNode(m,{label:"二级目录名称",prop:"name"},{default:w.withCtx(()=>[w.createVNode(v,{modelValue:l.value.name,"onUpdate:modelValue":f[2]||(f[2]=C=>l.value.name=C)},null,8,["modelValue"])]),_:1})]),_:1},8,["model","rules"])]),_:1},8,["modelValue"])}}},oxt=bn({__name:"previewBox",emits:["close"],setup(n,{emit:e}){const t=Ds(),i=w.ref(null);HZ();const r=pG(),s=e;function o(){s("close")}let a=null;return w.onMounted(()=>{const{width:l,height:c}=t.style;a=new ye({container:i.value,width:l,height:c,interacting:{nodeMovable:!1,edgeMovable:!1,magnetConnectable:!1,arrowheadMovable:!1,vertexMovable:!1},selecting:!1,keyboard:!1,mousewheel:!1,panning:!1});const h=t.graph.toJSON();a.fromJSON(h),a.drawBackground({color:t.style.backgroundColor,image:t.style.backgroundImage,size:"cover"})}),w.onBeforeUnmount(()=>{a&&a.dispose()}),(l,c)=>(w.openBlock(),w.createElementBlock("div",{class:"previewBox",onClick:w.withModifiers(o,["self"])},[w.createElementVNode("div",{ref_key:"container",ref:i,class:"ems-preview"},null,512),w.createVNode(w.unref(r))]))}},[["__scopeId","data-v-d30f32f0"]]),axt={class:"toolBox"},lxt={class:"left"},cxt={class:"right"},hxt={key:0,class:"iconfont icon-suoding1",style:{color:"#4583ff"}},dxt={key:1,class:"iconfont icon-jiesuo1"},uxt=bn({__name:"index",setup(n){const e=_L(),t=Ds(),{zoom:i}=Fg.storeToRefs(t),r=w.ref(!1),s=()=>{r.value=!0},o=()=>{e.saveMenu(()=>{Ii.ElMessage.success("保存成功!"),e.loadAllMenus()})};function a(y){const C=/Mac|iPod|iPhone|iPad/.test(navigator.platform);(C&&y.metaKey&&y.key==="s"||!C&&y.ctrlKey&&y.key==="s")&&(y.preventDefault(),o())}const l=()=>{Ii.ElMessageBox.confirm("确认清空画布吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{e.clearMenu(()=>{Ii.ElMessage.success("清空成功!")})})},c=()=>{if(!t.groupSelectedNodes()){Ii.ElMessage.warning("请先框选至少两个节点后再组合");return}Ii.ElMessage.success("组合完成")},h=()=>{Ii.ElMessageBox.confirm("确认删除画布吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{e.removeMenu(()=>{Ii.ElMessage.success("删除成功!")})})},d=w.ref(!1),u=()=>{d.value=!0},f=y=>{t.setZoom(+y*.1)},g=t.graph;g.on("blank:click",({x:y,y:C})=>{}),g.on("mousemove",({x:y,y:C})=>{}),g.on("blank:contextmenu",({e:y})=>{});const p=w.ref(!1),m=()=>{g.isMouseWheelEnabled()?(p.value=!0,g.disablePanning(),g.disableMouseWheel()):(p.value=!1,g.enablePanning(),g.enableMouseWheel())},v=()=>{Bnt(JSON.stringify(g.toJSON()),t.name+".json","application/json")},_=async y=>{console.log(y),y.file.type==="application/json"&&Ii.ElMessageBox.confirm("确认导入画布吗? 此操作将覆盖当前画布","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(async()=>{const C=await Wnt(y.file);g.fromJSON(C)})},b=y=>{const C=t.graph;if(!C)return;const x=C.getSelectedCells().filter(T=>{var I;return T.isNode&&T.isNode()&&!((I=T.id)!=null&&I.includes("line"))});if(x.length<2){Ii.ElMessage.warning("请先框选至少两个节点");return}const L=x.reduce((T,I)=>{const N=I.getBBox();return T.minX=Math.min(T.minX,N.x),T.minY=Math.min(T.minY,N.y),T.maxX=Math.max(T.maxX,N.x+N.width),T.maxY=Math.max(T.maxY,N.y+N.height),T},{minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}),D=String(y),E=(L.minY+L.maxY)/2,k=(L.minX+L.maxX)/2;x.forEach(T=>{const I=T.getBBox(),{x:N,y:M}=T.getPosition();let P=N,R=M;D==="1"?R=L.minY:D==="2"?R=E-I.height/2:D==="3"?R=L.maxY-I.height:D==="4"?P=L.minX:D==="5"?P=k-I.width/2:D==="6"&&(P=L.maxX-I.width),T.position(P,R)})};return w.onMounted(()=>{window.addEventListener("keydown",a)}),w.onBeforeUnmount(()=>{window.removeEventListener("keydown",a)}),(y,C)=>{const x=w.resolveComponent("el-tooltip"),L=w.resolveComponent("el-dropdown-item"),D=w.resolveComponent("el-dropdown-menu"),E=w.resolveComponent("el-dropdown"),k=w.resolveComponent("el-button"),T=w.resolveComponent("el-upload");return w.openBlock(),w.createElementBlock(w.Fragment,null,[w.createElementVNode("div",axt,[w.createElementVNode("div",lxt,[w.createElementVNode("a",{onClick:s},[w.createVNode(x,{effect:"light",content:"新增",placement:"bottom","popper-class":"tooltipcolor"},{default:w.withCtx(()=>[...C[2]||(C[2]=[w.createElementVNode("i",{class:"iconfont icon-xinjian"},null,-1)])]),_:1})]),w.createElementVNode("a",{onClick:o},[w.createVNode(x,{effect:"light",content:"保存",placement:"bottom","popper-class":"tooltipcolor"},{default:w.withCtx(()=>[...C[3]||(C[3]=[w.createElementVNode("i",{class:"iconfont icon-baocun"},null,-1)])]),_:1})]),w.createElementVNode("a",{onClick:l},[w.createVNode(x,{effect:"light",content:"清空",placement:"bottom","popper-class":"tooltipcolor"},{default:w.withCtx(()=>[...C[4]||(C[4]=[w.createElementVNode("i",{class:"iconfont icon-qingkong"},null,-1)])]),_:1})]),w.createElementVNode("a",{onClick:c},[w.createVNode(x,{effect:"light",content:"组合",placement:"bottom","popper-class":"tooltipcolor"},{default:w.withCtx(()=>[...C[5]||(C[5]=[w.createElementVNode("i",{class:"iconfont icon-jianlizuhe1"},null,-1)])]),_:1})]),w.createElementVNode("a",{onClick:h},[w.createVNode(x,{effect:"light",content:"删除",placement:"bottom","popper-class":"tooltipcolor"},{default:w.withCtx(()=>[...C[6]||(C[6]=[w.createElementVNode("i",{class:"iconfont icon-shanchu"},null,-1)])]),_:1})])]),C[17]||(C[17]=w.createElementVNode("div",{style:{flex:"1"}},null,-1)),w.createElementVNode("div",null,[w.createVNode(E,{onCommand:f,"split-button":"",type:"primary",plain:"",size:"small",style:{"line-height":"40px",width:"100px"}},{dropdown:w.withCtx(()=>[w.createVNode(D,null,{default:w.withCtx(()=>[(w.openBlock(),w.createElementBlock(w.Fragment,null,w.renderList(20,I=>(w.openBlock(),w.createElementBlock(w.Fragment,null,[I>=5&&I<=20?(w.openBlock(),w.createBlock(L,{key:0,command:I},{default:w.withCtx(()=>[w.createTextVNode(w.toDisplayString(I)+"0%",1)]),_:2},1032,["command"])):w.createCommentVNode("",!0)],64))),64))]),_:1})]),default:w.withCtx(()=>[w.createTextVNode(w.toDisplayString(w.unref(i))+"% ",1)]),_:1}),w.createVNode(E,{placement:"top-start",onCommand:b},{dropdown:w.withCtx(()=>[w.createVNode(D,null,{default:w.withCtx(()=>[w.createVNode(L,{command:"1"},{default:w.withCtx(()=>[...C[8]||(C[8]=[w.createTextVNode("水平居上对齐",-1)])]),_:1}),w.createVNode(L,{command:"2"},{default:w.withCtx(()=>[...C[9]||(C[9]=[w.createTextVNode("水平居中对齐",-1)])]),_:1}),w.createVNode(L,{command:"3"},{default:w.withCtx(()=>[...C[10]||(C[10]=[w.createTextVNode("水平居下对齐",-1)])]),_:1}),w.createVNode(L,{command:"4"},{default:w.withCtx(()=>[...C[11]||(C[11]=[w.createTextVNode("垂直居左对齐",-1)])]),_:1}),w.createVNode(L,{command:"5"},{default:w.withCtx(()=>[...C[12]||(C[12]=[w.createTextVNode("垂直居中对齐",-1)])]),_:1}),w.createVNode(L,{command:"6"},{default:w.withCtx(()=>[...C[13]||(C[13]=[w.createTextVNode("垂直居右对齐",-1)])]),_:1})]),_:1})]),default:w.withCtx(()=>[w.createVNode(k,{size:"small",style:{height:"26px"}},{default:w.withCtx(()=>[...C[7]||(C[7]=[w.createTextVNode(" 对齐 ",-1)])]),_:1})]),_:1})]),C[18]||(C[18]=w.createElementVNode("div",{style:{flex:"1"}},null,-1)),w.createElementVNode("div",cxt,[w.createElementVNode("a",{onClick:m},[w.createVNode(x,{effect:"light",content:"锁定/解锁画布",placement:"bottom","popper-class":"tooltipcolor"},{default:w.withCtx(()=>[p.value?(w.openBlock(),w.createElementBlock("i",hxt)):(w.openBlock(),w.createElementBlock("i",dxt))]),_:1})]),w.createElementVNode("a",{onClick:u},[w.createVNode(x,{effect:"light",content:"预览",placement:"bottom","popper-class":"tooltipcolor"},{default:w.withCtx(()=>[...C[14]||(C[14]=[w.createElementVNode("i",{class:"iconfont icon-yulan"},null,-1)])]),_:1})]),w.createElementVNode("a",{onClick:v},[w.createVNode(x,{effect:"light",content:"导出",placement:"bottom","popper-class":"tooltipcolor"},{default:w.withCtx(()=>[...C[15]||(C[15]=[w.createElementVNode("i",{class:"iconfont icon-daochu"},null,-1)])]),_:1})]),w.createVNode(T,{style:{"margin-top":"3px"},accept:".json","http-request":_,"show-file-list":!1},{default:w.withCtx(()=>[w.createElementVNode("a",null,[w.createVNode(x,{effect:"light",content:"导入",placement:"bottom","popper-class":"tooltipcolor"},{default:w.withCtx(()=>[...C[16]||(C[16]=[w.createElementVNode("i",{class:"iconfont icon-daoru"},null,-1)])]),_:1})])]),_:1})])]),r.value?(w.openBlock(),w.createBlock(sxt,{key:0,onClose:C[0]||(C[0]=I=>r.value=!1)})):w.createCommentVNode("",!0),d.value?(w.openBlock(),w.createBlock(oxt,{key:1,onClose:C[1]||(C[1]=I=>d.value=!1)})):w.createCommentVNode("",!0)],64)}}},[["__scopeId","data-v-ab102958"]]),fxt={class:"editorArea"},gxt={class:"drawBox"},pxt={style:{width:"100%",height:"100%"}},mxt=bn({__name:"editorArea",props:["width","height"],setup(n){const e=_L(),t=Ds(),{style:i}=Fg.storeToRefs(t),r=n,s=w.ref(null),o=pG(),a=w.inject("topoApi");return w.provide("graph",()=>t.graph),w.onMounted(()=>{t.el=s.value,t.style.height=r.height||1080,t.style.width=r.width||1920,t.init(),e.services=a,e.loadAllMenus(!0)}),w.onBeforeUnmount(()=>{t.graph&&t.graph.dispose()}),(l,c)=>(w.openBlock(),w.createElementBlock("div",fxt,[w.unref(t).graph?(w.openBlock(),w.createBlock(uxt,{key:0})):w.createCommentVNode("",!0),w.createElementVNode("div",gxt,[w.createElementVNode("div",pxt,[w.createElementVNode("div",{ref_key:"container",ref:s,class:"editor-container",style:w.normalizeStyle({backgroundColor:w.unref(i).backgroundColor,backgroundImage:w.unref(i).backgroundImage?`url(${w.unref(i).backgroundImage})`:"none"})},null,4),w.createVNode(w.unref(o))])])]))}},[["__scopeId","data-v-2cac8846"]]);/*! Element Plus Icons Vue v2.3.2 */var vxt=w.defineComponent({name:"Document",__name:"document",setup(n){return(e,t)=>(w.openBlock(),w.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[w.createElementVNode("path",{fill:"currentColor",d:"M832 384H576V128H192v768h640zm-26.496-64L640 154.496V320zM160 64h480l256 256v608a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32m160 448h384v64H320zm0-192h160v64H320zm0 384h384v64H320z"})]))}}),EIe=vxt,_xt=w.defineComponent({name:"Edit",__name:"edit",setup(n){return(e,t)=>(w.openBlock(),w.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[w.createElementVNode("path",{fill:"currentColor",d:"M832 512a32 32 0 1 1 64 0v352a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h352a32 32 0 0 1 0 64H192v640h640z"}),w.createElementVNode("path",{fill:"currentColor",d:"m469.952 554.24 52.8-7.552L847.104 222.4a32 32 0 1 0-45.248-45.248L477.44 501.44l-7.552 52.8zm422.4-422.4a96 96 0 0 1 0 135.808l-331.84 331.84a32 32 0 0 1-18.112 9.088L436.8 623.68a32 32 0 0 1-36.224-36.224l15.104-105.6a32 32 0 0 1 9.024-18.112l331.904-331.84a96 96 0 0 1 135.744 0z"})]))}}),$Z=_xt,bxt=w.defineComponent({name:"FolderOpened",__name:"folder-opened",setup(n){return(e,t)=>(w.openBlock(),w.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[w.createElementVNode("path",{fill:"currentColor",d:"M878.08 448H241.92l-96 384h636.16zM832 384v-64H485.76L357.504 192H128v448l57.92-231.744A32 32 0 0 1 216.96 384zm-24.96 512H96a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h287.872l128.384 128H864a32 32 0 0 1 32 32v96h23.04a32 32 0 0 1 31.04 39.744l-112 448A32 32 0 0 1 807.04 896"})]))}}),yxt=bxt,wxt=w.defineComponent({name:"Folder",__name:"folder",setup(n){return(e,t)=>(w.openBlock(),w.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[w.createElementVNode("path",{fill:"currentColor",d:"M128 192v640h768V320H485.76L357.504 192zm-32-64h287.872l128.384 128H928a32 32 0 0 1 32 32v576a32 32 0 0 1-32 32H96a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32"})]))}}),Cxt=wxt,Sxt=w.defineComponent({name:"Menu",__name:"menu",setup(n){return(e,t)=>(w.openBlock(),w.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[w.createElementVNode("path",{fill:"currentColor",d:"M160 448a32 32 0 0 1-32-32V160.064a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V416a32 32 0 0 1-32 32zm448 0a32 32 0 0 1-32-32V160.064a32 32 0 0 1 32-32h255.936a32 32 0 0 1 32 32V416a32 32 0 0 1-32 32zM160 896a32 32 0 0 1-32-32V608a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32v256a32 32 0 0 1-32 32zm448 0a32 32 0 0 1-32-32V608a32 32 0 0 1 32-32h255.936a32 32 0 0 1 32 32v256a32 32 0 0 1-32 32z"})]))}}),xxt=Sxt,Lxt=w.defineComponent({name:"Plus",__name:"plus",setup(n){return(e,t)=>(w.openBlock(),w.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[w.createElementVNode("path",{fill:"currentColor",d:"M480 480V128a32 32 0 0 1 64 0v352h352a32 32 0 1 1 0 64H544v352a32 32 0 1 1-64 0V544H128a32 32 0 0 1 0-64z"})]))}}),UZ=Lxt,Dxt=w.defineComponent({name:"Search",__name:"search",setup(n){return(e,t)=>(w.openBlock(),w.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[w.createElementVNode("path",{fill:"currentColor",d:"m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704"})]))}}),kIe=Dxt;const Ext={class:"groups-menus"},kxt=bn({__name:"menus",setup(n){const e=_L(),{menus:t,current:i}=Fg.storeToRefs(e),r=(s,o)=>{e.setCurrentMenu(o)};return w.onMounted(()=>{}),(s,o)=>{const a=w.resolveComponent("el-icon"),l=w.resolveComponent("el-menu-item"),c=w.resolveComponent("el-sub-menu"),h=w.resolveComponent("el-menu");return w.openBlock(),w.createElementBlock("div",Ext,[w.createVNode(h,{"default-active":w.unref(i)[1],onSelect:r,"background-color":"transparent"},{default:w.withCtx(()=>[(w.openBlock(!0),w.createElementBlock(w.Fragment,null,w.renderList(w.unref(t),d=>(w.openBlock(),w.createBlock(c,{key:d.id,index:d.id,"popper-offset":100},{title:w.withCtx(()=>[w.createVNode(a,null,{default:w.withCtx(()=>[w.createVNode(w.unref(xxt))]),_:1}),w.createElementVNode("span",null,w.toDisplayString(d.name),1)]),default:w.withCtx(()=>[(w.openBlock(!0),w.createElementBlock(w.Fragment,null,w.renderList(d.children,u=>(w.openBlock(),w.createBlock(l,{key:u.id,index:u.id},{title:w.withCtx(()=>[w.createTextVNode(w.toDisplayString(u.name),1)]),default:w.withCtx(()=>[w.createVNode(a,null,{default:w.withCtx(()=>[w.createVNode(w.unref(EIe))]),_:1})]),_:2},1032,["index"]))),128))]),_:2},1032,["index"]))),128))]),_:1},8,["default-active"])])}}},[["__scopeId","data-v-65d960c6"]]),Txt=Object.assign({"../../../assets/iconfont/svg/A相手车刀闸合.svg":'<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M511.9872 921.5232l-0.0896 0.0768-31.6736-31.68 0.0768-0.0768-76.864-76.864 31.6736-31.68 76.8768 76.864 76.864-76.864 31.6736 31.68-76.864 76.864 0.0768 0.0768L512.064 921.6z m0-102.4l-0.0896 0.0768-31.6736-31.68 0.0768-0.0768-76.864-76.864 31.6736-31.68 54.4896 54.4832V290.6176l-54.4896 54.464-31.6736-31.68 76.864-76.8384-0.0768-0.0704 31.6736-31.68 0.0896 0.0768 0.0768-0.0768 31.6736 31.68-0.0768 0.0704 76.864 76.8384-31.6736 31.68-54.4512-54.432v442.7008l54.4512-54.4512 31.6736 31.68-76.864 76.864 0.0768 0.0768L512.064 819.2z m0-653.2864L435.1104 242.6816l-31.6736-31.68 76.864-76.8384-0.0768-0.0704 31.6736-31.68 0.0896 0.0768 0.0768-0.0768 31.6736 31.68-0.0768 0.0704 76.864 76.8384-31.6736 31.68z" fill="#EF5317" /></svg>',"../../../assets/iconfont/svg/三绕组变压器.svg":'<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M544 64v268.256a192.064 192.064 0 0 1 147.84 256.704A192 192 0 1 1 512 904.608a192 192 0 1 1-179.84-315.68A192.064 192.064 0 0 1 480 332.256V64h64z m-197.44 555.072l-5.856 0.832A160.032 160.032 0 0 0 368 937.6a159.68 159.68 0 0 0 124.48-59.456 190.72 190.72 0 0 1-28.48-100.544c0-23.68 4.288-46.4 12.16-67.36a192 192 0 0 1-125.12-83.904l-4.48-7.264z m330.88-0.064l-0.8 1.44a192.192 192.192 0 0 1-128.832 89.824A190.72 190.72 0 0 1 560 777.6a191.104 191.104 0 0 1-28.384 100.544 160 160 0 1 0 145.824-259.104zM509.344 713.6l-2.016 4.8A159.584 159.584 0 0 0 496 777.6c0 25.024 5.76 48.672 16 69.76a158.72 158.72 0 0 0 16-69.76c0-22.784-4.768-44.448-13.344-64.064l-5.312 0.032z m-124.608-95.104l1.28 1.76a159.84 159.84 0 0 0 104.544 59.968l1.824-3.136a159.456 159.456 0 0 0-107.648-58.592z m254.56 0.064l-3.872 0.384a159.808 159.808 0 0 0-103.872 58.144l1.92 3.072a159.488 159.488 0 0 0 100.96-55.52l4.864-6.08zM512 361.6a160 160 0 0 0-146.656 224.064l2.656-0.064c57.344 0 108.8 25.152 144 64.992a191.552 191.552 0 0 1 144-64.992h2.688a160 160 0 0 0-146.688-224z" /></svg>',"../../../assets/iconfont/svg/变压器_1.svg":'<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M533.0944 534.3232c-82.1248 0-148.8896-66.7648-148.8896-148.8896s66.7648-148.8896 148.8896-148.8896 148.8896 66.7648 148.8896 148.8896-66.7648 148.8896-148.8896 148.8896z m0-277.504c-70.8608 0-128.4096 57.5488-128.4096 128.4096s57.5488 128.4096 128.4096 128.4096c70.8608 0 128.4096-57.5488 128.4096-128.4096s-57.5488-128.4096-128.4096-128.4096z" fill="#E60012" /><path d="M633.6512 459.9808h-200.704l98.7136-158.1056 101.9904 158.1056z m-163.84-20.48h126.1568l-64.1024-99.5328-62.0544 99.5328z" fill="#E60012" /><path d="M533.0944 694.272c-82.1248 0-148.8896-66.7648-148.8896-148.8896s66.7648-148.8896 148.8896-148.8896 148.8896 66.7648 148.8896 148.8896c0 81.92-66.7648 148.8896-148.8896 148.8896z m0-277.504c-70.8608 0-128.4096 57.5488-128.4096 128.4096s57.5488 128.4096 128.4096 128.4096c70.8608 0 128.4096-57.5488 128.4096-128.4096s-57.5488-128.4096-128.4096-128.4096z" fill="#EF7C1B" /><path d="M522.8544 611.9424h20.48v317.0304h-20.48z" fill="#EF7C1B" /><path d="M522.8544 57.9584h20.48v192.512h-20.48z" fill="#E60012" /><path d="M534.7328 632.832l-90.9312-101.9904 15.1552-13.5168 75.3664 84.3776 72.704-84.3776 15.5648 13.5168z" fill="#EF7C1B" /></svg>',"../../../assets/iconfont/svg/变压器_2.svg":'<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M512 170.666667c-117.824 0-213.333333 95.509333-213.333333 213.333333s95.509333 213.333333 213.333333 213.333333 213.333333-95.509333 213.333333-213.333333S629.824 170.666667 512 170.666667zM256 384c0-141.376 114.624-256 256-256s256 114.624 256 256-114.624 256-256 256-256-114.624-256-256z" fill="#000000" /><path d="M512 426.666667c-117.824 0-213.333333 95.509333-213.333333 213.333333s95.509333 213.333333 213.333333 213.333333 213.333333-95.509333 213.333333-213.333333-95.509333-213.333333-213.333333-213.333333zM256 640c0-141.376 114.624-256 256-256s256 114.624 256 256-114.624 256-256 256-256-114.624-256-256z" fill="#000000" /><path d="M490.666667 981.333333v-106.666666h42.666666v106.666666h-42.666666zM490.666667 149.333333V42.666667h42.666666v106.666666h-42.666666z" fill="#000000" /></svg>',"../../../assets/iconfont/svg/手持开关盒.svg":'<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M431.431671 299.041479h159.572225v426.308151H431.431671z" fill="#d81e06" /><path d="M609.777099 744.122832H412.658468v-463.854556h197.118631v463.854556z m-159.572225-37.546405h122.025819v-388.761745H450.204874v388.761745z" fill="#d81e06" /><path d="M492.44458 131.568864h37.546406v186.167596h-37.546406zM492.44458 707.280422h37.546406v186.167596h-37.546406z" fill="#d81e06" /><path d="M594.993201 252.656023L511.06134 145.414101 427.129478 252.656023l-29.567794-23.153617L511.06134 84.479413l113.499656 145.022993z" fill="#d81e06" /><path d="M594.993201 168.17661L511.06134 60.934688 427.129478 168.17661l-29.567794-23.153617 113.499656-145.022993L624.560996 145.022993z" fill="#d81e06" /><path d="M511.06134 939.520587L397.561684 794.497594l29.567794-23.075396 83.931862 107.241922L594.993201 771.422198l29.567795 23.075396z" fill="#d81e06" /><path d="M511.06134 1024L397.561684 878.977007l29.567794-23.075395 83.931862 107.241922L594.993201 855.901612l29.567795 23.075395z" fill="#d81e06" /></svg>',"../../../assets/iconfont/svg/手持断路器.svg":'<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M494.481834 206.967196l-8.668783-7.223986 71.51746-87.410229c1.083598-1.444797 2.889594-2.167196 4.695591-2.167196s3.611993 0.722399 4.695591 2.167196l71.51746 87.410229-8.668783 7.223986-67.544268-82.714639-67.544268 82.714639zM566.360494 119.195767c0 0.361199 0 0.361199 0 0z" fill="#FF0000" /><path d="M494.481834 148.091711l-8.668783-7.223986 71.51746-87.410229c1.083598-1.444797 2.889594-2.167196 4.695591-2.167196s3.611993 0.722399 4.695591 2.167196L638.600353 140.867725l-8.668783 7.223986-67.544268-82.714639L494.481834 148.091711z m71.87866-87.771429c0 0.361199 0 0.361199 0 0zM562.026102 913.834215c-1.805996 0-3.250794-0.722399-4.334391-2.167196l-71.87866-87.771428 8.668783-7.223986 67.544268 82.714638 67.544268-82.714638 8.668783 7.223986-71.878659 87.771428c-1.083598 1.444797-2.528395 2.167196-4.334392 2.167196z" fill="#FF0000" /><path d="M562.026102 972.7097c-1.805996 0-3.250794-0.722399-4.334391-2.167196l-71.87866-87.771428 8.668783-7.223986 67.544268 82.714638 67.544268-82.714638 8.668783 7.223986-71.878659 87.771428c-1.083598 1.444797-2.528395 2.167196-4.334392 2.167196zM567.805291 849.179541h-11.197178V617.650794l-171.208466-252.839507 9.391182-6.140388 171.930864 254.284304c0.722399 1.083598 1.083598 2.167196 1.083598 3.250793v232.973545zM556.608113 178.071252h11.197178v183.489242h-11.197178z" fill="#FF0000" /><path d="M510.898342 402.654138l94.446392-90.429856 7.740501 8.087252-94.44278 90.429856z" fill="#FF0000" /><path d="M511.158406 320.35849l7.744113-8.087252 94.457227 90.415408-7.744113 8.090864zM556.608113 849.179541h11.197178v58.875485h-11.197178zM556.608113 119.195767h11.197178v58.875485h-11.197178z" fill="#FF0000" /></svg>',"../../../assets/iconfont/svg/抽屉式断路器断开.svg":'<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M85.18656007 375.38588444l-13.9264 0 0-387.28817777 13.9264 0z" fill="#EF1616" /><path d="M12.7726934 188.10538666l-9.84746666-9.84746666 72.41500444-72.41500444 9.84746666 9.84746666z" fill="#EF1616" /><path d="M71.25674674 115.69038222l9.84746666-9.84746665 72.41500443 72.41500443-9.84746665 9.84746667zM12.77496896 261.79811556l-9.84746667-9.84746667 72.41500445-72.41500445 9.84746666 9.84746667z" fill="#EF1616" /><path d="M71.25447117 189.38311111l9.84746667-9.84746667 72.41500445 72.41500445-9.84746667 9.84746667zM85.1797334 1037.94346667l-13.9264 0 0-387.28817778 13.9264 0z" fill="#EF1616" /><path d="M85.18769784 910.336l-9.84746665 9.84746667-72.41500445-72.41500445 9.84746666-9.84746666z" fill="#EF1616" /><path d="M143.67175118 837.92099556l9.84746666 9.84746665-72.41500444 72.41500446-9.84746666-9.84746667z" fill="#EF1616" /><path d="M85.18542229 836.64668444l-9.84746667 9.84746667-72.41500444-72.41500444 9.84746666-9.84746667z" fill="#EF1616" /><path d="M143.67402674 764.23168l9.84746666 9.84746667-72.41614222 72.41500444-9.84632889-9.84746667z" fill="#EF1616" /><path d="M19.62666674 375.38702222l118.32888888 0L137.95555561 650.33102222l-118.32888886 0-1e-8-274.944z m104.41386666 13.91502222l-90.48746666 0L33.55306674 636.40462222l90.48746666 0 0-247.10257778z" fill="#EF1616" /></svg>',"../../../assets/iconfont/svg/接地_1.svg":'<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M531.791456 701.961295a17.407498 17.407498 0 0 1-15.824998-16.616247v-316.499956a15.824998 15.824998 0 0 1 15.824998-15.824998 17.407498 17.407498 0 0 1 15.824998 16.616248v320.456205a15.824998 15.824998 0 0 1-15.824998 11.868748zM533.373956 377.548841a18.989997 18.989997 0 0 1-11.077499 0L172.564006 27.02514a15.033748 15.033748 0 0 1 0-22.154997 15.033748 15.033748 0 0 1 22.154997 0l349.732451 345.776202a15.033748 15.033748 0 0 1 0 22.154996 14.242498 14.242498 0 0 1-11.077498 4.7475zM609.333945 1024H455.040217a15.824998 15.824998 0 0 1 0-31.649996h158.249977a15.824998 15.824998 0 0 1 0 31.649996zM762.836423 870.497522H300.746488a15.824998 15.824998 0 0 1 0-31.649996h462.089935a15.824998 15.824998 0 1 1 0 31.649996zM840.378913 716.203793H223.995249a15.824998 15.824998 0 0 1-15.824998-15.824998 15.824998 15.824998 0 0 1 15.824998-16.616247H840.378913a15.824998 15.824998 0 0 1 15.824997 16.616247 15.824998 15.824998 0 0 1-15.824997 15.824998z" /></svg>',"../../../assets/iconfont/svg/接地_2.svg":'<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M810.666667 704H213.333333v-42.666667h597.333334v42.666667zM725.333333 810.666667H298.666667v-42.666667h426.666666v42.666667zM640 917.333333H384v-42.666666h256v42.666666z" fill="#000000" /><path d="M490.666667 704V106.666667h42.666666v597.333333h-42.666666z" fill="#000000" /></svg>',"../../../assets/iconfont/svg/断路器-he.svg":'<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M640 176H528V0h-32v176H384v672h112v176h32V848h112z" fill="#D81E06" /></svg>',"../../../assets/iconfont/svg/断路器.svg":'<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M700.16 341.333333l55.04-55.04a42.666667 42.666667 0 0 0-60.16-60.16l-12.373333 12.373334V42.666667a42.666667 42.666667 0 0 0-85.333334 0v195.84l-12.373333-12.373334a42.666667 42.666667 0 0 0-60.16 60.16L579.84 341.333333l-55.466667 55.04a42.666667 42.666667 0 1 0 60.16 60.16L640 401.493333l55.04 55.04a42.666667 42.666667 0 1 0 60.16-60.16zM333.226667 230.826667a42.666667 42.666667 0 0 0-69.12 50.346666L597.333333 739.413333V981.333333a42.666667 42.666667 0 0 0 85.333334 0v-256a42.666667 42.666667 0 0 0-8.106667-25.173333z" /></svg>',"../../../assets/iconfont/svg/母线.svg":'<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="98.08px" viewBox="0 0 2088 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M2088.44 442.576H5.726v138.848H2088.44V442.576z" fill="#FF0000" /></svg>',"../../../assets/iconfont/svg/电池.svg":'<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="100.64px" viewBox="0 0 2035 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M2538.89999992 217.3c2.9-0.1 5.7-0.1 8.6-0.1" /><path d="M1344.19999992 960.2H703.99999992V130.3h640.1v829.9z m-567.5-70.1h494.8V200.4H776.69999992v689.7z" fill="#03E086" /><path d="M896.09999992 61h254.4v70H896.09999992zM1064.99999992 755.9l-80.7-39.7 63.6-129.1H855.49999992l128.3-255.3 80.4 40.5-62.7 124.8h191z" fill="#03E086" /></svg>',"../../../assets/iconfont/svg/直流逆变器.svg":'<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M207.36 359.936l58.624-58.624c9.216-9.216 21.418667-14.250667 34.389333-14.250667s25.173333 5.034667 34.389334 14.250667l41.557333 41.557333c17.749333 17.749333 40.96 26.88 64.341333 26.88 18.773333 0 37.632-5.802667 53.930667-17.749333l45.909333-33.621333c9.472-6.912 11.52-20.224 4.608-29.696a21.265067 21.265067 0 0 0-29.696-4.608l-45.909333 33.621333a48.452267 48.452267 0 0 1-63.146667-4.864l-41.557333-41.557333c-17.237333-17.237333-40.106667-26.709333-64.426667-26.709334-24.32 0-47.274667 9.472-64.426666 26.709334l-58.624 58.624c-8.277333 8.277333-8.277333 21.76 0 30.037333 8.277333 8.277333 21.76 8.277333 30.037333 0zM119.466667 119.466667v785.066666h785.066666V119.466667H119.466667z m706.645333 42.496L161.962667 826.112V161.962667h664.149333z m-640 700.074666l675.925333-675.925333v675.925333H186.112zM490.837333 685.568h339.882667v42.496H490.837333zM736.682667 790.101333h94.122666v42.496H736.682667zM613.717333 790.101333h94.122667v42.496H613.717333zM490.837333 790.101333h94.122667v42.496H490.837333z" /></svg>'});function Ixt(n){return n?(n=n.replace(/fill="(?!none)[^"]*"/gi,'fill="currentColor"').replace(/stroke="(?!none)[^"]*"/gi,'stroke="currentColor"'),n=n.replace(/<([a-z]+)([^>]*?)\/?>/gi,(e,t,i)=>{const r=e.endsWith("/>")?"/>":">";return!/(fill=)/i.test(i)&&/^(path|circle|rect|polygon|polyline)$/i.test(t)?`<${t}${i} fill="currentColor"${r}`:e}),n):""}const TIe="__node_panel_svg_sprite__";function Nxt(){if(typeof document>"u")return null;let n=document.getElementById(TIe);n||(n=document.createElementNS("http://www.w3.org/2000/svg","svg"),n.setAttribute("aria-hidden","true"),n.style.position="absolute",n.style.width="0",n.style.height="0",n.style.overflow="hidden",n.id=TIe,document.body.prepend(n));let e=n.querySelector("defs");return e||(e=document.createElementNS("http://www.w3.org/2000/svg","defs"),n.appendChild(e)),e}function Mxt(n){const e=n.match(/viewBox="([^"]+)"/i),t=n.match(/<svg[^>]*>([\s\S]*?)<\/svg>/i);return{viewBox:e?e[1]:"",content:t?t[1]:n}}function Axt(n,e){const t=Nxt();if(!t||t.querySelector(`#${n}`))return n;const{viewBox:i,content:r}=Mxt(Ixt(e)),s=document.createElementNS("http://www.w3.org/2000/svg","symbol");return s.setAttribute("id",n),i&&s.setAttribute("viewBox",i),s.innerHTML=r,t.appendChild(s),n}const Rxt=Object.entries(Txt).map(([n,e])=>({name:n.split("/").pop().replace(".svg",""),id:Axt(`node-icon-${n.split("/").pop().replace(".svg","")}`,e)})),oN={title:{show:!1},tooltip:{trigger:"axis",backgroundColor:"rgba(59,59,59,0.8)",textStyle:{color:"#fff"},borderWidth:0},legend:{show:!0,left:"center",top:20,textStyle:{color:"#ffffff"},itemGap:10,itemWidth:25,itemHeight:14,orient:"horizontal"},yAxis:{name:"电压(V)",type:"value",axisLine:{show:"true",lineStyle:{color:"#ffffff",width:1,type:"solid"}},axisTick:{show:"auto"},show:!0,axisLabel:{show:!0,fontSize:12,color:"#ffffff"},splitLine:{show:!0,lineStyle:{color:"rgb(79, 79, 79)",width:1,type:"solid"}}},xAxis:{type:"category",axisPointer:{type:"line"},data:[],boundaryGap:!0,splitLine:{show:!1,lineStyle:{color:"rgb(79, 79, 79)",width:1,type:"solid"}},axisTick:{show:!0},axisLabel:{show:!0,fontSize:12,color:"#ffffff"},show:!0,axisLine:{show:!0,lineStyle:{color:"#FFFFFF",width:1,type:"solid"}}},grid:{left:20,top:50,right:20,bottom:10,containLabel:!0},series:[],dataZoom:!1},IIe={tabTitle:"系列1",name:"电压",type:"bar",showBackground:!1,areaStyle:{color:{type:"linear",x:0,y:0,x2:1,y2:0,colorStops:[{offset:0,color:"rgba(0, 0, 0, 0)"},{offset:1,color:"rgba(0, 0, 0, 0)"}]}},itemStyle:{color:"#1AF2FFaa"},emphasis:{focus:"series"},data:[]},aN={tabTitle:"系列1",lineStyle:{width:2},name:"电压",smooth:!1,symbolSize:0,type:"line",areaStyle:{color:{type:"linear",x:0,y:0,x2:1,y2:0,colorStops:[{offset:0,color:"rgba(0, 0, 0, 0)"},{offset:1,color:"rgba(0, 0, 0, 0)"}]}},symbol:null,itemStyle:{color:"#1AF2FFaa"},showSymbol:!1,emphasis:{focus:"series"},edgeLabel:{show:!1},step:!1,data:[]},NIe={darkMode:!0,tooltip:{trigger:"item",backgroundColor:"rgba(59,59,59,0.8)",textStyle:{color:"#fff"},borderWidth:0},legend:{show:!0,left:"center",top:20,textStyle:{color:"#ffffff"},itemGap:10,itemWidth:25,itemHeight:14,orient:"horizontal"},series:[{tabTitle:"系列1",name:"Access From",type:"pie",center:["50%","55%"],radius:[0,"60%"],label:{show:!0,position:"outside",textBorderWidth:0},itemStyle:{borderWidth:0,shadowColor:"rgba(0, 0, 0, 0)"},emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}},data:[{value:1048,name:"Search Engine"},{value:735,name:"Direct"},{value:580,name:"Email"},{value:484,name:"Union Ads"},{value:300,name:"Video Ads"}]}]},Pxt={echart_1:()=>{const n=JSON.parse(JSON.stringify(oN));n.xAxis.data=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"];const e=JSON.parse(JSON.stringify(aN));return e.data=[150,230,224,218,135,147,260],n.series.push(e),n},echart_2:()=>{let n=+new Date(1968,9,3),e=24*3600*1e3,t=[],i=[Math.random()*300];for(let a=1;a<2e3;a++){var r=new Date(n+=e);t.push([r.getFullYear(),r.getMonth()+1,r.getDate()].join("/")),i.push(Math.round((Math.random()-.5)*20+i[a-1]))}const s=JSON.parse(JSON.stringify(oN));s.xAxis.data=t;const o=JSON.parse(JSON.stringify(aN));return o.data=i,o.itemStyle={color:"rgb(255, 70, 131)"},o.areaStyle={color:{type:"linear",x:0,y:0,x2:1,y2:0,colorStops:[{offset:0,color:"#ff4d4f"},{offset:1,color:"#ffa940"}]}},s.series.push(o),s},echart_3:()=>{let n=+new Date(2026,1,1),e=24*3600*1e3,t=[],i=[Math.random()*200],r=[Math.random()*10];for(let h=1;h<2e3;h++){var s=new Date(n+=e);t.push([s.getFullYear(),s.getMonth()+1,s.getDate()].join("/")),i.push(Math.round((Math.random()-.5)*20+i[h-1])),r.push(Math.round((Math.random()-.5)*20+r[h-1]*100)/100)}const o=JSON.parse(JSON.stringify(oN));o.xAxis.data=t;const a=JSON.parse(JSON.stringify(o.yAxis));a.name="电流(A)",a.splitLine.show=!1,o.yAxis=[o.yAxis,a];const l=JSON.parse(JSON.stringify(aN));l.data=i,l.yAxisIndex=0;const c=JSON.parse(JSON.stringify(aN));return c.data=r,c.tabTitle="系列2",c.name="电流",c.itemStyle={color:"rgb(255, 70, 131)"},c.yAxisIndex=1,o.series.push(l),o.series.push(c),o},echart_4:()=>{const n=JSON.parse(JSON.stringify(oN));n.xAxis.data=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],n.xAxis.axisPointer={type:"shadow"};const e=JSON.parse(JSON.stringify(IIe));return e.data=[10,52,200,334,390,330,220],n.series.push(e),n},echart_5:()=>{const n=[{name:"Direct",type:"bar",emphasis:{focus:"series"},data:[320,332,301,334,390,330,320]},{name:"Email",type:"bar",stack:"Ad",emphasis:{focus:"series"},data:[120,132,101,134,90,230,210]},{name:"Union Ads",type:"bar",stack:"Ad",emphasis:{focus:"series"},data:[220,182,191,234,290,330,310]},{name:"Video Ads",type:"bar",stack:"Ad",emphasis:{focus:"series"},data:[150,232,201,154,190,330,410]},{name:"Search Engine",type:"bar",data:[862,1018,964,1026,1679,1600,1570],emphasis:{focus:"series"},markLine:{lineStyle:{type:"dashed"},data:[[{type:"min"},{type:"max"}]]}},{name:"Baidu",type:"bar",barWidth:5,stack:"Search Engine",emphasis:{focus:"series"},data:[620,732,701,734,1090,1130,1120]},{name:"Google",type:"bar",stack:"Search Engine",emphasis:{focus:"series"},data:[120,132,101,134,290,230,220]},{name:"Bing",type:"bar",stack:"Search Engine",emphasis:{focus:"series"},data:[60,72,71,74,190,130,110]},{name:"Others",type:"bar",stack:"Search Engine",emphasis:{focus:"series"},data:[62,82,91,84,109,110,120]}],e=JSON.parse(JSON.stringify(oN));return e.xAxis.data=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],e.xAxis.axisPointer={type:"shadow"},n.forEach((t,i)=>{const r=JSON.parse(JSON.stringify(IIe));r.name=t.name,r.tabTitle=`系列${i}`,r.stack=t.stack,r.data=t.data,r.barWidth=t.barWidth,r.itemStyle.color="",e.series.push(r)}),e.grid.top=60,e.yAxis.name="",e.legend.top=10,e},echart_6:()=>JSON.parse(JSON.stringify(NIe)),echart_7:()=>{const n=JSON.parse(JSON.stringify(NIe)),e=n.series[0];return e.radius=["40%","70%"],n},echart_8:()=>({tooltip:{formatter:"{a} <br/>{b} : {c}%"},series:[{name:"Pressure",type:"gauge",detail:{formatter:"{value}"},data:[{value:50,name:"SCORE"}]}]}),echart_9:()=>({series:[{type:"gauge",progress:{show:!0,width:18},axisLine:{lineStyle:{width:18}},axisTick:{show:!1},splitLine:{length:15,lineStyle:{width:2,color:"#999"}},axisLabel:{distance:25,color:"#999",fontSize:20},anchor:{show:!0,showAbove:!0,size:25,itemStyle:{borderWidth:10}},title:{show:!1},detail:{valueAnimation:!0,fontSize:80,offsetCenter:[0,"70%"]},data:[{value:70}]}]}),echart_10:()=>({series:[{type:"gauge",axisLine:{lineStyle:{width:30,color:[[.3,"#67e0e3"],[.7,"#37a2da"],[1,"#fd666d"]]}},pointer:{itemStyle:{color:"auto"}},axisTick:{distance:-30,length:8,lineStyle:{color:"#fff",width:2}},splitLine:{distance:-30,length:30,lineStyle:{color:"#fff",width:4}},axisLabel:{color:"inherit",distance:40,fontSize:20},detail:{valueAnimation:!0,formatter:"{value} km/h",color:"inherit"},data:[{value:70}]}]}),echart_11:()=>({series:[{type:"gauge",center:["50%","60%"],startAngle:200,endAngle:-20,min:0,max:60,splitNumber:12,itemStyle:{color:"#FFAB91"},progress:{show:!0,width:30},pointer:{show:!1},axisLine:{lineStyle:{width:30}},axisTick:{distance:-45,splitNumber:5,lineStyle:{width:2,color:"#999"}},splitLine:{distance:-52,length:14,lineStyle:{width:3,color:"#999"}},axisLabel:{distance:-20,color:"#999",fontSize:20},anchor:{show:!1},title:{show:!1},detail:{valueAnimation:!0,width:"60%",lineHeight:40,borderRadius:8,offsetCenter:[0,"-15%"],fontSize:60,fontWeight:"bolder",formatter:"{value} °C",color:"inherit"},data:[{value:20}]},{type:"gauge",center:["50%","60%"],startAngle:200,endAngle:-20,min:0,max:60,itemStyle:{color:"#FD7347"},progress:{show:!0,width:8},pointer:{show:!1},axisLine:{show:!1},axisTick:{show:!1},splitLine:{show:!1},axisLabel:{show:!1},detail:{show:!1},data:[{value:20}]}]})},Oxt={class:"nodes"},Vxt={class:"groups"},Fxt=["onClick"],Bxt={class:"list"},Wxt={style:{width:"100%",display:"flex","justify-content":"space-between","align-items":"center",padding:"20px 10px 10px 10px"}},Hxt={style:{padding:"10px"}},zxt=["onMousedown","title"],$xt={key:1,class:"svg-icon"},Uxt={"aria-hidden":"true"},Gxt=["xlink:href"],jxt=bn({__name:"nodes",setup(n){const e=Ds(),t={IMG:"img"},i=w.ref(0),r=w.ref([{name:"控件",icon:"iconfont icon-icon-relativity",active:[],children:[{name:"基础",layout:"1fr 1fr 1fr",list:[{name:"线段",renderType:"svg",icon:"icon-xianduan",data:{type:"line"}},{name:"文本",renderType:"text",icon:"icon-wenzi",data:{type:"text",text:"测试"}},{name:"图标",renderType:"svg",icon:"icon-tubiao",data:{type:"svg"}},{name:"图片",renderType:"image",icon:"icon-tupian",data:{type:"img",imgData:O0e,imgWidth:48,imgHeight:48}},{name:"矩形",renderType:"text",icon:"icon-xingzhuang-juxing",data:{type:"text",text:"",borderWidth:1,borderStyle:"solid"}},{name:"圆形",renderType:"text",icon:"icon-radio-on-full",data:{type:"text",text:"",borderRadius:25,backgroundColor:"rgb(242, 255, 0)"}}]},{name:"表单",layout:"1fr 1fr 1fr",list:[{name:"按钮",renderType:"form",icon:"icon-biaodanzujian-anniu",data:{type:"button"}},{name:"开关",renderType:"form",icon:"icon-kaiguan-1",data:{type:"switch"}},{name:"文本输入框",renderType:"form",icon:"icon-biaodanzujian-shurukuang",data:{type:"input"}},{name:"数字输入框",renderType:"form",icon:"icon-shuzhi",data:{type:"number"}},{name:"单选框",renderType:"form",icon:"icon-biaodanzujian-xialakuang",data:{type:"select"}},{name:"多选框",renderType:"form",icon:"icon-biaodanzujian-xialakuang",data:{type:"selectMore"}},{name:"日期框",renderType:"form",icon:"icon-riqikuang",data:{type:"date"}},{name:"日期范围",renderType:"form",icon:"icon-riqifanwei",data:{type:"dateRange"}},{name:"计划时间面板",renderType:"planTime",icon:"icon-jihuashijian",data:{type:"planTime"}}]},{name:"表格",layout:"1fr 1fr 1fr",list:[{name:"列表",renderType:"table",icon:"icon-biaodanzujian-biaoge",data:{type:"table-1"}}]}]},{name:"图表",icon:"iconfont icon-icon_chart",active:[],children:[{name:"折线图",layout:"1fr 1fr 1fr",list:[{name:"折线图",renderType:"echart",icon:"icon-tubiao-zhexiantu",data:{type:"echart_1"}},{name:"面积图",renderType:"echart",icon:"icon-tubiao-zhexiantu",data:{type:"echart_2"}},{name:"双Y轴折线图",renderType:"echart",icon:"icon-tubiao-zhexiantu",data:{type:"echart_3"}}]},{name:"柱状图",layout:"1fr 1fr 1fr",list:[{name:"柱状图",renderType:"echart",icon:"icon-icon_chart",data:{type:"echart_4"}},{name:"堆叠柱状图",renderType:"echart",icon:"icon-icon_chart",data:{type:"echart_5"}}]},{name:"饼图",layout:"1fr 1fr 1fr",list:[{name:"基础饼图",renderType:"echart",icon:"icon-bingtu",data:{type:"echart_6"}},{name:"环状图",renderType:"echart",icon:"icon-bingtu",data:{type:"echart_7"}}]}]},{name:"素材",icon:"iconfont icon-icon_image",children:[{name:"定制",layout:"1fr 1fr 1fr",list:[{name:"流动箭头",renderType:"arrow",icon:"icon-liudongjiantou",data:{type:"arrowNode",arrowColor:"#89fce6",arrow:0}},{name:"开关",renderType:"switch",icon:"icon-zhadao",data:{type:"switchNode",switchColor:"rgb(68, 205, 234)",isOpen:!0}}]},{name:"电器svg",layout:"1fr 1fr 1fr",list:Rxt.map(h=>({name:h.name,renderType:"svg",icon:h.id,data:{type:"svg"}}))}],active:[]}]),s=w.ref(""),o=h=>{i.value=h},a=()=>{if(r.value[i.value].active.length>0)r.value[i.value].active=[];else{const h=[];r.value[i.value].children.forEach((d,u)=>{h.push(u)}),r.value[i.value].active=h}},l=(h,d)=>{let u=e.graph.createNode({shape:d.renderType+"-node"});u.setData({icon:d.icon,name:P3(d.name),...d.data}),e.dnd.start(u,h)},c=({node:h})=>{var d,u,f,g,p,m,v,_,b,y,C,x,L,D,E,k,T,I,N;if(((d=h.data)==null?void 0:d.type)==="line"){const M=h.position();h.remove();const P=e.graph.addNode({id:"line"+crypto.randomUUID(),x:M.x-50,y:M.y,width:5,height:5,attrs:{body:{fill:"transparent",stroke:"transparent"}},zIndex:1}),R=e.graph.addNode({id:"line"+crypto.randomUUID(),x:M.x+50,y:M.y,width:5,height:5,attrs:{body:{fill:"transparent",stroke:"transparent"}},zIndex:1}),W=e.graph.addEdge({source:P,target:R,router:"normal",markup:[{tagName:"path",selector:"line"},{tagName:"path",selector:"line1"}],attrs:{line:{stroke:"#1bc8de80",strokeWidth:2,connection:!0,sourceMarker:"",targetMarker:""},line1:{display:"none",connection:!0,x:0,y:0,strokeWidth:4,stroke:"#91f4ffff",fill:"none",strokeDasharray:"8 8",pointerEvents:"none",style:{animation:"ant-line1 30s infinite linear"}}},zIndex:0,data:{name:P3("line"),type:"line",color:"#1bc8de80",flow:!0,dataSource:{bindNode:[],type:"none",path:"",point:{},httpType:"GET",httpUrl:"",params:[],httpTimer:-1,parse:null,fields:{动画流向:"flow",颜色:"color"}}}});e.graph.select(W)}if(["button","input","number","select","date","selectMore","dateRange","switch"].includes((u=h.data)==null?void 0:u.type)&&(h.prop("size",{width:150,height:30}),((f=h.data)==null?void 0:f.type)==="button"&&h.setData({model:{modelValue:"按钮",size:"default"}}),((g=h.data)==null?void 0:g.type)==="input"&&h.setData({model:{modelValue:"",placeholder:"请输入",inputType:"input"}}),((p=h.data)==null?void 0:p.type)==="number"&&h.setData({model:{modelValue:"",placeholder:"请输入"}}),((m=h.data)==null?void 0:m.type)==="select"&&h.setData({model:{modelValue:"",size:"default",placeholder:"请输入",option:[{label:"选项一",value:1},{label:"选项二",value:2}]}}),((v=h.data)==null?void 0:v.type)==="selectMore"&&h.setData({model:{modelValue:[],size:"default",placeholder:"请输入",option:[{label:"选项一",value:1},{label:"选项二",value:2}]}}),((_=h.data)==null?void 0:_.type)==="date"&&h.setData({model:{modelValue:"",size:"default",placeholder:"请输入",dateType:"date"}}),((b=h.data)==null?void 0:b.type)==="dateRange"&&h.setData({model:{modelValue:[],size:"default",placeholder:"请输入",dateType:"daterange"}}),((y=h.data)==null?void 0:y.type)==="switch"&&(h.prop("size",{width:40,height:30}),h.setData({model:{modelValue:!0,size:"default",buttonOnColor:"#13ce66",buttonOffColor:"#ff4949"}}))),["table-1"].includes((C=h.data)==null?void 0:C.type)){h.resize(600,200);const M={rows:4,cols:3,rowHeight:32,colWidth:120,rowHeights:[36,32,32,32],colWidths:[140,120,120],header:{enabled:!0,height:36,backgroundColor:"#1f2a3a",color:"#e5e7eb",fontSize:12,fontWeight:600,borderColor:"#303746",borderWidth:1,textAlign:"center"},cell:{backgroundColor:"#121924",color:"#cbd5f5",fontSize:12,borderColor:"#303746",borderWidth:1,textAlign:"center"},data:{header:["名称","数值","单位"],rows:[["温度","23.6","°C"],["湿度","45","%"],["压力","101.3","kPa"],["","",""]]}};h.setData({backgroundColor:"rgba(177, 191, 255, 0.2)",table:M,dataSource:{fields:{表头数据:"table.data.header",表格数据:"table.data.rows"}}})}if((x=h.data)!=null&&x.type.includes("echart")){h.resize(500,300);const M=Pxt[h.data.type]();if(["echart_1","echart_2","echart_3","echart_4","echart_5"].includes((L=h.data)==null?void 0:L.type)){const P={data:{x:M.xAxis.data??[],y:M.series.map(R=>R.data??[])},option:M};h.setData({backgroundColor:"rgba(0, 0, 0, 0.3)",chart:P,dataSource:{fields:{X轴数据:"chart.data.x",Y轴数据:"chart.data.y"}}})}if(["echart_6","echart_7"].includes((D=h.data)==null?void 0:D.type)){const P={data:{x:((E=M.series[0])==null?void 0:E.data.map(R=>R.name))||[],y:((k=M.series[0])==null?void 0:k.data.map(R=>R.value))||[]},option:M};h.setData({backgroundColor:"rgba(0, 0, 0, 0.3)",chart:P,dataSource:{fields:{X轴数据:"chart.data.x",Y轴数据:"chart.data.y"}}})}}if(((T=h.data)==null?void 0:T.type)==="arrowNode"&&h.setData({dataSource:{fields:{箭头颜色:"arrowColor",箭头朝向:"arrow"}}}),((I=h.data)==null?void 0:I.type)==="switchNode"&&h.setData({dataSource:{fields:{开关颜色:"switchColor",开关状态:"isOpen"}}}),((N=h.data)==null?void 0:N.type)==="planTime"){h.resize(500,470);const M=[];for(let P=0;P<96;P++){const R=P*15,W=R+15,z=$=>{const G=String(Math.floor($/60)).padStart(2,"0"),Y=String($%60).padStart(2,"0");return`${G}:${Y}`};M.push({startTime:z(R),endTime:z(W),activePower:0})}h.setData({model:{modelValue:M}})}};return w.onMounted(()=>{var h;(h=e.graph)==null||h.on("node:added",c)}),w.onBeforeUnmount(()=>{var h;(h=e.graph)==null||h.off("node:added",c)}),(h,d)=>{const u=w.resolveComponent("el-input"),f=w.resolveComponent("el-tooltip"),g=w.resolveComponent("el-image"),p=w.resolveComponent("el-collapse-item"),m=w.resolveComponent("el-collapse");return w.openBlock(),w.createElementBlock("div",Oxt,[w.createElementVNode("div",Vxt,[(w.openBlock(!0),w.createElementBlock(w.Fragment,null,w.renderList(r.value,(v,_)=>(w.openBlock(),w.createElementBlock("div",{key:v.index,class:w.normalizeClass(["group",{active:i.value===_}]),onClick:b=>o(_)},[w.createElementVNode("i",{class:w.normalizeClass(v.icon)},null,2),w.createElementVNode("span",null,w.toDisplayString(v.name),1)],10,Fxt))),128))]),w.createElementVNode("div",Bxt,[w.createElementVNode("div",Wxt,[w.createVNode(u,{modelValue:s.value,"onUpdate:modelValue":d[0]||(d[0]=v=>s.value=v),style:{width:"180px"},placeholder:"请输入过滤","prefix-icon":w.unref(kIe),clearable:""},null,8,["modelValue","prefix-icon"]),w.createVNode(f,{effect:"light",content:"展开/折叠",placement:"top"},{default:w.withCtx(()=>[w.createElementVNode("div",{style:{cursor:"pointer","font-size":"20px"},onClick:a},[...d[2]||(d[2]=[w.createElementVNode("i",{class:"iconfont icon-menu-fold"},null,-1)])])]),_:1})]),w.createElementVNode("div",Hxt,[w.createVNode(m,{modelValue:r.value[i.value].active,"onUpdate:modelValue":d[1]||(d[1]=v=>r.value[i.value].active=v),"expand-icon-position":"left",style:{border:"none","background-color":"transparent"}},{default:w.withCtx(()=>[(w.openBlock(!0),w.createElementBlock(w.Fragment,null,w.renderList(r.value[i.value].children,(v,_)=>(w.openBlock(),w.createBlock(p,{key:_,title:v.name,name:_},{default:w.withCtx(()=>[w.createElementVNode("div",{class:"expand-content",style:w.normalizeStyle({gridTemplateColumns:v.layout?v.layout:"1fr 1fr 1fr"})},[(w.openBlock(!0),w.createElementBlock(w.Fragment,null,w.renderList(v.list.filter(b=>b.name.includes(s.value)),(b,y)=>(w.openBlock(),w.createElementBlock("div",{key:y,class:"graphic",onMousedown:C=>l(C,b),title:b.name},[b.renderType===t.IMG?(w.openBlock(),w.createBlock(g,{key:0,src:b.icon,style:{width:"100px",height:"60px",margin:"auto"}},null,8,["src"])):(w.openBlock(),w.createElementBlock("div",$xt,[(w.openBlock(),w.createElementBlock("svg",Uxt,[w.createElementVNode("use",{"xlink:href":"#"+b.icon},null,8,Gxt)]))])),w.createElementVNode("p",null,w.toDisplayString(b.name),1)],40,zxt))),128))],4)]),_:2},1032,["title","name"]))),128))]),_:1},8,["modelValue"])])])])}}},[["__scopeId","data-v-5460cad9"]]),qxt={class:"datas"},Kxt={class:"groups"},Yxt=["onClick"],Xxt={class:"list"},Zxt={style:{padding:"10px"}},Jxt=["onMousedown","title"],Qxt={key:1},eLt=["onClick"],tLt=bn({__name:"datas",setup(n){const e=Ds(),t=w.inject("topoApi"),i=w.inject("storage"),r=w.ref([]),s=w.ref(!1),o=w.ref([{name:"Opcua",icon:"iconfont icon-control-platform",children:[]},{name:"Redis",icon:"iconfont icon-icon_chart",children:[]}]),a=w.ref(0),l=w.ref(""),c=y=>{if(a.value!==y){if(s.value){ElMessage.warning("正在加载数据,请稍后再试");return}a.value=y,l.value="",h(),f()}},h=async()=>{s.value=!0,a.value===0?r.value=await t.getDeviceList():a.value===1&&(r.value=await t.getRedisDeviceList()),s.value=!1};h();const d=w.ref(null),u={value:"id",label:"label",data:"data",children:"children"},f=()=>{d.value.filter(l.value)},g=(y,C,x)=>x.label.includes(y),p=y=>{var E;const C=((E=y.data)==null?void 0:E.data)||{},x=P3(y.label),L=`const description = data.pointTemp.description;
|
|
894
894
|
const value = data.payload.value;
|
|
895
895
|
const a = description.split(";").map(i => {
|
|
896
896
|
return {
|