@kubex/zinc 1.1.31 → 1.1.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/dist/chunks/zn.4YKYUIHS.js +3 -0
  2. package/dist/chunks/zn.6RARZYEJ.js +22 -0
  3. package/dist/chunks/zn.7VCR5ZZL.js +1 -0
  4. package/dist/chunks/zn.AI3T35DX.js +1 -0
  5. package/dist/chunks/zn.CU5HCKLN.js +1 -0
  6. package/dist/chunks/zn.EHO4QQOL.js +1 -0
  7. package/dist/chunks/zn.GBBMMHHG.js +8 -0
  8. package/dist/chunks/zn.GRJSS6IO.js +1 -0
  9. package/dist/chunks/zn.HPUEBV7K.js +1 -0
  10. package/dist/chunks/zn.J2JOUV3V.js +8 -0
  11. package/dist/chunks/zn.NKUIXDNI.js +1 -0
  12. package/dist/chunks/zn.S4ZVBYAS.js +3 -0
  13. package/dist/chunks/zn.UBLZO6CI.js +1 -0
  14. package/dist/chunks/zn.XO7QERPZ.js +716 -0
  15. package/dist/chunks/zn.ZGI3WHSG.js +4 -0
  16. package/dist/custom-elements.json +61 -2
  17. package/dist/web-types.json +1 -1
  18. package/dist/zn.d.ts +21 -0
  19. package/dist/zn.min.js +1323 -2074
  20. package/index.html +1 -1
  21. package/package.json +3 -3
  22. package/scripts/build.js +10 -5
  23. package/src/components/chart/chart.component.ts +20 -27
  24. package/src/components/chart/echarts-loader.ts +30 -0
  25. package/src/components/editor/editor.component.ts +1 -2
  26. package/src/components/editor/modules/emoji/emoji-mart-loader.ts +28 -0
  27. package/src/components/editor/modules/emoji/emoji.ts +3 -9
  28. package/src/components/editor/modules/emoji/headless/headless-emoji.ts +2 -9
  29. package/src/components/icon/icon.component.ts +34 -2
  30. package/src/components/icon-picker/icon-picker.component.ts +35 -35
  31. package/src/components/icon-picker/material-icons.ts +530 -10442
  32. package/src/components/rating/rating.component.ts +1 -2
  33. package/src/components/simple-chart/simple-chart.component.ts +15 -6
  34. package/src/zinc-autoloader.ts +0 -2
  35. package/tsconfig.json +2 -1
@@ -0,0 +1 @@
1
+ import{a as Et}from"./zn.HPUEBV7K.js";import{$ as Zr,A as Se,Aa as Yl,Ba as Zl,I as Rl,J as Nl,K as Ke,M as Te,N as uo,O as Ml,T as ja,U as Re,V as po,W as Vl,X as Ja,Y as zl,Z as Yr,_ as Qa,a as Il,aa as $a,b as Ll,ba as Xr,c as Pe,ca as Ol,d as qa,da as xr,e as yr,ea as kl,f as Xe,fa as fo,g as Ht,ga as _r,h as Sr,ha as ti,i as lo,ia as Ul,j as Al,ja as Gl,k as Pl,ka as ei,l as so,la as Bl,ma as ri,na as ai,oa as Hl,p as Cl,r as Fr,s as Ce,t as ha,u as Ka,v as Ee,va as Fl,w as qe,wa as Wl,x as El,y as Tl,ya as ii,z as Wr}from"./zn.4YKYUIHS.js";import{$c as At,$d as va,$e as Ze,Aa as fa,Ac as ae,Ba as He,Bc as hl,Ca as mr,Cc as ie,Da as dr,Dc as ml,Ea,Eb as Fe,F as La,Fa as Ta,Fe as wl,H as $n,I as tl,Ja as J,K as Mr,Ka as $i,Kc as Y,L as qi,La as lt,Lc as dl,Le as gr,M as Vr,Ma as ca,Mc as Ba,Na as to,Nb as io,Ne as Dl,Ob as ut,Oc as gl,Oe as Za,P as Ue,Pb as ht,Qa as Ra,Qb as ct,Rb as Kt,Re as Xa,Sa as Bt,Sb as oo,T as Ki,Tb as pl,U as te,Ua as kr,Ub as Va,Va as ee,Vb as za,Wa as eo,Wb as fl,We as Hr,X as el,Xa as sl,Yb as Xt,Za as Ur,_b as Oa,_d as We,a as V,aa as sa,b as Jn,ba as rl,bd as yl,be as fe,c as Ae,cb as tt,d as de,db as nt,de as Br,e as Yi,ea as ua,eb as Gr,ed as Sl,fa as ji,fb as re,fd as Q,fe as Ye,gb as wt,gf as Ut,ha as zr,hd as ye,id as q,j as Ot,ja as Mt,jb as Na,jd as xl,k as H,ka as al,la as rt,me as bl,n as hr,na as il,nb as ro,oa as at,ob as ao,oc as no,p as Ia,pa as Qi,pc as ka,pd as Ha,qc as cl,ra as Ge,rd as _l,ta as nl,tb as Ma,tc as vl,ud as kt,v as Qn,vc as Ua,vd as Fa,wd as Wa,x as Zi,xd as Ya,ya as ll,z as Xi,za as Be,zc as Ga}from"./zn.GBBMMHHG.js";import{$ as Un,$b as ft,Aa as Gi,B as yt,C as Vn,Ca as Fn,Ea as Wn,Ga as _t,I as Rr,Ib as jn,J as fr,Jb as Wi,K as ke,Kb as K,L as Zt,N as zn,Na as pe,O as On,R as Le,Ra as Bi,S as cr,Sb as Aa,Ta as Hi,Tb as Pa,U as Qt,Ub as Or,V as na,Va as Da,Vb as Ca,Wa as Yn,Wb as Ji,Xa as Zn,Xb as ol,Y as kn,Yb as pa,Z as Nt,_ as $t,ab as Xn,ba as la,bc as ge,ca as vr,cb as qn,d as ki,da as Ui,db as Fi,ea as Gn,eb as Kn,fa as Nr,fc as bt,g as Ie,ha as me,i as Rn,ia as Bn,ic as Lt,j as B,ja as wa,jc as ul,k as Ct,l as Rt,n as pr,p as k,q as X,s as Tr,t as Nn,u as Mn,v as ot,w as zt,wa as Hn,x as $,y as gt,z as dt}from"./zn.J2JOUV3V.js";import"./zn.UBLZO6CI.js";var zf=(function(a){V(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){if(0)var r;return Et(null,this,{useEncodeDefaulter:!0})},e.prototype.getLegendIcon=function(t){var r=new K,i=kt("line",0,t.itemHeight/2,t.itemWidth,0,t.lineStyle.stroke,!1);r.add(i),i.setStyle(t.lineStyle);var o=this.getData().getVisual("symbol"),n=this.getData().getVisual("symbolRotate"),l=o==="none"?"circle":o,s=t.itemHeight*.8,u=kt(l,(t.itemWidth-s)/2,(t.itemHeight-s)/2,s,s,t.itemStyle.fill);r.add(u),u.setStyle(t.itemStyle);var p=t.iconRotate==="inherit"?n:t.iconRotate||0;return u.rotation=p*Math.PI/180,u.setOrigin([t.itemWidth/2,t.itemHeight/2]),l.indexOf("empty")>-1&&(u.style.stroke=u.style.fill,u.style.fill=Y.color.neutral00,u.style.lineWidth=2),r},e.type="series.line",e.dependencies=["grid","polar"],e.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:6,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1,triggerEvent:!1},e})(Q),Xl=zf;function oi(a,e,t){var r=a.getBaseAxis(),i=a.getOtherAxis(r),o=Of(i,t),n=r.dim,l=i.dim,s=e.mapDimension(l),u=e.mapDimension(n),p=l==="x"||l==="radius"?1:0,f=X(a.dimensions,function(h){return e.mapDimension(h)}),c=!1,v=e.getCalculationInfo("stackResultDimension");return Ye(e,f[0])&&(c=!0,f[0]=v),Ye(e,f[1])&&(c=!0,f[1]=v),{dataDimsForPoint:f,valueStart:o,valueAxisDim:l,baseAxisDim:n,stacked:!!c,valueDim:s,baseDim:u,baseDataOffset:p,stackedOverDimension:e.getCalculationInfo("stackedOverDimension")}}function Of(a,e){var t=0,r=a.scale.getExtent();return e==="start"?t=r[0]:e==="end"?t=r[1]:yt(e)&&!isNaN(e)?t=e:r[0]>0?t=r[0]:r[1]<0&&(t=r[1]),t}function ni(a,e,t,r){var i=NaN;a.stacked&&(i=t.get(t.getCalculationInfo("stackedOverDimension"),r)),isNaN(i)&&(i=a.valueStart);var o=a.baseDataOffset,n=[];return n[o]=t.get(a.baseDim,r),n[1-o]=i,e.dataToPoint(n)}function qt(a,e){return!isFinite(a)||!isFinite(e)}function kf(a,e){var t=[];return e.diff(a).add(function(r){t.push({cmd:"+",idx:r})}).update(function(r,i){t.push({cmd:"=",idx:i,idx1:r})}).remove(function(r){t.push({cmd:"-",idx:r})}).execute(),t}function co(a,e,t,r,i,o,n,l){for(var s=kf(a,e),u=[],p=[],f=[],c=[],v=[],h=[],m=[],d=oi(i,e,n),y=a.getLayout("points")||[],g=e.getLayout("points")||[],S=0;S<s.length;S++){var x=s[S],_=!0,b=void 0,w=void 0;switch(x.cmd){case"=":b=x.idx*2,w=x.idx1*2;var I=y[b],C=y[b+1],L=g[w],D=g[w+1];(isNaN(I)||isNaN(C))&&(I=L,C=D),u.push(I,C),p.push(L,D),f.push(t[b],t[b+1]),c.push(r[w],r[w+1]),m.push(e.getRawIndex(x.idx1));break;case"+":var A=x.idx,E=d.dataDimsForPoint,z=i.dataToPoint([e.get(E[0],A),e.get(E[1],A)]);w=A*2,u.push(z[0],z[1]),p.push(g[w],g[w+1]);var P=ni(d,i,e,A);f.push(P[0],P[1]),c.push(r[w],r[w+1]),m.push(e.getRawIndex(A));break;case"-":_=!1}_&&(v.push(x),h.push(h.length))}h.sort(function(j,Dt){return m[j]-m[Dt]});for(var T=u.length,N=Ht(T),R=Ht(T),M=Ht(T),O=Ht(T),U=[],S=0;S<h.length;S++){var G=h[S],F=S*2,Z=G*2;N[F]=u[Z],N[F+1]=u[Z+1],R[F]=p[Z],R[F+1]=p[Z+1],M[F]=f[Z],M[F+1]=f[Z+1],O[F]=c[Z],O[F+1]=c[Z+1],U[S]=v[G]}return{current:N,next:R,stackedOnCurrent:M,stackedOnNext:O,status:U}}var je=Math.min,Je=Math.max;function vo(a,e,t,r,i,o,n,l,s){for(var u,p,f,c,v,h,m=t,d=0;d<r;d++){var y=e[m*2],g=e[m*2+1];if(m>=i||m<0)break;if(qt(y,g)){if(s){m+=o;continue}break}if(m===t)a[o>0?"moveTo":"lineTo"](y,g),f=y,c=g;else{var S=y-u,x=g-p;if(S*S+x*x<.5){m+=o;continue}if(n>0){for(var _=m+o,b=e[_*2],w=e[_*2+1];b===y&&w===g&&d<r;)d++,_+=o,m+=o,b=e[_*2],w=e[_*2+1],y=e[m*2],g=e[m*2+1],S=y-u,x=g-p;var I=d+1;if(s)for(;qt(b,w)&&I<r;)I++,_+=o,b=e[_*2],w=e[_*2+1];var C=.5,L=0,D=0,A=void 0,E=void 0;if(I>=r||qt(b,w))v=y,h=g;else{L=b-u,D=w-p;var z=y-u,P=b-y,T=g-p,N=w-g,R=void 0,M=void 0;if(l==="x"){R=Math.abs(z),M=Math.abs(P);var O=L>0?1:-1;v=y-O*R*n,h=g,A=y+O*M*n,E=g}else if(l==="y"){R=Math.abs(T),M=Math.abs(N);var U=D>0?1:-1;v=y,h=g-U*R*n,A=y,E=g+U*M*n}else R=Math.sqrt(z*z+T*T),M=Math.sqrt(P*P+N*N),C=M/(M+R),v=y-L*n*(1-C),h=g-D*n*(1-C),A=y+L*n*C,E=g+D*n*C,A=je(A,Je(b,y)),E=je(E,Je(w,g)),A=Je(A,je(b,y)),E=Je(E,je(w,g)),L=A-y,D=E-g,v=y-L*R/M,h=g-D*R/M,v=je(v,Je(u,y)),h=je(h,Je(p,g)),v=Je(v,je(u,y)),h=Je(h,je(p,g)),L=y-v,D=g-h,A=y+L*M/R,E=g+D*M/R}a.bezierCurveTo(f,c,v,h,y,g),f=A,c=E}else a.lineTo(y,g)}u=y,p=g,m+=o}return d}var ql=(function(){function a(){this.smooth=0,this.smoothConstraint=!0}return a})(),Kl=(function(a){V(e,a);function e(t){var r=a.call(this,t)||this;return r.type="ec-polyline",r}return e.prototype.getDefaultStyle=function(){return{stroke:Y.color.neutral99,fill:null}},e.prototype.getDefaultShape=function(){return new ql},e.prototype.buildPath=function(t,r){var i=r.points,o=0,n=i.length/2;if(r.connectNulls){for(;n>0&&qt(i[n*2-2],i[n*2-1]);n--);for(;o<n&&qt(i[o*2],i[o*2+1]);o++);}for(;o<n;)o+=vo(t,i,o,n,n,1,r.smooth,r.smoothMonotone,r.connectNulls)+1},e.prototype.getPointOn=function(t,r){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var i=this.path,o=i.data,n=Ca.CMD,l,s,u=r==="x",p=[],f=0;f<o.length;){var c=o[f++],v=void 0,h=void 0,m=void 0,d=void 0,y=void 0,g=void 0,S=void 0;switch(c){case n.M:l=o[f++],s=o[f++];break;case n.L:if(v=o[f++],h=o[f++],S=u?(t-l)/(v-l):(t-s)/(h-s),S<=1&&S>=0){var x=u?(h-s)*S+s:(v-l)*S+l;return u?[t,x]:[x,t]}l=v,s=h;break;case n.C:v=o[f++],h=o[f++],m=o[f++],d=o[f++],y=o[f++],g=o[f++];var _=u?Hi(l,v,m,y,t,p):Hi(s,h,d,g,t,p);if(_>0)for(var b=0;b<_;b++){var w=p[b];if(w<=1&&w>=0){var x=u?Bi(s,h,d,g,w):Bi(l,v,m,y,w);return u?[t,x]:[x,t]}}l=y,s=g;break}}},e})(ft);var Uf=(function(a){V(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e})(ql),li=(function(a){V(e,a);function e(t){var r=a.call(this,t)||this;return r.type="ec-polygon",r}return e.prototype.getDefaultShape=function(){return new Uf},e.prototype.buildPath=function(t,r){var i=r.points,o=r.stackedOnPoints,n=0,l=i.length/2,s=r.smoothMonotone;if(r.connectNulls){for(;l>0&&qt(i[l*2-2],i[l*2-1]);l--);for(;n<l&&qt(i[n*2],i[n*2+1]);n++);}for(;n<l;){var u=vo(t,i,n,l,l,1,r.smooth,s,r.connectNulls);vo(t,o,n+u-1,u,l,-1,r.stackedOnSmooth,s,r.connectNulls),n+=u+1,t.closePath()}},e})(ft);function ho(a,e,t,r,i){var o=a.getArea(),n=o.x,l=o.y,s=o.width,u=o.height,p=t.get(["lineStyle","width"])||0;n-=p/2,l-=p/2,s+=p,u+=p,s=Math.ceil(s),n!==Math.floor(n)&&(n=Math.floor(n),s++);var f=new bt({shape:{x:n,y:l,width:s,height:u}});if(e){var c=a.getBaseAxis(),v=c.isHorizontal(),h=c.inverse;v?(h&&(f.shape.x+=s),f.shape.width=0):(h||(f.shape.y+=u),f.shape.height=0);var m=gt(i)?function(d){i(d,f)}:null;nt(f,{shape:{width:s,height:u,x:n,y:l}},t,null,r,m)}return f}function mo(a,e,t){var r=a.getArea(),i=hr(r.r0,1),o=hr(r.r,1),n=new Bt({shape:{cx:hr(a.cx,1),cy:hr(a.cy,1),r0:i,r:o,startAngle:r.startAngle,endAngle:r.endAngle,clockwise:r.clockwise}});if(e){var l=a.getBaseAxis().dim==="angle";l?n.shape.endAngle=r.startAngle:n.shape.r=i,nt(n,{shape:{endAngle:r.endAngle,r:o}},t)}return n}function jt(a,e,t,r,i){if(a){if(a.type==="polar")return mo(a,e,t);if(a.type==="cartesian2d")return ho(a,e,t,r,i)}else return null;return null}var Qe=0,$e=1,tr=2;function er(a,e,t){a?e.setClipPath(t):e.removeClipPath()}function si(a){var e=a.coordinateSystem;if(a.get("clip",!0)&&e&&(!e.shouldClip||e.shouldClip()))return e.getArea&&e.getArea(.1)}function jl(a,e){if(a.length===e.length){for(var t=0;t<a.length;t++)if(a[t]!==e[t])return;return!0}}function Jl(a){for(var e=ua(),t=ua(),r=0;r<a.length;){var i=a[r++],o=a[r++];qt(i,o)||(ji(e,i),ji(t,o))}return[e,t]}function Ql(a,e){var t=Jl(a),r=t[0],i=t[1],o=Jl(e),n=o[0],l=o[1];return Math.max(Math.abs(r[0]-n[0]),Math.abs(i[0]-l[0]),Math.abs(r[1]-n[1]),Math.abs(i[1]-l[1]))}function $l(a){return yt(a)?a:a?.5:0}function Bf(a,e,t){if(t.valueDim==null)return[];for(var r=e.count(),i=Ht(r*2),o=0;o<r;o++){var n=ni(t,a,e,o);i[o*2]=n[0],i[o*2+1]=n[1]}return i}function rr(a,e,t,r,i){var o=t.getBaseAxis(),n=o.dim==="x"||o.dim==="radius"?0:1,l=[],s=0,u=[],p=[],f=[],c=[];if(i){for(s=0;s<a.length;s+=2){var v=e||a;qt(v[s],v[s+1])||c.push(a[s],a[s+1])}a=c}for(s=0;s<a.length-2;s+=2)switch(f[0]=a[s+2],f[1]=a[s+3],p[0]=a[s],p[1]=a[s+1],l.push(p[0],p[1]),r){case"end":u[n]=f[n],u[1-n]=p[1-n],l.push(u[0],u[1]);break;case"middle":var h=(p[n]+f[n])/2,m=[];u[n]=m[n]=h,u[1-n]=p[1-n],m[1-n]=f[1-n],l.push(u[0],u[1]),l.push(m[0],m[1]);break;default:u[n]=p[n],u[1-n]=f[1-n],l.push(u[0],u[1])}return l.push(a[s++],a[s++]),l}function Hf(a,e){var t=[],r=a.length,i,o;function n(p,f,c){var v=p.coord,h=(c-v)/(f.coord-v),m=qn(h,[p.color,f.color]);return{coord:c,color:m}}for(var l=0;l<r;l++){var s=a[l],u=s.coord;if(u<0)i=s;else if(u>e){o?t.push(n(o,s,e)):i&&t.push(n(i,s,0),n(i,s,e));break}else i&&(t.push(n(i,s,0)),i=null),t.push(s),o=s}return t}function Ff(a,e,t){var r=a.getVisual("visualMeta");if(!(!r||!r.length||!a.count())&&e.type==="cartesian2d"){for(var i,o,n=r.length-1;n>=0;n--){var l=a.getDimensionInfo(r[n].dimension);if(i=l&&l.coordDim,i==="x"||i==="y"){o=r[n];break}}if(o){var s=e.getAxis(i),u=X(o.stops,function(S){return{coord:s.toGlobalCoord(s.dataToCoord(S.value)),color:S.color}}),p=u.length,f=o.outerColors.slice();p&&u[0].coord>u[p-1].coord&&(u.reverse(),f.reverse());var c=Hf(u,i==="x"?t.getWidth():t.getHeight()),v=c.length;if(!v&&p)return u[0].coord<0?f[1]?f[1]:u[p-1].color:f[0]?f[0]:u[0].color;var h=10,m=c[0].coord-h,d=c[v-1].coord+h,y=d-m;if(y<.001)return"transparent";k(c,function(S){S.offset=(S.coord-m)/y}),c.push({offset:v?c[v-1].offset:.5,color:f[1]||"transparent"}),c.unshift({offset:v?c[0].offset:.5,color:f[0]||"transparent"});var g=new Ur(0,0,0,0,c,!0);return g[i]=m,g[i+"2"]=d,g}}}function Wf(a,e,t){var r=a.get("showAllSymbol"),i=r==="auto";if(!(r&&!i)){var o=t.getAxesByScale("ordinal")[0];if(o&&!(i&&Yf(o,e))){var n=e.mapDimension(o.dim),l={};return k(o.getViewLabels(),function(s){s.tick.offInterval||(l[wl(o.scale,s.tick)]=1)}),function(s){return!l.hasOwnProperty(e.get(n,s))}}}}function Yf(a,e){var t=a.getExtent(),r=Math.abs(t[1]-t[0])/a.scale.count();isNaN(r)&&(r=0);for(var i=e.count(),o=Math.max(1,Math.round(i/5)),n=0;n<i;n+=o)if(yr.getSymbolSize(e,n)[a.isHorizontal()?1:0]*1.5>r)return!1;return!0}function Zf(a){for(var e=a.length/2;e>0&&qt(a[e*2-2],a[e*2-1]);e--);return e-1}function ts(a,e){return[a[e*2],a[e*2+1]]}function Xf(a,e,t){for(var r=a.length/2,i=t==="x"?0:1,o,n,l=0,s=-1,u=0;u<r;u++)if(n=a[u*2+i],!qt(n,a[u*2+1-i])){if(u===0){o=n;continue}if(o<=e&&n>=e||o>=e&&n<=e){s=u;break}l=u,o=n}return{range:[l,s],t:(e-o)/(n-o)}}function es(a){if(a.get(["endLabel","show"]))return!0;for(var e=0;e<Be.length;e++)if(a.get([Be[e],"endLabel","show"]))return!0;return!1}function go(a,e,t,r){if(Sr(e,"cartesian2d")){var i=r.getModel("endLabel"),o=i.get("valueAnimation"),n=r.getData(),l={lastFrameIndex:0},s=es(r)?function(v,h){a._endLabelOnDuring(v,h,n,l,o,i,e)}:null,u=e.getBaseAxis().isHorizontal(),p=ho(e,t,r,function(){var v=a._endLabel;v&&t&&l.originalX!=null&&v.attr({x:l.originalX,y:l.originalY})},s);if(!r.get("clip",!0)){var f=p.shape,c=Math.max(f.width,f.height);u?(f.y-=c,f.height+=c*2):(f.x-=c,f.width+=c*2)}return s&&s(1,p),p}else return mo(e,t,r)}function qf(a,e){var t=e.getBaseAxis(),r=t.isHorizontal(),i=t.inverse,o=r?i?"right":"left":"center",n=r?"middle":i?"top":"bottom";return{normal:{align:a.get("align")||o,verticalAlign:a.get("verticalAlign")||n}}}var Kf=(function(a){V(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e.prototype.init=function(){var t=new K,r=new Xe;this.group.add(r.group),this._symbolDraw=r,this._lineGroup=t,this._changePolyState=ot(this._changePolyState,this)},e.prototype.render=function(t,r,i){var o=t.coordinateSystem,n=this.group,l=t.getData(),s=t.getModel("lineStyle"),u=t.getModel("areaStyle"),p=l.getLayout("points")||[],f=o.type==="polar",c=this._coordSys,v=this._symbolDraw,h=this._polyline,m=this._polygon,d=this._lineGroup,y=!r.ssr&&t.get("animation"),g=!u.isEmpty(),S=u.get("origin"),x=oi(o,l,S),_=g&&Bf(o,l,x),b=t.get("showSymbol"),w=t.get("connectNulls"),I=b&&!f&&Wf(t,l,o),C=this._data;C&&C.eachItemGraphicEl(function(W,pt){W.__temp&&(n.remove(W),C.setItemGraphicEl(pt,null))}),b||v.remove(),n.add(d);var L=f?!1:t.get("step"),D;o&&o.getArea&&t.get("clip",!0)&&(D=o.getArea(),D.width!=null?(D.x-=.1,D.y-=.1,D.width+=.2,D.height+=.2):D.r0&&(D.r0-=.5,D.r+=.5)),this._clipShapeForSymbol=D;var A=Ff(l,o,i)||l.getVisual("style")[l.getVisual("drawType")];if(!(h&&c.type===o.type&&L===this._step))b&&v.updateData(l,{isIgnore:I,clipShape:D,disableAnimation:!0,getSymbolPoint:function(W){return[p[W*2],p[W*2+1]]}}),y&&this._initSymbolLabelAnimation(l,o,D),L&&(_&&(_=rr(_,p,o,L,w)),p=rr(p,null,o,L,w)),h=this._newPolyline(p),g?m=this._newPolygon(p,_):m&&(d.remove(m),m=this._polygon=null),f||this._initOrUpdateEndLabel(t,o,no(A)),d.setClipPath(go(this,o,!0,t));else{g&&!m?m=this._newPolygon(p,_):m&&!g&&(d.remove(m),m=this._polygon=null),f||this._initOrUpdateEndLabel(t,o,no(A));var E=d.getClipPath();if(E){var z=go(this,o,!1,t);nt(E,{shape:z.shape},t)}else d.setClipPath(go(this,o,!0,t));b&&v.updateData(l,{isIgnore:I,clipShape:D,disableAnimation:!0,getSymbolPoint:function(W){return[p[W*2],p[W*2+1]]}}),(!jl(this._stackedOnPoints,_)||!jl(this._points,p))&&(y?this._doUpdateAnimation(l,_,o,i,L,S,w):(L&&(_&&(_=rr(_,p,o,L,w)),p=rr(p,null,o,L,w)),h.setShape({points:p}),m&&m.setShape({points:p,stackedOnPoints:_})))}var P=t.getModel("emphasis"),T=P.get("focus"),N=P.get("blurScope"),R=P.get("disabled");if(h.useStyle(Ct(s.getLineStyle(),{fill:"none",stroke:A,lineJoin:"bevel"})),lt(h,t,"lineStyle"),h.style.lineWidth>0&&t.get(["emphasis","lineStyle","width"])==="bolder"){var M=h.getState("emphasis").style;M.lineWidth=+h.style.lineWidth+1}at(h).seriesIndex=t.seriesIndex,J(h,T,N,R);var O=$l(t.get("smooth")),U=t.get("smoothMonotone");if(h.setShape({smooth:O,smoothMonotone:U,connectNulls:w}),m){var G=l.getCalculationInfo("stackedOnSeries"),F=0;m.useStyle(Ct(u.getAreaStyle(),{fill:A,opacity:.7,lineJoin:"bevel",decal:l.getVisual("style").decal})),G&&(F=$l(G.get("smooth"))),m.setShape({smooth:O,stackedOnSmooth:F,smoothMonotone:U,connectNulls:w}),lt(m,t,"areaStyle"),at(m).seriesIndex=t.seriesIndex,J(m,T,N,R)}var Z=this._changePolyState;l.eachItemGraphicEl(function(W){W&&(W.onHoverStateChange=Z)}),this._polyline.onHoverStateChange=Z,this._data=l,this._coordSys=o,this._stackedOnPoints=_,this._points=p,this._step=L,this._valueOrigin=S;var j=t.get("triggerEvent"),Dt=t.get("triggerLineEvent"),Gt=Dt===!0||j===!0||j==="line",et=Dt===!0||j===!0||j==="area";this.packEventData(t,h,Gt),m&&this.packEventData(t,m,et)},e.prototype.packEventData=function(t,r,i){at(r).eventData=i?{componentType:"series",componentSubType:"line",componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:"line",selfType:r===this._polygon?"area":"line"}:null},e.prototype.highlight=function(t,r,i,o){var n=t.getData(),l=Ki(n,o);if(this._changePolyState("emphasis"),!(l instanceof Array)&&l!=null&&l>=0){var s=n.getLayout("points"),u=n.getItemGraphicEl(l);if(!u){var p=s[l*2],f=s[l*2+1];if(qt(p,f)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(p,f))return;var c=t.get("zlevel")||0,v=t.get("z")||0;u=new yr(n,l),u.x=p,u.y=f,u.setZ(c,v);var h=u.getSymbolPath().getTextContent();h&&(h.zlevel=c,h.z=v,h.z2=this._polyline.z2+1),u.__temp=!0,n.setItemGraphicEl(l,u),u.stopSymbolAnimation(!0),this.group.add(u)}u.highlight()}else q.prototype.highlight.call(this,t,r,i,o)},e.prototype.downplay=function(t,r,i,o){var n=t.getData(),l=Ki(n,o);if(this._changePolyState("normal"),l!=null&&l>=0){var s=n.getItemGraphicEl(l);s&&(s.__temp?(n.setItemGraphicEl(l,null),this.group.remove(s)):s.downplay())}else q.prototype.downplay.call(this,t,r,i,o)},e.prototype._changePolyState=function(t){var r=this._polygon;mr(this._polyline,t),r&&mr(r,t)},e.prototype._newPolyline=function(t){var r=this._polyline;return r&&this._lineGroup.remove(r),r=new Kl({shape:{points:t},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(r),this._polyline=r,r},e.prototype._newPolygon=function(t,r){var i=this._polygon;return i&&this._lineGroup.remove(i),i=new li({shape:{points:t,stackedOnPoints:r},segmentIgnoreThreshold:2}),this._lineGroup.add(i),this._polygon=i,i},e.prototype._initSymbolLabelAnimation=function(t,r,i){var o,n,l=r.getBaseAxis(),s=l.inverse;r.type==="cartesian2d"?(o=l.isHorizontal(),n=!1):r.type==="polar"&&(o=l.dim==="angle",n=!0);var u=t.hostModel,p=u.get("animationDuration");gt(p)&&(p=p(null));var f=u.get("animationDelay")||0,c=gt(f)?f(null):f;t.eachItemGraphicEl(function(v,h){var m=v;if(m){var d=[v.x,v.y],y=void 0,g=void 0,S=void 0;if(i)if(n){var x=i,_=r.pointToCoord(d);o?(y=x.startAngle,g=x.endAngle,S=-_[1]/180*Math.PI):(y=x.r0,g=x.r,S=_[0])}else{var b=i;o?(y=b.x,g=b.x+b.width,S=v.x):(y=b.y+b.height,g=b.y,S=v.y)}var w=g===y?0:(S-y)/(g-y);s&&(w=1-w);var I=gt(f)?f(h):p*w+c,C=m.getSymbolPath(),L=C.getTextContent();m.attr({scaleX:0,scaleY:0}),m.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:I}),L&&L.animateFrom({style:{opacity:0}},{duration:300,delay:I}),C.disableLabelAnimation=!0}})},e.prototype._initOrUpdateEndLabel=function(t,r,i){var o=t.getModel("endLabel");if(es(t)){var n=t.getData(),l=this._polyline,s=n.getLayout("points");if(!s){l.removeTextContent(),this._endLabel=null;return}var u=this._endLabel;u||(u=this._endLabel=new Lt({z2:200}),u.ignoreClip=!0,l.setTextContent(this._endLabel),l.disableLabelAnimation=!0);var p=Zf(s);p>=0&&(ht(l,ct(t,"endLabel"),{inheritColor:i,labelFetcher:t,labelDataIndex:p,defaultText:function(f,c,v){return v!=null?qa(n,v):Pe(n,f)},enableTextSetter:!0},qf(o,r)),l.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},e.prototype._endLabelOnDuring=function(t,r,i,o,n,l,s){var u=this._endLabel,p=this._polyline;if(u){t<1&&o.originalX==null&&(o.originalX=u.x,o.originalY=u.y);var f=i.getLayout("points"),c=i.hostModel,v=c.get("connectNulls"),h=l.get("precision"),m=l.get("distance")||0,d=s.getBaseAxis(),y=d.isHorizontal(),g=d.inverse,S=r.shape,x=g?y?S.x:S.y+S.height:y?S.x+S.width:S.y,_=(y?m:0)*(g?-1:1),b=(y?0:-m)*(g?-1:1),w=y?"x":"y",I=Xf(f,x,w),C=I.range,L=C[1]-C[0],D=void 0;if(L>=1){if(L>1&&!v){var A=ts(f,C[0]);u.attr({x:A[0]+_,y:A[1]+b}),n&&(D=c.getRawValue(C[0]))}else{var A=p.getPointOn(x,w);A&&u.attr({x:A[0]+_,y:A[1]+b});var E=c.getRawValue(C[0]),z=c.getRawValue(C[1]);n&&(D=rl(i,h,E,z,I.t))}o.lastFrameIndex=C[0]}else{var P=t===1||o.lastFrameIndex>0?C[0]:0,A=ts(f,P);n&&(D=c.getRawValue(P)),u.attr({x:A[0]+_,y:A[1]+b})}if(n){var T=Va(u);typeof T.setLabelText=="function"&&T.setLabelText(D)}}},e.prototype._doUpdateAnimation=function(t,r,i,o,n,l,s){var u=this._polyline,p=this._polygon,f=t.hostModel,c=co(this._data,t,this._stackedOnPoints,r,this._coordSys,i,this._valueOrigin,l),v=c.current,h=c.stackedOnCurrent,m=c.next,d=c.stackedOnNext;if(n&&(h=rr(c.stackedOnCurrent,c.current,i,n,s),v=rr(c.current,null,i,n,s),d=rr(c.stackedOnNext,c.next,i,n,s),m=rr(c.next,null,i,n,s)),Ql(v,m)>3e3||p&&Ql(h,d)>3e3){u.stopAnimation(),u.setShape({points:m}),p&&(p.stopAnimation(),p.setShape({points:m,stackedOnPoints:d}));return}u.shape.__points=c.current,u.shape.points=v;var y={shape:{points:m}};c.current!==v&&(y.shape.__points=c.next),u.stopAnimation(),tt(u,y,f),p&&(p.setShape({points:v,stackedOnPoints:h}),p.stopAnimation(),tt(p,{shape:{stackedOnPoints:d}},f),u.shape.points!==p.shape.points&&(p.shape.points=u.shape.points));for(var g=[],S=c.status,x=0;x<S.length;x++){var _=S[x].cmd;if(_==="="){var b=t.getItemGraphicEl(S[x].idx1);b&&g.push({el:b,ptIdx:x})}}u.animators&&u.animators.length&&u.animators[0].during(function(){p&&p.dirtyShape();for(var w=u.shape.__points,I=0;I<g.length;I++){var C=g[I].el,L=g[I].ptIdx*2;C.x=w[L],C.y=w[L+1],C.markRedraw()}})},e.prototype.remove=function(t){var r=this.group,i=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),i&&i.eachItemGraphicEl(function(o,n){o.__temp&&(r.remove(o),i.setItemGraphicEl(n,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._endLabel=this._data=null},e.type="line",e})(q),rs=Kf;function ce(a,e){return{seriesType:a,plan:ye(),reset:function(t){var r=t.getData(),i=t.coordinateSystem,o=t.pipelineContext,n=e||o.large;if(i){var l=X(i.dimensions,function(v){return r.mapDimension(v)}).slice(0,2),s=l.length,u=r.getCalculationInfo("stackResultDimension");Ye(r,l[0])&&(l[0]=u),Ye(r,l[1])&&(l[1]=u);var p=r.getStore(),f=r.getDimensionIndex(l[0]),c=r.getDimensionIndex(l[1]);return s&&{progress:function(v,h){for(var m=v.end-v.start,d=n&&Ht(m*s),y=[],g=[],S=v.start,x=0;S<v.end;S++){var _=void 0;if(s===1){var b=p.get(f,S);_=i.dataToPoint(b,null,g)}else y[0]=p.get(f,S),y[1]=p.get(c,S),_=i.dataToPoint(y,null,g);n?(d[x++]=_[0],d[x++]=_[1]):h.setItemLayout(S,_.slice())}n&&(h.setLayout("points",d),h.setLayout("pointsRange",{start:v.start,end:v.end}))}}}}}}var jf={average:function(a){for(var e=0,t=0,r=0;r<a.length;r++)isNaN(a[r])||(e+=a[r],t++);return t===0?NaN:e/t},sum:function(a){for(var e=0,t=0;t<a.length;t++)e+=a[t]||0;return e},max:function(a){for(var e=-1/0,t=0;t<a.length;t++)a[t]>e&&(e=a[t]);return isFinite(e)?e:NaN},min:function(a){for(var e=1/0,t=0;t<a.length;t++)a[t]<e&&(e=a[t]);return isFinite(e)?e:NaN},nearest:function(a){return a[0]}},Jf=function(a){return Math.round(a.length/2)};function ma(a){return{seriesType:a,reset:function(e,t,r){var i=e.getData(),o=e.get("sampling"),n=e.coordinateSystem,l=i.count();if(l>10&&n.type==="cartesian2d"&&o){var s=n.getBaseAxis(),u=n.getOtherAxis(s),p=s.getExtent(),f=r.getDevicePixelRatio(),c=Math.abs(p[1]-p[0])*(f||1),v=Math.round(l/c);if(isFinite(v)&&v>1){o==="lttb"?e.setData(i.lttbDownSample(i.mapDimension(u.dim),1/v)):o==="minmax"&&e.setData(i.minmaxDownSample(i.mapDimension(u.dim),1/v));var h=void 0;dt(o)?h=jf[o]:gt(o)&&(h=o),h&&e.setData(i.downSample(i.mapDimension(u.dim),1/v,h,Jf))}}}}}function Qf(a){a.registerChartView(rs),a.registerSeriesModel(Xl),a.registerLayout(ce("line",!0)),a.registerVisual({seriesType:"line",reset:function(e){var t=e.getData(),r=e.getModel("lineStyle").getLineStyle();r&&!r.stroke&&(r.stroke=t.getVisual("style").fill),t.setVisual("legendLineStyle",r)}}),a.registerProcessor(a.PRIORITY.PROCESSOR.STATISTIC,ma("line"))}var $f=zr(),yo="__ec_stack_";function as(a){return a.get("stack")||yo+a.seriesIndex}function is(a){if(bl(a.axis.scale)){for(var e=Ut(a.axis),t=[],r=0;r<a.count;r++)t.push(Ct({stackId:yo+r},a));for(var i=os({bandWidthResult:e,seriesInfo:t}),o=[],r=0;r<a.count;r++){var n=i[yo+r];n.offsetCenter=n.offset+n.width/2,o.push(n)}return o}}function tc(a,e){var t=ec(a,e);return t.columnMap=os(t),t}function ec(a,e){var t=ha(e,Wr),r=[],i=Ut(a,{fromStat:{key:t},min:1});return gr(a,t,function(o){r.push({barWidth:H(o.get("barWidth"),i.w),barMaxWidth:H(o.get("barMaxWidth"),i.w),barMinWidth:H(o.get("barMinWidth")||(ns(o)?.5:1),i.w),barGap:o.get("barGap"),barCategoryGap:o.get("barCategoryGap"),defaultBarGap:o.get("defaultBarGap"),stackId:as(o)})}),{bandWidthResult:i,seriesInfo:r}}function os(a){var e=a.bandWidthResult.w,t=e,r=0,i,o,n=[],l={};k(a.seriesInfo,function(m,d){d||(o=m.defaultBarGap||0);var y=m.stackId;Qt(l,y)||r++;var g=l[y];g||(g=l[y]={width:0,maxWidth:0},n.push(y));var S=m.barWidth;S&&!g.width&&(g.width=S,S=Ae(t,S),t-=S);var x=m.barMaxWidth;x&&(g.maxWidth=x);var _=m.barMinWidth;_&&(g.minWidth=_);var b=m.barGap;b!=null&&(o=b);var w=m.barCategoryGap;w!=null&&(i=w)}),i==null&&(i=de(35-n.length*4,15)+"%");var s=H(i,e),u=H(o,1),p=(t-s)/(r+(r-1)*u);p=de(p,0),k(n,function(m){var d=l[m],y=d.maxWidth,g=d.minWidth;if(d.width){var S=d.width;y&&(S=Ae(S,y)),g&&(S=de(S,g)),d.width=S,t-=S+u*S,r--}else{var S=p;y&&y<S&&(S=Ae(y,t)),g&&g>S&&(S=g),S!==p&&(d.width=S,t-=S+u*S,r--)}}),p=(t-s)/(r+(r-1)*u),p=de(p,0);var f=0,c;k(n,function(m){var d=l[m];d.width||(d.width=p),c=d,f+=d.width*(1+u)}),c&&(f-=c.width*u);var v={},h=-f/2;return k(n,function(m){var d=l[m];v[m]=v[m]||{bandWidth:e,offset:h,width:d.width},h+=d.width*(1+u)}),v}function ui(a){return{seriesType:a,overallReset:function(e){var t=ha(a,Wr);Za(e,t,function(r){var i=tc(r,a);gr(r,t,function(o){var n=i.columnMap[as(o)];o.getData().setLayout({bandWidth:n.bandWidth,offset:n.offset,size:n.width})})})}}}function pi(a){return{seriesType:a,plan:ye(),reset:function(e){if(Cl(e)){var t=e.getData(),r=e.coordinateSystem,i=r.getBaseAxis(),o=r.getOtherAxis(i),n=t.getDimensionIndex(t.mapDimension(o.dim)),l=t.getDimensionIndex(t.mapDimension(i.dim)),s=e.get("showBackground",!0),u=t.mapDimension(o.dim),p=t.getCalculationInfo("stackResultDimension"),f=Ye(t,u)&&!!t.getCalculationInfo("stackedOnSeries"),c=o.isHorizontal(),v=o.toGlobalCoord(o.dataToCoord(Tl(o))),h=ns(e),m=e.get("barMinHeight")||0,d=p&&t.getDimensionIndex(p),y=t.getLayout("size"),g=t.getLayout("offset");return{progress:function(S,x){for(var _=S.count,b=h&&Ht(_*3),w=h&&s&&Ht(_*3),I=h&&Ht(_),C=r.master.getRect(),L=c?C.width:C.height,D,A=x.getStore(),E=0;(D=S.next())!=null;){var z=A.get(f?d:n,D),P=A.get(l,D),T=v,N=void 0;f&&(N=+z-A.get(n,D));var R=void 0,M=void 0,O=void 0,U=void 0;if(c){var G=r.dataToPoint([z,P]);f&&(T=r.dataToPoint([N,P])[0]),R=T,M=G[1]+g,O=G[0]-T,U=y,Yi(O)<m&&(O=(O<0?-1:1)*m)}else{var G=r.dataToPoint([P,z]);f&&(T=r.dataToPoint([P,N])[1]),R=G[0]+g,M=T,O=y,U=G[1]-T,Yi(U)<m&&(U=(U<=0?-1:1)*m)}h?(b[E]=R,b[E+1]=M,b[E+2]=c?O:U,w&&(w[E]=c?C.x:R,w[E+1]=c?M:C.y,w[E+2]=L),I[D]=D):x.setItemLayout(D,{x:R,y:M,width:O,height:U}),E+=3}h&&x.setLayout({largePoints:b,largeDataIndices:I,largeBackgroundPoints:w,valueAxisHorizontal:c})}}}}}}function ns(a){return a.pipelineContext&&a.pipelineContext.large}function rc(a){return Fr(ha(a,Wr))}function fi(a){$f(a,function(){function e(t){var r=ha(t,Wr);El(a,r,t,Wr),Hr(r,rc(t))}e("bar"),e("pictorialBar")})}var ls=(function(a){V(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 Et(null,this,{useEncodeDefaulter:!0})},e.prototype.getMarkerPosition=function(t,r,i){var o=this.coordinateSystem;if(o&&o.clampData){var n=o.clampData(t),l=o.dataToPoint(n);if(i)k(o.getAxes(),function(c,v){if(c.type==="category"&&r!=null){var h=c.getTicksCoords(),m=c.getTickModel().get("alignWithLabel"),d=n[v],y=r[v]==="x1"||r[v]==="y1";if(y&&!m&&(d+=1),h.length<2)return;if(h.length===2){l[v]=c.toGlobalCoord(c.getExtent()[y?1:0]);return}for(var g=void 0,S=void 0,x=1,_=0;_<h.length;_++){var b=h[_].coord,w=_===h.length-1?h[_-1].tickValue+x:h[_].tickValue;if(w===d){S=b;break}else if(w<d)g=b;else if(g!=null&&w>d){S=(b+g)/2;break}_===1&&(x=w-h[0].tickValue)}S==null&&(g?g&&(S=h[h.length-1].coord):S=h[0].coord),l[v]=c.toGlobalCoord(S)}});else{var s=this.getData(),u=s.getLayout("offset"),p=s.getLayout("size"),f=o.getBaseAxis().isHorizontal()?0:1;l[f]+=u+p/2}return l}return[NaN,NaN]},e.prototype.__requireStartValue=function(t){return this.getBaseAxis()!==t},e.type="series.__base_bar__",e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod",defaultBarGap:"10%"},e})(Q);Q.registerClass(ls);var qr=ls;var ac=(function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(){return Et(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},e.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},e.prototype.__preparePipelineContext=function(t,r){var i=al(this,t,r);return i.progressiveRender&&(i.large=!0),i},e.prototype.brushSelector=function(t,r,i){return i.rect(r.getItemLayout(t))},e.type="series."+Ee,e.dependencies=["grid","polar"],e.defaultOption=Oa(qr.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:Y.color.primary,borderWidth:2}},realtimeSort:!1}),e})(qr),ss=ac;var ic=(function(){function a(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return a})(),oc=(function(a){V(e,a);function e(t){var r=a.call(this,t)||this;return r.type="sausage",r}return e.prototype.getDefaultShape=function(){return new ic},e.prototype.buildPath=function(t,r){var i=r.cx,o=r.cy,n=Math.max(r.r0||0,0),l=Math.max(r.r,0),s=(l-n)*.5,u=n+s,p=r.startAngle,f=r.endAngle,c=r.clockwise,v=Math.PI*2,h=c?f-p<v:p-f<v;h||(p=f-(c?v:-v));var m=Math.cos(p),d=Math.sin(p),y=Math.cos(f),g=Math.sin(f);h?(t.moveTo(m*n+i,d*n+o),t.arc(m*u+i,d*u+o,s,-Math.PI+p,p,!c)):t.moveTo(m*l+i,d*l+o),t.arc(i,o,l,p,f,!c),t.arc(y*u+i,g*u+o,s,f-Math.PI*2,f-Math.PI,!c),n!==0&&t.arc(i,o,n,f,p,c)},e})(ft),Kr=oc;function us(a,e){e=e||{};var t=e.isRoundCap;return function(r,i,o){var n=i.position;if(!n||n instanceof Array)return Wi(r,i,o);var l=a(n),s=i.distance!=null?i.distance:5,u=this.shape,p=u.cx,f=u.cy,c=u.r,v=u.r0,h=(c+v)/2,m=u.startAngle,d=u.endAngle,y=(m+d)/2,g=t?Math.abs(c-v)/2:0,S=Math.cos,x=Math.sin,_=p+c*S(m),b=f+c*x(m),w="left",I="top";switch(l){case"startArc":_=p+(v-s)*S(y),b=f+(v-s)*x(y),w="center",I="top";break;case"insideStartArc":_=p+(v+s)*S(y),b=f+(v+s)*x(y),w="center",I="bottom";break;case"startAngle":_=p+h*S(m)+ci(m,s+g,!1),b=f+h*x(m)+vi(m,s+g,!1),w="right",I="middle";break;case"insideStartAngle":_=p+h*S(m)+ci(m,-s+g,!1),b=f+h*x(m)+vi(m,-s+g,!1),w="left",I="middle";break;case"middle":_=p+h*S(y),b=f+h*x(y),w="center",I="middle";break;case"endArc":_=p+(c+s)*S(y),b=f+(c+s)*x(y),w="center",I="bottom";break;case"insideEndArc":_=p+(c-s)*S(y),b=f+(c-s)*x(y),w="center",I="top";break;case"endAngle":_=p+h*S(d)+ci(d,s+g,!0),b=f+h*x(d)+vi(d,s+g,!0),w="left",I="middle";break;case"insideEndAngle":_=p+h*S(d)+ci(d,-s+g,!0),b=f+h*x(d)+vi(d,-s+g,!0),w="right",I="middle";break;default:return Wi(r,i,o)}return r=r||{},r.x=_,r.y=b,r.align=w,r.verticalAlign=I,r}}function ps(a,e,t,r){if(yt(r)){a.setTextConfig({rotation:r});return}else if($(e)){a.setTextConfig({rotation:0});return}var i=a.shape,o=i.clockwise?i.startAngle:i.endAngle,n=i.clockwise?i.endAngle:i.startAngle,l=(o+n)/2,s,u=t(e);switch(u){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":s=l;break;case"startAngle":case"insideStartAngle":s=o;break;case"endAngle":case"insideEndAngle":s=n;break;default:a.setTextConfig({rotation:0});return}var p=Math.PI*1.5-s;u==="middle"&&p>Math.PI/2&&p<Math.PI*1.5&&(p-=Math.PI),a.setTextConfig({rotation:p})}function ci(a,e,t){return e*Math.sin(a)*(t?-1:1)}function vi(a,e,t){return e*Math.cos(a)*(t?1:-1)}function Ft(a,e,t){var r=a.get("borderRadius");if(r==null)return t?{cornerRadius:0}:null;$(r)||(r=[r,r,r,r]);var i=Math.abs(e.r||0-e.r0||0);return{cornerRadius:X(r,function(o){return jn(o,i)})}}var So=Math.max,xo=Math.min,nc=(function(a){V(e,a);function e(){var t=a.call(this)||this;return t.type=Ee,t._isFirstFrame=!0,t}return e.prototype.render=function(t,r,i,o){this._model=t,this._removeOnRenderedListener(i),this._updateDrawMode(t);var n=t.get("coordinateSystem");(n==="cartesian2d"||n==="polar")&&(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(t,r,i):this._renderNormal(t,r,i,o))},e.prototype.incrementalPrepareRender=function(t){this._clear(),this._updateDrawMode(t),this._updateLargeClip(t)},e.prototype.incrementalRender=function(t,r){this._progressiveEls=[],this._incrementalRenderLarge(t,r)},e.prototype.eachRendered=function(t){Fe(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,r,i,o){var n=this.group,l=t.getData(),s=this._data,u=t.coordinateSystem,p=u.getBaseAxis(),f;u.type==="cartesian2d"?f=p.isHorizontal():u.type==="polar"&&(f=p.dim==="angle");var c=t.isAnimationEnabled()?t:null,v=lc(t,u);v&&this._enableRealtimeSort(v,l,i);var h=t.get("clip",!0)||v,m=u.getArea();n.removeClipPath();var d=t.get("roundCap",!0),y=t.get("showBackground",!0),g=t.getModel("backgroundStyle"),S=g.get("borderRadius")||0,x=[],_=this._backgroundEls,b=o&&o.isInitSort,w=o&&o.type==="changeAxisOrder";function I(D){var A=hi[u.type](l,D);if(!A)return null;var E=hc(u,f,A);return E.useStyle(g.getItemStyle()),u.type==="cartesian2d"?E.setShape("r",S):E.setShape("cornerRadius",S),x[D]=E,E}l.diff(s).add(function(D){var A=l.getItemModel(D),E=hi[u.type](l,D,A);if(E&&(y&&I(D),!(!l.hasValue(D)||!ms[u.type](E)))){var z=!1;h&&(z=fs[u.type](m,E));var P=cs[u.type](t,l,D,E,f,c,p.model,!1,d);v&&(P.forceLabelAnimation=!0),ds(P,l,D,A,E,t,f,u.type==="polar"),b?P.attr({shape:E}):v?vs(v,c,P,E,D,f,!1,!1):nt(P,{shape:E},t,D),l.setItemGraphicEl(D,P),n.add(P),P.ignore=z}}).update(function(D,A){var E=l.getItemModel(D),z=hi[u.type](l,D,E);if(z){if(y){var P=void 0;_.length===0?P=I(A):(P=_[A],P.useStyle(g.getItemStyle()),u.type==="cartesian2d"?P.setShape("r",S):P.setShape("cornerRadius",S),x[D]=P);var T=hi[u.type](l,D),N=_s(f,T,u);tt(P,{shape:N},c,D)}var R=s.getItemGraphicEl(A);if(!l.hasValue(D)||!ms[u.type](z)){n.remove(R);return}var M=!1;h&&(M=fs[u.type](m,z),M&&n.remove(R));var O=R&&(R.type==="sector"&&d||R.type==="sausage"&&!d);if(O&&(R&&re(R,t,A),R=null),R?wt(R):R=cs[u.type](t,l,D,z,f,c,p.model,!0,d),v&&(R.forceLabelAnimation=!0),w){var U=R.getTextContent();if(U){var G=Va(U);G.prevValue!=null&&(G.prevValue=G.value)}}else ds(R,l,D,E,z,t,f,u.type==="polar");b?R.attr({shape:z}):v?vs(v,c,R,z,D,f,!0,w):tt(R,{shape:z},t,D,null),l.setItemGraphicEl(D,R),R.ignore=M,n.add(R)}}).remove(function(D){var A=s.getItemGraphicEl(D);A&&re(A,t,D)}).execute();var C=this._backgroundGroup||(this._backgroundGroup=new K);C.removeAll();for(var L=0;L<x.length;++L)C.add(x[L]);n.add(C),this._backgroundEls=x,this._data=l},e.prototype._renderLarge=function(t,r,i){this._clear(),ys(t,this.group),this._updateLargeClip(t)},e.prototype._incrementalRenderLarge=function(t,r){this._removeBackground(),ys(r,this.group,this._progressiveEls,!0)},e.prototype._updateLargeClip=function(t){var r=t.get("clip",!0)&&jt(t.coordinateSystem,!1,t),i=this.group;r?i.setClipPath(r):i.removeClipPath()},e.prototype._enableRealtimeSort=function(t,r,i){var o=this;if(r.count()){var n=t.baseAxis;if(this._isFirstFrame)this._dispatchInitSort(r,t,i),this._isFirstFrame=!1;else{var l=function(s){var u=r.getItemGraphicEl(s),p=u&&u.shape;return p&&Math.abs(n.isHorizontal()?p.height:p.width)||0};this._onRendered=function(){o._updateSortWithinSameData(r,l,n,i)},i.getZr().on("rendered",this._onRendered)}}},e.prototype._dataSort=function(t,r,i){var o=[];return t.each(t.mapDimension(r.dim),function(n,l){var s=i(l);s=s??NaN,o.push({dataIndex:l,mappedValue:s,ordinalNumber:n})}),o.sort(function(n,l){return l.mappedValue-n.mappedValue}),{ordinalNumbers:X(o,function(n){return n.ordinalNumber})}},e.prototype._isOrderChangedWithinSameData=function(t,r,i){for(var o=i.scale,n=t.mapDimension(i.dim),l=Number.MAX_VALUE,s=0,u=o.getOrdinalMeta().categories.length;s<u;++s){var p=t.rawIndexOf(n,o.getRawOrdinalNumber(s)),f=p<0?Number.MIN_VALUE:r(t.indexOfRawIndex(p));if(f>l)return!0;l=f}return!1},e.prototype._isOrderDifferentInView=function(t,r){for(var i=r.scale,o=i.getExtent(),n=Math.max(0,o[0]),l=Math.min(o[1],i.getOrdinalMeta().categories.length-1);n<=l;++n)if(t.ordinalNumbers[n]!==i.getRawOrdinalNumber(n))return!0},e.prototype._updateSortWithinSameData=function(t,r,i,o){if(this._isOrderChangedWithinSameData(t,r,i)){var n=this._dataSort(t,i,r);this._isOrderDifferentInView(n,i)&&(this._removeOnRenderedListener(o),o.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",axisId:i.index,sortInfo:n}))}},e.prototype._dispatchInitSort=function(t,r,i){var o=r.baseAxis,n=this._dataSort(t,o,function(l){return t.get(t.mapDimension(r.otherAxis.dim),l)});i.dispatchAction({type:"changeAxisOrder",componentType:o.dim+"Axis",isInitSort:!0,axisId:o.index,sortInfo:n})},e.prototype.remove=function(t,r){this._clear(this._model),this._removeOnRenderedListener(r)},e.prototype.dispose=function(t,r){this._removeOnRenderedListener(r)},e.prototype._removeOnRenderedListener=function(t){this._onRendered&&(t.getZr().off("rendered",this._onRendered),this._onRendered=null)},e.prototype._clear=function(t){var r=this.group,i=this._data;t&&t.isAnimationEnabled()&&i&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],i.eachItemGraphicEl(function(o){re(o,t,at(o).dataIndex)})):r.removeAll(),this._data=null,this._isFirstFrame=!0},e.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},e.type=Ee,e})(q),fs={cartesian2d:function(a,e){var t=e.width<0?-1:1,r=e.height<0?-1:1;t<0&&(e.x+=e.width,e.width=-e.width),r<0&&(e.y+=e.height,e.height=-e.height);var i=a.x+a.width,o=a.y+a.height,n=So(e.x,a.x),l=xo(e.x+e.width,i),s=So(e.y,a.y),u=xo(e.y+e.height,o),p=l<n,f=u<s;return e.x=p&&n>i?l:n,e.y=f&&s>o?u:s,e.width=p?0:l-n,e.height=f?0:u-s,t<0&&(e.x+=e.width,e.width=-e.width),r<0&&(e.y+=e.height,e.height=-e.height),p||f},polar:function(a,e){var t=e.r0<=e.r?1:-1;if(t<0){var r=e.r;e.r=e.r0,e.r0=r}var i=xo(e.r,a.r),o=So(e.r0,a.r0);e.r=i,e.r0=o;var n=i-o<0;if(t<0){var r=e.r;e.r=e.r0,e.r0=r}return n}},cs={cartesian2d:function(a,e,t,r,i,o,n,l,s){var u=new bt({shape:B({},r),z2:1});if(u.__dataIndex=t,u.name="item",o){var p=u.shape,f=i?"height":"width";p[f]=0}return u},polar:function(a,e,t,r,i,o,n,l,s){var u=!i&&s?Kr:Bt,p=new u({shape:r,z2:1});p.name="item";var f=xs(i);if(p.calculateTextPosition=us(f,{isRoundCap:u===Kr}),o){var c=p.shape,v=i?"r":"endAngle",h={};c[v]=i?r.r0:r.startAngle,h[v]=r[v],(l?tt:nt)(p,{shape:h},o)}return p}};function lc(a,e){var t=a.get("realtimeSort",!0),r=e.getBaseAxis();if(t&&r.type==="category"&&e.type==="cartesian2d")return{baseAxis:r,otherAxis:e.getOtherAxis(r)}}function vs(a,e,t,r,i,o,n,l){var s,u;o?(u={x:r.x,width:r.width},s={y:r.y,height:r.height}):(u={y:r.y,height:r.height},s={x:r.x,width:r.width}),l||(n?tt:nt)(t,{shape:s},e,i,null);var p=e?a.baseAxis.model:null;(n?tt:nt)(t,{shape:u},p,i)}function hs(a,e){for(var t=0;t<e.length;t++)if(!isFinite(a[e[t]]))return!0;return!1}var sc=["x","y","width","height"],uc=["cx","cy","r","startAngle","endAngle"],ms={cartesian2d:function(a){return!hs(a,sc)},polar:function(a){return!hs(a,uc)}},hi={cartesian2d:function(a,e,t){var r=a.getItemLayout(e);if(!r)return null;var i=t?fc(t,r):0,o=r.width>0?1:-1,n=r.height>0?1:-1;return{x:r.x+o*i/2,y:r.y+n*i/2,width:r.width-o*i,height:r.height-n*i}},polar:function(a,e,t){var r=a.getItemLayout(e);return{cx:r.cx,cy:r.cy,r0:r.r0,r:r.r,startAngle:r.startAngle,endAngle:r.endAngle,clockwise:r.clockwise}}};function pc(a){return a.startAngle!=null&&a.endAngle!=null&&a.startAngle===a.endAngle}function xs(a){return(function(e){var t=e?"Arc":"Angle";return function(r){switch(r){case"start":case"insideStart":case"end":case"insideEnd":return r+t;default:return r}}})(a)}function ds(a,e,t,r,i,o,n,l){var s=e.getItemVisual(t,"style");if(l){if(!o.get("roundCap")){var p=a.shape,f=Ft(r.getModel("itemStyle"),p,!0);B(p,f),a.setShape(p)}}else{var u=r.get(["itemStyle","borderRadius"])||0;a.setShape("r",u)}a.useStyle(s);var c=r.getShallow("cursor");c&&a.attr("cursor",c);var v=l?n?i.r>=i.r0?"endArc":"startArc":i.endAngle>=i.startAngle?"endAngle":"startAngle":n?mc(i,o.coordinateSystem):dc(i,o.coordinateSystem),h=ct(r);ht(a,h,{labelFetcher:o,labelDataIndex:t,defaultText:Pe(o.getData(),t),inheritColor:s.fill,defaultOpacity:s.opacity,defaultOutsidePosition:v});var m=a.getTextContent();if(l&&m){var d=r.get(["label","position"]);a.textConfig.inside=d==="middle"?!0:null,ps(a,d==="outside"?v:d,xs(n),r.get(["label","rotate"]))}za(m,h,o.getRawValue(t),function(g){return qa(e,g)});var y=r.getModel(["emphasis"]);J(a,y.get("focus"),y.get("blurScope"),y.get("disabled")),lt(a,r),pc(i)&&(a.style.fill="none",a.style.stroke="none",k(a.states,function(g){g.style&&(g.style.fill=g.style.stroke="none")}))}function fc(a,e){var t=a.get(["itemStyle","borderColor"]);if(!t||t==="none")return 0;var r=a.get(["itemStyle","borderWidth"])||0,i=isNaN(e.width)?Number.MAX_VALUE:Math.abs(e.width),o=isNaN(e.height)?Number.MAX_VALUE:Math.abs(e.height);return Math.min(r,i,o)}var cc=(function(){function a(){}return a})(),gs=(function(a){V(e,a);function e(t){var r=a.call(this,t)||this;return r.type="largeBar",r}return e.prototype.getDefaultShape=function(){return new cc},e.prototype.buildPath=function(t,r){for(var i=r.points,o=this.baseDimIdx,n=1-this.baseDimIdx,l=[],s=[],u=this.barWidth,p=0;p<i.length;p+=3)s[o]=u,s[n]=i[p+2],l[o]=i[p+o],l[n]=i[p+n],t.rect(l[0],l[1],s[0],s[1])},e})(ft);function ys(a,e,t,r){var i=a.getData(),o=i.getLayout("valueAxisHorizontal")?1:0,n=i.getLayout("largeDataIndices"),l=i.getLayout("size"),s=a.getModel("backgroundStyle"),u=i.getLayout("largeBackgroundPoints"),p=r?Mt(a):0;if(u){var f=new gs({shape:{points:u},incremental:p,silent:!0,z2:0});f.baseDimIdx=o,f.largeDataIndices=n,f.barWidth=l,f.useStyle(s.getItemStyle()),e.add(f),t&&t.push(f)}var c=new gs({shape:{points:i.getLayout("largePoints")},incremental:p,ignoreCoarsePointer:!0,z2:1});c.baseDimIdx=o,c.largeDataIndices=n,c.barWidth=l,e.add(c),c.useStyle(i.getVisual("style")),c.style.stroke=null,at(c).seriesIndex=a.seriesIndex,a.get("silent")||(c.on("mousedown",Ss),c.on("mousemove",Ss)),t&&t.push(c)}var Ss=xl(function(a){var e=this,t=vc(e,a.offsetX,a.offsetY);at(e).dataIndex=t>=0?t:null},30,!1);function vc(a,e,t){for(var r=a.baseDimIdx,i=1-r,o=a.shape.points,n=a.largeDataIndices,l=[],s=[],u=a.barWidth,p=0,f=o.length/3;p<f;p++){var c=p*3;if(s[r]=u,s[i]=o[c+2],l[r]=o[c+r],l[i]=o[c+i],s[i]<0&&(l[i]+=s[i],s[i]=-s[i]),e>=l[0]&&e<=l[0]+s[0]&&t>=l[1]&&t<=l[1]+s[1])return n[p]}return-1}function _s(a,e,t){if(Sr(t,"cartesian2d")){var r=e,i=t.getArea();return{x:a?r.x:i.x,y:a?i.y:r.y,width:a?r.width:i.width,height:a?i.height:r.height}}else{var i=t.getArea(),o=e;return{cx:i.cx,cy:i.cy,r0:a?i.r0:o.r0,r:a?i.r:o.r,startAngle:a?o.startAngle:0,endAngle:a?o.endAngle:Math.PI*2}}}function hc(a,e,t){var r=a.type==="polar"?Bt:bt;return new r({shape:_s(e,t,a),silent:!0,z2:0})}function mc(a,e){if(a.height===0){var t=e.getOtherAxis(e.getBaseAxis());return t.inverse?"bottom":"top"}return a.height>0?"bottom":"top"}function dc(a,e){if(a.width===0){var t=e.getOtherAxis(e.getBaseAxis());return t.inverse?"left":"right"}return a.width>=0?"right":"left"}var bs=nc;function gc(a){a.registerChartView(bs),a.registerSeriesModel(ss),a.registerLayout(a.PRIORITY.VISUAL.LAYOUT,ui(Ee)),a.registerLayout(a.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,pi(Ee)),a.registerProcessor(a.PRIORITY.PROCESSOR.STATISTIC,ma(Ee)),a.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(e,t){var r=e.componentType||"series";t.eachComponent({mainType:r,query:e},function(i){e.sortInfo&&i.axis.setCategorySortInfo(e.sortInfo)})}),fi(a)}function ve(a){return{seriesType:a,reset:function(e,t){var r=t.findComponents({mainType:"legend"});if(!(!r||!r.length)){var i=e.getData();i.filterSelf(function(o){for(var n=i.getName(o),l=0;l<r.length;l++)if(!r[l].isSelected(n))return!1;return!0})}}}}var yc=(function(){function a(e,t){this._getDataWithEncodedVisual=e,this._getRawData=t}return a.prototype.getAllNames=function(){var e=this._getRawData();return e.mapArray(e.getName)},a.prototype.containName=function(e){var t=this._getRawData();return t.indexOfName(e)>=0},a.prototype.indexOfName=function(e){var t=this._getDataWithEncodedVisual();return t.indexOfName(e)},a.prototype.getItemVisual=function(e,t){var r=this._getDataWithEncodedVisual();return r.getItemVisual(e,t)},a})(),oe=yc;var he="pie",Sc=te(),ws=(function(a){V(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 oe(ot(this.getData,this),ot(this.getRawData,this)),this._defaultLabelLine(t)},e.prototype.mergeOption=function(){a.prototype.mergeOption.apply(this,arguments)},e.prototype.getInitialData=function(){return Se(this,{coordDimensions:["value"],encodeDefaulter:zt(Ba,this)})},e.prototype.getDataParams=function(t){var r=this.getData(),i=Sc(r),o=i.seats;if(!o){var n=[];r.each(r.mapDimension("value"),function(s){n.push(s)}),o=i.seats=Qn(n,r.hostModel.get("percentPrecision"))}var l=a.prototype.getDataParams.call(this,t);return l.percent=o[t]||0,l.$vars.push("percent"),l},e.prototype._defaultLabelLine=function(t){Vr(t,"labelLine",["show"]);var r=t.labelLine,i=t.emphasis.labelLine;r.show=r.show&&t.label.show,i.show=i.show&&t.emphasis.label.show},e.type="series."+he,e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"50%"],clockwise:!0,startAngle:90,endAngle:"auto",padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,coordinateSystemUsage:"box",left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:30,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},e})(Q);cl({fullType:ws.type,getCoord2:function(a){return a.getShallow("center")}});var Ds=ws;var yS=Math.PI*2,SS=Ca.CMD;function Is(a,e,t,r,i,o,n,l){var s=i-a,u=o-e,p=t-a,f=r-e,c=Math.sqrt(p*p+f*f);p/=c,f/=c;var v=s*p+u*f,h=v/c;l&&(h=Math.min(Math.max(h,0),1)),h*=c;var m=n[0]=a+h*p,d=n[1]=e+h*f;return Math.sqrt((m-i)*(m-i)+(d-o)*(d-o))}var ar=new _t,xt=new _t,Vt=new _t,ir=new _t,xe=new _t;var mi=[],Wt=new _t;function Ls(a,e){if(e<=180&&e>0){e=e/180*Math.PI,ar.fromArray(a[0]),xt.fromArray(a[1]),Vt.fromArray(a[2]),_t.sub(ir,ar,xt),_t.sub(xe,Vt,xt);var t=ir.len(),r=xe.len();if(!(t<.001||r<.001)){ir.scale(1/t),xe.scale(1/r);var i=ir.dot(xe),o=Math.cos(e);if(o<i){var n=Is(xt.x,xt.y,Vt.x,Vt.y,ar.x,ar.y,mi,!1);Wt.fromArray(mi),Wt.scaleAndAdd(xe,n/Math.tan(Math.PI-e));var l=Vt.x!==xt.x?(Wt.x-xt.x)/(Vt.x-xt.x):(Wt.y-xt.y)/(Vt.y-xt.y);if(isNaN(l))return;l<0?_t.copy(Wt,xt):l>1&&_t.copy(Wt,Vt),Wt.toArray(a[1])}}}}function As(a,e,t){if(t<=180&&t>0){t=t/180*Math.PI,ar.fromArray(a[0]),xt.fromArray(a[1]),Vt.fromArray(a[2]),_t.sub(ir,xt,ar),_t.sub(xe,Vt,xt);var r=ir.len(),i=xe.len();if(!(r<.001||i<.001)){ir.scale(1/r),xe.scale(1/i);var o=ir.dot(e),n=Math.cos(t);if(o<n){var l=Is(xt.x,xt.y,Vt.x,Vt.y,ar.x,ar.y,mi,!1);Wt.fromArray(mi);var s=Math.PI/2,u=Math.acos(xe.dot(e)),p=s+u-t;if(p>=s)_t.copy(Wt,Vt);else{Wt.scaleAndAdd(xe,l/Math.tan(Math.PI/2-p));var f=Vt.x!==xt.x?(Wt.x-xt.x)/(Vt.x-xt.x):(Wt.y-xt.y)/(Vt.y-xt.y);if(isNaN(f))return;f<0?_t.copy(Wt,xt):f>1&&_t.copy(Wt,Vt)}Wt.toArray(a[1])}}}}function _o(a,e,t,r){var i=t==="normal",o=i?a:a.ensureState(t);o.ignore=e;var n=r.get("smooth");n=n===!0?.3:Math.max(+n,0)||0,o.shape=o.shape||{},o.shape.smooth=n;var l=r.getModel("lineStyle").getLineStyle();i?a.useStyle(l):o.style=l}function xc(a,e){var t=e.smooth,r=e.points;if(r)if(a.moveTo(r[0][0],r[0][1]),t>0&&r.length>=3){var i=me(r[0],r[1]),o=me(r[1],r[2]);if(!i||!o){a.lineTo(r[1][0],r[1][1]),a.lineTo(r[2][0],r[2][1]);return}var n=Math.min(i,o)*t,l=wa([],r[1],r[0],n/i),s=wa([],r[1],r[2],n/o),u=wa([],l,s,.5);a.bezierCurveTo(l[0],l[1],l[0],l[1],u[0],u[1]),a.bezierCurveTo(s[0],s[1],s[0],s[1],r[2][0],r[2][1])}else for(var p=1;p<r.length;p++)a.lineTo(r[p][0],r[p][1])}function di(a,e,t){var r=a.getTextGuideLine(),i=a.getTextContent();if(!i){r&&a.removeTextGuideLine();return}for(var o=e.normal,n=o.get("show"),l=i.ignore,s=0;s<fa.length;s++){var u=fa[s],p=e[u],f=u==="normal";if(p){var c=p.get("show"),v=f?l:ke(i.states[u]&&i.states[u].ignore,l);if(v||!ke(c,n)){var h=f?r:r&&r.states[u];h&&(h.ignore=!0),r&&_o(r,!0,u,p);continue}r||(r=new ee,a.setTextGuideLine(r),!f&&(l||!n)&&_o(r,!0,"normal",e.normal),a.stateProxy&&(r.stateProxy=a.stateProxy)),_o(r,!1,u,p)}}if(r){Ct(r.style,t),r.style.fill=null;var m=o.get("showAbove"),d=a.textGuideLineConfig=a.textGuideLineConfig||{};d.showAbove=m||!1,r.buildPath=xc}}function gi(a,e){e=e||"labelLine";for(var t={normal:a.getModel(e)},r=0;r<Be.length;r++){var i=Be[r];t[i]=a.getModel([i,e])}return t}var _c=Math.PI/180;function Ps(a,e,t,r,i,o,n,l,s,u){if(a.length<2)return;function p(m){for(var d=m.rB,y=d*d,g=0;g<m.list.length;g++){var S=m.list[g],x=Math.abs(S.label.y-t),_=r+S.len,b=_*_,w=Math.sqrt(Math.abs((1-x*x/y)*b)),I=e+(w+S.len2)*i,C=I-S.label.x,L=S.targetTextWidth-C*i;Es(S,L,!0),S.label.x=I}}function f(m){for(var d={list:[],maxY:0},y={list:[],maxY:0},g=0;g<m.length;g++)if(m[g].labelAlignTo==="none"){var S=m[g],x=S.label.y>t?y:d,_=Math.abs(S.label.y-t);if(_>=x.maxY){var b=S.label.x-e-S.len2*i,w=r+S.len,I=Math.abs(b)<w?Math.sqrt(_*_/(1-b*b/w/w)):w;x.rB=I,x.maxY=_}x.list.push(S)}p(d),p(y)}for(var c=a.length,v=0;v<c;v++)if(a[v].position==="outer"&&a[v].labelAlignTo==="labelLine"){var h=a[v].label.x-u;a[v].linePoints[1][0]+=h,a[v].label.x=u}Ll(a,1,s,s+n)&&f(a)}function bc(a,e,t,r,i,o,n,l){for(var s=[],u=[],p=Number.MAX_VALUE,f=-Number.MAX_VALUE,c=0;c<a.length;c++){var v=a[c].label;bo(a[c])||(v.x<e?(p=Math.min(p,v.x),s.push(a[c])):(f=Math.max(f,v.x),u.push(a[c])))}for(var c=0;c<a.length;c++){var h=a[c];if(!bo(h)&&h.linePoints){if(h.labelStyleWidth!=null)continue;var v=h.label,m=h.linePoints,d=void 0;h.labelAlignTo==="edge"?v.x<e?d=m[2][0]-h.labelDistance-n-h.edgeDistance:d=n+i-h.edgeDistance-m[2][0]-h.labelDistance:h.labelAlignTo==="labelLine"?v.x<e?d=p-n-h.bleedMargin:d=n+i-f-h.bleedMargin:v.x<e?d=v.x-n-h.bleedMargin:d=n+i-v.x-h.bleedMargin,h.targetTextWidth=d,Es(h,d,!1)}}Ps(u,e,t,r,1,i,o,n,l,f),Ps(s,e,t,r,-1,i,o,n,l,p);for(var c=0;c<a.length;c++){var h=a[c];if(!bo(h)&&h.linePoints){var v=h.label,m=h.linePoints,y=h.labelAlignTo==="edge",g=v.style.padding,S=g?g[1]+g[3]:0,x=v.style.backgroundColor?0:S,_=h.rect.width+x,b=m[1][0]-m[2][0];y?v.x<e?m[2][0]=n+h.edgeDistance+_+h.labelDistance:m[2][0]=n+i-h.edgeDistance-_-h.labelDistance:(v.x<e?m[2][0]=v.x+h.labelDistance:m[2][0]=v.x-h.labelDistance,m[1][0]=m[2][0]+b),m[1][1]=m[2][1]=v.y}}}function Es(a,e,t){if(a.labelStyleWidth==null){var r=a.label,i=r.style,o=a.rect,n=i.backgroundColor,l=i.padding,s=l?l[1]+l[3]:0,u=i.overflow,p=o.width+(n?0:s);if(e<p||t){if(u&&u.match("break")){r.setStyle("backgroundColor",null),r.setStyle("width",e-s);var f=r.getBoundingRect();r.setStyle("width",Math.ceil(f.width)),r.setStyle("backgroundColor",n)}else{var c=e-s,v=e<p?c:t?c>a.unconstrainedWidth?null:c:null;r.setStyle("width",v)}Ts(o,r)}}}function Ts(a,e){Cs.rect=a,Il(Cs,e,wc)}var wc={minMarginForce:[null,0,null,0],marginDefault:[1,0,1,0]},Cs={};function bo(a){return a.position==="center"}function wo(a){var e=a.getData(),t=[],r,i,o=!1,n=(a.get("minShowLabelAngle")||0)*_c,l=e.getLayout("viewRect"),s=e.getLayout("r"),u=l.width,p=l.x,f=l.y,c=l.height;function v(b){b.ignore=!0}function h(b){if(!b.ignore)return!0;for(var w in b.states)if(b.states[w].ignore===!1)return!0;return!1}e.each(function(b){var w=e.getItemGraphicEl(b),I=w.shape,C=w.getTextContent(),L=w.getTextGuideLine(),D=e.getItemModel(b),A=D.getModel("label"),E=A.get("position")||D.get(["emphasis","label","position"]),z=A.get("distanceToLabelLine"),P=A.get("alignTo"),T=H(A.get("edgeDistance"),u),N=A.get("bleedMargin");N==null&&(N=Math.min(u,c)>200?10:2);var R=D.getModel("labelLine"),M=R.get("length");M=H(M,u);var O=R.get("length2");if(O=H(O,u),Math.abs(I.endAngle-I.startAngle)<n){k(C.states,v),C.ignore=!0,L&&(k(L.states,v),L.ignore=!0);return}if(h(C)){var U=(I.startAngle+I.endAngle)/2,G=Math.cos(U),F=Math.sin(U),Z,j,Dt,Gt;r=I.cx,i=I.cy;var et=E==="inside"||E==="inner";if(E==="center")Z=I.cx,j=I.cy,Gt="center";else{var W=(et?(I.r+I.r0)/2*G:I.r*G)+r,pt=(et?(I.r+I.r0)/2*F:I.r*F)+i;if(Z=W+G*3,j=pt+F*3,!et){var st=W+G*(M+s-I.r),vt=pt+F*(M+s-I.r),It=st+(G<0?-1:1)*O,Yt=vt;P==="edge"?Z=G<0?p+T:p+u-T:Z=It+(G<0?-z:z),j=Yt,Dt=[[W,pt],[st,vt],[It,Yt]]}Gt=et?"center":P==="edge"?G>0?"right":"left":G>0?"left":"right"}var mt=Math.PI,Pt=0,Tt=A.get("rotate");if(yt(Tt))Pt=Tt*(mt/180);else if(E==="center")Pt=0;else if(Tt==="radial"||Tt===!0){var Oe=G<0?-U+mt:-U;Pt=Oe}else if(Tt==="tangential"||Tt==="tangential-noflip"&&E!=="outside"&&E!=="outer"){var De=Math.atan2(G,F);De<0&&(De=mt*2+De);var ba=F>0;ba&&Tt!=="tangential-noflip"&&(De=mt+De),Pt=De-mt}if(o=!!Pt,C.x=Z,C.y=j,C.rotation=Pt,C.setStyle({verticalAlign:"middle"}),et){C.setStyle({align:Gt});var Oi=C.states.select;Oi&&(Oi.x+=C.x,Oi.y+=C.y)}else{var zi=new pe(0,0,0,0);Ts(zi,C),t.push({label:C,labelLine:L,position:E,len:M,len2:O,minTurnAngle:R.get("minTurnAngle"),maxSurfaceAngle:R.get("maxSurfaceAngle"),surfaceNormal:new _t(G,F),linePoints:Dt,textAlign:Gt,labelDistance:z,labelAlignTo:P,edgeDistance:T,bleedMargin:N,rect:zi,unconstrainedWidth:zi.width,labelStyleWidth:C.style.width})}w.setTextConfig({inside:et})}}),!o&&a.get("avoidLabelOverlap")&&bc(t,r,i,s,u,c,p,f);for(var m=0;m<t.length;m++){var d=t[m],y=d.label,g=d.labelLine,S=isNaN(y.x)||isNaN(y.y);if(y){y.setStyle({align:d.textAlign}),S&&(k(y.states,v),y.ignore=!0);var x=y.states.select;x&&(x.x+=y.x,x.y+=y.y)}if(g){var _=d.linePoints;S||!_?(k(g.states,v),g.ignore=!0):(Ls(_,d.minTurnAngle),As(_,d.surfaceNormal,d.maxSurfaceAngle),g.setShape({points:_}),y.__hostTarget.textGuideLineConfig={anchor:new _t(_[0][0],_[0][1])})}}}var Rs=Math.PI*2,yi=Math.PI/180,Ns=rt(he,Dc);function Dc(a,e){a.eachSeriesByType(he,function(t){var r=t.getData(),i=r.mapDimension("value"),o=Ga(t,e),n=o.cx,l=o.cy,s=o.r,u=o.r0,p=o.viewRect,f=-t.get("startAngle")*yi,c=t.get("endAngle"),v=t.get("padAngle")*yi;c=c==="auto"?f-Rs:-c*yi;var h=t.get("minAngle")*yi,m=h+v,d=0;r.each(i,function(T){!isNaN(T)&&d++});var y=r.getSum(i),g=Math.PI/(y||d)*2,S=t.get("clockwise"),x=t.get("roseType"),_=t.get("stillShowZeroSum"),b=r.getDataExtent(i);b[0]=0;var w=S?1:-1,I=[f,c],C=w*v/2;Or(I,!S),f=I[0],c=I[1];var L=Do(t);L.startAngle=f,L.endAngle=c,L.clockwise=S,L.cx=n,L.cy=l,L.r=s,L.r0=u;var D=Math.abs(c-f),A=D,E=0,z=f;if(r.setLayout({viewRect:p,r:s}),r.each(i,function(T,N){var R;if(isNaN(T)){r.setItemLayout(N,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:S,cx:n,cy:l,r0:u,r:x?NaN:s});return}x!=="area"?R=y===0&&_?g:T*g:R=D/d,R<m?(R=m,A-=m):E+=T;var M=z+w*R,O=0,U=0;v>R?(O=z+w*R/2,U=O):(O=z+C,U=M-C),r.setItemLayout(N,{angle:R,startAngle:O,endAngle:U,clockwise:S,cx:n,cy:l,r0:u,r:x?Ot(T,b,[u,s]):s}),z=M}),A<Rs&&d)if(A<=.001){var P=D/d;r.each(i,function(T,N){if(!isNaN(T)){var R=r.getItemLayout(N);R.angle=P;var M=0,O=0;P<v?(M=f+w*(N+1/2)*P,O=M):(M=f+w*N*P+C,O=f+w*(N+1)*P-C),R.startAngle=M,R.endAngle=O}})}else g=A/E,z=f,r.each(i,function(T,N){if(!isNaN(T)){var R=r.getItemLayout(N),M=R.angle===m?m:T*g,O=0,U=0;M<v?(O=z+w*M/2,U=O):(O=z+C,U=z+w*M-C),R.startAngle=O,R.endAngle=U,z+=w*M}})})}var Do=te();var Ic=(function(a){V(e,a);function e(t,r,i){var o=a.call(this)||this;o.z2=2;var n=new Lt;return o.setTextContent(n),o.updateData(t,r,i,!0),o}return e.prototype.updateData=function(t,r,i,o){var n=this,l=t.hostModel,s=t.getItemModel(r),u=s.getModel("emphasis"),p=t.getItemLayout(r),f=B(Ft(s.getModel("itemStyle"),p,!0),p);if(isNaN(f.startAngle)){n.setShape(f);return}if(o){n.setShape(f);var c=l.getShallow("animationType");l.ecModel.ssr?(nt(n,{scaleX:0,scaleY:0},l,{dataIndex:r,isFrom:!0}),n.originX=f.cx,n.originY=f.cy):c==="scale"?(n.shape.r=p.r0,nt(n,{shape:{r:p.r}},l,r)):i!=null?(n.setShape({startAngle:i,endAngle:i}),nt(n,{shape:{startAngle:p.startAngle,endAngle:p.endAngle}},l,r)):(n.shape.endAngle=p.startAngle,tt(n,{shape:{endAngle:p.endAngle}},l,r))}else wt(n),tt(n,{shape:f},l,r);n.useStyle(t.getItemVisual(r,"style")),lt(n,s);var v=(p.startAngle+p.endAngle)/2,h=l.get("selectedOffset"),m=Math.cos(v)*h,d=Math.sin(v)*h,y=s.getShallow("cursor");y&&n.attr("cursor",y),this._updateLabel(l,t,r),n.ensureState("emphasis").shape=B({r:p.r+(u.get("scale")&&u.get("scaleSize")||0)},Ft(u.getModel("itemStyle"),p)),B(n.ensureState("select"),{x:m,y:d,shape:Ft(s.getModel(["select","itemStyle"]),p)}),B(n.ensureState("blur"),{shape:Ft(s.getModel(["blur","itemStyle"]),p)});var g=n.getTextGuideLine(),S=n.getTextContent();g&&B(g.ensureState("select"),{x:m,y:d}),B(S.ensureState("select"),{x:m,y:d}),J(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t,r,i){var o=this,n=r.getItemModel(i),l=n.getModel("labelLine"),s=r.getItemVisual(i,"style"),u=s&&s.fill,p=s&&s.opacity;ht(o,ct(n),{labelFetcher:r.hostModel,labelDataIndex:i,inheritColor:u,defaultOpacity:p,defaultText:t.getFormattedLabel(i,"normal")||r.getName(i)});var f=o.getTextContent();o.setTextConfig({position:null,rotation:null}),f.attr({z2:10});var c=n.get(["label","position"]);if(c!=="outside"&&c!=="outer")o.removeTextGuideLine();else{var v=this.getTextGuideLine();v||(v=new ee,this.setTextGuideLine(v)),di(this,gi(n),{stroke:u,opacity:Zt(l.get(["lineStyle","opacity"]),p,1)})}},e})(Bt),Lc=(function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=he,t.ignoreLabelLineUpdate=!0,t}return e.prototype.render=function(t,r,i,o){var n=t.getData(),l=this._data,s=this.group,u;if(!l&&n.count()>0){for(var p=n.getItemLayout(0),f=1;isNaN(p&&p.startAngle)&&f<n.count();++f)p=n.getItemLayout(f);p&&(u=p.startAngle)}if(this._emptyCircleSector&&s.remove(this._emptyCircleSector),n.count()===0&&t.get("showEmptyCircle")){var c=Do(t),v=new Bt({shape:Ie(c)});v.useStyle(t.getModel("emptyCircleStyle").getItemStyle()),this._emptyCircleSector=v,s.add(v)}n.diff(l).add(function(h){var m=new Ic(n,h,u);n.setItemGraphicEl(h,m),s.add(m)}).update(function(h,m){var d=l.getItemGraphicEl(m);d.updateData(n,h,u),d.off("click"),s.add(d),n.setItemGraphicEl(h,d)}).remove(function(h){var m=l.getItemGraphicEl(h);re(m,t,h)}).execute(),wo(t),t.get("animationTypeUpdate")!=="expansion"&&(this._data=n)},e.prototype.dispose=function(){},e.prototype.containPoint=function(t,r){var i=r.getData(),o=i.getItemLayout(0);if(o){var n=t[0]-o.cx,l=t[1]-o.cy,s=Math.sqrt(n*n+l*l);return s<=o.r&&s>=o.r0}},e.type=he,e})(q),Ms=Lc;function Io(a){return{seriesType:a,reset:function(e,t){var r=e.getData();r.filterSelf(function(i){var o=r.mapDimension("value"),n=r.get(o,i);return!(yt(n)&&!isNaN(n)&&n<0)})}}}function Ac(a){a.registerChartView(Ms),a.registerSeriesModel(Ds),Ha(he,a.registerAction),a.registerLayout(Ns),a.registerProcessor(ve(he)),a.registerProcessor(Io(he))}var Pc=(function(a){V(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 Et(null,this,{useEncodeDefaulter:!0})},e.prototype.getProgressive=function(){var t=this.option.progressive;return t??(this.option.large?5e3:this.get("progressive"))},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return t??(this.option.large?1e4:this.get("progressiveThreshold"))},e.prototype.brushSelector=function(t,r,i){return i.point(r.getItemLayout(t))},e.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},e.type="series.scatter",e.dependencies=["grid","polar","geo","singleAxis","calendar","matrix"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:Y.color.primary}},universalTransition:{divideShape:"clone"}},e})(Q),Vs=Pc;var zs=4,Cc=(function(){function a(){}return a})(),Ec=(function(a){V(e,a);function e(t){var r=a.call(this,t)||this;return r._off=0,r.hoverDataIdx=-1,r}return e.prototype.getDefaultShape=function(){return new Cc},e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.beforeBrush=function(t){t&&!t.contentRetained&&this.reset()},e.prototype.buildPath=function(t,r){var i=r.points,o=r.size,n=this.symbolProxy,l=n.shape,s=t.getContext?t.getContext():t,u=s&&o[0]<zs,p=this.softClipShape,f;if(u){this._ctx=s;return}for(this._ctx=null,f=this._off;f<i.length;){var c=i[f++],v=i[f++];isNaN(c)||isNaN(v)||p&&!p.contain(c,v)||(l.x=c-o[0]/2,l.y=v-o[1]/2,l.width=o[0],l.height=o[1],n.buildPath(t,l,!0))}this.incremental&&(this._off=f,this.notClear=!0)},e.prototype.afterBrush=function(){var t=this.shape,r=t.points,i=t.size,o=this._ctx,n=this.softClipShape,l;if(o){for(l=this._off;l<r.length;){var s=r[l++],u=r[l++];isNaN(s)||isNaN(u)||n&&!n.contain(s,u)||o.fillRect(s-i[0]/2,u-i[1]/2,i[0],i[1])}this.incremental&&(this._off=l,this.notClear=!0)}},e.prototype.findDataIndex=function(t,r){for(var i=this.shape,o=i.points,n=i.size,l=Math.max(n[0],4),s=Math.max(n[1],4),u=o.length/2-1;u>=0;u--){var p=u*2,f=o[p]-l/2,c=o[p+1]-s/2;if(t>=f&&r>=c&&t<=f+l&&r<=c+s)return u}return-1},e.prototype.contain=function(t,r){var i=this.transformCoordToLocal(t,r),o=this.getBoundingRect();if(t=i[0],r=i[1],o.contain(t,r)){var n=this.hoverDataIdx=this.findDataIndex(t,r);return n>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var r=this.shape,i=r.points,o=r.size,n=o[0],l=o[1],s=1/0,u=1/0,p=-1/0,f=-1/0,c=0;c<i.length;){var v=i[c++],h=i[c++];s=Math.min(v,s),p=Math.max(v,p),u=Math.min(h,u),f=Math.max(h,f)}t=this._rect=new pe(s-n/2,u-l/2,p-s+n,f-u+l)}return t},e})(ft),Tc=(function(){function a(){this.group=new K}return a.prototype.updateData=function(e,t){this._clear(),this._data=e;var r=this._create();r.setShape({points:e.getLayout("points")}),this._setCommon(r,e,t)},a.prototype.updateLayout=function(e){var t=this._data;if(t){var r=t.getLayout("points");this.group.eachChild(function(i){if(i.startIndex!=null){var o=(i.endIndex-i.startIndex)*2,n=i.startIndex*4*2;r=new Float32Array(r.buffer,n,o)}i.setShape("points",r),i.reset(),i.stopAnimation()})}},a.prototype.incrementalPrepareUpdate=function(e){this._clear()},a.prototype.incrementalUpdate=function(e,t,r,i){var o=this._newAdded[0],n=t.getLayout("points"),l=o&&o.shape.points;if(l&&l.length<2e4){var s=l.length,u=new Float32Array(s+n.length);u.set(l),u.set(n,s),o.endIndex=e.end,o.setShape({points:u})}else{this._newAdded=[];var p=this._create();p.startIndex=e.start,p.endIndex=e.end,p.incremental=r,p.setShape({points:n}),this._setCommon(p,t,i)}},a.prototype.eachRendered=function(e){this._newAdded[0]&&e(this._newAdded[0])},a.prototype._create=function(){var e=new Ec({cursor:"default"});return e.ignoreCoarsePointer=!0,this.group.add(e),this._newAdded.push(e),e},a.prototype._setCommon=function(e,t,r){var i=t.hostModel;r=r||{};var o=t.getVisual("symbolSize");e.setShape("size",o instanceof Array?o:[o,o]),e.softClipShape=r.clipShape||null,e.symbolProxy=kt(t.getVisual("symbol"),0,0,0,0),e.setColor=e.symbolProxy.setColor;var n=e.shape.size[0]<zs;e.useStyle(i.getModel("itemStyle").getItemStyle(n?["color","shadowBlur","shadowColor"]:["color"]));var l=t.getVisual("style"),s=l&&l.fill;s&&e.setColor(s);var u=at(e);u.seriesIndex=i.seriesIndex,e.on("mousemove",function(p){u.dataIndex=null;var f=e.hoverDataIdx;f>=0&&(u.dataIndex=f+(e.startIndex||0))})},a.prototype.remove=function(){this._clear()},a.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},a})(),Os=Tc;var Rc=(function(a){V(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,i){var o=t.getData(),n=this._updateSymbolDraw(o,t);n.updateData(o,Lo(t)),this._finished=!0},e.prototype.incrementalPrepareRender=function(t,r,i){var o=t.getData(),n=this._updateSymbolDraw(o,t);n.incrementalPrepareUpdate(o),this._finished=!1},e.prototype.incrementalRender=function(t,r,i){this._symbolDraw.incrementalUpdate(t,r.getData(),Mt(r),Lo(r)),this._finished=t.end===r.getData().count()},e.prototype.updateTransform=function(t,r,i){var o=t.getData();if(this.group.dirty(),this._finished){var n=ce("").reset(t,r,i);n.progress&&n.progress({start:0,end:o.count(),count:o.count()},o),this._symbolDraw.updateLayout(Lo(t))}else return{update:!0}},e.prototype.eachRendered=function(t){this._symbolDraw&&this._symbolDraw.eachRendered(t)},e.prototype._updateSymbolDraw=function(t,r){var i=this._symbolDraw,o=r.pipelineContext,n=o.large;return(!i||n!==this._isLargeDraw)&&(i&&i.remove(),i=this._symbolDraw=n?new Os:new Xe,this._isLargeDraw=n,this.group.removeAll()),this.group.add(i.group),i},e.prototype.remove=function(t,r){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},e.prototype.dispose=function(){},e.type="scatter",e})(q);function Lo(a){return{clipShape:si(a)}}var ks=Rc;function Nc(a){Ze(Rl),a.registerSeriesModel(Vs),a.registerChartView(ks),a.registerLayout(ce("scatter"))}function Ao(a){var e=a.polar;if(e){$(e)||(e=[e]);var t=[];k(e,function(r,i){r.indicator?(r.type&&!r.shape&&(r.shape=r.type),a.radar=a.radar||[],$(a.radar)||(a.radar=[a.radar]),a.radar.push(r)):t.push(r)}),a.polar=t}k(a.series,function(r){r&&r.type==="radar"&&r.polarIndex&&(r.radarIndex=r.polarIndex)})}var wr="radar",Mc=(function(a){V(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 oe(ot(this.getData,this),ot(this.getRawData,this))},e.prototype.getInitialData=function(t,r){return Se(this,{generateCoord:"indicator_",generateCoordCount:1/0})},e.prototype.formatTooltip=function(t,r,i){var o=this.getData(),n=this.coordinateSystem,l=n.getIndicatorAxes(),s=this.getData().getName(t),u=s===""?this.name:s,p=yl(this,t);return At("section",{header:u,sortBlocks:!0,blocks:X(l,function(f){var c=o.get(o.mapDimension(f.dim),t);return At("nameValue",{markerType:"subItem",markerColor:p,name:f.name,value:c,sortParam:c})})})},e.prototype.getTooltipPosition=function(t){if(t!=null){for(var r=this.getData(),i=this.coordinateSystem,o=r.getValues(X(i.dimensions,function(u){return r.mapDimension(u)}),t),n=0,l=o.length;n<l;n++)if(!isNaN(o[n])){var s=i.getIndicatorAxes();return i.coordToPoint(s[n].dataToCoord(o[n]),n)}}},e.type="series."+wr,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})(Q),Us=Mc;var Vc=(function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=wr,t}return e.prototype.render=function(t,r,i){var o=t.coordinateSystem,n=this.group,l=t.getData(),s=this._data;function u(c,v){var h=c.getItemVisual(v,"symbol")||"circle";if(h!=="none"){var m=Fa(c.getItemVisual(v,"symbolSize")),d=kt(h,-1,-1,2,2),y=c.getItemVisual(v,"symbolRotate")||0;return d.attr({style:{strokeNoScale:!0},z2:100,scaleX:m[0]/2,scaleY:m[1]/2,rotation:y*Math.PI/180||0}),d}}function p(c,v,h,m,d,y){h.removeAll();for(var g=0;g<v.length-1;g++){var S=u(m,d);S&&(S.__dimIdx=g,c[g]?(S.setPosition(c[g]),ut[y?"initProps":"updateProps"](S,{x:v[g][0],y:v[g][1]},t,d)):S.setPosition(v[g]),h.add(S))}}function f(c){return X(c,function(v){return[o.cx,o.cy]})}l.diff(s).add(function(c){var v=l.getItemLayout(c);if(v){var h=new kr,m=new ee,d={shape:{points:v}};h.shape.points=f(v),m.shape.points=f(v),nt(h,d,t,c),nt(m,d,t,c);var y=new K,g=new K;y.add(m),y.add(h),y.add(g),p(m.shape.points,v,g,l,c,!0),l.setItemGraphicEl(c,y)}}).update(function(c,v){var h=s.getItemGraphicEl(v),m=h.childAt(0),d=h.childAt(1),y=h.childAt(2),g={shape:{points:l.getItemLayout(c)}};g.shape.points&&(p(m.shape.points,g.shape.points,y,l,c,!1),wt(d),wt(m),tt(m,g,t),tt(d,g,t),l.setItemGraphicEl(c,h))}).remove(function(c){n.remove(s.getItemGraphicEl(c))}).execute(),l.eachItemGraphicEl(function(c,v){var h=l.getItemModel(v),m=c.childAt(0),d=c.childAt(1),y=c.childAt(2),g=l.getItemVisual(v,"style"),S=g.fill;n.add(c),m.useStyle(Ct(h.getModel("lineStyle").getLineStyle(),{fill:"none",stroke:S})),lt(m,h,"lineStyle"),lt(d,h,"areaStyle");var x=h.getModel("areaStyle"),_=x.isEmpty()&&x.parentModel.isEmpty();d.ignore=_,k(["emphasis","select","blur"],function(w){var I=h.getModel([w,"areaStyle"]),C=I.isEmpty()&&I.parentModel.isEmpty();d.ensureState(w).ignore=C&&_;var L=h.getModel([w,"lineStyle"]).getLineStyle();m.ensureState(w).style=L;var D=I.getAreaStyle();d.ensureState(w).style=D;var A=h.getModel([w,"itemStyle"]).getItemStyle();y.eachChild(function(E){E.ensureState(w).style=Ie(A)})}),d.useStyle(Ct(h.getModel("areaStyle").getAreaStyle(),{fill:S,opacity:.7,decal:g.decal}));var b=h.getModel("emphasis");y.eachChild(function(w){if(w instanceof ge){var I=w.style;w.useStyle(B({image:I.image,x:I.x,y:I.y,width:I.width,height:I.height},g))}else w.useStyle(g),w.setColor(S),w.style.strokeNoScale=!0;var C=l.getStore().get(l.getDimensionIndex(w.__dimIdx),v);(C==null||isNaN(C))&&(C=""),ht(w,ct(h),{labelFetcher:l.hostModel,labelDataIndex:v,labelDimIndex:w.__dimIdx,defaultText:C,inheritColor:S,defaultOpacity:g.opacity})}),J(c,b.get("focus"),b.get("blurScope"),b.get("disabled"))}),this._data=l},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.type=wr,e})(q),Gs=Vc;var Fs=rt(wr,zc);function zc(a){a.eachSeriesByType(wr,function(e){var t=e.getData(),r=[],i=e.coordinateSystem;if(i){var o=i.getIndicatorAxes();k(o,function(n,l){t.each(t.mapDimension(o[l].dim),function(s,u){r[u]=r[u]||[];var p=i.dataToPoint(s,l);r[u][l]=Bs(p)?p:Hs(i)})}),t.each(function(n){var l=Nn(r[n],function(s){return Bs(s)})||Hs(i);r[n].push(l.slice()),t.setItemLayout(n,r[n])})}})}function Bs(a){return!isNaN(a[0])&&!isNaN(a[1])}function Hs(a){return[a.cx,a.cy]}function Oc(a){Ze(Nl),a.registerChartView(Gs),a.registerSeriesModel(Us),a.registerLayout(Fs),a.registerProcessor(ve("radar")),a.registerPreprocessor(Ao)}var kc=(function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=xr,t}return e.prototype.render=function(t,r,i,o){if(!(o&&o.type==="mapToggleSelect"&&o.from===this.uid)){var n=this.group;if(n.removeAll(),!t.getHostGeoModel()){var l=this._mapDraw;l&&o&&o.type==="geoRoam"&&l.resetForLabelLayout(),o&&o.type==="geoRoam"&&o.componentType==="series"&&o.seriesId===t.id?l&&n.add(l.group):fo(t)?(l=l||(this._mapDraw=new Ol(i)),n.add(l.group),l.draw(t,r,i,this,o)):this._clearMapDraw(),t.get("showLegendSymbol")&&r.getComponent("legend")&&this._renderSymbols(t)}}},e.prototype.__updateOnOwnRoam=function(t,r,i){var o=this._mapDraw;fo(r)&&o&&o.__updateOnOwnRoam(r)},e.prototype.remove=function(){this._clearMapDraw(),this.group.removeAll()},e.prototype.dispose=function(){this._clearMapDraw()},e.prototype._clearMapDraw=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null},e.prototype._renderSymbols=function(t){var r=t.originalData,i=this.group;r.each(r.mapDimension("value"),function(o,n){if(!isNaN(o)){var l=r.getItemLayout(n);if(!(!l||!l.point)){var s=l.point,u=l.offset,p=new Ra({style:{fill:t.getData().getVisual("style").fill},shape:{cx:s[0]+u*9,cy:s[1],r:3},silent:!0,z2:8+(u?0:He+1)});if(!u){var f=_r(t.seriesGroup).getData(),c=r.getName(n),v=f.indexOfName(c),h=r.getItemModel(n),m=h.getModel("label"),d=f.getItemGraphicEl(v);ht(p,ct(h),{labelFetcher:{getFormattedLabel:function(y,g){return t.getFormattedLabel(v,g)}},defaultText:c}),p.disableLabelAnimation=!0,m.get("position")||p.setTextConfig({position:"bottom"}),d.onHoverStateChange=function(y){mr(p,y)}}i.add(p)}}})},e.type=xr,e})(q),Ws=kc;var Ys=rt(xr,Uc);function Uc(a){k(ti(a),function(e,t){if(!(!_r(e)||!kl(t))){var r={};k(e.f,function(o){var n=o.coordinateSystem,l=o.originalData;o.get("showLegendSymbol")&&a.getComponent("legend")&&l.each(l.mapDimension("value"),function(s,u){var p=l.getName(u),f=n.getRegion(p);if(!(!f||isNaN(s))){var c=r[p]||0,v=n.dataToPoint(f.getCenter());r[p]=c+1,l.setItemLayout(u,{point:v,offset:c})}})});var i=_r(e).getData();i.each(function(o){var n=i.getName(o),l=i.getItemLayout(o)||{};l.showLabel=!r[n],i.setItemLayout(o,l)})}})}function Gc(a,e){var t={};return k(a,function(r){r.each(r.mapDimension("value"),function(i,o){var n="ec-"+r.getName(o);t[n]=t[n]||[],isNaN(i)||t[n].push(i)})}),a[0].map(a[0].mapDimension("value"),function(r,i){for(var o="ec-"+a[0].getName(i),n=0,l=1/0,s=-1/0,u=t[o].length,p=0;p<u;p++)l=Math.min(l,t[o][p]),s=Math.max(s,t[o][p]),n+=t[o][p];var f;return e==="min"?f=l:e==="max"?f=s:e==="average"?f=n/u:f=n,u===0?NaN:f})}var Zs=rt(xr,Bc);function Bc(a){k(ti(a),function(e){var t=_r(e);if(t){var r=Gc(X(e.f,function(i){return i.getData()}),t.get("mapValueCalculation"));k(e.f,function(i){i.seriesGroup=e,i.originalData=i.getData(),i.setData(r.cloneShallow())})}})}function Hc(a){Ze(Gl),a.registerChartView(Ws),a.registerSeriesModel(Ul),a.registerLayout(Ys),a.registerProcessor(a.PRIORITY.PROCESSOR.STATISTIC,Zs),Ha("map",a.registerAction)}function Xs(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,i;r=t.pop();)if(i=r.children,r.isExpand&&i.length)for(var o=i.length,n=o-1;n>=0;n--){var l=i[n];l.hierNode={defaultAncestor:null,ancestor:l,prelim:0,modifier:0,change:0,shift:0,i:n,thread:null},t.push(l)}}function qs(a,e){var t=a.isExpand?a.children:[],r=a.parentNode.children,i=a.hierNode.i?r[a.hierNode.i-1]:null;if(t.length){Fc(a);var o=(t[0].hierNode.prelim+t[t.length-1].hierNode.prelim)/2;i?(a.hierNode.prelim=i.hierNode.prelim+e(a,i),a.hierNode.modifier=a.hierNode.prelim-o):a.hierNode.prelim=o}else i&&(a.hierNode.prelim=i.hierNode.prelim+e(a,i));a.parentNode.hierNode.defaultAncestor=Wc(a,i,a.parentNode.hierNode.defaultAncestor||r[0],e)}function Ks(a){var e=a.hierNode.prelim+a.parentNode.hierNode.modifier;a.setLayout({x:e},!0),a.hierNode.modifier+=a.parentNode.hierNode.modifier}function Eo(a){return arguments.length?a:Xc}function Dr(a,e){return a-=Math.PI/2,{x:e*Math.cos(a),y:e*Math.sin(a)}}function Fc(a){for(var e=a.children,t=e.length,r=0,i=0;--t>=0;){var o=e[t];o.hierNode.prelim+=r,o.hierNode.modifier+=r,i+=o.hierNode.change,r+=o.hierNode.shift+i}}function Wc(a,e,t,r){if(e){for(var i=a,o=a,n=o.parentNode.children[0],l=e,s=i.hierNode.modifier,u=o.hierNode.modifier,p=n.hierNode.modifier,f=l.hierNode.modifier;l=Po(l),o=Co(o),l&&o;){i=Po(i),n=Co(n),i.hierNode.ancestor=a;var c=l.hierNode.prelim+f-o.hierNode.prelim-u+r(l,o);c>0&&(Zc(Yc(l,a,t),a,c),u+=c,s+=c),f+=l.hierNode.modifier,u+=o.hierNode.modifier,s+=i.hierNode.modifier,p+=n.hierNode.modifier}l&&!Po(i)&&(i.hierNode.thread=l,i.hierNode.modifier+=f-s),o&&!Co(n)&&(n.hierNode.thread=o,n.hierNode.modifier+=u-p,t=a)}return t}function Po(a){var e=a.children;return e.length&&a.isExpand?e[e.length-1]:a.hierNode.thread}function Co(a){var e=a.children;return e.length&&a.isExpand?e[0]:a.hierNode.thread}function Yc(a,e,t){return a.hierNode.ancestor.parentNode===e.parentNode?a.hierNode.ancestor:t}function Zc(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 Xc(a,e){return a.parentNode===e.parentNode?1:2}var ne=te();function qc(a){var e=a.mainData,t=a.datas;t||(t={main:e},a.datasAttr={main:"data"}),a.datas=a.mainData=null,js(e,t,a),k(t,function(r){k(e.TRANSFERABLE_METHODS,function(i){r.wrapMethod(i,zt(Kc,a))})}),e.wrapMethod("cloneShallow",zt(Jc,a)),k(e.CHANGABLE_METHODS,function(r){e.wrapMethod(r,zt(jc,a))}),On(t[e.dataType]===e)}function Kc(a,e){if(tv(this)){var t=B({},ne(this).datas);t[this.dataType]=e,js(e,t,a)}else To(e,this.dataType,ne(this).mainData,a);return e}function jc(a,e){return a.struct&&a.struct.update(),e}function Jc(a,e){return k(ne(e).datas,function(t,r){t!==e&&To(t.cloneShallow(),r,e,a)}),e}function Qc(a){var e=ne(this).mainData;return a==null||e==null?e:ne(e).datas[a]}function $c(){var a=ne(this).mainData;return a==null?[{data:a}]:X(Mn(ne(a).datas),function(e){return{type:e,data:ne(a).datas[e]}})}function tv(a){return ne(a).mainData===a}function js(a,e,t){ne(a).datas={},k(e,function(r,i){To(r,i,a,t)})}function To(a,e,t,r){ne(t).datas[e]=a,ne(a).mainData=t,a.dataType=e,r.struct&&(a[r.structAttr]=r.struct,r.struct[r.datasAttr[e]]=a),a.getLinkedData=Qc,a.getLinkedDataAll=$c}var Si=qc;var ev=(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){gt(e)&&(r=t,t=e,e=null),e=e||{},dt(e)&&(e={order:e});var i=e.order||"preorder",o=this[e.attr||"children"],n;i==="preorder"&&(n=t.call(r,this));for(var l=0;!n&&l<o.length;l++)o[l].eachNode(e,t,r);i==="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 i=this.children[r];i.updateDepthAndHeight(e+1),i.height>t&&(t=i.height)}this.height=t+1},a.prototype.getNodeById=function(e){if(this.getId()===e)return this;for(var t=0,r=this.children,i=r.length;t<i;t++){var o=r[t].getNodeById(e);if(o)return o}},a.prototype.contains=function(e){if(e===this)return!0;for(var t=0,r=this.children,i=r.length;t<i;t++){var o=r[t].contains(e);if(o)return o}},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})();var rv=(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,i=t.length;r<i;r++)t[r].dataIndex=-1;for(var r=0,i=e.count();r<i;r++)t[e.getRawIndex(r)].dataIndex=r},a.prototype.clearLayouts=function(){this.data.clearItemLayouts()},a.createTree=function(e,t,r){var i=new a(t),o=[],n=1;l(e);function l(p,f){var c=p.value;n=Math.max(n,$(c)?c.length:1),o.push(p);var v=new ev(Ue(p.name,""),i);f?av(v,f):i.root=v,i._nodes.push(v);var h=p.children;if(h)for(var m=0;m<h.length;m++)l(h[m],v)}i.root.updateDepthAndHeight(0);var s=Br(o,{coordDimensions:["value"],dimensionsCount:n}).dimensions,u=new fe(s,t);return u.initData(o),r&&r(u),Si({mainData:u,struct:i,structAttr:"tree"}),i.update(),i},a})();function av(a,e){var t=e.children;a.parentNode!==e&&(t.push(a),a.parentNode=e)}var jr=rv;function Ne(a,e,t){if(a&&Rt(e,a.type)>=0){var r=t.getData().tree.root,i=a.targetNode;if(dt(i)&&(i=r.getNodeById(i)),i&&r.contains(i))return{node:i};var o=a.targetNodeId;if(o!=null&&(i=r.getNodeById(o)))return{node:i}}}function Ro(a){for(var e=[];a;)a=a.parentNode,a&&e.push(a);return e.reverse()}function Jr(a,e){var t=Ro(a);return Rt(t,e)>=0}function or(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 _e="tree",iv=(function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t.ignoreStyleOnData=!0,t}return e.prototype.getInitialData=function(t){var r={name:t.name,children:t.data},i=t.leaves||{},o=new Xt(i,this,this.ecModel),n=jr.createTree(r,this,l);function l(f){f.wrapMethod("getItemModel",function(c,v){var h=n.getNodeByDataIndex(v);return h&&h.children.length&&h.isExpand||(c.parentModel=o),c})}var s=0;n.eachNode("preorder",function(f){f.depth>s&&(s=f.depth)});var u=t.expandAndCollapse,p=u&&t.initialTreeDepth>=0?t.initialTreeDepth:s;return n.root.eachNode("preorder",function(f){var c=f.hostTree.data.getRawDataItem(f.dataIndex);f.isExpand=c&&c.collapsed!=null?!c.collapsed:f.depth<=p}),n.data},e.prototype.getOrient=function(){var t=this.get("orient");return t==="horizontal"?t="LR":t==="vertical"&&(t="TB"),t},e.prototype.formatTooltip=function(t,r,i){for(var o=this.getData().tree,n=o.root.children[0],l=o.getNodeByDataIndex(t),s=l.getValue(),u=l.name;l&&l!==n;)u=l.parentNode.name+"."+u,l=l.parentNode;return At("nameValue",{name:u,value:s,noValue:isNaN(s)||s==null})},e.prototype.getDataParams=function(t){var r=a.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(t);return r.treeAncestors=or(i,this),r.collapsed=!i.isExpand,r},e.prototype.__ownRoamView=function(){return this.coordinateSystem},e.type="series."+_e,e.layoutMode="box",e.defaultOption={z:2,coordinateSystemUsage:"box",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,roamTrigger:"global",nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:Y.color.borderTint,width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},e})(Q),Js=iv;var nv=(function(){function a(){this.parentPoint=[],this.childPoints=[]}return a})(),lv=(function(a){V(e,a);function e(t){return a.call(this,t)||this}return e.prototype.getDefaultStyle=function(){return{stroke:Y.color.neutral99,fill:null}},e.prototype.getDefaultShape=function(){return new nv},e.prototype.buildPath=function(t,r){var i=r.childPoints,o=i.length,n=r.parentPoint,l=i[0],s=i[o-1];if(o===1){t.moveTo(n[0],n[1]),t.lineTo(l[0],l[1]);return}var u=r.orient,p=u==="TB"||u==="BT"?0:1,f=1-p,c=H(r.forkPosition,1),v=[];v[p]=n[p],v[f]=n[f]+(s[f]-n[f])*c,t.moveTo(n[0],n[1]),t.lineTo(v[0],v[1]),t.moveTo(l[0],l[1]),v[p]=l[p],t.lineTo(v[0],v[1]),v[p]=s[p],t.lineTo(v[0],v[1]),t.lineTo(s[0],s[1]);for(var h=1;h<o-1;h++){var m=i[h];t.moveTo(m[0],m[1]),v[p]=m[p],t.lineTo(v[0],v[1])}},e})(ft),sv=(function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=_e,t._mainGroup=new K,t}return e.prototype.init=function(t,r){this._controller=new Ke(r.getZr()),this.group.add(this._mainGroup),this._firstRender=!0},e.prototype.render=function(t,r,i){var o=t.getData(),n=t.layoutInfo,l=this._mainGroup,s=t.get("layout");s==="radial"?(l.x=n.x+n.width/2,l.y=n.y+n.height/2):(l.x=n.x,l.y=n.y),this._updateViewCoordSys(t,i),Yr(t,i,this._controller,Qa(this.group),null);var u=this._data;o.diff(u).add(function(p){Qs(o,p)&&$s(o,p,null,l,t)}).update(function(p,f){var c=u.getItemGraphicEl(f);if(!Qs(o,p)){c&&eu(u,f,c,l,t);return}$s(o,p,c,l,t)}).remove(function(p){var f=u.getItemGraphicEl(p);f&&eu(u,p,f,l,t)}).execute(),this._updateNodeAndLinkScale(t),t.get("expandAndCollapse")===!0&&o.eachItemGraphicEl(function(p,f){p.off("click").on("click",function(){i.dispatchAction({type:"treeExpandAndCollapse",seriesId:t.id,dataIndex:f})})}),this._data=o,this._firstRender=!1},e.prototype.__updateOnOwnRoam=function(t,r,i){Re(this.group,Te,r.coordinateSystem,null),$a(t)&&this._updateNodeAndLinkScale(r)},e.prototype._updateViewCoordSys=function(t,r){var i=t.getData(),o=[];i.each(function(f){var c=i.getItemLayout(f);c&&!isNaN(c.x)&&!isNaN(c.y)&&o.push([+c.x,+c.y])});var n=[],l=[];Pa(o,n,l);var s=this._min,u=this._max;l[0]-n[0]===0&&(n[0]=s?s[0]:n[0]-1,l[0]=u?u[0]:l[0]+1),l[1]-n[1]===0&&(n[1]=s?s[1]:n[1]-1,l[1]=u?u[1]:l[1]+1);var p=t.coordinateSystem=Xr(t,r,n[0],n[1],l[0]-n[0],l[1]-n[1]);Re(this.group,Te,p,this._firstRender?null:t),this._min=n,this._max=l},e.prototype._updateNodeAndLinkScale=function(t){var r=t.getData(),i=Ja(t.coordinateSystem,t);r.eachItemGraphicEl(function(o,n){o.setSymbolScale(i)})},e.prototype.dispose=function(){this._controller&&this._controller.dispose()},e.prototype.remove=function(){this._mainGroup.removeAll(),this._data=null},e.type=_e,e})(q);function Qs(a,e){var t=a.getItemLayout(e);return t&&!isNaN(t.x)&&!isNaN(t.y)}function $s(a,e,t,r,i){var o=!t,n=a.tree.getNodeByDataIndex(e),l=n.getModel(),s=n.getVisual("style").fill,u=n.isExpand===!1&&n.children.length!==0?s:Y.color.neutral00,p=a.tree.root,f=n.parentNode===p?n:n.parentNode||n,c=a.getItemGraphicEl(f.dataIndex),v=f.getLayout(),h=c?{x:c.__oldX,y:c.__oldY,rawX:c.__radialOldRawX,rawY:c.__radialOldRawY}:v,m=n.getLayout();o?(t=new yr(a,e,null,{symbolInnerColor:u,useNameLabel:!0}),t.x=h.x,t.y=h.y):t.updateData(a,e,null,{symbolInnerColor:u,useNameLabel:!0}),t.__radialOldRawX=t.__radialRawX,t.__radialOldRawY=t.__radialRawY,t.__radialRawX=m.rawX,t.__radialRawY=m.rawY,r.add(t),a.setItemGraphicEl(e,t),t.__oldX=t.x,t.__oldY=t.y,tt(t,{x:m.x,y:m.y},i);var d=t.getSymbolPath();if(i.get("layout")==="radial"){var y=p.children[0],g=y.getLayout(),S=y.children.length,x=void 0,_=void 0;if(m.x===g.x&&n.isExpand===!0&&y.children.length){var b={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(b.y-g.y,b.x-g.x),x<0&&(x=Math.PI*2+x),_=b.x<g.x,_&&(x=x-Math.PI)}else x=Math.atan2(m.y-g.y,m.x-g.x),x<0&&(x=Math.PI*2+x),n.children.length===0||n.children.length!==0&&n.isExpand===!1?(_=m.x<g.x,_&&(x=x-Math.PI)):(_=m.x>g.x,_||(x=x-Math.PI));var w=_?"left":"right",I=l.getModel("label"),C=I.get("rotate"),L=C*(Math.PI/180),D=d.getTextContent();D&&(d.setTextConfig({position:I.get("position")||w,rotation:C==null?-x:L,origin:"center"}),D.setStyle("verticalAlign","middle"))}var A=l.get(["emphasis","focus"]),E=A==="relative"?cr(n.getAncestorsIndices(),n.getDescendantIndices()):A==="ancestor"?n.getAncestorsIndices():A==="descendant"?n.getDescendantIndices():null;E&&(at(t).focus=E),uv(i,n,p,t,h,v,m,r),t.__edge&&(t.onHoverStateChange=function(z){if(z!=="blur"){var P=n.parentNode&&a.getItemGraphicEl(n.parentNode.dataIndex);P&&P.hoverState===ll||mr(t.__edge,z)}})}function uv(a,e,t,r,i,o,n,l){var s=e.getModel(),u=a.get("edgeShape"),p=a.get("layout"),f=a.getOrient(),c=a.get(["lineStyle","curveness"]),v=a.get("edgeForkPosition"),h=s.getModel("lineStyle").getLineStyle(),m=r.__edge;if(u==="curve")e.parentNode&&e.parentNode!==t&&(m||(m=r.__edge=new sl({shape:Mo(p,f,c,i,i)})),tt(m,{shape:Mo(p,f,c,o,n)},a));else if(u==="polyline"&&p==="orthogonal"&&e!==t&&e.children&&e.children.length!==0&&e.isExpand===!0){for(var d=e.children,y=[],g=0;g<d.length;g++){var S=d[g].getLayout();y.push([S.x,S.y])}m||(m=r.__edge=new lv({shape:{parentPoint:[n.x,n.y],childPoints:[[n.x,n.y]],orient:f,forkPosition:v}})),tt(m,{shape:{parentPoint:[n.x,n.y],childPoints:y}},a)}m&&!(u==="polyline"&&!e.isExpand)&&(m.useStyle(Ct({strokeNoScale:!0,fill:null},h)),lt(m,s,"lineStyle"),dr(m),l.add(m))}function tu(a,e,t,r,i){var o=e.tree.root,n=ru(o,a),l=n.source,s=n.sourceLayout,u=e.getItemGraphicEl(a.dataIndex);if(u){var p=e.getItemGraphicEl(l.dataIndex),f=p.__edge,c=u.__edge||(l.isExpand===!1||l.children.length===1?f:void 0),v=r.get("edgeShape"),h=r.get("layout"),m=r.get("orient"),d=r.get(["lineStyle","curveness"]);c&&(v==="curve"?Gr(c,{shape:Mo(h,m,d,s,s),style:{opacity:0}},r,{cb:function(){t.remove(c)},removeOpt:i}):v==="polyline"&&r.get("layout")==="orthogonal"&&Gr(c,{shape:{parentPoint:[s.x,s.y],childPoints:[[s.x,s.y]]},style:{opacity:0}},r,{cb:function(){t.remove(c)},removeOpt:i}))}}function ru(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 eu(a,e,t,r,i){var o=a.tree.getNodeByDataIndex(e),n=a.tree.root,l=ru(n,o).sourceLayout,s={duration:i.get("animationDurationUpdate"),easing:i.get("animationEasingUpdate")};Gr(t,{x:l.x+1,y:l.y+1},i,{cb:function(){r.remove(t),a.setItemGraphicEl(e,null)},removeOpt:s}),t.fadeOut(null,a.hostModel,{fadeLabel:!0,animation:s}),k(o.children,function(u){tu(u,a,r,i,s)}),tu(o,a,r,i,s)}function Mo(a,e,t,r,i){var o,n,l,s,u,p,f,c;if(a==="radial"){u=r.rawX,f=r.rawY,p=i.rawX,c=i.rawY;var v=Dr(u,f),h=Dr(u,f+(c-f)*t),m=Dr(p,c+(f-c)*t),d=Dr(p,c);return{x1:v.x||0,y1:v.y||0,x2:d.x||0,y2:d.y||0,cpx1:h.x||0,cpy1:h.y||0,cpx2:m.x||0,cpy2:m.y||0}}else u=r.x,f=r.y,p=i.x,c=i.y,(e==="LR"||e==="RL")&&(o=u+(p-u)*t,n=f,l=p+(u-p)*t,s=c),(e==="TB"||e==="BT")&&(o=u,n=f+(c-f)*t,l=p,s=c+(f-c)*t);return{x1:u,y1:f,x2:p,y2:c,cpx1:o,cpy1:n,cpx2:l,cpy2:s}}var au=sv;function iu(a,e,t){for(var r=[a],i=[],o;o=r.pop();)if(i.push(o),o.isExpand){var n=o.children;if(n.length)for(var l=0;l<n.length;l++)r.push(n[l])}for(;o=i.pop();)e(o,t)}function Qr(a,e){for(var t=[a],r;r=t.pop();)if(e(r),r.isExpand){var i=r.children;if(i.length)for(var o=i.length-1;o>=0;o--)t.push(i[o])}}function Vo(a,e){a.eachSeriesByType("tree",function(t){pv(t,e)})}function pv(a,e){var t=ie(a,e).refContainer,r=ae(a.getBoxLayoutParams(),t);a.layoutInfo=r;var i=a.get("layout"),o=0,n=0,l=null;i==="radial"?(o=2*Math.PI,n=Math.min(r.height,r.width)/2,l=Eo(function(x,_){return(x.parentNode===_.parentNode?1:2)/x.depth})):(o=r.width,n=r.height,l=Eo());var s=a.getData().tree.root,u=s.children[0];if(u){Xs(s),iu(u,qs,l),s.hierNode.modifier=-u.hierNode.prelim,Qr(u,Ks);var p=u,f=u,c=u;Qr(u,function(x){var _=x.getLayout().x;_<p.getLayout().x&&(p=x),_>f.getLayout().x&&(f=x),x.depth>c.depth&&(c=x)});var v=p===f?1:l(p,f)/2,h=v-p.getLayout().x,m=0,d=0,y=0,g=0;if(i==="radial")m=o/(f.getLayout().x+v+h),d=n/(c.depth-1||1),Qr(u,function(x){y=(x.getLayout().x+h)*m,g=(x.depth-1)*d;var _=Dr(y,g);x.setLayout({x:_.x,y:_.y,rawX:y,rawY:g},!0)});else{var S=a.getOrient();S==="RL"||S==="LR"?(d=n/(f.getLayout().x+v+h),m=o/(c.depth-1||1),Qr(u,function(x){g=(x.getLayout().x+h)*d,y=S==="LR"?(x.depth-1)*m:o-(x.depth-1)*m,x.setLayout({x:y,y:g},!0)})):(S==="TB"||S==="BT")&&(m=o/(f.getLayout().x+v+h),d=n/(c.depth-1||1),Qr(u,function(x){y=(x.getLayout().x+h)*m,g=S==="TB"?(x.depth-1)*d:n-(x.depth-1)*d,x.setLayout({x:y,y:g},!0)}))}}}function ou(a){a.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(e,t){t.eachComponent({mainType:Ge,subType:_e,query:e},function(r){var i=e.dataIndex,o=r.getData().tree,n=o.getNodeByDataIndex(i);n.isExpand=!n.isExpand})}),Zr(a,Ge,_e)}var nu=rt(_e,fv);function fv(a){a.eachSeriesByType(_e,function(e){var t=e.getData(),r=t.tree;r.eachNode(function(i){var o=i.getModel(),n=o.getModel("itemStyle").getItemStyle(),l=t.ensureUniqueItemVisual(i.dataIndex,"style");B(l,n)})})}function cv(a){a.registerChartView(au),a.registerSeriesModel(Js),a.registerLayout(Vo),a.registerVisual(nu),ou(a)}var lu=["treemapZoomToNode","treemapRender","treemapMove"];function su(a){for(var e=0;e<lu.length;e++)a.registerAction({type:lu[e],update:"updateView"},na);a.registerAction({type:"treemapRootToNode",update:"updateView"},function(t,r){r.eachComponent({mainType:"series",subType:"treemap",query:t},i);function i(o,n){var l=["treemapZoomToNode","treemapRootToNode"],s=Ne(t,l,o);if(s){var u=o.getViewRoot();u&&(t.direction=Jr(u,s.node)?"rollUp":"drillDown"),o.resetViewRoot(s.node)}}})}function da(a){var e=a.getData(),t=e.tree,r={};t.eachNode(function(i){for(var o=i;o&&o.depth>1;)o=o.parentNode;var n=gl(a.ecModel,o.name||o.dataIndex+"",r);i.setVisual("decal",n)})}var vv=(function(a){V(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 i={name:t.name,children:t.data};uu(i);var o=t.levels||[],n=this.designatedVisualItemStyle={},l=new Xt({itemStyle:n},this,r);o=t.levels=hv(o,r);var s=X(o||[],function(f){return new Xt(f,l,r)},this),u=jr.createTree(i,this,p);function p(f){f.wrapMethod("getItemModel",function(c,v){var h=u.getNodeByDataIndex(v),m=h?s[h.depth]:null;return c.parentModel=m||l,c})}return u.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.formatTooltip=function(t,r,i){var o=this.getData(),n=this.getRawValue(t),l=o.getName(t);return At("nameValue",{name:l,value:n})},e.prototype.getDataParams=function(t){var r=a.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(t);return r.treeAncestors=or(i,this),r.treePathInfo=r.treeAncestors,r},e.prototype.setLayoutInfo=function(t){this.layoutInfo=this.layoutInfo||{},B(this.layoutInfo,t)},e.prototype.mapIdToIndex=function(t){var r=this._idIndexMap;r||(r=this._idIndexMap=Le(),this._idIndexMapCount=0);var i=r.get(t);return i==null&&r.set(t,i=this._idIndexMapCount++),i},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(){da(this)},e.type="series.treemap",e.layoutMode="box",e.defaultOption={progressive:0,coordinateSystemUsage:"box",left:Y.size.l,top:Y.size.xxxl,right:Y.size.l,bottom:Y.size.xxxl,sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"\u25B6",zoomToNodeRatio:.32*.32,scaleLimit:{max:5,min:.2},roam:!0,roamTrigger:"global",nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",bottom:Y.size.m,emptyItemWidth:25,itemStyle:{color:Y.color.backgroundShade,textStyle:{color:Y.color.secondary}},emphasis:{itemStyle:{color:Y.color.background}}},label:{show:!0,distance:0,padding:5,position:"inside",color:Y.color.neutral00,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:Y.color.neutral00,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})(Q);function uu(a){var e=0;k(a.children,function(r){uu(r);var i=r.value;$(i)&&(i=i[0]),e+=i});var t=a.value;$(t)&&(t=t[0]),(t==null||isNaN(t))&&(t=e),t<0&&(t=0),$(a.value)?a.value[0]=t:a.value=t}function hv(a,e){var t=qi(e.get("color")),r=qi(e.get(["aria","decal","decals"]));if(t){a=a||[];var i,o;k(a,function(l){var s=new Xt(l),u=s.get("color"),p=s.get("decal");(s.get(["itemStyle","color"])||u&&u!=="none")&&(i=!0),(s.get(["itemStyle","decal"])||p&&p!=="none")&&(o=!0)});var n=a[0]||(a[0]={});return i||(n.color=t.slice()),!o&&r&&(n.decal=r.slice()),a}}var pu=vv;var mv=8,fu=8,zo=5,dv=(function(){function a(e){this.group=new K,e.add(this.group)}return a.prototype.render=function(e,t,r,i){var o=e.getModel("breadcrumb"),n=this.group;if(n.removeAll(),!(!o.get("show")||!r)){var l=o.getModel("itemStyle"),s=o.getModel("emphasis"),u=l.getModel("textStyle"),p=s.getModel(["itemStyle","textStyle"]),f=ie(e,t).refContainer,c={left:o.get("left"),right:o.get("right"),top:o.get("top"),bottom:o.get("bottom")},v={emptyItemWidth:o.get("emptyItemWidth"),totalWidth:0,renderList:[]},h=ae(c,f);this._prepare(r,v,u),this._renderContent(e,v,h,l,s,u,p,i),ml(n,c,f)}},a.prototype._prepare=function(e,t,r){for(var i=e;i;i=i.parentNode){var o=Ue(i.getModel().get("name"),""),n=r.getTextRect(o),l=Math.max(n.width+mv*2,t.emptyItemWidth);t.totalWidth+=l+fu,t.renderList.push({node:i,text:o,width:l})}},a.prototype._renderContent=function(e,t,r,i,o,n,l,s){for(var u=0,p=t.emptyItemWidth,f=e.get(["breadcrumb","height"]),c=t.totalWidth,v=t.renderList,h=o.getModel("itemStyle").getItemStyle(),m=v.length-1;m>=0;m--){var d=v[m],y=d.node,g=d.width,S=d.text;c>r.width&&(c-=g-p,g=p,S=null);var x=new kr({shape:{points:gv(u,0,g,f,m===v.length-1,m===0)},style:Ct(i.getItemStyle(),{lineJoin:"bevel"}),textContent:new Lt({style:Kt(n,{text:S})}),textConfig:{position:"inside"},z2:He*1e4,onclick:zt(s,y)});x.disableLabelAnimation=!0,x.getTextContent().ensureState("emphasis").style=Kt(l,{text:S}),x.ensureState("emphasis").style=h,J(x,o.get("focus"),o.get("blurScope"),o.get("disabled")),this.group.add(x),yv(x,e,y),u+=g+fu}},a.prototype.remove=function(){this.group.removeAll()},a})();function gv(a,e,t,r,i,o){var n=[[i?a:a-zo,e],[a+t,e],[a+t,e+r],[i?a:a-zo,e+r]];return!o&&n.splice(2,0,[a+t+zo,e+r/2]),!i&&n.push([a,e+r/2]),n}function yv(a,e,t){at(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&&or(t,e)}}var vu=dv;var Sv=(function(){function a(){this._storage=[],this._elExistsMap={}}return a.prototype.add=function(e,t,r,i,o){return this._elExistsMap[e.id]?!1:(this._elExistsMap[e.id]=!0,this._storage.push({el:e,target:t,duration:r,delay:i,easing:o}),!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())},i=0,o=this._storage.length;i<o;i++){var n=this._storage[i];n.el.animateTo(n.target,{duration:n.duration,delay:n.delay,easing:n.easing,setToFinal:!0,done:r,aborted:r})}return this},a})();function hu(){return new Sv}var ga=Math.max,xi=Math.min,Oo=k,du=["itemStyle","borderWidth"],_v=["itemStyle","gapWidth"],bv=["upperLabel","show"],wv=["upperLabel","height"],gu={seriesType:"treemap",reset:function(a,e,t,r){var i=a.option,o=ie(a,t).refContainer,n=ae(a.getBoxLayoutParams(),o),l=r&&r.type,s=["treemapZoomToNode","treemapRootToNode"],u=Ne(r,s,a),p=l==="treemapRender"||l==="treemapMove"?r.rootRect:null,f=a.getViewRoot(),c=Ro(f);if(l!=="treemapMove"){var v=!1,h=l==="treemapZoomToNode"?(v=!0,Cv(a,u,f,n)):p?(v=!0,B({},p)):B({},n);if(v){var m=ko(n,h);m=Uo(m,a),h.width=n.width*m,h.height=n.height*m}var d=i.sort;d&&d!=="asc"&&d!=="desc"&&(d="desc");var y={squareRatio:i.squareRatio,sort:d,leafDepth:i.leafDepth};f.hostTree.clearLayouts();var g={x:0,y:0,width:h.width,height:h.height,area:h.width*h.height};f.setLayout(g),yu(f,y,!1,0),g=f.getLayout(),Oo(c,function(x,_){var b=(c[_+1]||f).getValue();x.setLayout(B({dataExtent:[b,b],borderWidth:0,upperHeight:0},g))})}var S=a.getData().tree.root;S.setLayout(Ev(n,p,u),!0),a.setLayoutInfo(n),Su(S,new pe(-n.x,-n.y,t.getWidth(),t.getHeight()),c,f,0)}};function yu(a,e,t,r){var i,o;if(!a.isRemoved()){var n=a.getLayout();i=n.width,o=n.height;var l=a.getModel(),s=l.get(du),u=l.get(_v)/2,p=xu(l),f=Math.max(s,p),c=s-u,v=f-u;a.setLayout({borderWidth:s,upperHeight:f,upperLabelHeight:p},!0),i=ga(i-2*c,0),o=ga(o-c-v,0);var h=i*o,m=Dv(a,l,h,e,t,r);if(m.length){var d={x:c,y:v,width:i,height:o},y=xi(i,o),g=1/0,S=[];S.area=0;for(var x=0,_=m.length;x<_;){var b=m[x];S.push(b),S.area+=b.getLayout().area;var w=Pv(S,y,e.squareRatio);w<=g?(x++,g=w):(S.area-=S.pop().getLayout().area,mu(S,y,d,u,!1),y=xi(d.width,d.height),S.length=S.area=0,g=1/0)}if(S.length&&mu(S,y,d,u,!0),!t){var I=l.get("childrenVisibleMin");I!=null&&h<I&&(t=!0)}for(var x=0,_=m.length;x<_;x++)yu(m[x],e,t,r+1)}}}function Dv(a,e,t,r,i,o){var n=a.children||[],l=r.sort;l!=="asc"&&l!=="desc"&&(l=null);var s=r.leafDepth!=null&&r.leafDepth<=o;if(i&&!s)return a.viewChildren=[];n=Tr(n,function(v){return!v.isRemoved()}),Lv(n,l);var u=Av(e,n,l);if(u.sum===0)return a.viewChildren=[];if(u.sum=Iv(e,t,u.sum,l,n),u.sum===0)return a.viewChildren=[];for(var p=0,f=n.length;p<f;p++){var c=n[p].getValue()/u.sum*t;n[p].setLayout({area:c})}return s&&(n.length&&a.setLayout({isLeafRoot:!0},!0),n.length=0),a.viewChildren=n,a.setLayout({dataExtent:u.dataExtent},!0),n}function Iv(a,e,t,r,i){if(!r)return t;for(var o=a.get("visibleMin"),n=i.length,l=n,s=n-1;s>=0;s--){var u=i[r==="asc"?n-s-1:s].getValue();u/t*e<o&&(l=s,t-=u)}return r==="asc"?i.splice(0,n-l):i.splice(l,n-l),t}function Lv(a,e){return e&&a.sort(function(t,r){var i=e==="asc"?t.getValue()-r.getValue():r.getValue()-t.getValue();return i===0?e==="asc"?t.dataIndex-r.dataIndex:r.dataIndex-t.dataIndex:i}),a}function Av(a,e,t){for(var r=0,i=0,o=e.length;i<o;i++)r+=e[i].getValue();var n=a.get("visualDimension"),l;return!e||!e.length?l=[NaN,NaN]:n==="value"&&t?(l=[e[e.length-1].getValue(),e[0].getValue()],t==="asc"&&l.reverse()):(l=ua(),Oo(e,function(s){var u=s.getValue(n);u<l[0]&&(l[0]=u),u>l[1]&&(l[1]=u)})),{sum:r,dataExtent:l}}function Pv(a,e,t){for(var r=0,i=1/0,o=0,n=void 0,l=a.length;o<l;o++)n=a[o].getLayout().area,n&&(n<i&&(i=n),n>r&&(r=n));var s=a.area*a.area,u=e*e*t;return s?ga(u*r/s,s/(u*i)):1/0}function mu(a,e,t,r,i){var o=e===t.width?0:1,n=1-o,l=["x","y"],s=["width","height"],u=t[l[o]],p=e?a.area/e:0;(i||p>t[s[n]])&&(p=t[s[n]]);for(var f=0,c=a.length;f<c;f++){var v=a[f],h={},m=p?v.getLayout().area/p:0,d=h[s[n]]=ga(p-2*r,0),y=t[l[o]]+t[s[o]]-u,g=f===c-1||y<m?y:m,S=h[s[o]]=ga(g-2*r,0);h[l[n]]=t[l[n]]+xi(r,d/2),h[l[o]]=u+xi(r,S/2),u+=g,v.setLayout(h,!0)}t[l[n]]+=p,t[s[n]]-=p}function Cv(a,e,t,r){var i=(e||{}).node,o=r.width,n=r.height,l=B({},r);if(!i||i===t)return l;for(var s,u=o*n,p=u*a.option.zoomToNodeRatio;s=i.parentNode;){for(var f=0,c=s.children,v=0,h=c.length;v<h;v++)f+=c[v].getValue();var m=i.getValue();if(m===0)return l;p*=f/m;var d=s.getModel(),y=d.get(du),g=Math.max(y,xu(d));p+=4*y*y+(3*y+g)*Math.pow(p,.5),p>Zi&&(p=Zi),i=s}p<u&&(p=u);var S=Math.pow(p/u,.5);return{width:o*S,height:n*S}}function Ev(a,e,t){if(e)return{x:e.x,y:e.y};var r={x:0,y:0};if(!t)return r;var i=t.node,o=i.getLayout();if(!o)return r;for(var n=[o.width/2,o.height/2],l=i;l;){var s=l.getLayout();n[0]+=s.x,n[1]+=s.y,l=l.parentNode}return{x:a.width/2-n[0],y:a.height/2-n[1]}}function Su(a,e,t,r,i){var o=a.getLayout(),n=t[i],l=n&&n===a;if(!(n&&!l||i===t.length&&a!==r)){a.setLayout({isInView:!0,invisible:!l&&!e.intersect(o),isAboveViewRoot:l},!0);var s=new pe(e.x-o.x,e.y-o.y,e.width,e.height);Oo(a.viewChildren||[],function(u){Su(u,s,t,r,i+1)})}}function xu(a){return a.get(bv)?a.get(wv):0}function ko(a,e){return e.width/a.width||e.height/a.height||1}function Uo(a,e){return Vl(a,e.get("scaleLimit",!0))}var Go=K,_u=bt,bu=3,wu="label",Du="upperLabel",Rv=He*10,Nv=He*2,Mv=He*3,Ir=il([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),Iu=function(a){var e=Ir(a);return e.stroke=e.fill=e.lineWidth=null,e},_i=te(),Vv=(function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t._state="ready",t._storage=ya(),t}return e.prototype.render=function(t,r,i,o){var n=r.findComponents({mainType:"series",subType:"treemap",query:o});if(!(Rt(n,t)<0)){this.seriesModel=t,this.api=i,this.ecModel=r;var l=["treemapZoomToNode","treemapRootToNode"],s=Ne(o,l,t),u=o&&o.type,p=t.layoutInfo,f=!this._oldTree,c=this._storage,v=u==="treemapRootToNode"&&s&&c?{rootNodeGroup:c.nodeGroup[s.node.getRawIndex()],direction:o.direction}:null,h=this._giveContainerGroup(p),m=t.get("animation"),d=this._doRender(h,t,v);m&&!f&&(!u||u==="treemapZoomToNode"||u==="treemapRootToNode")?this._doAnimation(h,d,t,v):d.renderFinally(),this._resetController(i),this._renderBreadcrumb(t,i,s)}},e.prototype._giveContainerGroup=function(t){var r=this._containerGroup;return r||(r=this._containerGroup=new Go,this._initEvents(r),this.group.add(r)),r.x=t.x,r.y=t.y,r},e.prototype._doRender=function(t,r,i){var o=r.getData().tree,n=this._oldTree,l=ya(),s=ya(),u=this._storage,p=[];function f(d,y,g,S){return zv(r,s,u,i,l,p,d,y,g,S)}v(o.root?[o.root]:[],n&&n.root?[n.root]:[],t,o===n||!n,0);var c=h(u);return this._oldTree=o,this._storage=s,{lastsForAnimation:l,willDeleteEls:c,renderFinally:m};function v(d,y,g,S,x){S?(y=d,k(d,function(w,I){!w.isRemoved()&&b(I,I)})):new We(y,d,_,_).add(b).update(b).remove(zt(b,null)).execute();function _(w){return w.getId()}function b(w,I){var C=w!=null?d[w]:null,L=I!=null?y[I]:null,D=f(C,L,g,x);D&&v(C&&C.viewChildren||[],L&&L.viewChildren||[],D,S,x+1)}}function h(d){var y=ya();return d&&k(d,function(g,S){var x=y[S];k(g,function(_){_&&(x.push(_),_i(_).willDelete=!0)})}),y}function m(){k(c,function(d){k(d,function(y){y.parent&&y.parent.remove(y)})}),k(p,function(d){d.invisible=!0,d.dirty()})}},e.prototype._doAnimation=function(t,r,i,o){var n=i.get("animationDurationUpdate"),l=i.get("animationEasing"),s=(gt(n)?0:n)||0,u=(gt(l)?null:l)||"cubicOut",p=hu();k(r.willDeleteEls,function(f,c){k(f,function(v,h){if(!v.invisible){var m=v.parent,d,y=_i(m);if(o&&o.direction==="drillDown")d=m===o.rootNodeGroup?{shape:{x:0,y:0,width:y.nodeWidth,height:y.nodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var g=0,S=0;y.willDelete||(g=y.nodeWidth/2,S=y.nodeHeight/2),d=c==="nodeGroup"?{x:g,y:S,style:{opacity:0}}:{shape:{x:g,y:S,width:0,height:0},style:{opacity:0}}}d&&p.add(v,d,s,0,u)}})}),k(this._storage,function(f,c){k(f,function(v,h){var m=r.lastsForAnimation[c][h],d={};m&&(v instanceof K?m.oldX!=null&&(d.x=v.x,d.y=v.y,v.x=m.oldX,v.y=m.oldY):(m.oldShape&&(d.shape=B({},v.shape),v.setShape(m.oldShape)),m.fadein?(v.setStyle("opacity",0),d.style={opacity:1}):v.style.opacity!==1&&(d.style={opacity:1})),p.add(v,d,s,0,u))})},this),this._state="animating",p.finished(ot(function(){this._state="ready",r.renderFinally()},this)).start()},e.prototype._resetController=function(t){var r=this,i=this.seriesModel,o=this._controller;o||(o=this._controller=new Ke(t.getZr()),o.on("pan",ot(this._onPan,this)),o.on("zoom",ot(this._onZoom,this))),o.enable(i.get("roam"),{api:t,zInfo:{component:i},triggerInfo:{roamTrigger:i.get("roamTrigger"),isInSelf:function(n,l,s){var u=r._containerGroup;return u?u.getBoundingRect().contain(l-u.x,s-u.y):!1}}})},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)>bu||Math.abs(t.dy)>bu)){var r=this.seriesModel.getData().tree.root;if(!r)return;var i=r.getLayout();if(!i)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:i.x+t.dx,y:i.y+t.dy,width:i.width,height:i.height}})}},e.prototype._onZoom=function(t){var r=t.originX,i=t.originY,o=t.scale,n=this.seriesModel;if(this._state!=="animating"){var l=n.getData().tree.root;if(!l)return;var s=l.getLayout();if(!s)return;var u=new pe(s.x,s.y,s.width,s.height),p=n.layoutInfo,f=ko(p,s),c=f*o;c=Uo(c,n);var v=c/f;r-=p.x,i-=p.y;var h=Hn();Gi(h,h,[-r,-i]),Fn(h,h,[v,v]),Gi(h,h,[r,i]),u.applyTransform(h),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:u.x,y:u.y,width:u.width,height:u.height}})}},e.prototype._initEvents=function(t){var r=this;t.on("click",function(i){if(r._state==="ready"){var o=r.seriesModel.get("nodeClick",!0);if(o){var n=r.findTarget(i.offsetX,i.offsetY);if(n){var l=n.node;if(l.getLayout().isLeafRoot)r._rootToNode(n);else if(o==="zoomToNode")r._zoomToNode(n);else if(o==="link"){var s=l.hostTree.data.getItemModel(l.dataIndex),u=s.get("link",!0),p=s.get("target",!0)||"blank";u&&ka(u,p)}}}}},this)},e.prototype._renderBreadcrumb=function(t,r,i){var o=this;i||(i=t.get("leafDepth",!0)!=null?{node:t.getViewRoot()}:this.findTarget(r.getWidth()/2,r.getHeight()/2),i||(i={node:t.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new vu(this.group))).render(t,r,i.node,function(n){o._state!=="animating"&&(Jr(t.getViewRoot(),n)?o._rootToNode({node:n}):o._zoomToNode({node:n}))})},e.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=ya(),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 i,o=this.seriesModel.getViewRoot();return o.eachNode({attr:"viewChildren",order:"preorder"},function(n){var l=this._storage.background[n.getRawIndex()];if(l){var s=l.transformCoordToLocal(t,r),u=l.shape;if(u.x<=s[0]&&s[0]<=u.x+u.width&&u.y<=s[1]&&s[1]<=u.y+u.height)i={node:n,offsetX:s[0],offsetY:s[1]};else return!1}},this),i},e.type="treemap",e})(q);function ya(){return{nodeGroup:[],background:[],content:[]}}function zv(a,e,t,r,i,o,n,l,s,u){if(!n)return;var p=n.getLayout(),f=a.getData(),c=n.getModel();if(f.setItemGraphicEl(n.dataIndex,null),!p||!p.isInView)return;var v=p.width,h=p.height,m=p.borderWidth,d=p.invisible,y=n.getRawIndex(),g=l&&l.getRawIndex(),S=n.viewChildren,x=p.upperHeight,_=S&&S.length,b=c.getModel("itemStyle"),w=c.getModel(["emphasis","itemStyle"]),I=c.getModel(["blur","itemStyle"]),C=c.getModel(["select","itemStyle"]),L=b.get("borderRadius")||0,D=j("nodeGroup",Go);if(!D)return;if(s.add(D),D.x=p.x||0,D.y=p.y||0,D.markRedraw(),_i(D).nodeWidth=v,_i(D).nodeHeight=h,p.isAboveViewRoot)return D;var A=j("background",_u,u,Nv);A&&O(D,A,_&&p.upperLabelHeight);var E=c.getModel("emphasis"),z=E.get("focus"),P=E.get("blurScope"),T=E.get("disabled"),N=z==="ancestor"?n.getAncestorsIndices():z==="descendant"?n.getDescendantIndices():z;if(_)to(D)&&ca(D,!1),A&&(ca(A,!T),f.setItemGraphicEl(n.dataIndex,A),$i(A,N,P));else{var R=j("content",_u,u,Mv);R&&U(D,R),A.disableMorphing=!0,A&&to(A)&&ca(A,!1),ca(D,!T),f.setItemGraphicEl(n.dataIndex,D);var M=c.getShallow("cursor");M&&R.attr("cursor",M),$i(D,N,P)}return D;function O(et,W,pt){var st=at(W);if(st.dataIndex=n.dataIndex,st.seriesIndex=a.seriesIndex,W.setShape({x:0,y:0,width:v,height:h,r:L}),d)G(W);else{W.invisible=!1;var vt=n.getVisual("style"),It=vt.stroke,Yt=Iu(b);Yt.fill=It;var mt=Ir(w);mt.fill=w.get("borderColor");var Pt=Ir(I);Pt.fill=I.get("borderColor");var Tt=Ir(C);if(Tt.fill=C.get("borderColor"),pt){var Oe=v-2*m;F(W,It,vt.opacity,{x:m,y:0,width:Oe,height:x})}else W.removeTextContent();W.setStyle(Yt),W.ensureState("emphasis").style=mt,W.ensureState("blur").style=Pt,W.ensureState("select").style=Tt,dr(W)}et.add(W)}function U(et,W){var pt=at(W);pt.dataIndex=n.dataIndex,pt.seriesIndex=a.seriesIndex;var st=Math.max(v-2*m,0),vt=Math.max(h-2*m,0);if(W.culling=!0,W.setShape({x:m,y:m,width:st,height:vt,r:L}),d)G(W);else{W.invisible=!1;var It=n.getVisual("style"),Yt=It.fill,mt=Iu(b);mt.fill=Yt,mt.decal=It.decal;var Pt=Ir(w),Tt=Ir(I),Oe=Ir(C);F(W,Yt,It.opacity,null),W.setStyle(mt),W.ensureState("emphasis").style=Pt,W.ensureState("blur").style=Tt,W.ensureState("select").style=Oe,dr(W)}et.add(W)}function G(et){!et.invisible&&o.push(et)}function F(et,W,pt,st){var vt=c.getModel(st?Du:wu),It=Ue(c.get("name"),null),Yt=vt.getShallow("show");ht(et,ct(c,st?Du:wu),{defaultText:Yt?It:null,inheritColor:W,defaultOpacity:pt,labelFetcher:a,labelDataIndex:n.dataIndex});var mt=et.getTextContent();if(mt){var Pt=mt.style,Tt=zn(Pt.padding||0);st&&(et.setTextConfig({layoutRect:st}),mt.disableLabelLayout=!0),mt.beforeUpdate=function(){var De=Math.max((st?st.width:et.shape.width)-Tt[1]-Tt[3],0),ba=Math.max((st?st.height:et.shape.height)-Tt[0]-Tt[2],0);(Pt.width!==De||Pt.height!==ba)&&mt.setStyle({width:De,height:ba})},Pt.truncateMinChar=2,Pt.lineOverflow="truncate",Z(Pt,st,p);var Oe=mt.getState("emphasis");Z(Oe?Oe.style:null,st,p)}}function Z(et,W,pt){var st=et?et.text:null;if(!W&&pt.isLeafRoot&&st!=null){var vt=a.get("drillDownIcon",!0);et.text=vt?vt+" "+st:st}}function j(et,W,pt,st){var vt=g!=null&&t[et][g],It=i[et];return vt?(t[et][g]=null,Dt(It,vt)):d||(vt=new W,vt instanceof Aa&&(vt.z2=Ov(pt,st)),Gt(It,vt)),e[et][y]=vt}function Dt(et,W){var pt=et[y]={};W instanceof Go?(pt.oldX=W.x,pt.oldY=W.y):pt.oldShape=B({},W.shape)}function Gt(et,W){var pt=et[y]={},st=n.parentNode,vt=W instanceof K;if(st&&(!r||r.direction==="drillDown")){var It=0,Yt=0,mt=i.background[st.getRawIndex()];!r&&mt&&mt.oldShape&&(It=mt.oldShape.width,Yt=mt.oldShape.height),vt?(pt.oldX=0,pt.oldY=Yt):pt.oldShape={x:It,y:Yt,width:0,height:0}}pt.fadein=!vt}}function Ov(a,e){return a*Rv+e}var Lu=Vv;var kv="itemStyle",Pu=te(),Cu={seriesType:"treemap",reset:function(a){var e=a.getData().tree,t=e.root;t.isRemoved()||Eu(t,{},a.getViewRoot().getAncestors(),a)}};function Eu(a,e,t,r){var i=a.getModel(),o=a.getLayout(),n=a.hostTree.data;if(!(!o||o.invisible||!o.isInView)){var l=i.getModel(kv),s=Uv(l,e,r),u=n.ensureUniqueItemVisual(a.dataIndex,"style"),p=l.get("borderColor"),f=l.get("borderColorSaturation"),c;f!=null&&(c=Au(s),p=Gv(f,c)),u.stroke=p;var v=a.viewChildren;if(!v||!v.length)c=Au(s),u.fill=c;else{var h=Bv(a,i,o,l,s,v);k(v,function(m,d){if(m.depth>=t.length||m===t[m.depth]){var y=Hv(i,s,m,d,h,r);Eu(m,y,t,r)}})}}}function Uv(a,e,t){var r=B({},e),i=t.designatedVisualItemStyle;return k(["color","colorAlpha","colorSaturation"],function(o){i[o]=e[o];var n=a.get(o);i[o]=null,n!=null&&(r[o]=n)}),r}function Au(a){var e=Bo(a,"color");if(e){var t=Bo(a,"colorAlpha"),r=Bo(a,"colorSaturation");return r&&(e=Fi(e,null,null,r)),t&&(e=Kn(e,t)),e}}function Gv(a,e){return e!=null?Fi(e,null,null,a):null}function Bo(a,e){var t=a[e];if(t!=null&&t!=="none")return t}function Bv(a,e,t,r,i,o){if(!(!o||!o.length)){var n=Ho(e,"color")||i.color!=null&&i.color!=="none"&&(Ho(e,"colorAlpha")||Ho(e,"colorSaturation"));if(n){var l=e.get("visualMin"),s=e.get("visualMax"),u=t.dataExtent.slice();l!=null&&l<u[0]&&(u[0]=l),s!=null&&s>u[1]&&(u[1]=s);var p=e.get("colorMappingBy"),f={type:n.name,dataExtent:u,visual:n.range};f.type==="color"&&(p==="index"||p==="id")?(f.mappingMethod="category",f.loop=!0):f.mappingMethod="linear";var c=new ei(f);return Pu(c).drColorMappingBy=p,c}}}function Ho(a,e){var t=a.get(e);return $(t)&&t.length?{name:e,range:t}:null}function Hv(a,e,t,r,i,o){var n=B({},e);if(i){var l=i.type,s=l==="color"&&Pu(i).drColorMappingBy,u=s==="index"?r:s==="id"?o.mapIdToIndex(t.getId()):t.getValue(a.get("visualDimension"));n[l]=i.mapValueToVisual(u)}return n}function Fv(a){a.registerSeriesModel(pu),a.registerChartView(Lu),a.registerVisual(Cu),a.registerLayout(gu),su(a)}function $r(a){return"_EC_"+a}var Wv=(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[$r(e)]){var i=new Lr(e,t);return i.hostGraph=this,this.nodes.push(i),r[$r(e)]=i,i}},a.prototype.getNodeByIndex=function(e){var t=this.data.getRawIndex(e);return this.nodes[t]},a.prototype.getNodeById=function(e){return this._nodesMap[$r(e)]},a.prototype.addEdge=function(e,t,r){var i=this._nodesMap,o=this._edgesMap;if(yt(e)&&(e=this.nodes[e]),yt(t)&&(t=this.nodes[t]),e instanceof Lr||(e=i[$r(e)]),t instanceof Lr||(t=i[$r(t)]),!(!e||!t)){var n=e.id+"-"+t.id,l=new Tu(e,t,r);return l.hostGraph=this,this._directed&&(e.outEdges.push(l),t.inEdges.push(l)),e.edges.push(l),e!==t&&t.edges.push(l),this.edges.push(l),o[n]=l,l}},a.prototype.getEdgeByIndex=function(e){var t=this.edgeData.getRawIndex(e);return this.edges[t]},a.prototype.getEdge=function(e,t){e instanceof Lr&&(e=e.id),t instanceof Lr&&(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,i=r.length,o=0;o<i;o++)r[o].dataIndex>=0&&e.call(t,r[o],o)},a.prototype.eachEdge=function(e,t){for(var r=this.edges,i=r.length,o=0;o<i;o++)r[o].dataIndex>=0&&r[o].node1.dataIndex>=0&&r[o].node2.dataIndex>=0&&e.call(t,r[o],o)},a.prototype.breadthFirstTraverse=function(e,t,r,i){if(t instanceof Lr||(t=this._nodesMap[$r(t)]),!!t){for(var o=r==="out"?"outEdges":r==="in"?"inEdges":"edges",n=0;n<this.nodes.length;n++)this.nodes[n].__visited=!1;if(!e.call(i,t,null))for(var l=[t];l.length;)for(var s=l.shift(),u=s[o],n=0;n<u.length;n++){var p=u[n],f=p.node1===s?p.node2:p.node1;if(!f.__visited){if(e.call(i,f,s))return;l.push(f),f.__visited=!0}}}},a.prototype.update=function(){for(var e=this.data,t=this.edgeData,r=this.nodes,i=this.edges,o=0,n=r.length;o<n;o++)r[o].dataIndex=-1;for(var o=0,n=e.count();o<n;o++)r[e.getRawIndex(o)].dataIndex=o;t.filterSelf(function(l){var s=i[t.getRawIndex(l)];return s.node1.dataIndex>=0&&s.node2.dataIndex>=0});for(var o=0,n=i.length;o<n;o++)i[o].dataIndex=-1;for(var o=0,n=t.count();o<n;o++)i[t.getRawIndex(o)].dataIndex=o},a.prototype.clone=function(){for(var e=new a(this._directed),t=this.nodes,r=this.edges,i=0;i<t.length;i++)e.addNode(t[i].id,t[i].dataIndex);for(var i=0;i<r.length;i++){var o=r[i];e.addEdge(o.node1.id,o.node2.id,o.dataIndex)}return e},a})(),Lr=(function(){function a(e,t){this.inEdges=[],this.outEdges=[],this.edges=[],this.dataIndex=-1,this.id=e??"",this.dataIndex=t??-1}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.prototype.getTrajectoryDataIndices=function(){for(var e=Le(),t=Le(),r=0,i=this.edges.length;r<i;r++){var o=this.edges[r];if(!(o.dataIndex<0)){e.set(o.dataIndex,!0);for(var n=[o.node1],l=[o.node2],s=0;s<n.length;){var u=n[s];s++,t.set(u.dataIndex,!0);for(var p=u.inEdges,f=0,c=p.length,v=void 0,h=void 0;f<c;f++)v=p[f],h=v.dataIndex,h>=0&&!e.hasKey(h)&&(e.set(h,!0),n.push(v.node1))}for(s=0;s<l.length;){var m=l[s];s++,t.set(m.dataIndex,!0);for(var d=m.outEdges,f=0,y=d.length,g=void 0,S=void 0;f<y;f++)g=d[f],S=g.dataIndex,S>=0&&!e.hasKey(S)&&(e.set(S,!0),l.push(g.node2))}}}return{edge:e.keys(),node:t.keys()}},a})(),Tu=(function(){function a(e,t,r){this.dataIndex=-1,this.node1=e,this.node2=t,this.dataIndex=r??-1}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.prototype.getTrajectoryDataIndices=function(){var e=Le(),t=Le();e.set(this.dataIndex,!0);for(var r=[this.node1],i=[this.node2],o=0;o<r.length;){var n=r[o];o++,t.set(n.dataIndex,!0);for(var l=n.inEdges,s=0,u=l.length,p=void 0,f=void 0;s<u;s++)p=n.inEdges[s],f=p.dataIndex,f>=0&&!e.hasKey(f)&&(e.set(f,!0),r.push(p.node1))}for(o=0;o<i.length;){var c=i[o];o++,t.set(c.dataIndex,!0);for(var v=c.outEdges,s=0,u=v.length,h=void 0,m=void 0;s<u;s++)h=c.outEdges[s],m=h.dataIndex,m>=0&&!e.hasKey(m)&&(e.set(m,!0),i.push(h.node2))}return{edge:e.keys(),node:t.keys()}},a})();function Ru(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)}}}pr(Lr,Ru("hostGraph","data"));pr(Tu,Ru("hostGraph","edgeData"));var Nu=Wv;function Ar(a,e,t,r,i){for(var o=new Nu(r),n=0;n<a.length;n++)o.addNode(fr(a[n].id,a[n].name,n),n);for(var l=[],s=[],u=0,n=0;n<e.length;n++){var p=e[n],f=p.source,c=p.target;o.addEdge(f,c,u)&&(s.push(p),l.push(fr(Ue(p.id,null),f+" > "+c)),u++)}var v=t.get("coordinateSystem"),h;if(v==="cartesian2d"||v==="polar"||v==="matrix")h=Et(a,t);else{var m=Ua.get(v),d=m?m.dimensions||[]:[];Rt(d,"value")<0&&d.concat(["value"]);var y=Br(a,{coordDimensions:d,encodeDefine:t.getEncode()}).dimensions;h=new fe(y,t),h.initData(a)}var g=new fe(["value"],t);return g.initData(s,l),i&&i(h,g),Si({mainData:h,struct:o,structAttr:"graph",datas:{node:h,edge:g},datasAttr:{node:"data",edge:"edgeData"}}),o.update(),o}var Fo="-->",bi=function(a){return a.get("autoCurveness")||null},Mu=function(a,e){var t=bi(a),r=20,i=[];if(yt(t))r=t;else if($(t)){a.__curvenessList=t;return}e>r&&(r=e);var o=r%2?r+2:r+3;i=[];for(var n=0;n<o;n++)i.push((n%2?n+1:n)/10*(n%2?-1:1));a.__curvenessList=i},Sa=function(a,e,t){var r=[a.id,a.dataIndex].join("."),i=[e.id,e.dataIndex].join(".");return[t.uid,r,i].join(Fo)},Vu=function(a){var e=a.split(Fo);return[e[0],e[2],e[1]].join(Fo)},Yv=function(a,e){var t=Sa(a.node1,a.node2,e);return e.__edgeMap[t]},Zv=function(a,e){var t=Wo(Sa(a.node1,a.node2,e),e),r=Wo(Sa(a.node2,a.node1,e),e);return t+r},Wo=function(a,e){var t=e.__edgeMap;return t[a]?t[a].length:0};function zu(a){bi(a)&&(a.__curvenessList=[],a.__edgeMap={},Mu(a))}function Ou(a,e,t,r){if(bi(t)){var i=Sa(a,e,t),o=t.__edgeMap,n=o[Vu(i)];o[i]&&!n?o[i].isForward=!0:n&&o[i]&&(n.isForward=!0,o[i].isForward=!1),o[i]=o[i]||[],o[i].push(r)}}function ta(a,e,t,r){var i=bi(e),o=$(i);if(!i)return null;var n=Yv(a,e);if(!n)return null;for(var l=-1,s=0;s<n.length;s++)if(n[s]===t){l=s;break}var u=Zv(a,e);Mu(e,u),a.lineStyle=a.lineStyle||{};var p=Sa(a.node1,a.node2,e),f=e.__curvenessList,c=o||u%2?0:1;if(n.isForward)return f[c+l];var v=Vu(p),h=Wo(v,e),m=f[l+h+c];return r?o?i&&i[0]===0?(h+c)%2?m:-m:((h%2?0:1)+c)%2?m:-m:(h+c)%2?m:-m:f[l+h+c]}var St="graph",Xv=(function(a){V(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 i(){return r._categoriesData}this.legendVisualProvider=new oe(i,i),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),Vr(t,"edgeLabel",["show"])},e.prototype.getInitialData=function(t,r){var i=t.edges||t.links||[],o=t.data||t.nodes||[],n=this;if(o&&i){zu(this);var l=Ar(o,i,this,!0,s);return k(l.edges,function(u){Ou(u.node1,u.node2,this,u.dataIndex)},this),l.data}function s(u,p){u.wrapMethod("getItemModel",function(h){var m=n._categoriesModels,d=h.getShallow("category"),y=m[d];return y&&(y.parentModel=h.parentModel,h.parentModel=y),h});var f=Xt.prototype.getModel;function c(h,m){var d=f.call(this,h,m);return d.resolveParentPath=v,d}p.wrapMethod("getItemModel",function(h){return h.resolveParentPath=v,h.getModel=c,h});function v(h){if(h&&(h[0]==="label"||h[1]==="label")){var m=h.slice();return h[0]==="label"?m[0]="edgeLabel":h[1]==="label"&&(m[1]="edgeLabel"),m}return h}}},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,i){if(i==="edge"){var o=this.getData(),n=this.getDataParams(t,i),l=o.graph.getEdgeByIndex(t),s=o.getName(l.node1.dataIndex),u=o.getName(l.node2.dataIndex),p=[];return s!=null&&p.push(s),u!=null&&p.push(u),At("nameValue",{name:p.join(" > "),value:n.value,noValue:n.value==null})}var f=Sl({series:this,dataIndex:t,multipleSeries:r});return f},e.prototype._updateCategoriesData=function(){var t=X(this.option.categories||[],function(i){return i.value!=null?i:B({value:0},i)}),r=new fe(["value"],this);r.initData(t),this._categoriesData=r,this._categoriesModels=r.mapArray(function(i){return r.getItemModel(i)})},e.prototype.isAnimationEnabled=function(){return a.prototype.isAnimationEnabled.call(this)&&!(this.get("layout")==="force"&&this.get(["force","layoutAnimation"]))},e.prototype.__ownRoamView=function(){var t=this.coordinateSystem;return ja(t)&&t},e.type="series."+St,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:Y.color.neutral50,width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:Y.color.primary}}},e})(Q),ku=Xv;function wi(a){return a instanceof Array||(a=[a,a]),a}var Uu=rt(St,qv);function qv(a){a.eachSeriesByType(St,function(e){var t=e.getGraph(),r=e.getEdgeData(),i=wi(e.get("edgeSymbol")),o=wi(e.get("edgeSymbolSize"));r.setVisual("fromSymbol",i&&i[0]),r.setVisual("toSymbol",i&&i[1]),r.setVisual("fromSymbolSize",o&&o[0]),r.setVisual("toSymbolSize",o&&o[1]),r.setVisual("style",e.getModel("lineStyle").getLineStyle()),r.each(function(n){var l=r.getItemModel(n),s=t.getEdgeByIndex(n),u=wi(l.getShallow("symbol",!0)),p=wi(l.getShallow("symbolSize",!0)),f=l.getModel("lineStyle").getLineStyle(),c=r.ensureUniqueItemVisual(n,"style");switch(B(c,f),c.stroke){case"source":{var v=s.node1.getVisual("style");c.stroke=v&&v.fill;break}case"target":{var v=s.node2.getVisual("style");c.stroke=v&&v.fill;break}}u[0]&&s.setVisual("fromSymbol",u[0]),u[1]&&s.setVisual("toSymbol",u[1]),p[0]&&s.setVisual("fromSymbolSize",p[0]),p[1]&&s.setVisual("toSymbolSize",p[1])})})}function Di(a){var e=a.coordinateSystem;if(!(e&&e.type!=="view")){var t=a.getGraph();t.eachNode(function(r){var i=r.getModel();r.setLayout([+i.get("x"),+i.get("y")])}),xa(t,a)}}function xa(a,e){a.eachEdge(function(t,r){var i=Zt(t.getModel().get(["lineStyle","curveness"]),-ta(t,e,r,!0),0),o=$t(t.node1.getLayout()),n=$t(t.node2.getLayout()),l=[o,n];+i&&l.push([(o[0]+n[0])/2-(o[1]-n[1])*i,(o[1]+n[1])/2-(n[0]-o[0])*i]),t.setLayout(l)})}var Gu=rt(St,Kv);function Kv(a,e){a.eachSeriesByType(St,function(t){var r=t.get("layout"),i=t.coordinateSystem;if(i&&i.type!=="view"){var o=t.getData(),n=[];k(i.dimensions,function(c){n=n.concat(o.mapDimensionsAll(c))});for(var l=0;l<o.count();l++){for(var s=[],u=!1,p=0;p<n.length;p++){var f=o.get(n[p],l);isNaN(f)||(u=!0),s.push(f)}u?o.setItemLayout(l,i.dataToPoint(s)):o.setItemLayout(l,[NaN,NaN])}xa(o.graph,t)}else(!r||r==="none")&&Di(t)})}function Pr(a){var e=a.coordinateSystem;return ja(e)?Ja(e,a):1}function Cr(a){var e=a.getVisual("symbolSize");return e instanceof Array&&(e=(e[0]+e[1])/2),+e}var Bu=Math.PI,Yo=[];function ea(a,e,t,r){var i=a.coordinateSystem;if(!(i&&i.type!=="view")){var o=i.getBoundingRect(),n=a.getData(),l=n.graph,s=o.width/2+o.x,u=o.height/2+o.y,p=Math.min(o.width,o.height)/2,f=n.count();if(n.setLayout({cx:s,cy:u}),!!f){if(t){var c=i.pointToData(r),v=c[0],h=c[1],m=[v-s,h-u];Nr(m,m),Gn(m,m,p),t.setLayout([s+m[0],u+m[1]],!0);var d=a.get(["circular","rotateLabel"]);Zo(t,d,s,u)}jv[e](a,l,n,p,s,u,f),l.eachEdge(function(y,g){var S=Zt(y.getModel().get(["lineStyle","curveness"]),ta(y,a,g),0),x=$t(y.node1.getLayout()),_=$t(y.node2.getLayout()),b,w=(x[0]+_[0])/2,I=(x[1]+_[1])/2;+S&&(S*=3,b=[s*S+w*(1-S),u*S+I*(1-S)]),y.setLayout([x,_,b])})}}}var jv={value:function(a,e,t,r,i,o,n){var l=0,s=t.getSum("value"),u=Math.PI*2/(s||n);e.eachNode(function(p){var f=p.getValue("value"),c=u*(s?f:1)/2;l+=c,p.setLayout([r*Math.cos(l)+i,r*Math.sin(l)+o]),l+=c})},symbolSize:function(a,e,t,r,i,o,n){var l=0;Yo.length=n;var s=Pr(a);e.eachNode(function(f){var c=Cr(f);isNaN(c)&&(c=2),c<0&&(c=0),c*=s;var v=Math.asin(c/2/r);isNaN(v)&&(v=Bu/2),Yo[f.dataIndex]=v,l+=v*2});var u=(2*Bu-l)/n/2,p=0;e.eachNode(function(f){var c=u+Yo[f.dataIndex];p+=c,(!f.getLayout()||!f.getLayout().fixed)&&f.setLayout([r*Math.cos(p)+i,r*Math.sin(p)+o]),p+=c})}};function Zo(a,e,t,r){var i=a.getGraphicEl();if(i){var o=a.getModel(),n=o.get(["label","rotate"])||0,l=i.getSymbolPath();if(e){var s=a.getLayout(),u=Math.atan2(s[1]-r,s[0]-t);u<0&&(u=Math.PI*2+u);var p=s[0]<t;p&&(u=u-Math.PI);var f=p?"left":"right";l.setTextConfig({rotation:-u,position:f,origin:"center"});var c=l.ensureState("emphasis");B(c.textConfig||(c.textConfig={}),{position:f})}else l.setTextConfig({rotation:n*=Math.PI/180})}}var Hu=rt(St,Jv);function Jv(a){a.eachSeriesByType("graph",function(e){e.get("layout")==="circular"&&ea(e,"symbolSize")})}var ra=la;function Fu(a,e,t){for(var r=a,i=e,o=t.rect,n=o.width,l=o.height,s=[o.x+n/2,o.y+l/2],u=t.gravity==null?.1:t.gravity,p=0;p<r.length;p++){var f=r[p];f.p||(f.p=kn(n*(Math.random()-.5)+s[0],l*(Math.random()-.5)+s[1])),f.pp=$t(f.p),f.edges=null}var c=t.friction==null?.6:t.friction,v=c,h,m;return{warmUp:function(){v=c*.8},setFixed:function(d){r[d].fixed=!0},setUnfixed:function(d){r[d].fixed=!1},beforeStep:function(d){h=d},afterStep:function(d){m=d},step:function(d){h&&h(r,i);for(var y=[],g=r.length,S=0;S<i.length;S++){var x=i[S];if(!x.ignoreForceLayout){var _=x.n1,b=x.n2;vr(y,b.p,_.p);var w=Ui(y)-x.d,I=b.w/(_.w+b.w);isNaN(I)&&(I=0),Nr(y,y),!_.fixed&&ra(_.p,_.p,y,I*w*v),!b.fixed&&ra(b.p,b.p,y,-(1-I)*w*v)}}for(var S=0;S<g;S++){var C=r[S];C.fixed||(vr(y,s,C.p),ra(C.p,C.p,y,u*v))}for(var S=0;S<g;S++)for(var _=r[S],L=S+1;L<g;L++){var b=r[L];vr(y,b.p,_.p);var w=Ui(y);w===0&&(Un(y,Math.random()-.5,Math.random()-.5),w=1);var D=(_.rep+b.rep)/w/w;!_.fixed&&ra(_.pp,_.pp,y,D),!b.fixed&&ra(b.pp,b.pp,y,-D)}for(var A=[],S=0;S<g;S++){var C=r[S];C.fixed||(vr(A,C.p,C.pp),ra(C.p,C.p,A,v),Nt(C.pp,C.p))}v=v*.992;var E=v<.01;m&&m(r,i,E),d&&d(E)}}}var Wu=rt(St,Qv);function Qv(a){a.eachSeriesByType(St,function(e){var t=e.coordinateSystem;if(!(t&&t.type!=="view"))if(e.get("layout")==="force"){var r=e.preservedPoints||{},i=e.getGraph(),o=i.data,n=i.edgeData,l=e.getModel("force"),s=l.get("initLayout");e.preservedPoints?o.each(function(S){var x=o.getId(S);o.setItemLayout(S,r[x]||[NaN,NaN])}):!s||s==="none"?Di(e):s==="circular"&&ea(e,"value");var u=o.getDataExtent("value"),p=n.getDataExtent("value"),f=l.get("repulsion"),c=l.get("edgeLength"),v=$(f)?f:[f,f],h=$(c)?c:[c,c];h=[h[1],h[0]];var m=o.mapArray("value",function(S,x){var _=o.getItemLayout(x),b=Ot(S,u,v);return isNaN(b)&&(b=(v[0]+v[1])/2),{w:b,rep:b,fixed:o.getItemModel(x).get("fixed"),p:!_||isNaN(_[0])||isNaN(_[1])?null:_}}),d=n.mapArray("value",function(S,x){var _=i.getEdgeByIndex(x),b=Ot(S,p,h);isNaN(b)&&(b=(h[0]+h[1])/2);var w=_.getModel(),I=Zt(_.getModel().get(["lineStyle","curveness"]),-ta(_,e,x,!0),0);return{n1:m[_.node1.dataIndex],n2:m[_.node2.dataIndex],d:b,curveness:I,ignoreForceLayout:w.get("ignoreForceLayout")}}),y=t.getBoundingRect(),g=Fu(m,d,{rect:y,gravity:l.get("gravity"),friction:l.get("friction")});g.beforeStep(function(S,x){for(var _=0,b=S.length;_<b;_++)S[_].fixed&&Nt(S[_].p,i.getNodeByIndex(_).getLayout())}),g.afterStep(function(S,x,_){for(var b=0,w=S.length;b<w;b++)S[b].fixed||i.getNodeByIndex(b).setLayout(S[b].p),r[o.getId(b)]=S[b].p;for(var b=0,w=x.length;b<w;b++){var I=x[b],C=i.getEdgeByIndex(b),L=I.n1.p,D=I.n2.p,A=C.getLayout();A=A?A.slice():[],A[0]=A[0]||[],A[1]=A[1]||[],Nt(A[0],L),Nt(A[1],D),+I.curveness&&(A[2]=[(L[0]+D[0])/2-(L[1]-D[1])*I.curveness,(L[1]+D[1])/2-(D[0]-L[0])*I.curveness]),C.setLayout(A)}}),e.forceLayout=g,e.preservedPoints=r,g.step()}else e.forceLayout=null})}function $v(a,e,t){var r=ie(a,e),i=B(a.getBoxLayoutParams(),{aspect:t}),o=ae(i,r.refContainer);return hl(a,o,t)}function Xo(a,e){var t=[];return a.eachSeriesByType("graph",function(r){vl({targetModel:r,coordSysType:"view",coordSysProvider:i,isDefaultDataCoordSys:!0});function i(){var o=r.getData(),n=o.mapArray(function(h){var m=o.getItemModel(h);return[+m.get("x"),+m.get("y")]}),l=[],s=[];Pa(n,l,s),s[0]-l[0]===0&&(s[0]+=1,l[0]-=1),s[1]-l[1]===0&&(s[1]+=1,l[1]-=1);var u=(s[0]-l[0])/(s[1]-l[1]),p=$v(r,e,u);isNaN(u)&&(l=[p.x,p.y],s=[p.x+p.width,p.y+p.height]);var f=s[0]-l[0],c=s[1]-l[1],v=Xr(r,e,l[0],l[1],f,c,p);return t.push(v),v}}),t}var qo=[],Ko=[],jo=[],aa=Da,Jo=Bn,Yu=Math.abs;function Zu(a,e,t){for(var r=a[0],i=a[1],o=a[2],n=1/0,l,s=t*t,u=.1,p=.1;p<=.9;p+=.1){qo[0]=aa(r[0],i[0],o[0],p),qo[1]=aa(r[1],i[1],o[1],p);var f=Yu(Jo(qo,e)-s);f<n&&(n=f,l=p)}for(var c=0;c<32;c++){var v=l+u;Ko[0]=aa(r[0],i[0],o[0],l),Ko[1]=aa(r[1],i[1],o[1],l),jo[0]=aa(r[0],i[0],o[0],v),jo[1]=aa(r[1],i[1],o[1],v);var f=Jo(Ko,e)-s;if(Yu(f)<.01)break;var h=Jo(jo,e)-s;u/=2,f<0?h>=0?l=l+u:l=l-u:h>=0?l=l-u:l=l+u}return l}function _a(a,e){var t=[],r=Zn,i=[[],[],[]],o=[[],[]],n=[];e/=2,a.eachEdge(function(l,s){var u=l.getLayout(),p=l.getVisual("fromSymbol"),f=l.getVisual("toSymbol");u.__original||(u.__original=[$t(u[0]),$t(u[1])],u[2]&&u.__original.push($t(u[2])));var c=u.__original;if(u[2]!=null){if(Nt(i[0],c[0]),Nt(i[1],c[2]),Nt(i[2],c[1]),p&&p!=="none"){var v=Cr(l.node1),h=Zu(i,c[0],v*e);r(i[0][0],i[1][0],i[2][0],h,t),i[0][0]=t[3],i[1][0]=t[4],r(i[0][1],i[1][1],i[2][1],h,t),i[0][1]=t[3],i[1][1]=t[4]}if(f&&f!=="none"){var v=Cr(l.node2),h=Zu(i,c[1],v*e);r(i[0][0],i[1][0],i[2][0],h,t),i[1][0]=t[1],i[2][0]=t[2],r(i[0][1],i[1][1],i[2][1],h,t),i[1][1]=t[1],i[2][1]=t[2]}Nt(u[0],i[0]),Nt(u[1],i[2]),Nt(u[2],i[1])}else{if(Nt(o[0],c[0]),Nt(o[1],c[1]),vr(n,o[1],o[0]),Nr(n,n),p&&p!=="none"){var v=Cr(l.node1);la(o[0],o[0],n,v*e)}if(f&&f!=="none"){var v=Cr(l.node2);la(o[1],o[1],n,-v*e)}Nt(u[0],o[0]),Nt(u[1],o[1])}})}var eh=(function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=St,t}return e.prototype.init=function(t,r){var i=new Xe,o=new ai,n=this.group,l=new K;this._controller=new Ke(r.getZr()),l.add(i.group),l.add(o.group),n.add(l),this._symbolDraw=i,this._lineDraw=o,this._mainGroup=l,this._firstRender=!0},e.prototype.render=function(t,r,i){var o=this,n=po(t),l=!1;this._model=t,this._api=i,this._active=!0;var s=this._mainGroup,u=this._getThumbnailInfo();u&&u.bridge.reset(i);var p=this._symbolDraw,f=this._lineDraw;n&&Re(s,Te,n,this._firstRender?null:t),_a(t.getGraph(),Pr(t));var c=t.getData();p.updateData(c);var v=t.getEdgeData();f.updateData(v),this._updateNodeAndLinkScale(),n&&Yr(t,i,this._controller,function(x,_,b){return t.coordinateSystem.containPoint([_,b])},null),clearTimeout(this._layoutTimeout);var h=t.forceLayout,m=t.get(["force","layoutAnimation"]);h&&(l=!0,this._startForceLayoutIteration(h,i,m));var d=t.get("layout");c.graph.eachNode(function(x){var _=x.dataIndex,b=x.getGraphicEl(),w=x.getModel();if(b){b.off("drag").off("dragend");var I=w.get("draggable");I&&b.on("drag",function(L){switch(d){case"force":h.warmUp(),!o._layouting&&o._startForceLayoutIteration(h,i,m),h.setFixed(_),c.setItemLayout(_,[b.x,b.y]);break;case"circular":c.setItemLayout(_,[b.x,b.y]),x.setLayout({fixed:!0},!0),ea(t,"symbolSize",x,[L.offsetX,L.offsetY]),o.updateLayout(t);break;default:c.setItemLayout(_,[b.x,b.y]),xa(t.getGraph(),t),o.updateLayout(t);break}}).on("dragend",function(){h&&h.setUnfixed(_)}),b.setDraggable(I,!!w.get("cursor"));var C=w.get(["emphasis","focus"]);C==="adjacency"&&(at(b).focus=x.getAdjacentDataIndices())}}),c.graph.eachEdge(function(x){var _=x.getGraphicEl(),b=x.getModel().get(["emphasis","focus"]);_&&b==="adjacency"&&(at(_).focus={edge:[x.dataIndex],node:[x.node1.dataIndex,x.node2.dataIndex]})});var y=t.get("layout")==="circular"&&t.get(["circular","rotateLabel"]),g=c.getLayout("cx"),S=c.getLayout("cy");c.graph.eachNode(function(x){Zo(x,y,g,S)}),this._firstRender=!1,l||this._renderThumbnail(t,i,this._symbolDraw,this._lineDraw)},e.prototype.dispose=function(){this.remove(),this._controller&&this._controller.dispose()},e.prototype._startForceLayoutIteration=function(t,r,i){var o=this,n=!1;(function l(){t.step(function(s){o.updateLayout(o._model),(s||!n)&&(n=!0,o._renderThumbnail(o._model,r,o._symbolDraw,o._lineDraw)),(o._layouting=!s)&&(i?o._layoutTimeout=setTimeout(l,16):l())})})()},e.prototype.__updateOnOwnRoam=function(t,r,i){var o=po(r);!this._active||!o||(Re(this._mainGroup,Te,o,null),$a(t)&&(this._updateNodeAndLinkScale(),_a(r.getGraph(),Pr(r)),this._lineDraw.updateLayout(),i.updateLabelLayout()),this._updateThumbnailWindow())},e.prototype._updateNodeAndLinkScale=function(){var t=this._model,r=t.getData(),i=Pr(t);r.eachItemGraphicEl(function(o,n){o&&o.setSymbolScale(i)})},e.prototype.updateLayout=function(t){this._active&&(_a(t.getGraph(),Pr(t)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout())},e.prototype.remove=function(){this._active=!1,clearTimeout(this._layoutTimeout),this._layouting=!1,this._layoutTimeout=null,this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove(),this._controller&&this._controller.disable()},e.prototype._getThumbnailInfo=function(){var t=this._model,r=t.coordinateSystem;if(r.type==="view"){var i=Hl(t);if(i)return{bridge:i,coordSys:r}}},e.prototype._updateThumbnailWindow=function(){var t=this._getThumbnailInfo();t&&t.bridge.updateWindow(uo(null,t.coordSys),this._api)},e.prototype._renderThumbnail=function(t,r,i,o){var n=this._getThumbnailInfo();if(n){var l=new K,s=i.group.children(),u=o.group.children(),p=new K,f=new K;l.add(f),l.add(p);for(var c=0;c<s.length;c++){var v=s[c],h=v.children()[0],m=v.x,d=v.y,y=Ie(h.shape),g=B(y,{width:h.scaleX,height:h.scaleY,x:m-h.scaleX/2,y:d-h.scaleY/2}),S=Ie(h.style),x=new h.constructor({shape:g,style:S,z2:151});f.add(x)}for(var c=0;c<u.length;c++){var v=u[c],_=v.children()[0],S=Ie(_.style),g=Ie(_.shape),b=new Bl({style:S,shape:g,z2:151});p.add(b)}n.bridge.renderContent({api:r,roamType:t.get("roam"),viewportRect:null,group:l,targetTrans:uo(null,n.coordSys)})}},e.type=St,e})(q),Xu=eh;var qu=rt(St,rh);function rh(a){var e=a.findComponents({mainType:"legend"});!e||!e.length||a.eachSeriesByType(St,function(t){var r=t.getCategoriesData(),i=t.getGraph(),o=i.data,n=r.mapArray(r.getName);o.filterSelf(function(l){var s=o.getItemModel(l),u=s.getShallow("category");if(u!=null){yt(u)&&(u=n[u]);for(var p=0;p<e.length;p++)if(!e[p].isSelected(u))return!1}return!0})})}var Ku=rt(St,ah);function ah(a){var e={};a.eachSeriesByType(St,function(t){var r=t.getCategoriesData(),i=t.getData(),o={};r.each(function(n){var l=r.getName(n);o["ec-"+l]=n;var s=r.getItemModel(n),u=s.getModel("itemStyle").getItemStyle();u.fill||(u.fill=t.getColorFromPalette(l,e)),r.setItemVisual(n,"style",u);for(var p=["symbol","symbolSize","symbolKeepAspect"],f=0;f<p.length;f++){var c=s.getShallow(p[f],!0);c!=null&&r.setItemVisual(n,p[f],c)}}),r.count()&&i.each(function(n){var l=i.getItemModel(n),s=l.getShallow("category");if(s!=null){dt(s)&&(s=o["ec-"+s]);var u=r.getItemVisual(s,"style"),p=i.ensureUniqueItemVisual(n,"style");B(p,u);for(var f=["symbol","symbolSize","symbolKeepAspect"],c=0;c<f.length;c++)i.setItemVisual(n,f[c],r.getItemVisual(s,f[c]))}})})}function ih(a){a.registerChartView(Xu),a.registerSeriesModel(ku),a.registerProcessor(qu),a.registerVisual(Ku),a.registerVisual(Uu),a.registerLayout(Gu),a.registerLayout(a.PRIORITY.VISUAL.POST_CHART_LAYOUT,Hu),a.registerLayout(Wu),a.registerCoordinateSystem("graphView",{dimensions:zl.dimensions,create:Xo}),a.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},na),a.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},na),Zr(a,Ge,St)}var Er="chord",oh=(function(a){V(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.fillDataTextStyle(t.edges||t.links),this.legendVisualProvider=new oe(ot(this.getData,this),ot(this.getRawData,this))},e.prototype.mergeOption=function(t){a.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(t.edges||t.links)},e.prototype.getInitialData=function(t,r){var i=t.edges||t.links||[],o=t.data||t.nodes||[];if(o&&i){var n=Ar(o,i,this,!0,l);return n.data}function l(s,u){var p=Xt.prototype.getModel;function f(v,h){var m=p.call(this,v,h);return m.resolveParentPath=c,m}u.wrapMethod("getItemModel",function(v){return v.resolveParentPath=c,v.getModel=f,v});function c(v){if(v&&(v[0]==="label"||v[1]==="label")){var h=v.slice();return v[0]==="label"?h[0]="edgeLabel":v[1]==="label"&&(h[1]="edgeLabel"),h}return v}}},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.formatTooltip=function(t,r,i){var o=this.getDataParams(t,i);if(i==="edge"){var n=this.getData(),l=n.graph.getEdgeByIndex(t),s=n.getName(l.node1.dataIndex),u=n.getName(l.node2.dataIndex),p=[];return s!=null&&p.push(s),u!=null&&p.push(u),At("nameValue",{name:p.join(" > "),value:o.value,noValue:o.value==null})}return At("nameValue",{name:o.name,value:o.value,noValue:o.value==null})},e.prototype.getDataParams=function(t,r){var i=a.prototype.getDataParams.call(this,t,r);if(r==="node"){var o=this.getData(),n=this.getGraph().getNodeByIndex(t);if(i.name==null&&(i.name=o.getName(t)),i.value==null){var l=n.getLayout().value;i.value=l}}return i},e.type="series."+Er,e.defaultOption={z:2,coordinateSystem:"none",legendHoverLink:!0,colorBy:"data",left:0,top:0,right:0,bottom:0,width:null,height:null,center:["50%","50%"],radius:["70%","80%"],clockwise:!0,startAngle:90,endAngle:"auto",minAngle:0,padAngle:3,itemStyle:{borderRadius:[0,0,5,5]},lineStyle:{width:0,color:"source",opacity:.2},label:{show:!0,position:"outside",distance:5},emphasis:{focus:"adjacency",lineStyle:{opacity:.5}}},e})(Q),ju=oh;var nh=(function(a){V(e,a);function e(t,r,i){var o=a.call(this)||this;at(o).dataType="node",o.z2=2;var n=new Lt;return o.setTextContent(n),o.updateData(t,r,i,!0),o}return e.prototype.updateData=function(t,r,i,o){var n=this,l=t.graph.getNodeByIndex(r),s=t.hostModel,u=l.getModel(),p=u.getModel("emphasis"),f=t.getItemLayout(r),c=B(Ft(u.getModel("itemStyle"),f,!0),f),v=this;if(isNaN(c.startAngle)){v.setShape(c);return}o?v.setShape(c):tt(v,{shape:c},s,r);var h=B(Ft(u.getModel("itemStyle"),f,!0),f);n.setShape(h),n.useStyle(t.getItemVisual(r,"style")),lt(n,u),this._updateLabel(s,u,l),t.setItemGraphicEl(r,v),lt(v,u,"itemStyle");var m=p.get("focus");J(this,m==="adjacency"?l.getAdjacentDataIndices():m,p.get("blurScope"),p.get("disabled"))},e.prototype._updateLabel=function(t,r,i){var o=this.getTextContent(),n=i.getLayout(),l=(n.startAngle+n.endAngle)/2,s=Math.cos(l),u=Math.sin(l),p=r.getModel("label");o.ignore=!p.get("show");var f=ct(r),c=i.getVisual("style");ht(o,f,{labelFetcher:{getFormattedLabel:function(g,S,x,_,b,w){return t.getFormattedLabel(g,S,"node",_,Zt(b,f.normal&&f.normal.get("formatter"),r.get("name")),w)}},labelDataIndex:i.dataIndex,defaultText:i.dataIndex+"",inheritColor:c.fill,defaultOpacity:c.opacity,defaultOutsidePosition:"startArc"});var v=p.get("position")||"outside",h=p.get("distance")||0,m;v==="outside"?m=n.r+h:m=(n.r+n.r0)/2,this.textConfig={inside:v!=="outside"};var d=v!=="outside"?p.get("align")||"center":s>0?"left":"right",y=v!=="outside"?p.get("verticalAlign")||"middle":u>0?"top":"bottom";o.attr({x:s*m+n.cx,y:u*m+n.cy,rotation:0,style:{align:d,verticalAlign:y}})},e})(Bt),Qo=nh;var Qu=(function(a){V(e,a);function e(t,r,i,o){var n=a.call(this)||this;return at(n).dataType="edge",n.updateData(t,r,i,o,!0),n}return e.prototype.buildPath=function(t,r){t.moveTo(r.s1[0],r.s1[1]);var i=.7,o=r.clockwise;t.arc(r.cx,r.cy,r.r,r.sStartAngle,r.sEndAngle,!o),t.bezierCurveTo((r.cx-r.s2[0])*i+r.s2[0],(r.cy-r.s2[1])*i+r.s2[1],(r.cx-r.t1[0])*i+r.t1[0],(r.cy-r.t1[1])*i+r.t1[1],r.t1[0],r.t1[1]),t.arc(r.cx,r.cy,r.r,r.tStartAngle,r.tEndAngle,!o),t.bezierCurveTo((r.cx-r.t2[0])*i+r.t2[0],(r.cy-r.t2[1])*i+r.t2[1],(r.cx-r.s1[0])*i+r.s1[0],(r.cy-r.s1[1])*i+r.s1[1],r.s1[0],r.s1[1]),t.closePath()},e.prototype.updateData=function(t,r,i,o,n){var l=t.hostModel,s=r.graph.getEdgeByIndex(i),u=s.getLayout(),p=s.node1.getModel(),f=r.getItemModel(s.dataIndex),c=f.getModel("lineStyle"),v=f.getModel("emphasis"),h=v.get("focus"),m=B(Ft(p.getModel("itemStyle"),u,!0),u),d=this;if(isNaN(m.sStartAngle)||isNaN(m.tStartAngle)){d.setShape(m);return}n?(d.setShape(m),Ju(d,s,t,c)):(wt(d),Ju(d,s,t,c),tt(d,{shape:m},l,i)),J(this,h==="adjacency"?s.getAdjacentDataIndices():h,v.get("blurScope"),v.get("disabled")),lt(d,f,"lineStyle"),r.setItemGraphicEl(s.dataIndex,d)},e})(ft);function Ju(a,e,t,r){var i=e.node1,o=e.node2,n=a.style;a.setStyle(r.getLineStyle());var l=r.get("color");switch(l){case"source":n.fill=t.getItemVisual(i.dataIndex,"style").fill,n.decal=i.getVisual("style").decal;break;case"target":n.fill=t.getItemVisual(o.dataIndex,"style").fill,n.decal=o.getVisual("style").decal;break;case"gradient":var s=t.getItemVisual(i.dataIndex,"style").fill,u=t.getItemVisual(o.dataIndex,"style").fill;if(dt(s)&&dt(u)){var p=a.shape,f=(p.s1[0]+p.s2[0])/2,c=(p.s1[1]+p.s2[1])/2,v=(p.t1[0]+p.t2[0])/2,h=(p.t1[1]+p.t2[1])/2;n.fill=new Ur(f,c,v,h,[{offset:0,color:s},{offset:1,color:u}],!0)}break}}var lh=Math.PI/180,sh=(function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=Er,t}return e.prototype.init=function(t,r){},e.prototype.render=function(t,r,i){var o=t.getData(),n=this._data,l=this.group,s=-t.get("startAngle")*lh;if(o.diff(n).add(function(p){var f=o.getItemLayout(p);if(f){var c=new Qo(o,p,s);at(c).dataIndex=p,l.add(c)}}).update(function(p,f){var c=n.getItemGraphicEl(f),v=o.getItemLayout(p);if(!v){c&&re(c,t,f);return}c?c.updateData(o,p,s):c=new Qo(o,p,s),l.add(c)}).remove(function(p){var f=n.getItemGraphicEl(p);f&&re(f,t,p)}).execute(),!n){var u=t.get("center");this.group.scaleX=.01,this.group.scaleY=.01,this.group.originX=H(u[0],i.getWidth()),this.group.originY=H(u[1],i.getHeight()),nt(this.group,{scaleX:1,scaleY:1},t)}this._data=o,this.renderEdges(t,s)},e.prototype.renderEdges=function(t,r){var i=t.getData(),o=t.getEdgeData(),n=this._edgeData,l=this.group;o.diff(n).add(function(s){var u=new Qu(i,o,s,r);at(u).dataIndex=s,l.add(u)}).update(function(s,u){var p=n.getItemGraphicEl(u);p.updateData(i,o,s,r),l.add(p)}).remove(function(s){var u=n.getItemGraphicEl(s);u&&re(u,t,s)}).execute(),this._edgeData=o},e.prototype.dispose=function(){},e.type=Er,e})(q),$u=sh;var $o=Math.PI/180,tp=rt(Er,uh);function uh(a,e){a.eachSeriesByType(Er,function(t){ph(t,e)})}function ph(a,e){var t=a.getData(),r=t.graph,i=a.getEdgeData(),o=i.count();if(o){var n=Ga(a,e),l=n.cx,s=n.cy,u=n.r,p=n.r0,f=Math.max((a.get("padAngle")||0)*$o,0),c=Math.max((a.get("minAngle")||0)*$o,0),v=-a.get("startAngle")*$o,h=v+Math.PI*2,m=a.get("clockwise"),d=m?1:-1,y=[v,h];Or(y,!m);var g=y[0],S=y[1],x=S-g,_=t.getSum("value")===0&&i.getSum("value")===0,b=[],w=0;r.eachEdge(function(M){var O=_?1:M.getValue("value");_&&(O>0||c)&&(w+=2);var U=M.node1.dataIndex,G=M.node2.dataIndex;b[U]=(b[U]||0)+O,b[G]=(b[G]||0)+O});var I=0;if(r.eachNode(function(M){var O=M.getValue("value");isNaN(O)||(b[M.dataIndex]=Math.max(O,b[M.dataIndex]||0)),!_&&(b[M.dataIndex]>0||c)&&w++,I+=b[M.dataIndex]||0}),!(w===0||I===0)){f*w>=Math.abs(x)&&(f=Math.max(0,(Math.abs(x)-c*w)/w)),(f+c)*w>=Math.abs(x)&&(c=(Math.abs(x)-f*w)/w);var C=(x-f*w*d)/I,L=0,D=0,A=0,E=1/0;r.eachNode(function(M){var O=b[M.dataIndex]||0,U=C*(I?O:1)*d;Math.abs(U)<c?L+=c-Math.abs(U):(E=Math.min(E,Math.abs(U)-c),D+=Math.abs(U)-c,A+=Math.abs(U)),M.setLayout({angle:U,value:O})});var z=!1;if(L>D){var P=L/D;r.eachNode(function(M){var O=M.getLayout().angle;Math.abs(O)>=c?M.setLayout({angle:O*P,ratio:P},!0):M.setLayout({angle:c,ratio:c===0?1:O/c},!0)})}else r.eachNode(function(M){if(!z){var O=M.getLayout().angle,U=Math.min(O/A,1),G=U*L;O-G<c&&(z=!0)}});var T=L;r.eachNode(function(M){if(!(T<=0)){var O=M.getLayout().angle;if(O>c&&c>0){var U=z?1:Math.min(O/A,1),G=O-c,F=Math.min(G,Math.min(T,L*U));T-=F,M.setLayout({angle:O-F,ratio:(O-F)/O},!0)}else c>0&&M.setLayout({angle:c,ratio:O===0?1:c/O},!0)}});var N=g,R=[];r.eachNode(function(M){var O=Math.max(M.getLayout().angle,c);M.setLayout({cx:l,cy:s,r0:p,r:u,startAngle:N,endAngle:N+O*d,clockwise:m},!0),R[M.dataIndex]=N,N+=(O+f)*d}),r.eachEdge(function(M){var O=_?1:M.getValue("value"),U=C*(I?O:1)*d,G=M.node1.dataIndex,F=R[G]||0,Z=Math.abs((M.node1.getLayout().ratio||1)*U),j=F+Z*d,Dt=[l+p*Math.cos(F),s+p*Math.sin(F)],Gt=[l+p*Math.cos(j),s+p*Math.sin(j)],et=M.node2.dataIndex,W=R[et]||0,pt=Math.abs((M.node2.getLayout().ratio||1)*U),st=W+pt*d,vt=[l+p*Math.cos(W),s+p*Math.sin(W)],It=[l+p*Math.cos(st),s+p*Math.sin(st)];M.setLayout({s1:Dt,s2:Gt,sStartAngle:F,sEndAngle:j,t1:vt,t2:It,tStartAngle:W,tEndAngle:st,cx:l,cy:s,r:p,value:O,clockwise:m}),R[G]=j,R[et]=st})}}}function fh(a){a.registerChartView($u),a.registerSeriesModel(ju),a.registerLayout(a.PRIORITY.VISUAL.POST_CHART_LAYOUT,tp),a.registerProcessor(ve("chord"))}var ch=(function(){function a(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return a})(),vh=(function(a){V(e,a);function e(t){var r=a.call(this,t)||this;return r.type="pointer",r}return e.prototype.getDefaultShape=function(){return new ch},e.prototype.buildPath=function(t,r){var i=Math.cos,o=Math.sin,n=r.r,l=r.width,s=r.angle,u=r.x-i(s)*l*(l>=n/3?1:2),p=r.y-o(s)*l*(l>=n/3?1:2);s=r.angle-Math.PI/2,t.moveTo(u,p),t.lineTo(r.x+i(s)*l,r.y+o(s)*l),t.lineTo(r.x+i(r.angle)*n,r.y+o(r.angle)*n),t.lineTo(r.x-i(s)*l,r.y-o(s)*l),t.lineTo(u,p)},e})(ft),ep=vh;function hh(a,e){var t=a.get("center"),r=e.getWidth(),i=e.getHeight(),o=Math.min(r,i),n=H(t[0],e.getWidth()),l=H(t[1],e.getHeight()),s=H(a.get("radius"),o/2);return{cx:n,cy:l,r:s}}function Ii(a,e){var t=a==null?"":a+"";return e&&(dt(e)?t=e.replace("{value}",t):gt(e)&&(t=e(a))),t}var mh=(function(a){V(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,i){this.group.removeAll();var o=t.get(["axisLine","lineStyle","color"]),n=hh(t,i);this._renderMain(t,r,i,o,n),this._data=t.getData()},e.prototype.dispose=function(){},e.prototype._renderMain=function(t,r,i,o,n){var l=this.group,s=t.get("clockwise"),u=-t.get("startAngle")/180*Math.PI,p=-t.get("endAngle")/180*Math.PI,f=t.getModel("axisLine"),c=f.get("roundCap"),v=c?Kr:Bt,h=f.get("show"),m=f.getModel("lineStyle"),d=m.get("width"),y=[u,p];Or(y,!s),u=y[0],p=y[1];for(var g=p-u,S=u,x=[],_=0;h&&_<o.length;_++){var b=Math.min(Math.max(o[_][0],0),1);p=u+g*b;var w=new v({shape:{startAngle:S,endAngle:p,cx:n.cx,cy:n.cy,clockwise:s,r0:n.r-d,r:n.r},silent:!0});w.setStyle({fill:o[_][1]}),w.setStyle(m.getLineStyle(["color","width"])),x.push(w),S=p}x.reverse(),k(x,function(C){return l.add(C)});var I=function(C){if(C<=0)return o[0][1];var L;for(L=0;L<o.length;L++)if(o[L][0]>=C&&(L===0?0:o[L-1][0])<C)return o[L][1];return o[L-1][1]};this._renderTicks(t,r,i,I,n,u,p,s,d),this._renderTitleAndDetail(t,r,i,I,n),this._renderAnchor(t,n),this._renderPointer(t,r,i,I,n,u,p,s,d)},e.prototype._renderTicks=function(t,r,i,o,n,l,s,u,p){for(var f=this.group,c=n.cx,v=n.cy,h=n.r,m=+t.get("min"),d=+t.get("max"),y=t.getModel("splitLine"),g=t.getModel("axisTick"),S=t.getModel("axisLabel"),x=t.get("splitNumber"),_=g.get("splitNumber"),b=H(y.get("length"),h),w=H(g.get("length"),h),I=l,C=(s-l)/x,L=C/_,D=y.getModel("lineStyle").getLineStyle(),A=g.getModel("lineStyle").getLineStyle(),E=y.get("distance"),z,P,T=0;T<=x;T++){if(z=Math.cos(I),P=Math.sin(I),y.get("show")){var N=E?E+p:p,R=new eo({shape:{x1:z*(h-N)+c,y1:P*(h-N)+v,x2:z*(h-b-N)+c,y2:P*(h-b-N)+v},style:D,silent:!0});D.stroke==="auto"&&R.setStyle({stroke:o(T/x)}),f.add(R)}if(S.get("show")){var N=S.get("distance")+E,M=Ii(hr(T*(d-m)/x+m,Jn),S.get("formatter")),O=o(T/x),U=z*(h-b-N)+c,G=P*(h-b-N)+v,F=S.get("rotate"),Z=0;F==="radial"?(Z=-I+2*Math.PI,Z>Math.PI/2&&(Z+=Math.PI)):F==="tangential"?Z=-I-Math.PI/2:yt(F)&&(Z=F*Math.PI/180),Z===0?f.add(new Lt({style:Kt(S,{text:M,x:U,y:G,verticalAlign:P<-.8?"top":P>.8?"bottom":"middle",align:z<-.4?"left":z>.4?"right":"center"},{inheritColor:O}),silent:!0})):f.add(new Lt({style:Kt(S,{text:M,x:U,y:G,verticalAlign:"middle",align:"center"},{inheritColor:O}),silent:!0,originX:U,originY:G,rotation:Z}))}if(g.get("show")&&T!==x){var N=g.get("distance");N=N?N+p:p;for(var j=0;j<=_;j++){z=Math.cos(I),P=Math.sin(I);var Dt=new eo({shape:{x1:z*(h-N)+c,y1:P*(h-N)+v,x2:z*(h-w-N)+c,y2:P*(h-w-N)+v},silent:!0,style:A});A.stroke==="auto"&&Dt.setStyle({stroke:o((T+j/_)/x)}),f.add(Dt),I+=L}I-=L}else I+=C}},e.prototype._renderPointer=function(t,r,i,o,n,l,s,u,p){var f=this.group,c=this._data,v=this._progressEls,h=[],m=t.get(["pointer","show"]),d=t.getModel("progress"),y=d.get("show"),g=t.getData(),S=g.mapDimension("value"),x=+t.get("min"),_=+t.get("max"),b=[x,_],w=[l,s];function I(L,D){var A=g.getItemModel(L),E=A.getModel("pointer"),z=H(E.get("width"),n.r),P=H(E.get("length"),n.r),T=t.get(["pointer","icon"]),N=E.get("offsetCenter"),R=H(N[0],n.r),M=H(N[1],n.r),O=E.get("keepAspect"),U;return T?U=kt(T,R-z/2,M-P,z,P,null,O):U=new ep({shape:{angle:-Math.PI/2,width:z,r:P,x:R,y:M}}),U.rotation=-(D+Math.PI/2),U.x=n.cx,U.y=n.cy,U}function C(L,D){var A=d.get("roundCap"),E=A?Kr:Bt,z=d.get("overlap"),P=z?d.get("width"):p/g.count(),T=z?n.r-P:n.r-(L+1)*P,N=z?n.r:n.r-L*P,R=new E({shape:{startAngle:l,endAngle:D,cx:n.cx,cy:n.cy,clockwise:u,r0:T,r:N}});return z&&(R.z2=Ot(g.get(S,L),[x,_],[100,0],!0)),R}(y||m)&&(g.diff(c).add(function(L){var D=g.get(S,L);if(m){var A=I(L,l);nt(A,{rotation:-((isNaN(+D)?w[0]:Ot(D,b,w,!0))+Math.PI/2)},t),f.add(A),g.setItemGraphicEl(L,A)}if(y){var E=C(L,l),z=d.get("clip");nt(E,{shape:{endAngle:Ot(D,b,w,z)}},t),f.add(E),Qi(t.seriesIndex,g.dataType,L,E),h[L]=E}}).update(function(L,D){var A=g.get(S,L);if(m){var E=c.getItemGraphicEl(D),z=E?E.rotation:l,P=I(L,z);P.rotation=z,tt(P,{rotation:-((isNaN(+A)?w[0]:Ot(A,b,w,!0))+Math.PI/2)},t),f.add(P),g.setItemGraphicEl(L,P)}if(y){var T=v[D],N=T?T.shape.endAngle:l,R=C(L,N),M=d.get("clip");tt(R,{shape:{endAngle:Ot(A,b,w,M)}},t),f.add(R),Qi(t.seriesIndex,g.dataType,L,R),h[L]=R}}).execute(),g.each(function(L){var D=g.getItemModel(L),A=D.getModel("emphasis"),E=A.get("focus"),z=A.get("blurScope"),P=A.get("disabled"),T=o(Ot(g.get(S,L),b,[0,1],!0));if(m){var N=g.getItemGraphicEl(L),R=g.getItemVisual(L,"style"),M=R.fill;if(N instanceof ge){var O=N.style;N.useStyle(B({image:O.image,x:O.x,y:O.y,width:O.width,height:O.height},R))}else N.useStyle(R),N.type!=="pointer"&&N.setColor(M);N.setStyle(D.getModel(["pointer","itemStyle"]).getItemStyle()),N.style.fill==="auto"&&N.setStyle("fill",T),N.z2EmphasisLift=0,lt(N,D),J(N,E,z,P)}if(y){var U=h[L];U.useStyle(g.getItemVisual(L,"style")),U.setStyle(D.getModel(["progress","itemStyle"]).getItemStyle()),U.style.fill==="auto"&&U.setStyle("fill",T),U.z2EmphasisLift=0,lt(U,D),J(U,E,z,P)}}),this._progressEls=h)},e.prototype._renderAnchor=function(t,r){var i=t.getModel("anchor"),o=i.get("show");if(o){var n=i.get("size"),l=i.get("icon"),s=i.get("offsetCenter"),u=i.get("keepAspect"),p=kt(l,r.cx-n/2+H(s[0],r.r),r.cy-n/2+H(s[1],r.r),n,n,null,u);p.z2=i.get("showAbove")?1:0,p.setStyle(i.getModel("itemStyle").getItemStyle()),this.group.add(p)}},e.prototype._renderTitleAndDetail=function(t,r,i,o,n){var l=this,s=t.getData(),u=s.mapDimension("value"),p=+t.get("min"),f=+t.get("max"),c=new K,v=[],h=[],m=t.isAnimationEnabled(),d=t.get(["pointer","showAbove"]);s.diff(this._data).add(function(y){v[y]=new Lt({silent:!0}),h[y]=new Lt({silent:!0})}).update(function(y,g){v[y]=l._titleEls[g],h[y]=l._detailEls[g]}).execute(),s.each(function(y){var g=s.getItemModel(y),S=s.get(u,y),x=new K,_=o(Ot(S,[p,f],[0,1],!0)),b=g.getModel("title");if(b.get("show")){var w=b.get("offsetCenter"),I=n.cx+H(w[0],n.r),C=n.cy+H(w[1],n.r),L=v[y];L.attr({z2:d?0:2,style:Kt(b,{x:I,y:C,text:s.getName(y),align:"center",verticalAlign:"middle"},{inheritColor:_})}),x.add(L)}var D=g.getModel("detail");if(D.get("show")){var A=D.get("offsetCenter"),E=n.cx+H(A[0],n.r),z=n.cy+H(A[1],n.r),P=H(D.get("width"),n.r),T=H(D.get("height"),n.r),N=t.get(["progress","show"])?s.getItemVisual(y,"style").fill:_,L=h[y],R=D.get("formatter");L.attr({z2:d?0:2,style:Kt(D,{x:E,y:z,text:Ii(S,R),width:isNaN(P)?null:P,height:isNaN(T)?null:T,align:"center",verticalAlign:"middle"},{inheritColor:N})}),za(L,{normal:D},S,function(O){return Ii(O,R)}),m&&fl(L,y,s,t,{getFormattedLabel:function(O,U,G,F,Z,j){return Ii(j?j.interpolatedValue:S,R)}}),x.add(L)}c.add(x)}),this.group.add(c),this._titleEls=v,this._detailEls=h},e.type="gauge",e})(q),rp=mh;var dh=(function(a){V(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 Se(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,Y.color.neutral10]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:Y.color.axisTick,width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:Y.color.axisTickMinor,width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:Y.color.axisLabel,fontSize:12,rotate:0},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:Y.color.neutral00,borderWidth:0,borderColor:Y.color.theme[0]}},title:{show:!0,offsetCenter:[0,"20%"],color:Y.color.secondary,fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:Y.color.transparent,borderWidth:0,borderColor:Y.color.neutral40,width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:Y.color.primary,fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},e})(Q),ap=dh;function gh(a){a.registerChartView(rp),a.registerSeriesModel(ap)}var Me="funnel",yh=(function(a){V(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 oe(ot(this.getData,this),ot(this.getRawData,this)),this._defaultLabelLine(t)},e.prototype.getInitialData=function(t,r){return Se(this,{coordDimensions:["value"],encodeDefaulter:zt(Ba,this)})},e.prototype._defaultLabelLine=function(t){Vr(t,"labelLine",["show"]);var r=t.labelLine,i=t.emphasis.labelLine;r.show=r.show&&t.label.show,i.show=i.show&&t.emphasis.label.show},e.prototype.getDataParams=function(t){var r=this.getData(),i=a.prototype.getDataParams.call(this,t),o=r.mapDimension("value"),n=r.getSum(o);return i.percent=n?+(r.get(o,t)/n*100).toFixed(2):0,i.$vars.push("percent"),i},e.type="series."+Me,e.defaultOption={coordinateSystemUsage:"box",z:2,legendHoverLink:!0,colorBy:"data",left:80,top:60,right:80,bottom:65,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:Y.color.neutral00,borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:Y.color.primary}}},e})(Q),ip=yh;var Sh=["itemStyle","opacity"],xh=(function(a){V(e,a);function e(t,r){var i=a.call(this)||this,o=i,n=new ee,l=new Lt;return o.setTextContent(l),i.setTextGuideLine(n),i.updateData(t,r,!0),i}return e.prototype.updateData=function(t,r,i){var o=this,n=t.hostModel,l=t.getItemModel(r),s=t.getItemLayout(r),u=l.getModel("emphasis"),p=l.get(Sh);p=p??1,i||wt(o),o.useStyle(t.getItemVisual(r,"style")),o.style.lineJoin="round",i?(o.setShape({points:s.points}),o.style.opacity=0,nt(o,{style:{opacity:p}},n,r)):tt(o,{style:{opacity:p},shape:{points:s.points}},n,r),lt(o,l),this._updateLabel(t,r),J(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t,r){var i=this,o=this.getTextGuideLine(),n=i.getTextContent(),l=t.hostModel,s=t.getItemModel(r),u=t.getItemLayout(r),p=u.label,f=t.getItemVisual(r,"style"),c=f.fill;ht(n,ct(s),{labelFetcher:t.hostModel,labelDataIndex:r,defaultOpacity:f.opacity,defaultText:t.getName(r)},{normal:{align:p.textAlign,verticalAlign:p.verticalAlign}});var v=s.getModel("label"),h=v.get("color"),m=h==="inherit"?c:null;i.setTextConfig({local:!0,inside:!!p.inside,insideStroke:m,outsideFill:m});var d=p.linePoints;o.setShape({points:d}),i.textGuideLineConfig={anchor:d?new _t(d[0][0],d[0][1]):null},tt(n,{style:{x:p.x,y:p.y}},l,r),n.attr({rotation:p.rotation,originX:p.x,originY:p.y,z2:10}),di(i,gi(s),{stroke:c})},e})(kr),_h=(function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=Me,t.ignoreLabelLineUpdate=!0,t}return e.prototype.render=function(t,r,i){var o=t.getData(),n=this._data,l=this.group;o.diff(n).add(function(s){var u=new xh(o,s);o.setItemGraphicEl(s,u),l.add(u)}).update(function(s,u){var p=n.getItemGraphicEl(u);p.updateData(o,s),l.add(p),o.setItemGraphicEl(s,p)}).remove(function(s){var u=n.getItemGraphicEl(s);re(u,t,s)}).execute(),this._data=o},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.prototype.dispose=function(){},e.type=Me,e})(q),op=_h;function bh(a,e){for(var t=a.mapDimension("value"),r=a.mapArray(t,function(s){return s}),i=[],o=e==="ascending",n=0,l=a.count();n<l;n++)i[n]=n;return gt(e)?i.sort(e):e!=="none"&&i.sort(function(s,u){return o?r[s]-r[u]:r[u]-r[s]}),i}function wh(a){var e=a.hostModel,t=lp(e);a.each(function(r){var i=a.getItemModel(r),o=i.getModel("label"),n=o.get("position"),l=i.getModel("labelLine"),s=a.getItemLayout(r),u=s.points,p=n==="inner"||n==="inside"||n==="center"||n==="insideLeft"||n==="insideRight",f,c,v,h;if(p)n==="insideLeft"?(c=(u[0][0]+u[3][0])/2+5,v=(u[0][1]+u[3][1])/2,f="left"):n==="insideRight"?(c=(u[1][0]+u[2][0])/2-5,v=(u[1][1]+u[2][1])/2,f="right"):(c=(u[0][0]+u[1][0]+u[2][0]+u[3][0])/4,v=(u[0][1]+u[1][1]+u[2][1]+u[3][1])/4,f="center"),h=[[c,v],[c,v]];else{var m=void 0,d=void 0,y=void 0,g=void 0,S=l.get("length");dt(n)&&(!t&&Rt(["top","bottom"],n)>-1&&(n="left"),t&&Rt(["left","right"],n)>-1&&(n="bottom")),n==="left"?(m=(u[3][0]+u[0][0])/2,d=(u[3][1]+u[0][1])/2,y=m-S,c=y-5,f="right"):n==="right"?(m=(u[1][0]+u[2][0])/2,d=(u[1][1]+u[2][1])/2,y=m+S,c=y+5,f="left"):n==="top"?(m=(u[3][0]+u[0][0])/2,d=(u[3][1]+u[0][1])/2,g=d-S,v=g-5,f="center"):n==="bottom"?(m=(u[1][0]+u[2][0])/2,d=(u[1][1]+u[2][1])/2,g=d+S,v=g+5,f="center"):n==="rightTop"?(m=t?u[3][0]:u[1][0],d=t?u[3][1]:u[1][1],t?(g=d-S,v=g-5,f="center"):(y=m+S,c=y+5,f="top")):n==="rightBottom"?(m=u[2][0],d=u[2][1],t?(g=d+S,v=g+5,f="center"):(y=m+S,c=y+5,f="bottom")):n==="leftTop"?(m=u[0][0],d=t?u[0][1]:u[1][1],t?(g=d-S,v=g-5,f="center"):(y=m-S,c=y-5,f="right")):n==="leftBottom"?(m=t?u[1][0]:u[3][0],d=t?u[1][1]:u[2][1],t?(g=d+S,v=g+5,f="center"):(y=m-S,c=y-5,f="right")):(m=(u[1][0]+u[2][0])/2,d=(u[1][1]+u[2][1])/2,t?(g=d+S,v=g+5,f="center"):(y=m+S,c=y+5,f="left")),t?(y=m,c=y):(g=d,v=g),h=[[m,d],[y,g]]}s.label={linePoints:h,x:c,y:v,verticalAlign:"middle",textAlign:f,inside:p}})}var np=rt(Me,Dh);function Dh(a,e){a.eachSeriesByType(Me,function(t){var r=t.getData(),i=r.mapDimension("value"),o=t.get("sort"),n=ie(t,e),l=ae(t.getBoxLayoutParams(),n.refContainer),s=lp(t),u=l.width,p=l.height,f=bh(r,o),c=l.x,v=l.y,h=s?[H(t.get("minSize"),p),H(t.get("maxSize"),p)]:[H(t.get("minSize"),u),H(t.get("maxSize"),u)],m=r.getDataExtent(i),d=t.get("min"),y=t.get("max");d==null&&(d=Math.min(m[0],0)),y==null&&(y=m[1]);var g=t.get("funnelAlign"),S=t.get("gap"),x=s?u:p,_=(x-S*(r.count()-1))/r.count(),b=function(P,T){if(s){var N=r.get(i,P)||0,R=Ot(N,[d,y],h,!0),M=void 0;switch(g){case"top":M=v;break;case"center":M=v+(p-R)/2;break;case"bottom":M=v+(p-R);break}return[[T,M],[T,M+R]]}var O=r.get(i,P)||0,U=Ot(O,[d,y],h,!0),G;switch(g){case"left":G=c;break;case"center":G=c+(u-U)/2;break;case"right":G=c+u-U;break}return[[G,T],[G+U,T]]};o==="ascending"&&(_=-_,S=-S,s?c+=u:v+=p,f=f.reverse());for(var w=0;w<f.length;w++){var I=f[w],C=f[w+1],L=r.getItemModel(I);if(s){var D=L.get(["itemStyle","width"]);D==null?D=_:(D=H(D,u),o==="ascending"&&(D=-D));var A=b(I,c),E=b(C,c+D);c+=D+S,r.setItemLayout(I,{points:A.concat(E.slice().reverse())})}else{var z=L.get(["itemStyle","height"]);z==null?z=_:(z=H(z,p),o==="ascending"&&(z=-z));var A=b(I,v),E=b(C,v+z);v+=z+S,r.setItemLayout(I,{points:A.concat(E.slice().reverse())})}}wh(r)})}function lp(a){return a.get("orient")==="horizontal"}function Ih(a){a.registerChartView(op),a.registerSeriesModel(ip),a.registerLayout(np),a.registerProcessor(ve(Me))}var Lh=.3,Ah=(function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t._dataGroup=new K,t._initialized=!1,t}return e.prototype.init=function(){this.group.add(this._dataGroup)},e.prototype.render=function(t,r,i,o){var n=this._dataGroup;this._progressiveEls=[],n.removeAll();var l=t.getData(),s=this._data,u=t.coordinateSystem,p=u.dimensions,f=up(t);l.diff(s).add(c).update(v).remove(h).execute();function c(d){var y=sp(l,n,d,p,u);tn(y,l,d,f)}function v(d,y){var g=s.getItemGraphicEl(y);n.add(g);var S=pp(l,d,p,u);l.setItemGraphicEl(d,g),tt(g,{shape:{points:S}},t,d),wt(g),tn(g,l,d,f)}function h(d){var y=s.getItemGraphicEl(d);n.remove(y)}if(!this._initialized){this._initialized=!0;var m=Ph(u,t,function(){setTimeout(function(){n.removeClipPath()})});n.setClipPath(m)}this._data=l},e.prototype.incrementalPrepareRender=function(t,r,i){this._initialized=!0,this._data=null,this._dataGroup.removeAll()},e.prototype.incrementalRender=function(t,r,i){for(var o=r.getData(),n=r.coordinateSystem,l=this._progressiveEls=[],s=t.start;s<t.end;s++){var u=sp(o,this._dataGroup,s,n.dimensions,n);u.incremental=Mt(r),tn(u,o,s,up(r)),l.push(u)}},e.prototype.remove=function(){this._dataGroup&&this._dataGroup.removeAll(),this._data=null},e.type="parallel",e})(q);function Ph(a,e,t){var r=a.model,i=a.getRect(),o=new bt({shape:{x:i.x,y:i.y,width:i.width,height:i.height}}),n=r.get("layout")==="horizontal"?"width":"height";return o.setShape(n,0),nt(o,{shape:{width:i.width,height:i.height}},e,t),o}function pp(a,e,t,r){for(var i=[],o=0;o<t.length;o++){var n=t[o],l=a.get(a.mapDimension(n),e);Ch(l,r.getAxis(n).type)||i.push(r.dataToPoint(l,n))}return i}function sp(a,e,t,r,i){var o=pp(a,t,r,i),n=new ee({shape:{points:o},z2:10});return e.add(n),a.setItemGraphicEl(t,n),n}function up(a){var e=a.get("smooth",!0);return e===!0&&(e=Lh),e=$n(e),Rr(e)&&(e=0),{smooth:e}}function tn(a,e,t,r){a.useStyle(e.getItemVisual(t,"style")),a.style.fill=null,a.setShape("smooth",r.smooth);var i=e.getItemModel(t),o=i.getModel("emphasis");lt(a,i,"lineStyle"),J(a,o.get("focus"),o.get("blurScope"),o.get("disabled"))}function Ch(a,e){return e==="category"?a==null:a==null||isNaN(a)}var fp=Ah;var Eh=(function(a){V(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 Et(null,this,{useEncodeDefaulter:ot(Th,null,this)})},e.prototype.getRawIndicesByActiveState=function(t){var r=this.coordinateSystem,i=this.getData(),o=[];return r.eachActiveState(i,function(n,l){t===n&&o.push(i.getRawIndex(l))}),o},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:300,smooth:!1,animationEasing:"linear"},e})(Q);function Th(a){var e=a.ecModel.getComponent("parallel",a.get("parallelIndex"));if(e){var t={};return k(e.dimensions,function(r){var i=Rh(r);t[r]=i}),t}}function Rh(a){return+a.replace("dim","")}var cp=Eh;var Nh=["lineStyle","opacity"],Mh={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(i,o){t.eachActiveState(o,function(n,l){var s=r[n];if(n==="normal"&&o.hasItemOption){var u=o.getItemModel(l).get(Nh,!0);u!=null&&(s=u)}var p=o.ensureUniqueItemVisual(l,"style");p.opacity=s},i.start,i.end)}}}},vp=Mh;function Vh(a){Ze(Fl),a.registerChartView(fp),a.registerSeriesModel(cp),a.registerVisual(a.PRIORITY.VISUAL.BRUSH,vp)}var Jt="sankey",zh=(function(a){V(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 i=t.edges||t.links||[],o=t.data||t.nodes||[],n=t.levels||[];this.levelModels=[];for(var l=this.levelModels,s=0;s<n.length;s++)n[s].depth!=null&&n[s].depth>=0&&(l[n[s].depth]=new Xt(n[s],this,r));var u=Ar(o,i,this,!0,p);return u.data;function p(f,c){f.wrapMethod("getItemModel",function(v,h){var m=v.parentModel,d=m.getData().getItemLayout(h);if(d){var y=d.depth,g=m.levelModels[y];g&&(v.parentModel=g)}return v}),c.wrapMethod("getItemModel",function(v,h){var m=v.parentModel,d=m.getGraph().getEdgeByIndex(h),y=d.node1.getLayout();if(y){var g=y.depth,S=m.levelModels[g];S&&(v.parentModel=S)}return v})}},e.prototype.setNodePosition=function(t,r){var i=this.option.data||this.option.nodes,o=i[t];o.localX=r[0],o.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,i){function o(v){return isNaN(v)||v==null}if(i==="edge"){var n=this.getDataParams(t,i),l=n.data,s=n.value,u=l.source+" -- "+l.target;return At("nameValue",{name:u,value:s,noValue:o(s)})}else{var p=this.getGraph().getNodeByIndex(t),f=p.getLayout().value,c=this.getDataParams(t,i).data.name;return At("nameValue",{name:c!=null?c+"":null,value:f,noValue:o(f)})}},e.prototype.optionUpdated=function(){},e.prototype.getDataParams=function(t,r){var i=a.prototype.getDataParams.call(this,t,r);if(i.value==null&&r==="node"){var o=this.getGraph().getNodeByIndex(t),n=o.getLayout().value;i.value=n}return i},e.prototype.__ownRoamView=function(){return this.coordinateSystem},e.type="series."+Jt,e.layoutMode="box",e.defaultOption={z:2,coordinateSystemUsage:"box",left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,roam:!1,roamTrigger:"global",center:null,zoom:1,label:{show:!0,position:"right",fontSize:12},edgeLabel:{show:!1,fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:Y.color.neutral50,opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:Y.color.primary}},animationEasing:"linear",animationDuration:1e3},e})(Q),hp=zh;var Oh=(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})(),kh=(function(a){V(e,a);function e(t){return a.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new Oh},e.prototype.buildPath=function(t,r){var i=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+i,r.y2),t.bezierCurveTo(r.cpx2+i,r.cpy2,r.cpx1+i,r.cpy1,r.x1+i,r.y1)):(t.lineTo(r.x2,r.y2+i),t.bezierCurveTo(r.cpx2,r.cpy2+i,r.cpx1,r.cpy1+i,r.x1,r.y1+i)),t.closePath()},e.prototype.highlight=function(){Ea(this)},e.prototype.downplay=function(){Ta(this)},e})(ft),Uh=(function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=Jt,t._mainGroup=new K,t}return e.prototype.init=function(t,r){this._controller=new Ke(r.getZr()),this.group.add(this._mainGroup),this._firstRender=!0},e.prototype.render=function(t,r,i){var o=t.getGraph(),n=this._mainGroup,l=t.layoutInfo,s=l.width,u=l.height,p=t.getData(),f=t.getData("edge"),c=t.get("orient");n.removeAll(),n.x=l.x,n.y=l.y,this._updateViewCoordSys(t,i),Yr(t,i,this._controller,Qa(n),null),o.eachEdge(function(v){var h=new kh,m=at(h);m.dataIndex=v.dataIndex,m.seriesIndex=t.seriesIndex,m.dataType="edge";var d=v.getModel(),y=d.getModel("lineStyle"),g=y.get("curveness"),S=v.node1.getLayout(),x=v.node1.getModel(),_=x.get("localX"),b=x.get("localY"),w=v.node2.getLayout(),I=v.node2.getModel(),C=I.get("localX"),L=I.get("localY"),D=v.getLayout(),A,E,z,P,T,N,R,M;h.shape.extent=Math.max(1,D.dy),h.shape.orient=c,c==="vertical"?(A=(_!=null?_*s:S.x)+D.sy,E=(b!=null?b*u:S.y)+S.dy,z=(C!=null?C*s:w.x)+D.ty,P=L!=null?L*u:w.y,T=A,N=E*(1-g)+P*g,R=z,M=E*g+P*(1-g)):(A=(_!=null?_*s:S.x)+S.dx,E=(b!=null?b*u:S.y)+D.sy,z=C!=null?C*s:w.x,P=(L!=null?L*u:w.y)+D.ty,T=A*(1-g)+z*g,N=E,R=A*g+z*(1-g),M=P),h.setShape({x1:A,y1:E,x2:z,y2:P,cpx1:T,cpy1:N,cpx2:R,cpy2:M}),h.useStyle(y.getItemStyle()),mp(h.style,c,v);var O=""+d.get("value"),U=ct(d,"edgeLabel");ht(h,U,{labelFetcher:{getFormattedLabel:function(Z,j,Dt,Gt,et,W){return t.getFormattedLabel(Z,j,"edge",Gt,Zt(et,U.normal&&U.normal.get("formatter"),O),W)}},labelDataIndex:v.dataIndex,defaultText:O}),h.setTextConfig({position:"inside"});var G=d.getModel("emphasis");lt(h,d,"lineStyle",function(Z){var j=Z.getItemStyle();return mp(j,c,v),j}),n.add(h),f.setItemGraphicEl(v.dataIndex,h);var F=G.get("focus");J(h,F==="adjacency"?v.getAdjacentDataIndices():F==="trajectory"?v.getTrajectoryDataIndices():F,G.get("blurScope"),G.get("disabled"))}),o.eachNode(function(v){var h=v.getLayout(),m=v.getModel(),d=m.get("localX"),y=m.get("localY"),g=m.getModel("emphasis"),S=m.get(["itemStyle","borderRadius"])||0,x=new bt({shape:{x:d!=null?d*s:h.x,y:y!=null?y*u:h.y,width:h.dx,height:h.dy,r:S},style:m.getModel("itemStyle").getItemStyle(),z2:10});ht(x,ct(m),{labelFetcher:{getFormattedLabel:function(b,w){return t.getFormattedLabel(b,w,"node")}},labelDataIndex:v.dataIndex,defaultText:v.id}),x.disableLabelAnimation=!0,x.setStyle("fill",v.getVisual("color")),x.setStyle("decal",v.getVisual("style").decal),lt(x,m),n.add(x),p.setItemGraphicEl(v.dataIndex,x),at(x).dataType="node";var _=g.get("focus");J(x,_==="adjacency"?v.getAdjacentDataIndices():_==="trajectory"?v.getTrajectoryDataIndices():_,g.get("blurScope"),g.get("disabled"))}),p.eachItemGraphicEl(function(v,h){var m=p.getItemModel(h);m.get("draggable")&&(v.drift=function(d,y){this.shape.x+=d,this.shape.y+=y,this.dirty(),i.dispatchAction({type:"dragNode",seriesId:t.id,dataIndex:p.getRawIndex(h),localX:this.shape.x/s,localY:this.shape.y/u})},v.draggable=!0,v.cursor="move")}),!this._data&&t.isAnimationEnabled()&&n.setClipPath(Gh(n.getBoundingRect(),t,function(){n.removeClipPath()})),this._data=t.getData(),this._firstRender=!1},e.prototype.__updateOnOwnRoam=function(t,r,i){Re(this.group,Te,r.coordinateSystem,null)},e.prototype.dispose=function(){this._controller&&this._controller.dispose()},e.prototype._updateViewCoordSys=function(t,r){var i=t.layoutInfo,o=t.coordinateSystem=Xr(t,r,i.x,i.y,i.width,i.height);Re(this.group,Te,o,this._firstRender?null:t)},e.type=Jt,e})(q);function mp(a,e,t){switch(a.fill){case"source":a.fill=t.node1.getVisual("color"),a.decal=t.node1.getVisual("style").decal;break;case"target":a.fill=t.node2.getVisual("color"),a.decal=t.node2.getVisual("style").decal;break;case"gradient":var r=t.node1.getVisual("color"),i=t.node2.getVisual("color");dt(r)&&dt(i)&&(a.fill=new Ur(0,0,+(e==="horizontal"),+(e==="vertical"),[{color:r,offset:0},{color:i,offset:1}]))}}function Gh(a,e,t){var r=new bt({shape:{x:a.x-10,y:a.y-10,width:0,height:a.height+20}});return nt(r,{shape:{width:a.width+20}},e,t),r}var dp=Uh;var gp=rt(Jt,Bh);function Bh(a,e){a.eachSeriesByType(Jt,function(t){var r=t.get("nodeWidth"),i=t.get("nodeGap"),o=ie(t,e).refContainer,n=ae(t.getBoxLayoutParams(),o);t.layoutInfo=n;var l=n.width,s=n.height,u=t.getGraph(),p=u.nodes,f=u.edges;Fh(p);var c=Tr(p,function(d){return d.getLayout().value===0}),v=c.length!==0?0:t.get("layoutIterations"),h=t.get("orient"),m=t.get("nodeAlign");Hh(p,f,r,i,l,s,v,h,m)})}function Hh(a,e,t,r,i,o,n,l,s){Wh(a,e,t,i,o,l,s),qh(a,e,o,i,r,n,l),am(a,l)}function Fh(a){k(a,function(e){var t=nr(e.outEdges,Li),r=nr(e.inEdges,Li),i=e.getValue()||0,o=Math.max(t,r,i);e.setLayout({value:o},!0)})}function Wh(a,e,t,r,i,o,n){for(var l=[],s=[],u=[],p=[],f=0,c=0;c<e.length;c++)l[c]=1;for(var c=0;c<a.length;c++)s[c]=a[c].inEdges.length,s[c]===0&&u.push(a[c]);for(var v=-1;u.length;){for(var h=0;h<u.length;h++){var m=u[h],d=m.hostGraph.data.getRawDataItem(m.dataIndex),y=d.depth!=null&&d.depth>=0;y&&d.depth>v&&(v=d.depth),m.setLayout({depth:y?d.depth:f},!0),o==="vertical"?m.setLayout({dy:t},!0):m.setLayout({dx:t},!0);for(var g=0;g<m.outEdges.length;g++){var S=m.outEdges[g],x=Rt(e,S);l[x]=0;var _=S.node2,b=Rt(a,_);--s[b]===0&&Rt(p,_)<0&&p.push(_)}}++f,u=p,p=[]}for(var c=0;c<l.length;c++)if(l[c]===1)throw new Error("Sankey is a DAG, the original data has cycle!");var w=v>f-1?v:f-1;n&&n!=="left"&&Yh(a,n,o,w);var I=o==="vertical"?(i-t)/w:(r-t)/w;Xh(a,I,o)}function yp(a){var e=a.hostGraph.data.getRawDataItem(a.dataIndex);return e.depth!=null&&e.depth>=0}function Yh(a,e,t,r){if(e==="right"){for(var i=[],o=a,n=0;o.length;){for(var l=0;l<o.length;l++){var s=o[l];s.setLayout({skNodeHeight:n},!0);for(var u=0;u<s.inEdges.length;u++){var p=s.inEdges[u];Rt(i,p.node1)<0&&i.push(p.node1)}}o=i,i=[],++n}k(a,function(f){yp(f)||f.setLayout({depth:Math.max(0,r-f.getLayout().skNodeHeight)},!0)})}else e==="justify"&&Zh(a,r)}function Zh(a,e){k(a,function(t){!yp(t)&&!t.outEdges.length&&t.setLayout({depth:e},!0)})}function Xh(a,e,t){k(a,function(r){var i=r.getLayout().depth*e;t==="vertical"?r.setLayout({y:i},!0):r.setLayout({x:i},!0)})}function qh(a,e,t,r,i,o,n){var l=Kh(a,n);jh(l,e,t,r,i,n),en(l,i,t,r,n);for(var s=1;o>0;o--)s*=.99,Jh(l,s,n),en(l,i,t,r,n),rm(l,s,n),en(l,i,t,r,n)}function Kh(a,e){var t=[],r=e==="vertical"?"y":"x",i=sa(a,function(o){return o.getLayout()[r]});return Ia(i.keys),k(i.keys,function(o){t.push(i.buckets.get(o))}),t}function jh(a,e,t,r,i,o){var n=1/0;k(a,function(l){var s=l.length,u=0;k(l,function(f){u+=f.getLayout().value});var p=o==="vertical"?(r-(s-1)*i)/u:(t-(s-1)*i)/u;p<n&&(n=p)}),k(a,function(l){k(l,function(s,u){var p=s.getLayout().value*n;o==="vertical"?(s.setLayout({x:u},!0),s.setLayout({dx:p},!0)):(s.setLayout({y:u},!0),s.setLayout({dy:p},!0))})}),k(e,function(l){var s=+l.getValue()*n;l.setLayout({dy:s},!0)})}function en(a,e,t,r,i){var o=i==="vertical"?"x":"y";k(a,function(n){n.sort(function(m,d){return m.getLayout()[o]-d.getLayout()[o]});for(var l,s,u,p=0,f=n.length,c=i==="vertical"?"dx":"dy",v=0;v<f;v++)s=n[v],u=p-s.getLayout()[o],u>0&&(l=s.getLayout()[o]+u,i==="vertical"?s.setLayout({x:l},!0):s.setLayout({y:l},!0)),p=s.getLayout()[o]+s.getLayout()[c]+e;var h=i==="vertical"?r:t;if(u=p-e-h,u>0){l=s.getLayout()[o]-u,i==="vertical"?s.setLayout({x:l},!0):s.setLayout({y:l},!0),p=l;for(var v=f-2;v>=0;--v)s=n[v],u=s.getLayout()[o]+s.getLayout()[c]+e-p,u>0&&(l=s.getLayout()[o]-u,i==="vertical"?s.setLayout({x:l},!0):s.setLayout({y:l},!0)),p=s.getLayout()[o]}})}function Jh(a,e,t){k(a.slice().reverse(),function(r){k(r,function(i){if(i.outEdges.length){var o=nr(i.outEdges,Qh,t)/nr(i.outEdges,Li);if(isNaN(o)){var n=i.outEdges.length;o=n?nr(i.outEdges,$h,t)/n:0}if(t==="vertical"){var l=i.getLayout().x+(o-lr(i,t))*e;i.setLayout({x:l},!0)}else{var s=i.getLayout().y+(o-lr(i,t))*e;i.setLayout({y:s},!0)}}})})}function Qh(a,e){return lr(a.node2,e)*a.getValue()}function $h(a,e){return lr(a.node2,e)}function tm(a,e){return lr(a.node1,e)*a.getValue()}function em(a,e){return lr(a.node1,e)}function lr(a,e){return e==="vertical"?a.getLayout().x+a.getLayout().dx/2:a.getLayout().y+a.getLayout().dy/2}function Li(a){return a.getValue()}function nr(a,e,t){for(var r=0,i=a.length,o=-1;++o<i;){var n=+e(a[o],t);isNaN(n)||(r+=n)}return r}function rm(a,e,t){k(a,function(r){k(r,function(i){if(i.inEdges.length){var o=nr(i.inEdges,tm,t)/nr(i.inEdges,Li);if(isNaN(o)){var n=i.inEdges.length;o=n?nr(i.inEdges,em,t)/n:0}if(t==="vertical"){var l=i.getLayout().x+(o-lr(i,t))*e;i.setLayout({x:l},!0)}else{var s=i.getLayout().y+(o-lr(i,t))*e;i.setLayout({y:s},!0)}}})})}function am(a,e){var t=e==="vertical"?"x":"y";k(a,function(r){r.outEdges.sort(function(i,o){return i.node2.getLayout()[t]-o.node2.getLayout()[t]}),r.inEdges.sort(function(i,o){return i.node1.getLayout()[t]-o.node1.getLayout()[t]})}),k(a,function(r){var i=0,o=0;k(r.outEdges,function(n){n.setLayout({sy:i},!0),i+=n.getLayout().dy}),k(r.inEdges,function(n){n.setLayout({ty:o},!0),o+=n.getLayout().dy})})}var Sp=rt(Jt,im);function im(a){a.eachSeriesByType(Jt,function(e){var t=e.getGraph(),r=t.nodes,i=t.edges;if(r.length){var o=1/0,n=-1/0;k(r,function(l){var s=l.getLayout().value;s<o&&(o=s),s>n&&(n=s)}),k(r,function(l){var s=new ei({type:"color",mappingMethod:"linear",dataExtent:[o,n],visual:e.get("color")}),u=s.mapValueToVisual(l.getLayout().value),p=l.getModel().get(["itemStyle","color"]);p!=null?(l.setVisual("color",p),l.setVisual("style",{fill:p})):(l.setVisual("color",u),l.setVisual("style",{fill:u}))})}i.length&&k(i,function(l){var s=l.getModel().get("lineStyle");l.setVisual("style",s)})})}function om(a){a.registerChartView(dp),a.registerSeriesModel(hp),a.registerLayout(gp),a.registerVisual(Sp),a.registerAction({type:"dragNode",event:"dragnode",update:"update"},function(e,t){t.eachComponent({mainType:Ge,subType:Jt,query:e},function(r){r.setNodePosition(e.dataIndex,[e.localX,e.localY])})}),Zr(a,Ge,Jt)}var Ai=(function(){function a(){}return a.prototype._hasEncodeRule=function(e){var t=this.getEncode();return t&&t.get(e)!=null},a.prototype.getInitialData=function(e,t){var r,i=t.getComponent("xAxis",this.get("xAxisIndex")),o=t.getComponent("yAxis",this.get("yAxisIndex")),n=i.get("type"),l=o.get("type"),s,u=e.layout;n==="category"?(u="horizontal",r=i.getOrdinalMeta(),s=!this._hasEncodeRule("x")):l==="category"&&(u="vertical",r=o.getOrdinalMeta(),s=!this._hasEncodeRule("y")),u||(u=l==="time"?"vertical":"horizontal"),this._layout=u;var p=["x","y"],f=u==="horizontal"?0:1,c=this._baseAxisDim=p[f],v=p[1-f],h=[i,o],m=h[f].get("type"),d=h[1-f].get("type"),y=e.data;if(y&&s){var g=[];k(y,function(_,b){var w;$(_)?(w=_.slice(),_.unshift(b)):$(_.value)?(w=B({},_),w.value=w.value.slice(),_.value.unshift(b)):w=_,g.push(w)}),e.data=g}var S=this.defaultValueDimensions,x=[{name:c,type:va(m),ordinalMeta:r,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:v,type:va(d),dimsDef:S.slice()}];return Se(this,{coordDimensions:x,dimensionsCount:S.length+1,encodeDefaulter:zt(dl,x,this)})},a.prototype.getBaseAxis=function(){var e=this._baseAxisDim;return this.ecModel.getComponent(e+"Axis",this.get(e+"AxisIndex")).axis},a.prototype.getWhiskerBoxesLayout=function(){return this._layout},a})();function ia(a,e){for(var t=e.ends.length,r=0,i=0;i<t;i++)a.contain(e.ends[i][0],e.ends[i][1])&&r++;return r?r<t?$e:Qe:tr}var le="boxplot",xp=(function(a){V(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."+le,e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,clip:!0,boxWidth:[7,50],itemStyle:{color:Y.color.neutral00,borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:Y.color.shadow}},animationDuration:800},e})(Q);pr(xp,Ai,!0);var _p=xp;var nm=(function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=le,t}return e.prototype.render=function(t,r,i){var o=t.getData(),n=this.group,l=this._data;this._data||n.removeAll();var s=t.getWhiskerBoxesLayout()==="horizontal"?1:0,u=t.get("clip",!0),p=t.coordinateSystem,f=p.getArea&&p.getArea(),c=u&&jt(p,!1,t);o.diff(l).add(function(v){if(o.hasValue(v)){var h=o.getItemLayout(v),m=u?ia(f,h):Qe;if(m===tr)return;var d=bp(h,o,v,s,!0);er(m===$e,d,c),o.setItemGraphicEl(v,d),n.add(d)}}).update(function(v,h){var m=l.getItemGraphicEl(h);if(!o.hasValue(v)){n.remove(m);return}var d=o.getItemLayout(v),y=u?ia(f,d):Qe;if(y===tr){n.remove(m);return}m?(wt(m),wp(d,m,o,v)):m=bp(d,o,v,s),er(y===$e,m,c),n.add(m),o.setItemGraphicEl(v,m)}).remove(function(v){var h=l.getItemGraphicEl(v);h&&n.remove(h)}).execute(),this._data=o},e.prototype.remove=function(t){var r=this.group,i=this._data;this._data=null,i&&i.eachItemGraphicEl(function(o){o&&r.remove(o)})},e.type=le,e})(q),lm=(function(){function a(){}return a})(),sm=(function(a){V(e,a);function e(t){var r=a.call(this,t)||this;return r.type="boxplotBoxPath",r}return e.prototype.getDefaultShape=function(){return new lm},e.prototype.buildPath=function(t,r){var i=r.points,o=0;for(t.moveTo(i[o][0],i[o][1]),o++;o<4;o++)t.lineTo(i[o][0],i[o][1]);for(t.closePath();o<i.length;o++)t.moveTo(i[o][0],i[o][1]),o++,t.lineTo(i[o][0],i[o][1])},e})(ft);function bp(a,e,t,r,i){var o=a.ends,n=new sm({shape:{points:i?um(o,r,a):o}});return wp(a,n,e,t,i),n}function wp(a,e,t,r,i){var o=t.hostModel,n=ut[i?"initProps":"updateProps"];n(e,{shape:{points:a.ends}},o,r),e.useStyle(t.getItemVisual(r,"style")),e.style.strokeNoScale=!0,e.z2=100;var l=t.getItemModel(r),s=l.getModel("emphasis");lt(e,l),J(e,s.get("focus"),s.get("blurScope"),s.get("disabled"))}function um(a,e,t){return X(a,function(r){return r=r.slice(),r[e]=t.initBaseline,r})}var Dp=nm;var pm=zr(),Ip=rt(le,fm);function fm(a){var e=Ce(le);Za(a,e,function(t){var r=Dl(t,e);if(r){var i=cm(t,r);gr(t,e,function(o){var n=o.seriesIndex;vm(o,i.boxOffsetList[n],i.boxWidthList[n])})}})}function cm(a,e){var t=[],r=[],i=[],o=Ut(a,{fromStat:{key:Ce(le)},min:1}).w;gr(a,Ce(le),function(p){var f=p.get("boxWidth");$(f)||(f=[f,f]),i[p.seriesIndex]=[H(f[0],o)||0,H(f[1],o)||0]});var n=o*.8-2,l=n/e*.3,s=(n-l*(e-1))/e,u=s/2-n/2;return gr(a,Ce(le),function(p){var f=p.seriesIndex;r[f]=u,u+=l+s,t[f]=Ae(de(s,i[f][0]),i[f][1])}),{boxOffsetList:r,boxWidthList:t}}function vm(a,e,t){var r=a.coordinateSystem,i=a.getData(),o=t/2,n=a.getWhiskerBoxesLayout()==="horizontal"?0:1,l=1-n,s=["x","y"],u=i.mapDimension(s[n]),p=i.mapDimensionsAll(s[l]);if(u==null||p.length<5)return;for(var f=0;f<i.count();f++){var c=i.get(u,f),v=S(c,p[2],f),h=S(c,p[0],f),m=S(c,p[1],f),d=S(c,p[3],f),y=S(c,p[4],f),g=[];x(g,m,!1),x(g,d,!0),g.push(h,m,y,d),_(g,h),_(g,y),_(g,v),i.setItemLayout(f,{initBaseline:v[l],ends:g})}function S(b,w,I){var C=i.get(w,I),L=[];L[n]=b,L[l]=C;var D;return isNaN(b)||isNaN(C)?D=[NaN,NaN]:(D=r.dataToPoint(L),D[n]+=e),D}function x(b,w,I){var C=w.slice(),L=w.slice();C[n]+=o,L[n]-=o,I?b.push(C,L):b.push(L,C)}function _(b,w){var I=w.slice(),C=w.slice();I[n]-=o,C[n]+=o,b.push(I,C)}}function Lp(a){pm(a,function(){var e=Ce(le);Xa(a,{key:e,seriesType:le,getMetrics:Ka}),Hr(e,Fr(e))})}function rn(a,e){e=e||{};for(var t=[],r=[],i=e.boundIQR,o=i==="none"||i===0,n=0;n<a.length;n++){var l=Ia(a[n].slice()),s=La(l,.25),u=La(l,.5),p=La(l,.75),f=l[0],c=l[l.length-1],v=(i??1.5)*(p-s),h=o?f:Math.max(f,s-v),m=o?c:Math.min(c,p+v),d=e.itemNameFormatter,y=gt(d)?d({value:n}):dt(d)?d.replace("{value}",n+""):n+"";t.push([y,h,s,u,p,m]);for(var g=0;g<l.length;g++){var S=l[g];if(S<h||S>m){var x=[y,S];r.push(x)}}}return{boxData:t,outliers:r}}var Ap={type:"echarts:boxplot",transform:function(e){var t=e.upstream;if(t.sourceFormat!==nl){var r="";Mr(r)}var i=rn(t.getRawData(),e.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:i.boxData},{data:i.outliers}]}};function hm(a){a.registerSeriesModel(_p),a.registerChartView(Dp),a.registerLayout(Ip),a.registerTransform(Ap),Lp(a)}var se="candlestick",Pp=(function(a){V(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,i){var o=r.getItemLayout(t);return o&&i.rect(o.brushRect)},e.type="series."+se,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",borderColorDoji:null,borderWidth:1},emphasis:{itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationEasing:"linear",animationDuration:300},e})(Q);pr(Pp,Ai,!0);var Cp=Pp;var mm=["itemStyle","borderColor"],dm=["itemStyle","borderColor0"],gm=["itemStyle","borderColorDoji"],ym=["itemStyle","color"],Sm=["itemStyle","color0"];function Pi(a,e){return e.get(a>0?ym:Sm)}function Ci(a,e){return e.get(a===0?gm:a>0?mm:dm)}var xm={seriesType:se,plan:ye(),performRawSeries:!0,reset:function(a,e){if(!e.isSeriesFiltered(a)){var t=a.pipelineContext.large;return!t&&{progress:function(r,i){for(var o;(o=r.next())!=null;){var n=i.getItemModel(o),l=i.getItemLayout(o).sign,s=n.getItemStyle();s.fill=Pi(l,n),s.stroke=Ci(l,n)||s.fill;var u=i.ensureUniqueItemVisual(o,"style");B(u,s)}}}}}},Ep=xm;var _m=["color","borderColor"],bm=(function(a){V(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,i){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(t),this._isLargeDraw?this._renderLarge(t):this._renderNormal(t)},e.prototype.incrementalPrepareRender=function(t,r,i){this._clear(),this._updateDrawMode(t)},e.prototype.incrementalRender=function(t,r,i,o){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(t,r):this._incrementalRenderNormal(t,r)},e.prototype.eachRendered=function(t){Fe(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(),i=this._data,o=this.group,n=r.getLayout("isSimpleBox"),l=t.get("clip",!0),s=t.coordinateSystem,u=s.getArea&&s.getArea(),p=l&&jt(s,!1,t);this._data||o.removeAll();var f=Tp(t);r.diff(i).add(function(c){if(r.hasValue(c)){var v=r.getItemLayout(c),h=l?ia(u,v):Qe;if(h===tr)return;var m=an(v,c,f,!0);nt(m,{shape:{points:v.ends}},t,c),er(h===$e,m,p),on(m,r,c,n),o.add(m),r.setItemGraphicEl(c,m)}}).update(function(c,v){var h=i.getItemGraphicEl(v);if(!r.hasValue(c)){o.remove(h);return}var m=r.getItemLayout(c),d=l?ia(u,m):Qe;if(d===tr){o.remove(h);return}h?(tt(h,{shape:{points:m.ends}},t,c),wt(h)):h=an(m,c,f),on(h,r,c,n),er(d===$e,h,p),o.add(h),r.setItemGraphicEl(c,h)}).remove(function(c){var v=i.getItemGraphicEl(c);v&&o.remove(v)}).execute(),this._data=r},e.prototype._renderLarge=function(t){this._clear(),Rp(t,this.group);var r=t.get("clip",!0)?jt(t.coordinateSystem,!1,t):null;er(!!r,this.group,r)},e.prototype._incrementalRenderNormal=function(t,r){for(var i=r.getData(),o=i.getLayout("isSimpleBox"),n=Tp(r),l;(l=t.next())!=null;){var s=i.getItemLayout(l),u=an(s,l,n);on(u,i,l,o),u.incremental=Mt(r),this.group.add(u),this._progressiveEls.push(u)}},e.prototype._incrementalRenderLarge=function(t,r){Rp(r,this.group,this._progressiveEls,!0)},e.prototype.remove=function(t){this._clear()},e.prototype._clear=function(){this.group.removeAll(),er(!1,this.group,null),this._data=null},e.type=se,e})(q),wm=(function(){function a(){}return a})(),Dm=(function(a){V(e,a);function e(t){var r=a.call(this,t)||this;return r.type="normalCandlestickBox",r}return e.prototype.getDefaultShape=function(){return new wm},e.prototype.buildPath=function(t,r){var i=r.points;this.__simpleBox?(t.moveTo(i[4][0],i[4][1]),t.lineTo(i[6][0],i[6][1])):(t.moveTo(i[0][0],i[0][1]),t.lineTo(i[1][0],i[1][1]),t.lineTo(i[2][0],i[2][1]),t.lineTo(i[3][0],i[3][1]),t.closePath(),t.moveTo(i[4][0],i[4][1]),t.lineTo(i[5][0],i[5][1]),t.moveTo(i[6][0],i[6][1]),t.lineTo(i[7][0],i[7][1]))},e})(ft);function an(a,e,t,r){var i=a.ends;return new Dm({shape:{points:r?Im(i,t,a):i},z2:100})}function on(a,e,t,r){var i=e.getItemModel(t);a.useStyle(e.getItemVisual(t,"style")),a.style.strokeNoScale=!0;var o=i.getShallow("cursor");o&&a.attr("cursor",o),a.__simpleBox=r,lt(a,i);var n=e.getItemLayout(t).sign;k(a.states,function(s,u){var p=i.getModel(u),f=Pi(n,p),c=Ci(n,p)||f,v=s.style||(s.style={});f&&(v.fill=f),c&&(v.stroke=c)});var l=i.getModel("emphasis");J(a,l.get("focus"),l.get("blurScope"),l.get("disabled"))}function Im(a,e,t){return X(a,function(r){return r=r.slice(),r[e]=t.initBaseline,r})}function Tp(a){return a.getWhiskerBoxesLayout()==="horizontal"?1:0}var Lm=(function(){function a(){}return a})(),nn=(function(a){V(e,a);function e(t){var r=a.call(this,t)||this;return r.type="largeCandlestickBox",r}return e.prototype.getDefaultShape=function(){return new Lm},e.prototype.buildPath=function(t,r){for(var i=r.points,o=0;o<i.length;)if(this.__sign===i[o++]){var n=i[o++];t.moveTo(n,i[o++]),t.lineTo(n,i[o++])}else o+=3},e})(ft);function Rp(a,e,t,r){var i=a.getData(),o=i.getLayout("largePoints"),n=new nn({shape:{points:o},__sign:1,ignoreCoarsePointer:!0});e.add(n);var l=new nn({shape:{points:o},__sign:-1,ignoreCoarsePointer:!0});e.add(l);var s=new nn({shape:{points:o},__sign:0,ignoreCoarsePointer:!0});e.add(s),ln(1,n,a,i),ln(-1,l,a,i),ln(0,s,a,i),r&&(n.incremental=Mt(a),l.incremental=Mt(a),s.incremental=Mt(a)),t&&t.push(n,l,s)}function ln(a,e,t,r){var i=Ci(a,t)||Pi(a,t),o=t.getModel("itemStyle").getItemStyle(_m);e.useStyle(o),e.style.fill=null,e.style.stroke=i;var n=t.get("cursor");n&&e.attr("cursor",n)}var Np=bm;function sn(a){!a||!$(a.series)||k(a.series,function(e){Vn(e)&&e.type==="k"&&(e.type=se)})}var Am=zr(),Vp={seriesType:se,plan:ye(),reset:function(a){var e=a.coordinateSystem,t=a.getData(),r=Pm(a,t),i=a.getWhiskerBoxesLayout()==="horizontal"?0:1,o=1-i,n=["x","y"],l=t.getDimensionIndex(t.mapDimension(n[i])),s=X(t.mapDimensionsAll(n[o]),t.getDimensionIndex,t),u=s[0],p=s[1],f=s[2],c=s[3];if(t.setLayout({candleWidth:r,isSimpleBox:r<=1.3}),l<0||s.length<4)return;return{progress:a.pipelineContext.large?h:v};function v(m,d){for(var y,g=d.getStore();(y=m.next())!=null;){var S=g.get(l,y),x=g.get(u,y),_=g.get(p,y),b=g.get(f,y),w=g.get(c,y),I=Ae(x,_),C=de(x,_),L=N(I,S),D=N(C,S),A=N(b,S),E=N(w,S),z=[];R(z,D,0),R(z,L,1),z.push(O(E),O(D),O(A),O(L));var P=d.getItemModel(y),T=!!P.get(["itemStyle","borderColorDoji"]);d.setItemLayout(y,{sign:Mp(g,y,x,_,p,T),initBaseline:x>_?D[o]:L[o],ends:z,brushRect:M(b,w,S)})}function N(U,G){var F=[];return F[i]=G,F[o]=U,isNaN(G)||isNaN(U)?[NaN,NaN]:e.dataToPoint(F)}function R(U,G,F){var Z=G.slice(),j=G.slice();Z[i]=Ma(Z[i]+r/2,1,!1),j[i]=Ma(j[i]-r/2,1,!0),F?U.push(Z,j):U.push(j,Z)}function M(U,G,F){var Z=N(U,F),j=N(G,F);return Z[i]-=r/2,j[i]-=r/2,{x:Z[0],y:Z[1],width:o?r:j[0]-Z[0],height:o?j[1]-Z[1]:r}}function O(U){return U[i]=Ma(U[i],1),U}}function h(m,d){for(var y=Ht(m.count*4),g=0,S,x=[],_=[],b,w=d.getStore(),I=!!a.get(["itemStyle","borderColorDoji"]);(b=m.next())!=null;){var C=w.get(l,b),L=w.get(u,b),D=w.get(p,b),A=w.get(f,b),E=w.get(c,b);if(isNaN(C)||isNaN(A)||isNaN(E)){y[g++]=NaN,g+=3;continue}y[g++]=Mp(w,b,L,D,p,I),x[i]=C,x[o]=A,S=e.dataToPoint(x,null,_),y[g++]=S?S[0]:NaN,y[g++]=S?S[1]:NaN,x[o]=E,S=e.dataToPoint(x,null,_),y[g++]=S?S[1]:NaN}d.setLayout("largePoints",y)}}};function Mp(a,e,t,r,i,o){var n;return t>r?n=-1:t<r?n=1:n=o?0:e>0?a.get(i,e-1)<=r?1:-1:1,n}function Pm(a,e){var t=a.getBaseAxis(),r=Ut(t,{fromStat:{key:Ce(se)},min:1}).w,i=H(ke(a.get("barMaxWidth"),r),r),o=H(ke(a.get("barMinWidth"),1),r),n=a.get("barWidth");return n!=null?H(n,r):de(Ae(r/2,i),o)}function zp(a){Am(a,function(){var e=Ce(se);Xa(a,{key:e,seriesType:se,getMetrics:Ka}),Hr(e,Fr(e))})}function Cm(a){a.registerChartView(Np),a.registerSeriesModel(Cp),a.registerPreprocessor(sn),a.registerVisual(Ep),a.registerLayout(Vp),zp(a)}function Op(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 Em=(function(a){V(e,a);function e(t,r){var i=a.call(this)||this,o=new yr(t,r),n=new K;return i.add(o),i.add(n),i.updateData(t,r),i}return e.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},e.prototype.startEffectAnimation=function(t){for(var r=t.symbolType,i=t.color,o=t.rippleNumber,n=this.childAt(1),l=0;l<o;l++){var s=kt(r,-1,-1,2,2,i);s.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scaleX:.5,scaleY:.5});var u=-l/o*t.period+t.effectOffset;s.animate("",!0).when(t.period,{scaleX:t.rippleScale/2,scaleY:t.rippleScale/2}).delay(u).start(),s.animateStyle(!0).when(t.period,{opacity:0}).delay(u).start(),n.add(s)}Op(n,t)},e.prototype.updateEffectAnimation=function(t){for(var r=this._effectCfg,i=this.childAt(1),o=["symbolType","period","rippleScale","rippleNumber"],n=0;n<o.length;n++){var l=o[n];if(r[l]!==t[l]){this.stopEffectAnimation(),this.startEffectAnimation(t);return}}Op(i,t)},e.prototype.highlight=function(){Ea(this)},e.prototype.downplay=function(){Ta(this)},e.prototype.getSymbolType=function(){var t=this.childAt(0);return t&&t.getSymbolType()},e.prototype.updateData=function(t,r){var i=this,o=t.hostModel;this.childAt(0).updateData(t,r);var n=this.childAt(1),l=t.getItemModel(r),s=t.getItemVisual(r,"symbol"),u=Fa(t.getItemVisual(r,"symbolSize")),p=t.getItemVisual(r,"style"),f=p&&p.fill,c=l.getModel("emphasis");n.setScale(u),n.traverse(function(d){d.setStyle("fill",f)});var v=Wa(t.getItemVisual(r,"symbolOffset"),u);v&&(n.x=v[0],n.y=v[1]);var h=t.getItemVisual(r,"symbolRotate");n.rotation=(h||0)*Math.PI/180||0;var m={};m.showEffectOn=o.get("showEffectOn"),m.rippleScale=l.get(["rippleEffect","scale"]),m.brushType=l.get(["rippleEffect","brushType"]),m.period=l.get(["rippleEffect","period"])*1e3,m.effectOffset=r/t.count(),m.z=o.getShallow("z")||0,m.zlevel=o.getShallow("zlevel")||0,m.symbolType=s,m.color=f,m.rippleEffectColor=l.get(["rippleEffect","color"]),m.rippleNumber=l.get(["rippleEffect","number"]),m.showEffectOn==="render"?(this._effectCfg?this.updateEffectAnimation(m):this.startEffectAnimation(m),this._effectCfg=m):(this._effectCfg=null,this.stopEffectAnimation(),this.onHoverStateChange=function(d){d==="emphasis"?m.showEffectOn!=="render"&&i.startEffectAnimation(m):d==="normal"&&m.showEffectOn!=="render"&&i.stopEffectAnimation()}),this._effectCfg=m,J(this,c.get("focus"),c.get("blurScope"),c.get("disabled"))},e.prototype.fadeOut=function(t){t&&t()},e})(K),kp=Em;var Tm=(function(a){V(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 Xe(kp)},e.prototype.render=function(t,r,i){var o=t.getData(),n=this._symbolDraw;n.updateData(o,Up(t)),this.group.add(n.group)},e.prototype.updateTransform=function(t,r,i){var o=t.getData();this.group.dirty();var n=ce("").reset(t,r,i);n.progress&&n.progress({start:0,end:o.count(),count:o.count()},o),this._symbolDraw.updateLayout(Up(t))},e.prototype._updateGroupTransform=function(t){var r=t.coordinateSystem;r&&r.getRoamTransform&&(this.group.transform=Wn(r.getRoamTransform()),this.group.decomposeTransform())},e.prototype.remove=function(t,r){this._symbolDraw&&this._symbolDraw.remove(!0)},e.type="effectScatter",e})(q);function Up(a){return{clipShape:si(a)}}var Gp=Tm;var Rm=(function(a){V(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 Et(null,this,{useEncodeDefaulter:!0})},e.prototype.brushSelector=function(t,r,i){return i.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})(Q),Bp=Rm;function Nm(a){a.registerChartView(Gp),a.registerSeriesModel(Bp),a.registerLayout(ce("effectScatter"))}var Mm=(function(a){V(e,a);function e(t,r,i){var o=a.call(this)||this;return o.add(o.createLine(t,r,i)),o._updateEffectSymbol(t,r),o}return e.prototype.createLine=function(t,r,i){return new ri(t,r,i)},e.prototype._updateEffectSymbol=function(t,r){var i=t.getItemModel(r),o=i.getModel("effect"),n=o.get("symbolSize"),l=o.get("symbol");$(n)||(n=[n,n]);var s=t.getItemVisual(r,"style"),u=o.get("color")||s&&s.stroke,p=this.childAt(1);this._symbolType!==l&&(this.remove(p),p=kt(l,-.5,-.5,1,1,u),p.z2=100,p.culling=!0,this.add(p)),p&&(p.setStyle("shadowColor",u),p.setStyle(o.getItemStyle(["color"])),p.scaleX=n[0],p.scaleY=n[1],p.setColor(u),this._symbolType=l,this._symbolScale=n,this._updateEffectAnimation(t,o,r))},e.prototype._updateEffectAnimation=function(t,r,i){var o=this.childAt(1);if(o){var n=t.getItemLayout(i),l=r.get("period")*1e3,s=r.get("loop"),u=r.get("roundTrip"),p=r.get("constantSpeed"),f=fr(r.get("delay"),function(v){return v/t.count()*l/3});if(o.ignore=!0,this._updateAnimationPoints(o,n),p>0&&(l=this._getLineLength(o)/p*1e3),l!==this._period||s!==this._loop||u!==this._roundTrip){o.stopAnimation();var c=void 0;gt(f)?c=f(i):c=f,o.__t>0&&(c=-l*o.__t),this._animateSymbol(o,l,c,s,u)}this._period=l,this._loop=s,this._roundTrip=u}},e.prototype._animateSymbol=function(t,r,i,o,n){if(r>0){t.__t=0;var l=this,s=t.animate("",o).when(n?r*2:r,{__t:n?2:1}).delay(i).during(function(){l._updateSymbolPosition(t)});o||s.done(function(){l.remove(t)}),s.start()}},e.prototype._getLineLength=function(t){return me(t.__p1,t.__cp1)+me(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,i){this.childAt(0).updateData(t,r,i),this._updateEffectSymbol(t,r)},e.prototype._updateSymbolPosition=function(t){var r=t.__p1,i=t.__p2,o=t.__cp1,n=t.__t<=1?t.__t:2-t.__t,l=[t.x,t.y],s=l.slice(),u=Da,p=Yn;l[0]=u(r[0],o[0],i[0],n),l[1]=u(r[1],o[1],i[1],n);var f=t.__t<=1?p(r[0],o[0],i[0],n):p(i[0],o[0],r[0],1-n),c=t.__t<=1?p(r[1],o[1],i[1],n):p(i[1],o[1],r[1],1-n);t.rotation=-Math.atan2(c,f)-Math.PI/2,(this._symbolType==="line"||this._symbolType==="rect"||this._symbolType==="roundRect")&&(t.__lastT!==void 0&&t.__lastT<t.__t?(t.scaleY=me(s,l)*1.05,n===1&&(l[0]=s[0]+(l[0]-s[0])/2,l[1]=s[1]+(l[1]-s[1])/2)):t.__lastT===1?t.scaleY=2*me(r,l):t.scaleY=this._symbolScale[1]),t.__lastT=t.__t,t.ignore=!1,t.x=l[0],t.y=l[1]},e.prototype.updateLayout=function(t,r){this.childAt(0).updateLayout(t,r);var i=t.getItemModel(r).getModel("effect");this._updateEffectAnimation(t,i,r)},e})(K),Ei=Mm;var Vm=(function(a){V(e,a);function e(t,r,i){var o=a.call(this)||this;return o._createPolyline(t,r,i),o}return e.prototype._createPolyline=function(t,r,i){var o=t.getItemLayout(r),n=new ee({shape:{points:o}});this.add(n),this._updateCommonStl(t,r,i)},e.prototype.updateData=function(t,r,i){var o=t.hostModel,n=this.childAt(0),l={shape:{points:t.getItemLayout(r)}};tt(n,l,o,r),this._updateCommonStl(t,r,i)},e.prototype._updateCommonStl=function(t,r,i){var o=this.childAt(0),n=t.getItemModel(r),l=i&&i.emphasisLineStyle,s=i&&i.focus,u=i&&i.blurScope,p=i&&i.emphasisDisabled;if(!i||t.hasItemOption){var f=n.getModel("emphasis");l=f.getModel("lineStyle").getLineStyle(),p=f.get("disabled"),s=f.get("focus"),u=f.get("blurScope")}o.useStyle(t.getItemVisual(r,"style")),o.style.fill=null,o.style.strokeNoScale=!0;var c=o.ensureState("emphasis");c.style=l,J(this,s,u,p)},e.prototype.updateLayout=function(t,r){var i=this.childAt(0);i.stopAnimation(),i.setShape("points",t.getItemLayout(r))},e})(K),Ti=Vm;var zm=(function(a){V(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,i){return new Ti(t,r,i)},e.prototype._updateAnimationPoints=function(t,r){this._points=r;for(var i=[0],o=0,n=1;n<r.length;n++){var l=r[n-1],s=r[n];o+=me(l,s),i.push(o)}if(o===0){this._length=0;return}for(var n=0;n<i.length;n++)i[n]/=o;this._offsets=i,this._length=o},e.prototype._getLineLength=function(){return this._length},e.prototype._updateSymbolPosition=function(t){var r=t.__t<=1?t.__t:2-t.__t,i=this._points,o=this._offsets,n=i.length;if(o){var l=this._lastFrame,s;if(r<this._lastFramePercent){var u=Math.min(l+1,n-1);for(s=u;s>=0&&!(o[s]<=r);s--);s=Math.min(s,n-2)}else{for(s=l;s<n&&!(o[s]>r);s++);s=Math.min(s-1,n-2)}var p=(r-o[s])/(o[s+1]-o[s]),f=i[s],c=i[s+1];t.x=f[0]*(1-p)+p*c[0],t.y=f[1]*(1-p)+p*c[1];var v=t.__t<=1?c[0]-f[0]:f[0]-c[0],h=t.__t<=1?c[1]-f[1]:f[1]-c[1];t.rotation=-Math.atan2(h,v)-Math.PI/2,this._lastFrame=s,this._lastFramePercent=r,t.ignore=!1}},e})(Ei),Hp=zm;var Om=(function(){function a(){this.polyline=!1,this.curveness=0,this.segs=[]}return a})(),km=(function(a){V(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.beforeBrush=function(t){t&&!t.contentRetained&&this.reset()},e.prototype.getDefaultStyle=function(){return{stroke:Y.color.neutral99,fill:null}},e.prototype.getDefaultShape=function(){return new Om},e.prototype.buildPath=function(t,r){var i=r.segs,o=r.curveness,n;if(r.polyline)for(n=this._off;n<i.length;){var l=i[n++];if(l>0){t.moveTo(i[n++],i[n++]);for(var s=1;s<l;s++)t.lineTo(i[n++],i[n++])}}else for(n=this._off;n<i.length;){var u=i[n++],p=i[n++],f=i[n++],c=i[n++];if(t.moveTo(u,p),o>0){var v=(u+f)/2-(p-c)*o,h=(p+c)/2-(f-u)*o;t.quadraticCurveTo(v,h,f,c)}else t.lineTo(f,c)}this.incremental&&(this._off=n,this.notClear=!0)},e.prototype.findDataIndex=function(t,r){var i=this.shape,o=i.segs,n=i.curveness,l=this.style.lineWidth;if(i.polyline)for(var s=0,u=0;u<o.length;){var p=o[u++];if(p>0)for(var f=o[u++],c=o[u++],v=1;v<p;v++){var h=o[u++],m=o[u++];if(Ji(f,c,h,m,l,t,r))return s}s++}else for(var s=0,u=0;u<o.length;){var f=o[u++],c=o[u++],h=o[u++],m=o[u++];if(n>0){var d=(f+h)/2-(c-m)*n,y=(c+m)/2-(h-f)*n;if(ol(f,c,d,y,h,m,l,t,r))return s}else if(Ji(f,c,h,m,l,t,r))return s;s++}return-1},e.prototype.contain=function(t,r){var i=this.transformCoordToLocal(t,r),o=this.getBoundingRect();if(t=i[0],r=i[1],o.contain(t,r)){var n=this.hoverDataIdx=this.findDataIndex(t,r);return n>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var r=this.shape,i=r.segs,o=1/0,n=1/0,l=-1/0,s=-1/0,u=0;u<i.length;){var p=i[u++],f=i[u++];o=Math.min(p,o),l=Math.max(p,l),n=Math.min(f,n),s=Math.max(f,s)}t=this._rect=new pe(o,n,l,s)}return t},e})(ft),Um=(function(){function a(){this.group=new K}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,r){var i=this._newAdded[0],o=t.getLayout("linesPoints"),n=i&&i.shape.segs;if(n&&n.length<2e4){var l=n.length,s=new Float32Array(l+o.length);s.set(n),s.set(o,l),i.setShape({segs:s})}else{this._newAdded=[];var u=this._create();u.incremental=r,u.setShape({segs:o}),this._setCommon(u,t),u.__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 km({cursor:"default",ignoreCoarsePointer:!0});return this._newAdded.push(e),this.group.add(e),e},a.prototype._setCommon=function(e,t,r){var i=t.hostModel;e.setShape({polyline:i.get("polyline"),curveness:i.get(["lineStyle","curveness"])}),e.useStyle(i.getModel("lineStyle").getLineStyle()),e.style.strokeNoScale=!0;var o=t.getVisual("style");o&&o.stroke&&e.setStyle("stroke",o.stroke),e.setStyle("fill",null);var n=at(e);n.seriesIndex=i.seriesIndex,e.on("mousemove",function(l){n.dataIndex=null;var s=e.hoverDataIdx;s>0&&(n.dataIndex=s+e.__startIndex)})},a.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},a})(),Fp=Um;var Gm={seriesType:"lines",plan:ye(),reset:function(a){var e=a.coordinateSystem;if(e){var t=a.get("polyline"),r=a.pipelineContext.large;return{progress:function(i,o){var n=[];if(r){var l=void 0,s=i.end-i.start;if(t){for(var u=0,p=i.start;p<i.end;p++)u+=a.getLineCoordsCount(p);l=new Float32Array(s+u*2)}else l=new Float32Array(s*4);for(var f=0,c=[],p=i.start;p<i.end;p++){var v=a.getLineCoords(p,n);t&&(l[f++]=v);for(var h=0;h<v;h++)c=e.dataToPoint(n[h],!1,c),l[f++]=c[0],l[f++]=c[1]}o.setLayout("linesPoints",l)}else for(var p=i.start;p<i.end;p++){var m=o.getItemModel(p),v=a.getLineCoords(p,n),d=[];if(t)for(var y=0;y<v;y++)d.push(e.dataToPoint(n[y]));else{d[0]=e.dataToPoint(n[0]),d[1]=e.dataToPoint(n[1]);var g=m.get(["lineStyle","curveness"]);+g&&(d[2]=[(d[0][0]+d[1][0])/2-(d[0][1]-d[1][1])*g,(d[0][1]+d[1][1])/2-(d[1][0]-d[0][0])*g])}o.setItemLayout(p,d)}}}}}},Ri=Gm;var Bm=(function(a){V(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,i){var o=t.getData(),n=this._updateLineDraw(o,t),l=t.get("zlevel"),s=t.get(["effect","trailLength"]),u=i.getZr(),p=!!io(i);p&&u.painter.getLayer(l).clear(!0),this._lastZlevel!=null&&p&&u.configLayer(this._lastZlevel,{motionBlur:!1}),this._showEffect(t)&&s>0&&p&&u.configLayer(l,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(s/10+.9,1),0)}),n.updateData(o);var f=t.get("clip",!0)&&jt(t.coordinateSystem,!1,t);f?this.group.setClipPath(f):this.group.removeClipPath(),this._lastZlevel=l,this._finished=!0},e.prototype.incrementalPrepareRender=function(t,r,i){var o=t.getData(),n=this._updateLineDraw(o,t);n.incrementalPrepareUpdate(o),this._clearLayer(i),this._finished=!1},e.prototype.incrementalRender=function(t,r,i){this._lineDraw.incrementalUpdate(t,r.getData(),Mt(r)),this._finished=t.end===r.getData().count()},e.prototype.eachRendered=function(t){this._lineDraw&&this._lineDraw.eachRendered(t)},e.prototype.updateTransform=function(t,r,i){var o=t.getData(),n=this._lineDraw;if(!this._finished||!n||!n.updateLayout)return{update:!0};var l=Ri.reset(t,r,i);l.progress&&l.progress({start:0,end:o.count(),count:o.count()},o),n.updateLayout(),this._clearLayer(i)},e.prototype._updateLineDraw=function(t,r){var i=this._lineDraw,o=this._showEffect(r),n=!!r.get("polyline"),l=r.pipelineContext,s=l.large;return(!i||o!==this._hasEffet||n!==this._isPolyline||s!==this._isLargeDraw)&&(i&&i.remove(),i=this._lineDraw=s?new Fp:new ai(n?o?Hp:Ti:o?Ei:ri),this._hasEffet=o,this._isPolyline=n,this._isLargeDraw=s),this.group.add(i.group),i},e.prototype._showEffect=function(t){return!!t.get(["effect","show"])},e.prototype._clearLayer=function(t){var r=io(t);r&&this._lastZlevel!=null&&r.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})(q),Wp=Bm;var Hm=typeof Uint32Array>"u"?Array:Uint32Array,Fm=typeof Float64Array>"u"?Array:Float64Array;function Yp(a){var e=a.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(a.data=X(e,function(t){var r=[t[0].coord,t[1].coord],i={coords:r};return t[0].name&&(i.fromName=t[0].name),t[1].name&&(i.toName=t[1].name),Rn([i,t[0],t[1]])}))}var Wm=(function(a){V(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||[],Yp(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(Yp(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=cr(this._flatCoords,r.flatCoords),this._flatCoordsOffset=cr(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),i=r.option instanceof Array?r.option:r.getShallow("coords");return i},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 i=this._flatCoordsOffset[t*2],o=this._flatCoordsOffset[t*2+1],n=0;n<o;n++)r[n]=r[n]||[],r[n][0]=this._flatCoords[i+n*2],r[n][1]=this._flatCoords[i+n*2+1];return o}else{for(var l=this._getCoordsFromItemModel(t),n=0;n<l.length;n++)r[n]=r[n]||[],r[n][0]=l[n][0],r[n][1]=l[n][1];return l.length}},e.prototype._processFlatCoordsArray=function(t){var r=0;if(this._flatCoords&&(r=this._flatCoords.length),yt(t[0])){for(var i=t.length,o=new Hm(i),n=new Fm(i),l=0,s=0,u=0,p=0;p<i;){u++;var f=t[p++];o[s++]=l+r,o[s++]=f;for(var c=0;c<f;c++){var v=t[p++],h=t[p++];n[l++]=v,n[l++]=h,p>i}}return{flatCoordsOffset:new Uint32Array(o.buffer,0,s),flatCoords:n,count:u}}return{flatCoordsOffset:null,flatCoords:null,count:t.length}},e.prototype.getInitialData=function(t,r){if(0)var i;var o=new fe(["value"],this);return o.hasItemOption=!1,o.initData(t.data,[],function(n,l,s,u){if(n instanceof Array)return NaN;o.hasItemOption=!0;var p=n.value;if(p!=null)return p instanceof Array?p[u]:p}),o},e.prototype.formatTooltip=function(t,r,i){var o=this.getData(),n=this.getRawValue(t),l=o.getItemModel(t),s=l.get("name");if(!s){var u=l.get("fromName"),p=l.get("toName"),f=[];u!=null&&f.push(u),p!=null&&f.push(p),s=f.join(" > ")}return At("nameValue",{name:s,value:n,noValue:n==null||isNaN(n)})},e.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},e.prototype.getProgressive=function(){var t=this.option.progressive;return t??(this.option.large?1e4:this.get("progressive"))},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return t??(this.option.large?2e4:this.get("progressiveThreshold"))},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})(Q),Zp=Wm;function Ni(a){return a instanceof Array||(a=[a,a]),a}var Ym={seriesType:"lines",reset:function(a){var e=Ni(a.get("symbol")),t=Ni(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 i(o,n){var l=o.getItemModel(n),s=Ni(l.getShallow("symbol",!0)),u=Ni(l.getShallow("symbolSize",!0));s[0]&&o.setItemVisual(n,"fromSymbol",s[0]),s[1]&&o.setItemVisual(n,"toSymbol",s[1]),u[0]&&o.setItemVisual(n,"fromSymbolSize",u[0]),u[1]&&o.setItemVisual(n,"toSymbolSize",u[1])}return{dataEach:r.hasItemOption?i:null}}},Xp=Ym;function Zm(a){a.registerChartView(Wp),a.registerSeriesModel(Zp),a.registerLayout(Ri),a.registerVisual(Xp)}var Xm=256,qm=(function(){function a(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var e=ki.createCanvas();this.canvas=e}return a.prototype.update=function(e,t,r,i,o,n){var l=this._getBrush(),s=this._getGradient(o,"inRange"),u=this._getGradient(o,"outOfRange"),p=this.pointSize+this.blurSize,f=this.canvas,c=f.getContext("2d"),v=e.length;f.width=t,f.height=r;for(var h=0;h<v;++h){var m=e[h],d=m[0],y=m[1],g=m[2],S=i(g);c.globalAlpha=S,c.drawImage(l,d-p,y-p)}if(!f.width||!f.height)return f;for(var x=c.getImageData(0,0,f.width,f.height),_=x.data,b=0,w=_.length,I=this.minOpacity,C=this.maxOpacity,L=C-I;b<w;){var S=_[b+3]/256,D=Math.floor(S*(Xm-1))*4;if(S>0){var A=n(S)?s:u;S>0&&(S=S*L+I),_[b++]=A[D],_[b++]=A[D+1],_[b++]=A[D+2],_[b++]=A[D+3]*S*256}else b+=4}return c.putImageData(x,0,0),f},a.prototype._getBrush=function(){var e=this._brushCanvas||(this._brushCanvas=ki.createCanvas()),t=this.pointSize+this.blurSize,r=t*2;e.width=r,e.height=r;var i=e.getContext("2d");return i.clearRect(0,0,r,r),i.shadowOffsetX=r,i.shadowBlur=this.blurSize,i.shadowColor=Y.color.neutral99,i.beginPath(),i.arc(-t,t,this.pointSize,0,Math.PI*2,!0),i.closePath(),i.fill(),e},a.prototype._getGradient=function(e,t){for(var r=this._gradientPixels,i=r[t]||(r[t]=new Uint8ClampedArray(256*4)),o=[0,0,0,0],n=0,l=0;l<256;l++)e[t](l/255,!0,o),i[n++]=o[0],i[n++]=o[1],i[n++]=o[2],i[n++]=o[3];return i},a})(),qp=qm;function Km(a,e,t){var r=a[1]-a[0];e=X(e,function(n){return{interval:[(n.interval[0]-a[0])/r,(n.interval[1]-a[0])/r]}});var i=e.length,o=0;return function(n){var l;for(l=o;l<i;l++){var s=e[l].interval;if(s[0]<=n&&n<=s[1]){o=l;break}}if(l===i)for(l=o-1;l>=0;l--){var s=e[l].interval;if(s[0]<=n&&n<=s[1]){o=l;break}}return l>=0&&l<i&&t[l]}}function jm(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]}}var Jm=(function(a){V(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,i){var o;r.eachComponent("visualMap",function(l){l.eachTargetSeries(function(s){s===t&&(o=l)})}),this._progressiveEls=null,this.group.removeAll();var n=t.coordinateSystem;n.type==="cartesian2d"||n.type==="calendar"||n.type==="matrix"?this._renderOnGridLike(t,i,0,t.getData().count()):lo(n)&&this._renderOnGeo(n,t,o,i)},e.prototype.incrementalPrepareRender=function(t,r,i){this.group.removeAll()},e.prototype.incrementalRender=function(t,r,i,o){var n=r.coordinateSystem;n&&(lo(n)?this.render(r,i,o):(this._progressiveEls=[],this._renderOnGridLike(r,o,t.start,t.end,!0)))},e.prototype.eachRendered=function(t){Fe(this._progressiveEls||this.group,t)},e.prototype._renderOnGridLike=function(t,r,i,o,n){var l=t.coordinateSystem,s=Sr(l,"cartesian2d"),u=Sr(l,"matrix"),p,f,c,v;if(s){var h=l.getAxis("x"),m=l.getAxis("y");p=Ut(h).w+.5,f=Ut(m).w+.5,c=h.scale.getExtent(),v=m.scale.getExtent()}for(var d=this.group,y=t.getData(),g=t.getModel(["emphasis","itemStyle"]).getItemStyle(),S=t.getModel(["blur","itemStyle"]).getItemStyle(),x=t.getModel(["select","itemStyle"]).getItemStyle(),_=t.get(["itemStyle","borderRadius"]),b=ct(t),w=t.getModel("emphasis"),I=w.get("focus"),C=w.get("blurScope"),L=w.get("disabled"),D=s||u?[y.mapDimension("x"),y.mapDimension("y"),y.mapDimension("value")]:[y.mapDimension("time"),y.mapDimension("value")],A=i;A<o;A++){var E=void 0,z=y.getItemVisual(A,"style");if(s){var P=y.get(D[0],A),T=y.get(D[1],A);if(isNaN(y.get(D[2],A))||isNaN(P)||isNaN(T)||P<c[0]||P>c[1]||T<v[0]||T>v[1])continue;var N=l.dataToPoint([P,T]);E=new bt({shape:{x:N[0]-p/2,y:N[1]-f/2,width:p,height:f},style:z})}else if(u){var R=l.dataToLayout([y.get(D[0],A),y.get(D[1],A)]).rect;if(Rr(R.x))continue;E=new bt({z2:1,shape:R,style:z})}else{if(isNaN(y.get(D[1],A)))continue;var M=l.dataToLayout([y.get(D[0],A)]),R=M.contentRect||M.rect;if(Rr(R.x)||Rr(R.y))continue;E=new bt({z2:1,shape:R,style:z})}if(y.hasItemOption){var O=y.getItemModel(A),U=O.getModel("emphasis");g=U.getModel("itemStyle").getItemStyle(),S=O.getModel(["blur","itemStyle"]).getItemStyle(),x=O.getModel(["select","itemStyle"]).getItemStyle(),_=O.get(["itemStyle","borderRadius"]),I=U.get("focus"),C=U.get("blurScope"),L=U.get("disabled"),b=ct(O)}E.shape.r=_;var G=t.getRawValue(A),F="-";G&&G[2]!=null&&(F=G[2]+""),ht(E,b,{labelFetcher:t,labelDataIndex:A,defaultOpacity:z.opacity,defaultText:F}),E.ensureState("emphasis").style=g,E.ensureState("blur").style=S,E.ensureState("select").style=x,J(E,I,C,L),E.incremental=Mt(t,n),n&&(E.states.emphasis.hoverLayer=Na),d.add(E),y.setItemGraphicEl(A,E),this._progressiveEls&&this._progressiveEls.push(E)}},e.prototype._renderOnGeo=function(t,r,i,o){var n=i.targetVisuals.inRange,l=i.targetVisuals.outOfRange,s=r.getData(),u=this._hmLayer||this._hmLayer||new qp;u.blurSize=r.get("blurSize"),u.pointSize=r.get("pointSize"),u.minOpacity=r.get("minOpacity"),u.maxOpacity=r.get("maxOpacity");var p=t.getViewRect().clone(),f=t.getRoamTransform();p.applyTransform(f);var c=Math.max(p.x,0),v=Math.max(p.y,0),h=Math.min(p.width+p.x,o.getWidth()),m=Math.min(p.height+p.y,o.getHeight()),d=h-c,y=m-v,g=[s.mapDimension("lng"),s.mapDimension("lat"),s.mapDimension("value")],S=s.mapArray(g,function(w,I,C){var L=t.dataToPoint([w,I]);return L[0]-=c,L[1]-=v,L.push(C),L}),x=i.getExtent(),_=i.type==="visualMap.continuous"?jm(x,i.option.range):Km(x,i.getPieceList(),i.option.selected);u.update(S,d,y,n.color.getNormalizer(),{inRange:n.color.getColorMapper(),outOfRange:l.color.getColorMapper()},_);var b=new ge({style:{width:d,height:y,x:c,y:v,image:u.canvas},silent:!0});this.group.add(b)},e.type="heatmap",e})(q),Kp=Jm;var Qm=(function(a){V(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 Et(null,this,{generateCoord:"value"})},e.prototype.preventIncremental=function(){var t=Ua.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","matrix"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:Y.color.primary}}},e})(Q),jp=Qm;function $m(a){a.registerChartView(Kp),a.registerSeriesModel(jp)}var td=["itemStyle","borderWidth"],Jp=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],un=new Ra,ed=(function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=qe,t}return e.prototype.render=function(t,r,i){var o=this.group,n=t.getData(),l=this._data,s=t.coordinateSystem,u=s.getBaseAxis(),p=u.isHorizontal(),f=s.master.getRect(),c={ecSize:{width:i.getWidth(),height:i.getHeight()},seriesModel:t,coordSys:s,coordSysExtent:[[f.x,f.x+f.width],[f.y,f.y+f.height]],isHorizontal:p,valueDim:Jp[+p],categoryDim:Jp[1-+p]};n.diff(l).add(function(h){if(n.hasValue(h)){var m=$p(n,h),d=Qp(n,h,m,c),y=tf(n,c,d);n.setItemGraphicEl(h,y),o.add(y),rf(y,c,d)}}).update(function(h,m){var d=l.getItemGraphicEl(m);if(!n.hasValue(h)){o.remove(d);return}var y=$p(n,h),g=Qp(n,h,y,c),S=pf(n,g);d&&S!==d.__pictorialShapeStr&&(o.remove(d),n.setItemGraphicEl(h,null),d=null),d?sd(d,c,g):d=tf(n,c,g,!0),n.setItemGraphicEl(h,d),d.__pictorialSymbolMeta=g,o.add(d),rf(d,c,g)}).remove(function(h){var m=l.getItemGraphicEl(h);m&&ef(l,h,m.__pictorialSymbolMeta.animationModel,m)}).execute();var v=t.get("clip",!0)?jt(t.coordinateSystem,!1,t):null;return v?o.setClipPath(v):o.removeClipPath(),this._data=n,this.group},e.prototype.remove=function(t,r){var i=this.group,o=this._data;t.get("animation")?o&&o.eachItemGraphicEl(function(n){ef(o,at(n).dataIndex,t,n)}):i.removeAll()},e.type=qe,e})(q);function Qp(a,e,t,r){var i=a.getItemLayout(e),o=t.get("symbolRepeat"),n=t.get("symbolClip"),l=t.get("symbolPosition")||"start",s=t.get("symbolRotate"),u=(s||0)*Math.PI/180||0,p=t.get("symbolPatternSize")||2,f=t.isAnimationEnabled(),c={dataIndex:e,layout:i,itemModel:t,symbolType:a.getItemVisual(e,"symbol")||"circle",style:a.getItemVisual(e,"style"),symbolClip:n,symbolRepeat:o,symbolRepeatDirection:t.get("symbolRepeatDirection"),symbolPatternSize:p,rotation:u,animationModel:f?t:null,hoverScale:f&&t.get(["emphasis","scale"]),z2:t.getShallow("z",!0)||0};rd(t,o,i,r,c),ad(a,e,i,o,n,c.boundingLength,c.pxSign,p,r,c),id(t,c.symbolScale,u,r,c);var v=c.symbolSize,h=Wa(t.get("symbolOffset"),v);return od(t,v,i,o,n,h,l,c.valueLineWidth,c.boundingLength,c.repeatCutLength,r,c),c}function rd(a,e,t,r,i){var o=r.valueDim,n=a.get("symbolBoundingData"),l=r.coordSys.getOtherAxis(r.coordSys.getBaseAxis()),s=l.toGlobalCoord(l.dataToCoord(0)),u=1-+(t[o.wh]<=0),p;if($(n)){var f=[pn(l,n[0])-s,pn(l,n[1])-s];f[1]<f[0]&&f.reverse(),p=f[u]}else n!=null?p=pn(l,n)-s:e?p=r.coordSysExtent[o.index][u]-s:p=t[o.wh];i.boundingLength=p,e&&(i.repeatCutLength=t[o.wh]);var c=o.xy==="x",v=l.inverse;i.pxSign=c&&!v||!c&&v?p>=0?1:-1:p>0?1:-1}function pn(a,e){return a.toGlobalCoord(a.dataToCoord(a.scale.parse(e)))}function ad(a,e,t,r,i,o,n,l,s,u){var p=s.valueDim,f=s.categoryDim,c=Math.abs(t[f.wh]),v=a.getItemVisual(e,"symbolSize"),h;$(v)?h=v.slice():v==null?h=["100%","100%"]:h=[v,v],h[f.index]=H(h[f.index],c),h[p.index]=H(h[p.index],r?c:Math.abs(o)),u.symbolSize=h;var m=u.symbolScale=[h[0]/l,h[1]/l];m[p.index]*=(s.isHorizontal?-1:1)*n}function id(a,e,t,r,i){var o=a.get(td)||0;o&&(un.attr({scaleX:e[0],scaleY:e[1],rotation:t}),un.updateTransform(),o/=un.getLineScale(),o*=e[r.valueDim.index]),i.valueLineWidth=o||0}function od(a,e,t,r,i,o,n,l,s,u,p,f){var c=p.categoryDim,v=p.valueDim,h=f.pxSign,m=Math.max(e[v.index]+l,0),d=m;if(r){var y=Math.abs(s),g=fr(a.get("symbolMargin"),"15%")+"",S=!1;g.lastIndexOf("!")===g.length-1&&(S=!0,g=g.slice(0,g.length-1));var x=H(g,e[v.index]),_=Math.max(m+x*2,0),b=S?0:x*2,w=tl(r),I=w?r:af((y+b)/_),C=y-I*m;x=C/2/(S?I:Math.max(I-1,1)),_=m+x*2,b=S?0:x*2,!w&&r!=="fixed"&&(I=u?af((Math.abs(u)+b)/_):0),d=I*_-b,f.repeatTimes=I,f.symbolMargin=x}var L=h*(d/2),D=f.pathPosition=[];D[c.index]=t[c.wh]/2,D[v.index]=n==="start"?L:n==="end"?s-L:s/2,o&&(D[0]+=o[0],D[1]+=o[1]);var A=f.bundlePosition=[];A[c.index]=t[c.xy],A[v.index]=t[v.xy];var E=f.barRectShape=B({},t);E[v.wh]=h*Math.max(Math.abs(t[v.wh]),Math.abs(D[v.index]+L)),E[c.wh]=t[c.wh];var z=f.clipShape={};z[c.xy]=-t[c.xy],z[c.wh]=p.ecSize[c.wh],z[v.xy]=0,z[v.wh]=t[v.wh]}function of(a){var e=a.symbolPatternSize,t=kt(a.symbolType,-e/2,-e/2,e,e);return t.attr({culling:!0}),t.type!=="image"&&t.setStyle({strokeNoScale:!0}),t}function nf(a,e,t,r){var i=a.__pictorialBundle,o=t.symbolSize,n=t.valueLineWidth,l=t.pathPosition,s=e.valueDim,u=t.repeatTimes||0,p=0,f=o[e.valueDim.index]+n+t.symbolMargin*2;for(fn(a,function(m){m.__pictorialAnimationIndex=p,m.__pictorialRepeatTimes=u,p<u?oa(m,null,h(p),t,r):oa(m,null,{scaleX:0,scaleY:0},t,r,function(){i.remove(m)}),p++});p<u;p++){var c=of(t);c.__pictorialAnimationIndex=p,c.__pictorialRepeatTimes=u,i.add(c);var v=h(p);oa(c,{x:v.x,y:v.y,scaleX:0,scaleY:0},{scaleX:v.scaleX,scaleY:v.scaleY,rotation:v.rotation},t,r)}function h(m){var d=l.slice(),y=t.pxSign,g=m;return(t.symbolRepeatDirection==="start"?y>0:y<0)&&(g=u-1-m),d[s.index]=f*(g-u/2+.5)+l[s.index],{x:d[0],y:d[1],scaleX:t.symbolScale[0],scaleY:t.symbolScale[1],rotation:t.rotation}}}function lf(a,e,t,r){var i=a.__pictorialBundle,o=a.__pictorialMainPath;o?oa(o,null,{x:t.pathPosition[0],y:t.pathPosition[1],scaleX:t.symbolScale[0],scaleY:t.symbolScale[1],rotation:t.rotation},t,r):(o=a.__pictorialMainPath=of(t),i.add(o),oa(o,{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 sf(a,e,t){var r=B({},e.barRectShape),i=a.__pictorialBarRect;i?oa(i,null,{shape:r},e,t):(i=a.__pictorialBarRect=new bt({z2:2,shape:r,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),i.disableMorphing=!0,a.add(i))}function uf(a,e,t,r){if(t.symbolClip){var i=a.__pictorialClipPath,o=B({},t.clipShape),n=e.valueDim,l=t.animationModel,s=t.dataIndex;if(i)tt(i,{shape:o},l,s);else{o[n.wh]=0,i=new bt({shape:o}),a.__pictorialBundle.setClipPath(i),a.__pictorialClipPath=i;var u={};u[n.wh]=t.clipShape[n.wh],ut[r?"updateProps":"initProps"](i,{shape:u},l,s)}}}function $p(a,e){var t=a.getItemModel(e);return t.getAnimationDelayParams=nd,t.isAnimationEnabled=ld,t}function nd(a){return{index:a.__pictorialAnimationIndex,count:a.__pictorialRepeatTimes}}function ld(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function tf(a,e,t,r){var i=new K,o=new K;return i.add(o),i.__pictorialBundle=o,o.x=t.bundlePosition[0],o.y=t.bundlePosition[1],t.symbolRepeat?nf(i,e,t):lf(i,e,t),sf(i,t,r),uf(i,e,t,r),i.__pictorialShapeStr=pf(a,t),i.__pictorialSymbolMeta=t,i}function sd(a,e,t){var r=t.animationModel,i=t.dataIndex,o=a.__pictorialBundle;tt(o,{x:t.bundlePosition[0],y:t.bundlePosition[1]},r,i),t.symbolRepeat?nf(a,e,t,!0):lf(a,e,t,!0),sf(a,t,!0),uf(a,e,t,!0)}function ef(a,e,t,r){var i=r.__pictorialBarRect;i&&i.removeTextContent();var o=[];fn(r,function(n){o.push(n)}),r.__pictorialMainPath&&o.push(r.__pictorialMainPath),r.__pictorialClipPath&&(t=null),k(o,function(n){Gr(n,{scaleX:0,scaleY:0},t,e,function(){r.parent&&r.parent.remove(r)})}),a.setItemGraphicEl(e,null)}function pf(a,e){return[a.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function fn(a,e,t){k(a.__pictorialBundle.children(),function(r){r!==a.__pictorialBarRect&&e.call(t,r)})}function oa(a,e,t,r,i,o){e&&a.attr(e),r.symbolClip&&!i?t&&a.attr(t):t&&ut[i?"updateProps":"initProps"](a,t,r.animationModel,r.dataIndex,o)}function rf(a,e,t){var r=t.dataIndex,i=t.itemModel,o=i.getModel("emphasis"),n=o.getModel("itemStyle").getItemStyle(),l=i.getModel(["blur","itemStyle"]).getItemStyle(),s=i.getModel(["select","itemStyle"]).getItemStyle(),u=i.getShallow("cursor"),p=o.get("focus"),f=o.get("blurScope"),c=o.get("scale");fn(a,function(m){if(m instanceof ge){var d=m.style;m.useStyle(B({image:d.image,x:d.x,y:d.y,width:d.width,height:d.height},t.style))}else m.useStyle(t.style);var y=m.ensureState("emphasis");y.style=n,c&&(y.scaleX=m.scaleX*1.1,y.scaleY=m.scaleY*1.1),m.ensureState("blur").style=l,m.ensureState("select").style=s,u&&(m.cursor=u),m.z2=t.z2});var v=e.valueDim.posDesc[+(t.boundingLength>0)],h=a.__pictorialBarRect;h.ignoreClip=!0,ht(h,ct(i),{labelFetcher:e.seriesModel,labelDataIndex:r,defaultText:Pe(e.seriesModel.getData(),r),inheritColor:t.style.fill,defaultOpacity:t.style.opacity,defaultOutsidePosition:v}),J(a,p,f,o.get("disabled"))}function af(a){var e=Math.round(a);return Math.abs(a-e)<1e-4?e:Math.ceil(a)}var ff=ed;var ud=(function(a){V(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."+qe,e.dependencies=["grid"],e.defaultOption=Oa(qr.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%",clip:!1,progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:Y.color.primary}}}),e})(qr),cf=ud;function pd(a){a.registerChartView(ff),a.registerSeriesModel(cf),a.registerLayout(a.PRIORITY.VISUAL.LAYOUT,ui(qe)),a.registerLayout(a.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,pi(qe)),fi(a)}var cn=2,Ve="themeRiver",fd=(function(a){V(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 oe(ot(this.getData,this),ot(this.getRawData,this))},e.prototype.fixData=function(t){var r=t.length,i={},o=sa(t,function(c){return i.hasOwnProperty(c[0]+"")||(i[c[0]+""]=-1),c[2]}),n=[];o.buckets.each(function(c,v){n.push({name:v,dataList:c})});for(var l=n.length,s=0;s<l;++s){for(var u=n[s].name,p=0;p<n[s].dataList.length;++p){var f=n[s].dataList[p][0]+"";i[f]=s}for(var f in i)i.hasOwnProperty(f)&&i[f]!==s&&(i[f]=s,t[r]=[f,0,u],r++)}return t},e.prototype.getInitialData=function(t,r){for(var i=this.getReferringComponents("singleAxis",el).models[0],o=i.get("type"),n=Tr(t.data,function(h){return h[2]!==void 0}),l=this.fixData(n||[]),s=[],u=this.nameMap=Le(),p=0,f=0;f<l.length;++f)s.push(l[f][cn]),u.get(l[f][cn])||(u.set(l[f][cn],p),p++);var c=Br(l,{coordDimensions:["single"],dimensionsDefine:[{name:"time",type:va(o)},{name:"value",type:"float"},{name:"name",type:"ordinal"}],encodeDefine:{single:0,value:1,itemName:2}}).dimensions,v=new fe(c,this);return v.initData(l),v},e.prototype.getLayerSeries=function(){for(var t=this.getData(),r=t.count(),i=[],o=0;o<r;++o)i[o]=o;var n=t.mapDimension("single"),l=sa(i,function(u){return t.get("name",u)}),s=[];return l.buckets.each(function(u,p){u.sort(function(f,c){return t.get(n,f)-t.get(n,c)}),s.push({name:p,indices:u})}),s},e.prototype.getAxisTooltipData=function(t,r,i){$(t)||(t=t?[t]:[]);for(var o=this.getData(),n=this.getLayerSeries(),l=[],s=n.length,u,p=0;p<s;++p){for(var f=Number.MAX_VALUE,c=-1,v=n[p].indices.length,h=0;h<v;++h){var m=o.get(t[0],n[p].indices[h]),d=Math.abs(m-r);d<=f&&(u=m,f=d,c=n[p].indices[h])}l.push(c)}return{dataIndices:l,nestestValue:u}},e.prototype.formatTooltip=function(t,r,i){var o=this.getData(),n=o.getName(t),l=o.get(o.mapDimension("value"),t);return At("nameValue",{name:n,value:l})},e.type="series."+Ve,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})(Q),vf=fd;var cd=(function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=Ve,t._layers=[],t}return e.prototype.render=function(t,r,i){var o=t.getData(),n=this,l=this.group,s=t.getLayerSeries(),u=o.getLayout("layoutInfo"),p=u.rect,f=u.boundaryGap;l.x=0,l.y=p.y+f[0];function c(d){return d.name}var v=new We(this._layersSeries||[],s,c,c),h=[];v.add(ot(m,this,"add")).update(ot(m,this,"update")).remove(ot(m,this,"remove")).execute();function m(d,y,g){var S=n._layers;if(d==="remove"){l.remove(S[y]);return}for(var x=[],_=[],b,w=s[y].indices,I=0;I<w.length;I++){var C=o.getItemLayout(w[I]),L=C.x,D=C.y0,A=C.y;x.push(L,D),_.push(L,D+A),b=o.getItemVisual(w[I],"style")}var E,z=o.getItemLayout(w[0]),P=t.getModel("label"),T=P.get("margin"),N=t.getModel("emphasis");if(d==="add"){var R=h[y]=new K;E=new li({shape:{points:x,stackedOnPoints:_,smooth:.4,stackedOnSmooth:.4,smoothConstraint:!1},z2:0}),R.add(E),l.add(R),t.isAnimationEnabled()&&E.setClipPath(vd(E.getBoundingRect(),t,function(){E.removeClipPath()}))}else{var R=S[g];E=R.childAt(0),l.add(R),h[y]=R,tt(E,{shape:{points:x,stackedOnPoints:_}},t),wt(E)}ht(E,ct(t),{labelDataIndex:w[I-1],defaultText:o.getName(w[I-1]),inheritColor:b.fill},{normal:{verticalAlign:"middle"}}),E.setTextConfig({position:null,local:!0});var M=E.getTextContent();M&&(M.x=z.x-T,M.y=z.y0+z.y/2),E.useStyle(b),o.setItemGraphicEl(y,E),lt(E,t),J(E,N.get("focus"),N.get("blurScope"),N.get("disabled"))}this._layersSeries=s,this._layers=h},e.type=Ve,e})(q);function vd(a,e,t){var r=new bt({shape:{x:a.x-10,y:a.y-10,width:0,height:a.height+20}});return nt(r,{shape:{x:a.x-50,width:a.width+100,height:a.height+20}},e,t),r}var hf=cd;var df=rt(Ve,hd);function hd(a,e){a.eachSeriesByType(Ve,function(t){var r=t.getData(),i=t.coordinateSystem,o={},n=i.getRect();o.rect=n;var l=t.get("boundaryGap"),s=i.getAxis();if(o.boundaryGap=l,s.orient==="horizontal"){l[0]=H(l[0],n.height),l[1]=H(l[1],n.height);var u=n.height-l[0]-l[1];mf(r,t,u)}else{l[0]=H(l[0],n.width),l[1]=H(l[1],n.width);var p=n.width-l[0]-l[1];mf(r,t,p)}r.setLayout("layoutInfo",o)})}function mf(a,e,t){if(a.count())for(var r=e.coordinateSystem,i=e.getLayerSeries(),o=a.mapDimension("single"),n=a.mapDimension("value"),l=X(i,function(d){return X(d.indices,function(y){var g=r.dataToPoint(a.get(o,y));return g[1]=a.get(n,y),g})}),s=md(l),u=s.y0,p=t/s.max,f=i.length,c=i[0].indices.length,v,h=0;h<c;++h){v=u[h]*p,a.setItemLayout(i[0].indices[h],{layerIndex:0,x:l[0][h][0],y0:v,y:l[0][h][1]*p});for(var m=1;m<f;++m)v+=l[m-1][h][1]*p,a.setItemLayout(i[m].indices[h],{layerIndex:m,x:l[m][h][0],y0:v,y:l[m][h][1]*p})}}function md(a){for(var e=a.length,t=a[0].length,r=[],i=[],o=0,n=0;n<t;++n){for(var l=0,s=0;s<e;++s)l+=a[s][n][1];l>o&&(o=l),r.push(l)}for(var u=0;u<t;++u)i[u]=(o-r[u])/2;o=0;for(var p=0;p<t;++p){var f=r[p]+i[p];f>o&&(o=f)}return{y0:i,max:o}}function dd(a){a.registerChartView(hf),a.registerSeriesModel(vf),a.registerLayout(df),a.registerProcessor(ve(Ve))}var gd=2,yd=4,Sd=(function(a){V(e,a);function e(t,r,i,o){var n=a.call(this)||this;n.z2=gd,n.textConfig={inside:!0},at(n).seriesIndex=r.seriesIndex;var l=new Lt({z2:yd,silent:t.getModel().get(["label","silent"])});return n.setTextContent(l),n.updateData(!0,t,r,i,o),n}return e.prototype.updateData=function(t,r,i,o,n){this.node=r,r.piece=this,i=i||this._seriesModel,o=o||this._ecModel;var l=this;at(l).dataIndex=r.dataIndex;var s=r.getModel(),u=s.getModel("emphasis"),p=r.getLayout(),f=B({},p);f.label=null;var c=r.getVisual("style");c.lineJoin="bevel";var v=r.getVisual("decal");v&&(c.decal=Ya(v,n));var h=Ft(s.getModel("itemStyle"),f,!0);B(f,h),k(Be,function(g){var S=l.ensureState(g),x=s.getModel([g,"itemStyle"]);S.style=x.getItemStyle();var _=Ft(x,f);_&&(S.shape=_)}),t?(l.setShape(f),l.shape.r=p.r0,nt(l,{shape:{r:p.r}},i,r.dataIndex)):(tt(l,{shape:f},i),wt(l)),l.useStyle(c),this._updateLabel(i);var m=s.getShallow("cursor");m&&l.attr("cursor",m),this._seriesModel=i||this._seriesModel,this._ecModel=o||this._ecModel;var d=u.get("focus"),y=d==="relative"?cr(r.getAncestorsIndices(),r.getDescendantIndices()):d==="ancestor"?r.getAncestorsIndices():d==="descendant"?r.getDescendantIndices():d;J(this,y,u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t){var r=this,i=this.node.getModel(),o=i.getModel("label"),n=this.node.getLayout(),l=n.endAngle-n.startAngle,s=(n.startAngle+n.endAngle)/2,u=Math.cos(s),p=Math.sin(s),f=this,c=f.getTextContent(),v=this.node.dataIndex,h=o.get("minAngle")/180*Math.PI,m=o.get("show")&&!(h!=null&&Math.abs(l)<h);c.ignore=!m,k(fa,function(y){var g=y==="normal"?i.getModel("label"):i.getModel([y,"label"]),S=y==="normal",x=S?c:c.ensureState(y),_=t.getFormattedLabel(v,y);S&&(_=_||r.node.name),x.style=Kt(g,{},null,y!=="normal",!0),_&&(x.style.text=_);var b=g.get("show");b!=null&&!S&&(x.ignore=!b);var w=d(g,"position"),I=S?f:f.states[y],C=I.style.fill;I.textConfig={outsideFill:g.get("color")==="inherit"?C:null,inside:w!=="outside"};var L,D=d(g,"distance")||0,A=d(g,"align"),E=d(g,"rotate"),z=Math.PI*.5,P=Math.PI*1.5,T=pa(E==="tangential"?Math.PI/2-s:s),N=T>z&&!Xi(T-z)&&T<P;w==="outside"?(L=n.r+D,A=N?"right":"left"):!A||A==="center"?(n.r0===0&&Xi(l-2*Math.PI)?L=0:L=(n.r+n.r0)/2,A="center"):A==="left"?(L=n.r0+D,A=N?"right":"left"):A==="right"&&(L=n.r-D,A=N?"left":"right"),x.style.align=A,x.style.verticalAlign=d(g,"verticalAlign")||"middle",x.x=L*u+n.cx,x.y=L*p+n.cy;var R=0;E==="radial"?R=pa(-s)+(N?Math.PI:0):E==="tangential"?R=pa(Math.PI/2-s)+(N?Math.PI:0):yt(E)&&(R=E*Math.PI/180),x.rotation=pa(R)});function d(y,g){var S=y.get(g);return S??o.get(g)}c.dirtyStyle()},e})(Bt),vn=Sd;var be="sunburst",xd=(function(a){V(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 i={name:t.name,children:t.data};gf(i);var o=this._levelModels=X(t.levels||[],function(s){return new Xt(s,this,r)},this),n=jr.createTree(i,this,l);function l(s){s.wrapMethod("getItemModel",function(u,p){var f=n.getNodeByDataIndex(p),c=o[f.depth];return c&&(u.parentModel=c),u})}return n.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.getDataParams=function(t){var r=a.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(t);return r.treePathInfo=or(i,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(){da(this)},e.type="series."+be,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})(Q);function gf(a){var e=0;k(a.children,function(r){gf(r);var i=r.value;$(i)&&(i=i[0]),e+=i});var t=a.value;$(t)&&(t=t[0]),(t==null||isNaN(t))&&(t=e),t<0&&(t=0),$(a.value)?a.value[0]=t:a.value=t}var yf=xd;var Mi="sunburstRootToNode",Sf="sunburstHighlight",_d="sunburstUnhighlight";function xf(a){a.registerAction({type:Mi,update:"updateView"},function(e,t){t.eachComponent({mainType:"series",subType:"sunburst",query:e},r);function r(i,o){var n=Ne(e,[Mi],i);if(n){var l=i.getViewRoot();l&&(e.direction=Jr(l,n.node)?"rollUp":"drillDown"),i.resetViewRoot(n.node)}}}),a.registerAction({type:Sf,update:"none"},function(e,t,r){e=B({},e),t.eachComponent({mainType:"series",subType:"sunburst",query:e},i);function i(o){var n=Ne(e,[Sf],o);n&&(e.dataIndex=n.node.dataIndex)}r.dispatchAction(B(e,{type:"highlight"}))}),a.registerAction({type:_d,update:"updateView"},function(e,t,r){e=B({},e),r.dispatchAction(B(e,{type:"downplay"}))})}var bd=(function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=be,t}return e.prototype.render=function(t,r,i,o){var n=this;this.seriesModel=t,this.api=i,this.ecModel=r;var l=t.getData(),s=l.tree.root,u=t.getViewRoot(),p=this.group,f=t.get("renderLabelForZeroData"),c=[];u.eachNode(function(g){c.push(g)});var v=this._oldChildren||[];h(c,v),y(s,u),this._initEvents(),this._oldChildren=c;function h(g,S){if(g.length===0&&S.length===0)return;new We(S,g,x,x).add(_).update(_).remove(zt(_,null)).execute();function x(b){return b.getId()}function _(b,w){var I=b==null?null:g[b],C=w==null?null:S[w];m(I,C)}}function m(g,S){if(!f&&g&&!g.getValue()&&(g=null),g!==s&&S!==s){if(S&&S.piece)g?(S.piece.updateData(!1,g,t,r,i),l.setItemGraphicEl(g.dataIndex,S.piece)):d(S);else if(g){var x=new vn(g,t,r,i);p.add(x),l.setItemGraphicEl(g.dataIndex,x)}}}function d(g){g&&g.piece&&(p.remove(g.piece),g.piece=null)}function y(g,S){S.depth>0?(n.virtualPiece?n.virtualPiece.updateData(!1,g,t,r,i):(n.virtualPiece=new vn(g,t,r,i),p.add(n.virtualPiece)),S.piece.off("click"),n.virtualPiece.on("click",function(x){n._rootToNode(S.parentNode)})):n.virtualPiece&&(p.remove(n.virtualPiece),n.virtualPiece=null)}},e.prototype._initEvents=function(){var t=this;this.group.off("click"),this.group.on("click",function(r){var i=!1,o=t.seriesModel.getViewRoot();o.eachNode(function(n){if(!i&&n.piece&&n.piece===r.target){var l=n.getModel().get("nodeClick");if(l==="rootToNode")t._rootToNode(n);else if(l==="link"){var s=n.getModel(),u=s.get("link");if(u){var p=s.get("target",!0)||"_blank";ka(u,p)}}i=!0}})})},e.prototype._rootToNode=function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:Mi,from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},e.prototype.containPoint=function(t,r){var i=r.getData(),o=i.getItemLayout(0);if(o){var n=t[0]-o.cx,l=t[1]-o.cy,s=Math.sqrt(n*n+l*l);return s<=o.r&&s>=o.r0}},e.type=be,e})(q),_f=bd;var bf=rt(be,wd);function wd(a){var e={};function t(r,i,o){if(r.depth===0)return Y.color.neutral50;for(var n=r;n&&n.depth>1;)n=n.parentNode;var l=i.getColorFromPalette(n.name||n.dataIndex+"",e);return r.depth>1&&dt(l)&&(l=Xn(l,(r.depth-1)/(o-1)*.5)),l}a.eachSeriesByType(be,function(r){var i=r.getData(),o=i.tree;o.eachNode(function(n){var l=n.getModel(),s=l.getModel("itemStyle").getItemStyle();s.fill||(s.fill=t(n,r,o.root.height));var u=i.ensureUniqueItemVisual(n.dataIndex,"style");B(u,s)})})}var wf=Math.PI/180,Df=rt(be,Dd);function Dd(a,e){a.eachSeriesByType(be,function(t){var r=t.get("center"),i=t.get("radius");$(i)||(i=[0,i]),$(r)||(r=[r,r]);var o=e.getWidth(),n=e.getHeight(),l=Math.min(o,n),s=H(r[0],o),u=H(r[1],n),p=H(i[0],l/2),f=H(i[1],l/2),c=-t.get("startAngle")*wf,v=t.get("minAngle")*wf,h=t.getData().tree.root,m=t.getViewRoot(),d=m.depth,y=t.get("sort");y!=null&&If(m,y);var g=0;k(m.children,function(P){!isNaN(P.getValue())&&g++});var S=m.getValue(),x=Math.PI/(S||g)*2,_=m.depth>0,b=m.height-(_?-1:1),w=(f-p)/(b||1),I=t.get("clockwise"),C=t.get("stillShowZeroSum"),L=I?1:-1,D=function(P,T){if(P){var N=T;if(P!==h){var R=P.getValue(),M=S===0&&C?x:R*x;M<v&&(M=v),N=T+L*M;var O=P.depth-d-(_?-1:1),U=p+w*O,G=p+w*(O+1),F=t.getLevelModel(P);if(F){var Z=F.get("r0",!0),j=F.get("r",!0),Dt=F.get("radius",!0);Dt!=null&&(Z=Dt[0],j=Dt[1]),Z!=null&&(U=H(Z,l/2)),j!=null&&(G=H(j,l/2))}P.setLayout({angle:M,startAngle:T,endAngle:N,clockwise:I,cx:s,cy:u,r0:U,r:G})}if(P.children&&P.children.length){var Gt=0;k(P.children,function(et){Gt+=D(et,T+Gt)})}return N-T}};if(_){var A=p,E=p+w,z=Math.PI*2;h.setLayout({angle:z,startAngle:c,endAngle:c+z,clockwise:I,cx:s,cy:u,r0:A,r:E})}D(m,c)})}function If(a,e){var t=a.children||[];a.children=Id(t,e),t.length&&k(a.children,function(r){If(r,e)})}function Id(a,e){if(gt(e)){var t=X(a,function(i,o){var n=i.getValue();return{params:{depth:i.depth,height:i.height,dataIndex:i.dataIndex,getValue:function(){return n}},index:o}});return t.sort(function(i,o){return e(i.params,o.params)}),X(t,function(i){return a[i.index]})}else{var r=e==="asc";return a.sort(function(i,o){var n=(i.getValue()-o.getValue())*(r?1:-1);return n===0?(i.dataIndex-o.dataIndex)*(r?-1:1):n})}}function Ld(a){a.registerChartView(_f),a.registerSeriesModel(yf),a.registerLayout(Df),a.registerVisual(bf),xf(a)}var hn={color:"fill",borderColor:"stroke"},Lf={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},we=te(),Ad=(function(a){V(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 Et(null,this)},e.prototype.getDataParams=function(t,r,i){var o=a.prototype.getDataParams.call(this,t,r);return i&&(o.info=we(i).info),o},e.type="series.custom",e.dependencies=["grid","polar","geo","singleAxis","calendar","matrix"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},e})(Q),Af=Ad;function Pd(a,e){return e=e||[0,0],X(["x","y"],function(t,r){var i=this.getAxis(t),o=e[r],n=a[r]/2;return i.type==="category"?Ut(i).w:Math.abs(i.dataToCoord(o-n)-i.dataToCoord(o+n))},this)}function mn(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:ot(Pd,a)}}}function Cd(a,e){return e=e||[0,0],X([0,1],function(t){var r=e[t],i=a[t]/2,o=[],n=[];return o[t]=r-i,n[t]=r+i,o[1-t]=n[1-t]=e[1-t],Math.abs(this.dataToPoint(o)[t]-this.dataToPoint(n)[t])},this)}function dn(a){var e=a.view,t=e.getBoundingRect();return{coordSys:{type:"geo",x:t.x,y:t.y,width:t.width,height:t.height,zoom:Ml(e)},api:{coord:function(r){return a.dataToPoint(r)},size:ot(Cd,a)}}}function Ed(a,e){var t=this.getAxis(),r=e instanceof Array?e[0]:e,i=(a instanceof Array?a[0]:a)/2;return t.type==="category"?Ut(t).w:Math.abs(t.dataToCoord(r-i)-t.dataToCoord(r+i))}function gn(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:ot(Ed,a)}}}function Td(a,e){return e=e||[0,0],X(["Radius","Angle"],function(t,r){var i="get"+t+"Axis",o=this[i](),n=e[r],l=a[r]/2,s=o.type==="category"?Ut(o).w:Math.abs(o.dataToCoord(n-l)-o.dataToCoord(n+l));return t==="Angle"&&(s=s*Math.PI/180),s},this)}function yn(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(i){var o=e.dataToRadius(i[0]),n=t.dataToAngle(i[1]),l=a.coordToPoint([o,n]);return l.push(o,n*Math.PI/180),l},size:ot(Td,a)}}}function Sn(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,i){return a.dataToPoint(r,i)},layout:function(r,i){return a.dataToLayout(r,i)}}}}function xn(a){var e=a.getRect();return{coordSys:{type:"matrix",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(t,r){return a.dataToPoint(t,r)},layout:function(t,r){return a.dataToLayout(t,r)}}}}var ze="emphasis",sr="normal",Ln="blur",An="select",ur=[sr,ze,Ln,An],_n={normal:["itemStyle"],emphasis:[ze,"itemStyle"],blur:[Ln,"itemStyle"],select:[An,"itemStyle"]},bn={normal:["label"],emphasis:[ze,"label"],blur:[Ln,"label"],select:[An,"label"]},Rd=["x","y"],Nd="e\0\0",ue={normal:{},emphasis:{},blur:{},select:{}},Md={cartesian2d:mn,geo:dn,single:gn,polar:yn,calendar:Sn,matrix:xn};function Dn(a){return a instanceof ft}function In(a){return a instanceof Aa}function Vd(a,e){e.copyTransform(a),In(e)&&In(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,Dn(e)&&Dn(a)&&e.setShape(a.shape))}var zd=(function(a){V(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,i,o){this._progressiveEls=null;var n=this._data,l=t.getData(),s=this.group,u=Pf(t,l,r,i);n||s.removeAll(),l.diff(n).add(function(f){wn(i,null,f,u(f,o),t,s,l)}).remove(function(f){var c=n.getItemGraphicEl(f);c&&ii(c,we(c).option,t)}).update(function(f,c){var v=n.getItemGraphicEl(c);wn(i,v,f,u(f,o),t,s,l)}).execute();var p=t.get("clip",!0)?jt(t.coordinateSystem,!1,t):null;p?s.setClipPath(p):s.removeClipPath(),this._data=l},e.prototype.incrementalPrepareRender=function(t,r,i){this.group.removeAll(),this._data=null},e.prototype.incrementalRender=function(t,r,i,o,n){var l=r.getData(),s=Pf(r,l,i,o),u=this._progressiveEls=[];function p(v){v.isGroup||(v.incremental=Mt(r),v.ensureState("emphasis").hoverLayer=Na)}for(var f=t.start;f<t.end;f++){var c=wn(null,null,f,s(f,n),r,this.group,l);c&&(c.traverse(p),u.push(c))}},e.prototype.eachRendered=function(t){Fe(this._progressiveEls||this.group,t)},e.prototype.filterForExposedEvent=function(t,r,i,o){var n=r.element;if(n==null||i.name===n)return!0;for(;(i=i.__hostTarget||i.parent)&&i!==this.group;)if(i.name===n)return!0;return!1},e.type="custom",e})(q),Rf=zd;function Pn(a){var e=a.type,t;if(e==="path"){var r=a.shape,i=r.width!=null&&r.height!=null?{x:r.x||0,y:r.y||0,width:r.width,height:r.height}:null,o=Vf(r);t=ao(o,null,i,r.layout||"center"),we(t).customPathData=o}else if(e==="image")t=new ge({}),we(t).customImagePath=a.style.image;else if(e==="text")t=new Lt({});else if(e==="group")t=new K;else if(e==="compoundPath"){var r=a.shape;if(!r||!r.paths){var n="";Mr(n)}var l=X(r.paths,function(p){if(p.type==="path")return ao(p.shape.pathData,p,null);var f=ro(p.type);if(!f){var c="";Mr(c)}return new f});t=new ul({shape:{paths:l}})}else{var s=ro(e);if(!s){var n="";Mr(n)}t=new s}return we(t).customGraphicType=e,t.name=a.name,t.z2EmphasisLift=1,t.z2SelectLift=1,t}function Cn(a,e,t,r,i,o,n){Yl(e);var l=i&&i.normal.cfg;l&&e.setTextConfig(l),r&&r.transition==null&&(r.transition=Rd);var s=r&&r.style;if(s){if(e.type==="text"){var u=s;Qt(u,"textFill")&&(u.fill=u.textFill),Qt(u,"textStroke")&&(u.stroke=u.textStroke)}var p=void 0,f=Dn(e)?s.decal:null;a&&f&&(f.dirty=!0,p=Ya(f,a)),s.__decalPattern=p}if(In(e)&&s){var p=s.__decalPattern;p&&(s.decal=p)}Wl(e,r,o,{dataIndex:t,isInit:n,clearStyle:!0}),Zl(e,r.keyframeAnimation,o)}function Nf(a,e,t,r,i){var o=e.isGroup?null:e,n=i&&i[a].cfg;if(o){var l=o.ensureState(a);if(r===!1){var s=o.getState(a);s&&(s.style=null)}else l.style=r||null;n&&(l.textConfig=n),dr(o)}}function Od(a,e,t){if(!a.isGroup){var r=a,i=t.currentZ,o=t.currentZLevel;r.z=i,r.zlevel=o;var n=e.z2;n!=null&&(r.z2=n||0);for(var l=0;l<ur.length;l++)kd(r,e,ur[l])}}function kd(a,e,t){var r=t===sr,i=r?e:Vi(e,t),o=i?i.z2:null,n;o!=null&&(n=r?a:a.ensureState(t),n.z2=o||0)}function Pf(a,e,t,r){var i=a.get("renderItem");if(typeof i=="string"){var o=_l(i);o&&(i=o)}var n=a.coordinateSystem,l={};n&&(l=n.prepareCustoms?n.prepareCustoms(n):Md[n.type](n));for(var s=Ct({getWidth:r.getWidth,getHeight:r.getHeight,getZr:r.getZr,getDevicePixelRatio:r.getDevicePixelRatio,value:_,style:w,ordinalRawValue:b,styleEmphasis:I,visual:D,barLayout:A,currentSeriesIndices:E,font:z},l.api||{}),u={context:{},seriesId:a.id,seriesName:a.name,seriesIndex:a.seriesIndex,coordSys:l.coordSys,dataInsideLength:e.count(),encode:Ud(a.getData()),itemPayload:a.get("itemPayload")||{}},p,f,c={},v={},h={},m={},d=0;d<ur.length;d++){var y=ur[d];h[y]=a.getModel(_n[y]),m[y]=a.getModel(bn[y])}function g(P){return P===p?f||(f=e.getItemModel(P)):e.getItemModel(P)}function S(P,T){return e.hasItemOption?P===p?c[T]||(c[T]=g(P).getModel(_n[T])):g(P).getModel(_n[T]):h[T]}function x(P,T){return e.hasItemOption?P===p?v[T]||(v[T]=g(P).getModel(bn[T])):g(P).getModel(bn[T]):m[T]}return function(P,T){return p=P,f=null,c={},v={},i&&i(Ct({dataIndexInside:P,dataIndex:e.getRawIndex(P),actionType:T?T.type:null},u),s)};function _(P,T){return T==null&&(T=p),e.getStore().get(e.getDimensionIndex(P||0),T)}function b(P,T){T==null&&(T=p),P=P||0;var N=e.getDimensionInfo(P);if(!N){var R=e.getDimensionIndex(P);return R>=0?e.getStore().get(R,T):void 0}var M=e.get(N.name,T),O=N&&N.ordinalMeta;return O?O.categories[M]:M}function w(P,T){T==null&&(T=p);var N=e.getItemVisual(T,"style"),R=N&&N.fill,M=N&&N.opacity,O=S(T,sr).getItemStyle();R!=null&&(O.fill=R),M!=null&&(O.opacity=M);var U={inheritColor:dt(R)?R:Y.color.neutral99},G=x(T,sr),F=Kt(G,null,U,!1,!0);F.text=G.getShallow("show")?ke(a.getFormattedLabel(T,sr),Pe(e,T)):null;var Z=oo(G,U,!1);return L(P,O),O=so(O,F,Z),P&&C(O,P),O.legacy=!0,O}function I(P,T){T==null&&(T=p);var N=S(T,ze).getItemStyle(),R=x(T,ze),M=Kt(R,null,null,!0,!0);M.text=R.getShallow("show")?Zt(a.getFormattedLabel(T,ze),a.getFormattedLabel(T,sr),Pe(e,T)):null;var O=oo(R,null,!0);return L(P,N),N=so(N,M,O),P&&C(N,P),N.legacy=!0,N}function C(P,T){for(var N in T)Qt(T,N)&&(P[N]=T[N])}function L(P,T){P&&(P.textFill&&(T.textFill=P.textFill),P.textPosition&&(T.textPosition=P.textPosition))}function D(P,T){if(T==null&&(T=p),Qt(hn,P)){var N=e.getItemVisual(T,"style");return N?N[hn[P]]:null}if(Qt(Lf,P))return e.getItemVisual(T,P)}function A(P){if(n.type==="cartesian2d"){var T=n.getBaseAxis();return is(Ct({axis:T},P))}}function E(){return t.getCurrentSeriesIndices()}function z(P){return pl(P,t)}}function Ud(a){var e={};return k(a.dimensions,function(t){var r=a.getDimensionInfo(t);if(!r.isExtraCoord){var i=r.coordDim,o=e[i]=e[i]||[];o[r.coordDimIndex]=a.getDimensionIndex(t)}}),e}function wn(a,e,t,r,i,o,n){if(!r){o.remove(e);return}var l=En(a,e,t,r,i,o);return l&&n.setItemGraphicEl(t,l),l&&J(l,r.focus,r.blurScope,r.emphasisDisabled),l}function En(a,e,t,r,i,o){var n=-1,l=e;e&&Mf(e,r,i)&&(n=Rt(o.childrenRef(),e),e=null);var s=!e,u=e;u?u.clearStates():(u=Pn(r),l&&Vd(l,u)),r.morph===!1?u.disableMorphing=!0:u.disableMorphing&&(u.disableMorphing=!1),r.tooltipDisabled&&(u.tooltipDisabled=!0),ue.normal.cfg=ue.normal.conOpt=ue.emphasis.cfg=ue.emphasis.conOpt=ue.blur.cfg=ue.blur.conOpt=ue.select.cfg=ue.select.conOpt=null,ue.isLegacy=!1,Bd(u,t,r,i,s,ue),Gd(u,t,r,i,s),Cn(a,u,t,r,ue,i,s),Qt(r,"info")&&(we(u).info=r.info);for(var p=0;p<ur.length;p++){var f=ur[p];if(f!==sr){var c=Vi(r,f),v=Tn(r,c,f);Nf(f,u,c,v,ue)}}return Od(u,r,i),r.type==="group"&&Hd(a,u,t,r,i),n>=0?o.replaceAt(u,n):o.add(u),u}function Mf(a,e,t){var r=we(a),i=e.type,o=e.shape,n=e.style;return t.isUniversalTransitionEnabled()||i!=null&&i!==r.customGraphicType||i==="path"&&Zd(o)&&Vf(o)!==r.customPathData||i==="image"&&Qt(n,"image")&&n.image!==r.customImagePath}function Gd(a,e,t,r,i){var o=t.clipPath;if(o===!1)a&&a.getClipPath()&&a.removeClipPath();else if(o){var n=a.getClipPath();n&&Mf(n,o,r)&&(n=null),n||(n=Pn(o),a.setClipPath(n)),Cn(null,n,e,o,null,r,i)}}function Bd(a,e,t,r,i,o){if(!(a.isGroup||a.type==="compoundPath")){Cf(t,null,o),Cf(t,ze,o);var n=o.normal.conOpt,l=o.emphasis.conOpt,s=o.blur.conOpt,u=o.select.conOpt;if(n!=null||l!=null||u!=null||s!=null){var p=a.getTextContent();if(n===!1)p&&a.removeTextContent();else{n=o.normal.conOpt=n||{type:"text"},p?p.clearStates():(p=Pn(n),a.setTextContent(p)),Cn(null,p,e,n,null,r,i);for(var f=n&&n.style,c=0;c<ur.length;c++){var v=ur[c];if(v!==sr){var h=o[v].conOpt;Nf(v,p,h,Tn(n,h,v),null)}}f?p.dirty():p.markRedraw()}}}}function Cf(a,e,t){var r=e?Vi(a,e):a,i=e?Tn(a,r,ze):a.style,o=a.type,n=r?r.textConfig:null,l=a.textContent,s=l?e?Vi(l,e):l:null;if(i&&(t.isLegacy||Al(i,o,!!n,!!s))){t.isLegacy=!0;var u=Pl(i,o,!e);!n&&u.textConfig&&(n=u.textConfig),!s&&u.textContent&&(s=u.textContent)}if(!e&&s){var p=s;!p.type&&(p.type="text")}var f=e?t[e]:t.normal;f.cfg=n,f.conOpt=s}function Vi(a,e){return e?a?a[e]:null:a}function Tn(a,e,t){var r=e&&e.style;return r==null&&t===ze&&a&&(r=a.styleEmphasis),r}function Hd(a,e,t,r,i){var o=r.children,n=o?o.length:0,l=r.$mergeChildren,s=l==="byName"||r.diffChildrenByName,u=l===!1;if(!(!n&&!s&&!u)){if(s){Wd({api:a,oldChildren:e.children()||[],newChildren:o||[],dataIndex:t,seriesModel:i,group:e});return}u&&e.removeAll();for(var p=0;p<n;p++){var f=o[p],c=e.childAt(p);f?(f.ignore==null&&(f.ignore=!1),En(a,c,t,f,i,e)):c.ignore=!0}for(var v=e.childCount()-1;v>=p;v--){var h=e.childAt(v);Fd(e,h,i)}}}function Fd(a,e,t){e&&ii(e,we(a).option,t)}function Wd(a){new We(a.oldChildren,a.newChildren,Ef,Ef,a).add(Tf).update(Tf).remove(Yd).execute()}function Ef(a,e){var t=a&&a.name;return t??Nd+e}function Tf(a,e){var t=this.context,r=a!=null?t.newChildren[a]:null,i=e!=null?t.oldChildren[e]:null;En(t.api,i,t.dataIndex,r,t.seriesModel,t.group)}function Yd(a){var e=this.context,t=e.oldChildren[a];t&&ii(t,we(t).option,e.seriesModel)}function Vf(a){return a&&(a.pathData||a.d)}function Zd(a){return a&&(Qt(a,"pathData")||Qt(a,"d"))}function Xd(a){a.registerChartView(Rf),a.registerSeriesModel(Af)}export{gc as BarChart,hm as BoxplotChart,Cm as CandlestickChart,fh as ChordChart,Xd as CustomChart,Nm as EffectScatterChart,Ih as FunnelChart,gh as GaugeChart,ih as GraphChart,$m as HeatmapChart,Qf as LineChart,Zm as LinesChart,Hc as MapChart,Vh as ParallelChart,pd as PictorialBarChart,Ac as PieChart,Oc as RadarChart,om as SankeyChart,Nc as ScatterChart,Ld as SunburstChart,dd as ThemeRiverChart,cv as TreeChart,Fv as TreemapChart};