12345 |
- import{M as Hh}from"./index.b661d9c5.js";import{ev as Zo,dW as z,df as D,d5 as yt,ew as Wh,ex as xi,ey as fv,ez as Gr,eA as pv,eB as dv,eC as F,db as Et,eD as we,eE as fe,eF as hr,eG as $h,eH as qo,d7 as ft,eI as gv,eJ as tt,eK as Uh,eL as Yh,eM as $,eN as yv,eO as mv,eP as Sv,eQ as ce,dZ as It,eR as xv,eS as Za,eT as Xh,eU as Zh,eV as qh,eW as Kh,eX as jh,eY as Jh,eZ as Qh,d6 as ot,e_ as tf,e$ as ef,f0 as rf,f1 as af,f2 as nf,f3 as of,f4 as sf,dl as _t,f5 as lf,f6 as uf,f7 as Or,f8 as vf,f9 as lt,fa as W,fb as Rt,fc as Ko,fd as cf,fe as hf,ff as he,fg as Pe,dm as ee,d_ as Z,fh as De,dp as vt,fi as Q,fj as Ht,fk as re,fl as Wt,fm as mt,e2 as St,fn as qa,fo as Ka,d$ as jt,fp as ja,fq as q,fr as qr,fs as ff,ft as kt,dY as bt,fu as $t,fv as Jt,fw as ae,fx as Ja,fy as Nt,fz as pf,fA as Ye,fB as Xe,fC as _v,fD as Qt,fE as Yt,fF as pe,d9 as H,fG as _i,fH as df,c_ as K,fI as Qa,fJ as Tt,fK as B,fL as te,fM as gf,fN as yf,fO as ji,fP as mf,fQ as Sf,fR as tn,fS as wv,fT as Ze,fU as yr,fV as nt,d4 as Dt,fW as xf,fX as en,fY as qe,fZ as fr,f_ as Ji,f$ as Qi,d8 as it,g0 as bv,g1 as _f,g2 as Kr,g3 as Av,g4 as st,g5 as Tv,dr as Ir,g6 as wf,g7 as Mt,g8 as mr,g9 as to,ga as Ot,gb as ne,gc as rn,gd as Iv,ge as bf,gf as Af,gg as an,gh as Dv,gi as Tf,gj as Cv,gk as Aa,gl as ge,gm as eo,gn as Bt,dn as Ut,go as pr,gp as wi,gq as Lt,gr as ro,gs as If,gt as pt,gu as Mv,gv as dr,gw as Lv,gx as jo,gy as Dr,gz as Jo,gA as Df,gB as yn,gC as mn,gD as xt,gE as Cf,gF as Rr,gG as Ta,gH as Qo,gI as nn,gJ as Te,gK as Mf,gL as sr,gM as ts,gN as on,gO as Lf,gP as bi,gQ as Ai,gR as ao,gS as no,gT as io,gU as sn,gV as ln,gW as Pf,gX as Pv,gY as Vf,e1 as oo,dX as jr,gZ as Vv,g_ as Ef,g$ as Ft,h0 as es,h1 as Rf,dq as kf,h2 as rs,h3 as Ke,h4 as be,dg as Nf,dh as zf,h5 as Gf,h6 as Of,h7 as Bf,h8 as Ev,h9 as Ff,ha as so,hb as Ia,hc as ur,hd as Rv,he as je,hf as kv,hg as lo,hh as Hf,hi as Wf,hj as $f,hk as Da,hl as Ti,hm as Ii,hn as Uf,ho as Sn,hp as Nv,hq as ht,hr as uo,hs as vo,ht as xn,hu as Yf,e0 as zv,hv as Xf,hw as Cr,hx as Zf,hy as as,hz as qf,hA as ns,hB as is,hC as vr,hD as Kf,hE as Di,hF as un,hG as os,hH as jf,hI as Jf,hJ as Qf,hK as ss,hL as tp,hM as ep,hN as Br,hO as rp,hP as Gv,hQ as Jr,hR as ls,hS as ap,hT as np,hU as ip,hV as Ov,hW as Bv,hX as op,hY as Fv,hZ as Hv,h_ as us,h$ as sp,i0 as vs,i1 as Qr,i2 as Wv,i3 as co,i4 as lp,i5 as up,i6 as vp,i7 as cp,i8 as hp,i9 as fp,ia as pp,ib as $v,ic as dp,id as cs,ie as gp,ig as yp,ih as mp,ii as Sp,ij as Uv,ik as Yv,il as ra,im as xp,io as _p,ip as wp,iq as bp,ir as Xv,is as _n,it as Ci,iu as Ap,iv as Tp,iw as Ip,ix as Dp,iy as Cp,iz as Ca,iA as Mp,iB as vn,iC as Lp,iD as Pp,iE as Mi,iF as wn,iG as Vp,iH as Ep,iI as hs,iJ as Rp,iK as Zv,iL as kp,iM as Np,iN as zp,iO as Gp,iP as Op,iQ as fs,iR as Bp,iS as Ma,iT as ho,iU as Fp,iV as bn,iW as Hp,D as cn,d2 as Wp,iX as $p,iY as Up,d1 as Yp,iZ as Xp,i_ as Zp,c$ as qp,dQ as Kp,d0 as jp,i$ as Jp,j0 as Qp,j1 as td,_ as ed,r as oe,b as ps,o as rd,dz as ad,c as aa,e as Sr,f as An,g as ct,h as de,i as xe,F as nd,j as id,k as ds,n as Tn,t as od,A as gs,u as na,m as ta,E as ys,R as sd,S as ld}from"./index.76214426.js";import{i as ud}from"./install.16575870.js";import{i as vd}from"./installLabelLayout.c0cc2a04.js";var cd=1e-8;function ms(a,e){return Math.abs(a-e)<cd}function He(a,e,t){var r=0,n=a[0];if(!n)return!1;for(var i=1;i<a.length;i++){var o=a[i];r+=Zo(n[0],n[1],o[0],o[1],e,t),n=o}var s=a[0];return(!ms(n[0],s[0])||!ms(n[1],s[1]))&&(r+=Zo(n[0],n[1],s[0],s[1],e,t)),r!==0}var hd=[];function In(a,e){for(var t=0;t<a.length;t++)Gr(a[t],a[t],e)}function Ss(a,e,t,r){for(var n=0;n<a.length;n++){var i=a[n];r&&(i=r.project(i)),i&&isFinite(i[0])&&isFinite(i[1])&&(pv(e,e,i),dv(t,t,i))}}function fd(a){for(var e=0,t=0,r=0,n=a.length,i=a[n-1][0],o=a[n-1][1],s=0;s<n;s++){var l=a[s][0],u=a[s][1],v=i*u-l*o;e+=v,t+=(i+l)*v,r+=(o+u)*v,i=l,o=u}return e?[t/e/3,r/e/3,e]:[a[0][0]||0,a[0][1]||0]}var qv=function(){function a(e){this.name=e}return a.prototype.setCenter=function(e){this._center=e},a.prototype.getCenter=function(){var e=this._center;return e||(e=this._center=this.calcCenter()),e},a}(),xs=function(){function a(e,t){this.type="polygon",this.exterior=e,this.interiors=t}return a}(),_s=function(){function a(e){this.type="linestring",this.points=e}return a}(),Kv=function(a){z(e,a);function e(t,r,n){var i=a.call(this,t)||this;return i.type="geoJSON",i.geometries=r,i._center=n&&[n[0],n[1]],i}return e.prototype.calcCenter=function(){for(var t=this.geometries,r,n=0,i=0;i<t.length;i++){var o=t[i],s=o.exterior,l=s&&s.length;l>n&&(r=o,n=l)}if(r)return fd(r.exterior);var u=this.getBoundingRect();return[u.x+u.width/2,u.y+u.height/2]},e.prototype.getBoundingRect=function(t){var r=this._rect;if(r&&!t)return r;var n=[1/0,1/0],i=[-1/0,-1/0],o=this.geometries;return D(o,function(s){s.type==="polygon"?Ss(s.exterior,n,i,t):D(s.points,function(l){Ss(l,n,i,t)})}),isFinite(n[0])&&isFinite(n[1])&&isFinite(i[0])&&isFinite(i[1])||(n[0]=n[1]=i[0]=i[1]=0),r=new yt(n[0],n[1],i[0]-n[0],i[1]-n[1]),t||(this._rect=r),r},e.prototype.contain=function(t){var r=this.getBoundingRect(),n=this.geometries;if(!r.contain(t[0],t[1]))return!1;t:for(var i=0,o=n.length;i<o;i++){var s=n[i];if(s.type==="polygon"){var l=s.exterior,u=s.interiors;if(He(l,t[0],t[1])){for(var v=0;v<(u?u.length:0);v++)if(He(u[v],t[0],t[1]))continue t;return!0}}}return!1},e.prototype.transformTo=function(t,r,n,i){var o=this.getBoundingRect(),s=o.width/o.height;n?i||(i=n/s):n=s*i;for(var l=new yt(t,r,n,i),u=o.calculateTransform(l),v=this.geometries,c=0;c<v.length;c++){var h=v[c];h.type==="polygon"?(In(h.exterior,u),D(h.interiors,function(f){In(f,u)})):D(h.points,function(f){In(f,u)})}o=this._rect,o.copy(l),this._center=[o.x+o.width/2,o.y+o.height/2]},e.prototype.cloneShallow=function(t){t==null&&(t=this.name);var r=new e(t,this.geometries,this._center);return r._rect=this._rect,r.transformTo=null,r},e}(qv),pd=function(a){z(e,a);function e(t,r){var n=a.call(this,t)||this;return n.type="geoSVG",n._elOnlyForCalculate=r,n}return e.prototype.calcCenter=function(){for(var t=this._elOnlyForCalculate,r=t.getBoundingRect(),n=[r.x+r.width/2,r.y+r.height/2],i=Wh(hd),o=t;o&&!o.isGeoSVGGraphicRoot;)xi(i,o.getLocalTransform(),i),o=o.parent;return fv(i,i),Gr(n,n,i),n},e}(qv);function dd(a){if(!a.UTF8Encoding)return a;var e=a,t=e.UTF8Scale;t==null&&(t=1024);var r=e.features;return D(r,function(n){var i=n.geometry,o=i.encodeOffsets,s=i.coordinates;if(!!o)switch(i.type){case"LineString":i.coordinates=jv(s,o,t);break;case"Polygon":Dn(s,o,t);break;case"MultiLineString":Dn(s,o,t);break;case"MultiPolygon":D(s,function(l,u){return Dn(l,o[u],t)})}}),e.UTF8Encoding=!1,e}function Dn(a,e,t){for(var r=0;r<a.length;r++)a[r]=jv(a[r],e[r],t)}function jv(a,e,t){for(var r=[],n=e[0],i=e[1],o=0;o<a.length;o+=2){var s=a.charCodeAt(o)-64,l=a.charCodeAt(o+1)-64;s=s>>1^-(s&1),l=l>>1^-(l&1),s+=n,l+=i,n=s,i=l,r.push([s/t,l/t])}return r}function gd(a,e){return a=dd(a),F(Et(a.features,function(t){return t.geometry&&t.properties&&t.geometry.coordinates.length>0}),function(t){var r=t.properties,n=t.geometry,i=[];switch(n.type){case"Polygon":var o=n.coordinates;i.push(new xs(o[0],o.slice(1)));break;case"MultiPolygon":D(n.coordinates,function(l){l[0]&&i.push(new xs(l[0],l.slice(1)))});break;case"LineString":i.push(new _s([n.coordinates]));break;case"MultiLineString":i.push(new _s(n.coordinates))}var s=new Kv(r[e||"name"],i,r.cp);return s.properties=r,s})}var Cn=Math.sin,Mn=Math.cos,Jv=Math.PI,Re=Math.PI*2,yd=180/Jv,md=function(){function a(){}return a.prototype.reset=function(e){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,e||4)},a.prototype.moveTo=function(e,t){this._add("M",e,t)},a.prototype.lineTo=function(e,t){this._add("L",e,t)},a.prototype.bezierCurveTo=function(e,t,r,n,i,o){this._add("C",e,t,r,n,i,o)},a.prototype.quadraticCurveTo=function(e,t,r,n){this._add("Q",e,t,r,n)},a.prototype.arc=function(e,t,r,n,i,o){this.ellipse(e,t,r,r,0,n,i,o)},a.prototype.ellipse=function(e,t,r,n,i,o,s,l){var u=s-o,v=!l,c=Math.abs(u),h=we(c-Re)||(v?u>=Re:-u>=Re),f=u>0?u%Re:u%Re+Re,p=!1;h?p=!0:we(c)?p=!1:p=f>=Jv==!!v;var d=e+r*Mn(o),g=t+n*Cn(o);this._start&&this._add("M",d,g);var y=Math.round(i*yd);if(h){var m=1/this._p,S=(v?1:-1)*(Re-m);this._add("A",r,n,y,1,+v,e+r*Mn(o+S),t+n*Cn(o+S)),m>.01&&this._add("A",r,n,y,0,+v,d,g)}else{var x=e+r*Mn(s),w=t+n*Cn(s);this._add("A",r,n,y,+p,+v,x,w)}},a.prototype.rect=function(e,t,r,n){this._add("M",e,t),this._add("l",r,0),this._add("l",0,n),this._add("l",-r,0),this._add("Z")},a.prototype.closePath=function(){this._d.length>0&&this._add("Z")},a.prototype._add=function(e,t,r,n,i,o,s,l,u){for(var v=[],c=this._p,h=1;h<arguments.length;h++){var f=arguments[h];if(isNaN(f)){this._invalid=!0;return}v.push(Math.round(f*c)/c)}this._d.push(e+v.join(" ")),this._start=e==="Z"},a.prototype.generateStr=function(){this._str=this._invalid?"":this._d.join(""),this._d=[]},a.prototype.getStr=function(){return this._str},a}();const Qv=md;var kr="none",Sd=Math.round;function xd(a){var e=a.fill;return e!=null&&e!==kr}function _d(a){var e=a.stroke;return e!=null&&e!==kr}var Li=["lineCap","miterLimit","lineJoin"],wd=F(Li,function(a){return"stroke-"+a.toLowerCase()});function bd(a,e,t,r){var n=e.opacity==null?1:e.opacity;if(t instanceof fe){a("opacity",n);return}if(xd(e)){var i=hr(e.fill);a("fill",i.color);var o=e.fillOpacity!=null?e.fillOpacity*i.opacity*n:i.opacity*n;(r||o<1)&&a("fill-opacity",o)}else a("fill",kr);if(_d(e)){var s=hr(e.stroke);a("stroke",s.color);var l=e.strokeNoScale?t.getLineScale():1,u=l?(e.lineWidth||0)/l:0,v=e.strokeOpacity!=null?e.strokeOpacity*s.opacity*n:s.opacity*n,c=e.strokeFirst;if((r||u!==1)&&a("stroke-width",u),(r||c)&&a("paint-order",c?"stroke":"fill"),(r||v<1)&&a("stroke-opacity",v),e.lineDash){var h=$h(t),f=h[0],p=h[1];f&&(p=Sd(p||0),a("stroke-dasharray",f.join(",")),(p||r)&&a("stroke-dashoffset",p))}else r&&a("stroke-dasharray",kr);for(var d=0;d<Li.length;d++){var g=Li[d];if(r||e[g]!==qo[g]){var y=e[g]||qo[g];y&&a(wd[d],y)}}}else r&&a("stroke",kr)}var tc="http://www.w3.org/2000/svg",ec="http://www.w3.org/1999/xlink",Ad="http://www.w3.org/2000/xmlns/",Td="http://www.w3.org/XML/1998/namespace";function rc(a){return document.createElementNS(tc,a)}function dt(a,e,t,r,n){return{tag:a,attrs:t||{},children:r,text:n,key:e}}function Id(a,e){var t=[];if(e)for(var r in e){var n=e[r],i=r;n!==!1&&(n!==!0&&n!=null&&(i+='="'+n+'"'),t.push(i))}return"<"+a+" "+t.join(" ")+">"}function Dd(a){return"</"+a+">"}function fo(a,e){e=e||{};var t=e.newline?`
- `:"";function r(n){var i=n.children,o=n.tag,s=n.attrs;return Id(o,s)+(n.text||"")+(i?""+t+F(i,function(l){return r(l)}).join(t)+t:"")+Dd(o)}return r(a)}function Cd(a,e,t){t=t||{};var r=t.newline?`
- `:"",n=" {"+r,i=r+"}",o=F(ft(a),function(l){return l+n+F(ft(a[l]),function(u){return u+":"+a[l][u]+";"}).join(r)+i}).join(r),s=F(ft(e),function(l){return"@keyframes "+l+n+F(ft(e[l]),function(u){return u+n+F(ft(e[l][u]),function(v){var c=e[l][u][v];return v==="d"&&(c='path("'+c+'")'),v+":"+c+";"}).join(r)+i}).join(r)+i}).join(r);return!o&&!s?"":["<![CDATA[",o,s,"]]>"].join(r)}function Pi(a){return{zrId:a,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssClassIdx:0,cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function ws(a,e,t,r){return dt("svg","root",{width:a,height:e,xmlns:tc,"xmlns:xlink":ec,version:"1.1",baseProfile:"full",viewBox:r?"0 0 "+a+" "+e:!1},t)}var bs={cubicIn:"0.32,0,0.67,0",cubicOut:"0.33,1,0.68,1",cubicInOut:"0.65,0,0.35,1",quadraticIn:"0.11,0,0.5,0",quadraticOut:"0.5,1,0.89,1",quadraticInOut:"0.45,0,0.55,1",quarticIn:"0.5,0,0.75,0",quarticOut:"0.25,1,0.5,1",quarticInOut:"0.76,0,0.24,1",quinticIn:"0.64,0,0.78,0",quinticOut:"0.22,1,0.36,1",quinticInOut:"0.83,0,0.17,1",sinusoidalIn:"0.12,0,0.39,0",sinusoidalOut:"0.61,1,0.88,1",sinusoidalInOut:"0.37,0,0.63,1",exponentialIn:"0.7,0,0.84,0",exponentialOut:"0.16,1,0.3,1",exponentialInOut:"0.87,0,0.13,1",circularIn:"0.55,0,1,0.45",circularOut:"0,0.55,0.45,1",circularInOut:"0.85,0,0.15,1"},Ne="transform-origin";function Md(a,e,t){var r=$({},a.shape);$(r,e),a.buildPath(t,r);var n=new Qv;return n.reset(Sv(a)),t.rebuildPath(n,1),n.generateStr(),n.getStr()}function Ld(a,e){var t=e.originX,r=e.originY;(t||r)&&(a[Ne]=t+"px "+r+"px")}var Pd={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function ac(a,e){var t=e.zrId+"-ani-"+e.cssAnimIdx++;return e.cssAnims[t]=a,t}function Vd(a,e,t){var r=a.shape.paths,n={},i,o;if(D(r,function(l){var u=Pi(t.zrId);u.animation=!0,hn(l,{},u,!0);var v=u.cssAnims,c=u.cssNodes,h=ft(v),f=h.length;if(!!f){o=h[f-1];var p=v[o];for(var d in p){var g=p[d];n[d]=n[d]||{d:""},n[d].d+=g.d||""}for(var y in c){var m=c[y].animation;m.indexOf(o)>=0&&(i=m)}}}),!!i){e.d=!1;var s=ac(n,t);return i.replace(o,s)}}function As(a){return tt(a)?bs[a]?"cubic-bezier("+bs[a]+")":Uh(a)?a:"":""}function hn(a,e,t,r){var n=a.animators,i=n.length,o=[];if(a instanceof gv){var s=Vd(a,e,t);if(s)o.push(s);else if(!i)return}else if(!i)return;for(var l={},u=0;u<i;u++){var v=n[u],c=[v.getMaxTime()/1e3+"s"],h=As(v.getClip().easing),f=v.getDelay();h?c.push(h):c.push("linear"),f&&c.push(f/1e3+"s"),v.getLoop()&&c.push("infinite");var p=c.join(" ");l[p]=l[p]||[p,[]],l[p][1].push(v)}function d(m){var S=m[1],x=S.length,w={},_={},b={},A="animation-timing-function";function T(X,et,rt){for(var at=X.getTracks(),At=X.getMaxTime(),Ct=0;Ct<at.length;Ct++){var ut=at[Ct];if(ut.needsAnimate()){var Pt=ut.keyframes,Vt=ut.propName;if(rt&&(Vt=rt(Vt)),Vt)for(var ie=0;ie<Pt.length;ie++){var Ve=Pt[ie],Ee=Math.round(Ve.time/At*100)+"%",Yo=As(Ve.easing),Xo=Ve.rawValue;(tt(Xo)||ce(Xo))&&(et[Ee]=et[Ee]||{},et[Ee][Vt]=Ve.rawValue,Yo&&(et[Ee][A]=Yo))}}}}for(var I=0;I<x;I++){var C=S[I],E=C.targetName;E?E==="shape"&&T(C,_):!r&&T(C,w)}for(var V in w){var M={};Yh(M,a),$(M,w[V]);var P=yv(M),R=w[V][A];b[V]=P?{transform:P}:{},Ld(b[V],M),R&&(b[V][A]=R)}var G,L=!0;for(var V in _){b[V]=b[V]||{};var k=!G,R=_[V][A];k&&(G=new mv);var N=G.len();G.reset(),b[V].d=Md(a,_[V],G);var O=G.len();if(!k&&N!==O){L=!1;break}R&&(b[V][A]=R)}if(!L)for(var V in b)delete b[V].d;if(!r)for(var I=0;I<x;I++){var C=S[I],E=C.targetName;E==="style"&&T(C,b,function(at){return Pd[at]})}for(var U=ft(b),Y=!0,J,I=1;I<U.length;I++){var gt=U[I-1],zt=U[I];if(b[gt][Ne]!==b[zt][Ne]){Y=!1;break}J=b[gt][Ne]}if(Y&&J){for(var V in b)b[V][Ne]&&delete b[V][Ne];e[Ne]=J}if(Et(U,function(X){return ft(b[X]).length>0}).length){var j=ac(b,t);return j+" "+m[0]+" both"}}for(var g in l){var s=d(l[g]);s&&o.push(s)}if(o.length){var y=t.zrId+"-cls-"+t.cssClassIdx++;t.cssNodes["."+y]={animation:o.join(",")},e.class=y}}var Fr=Math.round;function nc(a){return a&&tt(a.src)}function ic(a){return a&&ot(a.toDataURL)}function po(a,e,t,r){bd(function(n,i){var o=n==="fill"||n==="stroke";o&&tf(i)?Bd(e,a,n,r):o&&ef(i)?Fd(t,a,n,r):a[n]=i},e,t,!1),Od(t,a,r)}function Ts(a){return we(a[0]-1)&&we(a[1])&&we(a[2])&&we(a[3]-1)}function Ed(a){return we(a[4])&&we(a[5])}function go(a,e,t){if(e&&!(Ed(e)&&Ts(e))){var r=t?10:1e4;a.transform=Ts(e)?"translate("+Fr(e[4]*r)/r+" "+Fr(e[5]*r)/r+")":rf(e)}}function Is(a,e,t){for(var r=a.points,n=[],i=0;i<r.length;i++)n.push(Fr(r[i][0]*t)/t),n.push(Fr(r[i][1]*t)/t);e.points=n.join(" ")}function Ds(a){return!a.smooth}function Rd(a){var e=F(a,function(t){return typeof t=="string"?[t,t]:t});return function(t,r,n){for(var i=0;i<e.length;i++){var o=e[i],s=t[o[0]];s!=null&&(r[o[1]]=Fr(s*n)/n)}}}var kd={circle:[Rd(["cx","cy","r"])],polyline:[Is,Ds],polygon:[Is,Ds]};function Nd(a){for(var e=a.animators,t=0;t<e.length;t++)if(e[t].targetName==="shape")return!0;return!1}function oc(a,e){var t=a.style,r=a.shape,n=kd[a.type],i={},o=e.animation,s="path",l=a.style.strokePercent,u=e.compress&&Sv(a)||4;if(n&&!e.willUpdate&&!(n[1]&&!n[1](r))&&!(o&&Nd(a))&&!(l<1)){s=a.type;var v=Math.pow(10,u);n[0](r,i,v)}else{a.path||a.createPathProxy();var c=a.path;a.shapeChanged()&&(c.beginPath(),a.buildPath(c,a.shape),a.pathUpdated());var h=c.getVersion(),f=a,p=f.__svgPathBuilder;(f.__svgPathVersion!==h||!p||l!==f.__svgPathStrokePercent)&&(p||(p=f.__svgPathBuilder=new Qv),p.reset(u),c.rebuildPath(p,l),p.generateStr(),f.__svgPathVersion=h,f.__svgPathStrokePercent=l),i.d=p.getStr()}return go(i,a.transform),po(i,t,a,e),e.animation&&hn(a,i,e),dt(s,a.id+"",i)}function zd(a,e){var t=a.style,r=t.image;if(r&&!tt(r)&&(nc(r)?r=r.src:ic(r)&&(r=r.toDataURL())),!!r){var n=t.x||0,i=t.y||0,o=t.width,s=t.height,l={href:r,width:o,height:s};return n&&(l.x=n),i&&(l.y=i),go(l,a.transform),po(l,t,a,e),e.animation&&hn(a,l,e),dt("image",a.id+"",l)}}function Gd(a,e){var t=a.style,r=t.text;if(r!=null&&(r+=""),!(!r||isNaN(t.x)||isNaN(t.y))){var n=t.font||Xh,i=t.x||0,o=Zh(t.y||0,qh(n),t.textBaseline),s=Kh[t.textAlign]||t.textAlign,l={"dominant-baseline":"central","text-anchor":s};if(jh(t)){var u="",v=t.fontStyle,c=Jh(t.fontSize);if(!parseFloat(c))return;var h=t.fontFamily||Qh,f=t.fontWeight;u+="font-size:"+c+";font-family:"+h+";",v&&v!=="normal"&&(u+="font-style:"+v+";"),f&&f!=="normal"&&(u+="font-weight:"+f+";"),l.style=u}else l.style="font: "+n;return r.match(/\s/)&&(l["xml:space"]="preserve"),i&&(l.x=i),o&&(l.y=o),go(l,a.transform),po(l,t,a,e),e.animation&&hn(a,l,e),dt("text",a.id+"",l,void 0,r)}}function Cs(a,e){if(a instanceof It)return oc(a,e);if(a instanceof fe)return zd(a,e);if(a instanceof xv)return Gd(a,e)}function Od(a,e,t){var r=a.style;if(af(r)){var n=nf(a),i=t.shadowCache,o=i[n];if(!o){var s=a.getGlobalScale(),l=s[0],u=s[1];if(!l||!u)return;var v=r.shadowOffsetX||0,c=r.shadowOffsetY||0,h=r.shadowBlur,f=hr(r.shadowColor),p=f.opacity,d=f.color,g=h/2/l,y=h/2/u,m=g+" "+y;o=t.zrId+"-s"+t.shadowIdx++,t.defs[o]=dt("filter",o,{id:o,x:"-100%",y:"-100%",width:"300%",height:"300%"},[dt("feDropShadow","",{dx:v/l,dy:c/u,stdDeviation:m,"flood-color":d,"flood-opacity":p})]),i[n]=o}e.filter=Za(o)}}function Bd(a,e,t,r){var n=a[t],i,o={gradientUnits:n.global?"userSpaceOnUse":"objectBoundingBox"};if(of(n))i="linearGradient",o.x1=n.x,o.y1=n.y,o.x2=n.x2,o.y2=n.y2;else if(sf(n))i="radialGradient",o.cx=_t(n.x,.5),o.cy=_t(n.y,.5),o.r=_t(n.r,.5);else return;for(var s=n.colorStops,l=[],u=0,v=s.length;u<v;++u){var c=lf(s[u].offset)*100+"%",h=s[u].color,f=hr(h),p=f.color,d=f.opacity,g={offset:c};g["stop-color"]=p,d<1&&(g["stop-opacity"]=d),l.push(dt("stop",u+"",g))}var y=dt(i,"",o,l),m=fo(y),S=r.gradientCache,x=S[m];x||(x=r.zrId+"-g"+r.gradientIdx++,S[m]=x,o.id=x,r.defs[x]=dt(i,x,o,l)),e[t]=Za(x)}function Fd(a,e,t,r){var n=a.style[t],i={patternUnits:"userSpaceOnUse"},o;if(uf(n)){var s=n.imageWidth,l=n.imageHeight,u=void 0,v=n.image;if(tt(v)?u=v:nc(v)?u=v.src:ic(v)&&(u=v.toDataURL()),typeof Image>"u"){var c="Image width/height must been given explictly in svg-ssr renderer.";Or(s,c),Or(l,c)}else if(s==null||l==null){var h=function(m,S){if(m){var x=m.elm,w=m.attrs.width=s||S.width,_=m.attrs.height=l||S.height;x&&(x.setAttribute("width",w),x.setAttribute("height",_))}},f=vf(u,null,a,function(m){h(p,m),h(o,m)});f&&f.width&&f.height&&(s=s||f.width,l=l||f.height)}o=dt("image","img",{href:u,width:s,height:l}),i.width=s,i.height=l}else n.svgElement&&(o=lt(n.svgElement),i.width=n.svgWidth,i.height=n.svgHeight);if(!!o){i.patternTransform=yv(n);var p=dt("pattern","",i,[o]),d=fo(p),g=r.patternCache,y=g[d];y||(y=r.zrId+"-p"+r.patternIdx++,g[d]=y,i.id=y,p=r.defs[y]=dt("pattern",y,i,[o])),e[t]=Za(y)}}function Hd(a,e,t){var r=t.clipPathCache,n=t.defs,i=r[a.id];if(!i){i=t.zrId+"-c"+t.clipPathIdx++;var o={id:i};r[a.id]=i,n[i]=dt("clipPath",i,o,[oc(a,t)])}e["clip-path"]=Za(i)}function Ms(a){return document.createTextNode(a)}function We(a,e,t){a.insertBefore(e,t)}function Ls(a,e){a.removeChild(e)}function Ps(a,e){a.appendChild(e)}function sc(a){return a.parentNode}function lc(a){return a.nextSibling}function Ln(a,e){a.textContent=e}var Vs=58,Wd=120,$d=dt("","");function Vi(a){return a===void 0}function ve(a){return a!==void 0}function Ud(a,e,t){for(var r={},n=e;n<=t;++n){var i=a[n].key;i!==void 0&&(r[i]=n)}return r}function Mr(a,e){var t=a.key===e.key,r=a.tag===e.tag;return r&&t}function Hr(a){var e,t=a.children,r=a.tag;if(ve(r)){var n=a.elm=rc(r);if(yo($d,a),W(t))for(e=0;e<t.length;++e){var i=t[e];i!=null&&Ps(n,Hr(i))}else ve(a.text)&&!Rt(a.text)&&Ps(n,Ms(a.text))}else a.elm=Ms(a.text);return a.elm}function uc(a,e,t,r,n){for(;r<=n;++r){var i=t[r];i!=null&&We(a,Hr(i),e)}}function La(a,e,t,r){for(;t<=r;++t){var n=e[t];if(n!=null)if(ve(n.tag)){var i=sc(n.elm);Ls(i,n.elm)}else Ls(a,n.elm)}}function yo(a,e){var t,r=e.elm,n=a&&a.attrs||{},i=e.attrs||{};if(n!==i){for(t in i){var o=i[t],s=n[t];s!==o&&(o===!0?r.setAttribute(t,""):o===!1?r.removeAttribute(t):t.charCodeAt(0)!==Wd?r.setAttribute(t,o):t==="xmlns:xlink"||t==="xmlns"?r.setAttributeNS(Ad,t,o):t.charCodeAt(3)===Vs?r.setAttributeNS(Td,t,o):t.charCodeAt(5)===Vs?r.setAttributeNS(ec,t,o):r.setAttribute(t,o))}for(t in n)t in i||r.removeAttribute(t)}}function Yd(a,e,t){for(var r=0,n=0,i=e.length-1,o=e[0],s=e[i],l=t.length-1,u=t[0],v=t[l],c,h,f,p;r<=i&&n<=l;)o==null?o=e[++r]:s==null?s=e[--i]:u==null?u=t[++n]:v==null?v=t[--l]:Mr(o,u)?(or(o,u),o=e[++r],u=t[++n]):Mr(s,v)?(or(s,v),s=e[--i],v=t[--l]):Mr(o,v)?(or(o,v),We(a,o.elm,lc(s.elm)),o=e[++r],v=t[--l]):Mr(s,u)?(or(s,u),We(a,s.elm,o.elm),s=e[--i],u=t[++n]):(Vi(c)&&(c=Ud(e,r,i)),h=c[u.key],Vi(h)?We(a,Hr(u),o.elm):(f=e[h],f.tag!==u.tag?We(a,Hr(u),o.elm):(or(f,u),e[h]=void 0,We(a,f.elm,o.elm))),u=t[++n]);(r<=i||n<=l)&&(r>i?(p=t[l+1]==null?null:t[l+1].elm,uc(a,p,t,n,l)):La(a,e,r,i))}function or(a,e){var t=e.elm=a.elm,r=a.children,n=e.children;a!==e&&(yo(a,e),Vi(e.text)?ve(r)&&ve(n)?r!==n&&Yd(t,r,n):ve(n)?(ve(a.text)&&Ln(t,""),uc(t,null,n,0,n.length-1)):ve(r)?La(t,r,0,r.length-1):ve(a.text)&&Ln(t,""):a.text!==e.text&&(ve(r)&&La(t,r,0,r.length-1),Ln(t,e.text)))}function Xd(a,e){if(Mr(a,e))or(a,e);else{var t=a.elm,r=sc(t);Hr(e),r!==null&&(We(r,e.elm,lc(t)),La(r,[a],0,0))}return e}var Zd=0,qd=function(){function a(e,t,r){if(this.type="svg",this.refreshHover=Es(),this.configLayer=Es(),this.storage=t,this._opts=r=$({},r),this.root=e,this._id="zr"+Zd++,this._oldVNode=ws(r.width,r.height),e&&!r.ssr){var n=this._viewport=document.createElement("div");n.style.cssText="position:relative;overflow:hidden";var i=this._svgDom=this._oldVNode.elm=rc("svg");yo(null,this._oldVNode),n.appendChild(i),e.appendChild(n)}this.resize(r.width,r.height)}return a.prototype.getType=function(){return this.type},a.prototype.getViewportRoot=function(){return this._viewport},a.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},a.prototype.getSvgDom=function(){return this._svgDom},a.prototype.refresh=function(){if(this.root){var e=this.renderToVNode({willUpdate:!0});e.attrs.style="position:absolute;left:0;top:0;user-select:none",Xd(this._oldVNode,e),this._oldVNode=e}},a.prototype.renderOneToVNode=function(e){return Cs(e,Pi(this._id))},a.prototype.renderToVNode=function(e){e=e||{};var t=this.storage.getDisplayList(!0),r=this._backgroundColor,n=this._width,i=this._height,o=Pi(this._id);o.animation=e.animation,o.willUpdate=e.willUpdate,o.compress=e.compress;var s=[];if(r&&r!=="none"){var l=hr(r),u=l.color,v=l.opacity;this._bgVNode=dt("rect","bg",{width:n,height:i,x:"0",y:"0",id:"0",fill:u,"fill-opacity":v}),s.push(this._bgVNode)}else this._bgVNode=null;var c=e.compress?null:this._mainVNode=dt("g","main",{},[]);this._paintList(t,o,c?c.children:s),c&&s.push(c);var h=F(ft(o.defs),function(d){return o.defs[d]});if(h.length&&s.push(dt("defs","defs",{},h)),e.animation){var f=Cd(o.cssNodes,o.cssAnims,{newline:!0});if(f){var p=dt("style","stl",{},[],f);s.push(p)}}return ws(n,i,s,e.useViewBox)},a.prototype.renderToString=function(e){return e=e||{},fo(this.renderToVNode({animation:_t(e.cssAnimation,!0),willUpdate:!1,compress:!0,useViewBox:_t(e.useViewBox,!0)}),{newline:!0})},a.prototype.setBackgroundColor=function(e){this._backgroundColor=e;var t=this._bgVNode;if(t&&t.elm){var r=hr(e),n=r.color,i=r.opacity;t.elm.setAttribute("fill",n),i<1&&t.elm.setAttribute("fill-opacity",i)}},a.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},a.prototype._paintList=function(e,t,r){for(var n=e.length,i=[],o=0,s,l,u=0,v=0;v<n;v++){var c=e[v];if(!c.invisible){var h=c.__clipPaths,f=h&&h.length||0,p=l&&l.length||0,d=void 0;for(d=Math.max(f-1,p-1);d>=0&&!(h&&l&&h[d]===l[d]);d--);for(var g=p-1;g>d;g--)o--,s=i[o-1];for(var y=d+1;y<f;y++){var m={};Hd(h[y],m,t);var S=dt("g","clip-g-"+u++,m,[]);(s?s.children:r).push(S),i[o++]=S,s=S}l=h;var x=Cs(c,t);x&&(s?s.children:r).push(x)}}},a.prototype.resize=function(e,t){var r=this._opts,n=this.root,i=this._viewport;if(e!=null&&(r.width=e),t!=null&&(r.height=t),n&&i&&(i.style.display="none",e=Ko(n,0,r),t=Ko(n,1,r),i.style.display=""),this._width!==e||this._height!==t){if(this._width=e,this._height=t,i){var o=i.style;o.width=e+"px",o.height=t+"px"}var s=this._svgDom;s&&(s.setAttribute("width",e),s.setAttribute("height",t))}},a.prototype.getWidth=function(){return this._width},a.prototype.getHeight=function(){return this._height},a.prototype.dispose=function(){this.root&&(this.root.innerHTML=""),this._svgDom=this._viewport=this.storage=this._oldVNode=this._bgVNode=this._mainVNode=null},a.prototype.clear=function(){this._svgDom&&(this._svgDom.innerHTML=null),this._oldVNode=null},a.prototype.toDataURL=function(e){var t=encodeURIComponent(this.renderToString()),r="data:image/svg+xml;";return e?(t=cf(t),t&&r+"base64,"+t):r+"charset=UTF-8,"+t},a}();function Es(a){return function(){}}const Kd=qd;function jd(a){a.registerPainter("svg",Kd)}function Jd(a){a.eachSeriesByType("radar",function(e){var t=e.getData(),r=[],n=e.coordinateSystem;if(!!n){var i=n.getIndicatorAxes();D(i,function(o,s){t.each(t.mapDimension(i[s].dim),function(l,u){r[u]=r[u]||[];var v=n.dataToPoint(l,s);r[u][s]=Rs(v)?v:ks(n)})}),t.each(function(o){var s=hf(r[o],function(l){return Rs(l)})||ks(n);r[o].push(s.slice()),t.setItemLayout(o,r[o])})}})}function Rs(a){return!isNaN(a[0])&&!isNaN(a[1])}function ks(a){return[a.cx,a.cy]}function Qd(a){var e=a.polar;if(e){W(e)||(e=[e]);var t=[];D(e,function(r,n){r.indicator?(r.type&&!r.shape&&(r.shape=r.type),a.radar=a.radar||[],W(a.radar)||(a.radar=[a.radar]),a.radar.push(r)):t.push(r)}),a.polar=t}D(a.series,function(r){r&&r.type==="radar"&&r.polarIndex&&(r.radarIndex=r.polarIndex)})}var tg=function(a){z(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,r,n){var i=t.coordinateSystem,o=this.group,s=t.getData(),l=this._data;function u(h,f){var p=h.getItemVisual(f,"symbol")||"circle";if(p!=="none"){var d=Ka(h.getItemVisual(f,"symbolSize")),g=jt(p,-1,-1,2,2),y=h.getItemVisual(f,"symbolRotate")||0;return g.attr({style:{strokeNoScale:!0},z2:100,scaleX:d[0]/2,scaleY:d[1]/2,rotation:y*Math.PI/180||0}),g}}function v(h,f,p,d,g,y){p.removeAll();for(var m=0;m<f.length-1;m++){var S=u(d,g);S&&(S.__dimIdx=m,h[m]?(S.setPosition(h[m]),qa[y?"initProps":"updateProps"](S,{x:f[m][0],y:f[m][1]},t,g)):S.setPosition(f[m]),p.add(S))}}function c(h){return F(h,function(f){return[i.cx,i.cy]})}s.diff(l).add(function(h){var f=s.getItemLayout(h);if(!!f){var p=new he,d=new Pe,g={shape:{points:f}};p.shape.points=c(f),d.shape.points=c(f),ee(p,g,t,h),ee(d,g,t,h);var y=new Z,m=new Z;y.add(d),y.add(p),y.add(m),v(d.shape.points,f,m,s,h,!0),s.setItemGraphicEl(h,y)}}).update(function(h,f){var p=l.getItemGraphicEl(f),d=p.childAt(0),g=p.childAt(1),y=p.childAt(2),m={shape:{points:s.getItemLayout(h)}};!m.shape.points||(v(d.shape.points,m.shape.points,y,s,h,!1),De(g),De(d),vt(d,m,t),vt(g,m,t),s.setItemGraphicEl(h,p))}).remove(function(h){o.remove(l.getItemGraphicEl(h))}).execute(),s.eachItemGraphicEl(function(h,f){var p=s.getItemModel(f),d=h.childAt(0),g=h.childAt(1),y=h.childAt(2),m=s.getItemVisual(f,"style"),S=m.fill;o.add(h),d.useStyle(Q(p.getModel("lineStyle").getLineStyle(),{fill:"none",stroke:S})),Ht(d,p,"lineStyle"),Ht(g,p,"areaStyle");var x=p.getModel("areaStyle"),w=x.isEmpty()&&x.parentModel.isEmpty();g.ignore=w,D(["emphasis","select","blur"],function(A){var T=p.getModel([A,"areaStyle"]),I=T.isEmpty()&&T.parentModel.isEmpty();g.ensureState(A).ignore=I&&w}),g.useStyle(Q(x.getAreaStyle(),{fill:S,opacity:.7,decal:m.decal}));var _=p.getModel("emphasis"),b=_.getModel("itemStyle").getItemStyle();y.eachChild(function(A){if(A instanceof fe){var T=A.style;A.useStyle($({image:T.image,x:T.x,y:T.y,width:T.width,height:T.height},m))}else A.useStyle(m),A.setColor(S),A.style.strokeNoScale=!0;var I=A.ensureState("emphasis");I.style=lt(b);var C=s.getStore().get(s.getDimensionIndex(A.__dimIdx),f);(C==null||isNaN(C))&&(C=""),re(A,Wt(p),{labelFetcher:s.hostModel,labelDataIndex:f,labelDimIndex:A.__dimIdx,defaultText:C,inheritColor:S,defaultOpacity:m.opacity})}),mt(h,_.get("focus"),_.get("blurScope"),_.get("disabled"))}),this._data=s},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.type="radar",e}(St);const eg=tg;var rg=function(a){z(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.init=function(t){a.prototype.init.apply(this,arguments),this.legendVisualProvider=new ja(q(this.getData,this),q(this.getRawData,this))},e.prototype.getInitialData=function(t,r){return qr(this,{generateCoord:"indicator_",generateCoordCount:1/0})},e.prototype.formatTooltip=function(t,r,n){var i=this.getData(),o=this.coordinateSystem,s=o.getIndicatorAxes(),l=this.getData().getName(t),u=l===""?this.name:l,v=ff(this,t);return kt("section",{header:u,sortBlocks:!0,blocks:F(s,function(c){var h=i.get(i.mapDimension(c.dim),t);return kt("nameValue",{markerType:"subItem",markerColor:v,name:c.name,value:h,sortParam:h})})})},e.prototype.getTooltipPosition=function(t){if(t!=null){for(var r=this.getData(),n=this.coordinateSystem,i=r.getValues(F(n.dimensions,function(u){return r.mapDimension(u)}),t),o=0,s=i.length;o<s;o++)if(!isNaN(i[o])){var l=n.getIndicatorAxes();return n.coordToPoint(l[o].dataToCoord(i[o]),o)}}},e.type="series.radar",e.dependencies=["radar"],e.defaultOption={z:2,colorBy:"data",coordinateSystem:"radar",legendHoverLink:!0,radarIndex:0,lineStyle:{width:2,type:"solid",join:"round"},label:{position:"top"},symbolSize:8},e}(bt);const ag=rg;var xr=pf.value;function ia(a,e){return Q({show:e},a)}var ng=function(a){z(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(){var t=this.get("boundaryGap"),r=this.get("splitNumber"),n=this.get("scale"),i=this.get("axisLine"),o=this.get("axisTick"),s=this.get("axisLabel"),l=this.get("axisName"),u=this.get(["axisName","show"]),v=this.get(["axisName","formatter"]),c=this.get("axisNameGap"),h=this.get("triggerEvent"),f=F(this.get("indicator")||[],function(p){p.max!=null&&p.max>0&&!p.min?p.min=0:p.min!=null&&p.min<0&&!p.max&&(p.max=0);var d=l;p.color!=null&&(d=Q({color:p.color},l));var g=$t(lt(p),{boundaryGap:t,splitNumber:r,scale:n,axisLine:i,axisTick:o,axisLabel:s,name:p.text,showName:u,nameLocation:"end",nameGap:c,nameTextStyle:d,triggerEvent:h},!1);if(u||(g.name=""),tt(v)){var y=g.name;g.name=v.replace("{value}",y!=null?y:"")}else ot(v)&&(g.name=v(g.name,g));var m=new Jt(g,null,this.ecModel);return ae(m,Ja.prototype),m.mainType="radar",m.componentIndex=this.componentIndex,m},this);this._indicatorModels=f},e.prototype.getIndicatorModels=function(){return this._indicatorModels},e.type="radar",e.defaultOption={z:0,center:["50%","50%"],radius:"75%",startAngle:90,axisName:{show:!0},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:$t({lineStyle:{color:"#bbb"}},xr.axisLine),axisLabel:ia(xr.axisLabel,!1),axisTick:ia(xr.axisTick,!1),splitLine:ia(xr.splitLine,!0),splitArea:ia(xr.splitArea,!0),indicator:[]},e}(Nt);const ig=ng;var og=["axisLine","axisTickLabel","axisName"],sg=function(a){z(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,r,n){var i=this.group;i.removeAll(),this._buildAxes(t),this._buildSplitLineAndArea(t)},e.prototype._buildAxes=function(t){var r=t.coordinateSystem,n=r.getIndicatorAxes(),i=F(n,function(o){var s=o.model.get("showName")?o.name:"",l=new Ye(o.model,{axisName:s,position:[r.cx,r.cy],rotation:o.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return l});D(i,function(o){D(og,o.add,o),this.group.add(o.getGroup())},this)},e.prototype._buildSplitLineAndArea=function(t){var r=t.coordinateSystem,n=r.getIndicatorAxes();if(!n.length)return;var i=t.get("shape"),o=t.getModel("splitLine"),s=t.getModel("splitArea"),l=o.getModel("lineStyle"),u=s.getModel("areaStyle"),v=o.get("show"),c=s.get("show"),h=l.get("color"),f=u.get("color"),p=W(h)?h:[h],d=W(f)?f:[f],g=[],y=[];function m(P,R,G){var L=G%R.length;return P[L]=P[L]||[],L}if(i==="circle")for(var S=n[0].getTicksCoords(),x=r.cx,w=r.cy,_=0;_<S.length;_++){if(v){var b=m(g,p,_);g[b].push(new Xe({shape:{cx:x,cy:w,r:S[_].coord}}))}if(c&&_<S.length-1){var b=m(y,d,_);y[b].push(new _v({shape:{cx:x,cy:w,r0:S[_].coord,r:S[_+1].coord}}))}}else for(var A,T=F(n,function(P,R){var G=P.getTicksCoords();return A=A==null?G.length-1:Math.min(G.length-1,A),F(G,function(L){return r.coordToPoint(L.coord,R)})}),I=[],_=0;_<=A;_++){for(var C=[],E=0;E<n.length;E++)C.push(T[E][_]);if(C[0]&&C.push(C[0].slice()),v){var b=m(g,p,_);g[b].push(new Pe({shape:{points:C}}))}if(c&&I){var b=m(y,d,_-1);y[b].push(new he({shape:{points:C.concat(I)}}))}I=C.slice().reverse()}var V=l.getLineStyle(),M=u.getAreaStyle();D(y,function(P,R){this.group.add(Qt(P,{style:Q({stroke:"none",fill:d[R%d.length]},M),silent:!0}))},this),D(g,function(P,R){this.group.add(Qt(P,{style:Q({fill:"none",stroke:p[R%p.length]},V),silent:!0}))},this)},e.type="radar",e}(Yt);const lg=sg;var ug=function(a){z(e,a);function e(t,r,n){var i=a.call(this,t,r,n)||this;return i.type="value",i.angle=0,i.name="",i}return e}(pe);const vg=ug;var cg=function(){function a(e,t,r){this.dimensions=[],this._model=e,this._indicatorAxes=F(e.getIndicatorModels(),function(n,i){var o="indicator_"+i,s=new vg(o,new _i);return s.name=n.get("name"),s.model=n,n.axis=s,this.dimensions.push(o),s},this),this.resize(e,r)}return a.prototype.getIndicatorAxes=function(){return this._indicatorAxes},a.prototype.dataToPoint=function(e,t){var r=this._indicatorAxes[t];return this.coordToPoint(r.dataToCoord(e),t)},a.prototype.coordToPoint=function(e,t){var r=this._indicatorAxes[t],n=r.angle,i=this.cx+e*Math.cos(n),o=this.cy-e*Math.sin(n);return[i,o]},a.prototype.pointToData=function(e){var t=e[0]-this.cx,r=e[1]-this.cy,n=Math.sqrt(t*t+r*r);t/=n,r/=n;for(var i=Math.atan2(-r,t),o=1/0,s,l=-1,u=0;u<this._indicatorAxes.length;u++){var v=this._indicatorAxes[u],c=Math.abs(i-v.angle);c<o&&(s=v,l=u,o=c)}return[l,+(s&&s.coordToData(n))]},a.prototype.resize=function(e,t){var r=e.get("center"),n=t.getWidth(),i=t.getHeight(),o=Math.min(n,i)/2;this.cx=H(r[0],n),this.cy=H(r[1],i),this.startAngle=e.get("startAngle")*Math.PI/180;var s=e.get("radius");(tt(s)||ce(s))&&(s=[0,s]),this.r0=H(s[0],o),this.r=H(s[1],o),D(this._indicatorAxes,function(l,u){l.setExtent(this.r0,this.r);var v=this.startAngle+u*Math.PI*2/this._indicatorAxes.length;v=Math.atan2(Math.sin(v),Math.cos(v)),l.angle=v},this)},a.prototype.update=function(e,t){var r=this._indicatorAxes,n=this._model;D(r,function(s){s.scale.setExtent(1/0,-1/0)}),e.eachSeriesByType("radar",function(s,l){if(!(s.get("coordinateSystem")!=="radar"||e.getComponent("radar",s.get("radarIndex"))!==n)){var u=s.getData();D(r,function(v){v.scale.unionExtentFromData(u,u.mapDimension(v.dim))})}},this);var i=n.get("splitNumber"),o=new _i;o.setExtent(0,i),o.setInterval(1),D(r,function(s,l){df(s.scale,s.model,o)})},a.prototype.convertToPixel=function(e,t,r){return console.warn("Not implemented."),null},a.prototype.convertFromPixel=function(e,t,r){return console.warn("Not implemented."),null},a.prototype.containPoint=function(e){return console.warn("Not implemented."),!1},a.create=function(e,t){var r=[];return e.eachComponent("radar",function(n){var i=new a(n,e,t);r.push(i),n.coordinateSystem=i}),e.eachSeriesByType("radar",function(n){n.get("coordinateSystem")==="radar"&&(n.coordinateSystem=r[n.get("radarIndex")||0])}),r},a.dimensions=[],a}();const hg=cg;function fg(a){a.registerCoordinateSystem("radar",hg),a.registerComponentModel(ig),a.registerComponentView(lg),a.registerVisual({seriesType:"radar",reset:function(e){var t=e.getData();t.each(function(r){t.setItemVisual(r,"legendIcon","roundRect")}),t.setVisual("legendIcon","roundRect")}})}function pg(a){K(fg),a.registerChartView(eg),a.registerSeriesModel(ag),a.registerLayout(Jd),a.registerProcessor(Qa("radar")),a.registerPreprocessor(Qd)}function mo(a,e,t){var r=a.target;r.x+=e,r.y+=t,r.dirty()}function So(a,e,t,r){var n=a.target,i=a.zoomLimit,o=a.zoom=a.zoom||1;if(o*=e,i){var s=i.min||0,l=i.max||1/0;o=Math.max(Math.min(l,o),s)}var u=o/a.zoom;a.zoom=o,n.x-=(t-n.x)*(u-1),n.y-=(r-n.y)*(u-1),n.scaleX*=u,n.scaleY*=u,n.dirty()}function vc(a){if(tt(a)){var e=new DOMParser;a=e.parseFromString(a,"text/xml")}var t=a;for(t.nodeType===9&&(t=t.firstChild);t.nodeName.toLowerCase()!=="svg"||t.nodeType!==1;)t=t.nextSibling;return t}var Pn,Pa={fill:"fill",stroke:"stroke","stroke-width":"lineWidth",opacity:"opacity","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-miterlimit":"miterLimit","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","text-anchor":"textAlign",visibility:"visibility",display:"display"},Ns=ft(Pa),Va={"alignment-baseline":"textBaseline","stop-color":"stopColor"},zs=ft(Va),dg=function(){function a(){this._defs={},this._root=null}return a.prototype.parse=function(e,t){t=t||{};var r=vc(e);this._defsUsePending=[];var n=new Z;this._root=n;var i=[],o=r.getAttribute("viewBox")||"",s=parseFloat(r.getAttribute("width")||t.width),l=parseFloat(r.getAttribute("height")||t.height);isNaN(s)&&(s=null),isNaN(l)&&(l=null),Gt(r,n,null,!0,!1);for(var u=r.firstChild;u;)this._parseNode(u,n,i,null,!1,!1),u=u.nextSibling;mg(this._defs,this._defsUsePending),this._defsUsePending=[];var v,c;if(o){var h=fn(o);h.length>=4&&(v={x:parseFloat(h[0]||0),y:parseFloat(h[1]||0),width:parseFloat(h[2]),height:parseFloat(h[3])})}if(v&&s!=null&&l!=null&&(c=hc(v,{x:0,y:0,width:s,height:l}),!t.ignoreViewBox)){var f=n;n=new Z,n.add(f),f.scaleX=f.scaleY=c.scale,f.x=c.x,f.y=c.y}return!t.ignoreRootClip&&s!=null&&l!=null&&n.setClipPath(new Tt({shape:{x:0,y:0,width:s,height:l}})),{root:n,width:s,height:l,viewBoxRect:v,viewBoxTransform:c,named:i}},a.prototype._parseNode=function(e,t,r,n,i,o){var s=e.nodeName.toLowerCase(),l,u=n;if(s==="defs"&&(i=!0),s==="text"&&(o=!0),s==="defs"||s==="switch")l=t;else{if(!i){var v=Pn[s];if(v&&B(Pn,s)){l=v.call(this,e,t);var c=e.getAttribute("name");if(c){var h={name:c,namedFrom:null,svgNodeTagLower:s,el:l};r.push(h),s==="g"&&(u=h)}else n&&r.push({name:n.name,namedFrom:n,svgNodeTagLower:s,el:l});t.add(l)}}var f=Gs[s];if(f&&B(Gs,s)){var p=f.call(this,e),d=e.getAttribute("id");d&&(this._defs[d]=p)}}if(l&&l.isGroup)for(var g=e.firstChild;g;)g.nodeType===1?this._parseNode(g,l,r,u,i,o):g.nodeType===3&&o&&this._parseText(g,l),g=g.nextSibling},a.prototype._parseText=function(e,t){var r=new xv({style:{text:e.textContent},silent:!0,x:this._textX||0,y:this._textY||0});Xt(t,r),Gt(e,r,this._defsUsePending,!1,!1),gg(r,t);var n=r.style,i=n.fontSize;i&&i<9&&(n.fontSize=9,r.scaleX*=i/9,r.scaleY*=i/9);var o=(n.fontSize||n.fontFamily)&&[n.fontStyle,n.fontWeight,(n.fontSize||12)+"px",n.fontFamily||"sans-serif"].join(" ");n.font=o;var s=r.getBoundingRect();return this._textX+=s.width,t.add(r),r},a.internalField=function(){Pn={g:function(e,t){var r=new Z;return Xt(t,r),Gt(e,r,this._defsUsePending,!1,!1),r},rect:function(e,t){var r=new Tt;return Xt(t,r),Gt(e,r,this._defsUsePending,!1,!1),r.setShape({x:parseFloat(e.getAttribute("x")||"0"),y:parseFloat(e.getAttribute("y")||"0"),width:parseFloat(e.getAttribute("width")||"0"),height:parseFloat(e.getAttribute("height")||"0")}),r.silent=!0,r},circle:function(e,t){var r=new Xe;return Xt(t,r),Gt(e,r,this._defsUsePending,!1,!1),r.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),r:parseFloat(e.getAttribute("r")||"0")}),r.silent=!0,r},line:function(e,t){var r=new te;return Xt(t,r),Gt(e,r,this._defsUsePending,!1,!1),r.setShape({x1:parseFloat(e.getAttribute("x1")||"0"),y1:parseFloat(e.getAttribute("y1")||"0"),x2:parseFloat(e.getAttribute("x2")||"0"),y2:parseFloat(e.getAttribute("y2")||"0")}),r.silent=!0,r},ellipse:function(e,t){var r=new gf;return Xt(t,r),Gt(e,r,this._defsUsePending,!1,!1),r.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),rx:parseFloat(e.getAttribute("rx")||"0"),ry:parseFloat(e.getAttribute("ry")||"0")}),r.silent=!0,r},polygon:function(e,t){var r=e.getAttribute("points"),n;r&&(n=Fs(r));var i=new he({shape:{points:n||[]},silent:!0});return Xt(t,i),Gt(e,i,this._defsUsePending,!1,!1),i},polyline:function(e,t){var r=e.getAttribute("points"),n;r&&(n=Fs(r));var i=new Pe({shape:{points:n||[]},silent:!0});return Xt(t,i),Gt(e,i,this._defsUsePending,!1,!1),i},image:function(e,t){var r=new fe;return Xt(t,r),Gt(e,r,this._defsUsePending,!1,!1),r.setStyle({image:e.getAttribute("xlink:href")||e.getAttribute("href"),x:+e.getAttribute("x"),y:+e.getAttribute("y"),width:+e.getAttribute("width"),height:+e.getAttribute("height")}),r.silent=!0,r},text:function(e,t){var r=e.getAttribute("x")||"0",n=e.getAttribute("y")||"0",i=e.getAttribute("dx")||"0",o=e.getAttribute("dy")||"0";this._textX=parseFloat(r)+parseFloat(i),this._textY=parseFloat(n)+parseFloat(o);var s=new Z;return Xt(t,s),Gt(e,s,this._defsUsePending,!1,!0),s},tspan:function(e,t){var r=e.getAttribute("x"),n=e.getAttribute("y");r!=null&&(this._textX=parseFloat(r)),n!=null&&(this._textY=parseFloat(n));var i=e.getAttribute("dx")||"0",o=e.getAttribute("dy")||"0",s=new Z;return Xt(t,s),Gt(e,s,this._defsUsePending,!1,!0),this._textX+=parseFloat(i),this._textY+=parseFloat(o),s},path:function(e,t){var r=e.getAttribute("d")||"",n=yf(r);return Xt(t,n),Gt(e,n,this._defsUsePending,!1,!1),n.silent=!0,n}}}(),a}(),Gs={lineargradient:function(a){var e=parseInt(a.getAttribute("x1")||"0",10),t=parseInt(a.getAttribute("y1")||"0",10),r=parseInt(a.getAttribute("x2")||"10",10),n=parseInt(a.getAttribute("y2")||"0",10),i=new ji(e,t,r,n);return Os(a,i),Bs(a,i),i},radialgradient:function(a){var e=parseInt(a.getAttribute("cx")||"0",10),t=parseInt(a.getAttribute("cy")||"0",10),r=parseInt(a.getAttribute("r")||"0",10),n=new mf(e,t,r);return Os(a,n),Bs(a,n),n}};function Os(a,e){var t=a.getAttribute("gradientUnits");t==="userSpaceOnUse"&&(e.global=!0)}function Bs(a,e){for(var t=a.firstChild;t;){if(t.nodeType===1&&t.nodeName.toLocaleLowerCase()==="stop"){var r=t.getAttribute("offset"),n=void 0;r&&r.indexOf("%")>0?n=parseInt(r,10)/100:r?n=parseFloat(r):n=0;var i={};cc(t,i,i);var o=i.stopColor||t.getAttribute("stop-color")||"#000000";e.colorStops.push({offset:n,color:o})}t=t.nextSibling}}function Xt(a,e){a&&a.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),Q(e.__inheritedStyle,a.__inheritedStyle))}function Fs(a){for(var e=fn(a),t=[],r=0;r<e.length;r+=2){var n=parseFloat(e[r]),i=parseFloat(e[r+1]);t.push([n,i])}return t}function Gt(a,e,t,r,n){var i=e,o=i.__inheritedStyle=i.__inheritedStyle||{},s={};a.nodeType===1&&(_g(a,e),cc(a,o,s),r||wg(a,o,s)),i.style=i.style||{},o.fill!=null&&(i.style.fill=Hs(i,"fill",o.fill,t)),o.stroke!=null&&(i.style.stroke=Hs(i,"stroke",o.stroke,t)),D(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],function(l){o[l]!=null&&(i.style[l]=parseFloat(o[l]))}),D(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign"],function(l){o[l]!=null&&(i.style[l]=o[l])}),n&&(i.__selfStyle=s),o.lineDash&&(i.style.lineDash=F(fn(o.lineDash),function(l){return parseFloat(l)})),(o.visibility==="hidden"||o.visibility==="collapse")&&(i.invisible=!0),o.display==="none"&&(i.ignore=!0)}function gg(a,e){var t=e.__selfStyle;if(t){var r=t.textBaseline,n=r;!r||r==="auto"||r==="baseline"?n="alphabetic":r==="before-edge"||r==="text-before-edge"?n="top":r==="after-edge"||r==="text-after-edge"?n="bottom":(r==="central"||r==="mathematical")&&(n="middle"),a.style.textBaseline=n}var i=e.__inheritedStyle;if(i){var o=i.textAlign,s=o;o&&(o==="middle"&&(s="center"),a.style.textAlign=s)}}var yg=/^url\(\s*#(.*?)\)/;function Hs(a,e,t,r){var n=t&&t.match(yg);if(n){var i=Sf(n[1]);r.push([a,e,i]);return}return t==="none"&&(t=null),t}function mg(a,e){for(var t=0;t<e.length;t++){var r=e[t];r[0].style[r[1]]=a[r[2]]}}var Sg=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function fn(a){return a.match(Sg)||[]}var xg=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.eE,]*)\)/g,Vn=Math.PI/180;function _g(a,e){var t=a.getAttribute("transform");if(t){t=t.replace(/,/g," ");var r=[],n=null;t.replace(xg,function(c,h,f){return r.push(h,f),""});for(var i=r.length-1;i>0;i-=2){var o=r[i],s=r[i-1],l=fn(o);switch(n=n||yr(),s){case"translate":Ze(n,n,[parseFloat(l[0]),parseFloat(l[1]||"0")]);break;case"scale":wv(n,n,[parseFloat(l[0]),parseFloat(l[1]||l[0])]);break;case"rotate":tn(n,n,-parseFloat(l[0])*Vn);break;case"skewX":var u=Math.tan(parseFloat(l[0])*Vn);xi(n,[1,0,u,1,0,0],n);break;case"skewY":var v=Math.tan(parseFloat(l[0])*Vn);xi(n,[1,v,0,1,0,0],n);break;case"matrix":n[0]=parseFloat(l[0]),n[1]=parseFloat(l[1]),n[2]=parseFloat(l[2]),n[3]=parseFloat(l[3]),n[4]=parseFloat(l[4]),n[5]=parseFloat(l[5]);break}}e.setLocalTransform(n)}}var Ws=/([^\s:;]+)\s*:\s*([^:;]+)/g;function cc(a,e,t){var r=a.getAttribute("style");if(!!r){Ws.lastIndex=0;for(var n;(n=Ws.exec(r))!=null;){var i=n[1],o=B(Pa,i)?Pa[i]:null;o&&(e[o]=n[2]);var s=B(Va,i)?Va[i]:null;s&&(t[s]=n[2])}}}function wg(a,e,t){for(var r=0;r<Ns.length;r++){var n=Ns[r],i=a.getAttribute(n);i!=null&&(e[Pa[n]]=i)}for(var r=0;r<zs.length;r++){var n=zs[r],i=a.getAttribute(n);i!=null&&(t[Va[n]]=i)}}function hc(a,e){var t=e.width/a.width,r=e.height/a.height,n=Math.min(t,r);return{scale:n,x:-(a.x+a.width/2)*n+(e.x+e.width/2),y:-(a.y+a.height/2)*n+(e.y+e.height/2)}}function bg(a,e){var t=new dg;return t.parse(a,e)}var Ag=nt(["rect","circle","line","ellipse","polygon","polyline","path","text","tspan","g"]),Tg=function(){function a(e,t){this.type="geoSVG",this._usedGraphicMap=nt(),this._freedGraphics=[],this._mapName=e,this._parsedXML=vc(t)}return a.prototype.load=function(){var e=this._firstGraphic;if(!e){e=this._firstGraphic=this._buildGraphic(this._parsedXML),this._freedGraphics.push(e),this._boundingRect=this._firstGraphic.boundingRect.clone();var t=Dg(e.named),r=t.regions,n=t.regionsMap;this._regions=r,this._regionsMap=n}return{boundingRect:this._boundingRect,regions:this._regions,regionsMap:this._regionsMap}},a.prototype._buildGraphic=function(e){var t,r;try{t=e&&bg(e,{ignoreViewBox:!0,ignoreRootClip:!0})||{},r=t.root,Or(r!=null)}catch(g){throw new Error(`Invalid svg format
- `+g.message)}var n=new Z;n.add(r),n.isGeoSVGGraphicRoot=!0;var i=t.width,o=t.height,s=t.viewBoxRect,l=this._boundingRect;if(!l){var u=void 0,v=void 0,c=void 0,h=void 0;if(i!=null?(u=0,c=i):s&&(u=s.x,c=s.width),o!=null?(v=0,h=o):s&&(v=s.y,h=s.height),u==null||v==null){var f=r.getBoundingRect();u==null&&(u=f.x,c=f.width),v==null&&(v=f.y,h=f.height)}l=this._boundingRect=new yt(u,v,c,h)}if(s){var p=hc(s,l);r.scaleX=r.scaleY=p.scale,r.x=p.x,r.y=p.y}n.setClipPath(new Tt({shape:l.plain()}));var d=[];return D(t.named,function(g){Ag.get(g.svgNodeTagLower)!=null&&(d.push(g),Ig(g.el))}),{root:n,boundingRect:l,named:d}},a.prototype.useGraphic=function(e){var t=this._usedGraphicMap,r=t.get(e);return r||(r=this._freedGraphics.pop()||this._buildGraphic(this._parsedXML),t.set(e,r),r)},a.prototype.freeGraphic=function(e){var t=this._usedGraphicMap,r=t.get(e);r&&(t.removeKey(e),this._freedGraphics.push(r))},a}();function Ig(a){a.silent=!1,a.isGroup&&a.traverse(function(e){e.silent=!1})}function Dg(a){var e=[],t=nt();return D(a,function(r){if(r.namedFrom==null){var n=new pd(r.name,r.el);e.push(n),t.set(r.name,n)}}),{regions:e,regionsMap:t}}var Ei=[126,25],$s="\u5357\u6D77\u8BF8\u5C9B",ze=[[[0,3.5],[7,11.2],[15,11.9],[30,7],[42,.7],[52,.7],[56,7.7],[59,.7],[64,.7],[64,0],[5,0],[0,3.5]],[[13,16.1],[19,14.7],[16,21.7],[11,23.1],[13,16.1]],[[12,32.2],[14,38.5],[15,38.5],[13,32.2],[12,32.2]],[[16,47.6],[12,53.2],[13,53.2],[18,47.6],[16,47.6]],[[6,64.4],[8,70],[9,70],[8,64.4],[6,64.4]],[[23,82.6],[29,79.8],[30,79.8],[25,82.6],[23,82.6]],[[37,70.7],[43,62.3],[44,62.3],[39,70.7],[37,70.7]],[[48,51.1],[51,45.5],[53,45.5],[50,51.1],[48,51.1]],[[51,35],[51,28.7],[53,28.7],[53,35],[51,35]],[[52,22.4],[55,17.5],[56,17.5],[53,22.4],[52,22.4]],[[58,12.6],[62,7],[63,7],[60,12.6],[58,12.6]],[[0,3.5],[0,93.1],[64,93.1],[64,0],[63,0],[63,92.4],[1,92.4],[1,3.5],[0,3.5]]];for(var ke=0;ke<ze.length;ke++)for(var Qe=0;Qe<ze[ke].length;Qe++)ze[ke][Qe][0]/=10.5,ze[ke][Qe][1]/=-10.5/.75,ze[ke][Qe][0]+=Ei[0],ze[ke][Qe][1]+=Ei[1];function Cg(a,e){if(a==="china"){for(var t=0;t<e.length;t++)if(e[t].name===$s)return;e.push(new Kv($s,F(ze,function(r){return{type:"polygon",exterior:r}}),Ei))}}var Mg={\u5357\u6D77\u8BF8\u5C9B:[32,80],\u5E7F\u4E1C:[0,-10],\u9999\u6E2F:[10,5],\u6FB3\u95E8:[-10,10],\u5929\u6D25:[5,5]};function Lg(a,e){if(a==="china"){var t=Mg[e.name];if(t){var r=e.getCenter();r[0]+=t[0]/10.5,r[1]+=-t[1]/(10.5/.75),e.setCenter(r)}}}var Pg=[[[123.45165252685547,25.73527164402261],[123.49731445312499,25.73527164402261],[123.49731445312499,25.750734064600884],[123.45165252685547,25.750734064600884],[123.45165252685547,25.73527164402261]]];function Vg(a,e){a==="china"&&e.name==="\u53F0\u6E7E"&&e.geometries.push({type:"polygon",exterior:Pg[0]})}var Eg="name",Rg=function(){function a(e,t,r){this.type="geoJSON",this._parsedMap=nt(),this._mapName=e,this._specialAreas=r,this._geoJSON=Ng(t)}return a.prototype.load=function(e,t){t=t||Eg;var r=this._parsedMap.get(t);if(!r){var n=this._parseToRegions(t);r=this._parsedMap.set(t,{regions:n,boundingRect:kg(n)})}var i=nt(),o=[];return D(r.regions,function(s){var l=s.name;e&&B(e,l)&&(s=s.cloneShallow(l=e[l])),o.push(s),i.set(l,s)}),{regions:o,boundingRect:r.boundingRect||new yt(0,0,0,0),regionsMap:i}},a.prototype._parseToRegions=function(e){var t=this._mapName,r=this._geoJSON,n;try{n=r?gd(r,e):[]}catch(i){throw new Error(`Invalid geoJson format
- `+i.message)}return Cg(t,n),D(n,function(i){var o=i.name;Lg(t,i),Vg(t,i);var s=this._specialAreas&&this._specialAreas[o];s&&i.transformTo(s.left,s.top,s.width,s.height)},this),n},a.prototype.getMapForUser=function(){return{geoJson:this._geoJSON,geoJSON:this._geoJSON,specialAreas:this._specialAreas}},a}();function kg(a){for(var e,t=0;t<a.length;t++){var r=a[t].getBoundingRect();e=e||r.clone(),e.union(r)}return e}function Ng(a){return tt(a)?typeof JSON<"u"&&JSON.parse?JSON.parse(a):new Function("return ("+a+");")():a}var _r=nt();const Se={registerMap:function(a,e,t){if(e.svg){var r=new Tg(a,e.svg);_r.set(a,r)}else{var n=e.geoJson||e.geoJSON;n&&!e.features?t=e.specialAreas:n=e;var r=new Rg(a,n,t);_r.set(a,r)}},getGeoResource:function(a){return _r.get(a)},getMapForUser:function(a){var e=_r.get(a);return e&&e.type==="geoJSON"&&e.getMapForUser()},load:function(a,e,t){var r=_r.get(a);if(!!r)return r.load(e,t)}};var xo=["rect","circle","line","ellipse","polygon","polyline","path"],zg=nt(xo),Gg=nt(xo.concat(["g"])),Og=nt(xo.concat(["g"])),fc=Dt();function oa(a){var e=a.getItemStyle(),t=a.get("areaColor");return t!=null&&(e.fill=t),e}function Us(a){var e=a.style;e&&(e.stroke=e.stroke||e.fill,e.fill=null)}var Bg=function(){function a(e){var t=new Z;this.uid=xf("ec_map_draw"),this._controller=new en(e.getZr()),this._controllerHost={target:t},this.group=t,t.add(this._regionsGroup=new Z),t.add(this._svgGroup=new Z)}return a.prototype.draw=function(e,t,r,n,i){var o=e.mainType==="geo",s=e.getData&&e.getData();o&&t.eachComponent({mainType:"series",subType:"map"},function(y){!s&&y.getHostGeoModel()===e&&(s=y.getData())});var l=e.coordinateSystem,u=this._regionsGroup,v=this.group,c=l.getTransformInfo(),h=c.raw,f=c.roam,p=!u.childAt(0)||i;p?(v.x=f.x,v.y=f.y,v.scaleX=f.scaleX,v.scaleY=f.scaleY,v.dirty()):vt(v,f,e);var d=s&&s.getVisual("visualMeta")&&s.getVisual("visualMeta").length>0,g={api:r,geo:l,mapOrGeoModel:e,data:s,isVisualEncodedByVisualMap:d,isGeo:o,transformInfoRaw:h};l.resourceType==="geoJSON"?this._buildGeoJSON(g):l.resourceType==="geoSVG"&&this._buildSVG(g),this._updateController(e,t,r),this._updateMapSelectHandler(e,u,r,n)},a.prototype._buildGeoJSON=function(e){var t=this._regionsGroupByName=nt(),r=nt(),n=this._regionsGroup,i=e.transformInfoRaw,o=e.mapOrGeoModel,s=e.data,l=e.geo.projection,u=l&&l.stream;function v(f,p){return p&&(f=p(f)),f&&[f[0]*i.scaleX+i.x,f[1]*i.scaleY+i.y]}function c(f){for(var p=[],d=!u&&l&&l.project,g=0;g<f.length;++g){var y=v(f[g],d);y&&p.push(y)}return p}function h(f){return{shape:{points:c(f)}}}n.removeAll(),D(e.geo.regions,function(f){var p=f.name,d=t.get(p),g=r.get(p)||{},y=g.dataIdx,m=g.regionModel;d||(d=t.set(p,new Z),n.add(d),y=s?s.indexOfName(p):null,m=e.isGeo?o.getRegionModel(p):s?s.getItemModel(y):null,r.set(p,{dataIdx:y,regionModel:m}));var S=[],x=[];D(f.geometries,function(b){if(b.type==="polygon"){var A=[b.exterior].concat(b.interiors||[]);u&&(A=js(A,u)),D(A,function(I){S.push(new he(h(I)))})}else{var T=b.points;u&&(T=js(T,u,!0)),D(T,function(I){x.push(new Pe(h(I)))})}});var w=v(f.getCenter(),l&&l.project);function _(b,A){if(!!b.length){var T=new gv({culling:!0,segmentIgnoreThreshold:1,shape:{paths:b}});d.add(T),Ys(e,T,y,m),Xs(e,T,p,m,o,y,w),A&&(Us(T),D(T.states,Us))}}_(S),_(x,!0)}),t.each(function(f,p){var d=r.get(p),g=d.dataIdx,y=d.regionModel;Zs(e,f,p,y,o,g),qs(e,f,p,y,o),Ks(e,f,p,y,o)},this)},a.prototype._buildSVG=function(e){var t=e.geo.map,r=e.transformInfoRaw;this._svgGroup.x=r.x,this._svgGroup.y=r.y,this._svgGroup.scaleX=r.scaleX,this._svgGroup.scaleY=r.scaleY,this._svgResourceChanged(t)&&(this._freeSVG(),this._useSVG(t));var n=this._svgDispatcherMap=nt(),i=!1;D(this._svgGraphicRecord.named,function(o){var s=o.name,l=e.mapOrGeoModel,u=e.data,v=o.svgNodeTagLower,c=o.el,h=u?u.indexOfName(s):null,f=l.getRegionModel(s);if(zg.get(v)!=null&&c instanceof qe&&Ys(e,c,h,f),c instanceof qe&&(c.culling=!0),c.z2EmphasisLift=0,!o.namedFrom&&(Og.get(v)!=null&&Xs(e,c,s,f,l,h,null),Zs(e,c,s,f,l,h),qs(e,c,s,f,l),Gg.get(v)!=null)){var p=Ks(e,c,s,f,l);p==="self"&&(i=!0);var d=n.get(s)||n.set(s,[]);d.push(c)}},this),this._enableBlurEntireSVG(i,e)},a.prototype._enableBlurEntireSVG=function(e,t){if(e&&t.isGeo){var r=t.mapOrGeoModel.getModel(["blur","itemStyle"]).getItemStyle(),n=r.opacity;this._svgGraphicRecord.root.traverse(function(i){if(!i.isGroup){fr(i);var o=i.ensureState("blur").style||{};o.opacity==null&&n!=null&&(o.opacity=n),i.ensureState("emphasis")}})}},a.prototype.remove=function(){this._regionsGroup.removeAll(),this._regionsGroupByName=null,this._svgGroup.removeAll(),this._freeSVG(),this._controller.dispose(),this._controllerHost=null},a.prototype.findHighDownDispatchers=function(e,t){if(e==null)return[];var r=t.coordinateSystem;if(r.resourceType==="geoJSON"){var n=this._regionsGroupByName;if(n){var i=n.get(e);return i?[i]:[]}}else if(r.resourceType==="geoSVG")return this._svgDispatcherMap&&this._svgDispatcherMap.get(e)||[]},a.prototype._svgResourceChanged=function(e){return this._svgMapName!==e},a.prototype._useSVG=function(e){var t=Se.getGeoResource(e);if(t&&t.type==="geoSVG"){var r=t.useGraphic(this.uid);this._svgGroup.add(r.root),this._svgGraphicRecord=r,this._svgMapName=e}},a.prototype._freeSVG=function(){var e=this._svgMapName;if(e!=null){var t=Se.getGeoResource(e);t&&t.type==="geoSVG"&&t.freeGraphic(this.uid),this._svgGraphicRecord=null,this._svgDispatcherMap=null,this._svgGroup.removeAll(),this._svgMapName=null}},a.prototype._updateController=function(e,t,r){var n=e.coordinateSystem,i=this._controller,o=this._controllerHost;o.zoomLimit=e.get("scaleLimit"),o.zoom=n.getZoom(),i.enable(e.get("roam")||!1);var s=e.mainType;function l(){var u={type:"geoRoam",componentType:s};return u[s+"Id"]=e.id,u}i.off("pan").on("pan",function(u){this._mouseDownFlag=!1,mo(o,u.dx,u.dy),r.dispatchAction($(l(),{dx:u.dx,dy:u.dy,animation:{duration:0}}))},this),i.off("zoom").on("zoom",function(u){this._mouseDownFlag=!1,So(o,u.scale,u.originX,u.originY),r.dispatchAction($(l(),{zoom:u.scale,originX:u.originX,originY:u.originY,animation:{duration:0}}))},this),i.setPointerChecker(function(u,v,c){return n.containPoint([v,c])&&!Ji(u,r,e)})},a.prototype.resetForLabelLayout=function(){this.group.traverse(function(e){var t=e.getTextContent();t&&(t.ignore=fc(t).ignore)})},a.prototype._updateMapSelectHandler=function(e,t,r,n){var i=this;t.off("mousedown"),t.off("click"),e.get("selectedMode")&&(t.on("mousedown",function(){i._mouseDownFlag=!0}),t.on("click",function(o){!i._mouseDownFlag||(i._mouseDownFlag=!1)}))},a}();function Ys(a,e,t,r){var n=r.getModel("itemStyle"),i=r.getModel(["emphasis","itemStyle"]),o=r.getModel(["blur","itemStyle"]),s=r.getModel(["select","itemStyle"]),l=oa(n),u=oa(i),v=oa(s),c=oa(o),h=a.data;if(h){var f=h.getItemVisual(t,"style"),p=h.getItemVisual(t,"decal");a.isVisualEncodedByVisualMap&&f.fill&&(l.fill=f.fill),p&&(l.decal=Qi(p,a.api))}e.setStyle(l),e.style.strokeNoScale=!0,e.ensureState("emphasis").style=u,e.ensureState("select").style=v,e.ensureState("blur").style=c,fr(e)}function Xs(a,e,t,r,n,i,o){var s=a.data,l=a.isGeo,u=s&&isNaN(s.get(s.mapDimension("value"),i)),v=s&&s.getItemLayout(i);if(l||u||v&&v.showLabel){var c=l?t:i,h=void 0;(!s||i>=0)&&(h=n);var f=o?{normal:{align:"center",verticalAlign:"middle"}}:null;re(e,Wt(r),{labelFetcher:h,labelDataIndex:c,defaultText:t},f);var p=e.getTextContent();if(p&&(fc(p).ignore=p.ignore,e.textConfig&&o)){var d=e.getBoundingRect().clone();e.textConfig.layoutRect=d,e.textConfig.position=[(o[0]-d.x)/d.width*100+"%",(o[1]-d.y)/d.height*100+"%"]}e.disableLabelAnimation=!0}else e.removeTextContent(),e.removeTextConfig(),e.disableLabelAnimation=null}function Zs(a,e,t,r,n,i){a.data?a.data.setItemGraphicEl(i,e):it(e).eventData={componentType:"geo",componentIndex:n.componentIndex,geoIndex:n.componentIndex,name:t,region:r&&r.option||{}}}function qs(a,e,t,r,n){a.data||bv({el:e,componentModel:n,itemName:t,itemTooltipOption:r.get("tooltip")})}function Ks(a,e,t,r,n){e.highDownSilentOnTouch=!!n.get("selectedMode");var i=r.getModel("emphasis"),o=i.get("focus");return mt(e,o,i.get("blurScope"),i.get("disabled")),a.isGeo&&_f(e,n,t),o}function js(a,e,t){var r=[],n;function i(){n=[]}function o(){n.length&&(r.push(n),n=[])}var s=e({polygonStart:i,polygonEnd:o,lineStart:i,lineEnd:o,point:function(l,u){isFinite(l)&&isFinite(u)&&n.push([l,u])},sphere:function(){}});return!t&&s.polygonStart(),D(a,function(l){s.lineStart();for(var u=0;u<l.length;u++)s.point(l[u][0],l[u][1]);s.lineEnd()}),!t&&s.polygonEnd(),r}const pc=Bg;var Fg=function(a){z(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,r,n,i){if(!(i&&i.type==="mapToggleSelect"&&i.from===this.uid)){var o=this.group;if(o.removeAll(),!t.getHostGeoModel()){if(this._mapDraw&&i&&i.type==="geoRoam"&&this._mapDraw.resetForLabelLayout(),i&&i.type==="geoRoam"&&i.componentType==="series"&&i.seriesId===t.id){var s=this._mapDraw;s&&o.add(s.group)}else if(t.needsDrawMap){var s=this._mapDraw||new pc(n);o.add(s.group),s.draw(t,r,n,this,i),this._mapDraw=s}else this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;t.get("showLegendSymbol")&&r.getComponent("legend")&&this._renderSymbols(t,r,n)}}},e.prototype.remove=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null,this.group.removeAll()},e.prototype.dispose=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null},e.prototype._renderSymbols=function(t,r,n){var i=t.originalData,o=this.group;i.each(i.mapDimension("value"),function(s,l){if(!isNaN(s)){var u=i.getItemLayout(l);if(!(!u||!u.point)){var v=u.point,c=u.offset,h=new Xe({style:{fill:t.getData().getVisual("style").fill},shape:{cx:v[0]+c*9,cy:v[1],r:3},silent:!0,z2:8+(c?0:Kr+1)});if(!c){var f=t.mainSeries.getData(),p=i.getName(l),d=f.indexOfName(p),g=i.getItemModel(l),y=g.getModel("label"),m=f.getItemGraphicEl(d);re(h,Wt(g),{labelFetcher:{getFormattedLabel:function(S,x){return t.getFormattedLabel(d,x)}},defaultText:p}),h.disableLabelAnimation=!0,y.get("position")||h.setTextConfig({position:"bottom"}),m.onHoverStateChange=function(S){Av(h,S)}}o.add(h)}}})},e.type="map",e}(St);const Hg=Fg;var Wg=function(a){z(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.needsDrawMap=!1,t.seriesGroup=[],t.getTooltipPosition=function(r){if(r!=null){var n=this.getData().getName(r),i=this.coordinateSystem,o=i.getRegion(n);return o&&i.dataToPoint(o.getCenter())}},t}return e.prototype.getInitialData=function(t){for(var r=qr(this,{coordDimensions:["value"],encodeDefaulter:st(Tv,this)}),n=nt(),i=[],o=0,s=r.count();o<s;o++){var l=r.getName(o);n.set(l,!0)}var u=Se.load(this.getMapType(),this.option.nameMap,this.option.nameProperty);return D(u.regions,function(v){var c=v.name;n.get(c)||i.push(c)}),r.appendValues([],i),r},e.prototype.getHostGeoModel=function(){var t=this.option.geoIndex;return t!=null?this.ecModel.getComponent("geo",t):null},e.prototype.getMapType=function(){return(this.getHostGeoModel()||this).option.map},e.prototype.getRawValue=function(t){var r=this.getData();return r.get(r.mapDimension("value"),t)},e.prototype.getRegionModel=function(t){var r=this.getData();return r.getItemModel(r.indexOfName(t))},e.prototype.formatTooltip=function(t,r,n){for(var i=this.getData(),o=this.getRawValue(t),s=i.getName(t),l=this.seriesGroup,u=[],v=0;v<l.length;v++){var c=l[v].originalData.indexOfName(s),h=i.mapDimension("value");isNaN(l[v].originalData.get(h,c))||u.push(l[v].name)}return kt("section",{header:u.join(", "),noHeader:!u.length,blocks:[kt("nameValue",{name:s,value:o})]})},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.getLegendIcon=function(t){var r=t.icon||"roundRect",n=jt(r,0,0,t.itemWidth,t.itemHeight,t.itemStyle.fill);return n.setStyle(t.itemStyle),n.style.stroke="none",r.indexOf("empty")>-1&&(n.style.stroke=n.style.fill,n.style.fill="#fff",n.style.lineWidth=2),n},e.type="series.map",e.dependencies=["geo"],e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:null,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{areaColor:"rgba(255,215,0,0.8)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},nameProperty:"name"},e}(bt);const $g=Wg;function Ug(a,e){var t={};return D(a,function(r){r.each(r.mapDimension("value"),function(n,i){var o="ec-"+r.getName(i);t[o]=t[o]||[],isNaN(n)||t[o].push(n)})}),a[0].map(a[0].mapDimension("value"),function(r,n){for(var i="ec-"+a[0].getName(n),o=0,s=1/0,l=-1/0,u=t[i].length,v=0;v<u;v++)s=Math.min(s,t[i][v]),l=Math.max(l,t[i][v]),o+=t[i][v];var c;return e==="min"?c=s:e==="max"?c=l:e==="average"?c=o/u:c=o,u===0?NaN:c})}function Yg(a){var e={};a.eachSeriesByType("map",function(t){var r=t.getHostGeoModel(),n=r?"o"+r.id:"i"+t.getMapType();(e[n]=e[n]||[]).push(t)}),D(e,function(t,r){for(var n=Ug(F(t,function(o){return o.getData()}),t[0].get("mapValueCalculation")),i=0;i<t.length;i++)t[i].originalData=t[i].getData();for(var i=0;i<t.length;i++)t[i].seriesGroup=t,t[i].needsDrawMap=i===0&&!t[i].getHostGeoModel(),t[i].setData(n.cloneShallow()),t[i].mainSeries=t[0]})}function Xg(a){var e={};a.eachSeriesByType("map",function(t){var r=t.getMapType();if(!(t.getHostGeoModel()||e[r])){var n={};D(t.seriesGroup,function(o){var s=o.coordinateSystem,l=o.originalData;o.get("showLegendSymbol")&&a.getComponent("legend")&&l.each(l.mapDimension("value"),function(u,v){var c=l.getName(v),h=s.getRegion(c);if(!(!h||isNaN(u))){var f=n[c]||0,p=s.dataToPoint(h.getCenter());n[c]=f+1,l.setItemLayout(v,{point:p,offset:f})}})});var i=t.getData();i.each(function(o){var s=i.getName(o),l=i.getItemLayout(o)||{};l.showLabel=!n[s],i.setItemLayout(o,l)}),e[r]=!0}})}var Js=Gr,Zg=function(a){z(e,a);function e(t){var r=a.call(this)||this;return r.type="view",r.dimensions=["x","y"],r._roamTransformable=new Ir,r._rawTransformable=new Ir,r.name=t,r}return e.prototype.setBoundingRect=function(t,r,n,i){return this._rect=new yt(t,r,n,i),this._rect},e.prototype.getBoundingRect=function(){return this._rect},e.prototype.setViewRect=function(t,r,n,i){this._transformTo(t,r,n,i),this._viewRect=new yt(t,r,n,i)},e.prototype._transformTo=function(t,r,n,i){var o=this.getBoundingRect(),s=this._rawTransformable;s.transform=o.calculateTransform(new yt(t,r,n,i));var l=s.parent;s.parent=null,s.decomposeTransform(),s.parent=l,this._updateTransform()},e.prototype.setCenter=function(t){!t||(this._center=t,this._updateCenterAndZoom())},e.prototype.setZoom=function(t){t=t||1;var r=this.zoomLimit;r&&(r.max!=null&&(t=Math.min(r.max,t)),r.min!=null&&(t=Math.max(r.min,t))),this._zoom=t,this._updateCenterAndZoom()},e.prototype.getDefaultCenter=function(){var t=this.getBoundingRect(),r=t.x+t.width/2,n=t.y+t.height/2;return[r,n]},e.prototype.getCenter=function(){return this._center||this.getDefaultCenter()},e.prototype.getZoom=function(){return this._zoom||1},e.prototype.getRoamTransform=function(){return this._roamTransformable.getLocalTransform()},e.prototype._updateCenterAndZoom=function(){var t=this._rawTransformable.getLocalTransform(),r=this._roamTransformable,n=this.getDefaultCenter(),i=this.getCenter(),o=this.getZoom();i=Gr([],i,t),n=Gr([],n,t),r.originX=i[0],r.originY=i[1],r.x=n[0]-i[0],r.y=n[1]-i[1],r.scaleX=r.scaleY=o,this._updateTransform()},e.prototype._updateTransform=function(){var t=this._roamTransformable,r=this._rawTransformable;r.parent=t,t.updateTransform(),r.updateTransform(),wf(this.transform||(this.transform=[]),r.transform||yr()),this._rawTransform=r.getLocalTransform(),this.invTransform=this.invTransform||[],fv(this.invTransform,this.transform),this.decomposeTransform()},e.prototype.getTransformInfo=function(){var t=this._rawTransformable,r=this._roamTransformable,n=new Ir;return n.transform=r.transform,n.decomposeTransform(),{roam:{x:n.x,y:n.y,scaleX:n.scaleX,scaleY:n.scaleY},raw:{x:t.x,y:t.y,scaleX:t.scaleX,scaleY:t.scaleY}}},e.prototype.getViewRect=function(){return this._viewRect},e.prototype.getViewRectAfterRoam=function(){var t=this.getBoundingRect().clone();return t.applyTransform(this.transform),t},e.prototype.dataToPoint=function(t,r,n){var i=r?this._rawTransform:this.transform;return n=n||[],i?Js(n,t,i):Mt(n,t)},e.prototype.pointToData=function(t){var r=this.invTransform;return r?Js([],t,r):[t[0],t[1]]},e.prototype.convertToPixel=function(t,r,n){var i=Qs(r);return i===this?i.dataToPoint(n):null},e.prototype.convertFromPixel=function(t,r,n){var i=Qs(r);return i===this?i.pointToData(n):null},e.prototype.containPoint=function(t){return this.getViewRectAfterRoam().contain(t[0],t[1])},e.dimensions=["x","y"],e}(Ir);function Qs(a){var e=a.seriesModel;return e?e.coordinateSystem:null}const ea=Zg;var qg={geoJSON:{aspectScale:.75,invertLongitute:!0},geoSVG:{aspectScale:1,invertLongitute:!1}},dc=["lng","lat"],gc=function(a){z(e,a);function e(t,r,n){var i=a.call(this,t)||this;i.dimensions=dc,i.type="geo",i._nameCoordMap=nt(),i.map=r;var o=n.projection,s=Se.load(r,n.nameMap,n.nameProperty),l=Se.getGeoResource(r);i.resourceType=l?l.type:null;var u=i.regions=s.regions,v=qg[l.type];i._regionsMap=s.regionsMap,i.regions=s.regions,i.projection=o;var c;if(o)for(var h=0;h<u.length;h++){var f=u[h].getBoundingRect(o);c=c||f.clone(),c.union(f)}else c=s.boundingRect;return i.setBoundingRect(c.x,c.y,c.width,c.height),i.aspectScale=o?1:_t(n.aspectScale,v.aspectScale),i._invertLongitute=o?!1:v.invertLongitute,i}return e.prototype._transformTo=function(t,r,n,i){var o=this.getBoundingRect(),s=this._invertLongitute;o=o.clone(),s&&(o.y=-o.y-o.height);var l=this._rawTransformable;l.transform=o.calculateTransform(new yt(t,r,n,i));var u=l.parent;l.parent=null,l.decomposeTransform(),l.parent=u,s&&(l.scaleY=-l.scaleY),this._updateTransform()},e.prototype.getRegion=function(t){return this._regionsMap.get(t)},e.prototype.getRegionByCoord=function(t){for(var r=this.regions,n=0;n<r.length;n++){var i=r[n];if(i.type==="geoJSON"&&i.contain(t))return r[n]}},e.prototype.addGeoCoord=function(t,r){this._nameCoordMap.set(t,r)},e.prototype.getGeoCoord=function(t){var r=this._regionsMap.get(t);return this._nameCoordMap.get(t)||r&&r.getCenter()},e.prototype.dataToPoint=function(t,r,n){if(tt(t)&&(t=this.getGeoCoord(t)),t){var i=this.projection;return i&&(t=i.project(t)),t&&this.projectedToPoint(t)}},e.prototype.pointToData=function(t){var r=this.projection;return r&&(t=r.unproject(t)),t&&this.pointToProjected(t)},e.prototype.pointToProjected=function(t){return a.prototype.pointToData.call(this,t)},e.prototype.projectedToPoint=function(t,r,n){return a.prototype.dataToPoint.call(this,t,r,n)},e.prototype.convertToPixel=function(t,r,n){var i=tl(r);return i===this?i.dataToPoint(n):null},e.prototype.convertFromPixel=function(t,r,n){var i=tl(r);return i===this?i.pointToData(n):null},e}(ea);ae(gc,ea);function tl(a){var e=a.geoModel,t=a.seriesModel;return e?e.coordinateSystem:t?t.coordinateSystem||(t.getReferringComponents("geo",mr).models[0]||{}).coordinateSystem:null}const el=gc;function rl(a,e){var t=a.get("boundingCoords");if(t!=null){var r=t[0],n=t[1];if(isFinite(r[0])&&isFinite(r[1])&&isFinite(n[0])&&isFinite(n[1])){var i=this.projection;if(i){var o=r[0],s=r[1],l=n[0],u=n[1];r=[1/0,1/0],n=[-1/0,-1/0];var v=function(_,b,A,T){for(var I=A-_,C=T-b,E=0;E<=100;E++){var V=E/100,M=i.project([_+I*V,b+C*V]);pv(r,r,M),dv(n,n,M)}};v(o,s,l,s),v(l,s,l,u),v(l,u,o,u),v(o,u,l,s)}this.setBoundingRect(r[0],r[1],n[0]-r[0],n[1]-r[1])}}var c=this.getBoundingRect(),h=a.get("layoutCenter"),f=a.get("layoutSize"),p=e.getWidth(),d=e.getHeight(),g=c.width/c.height*this.aspectScale,y=!1,m,S;h&&f&&(m=[H(h[0],p),H(h[1],d)],S=H(f,Math.min(p,d)),!isNaN(m[0])&&!isNaN(m[1])&&!isNaN(S)&&(y=!0));var x;if(y)x={},g>1?(x.width=S,x.height=S/g):(x.height=S,x.width=S*g),x.y=m[1]-x.height/2,x.x=m[0]-x.width/2;else{var w=a.getBoxLayoutParams();w.aspect=g,x=ne(w,{width:p,height:d})}this.setViewRect(x.x,x.y,x.width,x.height),this.setCenter(a.get("center")),this.setZoom(a.get("zoom"))}function Kg(a,e){D(e.get("geoCoord"),function(t,r){a.addGeoCoord(r,t)})}var jg=function(){function a(){this.dimensions=dc}return a.prototype.create=function(e,t){var r=[];function n(o){return{nameProperty:o.get("nameProperty"),aspectScale:o.get("aspectScale"),projection:o.get("projection")}}e.eachComponent("geo",function(o,s){var l=o.get("map"),u=new el(l+s,l,$({nameMap:o.get("nameMap")},n(o)));u.zoomLimit=o.get("scaleLimit"),r.push(u),o.coordinateSystem=u,u.model=o,u.resize=rl,u.resize(o,t)}),e.eachSeries(function(o){var s=o.get("coordinateSystem");if(s==="geo"){var l=o.get("geoIndex")||0;o.coordinateSystem=r[l]}});var i={};return e.eachSeriesByType("map",function(o){if(!o.getHostGeoModel()){var s=o.getMapType();i[s]=i[s]||[],i[s].push(o)}}),D(i,function(o,s){var l=F(o,function(v){return v.get("nameMap")}),u=new el(s,s,$({nameMap:to(l)},n(o[0])));u.zoomLimit=Ot.apply(null,F(o,function(v){return v.get("scaleLimit")})),r.push(u),u.resize=rl,u.resize(o[0],t),D(o,function(v){v.coordinateSystem=u,Kg(u,v)})}),r},a.prototype.getFilledRegions=function(e,t,r,n){for(var i=(e||[]).slice(),o=nt(),s=0;s<i.length;s++)o.set(i[s].name,i[s]);var l=Se.load(t,r,n);return D(l.regions,function(u){var v=u.name;!o.get(v)&&i.push({name:v})}),i},a}(),Jg=new jg;const yc=Jg;var Qg=function(a){z(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,r,n){var i=Se.getGeoResource(t.map);if(i&&i.type==="geoJSON"){var o=t.itemStyle=t.itemStyle||{};"color"in o||(o.color="#eee")}this.mergeDefaultAndTheme(t,n),rn(t,"label",["show"])},e.prototype.optionUpdated=function(){var t=this,r=this.option;r.regions=yc.getFilledRegions(r.regions,r.map,r.nameMap,r.nameProperty);var n={};this._optionModelMap=Iv(r.regions||[],function(i,o){var s=o.name;return s&&(i.set(s,new Jt(o,t,t.ecModel)),o.selected&&(n[s]=!0)),i},nt()),r.selectedMap||(r.selectedMap=n)},e.prototype.getRegionModel=function(t){return this._optionModelMap.get(t)||new Jt(null,this,this.ecModel)},e.prototype.getFormattedLabel=function(t,r){var n=this.getRegionModel(t),i=r==="normal"?n.get(["label","formatter"]):n.get(["emphasis","label","formatter"]),o={name:t};if(ot(i))return o.status=r,i(o);if(tt(i))return i.replace("{a}",t!=null?t:"")},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.select=function(t){var r=this.option,n=r.selectedMode;if(!!n){n!=="multiple"&&(r.selectedMap=null);var i=r.selectedMap||(r.selectedMap={});i[t]=!0}},e.prototype.unSelect=function(t){var r=this.option.selectedMap;r&&(r[t]=!1)},e.prototype.toggleSelected=function(t){this[this.isSelected(t)?"unSelect":"select"](t)},e.prototype.isSelected=function(t){var r=this.option.selectedMap;return!!(r&&r[t])},e.type="geo",e.layoutMode="box",e.defaultOption={z:0,show:!0,left:"center",top:"center",aspectScale:null,silent:!1,map:"",boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},regions:[]},e}(Nt);const ty=Qg;function al(a,e){return a.pointToProjected?a.pointToProjected(e):a.pointToData(e)}function _o(a,e,t){var r=a.getZoom(),n=a.getCenter(),i=e.zoom,o=a.projectedToPoint?a.projectedToPoint(n):a.dataToPoint(n);if(e.dx!=null&&e.dy!=null&&(o[0]-=e.dx,o[1]-=e.dy,a.setCenter(al(a,o))),i!=null){if(t){var s=t.min||0,l=t.max||1/0;i=Math.max(Math.min(r*i,l),s)/r}a.scaleX*=i,a.scaleY*=i;var u=(e.originX-a.x)*(i-1),v=(e.originY-a.y)*(i-1);a.x-=u,a.y-=v,a.updateTransform(),a.setCenter(al(a,o)),a.setZoom(i*r)}return{center:a.getCenter(),zoom:a.getZoom()}}var ey=function(a){z(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.focusBlurEnabled=!0,t}return e.prototype.init=function(t,r){this._api=r},e.prototype.render=function(t,r,n,i){if(this._model=t,!t.get("show")){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;return}this._mapDraw||(this._mapDraw=new pc(n));var o=this._mapDraw;o.draw(t,r,n,this,i),o.group.on("click",this._handleRegionClick,this),o.group.silent=t.get("silent"),this.group.add(o.group),this.updateSelectStatus(t,r,n)},e.prototype._handleRegionClick=function(t){var r;bf(t.target,function(n){return(r=it(n).eventData)!=null},!0),r&&this._api.dispatchAction({type:"geoToggleSelect",geoId:this._model.id,name:r.name})},e.prototype.updateSelectStatus=function(t,r,n){var i=this;this._mapDraw.group.traverse(function(o){var s=it(o).eventData;if(s)return i._model.isSelected(s.name)?n.enterSelect(o):n.leaveSelect(o),!0})},e.prototype.findHighDownDispatchers=function(t){return this._mapDraw&&this._mapDraw.findHighDownDispatchers(t,this._model)},e.prototype.dispose=function(){this._mapDraw&&this._mapDraw.remove()},e.type="geo",e}(Yt);const ry=ey;function ay(a,e,t){Se.registerMap(a,e,t)}function mc(a){a.registerCoordinateSystem("geo",yc),a.registerComponentModel(ty),a.registerComponentView(ry),a.registerImpl("registerMap",ay),a.registerImpl("getMap",function(t){return Se.getMapForUser(t)});function e(t,r){r.update="geo:updateSelectStatus",a.registerAction(r,function(n,i){var o={},s=[];return i.eachComponent({mainType:"geo",query:n},function(l){l[t](n.name);var u=l.coordinateSystem;D(u.regions,function(c){o[c.name]=l.isSelected(c.name)||!1});var v=[];D(o,function(c,h){o[h]&&v.push(h)}),s.push({geoIndex:l.componentIndex,name:v})}),{selected:o,allSelected:s,name:n.name}})}e("toggleSelected",{type:"geoToggleSelect",event:"geoselectchanged"}),e("select",{type:"geoSelect",event:"geoselected"}),e("unSelect",{type:"geoUnSelect",event:"geounselected"}),a.registerAction({type:"geoRoam",event:"geoRoam",update:"updateTransform"},function(t,r){var n=t.componentType||"series";r.eachComponent({mainType:n,query:t},function(i){var o=i.coordinateSystem;if(o.type==="geo"){var s=_o(o,t,i.get("scaleLimit"));i.setCenter&&i.setCenter(s.center),i.setZoom&&i.setZoom(s.zoom),n==="series"&&D(i.seriesGroup,function(l){l.setCenter(s.center),l.setZoom(s.zoom)})}})})}function ny(a){K(mc),a.registerChartView(Hg),a.registerSeriesModel($g),a.registerLayout(Xg),a.registerProcessor(a.PRIORITY.PROCESSOR.STATISTIC,Yg),Af("map",a.registerAction)}function iy(a){var e=a;e.hierNode={defaultAncestor:null,ancestor:e,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var t=[e],r,n;r=t.pop();)if(n=r.children,r.isExpand&&n.length)for(var i=n.length,o=i-1;o>=0;o--){var s=n[o];s.hierNode={defaultAncestor:null,ancestor:s,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},t.push(s)}}function oy(a,e){var t=a.isExpand?a.children:[],r=a.parentNode.children,n=a.hierNode.i?r[a.hierNode.i-1]:null;if(t.length){uy(a);var i=(t[0].hierNode.prelim+t[t.length-1].hierNode.prelim)/2;n?(a.hierNode.prelim=n.hierNode.prelim+e(a,n),a.hierNode.modifier=a.hierNode.prelim-i):a.hierNode.prelim=i}else n&&(a.hierNode.prelim=n.hierNode.prelim+e(a,n));a.parentNode.hierNode.defaultAncestor=vy(a,n,a.parentNode.hierNode.defaultAncestor||r[0],e)}function sy(a){var e=a.hierNode.prelim+a.parentNode.hierNode.modifier;a.setLayout({x:e},!0),a.hierNode.modifier+=a.parentNode.hierNode.modifier}function nl(a){return arguments.length?a:fy}function Lr(a,e){return a-=Math.PI/2,{x:e*Math.cos(a),y:e*Math.sin(a)}}function ly(a,e){return ne(a.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function uy(a){for(var e=a.children,t=e.length,r=0,n=0;--t>=0;){var i=e[t];i.hierNode.prelim+=r,i.hierNode.modifier+=r,n+=i.hierNode.change,r+=i.hierNode.shift+n}}function vy(a,e,t,r){if(e){for(var n=a,i=a,o=i.parentNode.children[0],s=e,l=n.hierNode.modifier,u=i.hierNode.modifier,v=o.hierNode.modifier,c=s.hierNode.modifier;s=En(s),i=Rn(i),s&&i;){n=En(n),o=Rn(o),n.hierNode.ancestor=a;var h=s.hierNode.prelim+c-i.hierNode.prelim-u+r(s,i);h>0&&(hy(cy(s,a,t),a,h),u+=h,l+=h),c+=s.hierNode.modifier,u+=i.hierNode.modifier,l+=n.hierNode.modifier,v+=o.hierNode.modifier}s&&!En(n)&&(n.hierNode.thread=s,n.hierNode.modifier+=c-l),i&&!Rn(o)&&(o.hierNode.thread=i,o.hierNode.modifier+=u-v,t=a)}return t}function En(a){var e=a.children;return e.length&&a.isExpand?e[e.length-1]:a.hierNode.thread}function Rn(a){var e=a.children;return e.length&&a.isExpand?e[0]:a.hierNode.thread}function cy(a,e,t){return a.hierNode.ancestor.parentNode===e.parentNode?a.hierNode.ancestor:t}function hy(a,e,t){var r=t/(e.hierNode.i-a.hierNode.i);e.hierNode.change-=r,e.hierNode.shift+=t,e.hierNode.modifier+=t,e.hierNode.prelim+=t,a.hierNode.change+=r}function fy(a,e){return a.parentNode===e.parentNode?1:2}var py=function(){function a(){this.parentPoint=[],this.childPoints=[]}return a}(),dy=function(a){z(e,a);function e(t){return a.call(this,t)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new py},e.prototype.buildPath=function(t,r){var n=r.childPoints,i=n.length,o=r.parentPoint,s=n[0],l=n[i-1];if(i===1){t.moveTo(o[0],o[1]),t.lineTo(s[0],s[1]);return}var u=r.orient,v=u==="TB"||u==="BT"?0:1,c=1-v,h=H(r.forkPosition,1),f=[];f[v]=o[v],f[c]=o[c]+(l[c]-o[c])*h,t.moveTo(o[0],o[1]),t.lineTo(f[0],f[1]),t.moveTo(s[0],s[1]),f[v]=s[v],t.lineTo(f[0],f[1]),f[v]=l[v],t.lineTo(f[0],f[1]),t.lineTo(l[0],l[1]);for(var p=1;p<i-1;p++){var d=n[p];t.moveTo(d[0],d[1]),f[v]=d[v],t.lineTo(f[0],f[1])}},e}(It),gy=function(a){z(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t._mainGroup=new Z,t}return e.prototype.init=function(t,r){this._controller=new en(r.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},e.prototype.render=function(t,r,n){var i=t.getData(),o=t.layoutInfo,s=this._mainGroup,l=t.get("layout");l==="radial"?(s.x=o.x+o.width/2,s.y=o.y+o.height/2):(s.x=o.x,s.y=o.y),this._updateViewCoordSys(t),this._updateController(t,r,n);var u=this._data;i.diff(u).add(function(v){il(i,v)&&ol(i,v,null,s,t)}).update(function(v,c){var h=u.getItemGraphicEl(c);if(!il(i,v)){h&&ll(u,c,h,s,t);return}ol(i,v,h,s,t)}).remove(function(v){var c=u.getItemGraphicEl(v);c&&ll(u,v,c,s,t)}).execute(),this._nodeScaleRatio=t.get("nodeScaleRatio"),this._updateNodeAndLinkScale(t),t.get("expandAndCollapse")===!0&&i.eachItemGraphicEl(function(v,c){v.off("click").on("click",function(){n.dispatchAction({type:"treeExpandAndCollapse",seriesId:t.id,dataIndex:c})})}),this._data=i},e.prototype._updateViewCoordSys=function(t){var r=t.getData(),n=[];r.each(function(v){var c=r.getItemLayout(v);c&&!isNaN(c.x)&&!isNaN(c.y)&&n.push([+c.x,+c.y])});var i=[],o=[];an(n,i,o);var s=this._min,l=this._max;o[0]-i[0]===0&&(i[0]=s?s[0]:i[0]-1,o[0]=l?l[0]:o[0]+1),o[1]-i[1]===0&&(i[1]=s?s[1]:i[1]-1,o[1]=l?l[1]:o[1]+1);var u=t.coordinateSystem=new ea;u.zoomLimit=t.get("scaleLimit"),u.setBoundingRect(i[0],i[1],o[0]-i[0],o[1]-i[1]),u.setCenter(t.get("center")),u.setZoom(t.get("zoom")),this.group.attr({x:u.x,y:u.y,scaleX:u.scaleX,scaleY:u.scaleY}),this._min=i,this._max=o},e.prototype._updateController=function(t,r,n){var i=this,o=this._controller,s=this._controllerHost,l=this.group;o.setPointerChecker(function(u,v,c){var h=l.getBoundingRect();return h.applyTransform(l.transform),h.contain(v,c)&&!Ji(u,n,t)}),o.enable(t.get("roam")),s.zoomLimit=t.get("scaleLimit"),s.zoom=t.coordinateSystem.getZoom(),o.off("pan").off("zoom").on("pan",function(u){mo(s,u.dx,u.dy),n.dispatchAction({seriesId:t.id,type:"treeRoam",dx:u.dx,dy:u.dy})}).on("zoom",function(u){So(s,u.scale,u.originX,u.originY),n.dispatchAction({seriesId:t.id,type:"treeRoam",zoom:u.scale,originX:u.originX,originY:u.originY}),i._updateNodeAndLinkScale(t),n.updateLabelLayout()})},e.prototype._updateNodeAndLinkScale=function(t){var r=t.getData(),n=this._getNodeGlobalScale(t);r.eachItemGraphicEl(function(i,o){i.setSymbolScale(n)})},e.prototype._getNodeGlobalScale=function(t){var r=t.coordinateSystem;if(r.type!=="view")return 1;var n=this._nodeScaleRatio,i=r.scaleX||1,o=r.getZoom(),s=(o-1)*n+1;return s/i},e.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype.remove=function(){this._mainGroup.removeAll(),this._data=null},e.type="tree",e}(St);function il(a,e){var t=a.getItemLayout(e);return t&&!isNaN(t.x)&&!isNaN(t.y)}function ol(a,e,t,r,n){var i=!t,o=a.tree.getNodeByDataIndex(e),s=o.getModel(),l=o.getVisual("style").fill,u=o.isExpand===!1&&o.children.length!==0?l:"#fff",v=a.tree.root,c=o.parentNode===v?o:o.parentNode||o,h=a.getItemGraphicEl(c.dataIndex),f=c.getLayout(),p=h?{x:h.__oldX,y:h.__oldY,rawX:h.__radialOldRawX,rawY:h.__radialOldRawY}:f,d=o.getLayout();i?(t=new Dv(a,e,null,{symbolInnerColor:u,useNameLabel:!0}),t.x=p.x,t.y=p.y):t.updateData(a,e,null,{symbolInnerColor:u,useNameLabel:!0}),t.__radialOldRawX=t.__radialRawX,t.__radialOldRawY=t.__radialRawY,t.__radialRawX=d.rawX,t.__radialRawY=d.rawY,r.add(t),a.setItemGraphicEl(e,t),t.__oldX=t.x,t.__oldY=t.y,vt(t,{x:d.x,y:d.y},n);var g=t.getSymbolPath();if(n.get("layout")==="radial"){var y=v.children[0],m=y.getLayout(),S=y.children.length,x=void 0,w=void 0;if(d.x===m.x&&o.isExpand===!0){var _={x:(y.children[0].getLayout().x+y.children[S-1].getLayout().x)/2,y:(y.children[0].getLayout().y+y.children[S-1].getLayout().y)/2};x=Math.atan2(_.y-m.y,_.x-m.x),x<0&&(x=Math.PI*2+x),w=_.x<m.x,w&&(x=x-Math.PI)}else x=Math.atan2(d.y-m.y,d.x-m.x),x<0&&(x=Math.PI*2+x),o.children.length===0||o.children.length!==0&&o.isExpand===!1?(w=d.x<m.x,w&&(x=x-Math.PI)):(w=d.x>m.x,w||(x=x-Math.PI));var b=w?"left":"right",A=s.getModel("label"),T=A.get("rotate"),I=T*(Math.PI/180),C=g.getTextContent();C&&(g.setTextConfig({position:A.get("position")||b,rotation:T==null?-x:I,origin:"center"}),C.setStyle("verticalAlign","middle"))}var E=s.get(["emphasis","focus"]),V=E==="ancestor"?o.getAncestorsIndices():E==="descendant"?o.getDescendantIndices():null;V&&(it(t).focus=V),yy(n,o,v,t,p,f,d,r),t.__edge&&(t.onHoverStateChange=function(M){if(M!=="blur"){var P=o.parentNode&&a.getItemGraphicEl(o.parentNode.dataIndex);P&&P.hoverState===Tf||Av(t.__edge,M)}})}function yy(a,e,t,r,n,i,o,s){var l=e.getModel(),u=a.get("edgeShape"),v=a.get("layout"),c=a.getOrient(),h=a.get(["lineStyle","curveness"]),f=a.get("edgeForkPosition"),p=l.getModel("lineStyle").getLineStyle(),d=r.__edge;if(u==="curve")e.parentNode&&e.parentNode!==t&&(d||(d=r.__edge=new Cv({shape:Ri(v,c,h,n,n)})),vt(d,{shape:Ri(v,c,h,i,o)},a));else if(u==="polyline"&&v==="orthogonal"&&e!==t&&e.children&&e.children.length!==0&&e.isExpand===!0){for(var g=e.children,y=[],m=0;m<g.length;m++){var S=g[m].getLayout();y.push([S.x,S.y])}d||(d=r.__edge=new dy({shape:{parentPoint:[o.x,o.y],childPoints:[[o.x,o.y]],orient:c,forkPosition:f}})),vt(d,{shape:{parentPoint:[o.x,o.y],childPoints:y}},a)}d&&(d.useStyle(Q({strokeNoScale:!0,fill:null},p)),Ht(d,l,"lineStyle"),fr(d),s.add(d))}function sl(a,e,t,r,n){var i=e.tree.root,o=Sc(i,a),s=o.source,l=o.sourceLayout,u=e.getItemGraphicEl(a.dataIndex);if(!!u){var v=e.getItemGraphicEl(s.dataIndex),c=v.__edge,h=u.__edge||(s.isExpand===!1||s.children.length===1?c:void 0),f=r.get("edgeShape"),p=r.get("layout"),d=r.get("orient"),g=r.get(["lineStyle","curveness"]);h&&(f==="curve"?Aa(h,{shape:Ri(p,d,g,l,l),style:{opacity:0}},r,{cb:function(){t.remove(h)},removeOpt:n}):f==="polyline"&&r.get("layout")==="orthogonal"&&Aa(h,{shape:{parentPoint:[l.x,l.y],childPoints:[[l.x,l.y]]},style:{opacity:0}},r,{cb:function(){t.remove(h)},removeOpt:n}))}}function Sc(a,e){for(var t=e.parentNode===a?e:e.parentNode||e,r;r=t.getLayout(),r==null;)t=t.parentNode===a?t:t.parentNode||t;return{source:t,sourceLayout:r}}function ll(a,e,t,r,n){var i=a.tree.getNodeByDataIndex(e),o=a.tree.root,s=Sc(o,i).sourceLayout,l={duration:n.get("animationDurationUpdate"),easing:n.get("animationEasingUpdate")};Aa(t,{x:s.x+1,y:s.y+1},n,{cb:function(){r.remove(t),a.setItemGraphicEl(e,null)},removeOpt:l}),t.fadeOut(null,a.hostModel,{fadeLabel:!0,animation:l}),i.children.forEach(function(u){sl(u,a,r,n,l)}),sl(i,a,r,n,l)}function Ri(a,e,t,r,n){var i,o,s,l,u,v,c,h;if(a==="radial"){u=r.rawX,c=r.rawY,v=n.rawX,h=n.rawY;var f=Lr(u,c),p=Lr(u,c+(h-c)*t),d=Lr(v,h+(c-h)*t),g=Lr(v,h);return{x1:f.x||0,y1:f.y||0,x2:g.x||0,y2:g.y||0,cpx1:p.x||0,cpy1:p.y||0,cpx2:d.x||0,cpy2:d.y||0}}else u=r.x,c=r.y,v=n.x,h=n.y,(e==="LR"||e==="RL")&&(i=u+(v-u)*t,o=c,s=v+(u-v)*t,l=h),(e==="TB"||e==="BT")&&(i=u,o=c+(h-c)*t,s=v,l=h+(c-h)*t);return{x1:u,y1:c,x2:v,y2:h,cpx1:i,cpy1:o,cpx2:s,cpy2:l}}const my=gy;var Kt=Dt();function xc(a){var e=a.mainData,t=a.datas;t||(t={main:e},a.datasAttr={main:"data"}),a.datas=a.mainData=null,_c(e,t,a),D(t,function(r){D(e.TRANSFERABLE_METHODS,function(n){r.wrapMethod(n,st(Sy,a))})}),e.wrapMethod("cloneShallow",st(_y,a)),D(e.CHANGABLE_METHODS,function(r){e.wrapMethod(r,st(xy,a))}),Or(t[e.dataType]===e)}function Sy(a,e){if(Ay(this)){var t=$({},Kt(this).datas);t[this.dataType]=e,_c(e,t,a)}else wo(e,this.dataType,Kt(this).mainData,a);return e}function xy(a,e){return a.struct&&a.struct.update(),e}function _y(a,e){return D(Kt(e).datas,function(t,r){t!==e&&wo(t.cloneShallow(),r,e,a)}),e}function wy(a){var e=Kt(this).mainData;return a==null||e==null?e:Kt(e).datas[a]}function by(){var a=Kt(this).mainData;return a==null?[{data:a}]:F(ft(Kt(a).datas),function(e){return{type:e,data:Kt(a).datas[e]}})}function Ay(a){return Kt(a).mainData===a}function _c(a,e,t){Kt(a).datas={},D(e,function(r,n){wo(r,n,a,t)})}function wo(a,e,t,r){Kt(t).datas[e]=a,Kt(a).mainData=t,a.dataType=e,r.struct&&(a[r.structAttr]=r.struct,r.struct[r.datasAttr[e]]=a),a.getLinkedData=wy,a.getLinkedDataAll=by}var Ty=function(){function a(e,t){this.depth=0,this.height=0,this.dataIndex=-1,this.children=[],this.viewChildren=[],this.isExpand=!1,this.name=e||"",this.hostTree=t}return a.prototype.isRemoved=function(){return this.dataIndex<0},a.prototype.eachNode=function(e,t,r){ot(e)&&(r=t,t=e,e=null),e=e||{},tt(e)&&(e={order:e});var n=e.order||"preorder",i=this[e.attr||"children"],o;n==="preorder"&&(o=t.call(r,this));for(var s=0;!o&&s<i.length;s++)i[s].eachNode(e,t,r);n==="postorder"&&t.call(r,this)},a.prototype.updateDepthAndHeight=function(e){var t=0;this.depth=e;for(var r=0;r<this.children.length;r++){var n=this.children[r];n.updateDepthAndHeight(e+1),n.height>t&&(t=n.height)}this.height=t+1},a.prototype.getNodeById=function(e){if(this.getId()===e)return this;for(var t=0,r=this.children,n=r.length;t<n;t++){var i=r[t].getNodeById(e);if(i)return i}},a.prototype.contains=function(e){if(e===this)return!0;for(var t=0,r=this.children,n=r.length;t<n;t++){var i=r[t].contains(e);if(i)return i}},a.prototype.getAncestors=function(e){for(var t=[],r=e?this:this.parentNode;r;)t.push(r),r=r.parentNode;return t.reverse(),t},a.prototype.getAncestorsIndices=function(){for(var e=[],t=this;t;)e.push(t.dataIndex),t=t.parentNode;return e.reverse(),e},a.prototype.getDescendantIndices=function(){var e=[];return this.eachNode(function(t){e.push(t.dataIndex)}),e},a.prototype.getValue=function(e){var t=this.hostTree.data;return t.getStore().get(t.getDimensionIndex(e||"value"),this.dataIndex)},a.prototype.setLayout=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemLayout(this.dataIndex,e,t)},a.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},a.prototype.getModel=function(e){if(!(this.dataIndex<0)){var t=this.hostTree,r=t.data.getItemModel(this.dataIndex);return r.getModel(e)}},a.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},a.prototype.setVisual=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,e,t)},a.prototype.getVisual=function(e){return this.hostTree.data.getItemVisual(this.dataIndex,e)},a.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},a.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},a.prototype.getChildIndex=function(){if(this.parentNode){for(var e=this.parentNode.children,t=0;t<e.length;++t)if(e[t]===this)return t;return-1}return-1},a.prototype.isAncestorOf=function(e){for(var t=e.parentNode;t;){if(t===this)return!0;t=t.parentNode}return!1},a.prototype.isDescendantOf=function(e){return e!==this&&e.isAncestorOf(this)},a}(),Iy=function(){function a(e){this.type="tree",this._nodes=[],this.hostModel=e}return a.prototype.eachNode=function(e,t,r){this.root.eachNode(e,t,r)},a.prototype.getNodeByDataIndex=function(e){var t=this.data.getRawIndex(e);return this._nodes[t]},a.prototype.getNodeById=function(e){return this.root.getNodeById(e)},a.prototype.update=function(){for(var e=this.data,t=this._nodes,r=0,n=t.length;r<n;r++)t[r].dataIndex=-1;for(var r=0,n=e.count();r<n;r++)t[e.getRawIndex(r)].dataIndex=r},a.prototype.clearLayouts=function(){this.data.clearItemLayouts()},a.createTree=function(e,t,r){var n=new a(t),i=[],o=1;s(e);function s(v,c){var h=v.value;o=Math.max(o,W(h)?h.length:1),i.push(v);var f=new Ty(ge(v.name,""),n);c?Dy(f,c):n.root=f,n._nodes.push(f);var p=v.children;if(p)for(var d=0;d<p.length;d++)s(p[d],f)}n.root.updateDepthAndHeight(0);var l=eo(i,{coordDimensions:["value"],dimensionsCount:o}).dimensions,u=new Bt(l,t);return u.initData(i),r&&r(u),xc({mainData:u,struct:n,structAttr:"tree"}),n.update(),n},a}();function Dy(a,e){var t=e.children;a.parentNode!==e&&(t.push(a),a.parentNode=e)}const bo=Iy;function Wr(a,e,t){if(a&&Ut(e,a.type)>=0){var r=t.getData().tree.root,n=a.targetNode;if(tt(n)&&(n=r.getNodeById(n)),n&&r.contains(n))return{node:n};var i=a.targetNodeId;if(i!=null&&(n=r.getNodeById(i)))return{node:n}}}function wc(a){for(var e=[];a;)a=a.parentNode,a&&e.push(a);return e.reverse()}function Ao(a,e){var t=wc(a);return Ut(t,e)>=0}function pn(a,e){for(var t=[];a;){var r=a.dataIndex;t.push({name:a.name,dataIndex:r,value:e.getRawValue(r)}),a=a.parentNode}return t.reverse(),t}var Cy=function(a){z(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.hasSymbolVisual=!0,t.ignoreStyleOnData=!0,t}return e.prototype.getInitialData=function(t){var r={name:t.name,children:t.data},n=t.leaves||{},i=new Jt(n,this,this.ecModel),o=bo.createTree(r,this,s);function s(c){c.wrapMethod("getItemModel",function(h,f){var p=o.getNodeByDataIndex(f);return p&&p.children.length&&p.isExpand||(h.parentModel=i),h})}var l=0;o.eachNode("preorder",function(c){c.depth>l&&(l=c.depth)});var u=t.expandAndCollapse,v=u&&t.initialTreeDepth>=0?t.initialTreeDepth:l;return o.root.eachNode("preorder",function(c){var h=c.hostTree.data.getRawDataItem(c.dataIndex);c.isExpand=h&&h.collapsed!=null?!h.collapsed:c.depth<=v}),o.data},e.prototype.getOrient=function(){var t=this.get("orient");return t==="horizontal"?t="LR":t==="vertical"&&(t="TB"),t},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.formatTooltip=function(t,r,n){for(var i=this.getData().tree,o=i.root.children[0],s=i.getNodeByDataIndex(t),l=s.getValue(),u=s.name;s&&s!==o;)u=s.parentNode.name+"."+u,s=s.parentNode;return kt("nameValue",{name:u,value:l,noValue:isNaN(l)||l==null})},e.prototype.getDataParams=function(t){var r=a.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(t);return r.treeAncestors=pn(n,this),r},e.type="series.tree",e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},e}(bt);const My=Cy;function Ly(a,e,t){for(var r=[a],n=[],i;i=r.pop();)if(n.push(i),i.isExpand){var o=i.children;if(o.length)for(var s=0;s<o.length;s++)r.push(o[s])}for(;i=n.pop();)e(i,t)}function wr(a,e){for(var t=[a],r;r=t.pop();)if(e(r),r.isExpand){var n=r.children;if(n.length)for(var i=n.length-1;i>=0;i--)t.push(n[i])}}function Py(a,e){a.eachSeriesByType("tree",function(t){Vy(t,e)})}function Vy(a,e){var t=ly(a,e);a.layoutInfo=t;var r=a.get("layout"),n=0,i=0,o=null;r==="radial"?(n=2*Math.PI,i=Math.min(t.height,t.width)/2,o=nl(function(S,x){return(S.parentNode===x.parentNode?1:2)/S.depth})):(n=t.width,i=t.height,o=nl());var s=a.getData().tree.root,l=s.children[0];if(l){iy(s),Ly(l,oy,o),s.hierNode.modifier=-l.hierNode.prelim,wr(l,sy);var u=l,v=l,c=l;wr(l,function(S){var x=S.getLayout().x;x<u.getLayout().x&&(u=S),x>v.getLayout().x&&(v=S),S.depth>c.depth&&(c=S)});var h=u===v?1:o(u,v)/2,f=h-u.getLayout().x,p=0,d=0,g=0,y=0;if(r==="radial")p=n/(v.getLayout().x+h+f),d=i/(c.depth-1||1),wr(l,function(S){g=(S.getLayout().x+f)*p,y=(S.depth-1)*d;var x=Lr(g,y);S.setLayout({x:x.x,y:x.y,rawX:g,rawY:y},!0)});else{var m=a.getOrient();m==="RL"||m==="LR"?(d=i/(v.getLayout().x+h+f),p=n/(c.depth-1||1),wr(l,function(S){y=(S.getLayout().x+f)*d,g=m==="LR"?(S.depth-1)*p:n-(S.depth-1)*p,S.setLayout({x:g,y},!0)})):(m==="TB"||m==="BT")&&(p=n/(v.getLayout().x+h+f),d=i/(c.depth-1||1),wr(l,function(S){g=(S.getLayout().x+f)*p,y=m==="TB"?(S.depth-1)*d:i-(S.depth-1)*d,S.setLayout({x:g,y},!0)}))}}}function Ey(a){a.eachSeriesByType("tree",function(e){var t=e.getData(),r=t.tree;r.eachNode(function(n){var i=n.getModel(),o=i.getModel("itemStyle").getItemStyle(),s=t.ensureUniqueItemVisual(n.dataIndex,"style");$(s,o)})})}function Ry(a){a.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(e,t){t.eachComponent({mainType:"series",subType:"tree",query:e},function(r){var n=e.dataIndex,i=r.getData().tree,o=i.getNodeByDataIndex(n);o.isExpand=!o.isExpand})}),a.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},function(e,t){t.eachComponent({mainType:"series",subType:"tree",query:e},function(r){var n=r.coordinateSystem,i=_o(n,e);r.setCenter&&r.setCenter(i.center),r.setZoom&&r.setZoom(i.zoom)})})}function ky(a){a.registerChartView(my),a.registerSeriesModel(My),a.registerLayout(Py),a.registerVisual(Ey),Ry(a)}var ul=["treemapZoomToNode","treemapRender","treemapMove"];function Ny(a){for(var e=0;e<ul.length;e++)a.registerAction({type:ul[e],update:"updateView"},pr);a.registerAction({type:"treemapRootToNode",update:"updateView"},function(t,r){r.eachComponent({mainType:"series",subType:"treemap",query:t},n);function n(i,o){var s=["treemapZoomToNode","treemapRootToNode"],l=Wr(t,s,i);if(l){var u=i.getViewRoot();u&&(t.direction=Ao(u,l.node)?"rollUp":"drillDown"),i.resetViewRoot(l.node)}}})}function bc(a){var e=a.getData(),t=e.tree,r={};t.eachNode(function(n){for(var i=n;i&&i.depth>1;)i=i.parentNode;var o=wi(a.ecModel,i.name||i.dataIndex+"",r);n.setVisual("decal",o)})}var zy=function(a){z(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.preventUsingHoverLayer=!0,t}return e.prototype.getInitialData=function(t,r){var n={name:t.name,children:t.data};Ac(n);var i=t.levels||[],o=this.designatedVisualItemStyle={},s=new Jt({itemStyle:o},this,r);i=t.levels=Gy(i,r);var l=F(i||[],function(c){return new Jt(c,s,r)},this),u=bo.createTree(n,this,v);function v(c){c.wrapMethod("getItemModel",function(h,f){var p=u.getNodeByDataIndex(f),d=p?l[p.depth]:null;return h.parentModel=d||s,h})}return u.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.formatTooltip=function(t,r,n){var i=this.getData(),o=this.getRawValue(t),s=i.getName(t);return kt("nameValue",{name:s,value:o})},e.prototype.getDataParams=function(t){var r=a.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(t);return r.treeAncestors=pn(n,this),r.treePathInfo=r.treeAncestors,r},e.prototype.setLayoutInfo=function(t){this.layoutInfo=this.layoutInfo||{},$(this.layoutInfo,t)},e.prototype.mapIdToIndex=function(t){var r=this._idIndexMap;r||(r=this._idIndexMap=nt(),this._idIndexMapCount=0);var n=r.get(t);return n==null&&r.set(t,n=this._idIndexMapCount++),n},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var r=this.getRawData().tree.root;(!t||t!==r&&!r.contains(t))&&(this._viewRoot=r)},e.prototype.enableAriaDecal=function(){bc(this)},e.type="series.treemap",e.layoutMode="box",e.defaultOption={progressive:0,left:"center",top:"middle",width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"\u25B6",zoomToNodeRatio:.32*.32,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",textStyle:{color:"#fff"}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",overflow:"truncate"},upperLabel:{show:!1,position:[0,"50%"],height:20,overflow:"truncate",verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],overflow:"truncate",verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},e}(bt);function Ac(a){var e=0;D(a.children,function(r){Ac(r);var n=r.value;W(n)&&(n=n[0]),e+=n});var t=a.value;W(t)&&(t=t[0]),(t==null||isNaN(t))&&(t=e),t<0&&(t=0),W(a.value)?a.value[0]=t:a.value=t}function Gy(a,e){var t=Lt(e.get("color")),r=Lt(e.get(["aria","decal","decals"]));if(!!t){a=a||[];var n,i;D(a,function(s){var l=new Jt(s),u=l.get("color"),v=l.get("decal");(l.get(["itemStyle","color"])||u&&u!=="none")&&(n=!0),(l.get(["itemStyle","decal"])||v&&v!=="none")&&(i=!0)});var o=a[0]||(a[0]={});return n||(o.color=t.slice()),!i&&r&&(o.decal=r.slice()),a}}const Oy=zy;var By=8,vl=8,kn=5,Fy=function(){function a(e){this.group=new Z,e.add(this.group)}return a.prototype.render=function(e,t,r,n){var i=e.getModel("breadcrumb"),o=this.group;if(o.removeAll(),!(!i.get("show")||!r)){var s=i.getModel("itemStyle"),l=s.getModel("textStyle"),u={pos:{left:i.get("left"),right:i.get("right"),top:i.get("top"),bottom:i.get("bottom")},box:{width:t.getWidth(),height:t.getHeight()},emptyItemWidth:i.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(r,u,l),this._renderContent(e,u,s,l,n),ro(o,u.pos,u.box)}},a.prototype._prepare=function(e,t,r){for(var n=e;n;n=n.parentNode){var i=ge(n.getModel().get("name"),""),o=r.getTextRect(i),s=Math.max(o.width+By*2,t.emptyItemWidth);t.totalWidth+=s+vl,t.renderList.push({node:n,text:i,width:s})}},a.prototype._renderContent=function(e,t,r,n,i){for(var o=0,s=t.emptyItemWidth,l=e.get(["breadcrumb","height"]),u=If(t.pos,t.box),v=t.totalWidth,c=t.renderList,h=c.length-1;h>=0;h--){var f=c[h],p=f.node,d=f.width,g=f.text;v>u.width&&(v-=d-s,d=s,g=null);var y=new he({shape:{points:Hy(o,0,d,l,h===c.length-1,h===0)},style:Q(r.getItemStyle(),{lineJoin:"bevel"}),textContent:new pt({style:{text:g,fill:n.getTextColor(),font:n.getFont()}}),textConfig:{position:"inside"},z2:Kr*1e4,onclick:st(i,p)});y.disableLabelAnimation=!0,this.group.add(y),Wy(y,e,p),o+=d+vl}},a.prototype.remove=function(){this.group.removeAll()},a}();function Hy(a,e,t,r,n,i){var o=[[n?a:a-kn,e],[a+t,e],[a+t,e+r],[n?a:a-kn,e+r]];return!i&&o.splice(2,0,[a+t+kn,e+r/2]),!n&&o.push([a,e+r/2]),o}function Wy(a,e,t){it(a).eventData={componentType:"series",componentSubType:"treemap",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:t&&t.dataIndex,name:t&&t.name},treePathInfo:t&&pn(t,e)}}const $y=Fy;var Uy=function(){function a(){this._storage=[],this._elExistsMap={}}return a.prototype.add=function(e,t,r,n,i){return this._elExistsMap[e.id]?!1:(this._elExistsMap[e.id]=!0,this._storage.push({el:e,target:t,duration:r,delay:n,easing:i}),!0)},a.prototype.finished=function(e){return this._finishedCallback=e,this},a.prototype.start=function(){for(var e=this,t=this._storage.length,r=function(){t--,t<=0&&(e._storage.length=0,e._elExistsMap={},e._finishedCallback&&e._finishedCallback())},n=0,i=this._storage.length;n<i;n++){var o=this._storage[n];o.el.animateTo(o.target,{duration:o.duration,delay:o.delay,easing:o.easing,setToFinal:!0,done:r,aborted:r})}return this},a}();function Yy(){return new Uy}var ki=Z,cl=Tt,hl=3,fl="label",pl="upperLabel",Xy=Kr*10,Zy=Kr*2,qy=Kr*3,Ge=Mv([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),dl=function(a){var e=Ge(a);return e.stroke=e.fill=e.lineWidth=null,e},Ea=Dt(),Ky=function(a){z(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t._state="ready",t._storage=br(),t}return e.prototype.render=function(t,r,n,i){var o=r.findComponents({mainType:"series",subType:"treemap",query:i});if(!(Ut(o,t)<0)){this.seriesModel=t,this.api=n,this.ecModel=r;var s=["treemapZoomToNode","treemapRootToNode"],l=Wr(i,s,t),u=i&&i.type,v=t.layoutInfo,c=!this._oldTree,h=this._storage,f=u==="treemapRootToNode"&&l&&h?{rootNodeGroup:h.nodeGroup[l.node.getRawIndex()],direction:i.direction}:null,p=this._giveContainerGroup(v),d=t.get("animation"),g=this._doRender(p,t,f);d&&!c&&(!u||u==="treemapZoomToNode"||u==="treemapRootToNode")?this._doAnimation(p,g,t,f):g.renderFinally(),this._resetController(n),this._renderBreadcrumb(t,n,l)}},e.prototype._giveContainerGroup=function(t){var r=this._containerGroup;return r||(r=this._containerGroup=new ki,this._initEvents(r),this.group.add(r)),r.x=t.x,r.y=t.y,r},e.prototype._doRender=function(t,r,n){var i=r.getData().tree,o=this._oldTree,s=br(),l=br(),u=this._storage,v=[];function c(g,y,m,S){return jy(r,l,u,n,s,v,g,y,m,S)}f(i.root?[i.root]:[],o&&o.root?[o.root]:[],t,i===o||!o,0);var h=p(u);return this._oldTree=i,this._storage=l,{lastsForAnimation:s,willDeleteEls:h,renderFinally:d};function f(g,y,m,S,x){S?(y=g,D(g,function(b,A){!b.isRemoved()&&_(A,A)})):new dr(y,g,w,w).add(_).update(_).remove(st(_,null)).execute();function w(b){return b.getId()}function _(b,A){var T=b!=null?g[b]:null,I=A!=null?y[A]:null,C=c(T,I,m,x);C&&f(T&&T.viewChildren||[],I&&I.viewChildren||[],C,S,x+1)}}function p(g){var y=br();return g&&D(g,function(m,S){var x=y[S];D(m,function(w){w&&(x.push(w),Ea(w).willDelete=!0)})}),y}function d(){D(h,function(g){D(g,function(y){y.parent&&y.parent.remove(y)})}),D(v,function(g){g.invisible=!0,g.dirty()})}},e.prototype._doAnimation=function(t,r,n,i){var o=n.get("animationDurationUpdate"),s=n.get("animationEasing"),l=(ot(o)?0:o)||0,u=(ot(s)?null:s)||"cubicOut",v=Yy();D(r.willDeleteEls,function(c,h){D(c,function(f,p){if(!f.invisible){var d=f.parent,g,y=Ea(d);if(i&&i.direction==="drillDown")g=d===i.rootNodeGroup?{shape:{x:0,y:0,width:y.nodeWidth,height:y.nodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var m=0,S=0;y.willDelete||(m=y.nodeWidth/2,S=y.nodeHeight/2),g=h==="nodeGroup"?{x:m,y:S,style:{opacity:0}}:{shape:{x:m,y:S,width:0,height:0},style:{opacity:0}}}g&&v.add(f,g,l,0,u)}})}),D(this._storage,function(c,h){D(c,function(f,p){var d=r.lastsForAnimation[h][p],g={};!d||(f instanceof Z?d.oldX!=null&&(g.x=f.x,g.y=f.y,f.x=d.oldX,f.y=d.oldY):(d.oldShape&&(g.shape=$({},f.shape),f.setShape(d.oldShape)),d.fadein?(f.setStyle("opacity",0),g.style={opacity:1}):f.style.opacity!==1&&(g.style={opacity:1})),v.add(f,g,l,0,u))})},this),this._state="animating",v.finished(q(function(){this._state="ready",r.renderFinally()},this)).start()},e.prototype._resetController=function(t){var r=this._controller;r||(r=this._controller=new en(t.getZr()),r.enable(this.seriesModel.get("roam")),r.on("pan",q(this._onPan,this)),r.on("zoom",q(this._onZoom,this)));var n=new yt(0,0,t.getWidth(),t.getHeight());r.setPointerChecker(function(i,o,s){return n.contain(o,s)})},e.prototype._clearController=function(){var t=this._controller;t&&(t.dispose(),t=null)},e.prototype._onPan=function(t){if(this._state!=="animating"&&(Math.abs(t.dx)>hl||Math.abs(t.dy)>hl)){var r=this.seriesModel.getData().tree.root;if(!r)return;var n=r.getLayout();if(!n)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:n.x+t.dx,y:n.y+t.dy,width:n.width,height:n.height}})}},e.prototype._onZoom=function(t){var r=t.originX,n=t.originY;if(this._state!=="animating"){var i=this.seriesModel.getData().tree.root;if(!i)return;var o=i.getLayout();if(!o)return;var s=new yt(o.x,o.y,o.width,o.height),l=this.seriesModel.layoutInfo;r-=l.x,n-=l.y;var u=yr();Ze(u,u,[-r,-n]),wv(u,u,[t.scale,t.scale]),Ze(u,u,[r,n]),s.applyTransform(u),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:s.x,y:s.y,width:s.width,height:s.height}})}},e.prototype._initEvents=function(t){var r=this;t.on("click",function(n){if(r._state==="ready"){var i=r.seriesModel.get("nodeClick",!0);if(!!i){var o=r.findTarget(n.offsetX,n.offsetY);if(!!o){var s=o.node;if(s.getLayout().isLeafRoot)r._rootToNode(o);else if(i==="zoomToNode")r._zoomToNode(o);else if(i==="link"){var l=s.hostTree.data.getItemModel(s.dataIndex),u=l.get("link",!0),v=l.get("target",!0)||"blank";u&&Lv(u,v)}}}}},this)},e.prototype._renderBreadcrumb=function(t,r,n){var i=this;n||(n=t.get("leafDepth",!0)!=null?{node:t.getViewRoot()}:this.findTarget(r.getWidth()/2,r.getHeight()/2),n||(n={node:t.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new $y(this.group))).render(t,r,n.node,function(o){i._state!=="animating"&&(Ao(t.getViewRoot(),o)?i._rootToNode({node:o}):i._zoomToNode({node:o}))})},e.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=br(),this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},e.prototype.dispose=function(){this._clearController()},e.prototype._zoomToNode=function(t){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype._rootToNode=function(t){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype.findTarget=function(t,r){var n,i=this.seriesModel.getViewRoot();return i.eachNode({attr:"viewChildren",order:"preorder"},function(o){var s=this._storage.background[o.getRawIndex()];if(s){var l=s.transformCoordToLocal(t,r),u=s.shape;if(u.x<=l[0]&&l[0]<=u.x+u.width&&u.y<=l[1]&&l[1]<=u.y+u.height)n={node:o,offsetX:l[0],offsetY:l[1]};else return!1}},this),n},e.type="treemap",e}(St);function br(){return{nodeGroup:[],background:[],content:[]}}function jy(a,e,t,r,n,i,o,s,l,u){if(!o)return;var v=o.getLayout(),c=a.getData(),h=o.getModel();if(c.setItemGraphicEl(o.dataIndex,null),!v||!v.isInView)return;var f=v.width,p=v.height,d=v.borderWidth,g=v.invisible,y=o.getRawIndex(),m=s&&s.getRawIndex(),S=o.viewChildren,x=v.upperHeight,w=S&&S.length,_=h.getModel("itemStyle"),b=h.getModel(["emphasis","itemStyle"]),A=h.getModel(["blur","itemStyle"]),T=h.getModel(["select","itemStyle"]),I=_.get("borderRadius")||0,C=J("nodeGroup",ki);if(!C)return;if(l.add(C),C.x=v.x||0,C.y=v.y||0,C.markRedraw(),Ea(C).nodeWidth=f,Ea(C).nodeHeight=p,v.isAboveViewRoot)return C;var E=J("background",cl,u,Zy);E&&k(C,E,w&&v.upperLabelHeight);var V=h.getModel("emphasis"),M=V.get("focus"),P=V.get("blurScope"),R=V.get("disabled"),G=M==="ancestor"?o.getAncestorsIndices():M==="descendant"?o.getDescendantIndices():M;if(w)jo(C)&&Dr(C,!1),E&&(Dr(E,!R),c.setItemGraphicEl(o.dataIndex,E),Jo(E,G,P));else{var L=J("content",cl,u,qy);L&&N(C,L),E.disableMorphing=!0,E&&jo(E)&&Dr(E,!1),Dr(C,!R),c.setItemGraphicEl(o.dataIndex,C),Jo(C,G,P)}return C;function k(j,X,et){var rt=it(X);if(rt.dataIndex=o.dataIndex,rt.seriesIndex=a.seriesIndex,X.setShape({x:0,y:0,width:f,height:p,r:I}),g)O(X);else{X.invisible=!1;var at=o.getVisual("style"),At=at.stroke,Ct=dl(_);Ct.fill=At;var ut=Ge(b);ut.fill=b.get("borderColor");var Pt=Ge(A);Pt.fill=A.get("borderColor");var Vt=Ge(T);if(Vt.fill=T.get("borderColor"),et){var ie=f-2*d;U(X,At,at.opacity,{x:d,y:0,width:ie,height:x})}else X.removeTextContent();X.setStyle(Ct),X.ensureState("emphasis").style=ut,X.ensureState("blur").style=Pt,X.ensureState("select").style=Vt,fr(X)}j.add(X)}function N(j,X){var et=it(X);et.dataIndex=o.dataIndex,et.seriesIndex=a.seriesIndex;var rt=Math.max(f-2*d,0),at=Math.max(p-2*d,0);if(X.culling=!0,X.setShape({x:d,y:d,width:rt,height:at,r:I}),g)O(X);else{X.invisible=!1;var At=o.getVisual("style"),Ct=At.fill,ut=dl(_);ut.fill=Ct,ut.decal=At.decal;var Pt=Ge(b),Vt=Ge(A),ie=Ge(T);U(X,Ct,At.opacity,null),X.setStyle(ut),X.ensureState("emphasis").style=Pt,X.ensureState("blur").style=Vt,X.ensureState("select").style=ie,fr(X)}j.add(X)}function O(j){!j.invisible&&i.push(j)}function U(j,X,et,rt){var at=h.getModel(rt?pl:fl),At=ge(h.get("name"),null),Ct=at.getShallow("show");re(j,Wt(h,rt?pl:fl),{defaultText:Ct?At:null,inheritColor:X,defaultOpacity:et,labelFetcher:a,labelDataIndex:o.dataIndex});var ut=j.getTextContent();if(!!ut){var Pt=ut.style,Vt=Df(Pt.padding||0);rt&&(j.setTextConfig({layoutRect:rt}),ut.disableLabelLayout=!0),ut.beforeUpdate=function(){var Ve=Math.max((rt?rt.width:j.shape.width)-Vt[1]-Vt[3],0),Ee=Math.max((rt?rt.height:j.shape.height)-Vt[0]-Vt[2],0);(Pt.width!==Ve||Pt.height!==Ee)&&ut.setStyle({width:Ve,height:Ee})},Pt.truncateMinChar=2,Pt.lineOverflow="truncate",Y(Pt,rt,v);var ie=ut.getState("emphasis");Y(ie?ie.style:null,rt,v)}}function Y(j,X,et){var rt=j?j.text:null;if(!X&&et.isLeafRoot&&rt!=null){var at=a.get("drillDownIcon",!0);j.text=at?at+" "+rt:rt}}function J(j,X,et,rt){var at=m!=null&&t[j][m],At=n[j];return at?(t[j][m]=null,gt(At,at)):g||(at=new X,at instanceof qe&&(at.z2=Jy(et,rt)),zt(At,at)),e[j][y]=at}function gt(j,X){var et=j[y]={};X instanceof ki?(et.oldX=X.x,et.oldY=X.y):et.oldShape=$({},X.shape)}function zt(j,X){var et=j[y]={},rt=o.parentNode,at=X instanceof Z;if(rt&&(!r||r.direction==="drillDown")){var At=0,Ct=0,ut=n.background[rt.getRawIndex()];!r&&ut&&ut.oldShape&&(At=ut.oldShape.width,Ct=ut.oldShape.height),at?(et.oldX=0,et.oldY=Ct):et.oldShape={x:At,y:Ct,width:0,height:0}}et.fadein=!at}}function Jy(a,e){return a*Xy+e}const Qy=Ky;var $r=D,tm=Rt,Ra=-1,To=function(){function a(e){var t=e.mappingMethod,r=e.type,n=this.option=lt(e);this.type=r,this.mappingMethod=t,this._normalizeData=am[t];var i=a.visualHandlers[r];this.applyVisual=i.applyVisual,this.getColorMapper=i.getColorMapper,this._normalizedToVisual=i._normalizedToVisual[t],t==="piecewise"?(Nn(n),em(n)):t==="category"?n.categories?rm(n):Nn(n,!0):(Or(t!=="linear"||n.dataExtent),Nn(n))}return a.prototype.mapValueToVisual=function(e){var t=this._normalizeData(e);return this._normalizedToVisual(t,e)},a.prototype.getNormalizer=function(){return q(this._normalizeData,this)},a.listVisualTypes=function(){return ft(a.visualHandlers)},a.isValidType=function(e){return a.visualHandlers.hasOwnProperty(e)},a.eachVisual=function(e,t,r){Rt(e)?D(e,t,r):t.call(r,e)},a.mapVisual=function(e,t,r){var n,i=W(e)?[]:Rt(e)?{}:(n=!0,null);return a.eachVisual(e,function(o,s){var l=t.call(r,o,s);n?i=l:i[s]=l}),i},a.retrieveVisuals=function(e){var t={},r;return e&&$r(a.visualHandlers,function(n,i){e.hasOwnProperty(i)&&(t[i]=e[i],r=!0)}),r?t:null},a.prepareVisualTypes=function(e){if(W(e))e=e.slice();else if(tm(e)){var t=[];$r(e,function(r,n){t.push(n)}),e=t}else return[];return e.sort(function(r,n){return n==="color"&&r!=="color"&&r.indexOf("color")===0?1:-1}),e},a.dependsOn=function(e,t){return t==="color"?!!(e&&e.indexOf(t)===0):e===t},a.findPieceIndex=function(e,t,r){for(var n,i=1/0,o=0,s=t.length;o<s;o++){var l=t[o].value;if(l!=null){if(l===e||tt(l)&&l===e+"")return o;r&&h(l,o)}}for(var o=0,s=t.length;o<s;o++){var u=t[o],v=u.interval,c=u.close;if(v){if(v[0]===-1/0){if(la(c[1],e,v[1]))return o}else if(v[1]===1/0){if(la(c[0],v[0],e))return o}else if(la(c[0],v[0],e)&&la(c[1],e,v[1]))return o;r&&h(v[0],o),r&&h(v[1],o)}}if(r)return e===1/0?t.length-1:e===-1/0?0:n;function h(f,p){var d=Math.abs(f-e);d<i&&(i=d,n=p)}},a.visualHandlers={color:{applyVisual:Ar("color"),getColorMapper:function(){var e=this.option;return q(e.mappingMethod==="category"?function(t,r){return!r&&(t=this._normalizeData(t)),Pr.call(this,t)}:function(t,r,n){var i=!!n;return!r&&(t=this._normalizeData(t)),n=yn(t,e.parsedVisual,n),i?n:mn(n,"rgba")},this)},_normalizedToVisual:{linear:function(e){return mn(yn(e,this.option.parsedVisual),"rgba")},category:Pr,piecewise:function(e,t){var r=zi.call(this,t);return r==null&&(r=mn(yn(e,this.option.parsedVisual),"rgba")),r},fixed:Oe}},colorHue:sa(function(e,t){return Rr(e,t)}),colorSaturation:sa(function(e,t){return Rr(e,null,t)}),colorLightness:sa(function(e,t){return Rr(e,null,null,t)}),colorAlpha:sa(function(e,t){return Ta(e,t)}),decal:{applyVisual:Ar("decal"),_normalizedToVisual:{linear:null,category:Pr,piecewise:null,fixed:null}},opacity:{applyVisual:Ar("opacity"),_normalizedToVisual:Ni([0,1])},liftZ:{applyVisual:Ar("liftZ"),_normalizedToVisual:{linear:Oe,category:Oe,piecewise:Oe,fixed:Oe}},symbol:{applyVisual:function(e,t,r){var n=this.mapValueToVisual(e);r("symbol",n)},_normalizedToVisual:{linear:gl,category:Pr,piecewise:function(e,t){var r=zi.call(this,t);return r==null&&(r=gl.call(this,e)),r},fixed:Oe}},symbolSize:{applyVisual:Ar("symbolSize"),_normalizedToVisual:Ni([0,1])}},a}();function em(a){var e=a.pieceList;a.hasSpecialVisual=!1,D(e,function(t,r){t.originIndex=r,t.visual!=null&&(a.hasSpecialVisual=!0)})}function rm(a){var e=a.categories,t=a.categoryMap={},r=a.visual;if($r(e,function(o,s){t[o]=s}),!W(r)){var n=[];Rt(r)?$r(r,function(o,s){var l=t[s];n[l!=null?l:Ra]=o}):n[Ra]=r,r=Tc(a,n)}for(var i=e.length-1;i>=0;i--)r[i]==null&&(delete t[e[i]],e.pop())}function Nn(a,e){var t=a.visual,r=[];Rt(t)?$r(t,function(i){r.push(i)}):t!=null&&r.push(t);var n={color:1,symbol:1};!e&&r.length===1&&!n.hasOwnProperty(a.type)&&(r[1]=r[0]),Tc(a,r)}function sa(a){return{applyVisual:function(e,t,r){var n=this.mapValueToVisual(e);r("color",a(t("color"),n))},_normalizedToVisual:Ni([0,1])}}function gl(a){var e=this.option.visual;return e[Math.round(xt(a,[0,1],[0,e.length-1],!0))]||{}}function Ar(a){return function(e,t,r){r(a,this.mapValueToVisual(e))}}function Pr(a){var e=this.option.visual;return e[this.option.loop&&a!==Ra?a%e.length:a]}function Oe(){return this.option.visual[0]}function Ni(a){return{linear:function(e){return xt(e,a,this.option.visual,!0)},category:Pr,piecewise:function(e,t){var r=zi.call(this,t);return r==null&&(r=xt(e,a,this.option.visual,!0)),r},fixed:Oe}}function zi(a){var e=this.option,t=e.pieceList;if(e.hasSpecialVisual){var r=To.findPieceIndex(a,t),n=t[r];if(n&&n.visual)return n.visual[this.type]}}function Tc(a,e){return a.visual=e,a.type==="color"&&(a.parsedVisual=F(e,function(t){return Cf(t)})),e}var am={linear:function(a){return xt(a,this.option.dataExtent,[0,1],!0)},piecewise:function(a){var e=this.option.pieceList,t=To.findPieceIndex(a,e,!0);if(t!=null)return xt(t,[0,e.length-1],[0,1],!0)},category:function(a){var e=this.option.categories?this.option.categoryMap[a]:a;return e==null?Ra:e},fixed:pr};function la(a,e,t){return a?e<=t:e<t}const wt=To;var nm="itemStyle",Ic=Dt();const im={seriesType:"treemap",reset:function(a){var e=a.getData().tree,t=e.root;t.isRemoved()||Dc(t,{},a.getViewRoot().getAncestors(),a)}};function Dc(a,e,t,r){var n=a.getModel(),i=a.getLayout(),o=a.hostTree.data;if(!(!i||i.invisible||!i.isInView)){var s=n.getModel(nm),l=om(s,e,r),u=o.ensureUniqueItemVisual(a.dataIndex,"style"),v=s.get("borderColor"),c=s.get("borderColorSaturation"),h;c!=null&&(h=yl(l),v=sm(c,h)),u.stroke=v;var f=a.viewChildren;if(!f||!f.length)h=yl(l),u.fill=h;else{var p=lm(a,n,i,s,l,f);D(f,function(d,g){if(d.depth>=t.length||d===t[d.depth]){var y=um(n,l,d,g,p,r);Dc(d,y,t,r)}})}}}function om(a,e,t){var r=$({},e),n=t.designatedVisualItemStyle;return D(["color","colorAlpha","colorSaturation"],function(i){n[i]=e[i];var o=a.get(i);n[i]=null,o!=null&&(r[i]=o)}),r}function yl(a){var e=zn(a,"color");if(e){var t=zn(a,"colorAlpha"),r=zn(a,"colorSaturation");return r&&(e=Rr(e,null,null,r)),t&&(e=Ta(e,t)),e}}function sm(a,e){return e!=null?Rr(e,null,null,a):null}function zn(a,e){var t=a[e];if(t!=null&&t!=="none")return t}function lm(a,e,t,r,n,i){if(!(!i||!i.length)){var o=Gn(e,"color")||n.color!=null&&n.color!=="none"&&(Gn(e,"colorAlpha")||Gn(e,"colorSaturation"));if(!!o){var s=e.get("visualMin"),l=e.get("visualMax"),u=t.dataExtent.slice();s!=null&&s<u[0]&&(u[0]=s),l!=null&&l>u[1]&&(u[1]=l);var v=e.get("colorMappingBy"),c={type:o.name,dataExtent:u,visual:o.range};c.type==="color"&&(v==="index"||v==="id")?(c.mappingMethod="category",c.loop=!0):c.mappingMethod="linear";var h=new wt(c);return Ic(h).drColorMappingBy=v,h}}}function Gn(a,e){var t=a.get(e);return W(t)&&t.length?{name:e,range:t}:null}function um(a,e,t,r,n,i){var o=$({},e);if(n){var s=n.type,l=s==="color"&&Ic(n).drColorMappingBy,u=l==="index"?r:l==="id"?i.mapIdToIndex(t.getId()):t.getValue(a.get("visualDimension"));o[s]=n.mapValueToVisual(u)}return o}var Ur=Math.max,ka=Math.min,ml=Ot,Io=D,Cc=["itemStyle","borderWidth"],vm=["itemStyle","gapWidth"],cm=["upperLabel","show"],hm=["upperLabel","height"];const fm={seriesType:"treemap",reset:function(a,e,t,r){var n=t.getWidth(),i=t.getHeight(),o=a.option,s=ne(a.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()}),l=o.size||[],u=H(ml(s.width,l[0]),n),v=H(ml(s.height,l[1]),i),c=r&&r.type,h=["treemapZoomToNode","treemapRootToNode"],f=Wr(r,h,a),p=c==="treemapRender"||c==="treemapMove"?r.rootRect:null,d=a.getViewRoot(),g=wc(d);if(c!=="treemapMove"){var y=c==="treemapZoomToNode"?Sm(a,f,d,u,v):p?[p.width,p.height]:[u,v],m=o.sort;m&&m!=="asc"&&m!=="desc"&&(m="desc");var S={squareRatio:o.squareRatio,sort:m,leafDepth:o.leafDepth};d.hostTree.clearLayouts();var x={x:0,y:0,width:y[0],height:y[1],area:y[0]*y[1]};d.setLayout(x),Mc(d,S,!1,0),x=d.getLayout(),Io(g,function(_,b){var A=(g[b+1]||d).getValue();_.setLayout($({dataExtent:[A,A],borderWidth:0,upperHeight:0},x))})}var w=a.getData().tree.root;w.setLayout(xm(s,p,f),!0),a.setLayoutInfo(s),Lc(w,new yt(-s.x,-s.y,n,i),g,d,0)}};function Mc(a,e,t,r){var n,i;if(!a.isRemoved()){var o=a.getLayout();n=o.width,i=o.height;var s=a.getModel(),l=s.get(Cc),u=s.get(vm)/2,v=Pc(s),c=Math.max(l,v),h=l-u,f=c-u;a.setLayout({borderWidth:l,upperHeight:c,upperLabelHeight:v},!0),n=Ur(n-2*h,0),i=Ur(i-h-f,0);var p=n*i,d=pm(a,s,p,e,t,r);if(!!d.length){var g={x:h,y:f,width:n,height:i},y=ka(n,i),m=1/0,S=[];S.area=0;for(var x=0,w=d.length;x<w;){var _=d[x];S.push(_),S.area+=_.getLayout().area;var b=mm(S,y,e.squareRatio);b<=m?(x++,m=b):(S.area-=S.pop().getLayout().area,Sl(S,y,g,u,!1),y=ka(g.width,g.height),S.length=S.area=0,m=1/0)}if(S.length&&Sl(S,y,g,u,!0),!t){var A=s.get("childrenVisibleMin");A!=null&&p<A&&(t=!0)}for(var x=0,w=d.length;x<w;x++)Mc(d[x],e,t,r+1)}}}function pm(a,e,t,r,n,i){var o=a.children||[],s=r.sort;s!=="asc"&&s!=="desc"&&(s=null);var l=r.leafDepth!=null&&r.leafDepth<=i;if(n&&!l)return a.viewChildren=[];o=Et(o,function(f){return!f.isRemoved()}),gm(o,s);var u=ym(e,o,s);if(u.sum===0)return a.viewChildren=[];if(u.sum=dm(e,t,u.sum,s,o),u.sum===0)return a.viewChildren=[];for(var v=0,c=o.length;v<c;v++){var h=o[v].getValue()/u.sum*t;o[v].setLayout({area:h})}return l&&(o.length&&a.setLayout({isLeafRoot:!0},!0),o.length=0),a.viewChildren=o,a.setLayout({dataExtent:u.dataExtent},!0),o}function dm(a,e,t,r,n){if(!r)return t;for(var i=a.get("visibleMin"),o=n.length,s=o,l=o-1;l>=0;l--){var u=n[r==="asc"?o-l-1:l].getValue();u/t*e<i&&(s=l,t-=u)}return r==="asc"?n.splice(0,o-s):n.splice(s,o-s),t}function gm(a,e){return e&&a.sort(function(t,r){var n=e==="asc"?t.getValue()-r.getValue():r.getValue()-t.getValue();return n===0?e==="asc"?t.dataIndex-r.dataIndex:r.dataIndex-t.dataIndex:n}),a}function ym(a,e,t){for(var r=0,n=0,i=e.length;n<i;n++)r+=e[n].getValue();var o=a.get("visualDimension"),s;return!e||!e.length?s=[NaN,NaN]:o==="value"&&t?(s=[e[e.length-1].getValue(),e[0].getValue()],t==="asc"&&s.reverse()):(s=[1/0,-1/0],Io(e,function(l){var u=l.getValue(o);u<s[0]&&(s[0]=u),u>s[1]&&(s[1]=u)})),{sum:r,dataExtent:s}}function mm(a,e,t){for(var r=0,n=1/0,i=0,o=void 0,s=a.length;i<s;i++)o=a[i].getLayout().area,o&&(o<n&&(n=o),o>r&&(r=o));var l=a.area*a.area,u=e*e*t;return l?Ur(u*r/l,l/(u*n)):1/0}function Sl(a,e,t,r,n){var i=e===t.width?0:1,o=1-i,s=["x","y"],l=["width","height"],u=t[s[i]],v=e?a.area/e:0;(n||v>t[l[o]])&&(v=t[l[o]]);for(var c=0,h=a.length;c<h;c++){var f=a[c],p={},d=v?f.getLayout().area/v:0,g=p[l[o]]=Ur(v-2*r,0),y=t[s[i]]+t[l[i]]-u,m=c===h-1||y<d?y:d,S=p[l[i]]=Ur(m-2*r,0);p[s[o]]=t[s[o]]+ka(r,g/2),p[s[i]]=u+ka(r,S/2),u+=m,f.setLayout(p,!0)}t[s[o]]+=v,t[l[o]]-=v}function Sm(a,e,t,r,n){var i=(e||{}).node,o=[r,n];if(!i||i===t)return o;for(var s,l=r*n,u=l*a.option.zoomToNodeRatio;s=i.parentNode;){for(var v=0,c=s.children,h=0,f=c.length;h<f;h++)v+=c[h].getValue();var p=i.getValue();if(p===0)return o;u*=v/p;var d=s.getModel(),g=d.get(Cc),y=Math.max(g,Pc(d));u+=4*g*g+(3*g+y)*Math.pow(u,.5),u>Qo&&(u=Qo),i=s}u<l&&(u=l);var m=Math.pow(u/l,.5);return[r*m,n*m]}function xm(a,e,t){if(e)return{x:e.x,y:e.y};var r={x:0,y:0};if(!t)return r;var n=t.node,i=n.getLayout();if(!i)return r;for(var o=[i.width/2,i.height/2],s=n;s;){var l=s.getLayout();o[0]+=l.x,o[1]+=l.y,s=s.parentNode}return{x:a.width/2-o[0],y:a.height/2-o[1]}}function Lc(a,e,t,r,n){var i=a.getLayout(),o=t[n],s=o&&o===a;if(!(o&&!s||n===t.length&&a!==r)){a.setLayout({isInView:!0,invisible:!s&&!e.intersect(i),isAboveViewRoot:s},!0);var l=new yt(e.x-i.x,e.y-i.y,e.width,e.height);Io(a.viewChildren||[],function(u){Lc(u,l,t,r,n+1)})}}function Pc(a){return a.get(cm)?a.get(hm):0}function _m(a){a.registerSeriesModel(Oy),a.registerChartView(Qy),a.registerVisual(im),a.registerLayout(fm),Ny(a)}function wm(a){var e=a.findComponents({mainType:"legend"});!e||!e.length||a.eachSeriesByType("graph",function(t){var r=t.getCategoriesData(),n=t.getGraph(),i=n.data,o=r.mapArray(r.getName);i.filterSelf(function(s){var l=i.getItemModel(s),u=l.getShallow("category");if(u!=null){ce(u)&&(u=o[u]);for(var v=0;v<e.length;v++)if(!e[v].isSelected(u))return!1}return!0})})}function bm(a){var e={};a.eachSeriesByType("graph",function(t){var r=t.getCategoriesData(),n=t.getData(),i={};r.each(function(o){var s=r.getName(o);i["ec-"+s]=o;var l=r.getItemModel(o),u=l.getModel("itemStyle").getItemStyle();u.fill||(u.fill=t.getColorFromPalette(s,e)),r.setItemVisual(o,"style",u);for(var v=["symbol","symbolSize","symbolKeepAspect"],c=0;c<v.length;c++){var h=l.getShallow(v[c],!0);h!=null&&r.setItemVisual(o,v[c],h)}}),r.count()&&n.each(function(o){var s=n.getItemModel(o),l=s.getShallow("category");if(l!=null){tt(l)&&(l=i["ec-"+l]);var u=r.getItemVisual(l,"style"),v=n.ensureUniqueItemVisual(o,"style");$(v,u);for(var c=["symbol","symbolSize","symbolKeepAspect"],h=0;h<c.length;h++)n.setItemVisual(o,c[h],r.getItemVisual(l,c[h]))}})})}function ua(a){return a instanceof Array||(a=[a,a]),a}function Am(a){a.eachSeriesByType("graph",function(e){var t=e.getGraph(),r=e.getEdgeData(),n=ua(e.get("edgeSymbol")),i=ua(e.get("edgeSymbolSize"));r.setVisual("fromSymbol",n&&n[0]),r.setVisual("toSymbol",n&&n[1]),r.setVisual("fromSymbolSize",i&&i[0]),r.setVisual("toSymbolSize",i&&i[1]),r.setVisual("style",e.getModel("lineStyle").getLineStyle()),r.each(function(o){var s=r.getItemModel(o),l=t.getEdgeByIndex(o),u=ua(s.getShallow("symbol",!0)),v=ua(s.getShallow("symbolSize",!0)),c=s.getModel("lineStyle").getLineStyle(),h=r.ensureUniqueItemVisual(o,"style");switch($(h,c),h.stroke){case"source":{var f=l.node1.getVisual("style");h.stroke=f&&f.fill;break}case"target":{var f=l.node2.getVisual("style");h.stroke=f&&f.fill;break}}u[0]&&l.setVisual("fromSymbol",u[0]),u[1]&&l.setVisual("toSymbol",u[1]),v[0]&&l.setVisual("fromSymbolSize",v[0]),v[1]&&l.setVisual("toSymbolSize",v[1])})})}var Gi="-->",dn=function(a){return a.get("autoCurveness")||null},Vc=function(a,e){var t=dn(a),r=20,n=[];if(ce(t))r=t;else if(W(t)){a.__curvenessList=t;return}e>r&&(r=e);var i=r%2?r+2:r+3;n=[];for(var o=0;o<i;o++)n.push((o%2?o+1:o)/10*(o%2?-1:1));a.__curvenessList=n},Yr=function(a,e,t){var r=[a.id,a.dataIndex].join("."),n=[e.id,e.dataIndex].join(".");return[t.uid,r,n].join(Gi)},Ec=function(a){var e=a.split(Gi);return[e[0],e[2],e[1]].join(Gi)},Tm=function(a,e){var t=Yr(a.node1,a.node2,e);return e.__edgeMap[t]},Im=function(a,e){var t=Oi(Yr(a.node1,a.node2,e),e),r=Oi(Yr(a.node2,a.node1,e),e);return t+r},Oi=function(a,e){var t=e.__edgeMap;return t[a]?t[a].length:0};function Dm(a){!dn(a)||(a.__curvenessList=[],a.__edgeMap={},Vc(a))}function Cm(a,e,t,r){if(!!dn(t)){var n=Yr(a,e,t),i=t.__edgeMap,o=i[Ec(n)];i[n]&&!o?i[n].isForward=!0:o&&i[n]&&(o.isForward=!0,i[n].isForward=!1),i[n]=i[n]||[],i[n].push(r)}}function Do(a,e,t,r){var n=dn(e),i=W(n);if(!n)return null;var o=Tm(a,e);if(!o)return null;for(var s=-1,l=0;l<o.length;l++)if(o[l]===t){s=l;break}var u=Im(a,e);Vc(e,u),a.lineStyle=a.lineStyle||{};var v=Yr(a.node1,a.node2,e),c=e.__curvenessList,h=i||u%2?0:1;if(o.isForward)return c[h+s];var f=Ec(v),p=Oi(f,e),d=c[s+p+h];return r?i?n&&n[0]===0?(p+h)%2?d:-d:((p%2?0:1)+h)%2?d:-d:(p+h)%2?d:-d:c[s+p+h]}function Rc(a){var e=a.coordinateSystem;if(!(e&&e.type!=="view")){var t=a.getGraph();t.eachNode(function(r){var n=r.getModel();r.setLayout([+n.get("x"),+n.get("y")])}),kc(t,a)}}function kc(a,e){a.eachEdge(function(t,r){var n=nn(t.getModel().get(["lineStyle","curveness"]),-Do(t,e,r,!0),0),i=Te(t.node1.getLayout()),o=Te(t.node2.getLayout()),s=[i,o];+n&&s.push([(i[0]+o[0])/2-(i[1]-o[1])*n,(i[1]+o[1])/2-(o[0]-i[0])*n]),t.setLayout(s)})}function Mm(a,e){a.eachSeriesByType("graph",function(t){var r=t.get("layout"),n=t.coordinateSystem;if(n&&n.type!=="view"){var i=t.getData(),o=[];D(n.dimensions,function(h){o=o.concat(i.mapDimensionsAll(h))});for(var s=0;s<i.count();s++){for(var l=[],u=!1,v=0;v<o.length;v++){var c=i.get(o[v],s);isNaN(c)||(u=!0),l.push(c)}u?i.setItemLayout(s,n.dataToPoint(l)):i.setItemLayout(s,[NaN,NaN])}kc(i.graph,t)}else(!r||r==="none")&&Rc(t)})}function Vr(a){var e=a.coordinateSystem;if(e.type!=="view")return 1;var t=a.option.nodeScaleRatio,r=e.scaleX,n=e.getZoom(),i=(n-1)*t+1;return i/r}function Er(a){var e=a.getVisual("symbolSize");return e instanceof Array&&(e=(e[0]+e[1])/2),+e}var xl=Math.PI,On=[];function Nc(a,e){var t=a.coordinateSystem;if(!(t&&t.type!=="view")){var r=t.getBoundingRect(),n=a.getData(),i=n.graph,o=r.width/2+r.x,s=r.height/2+r.y,l=Math.min(r.width,r.height)/2,u=n.count();n.setLayout({cx:o,cy:s}),u&&(Lm[e](a,i,n,l,o,s,u),i.eachEdge(function(v,c){var h=nn(v.getModel().get(["lineStyle","curveness"]),Do(v,a,c),0),f=Te(v.node1.getLayout()),p=Te(v.node2.getLayout()),d,g=(f[0]+p[0])/2,y=(f[1]+p[1])/2;+h&&(h*=3,d=[o*h+g*(1-h),s*h+y*(1-h)]),v.setLayout([f,p,d])}))}}var Lm={value:function(a,e,t,r,n,i,o){var s=0,l=t.getSum("value"),u=Math.PI*2/(l||o);e.eachNode(function(v){var c=v.getValue("value"),h=u*(l?c:1)/2;s+=h,v.setLayout([r*Math.cos(s)+n,r*Math.sin(s)+i]),s+=h})},symbolSize:function(a,e,t,r,n,i,o){var s=0;On.length=o;var l=Vr(a);e.eachNode(function(c){var h=Er(c);isNaN(h)&&(h=2),h<0&&(h=0),h*=l;var f=Math.asin(h/2/r);isNaN(f)&&(f=xl/2),On[c.dataIndex]=f,s+=f*2});var u=(2*xl-s)/o/2,v=0;e.eachNode(function(c){var h=u+On[c.dataIndex];v+=h,c.setLayout([r*Math.cos(v)+n,r*Math.sin(v)+i]),v+=h})}};function Pm(a){a.eachSeriesByType("graph",function(e){e.get("layout")==="circular"&&Nc(e,"symbolSize")})}var tr=bi;function Vm(a,e,t){for(var r=a,n=e,i=t.rect,o=i.width,s=i.height,l=[i.x+o/2,i.y+s/2],u=t.gravity==null?.1:t.gravity,v=0;v<r.length;v++){var c=r[v];c.p||(c.p=Mf(o*(Math.random()-.5)+l[0],s*(Math.random()-.5)+l[1])),c.pp=Te(c.p),c.edges=null}var h=t.friction==null?.6:t.friction,f=h,p,d;return{warmUp:function(){f=h*.8},setFixed:function(g){r[g].fixed=!0},setUnfixed:function(g){r[g].fixed=!1},beforeStep:function(g){p=g},afterStep:function(g){d=g},step:function(g){p&&p(r,n);for(var y=[],m=r.length,S=0;S<n.length;S++){var x=n[S];if(!x.ignoreForceLayout){var w=x.n1,_=x.n2;sr(y,_.p,w.p);var b=ts(y)-x.d,A=_.w/(w.w+_.w);isNaN(A)&&(A=0),on(y,y),!w.fixed&&tr(w.p,w.p,y,A*b*f),!_.fixed&&tr(_.p,_.p,y,-(1-A)*b*f)}}for(var S=0;S<m;S++){var T=r[S];T.fixed||(sr(y,l,T.p),tr(T.p,T.p,y,u*f))}for(var S=0;S<m;S++)for(var w=r[S],I=S+1;I<m;I++){var _=r[I];sr(y,_.p,w.p);var b=ts(y);b===0&&(Lf(y,Math.random()-.5,Math.random()-.5),b=1);var C=(w.rep+_.rep)/b/b;!w.fixed&&tr(w.pp,w.pp,y,C),!_.fixed&&tr(_.pp,_.pp,y,-C)}for(var E=[],S=0;S<m;S++){var T=r[S];T.fixed||(sr(E,T.p,T.pp),tr(T.p,T.p,E,f),Mt(T.pp,T.p))}f=f*.992;var V=f<.01;d&&d(r,n,V),g&&g(V)}}}function Em(a){a.eachSeriesByType("graph",function(e){var t=e.coordinateSystem;if(!(t&&t.type!=="view"))if(e.get("layout")==="force"){var r=e.preservedPoints||{},n=e.getGraph(),i=n.data,o=n.edgeData,s=e.getModel("force"),l=s.get("initLayout");e.preservedPoints?i.each(function(S){var x=i.getId(S);i.setItemLayout(S,r[x]||[NaN,NaN])}):!l||l==="none"?Rc(e):l==="circular"&&Nc(e,"value");var u=i.getDataExtent("value"),v=o.getDataExtent("value"),c=s.get("repulsion"),h=s.get("edgeLength"),f=W(c)?c:[c,c],p=W(h)?h:[h,h];p=[p[1],p[0]];var d=i.mapArray("value",function(S,x){var w=i.getItemLayout(x),_=xt(S,u,f);return isNaN(_)&&(_=(f[0]+f[1])/2),{w:_,rep:_,fixed:i.getItemModel(x).get("fixed"),p:!w||isNaN(w[0])||isNaN(w[1])?null:w}}),g=o.mapArray("value",function(S,x){var w=n.getEdgeByIndex(x),_=xt(S,v,p);isNaN(_)&&(_=(p[0]+p[1])/2);var b=w.getModel(),A=nn(w.getModel().get(["lineStyle","curveness"]),-Do(w,e,x,!0),0);return{n1:d[w.node1.dataIndex],n2:d[w.node2.dataIndex],d:_,curveness:A,ignoreForceLayout:b.get("ignoreForceLayout")}}),y=t.getBoundingRect(),m=Vm(d,g,{rect:y,gravity:s.get("gravity"),friction:s.get("friction")});m.beforeStep(function(S,x){for(var w=0,_=S.length;w<_;w++)S[w].fixed&&Mt(S[w].p,n.getNodeByIndex(w).getLayout())}),m.afterStep(function(S,x,w){for(var _=0,b=S.length;_<b;_++)S[_].fixed||n.getNodeByIndex(_).setLayout(S[_].p),r[i.getId(_)]=S[_].p;for(var _=0,b=x.length;_<b;_++){var A=x[_],T=n.getEdgeByIndex(_),I=A.n1.p,C=A.n2.p,E=T.getLayout();E=E?E.slice():[],E[0]=E[0]||[],E[1]=E[1]||[],Mt(E[0],I),Mt(E[1],C),+A.curveness&&(E[2]=[(I[0]+C[0])/2-(I[1]-C[1])*A.curveness,(I[1]+C[1])/2-(C[0]-I[0])*A.curveness]),T.setLayout(E)}}),e.forceLayout=m,e.preservedPoints=r,m.step()}else e.forceLayout=null})}function Rm(a,e,t){var r=$(a.getBoxLayoutParams(),{aspect:t});return ne(r,{width:e.getWidth(),height:e.getHeight()})}function km(a,e){var t=[];return a.eachSeriesByType("graph",function(r){var n=r.get("coordinateSystem");if(!n||n==="view"){var i=r.getData(),o=i.mapArray(function(g){var y=i.getItemModel(g);return[+y.get("x"),+y.get("y")]}),s=[],l=[];an(o,s,l),l[0]-s[0]===0&&(l[0]+=1,s[0]-=1),l[1]-s[1]===0&&(l[1]+=1,s[1]-=1);var u=(l[0]-s[0])/(l[1]-s[1]),v=Rm(r,e,u);isNaN(u)&&(s=[v.x,v.y],l=[v.x+v.width,v.y+v.height]);var c=l[0]-s[0],h=l[1]-s[1],f=v.width,p=v.height,d=r.coordinateSystem=new ea;d.zoomLimit=r.get("scaleLimit"),d.setBoundingRect(s[0],s[1],c,h),d.setViewRect(v.x,v.y,f,p),d.setCenter(r.get("center")),d.setZoom(r.get("zoom")),t.push(d)}}),t}var _l=te.prototype,Bn=Cv.prototype,zc=function(){function a(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return a}();(function(a){z(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e})(zc);function Fn(a){return isNaN(+a.cpx1)||isNaN(+a.cpy1)}var Nm=function(a){z(e,a);function e(t){var r=a.call(this,t)||this;return r.type="ec-line",r}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new zc},e.prototype.buildPath=function(t,r){Fn(r)?_l.buildPath.call(this,t,r):Bn.buildPath.call(this,t,r)},e.prototype.pointAt=function(t){return Fn(this.shape)?_l.pointAt.call(this,t):Bn.pointAt.call(this,t)},e.prototype.tangentAt=function(t){var r=this.shape,n=Fn(r)?[r.x2-r.x1,r.y2-r.y1]:Bn.tangentAt.call(this,t);return on(n,n)},e}(It);const zm=Nm;var Hn=["fromSymbol","toSymbol"];function wl(a){return"_"+a+"Type"}function bl(a,e,t){var r=e.getItemVisual(t,a);if(!(!r||r==="none")){var n=e.getItemVisual(t,a+"Size"),i=e.getItemVisual(t,a+"Rotate"),o=e.getItemVisual(t,a+"Offset"),s=e.getItemVisual(t,a+"KeepAspect"),l=Ka(n),u=sn(o||0,l),v=jt(r,-l[0]/2+u[0],-l[1]/2+u[1],l[0],l[1],null,s);return v.__specifiedRotation=i==null||isNaN(i)?void 0:+i*Math.PI/180||0,v.name=a,v}}function Gm(a){var e=new zm({name:"line",subPixelOptimize:!0});return Bi(e.shape,a),e}function Bi(a,e){a.x1=e[0][0],a.y1=e[0][1],a.x2=e[1][0],a.y2=e[1][1],a.percent=1;var t=e[2];t?(a.cpx1=t[0],a.cpy1=t[1]):(a.cpx1=NaN,a.cpy1=NaN)}var Om=function(a){z(e,a);function e(t,r,n){var i=a.call(this)||this;return i._createLine(t,r,n),i}return e.prototype._createLine=function(t,r,n){var i=t.hostModel,o=t.getItemLayout(r),s=Gm(o);s.shape.percent=0,ee(s,{shape:{percent:1}},i,r),this.add(s),D(Hn,function(l){var u=bl(l,t,r);this.add(u),this[wl(l)]=t.getItemVisual(r,l)},this),this._updateCommonStl(t,r,n)},e.prototype.updateData=function(t,r,n){var i=t.hostModel,o=this.childOfName("line"),s=t.getItemLayout(r),l={shape:{}};Bi(l.shape,s),vt(o,l,i,r),D(Hn,function(u){var v=t.getItemVisual(r,u),c=wl(u);if(this[c]!==v){this.remove(this.childOfName(u));var h=bl(u,t,r);this.add(h)}this[c]=v},this),this._updateCommonStl(t,r,n)},e.prototype.getLinePath=function(){return this.childAt(0)},e.prototype._updateCommonStl=function(t,r,n){var i=t.hostModel,o=this.childOfName("line"),s=n&&n.emphasisLineStyle,l=n&&n.blurLineStyle,u=n&&n.selectLineStyle,v=n&&n.labelStatesModels,c=n&&n.emphasisDisabled,h=n&&n.focus,f=n&&n.blurScope;if(!n||t.hasItemOption){var p=t.getItemModel(r),d=p.getModel("emphasis");s=d.getModel("lineStyle").getLineStyle(),l=p.getModel(["blur","lineStyle"]).getLineStyle(),u=p.getModel(["select","lineStyle"]).getLineStyle(),c=d.get("disabled"),h=d.get("focus"),f=d.get("blurScope"),v=Wt(p)}var g=t.getItemVisual(r,"style"),y=g.stroke;o.useStyle(g),o.style.fill=null,o.style.strokeNoScale=!0,o.ensureState("emphasis").style=s,o.ensureState("blur").style=l,o.ensureState("select").style=u,D(Hn,function(_){var b=this.childOfName(_);if(b){b.setColor(y),b.style.opacity=g.opacity;for(var A=0;A<Ai.length;A++){var T=Ai[A],I=o.getState(T);if(I){var C=I.style||{},E=b.ensureState(T),V=E.style||(E.style={});C.stroke!=null&&(V[b.__isEmptyBrush?"stroke":"fill"]=C.stroke),C.opacity!=null&&(V.opacity=C.opacity)}}b.markRedraw()}},this);var m=i.getRawValue(r);re(this,v,{labelDataIndex:r,labelFetcher:{getFormattedLabel:function(_,b){return i.getFormattedLabel(_,b,t.dataType)}},inheritColor:y||"#000",defaultOpacity:g.opacity,defaultText:(m==null?t.getName(r):isFinite(m)?ao(m):m)+""});var S=this.getTextContent();if(S){var x=v.normal;S.__align=S.style.align,S.__verticalAlign=S.style.verticalAlign,S.__position=x.get("position")||"middle";var w=x.get("distance");W(w)||(w=[w,w]),S.__labelDistance=w}this.setTextConfig({position:null,local:!0,inside:!1}),mt(this,h,f,c)},e.prototype.highlight=function(){no(this)},e.prototype.downplay=function(){io(this)},e.prototype.updateLayout=function(t,r){this.setLinePoints(t.getItemLayout(r))},e.prototype.setLinePoints=function(t){var r=this.childOfName("line");Bi(r.shape,t),r.dirty()},e.prototype.beforeUpdate=function(){var t=this,r=t.childOfName("fromSymbol"),n=t.childOfName("toSymbol"),i=t.getTextContent();if(!r&&!n&&(!i||i.ignore))return;for(var o=1,s=this.parent;s;)s.scaleX&&(o/=s.scaleX),s=s.parent;var l=t.childOfName("line");if(!this.__dirty&&!l.__dirty)return;var u=l.shape.percent,v=l.pointAt(0),c=l.pointAt(u),h=sr([],c,v);on(h,h);function f(I,C){var E=I.__specifiedRotation;if(E==null){var V=l.tangentAt(C);I.attr("rotation",(C===1?-1:1)*Math.PI/2-Math.atan2(V[1],V[0]))}else I.attr("rotation",E)}if(r&&(r.setPosition(v),f(r,0),r.scaleX=r.scaleY=o*u,r.markRedraw()),n&&(n.setPosition(c),f(n,1),n.scaleX=n.scaleY=o*u,n.markRedraw()),i&&!i.ignore){i.x=i.y=0,i.originX=i.originY=0;var p=void 0,d=void 0,g=i.__labelDistance,y=g[0]*o,m=g[1]*o,S=u/2,x=l.tangentAt(S),w=[x[1],-x[0]],_=l.pointAt(S);w[1]>0&&(w[0]=-w[0],w[1]=-w[1]);var b=x[0]<0?-1:1;if(i.__position!=="start"&&i.__position!=="end"){var A=-Math.atan2(x[1],x[0]);c[0]<v[0]&&(A=Math.PI+A),i.rotation=A}var T=void 0;switch(i.__position){case"insideStartTop":case"insideMiddleTop":case"insideEndTop":case"middle":T=-m,d="bottom";break;case"insideStartBottom":case"insideMiddleBottom":case"insideEndBottom":T=m,d="top";break;default:T=0,d="middle"}switch(i.__position){case"end":i.x=h[0]*y+c[0],i.y=h[1]*m+c[1],p=h[0]>.8?"left":h[0]<-.8?"right":"center",d=h[1]>.8?"top":h[1]<-.8?"bottom":"middle";break;case"start":i.x=-h[0]*y+v[0],i.y=-h[1]*m+v[1],p=h[0]>.8?"right":h[0]<-.8?"left":"center",d=h[1]>.8?"bottom":h[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":i.x=y*b+v[0],i.y=v[1]+T,p=x[0]<0?"right":"left",i.originX=-y*b,i.originY=-T;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":i.x=_[0],i.y=_[1]+T,p="center",i.originY=-T;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":i.x=-y*b+c[0],i.y=c[1]+T,p=x[0]>=0?"right":"left",i.originX=y*b,i.originY=-T;break}i.scaleX=i.scaleY=o,i.setStyle({verticalAlign:i.__verticalAlign||d,align:i.__align||p})}},e}(Z);const Co=Om;var Bm=function(){function a(e){this.group=new Z,this._LineCtor=e||Co}return a.prototype.updateData=function(e){var t=this;this._progressiveEls=null;var r=this,n=r.group,i=r._lineData;r._lineData=e,i||n.removeAll();var o=Al(e);e.diff(i).add(function(s){t._doAdd(e,s,o)}).update(function(s,l){t._doUpdate(i,e,l,s,o)}).remove(function(s){n.remove(i.getItemGraphicEl(s))}).execute()},a.prototype.updateLayout=function(){var e=this._lineData;!e||e.eachItemGraphicEl(function(t,r){t.updateLayout(e,r)},this)},a.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=Al(e),this._lineData=null,this.group.removeAll()},a.prototype.incrementalUpdate=function(e,t){this._progressiveEls=[];function r(s){!s.isGroup&&!Fm(s)&&(s.incremental=!0,s.ensureState("emphasis").hoverLayer=!0)}for(var n=e.start;n<e.end;n++){var i=t.getItemLayout(n);if(Wn(i)){var o=new this._LineCtor(t,n,this._seriesScope);o.traverse(r),this.group.add(o),t.setItemGraphicEl(n,o),this._progressiveEls.push(o)}}},a.prototype.remove=function(){this.group.removeAll()},a.prototype.eachRendered=function(e){ln(this._progressiveEls||this.group,e)},a.prototype._doAdd=function(e,t,r){var n=e.getItemLayout(t);if(!!Wn(n)){var i=new this._LineCtor(e,t,r);e.setItemGraphicEl(t,i),this.group.add(i)}},a.prototype._doUpdate=function(e,t,r,n,i){var o=e.getItemGraphicEl(r);if(!Wn(t.getItemLayout(n))){this.group.remove(o);return}o?o.updateData(t,n,i):o=new this._LineCtor(t,n,i),t.setItemGraphicEl(n,o),this.group.add(o)},a}();function Fm(a){return a.animators&&a.animators.length>0}function Al(a){var e=a.hostModel,t=e.getModel("emphasis");return{lineStyle:e.getModel("lineStyle").getLineStyle(),emphasisLineStyle:t.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:e.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:e.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:t.get("disabled"),blurScope:t.get("blurScope"),focus:t.get("focus"),labelStatesModels:Wt(e)}}function Tl(a){return isNaN(a[0])||isNaN(a[1])}function Wn(a){return a&&!Tl(a[0])&&!Tl(a[1])}const Mo=Bm;var $n=[],Un=[],Yn=[],er=Pv,Xn=Vf,Il=Math.abs;function Dl(a,e,t){for(var r=a[0],n=a[1],i=a[2],o=1/0,s,l=t*t,u=.1,v=.1;v<=.9;v+=.1){$n[0]=er(r[0],n[0],i[0],v),$n[1]=er(r[1],n[1],i[1],v);var c=Il(Xn($n,e)-l);c<o&&(o=c,s=v)}for(var h=0;h<32;h++){var f=s+u;Un[0]=er(r[0],n[0],i[0],s),Un[1]=er(r[1],n[1],i[1],s),Yn[0]=er(r[0],n[0],i[0],f),Yn[1]=er(r[1],n[1],i[1],f);var c=Xn(Un,e)-l;if(Il(c)<.01)break;var p=Xn(Yn,e)-l;u/=2,c<0?p>=0?s=s+u:s=s-u:p>=0?s=s-u:s=s+u}return s}function Zn(a,e){var t=[],r=Pf,n=[[],[],[]],i=[[],[]],o=[];e/=2,a.eachEdge(function(s,l){var u=s.getLayout(),v=s.getVisual("fromSymbol"),c=s.getVisual("toSymbol");u.__original||(u.__original=[Te(u[0]),Te(u[1])],u[2]&&u.__original.push(Te(u[2])));var h=u.__original;if(u[2]!=null){if(Mt(n[0],h[0]),Mt(n[1],h[2]),Mt(n[2],h[1]),v&&v!=="none"){var f=Er(s.node1),p=Dl(n,h[0],f*e);r(n[0][0],n[1][0],n[2][0],p,t),n[0][0]=t[3],n[1][0]=t[4],r(n[0][1],n[1][1],n[2][1],p,t),n[0][1]=t[3],n[1][1]=t[4]}if(c&&c!=="none"){var f=Er(s.node2),p=Dl(n,h[1],f*e);r(n[0][0],n[1][0],n[2][0],p,t),n[1][0]=t[1],n[2][0]=t[2],r(n[0][1],n[1][1],n[2][1],p,t),n[1][1]=t[1],n[2][1]=t[2]}Mt(u[0],n[0]),Mt(u[1],n[2]),Mt(u[2],n[1])}else{if(Mt(i[0],h[0]),Mt(i[1],h[1]),sr(o,i[1],i[0]),on(o,o),v&&v!=="none"){var f=Er(s.node1);bi(i[0],i[0],o,f*e)}if(c&&c!=="none"){var f=Er(s.node2);bi(i[1],i[1],o,-f*e)}Mt(u[0],i[0]),Mt(u[1],i[1])}})}function Cl(a){return a.type==="view"}var Hm=function(a){z(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,r){var n=new oo,i=new Mo,o=this.group;this._controller=new en(r.getZr()),this._controllerHost={target:o},o.add(n.group),o.add(i.group),this._symbolDraw=n,this._lineDraw=i,this._firstRender=!0},e.prototype.render=function(t,r,n){var i=this,o=t.coordinateSystem;this._model=t;var s=this._symbolDraw,l=this._lineDraw,u=this.group;if(Cl(o)){var v={x:o.x,y:o.y,scaleX:o.scaleX,scaleY:o.scaleY};this._firstRender?u.attr(v):vt(u,v,t)}Zn(t.getGraph(),Vr(t));var c=t.getData();s.updateData(c);var h=t.getEdgeData();l.updateData(h),this._updateNodeAndLinkScale(),this._updateController(t,r,n),clearTimeout(this._layoutTimeout);var f=t.forceLayout,p=t.get(["force","layoutAnimation"]);f&&this._startForceLayoutIteration(f,p),c.graph.eachNode(function(m){var S=m.dataIndex,x=m.getGraphicEl(),w=m.getModel();if(!!x){x.off("drag").off("dragend");var _=w.get("draggable");_&&x.on("drag",function(){f&&(f.warmUp(),!i._layouting&&i._startForceLayoutIteration(f,p),f.setFixed(S),c.setItemLayout(S,[x.x,x.y]))}).on("dragend",function(){f&&f.setUnfixed(S)}),x.setDraggable(_&&!!f);var b=w.get(["emphasis","focus"]);b==="adjacency"&&(it(x).focus=m.getAdjacentDataIndices())}}),c.graph.eachEdge(function(m){var S=m.getGraphicEl(),x=m.getModel().get(["emphasis","focus"]);!S||x==="adjacency"&&(it(S).focus={edge:[m.dataIndex],node:[m.node1.dataIndex,m.node2.dataIndex]})});var d=t.get("layout")==="circular"&&t.get(["circular","rotateLabel"]),g=c.getLayout("cx"),y=c.getLayout("cy");c.eachItemGraphicEl(function(m,S){var x=c.getItemModel(S),w=x.get(["label","rotate"])||0,_=m.getSymbolPath();if(d){var b=c.getItemLayout(S),A=Math.atan2(b[1]-y,b[0]-g);A<0&&(A=Math.PI*2+A);var T=b[0]<g;T&&(A=A-Math.PI);var I=T?"left":"right";_.setTextConfig({rotation:-A,position:I,origin:"center"});var C=_.ensureState("emphasis");$(C.textConfig||(C.textConfig={}),{position:I})}else _.setTextConfig({rotation:w*=Math.PI/180})}),this._firstRender=!1},e.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype._startForceLayoutIteration=function(t,r){var n=this;(function i(){t.step(function(o){n.updateLayout(n._model),(n._layouting=!o)&&(r?n._layoutTimeout=setTimeout(i,16):i())})})()},e.prototype._updateController=function(t,r,n){var i=this,o=this._controller,s=this._controllerHost,l=this.group;if(o.setPointerChecker(function(u,v,c){var h=l.getBoundingRect();return h.applyTransform(l.transform),h.contain(v,c)&&!Ji(u,n,t)}),!Cl(t.coordinateSystem)){o.disable();return}o.enable(t.get("roam")),s.zoomLimit=t.get("scaleLimit"),s.zoom=t.coordinateSystem.getZoom(),o.off("pan").off("zoom").on("pan",function(u){mo(s,u.dx,u.dy),n.dispatchAction({seriesId:t.id,type:"graphRoam",dx:u.dx,dy:u.dy})}).on("zoom",function(u){So(s,u.scale,u.originX,u.originY),n.dispatchAction({seriesId:t.id,type:"graphRoam",zoom:u.scale,originX:u.originX,originY:u.originY}),i._updateNodeAndLinkScale(),Zn(t.getGraph(),Vr(t)),i._lineDraw.updateLayout(),n.updateLabelLayout()})},e.prototype._updateNodeAndLinkScale=function(){var t=this._model,r=t.getData(),n=Vr(t);r.eachItemGraphicEl(function(i,o){i&&i.setSymbolScale(n)})},e.prototype.updateLayout=function(t){Zn(t.getGraph(),Vr(t)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},e.prototype.remove=function(t,r){this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()},e.type="graph",e}(St);const Wm=Hm;function rr(a){return"_EC_"+a}var $m=function(){function a(e){this.type="graph",this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=e||!1}return a.prototype.isDirected=function(){return this._directed},a.prototype.addNode=function(e,t){e=e==null?""+t:""+e;var r=this._nodesMap;if(!r[rr(e)]){var n=new Be(e,t);return n.hostGraph=this,this.nodes.push(n),r[rr(e)]=n,n}},a.prototype.getNodeByIndex=function(e){var t=this.data.getRawIndex(e);return this.nodes[t]},a.prototype.getNodeById=function(e){return this._nodesMap[rr(e)]},a.prototype.addEdge=function(e,t,r){var n=this._nodesMap,i=this._edgesMap;if(ce(e)&&(e=this.nodes[e]),ce(t)&&(t=this.nodes[t]),e instanceof Be||(e=n[rr(e)]),t instanceof Be||(t=n[rr(t)]),!(!e||!t)){var o=e.id+"-"+t.id,s=new Gc(e,t,r);return s.hostGraph=this,this._directed&&(e.outEdges.push(s),t.inEdges.push(s)),e.edges.push(s),e!==t&&t.edges.push(s),this.edges.push(s),i[o]=s,s}},a.prototype.getEdgeByIndex=function(e){var t=this.edgeData.getRawIndex(e);return this.edges[t]},a.prototype.getEdge=function(e,t){e instanceof Be&&(e=e.id),t instanceof Be&&(t=t.id);var r=this._edgesMap;return this._directed?r[e+"-"+t]:r[e+"-"+t]||r[t+"-"+e]},a.prototype.eachNode=function(e,t){for(var r=this.nodes,n=r.length,i=0;i<n;i++)r[i].dataIndex>=0&&e.call(t,r[i],i)},a.prototype.eachEdge=function(e,t){for(var r=this.edges,n=r.length,i=0;i<n;i++)r[i].dataIndex>=0&&r[i].node1.dataIndex>=0&&r[i].node2.dataIndex>=0&&e.call(t,r[i],i)},a.prototype.breadthFirstTraverse=function(e,t,r,n){if(t instanceof Be||(t=this._nodesMap[rr(t)]),!!t){for(var i=r==="out"?"outEdges":r==="in"?"inEdges":"edges",o=0;o<this.nodes.length;o++)this.nodes[o].__visited=!1;if(!e.call(n,t,null))for(var s=[t];s.length;)for(var l=s.shift(),u=l[i],o=0;o<u.length;o++){var v=u[o],c=v.node1===l?v.node2:v.node1;if(!c.__visited){if(e.call(n,c,l))return;s.push(c),c.__visited=!0}}}},a.prototype.update=function(){for(var e=this.data,t=this.edgeData,r=this.nodes,n=this.edges,i=0,o=r.length;i<o;i++)r[i].dataIndex=-1;for(var i=0,o=e.count();i<o;i++)r[e.getRawIndex(i)].dataIndex=i;t.filterSelf(function(s){var l=n[t.getRawIndex(s)];return l.node1.dataIndex>=0&&l.node2.dataIndex>=0});for(var i=0,o=n.length;i<o;i++)n[i].dataIndex=-1;for(var i=0,o=t.count();i<o;i++)n[t.getRawIndex(i)].dataIndex=i},a.prototype.clone=function(){for(var e=new a(this._directed),t=this.nodes,r=this.edges,n=0;n<t.length;n++)e.addNode(t[n].id,t[n].dataIndex);for(var n=0;n<r.length;n++){var i=r[n];e.addEdge(i.node1.id,i.node2.id,i.dataIndex)}return e},a}(),Be=function(){function a(e,t){this.inEdges=[],this.outEdges=[],this.edges=[],this.dataIndex=-1,this.id=e==null?"":e,this.dataIndex=t==null?-1:t}return a.prototype.degree=function(){return this.edges.length},a.prototype.inDegree=function(){return this.inEdges.length},a.prototype.outDegree=function(){return this.outEdges.length},a.prototype.getModel=function(e){if(!(this.dataIndex<0)){var t=this.hostGraph,r=t.data.getItemModel(this.dataIndex);return r.getModel(e)}},a.prototype.getAdjacentDataIndices=function(){for(var e={edge:[],node:[]},t=0;t<this.edges.length;t++){var r=this.edges[t];r.dataIndex<0||(e.edge.push(r.dataIndex),e.node.push(r.node1.dataIndex,r.node2.dataIndex))}return e},a}(),Gc=function(){function a(e,t,r){this.dataIndex=-1,this.node1=e,this.node2=t,this.dataIndex=r==null?-1:r}return a.prototype.getModel=function(e){if(!(this.dataIndex<0)){var t=this.hostGraph,r=t.edgeData.getItemModel(this.dataIndex);return r.getModel(e)}},a.prototype.getAdjacentDataIndices=function(){return{edge:[this.dataIndex],node:[this.node1.dataIndex,this.node2.dataIndex]}},a}();function Oc(a,e){return{getValue:function(t){var r=this[a][e];return r.getStore().get(r.getDimensionIndex(t||"value"),this.dataIndex)},setVisual:function(t,r){this.dataIndex>=0&&this[a][e].setItemVisual(this.dataIndex,t,r)},getVisual:function(t){return this[a][e].getItemVisual(this.dataIndex,t)},setLayout:function(t,r){this.dataIndex>=0&&this[a][e].setItemLayout(this.dataIndex,t,r)},getLayout:function(){return this[a][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[a][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[a][e].getRawIndex(this.dataIndex)}}}ae(Be,Oc("hostGraph","data"));ae(Gc,Oc("hostGraph","edgeData"));const Um=$m;function Bc(a,e,t,r,n){for(var i=new Um(r),o=0;o<a.length;o++)i.addNode(Ot(a[o].id,a[o].name,o),o);for(var s=[],l=[],u=0,o=0;o<e.length;o++){var v=e[o],c=v.source,h=v.target;i.addEdge(c,h,u)&&(l.push(v),s.push(Ot(ge(v.id,null),c+" > "+h)),u++)}var f=t.get("coordinateSystem"),p;if(f==="cartesian2d"||f==="polar")p=jr(a,t);else{var d=Vv.get(f),g=d?d.dimensions||[]:[];Ut(g,"value")<0&&g.concat(["value"]);var y=eo(a,{coordDimensions:g,encodeDefine:t.getEncode()}).dimensions;p=new Bt(y,t),p.initData(a)}var m=new Bt(["value"],t);return m.initData(l,s),n&&n(p,m),xc({mainData:p,struct:i,structAttr:"graph",datas:{node:p,edge:m},datasAttr:{node:"data",edge:"edgeData"}}),i.update(),i}var Ym=function(a){z(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.init=function(t){a.prototype.init.apply(this,arguments);var r=this;function n(){return r._categoriesData}this.legendVisualProvider=new ja(n,n),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},e.prototype.mergeOption=function(t){a.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},e.prototype.mergeDefaultAndTheme=function(t){a.prototype.mergeDefaultAndTheme.apply(this,arguments),rn(t,"edgeLabel",["show"])},e.prototype.getInitialData=function(t,r){var n=t.edges||t.links||[],i=t.data||t.nodes||[],o=this;if(i&&n){Dm(this);var s=Bc(i,n,this,!0,l);return D(s.edges,function(u){Cm(u.node1,u.node2,this,u.dataIndex)},this),s.data}function l(u,v){u.wrapMethod("getItemModel",function(p){var d=o._categoriesModels,g=p.getShallow("category"),y=d[g];return y&&(y.parentModel=p.parentModel,p.parentModel=y),p});var c=Jt.prototype.getModel;function h(p,d){var g=c.call(this,p,d);return g.resolveParentPath=f,g}v.wrapMethod("getItemModel",function(p){return p.resolveParentPath=f,p.getModel=h,p});function f(p){if(p&&(p[0]==="label"||p[1]==="label")){var d=p.slice();return p[0]==="label"?d[0]="edgeLabel":p[1]==="label"&&(d[1]="edgeLabel"),d}return p}}},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.getCategoriesData=function(){return this._categoriesData},e.prototype.formatTooltip=function(t,r,n){if(n==="edge"){var i=this.getData(),o=this.getDataParams(t,n),s=i.graph.getEdgeByIndex(t),l=i.getName(s.node1.dataIndex),u=i.getName(s.node2.dataIndex),v=[];return l!=null&&v.push(l),u!=null&&v.push(u),kt("nameValue",{name:v.join(" > "),value:o.value,noValue:o.value==null})}var c=Ef({series:this,dataIndex:t,multipleSeries:r});return c},e.prototype._updateCategoriesData=function(){var t=F(this.option.categories||[],function(n){return n.value!=null?n:$({value:0},n)}),r=new Bt(["value"],this);r.initData(t),this._categoriesData=r,this._categoriesModels=r.mapArray(function(n){return r.getItemModel(n)})},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.isAnimationEnabled=function(){return a.prototype.isAnimationEnabled.call(this)&&!(this.get("layout")==="force"&&this.get(["force","layoutAnimation"]))},e.type="series.graph",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={z:2,coordinateSystem:"view",legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},e}(bt);const Xm=Ym;var Zm={type:"graphRoam",event:"graphRoam",update:"none"};function qm(a){a.registerChartView(Wm),a.registerSeriesModel(Xm),a.registerProcessor(wm),a.registerVisual(bm),a.registerVisual(Am),a.registerLayout(Mm),a.registerLayout(a.PRIORITY.VISUAL.POST_CHART_LAYOUT,Pm),a.registerLayout(Em),a.registerCoordinateSystem("graphView",{dimensions:ea.dimensions,create:km}),a.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},pr),a.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},pr),a.registerAction(Zm,function(e,t){t.eachComponent({mainType:"series",query:e},function(r){var n=r.coordinateSystem,i=_o(n,e);r.setCenter&&r.setCenter(i.center),r.setZoom&&r.setZoom(i.zoom)})})}var Km=function(){function a(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return a}(),jm=function(a){z(e,a);function e(t){var r=a.call(this,t)||this;return r.type="pointer",r}return e.prototype.getDefaultShape=function(){return new Km},e.prototype.buildPath=function(t,r){var n=Math.cos,i=Math.sin,o=r.r,s=r.width,l=r.angle,u=r.x-n(l)*s*(s>=o/3?1:2),v=r.y-i(l)*s*(s>=o/3?1:2);l=r.angle-Math.PI/2,t.moveTo(u,v),t.lineTo(r.x+n(l)*s,r.y+i(l)*s),t.lineTo(r.x+n(r.angle)*o,r.y+i(r.angle)*o),t.lineTo(r.x-n(l)*s,r.y-i(l)*s),t.lineTo(u,v)},e}(It);const Jm=jm;function Qm(a,e){var t=a.get("center"),r=e.getWidth(),n=e.getHeight(),i=Math.min(r,n),o=H(t[0],e.getWidth()),s=H(t[1],e.getHeight()),l=H(a.get("radius"),i/2);return{cx:o,cy:s,r:l}}function va(a,e){var t=a==null?"":a+"";return e&&(tt(e)?t=e.replace("{value}",t):ot(e)&&(t=e(a))),t}var qn=Math.PI*2,t0=function(a){z(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,r,n){this.group.removeAll();var i=t.get(["axisLine","lineStyle","color"]),o=Qm(t,n);this._renderMain(t,r,n,i,o),this._data=t.getData()},e.prototype.dispose=function(){},e.prototype._renderMain=function(t,r,n,i,o){for(var s=this.group,l=t.get("clockwise"),u=-t.get("startAngle")/180*Math.PI,v=-t.get("endAngle")/180*Math.PI,c=t.getModel("axisLine"),h=c.get("roundCap"),f=h?rs:Ke,p=c.get("show"),d=c.getModel("lineStyle"),g=d.get("width"),y=!((v-u)%qn)&&v!==u?qn:(v-u)%qn,m=u,S=0;p&&S<i.length;S++){var x=Math.min(Math.max(i[S][0],0),1);v=u+y*x;var w=new f({shape:{startAngle:m,endAngle:v,cx:o.cx,cy:o.cy,clockwise:l,r0:o.r-g,r:o.r},silent:!0});w.setStyle({fill:i[S][1]}),w.setStyle(d.getLineStyle(["color","width"])),s.add(w),m=v}var _=function(A){if(A<=0)return i[0][1];var T;for(T=0;T<i.length;T++)if(i[T][0]>=A&&(T===0?0:i[T-1][0])<A)return i[T][1];return i[T-1][1]};if(!l){var b=u;u=v,v=b}this._renderTicks(t,r,n,_,o,u,v,l,g),this._renderTitleAndDetail(t,r,n,_,o),this._renderAnchor(t,o),this._renderPointer(t,r,n,_,o,u,v,l,g)},e.prototype._renderTicks=function(t,r,n,i,o,s,l,u,v){for(var c=this.group,h=o.cx,f=o.cy,p=o.r,d=+t.get("min"),g=+t.get("max"),y=t.getModel("splitLine"),m=t.getModel("axisTick"),S=t.getModel("axisLabel"),x=t.get("splitNumber"),w=m.get("splitNumber"),_=H(y.get("length"),p),b=H(m.get("length"),p),A=s,T=(l-s)/x,I=T/w,C=y.getModel("lineStyle").getLineStyle(),E=m.getModel("lineStyle").getLineStyle(),V=y.get("distance"),M,P,R=0;R<=x;R++){if(M=Math.cos(A),P=Math.sin(A),y.get("show")){var G=V?V+v:v,L=new te({shape:{x1:M*(p-G)+h,y1:P*(p-G)+f,x2:M*(p-_-G)+h,y2:P*(p-_-G)+f},style:C,silent:!0});C.stroke==="auto"&&L.setStyle({stroke:i(R/x)}),c.add(L)}if(S.get("show")){var G=S.get("distance")+V,k=va(ao(R/x*(g-d)+d),S.get("formatter")),N=i(R/x);c.add(new pt({style:Ft(S,{text:k,x:M*(p-_-G)+h,y:P*(p-_-G)+f,verticalAlign:P<-.8?"top":P>.8?"bottom":"middle",align:M<-.4?"left":M>.4?"right":"center"},{inheritColor:N}),silent:!0}))}if(m.get("show")&&R!==x){var G=m.get("distance");G=G?G+v:v;for(var O=0;O<=w;O++){M=Math.cos(A),P=Math.sin(A);var U=new te({shape:{x1:M*(p-G)+h,y1:P*(p-G)+f,x2:M*(p-b-G)+h,y2:P*(p-b-G)+f},silent:!0,style:E});E.stroke==="auto"&&U.setStyle({stroke:i((R+O/w)/x)}),c.add(U),A+=I}A-=I}else A+=T}},e.prototype._renderPointer=function(t,r,n,i,o,s,l,u,v){var c=this.group,h=this._data,f=this._progressEls,p=[],d=t.get(["pointer","show"]),g=t.getModel("progress"),y=g.get("show"),m=t.getData(),S=m.mapDimension("value"),x=+t.get("min"),w=+t.get("max"),_=[x,w],b=[s,l];function A(I,C){var E=m.getItemModel(I),V=E.getModel("pointer"),M=H(V.get("width"),o.r),P=H(V.get("length"),o.r),R=t.get(["pointer","icon"]),G=V.get("offsetCenter"),L=H(G[0],o.r),k=H(G[1],o.r),N=V.get("keepAspect"),O;return R?O=jt(R,L-M/2,k-P,M,P,null,N):O=new Jm({shape:{angle:-Math.PI/2,width:M,r:P,x:L,y:k}}),O.rotation=-(C+Math.PI/2),O.x=o.cx,O.y=o.cy,O}function T(I,C){var E=g.get("roundCap"),V=E?rs:Ke,M=g.get("overlap"),P=M?g.get("width"):v/m.count(),R=M?o.r-P:o.r-(I+1)*P,G=M?o.r:o.r-I*P,L=new V({shape:{startAngle:s,endAngle:C,cx:o.cx,cy:o.cy,clockwise:u,r0:R,r:G}});return M&&(L.z2=w-m.get(S,I)%w),L}(y||d)&&(m.diff(h).add(function(I){var C=m.get(S,I);if(d){var E=A(I,s);ee(E,{rotation:-((isNaN(+C)?b[0]:xt(C,_,b,!0))+Math.PI/2)},t),c.add(E),m.setItemGraphicEl(I,E)}if(y){var V=T(I,s),M=g.get("clip");ee(V,{shape:{endAngle:xt(C,_,b,M)}},t),c.add(V),es(t.seriesIndex,m.dataType,I,V),p[I]=V}}).update(function(I,C){var E=m.get(S,I);if(d){var V=h.getItemGraphicEl(C),M=V?V.rotation:s,P=A(I,M);P.rotation=M,vt(P,{rotation:-((isNaN(+E)?b[0]:xt(E,_,b,!0))+Math.PI/2)},t),c.add(P),m.setItemGraphicEl(I,P)}if(y){var R=f[C],G=R?R.shape.endAngle:s,L=T(I,G),k=g.get("clip");vt(L,{shape:{endAngle:xt(E,_,b,k)}},t),c.add(L),es(t.seriesIndex,m.dataType,I,L),p[I]=L}}).execute(),m.each(function(I){var C=m.getItemModel(I),E=C.getModel("emphasis"),V=E.get("focus"),M=E.get("blurScope"),P=E.get("disabled");if(d){var R=m.getItemGraphicEl(I),G=m.getItemVisual(I,"style"),L=G.fill;if(R instanceof fe){var k=R.style;R.useStyle($({image:k.image,x:k.x,y:k.y,width:k.width,height:k.height},G))}else R.useStyle(G),R.type!=="pointer"&&R.setColor(L);R.setStyle(C.getModel(["pointer","itemStyle"]).getItemStyle()),R.style.fill==="auto"&&R.setStyle("fill",i(xt(m.get(S,I),_,[0,1],!0))),R.z2EmphasisLift=0,Ht(R,C),mt(R,V,M,P)}if(y){var N=p[I];N.useStyle(m.getItemVisual(I,"style")),N.setStyle(C.getModel(["progress","itemStyle"]).getItemStyle()),N.z2EmphasisLift=0,Ht(N,C),mt(N,V,M,P)}}),this._progressEls=p)},e.prototype._renderAnchor=function(t,r){var n=t.getModel("anchor"),i=n.get("show");if(i){var o=n.get("size"),s=n.get("icon"),l=n.get("offsetCenter"),u=n.get("keepAspect"),v=jt(s,r.cx-o/2+H(l[0],r.r),r.cy-o/2+H(l[1],r.r),o,o,null,u);v.z2=n.get("showAbove")?1:0,v.setStyle(n.getModel("itemStyle").getItemStyle()),this.group.add(v)}},e.prototype._renderTitleAndDetail=function(t,r,n,i,o){var s=this,l=t.getData(),u=l.mapDimension("value"),v=+t.get("min"),c=+t.get("max"),h=new Z,f=[],p=[],d=t.isAnimationEnabled(),g=t.get(["pointer","showAbove"]);l.diff(this._data).add(function(y){f[y]=new pt({silent:!0}),p[y]=new pt({silent:!0})}).update(function(y,m){f[y]=s._titleEls[m],p[y]=s._detailEls[m]}).execute(),l.each(function(y){var m=l.getItemModel(y),S=l.get(u,y),x=new Z,w=i(xt(S,[v,c],[0,1],!0)),_=m.getModel("title");if(_.get("show")){var b=_.get("offsetCenter"),A=o.cx+H(b[0],o.r),T=o.cy+H(b[1],o.r),I=f[y];I.attr({z2:g?0:2,style:Ft(_,{x:A,y:T,text:l.getName(y),align:"center",verticalAlign:"middle"},{inheritColor:w})}),x.add(I)}var C=m.getModel("detail");if(C.get("show")){var E=C.get("offsetCenter"),V=o.cx+H(E[0],o.r),M=o.cy+H(E[1],o.r),P=H(C.get("width"),o.r),R=H(C.get("height"),o.r),G=t.get(["progress","show"])?l.getItemVisual(y,"style").fill:w,I=p[y],L=C.get("formatter");I.attr({z2:g?0:2,style:Ft(C,{x:V,y:M,text:va(S,L),width:isNaN(P)?null:P,height:isNaN(R)?null:R,align:"center",verticalAlign:"middle"},{inheritColor:G})}),Rf(I,{normal:C},S,function(N){return va(N,L)}),d&&kf(I,y,l,t,{getFormattedLabel:function(N,O,U,Y,J,gt){return va(gt?gt.interpolatedValue:S,L)}}),x.add(I)}h.add(x)}),this.group.add(h),this._titleEls=f,this._detailEls=p},e.type="gauge",e}(St);const e0=t0;var r0=function(a){z(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.visualStyleAccessPath="itemStyle",t}return e.prototype.getInitialData=function(t,r){return qr(this,["value"])},e.type="series.gauge",e.defaultOption={z:2,colorBy:"data",center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,"#E6EBF8"]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:"#63677A",width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:"#63677A",width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:"#464646",fontSize:12},pointer:{icon:null,offsetCenter:[0,0],show:!0,showAbove:!0,length:"60%",width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:"circle",offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:"#fff",borderWidth:0,borderColor:"#5470c6"}},title:{show:!0,offsetCenter:[0,"20%"],color:"#464646",fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"#464646",fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},e}(bt);const a0=r0;function n0(a){a.registerChartView(e0),a.registerSeriesModel(a0)}var i0=["itemStyle","opacity"],o0=function(a){z(e,a);function e(t,r){var n=a.call(this)||this,i=n,o=new Pe,s=new pt;return i.setTextContent(s),n.setTextGuideLine(o),n.updateData(t,r,!0),n}return e.prototype.updateData=function(t,r,n){var i=this,o=t.hostModel,s=t.getItemModel(r),l=t.getItemLayout(r),u=s.getModel("emphasis"),v=s.get(i0);v=v==null?1:v,n||De(i),i.useStyle(t.getItemVisual(r,"style")),i.style.lineJoin="round",n?(i.setShape({points:l.points}),i.style.opacity=0,ee(i,{style:{opacity:v}},o,r)):vt(i,{style:{opacity:v},shape:{points:l.points}},o,r),Ht(i,s),this._updateLabel(t,r),mt(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t,r){var n=this,i=this.getTextGuideLine(),o=n.getTextContent(),s=t.hostModel,l=t.getItemModel(r),u=t.getItemLayout(r),v=u.label,c=t.getItemVisual(r,"style"),h=c.fill;re(o,Wt(l),{labelFetcher:t.hostModel,labelDataIndex:r,defaultOpacity:c.opacity,defaultText:t.getName(r)},{normal:{align:v.textAlign,verticalAlign:v.verticalAlign}}),n.setTextConfig({local:!0,inside:!!v.inside,insideStroke:h,outsideFill:h});var f=v.linePoints;i.setShape({points:f}),n.textGuideLineConfig={anchor:f?new be(f[0][0],f[0][1]):null},vt(o,{style:{x:v.x,y:v.y}},s,r),o.attr({rotation:v.rotation,originX:v.x,originY:v.y,z2:10}),Nf(n,zf(l),{stroke:h})},e}(he),s0=function(a){z(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.ignoreLabelLineUpdate=!0,t}return e.prototype.render=function(t,r,n){var i=t.getData(),o=this._data,s=this.group;i.diff(o).add(function(l){var u=new o0(i,l);i.setItemGraphicEl(l,u),s.add(u)}).update(function(l,u){var v=o.getItemGraphicEl(u);v.updateData(i,l),s.add(v),i.setItemGraphicEl(l,v)}).remove(function(l){var u=o.getItemGraphicEl(l);Gf(u,t,l)}).execute(),this._data=i},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.prototype.dispose=function(){},e.type="funnel",e}(St);const l0=s0;var u0=function(a){z(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t){a.prototype.init.apply(this,arguments),this.legendVisualProvider=new ja(q(this.getData,this),q(this.getRawData,this)),this._defaultLabelLine(t)},e.prototype.getInitialData=function(t,r){return qr(this,{coordDimensions:["value"],encodeDefaulter:st(Tv,this)})},e.prototype._defaultLabelLine=function(t){rn(t,"labelLine",["show"]);var r=t.labelLine,n=t.emphasis.labelLine;r.show=r.show&&t.label.show,n.show=n.show&&t.emphasis.label.show},e.prototype.getDataParams=function(t){var r=this.getData(),n=a.prototype.getDataParams.call(this,t),i=r.mapDimension("value"),o=r.getSum(i);return n.percent=o?+(r.get(i,t)/o*100).toFixed(2):0,n.$vars.push("percent"),n},e.type="series.funnel",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",orient:"vertical",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},e}(bt);const v0=u0;function c0(a,e){return ne(a.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function h0(a,e){for(var t=a.mapDimension("value"),r=a.mapArray(t,function(l){return l}),n=[],i=e==="ascending",o=0,s=a.count();o<s;o++)n[o]=o;return ot(e)?n.sort(e):e!=="none"&&n.sort(function(l,u){return i?r[l]-r[u]:r[u]-r[l]}),n}function f0(a){var e=a.hostModel,t=e.get("orient");a.each(function(r){var n=a.getItemModel(r),i=n.getModel("label"),o=i.get("position"),s=n.getModel("labelLine"),l=a.getItemLayout(r),u=l.points,v=o==="inner"||o==="inside"||o==="center"||o==="insideLeft"||o==="insideRight",c,h,f,p;if(v)o==="insideLeft"?(h=(u[0][0]+u[3][0])/2+5,f=(u[0][1]+u[3][1])/2,c="left"):o==="insideRight"?(h=(u[1][0]+u[2][0])/2-5,f=(u[1][1]+u[2][1])/2,c="right"):(h=(u[0][0]+u[1][0]+u[2][0]+u[3][0])/4,f=(u[0][1]+u[1][1]+u[2][1]+u[3][1])/4,c="center"),p=[[h,f],[h,f]];else{var d=void 0,g=void 0,y=void 0,m=void 0,S=s.get("length");o==="left"?(d=(u[3][0]+u[0][0])/2,g=(u[3][1]+u[0][1])/2,y=d-S,h=y-5,c="right"):o==="right"?(d=(u[1][0]+u[2][0])/2,g=(u[1][1]+u[2][1])/2,y=d+S,h=y+5,c="left"):o==="top"?(d=(u[3][0]+u[0][0])/2,g=(u[3][1]+u[0][1])/2,m=g-S,f=m-5,c="center"):o==="bottom"?(d=(u[1][0]+u[2][0])/2,g=(u[1][1]+u[2][1])/2,m=g+S,f=m+5,c="center"):o==="rightTop"?(d=t==="horizontal"?u[3][0]:u[1][0],g=t==="horizontal"?u[3][1]:u[1][1],t==="horizontal"?(m=g-S,f=m-5,c="center"):(y=d+S,h=y+5,c="top")):o==="rightBottom"?(d=u[2][0],g=u[2][1],t==="horizontal"?(m=g+S,f=m+5,c="center"):(y=d+S,h=y+5,c="bottom")):o==="leftTop"?(d=u[0][0],g=t==="horizontal"?u[0][1]:u[1][1],t==="horizontal"?(m=g-S,f=m-5,c="center"):(y=d-S,h=y-5,c="right")):o==="leftBottom"?(d=t==="horizontal"?u[1][0]:u[3][0],g=t==="horizontal"?u[1][1]:u[2][1],t==="horizontal"?(m=g+S,f=m+5,c="center"):(y=d-S,h=y-5,c="right")):(d=(u[1][0]+u[2][0])/2,g=(u[1][1]+u[2][1])/2,t==="horizontal"?(m=g+S,f=m+5,c="center"):(y=d+S,h=y+5,c="left")),t==="horizontal"?(y=d,h=y):(m=g,f=m),p=[[d,g],[y,m]]}l.label={linePoints:p,x:h,y:f,verticalAlign:"middle",textAlign:c,inside:v}})}function p0(a,e){a.eachSeriesByType("funnel",function(t){var r=t.getData(),n=r.mapDimension("value"),i=t.get("sort"),o=c0(t,e),s=t.get("orient"),l=o.width,u=o.height,v=h0(r,i),c=o.x,h=o.y,f=s==="horizontal"?[H(t.get("minSize"),u),H(t.get("maxSize"),u)]:[H(t.get("minSize"),l),H(t.get("maxSize"),l)],p=r.getDataExtent(n),d=t.get("min"),g=t.get("max");d==null&&(d=Math.min(p[0],0)),g==null&&(g=p[1]);var y=t.get("funnelAlign"),m=t.get("gap"),S=s==="horizontal"?l:u,x=(S-m*(r.count()-1))/r.count(),w=function(M,P){if(s==="horizontal"){var R=r.get(n,M)||0,G=xt(R,[d,g],f,!0),L=void 0;switch(y){case"top":L=h;break;case"center":L=h+(u-G)/2;break;case"bottom":L=h+(u-G);break}return[[P,L],[P,L+G]]}var k=r.get(n,M)||0,N=xt(k,[d,g],f,!0),O;switch(y){case"left":O=c;break;case"center":O=c+(l-N)/2;break;case"right":O=c+l-N;break}return[[O,P],[O+N,P]]};i==="ascending"&&(x=-x,m=-m,s==="horizontal"?c+=l:h+=u,v=v.reverse());for(var _=0;_<v.length;_++){var b=v[_],A=v[_+1],T=r.getItemModel(b);if(s==="horizontal"){var I=T.get(["itemStyle","width"]);I==null?I=x:(I=H(I,l),i==="ascending"&&(I=-I));var C=w(b,c),E=w(A,c+I);c+=I+m,r.setItemLayout(b,{points:C.concat(E.slice().reverse())})}else{var V=T.get(["itemStyle","height"]);V==null?V=x:(V=H(V,u),i==="ascending"&&(V=-V));var C=w(b,h),E=w(A,h+V);h+=V+m,r.setItemLayout(b,{points:C.concat(E.slice().reverse())})}}f0(r)})}function d0(a){a.registerChartView(l0),a.registerSeriesModel(v0),a.registerLayout(p0),a.registerProcessor(Qa("funnel"))}var g0=.3,y0=function(a){z(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t._dataGroup=new Z,t._initialized=!1,t}return e.prototype.init=function(){this.group.add(this._dataGroup)},e.prototype.render=function(t,r,n,i){this._progressiveEls=null;var o=this._dataGroup,s=t.getData(),l=this._data,u=t.coordinateSystem,v=u.dimensions,c=Ll(t);s.diff(l).add(h).update(f).remove(p).execute();function h(g){var y=Ml(s,o,g,v,u);Kn(y,s,g,c)}function f(g,y){var m=l.getItemGraphicEl(y),S=Fc(s,g,v,u);s.setItemGraphicEl(g,m),vt(m,{shape:{points:S}},t,g),De(m),Kn(m,s,g,c)}function p(g){var y=l.getItemGraphicEl(g);o.remove(y)}if(!this._initialized){this._initialized=!0;var d=m0(u,t,function(){setTimeout(function(){o.removeClipPath()})});o.setClipPath(d)}this._data=s},e.prototype.incrementalPrepareRender=function(t,r,n){this._initialized=!0,this._data=null,this._dataGroup.removeAll()},e.prototype.incrementalRender=function(t,r,n){for(var i=r.getData(),o=r.coordinateSystem,s=o.dimensions,l=Ll(r),u=this._progressiveEls=[],v=t.start;v<t.end;v++){var c=Ml(i,this._dataGroup,v,s,o);c.incremental=!0,Kn(c,i,v,l),u.push(c)}},e.prototype.remove=function(){this._dataGroup&&this._dataGroup.removeAll(),this._data=null},e.type="parallel",e}(St);function m0(a,e,t){var r=a.model,n=a.getRect(),i=new Tt({shape:{x:n.x,y:n.y,width:n.width,height:n.height}}),o=r.get("layout")==="horizontal"?"width":"height";return i.setShape(o,0),ee(i,{shape:{width:n.width,height:n.height}},e,t),i}function Fc(a,e,t,r){for(var n=[],i=0;i<t.length;i++){var o=t[i],s=a.get(a.mapDimension(o),e);S0(s,r.getAxis(o).type)||n.push(r.dataToPoint(s,o))}return n}function Ml(a,e,t,r,n){var i=Fc(a,t,r,n),o=new Pe({shape:{points:i},z2:10});return e.add(o),a.setItemGraphicEl(t,o),o}function Ll(a){var e=a.get("smooth",!0);return e===!0&&(e=g0),e=Of(e),Bf(e)&&(e=0),{smooth:e}}function Kn(a,e,t,r){a.useStyle(e.getItemVisual(t,"style")),a.style.fill=null,a.setShape("smooth",r.smooth);var n=e.getItemModel(t),i=n.getModel("emphasis");Ht(a,n,"lineStyle"),mt(a,i.get("focus"),i.get("blurScope"),i.get("disabled"))}function S0(a,e){return e==="category"?a==null:a==null||isNaN(a)}const x0=y0;var _0=function(a){z(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.visualStyleAccessPath="lineStyle",t.visualDrawType="stroke",t}return e.prototype.getInitialData=function(t,r){return jr(null,this,{useEncodeDefaulter:q(w0,null,this)})},e.prototype.getRawIndicesByActiveState=function(t){var r=this.coordinateSystem,n=this.getData(),i=[];return r.eachActiveState(n,function(o,s){t===o&&i.push(n.getRawIndex(s))}),i},e.type="series.parallel",e.dependencies=["parallel"],e.defaultOption={z:2,coordinateSystem:"parallel",parallelIndex:0,label:{show:!1},inactiveOpacity:.05,activeOpacity:1,lineStyle:{width:1,opacity:.45,type:"solid"},emphasis:{label:{show:!1}},progressive:500,smooth:!1,animationEasing:"linear"},e}(bt);function w0(a){var e=a.ecModel.getComponent("parallel",a.get("parallelIndex"));if(!!e){var t={};return D(e.dimensions,function(r){var n=b0(r);t[r]=n}),t}}function b0(a){return+a.replace("dim","")}const A0=_0;var T0=["lineStyle","opacity"],I0={seriesType:"parallel",reset:function(a,e){var t=a.coordinateSystem,r={normal:a.get(["lineStyle","opacity"]),active:a.get("activeOpacity"),inactive:a.get("inactiveOpacity")};return{progress:function(n,i){t.eachActiveState(i,function(o,s){var l=r[o];if(o==="normal"&&i.hasItemOption){var u=i.getItemModel(s).get(T0,!0);u!=null&&(l=u)}var v=i.ensureUniqueItemVisual(s,"style");v.opacity=l},n.start,n.end)}}}};const D0=I0;function C0(a){M0(a),L0(a)}function M0(a){if(!a.parallel){var e=!1;D(a.series,function(t){t&&t.type==="parallel"&&(e=!0)}),e&&(a.parallel=[{}])}}function L0(a){var e=Lt(a.parallelAxis);D(e,function(t){if(!!Rt(t)){var r=t.parallelIndex||0,n=Lt(a.parallel)[r];n&&n.parallelAxisDefault&&$t(t,n.parallelAxisDefault,!1)}})}var P0=5,V0=function(a){z(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,r,n){this._model=t,this._api=n,this._handlers||(this._handlers={},D(E0,function(i,o){n.getZr().on(o,this._handlers[o]=q(i,this))},this)),Ev(this,"_throttledDispatchExpand",t.get("axisExpandRate"),"fixRate")},e.prototype.dispose=function(t,r){Ff(this,"_throttledDispatchExpand"),D(this._handlers,function(n,i){r.getZr().off(i,n)}),this._handlers=null},e.prototype._throttledDispatchExpand=function(t){this._dispatchExpand(t)},e.prototype._dispatchExpand=function(t){t&&this._api.dispatchAction($({type:"parallelAxisExpand"},t))},e.type="parallel",e}(Yt),E0={mousedown:function(a){jn(this,"click")&&(this._mouseDownPoint=[a.offsetX,a.offsetY])},mouseup:function(a){var e=this._mouseDownPoint;if(jn(this,"click")&&e){var t=[a.offsetX,a.offsetY],r=Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2);if(r>P0)return;var n=this._model.coordinateSystem.getSlidedAxisExpandWindow([a.offsetX,a.offsetY]);n.behavior!=="none"&&this._dispatchExpand({axisExpandWindow:n.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(a){if(!(this._mouseDownPoint||!jn(this,"mousemove"))){var e=this._model,t=e.coordinateSystem.getSlidedAxisExpandWindow([a.offsetX,a.offsetY]),r=t.behavior;r==="jump"&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand(r==="none"?null:{axisExpandWindow:t.axisExpandWindow,animation:r==="jump"?null:{duration:0}})}}};function jn(a,e){var t=a._model;return t.get("axisExpandable")&&t.get("axisExpandTriggerOn")===e}const R0=V0;var k0=function(a){z(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){a.prototype.init.apply(this,arguments),this.mergeOption({})},e.prototype.mergeOption=function(t){var r=this.option;t&&$t(r,t,!0),this._initDimensions()},e.prototype.contains=function(t,r){var n=t.get("parallelIndex");return n!=null&&r.getComponent("parallel",n)===this},e.prototype.setAxisExpand=function(t){D(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(r){t.hasOwnProperty(r)&&(this.option[r]=t[r])},this)},e.prototype._initDimensions=function(){var t=this.dimensions=[],r=this.parallelAxisIndex=[],n=Et(this.ecModel.queryComponents({mainType:"parallelAxis"}),function(i){return(i.get("parallelIndex")||0)===this.componentIndex},this);D(n,function(i){t.push("dim"+i.get("dim")),r.push(i.componentIndex)})},e.type="parallel",e.dependencies=["parallelAxis"],e.layoutMode="box",e.defaultOption={z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},e}(Nt);const N0=k0;var z0=function(a){z(e,a);function e(t,r,n,i,o){var s=a.call(this,t,r,n)||this;return s.type=i||"value",s.axisIndex=o,s}return e.prototype.isHorizontal=function(){return this.coordinateSystem.getModel().get("layout")!=="horizontal"},e}(pe);const G0=z0;var Jn=D,Hc=Math.min,Wc=Math.max,Pl=Math.floor,O0=Math.ceil,Vl=ao,B0=Math.PI,F0=function(){function a(e,t,r){this.type="parallel",this._axesMap=nt(),this._axesLayout={},this.dimensions=e.dimensions,this._model=e,this._init(e,t,r)}return a.prototype._init=function(e,t,r){var n=e.dimensions,i=e.parallelAxisIndex;Jn(n,function(o,s){var l=i[s],u=t.getComponent("parallelAxis",l),v=this._axesMap.set(o,new G0(o,so(u),[0,0],u.get("type"),l)),c=v.type==="category";v.onBand=c&&u.get("boundaryGap"),v.inverse=u.get("inverse"),u.axis=v,v.model=u,v.coordinateSystem=u.coordinateSystem=this},this)},a.prototype.update=function(e,t){this._updateAxesFromSeries(this._model,e)},a.prototype.containPoint=function(e){var t=this._makeLayoutInfo(),r=t.axisBase,n=t.layoutBase,i=t.pixelDimIndex,o=e[1-i],s=e[i];return o>=r&&o<=r+t.axisLength&&s>=n&&s<=n+t.layoutLength},a.prototype.getModel=function(){return this._model},a.prototype._updateAxesFromSeries=function(e,t){t.eachSeries(function(r){if(!!e.contains(r,t)){var n=r.getData();Jn(this.dimensions,function(i){var o=this._axesMap.get(i);o.scale.unionExtentFromData(n,n.mapDimension(i)),Ia(o.scale,o.model)},this)}},this)},a.prototype.resize=function(e,t){this._rect=ne(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()}),this._layoutAxes()},a.prototype.getRect=function(){return this._rect},a.prototype._makeLayoutInfo=function(){var e=this._model,t=this._rect,r=["x","y"],n=["width","height"],i=e.get("layout"),o=i==="horizontal"?0:1,s=t[n[o]],l=[0,s],u=this.dimensions.length,v=ca(e.get("axisExpandWidth"),l),c=ca(e.get("axisExpandCount")||0,[0,u]),h=e.get("axisExpandable")&&u>3&&u>c&&c>1&&v>0&&s>0,f=e.get("axisExpandWindow"),p;if(f)p=ca(f[1]-f[0],l),f[1]=f[0]+p;else{p=ca(v*(c-1),l);var d=e.get("axisExpandCenter")||Pl(u/2);f=[v*d-p/2],f[1]=f[0]+p}var g=(s-p)/(u-c);g<3&&(g=0);var y=[Pl(Vl(f[0]/v,1))+1,O0(Vl(f[1]/v,1))-1],m=g/v*f[0];return{layout:i,pixelDimIndex:o,layoutBase:t[r[o]],layoutLength:s,axisBase:t[r[1-o]],axisLength:t[n[1-o]],axisExpandable:h,axisExpandWidth:v,axisCollapseWidth:g,axisExpandWindow:f,axisCount:u,winInnerIndices:y,axisExpandWindow0Pos:m}},a.prototype._layoutAxes=function(){var e=this._rect,t=this._axesMap,r=this.dimensions,n=this._makeLayoutInfo(),i=n.layout;t.each(function(o){var s=[0,n.axisLength],l=o.inverse?1:0;o.setExtent(s[l],s[1-l])}),Jn(r,function(o,s){var l=(n.axisExpandable?W0:H0)(s,n),u={horizontal:{x:l.position,y:n.axisLength},vertical:{x:0,y:l.position}},v={horizontal:B0/2,vertical:0},c=[u[i].x+e.x,u[i].y+e.y],h=v[i],f=yr();tn(f,f,h),Ze(f,f,c),this._axesLayout[o]={position:c,rotation:h,transform:f,axisNameAvailableWidth:l.axisNameAvailableWidth,axisLabelShow:l.axisLabelShow,nameTruncateMaxWidth:l.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},a.prototype.getAxis=function(e){return this._axesMap.get(e)},a.prototype.dataToPoint=function(e,t){return this.axisCoordToPoint(this._axesMap.get(t).dataToCoord(e),t)},a.prototype.eachActiveState=function(e,t,r,n){r==null&&(r=0),n==null&&(n=e.count());var i=this._axesMap,o=this.dimensions,s=[],l=[];D(o,function(g){s.push(e.mapDimension(g)),l.push(i.get(g).model)});for(var u=this.hasAxisBrushed(),v=r;v<n;v++){var c=void 0;if(!u)c="normal";else{c="active";for(var h=e.getValues(s,v),f=0,p=o.length;f<p;f++){var d=l[f].getActiveState(h[f]);if(d==="inactive"){c="inactive";break}}}t(c,v)}},a.prototype.hasAxisBrushed=function(){for(var e=this.dimensions,t=this._axesMap,r=!1,n=0,i=e.length;n<i;n++)t.get(e[n]).model.getActiveState()!=="normal"&&(r=!0);return r},a.prototype.axisCoordToPoint=function(e,t){var r=this._axesLayout[t];return ur([e,0],r.transform)},a.prototype.getAxisLayout=function(e){return lt(this._axesLayout[e])},a.prototype.getSlidedAxisExpandWindow=function(e){var t=this._makeLayoutInfo(),r=t.pixelDimIndex,n=t.axisExpandWindow.slice(),i=n[1]-n[0],o=[0,t.axisExpandWidth*(t.axisCount-1)];if(!this.containPoint(e))return{behavior:"none",axisExpandWindow:n};var s=e[r]-t.layoutBase-t.axisExpandWindow0Pos,l,u="slide",v=t.axisCollapseWidth,c=this._model.get("axisExpandSlideTriggerArea"),h=c[0]!=null;if(v)h&&v&&s<i*c[0]?(u="jump",l=s-i*c[2]):h&&v&&s>i*(1-c[0])?(u="jump",l=s-i*(1-c[2])):(l=s-i*c[1])>=0&&(l=s-i*(1-c[1]))<=0&&(l=0),l*=t.axisExpandWidth/v,l?Rv(l,n,o,"all"):u="none";else{var f=n[1]-n[0],p=o[1]*s/f;n=[Wc(0,p-f/2)],n[1]=Hc(o[1],n[0]+f),n[0]=n[1]-f}return{axisExpandWindow:n,behavior:u}},a}();function ca(a,e){return Hc(Wc(a,e[0]),e[1])}function H0(a,e){var t=e.layoutLength/(e.axisCount-1);return{position:t*a,axisNameAvailableWidth:t,axisLabelShow:!0}}function W0(a,e){var t=e.layoutLength,r=e.axisExpandWidth,n=e.axisCount,i=e.axisCollapseWidth,o=e.winInnerIndices,s,l=i,u=!1,v;return a<o[0]?(s=a*i,v=i):a<=o[1]?(s=e.axisExpandWindow0Pos+a*r-e.axisExpandWindow[0],l=r,u=!0):(s=t-(n-1-a)*i,v=i),{position:s,axisNameAvailableWidth:l,axisLabelShow:u,nameTruncateMaxWidth:v}}const $0=F0;function U0(a,e){var t=[];return a.eachComponent("parallel",function(r,n){var i=new $0(r,a,e);i.name="parallel_"+n,i.resize(r,e),r.coordinateSystem=i,i.model=r,t.push(i)}),a.eachSeries(function(r){if(r.get("coordinateSystem")==="parallel"){var n=r.getReferringComponents("parallel",mr).models[0];r.coordinateSystem=n.coordinateSystem}}),t}var Y0={create:U0};const X0=Y0;var $c=function(a){z(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.activeIntervals=[],t}return e.prototype.getAreaSelectStyle=function(){return Mv([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},e.prototype.setActiveIntervals=function(t){var r=this.activeIntervals=lt(t);if(r)for(var n=r.length-1;n>=0;n--)je(r[n])},e.prototype.getActiveState=function(t){var r=this.activeIntervals;if(!r.length)return"normal";if(t==null||isNaN(+t))return"inactive";if(r.length===1){var n=r[0];if(n[0]<=t&&t<=n[1])return"active"}else for(var i=0,o=r.length;i<o;i++)if(r[i][0]<=t&&t<=r[i][1])return"active";return"inactive"},e}(Nt);ae($c,Ja);const El=$c;var Z0=["axisLine","axisTickLabel","axisName"],q0=function(a){z(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,r){a.prototype.init.apply(this,arguments),(this._brushController=new kv(r.getZr())).on("brush",q(this._onBrush,this))},e.prototype.render=function(t,r,n,i){if(!K0(t,r,i)){this.axisModel=t,this.api=n,this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new Z,this.group.add(this._axisGroup),!!t.get("show")){var s=J0(t,r),l=s.coordinateSystem,u=t.getAreaSelectStyle(),v=u.width,c=t.axis.dim,h=l.getAxisLayout(c),f=$({strokeContainThreshold:v},h),p=new Ye(t,f);D(Z0,p.add,p),this._axisGroup.add(p.getGroup()),this._refreshBrushController(f,u,t,s,v,n),lo(o,this._axisGroup,t)}}},e.prototype._refreshBrushController=function(t,r,n,i,o,s){var l=n.axis.getExtent(),u=l[1]-l[0],v=Math.min(30,Math.abs(u)*.1),c=yt.create({x:l[0],y:-o/2,width:u,height:o});c.x-=v,c.width+=2*v,this._brushController.mount({enableGlobalPan:!0,rotation:t.rotation,x:t.position[0],y:t.position[1]}).setPanels([{panelId:"pl",clipPath:Hf(c),isTargetByCursor:Wf(c,s,i),getLinearBrushOtherExtent:$f(c,0)}]).enableBrush({brushType:"lineX",brushStyle:r,removeOnClick:!0}).updateCovers(j0(n))},e.prototype._onBrush=function(t){var r=t.areas,n=this.axisModel,i=n.axis,o=F(r,function(s){return[i.coordToData(s.range[0],!0),i.coordToData(s.range[1],!0)]});(!n.option.realtime===t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:n.id,intervals:o})},e.prototype.dispose=function(){this._brushController.dispose()},e.type="parallelAxis",e}(Yt);function K0(a,e,t){return t&&t.type==="axisAreaSelect"&&e.findComponents({mainType:"parallelAxis",query:t})[0]===a}function j0(a){var e=a.axis;return F(a.activeIntervals,function(t){return{brushType:"lineX",panelId:"pl",range:[e.dataToCoord(t[0],!0),e.dataToCoord(t[1],!0)]}})}function J0(a,e){return e.getComponent("parallel",a.get("parallelIndex"))}const Q0=q0;var tS={type:"axisAreaSelect",event:"axisAreaSelected"};function eS(a){a.registerAction(tS,function(e,t){t.eachComponent({mainType:"parallelAxis",query:e},function(r){r.axis.model.setActiveIntervals(e.intervals)})}),a.registerAction("parallelAxisExpand",function(e,t){t.eachComponent({mainType:"parallel",query:e},function(r){r.setAxisExpand(e)})})}var rS={type:"value",areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};function Uc(a){a.registerComponentView(R0),a.registerComponentModel(N0),a.registerCoordinateSystem("parallel",X0),a.registerPreprocessor(C0),a.registerComponentModel(El),a.registerComponentView(Q0),Da(a,"parallel",El,rS),eS(a)}function aS(a){K(Uc),a.registerChartView(x0),a.registerSeriesModel(A0),a.registerVisual(a.PRIORITY.VISUAL.BRUSH,D0)}var nS=function(){function a(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.cpx2=0,this.cpy2=0,this.extent=0}return a}(),iS=function(a){z(e,a);function e(t){return a.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new nS},e.prototype.buildPath=function(t,r){var n=r.extent;t.moveTo(r.x1,r.y1),t.bezierCurveTo(r.cpx1,r.cpy1,r.cpx2,r.cpy2,r.x2,r.y2),r.orient==="vertical"?(t.lineTo(r.x2+n,r.y2),t.bezierCurveTo(r.cpx2+n,r.cpy2,r.cpx1+n,r.cpy1,r.x1+n,r.y1)):(t.lineTo(r.x2,r.y2+n),t.bezierCurveTo(r.cpx2,r.cpy2+n,r.cpx1,r.cpy1+n,r.x1,r.y1+n)),t.closePath()},e.prototype.highlight=function(){no(this)},e.prototype.downplay=function(){io(this)},e}(It),oS=function(a){z(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t._focusAdjacencyDisabled=!1,t}return e.prototype.render=function(t,r,n){var i=this,o=t.getGraph(),s=this.group,l=t.layoutInfo,u=l.width,v=l.height,c=t.getData(),h=t.getData("edge"),f=t.get("orient");this._model=t,s.removeAll(),s.x=l.x,s.y=l.y,o.eachEdge(function(p){var d=new iS,g=it(d);g.dataIndex=p.dataIndex,g.seriesIndex=t.seriesIndex,g.dataType="edge";var y=p.getModel(),m=y.getModel("lineStyle"),S=m.get("curveness"),x=p.node1.getLayout(),w=p.node1.getModel(),_=w.get("localX"),b=w.get("localY"),A=p.node2.getLayout(),T=p.node2.getModel(),I=T.get("localX"),C=T.get("localY"),E=p.getLayout(),V,M,P,R,G,L,k,N;switch(d.shape.extent=Math.max(1,E.dy),d.shape.orient=f,f==="vertical"?(V=(_!=null?_*u:x.x)+E.sy,M=(b!=null?b*v:x.y)+x.dy,P=(I!=null?I*u:A.x)+E.ty,R=C!=null?C*v:A.y,G=V,L=M*(1-S)+R*S,k=P,N=M*S+R*(1-S)):(V=(_!=null?_*u:x.x)+x.dx,M=(b!=null?b*v:x.y)+E.sy,P=I!=null?I*u:A.x,R=(C!=null?C*v:A.y)+E.ty,G=V*(1-S)+P*S,L=M,k=V*S+P*(1-S),N=R),d.setShape({x1:V,y1:M,x2:P,y2:R,cpx1:G,cpy1:L,cpx2:k,cpy2:N}),d.useStyle(m.getItemStyle()),d.style.fill){case"source":d.style.fill=p.node1.getVisual("color"),d.style.decal=p.node1.getVisual("style").decal;break;case"target":d.style.fill=p.node2.getVisual("color"),d.style.decal=p.node2.getVisual("style").decal;break;case"gradient":var O=p.node1.getVisual("color"),U=p.node2.getVisual("color");tt(O)&&tt(U)&&(d.style.fill=new ji(0,0,+(f==="horizontal"),+(f==="vertical"),[{color:O,offset:0},{color:U,offset:1}]))}var Y=y.getModel("emphasis");Ht(d,y,"lineStyle",function(gt){return gt.getItemStyle()}),s.add(d),h.setItemGraphicEl(p.dataIndex,d);var J=Y.get("focus");mt(d,J==="adjacency"?p.getAdjacentDataIndices():J,Y.get("blurScope"),Y.get("disabled")),it(d).dataType="edge"}),o.eachNode(function(p){var d=p.getLayout(),g=p.getModel(),y=g.get("localX"),m=g.get("localY"),S=g.getModel("emphasis"),x=new Tt({shape:{x:y!=null?y*u:d.x,y:m!=null?m*v:d.y,width:d.dx,height:d.dy},style:g.getModel("itemStyle").getItemStyle(),z2:10});re(x,Wt(g),{labelFetcher:t,labelDataIndex:p.dataIndex,defaultText:p.id}),x.disableLabelAnimation=!0,x.setStyle("fill",p.getVisual("color")),x.setStyle("decal",p.getVisual("style").decal),Ht(x,g),s.add(x),c.setItemGraphicEl(p.dataIndex,x),it(x).dataType="node";var w=S.get("focus");mt(x,w==="adjacency"?p.getAdjacentDataIndices():w,S.get("blurScope"),S.get("disabled"))}),c.eachItemGraphicEl(function(p,d){var g=c.getItemModel(d);g.get("draggable")&&(p.drift=function(y,m){i._focusAdjacencyDisabled=!0,this.shape.x+=y,this.shape.y+=m,this.dirty(),n.dispatchAction({type:"dragNode",seriesId:t.id,dataIndex:c.getRawIndex(d),localX:this.shape.x/u,localY:this.shape.y/v})},p.ondragend=function(){i._focusAdjacencyDisabled=!1},p.draggable=!0,p.cursor="move")}),!this._data&&t.isAnimationEnabled()&&s.setClipPath(sS(s.getBoundingRect(),t,function(){s.removeClipPath()})),this._data=t.getData()},e.prototype.dispose=function(){},e.type="sankey",e}(St);function sS(a,e,t){var r=new Tt({shape:{x:a.x-10,y:a.y-10,width:0,height:a.height+20}});return ee(r,{shape:{width:a.width+20}},e,t),r}const lS=oS;var uS=function(a){z(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,r){var n=t.edges||t.links,i=t.data||t.nodes,o=t.levels;this.levelModels=[];for(var s=this.levelModels,l=0;l<o.length;l++)o[l].depth!=null&&o[l].depth>=0&&(s[o[l].depth]=new Jt(o[l],this,r));if(i&&n){var u=Bc(i,n,this,!0,v);return u.data}function v(c,h){c.wrapMethod("getItemModel",function(f,p){var d=f.parentModel,g=d.getData().getItemLayout(p);if(g){var y=g.depth,m=d.levelModels[y];m&&(f.parentModel=m)}return f}),h.wrapMethod("getItemModel",function(f,p){var d=f.parentModel,g=d.getGraph().getEdgeByIndex(p),y=g.node1.getLayout();if(y){var m=y.depth,S=d.levelModels[m];S&&(f.parentModel=S)}return f})}},e.prototype.setNodePosition=function(t,r){var n=this.option.data||this.option.nodes,i=n[t];i.localX=r[0],i.localY=r[1]},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.formatTooltip=function(t,r,n){function i(f){return isNaN(f)||f==null}if(n==="edge"){var o=this.getDataParams(t,n),s=o.data,l=o.value,u=s.source+" -- "+s.target;return kt("nameValue",{name:u,value:l,noValue:i(l)})}else{var v=this.getGraph().getNodeByIndex(t),c=v.getLayout().value,h=this.getDataParams(t,n).data.name;return kt("nameValue",{name:h!=null?h+"":null,value:c,noValue:i(c)})}},e.prototype.optionUpdated=function(){},e.prototype.getDataParams=function(t,r){var n=a.prototype.getDataParams.call(this,t,r);if(n.value==null&&r==="node"){var i=this.getGraph().getNodeByIndex(t),o=i.getLayout().value;n.value=o}return n},e.type="series.sankey",e.defaultOption={z:2,coordinateSystem:"view",left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,label:{show:!0,position:"right",fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:"#212121"}},animationEasing:"linear",animationDuration:1e3},e}(bt);const vS=uS;function cS(a,e){a.eachSeriesByType("sankey",function(t){var r=t.get("nodeWidth"),n=t.get("nodeGap"),i=hS(t,e);t.layoutInfo=i;var o=i.width,s=i.height,l=t.getGraph(),u=l.nodes,v=l.edges;pS(u);var c=Et(u,function(d){return d.getLayout().value===0}),h=c.length!==0?0:t.get("layoutIterations"),f=t.get("orient"),p=t.get("nodeAlign");fS(u,v,r,n,o,s,h,f,p)})}function hS(a,e){return ne(a.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function fS(a,e,t,r,n,i,o,s,l){dS(a,e,t,n,i,s,l),SS(a,e,i,n,r,o,s),CS(a,s)}function pS(a){D(a,function(e){var t=Ie(e.outEdges,Na),r=Ie(e.inEdges,Na),n=e.getValue()||0,i=Math.max(t,r,n);e.setLayout({value:i},!0)})}function dS(a,e,t,r,n,i,o){for(var s=[],l=[],u=[],v=[],c=0,h=0;h<e.length;h++)s[h]=1;for(var h=0;h<a.length;h++)l[h]=a[h].inEdges.length,l[h]===0&&u.push(a[h]);for(var f=-1;u.length;){for(var p=0;p<u.length;p++){var d=u[p],g=d.hostGraph.data.getRawDataItem(d.dataIndex),y=g.depth!=null&&g.depth>=0;y&&g.depth>f&&(f=g.depth),d.setLayout({depth:y?g.depth:c},!0),i==="vertical"?d.setLayout({dy:t},!0):d.setLayout({dx:t},!0);for(var m=0;m<d.outEdges.length;m++){var S=d.outEdges[m],x=e.indexOf(S);s[x]=0;var w=S.node2,_=a.indexOf(w);--l[_]===0&&v.indexOf(w)<0&&v.push(w)}}++c,u=v,v=[]}for(var h=0;h<s.length;h++)if(s[h]===1)throw new Error("Sankey is a DAG, the original data has cycle!");var b=f>c-1?f:c-1;o&&o!=="left"&&gS(a,o,i,b);var A=i==="vertical"?(n-t)/b:(r-t)/b;mS(a,A,i)}function Yc(a){var e=a.hostGraph.data.getRawDataItem(a.dataIndex);return e.depth!=null&&e.depth>=0}function gS(a,e,t,r){if(e==="right"){for(var n=[],i=a,o=0;i.length;){for(var s=0;s<i.length;s++){var l=i[s];l.setLayout({skNodeHeight:o},!0);for(var u=0;u<l.inEdges.length;u++){var v=l.inEdges[u];n.indexOf(v.node1)<0&&n.push(v.node1)}}i=n,n=[],++o}D(a,function(c){Yc(c)||c.setLayout({depth:Math.max(0,r-c.getLayout().skNodeHeight)},!0)})}else e==="justify"&&yS(a,r)}function yS(a,e){D(a,function(t){!Yc(t)&&!t.outEdges.length&&t.setLayout({depth:e},!0)})}function mS(a,e,t){D(a,function(r){var n=r.getLayout().depth*e;t==="vertical"?r.setLayout({y:n},!0):r.setLayout({x:n},!0)})}function SS(a,e,t,r,n,i,o){var s=xS(a,o);_S(s,e,t,r,n,o),Qn(s,n,t,r,o);for(var l=1;i>0;i--)l*=.99,wS(s,l,o),Qn(s,n,t,r,o),DS(s,l,o),Qn(s,n,t,r,o)}function xS(a,e){var t=[],r=e==="vertical"?"y":"x",n=Ti(a,function(i){return i.getLayout()[r]});return n.keys.sort(function(i,o){return i-o}),D(n.keys,function(i){t.push(n.buckets.get(i))}),t}function _S(a,e,t,r,n,i){var o=1/0;D(a,function(s){var l=s.length,u=0;D(s,function(c){u+=c.getLayout().value});var v=i==="vertical"?(r-(l-1)*n)/u:(t-(l-1)*n)/u;v<o&&(o=v)}),D(a,function(s){D(s,function(l,u){var v=l.getLayout().value*o;i==="vertical"?(l.setLayout({x:u},!0),l.setLayout({dx:v},!0)):(l.setLayout({y:u},!0),l.setLayout({dy:v},!0))})}),D(e,function(s){var l=+s.getValue()*o;s.setLayout({dy:l},!0)})}function Qn(a,e,t,r,n){var i=n==="vertical"?"x":"y";D(a,function(o){o.sort(function(d,g){return d.getLayout()[i]-g.getLayout()[i]});for(var s,l,u,v=0,c=o.length,h=n==="vertical"?"dx":"dy",f=0;f<c;f++)l=o[f],u=v-l.getLayout()[i],u>0&&(s=l.getLayout()[i]+u,n==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),v=l.getLayout()[i]+l.getLayout()[h]+e;var p=n==="vertical"?r:t;if(u=v-e-p,u>0){s=l.getLayout()[i]-u,n==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0),v=s;for(var f=c-2;f>=0;--f)l=o[f],u=l.getLayout()[i]+l.getLayout()[h]+e-v,u>0&&(s=l.getLayout()[i]-u,n==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),v=l.getLayout()[i]}})}function wS(a,e,t){D(a.slice().reverse(),function(r){D(r,function(n){if(n.outEdges.length){var i=Ie(n.outEdges,bS,t)/Ie(n.outEdges,Na);if(isNaN(i)){var o=n.outEdges.length;i=o?Ie(n.outEdges,AS,t)/o:0}if(t==="vertical"){var s=n.getLayout().x+(i-Ce(n,t))*e;n.setLayout({x:s},!0)}else{var l=n.getLayout().y+(i-Ce(n,t))*e;n.setLayout({y:l},!0)}}})})}function bS(a,e){return Ce(a.node2,e)*a.getValue()}function AS(a,e){return Ce(a.node2,e)}function TS(a,e){return Ce(a.node1,e)*a.getValue()}function IS(a,e){return Ce(a.node1,e)}function Ce(a,e){return e==="vertical"?a.getLayout().x+a.getLayout().dx/2:a.getLayout().y+a.getLayout().dy/2}function Na(a){return a.getValue()}function Ie(a,e,t){for(var r=0,n=a.length,i=-1;++i<n;){var o=+e(a[i],t);isNaN(o)||(r+=o)}return r}function DS(a,e,t){D(a,function(r){D(r,function(n){if(n.inEdges.length){var i=Ie(n.inEdges,TS,t)/Ie(n.inEdges,Na);if(isNaN(i)){var o=n.inEdges.length;i=o?Ie(n.inEdges,IS,t)/o:0}if(t==="vertical"){var s=n.getLayout().x+(i-Ce(n,t))*e;n.setLayout({x:s},!0)}else{var l=n.getLayout().y+(i-Ce(n,t))*e;n.setLayout({y:l},!0)}}})})}function CS(a,e){var t=e==="vertical"?"x":"y";D(a,function(r){r.outEdges.sort(function(n,i){return n.node2.getLayout()[t]-i.node2.getLayout()[t]}),r.inEdges.sort(function(n,i){return n.node1.getLayout()[t]-i.node1.getLayout()[t]})}),D(a,function(r){var n=0,i=0;D(r.outEdges,function(o){o.setLayout({sy:n},!0),n+=o.getLayout().dy}),D(r.inEdges,function(o){o.setLayout({ty:i},!0),i+=o.getLayout().dy})})}function MS(a){a.eachSeriesByType("sankey",function(e){var t=e.getGraph(),r=t.nodes;if(r.length){var n=1/0,i=-1/0;D(r,function(o){var s=o.getLayout().value;s<n&&(n=s),s>i&&(i=s)}),D(r,function(o){var s=new wt({type:"color",mappingMethod:"linear",dataExtent:[n,i],visual:e.get("color")}),l=s.mapValueToVisual(o.getLayout().value),u=o.getModel().get(["itemStyle","color"]);u!=null?(o.setVisual("color",u),o.setVisual("style",{fill:u})):(o.setVisual("color",l),o.setVisual("style",{fill:l}))})}})}function LS(a){a.registerChartView(lS),a.registerSeriesModel(vS),a.registerLayout(cS),a.registerVisual(MS),a.registerAction({type:"dragNode",event:"dragnode",update:"update"},function(e,t){t.eachComponent({mainType:"series",subType:"sankey",query:e},function(r){r.setNodePosition(e.dataIndex,[e.localX,e.localY])})})}var Xc=function(){function a(){}return a.prototype.getInitialData=function(e,t){var r,n=t.getComponent("xAxis",this.get("xAxisIndex")),i=t.getComponent("yAxis",this.get("yAxisIndex")),o=n.get("type"),s=i.get("type"),l;o==="category"?(e.layout="horizontal",r=n.getOrdinalMeta(),l=!0):s==="category"?(e.layout="vertical",r=i.getOrdinalMeta(),l=!0):e.layout=e.layout||"horizontal";var u=["x","y"],v=e.layout==="horizontal"?0:1,c=this._baseAxisDim=u[v],h=u[1-v],f=[n,i],p=f[v].get("type"),d=f[1-v].get("type"),g=e.data;if(g&&l){var y=[];D(g,function(x,w){var _;W(x)?(_=x.slice(),x.unshift(w)):W(x.value)?(_=$({},x),_.value=_.value.slice(),x.value.unshift(w)):_=x,y.push(_)}),e.data=y}var m=this.defaultValueDimensions,S=[{name:c,type:Ii(p),ordinalMeta:r,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:h,type:Ii(d),dimsDef:m.slice()}];return qr(this,{coordDimensions:S,dimensionsCount:m.length+1,encodeDefaulter:st(Uf,S,this)})},a.prototype.getBaseAxis=function(){var e=this._baseAxisDim;return this.ecModel.getComponent(e+"Axis",this.get(e+"AxisIndex")).axis},a}(),Zc=function(a){z(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],t.visualDrawType="stroke",t}return e.type="series.boxplot",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:"#fff",borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}},animationDuration:800},e}(bt);ae(Zc,Xc,!0);const PS=Zc;var VS=function(a){z(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,r,n){var i=t.getData(),o=this.group,s=this._data;this._data||o.removeAll();var l=t.get("layout")==="horizontal"?1:0;i.diff(s).add(function(u){if(i.hasValue(u)){var v=i.getItemLayout(u),c=Rl(v,i,u,l,!0);i.setItemGraphicEl(u,c),o.add(c)}}).update(function(u,v){var c=s.getItemGraphicEl(v);if(!i.hasValue(u)){o.remove(c);return}var h=i.getItemLayout(u);c?(De(c),qc(h,c,i,u)):c=Rl(h,i,u,l),o.add(c),i.setItemGraphicEl(u,c)}).remove(function(u){var v=s.getItemGraphicEl(u);v&&o.remove(v)}).execute(),this._data=i},e.prototype.remove=function(t){var r=this.group,n=this._data;this._data=null,n&&n.eachItemGraphicEl(function(i){i&&r.remove(i)})},e.type="boxplot",e}(St),ES=function(){function a(){}return a}(),RS=function(a){z(e,a);function e(t){var r=a.call(this,t)||this;return r.type="boxplotBoxPath",r}return e.prototype.getDefaultShape=function(){return new ES},e.prototype.buildPath=function(t,r){var n=r.points,i=0;for(t.moveTo(n[i][0],n[i][1]),i++;i<4;i++)t.lineTo(n[i][0],n[i][1]);for(t.closePath();i<n.length;i++)t.moveTo(n[i][0],n[i][1]),i++,t.lineTo(n[i][0],n[i][1])},e}(It);function Rl(a,e,t,r,n){var i=a.ends,o=new RS({shape:{points:n?kS(i,r,a):i}});return qc(a,o,e,t,n),o}function qc(a,e,t,r,n){var i=t.hostModel,o=qa[n?"initProps":"updateProps"];o(e,{shape:{points:a.ends}},i,r),e.useStyle(t.getItemVisual(r,"style")),e.style.strokeNoScale=!0,e.z2=100;var s=t.getItemModel(r),l=s.getModel("emphasis");Ht(e,s),mt(e,l.get("focus"),l.get("blurScope"),l.get("disabled"))}function kS(a,e,t){return F(a,function(r){return r=r.slice(),r[e]=t.initBaseline,r})}const NS=VS;function zS(a,e){}var Nr=D;function GS(a){var e=OS(a);Nr(e,function(t){var r=t.seriesModels;!r.length||(BS(t),Nr(r,function(n,i){FS(n,t.boxOffsetList[i],t.boxWidthList[i])}))})}function OS(a){var e=[],t=[];return a.eachSeriesByType("boxplot",function(r){var n=r.getBaseAxis(),i=Ut(t,n);i<0&&(i=t.length,t[i]=n,e[i]={axis:n,seriesModels:[]}),e[i].seriesModels.push(r)}),e}function BS(a){var e=a.axis,t=a.seriesModels,r=t.length,n=a.boxWidthList=[],i=a.boxOffsetList=[],o=[],s;if(e.type==="category")s=e.getBandWidth();else{var l=0;Nr(t,function(p){l=Math.max(l,p.getData().count())});var u=e.getExtent();s=Math.abs(u[1]-u[0])/l}Nr(t,function(p){var d=p.get("boxWidth");W(d)||(d=[d,d]),o.push([H(d[0],s)||0,H(d[1],s)||0])});var v=s*.8-2,c=v/r*.3,h=(v-c*(r-1))/r,f=h/2-v/2;Nr(t,function(p,d){i.push(f),f+=c+h,n.push(Math.min(Math.max(h,o[d][0]),o[d][1]))})}function FS(a,e,t){var r=a.coordinateSystem,n=a.getData(),i=t/2,o=a.get("layout")==="horizontal"?0:1,s=1-o,l=["x","y"],u=n.mapDimension(l[o]),v=n.mapDimensionsAll(l[s]);if(u==null||v.length<5)return;for(var c=0;c<n.count();c++){var h=n.get(u,c),f=S(h,v[2],c),p=S(h,v[0],c),d=S(h,v[1],c),g=S(h,v[3],c),y=S(h,v[4],c),m=[];x(m,d,!1),x(m,g,!0),m.push(p,d,y,g),w(m,p),w(m,y),w(m,f),n.setItemLayout(c,{initBaseline:f[s],ends:m})}function S(_,b,A){var T=n.get(b,A),I=[];I[o]=_,I[s]=T;var C;return isNaN(_)||isNaN(T)?C=[NaN,NaN]:(C=r.dataToPoint(I),C[o]+=e),C}function x(_,b,A){var T=b.slice(),I=b.slice();T[o]+=i,I[o]-=i,A?_.push(T,I):_.push(I,T)}function w(_,b){var A=b.slice(),T=b.slice();A[o]-=i,T[o]+=i,_.push(A,T)}}function HS(a,e){e=e||{};for(var t=[],r=[],n=e.boundIQR,i=n==="none"||n===0,o=0;o<a.length;o++){var s=je(a[o].slice()),l=Sn(s,.25),u=Sn(s,.5),v=Sn(s,.75),c=s[0],h=s[s.length-1],f=(n==null?1.5:n)*(v-l),p=i?c:Math.max(c,l-f),d=i?h:Math.min(h,v+f),g=e.itemNameFormatter,y=ot(g)?g({value:o}):tt(g)?g.replace("{value}",o+""):o+"";t.push([y,p,l,u,v,d]);for(var m=0;m<s.length;m++){var S=s[m];if(S<p||S>d){var x=[y,S];r.push(x)}}}return{boxData:t,outliers:r}}var WS={type:"echarts:boxplot",transform:function(e){var t=e.upstream;if(t.sourceFormat!==Nv){var r="";ht(r)}var n=HS(t.getRawData(),e.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:n.boxData},{data:n.outliers}]}};function $S(a){a.registerSeriesModel(PS),a.registerChartView(NS),a.registerVisual(zS),a.registerLayout(GS),a.registerTransform(WS)}var US=["color","borderColor"],YS=function(a){z(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,r,n){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(t),this._isLargeDraw?this._renderLarge(t):this._renderNormal(t)},e.prototype.incrementalPrepareRender=function(t,r,n){this._clear(),this._updateDrawMode(t)},e.prototype.incrementalRender=function(t,r,n,i){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(t,r):this._incrementalRenderNormal(t,r)},e.prototype.eachRendered=function(t){ln(this._progressiveEls||this.group,t)},e.prototype._updateDrawMode=function(t){var r=t.pipelineContext.large;(this._isLargeDraw==null||r!==this._isLargeDraw)&&(this._isLargeDraw=r,this._clear())},e.prototype._renderNormal=function(t){var r=t.getData(),n=this._data,i=this.group,o=r.getLayout("isSimpleBox"),s=t.get("clip",!0),l=t.coordinateSystem,u=l.getArea&&l.getArea();this._data||i.removeAll(),r.diff(n).add(function(v){if(r.hasValue(v)){var c=r.getItemLayout(v);if(s&&kl(u,c))return;var h=ti(c,v,!0);ee(h,{shape:{points:c.ends}},t,v),ei(h,r,v,o),i.add(h),r.setItemGraphicEl(v,h)}}).update(function(v,c){var h=n.getItemGraphicEl(c);if(!r.hasValue(v)){i.remove(h);return}var f=r.getItemLayout(v);if(s&&kl(u,f)){i.remove(h);return}h?(vt(h,{shape:{points:f.ends}},t,v),De(h)):h=ti(f),ei(h,r,v,o),i.add(h),r.setItemGraphicEl(v,h)}).remove(function(v){var c=n.getItemGraphicEl(v);c&&i.remove(c)}).execute(),this._data=r},e.prototype._renderLarge=function(t){this._clear(),zl(t,this.group);var r=t.get("clip",!0)?uo(t.coordinateSystem,!1,t):null;r?this.group.setClipPath(r):this.group.removeClipPath()},e.prototype._incrementalRenderNormal=function(t,r){for(var n=r.getData(),i=n.getLayout("isSimpleBox"),o;(o=t.next())!=null;){var s=n.getItemLayout(o),l=ti(s);ei(l,n,o,i),l.incremental=!0,this.group.add(l),this._progressiveEls.push(l)}},e.prototype._incrementalRenderLarge=function(t,r){zl(r,this.group,this._progressiveEls,!0)},e.prototype.remove=function(t){this._clear()},e.prototype._clear=function(){this.group.removeAll(),this._data=null},e.type="candlestick",e}(St),XS=function(){function a(){}return a}(),ZS=function(a){z(e,a);function e(t){var r=a.call(this,t)||this;return r.type="normalCandlestickBox",r}return e.prototype.getDefaultShape=function(){return new XS},e.prototype.buildPath=function(t,r){var n=r.points;this.__simpleBox?(t.moveTo(n[4][0],n[4][1]),t.lineTo(n[6][0],n[6][1])):(t.moveTo(n[0][0],n[0][1]),t.lineTo(n[1][0],n[1][1]),t.lineTo(n[2][0],n[2][1]),t.lineTo(n[3][0],n[3][1]),t.closePath(),t.moveTo(n[4][0],n[4][1]),t.lineTo(n[5][0],n[5][1]),t.moveTo(n[6][0],n[6][1]),t.lineTo(n[7][0],n[7][1]))},e}(It);function ti(a,e,t){var r=a.ends;return new ZS({shape:{points:t?qS(r,a):r},z2:100})}function kl(a,e){for(var t=!0,r=0;r<e.ends.length;r++)if(a.contain(e.ends[r][0],e.ends[r][1])){t=!1;break}return t}function ei(a,e,t,r){var n=e.getItemModel(t);a.useStyle(e.getItemVisual(t,"style")),a.style.strokeNoScale=!0,a.__simpleBox=r,Ht(a,n)}function qS(a,e){return F(a,function(t){return t=t.slice(),t[1]=e.initBaseline,t})}var KS=function(){function a(){}return a}(),Nl=function(a){z(e,a);function e(t){var r=a.call(this,t)||this;return r.type="largeCandlestickBox",r}return e.prototype.getDefaultShape=function(){return new KS},e.prototype.buildPath=function(t,r){for(var n=r.points,i=0;i<n.length;)if(this.__sign===n[i++]){var o=n[i++];t.moveTo(o,n[i++]),t.lineTo(o,n[i++])}else i+=3},e}(It);function zl(a,e,t,r){var n=a.getData(),i=n.getLayout("largePoints"),o=new Nl({shape:{points:i},__sign:1});e.add(o);var s=new Nl({shape:{points:i},__sign:-1});e.add(s),Gl(1,o,a),Gl(-1,s,a),r&&(o.incremental=!0,s.incremental=!0),t&&t.push(o,s)}function Gl(a,e,t,r){var n=t.get(["itemStyle",a>0?"borderColor":"borderColor0"])||t.get(["itemStyle",a>0?"color":"color0"]),i=t.getModel("itemStyle").getItemStyle(US);e.useStyle(i),e.style.fill=null,e.style.stroke=n}const jS=YS;var Kc=function(a){z(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.defaultValueDimensions=[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],t}return e.prototype.getShadowDim=function(){return"open"},e.prototype.brushSelector=function(t,r,n){var i=r.getItemLayout(t);return i&&n.rect(i.brushRect)},e.type="series.candlestick",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,clip:!0,itemStyle:{color:"#eb5454",color0:"#47b262",borderColor:"#eb5454",borderColor0:"#47b262",borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationEasing:"linear",animationDuration:300},e}(bt);ae(Kc,Xc,!0);const JS=Kc;function QS(a){!a||!W(a.series)||D(a.series,function(e){Rt(e)&&e.type==="k"&&(e.type="candlestick")})}var t1=["itemStyle","borderColor"],e1=["itemStyle","borderColor0"],r1=["itemStyle","color"],a1=["itemStyle","color0"],n1={seriesType:"candlestick",plan:vo(),performRawSeries:!0,reset:function(a,e){function t(i,o){return o.get(i>0?r1:a1)}function r(i,o){return o.get(i>0?t1:e1)}if(!e.isSeriesFiltered(a)){var n=a.pipelineContext.large;return!n&&{progress:function(i,o){for(var s;(s=i.next())!=null;){var l=o.getItemModel(s),u=o.getItemLayout(s).sign,v=l.getItemStyle();v.fill=t(u,l),v.stroke=r(u,l)||v.fill;var c=o.ensureUniqueItemVisual(s,"style");$(c,v)}}}}}};const i1=n1;var o1={seriesType:"candlestick",plan:vo(),reset:function(a){var e=a.coordinateSystem,t=a.getData(),r=s1(a,t),n=0,i=1,o=["x","y"],s=t.getDimensionIndex(t.mapDimension(o[n])),l=F(t.mapDimensionsAll(o[i]),t.getDimensionIndex,t),u=l[0],v=l[1],c=l[2],h=l[3];if(t.setLayout({candleWidth:r,isSimpleBox:r<=1.3}),s<0||l.length<4)return;return{progress:a.pipelineContext.large?p:f};function f(d,g){for(var y,m=g.getStore();(y=d.next())!=null;){var S=m.get(s,y),x=m.get(u,y),w=m.get(v,y),_=m.get(c,y),b=m.get(h,y),A=Math.min(x,w),T=Math.max(x,w),I=P(A,S),C=P(T,S),E=P(_,S),V=P(b,S),M=[];R(M,C,0),R(M,I,1),M.push(L(V),L(C),L(E),L(I)),g.setItemLayout(y,{sign:Ol(m,y,x,w,v),initBaseline:x>w?C[i]:I[i],ends:M,brushRect:G(_,b,S)})}function P(k,N){var O=[];return O[n]=N,O[i]=k,isNaN(N)||isNaN(k)?[NaN,NaN]:e.dataToPoint(O)}function R(k,N,O){var U=N.slice(),Y=N.slice();U[n]=xn(U[n]+r/2,1,!1),Y[n]=xn(Y[n]-r/2,1,!0),O?k.push(U,Y):k.push(Y,U)}function G(k,N,O){var U=P(k,O),Y=P(N,O);return U[n]-=r/2,Y[n]-=r/2,{x:U[0],y:U[1],width:r,height:Y[1]-U[1]}}function L(k){return k[n]=xn(k[n],1),k}}function p(d,g){for(var y=Yf(d.count*4),m=0,S,x=[],w=[],_,b=g.getStore();(_=d.next())!=null;){var A=b.get(s,_),T=b.get(u,_),I=b.get(v,_),C=b.get(c,_),E=b.get(h,_);if(isNaN(A)||isNaN(C)||isNaN(E)){y[m++]=NaN,m+=3;continue}y[m++]=Ol(b,_,T,I,v),x[n]=A,x[i]=C,S=e.dataToPoint(x,null,w),y[m++]=S?S[0]:NaN,y[m++]=S?S[1]:NaN,x[i]=E,S=e.dataToPoint(x,null,w),y[m++]=S?S[1]:NaN}g.setLayout("largePoints",y)}}};function Ol(a,e,t,r,n){var i;return t>r?i=-1:t<r?i=1:i=e>0?a.get(n,e-1)<=r?1:-1:1,i}function s1(a,e){var t=a.getBaseAxis(),r,n=t.type==="category"?t.getBandWidth():(r=t.getExtent(),Math.abs(r[1]-r[0])/e.count()),i=H(_t(a.get("barMaxWidth"),n),n),o=H(_t(a.get("barMinWidth"),1),n),s=a.get("barWidth");return s!=null?H(s,n):Math.max(Math.min(n/2,i),o)}const l1=o1;function u1(a){a.registerChartView(jS),a.registerSeriesModel(JS),a.registerPreprocessor(QS),a.registerVisual(i1),a.registerLayout(l1)}function Bl(a,e){var t=e.rippleEffectColor||e.color;a.eachChild(function(r){r.attr({z:e.z,zlevel:e.zlevel,style:{stroke:e.brushType==="stroke"?t:null,fill:e.brushType==="fill"?t:null}})})}var v1=function(a){z(e,a);function e(t,r){var n=a.call(this)||this,i=new Dv(t,r),o=new Z;return n.add(i),n.add(o),n.updateData(t,r),n}return e.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},e.prototype.startEffectAnimation=function(t){for(var r=t.symbolType,n=t.color,i=t.rippleNumber,o=this.childAt(1),s=0;s<i;s++){var l=jt(r,-1,-1,2,2,n);l.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scaleX:.5,scaleY:.5});var u=-s/i*t.period+t.effectOffset;l.animate("",!0).when(t.period,{scaleX:t.rippleScale/2,scaleY:t.rippleScale/2}).delay(u).start(),l.animateStyle(!0).when(t.period,{opacity:0}).delay(u).start(),o.add(l)}Bl(o,t)},e.prototype.updateEffectAnimation=function(t){for(var r=this._effectCfg,n=this.childAt(1),i=["symbolType","period","rippleScale","rippleNumber"],o=0;o<i.length;o++){var s=i[o];if(r[s]!==t[s]){this.stopEffectAnimation(),this.startEffectAnimation(t);return}}Bl(n,t)},e.prototype.highlight=function(){no(this)},e.prototype.downplay=function(){io(this)},e.prototype.getSymbolType=function(){var t=this.childAt(0);return t&&t.getSymbolType()},e.prototype.updateData=function(t,r){var n=this,i=t.hostModel;this.childAt(0).updateData(t,r);var o=this.childAt(1),s=t.getItemModel(r),l=t.getItemVisual(r,"symbol"),u=Ka(t.getItemVisual(r,"symbolSize")),v=t.getItemVisual(r,"style"),c=v&&v.fill,h=s.getModel("emphasis");o.setScale(u),o.traverse(function(g){g.setStyle("fill",c)});var f=sn(t.getItemVisual(r,"symbolOffset"),u);f&&(o.x=f[0],o.y=f[1]);var p=t.getItemVisual(r,"symbolRotate");o.rotation=(p||0)*Math.PI/180||0;var d={};d.showEffectOn=i.get("showEffectOn"),d.rippleScale=s.get(["rippleEffect","scale"]),d.brushType=s.get(["rippleEffect","brushType"]),d.period=s.get(["rippleEffect","period"])*1e3,d.effectOffset=r/t.count(),d.z=i.getShallow("z")||0,d.zlevel=i.getShallow("zlevel")||0,d.symbolType=l,d.color=c,d.rippleEffectColor=s.get(["rippleEffect","color"]),d.rippleNumber=s.get(["rippleEffect","number"]),d.showEffectOn==="render"?(this._effectCfg?this.updateEffectAnimation(d):this.startEffectAnimation(d),this._effectCfg=d):(this._effectCfg=null,this.stopEffectAnimation(),this.onHoverStateChange=function(g){g==="emphasis"?d.showEffectOn!=="render"&&n.startEffectAnimation(d):g==="normal"&&d.showEffectOn!=="render"&&n.stopEffectAnimation()}),this._effectCfg=d,mt(this,h.get("focus"),h.get("blurScope"),h.get("disabled"))},e.prototype.fadeOut=function(t){t&&t()},e}(Z);const c1=v1;var h1=function(a){z(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){this._symbolDraw=new oo(c1)},e.prototype.render=function(t,r,n){var i=t.getData(),o=this._symbolDraw;o.updateData(i,{clipShape:this._getClipShape(t)}),this.group.add(o.group)},e.prototype._getClipShape=function(t){var r=t.coordinateSystem,n=r&&r.getArea&&r.getArea();return t.get("clip",!0)?n:null},e.prototype.updateTransform=function(t,r,n){var i=t.getData();this.group.dirty();var o=zv("").reset(t,r,n);o.progress&&o.progress({start:0,end:i.count(),count:i.count()},i),this._symbolDraw.updateLayout()},e.prototype._updateGroupTransform=function(t){var r=t.coordinateSystem;r&&r.getRoamTransform&&(this.group.transform=Xf(r.getRoamTransform()),this.group.decomposeTransform())},e.prototype.remove=function(t,r){this._symbolDraw&&this._symbolDraw.remove(!0)},e.type="effectScatter",e}(St);const f1=h1;var p1=function(a){z(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.getInitialData=function(t,r){return jr(null,this,{useEncodeDefaulter:!0})},e.prototype.brushSelector=function(t,r,n){return n.point(r.getItemLayout(t))},e.type="series.effectScatter",e.dependencies=["grid","polar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,effectType:"ripple",progressive:0,showEffectOn:"render",clip:!0,rippleEffect:{period:4,scale:2.5,brushType:"fill",number:3},universalTransition:{divideShape:"clone"},symbolSize:10},e}(bt);const d1=p1;function g1(a){a.registerChartView(f1),a.registerSeriesModel(d1),a.registerLayout(zv("effectScatter"))}var y1=function(a){z(e,a);function e(t,r,n){var i=a.call(this)||this;return i.add(i.createLine(t,r,n)),i._updateEffectSymbol(t,r),i}return e.prototype.createLine=function(t,r,n){return new Co(t,r,n)},e.prototype._updateEffectSymbol=function(t,r){var n=t.getItemModel(r),i=n.getModel("effect"),o=i.get("symbolSize"),s=i.get("symbol");W(o)||(o=[o,o]);var l=t.getItemVisual(r,"style"),u=i.get("color")||l&&l.stroke,v=this.childAt(1);this._symbolType!==s&&(this.remove(v),v=jt(s,-.5,-.5,1,1,u),v.z2=100,v.culling=!0,this.add(v)),v&&(v.setStyle("shadowColor",u),v.setStyle(i.getItemStyle(["color"])),v.scaleX=o[0],v.scaleY=o[1],v.setColor(u),this._symbolType=s,this._symbolScale=o,this._updateEffectAnimation(t,i,r))},e.prototype._updateEffectAnimation=function(t,r,n){var i=this.childAt(1);if(!!i){var o=t.getItemLayout(n),s=r.get("period")*1e3,l=r.get("loop"),u=r.get("constantSpeed"),v=Ot(r.get("delay"),function(h){return h/t.count()*s/3});if(i.ignore=!0,this._updateAnimationPoints(i,o),u>0&&(s=this._getLineLength(i)/u*1e3),s!==this._period||l!==this._loop){i.stopAnimation();var c=void 0;ot(v)?c=v(n):c=v,i.__t>0&&(c=-s*i.__t),this._animateSymbol(i,s,c,l)}this._period=s,this._loop=l}},e.prototype._animateSymbol=function(t,r,n,i){if(r>0){t.__t=0;var o=this,s=t.animate("",i).when(r,{__t:1}).delay(n).during(function(){o._updateSymbolPosition(t)});i||s.done(function(){o.remove(t)}),s.start()}},e.prototype._getLineLength=function(t){return Cr(t.__p1,t.__cp1)+Cr(t.__cp1,t.__p2)},e.prototype._updateAnimationPoints=function(t,r){t.__p1=r[0],t.__p2=r[1],t.__cp1=r[2]||[(r[0][0]+r[1][0])/2,(r[0][1]+r[1][1])/2]},e.prototype.updateData=function(t,r,n){this.childAt(0).updateData(t,r,n),this._updateEffectSymbol(t,r)},e.prototype._updateSymbolPosition=function(t){var r=t.__p1,n=t.__p2,i=t.__cp1,o=t.__t,s=[t.x,t.y],l=s.slice(),u=Pv,v=Zf;s[0]=u(r[0],i[0],n[0],o),s[1]=u(r[1],i[1],n[1],o);var c=v(r[0],i[0],n[0],o),h=v(r[1],i[1],n[1],o);t.rotation=-Math.atan2(h,c)-Math.PI/2,(this._symbolType==="line"||this._symbolType==="rect"||this._symbolType==="roundRect")&&(t.__lastT!==void 0&&t.__lastT<t.__t?(t.scaleY=Cr(l,s)*1.05,o===1&&(s[0]=l[0]+(s[0]-l[0])/2,s[1]=l[1]+(s[1]-l[1])/2)):t.__lastT===1?t.scaleY=2*Cr(r,s):t.scaleY=this._symbolScale[1]),t.__lastT=t.__t,t.ignore=!1,t.x=s[0],t.y=s[1]},e.prototype.updateLayout=function(t,r){this.childAt(0).updateLayout(t,r);var n=t.getItemModel(r).getModel("effect");this._updateEffectAnimation(t,n,r)},e}(Z);const jc=y1;var m1=function(a){z(e,a);function e(t,r,n){var i=a.call(this)||this;return i._createPolyline(t,r,n),i}return e.prototype._createPolyline=function(t,r,n){var i=t.getItemLayout(r),o=new Pe({shape:{points:i}});this.add(o),this._updateCommonStl(t,r,n)},e.prototype.updateData=function(t,r,n){var i=t.hostModel,o=this.childAt(0),s={shape:{points:t.getItemLayout(r)}};vt(o,s,i,r),this._updateCommonStl(t,r,n)},e.prototype._updateCommonStl=function(t,r,n){var i=this.childAt(0),o=t.getItemModel(r),s=n&&n.emphasisLineStyle,l=n&&n.focus,u=n&&n.blurScope,v=n&&n.emphasisDisabled;if(!n||t.hasItemOption){var c=o.getModel("emphasis");s=c.getModel("lineStyle").getLineStyle(),v=c.get("disabled"),l=c.get("focus"),u=c.get("blurScope")}i.useStyle(t.getItemVisual(r,"style")),i.style.fill=null,i.style.strokeNoScale=!0;var h=i.ensureState("emphasis");h.style=s,mt(this,l,u,v)},e.prototype.updateLayout=function(t,r){var n=this.childAt(0);n.setShape("points",t.getItemLayout(r))},e}(Z);const Jc=m1;var S1=function(a){z(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t._lastFrame=0,t._lastFramePercent=0,t}return e.prototype.createLine=function(t,r,n){return new Jc(t,r,n)},e.prototype._updateAnimationPoints=function(t,r){this._points=r;for(var n=[0],i=0,o=1;o<r.length;o++){var s=r[o-1],l=r[o];i+=Cr(s,l),n.push(i)}if(i===0){this._length=0;return}for(var o=0;o<n.length;o++)n[o]/=i;this._offsets=n,this._length=i},e.prototype._getLineLength=function(){return this._length},e.prototype._updateSymbolPosition=function(t){var r=t.__t,n=this._points,i=this._offsets,o=n.length;if(!!i){var s=this._lastFrame,l;if(r<this._lastFramePercent){var u=Math.min(s+1,o-1);for(l=u;l>=0&&!(i[l]<=r);l--);l=Math.min(l,o-2)}else{for(l=s;l<o&&!(i[l]>r);l++);l=Math.min(l-1,o-2)}var v=(r-i[l])/(i[l+1]-i[l]),c=n[l],h=n[l+1];t.x=c[0]*(1-v)+v*h[0],t.y=c[1]*(1-v)+v*h[1];var f=h[0]-c[0],p=h[1]-c[1];t.rotation=-Math.atan2(p,f)-Math.PI/2,this._lastFrame=l,this._lastFramePercent=r,t.ignore=!1}},e}(jc);const x1=S1;var _1=function(){function a(){this.polyline=!1,this.curveness=0,this.segs=[]}return a}(),w1=function(a){z(e,a);function e(t){var r=a.call(this,t)||this;return r._off=0,r.hoverDataIdx=-1,r}return e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new _1},e.prototype.buildPath=function(t,r){var n=r.segs,i=r.curveness,o;if(r.polyline)for(o=this._off;o<n.length;){var s=n[o++];if(s>0){t.moveTo(n[o++],n[o++]);for(var l=1;l<s;l++)t.lineTo(n[o++],n[o++])}}else for(o=this._off;o<n.length;){var u=n[o++],v=n[o++],c=n[o++],h=n[o++];if(t.moveTo(u,v),i>0){var f=(u+c)/2-(v-h)*i,p=(v+h)/2-(c-u)*i;t.quadraticCurveTo(f,p,c,h)}else t.lineTo(c,h)}this.incremental&&(this._off=o,this.notClear=!0)},e.prototype.findDataIndex=function(t,r){var n=this.shape,i=n.segs,o=n.curveness,s=this.style.lineWidth;if(n.polyline)for(var l=0,u=0;u<i.length;){var v=i[u++];if(v>0)for(var c=i[u++],h=i[u++],f=1;f<v;f++){var p=i[u++],d=i[u++];if(as(c,h,p,d,s,t,r))return l}l++}else for(var l=0,u=0;u<i.length;){var c=i[u++],h=i[u++],p=i[u++],d=i[u++];if(o>0){var g=(c+p)/2-(h-d)*o,y=(h+d)/2-(p-c)*o;if(qf(c,h,g,y,p,d,s,t,r))return l}else if(as(c,h,p,d,s,t,r))return l;l++}return-1},e.prototype.contain=function(t,r){var n=this.transformCoordToLocal(t,r),i=this.getBoundingRect();if(t=n[0],r=n[1],i.contain(t,r)){var o=this.hoverDataIdx=this.findDataIndex(t,r);return o>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var r=this.shape,n=r.segs,i=1/0,o=1/0,s=-1/0,l=-1/0,u=0;u<n.length;){var v=n[u++],c=n[u++];i=Math.min(v,i),s=Math.max(v,s),o=Math.min(c,o),l=Math.max(c,l)}t=this._rect=new yt(i,o,s,l)}return t},e}(It),b1=function(){function a(){this.group=new Z}return a.prototype.updateData=function(e){this._clear();var t=this._create();t.setShape({segs:e.getLayout("linesPoints")}),this._setCommon(t,e)},a.prototype.incrementalPrepareUpdate=function(e){this.group.removeAll(),this._clear()},a.prototype.incrementalUpdate=function(e,t){var r=this._newAdded[0],n=t.getLayout("linesPoints"),i=r&&r.shape.segs;if(i&&i.length<2e4){var o=i.length,s=new Float32Array(o+n.length);s.set(i),s.set(n,o),r.setShape({segs:s})}else{this._newAdded=[];var l=this._create();l.incremental=!0,l.setShape({segs:n}),this._setCommon(l,t),l.__startIndex=e.start}},a.prototype.remove=function(){this._clear()},a.prototype.eachRendered=function(e){this._newAdded[0]&&e(this._newAdded[0])},a.prototype._create=function(){var e=new w1({cursor:"default"});return this._newAdded.push(e),this.group.add(e),e},a.prototype._setCommon=function(e,t,r){var n=t.hostModel;e.setShape({polyline:n.get("polyline"),curveness:n.get(["lineStyle","curveness"])}),e.useStyle(n.getModel("lineStyle").getLineStyle()),e.style.strokeNoScale=!0;var i=t.getVisual("style");i&&i.stroke&&e.setStyle("stroke",i.stroke),e.setStyle("fill",null);var o=it(e);o.seriesIndex=n.seriesIndex,e.on("mousemove",function(s){o.dataIndex=null;var l=e.hoverDataIdx;l>0&&(o.dataIndex=l+e.__startIndex)})},a.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},a}();const A1=b1;var T1={seriesType:"lines",plan:vo(),reset:function(a){var e=a.coordinateSystem;if(!!e){var t=a.get("polyline"),r=a.pipelineContext.large;return{progress:function(n,i){var o=[];if(r){var s=void 0,l=n.end-n.start;if(t){for(var u=0,v=n.start;v<n.end;v++)u+=a.getLineCoordsCount(v);s=new Float32Array(l+u*2)}else s=new Float32Array(l*4);for(var c=0,h=[],v=n.start;v<n.end;v++){var f=a.getLineCoords(v,o);t&&(s[c++]=f);for(var p=0;p<f;p++)h=e.dataToPoint(o[p],!1,h),s[c++]=h[0],s[c++]=h[1]}i.setLayout("linesPoints",s)}else for(var v=n.start;v<n.end;v++){var d=i.getItemModel(v),f=a.getLineCoords(v,o),g=[];if(t)for(var y=0;y<f;y++)g.push(e.dataToPoint(o[y]));else{g[0]=e.dataToPoint(o[0]),g[1]=e.dataToPoint(o[1]);var m=d.get(["lineStyle","curveness"]);+m&&(g[2]=[(g[0][0]+g[1][0])/2-(g[0][1]-g[1][1])*m,(g[0][1]+g[1][1])/2-(g[1][0]-g[0][0])*m])}i.setItemLayout(v,g)}}}}}};const Qc=T1;var I1=function(a){z(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,r,n){var i=t.getData(),o=this._updateLineDraw(i,t),s=t.get("zlevel"),l=t.get(["effect","trailLength"]),u=n.getZr(),v=u.painter.getType()==="svg";v||u.painter.getLayer(s).clear(!0),this._lastZlevel!=null&&!v&&u.configLayer(this._lastZlevel,{motionBlur:!1}),this._showEffect(t)&&l>0&&(v||u.configLayer(s,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(l/10+.9,1),0)})),o.updateData(i);var c=t.get("clip",!0)&&uo(t.coordinateSystem,!1,t);c?this.group.setClipPath(c):this.group.removeClipPath(),this._lastZlevel=s,this._finished=!0},e.prototype.incrementalPrepareRender=function(t,r,n){var i=t.getData(),o=this._updateLineDraw(i,t);o.incrementalPrepareUpdate(i),this._clearLayer(n),this._finished=!1},e.prototype.incrementalRender=function(t,r,n){this._lineDraw.incrementalUpdate(t,r.getData()),this._finished=t.end===r.getData().count()},e.prototype.eachRendered=function(t){this._lineDraw&&this._lineDraw.eachRendered(t)},e.prototype.updateTransform=function(t,r,n){var i=t.getData(),o=t.pipelineContext;if(!this._finished||o.large||o.progressiveRender)return{update:!0};var s=Qc.reset(t,r,n);s.progress&&s.progress({start:0,end:i.count(),count:i.count()},i),this._lineDraw.updateLayout(),this._clearLayer(n)},e.prototype._updateLineDraw=function(t,r){var n=this._lineDraw,i=this._showEffect(r),o=!!r.get("polyline"),s=r.pipelineContext,l=s.large;return(!n||i!==this._hasEffet||o!==this._isPolyline||l!==this._isLargeDraw)&&(n&&n.remove(),n=this._lineDraw=l?new A1:new Mo(o?i?x1:Jc:i?jc:Co),this._hasEffet=i,this._isPolyline=o,this._isLargeDraw=l),this.group.add(n.group),n},e.prototype._showEffect=function(t){return!!t.get(["effect","show"])},e.prototype._clearLayer=function(t){var r=t.getZr(),n=r.painter.getType()==="svg";!n&&this._lastZlevel!=null&&r.painter.getLayer(this._lastZlevel).clear(!0)},e.prototype.remove=function(t,r){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(r)},e.prototype.dispose=function(t,r){this.remove(t,r)},e.type="lines",e}(St);const D1=I1;var C1=typeof Uint32Array>"u"?Array:Uint32Array,M1=typeof Float64Array>"u"?Array:Float64Array;function Fl(a){var e=a.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(a.data=F(e,function(t){var r=[t[0].coord,t[1].coord],n={coords:r};return t[0].name&&(n.fromName=t[0].name),t[1].name&&(n.toName=t[1].name),to([n,t[0],t[1]])}))}var L1=function(a){z(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.visualStyleAccessPath="lineStyle",t.visualDrawType="stroke",t}return e.prototype.init=function(t){t.data=t.data||[],Fl(t);var r=this._processFlatCoordsArray(t.data);this._flatCoords=r.flatCoords,this._flatCoordsOffset=r.flatCoordsOffset,r.flatCoords&&(t.data=new Float32Array(r.count)),a.prototype.init.apply(this,arguments)},e.prototype.mergeOption=function(t){if(Fl(t),t.data){var r=this._processFlatCoordsArray(t.data);this._flatCoords=r.flatCoords,this._flatCoordsOffset=r.flatCoordsOffset,r.flatCoords&&(t.data=new Float32Array(r.count))}a.prototype.mergeOption.apply(this,arguments)},e.prototype.appendData=function(t){var r=this._processFlatCoordsArray(t.data);r.flatCoords&&(this._flatCoords?(this._flatCoords=ns(this._flatCoords,r.flatCoords),this._flatCoordsOffset=ns(this._flatCoordsOffset,r.flatCoordsOffset)):(this._flatCoords=r.flatCoords,this._flatCoordsOffset=r.flatCoordsOffset),t.data=new Float32Array(r.count)),this.getRawData().appendData(t.data)},e.prototype._getCoordsFromItemModel=function(t){var r=this.getData().getItemModel(t),n=r.option instanceof Array?r.option:r.getShallow("coords");return n},e.prototype.getLineCoordsCount=function(t){return this._flatCoordsOffset?this._flatCoordsOffset[t*2+1]:this._getCoordsFromItemModel(t).length},e.prototype.getLineCoords=function(t,r){if(this._flatCoordsOffset){for(var n=this._flatCoordsOffset[t*2],i=this._flatCoordsOffset[t*2+1],o=0;o<i;o++)r[o]=r[o]||[],r[o][0]=this._flatCoords[n+o*2],r[o][1]=this._flatCoords[n+o*2+1];return i}else{for(var s=this._getCoordsFromItemModel(t),o=0;o<s.length;o++)r[o]=r[o]||[],r[o][0]=s[o][0],r[o][1]=s[o][1];return s.length}},e.prototype._processFlatCoordsArray=function(t){var r=0;if(this._flatCoords&&(r=this._flatCoords.length),ce(t[0])){for(var n=t.length,i=new C1(n),o=new M1(n),s=0,l=0,u=0,v=0;v<n;){u++;var c=t[v++];i[l++]=s+r,i[l++]=c;for(var h=0;h<c;h++){var f=t[v++],p=t[v++];o[s++]=f,o[s++]=p}}return{flatCoordsOffset:new Uint32Array(i.buffer,0,l),flatCoords:o,count:u}}return{flatCoordsOffset:null,flatCoords:null,count:t.length}},e.prototype.getInitialData=function(t,r){var n=new Bt(["value"],this);return n.hasItemOption=!1,n.initData(t.data,[],function(i,o,s,l){if(i instanceof Array)return NaN;n.hasItemOption=!0;var u=i.value;if(u!=null)return u instanceof Array?u[l]:u}),n},e.prototype.formatTooltip=function(t,r,n){var i=this.getData(),o=i.getItemModel(t),s=o.get("name");if(s)return s;var l=o.get("fromName"),u=o.get("toName"),v=[];return l!=null&&v.push(l),u!=null&&v.push(u),kt("nameValue",{name:v.join(" > ")})},e.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},e.prototype.getProgressive=function(){var t=this.option.progressive;return t==null?this.option.large?1e4:this.get("progressive"):t},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return t==null?this.option.large?2e4:this.get("progressiveThreshold"):t},e.prototype.getZLevelKey=function(){var t=this.getModel("effect"),r=t.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:t.get("show")&&r>0?r+"":""},e.type="series.lines",e.dependencies=["grid","polar","geo","calendar"],e.defaultOption={coordinateSystem:"geo",z:2,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}},e}(bt);const P1=L1;function ha(a){return a instanceof Array||(a=[a,a]),a}var V1={seriesType:"lines",reset:function(a){var e=ha(a.get("symbol")),t=ha(a.get("symbolSize")),r=a.getData();r.setVisual("fromSymbol",e&&e[0]),r.setVisual("toSymbol",e&&e[1]),r.setVisual("fromSymbolSize",t&&t[0]),r.setVisual("toSymbolSize",t&&t[1]);function n(i,o){var s=i.getItemModel(o),l=ha(s.getShallow("symbol",!0)),u=ha(s.getShallow("symbolSize",!0));l[0]&&i.setItemVisual(o,"fromSymbol",l[0]),l[1]&&i.setItemVisual(o,"toSymbol",l[1]),u[0]&&i.setItemVisual(o,"fromSymbolSize",u[0]),u[1]&&i.setItemVisual(o,"toSymbolSize",u[1])}return{dataEach:r.hasItemOption?n:null}}};const E1=V1;function R1(a){a.registerChartView(D1),a.registerSeriesModel(P1),a.registerLayout(Qc),a.registerVisual(E1)}var k1=256,N1=function(){function a(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var e=is.createCanvas();this.canvas=e}return a.prototype.update=function(e,t,r,n,i,o){var s=this._getBrush(),l=this._getGradient(i,"inRange"),u=this._getGradient(i,"outOfRange"),v=this.pointSize+this.blurSize,c=this.canvas,h=c.getContext("2d"),f=e.length;c.width=t,c.height=r;for(var p=0;p<f;++p){var d=e[p],g=d[0],y=d[1],m=d[2],S=n(m);h.globalAlpha=S,h.drawImage(s,g-v,y-v)}if(!c.width||!c.height)return c;for(var x=h.getImageData(0,0,c.width,c.height),w=x.data,_=0,b=w.length,A=this.minOpacity,T=this.maxOpacity,I=T-A;_<b;){var S=w[_+3]/256,C=Math.floor(S*(k1-1))*4;if(S>0){var E=o(S)?l:u;S>0&&(S=S*I+A),w[_++]=E[C],w[_++]=E[C+1],w[_++]=E[C+2],w[_++]=E[C+3]*S*256}else _+=4}return h.putImageData(x,0,0),c},a.prototype._getBrush=function(){var e=this._brushCanvas||(this._brushCanvas=is.createCanvas()),t=this.pointSize+this.blurSize,r=t*2;e.width=r,e.height=r;var n=e.getContext("2d");return n.clearRect(0,0,r,r),n.shadowOffsetX=r,n.shadowBlur=this.blurSize,n.shadowColor="#000",n.beginPath(),n.arc(-t,t,this.pointSize,0,Math.PI*2,!0),n.closePath(),n.fill(),e},a.prototype._getGradient=function(e,t){for(var r=this._gradientPixels,n=r[t]||(r[t]=new Uint8ClampedArray(256*4)),i=[0,0,0,0],o=0,s=0;s<256;s++)e[t](s/255,!0,i),n[o++]=i[0],n[o++]=i[1],n[o++]=i[2],n[o++]=i[3];return n},a}();const z1=N1;function G1(a,e,t){var r=a[1]-a[0];e=F(e,function(o){return{interval:[(o.interval[0]-a[0])/r,(o.interval[1]-a[0])/r]}});var n=e.length,i=0;return function(o){var s;for(s=i;s<n;s++){var l=e[s].interval;if(l[0]<=o&&o<=l[1]){i=s;break}}if(s===n)for(s=i-1;s>=0;s--){var l=e[s].interval;if(l[0]<=o&&o<=l[1]){i=s;break}}return s>=0&&s<n&&t[s]}}function O1(a,e){var t=a[1]-a[0];return e=[(e[0]-a[0])/t,(e[1]-a[0])/t],function(r){return r>=e[0]&&r<=e[1]}}function Hl(a){var e=a.dimensions;return e[0]==="lng"&&e[1]==="lat"}var B1=function(a){z(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,r,n){var i;r.eachComponent("visualMap",function(s){s.eachTargetSeries(function(l){l===t&&(i=s)})}),this._progressiveEls=null,this.group.removeAll();var o=t.coordinateSystem;o.type==="cartesian2d"||o.type==="calendar"?this._renderOnCartesianAndCalendar(t,n,0,t.getData().count()):Hl(o)&&this._renderOnGeo(o,t,i,n)},e.prototype.incrementalPrepareRender=function(t,r,n){this.group.removeAll()},e.prototype.incrementalRender=function(t,r,n,i){var o=r.coordinateSystem;o&&(Hl(o)?this.render(r,n,i):(this._progressiveEls=[],this._renderOnCartesianAndCalendar(r,i,t.start,t.end,!0)))},e.prototype.eachRendered=function(t){ln(this._progressiveEls||this.group,t)},e.prototype._renderOnCartesianAndCalendar=function(t,r,n,i,o){var s=t.coordinateSystem,l,u,v,c;if(vr(s,"cartesian2d")){var h=s.getAxis("x"),f=s.getAxis("y");l=h.getBandWidth(),u=f.getBandWidth(),v=h.scale.getExtent(),c=f.scale.getExtent()}for(var p=this.group,d=t.getData(),g=t.getModel(["emphasis","itemStyle"]).getItemStyle(),y=t.getModel(["blur","itemStyle"]).getItemStyle(),m=t.getModel(["select","itemStyle"]).getItemStyle(),S=t.get(["itemStyle","borderRadius"]),x=Wt(t),w=t.getModel("emphasis"),_=w.get("focus"),b=w.get("blurScope"),A=w.get("disabled"),T=vr(s,"cartesian2d")?[d.mapDimension("x"),d.mapDimension("y"),d.mapDimension("value")]:[d.mapDimension("time"),d.mapDimension("value")],I=n;I<i;I++){var C=void 0,E=d.getItemVisual(I,"style");if(vr(s,"cartesian2d")){var V=d.get(T[0],I),M=d.get(T[1],I);if(isNaN(d.get(T[2],I))||V<v[0]||V>v[1]||M<c[0]||M>c[1])continue;var P=s.dataToPoint([V,M]);C=new Tt({shape:{x:Math.floor(Math.round(P[0])-l/2),y:Math.floor(Math.round(P[1])-u/2),width:Math.ceil(l),height:Math.ceil(u)},style:E})}else{if(isNaN(d.get(T[1],I)))continue;C=new Tt({z2:1,shape:s.dataToRect([d.get(T[0],I)]).contentShape,style:E})}if(d.hasItemOption){var R=d.getItemModel(I),G=R.getModel("emphasis");g=G.getModel("itemStyle").getItemStyle(),y=R.getModel(["blur","itemStyle"]).getItemStyle(),m=R.getModel(["select","itemStyle"]).getItemStyle(),S=R.get(["itemStyle","borderRadius"]),_=G.get("focus"),b=G.get("blurScope"),A=G.get("disabled"),x=Wt(R)}C.shape.r=S;var L=t.getRawValue(I),k="-";L&&L[2]!=null&&(k=L[2]+""),re(C,x,{labelFetcher:t,labelDataIndex:I,defaultOpacity:E.opacity,defaultText:k}),C.ensureState("emphasis").style=g,C.ensureState("blur").style=y,C.ensureState("select").style=m,mt(C,_,b,A),C.incremental=o,o&&(C.states.emphasis.hoverLayer=!0),p.add(C),d.setItemGraphicEl(I,C),this._progressiveEls&&this._progressiveEls.push(C)}},e.prototype._renderOnGeo=function(t,r,n,i){var o=n.targetVisuals.inRange,s=n.targetVisuals.outOfRange,l=r.getData(),u=this._hmLayer||this._hmLayer||new z1;u.blurSize=r.get("blurSize"),u.pointSize=r.get("pointSize"),u.minOpacity=r.get("minOpacity"),u.maxOpacity=r.get("maxOpacity");var v=t.getViewRect().clone(),c=t.getRoamTransform();v.applyTransform(c);var h=Math.max(v.x,0),f=Math.max(v.y,0),p=Math.min(v.width+v.x,i.getWidth()),d=Math.min(v.height+v.y,i.getHeight()),g=p-h,y=d-f,m=[l.mapDimension("lng"),l.mapDimension("lat"),l.mapDimension("value")],S=l.mapArray(m,function(b,A,T){var I=t.dataToPoint([b,A]);return I[0]-=h,I[1]-=f,I.push(T),I}),x=n.getExtent(),w=n.type==="visualMap.continuous"?O1(x,n.option.range):G1(x,n.getPieceList(),n.option.selected);u.update(S,g,y,o.color.getNormalizer(),{inRange:o.color.getColorMapper(),outOfRange:s.color.getColorMapper()},w);var _=new fe({style:{width:g,height:y,x:h,y:f,image:u.canvas},silent:!0});this.group.add(_)},e.type="heatmap",e}(St);const F1=B1;var H1=function(a){z(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,r){return jr(null,this,{generateCoord:"value"})},e.prototype.preventIncremental=function(){var t=Vv.get(this.get("coordinateSystem"));if(t&&t.dimensions)return t.dimensions[0]==="lng"&&t.dimensions[1]==="lat"},e.type="series.heatmap",e.dependencies=["grid","geo","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:"#212121"}}},e}(bt);const W1=H1;function $1(a){a.registerChartView(F1),a.registerSeriesModel(W1)}var U1=["itemStyle","borderWidth"],Wl=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],ri=new Xe,Y1=function(a){z(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,r,n){var i=this.group,o=t.getData(),s=this._data,l=t.coordinateSystem,u=l.getBaseAxis(),v=u.isHorizontal(),c=l.master.getRect(),h={ecSize:{width:n.getWidth(),height:n.getHeight()},seriesModel:t,coordSys:l,coordSysExtent:[[c.x,c.x+c.width],[c.y,c.y+c.height]],isHorizontal:v,valueDim:Wl[+v],categoryDim:Wl[1-+v]};return o.diff(s).add(function(f){if(!!o.hasValue(f)){var p=Ul(o,f),d=$l(o,f,p,h),g=Yl(o,h,d);o.setItemGraphicEl(f,g),i.add(g),Zl(g,h,d)}}).update(function(f,p){var d=s.getItemGraphicEl(p);if(!o.hasValue(f)){i.remove(d);return}var g=Ul(o,f),y=$l(o,f,g,h),m=ih(o,y);d&&m!==d.__pictorialShapeStr&&(i.remove(d),o.setItemGraphicEl(f,null),d=null),d?Q1(d,h,y):d=Yl(o,h,y,!0),o.setItemGraphicEl(f,d),d.__pictorialSymbolMeta=y,i.add(d),Zl(d,h,y)}).remove(function(f){var p=s.getItemGraphicEl(f);p&&Xl(s,f,p.__pictorialSymbolMeta.animationModel,p)}).execute(),this._data=o,this.group},e.prototype.remove=function(t,r){var n=this.group,i=this._data;t.get("animation")?i&&i.eachItemGraphicEl(function(o){Xl(i,it(o).dataIndex,t,o)}):n.removeAll()},e.type="pictorialBar",e}(St);function $l(a,e,t,r){var n=a.getItemLayout(e),i=t.get("symbolRepeat"),o=t.get("symbolClip"),s=t.get("symbolPosition")||"start",l=t.get("symbolRotate"),u=(l||0)*Math.PI/180||0,v=t.get("symbolPatternSize")||2,c=t.isAnimationEnabled(),h={dataIndex:e,layout:n,itemModel:t,symbolType:a.getItemVisual(e,"symbol")||"circle",style:a.getItemVisual(e,"style"),symbolClip:o,symbolRepeat:i,symbolRepeatDirection:t.get("symbolRepeatDirection"),symbolPatternSize:v,rotation:u,animationModel:c?t:null,hoverScale:c&&t.get(["emphasis","scale"]),z2:t.getShallow("z",!0)||0};X1(t,i,n,r,h),Z1(a,e,n,i,o,h.boundingLength,h.pxSign,v,r,h),q1(t,h.symbolScale,u,r,h);var f=h.symbolSize,p=sn(t.get("symbolOffset"),f);return K1(t,f,n,i,o,p,s,h.valueLineWidth,h.boundingLength,h.repeatCutLength,r,h),h}function X1(a,e,t,r,n){var i=r.valueDim,o=a.get("symbolBoundingData"),s=r.coordSys.getOtherAxis(r.coordSys.getBaseAxis()),l=s.toGlobalCoord(s.dataToCoord(0)),u=1-+(t[i.wh]<=0),v;if(W(o)){var c=[ai(s,o[0])-l,ai(s,o[1])-l];c[1]<c[0]&&c.reverse(),v=c[u]}else o!=null?v=ai(s,o)-l:e?v=r.coordSysExtent[i.index][u]-l:v=t[i.wh];n.boundingLength=v,e&&(n.repeatCutLength=t[i.wh]),n.pxSign=v>0?1:-1}function ai(a,e){return a.toGlobalCoord(a.dataToCoord(a.scale.parse(e)))}function Z1(a,e,t,r,n,i,o,s,l,u){var v=l.valueDim,c=l.categoryDim,h=Math.abs(t[c.wh]),f=a.getItemVisual(e,"symbolSize"),p;W(f)?p=f.slice():f==null?p=["100%","100%"]:p=[f,f],p[c.index]=H(p[c.index],h),p[v.index]=H(p[v.index],r?h:Math.abs(i)),u.symbolSize=p;var d=u.symbolScale=[p[0]/s,p[1]/s];d[v.index]*=(l.isHorizontal?-1:1)*o}function q1(a,e,t,r,n){var i=a.get(U1)||0;i&&(ri.attr({scaleX:e[0],scaleY:e[1],rotation:t}),ri.updateTransform(),i/=ri.getLineScale(),i*=e[r.valueDim.index]),n.valueLineWidth=i||0}function K1(a,e,t,r,n,i,o,s,l,u,v,c){var h=v.categoryDim,f=v.valueDim,p=c.pxSign,d=Math.max(e[f.index]+s,0),g=d;if(r){var y=Math.abs(l),m=Ot(a.get("symbolMargin"),"15%")+"",S=!1;m.lastIndexOf("!")===m.length-1&&(S=!0,m=m.slice(0,m.length-1));var x=H(m,e[f.index]),w=Math.max(d+x*2,0),_=S?0:x*2,b=Kf(r),A=b?r:ql((y+_)/w),T=y-A*d;x=T/2/(S?A:Math.max(A-1,1)),w=d+x*2,_=S?0:x*2,!b&&r!=="fixed"&&(A=u?ql((Math.abs(u)+_)/w):0),g=A*w-_,c.repeatTimes=A,c.symbolMargin=x}var I=p*(g/2),C=c.pathPosition=[];C[h.index]=t[h.wh]/2,C[f.index]=o==="start"?I:o==="end"?l-I:l/2,i&&(C[0]+=i[0],C[1]+=i[1]);var E=c.bundlePosition=[];E[h.index]=t[h.xy],E[f.index]=t[f.xy];var V=c.barRectShape=$({},t);V[f.wh]=p*Math.max(Math.abs(t[f.wh]),Math.abs(C[f.index]+I)),V[h.wh]=t[h.wh];var M=c.clipShape={};M[h.xy]=-t[h.xy],M[h.wh]=v.ecSize[h.wh],M[f.xy]=0,M[f.wh]=t[f.wh]}function th(a){var e=a.symbolPatternSize,t=jt(a.symbolType,-e/2,-e/2,e,e);return t.attr({culling:!0}),t.type!=="image"&&t.setStyle({strokeNoScale:!0}),t}function eh(a,e,t,r){var n=a.__pictorialBundle,i=t.symbolSize,o=t.valueLineWidth,s=t.pathPosition,l=e.valueDim,u=t.repeatTimes||0,v=0,c=i[e.valueDim.index]+o+t.symbolMargin*2;for(Lo(a,function(d){d.__pictorialAnimationIndex=v,d.__pictorialRepeatTimes=u,v<u?cr(d,null,p(v),t,r):cr(d,null,{scaleX:0,scaleY:0},t,r,function(){n.remove(d)}),v++});v<u;v++){var h=th(t);h.__pictorialAnimationIndex=v,h.__pictorialRepeatTimes=u,n.add(h);var f=p(v);cr(h,{x:f.x,y:f.y,scaleX:0,scaleY:0},{scaleX:f.scaleX,scaleY:f.scaleY,rotation:f.rotation},t,r)}function p(d){var g=s.slice(),y=t.pxSign,m=d;return(t.symbolRepeatDirection==="start"?y>0:y<0)&&(m=u-1-d),g[l.index]=c*(m-u/2+.5)+s[l.index],{x:g[0],y:g[1],scaleX:t.symbolScale[0],scaleY:t.symbolScale[1],rotation:t.rotation}}}function rh(a,e,t,r){var n=a.__pictorialBundle,i=a.__pictorialMainPath;i?cr(i,null,{x:t.pathPosition[0],y:t.pathPosition[1],scaleX:t.symbolScale[0],scaleY:t.symbolScale[1],rotation:t.rotation},t,r):(i=a.__pictorialMainPath=th(t),n.add(i),cr(i,{x:t.pathPosition[0],y:t.pathPosition[1],scaleX:0,scaleY:0,rotation:t.rotation},{scaleX:t.symbolScale[0],scaleY:t.symbolScale[1]},t,r))}function ah(a,e,t){var r=$({},e.barRectShape),n=a.__pictorialBarRect;n?cr(n,null,{shape:r},e,t):(n=a.__pictorialBarRect=new Tt({z2:2,shape:r,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),n.disableMorphing=!0,a.add(n))}function nh(a,e,t,r){if(t.symbolClip){var n=a.__pictorialClipPath,i=$({},t.clipShape),o=e.valueDim,s=t.animationModel,l=t.dataIndex;if(n)vt(n,{shape:i},s,l);else{i[o.wh]=0,n=new Tt({shape:i}),a.__pictorialBundle.setClipPath(n),a.__pictorialClipPath=n;var u={};u[o.wh]=t.clipShape[o.wh],qa[r?"updateProps":"initProps"](n,{shape:u},s,l)}}}function Ul(a,e){var t=a.getItemModel(e);return t.getAnimationDelayParams=j1,t.isAnimationEnabled=J1,t}function j1(a){return{index:a.__pictorialAnimationIndex,count:a.__pictorialRepeatTimes}}function J1(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function Yl(a,e,t,r){var n=new Z,i=new Z;return n.add(i),n.__pictorialBundle=i,i.x=t.bundlePosition[0],i.y=t.bundlePosition[1],t.symbolRepeat?eh(n,e,t):rh(n,e,t),ah(n,t,r),nh(n,e,t,r),n.__pictorialShapeStr=ih(a,t),n.__pictorialSymbolMeta=t,n}function Q1(a,e,t){var r=t.animationModel,n=t.dataIndex,i=a.__pictorialBundle;vt(i,{x:t.bundlePosition[0],y:t.bundlePosition[1]},r,n),t.symbolRepeat?eh(a,e,t,!0):rh(a,e,t,!0),ah(a,t,!0),nh(a,e,t,!0)}function Xl(a,e,t,r){var n=r.__pictorialBarRect;n&&n.removeTextContent();var i=[];Lo(r,function(o){i.push(o)}),r.__pictorialMainPath&&i.push(r.__pictorialMainPath),r.__pictorialClipPath&&(t=null),D(i,function(o){Aa(o,{scaleX:0,scaleY:0},t,e,function(){r.parent&&r.parent.remove(r)})}),a.setItemGraphicEl(e,null)}function ih(a,e){return[a.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function Lo(a,e,t){D(a.__pictorialBundle.children(),function(r){r!==a.__pictorialBarRect&&e.call(t,r)})}function cr(a,e,t,r,n,i){e&&a.attr(e),r.symbolClip&&!n?t&&a.attr(t):t&&qa[n?"updateProps":"initProps"](a,t,r.animationModel,r.dataIndex,i)}function Zl(a,e,t){var r=t.dataIndex,n=t.itemModel,i=n.getModel("emphasis"),o=i.getModel("itemStyle").getItemStyle(),s=n.getModel(["blur","itemStyle"]).getItemStyle(),l=n.getModel(["select","itemStyle"]).getItemStyle(),u=n.getShallow("cursor"),v=i.get("focus"),c=i.get("blurScope"),h=i.get("scale");Lo(a,function(d){if(d instanceof fe){var g=d.style;d.useStyle($({image:g.image,x:g.x,y:g.y,width:g.width,height:g.height},t.style))}else d.useStyle(t.style);var y=d.ensureState("emphasis");y.style=o,h&&(y.scaleX=d.scaleX*1.1,y.scaleY=d.scaleY*1.1),d.ensureState("blur").style=s,d.ensureState("select").style=l,u&&(d.cursor=u),d.z2=t.z2});var f=e.valueDim.posDesc[+(t.boundingLength>0)],p=a.__pictorialBarRect;re(p,Wt(n),{labelFetcher:e.seriesModel,labelDataIndex:r,defaultText:Di(e.seriesModel.getData(),r),inheritColor:t.style.fill,defaultOpacity:t.style.opacity,defaultOutsidePosition:f}),mt(a,v,c,i.get("disabled"))}function ql(a){var e=Math.round(a);return Math.abs(a-e)<1e-4?e:Math.ceil(a)}const tx=Y1;var ex=function(a){z(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t.defaultSymbol="roundRect",t}return e.prototype.getInitialData=function(t){return t.stack=null,a.prototype.getInitialData.apply(this,arguments)},e.type="series.pictorialBar",e.dependencies=["grid"],e.defaultOption=un(os.defaultOption,{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:"#212121"}}}),e}(os);const rx=ex;function ax(a){a.registerChartView(tx),a.registerSeriesModel(rx),a.registerLayout(a.PRIORITY.VISUAL.LAYOUT,st(jf,"pictorialBar")),a.registerLayout(a.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,Jf("pictorialBar"))}var nx=function(a){z(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t._layers=[],t}return e.prototype.render=function(t,r,n){var i=t.getData(),o=this,s=this.group,l=t.getLayerSeries(),u=i.getLayout("layoutInfo"),v=u.rect,c=u.boundaryGap;s.x=0,s.y=v.y+c[0];function h(g){return g.name}var f=new dr(this._layersSeries||[],l,h,h),p=[];f.add(q(d,this,"add")).update(q(d,this,"update")).remove(q(d,this,"remove")).execute();function d(g,y,m){var S=o._layers;if(g==="remove"){s.remove(S[y]);return}for(var x=[],w=[],_,b=l[y].indices,A=0;A<b.length;A++){var T=i.getItemLayout(b[A]),I=T.x,C=T.y0,E=T.y;x.push(I,C),w.push(I,C+E),_=i.getItemVisual(b[A],"style")}var V,M=i.getItemLayout(b[0]),P=t.getModel("label"),R=P.get("margin"),G=t.getModel("emphasis");if(g==="add"){var L=p[y]=new Z;V=new Qf({shape:{points:x,stackedOnPoints:w,smooth:.4,stackedOnSmooth:.4,smoothConstraint:!1},z2:0}),L.add(V),s.add(L),t.isAnimationEnabled()&&V.setClipPath(ix(V.getBoundingRect(),t,function(){V.removeClipPath()}))}else{var L=S[m];V=L.childAt(0),s.add(L),p[y]=L,vt(V,{shape:{points:x,stackedOnPoints:w}},t),De(V)}re(V,Wt(t),{labelDataIndex:b[A-1],defaultText:i.getName(b[A-1]),inheritColor:_.fill},{normal:{verticalAlign:"middle"}}),V.setTextConfig({position:null,local:!0});var k=V.getTextContent();k&&(k.x=M.x-R,k.y=M.y0+M.y/2),V.useStyle(_),i.setItemGraphicEl(y,V),Ht(V,t),mt(V,G.get("focus"),G.get("blurScope"),G.get("disabled"))}this._layersSeries=l,this._layers=p},e.type="themeRiver",e}(St);function ix(a,e,t){var r=new Tt({shape:{x:a.x-10,y:a.y-10,width:0,height:a.height+20}});return ee(r,{shape:{x:a.x-50,width:a.width+100,height:a.height+20}},e,t),r}const ox=nx;var ni=2,sx=function(a){z(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t){a.prototype.init.apply(this,arguments),this.legendVisualProvider=new ja(q(this.getData,this),q(this.getRawData,this))},e.prototype.fixData=function(t){var r=t.length,n={},i=Ti(t,function(h){return n.hasOwnProperty(h[0]+"")||(n[h[0]+""]=-1),h[2]}),o=[];i.buckets.each(function(h,f){o.push({name:f,dataList:h})});for(var s=o.length,l=0;l<s;++l){for(var u=o[l].name,v=0;v<o[l].dataList.length;++v){var c=o[l].dataList[v][0]+"";n[c]=l}for(var c in n)n.hasOwnProperty(c)&&n[c]!==l&&(n[c]=l,t[r]=[c,0,u],r++)}return t},e.prototype.getInitialData=function(t,r){for(var n=this.getReferringComponents("singleAxis",mr).models[0],i=n.get("type"),o=Et(t.data,function(p){return p[2]!==void 0}),s=this.fixData(o||[]),l=[],u=this.nameMap=nt(),v=0,c=0;c<s.length;++c)l.push(s[c][ni]),u.get(s[c][ni])||(u.set(s[c][ni],v),v++);var h=eo(s,{coordDimensions:["single"],dimensionsDefine:[{name:"time",type:Ii(i)},{name:"value",type:"float"},{name:"name",type:"ordinal"}],encodeDefine:{single:0,value:1,itemName:2}}).dimensions,f=new Bt(h,this);return f.initData(s),f},e.prototype.getLayerSeries=function(){for(var t=this.getData(),r=t.count(),n=[],i=0;i<r;++i)n[i]=i;var o=t.mapDimension("single"),s=Ti(n,function(u){return t.get("name",u)}),l=[];return s.buckets.each(function(u,v){u.sort(function(c,h){return t.get(o,c)-t.get(o,h)}),l.push({name:v,indices:u})}),l},e.prototype.getAxisTooltipData=function(t,r,n){W(t)||(t=t?[t]:[]);for(var i=this.getData(),o=this.getLayerSeries(),s=[],l=o.length,u,v=0;v<l;++v){for(var c=Number.MAX_VALUE,h=-1,f=o[v].indices.length,p=0;p<f;++p){var d=i.get(t[0],o[v].indices[p]),g=Math.abs(d-r);g<=c&&(u=d,c=g,h=o[v].indices[p])}s.push(h)}return{dataIndices:s,nestestValue:u}},e.prototype.formatTooltip=function(t,r,n){var i=this.getData(),o=i.getName(t),s=i.get(i.mapDimension("value"),t);return kt("nameValue",{name:o,value:s})},e.type="series.themeRiver",e.dependencies=["singleAxis"],e.defaultOption={z:2,colorBy:"data",coordinateSystem:"singleAxis",boundaryGap:["10%","10%"],singleAxisIndex:0,animationEasing:"linear",label:{margin:4,show:!0,position:"left",fontSize:11},emphasis:{label:{show:!0}}},e}(bt);const lx=sx;function ux(a,e){a.eachSeriesByType("themeRiver",function(t){var r=t.getData(),n=t.coordinateSystem,i={},o=n.getRect();i.rect=o;var s=t.get("boundaryGap"),l=n.getAxis();if(i.boundaryGap=s,l.orient==="horizontal"){s[0]=H(s[0],o.height),s[1]=H(s[1],o.height);var u=o.height-s[0]-s[1];Kl(r,t,u)}else{s[0]=H(s[0],o.width),s[1]=H(s[1],o.width);var v=o.width-s[0]-s[1];Kl(r,t,v)}r.setLayout("layoutInfo",i)})}function Kl(a,e,t){if(!!a.count())for(var r=e.coordinateSystem,n=e.getLayerSeries(),i=a.mapDimension("single"),o=a.mapDimension("value"),s=F(n,function(g){return F(g.indices,function(y){var m=r.dataToPoint(a.get(i,y));return m[1]=a.get(o,y),m})}),l=vx(s),u=l.y0,v=t/l.max,c=n.length,h=n[0].indices.length,f,p=0;p<h;++p){f=u[p]*v,a.setItemLayout(n[0].indices[p],{layerIndex:0,x:s[0][p][0],y0:f,y:s[0][p][1]*v});for(var d=1;d<c;++d)f+=s[d-1][p][1]*v,a.setItemLayout(n[d].indices[p],{layerIndex:d,x:s[d][p][0],y0:f,y:s[d][p][1]*v})}}function vx(a){for(var e=a.length,t=a[0].length,r=[],n=[],i=0,o=0;o<t;++o){for(var s=0,l=0;l<e;++l)s+=a[l][o][1];s>i&&(i=s),r.push(s)}for(var u=0;u<t;++u)n[u]=(i-r[u])/2;i=0;for(var v=0;v<t;++v){var c=r[v]+n[v];c>i&&(i=c)}return{y0:n,max:i}}function cx(a){a.registerChartView(ox),a.registerSeriesModel(lx),a.registerLayout(ux),a.registerProcessor(Qa("themeRiver"))}var hx=2,fx=4,px=function(a){z(e,a);function e(t,r,n,i){var o=a.call(this)||this;o.z2=hx,o.textConfig={inside:!0},it(o).seriesIndex=r.seriesIndex;var s=new pt({z2:fx,silent:t.getModel().get(["label","silent"])});return o.setTextContent(s),o.updateData(!0,t,r,n,i),o}return e.prototype.updateData=function(t,r,n,i,o){this.node=r,r.piece=this,n=n||this._seriesModel,i=i||this._ecModel;var s=this;it(s).dataIndex=r.dataIndex;var l=r.getModel(),u=l.getModel("emphasis"),v=r.getLayout(),c=$({},v);c.label=null;var h=r.getVisual("style");h.lineJoin="bevel";var f=r.getVisual("decal");f&&(h.decal=Qi(f,o));var p=ss(l.getModel("itemStyle"),c,!0);$(c,p),D(Ai,function(m){var S=s.ensureState(m),x=l.getModel([m,"itemStyle"]);S.style=x.getItemStyle();var w=ss(x,c);w&&(S.shape=w)}),t?(s.setShape(c),s.shape.r=v.r0,vt(s,{shape:{r:v.r}},n,r.dataIndex)):(vt(s,{shape:c},n),De(s)),s.useStyle(h),this._updateLabel(n);var d=l.getShallow("cursor");d&&s.attr("cursor",d),this._seriesModel=n||this._seriesModel,this._ecModel=i||this._ecModel;var g=u.get("focus"),y=g==="ancestor"?r.getAncestorsIndices():g==="descendant"?r.getDescendantIndices():g;mt(this,y,u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t){var r=this,n=this.node.getModel(),i=n.getModel("label"),o=this.node.getLayout(),s=o.endAngle-o.startAngle,l=(o.startAngle+o.endAngle)/2,u=Math.cos(l),v=Math.sin(l),c=this,h=c.getTextContent(),f=this.node.dataIndex,p=i.get("minAngle")/180*Math.PI,d=i.get("show")&&!(p!=null&&Math.abs(s)<p);h.ignore=!d,D(tp,function(y){var m=y==="normal"?n.getModel("label"):n.getModel([y,"label"]),S=y==="normal",x=S?h:h.ensureState(y),w=t.getFormattedLabel(f,y);S&&(w=w||r.node.name),x.style=Ft(m,{},null,y!=="normal",!0),w&&(x.style.text=w);var _=m.get("show");_!=null&&!S&&(x.ignore=!_);var b=g(m,"position"),A=S?c:c.states[y],T=A.style.fill;A.textConfig={outsideFill:m.get("color")==="inherit"?T:null,inside:b!=="outside"};var I,C=g(m,"distance")||0,E=g(m,"align");b==="outside"?(I=o.r+C,E=l>Math.PI/2?"right":"left"):!E||E==="center"?(s===2*Math.PI&&o.r0===0?I=0:I=(o.r+o.r0)/2,E="center"):E==="left"?(I=o.r0+C,l>Math.PI/2&&(E="right")):E==="right"&&(I=o.r-C,l>Math.PI/2&&(E="left")),x.style.align=E,x.style.verticalAlign=g(m,"verticalAlign")||"middle",x.x=I*u+o.cx,x.y=I*v+o.cy;var V=g(m,"rotate"),M=0;V==="radial"?(M=-l,M<-Math.PI/2&&(M+=Math.PI)):V==="tangential"?(M=Math.PI/2-l,M>Math.PI/2?M-=Math.PI:M<-Math.PI/2&&(M+=Math.PI)):ce(V)&&(M=V*Math.PI/180),x.rotation=M});function g(y,m){var S=y.get(m);return S==null?i.get(m):S}h.dirtyStyle()},e}(Ke);const jl=px;var Fi="sunburstRootToNode",Jl="sunburstHighlight",dx="sunburstUnhighlight";function gx(a){a.registerAction({type:Fi,update:"updateView"},function(e,t){t.eachComponent({mainType:"series",subType:"sunburst",query:e},r);function r(n,i){var o=Wr(e,[Fi],n);if(o){var s=n.getViewRoot();s&&(e.direction=Ao(s,o.node)?"rollUp":"drillDown"),n.resetViewRoot(o.node)}}}),a.registerAction({type:Jl,update:"none"},function(e,t,r){e=$({},e),t.eachComponent({mainType:"series",subType:"sunburst",query:e},n);function n(i){var o=Wr(e,[Jl],i);o&&(e.dataIndex=o.node.dataIndex)}r.dispatchAction($(e,{type:"highlight"}))}),a.registerAction({type:dx,update:"updateView"},function(e,t,r){e=$({},e),r.dispatchAction($(e,{type:"downplay"}))})}var yx=function(a){z(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,r,n,i){var o=this;this.seriesModel=t,this.api=n,this.ecModel=r;var s=t.getData(),l=s.tree.root,u=t.getViewRoot(),v=this.group,c=t.get("renderLabelForZeroData"),h=[];u.eachNode(function(m){h.push(m)});var f=this._oldChildren||[];p(h,f),y(l,u),this._initEvents(),this._oldChildren=h;function p(m,S){if(m.length===0&&S.length===0)return;new dr(S,m,x,x).add(w).update(w).remove(st(w,null)).execute();function x(_){return _.getId()}function w(_,b){var A=_==null?null:m[_],T=b==null?null:S[b];d(A,T)}}function d(m,S){if(!c&&m&&!m.getValue()&&(m=null),m!==l&&S!==l){if(S&&S.piece)m?(S.piece.updateData(!1,m,t,r,n),s.setItemGraphicEl(m.dataIndex,S.piece)):g(S);else if(m){var x=new jl(m,t,r,n);v.add(x),s.setItemGraphicEl(m.dataIndex,x)}}}function g(m){!m||m.piece&&(v.remove(m.piece),m.piece=null)}function y(m,S){S.depth>0?(o.virtualPiece?o.virtualPiece.updateData(!1,m,t,r,n):(o.virtualPiece=new jl(m,t,r,n),v.add(o.virtualPiece)),S.piece.off("click"),o.virtualPiece.on("click",function(x){o._rootToNode(S.parentNode)})):o.virtualPiece&&(v.remove(o.virtualPiece),o.virtualPiece=null)}},e.prototype._initEvents=function(){var t=this;this.group.off("click"),this.group.on("click",function(r){var n=!1,i=t.seriesModel.getViewRoot();i.eachNode(function(o){if(!n&&o.piece&&o.piece===r.target){var s=o.getModel().get("nodeClick");if(s==="rootToNode")t._rootToNode(o);else if(s==="link"){var l=o.getModel(),u=l.get("link");if(u){var v=l.get("target",!0)||"_blank";Lv(u,v)}}n=!0}})})},e.prototype._rootToNode=function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:Fi,from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},e.prototype.containPoint=function(t,r){var n=r.getData(),i=n.getItemLayout(0);if(i){var o=t[0]-i.cx,s=t[1]-i.cy,l=Math.sqrt(o*o+s*s);return l<=i.r&&l>=i.r0}},e.type="sunburst",e}(St);const mx=yx;var Sx=function(a){z(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.ignoreStyleOnData=!0,t}return e.prototype.getInitialData=function(t,r){var n={name:t.name,children:t.data};oh(n);var i=this._levelModels=F(t.levels||[],function(l){return new Jt(l,this,r)},this),o=bo.createTree(n,this,s);function s(l){l.wrapMethod("getItemModel",function(u,v){var c=o.getNodeByDataIndex(v),h=i[c.depth];return h&&(u.parentModel=h),u})}return o.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.getDataParams=function(t){var r=a.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(t);return r.treePathInfo=pn(n,this),r},e.prototype.getLevelModel=function(t){return this._levelModels&&this._levelModels[t.depth]},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var r=this.getRawData().tree.root;(!t||t!==r&&!r.contains(t))&&(this._viewRoot=r)},e.prototype.enableAriaDecal=function(){bc(this)},e.type="series.sunburst",e.defaultOption={z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,stillShowZeroSum:!0,nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},emphasis:{focus:"descendant"},blur:{itemStyle:{opacity:.2},label:{opacity:.1}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,data:[],sort:"desc"},e}(bt);function oh(a){var e=0;D(a.children,function(r){oh(r);var n=r.value;W(n)&&(n=n[0]),e+=n});var t=a.value;W(t)&&(t=t[0]),(t==null||isNaN(t))&&(t=e),t<0&&(t=0),W(a.value)?a.value[0]=t:a.value=t}const xx=Sx;var Ql=Math.PI/180;function _x(a,e,t){e.eachSeriesByType(a,function(r){var n=r.get("center"),i=r.get("radius");W(i)||(i=[0,i]),W(n)||(n=[n,n]);var o=t.getWidth(),s=t.getHeight(),l=Math.min(o,s),u=H(n[0],o),v=H(n[1],s),c=H(i[0],l/2),h=H(i[1],l/2),f=-r.get("startAngle")*Ql,p=r.get("minAngle")*Ql,d=r.getData().tree.root,g=r.getViewRoot(),y=g.depth,m=r.get("sort");m!=null&&sh(g,m);var S=0;D(g.children,function(R){!isNaN(R.getValue())&&S++});var x=g.getValue(),w=Math.PI/(x||S)*2,_=g.depth>0,b=g.height-(_?-1:1),A=(h-c)/(b||1),T=r.get("clockwise"),I=r.get("stillShowZeroSum"),C=T?1:-1,E=function(R,G){if(!!R){var L=G;if(R!==d){var k=R.getValue(),N=x===0&&I?w:k*w;N<p&&(N=p),L=G+C*N;var O=R.depth-y-(_?-1:1),U=c+A*O,Y=c+A*(O+1),J=r.getLevelModel(R);if(J){var gt=J.get("r0",!0),zt=J.get("r",!0),j=J.get("radius",!0);j!=null&&(gt=j[0],zt=j[1]),gt!=null&&(U=H(gt,l/2)),zt!=null&&(Y=H(zt,l/2))}R.setLayout({angle:N,startAngle:G,endAngle:L,clockwise:T,cx:u,cy:v,r0:U,r:Y})}if(R.children&&R.children.length){var X=0;D(R.children,function(et){X+=E(et,G+X)})}return L-G}};if(_){var V=c,M=c+A,P=Math.PI*2;d.setLayout({angle:P,startAngle:f,endAngle:f+P,clockwise:T,cx:u,cy:v,r0:V,r:M})}E(g,f)})}function sh(a,e){var t=a.children||[];a.children=wx(t,e),t.length&&D(a.children,function(r){sh(r,e)})}function wx(a,e){if(ot(e)){var t=F(a,function(n,i){var o=n.getValue();return{params:{depth:n.depth,height:n.height,dataIndex:n.dataIndex,getValue:function(){return o}},index:i}});return t.sort(function(n,i){return e(n.params,i.params)}),F(t,function(n){return a[n.index]})}else{var r=e==="asc";return a.sort(function(n,i){var o=(n.getValue()-i.getValue())*(r?1:-1);return o===0?(n.dataIndex-i.dataIndex)*(r?-1:1):o})}}function bx(a){var e={};function t(r,n,i){for(var o=r;o&&o.depth>1;)o=o.parentNode;var s=n.getColorFromPalette(o.name||o.dataIndex+"",e);return r.depth>1&&tt(s)&&(s=ep(s,(r.depth-1)/(i-1)*.5)),s}a.eachSeriesByType("sunburst",function(r){var n=r.getData(),i=n.tree;i.eachNode(function(o){var s=o.getModel(),l=s.getModel("itemStyle").getItemStyle();l.fill||(l.fill=t(o,r,i.root.height));var u=n.ensureUniqueItemVisual(o.dataIndex,"style");$(u,l)})})}function Ax(a){a.registerChartView(mx),a.registerSeriesModel(xx),a.registerLayout(st(_x,"sunburst")),a.registerProcessor(st(Qa,"sunburst")),a.registerVisual(bx),gx(a)}var tu={color:"fill",borderColor:"stroke"},Tx={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},ye=Dt(),Ix=function(a){z(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},e.prototype.getInitialData=function(t,r){return jr(null,this)},e.prototype.getDataParams=function(t,r,n){var i=a.prototype.getDataParams.call(this,t,r);return n&&(i.info=ye(n).info),i},e.type="series.custom",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},e}(bt);const Dx=Ix;function Cx(a,e){return e=e||[0,0],F(["x","y"],function(t,r){var n=this.getAxis(t),i=e[r],o=a[r]/2;return n.type==="category"?n.getBandWidth():Math.abs(n.dataToCoord(i-o)-n.dataToCoord(i+o))},this)}function Mx(a){var e=a.master.getRect();return{coordSys:{type:"cartesian2d",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(t){return a.dataToPoint(t)},size:q(Cx,a)}}}function Lx(a,e){return e=e||[0,0],F([0,1],function(t){var r=e[t],n=a[t]/2,i=[],o=[];return i[t]=r-n,o[t]=r+n,i[1-t]=o[1-t]=e[1-t],Math.abs(this.dataToPoint(i)[t]-this.dataToPoint(o)[t])},this)}function Px(a){var e=a.getBoundingRect();return{coordSys:{type:"geo",x:e.x,y:e.y,width:e.width,height:e.height,zoom:a.getZoom()},api:{coord:function(t){return a.dataToPoint(t)},size:q(Lx,a)}}}function Vx(a,e){var t=this.getAxis(),r=e instanceof Array?e[0]:e,n=(a instanceof Array?a[0]:a)/2;return t.type==="category"?t.getBandWidth():Math.abs(t.dataToCoord(r-n)-t.dataToCoord(r+n))}function Ex(a){var e=a.getRect();return{coordSys:{type:"singleAxis",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(t){return a.dataToPoint(t)},size:q(Vx,a)}}}function Rx(a,e){return e=e||[0,0],F(["Radius","Angle"],function(t,r){var n="get"+t+"Axis",i=this[n](),o=e[r],s=a[r]/2,l=i.type==="category"?i.getBandWidth():Math.abs(i.dataToCoord(o-s)-i.dataToCoord(o+s));return t==="Angle"&&(l=l*Math.PI/180),l},this)}function kx(a){var e=a.getRadiusAxis(),t=a.getAngleAxis(),r=e.getExtent();return r[0]>r[1]&&r.reverse(),{coordSys:{type:"polar",cx:a.cx,cy:a.cy,r:r[1],r0:r[0]},api:{coord:function(n){var i=e.dataToRadius(n[0]),o=t.dataToAngle(n[1]),s=a.coordToPoint([i,o]);return s.push(i,o*Math.PI/180),s},size:q(Rx,a)}}}function Nx(a){var e=a.getRect(),t=a.getRangeInfo();return{coordSys:{type:"calendar",x:e.x,y:e.y,width:e.width,height:e.height,cellWidth:a.getCellWidth(),cellHeight:a.getCellHeight(),rangeInfo:{start:t.start,end:t.end,weeks:t.weeks,dayCount:t.allDay}},api:{coord:function(r,n){return a.dataToPoint(r,n)}}}}function lh(a,e,t,r){return a&&(a.legacy||a.legacy!==!1&&!t&&!r&&e!=="tspan"&&(e==="text"||B(a,"text")))}function uh(a,e,t){var r=a,n,i,o;if(e==="text")o=r;else{o={},B(r,"text")&&(o.text=r.text),B(r,"rich")&&(o.rich=r.rich),B(r,"textFill")&&(o.fill=r.textFill),B(r,"textStroke")&&(o.stroke=r.textStroke),B(r,"fontFamily")&&(o.fontFamily=r.fontFamily),B(r,"fontSize")&&(o.fontSize=r.fontSize),B(r,"fontStyle")&&(o.fontStyle=r.fontStyle),B(r,"fontWeight")&&(o.fontWeight=r.fontWeight),i={type:"text",style:o,silent:!0},n={};var s=B(r,"textPosition");t?n.position=s?r.textPosition:"inside":s&&(n.position=r.textPosition),B(r,"textPosition")&&(n.position=r.textPosition),B(r,"textOffset")&&(n.offset=r.textOffset),B(r,"textRotation")&&(n.rotation=r.textRotation),B(r,"textDistance")&&(n.distance=r.textDistance)}return eu(o,a),D(o.rich,function(l){eu(l,l)}),{textConfig:n,textContent:i}}function eu(a,e){!e||(e.font=e.textFont||e.font,B(e,"textStrokeWidth")&&(a.lineWidth=e.textStrokeWidth),B(e,"textAlign")&&(a.align=e.textAlign),B(e,"textVerticalAlign")&&(a.verticalAlign=e.textVerticalAlign),B(e,"textLineHeight")&&(a.lineHeight=e.textLineHeight),B(e,"textWidth")&&(a.width=e.textWidth),B(e,"textHeight")&&(a.height=e.textHeight),B(e,"textBackgroundColor")&&(a.backgroundColor=e.textBackgroundColor),B(e,"textPadding")&&(a.padding=e.textPadding),B(e,"textBorderColor")&&(a.borderColor=e.textBorderColor),B(e,"textBorderWidth")&&(a.borderWidth=e.textBorderWidth),B(e,"textBorderRadius")&&(a.borderRadius=e.textBorderRadius),B(e,"textBoxShadowColor")&&(a.shadowColor=e.textBoxShadowColor),B(e,"textBoxShadowBlur")&&(a.shadowBlur=e.textBoxShadowBlur),B(e,"textBoxShadowOffsetX")&&(a.shadowOffsetX=e.textBoxShadowOffsetX),B(e,"textBoxShadowOffsetY")&&(a.shadowOffsetY=e.textBoxShadowOffsetY))}function ru(a,e,t){var r=a;r.textPosition=r.textPosition||t.position||"inside",t.offset!=null&&(r.textOffset=t.offset),t.rotation!=null&&(r.textRotation=t.rotation),t.distance!=null&&(r.textDistance=t.distance);var n=r.textPosition.indexOf("inside")>=0,i=a.fill||"#000";au(r,e);var o=r.textFill==null;return n?o&&(r.textFill=t.insideFill||"#fff",!r.textStroke&&t.insideStroke&&(r.textStroke=t.insideStroke),!r.textStroke&&(r.textStroke=i),r.textStrokeWidth==null&&(r.textStrokeWidth=2)):(o&&(r.textFill=a.fill||t.outsideFill||"#000"),!r.textStroke&&t.outsideStroke&&(r.textStroke=t.outsideStroke)),r.text=e.text,r.rich=e.rich,D(e.rich,function(s){au(s,s)}),r}function au(a,e){!e||(B(e,"fill")&&(a.textFill=e.fill),B(e,"stroke")&&(a.textStroke=e.fill),B(e,"lineWidth")&&(a.textStrokeWidth=e.lineWidth),B(e,"font")&&(a.font=e.font),B(e,"fontStyle")&&(a.fontStyle=e.fontStyle),B(e,"fontWeight")&&(a.fontWeight=e.fontWeight),B(e,"fontSize")&&(a.fontSize=e.fontSize),B(e,"fontFamily")&&(a.fontFamily=e.fontFamily),B(e,"align")&&(a.textAlign=e.align),B(e,"verticalAlign")&&(a.textVerticalAlign=e.verticalAlign),B(e,"lineHeight")&&(a.textLineHeight=e.lineHeight),B(e,"width")&&(a.textWidth=e.width),B(e,"height")&&(a.textHeight=e.height),B(e,"backgroundColor")&&(a.textBackgroundColor=e.backgroundColor),B(e,"padding")&&(a.textPadding=e.padding),B(e,"borderColor")&&(a.textBorderColor=e.borderColor),B(e,"borderWidth")&&(a.textBorderWidth=e.borderWidth),B(e,"borderRadius")&&(a.textBorderRadius=e.borderRadius),B(e,"shadowColor")&&(a.textBoxShadowColor=e.shadowColor),B(e,"shadowBlur")&&(a.textBoxShadowBlur=e.shadowBlur),B(e,"shadowOffsetX")&&(a.textBoxShadowOffsetX=e.shadowOffsetX),B(e,"shadowOffsetY")&&(a.textBoxShadowOffsetY=e.shadowOffsetY),B(e,"textShadowColor")&&(a.textShadowColor=e.textShadowColor),B(e,"textShadowBlur")&&(a.textShadowBlur=e.textShadowBlur),B(e,"textShadowOffsetX")&&(a.textShadowOffsetX=e.textShadowOffsetX),B(e,"textShadowOffsetY")&&(a.textShadowOffsetY=e.textShadowOffsetY))}var vh={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},nu=ft(vh);Iv(Br,function(a,e){return a[e]=1,a},{});Br.join(", ");var za=["","style","shape","extra"],gr=Dt();function Po(a,e,t,r,n){var i=a+"Animation",o=Jr(a,r,n)||{},s=gr(e).userDuring;return o.duration>0&&(o.during=s?q(Fx,{el:e,userDuring:s}):null,o.setToFinal=!0,o.scope=a),$(o,t[i]),o}function _a(a,e,t,r){r=r||{};var n=r.dataIndex,i=r.isInit,o=r.clearStyle,s=t.isAnimationEnabled(),l=gr(a),u=e.style;l.userDuring=e.during;var v={},c={};if(Wx(a,e,c),ou("shape",e,c),ou("extra",e,c),!i&&s&&(Hx(a,e,v),iu("shape",a,e,v),iu("extra",a,e,v),$x(a,e,u,v)),c.style=u,zx(a,c,o),Ox(a,e),s)if(i){var h={};D(za,function(p){var d=p?e[p]:e;d&&d.enterFrom&&(p&&(h[p]=h[p]||{}),$(p?h[p]:h,d.enterFrom))});var f=Po("enter",a,e,t,n);f.duration>0&&a.animateFrom(h,f)}else Gx(a,e,n||0,t,v);ch(a,e),u?a.dirty():a.markRedraw()}function ch(a,e){for(var t=gr(a).leaveToProps,r=0;r<za.length;r++){var n=za[r],i=n?e[n]:e;i&&i.leaveTo&&(t||(t=gr(a).leaveToProps={}),n&&(t[n]=t[n]||{}),$(n?t[n]:t,i.leaveTo))}}function gn(a,e,t,r){if(a){var n=a.parent,i=gr(a).leaveToProps;if(i){var o=Po("update",a,e,t,0);o.done=function(){n.remove(a),r&&r()},a.animateTo(i,o)}else n.remove(a),r&&r()}}function Ue(a){return a==="all"}function zx(a,e,t){var r=e.style;if(!a.isGroup&&r){if(t){a.useStyle({});for(var n=a.animators,i=0;i<n.length;i++){var o=n[i];o.targetName==="style"&&o.changeTarget(a.style)}}a.setStyle(r)}e&&(e.style=null,e&&a.attr(e),e.style=r)}function Gx(a,e,t,r,n){if(n){var i=Po("update",a,e,r,t);i.duration>0&&a.animateFrom(n,i)}}function Ox(a,e){B(e,"silent")&&(a.silent=e.silent),B(e,"ignore")&&(a.ignore=e.ignore),a instanceof qe&&B(e,"invisible")&&(a.invisible=e.invisible),a instanceof It&&B(e,"autoBatch")&&(a.autoBatch=e.autoBatch)}var le={},Bx={setTransform:function(a,e){return le.el[a]=e,this},getTransform:function(a){return le.el[a]},setShape:function(a,e){var t=le.el,r=t.shape||(t.shape={});return r[a]=e,t.dirtyShape&&t.dirtyShape(),this},getShape:function(a){var e=le.el.shape;if(e)return e[a]},setStyle:function(a,e){var t=le.el,r=t.style;return r&&(r[a]=e,t.dirtyStyle&&t.dirtyStyle()),this},getStyle:function(a){var e=le.el.style;if(e)return e[a]},setExtra:function(a,e){var t=le.el.extra||(le.el.extra={});return t[a]=e,this},getExtra:function(a){var e=le.el.extra;if(e)return e[a]}};function Fx(){var a=this,e=a.el;if(!!e){var t=gr(e).userDuring,r=a.userDuring;if(t!==r){a.el=a.userDuring=null;return}le.el=e,r(Bx)}}function iu(a,e,t,r){var n=t[a];if(!!n){var i=e[a],o;if(i){var s=t.transition,l=n.transition;if(l)if(!o&&(o=r[a]={}),Ue(l))$(o,i);else for(var u=Lt(l),v=0;v<u.length;v++){var c=u[v],h=i[c];o[c]=h}else if(Ue(s)||Ut(s,a)>=0){!o&&(o=r[a]={});for(var f=ft(i),v=0;v<f.length;v++){var c=f[v],h=i[c];Ux(n[c],h)&&(o[c]=h)}}}}}function ou(a,e,t){var r=e[a];if(!!r)for(var n=t[a]={},i=ft(r),o=0;o<i.length;o++){var s=i[o];n[s]=rp(r[s])}}function Hx(a,e,t){for(var r=e.transition,n=Ue(r)?Br:Lt(r||[]),i=0;i<n.length;i++){var o=n[i];if(!(o==="style"||o==="shape"||o==="extra")){var s=a[o];t[o]=s}}}function Wx(a,e,t){for(var r=0;r<nu.length;r++){var n=nu[r],i=vh[n],o=e[n];o&&(t[i[0]]=o[0],t[i[1]]=o[1])}for(var r=0;r<Br.length;r++){var s=Br[r];e[s]!=null&&(t[s]=e[s])}}function $x(a,e,t,r){if(!!t){var n=a.style,i;if(n){var o=t.transition,s=e.transition;if(o&&!Ue(o)){var l=Lt(o);!i&&(i=r.style={});for(var u=0;u<l.length;u++){var v=l[u],c=n[v];i[v]=c}}else if(a.getAnimationStyleProps&&(Ue(s)||Ue(o)||Ut(s,"style")>=0)){var h=a.getAnimationStyleProps(),f=h?h.style:null;if(f){!i&&(i=r.style={});for(var p=ft(t),u=0;u<p.length;u++){var v=p[u];if(f[v]){var c=n[v];i[v]=c}}}}}}}function Ux(a,e){return Gv(a)?a!==e:a!=null&&isFinite(a)}var hh=Dt(),Yx=["percent","easing","shape","style","extra"];function fh(a){a.stopAnimation("keyframe"),a.attr(hh(a))}function Ga(a,e,t){if(!(!t.isAnimationEnabled()||!e)){if(W(e)){D(e,function(s){Ga(a,s,t)});return}var r=e.keyframes,n=e.duration;if(t&&n==null){var i=Jr("enter",t,0);n=i&&i.duration}if(!(!r||!n)){var o=hh(a);D(za,function(s){if(!(s&&!a[s])){var l;r.sort(function(u,v){return u.percent-v.percent}),D(r,function(u){var v=a.animators,c=s?u[s]:u;if(!!c){var h=ft(c);if(s||(h=Et(h,function(d){return Ut(Yx,d)<0})),!!h.length){l||(l=a.animate(s,e.loop,!0),l.scope="keyframe");for(var f=0;f<v.length;f++)v[f]!==l&&v[f].targetName===l.targetName&&v[f].stopTracks(h);s&&(o[s]=o[s]||{});var p=s?o[s]:o;D(h,function(d){p[d]=((s?a[s]:a)||{})[d]}),l.whenWithKeys(n*u.percent,c,h,u.easing)}}}),l&&l.delay(e.delay||0).duration(n).start(e.easing)}})}}}var me="emphasis",Ae="normal",Vo="blur",Eo="select",Me=[Ae,me,Vo,Eo],ii={normal:["itemStyle"],emphasis:[me,"itemStyle"],blur:[Vo,"itemStyle"],select:[Eo,"itemStyle"]},oi={normal:["label"],emphasis:[me,"label"],blur:[Vo,"label"],select:[Eo,"label"]},Xx=["x","y"],Zx="e\0\0",Zt={normal:{},emphasis:{},blur:{},select:{}},qx={cartesian2d:Mx,geo:Px,singleAxis:Ex,polar:kx,calendar:Nx};function Hi(a){return a instanceof It}function Wi(a){return a instanceof qe}function Kx(a,e){e.copyTransform(a),Wi(e)&&Wi(a)&&(e.setStyle(a.style),e.z=a.z,e.z2=a.z2,e.zlevel=a.zlevel,e.invisible=a.invisible,e.ignore=a.ignore,Hi(e)&&Hi(a)&&e.setShape(a.shape))}var jx=function(a){z(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,r,n,i){this._progressiveEls=null;var o=this._data,s=t.getData(),l=this.group,u=su(t,s,r,n);o||l.removeAll(),s.diff(o).add(function(c){si(n,null,c,u(c,i),t,l,s)}).remove(function(c){var h=o.getItemGraphicEl(c);gn(h,ye(h).option,t)}).update(function(c,h){var f=o.getItemGraphicEl(h);si(n,f,c,u(c,i),t,l,s)}).execute();var v=t.get("clip",!0)?uo(t.coordinateSystem,!1,t):null;v?l.setClipPath(v):l.removeClipPath(),this._data=s},e.prototype.incrementalPrepareRender=function(t,r,n){this.group.removeAll(),this._data=null},e.prototype.incrementalRender=function(t,r,n,i,o){var s=r.getData(),l=su(r,s,n,i),u=this._progressiveEls=[];function v(f){f.isGroup||(f.incremental=!0,f.ensureState("emphasis").hoverLayer=!0)}for(var c=t.start;c<t.end;c++){var h=si(null,null,c,l(c,o),r,this.group,s);h&&(h.traverse(v),u.push(h))}},e.prototype.eachRendered=function(t){ln(this._progressiveEls||this.group,t)},e.prototype.filterForExposedEvent=function(t,r,n,i){var o=r.element;if(o==null||n.name===o)return!0;for(;(n=n.__hostTarget||n.parent)&&n!==this.group;)if(n.name===o)return!0;return!1},e.type="custom",e}(St);const Jx=jx;function Ro(a){var e=a.type,t;if(e==="path"){var r=a.shape,n=r.width!=null&&r.height!=null?{x:r.x||0,y:r.y||0,width:r.width,height:r.height}:null,i=gh(r);t=ip(i,null,n,r.layout||"center"),ye(t).customPathData=i}else if(e==="image")t=new fe({}),ye(t).customImagePath=a.style.image;else if(e==="text")t=new pt({});else if(e==="group")t=new Z;else{if(e==="compoundPath")throw new Error('"compoundPath" is not supported yet.');var o=Ov(e);if(!o){var s="";ht(s)}t=new o}return ye(t).customGraphicType=e,t.name=a.name,t.z2EmphasisLift=1,t.z2SelectLift=1,t}function ko(a,e,t,r,n,i,o){fh(e);var s=n&&n.normal.cfg;s&&e.setTextConfig(s),r&&r.transition==null&&(r.transition=Xx);var l=r&&r.style;if(l){if(e.type==="text"){var u=l;B(u,"textFill")&&(u.fill=u.textFill),B(u,"textStroke")&&(u.stroke=u.textStroke)}var v=void 0,c=Hi(e)?l.decal:null;a&&c&&(c.dirty=!0,v=Qi(c,a)),l.__decalPattern=v}if(Wi(e)&&l){var v=l.__decalPattern;v&&(l.decal=v)}_a(e,r,i,{dataIndex:t,isInit:o,clearStyle:!0}),Ga(e,r.keyframeAnimation,i)}function ph(a,e,t,r,n){var i=e.isGroup?null:e,o=n&&n[a].cfg;if(i){var s=i.ensureState(a);if(r===!1){var l=i.getState(a);l&&(l.style=null)}else s.style=r||null;o&&(s.textConfig=o),fr(i)}}function Qx(a,e,t){if(!a.isGroup){var r=a,n=t.currentZ,i=t.currentZLevel;r.z=n,r.zlevel=i;var o=e.z2;o!=null&&(r.z2=o||0);for(var s=0;s<Me.length;s++)t_(r,e,Me[s])}}function t_(a,e,t){var r=t===Ae,n=r?e:Oa(e,t),i=n?n.z2:null,o;i!=null&&(o=r?a:a.ensureState(t),o.z2=i||0)}function su(a,e,t,r){var n=a.get("renderItem"),i=a.coordinateSystem,o={};i&&(o=i.prepareCustoms?i.prepareCustoms(i):qx[i.type](i));for(var s=Q({getWidth:r.getWidth,getHeight:r.getHeight,getZr:r.getZr,getDevicePixelRatio:r.getDevicePixelRatio,value:x,style:_,ordinalRawValue:w,styleEmphasis:b,visual:I,barLayout:C,currentSeriesIndices:E,font:V},o.api||{}),l={context:{},seriesId:a.id,seriesName:a.name,seriesIndex:a.seriesIndex,coordSys:o.coordSys,dataInsideLength:e.count(),encode:e_(a.getData())},u,v,c={},h={},f={},p={},d=0;d<Me.length;d++){var g=Me[d];f[g]=a.getModel(ii[g]),p[g]=a.getModel(oi[g])}function y(M){return M===u?v||(v=e.getItemModel(M)):e.getItemModel(M)}function m(M,P){return e.hasItemOption?M===u?c[P]||(c[P]=y(M).getModel(ii[P])):y(M).getModel(ii[P]):f[P]}function S(M,P){return e.hasItemOption?M===u?h[P]||(h[P]=y(M).getModel(oi[P])):y(M).getModel(oi[P]):p[P]}return function(M,P){return u=M,v=null,c={},h={},n&&n(Q({dataIndexInside:M,dataIndex:e.getRawIndex(M),actionType:P?P.type:null},l),s)};function x(M,P){return P==null&&(P=u),e.getStore().get(e.getDimensionIndex(M||0),P)}function w(M,P){P==null&&(P=u),M=M||0;var R=e.getDimensionInfo(M);if(!R){var G=e.getDimensionIndex(M);return G>=0?e.getStore().get(G,P):void 0}var L=e.get(R.name,P),k=R&&R.ordinalMeta;return k?k.categories[L]:L}function _(M,P){P==null&&(P=u);var R=e.getItemVisual(P,"style"),G=R&&R.fill,L=R&&R.opacity,k=m(P,Ae).getItemStyle();G!=null&&(k.fill=G),L!=null&&(k.opacity=L);var N={inheritColor:tt(G)?G:"#000"},O=S(P,Ae),U=Ft(O,null,N,!1,!0);U.text=O.getShallow("show")?_t(a.getFormattedLabel(P,Ae),Di(e,P)):null;var Y=ls(O,N,!1);return T(M,k),k=ru(k,U,Y),M&&A(k,M),k.legacy=!0,k}function b(M,P){P==null&&(P=u);var R=m(P,me).getItemStyle(),G=S(P,me),L=Ft(G,null,null,!0,!0);L.text=G.getShallow("show")?nn(a.getFormattedLabel(P,me),a.getFormattedLabel(P,Ae),Di(e,P)):null;var k=ls(G,null,!0);return T(M,R),R=ru(R,L,k),M&&A(R,M),R.legacy=!0,R}function A(M,P){for(var R in P)B(P,R)&&(M[R]=P[R])}function T(M,P){M&&(M.textFill&&(P.textFill=M.textFill),M.textPosition&&(P.textPosition=M.textPosition))}function I(M,P){if(P==null&&(P=u),B(tu,M)){var R=e.getItemVisual(P,"style");return R?R[tu[M]]:null}if(B(Tx,M))return e.getItemVisual(P,M)}function C(M){if(i.type==="cartesian2d"){var P=i.getBaseAxis();return ap(Q({axis:P},M))}}function E(){return t.getCurrentSeriesIndices()}function V(M){return np(M,t)}}function e_(a){var e={};return D(a.dimensions,function(t){var r=a.getDimensionInfo(t);if(!r.isExtraCoord){var n=r.coordDim,i=e[n]=e[n]||[];i[r.coordDimIndex]=a.getDimensionIndex(t)}}),e}function si(a,e,t,r,n,i,o){if(!r){i.remove(e);return}var s=No(a,e,t,r,n,i);return s&&o.setItemGraphicEl(t,s),s&&mt(s,r.focus,r.blurScope,r.emphasisDisabled),s}function No(a,e,t,r,n,i){var o=-1,s=e;e&&dh(e,r,n)&&(o=Ut(i.childrenRef(),e),e=null);var l=!e,u=e;u?u.clearStates():(u=Ro(r),s&&Kx(s,u)),r.morph===!1?u.disableMorphing=!0:u.disableMorphing&&(u.disableMorphing=!1),Zt.normal.cfg=Zt.normal.conOpt=Zt.emphasis.cfg=Zt.emphasis.conOpt=Zt.blur.cfg=Zt.blur.conOpt=Zt.select.cfg=Zt.select.conOpt=null,Zt.isLegacy=!1,a_(u,t,r,n,l,Zt),r_(u,t,r,n,l),ko(a,u,t,r,Zt,n,l),B(r,"info")&&(ye(u).info=r.info);for(var v=0;v<Me.length;v++){var c=Me[v];if(c!==Ae){var h=Oa(r,c),f=zo(r,h,c);ph(c,u,h,f,Zt)}}return Qx(u,r,n),r.type==="group"&&n_(a,u,t,r,n),o>=0?i.replaceAt(u,o):i.add(u),u}function dh(a,e,t){var r=ye(a),n=e.type,i=e.shape,o=e.style;return t.isUniversalTransitionEnabled()||n!=null&&n!==r.customGraphicType||n==="path"&&s_(i)&&gh(i)!==r.customPathData||n==="image"&&B(o,"image")&&o.image!==r.customImagePath}function r_(a,e,t,r,n){var i=t.clipPath;if(i===!1)a&&a.getClipPath()&&a.removeClipPath();else if(i){var o=a.getClipPath();o&&dh(o,i,r)&&(o=null),o||(o=Ro(i),a.setClipPath(o)),ko(null,o,e,i,null,r,n)}}function a_(a,e,t,r,n,i){if(!a.isGroup){lu(t,null,i),lu(t,me,i);var o=i.normal.conOpt,s=i.emphasis.conOpt,l=i.blur.conOpt,u=i.select.conOpt;if(o!=null||s!=null||u!=null||l!=null){var v=a.getTextContent();if(o===!1)v&&a.removeTextContent();else{o=i.normal.conOpt=o||{type:"text"},v?v.clearStates():(v=Ro(o),a.setTextContent(v)),ko(null,v,e,o,null,r,n);for(var c=o&&o.style,h=0;h<Me.length;h++){var f=Me[h];if(f!==Ae){var p=i[f].conOpt;ph(f,v,p,zo(o,p,f),null)}}c?v.dirty():v.markRedraw()}}}}function lu(a,e,t){var r=e?Oa(a,e):a,n=e?zo(a,r,me):a.style,i=a.type,o=r?r.textConfig:null,s=a.textContent,l=s?e?Oa(s,e):s:null;if(n&&(t.isLegacy||lh(n,i,!!o,!!l))){t.isLegacy=!0;var u=uh(n,i,!e);!o&&u.textConfig&&(o=u.textConfig),!l&&u.textContent&&(l=u.textContent)}if(!e&&l){var v=l;!v.type&&(v.type="text")}var c=e?t[e]:t.normal;c.cfg=o,c.conOpt=l}function Oa(a,e){return e?a?a[e]:null:a}function zo(a,e,t){var r=e&&e.style;return r==null&&t===me&&a&&(r=a.styleEmphasis),r}function n_(a,e,t,r,n){var i=r.children,o=i?i.length:0,s=r.$mergeChildren,l=s==="byName"||r.diffChildrenByName,u=s===!1;if(!(!o&&!l&&!u)){if(l){i_({api:a,oldChildren:e.children()||[],newChildren:i||[],dataIndex:t,seriesModel:n,group:e});return}u&&e.removeAll();for(var v=0;v<o;v++)i[v]&&No(a,e.childAt(v),t,i[v],n,e);for(var c=e.childCount()-1;c>=v;c--){var h=e.childAt(c);gn(h,ye(e).option,n)}}}function i_(a){new dr(a.oldChildren,a.newChildren,uu,uu,a).add(vu).update(vu).remove(o_).execute()}function uu(a,e){var t=a&&a.name;return t!=null?t:Zx+e}function vu(a,e){var t=this.context,r=a!=null?t.newChildren[a]:null,n=e!=null?t.oldChildren[e]:null;No(t.api,n,t.dataIndex,r,t.seriesModel,t.group)}function o_(a){var e=this.context,t=e.oldChildren[a];gn(t,ye(t).option,e.seriesModel)}function gh(a){return a&&(a.pathData||a.d)}function s_(a){return a&&(B(a,"pathData")||B(a,"d"))}function l_(a){a.registerChartView(Jx),a.registerSeriesModel(Dx)}var u_=function(a){z(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,r,n,i,o){var s=n.axis;s.dim==="angle"&&(this.animationThreshold=Math.PI/18);var l=s.polar,u=l.getOtherAxis(s),v=u.getExtent(),c=s.dataToCoord(r),h=i.get("type");if(h&&h!=="none"){var f=Bv(i),p=c_[h](s,l,c,v);p.style=f,t.graphicKey=p.type,t.pointer=p}var d=i.get(["label","margin"]),g=v_(r,n,i,l,d);op(t,n,i,o,g)},e}(Fv);function v_(a,e,t,r,n){var i=e.axis,o=i.dataToCoord(a),s=r.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l=r.getRadiusAxis().getExtent(),u,v,c;if(i.dim==="radius"){var h=yr();tn(h,h,s),Ze(h,h,[r.cx,r.cy]),u=ur([o,-n],h);var f=e.getModel("axisLabel").get("rotate")||0,p=Ye.innerTextLayout(s,f*Math.PI/180,-1);v=p.textAlign,c=p.textVerticalAlign}else{var d=l[1];u=r.coordToPoint([d+n,o]);var g=r.cx,y=r.cy;v=Math.abs(u[0]-g)/d<.3?"center":u[0]>g?"left":"right",c=Math.abs(u[1]-y)/d<.3?"middle":u[1]>y?"top":"bottom"}return{position:u,align:v,verticalAlign:c}}var c_={line:function(a,e,t,r){return a.dim==="angle"?{type:"Line",shape:Hv(e.coordToPoint([r[0],t]),e.coordToPoint([r[1],t]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r:t}}},shadow:function(a,e,t,r){var n=Math.max(1,a.getBandWidth()),i=Math.PI/180;return a.dim==="angle"?{type:"Sector",shape:us(e.cx,e.cy,r[0],r[1],(-t-n/2)*i,(-t+n/2)*i)}:{type:"Sector",shape:us(e.cx,e.cy,t-n/2,t+n/2,0,Math.PI*2)}}};const h_=u_;var f_=function(a){z(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.findAxisModel=function(t){var r,n=this.ecModel;return n.eachComponent(t,function(i){i.getCoordSysModel()===this&&(r=i)},this),r},e.type="polar",e.dependencies=["radiusAxis","angleAxis"],e.defaultOption={z:0,center:["50%","50%"],radius:"80%"},e}(Nt);const p_=f_;var Go=function(a){z(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",mr).models[0]},e.type="polarAxis",e}(Nt);ae(Go,Ja);var d_=function(a){z(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.type="angleAxis",e}(Go),g_=function(a){z(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.type="radiusAxis",e}(Go),Oo=function(a){z(e,a);function e(t,r){return a.call(this,"radius",t,r)||this}return e.prototype.pointToData=function(t,r){return this.polar.pointToData(t,r)[this.dim==="radius"?0:1]},e}(pe);Oo.prototype.dataToRadius=pe.prototype.dataToCoord;Oo.prototype.radiusToData=pe.prototype.coordToData;const y_=Oo;var m_=Dt(),Bo=function(a){z(e,a);function e(t,r){return a.call(this,"angle",t,r||[0,360])||this}return e.prototype.pointToData=function(t,r){return this.polar.pointToData(t,r)[this.dim==="radius"?0:1]},e.prototype.calculateCategoryInterval=function(){var t=this,r=t.getLabelModel(),n=t.scale,i=n.getExtent(),o=n.count();if(i[1]-i[0]<1)return 0;var s=i[0],l=t.dataToCoord(s+1)-t.dataToCoord(s),u=Math.abs(l),v=sp(s==null?"":s+"",r.getFont(),"center","top"),c=Math.max(v.height,7),h=c/u;isNaN(h)&&(h=1/0);var f=Math.max(0,Math.floor(h)),p=m_(t.model),d=p.lastAutoInterval,g=p.lastTickCount;return d!=null&&g!=null&&Math.abs(d-f)<=1&&Math.abs(g-o)<=1&&d>f?f=d:(p.lastTickCount=o,p.lastAutoInterval=f),f},e}(pe);Bo.prototype.dataToAngle=pe.prototype.dataToCoord;Bo.prototype.angleToData=pe.prototype.coordToData;const S_=Bo;var yh=["radius","angle"],x_=function(){function a(e){this.dimensions=yh,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new y_,this._angleAxis=new S_,this.axisPointerEnabled=!0,this.name=e||"",this._radiusAxis.polar=this._angleAxis.polar=this}return a.prototype.containPoint=function(e){var t=this.pointToCoord(e);return this._radiusAxis.contain(t[0])&&this._angleAxis.contain(t[1])},a.prototype.containData=function(e){return this._radiusAxis.containData(e[0])&&this._angleAxis.containData(e[1])},a.prototype.getAxis=function(e){var t="_"+e+"Axis";return this[t]},a.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},a.prototype.getAxesByScale=function(e){var t=[],r=this._angleAxis,n=this._radiusAxis;return r.scale.type===e&&t.push(r),n.scale.type===e&&t.push(n),t},a.prototype.getAngleAxis=function(){return this._angleAxis},a.prototype.getRadiusAxis=function(){return this._radiusAxis},a.prototype.getOtherAxis=function(e){var t=this._angleAxis;return e===t?this._radiusAxis:t},a.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},a.prototype.getTooltipAxes=function(e){var t=e!=null&&e!=="auto"?this.getAxis(e):this.getBaseAxis();return{baseAxes:[t],otherAxes:[this.getOtherAxis(t)]}},a.prototype.dataToPoint=function(e,t){return this.coordToPoint([this._radiusAxis.dataToRadius(e[0],t),this._angleAxis.dataToAngle(e[1],t)])},a.prototype.pointToData=function(e,t){var r=this.pointToCoord(e);return[this._radiusAxis.radiusToData(r[0],t),this._angleAxis.angleToData(r[1],t)]},a.prototype.pointToCoord=function(e){var t=e[0]-this.cx,r=e[1]-this.cy,n=this.getAngleAxis(),i=n.getExtent(),o=Math.min(i[0],i[1]),s=Math.max(i[0],i[1]);n.inverse?o=s-360:s=o+360;var l=Math.sqrt(t*t+r*r);t/=l,r/=l;for(var u=Math.atan2(-r,t)/Math.PI*180,v=u<o?1:-1;u<o||u>s;)u+=v*360;return[l,u]},a.prototype.coordToPoint=function(e){var t=e[0],r=e[1]/180*Math.PI,n=Math.cos(r)*t+this.cx,i=-Math.sin(r)*t+this.cy;return[n,i]},a.prototype.getArea=function(){var e=this.getAngleAxis(),t=this.getRadiusAxis(),r=t.getExtent().slice();r[0]>r[1]&&r.reverse();var n=e.getExtent(),i=Math.PI/180;return{cx:this.cx,cy:this.cy,r0:r[0],r:r[1],startAngle:-n[0]*i,endAngle:-n[1]*i,clockwise:e.inverse,contain:function(o,s){var l=o-this.cx,u=s-this.cy,v=l*l+u*u-1e-4,c=this.r,h=this.r0;return v<=c*c&&v>=h*h}}},a.prototype.convertToPixel=function(e,t,r){var n=cu(t);return n===this?this.dataToPoint(r):null},a.prototype.convertFromPixel=function(e,t,r){var n=cu(t);return n===this?this.pointToData(r):null},a}();function cu(a){var e=a.seriesModel,t=a.polarModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}const __=x_;function w_(a,e,t){var r=e.get("center"),n=t.getWidth(),i=t.getHeight();a.cx=H(r[0],n),a.cy=H(r[1],i);var o=a.getRadiusAxis(),s=Math.min(n,i)/2,l=e.get("radius");l==null?l=[0,"100%"]:W(l)||(l=[0,l]);var u=[H(l[0],s),H(l[1],s)];o.inverse?o.setExtent(u[1],u[0]):o.setExtent(u[0],u[1])}function b_(a,e){var t=this,r=t.getAngleAxis(),n=t.getRadiusAxis();if(r.scale.setExtent(1/0,-1/0),n.scale.setExtent(1/0,-1/0),a.eachSeries(function(s){if(s.coordinateSystem===t){var l=s.getData();D(vs(l,"radius"),function(u){n.scale.unionExtentFromData(l,u)}),D(vs(l,"angle"),function(u){r.scale.unionExtentFromData(l,u)})}}),Ia(r.scale,r.model),Ia(n.scale,n.model),r.type==="category"&&!r.onBand){var i=r.getExtent(),o=360/r.scale.count();r.inverse?i[1]+=o:i[1]-=o,r.setExtent(i[0],i[1])}}function A_(a){return a.mainType==="angleAxis"}function hu(a,e){if(a.type=e.get("type"),a.scale=so(e),a.onBand=e.get("boundaryGap")&&a.type==="category",a.inverse=e.get("inverse"),A_(e)){a.inverse=a.inverse!==e.get("clockwise");var t=e.get("startAngle");a.setExtent(t,t+(a.inverse?-360:360))}e.axis=a,a.model=e}var T_={dimensions:yh,create:function(a,e){var t=[];return a.eachComponent("polar",function(r,n){var i=new __(n+"");i.update=b_;var o=i.getRadiusAxis(),s=i.getAngleAxis(),l=r.findAxisModel("radiusAxis"),u=r.findAxisModel("angleAxis");hu(o,l),hu(s,u),w_(i,r,e),t.push(i),r.coordinateSystem=i,i.model=r}),a.eachSeries(function(r){if(r.get("coordinateSystem")==="polar"){var n=r.getReferringComponents("polar",mr).models[0];r.coordinateSystem=n.coordinateSystem}}),t}};const I_=T_;var D_=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function fa(a,e,t){e[1]>e[0]&&(e=e.slice().reverse());var r=a.coordToPoint([e[0],t]),n=a.coordToPoint([e[1],t]);return{x1:r[0],y1:r[1],x2:n[0],y2:n[1]}}function pa(a){var e=a.getRadiusAxis();return e.inverse?0:1}function fu(a){var e=a[0],t=a[a.length-1];e&&t&&Math.abs(Math.abs(e.coord-t.coord)-360)<1e-4&&a.pop()}var C_=function(a){z(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.axisPointerClass="PolarAxisPointer",t}return e.prototype.render=function(t,r){if(this.group.removeAll(),!!t.get("show")){var n=t.axis,i=n.polar,o=i.getRadiusAxis().getExtent(),s=n.getTicksCoords(),l=n.getMinorTicksCoords(),u=F(n.getViewLabels(),function(v){v=lt(v);var c=n.scale,h=c.type==="ordinal"?c.getRawOrdinalNumber(v.tickValue):v.tickValue;return v.coord=n.dataToCoord(h),v});fu(u),fu(s),D(D_,function(v){t.get([v,"show"])&&(!n.scale.isBlank()||v==="axisLine")&&M_[v](this.group,t,i,s,l,o,u)},this)}},e.type="angleAxis",e}(Qr),M_={axisLine:function(a,e,t,r,n,i){var o=e.getModel(["axisLine","lineStyle"]),s=pa(t),l=s?0:1,u;i[l]===0?u=new Xe({shape:{cx:t.cx,cy:t.cy,r:i[s]},style:o.getLineStyle(),z2:1,silent:!0}):u=new _v({shape:{cx:t.cx,cy:t.cy,r:i[s],r0:i[l]},style:o.getLineStyle(),z2:1,silent:!0}),u.style.fill=null,a.add(u)},axisTick:function(a,e,t,r,n,i){var o=e.getModel("axisTick"),s=(o.get("inside")?-1:1)*o.get("length"),l=i[pa(t)],u=F(r,function(v){return new te({shape:fa(t,[l,l+s],v.coord)})});a.add(Qt(u,{style:Q(o.getModel("lineStyle").getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])})}))},minorTick:function(a,e,t,r,n,i){if(!!n.length){for(var o=e.getModel("axisTick"),s=e.getModel("minorTick"),l=(o.get("inside")?-1:1)*s.get("length"),u=i[pa(t)],v=[],c=0;c<n.length;c++)for(var h=0;h<n[c].length;h++)v.push(new te({shape:fa(t,[u,u+l],n[c][h].coord)}));a.add(Qt(v,{style:Q(s.getModel("lineStyle").getLineStyle(),Q(o.getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])}))}))}},axisLabel:function(a,e,t,r,n,i,o){var s=e.getCategories(!0),l=e.getModel("axisLabel"),u=l.get("margin"),v=e.get("triggerEvent");D(o,function(c,h){var f=l,p=c.tickValue,d=i[pa(t)],g=t.coordToPoint([d+u,c.coord]),y=t.cx,m=t.cy,S=Math.abs(g[0]-y)/d<.3?"center":g[0]>y?"left":"right",x=Math.abs(g[1]-m)/d<.3?"middle":g[1]>m?"top":"bottom";if(s&&s[p]){var w=s[p];Rt(w)&&w.textStyle&&(f=new Jt(w.textStyle,l,l.ecModel))}var _=new pt({silent:Ye.isLabelSilent(e),style:Ft(f,{x:g[0],y:g[1],fill:f.getTextColor()||e.get(["axisLine","lineStyle","color"]),text:c.formattedLabel,align:S,verticalAlign:x})});if(a.add(_),v){var b=Ye.makeAxisEventDataBase(e);b.targetType="axisLabel",b.value=c.rawLabel,it(_).eventData=b}},this)},splitLine:function(a,e,t,r,n,i){var o=e.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var v=[],c=0;c<r.length;c++){var h=u++%l.length;v[h]=v[h]||[],v[h].push(new te({shape:fa(t,i,r[c].coord)}))}for(var c=0;c<v.length;c++)a.add(Qt(v[c],{style:Q({stroke:l[c%l.length]},s.getLineStyle()),silent:!0,z:e.get("z")}))},minorSplitLine:function(a,e,t,r,n,i){if(!!n.length){for(var o=e.getModel("minorSplitLine"),s=o.getModel("lineStyle"),l=[],u=0;u<n.length;u++)for(var v=0;v<n[u].length;v++)l.push(new te({shape:fa(t,i,n[u][v].coord)}));a.add(Qt(l,{style:s.getLineStyle(),silent:!0,z:e.get("z")}))}},splitArea:function(a,e,t,r,n,i){if(!!r.length){var o=e.getModel("splitArea"),s=o.getModel("areaStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var v=[],c=Math.PI/180,h=-r[0].coord*c,f=Math.min(i[0],i[1]),p=Math.max(i[0],i[1]),d=e.get("clockwise"),g=1,y=r.length;g<=y;g++){var m=g===y?r[0].coord:r[g].coord,S=u++%l.length;v[S]=v[S]||[],v[S].push(new Ke({shape:{cx:t.cx,cy:t.cy,r0:f,r:p,startAngle:h,endAngle:-m*c,clockwise:d},silent:!0})),h=-m*c}for(var g=0;g<v.length;g++)a.add(Qt(v[g],{style:Q({fill:l[g%l.length]},s.getAreaStyle()),silent:!0}))}}};const L_=C_;var P_=["axisLine","axisTickLabel","axisName"],V_=["splitLine","splitArea","minorSplitLine"],E_=function(a){z(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.axisPointerClass="PolarAxisPointer",t}return e.prototype.render=function(t,r){if(this.group.removeAll(),!!t.get("show")){var n=this._axisGroup,i=this._axisGroup=new Z;this.group.add(i);var o=t.axis,s=o.polar,l=s.getAngleAxis(),u=o.getTicksCoords(),v=o.getMinorTicksCoords(),c=l.getExtent()[0],h=o.getExtent(),f=k_(s,t,c),p=new Ye(t,f);D(P_,p.add,p),i.add(p.getGroup()),lo(n,i,t),D(V_,function(d){t.get([d,"show"])&&!o.scale.isBlank()&&R_[d](this.group,t,s,c,h,u,v)},this)}},e.type="radiusAxis",e}(Qr),R_={splitLine:function(a,e,t,r,n,i){var o=e.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var v=[],c=0;c<i.length;c++){var h=u++%l.length;v[h]=v[h]||[],v[h].push(new Xe({shape:{cx:t.cx,cy:t.cy,r:i[c].coord}}))}for(var c=0;c<v.length;c++)a.add(Qt(v[c],{style:Q({stroke:l[c%l.length],fill:null},s.getLineStyle()),silent:!0}))},minorSplitLine:function(a,e,t,r,n,i,o){if(!!o.length){for(var s=e.getModel("minorSplitLine"),l=s.getModel("lineStyle"),u=[],v=0;v<o.length;v++)for(var c=0;c<o[v].length;c++)u.push(new Xe({shape:{cx:t.cx,cy:t.cy,r:o[v][c].coord}}));a.add(Qt(u,{style:Q({fill:null},l.getLineStyle()),silent:!0}))}},splitArea:function(a,e,t,r,n,i){if(!!i.length){var o=e.getModel("splitArea"),s=o.getModel("areaStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var v=[],c=i[0].coord,h=1;h<i.length;h++){var f=u++%l.length;v[f]=v[f]||[],v[f].push(new Ke({shape:{cx:t.cx,cy:t.cy,r0:c,r:i[h].coord,startAngle:0,endAngle:Math.PI*2},silent:!0})),c=i[h].coord}for(var h=0;h<v.length;h++)a.add(Qt(v[h],{style:Q({fill:l[h%l.length]},s.getAreaStyle()),silent:!0}))}}};function k_(a,e,t){return{position:[a.cx,a.cy],rotation:t/180*Math.PI,labelDirection:-1,tickDirection:-1,nameDirection:1,labelRotate:e.getModel("axisLabel").get("rotate"),z2:1}}const N_=E_;function mh(a){return a.get("stack")||"__ec_stack_"+a.seriesIndex}function Sh(a,e){return e.dim+a.model.componentIndex}function z_(a,e,t){var r={},n=G_(Et(e.getSeriesByType(a),function(i){return!e.isSeriesFiltered(i)&&i.coordinateSystem&&i.coordinateSystem.type==="polar"}));e.eachSeriesByType(a,function(i){if(i.coordinateSystem.type==="polar"){var o=i.getData(),s=i.coordinateSystem,l=s.getBaseAxis(),u=Sh(s,l),v=mh(i),c=n[u][v],h=c.offset,f=c.width,p=s.getOtherAxis(l),d=i.coordinateSystem.cx,g=i.coordinateSystem.cy,y=i.get("barMinHeight")||0,m=i.get("barMinAngle")||0;r[v]=r[v]||[];for(var S=o.mapDimension(p.dim),x=o.mapDimension(l.dim),w=Wv(o,S),_=l.dim!=="radius"||!i.get("roundCap",!0),b=p.dataToCoord(0),A=0,T=o.count();A<T;A++){var I=o.get(S,A),C=o.get(x,A),E=I>=0?"p":"n",V=b;w&&(r[v][C]||(r[v][C]={p:b,n:b}),V=r[v][C][E]);var M=void 0,P=void 0,R=void 0,G=void 0;if(p.dim==="radius"){var L=p.dataToCoord(I)-b,k=l.dataToCoord(C);Math.abs(L)<y&&(L=(L<0?-1:1)*y),M=V,P=V+L,R=k-h,G=R-f,w&&(r[v][C][E]=P)}else{var N=p.dataToCoord(I,_)-b,O=l.dataToCoord(C);Math.abs(N)<m&&(N=(N<0?-1:1)*m),M=O+h,P=M+f,R=V,G=V+N,w&&(r[v][C][E]=G)}o.setItemLayout(A,{cx:d,cy:g,r0:M,r:P,startAngle:-R*Math.PI/180,endAngle:-G*Math.PI/180,clockwise:R>=G})}}})}function G_(a){var e={};D(a,function(r,n){var i=r.getData(),o=r.coordinateSystem,s=o.getBaseAxis(),l=Sh(o,s),u=s.getExtent(),v=s.type==="category"?s.getBandWidth():Math.abs(u[1]-u[0])/i.count(),c=e[l]||{bandWidth:v,remainedWidth:v,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},h=c.stacks;e[l]=c;var f=mh(r);h[f]||c.autoWidthCount++,h[f]=h[f]||{width:0,maxWidth:0};var p=H(r.get("barWidth"),v),d=H(r.get("barMaxWidth"),v),g=r.get("barGap"),y=r.get("barCategoryGap");p&&!h[f].width&&(p=Math.min(c.remainedWidth,p),h[f].width=p,c.remainedWidth-=p),d&&(h[f].maxWidth=d),g!=null&&(c.gap=g),y!=null&&(c.categoryGap=y)});var t={};return D(e,function(r,n){t[n]={};var i=r.stacks,o=r.bandWidth,s=H(r.categoryGap,o),l=H(r.gap,1),u=r.remainedWidth,v=r.autoWidthCount,c=(u-s)/(v+(v-1)*l);c=Math.max(c,0),D(i,function(d,g){var y=d.maxWidth;y&&y<c&&(y=Math.min(y,u),d.width&&(y=Math.min(y,d.width)),u-=y,d.width=y,v--)}),c=(u-s)/(v+(v-1)*l),c=Math.max(c,0);var h=0,f;D(i,function(d,g){d.width||(d.width=c),f=d,h+=d.width*(1+l)}),f&&(h-=f.width*l);var p=-h/2;D(i,function(d,g){t[n][g]=t[n][g]||{offset:p,width:d.width},p+=d.width*(1+l)})}),t}var O_={startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:0}},B_={splitNumber:5},F_=function(a){z(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.type="polar",e}(Yt);function H_(a){K(co),Qr.registerAxisPointerClass("PolarAxisPointer",h_),a.registerCoordinateSystem("polar",I_),a.registerComponentModel(p_),a.registerComponentView(F_),Da(a,"angle",d_,O_),Da(a,"radius",g_,B_),a.registerComponentView(L_),a.registerComponentView(N_),a.registerLayout(st(z_,"bar"))}function $i(a,e){e=e||{};var t=a.coordinateSystem,r=a.axis,n={},i=r.position,o=r.orient,s=t.getRect(),l=[s.x,s.x+s.width,s.y,s.y+s.height],u={horizontal:{top:l[2],bottom:l[3]},vertical:{left:l[0],right:l[1]}};n.position=[o==="vertical"?u.vertical[i]:l[0],o==="horizontal"?u.horizontal[i]:l[3]];var v={horizontal:0,vertical:1};n.rotation=Math.PI/2*v[o];var c={top:-1,bottom:1,right:1,left:-1};n.labelDirection=n.tickDirection=n.nameDirection=c[i],a.get(["axisTick","inside"])&&(n.tickDirection=-n.tickDirection),Ot(e.labelInside,a.get(["axisLabel","inside"]))&&(n.labelDirection=-n.labelDirection);var h=e.rotate;return h==null&&(h=a.get(["axisLabel","rotate"])),n.labelRotation=i==="top"?-h:h,n.z2=1,n}var W_=["axisLine","axisTickLabel","axisName"],$_=["splitArea","splitLine"],U_=function(a){z(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.axisPointerClass="SingleAxisPointer",t}return e.prototype.render=function(t,r,n,i){var o=this.group;o.removeAll();var s=this._axisGroup;this._axisGroup=new Z;var l=$i(t),u=new Ye(t,l);D(W_,u.add,u),o.add(this._axisGroup),o.add(u.getGroup()),D($_,function(v){t.get([v,"show"])&&Y_[v](this,this.group,this._axisGroup,t)},this),lo(s,this._axisGroup,t),a.prototype.render.call(this,t,r,n,i)},e.prototype.remove=function(){lp(this)},e.type="singleAxis",e}(Qr),Y_={splitLine:function(a,e,t,r){var n=r.axis;if(!n.scale.isBlank()){var i=r.getModel("splitLine"),o=i.getModel("lineStyle"),s=o.get("color");s=s instanceof Array?s:[s];for(var l=r.coordinateSystem.getRect(),u=n.isHorizontal(),v=[],c=0,h=n.getTicksCoords({tickModel:i}),f=[],p=[],d=0;d<h.length;++d){var g=n.toGlobalCoord(h[d].coord);u?(f[0]=g,f[1]=l.y,p[0]=g,p[1]=l.y+l.height):(f[0]=l.x,f[1]=g,p[0]=l.x+l.width,p[1]=g);var y=c++%s.length;v[y]=v[y]||[],v[y].push(new te({subPixelOptimize:!0,shape:{x1:f[0],y1:f[1],x2:p[0],y2:p[1]},silent:!0}))}for(var m=o.getLineStyle(["color"]),d=0;d<v.length;++d)e.add(Qt(v[d],{style:Q({stroke:s[d%s.length]},m),silent:!0}))}},splitArea:function(a,e,t,r){up(a,t,r,r)}};const X_=U_;var xh=function(a){z(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getCoordSysModel=function(){return this},e.type="singleAxis",e.layoutMode="box",e.defaultOption={left:"5%",top:"5%",right:"5%",bottom:"5%",type:"value",position:"bottom",orient:"horizontal",axisLine:{show:!0,lineStyle:{width:1,type:"solid"}},tooltip:{show:!0},axisTick:{show:!0,length:6,lineStyle:{width:1}},axisLabel:{show:!0,interval:"auto"},splitLine:{show:!0,lineStyle:{type:"dashed",opacity:.2}}},e}(Nt);ae(xh,Ja.prototype);const li=xh;var Z_=function(a){z(e,a);function e(t,r,n,i,o){var s=a.call(this,t,r,n)||this;return s.type=i||"value",s.position=o||"bottom",s}return e.prototype.isHorizontal=function(){var t=this.position;return t==="top"||t==="bottom"},e.prototype.pointToData=function(t,r){return this.coordinateSystem.pointToData(t)[0]},e}(pe);const q_=Z_;var _h=["single"],K_=function(){function a(e,t,r){this.type="single",this.dimension="single",this.dimensions=_h,this.axisPointerEnabled=!0,this.model=e,this._init(e,t,r)}return a.prototype._init=function(e,t,r){var n=this.dimension,i=new q_(n,so(e),[0,0],e.get("type"),e.get("position")),o=i.type==="category";i.onBand=o&&e.get("boundaryGap"),i.inverse=e.get("inverse"),i.orient=e.get("orient"),e.axis=i,i.model=e,i.coordinateSystem=this,this._axis=i},a.prototype.update=function(e,t){e.eachSeries(function(r){if(r.coordinateSystem===this){var n=r.getData();D(n.mapDimensionsAll(this.dimension),function(i){this._axis.scale.unionExtentFromData(n,i)},this),Ia(this._axis.scale,this._axis.model)}},this)},a.prototype.resize=function(e,t){this._rect=ne({left:e.get("left"),top:e.get("top"),right:e.get("right"),bottom:e.get("bottom"),width:e.get("width"),height:e.get("height")},{width:t.getWidth(),height:t.getHeight()}),this._adjustAxis()},a.prototype.getRect=function(){return this._rect},a.prototype._adjustAxis=function(){var e=this._rect,t=this._axis,r=t.isHorizontal(),n=r?[0,e.width]:[0,e.height],i=t.reverse?1:0;t.setExtent(n[i],n[1-i]),this._updateAxisTransform(t,r?e.x:e.y)},a.prototype._updateAxisTransform=function(e,t){var r=e.getExtent(),n=r[0]+r[1],i=e.isHorizontal();e.toGlobalCoord=i?function(o){return o+t}:function(o){return n-o+t},e.toLocalCoord=i?function(o){return o-t}:function(o){return n-o+t}},a.prototype.getAxis=function(){return this._axis},a.prototype.getBaseAxis=function(){return this._axis},a.prototype.getAxes=function(){return[this._axis]},a.prototype.getTooltipAxes=function(){return{baseAxes:[this.getAxis()],otherAxes:[]}},a.prototype.containPoint=function(e){var t=this.getRect(),r=this.getAxis(),n=r.orient;return n==="horizontal"?r.contain(r.toLocalCoord(e[0]))&&e[1]>=t.y&&e[1]<=t.y+t.height:r.contain(r.toLocalCoord(e[1]))&&e[0]>=t.y&&e[0]<=t.y+t.height},a.prototype.pointToData=function(e){var t=this.getAxis();return[t.coordToData(t.toLocalCoord(e[t.orient==="horizontal"?0:1]))]},a.prototype.dataToPoint=function(e){var t=this.getAxis(),r=this.getRect(),n=[],i=t.orient==="horizontal"?0:1;return e instanceof Array&&(e=e[0]),n[i]=t.toGlobalCoord(t.dataToCoord(+e)),n[1-i]=i===0?r.y+r.height/2:r.x+r.width/2,n},a.prototype.convertToPixel=function(e,t,r){var n=pu(t);return n===this?this.dataToPoint(r):null},a.prototype.convertFromPixel=function(e,t,r){var n=pu(t);return n===this?this.pointToData(r):null},a}();function pu(a){var e=a.seriesModel,t=a.singleAxisModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}function j_(a,e){var t=[];return a.eachComponent("singleAxis",function(r,n){var i=new K_(r,a,e);i.name="single_"+n,i.resize(r,e),r.coordinateSystem=i,t.push(i)}),a.eachSeries(function(r){if(r.get("coordinateSystem")==="singleAxis"){var n=r.getReferringComponents("singleAxis",mr).models[0];r.coordinateSystem=n&&n.coordinateSystem}}),t}var J_={create:j_,dimensions:_h};const Q_=J_;var du=["x","y"],tw=["width","height"],ew=function(a){z(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,r,n,i,o){var s=n.axis,l=s.coordinateSystem,u=ui(l,1-Ba(s)),v=l.dataToPoint(r)[0],c=i.get("type");if(c&&c!=="none"){var h=Bv(i),f=rw[c](s,v,u);f.style=h,t.graphicKey=f.type,t.pointer=f}var p=$i(n);vp(r,t,p,n,i,o)},e.prototype.getHandleTransform=function(t,r,n){var i=$i(r,{labelInside:!1});i.labelMargin=n.get(["handle","margin"]);var o=cp(r.axis,t,i);return{x:o[0],y:o[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,r,n,i){var o=n.axis,s=o.coordinateSystem,l=Ba(o),u=ui(s,l),v=[t.x,t.y];v[l]+=r[l],v[l]=Math.min(u[1],v[l]),v[l]=Math.max(u[0],v[l]);var c=ui(s,1-l),h=(c[1]+c[0])/2,f=[h,h];return f[l]=v[l],{x:v[0],y:v[1],rotation:t.rotation,cursorPoint:f,tooltipOption:{verticalAlign:"middle"}}},e}(Fv),rw={line:function(a,e,t){var r=Hv([e,t[0]],[e,t[1]],Ba(a));return{type:"Line",subPixelOptimize:!0,shape:r}},shadow:function(a,e,t){var r=a.getBandWidth(),n=t[1]-t[0];return{type:"Rect",shape:hp([e-r/2,t[0]],[r,n],Ba(a))}}};function Ba(a){return a.isHorizontal()?0:1}function ui(a,e){var t=a.getRect();return[t[du[e]],t[du[e]]+t[tw[e]]]}const aw=ew;var nw=function(a){z(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.type="single",e}(Yt);function iw(a){K(co),Qr.registerAxisPointerClass("SingleAxisPointer",aw),a.registerComponentView(nw),a.registerComponentView(X_),a.registerComponentModel(li),Da(a,"single",li,li.defaultOption),a.registerCoordinateSystem("single",Q_)}var ow=function(a){z(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,r,n){var i=fp(t);a.prototype.init.apply(this,arguments),gu(t,i)},e.prototype.mergeOption=function(t){a.prototype.mergeOption.apply(this,arguments),gu(this.option,t)},e.prototype.getCellSize=function(){return this.option.cellSize},e.type="calendar",e.defaultOption={z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{color:"#fff",borderWidth:1,borderColor:"#ccc"},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},e}(Nt);function gu(a,e){var t=a.cellSize,r;W(t)?r=t:r=a.cellSize=[t,t],r.length===1&&(r[1]=r[0]);var n=F([0,1],function(i){return pp(e,i)&&(r[i]="auto"),r[i]!=null&&r[i]!=="auto"});$v(a,e,{type:"box",ignoreSize:n})}const sw=ow;var lw=function(a){z(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,r,n){var i=this.group;i.removeAll();var o=t.coordinateSystem,s=o.getRangeInfo(),l=o.getOrient(),u=r.getLocaleModel();this._renderDayRect(t,s,i),this._renderLines(t,s,l,i),this._renderYearText(t,s,l,i),this._renderMonthText(t,u,l,i),this._renderWeekText(t,u,s,l,i)},e.prototype._renderDayRect=function(t,r,n){for(var i=t.coordinateSystem,o=t.getModel("itemStyle").getItemStyle(),s=i.getCellWidth(),l=i.getCellHeight(),u=r.start.time;u<=r.end.time;u=i.getNextNDay(u,1).time){var v=i.dataToRect([u],!1).tl,c=new Tt({shape:{x:v[0],y:v[1],width:s,height:l},cursor:"default",style:o});n.add(c)}},e.prototype._renderLines=function(t,r,n,i){var o=this,s=t.coordinateSystem,l=t.getModel(["splitLine","lineStyle"]).getLineStyle(),u=t.get(["splitLine","show"]),v=l.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var c=r.start,h=0;c.time<=r.end.time;h++){p(c.formatedDate),h===0&&(c=s.getDateInfo(r.start.y+"-"+r.start.m));var f=c.date;f.setMonth(f.getMonth()+1),c=s.getDateInfo(f)}p(s.getNextNDay(r.end.time,1).formatedDate);function p(d){o._firstDayOfMonth.push(s.getDateInfo(d)),o._firstDayPoints.push(s.dataToRect([d],!1).tl);var g=o._getLinePointsOfOneWeek(t,d,n);o._tlpoints.push(g[0]),o._blpoints.push(g[g.length-1]),u&&o._drawSplitline(g,l,i)}u&&this._drawSplitline(o._getEdgesPoints(o._tlpoints,v,n),l,i),u&&this._drawSplitline(o._getEdgesPoints(o._blpoints,v,n),l,i)},e.prototype._getEdgesPoints=function(t,r,n){var i=[t[0].slice(),t[t.length-1].slice()],o=n==="horizontal"?0:1;return i[0][o]=i[0][o]-r/2,i[1][o]=i[1][o]+r/2,i},e.prototype._drawSplitline=function(t,r,n){var i=new Pe({z2:20,shape:{points:t},style:r});n.add(i)},e.prototype._getLinePointsOfOneWeek=function(t,r,n){for(var i=t.coordinateSystem,o=i.getDateInfo(r),s=[],l=0;l<7;l++){var u=i.getNextNDay(o.time,l),v=i.dataToRect([u.time],!1);s[2*u.day]=v.tl,s[2*u.day+1]=v[n==="horizontal"?"bl":"tr"]}return s},e.prototype._formatterLabel=function(t,r){return tt(t)&&t?dp(t,r):ot(t)?t(r):r.nameMap},e.prototype._yearTextPositionControl=function(t,r,n,i,o){var s=r[0],l=r[1],u=["center","bottom"];i==="bottom"?(l+=o,u=["center","top"]):i==="left"?s-=o:i==="right"?(s+=o,u=["center","top"]):l-=o;var v=0;return(i==="left"||i==="right")&&(v=Math.PI/2),{rotation:v,x:s,y:l,style:{align:u[0],verticalAlign:u[1]}}},e.prototype._renderYearText=function(t,r,n,i){var o=t.getModel("yearLabel");if(!!o.get("show")){var s=o.get("margin"),l=o.get("position");l||(l=n!=="horizontal"?"top":"left");var u=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],v=(u[0][0]+u[1][0])/2,c=(u[0][1]+u[1][1])/2,h=n==="horizontal"?0:1,f={top:[v,u[h][1]],bottom:[v,u[1-h][1]],left:[u[1-h][0],c],right:[u[h][0],c]},p=r.start.y;+r.end.y>+r.start.y&&(p=p+"-"+r.end.y);var d=o.get("formatter"),g={start:r.start.y,end:r.end.y,nameMap:p},y=this._formatterLabel(d,g),m=new pt({z2:30,style:Ft(o,{text:y})});m.attr(this._yearTextPositionControl(m,f[l],n,l,s)),i.add(m)}},e.prototype._monthTextPositionControl=function(t,r,n,i,o){var s="left",l="top",u=t[0],v=t[1];return n==="horizontal"?(v=v+o,r&&(s="center"),i==="start"&&(l="bottom")):(u=u+o,r&&(l="middle"),i==="start"&&(s="right")),{x:u,y:v,align:s,verticalAlign:l}},e.prototype._renderMonthText=function(t,r,n,i){var o=t.getModel("monthLabel");if(!!o.get("show")){var s=o.get("nameMap"),l=o.get("margin"),u=o.get("position"),v=o.get("align"),c=[this._tlpoints,this._blpoints];(!s||tt(s))&&(s&&(r=cs(s)||r),s=r.get(["time","monthAbbr"])||[]);var h=u==="start"?0:1,f=n==="horizontal"?0:1;l=u==="start"?-l:l;for(var p=v==="center",d=0;d<c[h].length-1;d++){var g=c[h][d].slice(),y=this._firstDayOfMonth[d];if(p){var m=this._firstDayPoints[d];g[f]=(m[f]+c[0][d+1][f])/2}var S=o.get("formatter"),x=s[+y.m-1],w={yyyy:y.y,yy:(y.y+"").slice(2),MM:y.m,M:+y.m,nameMap:x},_=this._formatterLabel(S,w),b=new pt({z2:30,style:$(Ft(o,{text:_}),this._monthTextPositionControl(g,p,n,u,l))});i.add(b)}}},e.prototype._weekTextPositionControl=function(t,r,n,i,o){var s="center",l="middle",u=t[0],v=t[1],c=n==="start";return r==="horizontal"?(u=u+i+(c?1:-1)*o[0]/2,s=c?"right":"left"):(v=v+i+(c?1:-1)*o[1]/2,l=c?"bottom":"top"),{x:u,y:v,align:s,verticalAlign:l}},e.prototype._renderWeekText=function(t,r,n,i,o){var s=t.getModel("dayLabel");if(!!s.get("show")){var l=t.coordinateSystem,u=s.get("position"),v=s.get("nameMap"),c=s.get("margin"),h=l.getFirstDayOfWeek();if(!v||tt(v)){v&&(r=cs(v)||r);var f=r.get(["time","dayOfWeekShort"]);v=f||F(r.get(["time","dayOfWeekAbbr"]),function(w){return w[0]})}var p=l.getNextNDay(n.end.time,7-n.lweek).time,d=[l.getCellWidth(),l.getCellHeight()];c=H(c,Math.min(d[1],d[0])),u==="start"&&(p=l.getNextNDay(n.start.time,-(7+n.fweek)).time,c=-c);for(var g=0;g<7;g++){var y=l.getNextNDay(p,g),m=l.dataToRect([y.time],!1).center,S=g;S=Math.abs((g+h)%7);var x=new pt({z2:30,style:$(Ft(s,{text:v[S]}),this._weekTextPositionControl(m,i,u,c,d))});o.add(x)}}},e.type="calendar",e}(Yt);const uw=lw;var vi=864e5,vw=function(){function a(e,t,r){this.type="calendar",this.dimensions=a.dimensions,this.getDimensionsInfo=a.getDimensionsInfo,this._model=e}return a.getDimensionsInfo=function(){return[{name:"time",type:"time"},"value"]},a.prototype.getRangeInfo=function(){return this._rangeInfo},a.prototype.getModel=function(){return this._model},a.prototype.getRect=function(){return this._rect},a.prototype.getCellWidth=function(){return this._sw},a.prototype.getCellHeight=function(){return this._sh},a.prototype.getOrient=function(){return this._orient},a.prototype.getFirstDayOfWeek=function(){return this._firstDayOfWeek},a.prototype.getDateInfo=function(e){e=gp(e);var t=e.getFullYear(),r=e.getMonth()+1,n=r<10?"0"+r:""+r,i=e.getDate(),o=i<10?"0"+i:""+i,s=e.getDay();return s=Math.abs((s+7-this.getFirstDayOfWeek())%7),{y:t+"",m:n,d:o,day:s,time:e.getTime(),formatedDate:t+"-"+n+"-"+o,date:e}},a.prototype.getNextNDay=function(e,t){return t=t||0,t===0?this.getDateInfo(e):(e=new Date(this.getDateInfo(e).time),e.setDate(e.getDate()+t),this.getDateInfo(e))},a.prototype.update=function(e,t){this._firstDayOfWeek=+this._model.getModel("dayLabel").get("firstDay"),this._orient=this._model.get("orient"),this._lineWidth=this._model.getModel("itemStyle").getItemStyle().lineWidth||0,this._rangeInfo=this._getRangeInfo(this._initRangeOption());var r=this._rangeInfo.weeks||1,n=["width","height"],i=this._model.getCellSize().slice(),o=this._model.getBoxLayoutParams(),s=this._orient==="horizontal"?[r,7]:[7,r];D([0,1],function(c){v(i,c)&&(o[n[c]]=i[c]*s[c])});var l={width:t.getWidth(),height:t.getHeight()},u=this._rect=ne(o,l);D([0,1],function(c){v(i,c)||(i[c]=u[n[c]]/s[c])});function v(c,h){return c[h]!=null&&c[h]!=="auto"}this._sw=i[0],this._sh=i[1]},a.prototype.dataToPoint=function(e,t){W(e)&&(e=e[0]),t==null&&(t=!0);var r=this.getDateInfo(e),n=this._rangeInfo,i=r.formatedDate;if(t&&!(r.time>=n.start.time&&r.time<n.end.time+vi))return[NaN,NaN];var o=r.day,s=this._getRangeInfo([n.start.time,i]).nthWeek;return this._orient==="vertical"?[this._rect.x+o*this._sw+this._sw/2,this._rect.y+s*this._sh+this._sh/2]:[this._rect.x+s*this._sw+this._sw/2,this._rect.y+o*this._sh+this._sh/2]},a.prototype.pointToData=function(e){var t=this.pointToDate(e);return t&&t.time},a.prototype.dataToRect=function(e,t){var r=this.dataToPoint(e,t);return{contentShape:{x:r[0]-(this._sw-this._lineWidth)/2,y:r[1]-(this._sh-this._lineWidth)/2,width:this._sw-this._lineWidth,height:this._sh-this._lineWidth},center:r,tl:[r[0]-this._sw/2,r[1]-this._sh/2],tr:[r[0]+this._sw/2,r[1]-this._sh/2],br:[r[0]+this._sw/2,r[1]+this._sh/2],bl:[r[0]-this._sw/2,r[1]+this._sh/2]}},a.prototype.pointToDate=function(e){var t=Math.floor((e[0]-this._rect.x)/this._sw)+1,r=Math.floor((e[1]-this._rect.y)/this._sh)+1,n=this._rangeInfo.range;return this._orient==="vertical"?this._getDateByWeeksAndDay(r,t-1,n):this._getDateByWeeksAndDay(t,r-1,n)},a.prototype.convertToPixel=function(e,t,r){var n=yu(t);return n===this?n.dataToPoint(r):null},a.prototype.convertFromPixel=function(e,t,r){var n=yu(t);return n===this?n.pointToData(r):null},a.prototype.containPoint=function(e){return console.warn("Not implemented."),!1},a.prototype._initRangeOption=function(){var e=this._model.get("range"),t;if(W(e)&&e.length===1&&(e=e[0]),W(e))t=e;else{var r=e.toString();if(/^\d{4}$/.test(r)&&(t=[r+"-01-01",r+"-12-31"]),/^\d{4}[\/|-]\d{1,2}$/.test(r)){var n=this.getDateInfo(r),i=n.date;i.setMonth(i.getMonth()+1);var o=this.getNextNDay(i,-1);t=[n.formatedDate,o.formatedDate]}/^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(r)&&(t=[r,r])}if(!t)return e;var s=this._getRangeInfo(t);return s.start.time>s.end.time&&t.reverse(),t},a.prototype._getRangeInfo=function(e){var t=[this.getDateInfo(e[0]),this.getDateInfo(e[1])],r;t[0].time>t[1].time&&(r=!0,t.reverse());var n=Math.floor(t[1].time/vi)-Math.floor(t[0].time/vi)+1,i=new Date(t[0].time),o=i.getDate(),s=t[1].date.getDate();i.setDate(o+n-1);var l=i.getDate();if(l!==s)for(var u=i.getTime()-t[1].time>0?1:-1;(l=i.getDate())!==s&&(i.getTime()-t[1].time)*u>0;)n-=u,i.setDate(l-u);var v=Math.floor((n+t[0].day+6)/7),c=r?-v+1:v-1;return r&&t.reverse(),{range:[t[0].formatedDate,t[1].formatedDate],start:t[0],end:t[1],allDay:n,weeks:v,nthWeek:c,fweek:t[0].day,lweek:t[1].day}},a.prototype._getDateByWeeksAndDay=function(e,t,r){var n=this._getRangeInfo(r);if(e>n.weeks||e===0&&t<n.fweek||e===n.weeks&&t>n.lweek)return null;var i=(e-1)*7-n.fweek+t,o=new Date(n.start.time);return o.setDate(+n.start.d+i),this.getDateInfo(o)},a.create=function(e,t){var r=[];return e.eachComponent("calendar",function(n){var i=new a(n);r.push(i),n.coordinateSystem=i}),e.eachSeries(function(n){n.get("coordinateSystem")==="calendar"&&(n.coordinateSystem=r[n.get("calendarIndex")||0])}),r},a.dimensions=["time","value"],a}();function yu(a){var e=a.calendarModel,t=a.seriesModel,r=e?e.coordinateSystem:t?t.coordinateSystem:null;return r}const cw=vw;function hw(a){a.registerComponentModel(sw),a.registerComponentView(uw),a.registerCoordinateSystem("calendar",cw)}function fw(a,e){var t=a.existing;if(e.id=a.keyInfo.id,!e.type&&t&&(e.type=t.type),e.parentId==null){var r=e.parentOption;r?e.parentId=r.id:t&&(e.parentId=t.parentId)}e.parentOption=null}function mu(a,e){var t;return D(e,function(r){a[r]!=null&&a[r]!=="auto"&&(t=!0)}),t}function pw(a,e,t){var r=$({},t),n=a[e],i=t.$action||"merge";i==="merge"?n?($t(n,r,!0),$v(n,r,{ignoreSize:!0}),mp(t,n),da(t,n),da(t,n,"shape"),da(t,n,"style"),da(t,n,"extra"),t.clipPath=n.clipPath):a[e]=r:i==="replace"?a[e]=r:i==="remove"&&n&&(a[e]=null)}var wh=["transition","enterFrom","leaveTo"],dw=wh.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function da(a,e,t){if(t&&(!a[t]&&e[t]&&(a[t]={}),a=a[t],e=e[t]),!(!a||!e))for(var r=t?wh:dw,n=0;n<r.length;n++){var i=r[n];a[i]==null&&e[i]!=null&&(a[i]=e[i])}}function gw(a,e){if(!!a&&(a.hv=e.hv=[mu(e,["left","right"]),mu(e,["top","bottom"])],a.type==="group")){var t=a,r=e;t.width==null&&(t.width=r.width=0),t.height==null&&(t.height=r.height=0)}}var yw=function(a){z(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.preventAutoZ=!0,t}return e.prototype.mergeOption=function(t,r){var n=this.option.elements;this.option.elements=null,a.prototype.mergeOption.call(this,t,r),this.option.elements=n},e.prototype.optionUpdated=function(t,r){var n=this.option,i=(r?n:t).elements,o=n.elements=r?[]:n.elements,s=[];this._flatten(i,s,null);var l=yp(o,s,"normalMerge"),u=this._elOptionsToUpdate=[];D(l,function(v,c){var h=v.newOption;!h||(u.push(h),fw(v,h),pw(o,c,h),gw(o[c],h))},this),n.elements=Et(o,function(v){return v&&delete v.$action,v!=null})},e.prototype._flatten=function(t,r,n){D(t,function(i){if(!!i){n&&(i.parentOption=n),r.push(i);var o=i.children;i.type==="group"&&o&&this._flatten(o,r,i),delete i.children}},this)},e.prototype.useElOptionsToUpdate=function(){var t=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,t},e.type="graphic",e.defaultOption={elements:[]},e}(Nt),Su={path:null,compoundPath:null,group:Z,image:fe,text:pt},qt=Dt(),mw=function(a){z(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){this._elMap=nt()},e.prototype.render=function(t,r,n){t!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=t,this._updateElements(t),this._relocate(t,n)},e.prototype._updateElements=function(t){var r=t.useElOptionsToUpdate();if(!!r){var n=this._elMap,i=this.group,o=t.get("z"),s=t.get("zlevel");D(r,function(l){var u=ge(l.id,null),v=u!=null?n.get(u):null,c=ge(l.parentId,null),h=c!=null?n.get(c):i,f=l.type,p=l.style;f==="text"&&p&&l.hv&&l.hv[1]&&(p.textVerticalAlign=p.textBaseline=p.verticalAlign=p.align=null);var d=l.textContent,g=l.textConfig;if(p&&lh(p,f,!!g,!!d)){var y=uh(p,f,!0);!g&&y.textConfig&&(g=l.textConfig=y.textConfig),!d&&y.textContent&&(d=y.textContent)}var m=Sw(l),S=l.$action||"merge",x=S==="merge",w=S==="replace";if(x){var _=!v,b=v;_?b=xu(u,h,l.type,n):(b&&(qt(b).isNew=!1),fh(b)),b&&(_a(b,m,t,{isInit:_}),_u(b,l,o,s))}else if(w){wa(v,l,n,t);var A=xu(u,h,l.type,n);A&&(_a(A,m,t,{isInit:!0}),_u(A,l,o,s))}else S==="remove"&&(ch(v,l),wa(v,l,n,t));var T=n.get(u);if(T&&d)if(x){var I=T.getTextContent();I?I.attr(d):T.setTextContent(new pt(d))}else w&&T.setTextContent(new pt(d));if(T){var C=l.clipPath;if(C){var E=C.type,V=void 0,_=!1;if(x){var M=T.getClipPath();_=!M||qt(M).type!==E,V=_?Ui(E):M}else w&&(_=!0,V=Ui(E));T.setClipPath(V),_a(V,C,t,{isInit:_}),Ga(V,C.keyframeAnimation,t)}var P=qt(T);T.setTextConfig(g),P.option=l,xw(T,t,l),bv({el:T,componentModel:t,itemName:T.name,itemTooltipOption:l.tooltip}),Ga(T,l.keyframeAnimation,t)}})}},e.prototype._relocate=function(t,r){for(var n=t.option.elements,i=this.group,o=this._elMap,s=r.getWidth(),l=r.getHeight(),u=["x","y"],v=0;v<n.length;v++){var c=n[v],h=ge(c.id,null),f=h!=null?o.get(h):null;if(!(!f||!f.isGroup)){var p=f.parent,d=p===i,g=qt(f),y=qt(p);g.width=H(g.option.width,d?s:y.width)||0,g.height=H(g.option.height,d?l:y.height)||0}}for(var v=n.length-1;v>=0;v--){var c=n[v],h=ge(c.id,null),f=h!=null?o.get(h):null;if(!!f){var p=f.parent,y=qt(p),m=p===i?{width:s,height:l}:{width:y.width,height:y.height},S={},x=ro(f,c,m,null,{hv:c.hv,boundingMode:c.bounding},S);if(!qt(f).isNew&&x){for(var w=c.transition,_={},b=0;b<u.length;b++){var A=u[b],T=S[A];w&&(Ue(w)||Ut(w,A)>=0)?_[A]=T:f[A]=T}vt(f,_,t,0)}else f.attr(S)}}},e.prototype._clear=function(){var t=this,r=this._elMap;r.each(function(n){wa(n,qt(n).option,r,t._lastGraphicModel)}),this._elMap=nt()},e.prototype.dispose=function(){this._clear()},e.type="graphic",e}(Yt);function Ui(a){var e=B(Su,a)?Su[a]:Ov(a),t=new e({});return qt(t).type=a,t}function xu(a,e,t,r){var n=Ui(t);return e.add(n),r.set(a,n),qt(n).id=a,qt(n).isNew=!0,n}function wa(a,e,t,r){var n=a&&a.parent;n&&(a.type==="group"&&a.traverse(function(i){wa(i,e,t,r)}),gn(a,e,r),t.removeKey(qt(a).id))}function _u(a,e,t,r){if(!a.isGroup){var n=a;n.cursor=_t(e.cursor,qe.prototype.cursor),n.z=_t(e.z,t||0),n.zlevel=_t(e.zlevel,r||0);var i=e.z2;i!=null&&(n.z2=i||0)}D(ft(e),function(o){var s=e[o];o.indexOf("on")===0&&ot(s)&&(a[o]=s)}),a.draggable=e.draggable,e.name!=null&&(a.name=e.name),e.id!=null&&(a.id=e.id)}function Sw(a){return a=$({},a),D(["id","parentId","$action","hv","bounding","textContent","clipPath"].concat(Sp),function(e){delete a[e]}),a}function xw(a,e,t){var r=it(a).eventData;!a.silent&&!a.ignore&&!r&&(r=it(a).eventData={componentType:"graphic",componentIndex:e.componentIndex,name:a.name}),r&&(r.info=t.info)}function _w(a){a.registerComponentModel(yw),a.registerComponentView(mw),a.registerPreprocessor(function(e){var t=e.graphic;W(t)?!t[0]||!t[0].elements?e.graphic=[{elements:t}]:e.graphic=[e.graphic[0]]:t&&!t.elements&&(e.graphic=[{elements:[t]}])})}var ww=["rect","polygon","keep","clear"];function bw(a,e){var t=Lt(a?a.brush:[]);if(!!t.length){var r=[];D(t,function(l){var u=l.hasOwnProperty("toolbox")?l.toolbox:[];u instanceof Array&&(r=r.concat(u))});var n=a&&a.toolbox;W(n)&&(n=n[0]),n||(n={feature:{}},a.toolbox=[n]);var i=n.feature||(n.feature={}),o=i.brush||(i.brush={}),s=o.type||(o.type=[]);s.push.apply(s,r),Aw(s),e&&!s.length&&s.push.apply(s,ww)}}function Aw(a){var e={};D(a,function(t){e[t]=1}),a.length=0,D(e,function(t,r){a.push(r)})}var wu=D;function bu(a){if(a){for(var e in a)if(a.hasOwnProperty(e))return!0}}function Yi(a,e,t){var r={};return wu(e,function(i){var o=r[i]=n();wu(a[i],function(s,l){if(!!wt.isValidType(l)){var u={type:l,visual:s};t&&t(u,i),o[l]=new wt(u),l==="opacity"&&(u=lt(u),u.type="colorAlpha",o.__hidden.__alphaForOpacity=new wt(u))}})}),r;function n(){var i=function(){};i.prototype.__hidden=i.prototype;var o=new i;return o}}function bh(a,e,t){var r;D(t,function(n){e.hasOwnProperty(n)&&bu(e[n])&&(r=!0)}),r&&D(t,function(n){e.hasOwnProperty(n)&&bu(e[n])?a[n]=lt(e[n]):delete a[n]})}function Tw(a,e,t,r,n,i){var o={};D(a,function(c){var h=wt.prepareVisualTypes(e[c]);o[c]=h});var s;function l(c){return Uv(t,s,c)}function u(c,h){Yv(t,s,c,h)}i==null?t.each(v):t.each([i],v);function v(c,h){s=i==null?c:h;var f=t.getRawDataItem(s);if(!(f&&f.visualMap===!1))for(var p=r.call(n,c),d=e[p],g=o[p],y=0,m=g.length;y<m;y++){var S=g[y];d[S]&&d[S].applyVisual(c,l,u)}}}function Iw(a,e,t,r){var n={};return D(a,function(i){var o=wt.prepareVisualTypes(e[i]);n[i]=o}),{progress:function(o,s){var l;r!=null&&(l=s.getDimensionIndex(r));function u(w){return Uv(s,c,w)}function v(w,_){Yv(s,c,w,_)}for(var c,h=s.getStore();(c=o.next())!=null;){var f=s.getRawDataItem(c);if(!(f&&f.visualMap===!1))for(var p=r!=null?h.get(l,c):c,d=t(p),g=e[d],y=n[d],m=0,S=y.length;m<S;m++){var x=y[m];g[x]&&g[x].applyVisual(p,u,v)}}}}}function Dw(a){var e=a.brushType,t={point:function(r){return Au[e].point(r,t,a)},rect:function(r){return Au[e].rect(r,t,a)}};return t}var Au={lineX:Tu(0),lineY:Tu(1),rect:{point:function(a,e,t){return a&&t.boundingRect.contain(a[0],a[1])},rect:function(a,e,t){return a&&t.boundingRect.intersect(a)}},polygon:{point:function(a,e,t){return a&&t.boundingRect.contain(a[0],a[1])&&He(t.range,a[0],a[1])},rect:function(a,e,t){var r=t.range;if(!a||r.length<=1)return!1;var n=a.x,i=a.y,o=a.width,s=a.height,l=r[0];if(He(r,n,i)||He(r,n+o,i)||He(r,n,i+s)||He(r,n+o,i+s)||yt.create(a).contain(l[0],l[1])||ra(n,i,n+o,i,r)||ra(n,i,n,i+s,r)||ra(n+o,i,n+o,i+s,r)||ra(n,i+s,n+o,i+s,r))return!0}}};function Tu(a){var e=["x","y"],t=["width","height"];return{point:function(r,n,i){if(r){var o=i.range,s=r[a];return Tr(s,o)}},rect:function(r,n,i){if(r){var o=i.range,s=[r[e[a]],r[e[a]]+r[t[a]]];return s[1]<s[0]&&s.reverse(),Tr(s[0],o)||Tr(s[1],o)||Tr(o[0],s)||Tr(o[1],s)}}}}function Tr(a,e){return e[0]<=a&&a<=e[1]}var Iu=["inBrush","outOfBrush"],ci="__ecBrushSelect",Xi="__ecInBrushSelectEvent";function Ah(a){a.eachComponent({mainType:"brush"},function(e){var t=e.brushTargetManager=new xp(e.option,a);t.setInputRanges(e.areas,a)})}function Cw(a,e,t){var r=[],n,i;a.eachComponent({mainType:"brush"},function(o){t&&t.type==="takeGlobalCursor"&&o.setBrushOption(t.key==="brush"?t.brushOption:{brushType:!1})}),Ah(a),a.eachComponent({mainType:"brush"},function(o,s){var l={brushId:o.id,brushIndex:s,brushName:o.name,areas:lt(o.areas),selected:[]};r.push(l);var u=o.option,v=u.brushLink,c=[],h=[],f=[],p=!1;s||(n=u.throttleType,i=u.throttleDelay);var d=F(o.areas,function(w){var _=Vw[w.brushType],b=Q({boundingRect:_?_(w):void 0},w);return b.selectors=Dw(b),b}),g=Yi(o.option,Iu,function(w){w.mappingMethod="fixed"});W(v)&&D(v,function(w){c[w]=1});function y(w){return v==="all"||!!c[w]}function m(w){return!!w.length}a.eachSeries(function(w,_){var b=f[_]=[];w.subType==="parallel"?S(w,_):x(w,_,b)});function S(w,_){var b=w.coordinateSystem;p=p||b.hasAxisBrushed(),y(_)&&b.eachActiveState(w.getData(),function(A,T){A==="active"&&(h[T]=1)})}function x(w,_,b){if(!(!w.brushSelector||Pw(o,_))&&(D(d,function(T){o.brushTargetManager.controlSeries(T,w,a)&&b.push(T),p=p||m(b)}),y(_)&&m(b))){var A=w.getData();A.each(function(T){Du(w,b,A,T)&&(h[T]=1)})}}a.eachSeries(function(w,_){var b={seriesId:w.id,seriesIndex:_,seriesName:w.name,dataIndex:[]};l.selected.push(b);var A=f[_],T=w.getData(),I=y(_)?function(C){return h[C]?(b.dataIndex.push(T.getRawIndex(C)),"inBrush"):"outOfBrush"}:function(C){return Du(w,A,T,C)?(b.dataIndex.push(T.getRawIndex(C)),"inBrush"):"outOfBrush"};(y(_)?p:m(A))&&Tw(Iu,g,T,I)})}),Mw(e,n,i,r,t)}function Mw(a,e,t,r,n){if(!!n){var i=a.getZr();if(!i[Xi]){i[ci]||(i[ci]=Lw);var o=Ev(i,ci,t,e);o(a,r)}}}function Lw(a,e){if(!a.isDisposed()){var t=a.getZr();t[Xi]=!0,a.dispatchAction({type:"brushSelect",batch:e}),t[Xi]=!1}}function Du(a,e,t,r){for(var n=0,i=e.length;n<i;n++){var o=e[n];if(a.brushSelector(r,t,o.selectors,o))return!0}}function Pw(a,e){var t=a.option.seriesIndex;return t!=null&&t!=="all"&&(W(t)?Ut(t,e)<0:e!==t)}var Vw={rect:function(a){return Cu(a.range)},polygon:function(a){for(var e,t=a.range,r=0,n=t.length;r<n;r++){e=e||[[1/0,-1/0],[1/0,-1/0]];var i=t[r];i[0]<e[0][0]&&(e[0][0]=i[0]),i[0]>e[0][1]&&(e[0][1]=i[0]),i[1]<e[1][0]&&(e[1][0]=i[1]),i[1]>e[1][1]&&(e[1][1]=i[1])}return e&&Cu(e)}};function Cu(a){return new yt(a[0][0],a[1][0],a[0][1]-a[0][0],a[1][1]-a[1][0])}var Ew=function(a){z(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,r){this.ecModel=t,this.api=r,this.model,(this._brushController=new kv(r.getZr())).on("brush",q(this._onBrush,this)).mount()},e.prototype.render=function(t,r,n,i){this.model=t,this._updateController(t,r,n,i)},e.prototype.updateTransform=function(t,r,n,i){Ah(r),this._updateController(t,r,n,i)},e.prototype.updateVisual=function(t,r,n,i){this.updateTransform(t,r,n,i)},e.prototype.updateView=function(t,r,n,i){this._updateController(t,r,n,i)},e.prototype._updateController=function(t,r,n,i){(!i||i.$from!==t.id)&&this._brushController.setPanels(t.brushTargetManager.makePanelOpts(n)).enableBrush(t.brushOption).updateCovers(t.areas.slice())},e.prototype.dispose=function(){this._brushController.dispose()},e.prototype._onBrush=function(t){var r=this.model.id,n=this.model.brushTargetManager.setOutputRanges(t.areas,this.ecModel);(!t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:r,areas:lt(n),$from:r}),t.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:r,areas:lt(n),$from:r})},e.type="brush",e}(Yt);const Rw=Ew;var kw="#ddd",Nw=function(a){z(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.areas=[],t.brushOption={},t}return e.prototype.optionUpdated=function(t,r){var n=this.option;!r&&bh(n,t,["inBrush","outOfBrush"]);var i=n.inBrush=n.inBrush||{};n.outOfBrush=n.outOfBrush||{color:kw},i.hasOwnProperty("liftZ")||(i.liftZ=5)},e.prototype.setAreas=function(t){!t||(this.areas=F(t,function(r){return Mu(this.option,r)},this))},e.prototype.setBrushOption=function(t){this.brushOption=Mu(this.option,t),this.brushType=this.brushOption.brushType},e.type="brush",e.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],e.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(210,219,238,0.3)",borderColor:"#D2DBEE"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},e}(Nt);function Mu(a,e){return $t({brushType:a.brushType,brushMode:a.brushMode,transformable:a.transformable,brushStyle:new Jt(a.brushStyle).getItemStyle(),removeOnClick:a.removeOnClick,z:a.z},e,!0)}const zw=Nw;var Gw=["rect","polygon","lineX","lineY","keep","clear"],Ow=function(a){z(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e.prototype.render=function(t,r,n){var i,o,s;r.eachComponent({mainType:"brush"},function(l){i=l.brushType,o=l.brushOption.brushMode||"single",s=s||!!l.areas.length}),this._brushType=i,this._brushMode=o,D(t.get("type",!0),function(l){t.setIconStatus(l,(l==="keep"?o==="multiple":l==="clear"?s:l===i)?"emphasis":"normal")})},e.prototype.updateView=function(t,r,n){this.render(t,r,n)},e.prototype.getIcons=function(){var t=this.model,r=t.get("icon",!0),n={};return D(t.get("type",!0),function(i){r[i]&&(n[i]=r[i])}),n},e.prototype.onclick=function(t,r,n){var i=this._brushType,o=this._brushMode;n==="clear"?(r.dispatchAction({type:"axisAreaSelect",intervals:[]}),r.dispatchAction({type:"brush",command:"clear",areas:[]})):r.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:n==="keep"?i:i===n?!1:n,brushMode:n==="keep"?o==="multiple"?"single":"multiple":o}})},e.getDefaultOption=function(t){var r={show:!0,type:Gw.slice(),icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:t.getLocaleModel().get(["toolbox","brush","title"])};return r},e}(_p);const Bw=Ow;function Fw(a){a.registerComponentView(Rw),a.registerComponentModel(zw),a.registerPreprocessor(bw),a.registerVisual(a.PRIORITY.VISUAL.BRUSH,Cw),a.registerAction({type:"brush",event:"brush",update:"updateVisual"},function(e,t){t.eachComponent({mainType:"brush",query:e},function(r){r.setAreas(e.areas)})}),a.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},pr),a.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},pr),wp("brush",Bw)}var Hw=function(a){z(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.layoutMode="box",t}return e.prototype.init=function(t,r,n){this.mergeDefaultAndTheme(t,n),this._initData()},e.prototype.mergeOption=function(t){a.prototype.mergeOption.apply(this,arguments),this._initData()},e.prototype.setCurrentIndex=function(t){t==null&&(t=this.option.currentIndex);var r=this._data.count();this.option.loop?t=(t%r+r)%r:(t>=r&&(t=r-1),t<0&&(t=0)),this.option.currentIndex=t},e.prototype.getCurrentIndex=function(){return this.option.currentIndex},e.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},e.prototype.setPlayState=function(t){this.option.autoPlay=!!t},e.prototype.getPlayState=function(){return!!this.option.autoPlay},e.prototype._initData=function(){var t=this.option,r=t.data||[],n=t.axisType,i=this._names=[],o;n==="category"?(o=[],D(r,function(u,v){var c=ge(bp(u),""),h;Rt(u)?(h=lt(u),h.value=v):h=v,o.push(h),i.push(c)})):o=r;var s={category:"ordinal",time:"time",value:"number"}[n]||"number",l=this._data=new Bt([{name:"value",type:s}],this);l.initData(o,i)},e.prototype.getData=function(){return this._data},e.prototype.getCategories=function(){if(this.get("axisType")==="category")return this._names.slice()},e.type="timeline",e.defaultOption={z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},e}(Nt);const Lu=Hw;var Th=function(a){z(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.type="timeline.slider",e.defaultOption=un(Lu.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:"#DAE1F5"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#A4B1D7"},itemStyle:{color:"#A4B1D7",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:15,color:"#316bf3",borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0, 0, 0, 0.3)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"M2,18.5A1.52,1.52,0,0,1,.92,18a1.49,1.49,0,0,1,0-2.12L7.81,9.36,1,3.11A1.5,1.5,0,1,1,3,.89l8,7.34a1.48,1.48,0,0,1,.49,1.09,1.51,1.51,0,0,1-.46,1.1L3,18.08A1.5,1.5,0,0,1,2,18.5Z",prevIcon:"M10,.5A1.52,1.52,0,0,1,11.08,1a1.49,1.49,0,0,1,0,2.12L4.19,9.64,11,15.89a1.5,1.5,0,1,1-2,2.22L1,10.77A1.48,1.48,0,0,1,.5,9.68,1.51,1.51,0,0,1,1,8.58L9,.92A1.5,1.5,0,0,1,10,.5Z",prevBtnSize:18,nextBtnSize:18,color:"#A4B1D7",borderColor:"#A4B1D7",borderWidth:1},emphasis:{label:{show:!0,color:"#6f778d"},itemStyle:{color:"#316BF3"},controlStyle:{color:"#316BF3",borderColor:"#316BF3",borderWidth:2}},progress:{lineStyle:{color:"#316BF3"},itemStyle:{color:"#316BF3"},label:{color:"#6f778d"}},data:[]}),e}(Lu);ae(Th,Xv.prototype);const Ww=Th;var $w=function(a){z(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.type="timeline",e}(Yt);const Uw=$w;var Yw=function(a){z(e,a);function e(t,r,n,i){var o=a.call(this,t,r,n)||this;return o.type=i||"value",o}return e.prototype.getLabelModel=function(){return this.model.getModel("label")},e.prototype.isHorizontal=function(){return this.model.get("orient")==="horizontal"},e}(pe);const Xw=Yw;var hi=Math.PI,Pu=Dt(),Zw=function(a){z(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,r){this.api=r},e.prototype.render=function(t,r,n){if(this.model=t,this.api=n,this.ecModel=r,this.group.removeAll(),t.get("show",!0)){var i=this._layout(t,n),o=this._createGroup("_mainGroup"),s=this._createGroup("_labelGroup"),l=this._axis=this._createAxis(i,t);t.formatTooltip=function(u){var v=l.scale.getLabel({value:u});return kt("nameValue",{noName:!0,value:v})},D(["AxisLine","AxisTick","Control","CurrentPointer"],function(u){this["_render"+u](i,o,l,t)},this),this._renderAxisLabel(i,s,l,t),this._position(i,t)}this._doPlayStop(),this._updateTicksStatus()},e.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},e.prototype.dispose=function(){this._clearTimer()},e.prototype._layout=function(t,r){var n=t.get(["label","position"]),i=t.get("orient"),o=Kw(t,r),s;n==null||n==="auto"?s=i==="horizontal"?o.y+o.height/2<r.getHeight()/2?"-":"+":o.x+o.width/2<r.getWidth()/2?"+":"-":tt(n)?s={horizontal:{top:"-",bottom:"+"},vertical:{left:"-",right:"+"}}[i][n]:s=n;var l={horizontal:"center",vertical:s>=0||s==="+"?"left":"right"},u={horizontal:s>=0||s==="+"?"top":"bottom",vertical:"middle"},v={horizontal:0,vertical:hi/2},c=i==="vertical"?o.height:o.width,h=t.getModel("controlStyle"),f=h.get("show",!0),p=f?h.get("itemSize"):0,d=f?h.get("itemGap"):0,g=p+d,y=t.get(["label","rotate"])||0;y=y*hi/180;var m,S,x,w=h.get("position",!0),_=f&&h.get("showPlayBtn",!0),b=f&&h.get("showPrevBtn",!0),A=f&&h.get("showNextBtn",!0),T=0,I=c;w==="left"||w==="bottom"?(_&&(m=[0,0],T+=g),b&&(S=[T,0],T+=g),A&&(x=[I-p,0],I-=g)):(_&&(m=[I-p,0],I-=g),b&&(S=[0,0],T+=g),A&&(x=[I-p,0],I-=g));var C=[T,I];return t.get("inverse")&&C.reverse(),{viewRect:o,mainLength:c,orient:i,rotation:v[i],labelRotation:y,labelPosOpt:s,labelAlign:t.get(["label","align"])||l[i],labelBaseline:t.get(["label","verticalAlign"])||t.get(["label","baseline"])||u[i],playPosition:m,prevBtnPosition:S,nextBtnPosition:x,axisExtent:C,controlSize:p,controlGap:d}},e.prototype._position=function(t,r){var n=this._mainGroup,i=this._labelGroup,o=t.viewRect;if(t.orient==="vertical"){var s=yr(),l=o.x,u=o.y+o.height;Ze(s,s,[-l,-u]),tn(s,s,-hi/2),Ze(s,s,[l,u]),o=o.clone(),o.applyTransform(s)}var v=m(o),c=m(n.getBoundingRect()),h=m(i.getBoundingRect()),f=[n.x,n.y],p=[i.x,i.y];p[0]=f[0]=v[0][0];var d=t.labelPosOpt;if(d==null||tt(d)){var g=d==="+"?0:1;S(f,c,v,1,g),S(p,h,v,1,1-g)}else{var g=d>=0?0:1;S(f,c,v,1,g),p[1]=f[1]+d}n.setPosition(f),i.setPosition(p),n.rotation=i.rotation=t.rotation,y(n),y(i);function y(x){x.originX=v[0][0]-x.x,x.originY=v[1][0]-x.y}function m(x){return[[x.x,x.x+x.width],[x.y,x.y+x.height]]}function S(x,w,_,b,A){x[b]+=_[b][A]-w[b][A]}},e.prototype._createAxis=function(t,r){var n=r.getData(),i=r.get("axisType"),o=qw(r,i);o.getTicks=function(){return n.mapArray(["value"],function(u){return{value:u}})};var s=n.getDataExtent("value");o.setExtent(s[0],s[1]),o.calcNiceTicks();var l=new Xw("value",o,t.axisExtent,i);return l.model=r,l},e.prototype._createGroup=function(t){var r=this[t]=new Z;return this.group.add(r),r},e.prototype._renderAxisLine=function(t,r,n,i){var o=n.getExtent();if(!!i.get(["lineStyle","show"])){var s=new te({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:$({lineCap:"round"},i.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});r.add(s);var l=this._progressLine=new te({shape:{x1:o[0],x2:this._currentPointer?this._currentPointer.x:o[0],y1:0,y2:0},style:Q({lineCap:"round",lineWidth:s.style.lineWidth},i.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});r.add(l)}},e.prototype._renderAxisTick=function(t,r,n,i){var o=this,s=i.getData(),l=n.scale.getTicks();this._tickSymbols=[],D(l,function(u){var v=n.dataToCoord(u.value),c=s.getItemModel(u.value),h=c.getModel("itemStyle"),f=c.getModel(["emphasis","itemStyle"]),p=c.getModel(["progress","itemStyle"]),d={x:v,y:0,onclick:q(o._changeTimeline,o,u.value)},g=Vu(c,h,r,d);g.ensureState("emphasis").style=f.getItemStyle(),g.ensureState("progress").style=p.getItemStyle(),_n(g);var y=it(g);c.get("tooltip")?(y.dataIndex=u.value,y.dataModel=i):y.dataIndex=y.dataModel=null,o._tickSymbols.push(g)})},e.prototype._renderAxisLabel=function(t,r,n,i){var o=this,s=n.getLabelModel();if(!!s.get("show")){var l=i.getData(),u=n.getViewLabels();this._tickLabels=[],D(u,function(v){var c=v.tickValue,h=l.getItemModel(c),f=h.getModel("label"),p=h.getModel(["emphasis","label"]),d=h.getModel(["progress","label"]),g=n.dataToCoord(v.tickValue),y=new pt({x:g,y:0,rotation:t.labelRotation-t.rotation,onclick:q(o._changeTimeline,o,c),silent:!1,style:Ft(f,{text:v.formattedLabel,align:t.labelAlign,verticalAlign:t.labelBaseline})});y.ensureState("emphasis").style=Ft(p),y.ensureState("progress").style=Ft(d),r.add(y),_n(y),Pu(y).dataIndex=c,o._tickLabels.push(y)})}},e.prototype._renderControl=function(t,r,n,i){var o=t.controlSize,s=t.rotation,l=i.getModel("controlStyle").getItemStyle(),u=i.getModel(["emphasis","controlStyle"]).getItemStyle(),v=i.getPlayState(),c=i.get("inverse",!0);h(t.nextBtnPosition,"next",q(this._changeTimeline,this,c?"-":"+")),h(t.prevBtnPosition,"prev",q(this._changeTimeline,this,c?"+":"-")),h(t.playPosition,v?"stop":"play",q(this._handlePlayClick,this,!v),!0);function h(f,p,d,g){if(!!f){var y=Ci(_t(i.get(["controlStyle",p+"BtnSize"]),o),o),m=[0,-y/2,y,y],S=jw(i,p+"Icon",m,{x:f[0],y:f[1],originX:o/2,originY:0,rotation:g?-s:0,rectHover:!0,style:l,onclick:d});S.ensureState("emphasis").style=u,r.add(S),_n(S)}}},e.prototype._renderCurrentPointer=function(t,r,n,i){var o=i.getData(),s=i.getCurrentIndex(),l=o.getItemModel(s).getModel("checkpointStyle"),u=this,v={onCreate:function(c){c.draggable=!0,c.drift=q(u._handlePointerDrag,u),c.ondragend=q(u._handlePointerDragend,u),Eu(c,u._progressLine,s,n,i,!0)},onUpdate:function(c){Eu(c,u._progressLine,s,n,i)}};this._currentPointer=Vu(l,l,this._mainGroup,{},this._currentPointer,v)},e.prototype._handlePlayClick=function(t){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:t,from:this.uid})},e.prototype._handlePointerDrag=function(t,r,n){this._clearTimer(),this._pointerChangeTimeline([n.offsetX,n.offsetY])},e.prototype._handlePointerDragend=function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},e.prototype._pointerChangeTimeline=function(t,r){var n=this._toAxisCoord(t)[0],i=this._axis,o=je(i.getExtent().slice());n>o[1]&&(n=o[1]),n<o[0]&&(n=o[0]),this._currentPointer.x=n,this._currentPointer.markRedraw(),this._progressLine.shape.x2=n,this._progressLine.dirty();var s=this._findNearestTick(n),l=this.model;(r||s!==l.getCurrentIndex()&&l.get("realtime"))&&this._changeTimeline(s)},e.prototype._doPlayStop=function(){var t=this;this._clearTimer(),this.model.getPlayState()&&(this._timer=setTimeout(function(){var r=t.model;t._changeTimeline(r.getCurrentIndex()+(r.get("rewind",!0)?-1:1))},this.model.get("playInterval")))},e.prototype._toAxisCoord=function(t){var r=this._mainGroup.getLocalTransform();return ur(t,r,!0)},e.prototype._findNearestTick=function(t){var r=this.model.getData(),n=1/0,i,o=this._axis;return r.each(["value"],function(s,l){var u=o.dataToCoord(s),v=Math.abs(u-t);v<n&&(n=v,i=l)}),i},e.prototype._clearTimer=function(){this._timer&&(clearTimeout(this._timer),this._timer=null)},e.prototype._changeTimeline=function(t){var r=this.model.getCurrentIndex();t==="+"?t=r+1:t==="-"&&(t=r-1),this.api.dispatchAction({type:"timelineChange",currentIndex:t,from:this.uid})},e.prototype._updateTicksStatus=function(){var t=this.model.getCurrentIndex(),r=this._tickSymbols,n=this._tickLabels;if(r)for(var i=0;i<r.length;i++)r&&r[i]&&r[i].toggleState("progress",i<t);if(n)for(var i=0;i<n.length;i++)n&&n[i]&&n[i].toggleState("progress",Pu(n[i]).dataIndex<=t)},e.type="timeline.slider",e}(Uw);function qw(a,e){if(e=e||a.get("type"),e)switch(e){case"category":return new Tp({ordinalMeta:a.getCategories(),extent:[1/0,-1/0]});case"time":return new Ap({locale:a.ecModel.getLocaleModel(),useUTC:a.ecModel.get("useUTC")});default:return new _i}}function Kw(a,e){return ne(a.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()},a.get("padding"))}function jw(a,e,t,r){var n=r.style,i=Ip(a.get(["controlStyle",e]),r||{},new yt(t[0],t[1],t[2],t[3]));return n&&i.setStyle(n),i}function Vu(a,e,t,r,n,i){var o=e.get("color");if(n)n.setColor(o),t.add(n),i&&i.onUpdate(n);else{var s=a.get("symbol");n=jt(s,-1,-1,2,2,o),n.setStyle("strokeNoScale",!0),t.add(n),i&&i.onCreate(n)}var l=e.getItemStyle(["color"]);n.setStyle(l),r=$t({rectHover:!0,z2:100},r,!0);var u=Ka(a.get("symbolSize"));r.scaleX=u[0]/2,r.scaleY=u[1]/2;var v=sn(a.get("symbolOffset"),u);v&&(r.x=(r.x||0)+v[0],r.y=(r.y||0)+v[1]);var c=a.get("symbolRotate");return r.rotation=(c||0)*Math.PI/180||0,n.attr(r),n.updateTransform(),n}function Eu(a,e,t,r,n,i){if(!a.dragging){var o=n.getModel("checkpointStyle"),s=r.dataToCoord(n.getData().get("value",t));if(i||!o.get("animation",!0))a.attr({x:s,y:0}),e&&e.attr({shape:{x2:s}});else{var l={duration:o.get("animationDuration",!0),easing:o.get("animationEasing",!0)};a.stopAnimation(null,!0),a.animateTo({x:s,y:0},l),e&&e.animateTo({shape:{x2:s}},l)}}}const Jw=Zw;function Qw(a){a.registerAction({type:"timelineChange",event:"timelineChanged",update:"prepareAndUpdate"},function(e,t,r){var n=t.getComponent("timeline");return n&&e.currentIndex!=null&&(n.setCurrentIndex(e.currentIndex),!n.get("loop",!0)&&n.isIndexMax()&&n.getPlayState()&&(n.setPlayState(!1),r.dispatchAction({type:"timelinePlayChange",playState:!1,from:e.from}))),t.resetOption("timeline",{replaceMerge:n.get("replaceMerge",!0)}),Q({currentIndex:n.option.currentIndex},e)}),a.registerAction({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},function(e,t){var r=t.getComponent("timeline");r&&e.playState!=null&&r.setPlayState(e.playState)})}function tb(a){var e=a&&a.timeline;W(e)||(e=e?[e]:[]),D(e,function(t){!t||eb(t)})}function eb(a){var e=a.type,t={number:"value",time:"time"};if(t[e]&&(a.axisType=t[e],delete a.type),Ru(a),$e(a,"controlPosition")){var r=a.controlStyle||(a.controlStyle={});$e(r,"position")||(r.position=a.controlPosition),r.position==="none"&&!$e(r,"show")&&(r.show=!1,delete r.position),delete a.controlPosition}D(a.data||[],function(n){Rt(n)&&!W(n)&&(!$e(n,"value")&&$e(n,"name")&&(n.value=n.name),Ru(n))})}function Ru(a){var e=a.itemStyle||(a.itemStyle={}),t=e.emphasis||(e.emphasis={}),r=a.label||a.label||{},n=r.normal||(r.normal={}),i={normal:1,emphasis:1};D(r,function(o,s){!i[s]&&!$e(n,s)&&(n[s]=o)}),t.label&&!$e(r,"emphasis")&&(r.emphasis=t.label,delete t.label)}function $e(a,e){return a.hasOwnProperty(e)}function rb(a){a.registerComponentModel(Ww),a.registerComponentView(Jw),a.registerSubTypeDefaulter("timeline",function(){return"slider"}),Qw(a),a.registerPreprocessor(tb)}function Fo(a,e){if(!a)return!1;for(var t=W(a)?a:[a],r=0;r<t.length;r++)if(t[r]&&t[r][e])return!0;return!1}function ga(a){rn(a,"label",["show"])}var ya=Dt(),Ih=function(a){z(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.createdBySelf=!1,t}return e.prototype.init=function(t,r,n){this.mergeDefaultAndTheme(t,n),this._mergeOption(t,n,!1,!0)},e.prototype.isAnimationEnabled=function(){if(Dp.node)return!1;var t=this.__hostSeries;return this.getShallow("animation")&&t&&t.isAnimationEnabled()},e.prototype.mergeOption=function(t,r){this._mergeOption(t,r,!1,!1)},e.prototype._mergeOption=function(t,r,n,i){var o=this.mainType;n||r.eachSeries(function(s){var l=s.get(this.mainType,!0),u=ya(s)[o];if(!l||!l.data){ya(s)[o]=null;return}u?u._mergeOption(l,r,!0):(i&&ga(l),D(l.data,function(v){v instanceof Array?(ga(v[0]),ga(v[1])):ga(v)}),u=this.createMarkerModelFromSeries(l,this,r),$(u,{mainType:this.mainType,seriesIndex:s.seriesIndex,name:s.name,createdBySelf:!0}),u.__hostSeries=s),ya(s)[o]=u},this)},e.prototype.formatTooltip=function(t,r,n){var i=this.getData(),o=this.getRawValue(t),s=i.getName(t);return kt("section",{header:this.name,blocks:[kt("nameValue",{name:s,value:o,noName:!s,noValue:o==null})]})},e.prototype.getData=function(){return this._data},e.prototype.setData=function(t){this._data=t},e.getMarkerModelFromSeries=function(t,r){return ya(t)[r]},e.type="marker",e.dependencies=["series","grid","polar","geo"],e}(Nt);ae(Ih,Xv.prototype);const Le=Ih;var ab=function(a){z(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,r,n){return new e(t,r,n)},e.type="markPoint",e.defaultOption={z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}},e}(Le);const nb=ab;function ib(a){return!(isNaN(parseFloat(a.x))&&isNaN(parseFloat(a.y)))}function ob(a){return!isNaN(parseFloat(a.x))&&!isNaN(parseFloat(a.y))}function ma(a,e,t,r,n,i){var o=[],s=Wv(e,r),l=s?e.getCalculationInfo("stackResultDimension"):r,u=Ho(e,l,a),v=e.indicesOfNearest(l,u)[0];o[n]=e.get(t,v),o[i]=e.get(l,v);var c=e.get(r,v),h=Cp(e.get(r,v));return h=Math.min(h,20),h>=0&&(o[i]=+o[i].toFixed(h)),[o,c]}var fi={min:st(ma,"min"),max:st(ma,"max"),average:st(ma,"average"),median:st(ma,"median")};function Xr(a,e){var t=a.getData(),r=a.coordinateSystem;if(e&&!ob(e)&&!W(e.coord)&&r){var n=r.dimensions,i=Dh(e,t,r,a);if(e=lt(e),e.type&&fi[e.type]&&i.baseAxis&&i.valueAxis){var o=Ut(n,i.baseAxis.dim),s=Ut(n,i.valueAxis.dim),l=fi[e.type](t,i.baseDataDim,i.valueDataDim,o,s);e.coord=l[0],e.value=l[1]}else{for(var u=[e.xAxis!=null?e.xAxis:e.radiusAxis,e.yAxis!=null?e.yAxis:e.angleAxis],v=0;v<2;v++)fi[u[v]]&&(u[v]=Ho(t,t.mapDimension(n[v]),u[v]));e.coord=u}}return e}function Dh(a,e,t,r){var n={};return a.valueIndex!=null||a.valueDim!=null?(n.valueDataDim=a.valueIndex!=null?e.getDimension(a.valueIndex):a.valueDim,n.valueAxis=t.getAxis(sb(r,n.valueDataDim)),n.baseAxis=t.getOtherAxis(n.valueAxis),n.baseDataDim=e.mapDimension(n.baseAxis.dim)):(n.baseAxis=r.getBaseAxis(),n.valueAxis=t.getOtherAxis(n.baseAxis),n.baseDataDim=e.mapDimension(n.baseAxis.dim),n.valueDataDim=e.mapDimension(n.valueAxis.dim)),n}function sb(a,e){var t=a.getData().getDimensionInfo(e);return t&&t.coordDim}function Zr(a,e){return a&&a.containData&&e.coord&&!ib(e)?a.containData(e.coord):!0}function Ch(a,e){return a?function(t,r,n,i){var o=i<2?t.coord&&t.coord[i]:t.value;return Ca(o,e[i])}:function(t,r,n,i){return Ca(t.value,e[i])}}function Ho(a,e,t){if(t==="average"){var r=0,n=0;return a.each(e,function(i,o){isNaN(i)||(r+=i,n++)}),r/n}else return t==="median"?a.getMedian(e):a.getDataExtent(e)[t==="max"?1:0]}var pi=Dt(),lb=function(a){z(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){this.markerGroupMap=nt()},e.prototype.render=function(t,r,n){var i=this,o=this.markerGroupMap;o.each(function(s){pi(s).keep=!1}),r.eachSeries(function(s){var l=Le.getMarkerModelFromSeries(s,i.type);l&&i.renderSeries(s,l,r,n)}),o.each(function(s){!pi(s).keep&&i.group.remove(s.group)})},e.prototype.markKeep=function(t){pi(t).keep=!0},e.prototype.blurSeries=function(t){var r=this;D(t,function(n){var i=Le.getMarkerModelFromSeries(n,r.type);if(i){var o=i.getData();o.eachItemGraphicEl(function(s){s&&Mp(s)})}})},e.type="marker",e}(Yt);const Wo=lb;function ku(a,e,t){var r=e.coordinateSystem;a.each(function(n){var i=a.getItemModel(n),o,s=H(i.get("x"),t.getWidth()),l=H(i.get("y"),t.getHeight());if(!isNaN(s)&&!isNaN(l))o=[s,l];else if(e.getMarkerPosition)o=e.getMarkerPosition(a.getValues(a.dimensions,n));else if(r){var u=a.get(r.dimensions[0],n),v=a.get(r.dimensions[1],n);o=r.dataToPoint([u,v])}isNaN(s)||(o[0]=s),isNaN(l)||(o[1]=l),a.setItemLayout(n,o)})}var ub=function(a){z(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,r,n){r.eachSeries(function(i){var o=Le.getMarkerModelFromSeries(i,"markPoint");o&&(ku(o.getData(),i,n),this.markerGroupMap.get(i.id).updateLayout())},this)},e.prototype.renderSeries=function(t,r,n,i){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,v=u.get(s)||u.set(s,new oo),c=vb(o,t,r);r.setData(c),ku(r.getData(),t,i),c.each(function(h){var f=c.getItemModel(h),p=f.getShallow("symbol"),d=f.getShallow("symbolSize"),g=f.getShallow("symbolRotate"),y=f.getShallow("symbolOffset"),m=f.getShallow("symbolKeepAspect");if(ot(p)||ot(d)||ot(g)||ot(y)){var S=r.getRawValue(h),x=r.getDataParams(h);ot(p)&&(p=p(S,x)),ot(d)&&(d=d(S,x)),ot(g)&&(g=g(S,x)),ot(y)&&(y=y(S,x))}var w=f.getModel("itemStyle").getItemStyle(),_=vn(l,"color");w.fill||(w.fill=_),c.setItemVisual(h,{symbol:p,symbolSize:d,symbolRotate:g,symbolOffset:y,symbolKeepAspect:m,style:w})}),v.updateData(c),this.group.add(v.group),c.eachItemGraphicEl(function(h){h.traverse(function(f){it(f).dataModel=r})}),this.markKeep(v),v.group.silent=r.get("silent")||t.get("silent")},e.type="markPoint",e}(Wo);function vb(a,e,t){var r;a?r=F(a&&a.dimensions,function(s){var l=e.getData().getDimensionInfo(e.getData().mapDimension(s))||{};return $($({},l),{name:s,ordinalMeta:null})}):r=[{name:"value",type:"float"}];var n=new Bt(r,t),i=F(t.get("data"),st(Xr,e));a&&(i=Et(i,st(Zr,a)));var o=Ch(!!a,r);return n.initData(i,null,o),n}const cb=ub;function hb(a){a.registerComponentModel(nb),a.registerComponentView(cb),a.registerPreprocessor(function(e){Fo(e.series,"markPoint")&&(e.markPoint=e.markPoint||{})})}var fb=function(a){z(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,r,n){return new e(t,r,n)},e.type="markLine",e.defaultOption={z:5,symbol:["circle","arrow"],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"},e}(Le);const pb=fb;var Sa=Dt(),db=function(a,e,t,r){var n=a.getData(),i;if(W(r))i=r;else{var o=r.type;if(o==="min"||o==="max"||o==="average"||o==="median"||r.xAxis!=null||r.yAxis!=null){var s=void 0,l=void 0;if(r.yAxis!=null||r.xAxis!=null)s=e.getAxis(r.yAxis!=null?"y":"x"),l=Ot(r.yAxis,r.xAxis);else{var u=Dh(r,n,e,a);s=u.valueAxis;var v=Lp(n,u.valueDataDim);l=Ho(n,v,o)}var c=s.dim==="x"?0:1,h=1-c,f=lt(r),p={coord:[]};f.type=null,f.coord=[],f.coord[h]=-1/0,p.coord[h]=1/0;var d=t.get("precision");d>=0&&ce(l)&&(l=+l.toFixed(Math.min(d,20))),f.coord[c]=p.coord[c]=l,i=[f,p,{type:o,valueIndex:r.valueIndex,value:l}]}else i=[]}var g=[Xr(a,i[0]),Xr(a,i[1]),$({},i[2])];return g[2].type=g[2].type||null,$t(g[2],g[0]),$t(g[2],g[1]),g};function Fa(a){return!isNaN(a)&&!isFinite(a)}function Nu(a,e,t,r){var n=1-a,i=r.dimensions[a];return Fa(e[n])&&Fa(t[n])&&e[a]===t[a]&&r.getAxis(i).containData(e[a])}function gb(a,e){if(a.type==="cartesian2d"){var t=e[0].coord,r=e[1].coord;if(t&&r&&(Nu(1,t,r,a)||Nu(0,t,r,a)))return!0}return Zr(a,e[0])&&Zr(a,e[1])}function di(a,e,t,r,n){var i=r.coordinateSystem,o=a.getItemModel(e),s,l=H(o.get("x"),n.getWidth()),u=H(o.get("y"),n.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(r.getMarkerPosition)s=r.getMarkerPosition(a.getValues(a.dimensions,e));else{var v=i.dimensions,c=a.get(v[0],e),h=a.get(v[1],e);s=i.dataToPoint([c,h])}if(vr(i,"cartesian2d")){var f=i.getAxis("x"),p=i.getAxis("y"),v=i.dimensions;Fa(a.get(v[0],e))?s[0]=f.toGlobalCoord(f.getExtent()[t?0:1]):Fa(a.get(v[1],e))&&(s[1]=p.toGlobalCoord(p.getExtent()[t?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}a.setItemLayout(e,s)}var yb=function(a){z(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,r,n){r.eachSeries(function(i){var o=Le.getMarkerModelFromSeries(i,"markLine");if(o){var s=o.getData(),l=Sa(o).from,u=Sa(o).to;l.each(function(v){di(l,v,!0,i,n),di(u,v,!1,i,n)}),s.each(function(v){s.setItemLayout(v,[l.getItemLayout(v),u.getItemLayout(v)])}),this.markerGroupMap.get(i.id).updateLayout()}},this)},e.prototype.renderSeries=function(t,r,n,i){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,v=u.get(s)||u.set(s,new Mo);this.group.add(v.group);var c=mb(o,t,r),h=c.from,f=c.to,p=c.line;Sa(r).from=h,Sa(r).to=f,r.setData(p);var d=r.get("symbol"),g=r.get("symbolSize"),y=r.get("symbolRotate"),m=r.get("symbolOffset");W(d)||(d=[d,d]),W(g)||(g=[g,g]),W(y)||(y=[y,y]),W(m)||(m=[m,m]),c.from.each(function(x){S(h,x,!0),S(f,x,!1)}),p.each(function(x){var w=p.getItemModel(x).getModel("lineStyle").getLineStyle();p.setItemLayout(x,[h.getItemLayout(x),f.getItemLayout(x)]),w.stroke==null&&(w.stroke=h.getItemVisual(x,"style").fill),p.setItemVisual(x,{fromSymbolKeepAspect:h.getItemVisual(x,"symbolKeepAspect"),fromSymbolOffset:h.getItemVisual(x,"symbolOffset"),fromSymbolRotate:h.getItemVisual(x,"symbolRotate"),fromSymbolSize:h.getItemVisual(x,"symbolSize"),fromSymbol:h.getItemVisual(x,"symbol"),toSymbolKeepAspect:f.getItemVisual(x,"symbolKeepAspect"),toSymbolOffset:f.getItemVisual(x,"symbolOffset"),toSymbolRotate:f.getItemVisual(x,"symbolRotate"),toSymbolSize:f.getItemVisual(x,"symbolSize"),toSymbol:f.getItemVisual(x,"symbol"),style:w})}),v.updateData(p),c.line.eachItemGraphicEl(function(x,w){x.traverse(function(_){it(_).dataModel=r})});function S(x,w,_){var b=x.getItemModel(w);di(x,w,_,t,i);var A=b.getModel("itemStyle").getItemStyle();A.fill==null&&(A.fill=vn(l,"color")),x.setItemVisual(w,{symbolKeepAspect:b.get("symbolKeepAspect"),symbolOffset:_t(b.get("symbolOffset",!0),m[_?0:1]),symbolRotate:_t(b.get("symbolRotate",!0),y[_?0:1]),symbolSize:_t(b.get("symbolSize"),g[_?0:1]),symbol:_t(b.get("symbol",!0),d[_?0:1]),style:A})}this.markKeep(v),v.group.silent=r.get("silent")||t.get("silent")},e.type="markLine",e}(Wo);function mb(a,e,t){var r;a?r=F(a&&a.dimensions,function(u){var v=e.getData().getDimensionInfo(e.getData().mapDimension(u))||{};return $($({},v),{name:u,ordinalMeta:null})}):r=[{name:"value",type:"float"}];var n=new Bt(r,t),i=new Bt(r,t),o=new Bt([],t),s=F(t.get("data"),st(db,e,a,t));a&&(s=Et(s,st(gb,a)));var l=Ch(!!a,r);return n.initData(F(s,function(u){return u[0]}),null,l),i.initData(F(s,function(u){return u[1]}),null,l),o.initData(F(s,function(u){return u[2]})),o.hasItemOption=!0,{from:n,to:i,line:o}}const Sb=yb;function xb(a){a.registerComponentModel(pb),a.registerComponentView(Sb),a.registerPreprocessor(function(e){Fo(e.series,"markLine")&&(e.markLine=e.markLine||{})})}var _b=function(a){z(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,r,n){return new e(t,r,n)},e.type="markArea",e.defaultOption={z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},e}(Le);const wb=_b;var xa=Dt(),bb=function(a,e,t,r){var n=Xr(a,r[0]),i=Xr(a,r[1]),o=n.coord,s=i.coord;o[0]=Ot(o[0],-1/0),o[1]=Ot(o[1],-1/0),s[0]=Ot(s[0],1/0),s[1]=Ot(s[1],1/0);var l=to([{},n,i]);return l.coord=[n.coord,i.coord],l.x0=n.x,l.y0=n.y,l.x1=i.x,l.y1=i.y,l};function Ha(a){return!isNaN(a)&&!isFinite(a)}function zu(a,e,t,r){var n=1-a;return Ha(e[n])&&Ha(t[n])}function Ab(a,e){var t=e.coord[0],r=e.coord[1];return vr(a,"cartesian2d")&&t&&r&&(zu(1,t,r)||zu(0,t,r))?!0:Zr(a,{coord:t,x:e.x0,y:e.y0})||Zr(a,{coord:r,x:e.x1,y:e.y1})}function Gu(a,e,t,r,n){var i=r.coordinateSystem,o=a.getItemModel(e),s,l=H(o.get(t[0]),n.getWidth()),u=H(o.get(t[1]),n.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(r.getMarkerPosition)s=r.getMarkerPosition(a.getValues(t,e));else{var v=a.get(t[0],e),c=a.get(t[1],e),h=[v,c];i.clampData&&i.clampData(h,h),s=i.dataToPoint(h,!0)}if(vr(i,"cartesian2d")){var f=i.getAxis("x"),p=i.getAxis("y"),v=a.get(t[0],e),c=a.get(t[1],e);Ha(v)?s[0]=f.toGlobalCoord(f.getExtent()[t[0]==="x0"?0:1]):Ha(c)&&(s[1]=p.toGlobalCoord(p.getExtent()[t[1]==="y0"?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}return s}var Ou=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],Tb=function(a){z(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,r,n){r.eachSeries(function(i){var o=Le.getMarkerModelFromSeries(i,"markArea");if(o){var s=o.getData();s.each(function(l){var u=F(Ou,function(c){return Gu(s,l,c,i,n)});s.setItemLayout(l,u);var v=s.getItemGraphicEl(l);v.setShape("points",u)})}},this)},e.prototype.renderSeries=function(t,r,n,i){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,v=u.get(s)||u.set(s,{group:new Z});this.group.add(v.group),this.markKeep(v);var c=Ib(o,t,r);r.setData(c),c.each(function(h){var f=F(Ou,function(A){return Gu(c,h,A,t,i)}),p=o.getAxis("x").scale,d=o.getAxis("y").scale,g=p.getExtent(),y=d.getExtent(),m=[p.parse(c.get("x0",h)),p.parse(c.get("x1",h))],S=[d.parse(c.get("y0",h)),d.parse(c.get("y1",h))];je(m),je(S);var x=!(g[0]>m[1]||g[1]<m[0]||y[0]>S[1]||y[1]<S[0]),w=!x;c.setItemLayout(h,{points:f,allClipped:w});var _=c.getItemModel(h).getModel("itemStyle").getItemStyle(),b=vn(l,"color");_.fill||(_.fill=b,tt(_.fill)&&(_.fill=Ta(_.fill,.4))),_.stroke||(_.stroke=b),c.setItemVisual(h,"style",_)}),c.diff(xa(v).data).add(function(h){var f=c.getItemLayout(h);if(!f.allClipped){var p=new he({shape:{points:f.points}});c.setItemGraphicEl(h,p),v.group.add(p)}}).update(function(h,f){var p=xa(v).data.getItemGraphicEl(f),d=c.getItemLayout(h);d.allClipped?p&&v.group.remove(p):(p?vt(p,{shape:{points:d.points}},r,h):p=new he({shape:{points:d.points}}),c.setItemGraphicEl(h,p),v.group.add(p))}).remove(function(h){var f=xa(v).data.getItemGraphicEl(h);v.group.remove(f)}).execute(),c.eachItemGraphicEl(function(h,f){var p=c.getItemModel(f),d=c.getItemVisual(f,"style");h.useStyle(c.getItemVisual(f,"style")),re(h,Wt(p),{labelFetcher:r,labelDataIndex:f,defaultText:c.getName(f)||"",inheritColor:tt(d.fill)?Ta(d.fill,1):"#000"}),Ht(h,p),mt(h,null,null,p.get(["emphasis","disabled"])),it(h).dataModel=r}),xa(v).data=c,v.group.silent=r.get("silent")||t.get("silent")},e.type="markArea",e}(Wo);function Ib(a,e,t){var r,n,i=["x0","y0","x1","y1"];if(a){var o=F(a&&a.dimensions,function(u){var v=e.getData(),c=v.getDimensionInfo(v.mapDimension(u))||{};return $($({},c),{name:u,ordinalMeta:null})});n=F(i,function(u,v){return{name:u,type:o[v%2].type}}),r=new Bt(n,t)}else n=[{name:"value",type:"float"}],r=new Bt(n,t);var s=F(t.get("data"),st(bb,e,a,t));a&&(s=Et(s,st(Ab,a)));var l=a?function(u,v,c,h){var f=u.coord[Math.floor(h/2)][h%2];return Ca(f,n[h])}:function(u,v,c,h){return Ca(u.value,n[h])};return r.initData(s,null,l),r.hasItemOption=!0,r}const Db=Tb;function Cb(a){a.registerComponentModel(wb),a.registerComponentView(Db),a.registerPreprocessor(function(e){Fo(e.series,"markArea")&&(e.markArea=e.markArea||{})})}var Mb={get:function(a,e,t){var r=lt((Lb[a]||{})[e]);return t&&W(r)?r[r.length-1]:r}},Lb={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}};const Mh=Mb;var Bu=wt.mapVisual,Pb=wt.eachVisual,Vb=W,Fu=D,Eb=je,Rb=xt,kb=function(a){z(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.stateList=["inRange","outOfRange"],t.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],t.layoutMode={type:"box",ignoreSize:!0},t.dataBound=[-1/0,1/0],t.targetVisuals={},t.controllerVisuals={},t}return e.prototype.init=function(t,r,n){this.mergeDefaultAndTheme(t,n)},e.prototype.optionUpdated=function(t,r){var n=this.option;!r&&bh(n,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},e.prototype.resetVisual=function(t){var r=this.stateList;t=q(t,this),this.controllerVisuals=Yi(this.option.controller,r,t),this.targetVisuals=Yi(this.option.target,r,t)},e.prototype.getItemSymbol=function(){return null},e.prototype.getTargetSeriesIndices=function(){var t=this.option.seriesIndex,r=[];return t==null||t==="all"?this.ecModel.eachSeries(function(n,i){r.push(i)}):r=Lt(t),r},e.prototype.eachTargetSeries=function(t,r){D(this.getTargetSeriesIndices(),function(n){var i=this.ecModel.getSeriesByIndex(n);i&&t.call(r,i)},this)},e.prototype.isTargetSeries=function(t){var r=!1;return this.eachTargetSeries(function(n){n===t&&(r=!0)}),r},e.prototype.formatValueText=function(t,r,n){var i=this.option,o=i.precision,s=this.dataBound,l=i.formatter,u;n=n||["<",">"],W(t)&&(t=t.slice(),u=!0);var v=r?t:u?[c(t[0]),c(t[1])]:c(t);if(tt(l))return l.replace("{value}",u?v[0]:v).replace("{value2}",u?v[1]:v);if(ot(l))return u?l(t[0],t[1]):l(t);if(u)return t[0]===s[0]?n[0]+" "+v[1]:t[1]===s[1]?n[1]+" "+v[0]:v[0]+" - "+v[1];return v;function c(h){return h===s[0]?"min":h===s[1]?"max":(+h).toFixed(Math.min(o,20))}},e.prototype.resetExtent=function(){var t=this.option,r=Eb([t.min,t.max]);this._dataExtent=r},e.prototype.getDataDimensionIndex=function(t){var r=this.option.dimension;if(r!=null)return t.getDimensionIndex(r);for(var n=t.dimensions,i=n.length-1;i>=0;i--){var o=n[i],s=t.getDimensionInfo(o);if(!s.isCalculationCoord)return s.storeDimIndex}},e.prototype.getExtent=function(){return this._dataExtent.slice()},e.prototype.completeVisualOption=function(){var t=this.ecModel,r=this.option,n={inRange:r.inRange,outOfRange:r.outOfRange},i=r.target||(r.target={}),o=r.controller||(r.controller={});$t(i,n),$t(o,n);var s=this.isCategory();l.call(this,i),l.call(this,o),u.call(this,i,"inRange","outOfRange"),v.call(this,o);function l(c){Vb(r.color)&&!c.inRange&&(c.inRange={color:r.color.slice().reverse()}),c.inRange=c.inRange||{color:t.get("gradientColor")}}function u(c,h,f){var p=c[h],d=c[f];p&&!d&&(d=c[f]={},Fu(p,function(g,y){if(!!wt.isValidType(y)){var m=Mh.get(y,"inactive",s);m!=null&&(d[y]=m,y==="color"&&!d.hasOwnProperty("opacity")&&!d.hasOwnProperty("colorAlpha")&&(d.opacity=[0,0]))}}))}function v(c){var h=(c.inRange||{}).symbol||(c.outOfRange||{}).symbol,f=(c.inRange||{}).symbolSize||(c.outOfRange||{}).symbolSize,p=this.get("inactiveColor"),d=this.getItemSymbol(),g=d||"roundRect";Fu(this.stateList,function(y){var m=this.itemSize,S=c[y];S||(S=c[y]={color:s?p:[p]}),S.symbol==null&&(S.symbol=h&<(h)||(s?g:[g])),S.symbolSize==null&&(S.symbolSize=f&<(f)||(s?m[0]:[m[0],m[0]])),S.symbol=Bu(S.symbol,function(_){return _==="none"?g:_});var x=S.symbolSize;if(x!=null){var w=-1/0;Pb(x,function(_){_>w&&(w=_)}),S.symbolSize=Bu(x,function(_){return Rb(_,[0,w],[0,m[0]],!0)})}},this)}},e.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},e.prototype.isCategory=function(){return!!this.option.categories},e.prototype.setSelected=function(t){},e.prototype.getSelected=function(){return null},e.prototype.getValueState=function(t){return null},e.prototype.getVisualMeta=function(t){return null},e.type="visualMap",e.dependencies=["series"],e.defaultOption={show:!0,z:4,seriesIndex:"all",min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,textStyle:{color:"#333"}},e}(Nt);const Wa=kb;var Hu=[20,140],Nb=function(a){z(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(t,r){a.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(n){n.mappingMethod="linear",n.dataExtent=this.getExtent()}),this._resetRange()},e.prototype.resetItemSize=function(){a.prototype.resetItemSize.apply(this,arguments);var t=this.itemSize;(t[0]==null||isNaN(t[0]))&&(t[0]=Hu[0]),(t[1]==null||isNaN(t[1]))&&(t[1]=Hu[1])},e.prototype._resetRange=function(){var t=this.getExtent(),r=this.option.range;!r||r.auto?(t.auto=1,this.option.range=t):W(r)&&(r[0]>r[1]&&r.reverse(),r[0]=Math.max(r[0],t[0]),r[1]=Math.min(r[1],t[1]))},e.prototype.completeVisualOption=function(){a.prototype.completeVisualOption.apply(this,arguments),D(this.stateList,function(t){var r=this.option.controller[t].symbolSize;r&&r[0]!==r[1]&&(r[0]=r[1]/3)},this)},e.prototype.setSelected=function(t){this.option.range=t.slice(),this._resetRange()},e.prototype.getSelected=function(){var t=this.getExtent(),r=je((this.get("range")||[]).slice());return r[0]>t[1]&&(r[0]=t[1]),r[1]>t[1]&&(r[1]=t[1]),r[0]<t[0]&&(r[0]=t[0]),r[1]<t[0]&&(r[1]=t[0]),r},e.prototype.getValueState=function(t){var r=this.option.range,n=this.getExtent();return(r[0]<=n[0]||r[0]<=t)&&(r[1]>=n[1]||t<=r[1])?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var r=[];return this.eachTargetSeries(function(n){var i=[],o=n.getData();o.each(this.getDataDimensionIndex(o),function(s,l){t[0]<=s&&s<=t[1]&&i.push(l)},this),r.push({seriesId:n.id,dataIndex:i})},this),r},e.prototype.getVisualMeta=function(t){var r=Wu(this,"outOfRange",this.getExtent()),n=Wu(this,"inRange",this.option.range.slice()),i=[];function o(f,p){i.push({value:f,color:t(f,p)})}for(var s=0,l=0,u=n.length,v=r.length;l<v&&(!n.length||r[l]<=n[0]);l++)r[l]<n[s]&&o(r[l],"outOfRange");for(var c=1;s<u;s++,c=0)c&&i.length&&o(n[s],"outOfRange"),o(n[s],"inRange");for(var c=1;l<v;l++)(!n.length||n[n.length-1]<r[l])&&(c&&(i.length&&o(i[i.length-1].value,"outOfRange"),c=0),o(r[l],"outOfRange"));var h=i.length;return{stops:i,outerColors:[h?i[0].color:"transparent",h?i[h-1].color:"transparent"]}},e.type="visualMap.continuous",e.defaultOption=un(Wa.defaultOption,{align:"auto",calculable:!1,hoverLink:!0,realtime:!0,handleIcon:"path://M-11.39,9.77h0a3.5,3.5,0,0,1-3.5,3.5h-22a3.5,3.5,0,0,1-3.5-3.5h0a3.5,3.5,0,0,1,3.5-3.5h22A3.5,3.5,0,0,1-11.39,9.77Z",handleSize:"120%",handleStyle:{borderColor:"#fff",borderWidth:1},indicatorIcon:"circle",indicatorSize:"50%",indicatorStyle:{borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}}),e}(Wa);function Wu(a,e,t){if(t[0]===t[1])return t.slice();for(var r=200,n=(t[1]-t[0])/r,i=t[0],o=[],s=0;s<=r&&i<t[1];s++)o.push(i),i+=n;return o.push(t[1]),o}const zb=Nb;var Gb=function(a){z(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.autoPositionValues={left:1,right:1,top:1,bottom:1},t}return e.prototype.init=function(t,r){this.ecModel=t,this.api=r},e.prototype.render=function(t,r,n,i){if(this.visualMapModel=t,t.get("show")===!1){this.group.removeAll();return}this.doRender(t,r,n,i)},e.prototype.renderBackground=function(t){var r=this.visualMapModel,n=Pp(r.get("padding")||0),i=t.getBoundingRect();t.add(new Tt({z2:-1,silent:!0,shape:{x:i.x-n[3],y:i.y-n[0],width:i.width+n[3]+n[1],height:i.height+n[0]+n[2]},style:{fill:r.get("backgroundColor"),stroke:r.get("borderColor"),lineWidth:r.get("borderWidth")}}))},e.prototype.getControllerVisual=function(t,r,n){n=n||{};var i=n.forceState,o=this.visualMapModel,s={};if(r==="color"){var l=o.get("contentColor");s.color=l}function u(f){return s[f]}function v(f,p){s[f]=p}var c=o.controllerVisuals[i||o.getValueState(t)],h=wt.prepareVisualTypes(c);return D(h,function(f){var p=c[f];n.convertOpacityToAlpha&&f==="opacity"&&(f="colorAlpha",p=c.__alphaForOpacity),wt.dependsOn(f,r)&&p&&p.applyVisual(t,u,v)}),s[r]},e.prototype.positionGroup=function(t){var r=this.visualMapModel,n=this.api;ro(t,r.getBoxLayoutParams(),{width:n.getWidth(),height:n.getHeight()})},e.prototype.doRender=function(t,r,n,i){},e.type="visualMap",e}(Yt);const Lh=Gb;var $u=[["left","right","width"],["top","bottom","height"]];function Ph(a,e,t){var r=a.option,n=r.align;if(n!=null&&n!=="auto")return n;for(var i={width:e.getWidth(),height:e.getHeight()},o=r.orient==="horizontal"?1:0,s=$u[o],l=[0,null,10],u={},v=0;v<3;v++)u[$u[1-o][v]]=l[v],u[s[v]]=v===2?t[0]:r[s[v]];var c=[["x","width",3],["y","height",0]][o],h=ne(u,i,r.padding);return s[(h.margin[c[2]]||0)+h[c[0]]+h[c[1]]*.5<i[c[1]]*.5?0:1]}function ba(a,e){return D(a||[],function(t){t.dataIndex!=null&&(t.dataIndexInside=t.dataIndex,t.dataIndex=null),t.highlightKey="visualMap"+(e?e.componentIndex:"")}),a}var ue=xt,Ob=D,Uu=Math.min,gi=Math.max,Bb=12,Fb=6,Hb=function(a){z(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t._shapes={},t._dataInterval=[],t._handleEnds=[],t._hoverLinkDataIndices=[],t}return e.prototype.doRender=function(t,r,n,i){this._api=n,(!i||i.type!=="selectDataRange"||i.from!==this.uid)&&this._buildView()},e.prototype._buildView=function(){this.group.removeAll();var t=this.visualMapModel,r=this.group;this._orient=t.get("orient"),this._useHandle=t.get("calculable"),this._resetInterval(),this._renderBar(r);var n=t.get("text");this._renderEndsText(r,n,0),this._renderEndsText(r,n,1),this._updateView(!0),this.renderBackground(r),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(r)},e.prototype._renderEndsText=function(t,r,n){if(!!r){var i=r[1-n];i=i!=null?i+"":"";var o=this.visualMapModel,s=o.get("textGap"),l=o.itemSize,u=this._shapes.mainGroup,v=this._applyTransform([l[0]/2,n===0?-s:l[1]+s],u),c=this._applyTransform(n===0?"bottom":"top",u),h=this._orient,f=this.visualMapModel.textStyleModel;this.group.add(new pt({style:{x:v[0],y:v[1],verticalAlign:h==="horizontal"?"middle":c,align:h==="horizontal"?c:"center",text:i,font:f.getFont(),fill:f.getTextColor()}}))}},e.prototype._renderBar=function(t){var r=this.visualMapModel,n=this._shapes,i=r.itemSize,o=this._orient,s=this._useHandle,l=Ph(r,this.api,i),u=n.mainGroup=this._createBarGroup(l),v=new Z;u.add(v),v.add(n.outOfRange=Yu()),v.add(n.inRange=Yu(null,s?Zu(this._orient):null,q(this._dragHandle,this,"all",!1),q(this._dragHandle,this,"all",!0))),v.setClipPath(new Tt({shape:{x:0,y:0,width:i[0],height:i[1],r:3}}));var c=r.textStyleModel.getTextRect("\u56FD"),h=gi(c.width,c.height);s&&(n.handleThumbs=[],n.handleLabels=[],n.handleLabelPoints=[],this._createHandle(r,u,0,i,h,o),this._createHandle(r,u,1,i,h,o)),this._createIndicator(r,u,i,h,o),t.add(u)},e.prototype._createHandle=function(t,r,n,i,o,s){var l=q(this._dragHandle,this,n,!1),u=q(this._dragHandle,this,n,!0),v=Ci(t.get("handleSize"),i[0]),c=jt(t.get("handleIcon"),-v/2,-v/2,v,v,null,!0),h=Zu(this._orient);c.attr({cursor:h,draggable:!0,drift:l,ondragend:u,onmousemove:function(y){Mi(y.event)}}),c.x=i[0]/2,c.useStyle(t.getModel("handleStyle").getItemStyle()),c.setStyle({strokeNoScale:!0,strokeFirst:!0}),c.style.lineWidth*=2,c.ensureState("emphasis").style=t.getModel(["emphasis","handleStyle"]).getItemStyle(),Dr(c,!0),r.add(c);var f=this.visualMapModel.textStyleModel,p=new pt({cursor:h,draggable:!0,drift:l,onmousemove:function(y){Mi(y.event)},ondragend:u,style:{x:0,y:0,text:"",font:f.getFont(),fill:f.getTextColor()}});p.ensureState("blur").style={opacity:.1},p.stateTransition={duration:200},this.group.add(p);var d=[v,0],g=this._shapes;g.handleThumbs[n]=c,g.handleLabelPoints[n]=d,g.handleLabels[n]=p},e.prototype._createIndicator=function(t,r,n,i,o){var s=Ci(t.get("indicatorSize"),n[0]),l=jt(t.get("indicatorIcon"),-s/2,-s/2,s,s,null,!0);l.attr({cursor:"move",invisible:!0,silent:!0,x:n[0]/2});var u=t.getModel("indicatorStyle").getItemStyle();if(l instanceof fe){var v=l.style;l.useStyle($({image:v.image,x:v.x,y:v.y,width:v.width,height:v.height},u))}else l.useStyle(u);r.add(l);var c=this.visualMapModel.textStyleModel,h=new pt({silent:!0,invisible:!0,style:{x:0,y:0,text:"",font:c.getFont(),fill:c.getTextColor()}});this.group.add(h);var f=[(o==="horizontal"?i/2:Fb)+n[0]/2,0],p=this._shapes;p.indicator=l,p.indicatorLabel=h,p.indicatorLabelPoint=f,this._firstShowIndicator=!0},e.prototype._dragHandle=function(t,r,n,i){if(!!this._useHandle){if(this._dragging=!r,!r){var o=this._applyTransform([n,i],this._shapes.mainGroup,!0);this._updateInterval(t,o[1]),this._hideIndicator(),this._updateView()}r===!this.visualMapModel.get("realtime")&&this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),r?!this._hovering&&this._clearHoverLinkToSeries():Xu(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[t],!1)}},e.prototype._resetInterval=function(){var t=this.visualMapModel,r=this._dataInterval=t.getSelected(),n=t.getExtent(),i=[0,t.itemSize[1]];this._handleEnds=[ue(r[0],n,i,!0),ue(r[1],n,i,!0)]},e.prototype._updateInterval=function(t,r){r=r||0;var n=this.visualMapModel,i=this._handleEnds,o=[0,n.itemSize[1]];Rv(r,i,o,t,0);var s=n.getExtent();this._dataInterval=[ue(i[0],o,s,!0),ue(i[1],o,s,!0)]},e.prototype._updateView=function(t){var r=this.visualMapModel,n=r.getExtent(),i=this._shapes,o=[0,r.itemSize[1]],s=t?o:this._handleEnds,l=this._createBarVisual(this._dataInterval,n,s,"inRange"),u=this._createBarVisual(n,n,o,"outOfRange");i.inRange.setStyle({fill:l.barColor}).setShape("points",l.barPoints),i.outOfRange.setStyle({fill:u.barColor}).setShape("points",u.barPoints),this._updateHandle(s,l)},e.prototype._createBarVisual=function(t,r,n,i){var o={forceState:i,convertOpacityToAlpha:!0},s=this._makeColorGradient(t,o),l=[this.getControllerVisual(t[0],"symbolSize",o),this.getControllerVisual(t[1],"symbolSize",o)],u=this._createBarPoints(n,l);return{barColor:new ji(0,0,0,1,s),barPoints:u,handlesColor:[s[0].color,s[s.length-1].color]}},e.prototype._makeColorGradient=function(t,r){var n=100,i=[],o=(t[1]-t[0])/n;i.push({color:this.getControllerVisual(t[0],"color",r),offset:0});for(var s=1;s<n;s++){var l=t[0]+o*s;if(l>t[1])break;i.push({color:this.getControllerVisual(l,"color",r),offset:s/n})}return i.push({color:this.getControllerVisual(t[1],"color",r),offset:1}),i},e.prototype._createBarPoints=function(t,r){var n=this.visualMapModel.itemSize;return[[n[0]-r[0],t[0]],[n[0],t[0]],[n[0],t[1]],[n[0]-r[1],t[1]]]},e.prototype._createBarGroup=function(t){var r=this._orient,n=this.visualMapModel.get("inverse");return new Z(r==="horizontal"&&!n?{scaleX:t==="bottom"?1:-1,rotation:Math.PI/2}:r==="horizontal"&&n?{scaleX:t==="bottom"?-1:1,rotation:-Math.PI/2}:r==="vertical"&&!n?{scaleX:t==="left"?1:-1,scaleY:-1}:{scaleX:t==="left"?1:-1})},e.prototype._updateHandle=function(t,r){if(!!this._useHandle){var n=this._shapes,i=this.visualMapModel,o=n.handleThumbs,s=n.handleLabels,l=i.itemSize,u=i.getExtent();Ob([0,1],function(v){var c=o[v];c.setStyle("fill",r.handlesColor[v]),c.y=t[v];var h=ue(t[v],[0,l[1]],u,!0),f=this.getControllerVisual(h,"symbolSize");c.scaleX=c.scaleY=f/l[0],c.x=l[0]-f/2;var p=ur(n.handleLabelPoints[v],wn(c,this.group));s[v].setStyle({x:p[0],y:p[1],text:i.formatValueText(this._dataInterval[v]),verticalAlign:"middle",align:this._orient==="vertical"?this._applyTransform("left",n.mainGroup):"center"})},this)}},e.prototype._showIndicator=function(t,r,n,i){var o=this.visualMapModel,s=o.getExtent(),l=o.itemSize,u=[0,l[1]],v=this._shapes,c=v.indicator;if(!!c){c.attr("invisible",!1);var h={convertOpacityToAlpha:!0},f=this.getControllerVisual(t,"color",h),p=this.getControllerVisual(t,"symbolSize"),d=ue(t,s,u,!0),g=l[0]-p/2,y={x:c.x,y:c.y};c.y=d,c.x=g;var m=ur(v.indicatorLabelPoint,wn(c,this.group)),S=v.indicatorLabel;S.attr("invisible",!1);var x=this._applyTransform("left",v.mainGroup),w=this._orient,_=w==="horizontal";S.setStyle({text:(n||"")+o.formatValueText(r),verticalAlign:_?x:"middle",align:_?"center":x});var b={x:g,y:d,style:{fill:f}},A={style:{x:m[0],y:m[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var T={duration:100,easing:"cubicInOut",additive:!0};c.x=y.x,c.y=y.y,c.animateTo(b,T),S.animateTo(A,T)}else c.attr(b),S.attr(A);this._firstShowIndicator=!1;var I=this._shapes.handleLabels;if(I)for(var C=0;C<I.length;C++)this._api.enterBlur(I[C])}},e.prototype._enableHoverLinkToSeries=function(){var t=this;this._shapes.mainGroup.on("mousemove",function(r){if(t._hovering=!0,!t._dragging){var n=t.visualMapModel.itemSize,i=t._applyTransform([r.offsetX,r.offsetY],t._shapes.mainGroup,!0,!0);i[1]=Uu(gi(0,i[1]),n[1]),t._doHoverLinkToSeries(i[1],0<=i[0]&&i[0]<=n[0])}}).on("mouseout",function(){t._hovering=!1,!t._dragging&&t._clearHoverLinkToSeries()})},e.prototype._enableHoverLinkFromSeries=function(){var t=this.api.getZr();this.visualMapModel.option.hoverLink?(t.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),t.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},e.prototype._doHoverLinkToSeries=function(t,r){var n=this.visualMapModel,i=n.itemSize;if(!!n.option.hoverLink){var o=[0,i[1]],s=n.getExtent();t=Uu(gi(o[0],t),o[1]);var l=Wb(n,s,o),u=[t-l,t+l],v=ue(t,o,s,!0),c=[ue(u[0],o,s,!0),ue(u[1],o,s,!0)];u[0]<o[0]&&(c[0]=-1/0),u[1]>o[1]&&(c[1]=1/0),r&&(c[0]===-1/0?this._showIndicator(v,c[1],"< ",l):c[1]===1/0?this._showIndicator(v,c[0],"> ",l):this._showIndicator(v,v,"\u2248 ",l));var h=this._hoverLinkDataIndices,f=[];(r||Xu(n))&&(f=this._hoverLinkDataIndices=n.findTargetDataIndices(c));var p=Vp(h,f);this._dispatchHighDown("downplay",ba(p[0],n)),this._dispatchHighDown("highlight",ba(p[1],n))}},e.prototype._hoverLinkFromSeriesMouseOver=function(t){var r=t.target,n=this.visualMapModel;if(!(!r||it(r).dataIndex==null)){var i=it(r),o=this.ecModel.getSeriesByIndex(i.seriesIndex);if(!!n.isTargetSeries(o)){var s=o.getData(i.dataType),l=s.getStore().get(n.getDataDimensionIndex(s),i.dataIndex);isNaN(l)||this._showIndicator(l,l)}}},e.prototype._hideIndicator=function(){var t=this._shapes;t.indicator&&t.indicator.attr("invisible",!0),t.indicatorLabel&&t.indicatorLabel.attr("invisible",!0);var r=this._shapes.handleLabels;if(r)for(var n=0;n<r.length;n++)this._api.leaveBlur(r[n])},e.prototype._clearHoverLinkToSeries=function(){this._hideIndicator();var t=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",ba(t,this.visualMapModel)),t.length=0},e.prototype._clearHoverLinkFromSeries=function(){this._hideIndicator();var t=this.api.getZr();t.off("mouseover",this._hoverLinkFromSeriesMouseOver),t.off("mouseout",this._hideIndicator)},e.prototype._applyTransform=function(t,r,n,i){var o=wn(r,i?null:this.group);return W(t)?ur(t,o,n):Ep(t,o,n)},e.prototype._dispatchHighDown=function(t,r){r&&r.length&&this.api.dispatchAction({type:t,batch:r})},e.prototype.dispose=function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},e.prototype.remove=function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},e.type="visualMap.continuous",e}(Lh);function Yu(a,e,t,r){return new he({shape:{points:a},draggable:!!t,cursor:e,drift:t,onmousemove:function(n){Mi(n.event)},ondragend:r})}function Wb(a,e,t){var r=Bb/2,n=a.get("hoverLinkDataSize");return n&&(r=ue(n,e,t,!0)/2),r}function Xu(a){var e=a.get("hoverLinkOnHandle");return!!(e==null?a.get("realtime"):e)}function Zu(a){return a==="vertical"?"ns-resize":"ew-resize"}const $b=Hb;var Ub={type:"selectDataRange",event:"dataRangeSelected",update:"update"},Yb=function(a,e){e.eachComponent({mainType:"visualMap",query:a},function(t){t.setSelected(a.selected)})},Xb=[{createOnAllSeries:!0,reset:function(a,e){var t=[];return e.eachComponent("visualMap",function(r){var n=a.pipelineContext;!r.isTargetSeries(a)||n&&n.large||t.push(Iw(r.stateList,r.targetVisuals,q(r.getValueState,r),r.getDataDimensionIndex(a.getData())))}),t}},{createOnAllSeries:!0,reset:function(a,e){var t=a.getData(),r=[];e.eachComponent("visualMap",function(n){if(n.isTargetSeries(a)){var i=n.getVisualMeta(q(Zb,null,a,n))||{stops:[],outerColors:[]},o=n.getDataDimensionIndex(t);o>=0&&(i.dimension=o,r.push(i))}}),a.getData().setVisual("visualMeta",r)}}];function Zb(a,e,t,r){for(var n=e.targetVisuals[r],i=wt.prepareVisualTypes(n),o={color:vn(a.getData(),"color")},s=0,l=i.length;s<l;s++){var u=i[s],v=n[u==="opacity"?"__alphaForOpacity":u];v&&v.applyVisual(t,c,h)}return o.color;function c(f){return o[f]}function h(f,p){o[f]=p}}var qu=D;function qb(a){var e=a&&a.visualMap;W(e)||(e=e?[e]:[]),qu(e,function(t){if(!!t){ar(t,"splitList")&&!ar(t,"pieces")&&(t.pieces=t.splitList,delete t.splitList);var r=t.pieces;r&&W(r)&&qu(r,function(n){Rt(n)&&(ar(n,"start")&&!ar(n,"min")&&(n.min=n.start),ar(n,"end")&&!ar(n,"max")&&(n.max=n.end))})}})}function ar(a,e){return a&&a.hasOwnProperty&&a.hasOwnProperty(e)}var Ku=!1;function Vh(a){Ku||(Ku=!0,a.registerSubTypeDefaulter("visualMap",function(e){return!e.categories&&(!(e.pieces?e.pieces.length>0:e.splitNumber>0)||e.calculable)?"continuous":"piecewise"}),a.registerAction(Ub,Yb),D(Xb,function(e){a.registerVisual(a.PRIORITY.VISUAL.COMPONENT,e)}),a.registerPreprocessor(qb))}function Eh(a){a.registerComponentModel(zb),a.registerComponentView($b),Vh(a)}var Kb=function(a){z(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t._pieceList=[],t}return e.prototype.optionUpdated=function(t,r){a.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var n=this._mode=this._determineMode();this._pieceList=[],jb[this._mode].call(this,this._pieceList),this._resetSelected(t,r);var i=this.option.categories;this.resetVisual(function(o,s){n==="categories"?(o.mappingMethod="category",o.categories=lt(i)):(o.dataExtent=this.getExtent(),o.mappingMethod="piecewise",o.pieceList=F(this._pieceList,function(l){return l=lt(l),s!=="inRange"&&(l.visual=null),l}))})},e.prototype.completeVisualOption=function(){var t=this.option,r={},n=wt.listVisualTypes(),i=this.isCategory();D(t.pieces,function(s){D(n,function(l){s.hasOwnProperty(l)&&(r[l]=1)})}),D(r,function(s,l){var u=!1;D(this.stateList,function(v){u=u||o(t,v,l)||o(t.target,v,l)},this),!u&&D(this.stateList,function(v){(t[v]||(t[v]={}))[l]=Mh.get(l,v==="inRange"?"active":"inactive",i)})},this);function o(s,l,u){return s&&s[l]&&s[l].hasOwnProperty(u)}a.prototype.completeVisualOption.apply(this,arguments)},e.prototype._resetSelected=function(t,r){var n=this.option,i=this._pieceList,o=(r?n:t).selected||{};if(n.selected=o,D(i,function(l,u){var v=this.getSelectedMapKey(l);o.hasOwnProperty(v)||(o[v]=!0)},this),n.selectedMode==="single"){var s=!1;D(i,function(l,u){var v=this.getSelectedMapKey(l);o[v]&&(s?o[v]=!1:s=!0)},this)}},e.prototype.getItemSymbol=function(){return this.get("itemSymbol")},e.prototype.getSelectedMapKey=function(t){return this._mode==="categories"?t.value+"":t.index+""},e.prototype.getPieceList=function(){return this._pieceList},e.prototype._determineMode=function(){var t=this.option;return t.pieces&&t.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},e.prototype.setSelected=function(t){this.option.selected=lt(t)},e.prototype.getValueState=function(t){var r=wt.findPieceIndex(t,this._pieceList);return r!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[r])]?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var r=[],n=this._pieceList;return this.eachTargetSeries(function(i){var o=[],s=i.getData();s.each(this.getDataDimensionIndex(s),function(l,u){var v=wt.findPieceIndex(l,n);v===t&&o.push(u)},this),r.push({seriesId:i.id,dataIndex:o})},this),r},e.prototype.getRepresentValue=function(t){var r;if(this.isCategory())r=t.value;else if(t.value!=null)r=t.value;else{var n=t.interval||[];r=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return r},e.prototype.getVisualMeta=function(t){if(this.isCategory())return;var r=[],n=["",""],i=this;function o(v,c){var h=i.getRepresentValue({interval:v});c||(c=i.getValueState(h));var f=t(h,c);v[0]===-1/0?n[0]=f:v[1]===1/0?n[1]=f:r.push({value:v[0],color:f},{value:v[1],color:f})}var s=this._pieceList.slice();if(!s.length)s.push({interval:[-1/0,1/0]});else{var l=s[0].interval[0];l!==-1/0&&s.unshift({interval:[-1/0,l]}),l=s[s.length-1].interval[1],l!==1/0&&s.push({interval:[l,1/0]})}var u=-1/0;return D(s,function(v){var c=v.interval;c&&(c[0]>u&&o([u,c[0]],"outOfRange"),o(c.slice()),u=c[1])},this),{stops:r,outerColors:n}},e.type="visualMap.piecewise",e.defaultOption=un(Wa.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),e}(Wa),jb={splitNumber:function(a){var e=this.option,t=Math.min(e.precision,20),r=this.getExtent(),n=e.splitNumber;n=Math.max(parseInt(n,10),1),e.splitNumber=n;for(var i=(r[1]-r[0])/n;+i.toFixed(t)!==i&&t<5;)t++;e.precision=t,i=+i.toFixed(t),e.minOpen&&a.push({interval:[-1/0,r[0]],close:[0,0]});for(var o=0,s=r[0];o<n;s+=i,o++){var l=o===n-1?r[1]:s+i;a.push({interval:[s,l],close:[1,1]})}e.maxOpen&&a.push({interval:[r[1],1/0],close:[0,0]}),hs(a),D(a,function(u,v){u.index=v,u.text=this.formatValueText(u.interval)},this)},categories:function(a){var e=this.option;D(e.categories,function(t){a.push({text:this.formatValueText(t,!0),value:t})},this),ju(e,a)},pieces:function(a){var e=this.option;D(e.pieces,function(t,r){Rt(t)||(t={value:t});var n={text:"",index:r};if(t.label!=null&&(n.text=t.label),t.hasOwnProperty("value")){var i=n.value=t.value;n.interval=[i,i],n.close=[1,1]}else{for(var o=n.interval=[],s=n.close=[0,0],l=[1,0,1],u=[-1/0,1/0],v=[],c=0;c<2;c++){for(var h=[["gte","gt","min"],["lte","lt","max"]][c],f=0;f<3&&o[c]==null;f++)o[c]=t[h[f]],s[c]=l[f],v[c]=f===2;o[c]==null&&(o[c]=u[c])}v[0]&&o[1]===1/0&&(s[0]=0),v[1]&&o[0]===-1/0&&(s[1]=0),o[0]===o[1]&&s[0]&&s[1]&&(n.value=o[0])}n.visual=wt.retrieveVisuals(t),a.push(n)},this),ju(e,a),hs(a),D(a,function(t){var r=t.close,n=[["<","\u2264"][r[1]],[">","\u2265"][r[0]]];t.text=t.text||this.formatValueText(t.value!=null?t.value:t.interval,!1,n)},this)}};function ju(a,e){var t=a.inverse;(a.orient==="vertical"?!t:t)&&e.reverse()}const Jb=Kb;var Qb=function(a){z(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.doRender=function(){var t=this.group;t.removeAll();var r=this.visualMapModel,n=r.get("textGap"),i=r.textStyleModel,o=i.getFont(),s=i.getTextColor(),l=this._getItemAlign(),u=r.itemSize,v=this._getViewData(),c=v.endsText,h=Ot(r.get("showLabel",!0),!c);c&&this._renderEndsText(t,c[0],u,h,l),D(v.viewPieceList,function(f){var p=f.piece,d=new Z;d.onclick=q(this._onItemClick,this,p),this._enableHoverLink(d,f.indexInModelPieceList);var g=r.getRepresentValue(p);if(this._createItemSymbol(d,g,[0,0,u[0],u[1]]),h){var y=this.visualMapModel.getValueState(g);d.add(new pt({style:{x:l==="right"?-n:u[0]+n,y:u[1]/2,text:p.text,verticalAlign:"middle",align:l,font:o,fill:s,opacity:y==="outOfRange"?.5:1}}))}t.add(d)},this),c&&this._renderEndsText(t,c[1],u,h,l),Rp(r.get("orient"),t,r.get("itemGap")),this.renderBackground(t),this.positionGroup(t)},e.prototype._enableHoverLink=function(t,r){var n=this;t.on("mouseover",function(){return i("highlight")}).on("mouseout",function(){return i("downplay")});var i=function(o){var s=n.visualMapModel;s.option.hoverLink&&n.api.dispatchAction({type:o,batch:ba(s.findTargetDataIndices(r),s)})}},e.prototype._getItemAlign=function(){var t=this.visualMapModel,r=t.option;if(r.orient==="vertical")return Ph(t,this.api,t.itemSize);var n=r.align;return(!n||n==="auto")&&(n="left"),n},e.prototype._renderEndsText=function(t,r,n,i,o){if(!!r){var s=new Z,l=this.visualMapModel.textStyleModel;s.add(new pt({style:{x:i?o==="right"?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:"middle",align:i?o:"center",text:r,font:l.getFont(),fill:l.getTextColor()}})),t.add(s)}},e.prototype._getViewData=function(){var t=this.visualMapModel,r=F(t.getPieceList(),function(s,l){return{piece:s,indexInModelPieceList:l}}),n=t.get("text"),i=t.get("orient"),o=t.get("inverse");return(i==="horizontal"?o:!o)?r.reverse():n&&(n=n.slice().reverse()),{viewPieceList:r,endsText:n}},e.prototype._createItemSymbol=function(t,r,n){t.add(jt(this.getControllerVisual(r,"symbol"),n[0],n[1],n[2],n[3],this.getControllerVisual(r,"color")))},e.prototype._onItemClick=function(t){var r=this.visualMapModel,n=r.option,i=lt(n.selected),o=r.getSelectedMapKey(t);n.selectedMode==="single"?(i[o]=!0,D(i,function(s,l){i[l]=l===o})):i[o]=!i[o],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:i})},e.type="visualMap.piecewise",e}(Lh);const tA=Qb;function Rh(a){a.registerComponentModel(Jb),a.registerComponentView(tA),Vh(a)}function eA(a){K(Eh),K(Rh)}var rA={label:{enabled:!0},decal:{show:!1}},Ju=Dt(),aA={};function nA(a,e){var t=a.getModel("aria");if(!t.get("enabled"))return;var r=lt(rA);$t(r.label,a.getLocaleModel().get("aria"),!1),$t(t.option,r,!1),n(),i();function n(){var u=t.getModel("decal"),v=u.get("show");if(v){var c=nt();a.eachSeries(function(h){if(!h.isColorBySeries()){var f=c.get(h.type);f||(f={},c.set(h.type,f)),Ju(h).scope=f}}),a.eachRawSeries(function(h){if(a.isSeriesFiltered(h))return;if(ot(h.enableAriaDecal)){h.enableAriaDecal();return}var f=h.getData();if(h.isColorBySeries()){var m=wi(h.ecModel,h.name,aA,a.getSeriesCount()),S=f.getVisual("decal");f.setVisual("decal",x(S,m))}else{var p=h.getRawData(),d={},g=Ju(h).scope;f.each(function(w){var _=f.getRawIndex(w);d[_]=w});var y=p.count();p.each(function(w){var _=d[w],b=p.getName(w)||w+"",A=wi(h.ecModel,b,g,y),T=f.getItemVisual(_,"decal");f.setItemVisual(_,"decal",x(T,A))})}function x(w,_){var b=w?$($({},_),w):_;return b.dirty=!0,b}})}}function i(){var u=a.getLocaleModel().get("aria"),v=t.getModel("label");if(v.option=Q(v.option,u),!!v.get("enabled")){var c=e.getZr().dom;if(v.get("description")){c.setAttribute("aria-label",v.get("description"));return}var h=a.getSeriesCount(),f=v.get(["data","maxCount"])||10,p=v.get(["series","maxCount"])||10,d=Math.min(h,p),g;if(!(h<1)){var y=s();if(y){var m=v.get(["general","withTitle"]);g=o(m,{title:y})}else g=v.get(["general","withoutTitle"]);var S=[],x=h>1?v.get(["series","multiple","prefix"]):v.get(["series","single","prefix"]);g+=o(x,{seriesCount:h}),a.eachSeries(function(A,T){if(T<d){var I=void 0,C=A.get("name"),E=C?"withName":"withoutName";I=h>1?v.get(["series","multiple",E]):v.get(["series","single",E]),I=o(I,{seriesId:A.seriesIndex,seriesName:A.get("name"),seriesType:l(A.subType)});var V=A.getData();if(V.count()>f){var M=v.get(["data","partialData"]);I+=o(M,{displayCnt:f})}else I+=v.get(["data","allData"]);for(var P=v.get(["data","separator","middle"]),R=v.get(["data","separator","end"]),G=[],L=0;L<V.count();L++)if(L<f){var k=V.getName(L),N=V.getValues(L),O=v.get(["data",k?"withName":"withoutName"]);G.push(o(O,{name:k,value:N.join(P)}))}I+=G.join(P)+R,S.push(I)}});var w=v.getModel(["series","multiple","separator"]),_=w.get("middle"),b=w.get("end");g+=S.join(_)+b,c.setAttribute("aria-label",g)}}}function o(u,v){if(!tt(u))return u;var c=u;return D(v,function(h,f){c=c.replace(new RegExp("\\{\\s*"+f+"\\s*\\}","g"),h)}),c}function s(){var u=a.get("title");return u&&u.length&&(u=u[0]),u&&u.text}function l(u){return a.getLocaleModel().get(["series","typeNames"])[u]||"\u81EA\u5B9A\u4E49\u56FE"}}function iA(a){if(!(!a||!a.aria)){var e=a.aria;e.show!=null&&(e.enabled=e.show),e.label=e.label||{},D(["description","general","series","data"],function(t){e[t]!=null&&(e.label[t]=e[t])})}}function oA(a){a.registerPreprocessor(iA),a.registerVisual(a.PRIORITY.VISUAL.ARIA,nA)}var Qu={value:"eq","<":"lt","<=":"lte",">":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},sA=function(){function a(e){var t=this._condVal=tt(e)?new RegExp(e):Np(e)?e:null;if(t==null){var r="";ht(r)}}return a.prototype.evaluate=function(e){var t=typeof e;return tt(t)?this._condVal.test(e):ce(t)?this._condVal.test(e+""):!1},a}(),lA=function(){function a(){}return a.prototype.evaluate=function(){return this.value},a}(),uA=function(){function a(){}return a.prototype.evaluate=function(){for(var e=this.children,t=0;t<e.length;t++)if(!e[t].evaluate())return!1;return!0},a}(),vA=function(){function a(){}return a.prototype.evaluate=function(){for(var e=this.children,t=0;t<e.length;t++)if(e[t].evaluate())return!0;return!1},a}(),cA=function(){function a(){}return a.prototype.evaluate=function(){return!this.child.evaluate()},a}(),hA=function(){function a(){}return a.prototype.evaluate=function(){for(var e=!!this.valueParser,t=this.getValue,r=t(this.valueGetterParam),n=e?this.valueParser(r):null,i=0;i<this.subCondList.length;i++)if(!this.subCondList[i].evaluate(e?n:r))return!1;return!0},a}();function $o(a,e){if(a===!0||a===!1){var t=new lA;return t.value=a,t}var r="";return kh(a)||ht(r),a.and?tv("and",a,e):a.or?tv("or",a,e):a.not?fA(a,e):pA(a,e)}function tv(a,e,t){var r=e[a],n="";W(r)||ht(n),r.length||ht(n);var i=a==="and"?new uA:new vA;return i.children=F(r,function(o){return $o(o,t)}),i.children.length||ht(n),i}function fA(a,e){var t=a.not,r="";kh(t)||ht(r);var n=new cA;return n.child=$o(t,e),n.child||ht(r),n}function pA(a,e){for(var t="",r=e.prepareGetValue(a),n=[],i=ft(a),o=a.parser,s=o?Zv(o):null,l=0;l<i.length;l++){var u=i[l];if(!(u==="parser"||e.valueGetterAttrMap.get(u))){var v=B(Qu,u)?Qu[u]:u,c=a[u],h=s?s(c):c,f=kp(v,h)||v==="reg"&&new sA(h);f||ht(t),n.push(f)}}n.length||ht(t);var p=new hA;return p.valueGetterParam=r,p.valueParser=s,p.getValue=e.getValue,p.subCondList=n,p}function kh(a){return Rt(a)&&!Gv(a)}var dA=function(){function a(e,t){this._cond=$o(e,t)}return a.prototype.evaluate=function(){return this._cond.evaluate()},a}();function gA(a,e){return new dA(a,e)}var yA={type:"echarts:filter",transform:function(a){for(var e=a.upstream,t,r=gA(a.config,{valueGetterAttrMap:nt({dimension:!0}),prepareGetValue:function(s){var l="",u=s.dimension;B(s,"dimension")||ht(l);var v=e.getDimensionInfo(u);return v||ht(l),{dimIdx:v.index}},getValue:function(s){return e.retrieveValueFromItem(t,s.dimIdx)}}),n=[],i=0,o=e.count();i<o;i++)t=e.getRawDataItem(i),r.evaluate()&&n.push(t);return{data:n}}},mA={type:"echarts:sort",transform:function(a){var e=a.upstream,t=a.config,r="",n=Lt(t);n.length||ht(r);var i=[];D(n,function(v){var c=v.dimension,h=v.order,f=v.parser,p=v.incomparable;if(c==null&&ht(r),h!=="asc"&&h!=="desc"&&ht(r),p&&p!=="min"&&p!=="max"){var d="";ht(d)}if(h!=="asc"&&h!=="desc"){var g="";ht(g)}var y=e.getDimensionInfo(c);y||ht(r);var m=f?Zv(f):null;f&&!m&&ht(r),i.push({dimIdx:y.index,parser:m,comparator:new zp(h,p)})});var o=e.sourceFormat;o!==Nv&&o!==Gp&&ht(r);for(var s=[],l=0,u=e.count();l<u;l++)s.push(e.getRawDataItem(l));return s.sort(function(v,c){for(var h=0;h<i.length;h++){var f=i[h],p=e.retrieveValueFromItem(v,f.dimIdx),d=e.retrieveValueFromItem(c,f.dimIdx);f.parser&&(p=f.parser(p),d=f.parser(d));var g=f.comparator.evaluate(p,d);if(g!==0)return g}return 0}),{data:s}}};function SA(a){a.registerTransform(yA),a.registerTransform(mA)}var xA=function(a){z(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type="dataset",t}return e.prototype.init=function(t,r,n){a.prototype.init.call(this,t,r,n),this._sourceManager=new Op(this),fs(this)},e.prototype.mergeOption=function(t,r){a.prototype.mergeOption.call(this,t,r),fs(this)},e.prototype.optionUpdated=function(){this._sourceManager.dirty()},e.prototype.getSourceManager=function(){return this._sourceManager},e.type="dataset",e.defaultOption={seriesLayoutBy:Bp},e}(Nt),_A=function(a){z(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type="dataset",t}return e.type="dataset",e}(Yt);function wA(a){a.registerComponentModel(xA),a.registerComponentView(_A)}var se=mv.CMD;function lr(a,e){return Math.abs(a-e)<1e-5}function Zi(a){var e=a.data,t=a.len(),r=[],n,i=0,o=0,s=0,l=0;function u(V,M){n&&n.length>2&&r.push(n),n=[V,M]}function v(V,M,P,R){lr(V,P)&&lr(M,R)||n.push(V,M,P,R,P,R)}function c(V,M,P,R,G,L){var k=Math.abs(M-V),N=Math.tan(k/4)*4/3,O=M<V?-1:1,U=Math.cos(V),Y=Math.sin(V),J=Math.cos(M),gt=Math.sin(M),zt=U*G+P,j=Y*L+R,X=J*G+P,et=gt*L+R,rt=G*N*O,at=L*N*O;n.push(zt-rt*Y,j+at*U,X+rt*gt,et-at*J,X,et)}for(var h,f,p,d,g=0;g<t;){var y=e[g++],m=g===1;switch(m&&(i=e[g],o=e[g+1],s=i,l=o,(y===se.L||y===se.C||y===se.Q)&&(n=[s,l])),y){case se.M:i=s=e[g++],o=l=e[g++],u(s,l);break;case se.L:h=e[g++],f=e[g++],v(i,o,h,f),i=h,o=f;break;case se.C:n.push(e[g++],e[g++],e[g++],e[g++],i=e[g++],o=e[g++]);break;case se.Q:h=e[g++],f=e[g++],p=e[g++],d=e[g++],n.push(i+2/3*(h-i),o+2/3*(f-o),p+2/3*(h-p),d+2/3*(f-d),p,d),i=p,o=d;break;case se.A:var S=e[g++],x=e[g++],w=e[g++],_=e[g++],b=e[g++],A=e[g++]+b;g+=1;var T=!e[g++];h=Math.cos(b)*w+S,f=Math.sin(b)*_+x,m?(s=h,l=f,u(s,l)):v(i,o,h,f),i=Math.cos(A)*w+S,o=Math.sin(A)*_+x;for(var I=(T?-1:1)*Math.PI/2,C=b;T?C>A:C<A;C+=I){var E=T?Math.max(C+I,A):Math.min(C+I,A);c(C,E,S,x,w,_)}break;case se.R:s=i=e[g++],l=o=e[g++],h=s+e[g++],f=l+e[g++],u(h,l),v(h,l,h,f),v(h,f,s,f),v(s,f,s,l),v(s,l,h,l);break;case se.Z:n&&v(i,o,s,l),i=s,o=l;break}}return n&&n.length>2&&r.push(n),r}function qi(a,e,t,r,n,i,o,s,l,u){if(lr(a,t)&&lr(e,r)&&lr(n,o)&&lr(i,s)){l.push(o,s);return}var v=2/u,c=v*v,h=o-a,f=s-e,p=Math.sqrt(h*h+f*f);h/=p,f/=p;var d=t-a,g=r-e,y=n-o,m=i-s,S=d*d+g*g,x=y*y+m*m;if(S<c&&x<c){l.push(o,s);return}var w=h*d+f*g,_=-h*y-f*m,b=S-w*w,A=x-_*_;if(b<c&&w>=0&&A<c&&_>=0){l.push(o,s);return}var T=[],I=[];Ma(a,t,n,o,.5,T),Ma(e,r,i,s,.5,I),qi(T[0],I[0],T[1],I[1],T[2],I[2],T[3],I[3],l,u),qi(T[4],I[4],T[5],I[5],T[6],I[6],T[7],I[7],l,u)}function bA(a,e){var t=Zi(a),r=[];e=e||1;for(var n=0;n<t.length;n++){var i=t[n],o=[],s=i[0],l=i[1];o.push(s,l);for(var u=2;u<i.length;){var v=i[u++],c=i[u++],h=i[u++],f=i[u++],p=i[u++],d=i[u++];qi(s,l,v,c,h,f,p,d,o,e),s=p,l=d}r.push(o)}return r}function Nh(a,e,t){var r=a[e],n=a[1-e],i=Math.abs(r/n),o=Math.ceil(Math.sqrt(i*t)),s=Math.floor(t/o);s===0&&(s=1,o=t);for(var l=[],u=0;u<o;u++)l.push(s);var v=o*s,c=t-v;if(c>0)for(var u=0;u<c;u++)l[u%o]+=1;return l}function ev(a,e,t){for(var r=a.r0,n=a.r,i=a.startAngle,o=a.endAngle,s=Math.abs(o-i),l=s*n,u=n-r,v=l>Math.abs(u),c=Nh([l,u],v?0:1,e),h=(v?s:u)/c.length,f=0;f<c.length;f++)for(var p=(v?u:s)/c[f],d=0;d<c[f];d++){var g={};v?(g.startAngle=i+h*f,g.endAngle=i+h*(f+1),g.r0=r+p*d,g.r=r+p*(d+1)):(g.startAngle=i+p*d,g.endAngle=i+p*(d+1),g.r0=r+h*f,g.r=r+h*(f+1)),g.clockwise=a.clockwise,g.cx=a.cx,g.cy=a.cy,t.push(g)}}function AA(a,e,t){for(var r=a.width,n=a.height,i=r>n,o=Nh([r,n],i?0:1,e),s=i?"width":"height",l=i?"height":"width",u=i?"x":"y",v=i?"y":"x",c=a[s]/o.length,h=0;h<o.length;h++)for(var f=a[l]/o[h],p=0;p<o[h];p++){var d={};d[u]=h*c,d[v]=p*f,d[s]=c,d[l]=f,d.x+=a.x,d.y+=a.y,t.push(d)}}function rv(a,e,t,r){return a*r-t*e}function TA(a,e,t,r,n,i,o,s){var l=t-a,u=r-e,v=o-n,c=s-i,h=rv(v,c,l,u);if(Math.abs(h)<1e-6)return null;var f=a-n,p=e-i,d=rv(f,p,v,c)/h;return d<0||d>1?null:new be(d*l+a,d*u+e)}function IA(a,e,t){var r=new be;be.sub(r,t,e),r.normalize();var n=new be;be.sub(n,a,e);var i=n.dot(r);return i}function nr(a,e){var t=a[a.length-1];t&&t[0]===e[0]&&t[1]===e[1]||a.push(e)}function DA(a,e,t){for(var r=a.length,n=[],i=0;i<r;i++){var o=a[i],s=a[(i+1)%r],l=TA(o[0],o[1],s[0],s[1],e.x,e.y,t.x,t.y);l&&n.push({projPt:IA(l,e,t),pt:l,idx:i})}if(n.length<2)return[{points:a},{points:a}];n.sort(function(g,y){return g.projPt-y.projPt});var u=n[0],v=n[n.length-1];if(v.idx<u.idx){var c=u;u=v,v=c}for(var h=[u.pt.x,u.pt.y],f=[v.pt.x,v.pt.y],p=[h],d=[f],i=u.idx+1;i<=v.idx;i++)nr(p,a[i].slice());nr(p,f),nr(p,h);for(var i=v.idx+1;i<=u.idx+r;i++)nr(d,a[i%r].slice());return nr(d,h),nr(d,f),[{points:p},{points:d}]}function av(a){var e=a.points,t=[],r=[];an(e,t,r);var n=new yt(t[0],t[1],r[0]-t[0],r[1]-t[1]),i=n.width,o=n.height,s=n.x,l=n.y,u=new be,v=new be;return i>o?(u.x=v.x=s+i/2,u.y=l,v.y=l+o):(u.y=v.y=l+o/2,u.x=s,v.x=s+i),DA(e,u,v)}function $a(a,e,t,r){if(t===1)r.push(e);else{var n=Math.floor(t/2),i=a(e);$a(a,i[0],n,r),$a(a,i[1],t-n,r)}return r}function CA(a,e){for(var t=[],r=0;r<e;r++)t.push(ho(a));return t}function MA(a,e){e.setStyle(a.style),e.z=a.z,e.z2=a.z2,e.zlevel=a.zlevel}function LA(a){for(var e=[],t=0;t<a.length;)e.push([a[t++],a[t++]]);return e}function PA(a,e){var t=[],r=a.shape,n;switch(a.type){case"rect":AA(r,e,t),n=Tt;break;case"sector":ev(r,e,t),n=Ke;break;case"circle":ev({r0:0,r:r.r,startAngle:0,endAngle:Math.PI*2,cx:r.cx,cy:r.cy},e,t),n=Ke;break;default:var i=a.getComputedTransform(),o=i?Math.sqrt(Math.max(i[0]*i[0]+i[1]*i[1],i[2]*i[2]+i[3]*i[3])):1,s=F(bA(a.getUpdatedPathProxy(),o),function(y){return LA(y)}),l=s.length;if(l===0)$a(av,{points:s[0]},e,t);else if(l===e)for(var u=0;u<l;u++)t.push({points:s[u]});else{var v=0,c=F(s,function(y){var m=[],S=[];an(y,m,S);var x=(S[1]-m[1])*(S[0]-m[0]);return v+=x,{poly:y,area:x}});c.sort(function(y,m){return m.area-y.area});for(var h=e,u=0;u<l;u++){var f=c[u];if(h<=0)break;var p=u===l-1?h:Math.ceil(f.area/v*e);p<0||($a(av,{points:f.poly},p,t),h-=p)}}n=he;break}if(!n)return CA(a,e);for(var d=[],u=0;u<t.length;u++){var g=new n;g.setShape(t[u]),MA(a,g),d.push(g)}return d}function VA(a,e){var t=a.length,r=e.length;if(t===r)return[a,e];for(var n=[],i=[],o=t<r?a:e,s=Math.min(t,r),l=Math.abs(r-t)/6,u=(s-2)/6,v=Math.ceil(l/u)+1,c=[o[0],o[1]],h=l,f=2;f<s;){var p=o[f-2],d=o[f-1],g=o[f++],y=o[f++],m=o[f++],S=o[f++],x=o[f++],w=o[f++];if(h<=0){c.push(g,y,m,S,x,w);continue}for(var _=Math.min(h,v-1)+1,b=1;b<=_;b++){var A=b/_;Ma(p,g,m,x,A,n),Ma(d,y,S,w,A,i),p=n[3],d=i[3],c.push(n[1],i[1],n[2],i[2],p,d),g=n[5],y=i[5],m=n[6],S=i[6]}h-=_-1}return o===a?[c,e]:[a,c]}function nv(a,e){for(var t=a.length,r=a[t-2],n=a[t-1],i=[],o=0;o<e.length;)i[o++]=r,i[o++]=n;return i}function EA(a,e){for(var t,r,n,i=[],o=[],s=0;s<Math.max(a.length,e.length);s++){var l=a[s],u=e[s],v=void 0,c=void 0;l?u?(t=VA(l,u),v=t[0],c=t[1],r=v,n=c):(c=nv(n||l,l),v=l):(v=nv(r||u,u),c=u),i.push(v),o.push(c)}return[i,o]}function iv(a){for(var e=0,t=0,r=0,n=a.length,i=0,o=n-2;i<n;o=i,i+=2){var s=a[o],l=a[o+1],u=a[i],v=a[i+1],c=s*v-u*l;e+=c,t+=(s+u)*c,r+=(l+v)*c}return e===0?[a[0]||0,a[1]||0]:[t/e/3,r/e/3,e]}function RA(a,e,t,r){for(var n=(a.length-2)/6,i=1/0,o=0,s=a.length,l=s-2,u=0;u<n;u++){for(var v=u*6,c=0,h=0;h<s;h+=2){var f=h===0?v:(v+h-2)%l+2,p=a[f]-t[0],d=a[f+1]-t[1],g=e[h]-r[0],y=e[h+1]-r[1],m=g-p,S=y-d;c+=m*m+S*S}c<i&&(i=c,o=u)}return o}function kA(a){for(var e=[],t=a.length,r=0;r<t;r+=2)e[r]=a[t-r-2],e[r+1]=a[t-r-1];return e}function NA(a,e,t,r){for(var n=[],i,o=0;o<a.length;o++){var s=a[o],l=e[o],u=iv(s),v=iv(l);i==null&&(i=u[2]<0!=v[2]<0);var c=[],h=[],f=0,p=1/0,d=[],g=s.length;i&&(s=kA(s));for(var y=RA(s,l,u,v)*6,m=g-2,S=0;S<m;S+=2){var x=(y+S)%m+2;c[S+2]=s[x]-u[0],c[S+3]=s[x+1]-u[1]}if(c[0]=s[y]-u[0],c[1]=s[y+1]-u[1],t>0)for(var w=r/t,_=-r/2;_<=r/2;_+=w){for(var b=Math.sin(_),A=Math.cos(_),T=0,S=0;S<s.length;S+=2){var I=c[S],C=c[S+1],E=l[S]-v[0],V=l[S+1]-v[1],M=E*A-V*b,P=E*b+V*A;d[S]=M,d[S+1]=P;var R=M-I,G=P-C;T+=R*R+G*G}if(T<p){p=T,f=_;for(var L=0;L<d.length;L++)h[L]=d[L]}}else for(var k=0;k<g;k+=2)h[k]=l[k]-v[0],h[k+1]=l[k+1]-v[1];n.push({from:c,to:h,fromCp:u,toCp:v,rotation:-f})}return n}function Ua(a){return a.__isCombineMorphing}var zh="__mOriginal_";function Ya(a,e,t){var r=zh+e,n=a[r]||a[e];a[r]||(a[r]=a[e]);var i=t.replace,o=t.after,s=t.before;a[e]=function(){var l=arguments,u;return s&&s.apply(this,l),i?u=i.apply(this,l):u=n.apply(this,l),o&&o.apply(this,l),u}}function zr(a,e){var t=zh+e;a[t]&&(a[e]=a[t],a[t]=null)}function ov(a,e){for(var t=0;t<a.length;t++)for(var r=a[t],n=0;n<r.length;){var i=r[n],o=r[n+1];r[n++]=e[0]*i+e[2]*o+e[4],r[n++]=e[1]*i+e[3]*o+e[5]}}function Gh(a,e){var t=a.getUpdatedPathProxy(),r=e.getUpdatedPathProxy(),n=EA(Zi(t),Zi(r)),i=n[0],o=n[1],s=a.getComputedTransform(),l=e.getComputedTransform();function u(){this.transform=null}s&&ov(i,s),l&&ov(o,l),Ya(e,"updateTransform",{replace:u}),e.transform=null;var v=NA(i,o,10,Math.PI),c=[];Ya(e,"buildPath",{replace:function(h){for(var f=e.__morphT,p=1-f,d=[],g=0;g<v.length;g++){var y=v[g],m=y.from,S=y.to,x=y.rotation*f,w=y.fromCp,_=y.toCp,b=Math.sin(x),A=Math.cos(x);Fp(d,w,_,f);for(var T=0;T<m.length;T+=2){var I=m[T],C=m[T+1],E=S[T],V=S[T+1],M=I*p+E*f,P=C*p+V*f;c[T]=M*A-P*b+d[0],c[T+1]=M*b+P*A+d[1]}var R=c[0],G=c[1];h.moveTo(R,G);for(var T=2;T<m.length;){var E=c[T++],V=c[T++],L=c[T++],k=c[T++],N=c[T++],O=c[T++];R===E&&G===V&&L===N&&k===O?h.lineTo(N,O):h.bezierCurveTo(E,V,L,k,N,O),R=N,G=O}}}})}function Uo(a,e,t){if(!a||!e)return e;var r=t.done,n=t.during;Gh(a,e),e.__morphT=0;function i(){zr(e,"buildPath"),zr(e,"updateTransform"),e.__morphT=-1,e.createPathProxy(),e.dirtyShape()}return e.animateTo({__morphT:1},Q({during:function(o){e.dirtyShape(),n&&n(o)},done:function(){i(),r&&r()}},t)),e}function zA(a,e,t,r,n,i){var o=16;a=n===t?0:Math.round(32767*(a-t)/(n-t)),e=i===r?0:Math.round(32767*(e-r)/(i-r));for(var s=0,l,u=(1<<o)/2;u>0;u/=2){var v=0,c=0;(a&u)>0&&(v=1),(e&u)>0&&(c=1),s+=u*u*(3*v^c),c===0&&(v===1&&(a=u-1-a,e=u-1-e),l=a,a=e,e=l)}return s}function Xa(a){var e=1/0,t=1/0,r=-1/0,n=-1/0,i=F(a,function(s){var l=s.getBoundingRect(),u=s.getComputedTransform(),v=l.x+l.width/2+(u?u[4]:0),c=l.y+l.height/2+(u?u[5]:0);return e=Math.min(v,e),t=Math.min(c,t),r=Math.max(v,r),n=Math.max(c,n),[v,c]}),o=F(i,function(s,l){return{cp:s,z:zA(s[0],s[1],e,t,r,n),path:a[l]}});return o.sort(function(s,l){return s.z-l.z}).map(function(s){return s.path})}function Oh(a){return PA(a.path,a.count)}function Ki(){return{fromIndividuals:[],toIndividuals:[],count:0}}function GA(a,e,t){var r=[];function n(w){for(var _=0;_<w.length;_++){var b=w[_];Ua(b)?n(b.childrenRef()):b instanceof It&&r.push(b)}}n(a);var i=r.length;if(!i)return Ki();var o=t.dividePath||Oh,s=o({path:e,count:i});if(s.length!==i)return console.error("Invalid morphing: unmatched splitted path"),Ki();r=Xa(r),s=Xa(s);for(var l=t.done,u=t.during,v=t.individualDelay,c=new Ir,h=0;h<i;h++){var f=r[h],p=s[h];p.parent=e,p.copyTransform(c),v||Gh(f,p)}e.__isCombineMorphing=!0,e.childrenRef=function(){return s};function d(w){for(var _=0;_<s.length;_++)s[_].addSelfToZr(w)}Ya(e,"addSelfToZr",{after:function(w){d(w)}}),Ya(e,"removeSelfFromZr",{after:function(w){for(var _=0;_<s.length;_++)s[_].removeSelfFromZr(w)}});function g(){e.__isCombineMorphing=!1,e.__morphT=-1,e.childrenRef=null,zr(e,"addSelfToZr"),zr(e,"removeSelfFromZr")}var y=s.length;if(v)for(var m=y,S=function(){m--,m===0&&(g(),l&&l())},h=0;h<y;h++){var x=v?Q({delay:(t.delay||0)+v(h,y,r[h],s[h]),done:S},t):t;Uo(r[h],s[h],x)}else e.__morphT=0,e.animateTo({__morphT:1},Q({during:function(w){for(var _=0;_<y;_++){var b=s[_];b.__morphT=e.__morphT,b.dirtyShape()}u&&u(w)},done:function(){g();for(var w=0;w<a.length;w++)zr(a[w],"updateTransform");l&&l()}},t));return e.__zr&&d(e.__zr),{fromIndividuals:r,toIndividuals:s,count:y}}function OA(a,e,t){var r=e.length,n=[],i=t.dividePath||Oh;function o(f){for(var p=0;p<f.length;p++){var d=f[p];Ua(d)?o(d.childrenRef()):d instanceof It&&n.push(d)}}if(Ua(a)){o(a.childrenRef());var s=n.length;if(s<r)for(var l=0,u=s;u<r;u++)n.push(ho(n[l++%s]));n.length=r}else{n=i({path:a,count:r});for(var v=a.getComputedTransform(),u=0;u<n.length;u++)n[u].setLocalTransform(v);if(n.length!==r)return console.error("Invalid morphing: unmatched splitted path"),Ki()}n=Xa(n),e=Xa(e);for(var c=t.individualDelay,u=0;u<r;u++){var h=c?Q({delay:(t.delay||0)+c(u,r,n[u],e[u])},t):t;Uo(n[u],e[u],h)}return{fromIndividuals:n,toIndividuals:e,count:e.length}}function sv(a){return W(a[0])}function lv(a,e){for(var t=[],r=a.length,n=0;n<r;n++)t.push({one:a[n],many:[]});for(var n=0;n<e.length;n++){var i=e[n].length,o=void 0;for(o=0;o<i;o++)t[o%r].many.push(e[n][o])}for(var s=0,n=r-1;n>=0;n--)if(!t[n].many.length){var l=t[s].many;if(l.length<=1)if(s)s=0;else return t;var i=l.length,u=Math.ceil(i/2);t[n].many=l.slice(u,i),t[s].many=l.slice(0,u),s++}return t}var BA={clone:function(a){for(var e=[],t=1-Math.pow(1-a.path.style.opacity,1/a.count),r=0;r<a.count;r++){var n=ho(a.path);n.setStyle("opacity",t),e.push(n)}return e},split:null};function yi(a,e,t,r,n,i){if(!a.length||!e.length)return;var o=Jr("update",r,n);if(!(o&&o.duration>0))return;var s=r.getModel("universalTransition").get("delay"),l=Object.assign({setToFinal:!0},o),u,v;sv(a)&&(u=a,v=e),sv(e)&&(u=e,v=a);function c(y,m,S,x,w){var _=y.many,b=y.one;if(_.length===1&&!w){var A=m?_[0]:b,T=m?b:_[0];if(Ua(A))c({many:[A],one:T},!0,S,x,!0);else{var I=s?Q({delay:s(S,x)},l):l;Uo(A,T,I),i(A,T,A,T,I)}}else for(var C=Q({dividePath:BA[t],individualDelay:s&&function(G,L,k,N){return s(G+S,x)}},l),E=m?GA(_,b,C):OA(b,_,C),V=E.fromIndividuals,M=E.toIndividuals,P=V.length,R=0;R<P;R++){var I=s?Q({delay:s(R,P)},l):l;i(V[R],M[R],m?_[R]:y.one,m?y.one:_[R],I)}}for(var h=u?u===a:a.length>e.length,f=u?lv(v,u):lv(h?e:a,[h?a:e]),p=0,d=0;d<f.length;d++)p+=f[d].many.length;for(var g=0,d=0;d<f.length;d++)c(f[d],h,g,p),g+=f[d].many.length}function Fe(a){if(!a)return[];if(W(a)){for(var e=[],t=0;t<a.length;t++)e.push(Fe(a[t]));return e}var r=[];return a.traverse(function(n){n instanceof It&&!n.disableMorphing&&!n.invisible&&!n.ignore&&r.push(n)}),r}var Bh=1e4,FA=Dt();function HA(a){for(var e=a.dimensions,t=0;t<e.length;t++){var r=a.getDimensionInfo(e[t]);if(r&&r.otherDims.itemGroupId===0)return e[t]}}function uv(a){var e=[];return D(a,function(t){var r=t.data;if(!(r.count()>Bh))for(var n=r.getIndices(),i=HA(r),o=0;o<n.length;o++)e.push({data:r,dim:t.dim||i,divide:t.divide,dataIndex:o})}),e}function mi(a,e,t){a.traverse(function(r){r instanceof It&&ee(r,{style:{opacity:0}},e,{dataIndex:t,isFrom:!0})})}function Si(a){if(a.parent){var e=a.getComputedTransform();a.setLocalTransform(e),a.parent.remove(a)}}function ir(a){a.stopAnimation(),a.isGroup&&a.traverse(function(e){e.stopAnimation()})}function WA(a,e,t){var r=Jr("update",t,e);r&&a.traverse(function(n){if(n instanceof qe){var i=Hp(n);i&&n.animateFrom({style:i},r)}})}function $A(a,e){var t=a.length;if(t!==e.length)return!1;for(var r=0;r<t;r++){var n=a[r],i=e[r];if(n.data.getId(n.dataIndex)!==i.data.getId(i.dataIndex))return!1}return!0}function Fh(a,e,t){var r=uv(a),n=uv(e);function i(y,m,S,x,w){(S||y)&&m.animateFrom({style:S&&S!==y?$($({},S.style),y.style):y.style},w)}function o(y){for(var m=0;m<y.length;m++)if(y[m].dim)return y[m].dim}var s=o(r),l=o(n),u=!1;function v(y,m){return function(S){var x=S.data,w=S.dataIndex;if(m)return x.getId(w);var _=x.hostModel&&x.hostModel.get("dataGroupId"),b=y?s||l:l||s,A=b&&x.getDimensionInfo(b),T=A&&A.ordinalMeta;if(A){var I=x.get(A.name,w);return T&&T.categories[I]||I+""}var C=x.getRawDataItem(w);return C&&C.groupId?C.groupId+"":_||x.getId(w)}}var c=$A(r,n),h={};if(!c)for(var f=0;f<n.length;f++){var p=n[f],d=p.data.getItemGraphicEl(p.dataIndex);d&&(h[d.id]=!0)}function g(y,m){var S=r[m],x=n[y],w=x.data.hostModel,_=S.data.getItemGraphicEl(S.dataIndex),b=x.data.getItemGraphicEl(x.dataIndex);if(_===b){b&&WA(b,x.dataIndex,w);return}_&&h[_.id]||b&&(ir(b),_?(ir(_),Si(_),u=!0,yi(Fe(_),Fe(b),x.divide,w,y,i)):mi(b,w,y))}new dr(r,n,v(!0,c),v(!1,c),null,"multiple").update(g).updateManyToOne(function(y,m){var S=n[y],x=S.data,w=x.hostModel,_=x.getItemGraphicEl(S.dataIndex),b=Et(F(m,function(A){return r[A].data.getItemGraphicEl(r[A].dataIndex)}),function(A){return A&&A!==_&&!h[A.id]});_&&(ir(_),b.length?(D(b,function(A){ir(A),Si(A)}),u=!0,yi(Fe(b),Fe(_),S.divide,w,y,i)):mi(_,w,S.dataIndex))}).updateOneToMany(function(y,m){var S=r[m],x=S.data.getItemGraphicEl(S.dataIndex);if(!(x&&h[x.id])){var w=Et(F(y,function(b){return n[b].data.getItemGraphicEl(n[b].dataIndex)}),function(b){return b&&b!==x}),_=n[y[0]].data.hostModel;w.length&&(D(w,function(b){return ir(b)}),x?(ir(x),Si(x),u=!0,yi(Fe(x),Fe(w),S.divide,_,y[0],i)):D(w,function(b){return mi(b,_,y[0])}))}}).updateManyToMany(function(y,m){new dr(m,y,function(S){return r[S].data.getId(r[S].dataIndex)},function(S){return n[S].data.getId(n[S].dataIndex)}).update(function(S,x){g(y[S],m[x])}).execute()}).execute(),u&&D(e,function(y){var m=y.data,S=m.hostModel,x=S&&t.getViewOfSeriesModel(S),w=Jr("update",S,0);x&&S.isAnimationEnabled()&&w&&w.duration>0&&x.group.traverse(function(_){_ instanceof It&&!_.animators.length&&_.animateFrom({style:{opacity:0}},w)})})}function vv(a){var e=a.getModel("universalTransition").get("seriesKey");return e||a.id}function cv(a){return W(a)?a.sort().join(","):a}function _e(a){if(a.hostModel)return a.hostModel.getModel("universalTransition").get("divideShape")}function UA(a,e){var t=nt(),r=nt(),n=nt();return D(a.oldSeries,function(i,o){var s=a.oldData[o],l=vv(i),u=cv(l);r.set(u,s),W(l)&&D(l,function(v){n.set(v,{data:s,key:u})})}),D(e.updatedSeries,function(i){if(i.isUniversalTransitionEnabled()&&i.isAnimationEnabled()){var o=i.getData(),s=vv(i),l=cv(s),u=r.get(l);if(u)t.set(l,{oldSeries:[{divide:_e(u),data:u}],newSeries:[{divide:_e(o),data:o}]});else if(W(s)){var v=[];D(s,function(f){var p=r.get(f);p&&v.push({divide:_e(p),data:p})}),v.length&&t.set(l,{oldSeries:v,newSeries:[{data:o,divide:_e(o)}]})}else{var c=n.get(s);if(c){var h=t.get(c.key);h||(h={oldSeries:[{data:c.data,divide:_e(c.data)}],newSeries:[]},t.set(c.key,h)),h.newSeries.push({data:o,divide:_e(o)})}}}}),t}function hv(a,e){for(var t=0;t<a.length;t++){var r=e.seriesIndex!=null&&e.seriesIndex===a[t].seriesIndex||e.seriesId!=null&&e.seriesId===a[t].id;if(r)return t}}function YA(a,e,t,r){var n=[],i=[];D(Lt(a.from),function(o){var s=hv(e.oldSeries,o);s>=0&&n.push({data:e.oldData[s],divide:_e(e.oldData[s]),dim:o.dimension})}),D(Lt(a.to),function(o){var s=hv(t.updatedSeries,o);if(s>=0){var l=t.updatedSeries[s].getData();i.push({data:l,divide:_e(l),dim:o.dimension})}}),n.length>0&&i.length>0&&Fh(n,i,r)}function XA(a){a.registerUpdateLifecycle("series:beforeupdate",function(e,t,r){D(Lt(r.seriesTransition),function(n){D(Lt(n.to),function(i){for(var o=r.updatedSeries,s=0;s<o.length;s++)(i.seriesIndex!=null&&i.seriesIndex===o[s].seriesIndex||i.seriesId!=null&&i.seriesId===o[s].id)&&(o[s][bn]=!0)})})}),a.registerUpdateLifecycle("series:transition",function(e,t,r){var n=FA(t);if(n.oldSeries&&r.updatedSeries&&r.optionChanged){var i=r.seriesTransition;if(i)D(Lt(i),function(h){YA(h,n,r,t)});else{var o=UA(n,r);D(o.keys(),function(h){var f=o.get(h);Fh(f.oldSeries,f.newSeries,t)})}D(r.updatedSeries,function(h){h[bn]&&(h[bn]=!1)})}for(var s=e.getSeries(),l=n.oldSeries=[],u=n.oldData=[],v=0;v<s.length;v++){var c=s[v].getData();c.count()<Bh&&(l.push(s[v]),u.push(c))}})}const ZA=()=>cn({url:"merchant/orderTable.setting/getSetting"}),qA=a=>cn({url:"merchant/orderTable.setting/setSetting",data:a,method:"POST"}),TT=a=>cn({url:"merchant/orderTable.order/list",data:a,method:"POST"}),IT=a=>cn({url:"merchant/orderTable.order/cancel",data:a,method:"POST"});K([Wp]);K([jd]);K([$p,Up,Yp,ud,pg,ny,ky,_m,qm,n0,d0,aS,LS,$S,u1,g1,R1,$1,ax,cx,Ax,l_]);K(Xp);K(H_);K(mc);K(iw);K(Uc);K(hw);K(_w);K(Zp);K(qp);K(co);K(Fw);K(Kp);K(rb);K(hb);K(xb);K(Cb);K(jp);K(Jp);K(Qp);K(td);K(eA);K(Eh);K(Rh);K(oA);K(SA);K(wA);K(XA);K(vd);const Je=a=>(sd("data-v-9d929e2f"),a=a(),ld(),a),KA={class:"editor-container"},jA={class:"tool-section"},JA=Je(()=>ct("h3",null,"\u5E95\u56FE\u8BBE\u7F6E",-1)),QA={class:"tool-section"},tT=Je(()=>ct("h3",null,"\u5EA7\u4F4D\u8BBE\u7F6E",-1)),eT=Je(()=>ct("div",{class:"drawing-mode"},null,-1)),rT={class:"tool-control"},aT=Je(()=>ct("span",null,"\u7ED8\u5236\u7C7B\u578B:",-1)),nT=ta("\u5355\u4E2A\u7ED8\u5236"),iT=ta("\u533A\u57DF\u7ED8\u5236"),oT={class:"tool-control"},sT=Je(()=>ct("span",null,"\u5EA7\u4F4D\u7C7B\u578B:",-1)),lT={class:"seat-type-option"},uT={class:"tool-control"},vT=Je(()=>ct("span",null,"\u5EA7\u4F4D\u5927\u5C0F:",-1)),cT={key:0,class:"area-options"},hT={class:"tool-control"},fT=Je(()=>ct("span",null,"\u5EA7\u4F4D\u95F4\u8DDD:",-1)),pT={class:"action-buttons"},dT=ta("\u4FDD\u5B58\u6570\u636E"),gT=ta("\u5220\u9664\u5EA7\u4F4D"),yT=ta("\u6E05\u7A7A\u753B\u5E03"),mT=["width","height"],ST={setup(a){let e=1,t=375,r=667;const n=oe(null);let i=null;const o=oe(null);let s=ps({url:"",width:0,height:0,originalSize:{width:0,height:0}});const l=oe([]),u=oe({}),v=oe([]),c=oe(30),h=oe(10),f=oe("single"),p=oe("normal"),d=oe(null),g=ps({isDrawing:!1,startX:0,startY:0,endX:0,endY:0,isDragging:!1,selectedSeatIndex:-1}),y=()=>{if(d.value){const L=v.value.findIndex(k=>k.id===d.value.id);L!==-1&&(v.value.splice(L,1),d.value=null,b())}},m=L=>{(L.key==="Delete"||L.key==="Backspace")&&d.value&&y()};rd(async()=>{i=n.value.getContext("2d"),i.fillStyle="#ccc",i.font="16px Arial",i.textAlign="center",i.textBaseline="middle",i.fillText("\u6B63\u5728\u52A0\u8F7D\u6570\u636E...",t/2,r/2),await S(),v.value.length===0&&!o.value&&(i.clearRect(0,0,t,r),i.fillText("\u9009\u62E9\u5E95\u56FE\u540E\u5F00\u59CB\u8BBE\u8BA1",t/2,r/2)),window.addEventListener("keydown",m)}),ad(()=>{window.removeEventListener("keydown",m)});const S=async()=>{await ZA().then(L=>{if(L.data){l.value=L.data.orderTableType;var k={};l.value&&l.value.length>0&&(p.value=l.value[0].code,l.value.forEach(O=>{k[O.code]={name:O.name,code:O.code,color:O.color}}),u.value=k);const N=L.data.layout_content;if(N&&typeof N=="string")try{const O=JSON.parse(N);x(O)}catch(O){console.error("\u89E3\u6790layout_content\u5931\u8D25:",O)}else N&&typeof N=="object"&&x(N)}})},x=L=>{if(!!L){if(console.log("Loading layout data:",L),L.seats&&Array.isArray(L.seats)){const k=L.seats.map(N=>{const O={...N};return!l.value.some(Y=>Y.code===N.type)&&l.value.length>0&&(O.originalType=N.type,O.type=l.value[0].code,N.color&&(O.originalColor=N.color),console.warn(`\u5EA7\u4F4D ${N.id} \u7684\u7C7B\u578B "${N.type}" \u4E0D\u5728\u5F53\u524D\u53EF\u7528\u7C7B\u578B\u4E2D\uFF0C\u5DF2\u4F7F\u7528\u9ED8\u8BA4\u7C7B\u578B "${l.value[0].code}"\u66FF\u4EE3`)),O});v.value=k,v.value.length>0&&(e=Math.max(...v.value.map(N=>N.id||0))+1)}if(L.hallInfo&&L.hallInfo.backgroundImage){const k=new Image;k.onload=()=>{o.value=k,s.url=L.hallInfo.backgroundImage,s.originalSize=L.hallInfo.backgroundSize||{width:k.naturalWidth,height:k.naturalHeight};const N=s.originalSize.width/s.originalSize.height,O=t/r;let U,Y;N>O?(U=t,Y=t/N):(Y=r,U=r*N),s.width=U,s.height=Y,b()},k.src=L.hallInfo.backgroundImage}else b()}},w=L=>{qA({setting_type:1,layout_content:L}).then(k=>{console.log("res",k),k.data===!0&&(ys({message:"\u63D0\u4EA4\u6210\u529F",type:"success"}),S()),loading.close()})},_=L=>{const k=new Image;k.onload=()=>{o.value=k;const N=k.naturalWidth/k.naturalHeight,O=t/r;let U,Y;N>O?(U=t,Y=t/N):(Y=r,U=r*N),s.url=L,s.originalSize={width:k.naturalWidth,height:k.naturalHeight},s.width=U,s.height=Y,b()},k.src=L},b=()=>{if(i.clearRect(0,0,t,r),o.value){const L=s.originalSize.width/s.originalSize.height,k=t/r;let N,O,U,Y;L>k?(N=t,O=t/L,U=0,Y=(r-O)/2):(O=r,N=r*L,U=(t-N)/2,Y=0),i.drawImage(o.value,U,Y,N,O)}else i.fillStyle="#f5f5f5",i.fillRect(0,0,t,r);if(v.value.forEach((L,k)=>{let N;L.id===(d.value||{}).id?N="#1890ff":u.value[L.type]&&u.value[L.type].color?N=u.value[L.type].color:L.originalColor?N=L.originalColor:L.color?N=L.color:N="#52c41a",i.fillStyle=N,i.fillRect(L.x,L.y,L.size,L.size),i.fillStyle="#ffffff",i.font="10px Arial",i.textAlign="center",i.textBaseline="middle",i.fillText(L.id||k+1,L.x+L.size/2,L.y+L.size/2)}),f.value==="area"&&g.isDrawing){i.strokeStyle="#ff4d4f",i.lineWidth=2;const L=g.endX-g.startX,k=g.endY-g.startY;i.strokeRect(g.startX,g.startY,L,k)}},A=L=>{const k=n.value.getBoundingClientRect(),N=L.clientX-k.left,O=L.clientY-k.top;if(d.value=null,f.value==="single"){const U=v.value.findIndex(Y=>N>=Y.x&&N<=Y.x+Y.size&&O>=Y.y&&O<=Y.y+Y.size);U!==-1?(g.isDragging=!0,g.selectedSeatIndex=U,v.value[U].selected=!0,d.value=v.value[U]):M(N-c.value/2,O-c.value/2)}else f.value==="area"&&(g.isDrawing=!0,g.startX=N,g.startY=O,g.endX=N,g.endY=O,d.value=null);b()},T=L=>{if(!g.isDrawing&&!g.isDragging)return;const k=n.value.getBoundingClientRect(),N=L.clientX-k.left,O=L.clientY-k.top;g.isDragging&&g.selectedSeatIndex!==-1?(v.value[g.selectedSeatIndex].x=N-c.value/2,v.value[g.selectedSeatIndex].y=O-c.value/2):g.isDrawing&&(g.endX=N,g.endY=O),b()},I=()=>{g.isDrawing&&f.value==="area"&&P(),g.selectedSeatIndex!==-1&&(v.value[g.selectedSeatIndex].selected=!1),g.isDrawing=!1,g.isDragging=!1,g.selectedSeatIndex=-1,b()},C=L=>{L.preventDefault();const k=L.touches[0],N={clientX:k.clientX,clientY:k.clientY};A(N)},E=L=>{L.preventDefault();const k=L.touches[0],N={clientX:k.clientX,clientY:k.clientY};T(N)},V=L=>{L.preventDefault(),I()},M=(L,k)=>{v.value.push({id:e,x:L,y:k,size:c.value,type:p.value,...u.value[p.value]}),e++},P=()=>{const L=Math.min(g.startX,g.endX),k=Math.min(g.startY,g.endY),N=Math.max(g.startX,g.endX),O=Math.max(g.startY,g.endY),U=N-L,Y=O-k,J=Math.floor(Y/(c.value+h.value))||1,gt=Math.floor(U/(c.value+h.value))||1;for(let zt=0;zt<J;zt++)for(let j=0;j<gt;j++){const X=L+j*(c.value+h.value),et=k+zt*(c.value+h.value);M(X,et)}},R=()=>{w({hallInfo:{width:t,height:r,backgroundImage:s.url,backgroundSize:s.originalSize,createdAt:new Date().toISOString()},seats:v.value,scale:{originalWidth:t,originalHeight:r}})},G=()=>{v.value=[],b(),ys.info("\u753B\u5E03\u5DF2\u6E05\u7A7A")};return(L,k)=>{const N=aa("el-radio"),O=aa("el-radio-group"),U=aa("el-slider"),Y=aa("el-button");return Sr(),An("div",KA,[ct("div",{class:"tools-panel",style:Tn(`height:${na(r)}px`)},[ct("div",jA,[JA,de(Hh,{limit:1,onChange:_})]),ct("div",QA,[tT,eT,ct("div",rT,[aT,de(O,{modelValue:f.value,"onUpdate:modelValue":k[0]||(k[0]=J=>f.value=J)},{default:xe(()=>[de(N,{label:"single"},{default:xe(()=>[nT]),_:1}),de(N,{label:"area"},{default:xe(()=>[iT]),_:1})]),_:1},8,["modelValue"])]),ct("div",oT,[sT,de(O,{modelValue:p.value,"onUpdate:modelValue":k[1]||(k[1]=J=>p.value=J)},{default:xe(()=>[(Sr(!0),An(nd,null,id(l.value,J=>(Sr(),ds(N,{label:J.code},{default:xe(()=>[ct("div",lT,[ct("div",{class:"color-block",style:Tn({backgroundColor:J.color||"#ccc"})},null,4),ct("span",null,od(J.name),1)])]),_:2},1032,["label"]))),256))]),_:1},8,["modelValue"])]),ct("div",uT,[vT,de(U,{modelValue:c.value,"onUpdate:modelValue":k[2]||(k[2]=J=>c.value=J),min:10,max:100,step:2},null,8,["modelValue"])]),f.value==="area"?(Sr(),An("div",cT,[ct("div",hT,[fT,de(U,{modelValue:h.value,"onUpdate:modelValue":k[3]||(k[3]=J=>h.value=J),min:5,max:30,step:5},null,8,["modelValue"])])])):gs("",!0)]),ct("div",pT,[ct("div",null,[de(Y,{type:"success",onClick:R},{default:xe(()=>[dT]),_:1}),d.value?(Sr(),ds(Y,{key:0,type:"error",onClick:y},{default:xe(()=>[gT]),_:1})):gs("",!0)]),de(Y,{onClick:G},{default:xe(()=>[yT]),_:1})])],4),ct("div",{class:"canvas-container",style:Tn(`height:${na(r)}px`)},[ct("canvas",{ref_key:"canvas",ref:n,width:na(t),height:na(r),onMousedown:A,onMousemove:T,onMouseup:I,onTouchstart:C,onTouchmove:E,onTouchend:V},null,40,mT)],4)])}}},xT=ed(ST,[["__scopeId","data-v-9d929e2f"]]),DT=Object.freeze(Object.defineProperty({__proto__:null,default:xT},Symbol.toStringTag,{value:"Module"}));export{xT as E,TT as a,IT as c,DT as e,ZA as g,qA as s};
|