1 |
- !function(){var t=document.createElement("style");t.innerHTML="._subjectEcharts_17r04_1{padding:.32rem .32rem .37333rem;font-family:DINA}._container_17r04_5{position:relative;padding:.37333rem .32rem;border-radius:.26667rem;background-color:#fff;margin-bottom:.32rem}._emtry_17r04_12{position:absolute;left:50%;top:50%;transform:translate(-50%);font-size:.37333rem;color:#aaa}._head_17r04_20{display:flex;font-size:.4rem;color:#333;padding-bottom:.37333rem}._head_17r04_20 ._headLeft_17r04_26{display:flex;align-items:center}._head_17r04_20 ._headLeft_17r04_26 ._icon_17r04_30{display:block;width:.48rem;height:.48rem;margin-right:.21333rem}._head_17r04_20 ._headRight_17r04_36{margin-left:auto;display:flex;align-items:center}._head_17r04_20 ._headRight_17r04_36>div{font-size:.26667rem;border-radius:.32rem;border:.02667rem solid;margin:0 .08rem;line-height:.48rem;width:1.06667rem;text-align:center}._headLabelWrap_17r04_50{display:flex;align-items:center;justify-content:center;padding:.26667rem;font-size:.32rem}._headLabelWrap_17r04_50 ._headLabel_17r04_50{margin:0 .16rem;display:flex;align-items:center}._headLabelWrap_17r04_50 ._headLabelDot_17r04_62{width:.10667rem;height:.10667rem;border-radius:50%;margin-right:.08rem}._content_17r04_68{display:flex;align-items:center;padding:.21333rem .05333rem}._echartsMain_17r04_73{margin:0 -.32rem;height:5.38667rem}._items_17r04_77{flex:1;display:flex;align-items:center;margin-left:.45333rem;justify-content:space-between}._items_17r04_77 ._item_17r04_77 ._itemNum_17r04_84{display:flex;justify-content:flex-end;align-items:center;font-weight:400;font-size:.58667rem;color:#333;margin-bottom:.08rem;white-space:nowrap}._items_17r04_77 ._item_17r04_77 ._itemNum_17r04_84 ._rect_17r04_94{width:.21333rem;height:.21333rem;background:#FF8057;border-radius:.05333rem;margin-right:.16rem}._items_17r04_77 ._item_17r04_77 ._itemTitle_17r04_101{font-size:.32rem;color:#777;white-space:nowrap}._items_17r04_77 ._line_17r04_106{padding:0 .26667rem;border-left:.02667rem solid;border-right:.02667rem solid;-o-border-image:linear-gradient(to bottom,#f9f9f9,#eaeaea,#f9f9f9) 1;border-image:linear-gradient(to bottom,#f9f9f9,#eaeaea,#f9f9f9) 1}._subjectWrap_17r04_112{padding:0}._listItem_17r04_115{position:relative;display:flex;align-items:center;padding:.26667rem .4rem .26667rem .72rem;border:.02667rem solid transparent}._listItem_17r04_115:not(:last-child){border-bottom:.02667rem dashed #EAEAEA}._listItem_17r04_115 ._itemLeft_17r04_125{border-right:.02667rem solid;-o-border-image:linear-gradient(to bottom,#f9f9f9,#eaeaea,#f9f9f9) 1;border-image:linear-gradient(to bottom,#f9f9f9,#eaeaea,#f9f9f9) 1}._listItem_17r04_115 ._itemLeft_17r04_125 ._subjectName_17r04_129{width:1.44rem;font-size:.34667rem;font-weight:600;color:#333;line-height:.48rem;margin-bottom:.08rem;white-space:nowrap}._listItem_17r04_115 ._itemLeft_17r04_125 ._subjectType_17r04_138{font-size:.26667rem;font-weight:400;color:#666;line-height:.37333rem}._listItem_17r04_115 ._dot_17r04_144{position:absolute;left:.4rem;top:.4rem;width:.10667rem;height:.10667rem;background:#AAAAAA;border-radius:50%}._listItemActive_17r04_153{background-color:rgba(255,128,87,.09);border:.02667rem solid #FF8057!important;border-radius:.26667rem}._listitems_17r04_158{flex:1;display:flex;align-items:center;margin-left:.45333rem;justify-content:space-between}._listitems_17r04_158 ._item_17r04_77 ._itemNum_17r04_84{display:flex;justify-content:flex-end;align-items:center;font-size:.42667rem;color:#333;margin-bottom:.08rem;white-space:nowrap}._listitems_17r04_158 ._item_17r04_77 ._itemTitle_17r04_101{font-size:.26667rem;color:#777;white-space:nowrap}._listitems_17r04_158 ._line_17r04_106{border-left:.02667rem solid;border-right:.02667rem solid;-o-border-image:linear-gradient(to bottom,#f9f9f9,#eaeaea,#f9f9f9) 1;border-image:linear-gradient(to bottom,#f9f9f9,#eaeaea,#f9f9f9) 1}._circle_1j0c8_1{transform:rotate(-90deg)}._circle-main-box_1j0c8_4{position:relative;display:block;margin:0 auto}._count-num_1j0c8_9{position:absolute;left:0;top:21Px;align-items:center;justify-content:center;display:flex;font-size:22Px;color:#333;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:100%;text-align:center}._des_1j0c8_22{position:absolute;left:0;top:47Px;font-size:.32rem;color:#777;width:100%;text-align:center}\n",document.head.appendChild(t),System.register(["./index-legacy.eb062188.js","./universalTransition-legacy.4fb7b1ab.js"],(function(t){"use strict";var e,i,n,o,r,a,s,l,u,c,d,p,h,g,f,y,m,v,x,_,b,S,w,M,I,A,D,T,C,L,N,P,k,E,R,V,z,O,B,G,F,W,H,U,j,X,Y,Z,q,J,Q,K,$,tt,et,it,nt,ot,rt,at,st,lt,ut,ct,dt,pt,ht,gt,ft,yt,mt,vt,xt,_t,bt,St,wt,Mt,It,At,Dt,Tt,Ct,Lt,Nt,Pt,kt,Et,Rt,Vt,zt,Ot,Bt,Gt,Ft,Wt,Ht,Ut,jt,Xt,Yt,Zt,qt,Jt,Qt,Kt,$t,te,ee,ie,ne,oe,re,ae,se,le,ue,ce,de,pe,he,ge,fe,ye,me,ve,xe,_e,be,Se,we,Me,Ie,Ae,De,Te,Ce,Le,Ne,Pe,ke,Ee,Re,Ve,ze,Oe,Be,Ge,Fe,We,He,Ue,je,Xe,Ye,Ze,qe,Je,Qe,Ke,$e,ti,ei,ii,ni,oi,ri,ai,si,li,ui,ci,di,pi,hi,gi,fi,yi,mi,vi,xi,_i,bi,Si,wi,Mi,Ii,Ai,Di,Ti,Ci,Li,Ni,Pi,ki,Ei,Ri,Vi,zi,Oi,Bi,Gi,Fi,Wi,Hi,Ui,ji,Xi,Yi,Zi,qi,Ji,Qi,Ki,$i,tn,en,nn,on,rn,an,sn,ln,un,cn,dn,pn,hn,gn,fn,yn,mn,vn,xn,_n,bn,Sn,wn,Mn,In,An,Dn,Tn,Cn,Ln,Nn,Pn,kn,En,Rn,Vn,zn,On,Bn,Gn,Fn,Wn,Hn,Un,jn,Xn,Yn,Zn,qn,Jn,Qn,Kn,$n,to,eo,io,no,oo,ro,ao,so,lo,uo,co,po,ho,go,fo,yo,mo,vo,xo,_o,bo,So,wo,Mo,Io,Ao,Do,To,Co,Lo,No,Po,ko,Eo,Ro,Vo,zo,Oo,Bo,Go,Fo,Wo,Ho,Uo,jo,Xo,Yo,Zo,qo,Jo,Qo,Ko,$o,tr,er,ir,nr,or,rr,ar,sr,lr,ur,cr,dr,pr;return{setters:[function(t){e=t.d,i=t.c,n=t.q,o=t.r,r=t.y,a=t.$,s=t.bJ,l=t.e,u=t.ab,c=t.bL},function(t){d=t.w,p=t._,h=t.p,g=t.B,f=t.q,y=t.r,m=t.s,v=t.t,x=t.v,_=t.x,b=t.y,S=t.z,w=t.A,M=t.Z,I=t.C,A=t.D,D=t.E,T=t.F,C=t.G,L=t.H,N=t.I,P=t.J,k=t.K,E=t.M,R=t.N,V=t.P,z=t.O,O=t.Q,B=t.R,G=t.T,F=t.S,W=t.U,H=t.V,U=t.W,j=t.X,X=t.Y,Y=t.$,Z=t.a0,q=t.a1,J=t.a2,Q=t.a3,K=t.a4,$=t.a5,tt=t.a6,et=t.a7,it=t.a8,nt=t.a9,ot=t.aa,rt=t.ab,at=t.ac,st=t.ad,lt=t.ae,ut=t.af,ct=t.ag,dt=t.ah,pt=t.ai,ht=t.aj,gt=t.ak,ft=t.al,yt=t.am,mt=t.an,vt=t.ao,xt=t.ap,_t=t.aq,bt=t.ar,St=t.as,wt=t.u,Mt=t.at,It=t.au,At=t.av,Dt=t.aw,Tt=t.ax,Ct=t.ay,Lt=t.az,Nt=t.aA,Pt=t.aB,kt=t.aC,Et=t.aD,Rt=t.aE,Vt=t.aF,zt=t.aG,Ot=t.aH,Bt=t.aI,Gt=t.aJ,Ft=t.aK,Wt=t.aL,Ht=t.aM,Ut=t.aN,jt=t.aO,Xt=t.aP,Yt=t.aQ,Zt=t.aR,qt=t.aS,Jt=t.aT,Qt=t.aU,Kt=t.aV,$t=t.aW,te=t.aX,ee=t.aY,ie=t.aZ,ne=t.a_,oe=t.a$,re=t.b0,ae=t.b1,se=t.b2,le=t.b3,ue=t.b4,ce=t.L,de=t.b5,pe=t.b6,he=t.b7,ge=t.b8,fe=t.b9,ye=t.ba,me=t.bb,ve=t.bc,xe=t.bd,_e=t.be,be=t.bf,Se=t.bg,we=t.bh,Me=t.bi,Ie=t.bj,Ae=t.bk,De=t.bl,Te=t.bm,Ce=t.bn,Le=t.bo,Ne=t.bp,Pe=t.bq,ke=t.br,Ee=t.bs,Re=t.bt,Ve=t.bu,ze=t.bv,Oe=t.bw,Be=t.bx,Ge=t.by,Fe=t.bz,We=t.bA,He=t.bB,Ue=t.bC,je=t.bD,Xe=t.bE,Ye=t.bF,Ze=t.bG,qe=t.bH,Je=t.bI,Qe=t.bJ,Ke=t.bK,$e=t.bL,ti=t.bM,ei=t.bN,ii=t.bO,ni=t.bP,oi=t.bQ,ri=t.bR,ai=t.bS,si=t.bT,li=t.bU,ui=t.bV,ci=t.bW,di=t.bX,pi=t.bY,hi=t.bZ,gi=t.b_,fi=t.b$,yi=t.c0,mi=t.c1,vi=t.c2,xi=t.c3,_i=t.c4,bi=t.c5,Si=t.c6,wi=t.c7,Mi=t.c8,Ii=t.c9,Ai=t.ca,Di=t.cb,Ti=t.cc,Ci=t.cd,Li=t.ce,Ni=t.cf,Pi=t.cg,ki=t.ch,Ei=t.ci,Ri=t.cj,Vi=t.ck,zi=t.cl,Oi=t.cm,Bi=t.cn,Gi=t.co,Fi=t.cp,Wi=t.cq,Hi=t.cr,Ui=t.cs,ji=t.ct,Xi=t.cu,Yi=t.cv,Zi=t.cw,qi=t.cx,Ji=t.cy,Qi=t.cz,Ki=t.cA,$i=t.cB,tn=t.cC,en=t.cD,nn=t.cE,on=t.cF,rn=t.cG,an=t.cH,sn=t.cI,ln=t.cJ,un=t.cK,cn=t.cL,dn=t.cM,pn=t.cN,hn=t.cO,gn=t.cP,fn=t.cQ,yn=t.cR,mn=t.cS,vn=t.cT,xn=t.cU,_n=t.cV,bn=t.cW,Sn=t.cX,wn=t.cY,Mn=t.cZ,In=t.c_,An=t.c$,Dn=t.d0,Tn=t.d1,Cn=t.d2,Ln=t.d3,Nn=t.d4,Pn=t.d5,kn=t.d6,En=t.d7,Rn=t.d8,Vn=t.d9,zn=t.da,On=t.db,Bn=t.dc,Gn=t.dd,Fn=t.de,Wn=t.df,Hn=t.dg,Un=t.dh,jn=t.di,Xn=t.dj,Yn=t.dk,Zn=t.dl,qn=t.dm,Jn=t.dn,Qn=t.dp,Kn=t.dq,$n=t.dr,to=t.ds,eo=t.dt,io=t.du,no=t.dv,oo=t.dw,ro=t.dx,ao=t.dy,so=t.dz,lo=t.dA,uo=t.dB,co=t.dC,po=t.dD,ho=t.dE,go=t.dF,fo=t.dG,yo=t.dH,mo=t.dI,vo=t.dJ,xo=t.dK,_o=t.dL,bo=t.dM,So=t.dN,wo=t.dO,Mo=t.dP,Io=t.dQ,Ao=t.dR,Do=t.dS,To=t.dT,Co=t.dU,Lo=t.dV,No=t.dW,Po=t.dX,ko=t.dY,Eo=t.dZ,Ro=t.d_,Vo=t.d$,zo=t.e0,Oo=t.e1,Bo=t.e2,Go=t.e3,Fo=t.e4,Wo=t.e5,Ho=t.e6,Uo=t.e7,jo=t.e8,Xo=t.e9,Yo=t.ea,Zo=t.eb,qo=t.ec,Jo=t.j,Qo=t.o,Ko=t.f,$o=t.k,tr=t.c,er=t.l,ir=t.b,nr=t.a,or=t.m,rr=t.n,ar=t.ed,sr=t.ee,lr=t.e,ur=t.d,cr=t.h,dr=t.g,pr=t.i}],execute:function(){var hr={subjectEcharts:"_subjectEcharts_17r04_1",container:"_container_17r04_5",emtry:"_emtry_17r04_12",head:"_head_17r04_20",headLeft:"_headLeft_17r04_26",icon:"_icon_17r04_30",headRight:"_headRight_17r04_36",headLabelWrap:"_headLabelWrap_17r04_50",headLabel:"_headLabel_17r04_50",headLabelDot:"_headLabelDot_17r04_62",content:"_content_17r04_68",echartsMain:"_echartsMain_17r04_73",items:"_items_17r04_77",item:"_item_17r04_77",itemNum:"_itemNum_17r04_84",rect:"_rect_17r04_94",itemTitle:"_itemTitle_17r04_101",line:"_line_17r04_106",subjectWrap:"_subjectWrap_17r04_112",listItem:"_listItem_17r04_115",itemLeft:"_itemLeft_17r04_125",subjectName:"_subjectName_17r04_129",subjectType:"_subjectType_17r04_138",dot:"_dot_17r04_144",listItemActive:"_listItemActive_17r04_153",listitems:"_listitems_17r04_158"};var gr={circle:"_circle_1j0c8_1","circle-main-box":"_circle-main-box_1j0c8_4","count-num":"_count-num_1j0c8_9",des:"_des_1j0c8_22"},fr=e({name:"CircleProgress",data:()=>({now:0,timer:null}),props:{value:{type:Number,default:0},size:{type:Number,default:120},strokeWidth:{type:Number,default:10},color:{type:String,default:"rgba(153,202,251,1)"},duration:{type:Number,default:1e3},des:{type:String,default:"总达标率"}},watch:{value(t){this.now=0,this.$nextTick((()=>{this.run()}))}},computed:{percentage(){return this.value},countDown(){return this.now},cx(){return this.size/2},cy(){return this.size/2},radius(){return(this.size-this.strokeWidth)/2},circumference(){return 2*Math.PI*this.radius},progress(){return(1-this.now/100)*this.circumference}},mounted(){this.run()},methods:{run(){if(0==this.value)return;let t=this.duration/this.value;this.timer=setInterval((()=>{if(this.now>=this.value)return this.now=this.value,clearInterval(this.timer);this.now++}),t)}},render(){return i("div",{class:gr["circle-main"]},[i("div",{class:gr["circle-main-box"],style:[{width:this.size+"px",height:this.size+"px"}]},[i("svg",{width:this.size,height:this.size,class:gr.circle},[i("circle",{r:this.radius,cx:this.cx,cy:this.cy,fill:"transparent",stroke:"#FFE7DF","stroke-width":this.strokeWidth},null),i("circle",{r:this.radius,cx:this.cx,cy:this.cy,fill:"transparent",stroke:this.color,"stroke-width":this.strokeWidth,"stroke-linecap":"round","stroke-dasharray":this.circumference,"stroke-dashoffset":this.progress},null)]),i("span",{class:gr["count-num"]},[this.countDown,i("span",{class:gr.countType},[n("%")])]),i("span",{class:gr.des},[this.des])])])}});function yr(t,e){return Math.abs(t-e)<1e-8}function mr(t,e,i){var n=0,o=t[0];if(!o)return!1;for(var r=1;r<t.length;r++){var a=t[r];n+=d(o[0],o[1],a[0],a[1],e,i),o=a}var s=t[0];return yr(o[0],s[0])&&yr(o[1],s[1])||(n+=d(o[0],o[1],s[0],s[1],e,i)),0!==n}var vr=[];function xr(t,e){for(var i=0;i<t.length;i++)v(t[i],t[i],e)}function _r(t,e,i,n){for(var o=0;o<t.length;o++){var r=t[o];n&&(r=n.project(r)),r&&isFinite(r[0])&&isFinite(r[1])&&(x(e,e,r),_(i,i,r))}}var br=function(){function t(t){this.name=t}return t.prototype.setCenter=function(t){this._center=t},t.prototype.getCenter=function(){var t=this._center;return t||(t=this._center=this.calcCenter()),t},t}(),Sr=function(t,e){this.type="polygon",this.exterior=t,this.interiors=e},wr=function(t){this.type="linestring",this.points=t},Mr=function(t){function e(e,i,n){var o=t.call(this,e)||this;return o.type="geoJSON",o.geometries=i,o._center=n&&[n[0],n[1]],o}return p(e,t),e.prototype.calcCenter=function(){for(var t,e=this.geometries,i=0,n=0;n<e.length;n++){var o=e[n],r=o.exterior,a=r&&r.length;a>i&&(t=o,i=a)}if(t)return function(t){for(var e=0,i=0,n=0,o=t.length,r=t[o-1][0],a=t[o-1][1],s=0;s<o;s++){var l=t[s][0],u=t[s][1],c=r*u-l*a;e+=c,i+=(r+l)*c,n+=(a+u)*c,r=l,a=u}return e?[i/e/3,n/e/3,e]:[t[0][0]||0,t[0][1]||0]}(t.exterior);var s=this.getBoundingRect();return[s.x+s.width/2,s.y+s.height/2]},e.prototype.getBoundingRect=function(t){var e=this._rect;if(e&&!t)return e;var i=[1/0,1/0],n=[-1/0,-1/0],o=this.geometries;return h(o,(function(e){"polygon"===e.type?_r(e.exterior,i,n,t):h(e.points,(function(e){_r(e,i,n,t)}))})),isFinite(i[0])&&isFinite(i[1])&&isFinite(n[0])&&isFinite(n[1])||(i[0]=i[1]=n[0]=n[1]=0),e=new g(i[0],i[1],n[0]-i[0],n[1]-i[1]),t||(this._rect=e),e},e.prototype.contain=function(t){var e=this.getBoundingRect(),i=this.geometries;if(!e.contain(t[0],t[1]))return!1;t:for(var n=0,o=i.length;n<o;n++){var r=i[n];if("polygon"===r.type){var a=r.exterior,s=r.interiors;if(mr(a,t[0],t[1])){for(var l=0;l<(s?s.length:0);l++)if(mr(s[l],t[0],t[1]))continue t;return!0}}}return!1},e.prototype.transformTo=function(t,e,i,n){var o=this.getBoundingRect(),r=o.width/o.height;i?n||(n=i/r):i=r*n;for(var a=new g(t,e,i,n),s=o.calculateTransform(a),l=this.geometries,u=0;u<l.length;u++){var c=l[u];"polygon"===c.type?(xr(c.exterior,s),h(c.interiors,(function(t){xr(t,s)}))):h(c.points,(function(t){xr(t,s)}))}(o=this._rect).copy(a),this._center=[o.x+o.width/2,o.y+o.height/2]},e.prototype.cloneShallow=function(t){null==t&&(t=this.name);var i=new e(t,this.geometries,this._center);return i._rect=this._rect,i.transformTo=null,i},e}(br),Ir=function(t){function e(e,i){var n=t.call(this,e)||this;return n.type="geoSVG",n._elOnlyForCalculate=i,n}return p(e,t),e.prototype.calcCenter=function(){for(var t=this._elOnlyForCalculate,e=t.getBoundingRect(),i=[e.x+e.width/2,e.y+e.height/2],n=f(vr),o=t;o&&!o.isGeoSVGGraphicRoot;)y(n,o.getLocalTransform(),n),o=o.parent;return m(n,n),v(i,i,n),i},e}(br);function Ar(t,e,i){for(var n=0;n<t.length;n++)t[n]=Dr(t[n],e[n],i)}function Dr(t,e,i){for(var n=[],o=e[0],r=e[1],a=0;a<t.length;a+=2){var s=t.charCodeAt(a)-64,l=t.charCodeAt(a+1)-64;s=s>>1^-(1&s),l=l>>1^-(1&l),o=s+=o,r=l+=r,n.push([s/i,l/i])}return n}function Tr(t,e){return t=function(t){if(!t.UTF8Encoding)return t;var e=t,i=e.UTF8Scale;null==i&&(i=1024);var n=e.features;return h(n,(function(t){var e=t.geometry,n=e.encodeOffsets,o=e.coordinates;if(n)switch(e.type){case"LineString":e.coordinates=Dr(o,n,i);break;case"Polygon":case"MultiLineString":Ar(o,n,i);break;case"MultiPolygon":h(o,(function(t,e){return Ar(t,n[e],i)}))}})),e.UTF8Encoding=!1,e}(t),b(S(t.features,(function(t){return t.geometry&&t.properties&&t.geometry.coordinates.length>0})),(function(t){var i=t.properties,n=t.geometry,o=[];switch(n.type){case"Polygon":var r=n.coordinates;o.push(new Sr(r[0],r.slice(1)));break;case"MultiPolygon":h(n.coordinates,(function(t){t[0]&&o.push(new Sr(t[0],t.slice(1)))}));break;case"LineString":o.push(new wr([n.coordinates]));break;case"MultiLineString":o.push(new wr(n.coordinates))}var a=new Mr(i[e||"name"],o,i.cp);return a.properties=i,a}))}var Cr=Math.sin,Lr=Math.cos,Nr=Math.PI,Pr=2*Math.PI,kr=180/Nr,Er=function(){function t(){}return t.prototype.reset=function(t){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,t||4)},t.prototype.moveTo=function(t,e){this._add("M",t,e)},t.prototype.lineTo=function(t,e){this._add("L",t,e)},t.prototype.bezierCurveTo=function(t,e,i,n,o,r){this._add("C",t,e,i,n,o,r)},t.prototype.quadraticCurveTo=function(t,e,i,n){this._add("Q",t,e,i,n)},t.prototype.arc=function(t,e,i,n,o,r){this.ellipse(t,e,i,i,0,n,o,r)},t.prototype.ellipse=function(t,e,i,n,o,r,a,s){var l=a-r,u=!s,c=Math.abs(l),d=w(c-Pr)||(u?l>=Pr:-l>=Pr),p=l>0?l%Pr:l%Pr+Pr,h=!1;h=!!d||!w(c)&&p>=Nr==!!u;var g=t+i*Lr(r),f=e+n*Cr(r);this._start&&this._add("M",g,f);var y=Math.round(o*kr);if(d){var m=1/this._p,v=(u?1:-1)*(Pr-m);this._add("A",i,n,y,1,+u,t+i*Lr(r+v),e+n*Cr(r+v)),m>.01&&this._add("A",i,n,y,0,+u,g,f)}else{var x=t+i*Lr(a),_=e+n*Cr(a);this._add("A",i,n,y,+h,+u,x,_)}},t.prototype.rect=function(t,e,i,n){this._add("M",t,e),this._add("l",i,0),this._add("l",0,n),this._add("l",-i,0),this._add("Z")},t.prototype.closePath=function(){this._d.length>0&&this._add("Z")},t.prototype._add=function(t,e,i,n,o,r,a,s,l){for(var u=[],c=this._p,d=1;d<arguments.length;d++){var p=arguments[d];if(isNaN(p))return void(this._invalid=!0);u.push(Math.round(p*c)/c)}this._d.push(t+u.join(" ")),this._start="Z"===t},t.prototype.generateStr=function(){this._str=this._invalid?"":this._d.join(""),this._d=[]},t.prototype.getStr=function(){return this._str},t}(),Rr=Er,Vr="none",zr=Math.round;var Or=["lineCap","miterLimit","lineJoin"],Br=b(Or,(function(t){return"stroke-"+t.toLowerCase()}));function Gr(t,e,i,n){var o=null==e.opacity?1:e.opacity;if(i instanceof M)t("opacity",o);else{if(function(t){var e=t.fill;return null!=e&&e!==Vr}(e)){var r=I(e.fill);t("fill",r.color);var a=null!=e.fillOpacity?e.fillOpacity*r.opacity*o:r.opacity*o;(n||a<1)&&t("fill-opacity",a)}else t("fill",Vr);if(function(t){var e=t.stroke;return null!=e&&e!==Vr}(e)){var s=I(e.stroke);t("stroke",s.color);var l=e.strokeNoScale?i.getLineScale():1,u=l?(e.lineWidth||0)/l:0,c=null!=e.strokeOpacity?e.strokeOpacity*s.opacity*o:s.opacity*o,d=e.strokeFirst;if((n||1!==u)&&t("stroke-width",u),(n||d)&&t("paint-order",d?"stroke":"fill"),(n||c<1)&&t("stroke-opacity",c),e.lineDash){var p=A(i),h=p[0],g=p[1];h&&(g=zr(g||0),t("stroke-dasharray",h.join(",")),(g||n)&&t("stroke-dashoffset",g))}else n&&t("stroke-dasharray",Vr);for(var f=0;f<Or.length;f++){var y=Or[f];if(n||e[y]!==D[y]){var m=e[y]||D[y];m&&t(Br[f],m)}}}else n&&t("stroke",Vr)}}var Fr="http://www.w3.org/2000/svg",Wr="http://www.w3.org/1999/xlink";function Hr(t){return document.createElementNS(Fr,t)}function Ur(t,e,i,n,o){return{tag:t,attrs:i||{},children:n,text:o,key:e}}function jr(t,e){var i=(e=e||{}).newline?"\n":"";return function t(e){var n=e.children,o=e.tag,r=e.attrs,a=e.text;return function(t,e){var i=[];if(e)for(var n in e){var o=e[n],r=n;!1!==o&&(!0!==o&&null!=o&&(r+='="'+o+'"'),i.push(r))}return"<"+t+" "+i.join(" ")+">"}(o,r)+("style"!==o?C(a):a||"")+(n?""+i+b(n,(function(e){return t(e)})).join(i)+i:"")+("</"+o+">")}(t)}function Xr(t){return{zrId:t,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssClassIdx:0,cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function Yr(t,e,i,n){return Ur("svg","root",{width:t,height:e,xmlns:Fr,"xmlns:xlink":Wr,version:"1.1",baseProfile:"full",viewBox:!!n&&"0 0 "+t+" "+e},i)}var Zr={cubicIn:"0.32,0,0.67,0",cubicOut:"0.33,1,0.68,1",cubicInOut:"0.65,0,0.35,1",quadraticIn:"0.11,0,0.5,0",quadraticOut:"0.5,1,0.89,1",quadraticInOut:"0.45,0,0.55,1",quarticIn:"0.5,0,0.75,0",quarticOut:"0.25,1,0.5,1",quarticInOut:"0.76,0,0.24,1",quinticIn:"0.64,0,0.78,0",quinticOut:"0.22,1,0.36,1",quinticInOut:"0.83,0,0.17,1",sinusoidalIn:"0.12,0,0.39,0",sinusoidalOut:"0.61,1,0.88,1",sinusoidalInOut:"0.37,0,0.63,1",exponentialIn:"0.7,0,0.84,0",exponentialOut:"0.16,1,0.3,1",exponentialInOut:"0.87,0,0.13,1",circularIn:"0.55,0,1,0.45",circularOut:"0,0.55,0.45,1",circularInOut:"0.85,0,0.15,1"},qr="transform-origin";function Jr(t,e,i){var n=E({},t.shape);E(n,e),t.buildPath(i,n);var o=new Rr;return o.reset(z(t)),i.rebuildPath(o,1),o.generateStr(),o.getStr()}function Qr(t,e){var i=e.originX,n=e.originY;(i||n)&&(t[qr]=i+"px "+n+"px")}var Kr={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function $r(t,e){var i=e.zrId+"-ani-"+e.cssAnimIdx++;return e.cssAnims[i]=t,i}function ta(t){return N(t)?Zr[t]?"cubic-bezier("+Zr[t]+")":P(t)?t:"":""}function ea(t,e,i,n){var o=t.animators,r=o.length,a=[];if(t instanceof L){var s=function(t,e,i){var n,o,r=t.shape.paths,a={};if(h(r,(function(t){var e=Xr(i.zrId);e.animation=!0,ea(t,{},e,!0);var r=e.cssAnims,s=e.cssNodes,l=T(r),u=l.length;if(u){var c=r[o=l[u-1]];for(var d in c){var p=c[d];a[d]=a[d]||{d:""},a[d].d+=p.d||""}for(var h in s){var g=s[h].animation;g.indexOf(o)>=0&&(n=g)}}})),n){e.d=!1;var s=$r(a,i);return n.replace(o,s)}}(t,e,i);if(s)a.push(s);else if(!r)return}else if(!r)return;for(var l={},u=0;u<r;u++){var c=o[u],d=[c.getMaxTime()/1e3+"s"],p=ta(c.getClip().easing),g=c.getDelay();p?d.push(p):d.push("linear"),g&&d.push(g/1e3+"s"),c.getLoop()&&d.push("infinite");var f=d.join(" ");l[f]=l[f]||[f,[]],l[f][1].push(c)}function y(o){var r,a=o[1],s=a.length,l={},u={},c={};function d(t,e,i){for(var n=t.getTracks(),o=t.getMaxTime(),r=0;r<n.length;r++){var a=n[r];if(a.needsAnimate()){var s=a.keyframes,l=a.propName;if(i&&(l=i(l)),l)for(var u=0;u<s.length;u++){var c=s[u],d=Math.round(c.time/o*100)+"%",p=ta(c.easing),h=c.rawValue;(N(h)||O(h))&&(e[d]=e[d]||{},e[d][l]=c.rawValue,p&&(e[d]["animation-timing-function"]=p))}}}}for(var p=0;p<s;p++){(w=(b=a[p]).targetName)?"shape"===w&&d(b,u):!n&&d(b,l)}for(var h in l){var g={};k(g,t),E(g,l[h]);var f=R(g),y=l[h]["animation-timing-function"];c[h]=f?{transform:f}:{},Qr(c[h],g),y&&(c[h]["animation-timing-function"]=y)}var m=!0;for(var h in u){c[h]=c[h]||{};var v=!r;y=u[h]["animation-timing-function"];v&&(r=new V);var x=r.len();r.reset(),c[h].d=Jr(t,u[h],r);var _=r.len();if(!v&&x!==_){m=!1;break}y&&(c[h]["animation-timing-function"]=y)}if(!m)for(var h in c)delete c[h].d;if(!n)for(p=0;p<s;p++){var b,w;"style"===(w=(b=a[p]).targetName)&&d(b,c,(function(t){return Kr[t]}))}var M,I=T(c),A=!0;for(p=1;p<I.length;p++){var D=I[p-1],C=I[p];if(c[D][qr]!==c[C][qr]){A=!1;break}M=c[D][qr]}if(A&&M){for(var h in c)c[h][qr]&&delete c[h][qr];e[qr]=M}if(S(I,(function(t){return T(c[t]).length>0})).length)return $r(c,i)+" "+o[0]+" both"}for(var m in l){(s=y(l[m]))&&a.push(s)}if(a.length){var v=i.zrId+"-cls-"+i.cssClassIdx++;i.cssNodes["."+v]={animation:a.join(",")},e.class=v}}var ia=Math.round;function na(t){return t&&N(t.src)}function oa(t){return t&&Q(t.toDataURL)}function ra(t,e,i,n){Gr((function(o,r){var a="fill"===o||"stroke"===o;a&&rt(r)?fa(e,t,o,n):a&&at(r)?ya(i,t,o,n):t[o]=r}),e,i,!1),function(t,e,i){var n=t.style;if(lt(n)){var o=ut(t),r=i.shadowCache,a=r[o];if(!a){var s=t.getGlobalScale(),l=s[0],u=s[1];if(!l||!u)return;var c=n.shadowOffsetX||0,d=n.shadowOffsetY||0,p=n.shadowBlur,h=I(n.shadowColor),g=h.opacity,f=h.color,y=p/2/l+" "+p/2/u;a=i.zrId+"-s"+i.shadowIdx++,i.defs[a]=Ur("filter",a,{id:a,x:"-100%",y:"-100%",width:"300%",height:"300%"},[Ur("feDropShadow","",{dx:c/l,dy:d/u,stdDeviation:y,"flood-color":f,"flood-opacity":g})]),r[o]=a}e.filter=X(a)}}(i,t,n)}function aa(t){return w(t[0]-1)&&w(t[1])&&w(t[2])&&w(t[3]-1)}function sa(t,e,i){if(e&&(!function(t){return w(t[4])&&w(t[5])}(e)||!aa(e))){var n=i?10:1e4;t.transform=aa(e)?"translate("+ia(e[4]*n)/n+" "+ia(e[5]*n)/n+")":st(e)}}function la(t,e,i){for(var n=t.points,o=[],r=0;r<n.length;r++)o.push(ia(n[r][0]*i)/i),o.push(ia(n[r][1]*i)/i);e.points=o.join(" ")}function ua(t){return!t.smooth}var ca,da,pa={circle:[(ca=["cx","cy","r"],da=b(ca,(function(t){return"string"==typeof t?[t,t]:t})),function(t,e,i){for(var n=0;n<da.length;n++){var o=da[n],r=t[o[0]];null!=r&&(e[o[1]]=ia(r*i)/i)}})],polyline:[la,ua],polygon:[la,ua]};function ha(t,e){var i=t.style,n=t.shape,o=pa[t.type],r={},a=e.animation,s="path",l=t.style.strokePercent,u=e.compress&&z(t)||4;if(!o||e.willUpdate||o[1]&&!o[1](n)||a&&function(t){for(var e=t.animators,i=0;i<e.length;i++)if("shape"===e[i].targetName)return!0;return!1}(t)||l<1){var c=!t.path||t.shapeChanged();t.path||t.createPathProxy();var d=t.path;c&&(d.beginPath(),t.buildPath(d,t.shape),t.pathUpdated());var p=d.getVersion(),h=t,g=h.__svgPathBuilder;h.__svgPathVersion===p&&g&&l===h.__svgPathStrokePercent||(g||(g=h.__svgPathBuilder=new Rr),g.reset(u),d.rebuildPath(g,l),g.generateStr(),h.__svgPathVersion=p,h.__svgPathStrokePercent=l),r.d=g.getStr()}else{s=t.type;var f=Math.pow(10,u);o[0](n,r,f)}return sa(r,t.transform),ra(r,i,t,e),e.animation&&ea(t,r,e),Ur(s,t.id+"",r)}function ga(t,e){return t instanceof B?ha(t,e):t instanceof M?function(t,e){var i=t.style,n=i.image;if(n&&!N(n)&&(na(n)?n=n.src:oa(n)&&(n=n.toDataURL())),n){var o=i.x||0,r=i.y||0,a={href:n,width:i.width,height:i.height};return o&&(a.x=o),r&&(a.y=r),sa(a,t.transform),ra(a,i,t,e),e.animation&&ea(t,a,e),Ur("image",t.id+"",a)}}(t,e):t instanceof G?function(t,e){var i=t.style,n=i.text;if(null!=n&&(n+=""),n&&!isNaN(i.x)&&!isNaN(i.y)){var o=i.font||K,r=i.x||0,a=$(i.y||0,tt(o),i.textBaseline),s={"dominant-baseline":"central","text-anchor":et[i.textAlign]||i.textAlign};if(it(i)){var l="",u=i.fontStyle,c=nt(i.fontSize);if(!parseFloat(c))return;var d=i.fontFamily||ot,p=i.fontWeight;l+="font-size:"+c+";font-family:"+d+";",u&&"normal"!==u&&(l+="font-style:"+u+";"),p&&"normal"!==p&&(l+="font-weight:"+p+";"),s.style=l}else s.style="font: "+o;return n.match(/\s/)&&(s["xml:space"]="preserve"),r&&(s.x=r),a&&(s.y=a),sa(s,t.transform),ra(s,i,t,e),e.animation&&ea(t,s,e),Ur("text",t.id+"",s,void 0,n)}}(t,e):void 0}function fa(t,e,i,n){var o,r=t[i],a={gradientUnits:r.global?"userSpaceOnUse":"objectBoundingBox"};if(F(r))o="linearGradient",a.x1=r.x,a.y1=r.y,a.x2=r.x2,a.y2=r.y2;else{if(!W(r))return void U("Illegal gradient type.");o="radialGradient",a.cx=H(r.x,.5),a.cy=H(r.y,.5),a.r=H(r.r,.5)}for(var s=r.colorStops,l=[],u=0,c=s.length;u<c;++u){var d=100*j(s[u].offset)+"%",p=s[u].color,h=I(p),g=h.color,f=h.opacity,y={offset:d};y["stop-color"]=g,f<1&&(y["stop-opacity"]=f),l.push(Ur("stop",u+"",y))}var m=jr(Ur(o,"",a,l)),v=n.gradientCache,x=v[m];x||(x=n.zrId+"-g"+n.gradientIdx++,v[m]=x,a.id=x,n.defs[x]=Ur(o,x,a,l)),e[i]=X(x)}function ya(t,e,i,n){var o,r=t.style[i],a=t.getBoundingRect(),s={},l=r.repeat,u="no-repeat"===l,c="repeat-x"===l,d="repeat-y"===l;if(Y(r)){var p=r.imageWidth,h=r.imageHeight,g=void 0,f=r.image;if(N(f)?g=f:na(f)?g=f.src:oa(f)&&(g=f.toDataURL()),"undefined"==typeof Image){var y="Image width/height must been given explictly in svg-ssr renderer.";Z(p,y),Z(h,y)}else if(null==p||null==h){var m=function(t,e){if(t){var i=t.elm,n=p||e.width,o=h||e.height;"pattern"===t.tag&&(c?(o=1,n/=a.width):d&&(n=1,o/=a.height)),t.attrs.width=n,t.attrs.height=o,i&&(i.setAttribute("width",n),i.setAttribute("height",o))}},v=q(g,null,t,(function(t){u||m(S,t),m(o,t)}));v&&v.width&&v.height&&(p=p||v.width,h=h||v.height)}o=Ur("image","img",{href:g,width:p,height:h}),s.width=p,s.height=h}else r.svgElement&&(o=J(r.svgElement),s.width=r.svgWidth,s.height=r.svgHeight);if(o){var x,_;u?x=_=1:c?(_=1,x=s.width/a.width):d?(x=1,_=s.height/a.height):s.patternUnits="userSpaceOnUse",null==x||isNaN(x)||(s.width=x),null==_||isNaN(_)||(s.height=_);var b=R(r);b&&(s.patternTransform=b);var S=Ur("pattern","",s,[o]),w=jr(S),M=n.patternCache,I=M[w];I||(I=n.zrId+"-p"+n.patternIdx++,M[w]=I,s.id=I,S=n.defs[I]=Ur("pattern",I,s,[o])),e[i]=X(I)}}function ma(t,e,i){var n=i.clipPathCache,o=i.defs,r=n[t.id];if(!r){var a={id:r=i.zrId+"-c"+i.clipPathIdx++};n[t.id]=r,o[r]=Ur("clipPath",r,a,[ha(t,i)])}e["clip-path"]=X(r)}function va(t){return document.createTextNode(t)}function xa(t,e,i){t.insertBefore(e,i)}function _a(t,e){t.removeChild(e)}function ba(t,e){t.appendChild(e)}function Sa(t){return t.parentNode}function wa(t){return t.nextSibling}function Ma(t,e){t.textContent=e}var Ia=Ur("","");function Aa(t){return void 0===t}function Da(t){return void 0!==t}function Ta(t,e,i){for(var n={},o=e;o<=i;++o){var r=t[o].key;void 0!==r&&(null!=n[r]&&console.error("Duplicate key "+r),n[r]=o)}return n}function Ca(t,e){var i=t.key===e.key;return t.tag===e.tag&&i}function La(t){var e,i=t.children,n=t.tag;if(Da(n)){var o=t.elm=Hr(n);if(ka(Ia,t),ct(i))for(e=0;e<i.length;++e){var r=i[e];null!=r&&ba(o,La(r))}else Da(t.text)&&!dt(t.text)&&ba(o,va(t.text))}else t.elm=va(t.text);return t.elm}function Na(t,e,i,n,o){for(;n<=o;++n){var r=i[n];null!=r&&xa(t,La(r),e)}}function Pa(t,e,i,n){for(;i<=n;++i){var o=e[i];if(null!=o)if(Da(o.tag))_a(Sa(o.elm),o.elm);else _a(t,o.elm)}}function ka(t,e){var i,n=e.elm,o=t&&t.attrs||{},r=e.attrs||{};if(o!==r){for(i in r){var a=r[i];o[i]!==a&&(!0===a?n.setAttribute(i,""):!1===a?n.removeAttribute(i):120!==i.charCodeAt(0)?n.setAttribute(i,a):"xmlns:xlink"===i||"xmlns"===i?n.setAttributeNS("http://www.w3.org/2000/xmlns/",i,a):58===i.charCodeAt(3)?n.setAttributeNS("http://www.w3.org/XML/1998/namespace",i,a):58===i.charCodeAt(5)?n.setAttributeNS(Wr,i,a):n.setAttribute(i,a))}for(i in o)i in r||n.removeAttribute(i)}}function Ea(t,e){var i=e.elm=t.elm,n=t.children,o=e.children;t!==e&&(ka(t,e),Aa(e.text)?Da(n)&&Da(o)?n!==o&&function(t,e,i){for(var n,o,r,a=0,s=0,l=e.length-1,u=e[0],c=e[l],d=i.length-1,p=i[0],h=i[d];a<=l&&s<=d;)null==u?u=e[++a]:null==c?c=e[--l]:null==p?p=i[++s]:null==h?h=i[--d]:Ca(u,p)?(Ea(u,p),u=e[++a],p=i[++s]):Ca(c,h)?(Ea(c,h),c=e[--l],h=i[--d]):Ca(u,h)?(Ea(u,h),xa(t,u.elm,wa(c.elm)),u=e[++a],h=i[--d]):Ca(c,p)?(Ea(c,p),xa(t,c.elm,u.elm),c=e[--l],p=i[++s]):(Aa(n)&&(n=Ta(e,a,l)),Aa(o=n[p.key])||(r=e[o]).tag!==p.tag?xa(t,La(p),u.elm):(Ea(r,p),e[o]=void 0,xa(t,r.elm,u.elm)),p=i[++s]);(a<=l||s<=d)&&(a>l?Na(t,null==i[d+1]?null:i[d+1].elm,i,s,d):Pa(t,e,a,l))}(i,n,o):Da(o)?(Da(t.text)&&Ma(i,""),Na(i,null,o,0,o.length-1)):Da(n)?Pa(i,n,0,n.length-1):Da(t.text)&&Ma(i,""):t.text!==e.text&&(Da(n)&&Pa(i,n,0,n.length-1),Ma(i,e.text)))}var Ra=0,Va=function(){function t(t,e,i){if(this.type="svg",this.refreshHover=za("refreshHover"),this.configLayer=za("configLayer"),this.storage=e,this._opts=i=E({},i),this.root=t,this._id="zr"+Ra++,this._oldVNode=Yr(i.width,i.height),t&&!i.ssr){var n=this._viewport=document.createElement("div");n.style.cssText="position:relative;overflow:hidden";var o=this._svgDom=this._oldVNode.elm=Hr("svg");ka(null,this._oldVNode),n.appendChild(o),t.appendChild(n)}this.resize(i.width,i.height)}return t.prototype.getType=function(){return this.type},t.prototype.getViewportRoot=function(){return this._viewport},t.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},t.prototype.getSvgDom=function(){return this._svgDom},t.prototype.refresh=function(){if(this.root){var t=this.renderToVNode({willUpdate:!0});t.attrs.style="position:absolute;left:0;top:0;user-select:none",function(t,e){if(Ca(t,e))Ea(t,e);else{var i=t.elm,n=Sa(i);La(e),null!==n&&(xa(n,e.elm,wa(i)),Pa(n,[t],0,0))}}(this._oldVNode,t),this._oldVNode=t}},t.prototype.renderOneToVNode=function(t){return ga(t,Xr(this._id))},t.prototype.renderToVNode=function(t){t=t||{};var e=this.storage.getDisplayList(!0),i=this._width,n=this._height,o=Xr(this._id);o.animation=t.animation,o.willUpdate=t.willUpdate,o.compress=t.compress;var r=[],a=this._bgVNode=function(t,e,i,n){var o;if(i&&"none"!==i)if(o=Ur("rect","bg",{width:t,height:e,x:"0",y:"0",id:"0"}),rt(i))fa({fill:i},o.attrs,"fill",n);else if(at(i))ya({style:{fill:i},dirty:gt,getBoundingRect:function(){return{width:t,height:e}}},o.attrs,"fill",n);else{var r=I(i),a=r.color,s=r.opacity;o.attrs.fill=a,s<1&&(o.attrs["fill-opacity"]=s)}return o}(i,n,this._backgroundColor,o);a&&r.push(a);var s=t.compress?null:this._mainVNode=Ur("g","main",{},[]);this._paintList(e,o,s?s.children:r),s&&r.push(s);var l=b(T(o.defs),(function(t){return o.defs[t]}));if(l.length&&r.push(Ur("defs","defs",{},l)),t.animation){var u=function(t,e,i){var n=(i=i||{}).newline?"\n":"",o=" {"+n,r=n+"}",a=b(T(t),(function(e){return e+o+b(T(t[e]),(function(i){return i+":"+t[e][i]+";"})).join(n)+r})).join(n),s=b(T(e),(function(t){return"@keyframes "+t+o+b(T(e[t]),(function(i){return i+o+b(T(e[t][i]),(function(n){var o=e[t][i][n];return"d"===n&&(o='path("'+o+'")'),n+":"+o+";"})).join(n)+r})).join(n)+r})).join(n);return a||s?["<![CDATA[",a,s,"]]>"].join(n):""}(o.cssNodes,o.cssAnims,{newline:!0});if(u){var c=Ur("style","stl",{},[],u);r.push(c)}}return Yr(i,n,r,t.useViewBox)},t.prototype.renderToString=function(t){return t=t||{},jr(this.renderToVNode({animation:H(t.cssAnimation,!0),willUpdate:!1,compress:!0,useViewBox:H(t.useViewBox,!0)}),{newline:!0})},t.prototype.setBackgroundColor=function(t){this._backgroundColor=t},t.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},t.prototype._paintList=function(t,e,i){for(var n,o,r=t.length,a=[],s=0,l=0,u=0;u<r;u++){var c=t[u];if(!c.invisible){var d=c.__clipPaths,p=d&&d.length||0,h=o&&o.length||0,g=void 0;for(g=Math.max(p-1,h-1);g>=0&&(!d||!o||d[g]!==o[g]);g--);for(var f=h-1;f>g;f--)n=a[--s-1];for(var y=g+1;y<p;y++){var m={};ma(d[y],m,e);var v=Ur("g","clip-g-"+l++,m,[]);(n?n.children:i).push(v),a[s++]=v,n=v}o=d;var x=ga(c,e);x&&(n?n.children:i).push(x)}}},t.prototype.resize=function(t,e){var i=this._opts,n=this.root,o=this._viewport;if(null!=t&&(i.width=t),null!=e&&(i.height=e),n&&o&&(o.style.display="none",t=pt(n,0,i),e=pt(n,1,i),o.style.display=""),this._width!==t||this._height!==e){if(this._width=t,this._height=e,o){var r=o.style;r.width=t+"px",r.height=e+"px"}if(at(this._backgroundColor))this.refresh();else{var a=this._svgDom;a&&(a.setAttribute("width",t),a.setAttribute("height",e));var s=this._bgVNode&&this._bgVNode.elm;s&&(s.setAttribute("width",t),s.setAttribute("height",e))}}},t.prototype.getWidth=function(){return this._width},t.prototype.getHeight=function(){return this._height},t.prototype.dispose=function(){this.root&&(this.root.innerHTML=""),this._svgDom=this._viewport=this.storage=this._oldVNode=this._bgVNode=this._mainVNode=null},t.prototype.clear=function(){this._svgDom&&(this._svgDom.innerHTML=null),this._oldVNode=null},t.prototype.toDataURL=function(t){var e=this.renderToString(),i="data:image/svg+xml;";return t?(e=ht(e))&&i+"base64,"+e:i+"charset=UTF-8,"+encodeURIComponent(e)},t}();function za(t){return function(){U('In SVG mode painter not support method "'+t+'"')}}var Oa=Va;var Ba=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i.hasSymbolVisual=!0,i}return p(e,t),e.prototype.getInitialData=function(t,e){return ft(null,this,{useEncodeDefaulter:!0})},e.prototype.getProgressive=function(){var t=this.option.progressive;return null==t?this.option.large?5e3:this.get("progressive"):t},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?1e4:this.get("progressiveThreshold"):t},e.prototype.brushSelector=function(t,e,i){return i.point(e.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"],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:"#212121"}},universalTransition:{divideShape:"clone"}},e}(yt),Ga=Ba,Fa=function(){},Wa=function(t){function e(e){var i=t.call(this,e)||this;return i._off=0,i.hoverDataIdx=-1,i}return p(e,t),e.prototype.getDefaultShape=function(){return new Fa},e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.buildPath=function(t,e){var i,n=e.points,o=e.size,r=this.symbolProxy,a=r.shape,s=t.getContext?t.getContext():t,l=s&&o[0]<4,u=this.softClipShape;if(l)this._ctx=s;else{for(this._ctx=null,i=this._off;i<n.length;){var c=n[i++],d=n[i++];isNaN(c)||isNaN(d)||(u&&!u.contain(c,d)||(a.x=c-o[0]/2,a.y=d-o[1]/2,a.width=o[0],a.height=o[1],r.buildPath(t,a,!0)))}this.incremental&&(this._off=i,this.notClear=!0)}},e.prototype.afterBrush=function(){var t,e=this.shape,i=e.points,n=e.size,o=this._ctx,r=this.softClipShape;if(o){for(t=this._off;t<i.length;){var a=i[t++],s=i[t++];isNaN(a)||isNaN(s)||(r&&!r.contain(a,s)||o.fillRect(a-n[0]/2,s-n[1]/2,n[0],n[1]))}this.incremental&&(this._off=t,this.notClear=!0)}},e.prototype.findDataIndex=function(t,e){for(var i=this.shape,n=i.points,o=i.size,r=Math.max(o[0],4),a=Math.max(o[1],4),s=n.length/2-1;s>=0;s--){var l=2*s,u=n[l]-r/2,c=n[l+1]-a/2;if(t>=u&&e>=c&&t<=u+r&&e<=c+a)return s}return-1},e.prototype.contain=function(t,e){var i=this.transformCoordToLocal(t,e),n=this.getBoundingRect();return t=i[0],e=i[1],n.contain(t,e)?(this.hoverDataIdx=this.findDataIndex(t,e))>=0:(this.hoverDataIdx=-1,!1)},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var e=this.shape,i=e.points,n=e.size,o=n[0],r=n[1],a=1/0,s=1/0,l=-1/0,u=-1/0,c=0;c<i.length;){var d=i[c++],p=i[c++];a=Math.min(d,a),l=Math.max(d,l),s=Math.min(p,s),u=Math.max(p,u)}t=this._rect=new g(a-o/2,s-r/2,l-a+o,u-s+r)}return t},e}(B),Ha=function(){function t(){this.group=new mt}return t.prototype.updateData=function(t,e){this._clear();var i=this._create();i.setShape({points:t.getLayout("points")}),this._setCommon(i,t,e)},t.prototype.updateLayout=function(t){var e=t.getLayout("points");this.group.eachChild((function(t){if(null!=t.startIndex){var i=2*(t.endIndex-t.startIndex),n=4*t.startIndex*2;e=new Float32Array(e.buffer,n,i)}t.setShape("points",e),t.reset()}))},t.prototype.incrementalPrepareUpdate=function(t){this._clear()},t.prototype.incrementalUpdate=function(t,e,i){var n=this._newAdded[0],o=e.getLayout("points"),r=n&&n.shape.points;if(r&&r.length<2e4){var a=r.length,s=new Float32Array(a+o.length);s.set(r),s.set(o,a),n.endIndex=t.end,n.setShape({points:s})}else{this._newAdded=[];var l=this._create();l.startIndex=t.start,l.endIndex=t.end,l.incremental=!0,l.setShape({points:o}),this._setCommon(l,e,i)}},t.prototype.eachRendered=function(t){this._newAdded[0]&&t(this._newAdded[0])},t.prototype._create=function(){var t=new Wa({cursor:"default"});return t.ignoreCoarsePointer=!0,this.group.add(t),this._newAdded.push(t),t},t.prototype._setCommon=function(t,e,i){var n=e.hostModel;i=i||{};var o=e.getVisual("symbolSize");t.setShape("size",o instanceof Array?o:[o,o]),t.softClipShape=i.clipShape||null,t.symbolProxy=vt(e.getVisual("symbol"),0,0,0,0),t.setColor=t.symbolProxy.setColor;var r=t.shape.size[0]<4;t.useStyle(n.getModel("itemStyle").getItemStyle(r?["color","shadowBlur","shadowColor"]:["color"]));var a=e.getVisual("style"),s=a&&a.fill;s&&t.setColor(s);var l=xt(t);l.seriesIndex=n.seriesIndex,t.on("mousemove",(function(e){l.dataIndex=null;var i=t.hoverDataIdx;i>=0&&(l.dataIndex=i+(t.startIndex||0))}))},t.prototype.remove=function(){this._clear()},t.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},t}(),Ua=Ha,ja=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return p(e,t),e.prototype.render=function(t,e,i){var n=t.getData();this._updateSymbolDraw(n,t).updateData(n,{clipShape:this._getClipShape(t)}),this._finished=!0},e.prototype.incrementalPrepareRender=function(t,e,i){var n=t.getData();this._updateSymbolDraw(n,t).incrementalPrepareUpdate(n),this._finished=!1},e.prototype.incrementalRender=function(t,e,i){this._symbolDraw.incrementalUpdate(t,e.getData(),{clipShape:this._getClipShape(e)}),this._finished=t.end===e.getData().count()},e.prototype.updateTransform=function(t,e,i){var n=t.getData();if(this.group.dirty(),!this._finished||n.count()>1e4)return{update:!0};var o=_t("").reset(t,e,i);o.progress&&o.progress({start:0,end:n.count(),count:n.count()},n),this._symbolDraw.updateLayout(n)},e.prototype.eachRendered=function(t){this._symbolDraw&&this._symbolDraw.eachRendered(t)},e.prototype._getClipShape=function(t){var e=t.coordinateSystem,i=e&&e.getArea&&e.getArea();return t.get("clip",!0)?i:null},e.prototype._updateSymbolDraw=function(t,e){var i=this._symbolDraw,n=e.pipelineContext.large;return i&&n===this._isLargeDraw||(i&&i.remove(),i=this._symbolDraw=n?new Ua:new bt,this._isLargeDraw=n,this.group.removeAll()),this.group.add(i.group),i},e.prototype.remove=function(t,e){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},e.prototype.dispose=function(){},e.type="scatter",e}(St),Xa=ja;function Ya(t){t.eachSeriesByType("radar",(function(t){var e=t.getData(),i=[],n=t.coordinateSystem;if(n){var o=n.getIndicatorAxes();h(o,(function(t,r){e.each(e.mapDimension(o[r].dim),(function(t,e){i[e]=i[e]||[];var o=n.dataToPoint(t,r);i[e][r]=Za(o)?o:qa(n)}))})),e.each((function(t){var o=It(i[t],(function(t){return Za(t)}))||qa(n);i[t].push(o.slice()),e.setItemLayout(t,i[t])}))}}))}function Za(t){return!isNaN(t[0])&&!isNaN(t[1])}function qa(t){return[t.cx,t.cy]}function Ja(t){var e=t.polar;if(e){ct(e)||(e=[e]);var i=[];h(e,(function(e,n){e.indicator?(e.type&&!e.shape&&(e.shape=e.type),t.radar=t.radar||[],ct(t.radar)||(t.radar=[t.radar]),t.radar.push(e)):i.push(e)})),t.polar=i}h(t.series,(function(t){t&&"radar"===t.type&&t.polarIndex&&(t.radarIndex=t.polarIndex)}))}var Qa=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return p(e,t),e.prototype.render=function(t,e,i){var n=t.coordinateSystem,o=this.group,r=t.getData(),a=this._data;function s(t,e){var i=t.getItemVisual(e,"symbol")||"circle";if("none"!==i){var n=zt(t.getItemVisual(e,"symbolSize")),o=vt(i,-1,-1,2,2),r=t.getItemVisual(e,"symbolRotate")||0;return o.attr({style:{strokeNoScale:!0},z2:100,scaleX:n[0]/2,scaleY:n[1]/2,rotation:r*Math.PI/180||0}),o}}function l(e,i,n,o,r,a){n.removeAll();for(var l=0;l<i.length-1;l++){var u=s(o,r);u&&(u.__dimIdx=l,e[l]?(u.setPosition(e[l]),Vt[a?"initProps":"updateProps"](u,{x:i[l][0],y:i[l][1]},t,r)):u.setPosition(i[l]),n.add(u))}}function u(t){return b(t,(function(t){return[n.cx,n.cy]}))}r.diff(a).add((function(e){var i=r.getItemLayout(e);if(i){var n=new At,o=new Dt,a={shape:{points:i}};n.shape.points=u(i),o.shape.points=u(i),Tt(n,a,t,e),Tt(o,a,t,e);var s=new mt,c=new mt;s.add(o),s.add(n),s.add(c),l(o.shape.points,i,c,r,e,!0),r.setItemGraphicEl(e,s)}})).update((function(e,i){var n=a.getItemGraphicEl(i),o=n.childAt(0),s=n.childAt(1),u=n.childAt(2),c={shape:{points:r.getItemLayout(e)}};c.shape.points&&(l(o.shape.points,c.shape.points,u,r,e,!1),Ct(s),Ct(o),Lt(o,c,t),Lt(s,c,t),r.setItemGraphicEl(e,n))})).remove((function(t){o.remove(a.getItemGraphicEl(t))})).execute(),r.eachItemGraphicEl((function(t,e){var i=r.getItemModel(e),n=t.childAt(0),a=t.childAt(1),s=t.childAt(2),l=r.getItemVisual(e,"style"),u=l.fill;o.add(t),n.useStyle(Nt(i.getModel("lineStyle").getLineStyle(),{fill:"none",stroke:u})),Pt(n,i,"lineStyle"),Pt(a,i,"areaStyle");var c=i.getModel("areaStyle"),d=c.isEmpty()&&c.parentModel.isEmpty();a.ignore=d,h(["emphasis","select","blur"],(function(t){var e=i.getModel([t,"areaStyle"]),n=e.isEmpty()&&e.parentModel.isEmpty();a.ensureState(t).ignore=n&&d})),a.useStyle(Nt(c.getAreaStyle(),{fill:u,opacity:.7,decal:l.decal}));var p=i.getModel("emphasis"),g=p.getModel("itemStyle").getItemStyle();s.eachChild((function(t){if(t instanceof M){var n=t.style;t.useStyle(E({image:n.image,x:n.x,y:n.y,width:n.width,height:n.height},l))}else t.useStyle(l),t.setColor(u),t.style.strokeNoScale=!0;t.ensureState("emphasis").style=J(g);var o=r.getStore().get(r.getDimensionIndex(t.__dimIdx),e);(null==o||isNaN(o))&&(o=""),kt(t,Et(i),{labelFetcher:r.hostModel,labelDataIndex:e,labelDimIndex:t.__dimIdx,defaultText:o,inheritColor:u,defaultOpacity:l.opacity})})),Rt(t,p.get("focus"),p.get("blurScope"),p.get("disabled"))})),this._data=r},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.type="radar",e}(St),Ka=Qa,$a=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i.hasSymbolVisual=!0,i}return p(e,t),e.prototype.init=function(e){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new Ot(Bt(this.getData,this),Bt(this.getRawData,this))},e.prototype.getInitialData=function(t,e){return Gt(this,{generateCoord:"indicator_",generateCoordCount:1/0})},e.prototype.formatTooltip=function(t,e,i){var n=this.getData(),o=this.coordinateSystem.getIndicatorAxes(),r=this.getData().getName(t),a=""===r?this.name:r,s=Ft(this,t);return Wt("section",{header:a,sortBlocks:!0,blocks:b(o,(function(e){var i=n.get(n.mapDimension(e.dim),t);return Wt("nameValue",{markerType:"subItem",markerColor:s,name:e.name,value:i,sortParam:i})}))})},e.prototype.getTooltipPosition=function(t){if(null!=t)for(var e=this.getData(),i=this.coordinateSystem,n=e.getValues(b(i.dimensions,(function(t){return e.mapDimension(t)})),t),o=0,r=n.length;o<r;o++)if(!isNaN(n[o])){var a=i.getIndicatorAxes();return i.coordToPoint(a[o].dataToCoord(n[o]),o)}},e.type="series.radar",e.dependencies=["radar"],e.defaultOption={z:2,colorBy:"data",coordinateSystem:"radar",legendHoverLink:!0,radarIndex:0,lineStyle:{width:2,type:"solid",join:"round"},label:{position:"top"},symbolSize:8},e}(yt),ts=$a,es=Zt.value;function is(t,e){return Nt({show:e},t)}var ns,os=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return p(e,t),e.prototype.optionUpdated=function(){var t=this.get("boundaryGap"),e=this.get("splitNumber"),i=this.get("scale"),n=this.get("axisLine"),o=this.get("axisTick"),r=this.get("axisLabel"),a=this.get("axisName"),s=this.get(["axisName","show"]),l=this.get(["axisName","formatter"]),u=this.get("axisNameGap"),c=this.get("triggerEvent"),d=b(this.get("indicator")||[],(function(d){null!=d.max&&d.max>0&&!d.min?d.min=0:null!=d.min&&d.min<0&&!d.max&&(d.max=0);var p=a;null!=d.color&&(p=Nt({color:d.color},a));var h=Ht(J(d),{boundaryGap:t,splitNumber:e,scale:i,axisLine:n,axisTick:o,axisLabel:r,name:d.text,showName:s,nameLocation:"end",nameGap:u,nameTextStyle:p,triggerEvent:c},!1);if(N(l)){var g=h.name;h.name=l.replace("{value}",null!=g?g:"")}else Q(l)&&(h.name=l(h.name,h));var f=new Ut(h,null,this.ecModel);return jt(f,Xt.prototype),f.mainType="radar",f.componentIndex=this.componentIndex,f}),this);this._indicatorModels=d},e.prototype.getIndicatorModels=function(){return this._indicatorModels},e.type="radar",e.defaultOption={z:0,center:["50%","50%"],radius:"75%",startAngle:90,axisName:{show:!0},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:Ht({lineStyle:{color:"#bbb"}},es.axisLine),axisLabel:is(es.axisLabel,!1),axisTick:is(es.axisTick,!1),splitLine:is(es.splitLine,!0),splitArea:is(es.splitArea,!0),indicator:[]},e}(Yt),rs=os,as=["axisLine","axisTickLabel","axisName"],ss=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return p(e,t),e.prototype.render=function(t,e,i){this.group.removeAll(),this._buildAxes(t),this._buildSplitLineAndArea(t)},e.prototype._buildAxes=function(t){var e=t.coordinateSystem,i=e.getIndicatorAxes(),n=b(i,(function(t){var i=t.model.get("showName")?t.name:"";return new qt(t.model,{axisName:i,position:[e.cx,e.cy],rotation:t.angle,labelDirection:-1,tickDirection:-1,nameDirection:1})}));h(n,(function(t){h(as,t.add,t),this.group.add(t.getGroup())}),this)},e.prototype._buildSplitLineAndArea=function(t){var e=t.coordinateSystem,i=e.getIndicatorAxes();if(i.length){var n=t.get("shape"),o=t.getModel("splitLine"),r=t.getModel("splitArea"),a=o.getModel("lineStyle"),s=r.getModel("areaStyle"),l=o.get("show"),u=r.get("show"),c=a.get("color"),d=s.get("color"),p=ct(c)?c:[c],g=ct(d)?d:[d],f=[],y=[];if("circle"===n)for(var m=i[0].getTicksCoords(),v=e.cx,x=e.cy,_=0;_<m.length;_++){if(l)f[C(f,p,_)].push(new Jt({shape:{cx:v,cy:x,r:m[_].coord}}));if(u&&_<m.length-1)y[C(y,g,_)].push(new Qt({shape:{cx:v,cy:x,r0:m[_].coord,r:m[_+1].coord}}))}else{var S,w=b(i,(function(t,i){var n=t.getTicksCoords();return S=null==S?n.length-1:Math.min(n.length-1,S),b(n,(function(t){return e.coordToPoint(t.coord,i)}))})),M=[];for(_=0;_<=S;_++){for(var I=[],A=0;A<i.length;A++)I.push(w[A][_]);if(I[0]?I.push(I[0].slice()):console.error("Can't draw value axis "+_),l)f[C(f,p,_)].push(new Dt({shape:{points:I}}));if(u&&M)y[C(y,g,_-1)].push(new At({shape:{points:I.concat(M)}}));M=I.slice().reverse()}}var D=a.getLineStyle(),T=s.getAreaStyle();h(y,(function(t,e){this.group.add(Kt(t,{style:Nt({stroke:"none",fill:g[e%g.length]},T),silent:!0}))}),this),h(f,(function(t,e){this.group.add(Kt(t,{style:Nt({fill:"none",stroke:p[e%p.length]},D),silent:!0}))}),this)}function C(t,e,i){var n=i%e.length;return t[n]=t[n]||[],n}},e.type="radar",e}($t),ls=ss,us=function(t){function e(e,i,n){var o=t.call(this,e,i,n)||this;return o.type="value",o.angle=0,o.name="",o}return p(e,t),e}(te),cs=us,ds=function(){function t(t,e,i){this.dimensions=[],this._model=t,this._indicatorAxes=b(t.getIndicatorModels(),(function(t,e){var i="indicator_"+e,n=new cs(i,new ie);return n.name=t.get("name"),n.model=t,t.axis=n,this.dimensions.push(i),n}),this),this.resize(t,i)}return t.prototype.getIndicatorAxes=function(){return this._indicatorAxes},t.prototype.dataToPoint=function(t,e){var i=this._indicatorAxes[e];return this.coordToPoint(i.dataToCoord(t),e)},t.prototype.coordToPoint=function(t,e){var i=this._indicatorAxes[e].angle;return[this.cx+t*Math.cos(i),this.cy-t*Math.sin(i)]},t.prototype.pointToData=function(t){var e=t[0]-this.cx,i=t[1]-this.cy,n=Math.sqrt(e*e+i*i);e/=n,i/=n;for(var o,r=Math.atan2(-i,e),a=1/0,s=-1,l=0;l<this._indicatorAxes.length;l++){var u=this._indicatorAxes[l],c=Math.abs(r-u.angle);c<a&&(o=u,s=l,a=c)}return[s,+(o&&o.coordToData(n))]},t.prototype.resize=function(t,e){var i=t.get("center"),n=e.getWidth(),o=e.getHeight(),r=Math.min(n,o)/2;this.cx=ee(i[0],n),this.cy=ee(i[1],o),this.startAngle=t.get("startAngle")*Math.PI/180;var a=t.get("radius");(N(a)||O(a))&&(a=[0,a]),this.r0=ee(a[0],r),this.r=ee(a[1],r),h(this._indicatorAxes,(function(t,e){t.setExtent(this.r0,this.r);var i=this.startAngle+e*Math.PI*2/this._indicatorAxes.length;i=Math.atan2(Math.sin(i),Math.cos(i)),t.angle=i}),this)},t.prototype.update=function(t,e){var i=this._indicatorAxes,n=this._model;h(i,(function(t){t.scale.setExtent(1/0,-1/0)})),t.eachSeriesByType("radar",(function(e,o){if("radar"===e.get("coordinateSystem")&&t.getComponent("radar",e.get("radarIndex"))===n){var r=e.getData();h(i,(function(t){t.scale.unionExtentFromData(r,r.mapDimension(t.dim))}))}}),this);var o=n.get("splitNumber"),r=new ie;r.setExtent(0,o),r.setInterval(1),h(i,(function(t,e){ne(t.scale,t.model,r)}))},t.prototype.convertToPixel=function(t,e,i){return console.warn("Not implemented."),null},t.prototype.convertFromPixel=function(t,e,i){return console.warn("Not implemented."),null},t.prototype.containPoint=function(t){return console.warn("Not implemented."),!1},t.create=function(e,i){var n=[];return e.eachComponent("radar",(function(o){var r=new t(o,e,i);n.push(r),o.coordinateSystem=r})),e.eachSeriesByType("radar",(function(t){"radar"===t.get("coordinateSystem")&&(t.coordinateSystem=n[t.get("radarIndex")||0])})),n},t.dimensions=[],t}(),ps=ds;function hs(t){t.registerCoordinateSystem("radar",ps),t.registerComponentModel(rs),t.registerComponentView(ls),t.registerVisual({seriesType:"radar",reset:function(t){var e=t.getData();e.each((function(t){e.setItemVisual(t,"legendIcon","roundRect")})),e.setVisual("legendIcon","roundRect")}})}function gs(t,e,i){var n=t.target;n.x+=e,n.y+=i,n.dirty()}function fs(t,e,i,n){var o=t.target,r=t.zoomLimit,a=t.zoom=t.zoom||1;if(a*=e,r){var s=r.min||0,l=r.max||1/0;a=Math.max(Math.min(l,a),s)}var u=a/t.zoom;t.zoom=a,o.x-=(i-o.x)*(u-1),o.y-=(n-o.y)*(u-1),o.scaleX*=u,o.scaleY*=u,o.dirty()}function ys(t){N(t)&&(t=(new DOMParser).parseFromString(t,"text/xml"));var e=t;for(9===e.nodeType&&(e=e.firstChild);"svg"!==e.nodeName.toLowerCase()||1!==e.nodeType;)e=e.nextSibling;return e}var ms={fill:"fill",stroke:"stroke","stroke-width":"lineWidth",opacity:"opacity","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-miterlimit":"miterLimit","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","text-anchor":"textAlign",visibility:"visibility",display:"display"},vs=T(ms),xs={"alignment-baseline":"textBaseline","stop-color":"stopColor"},_s=T(xs),bs=function(){function t(){this._defs={},this._root=null}return t.prototype.parse=function(t,e){e=e||{};var i=ys(t);if(!i)throw new Error("Illegal svg");this._defsUsePending=[];var n=new mt;this._root=n;var o=[],r=i.getAttribute("viewBox")||"",a=parseFloat(i.getAttribute("width")||e.width),s=parseFloat(i.getAttribute("height")||e.height);isNaN(a)&&(a=null),isNaN(s)&&(s=null),Ds(i,n,null,!0,!1);for(var l,u,c=i.firstChild;c;)this._parseNode(c,n,o,null,!1,!1),c=c.nextSibling;if(function(t,e){for(var i=0;i<e.length;i++){var n=e[i];n[0].style[n[1]]=t[n[2]]}}(this._defs,this._defsUsePending),this._defsUsePending=[],r){var d=Ns(r);d.length>=4&&(l={x:parseFloat(d[0]||0),y:parseFloat(d[1]||0),width:parseFloat(d[2]),height:parseFloat(d[3])})}if(l&&null!=a&&null!=s&&(u=Vs(l,{x:0,y:0,width:a,height:s}),!e.ignoreViewBox)){var p=n;(n=new mt).add(p),p.scaleX=p.scaleY=u.scale,p.x=u.x,p.y=u.y}return e.ignoreRootClip||null==a||null==s||n.setClipPath(new re({shape:{x:0,y:0,width:a,height:s}})),{root:n,width:a,height:s,viewBoxRect:l,viewBoxTransform:u,named:o}},t.prototype._parseNode=function(t,e,i,n,o,r){var a,s=t.nodeName.toLowerCase(),l=n;if("defs"===s&&(o=!0),"text"===s&&(r=!0),"defs"===s||"switch"===s)a=e;else{if(!o){var u=ns[s];if(u&&ae(ns,s)){a=u.call(this,t,e);var c=t.getAttribute("name");if(c){var d={name:c,namedFrom:null,svgNodeTagLower:s,el:a};i.push(d),"g"===s&&(l=d)}else n&&i.push({name:n.name,namedFrom:n,svgNodeTagLower:s,el:a});e.add(a)}}var p=Ss[s];if(p&&ae(Ss,s)){var h=p.call(this,t),g=t.getAttribute("id");g&&(this._defs[g]=h)}}if(a&&a.isGroup)for(var f=t.firstChild;f;)1===f.nodeType?this._parseNode(f,a,i,l,o,r):3===f.nodeType&&r&&this._parseText(f,a),f=f.nextSibling},t.prototype._parseText=function(t,e){var i=new G({style:{text:t.textContent},silent:!0,x:this._textX||0,y:this._textY||0});Is(e,i),Ds(t,i,this._defsUsePending,!1,!1),function(t,e){var i=e.__selfStyle;if(i){var n=i.textBaseline,o=n;n&&"auto"!==n?"baseline"===n?o="alphabetic":"before-edge"===n||"text-before-edge"===n?o="top":"after-edge"===n||"text-after-edge"===n?o="bottom":"central"!==n&&"mathematical"!==n||(o="middle"):o="alphabetic",t.style.textBaseline=o}var r=e.__inheritedStyle;if(r){var a=r.textAlign,s=a;a&&("middle"===a&&(s="center"),t.style.textAlign=s)}}(i,e);var n=i.style,o=n.fontSize;o&&o<9&&(n.fontSize=9,i.scaleX*=o/9,i.scaleY*=o/9);var r=(n.fontSize||n.fontFamily)&&[n.fontStyle,n.fontWeight,(n.fontSize||12)+"px",n.fontFamily||"sans-serif"].join(" ");n.font=r;var a=i.getBoundingRect();return this._textX+=a.width,e.add(i),i},t.internalField=void(ns={g:function(t,e){var i=new mt;return Is(e,i),Ds(t,i,this._defsUsePending,!1,!1),i},rect:function(t,e){var i=new re;return Is(e,i),Ds(t,i,this._defsUsePending,!1,!1),i.setShape({x:parseFloat(t.getAttribute("x")||"0"),y:parseFloat(t.getAttribute("y")||"0"),width:parseFloat(t.getAttribute("width")||"0"),height:parseFloat(t.getAttribute("height")||"0")}),i.silent=!0,i},circle:function(t,e){var i=new Jt;return Is(e,i),Ds(t,i,this._defsUsePending,!1,!1),i.setShape({cx:parseFloat(t.getAttribute("cx")||"0"),cy:parseFloat(t.getAttribute("cy")||"0"),r:parseFloat(t.getAttribute("r")||"0")}),i.silent=!0,i},line:function(t,e){var i=new se;return Is(e,i),Ds(t,i,this._defsUsePending,!1,!1),i.setShape({x1:parseFloat(t.getAttribute("x1")||"0"),y1:parseFloat(t.getAttribute("y1")||"0"),x2:parseFloat(t.getAttribute("x2")||"0"),y2:parseFloat(t.getAttribute("y2")||"0")}),i.silent=!0,i},ellipse:function(t,e){var i=new le;return Is(e,i),Ds(t,i,this._defsUsePending,!1,!1),i.setShape({cx:parseFloat(t.getAttribute("cx")||"0"),cy:parseFloat(t.getAttribute("cy")||"0"),rx:parseFloat(t.getAttribute("rx")||"0"),ry:parseFloat(t.getAttribute("ry")||"0")}),i.silent=!0,i},polygon:function(t,e){var i,n=t.getAttribute("points");n&&(i=As(n));var o=new At({shape:{points:i||[]},silent:!0});return Is(e,o),Ds(t,o,this._defsUsePending,!1,!1),o},polyline:function(t,e){var i,n=t.getAttribute("points");n&&(i=As(n));var o=new Dt({shape:{points:i||[]},silent:!0});return Is(e,o),Ds(t,o,this._defsUsePending,!1,!1),o},image:function(t,e){var i=new M;return Is(e,i),Ds(t,i,this._defsUsePending,!1,!1),i.setStyle({image:t.getAttribute("xlink:href")||t.getAttribute("href"),x:+t.getAttribute("x"),y:+t.getAttribute("y"),width:+t.getAttribute("width"),height:+t.getAttribute("height")}),i.silent=!0,i},text:function(t,e){var i=t.getAttribute("x")||"0",n=t.getAttribute("y")||"0",o=t.getAttribute("dx")||"0",r=t.getAttribute("dy")||"0";this._textX=parseFloat(i)+parseFloat(o),this._textY=parseFloat(n)+parseFloat(r);var a=new mt;return Is(e,a),Ds(t,a,this._defsUsePending,!1,!0),a},tspan:function(t,e){var i=t.getAttribute("x"),n=t.getAttribute("y");null!=i&&(this._textX=parseFloat(i)),null!=n&&(this._textY=parseFloat(n));var o=t.getAttribute("dx")||"0",r=t.getAttribute("dy")||"0",a=new mt;return Is(e,a),Ds(t,a,this._defsUsePending,!1,!0),this._textX+=parseFloat(o),this._textY+=parseFloat(r),a},path:function(t,e){var i=t.getAttribute("d")||"",n=ue(i);return Is(e,n),Ds(t,n,this._defsUsePending,!1,!1),n.silent=!0,n}}),t}(),Ss={lineargradient:function(t){var e=parseInt(t.getAttribute("x1")||"0",10),i=parseInt(t.getAttribute("y1")||"0",10),n=parseInt(t.getAttribute("x2")||"10",10),o=parseInt(t.getAttribute("y2")||"0",10),r=new ce(e,i,n,o);return ws(t,r),Ms(t,r),r},radialgradient:function(t){var e=parseInt(t.getAttribute("cx")||"0",10),i=parseInt(t.getAttribute("cy")||"0",10),n=parseInt(t.getAttribute("r")||"0",10),o=new de(e,i,n);return ws(t,o),Ms(t,o),o}};function ws(t,e){"userSpaceOnUse"===t.getAttribute("gradientUnits")&&(e.global=!0)}function Ms(t,e){for(var i=t.firstChild;i;){if(1===i.nodeType&&"stop"===i.nodeName.toLocaleLowerCase()){var n=i.getAttribute("offset"),o=void 0;o=n&&n.indexOf("%")>0?parseInt(n,10)/100:n?parseFloat(n):0;var r={};Rs(i,r,r);var a=r.stopColor||i.getAttribute("stop-color")||"#000000";e.colorStops.push({offset:o,color:a})}i=i.nextSibling}}function Is(t,e){t&&t.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),Nt(e.__inheritedStyle,t.__inheritedStyle))}function As(t){for(var e=Ns(t),i=[],n=0;n<e.length;n+=2){var o=parseFloat(e[n]),r=parseFloat(e[n+1]);i.push([o,r])}return i}function Ds(t,e,i,n,o){var r=e,a=r.__inheritedStyle=r.__inheritedStyle||{},s={};1===t.nodeType&&(function(t,e){var i=t.getAttribute("transform");if(i){i=i.replace(/,/g," ");var n=[],o=null;i.replace(Ps,(function(t,e,i){return n.push(e,i),""}));for(var r=n.length-1;r>0;r-=2){var a=n[r],s=n[r-1],l=Ns(a);switch(o=o||ye(),s){case"translate":fe(o,o,[parseFloat(l[0]),parseFloat(l[1]||"0")]);break;case"scale":ge(o,o,[parseFloat(l[0]),parseFloat(l[1]||l[0])]);break;case"rotate":he(o,o,-parseFloat(l[0])*ks);break;case"skewX":var u=Math.tan(parseFloat(l[0])*ks);y(o,[1,0,u,1,0,0],o);break;case"skewY":var c=Math.tan(parseFloat(l[0])*ks);y(o,[1,c,0,1,0,0],o);break;case"matrix":o[0]=parseFloat(l[0]),o[1]=parseFloat(l[1]),o[2]=parseFloat(l[2]),o[3]=parseFloat(l[3]),o[4]=parseFloat(l[4]),o[5]=parseFloat(l[5])}}e.setLocalTransform(o)}}(t,e),Rs(t,a,s),n||function(t,e,i){for(var n=0;n<vs.length;n++){var o=vs[n];null!=(r=t.getAttribute(o))&&(e[ms[o]]=r)}for(n=0;n<_s.length;n++){var r;o=_s[n];null!=(r=t.getAttribute(o))&&(i[xs[o]]=r)}}(t,a,s)),r.style=r.style||{},null!=a.fill&&(r.style.fill=Cs(r,"fill",a.fill,i)),null!=a.stroke&&(r.style.stroke=Cs(r,"stroke",a.stroke,i)),h(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],(function(t){null!=a[t]&&(r.style[t]=parseFloat(a[t]))})),h(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign"],(function(t){null!=a[t]&&(r.style[t]=a[t])})),o&&(r.__selfStyle=s),a.lineDash&&(r.style.lineDash=b(Ns(a.lineDash),(function(t){return parseFloat(t)}))),"hidden"!==a.visibility&&"collapse"!==a.visibility||(r.invisible=!0),"none"===a.display&&(r.ignore=!0)}var Ts=/^url\(\s*#(.*?)\)/;function Cs(t,e,i,n){var o=i&&i.match(Ts);if(!o)return"none"===i&&(i=null),i;var r=pe(o[1]);n.push([t,e,r])}var Ls=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function Ns(t){return t.match(Ls)||[]}var Ps=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.eE,]*)\)/g,ks=Math.PI/180;var Es=/([^\s:;]+)\s*:\s*([^:;]+)/g;function Rs(t,e,i){var n,o=t.getAttribute("style");if(o)for(Es.lastIndex=0;null!=(n=Es.exec(o));){var r=n[1],a=ae(ms,r)?ms[r]:null;a&&(e[a]=n[2]);var s=ae(xs,r)?xs[r]:null;s&&(i[s]=n[2])}}function Vs(t,e){var i=e.width/t.width,n=e.height/t.height,o=Math.min(i,n);return{scale:o,x:-(t.x+t.width/2)*o+(e.x+e.width/2),y:-(t.y+t.height/2)*o+(e.y+e.height/2)}}var zs=me(["rect","circle","line","ellipse","polygon","polyline","path","text","tspan","g"]),Os=function(){function t(t,e){this.type="geoSVG",this._usedGraphicMap=me(),this._freedGraphics=[],this._mapName=t,this._parsedXML=ys(e)}return t.prototype.load=function(){var t=this._firstGraphic;if(!t){t=this._firstGraphic=this._buildGraphic(this._parsedXML),this._freedGraphics.push(t),this._boundingRect=this._firstGraphic.boundingRect.clone();var e=function(t){var e=[],i=me();return h(t,(function(t){if(null==t.namedFrom){var n=new Ir(t.name,t.el);e.push(n),i.set(t.name,n)}})),{regions:e,regionsMap:i}}(t.named),i=e.regions,n=e.regionsMap;this._regions=i,this._regionsMap=n}return{boundingRect:this._boundingRect,regions:this._regions,regionsMap:this._regionsMap}},t.prototype._buildGraphic=function(t){var e,i,n,o;try{i=(e=t&&(n=t,o={ignoreViewBox:!0,ignoreRootClip:!0},(new bs).parse(n,o))||{}).root,Z(null!=i)}catch(x){throw new Error("Invalid svg format\n"+x.message)}var r=new mt;r.add(i),r.isGeoSVGGraphicRoot=!0;var a=e.width,s=e.height,l=e.viewBoxRect,u=this._boundingRect;if(!u){var c=void 0,d=void 0,p=void 0,f=void 0;if(null!=a?(c=0,p=a):l&&(c=l.x,p=l.width),null!=s?(d=0,f=s):l&&(d=l.y,f=l.height),null==c||null==d){var y=i.getBoundingRect();null==c&&(c=y.x,p=y.width),null==d&&(d=y.y,f=y.height)}u=this._boundingRect=new g(c,d,p,f)}if(l){var m=Vs(l,u);i.scaleX=i.scaleY=m.scale,i.x=m.x,i.y=m.y}r.setClipPath(new re({shape:u.plain()}));var v=[];return h(e.named,(function(t){var e;null!=zs.get(t.svgNodeTagLower)&&(v.push(t),(e=t.el).silent=!1,e.isGroup&&e.traverse((function(t){t.silent=!1})))})),{root:r,boundingRect:u,named:v}},t.prototype.useGraphic=function(t){var e=this._usedGraphicMap,i=e.get(t);return i||(i=this._freedGraphics.pop()||this._buildGraphic(this._parsedXML),e.set(t,i),i)},t.prototype.freeGraphic=function(t){var e=this._usedGraphicMap,i=e.get(t);i&&(e.removeKey(t),this._freedGraphics.push(i))},t}();for(var Bs=[126,25],Gs="南海诸岛",Fs=[[[0,3.5],[7,11.2],[15,11.9],[30,7],[42,.7],[52,.7],[56,7.7],[59,.7],[64,.7],[64,0],[5,0],[0,3.5]],[[13,16.1],[19,14.7],[16,21.7],[11,23.1],[13,16.1]],[[12,32.2],[14,38.5],[15,38.5],[13,32.2],[12,32.2]],[[16,47.6],[12,53.2],[13,53.2],[18,47.6],[16,47.6]],[[6,64.4],[8,70],[9,70],[8,64.4],[6,64.4]],[[23,82.6],[29,79.8],[30,79.8],[25,82.6],[23,82.6]],[[37,70.7],[43,62.3],[44,62.3],[39,70.7],[37,70.7]],[[48,51.1],[51,45.5],[53,45.5],[50,51.1],[48,51.1]],[[51,35],[51,28.7],[53,28.7],[53,35],[51,35]],[[52,22.4],[55,17.5],[56,17.5],[53,22.4],[52,22.4]],[[58,12.6],[62,7],[63,7],[60,12.6],[58,12.6]],[[0,3.5],[0,93.1],[64,93.1],[64,0],[63,0],[63,92.4],[1,92.4],[1,3.5],[0,3.5]]],Ws=0;Ws<Fs.length;Ws++)for(var Hs=0;Hs<Fs[Ws].length;Hs++)Fs[Ws][Hs][0]/=10.5,Fs[Ws][Hs][1]/=-14,Fs[Ws][Hs][0]+=Bs[0],Fs[Ws][Hs][1]+=Bs[1];var Us={"南海诸岛":[32,80],"广东":[0,-10],"香港":[10,5],"澳门":[-10,10],"天津":[5,5]};var js=[[[123.45165252685547,25.73527164402261],[123.49731445312499,25.73527164402261],[123.49731445312499,25.750734064600884],[123.45165252685547,25.750734064600884],[123.45165252685547,25.73527164402261]]];var Xs=function(){function t(t,e,i){var n;this.type="geoJSON",this._parsedMap=me(),this._mapName=t,this._specialAreas=i,this._geoJSON=N(n=e)?"undefined"!=typeof JSON&&JSON.parse?JSON.parse(n):new Function("return ("+n+");")():n}return t.prototype.load=function(t,e){e=e||"name";var i=this._parsedMap.get(e);if(!i){var n=this._parseToRegions(e);i=this._parsedMap.set(e,{regions:n,boundingRect:Ys(n)})}var o=me(),r=[];return h(i.regions,(function(e){var i=e.name;t&&ae(t,i)&&(e=e.cloneShallow(i=t[i])),r.push(e),o.set(i,e)})),{regions:r,boundingRect:i.boundingRect||new g(0,0,0,0),regionsMap:o}},t.prototype._parseToRegions=function(t){var e,i=this._mapName,n=this._geoJSON;try{e=n?Tr(n,t):[]}catch(o){throw new Error("Invalid geoJson format\n"+o.message)}return function(t,e){if("china"===t){for(var i=0;i<e.length;i++)if(e[i].name===Gs)return;e.push(new Mr(Gs,b(Fs,(function(t){return{type:"polygon",exterior:t}})),Bs))}}(i,e),h(e,(function(t){var e=t.name;!function(t,e){if("china"===t){var i=Us[e.name];if(i){var n=e.getCenter();n[0]+=i[0]/10.5,n[1]+=-i[1]/14,e.setCenter(n)}}}(i,t),function(t,e){"china"===t&&"台湾"===e.name&&e.geometries.push({type:"polygon",exterior:js[0]})}(i,t);var n=this._specialAreas&&this._specialAreas[e];n&&t.transformTo(n.left,n.top,n.width,n.height)}),this),e},t.prototype.getMapForUser=function(){return{geoJson:this._geoJSON,geoJSON:this._geoJSON,specialAreas:this._specialAreas}},t}();function Ys(t){for(var e,i=0;i<t.length;i++){var n=t[i].getBoundingRect();(e=e||n.clone()).union(n)}return e}var Zs=me(),qs=function(t,e,i){if(e.svg){var n=new Os(t,e.svg);Zs.set(t,n)}else{var o=e.geoJson||e.geoJSON;o&&!e.features?i=e.specialAreas:o=e;n=new Xs(t,o,i);Zs.set(t,n)}},Js=function(t){return Zs.get(t)},Qs=function(t){var e=Zs.get(t);return e&&"geoJSON"===e.type&&e.getMapForUser()},Ks=function(t,e,i){var n=Zs.get(t);if(n)return n.load(e,i);console.error("Map "+t+" not exists. The GeoJSON of the map must be provided.")},$s=["rect","circle","line","ellipse","polygon","polyline","path"],tl=me($s),el=me($s.concat(["g"])),il=me($s.concat(["g"])),nl=ve();function ol(t){var e=t.getItemStyle(),i=t.get("areaColor");return null!=i&&(e.fill=i),e}function rl(t){var e=t.style;e&&(e.stroke=e.stroke||e.fill,e.fill=null)}var al=function(){function t(t){var e=new mt;this.uid=xe("ec_map_draw"),this._controller=new _e(t.getZr()),this._controllerHost={target:e},this.group=e,e.add(this._regionsGroup=new mt),e.add(this._svgGroup=new mt)}return t.prototype.draw=function(t,e,i,n,o){var r="geo"===t.mainType,a=t.getData&&t.getData();r&&e.eachComponent({mainType:"series",subType:"map"},(function(e){a||e.getHostGeoModel()!==t||(a=e.getData())}));var s=t.coordinateSystem,l=this._regionsGroup,u=this.group,c=s.getTransformInfo(),d=c.raw,p=c.roam;!l.childAt(0)||o?(u.x=p.x,u.y=p.y,u.scaleX=p.scaleX,u.scaleY=p.scaleY,u.dirty()):Lt(u,p,t);var h=a&&a.getVisual("visualMeta")&&a.getVisual("visualMeta").length>0,g={api:i,geo:s,mapOrGeoModel:t,data:a,isVisualEncodedByVisualMap:h,isGeo:r,transformInfoRaw:d};"geoJSON"===s.resourceType?this._buildGeoJSON(g):"geoSVG"===s.resourceType&&this._buildSVG(g),this._updateController(t,e,i),this._updateMapSelectHandler(t,l,i,n)},t.prototype._buildGeoJSON=function(t){var e=this._regionsGroupByName=me(),i=me(),n=this._regionsGroup,o=t.transformInfoRaw,r=t.mapOrGeoModel,a=t.data,s=t.geo.projection,l=s&&s.stream;function u(t,e){return e&&(t=e(t)),t&&[t[0]*o.scaleX+o.x,t[1]*o.scaleY+o.y]}function c(t){for(var e=[],i=!l&&s&&s.project,n=0;n<t.length;++n){var o=u(t[n],i);o&&e.push(o)}return e}function d(t){return{shape:{points:c(t)}}}n.removeAll(),h(t.geo.regions,(function(o){var c=o.name,p=e.get(c),g=i.get(c)||{},f=g.dataIdx,y=g.regionModel;p||(p=e.set(c,new mt),n.add(p),f=a?a.indexOfName(c):null,y=t.isGeo?r.getRegionModel(c):a?a.getItemModel(f):null,i.set(c,{dataIdx:f,regionModel:y}));var m=[],v=[];h(o.geometries,(function(t){if("polygon"===t.type){var e=[t.exterior].concat(t.interiors||[]);l&&(e=pl(e,l)),h(e,(function(t){m.push(new At(d(t)))}))}else{var i=t.points;l&&(i=pl(i,l,!0)),h(i,(function(t){v.push(new Dt(d(t)))}))}}));var x=u(o.getCenter(),s&&s.project);function _(e,i){if(e.length){var n=new L({culling:!0,segmentIgnoreThreshold:1,shape:{paths:e}});p.add(n),sl(t,n,f,y),ll(t,n,c,y,r,f,x),i&&(rl(n),h(n.states,rl))}}_(m),_(v,!0)})),e.each((function(e,n){var o=i.get(n),a=o.dataIdx,s=o.regionModel;ul(t,e,n,s,r,a),cl(t,e,n,s,r),dl(t,e,n,s,r)}),this)},t.prototype._buildSVG=function(t){var e=t.geo.map,i=t.transformInfoRaw;this._svgGroup.x=i.x,this._svgGroup.y=i.y,this._svgGroup.scaleX=i.scaleX,this._svgGroup.scaleY=i.scaleY,this._svgResourceChanged(e)&&(this._freeSVG(),this._useSVG(e));var n=this._svgDispatcherMap=me(),o=!1;h(this._svgGraphicRecord.named,(function(e){var i=e.name,r=t.mapOrGeoModel,a=t.data,s=e.svgNodeTagLower,l=e.el,u=a?a.indexOfName(i):null,c=r.getRegionModel(i);(null!=tl.get(s)&&l instanceof be&&sl(t,l,u,c),l instanceof be&&(l.culling=!0),l.z2EmphasisLift=0,e.namedFrom)||(null!=il.get(s)&&ll(t,l,i,c,r,u,null),ul(t,l,i,c,r,u),cl(t,l,i,c,r),null!=el.get(s)&&("self"===dl(t,l,i,c,r)&&(o=!0),(n.get(i)||n.set(i,[])).push(l)))}),this),this._enableBlurEntireSVG(o,t)},t.prototype._enableBlurEntireSVG=function(t,e){if(t&&e.isGeo){var i=e.mapOrGeoModel.getModel(["blur","itemStyle"]).getItemStyle().opacity;this._svgGraphicRecord.root.traverse((function(t){if(!t.isGroup){Se(t);var e=t.ensureState("blur").style||{};null==e.opacity&&null!=i&&(e.opacity=i),t.ensureState("emphasis")}}))}},t.prototype.remove=function(){this._regionsGroup.removeAll(),this._regionsGroupByName=null,this._svgGroup.removeAll(),this._freeSVG(),this._controller.dispose(),this._controllerHost=null},t.prototype.findHighDownDispatchers=function(t,e){if(null==t)return[];var i=e.coordinateSystem;if("geoJSON"===i.resourceType){var n=this._regionsGroupByName;if(n){var o=n.get(t);return o?[o]:[]}}else if("geoSVG"===i.resourceType)return this._svgDispatcherMap&&this._svgDispatcherMap.get(t)||[]},t.prototype._svgResourceChanged=function(t){return this._svgMapName!==t},t.prototype._useSVG=function(t){var e=Js(t);if(e&&"geoSVG"===e.type){var i=e.useGraphic(this.uid);this._svgGroup.add(i.root),this._svgGraphicRecord=i,this._svgMapName=t}},t.prototype._freeSVG=function(){var t=this._svgMapName;if(null!=t){var e=Js(t);e&&"geoSVG"===e.type&&e.freeGraphic(this.uid),this._svgGraphicRecord=null,this._svgDispatcherMap=null,this._svgGroup.removeAll(),this._svgMapName=null}},t.prototype._updateController=function(t,e,i){var n=t.coordinateSystem,o=this._controller,r=this._controllerHost;r.zoomLimit=t.get("scaleLimit"),r.zoom=n.getZoom(),o.enable(t.get("roam")||!1);var a=t.mainType;function s(){var e={type:"geoRoam",componentType:a};return e[a+"Id"]=t.id,e}o.off("pan").on("pan",(function(t){this._mouseDownFlag=!1,gs(r,t.dx,t.dy),i.dispatchAction(E(s(),{dx:t.dx,dy:t.dy,animation:{duration:0}}))}),this),o.off("zoom").on("zoom",(function(t){this._mouseDownFlag=!1,fs(r,t.scale,t.originX,t.originY),i.dispatchAction(E(s(),{zoom:t.scale,originX:t.originX,originY:t.originY,animation:{duration:0}}))}),this),o.setPointerChecker((function(e,o,r){return n.containPoint([o,r])&&!we(e,i,t)}))},t.prototype.resetForLabelLayout=function(){this.group.traverse((function(t){var e=t.getTextContent();e&&(e.ignore=nl(e).ignore)}))},t.prototype._updateMapSelectHandler=function(t,e,i,n){var o=this;e.off("mousedown"),e.off("click"),t.get("selectedMode")&&(e.on("mousedown",(function(){o._mouseDownFlag=!0})),e.on("click",(function(t){o._mouseDownFlag&&(o._mouseDownFlag=!1)})))},t}();function sl(t,e,i,n){var o=n.getModel("itemStyle"),r=n.getModel(["emphasis","itemStyle"]),a=n.getModel(["blur","itemStyle"]),s=n.getModel(["select","itemStyle"]),l=ol(o),u=ol(r),c=ol(s),d=ol(a),p=t.data;if(p){var h=p.getItemVisual(i,"style"),g=p.getItemVisual(i,"decal");t.isVisualEncodedByVisualMap&&h.fill&&(l.fill=h.fill),g&&(l.decal=Me(g,t.api))}e.setStyle(l),e.style.strokeNoScale=!0,e.ensureState("emphasis").style=u,e.ensureState("select").style=c,e.ensureState("blur").style=d,Se(e)}function ll(t,e,i,n,o,r,a){var s=t.data,l=t.isGeo,u=s&&isNaN(s.get(s.mapDimension("value"),r)),c=s&&s.getItemLayout(r);if(l||u||c&&c.showLabel){var d=l?i:r,p=void 0;(!s||r>=0)&&(p=o);var h=a?{normal:{align:"center",verticalAlign:"middle"}}:null;kt(e,Et(n),{labelFetcher:p,labelDataIndex:d,defaultText:i},h);var g=e.getTextContent();if(g&&(nl(g).ignore=g.ignore,e.textConfig&&a)){var f=e.getBoundingRect().clone();e.textConfig.layoutRect=f,e.textConfig.position=[(a[0]-f.x)/f.width*100+"%",(a[1]-f.y)/f.height*100+"%"]}e.disableLabelAnimation=!0}else e.removeTextContent(),e.removeTextConfig(),e.disableLabelAnimation=null}function ul(t,e,i,n,o,r){t.data?t.data.setItemGraphicEl(r,e):xt(e).eventData={componentType:"geo",componentIndex:o.componentIndex,geoIndex:o.componentIndex,name:i,region:n&&n.option||{}}}function cl(t,e,i,n,o){t.data||Ie({el:e,componentModel:o,itemName:i,itemTooltipOption:n.get("tooltip")})}function dl(t,e,i,n,o){e.highDownSilentOnTouch=!!o.get("selectedMode");var r=n.getModel("emphasis"),a=r.get("focus");return Rt(e,a,r.get("blurScope"),r.get("disabled")),t.isGeo&&Ae(e,o,i),a}function pl(t,e,i){var n,o=[];function r(){n=[]}function a(){n.length&&(o.push(n),n=[])}var s=e({polygonStart:r,polygonEnd:a,lineStart:r,lineEnd:a,point:function(t,e){isFinite(t)&&isFinite(e)&&n.push([t,e])},sphere:function(){}});return!i&&s.polygonStart(),h(t,(function(t){s.lineStart();for(var e=0;e<t.length;e++)s.point(t[e][0],t[e][1]);s.lineEnd()})),!i&&s.polygonEnd(),o}var hl=al,gl=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return p(e,t),e.prototype.render=function(t,e,i,n){if(!n||"mapToggleSelect"!==n.type||n.from!==this.uid){var o=this.group;if(o.removeAll(),!t.getHostGeoModel()){if(this._mapDraw&&n&&"geoRoam"===n.type&&this._mapDraw.resetForLabelLayout(),n&&"geoRoam"===n.type&&"series"===n.componentType&&n.seriesId===t.id)(r=this._mapDraw)&&o.add(r.group);else if(t.needsDrawMap){var r=this._mapDraw||new hl(i);o.add(r.group),r.draw(t,e,i,this,n),this._mapDraw=r}else this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;t.get("showLegendSymbol")&&e.getComponent("legend")&&this._renderSymbols(t,e,i)}}},e.prototype.remove=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null,this.group.removeAll()},e.prototype.dispose=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null},e.prototype._renderSymbols=function(t,e,i){var n=t.originalData,o=this.group;n.each(n.mapDimension("value"),(function(e,i){if(!isNaN(e)){var r=n.getItemLayout(i);if(r&&r.point){var a=r.point,s=r.offset,l=new Jt({style:{fill:t.getData().getVisual("style").fill},shape:{cx:a[0]+9*s,cy:a[1],r:3},silent:!0,z2:8+(s?0:De+1)});if(!s){var u=t.mainSeries.getData(),c=n.getName(i),d=u.indexOfName(c),p=n.getItemModel(i),h=p.getModel("label"),g=u.getItemGraphicEl(d);kt(l,Et(p),{labelFetcher:{getFormattedLabel:function(e,i){return t.getFormattedLabel(d,i)}},defaultText:c}),l.disableLabelAnimation=!0,h.get("position")||l.setTextConfig({position:"bottom"}),g.onHoverStateChange=function(t){Te(l,t)}}o.add(l)}}}))},e.type="map",e}(St),fl=gl,yl=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i.needsDrawMap=!1,i.seriesGroup=[],i.getTooltipPosition=function(t){if(null!=t){var e=this.getData().getName(t),i=this.coordinateSystem,n=i.getRegion(e);return n&&i.dataToPoint(n.getCenter())}},i}return p(e,t),e.prototype.getInitialData=function(t){for(var e=Gt(this,{coordDimensions:["value"],encodeDefaulter:Ce(Le,this)}),i=me(),n=[],o=0,r=e.count();o<r;o++){var a=e.getName(o);i.set(a,!0)}var s=Ks(this.getMapType(),this.option.nameMap,this.option.nameProperty);return h(s.regions,(function(t){var e=t.name;i.get(e)||n.push(e)})),e.appendValues([],n),e},e.prototype.getHostGeoModel=function(){var t=this.option.geoIndex;return null!=t?this.ecModel.getComponent("geo",t):null},e.prototype.getMapType=function(){return(this.getHostGeoModel()||this).option.map},e.prototype.getRawValue=function(t){var e=this.getData();return e.get(e.mapDimension("value"),t)},e.prototype.getRegionModel=function(t){var e=this.getData();return e.getItemModel(e.indexOfName(t))},e.prototype.formatTooltip=function(t,e,i){for(var n=this.getData(),o=this.getRawValue(t),r=n.getName(t),a=this.seriesGroup,s=[],l=0;l<a.length;l++){var u=a[l].originalData.indexOfName(r),c=n.mapDimension("value");isNaN(a[l].originalData.get(c,u))||s.push(a[l].name)}return Wt("section",{header:s.join(", "),noHeader:!s.length,blocks:[Wt("nameValue",{name:r,value:o})]})},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.getLegendIcon=function(t){var e=t.icon||"roundRect",i=vt(e,0,0,t.itemWidth,t.itemHeight,t.itemStyle.fill);return i.setStyle(t.itemStyle),i.style.stroke="none",e.indexOf("empty")>-1&&(i.style.stroke=i.style.fill,i.style.fill="#fff",i.style.lineWidth=2),i},e.type="series.map",e.dependencies=["geo"],e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:null,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{areaColor:"rgba(255,215,0,0.8)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},nameProperty:"name"},e}(yt),ml=yl;function vl(t){var e={};t.eachSeriesByType("map",(function(t){var i=t.getHostGeoModel(),n=i?"o"+i.id:"i"+t.getMapType();(e[n]=e[n]||[]).push(t)})),h(e,(function(t,e){for(var i,n,o,r=(i=b(t,(function(t){return t.getData()})),n=t[0].get("mapValueCalculation"),o={},h(i,(function(t){t.each(t.mapDimension("value"),(function(e,i){var n="ec-"+t.getName(i);o[n]=o[n]||[],isNaN(e)||o[n].push(e)}))})),i[0].map(i[0].mapDimension("value"),(function(t,e){for(var r="ec-"+i[0].getName(e),a=0,s=1/0,l=-1/0,u=o[r].length,c=0;c<u;c++)s=Math.min(s,o[r][c]),l=Math.max(l,o[r][c]),a+=o[r][c];return 0===u?NaN:"min"===n?s:"max"===n?l:"average"===n?a/u:a}))),a=0;a<t.length;a++)t[a].originalData=t[a].getData();for(a=0;a<t.length;a++)t[a].seriesGroup=t,t[a].needsDrawMap=0===a&&!t[a].getHostGeoModel(),t[a].setData(r.cloneShallow()),t[a].mainSeries=t[0]}))}function xl(t){var e={};t.eachSeriesByType("map",(function(i){var n=i.getMapType();if(!i.getHostGeoModel()&&!e[n]){var o={};h(i.seriesGroup,(function(e){var i=e.coordinateSystem,n=e.originalData;e.get("showLegendSymbol")&&t.getComponent("legend")&&n.each(n.mapDimension("value"),(function(t,e){var r=n.getName(e),a=i.getRegion(r);if(a&&!isNaN(t)){var s=o[r]||0,l=i.dataToPoint(a.getCenter());o[r]=s+1,n.setItemLayout(e,{point:l,offset:s})}}))}));var r=i.getData();r.each((function(t){var e=r.getName(t),i=r.getItemLayout(t)||{};i.showLabel=!o[e],r.setItemLayout(t,i)})),e[n]=!0}}))}var _l=v,bl=function(t){function e(e){var i=t.call(this)||this;return i.type="view",i.dimensions=["x","y"],i._roamTransformable=new Ne,i._rawTransformable=new Ne,i.name=e,i}return p(e,t),e.prototype.setBoundingRect=function(t,e,i,n){return this._rect=new g(t,e,i,n),this._rect},e.prototype.getBoundingRect=function(){return this._rect},e.prototype.setViewRect=function(t,e,i,n){this._transformTo(t,e,i,n),this._viewRect=new g(t,e,i,n)},e.prototype._transformTo=function(t,e,i,n){var o=this.getBoundingRect(),r=this._rawTransformable;r.transform=o.calculateTransform(new g(t,e,i,n));var a=r.parent;r.parent=null,r.decomposeTransform(),r.parent=a,this._updateTransform()},e.prototype.setCenter=function(t,e){t&&(this._center=[ee(t[0],e.getWidth()),ee(t[1],e.getHeight())],this._updateCenterAndZoom())},e.prototype.setZoom=function(t){t=t||1;var e=this.zoomLimit;e&&(null!=e.max&&(t=Math.min(e.max,t)),null!=e.min&&(t=Math.max(e.min,t))),this._zoom=t,this._updateCenterAndZoom()},e.prototype.getDefaultCenter=function(){var t=this.getBoundingRect();return[t.x+t.width/2,t.y+t.height/2]},e.prototype.getCenter=function(){return this._center||this.getDefaultCenter()},e.prototype.getZoom=function(){return this._zoom||1},e.prototype.getRoamTransform=function(){return this._roamTransformable.getLocalTransform()},e.prototype._updateCenterAndZoom=function(){var t=this._rawTransformable.getLocalTransform(),e=this._roamTransformable,i=this.getDefaultCenter(),n=this.getCenter(),o=this.getZoom();n=v([],n,t),i=v([],i,t),e.originX=n[0],e.originY=n[1],e.x=i[0]-n[0],e.y=i[1]-n[1],e.scaleX=e.scaleY=o,this._updateTransform()},e.prototype._updateTransform=function(){var t=this._roamTransformable,e=this._rawTransformable;e.parent=t,t.updateTransform(),e.updateTransform(),Pe(this.transform||(this.transform=[]),e.transform||ye()),this._rawTransform=e.getLocalTransform(),this.invTransform=this.invTransform||[],m(this.invTransform,this.transform),this.decomposeTransform()},e.prototype.getTransformInfo=function(){var t=this._rawTransformable,e=this._roamTransformable,i=new Ne;return i.transform=e.transform,i.decomposeTransform(),{roam:{x:i.x,y:i.y,scaleX:i.scaleX,scaleY:i.scaleY},raw:{x:t.x,y:t.y,scaleX:t.scaleX,scaleY:t.scaleY}}},e.prototype.getViewRect=function(){return this._viewRect},e.prototype.getViewRectAfterRoam=function(){var t=this.getBoundingRect().clone();return t.applyTransform(this.transform),t},e.prototype.dataToPoint=function(t,e,i){var n=e?this._rawTransform:this.transform;return i=i||[],n?_l(i,t,n):ke(i,t)},e.prototype.pointToData=function(t){var e=this.invTransform;return e?_l([],t,e):[t[0],t[1]]},e.prototype.convertToPixel=function(t,e,i){var n=Sl(e);return n===this?n.dataToPoint(i):null},e.prototype.convertFromPixel=function(t,e,i){var n=Sl(e);return n===this?n.pointToData(i):null},e.prototype.containPoint=function(t){return this.getViewRectAfterRoam().contain(t[0],t[1])},e.dimensions=["x","y"],e}(Ne);function Sl(t){var e=t.seriesModel;return e?e.coordinateSystem:null}var wl=bl,Ml={geoJSON:{aspectScale:.75,invertLongitute:!0},geoSVG:{aspectScale:1,invertLongitute:!1}},Il=["lng","lat"],Al=function(t){function e(e,i,n){var o=t.call(this,e)||this;o.dimensions=Il,o.type="geo",o._nameCoordMap=me(),o.map=i;var r,a=n.projection,s=Ks(i,n.nameMap,n.nameProperty),l=Js(i),u=o.resourceType=l?l.type:null,c=o.regions=s.regions,d=Ml[l.type];if(o._regionsMap=s.regionsMap,o.regions=s.regions,a&&("geoSVG"===u&&(Ee("Map "+i+" with SVG source can't use projection. Only GeoJSON source supports projection."),a=null),a.project&&a.unproject||(Ee("project and unproject must be both provided in the projeciton."),a=null)),o.projection=a,a)for(var p=0;p<c.length;p++){var h=c[p].getBoundingRect(a);(r=r||h.clone()).union(h)}else r=s.boundingRect;return o.setBoundingRect(r.x,r.y,r.width,r.height),o.aspectScale=a?1:H(n.aspectScale,d.aspectScale),o._invertLongitute=!a&&d.invertLongitute,o}return p(e,t),e.prototype._transformTo=function(t,e,i,n){var o=this.getBoundingRect(),r=this._invertLongitute;o=o.clone(),r&&(o.y=-o.y-o.height);var a=this._rawTransformable;a.transform=o.calculateTransform(new g(t,e,i,n));var s=a.parent;a.parent=null,a.decomposeTransform(),a.parent=s,r&&(a.scaleY=-a.scaleY),this._updateTransform()},e.prototype.getRegion=function(t){return this._regionsMap.get(t)},e.prototype.getRegionByCoord=function(t){for(var e=this.regions,i=0;i<e.length;i++){var n=e[i];if("geoJSON"===n.type&&n.contain(t))return e[i]}},e.prototype.addGeoCoord=function(t,e){this._nameCoordMap.set(t,e)},e.prototype.getGeoCoord=function(t){var e=this._regionsMap.get(t);return this._nameCoordMap.get(t)||e&&e.getCenter()},e.prototype.dataToPoint=function(t,e,i){if(N(t)&&(t=this.getGeoCoord(t)),t){var n=this.projection;return n&&(t=n.project(t)),t&&this.projectedToPoint(t,e,i)}},e.prototype.pointToData=function(t){var e=this.projection;return e&&(t=e.unproject(t)),t&&this.pointToProjected(t)},e.prototype.pointToProjected=function(e){return t.prototype.pointToData.call(this,e)},e.prototype.projectedToPoint=function(e,i,n){return t.prototype.dataToPoint.call(this,e,i,n)},e.prototype.convertToPixel=function(t,e,i){var n=Dl(e);return n===this?n.dataToPoint(i):null},e.prototype.convertFromPixel=function(t,e,i){var n=Dl(e);return n===this?n.pointToData(i):null},e}(wl);function Dl(t){var e=t.geoModel,i=t.seriesModel;return e?e.coordinateSystem:i?i.coordinateSystem||(i.getReferringComponents("geo",Re).models[0]||{}).coordinateSystem:null}jt(Al,wl);var Tl=Al;function Cl(t,e){var i=t.get("boundingCoords");if(null!=i){var n=i[0],o=i[1];if(isFinite(n[0])&&isFinite(n[1])&&isFinite(o[0])&&isFinite(o[1])){var r=this.projection;if(r){var a=n[0],s=n[1],l=o[0],u=o[1];n=[1/0,1/0],o=[-1/0,-1/0];var c=function(t,e,i,a){for(var s=i-t,l=a-e,u=0;u<=100;u++){var c=u/100,d=r.project([t+s*c,e+l*c]);x(n,n,d),_(o,o,d)}};c(a,s,l,s),c(l,s,l,u),c(l,u,a,u),c(a,u,l,s)}this.setBoundingRect(n[0],n[1],o[0]-n[0],o[1]-n[1])}else console.error("Invalid boundingCoords")}var d,p,h,g=this.getBoundingRect(),f=t.get("layoutCenter"),y=t.get("layoutSize"),m=e.getWidth(),v=e.getHeight(),b=g.width/g.height*this.aspectScale,S=!1;if(f&&y&&(d=[ee(f[0],m),ee(f[1],v)],p=ee(y,Math.min(m,v)),isNaN(d[0])||isNaN(d[1])||isNaN(p)?console.warn("Given layoutCenter or layoutSize data are invalid. Use left/top/width/height instead."):S=!0),S)h={},b>1?(h.width=p,h.height=p/b):(h.height=p,h.width=p*b),h.y=d[1]-h.height/2,h.x=d[0]-h.width/2;else{var w=t.getBoxLayoutParams();w.aspect=b,h=Oe(w,{width:m,height:v})}this.setViewRect(h.x,h.y,h.width,h.height),this.setCenter(t.get("center"),e),this.setZoom(t.get("zoom"))}var Ll=function(){function t(){this.dimensions=Il}return t.prototype.create=function(t,e){var i=[];function n(t){return{nameProperty:t.get("nameProperty"),aspectScale:t.get("aspectScale"),projection:t.get("projection")}}t.eachComponent("geo",(function(t,o){var r=t.get("map"),a=new Tl(r+o,r,E({nameMap:t.get("nameMap")},n(t)));a.zoomLimit=t.get("scaleLimit"),i.push(a),t.coordinateSystem=a,a.model=t,a.resize=Cl,a.resize(t,e)})),t.eachSeries((function(t){if("geo"===t.get("coordinateSystem")){var e=t.get("geoIndex")||0;t.coordinateSystem=i[e]}}));var o={};return t.eachSeriesByType("map",(function(t){if(!t.getHostGeoModel()){var e=t.getMapType();o[e]=o[e]||[],o[e].push(t)}})),h(o,(function(t,o){var r=b(t,(function(t){return t.get("nameMap")})),a=new Tl(o,o,E({nameMap:Ve(r)},n(t[0])));a.zoomLimit=ze.apply(null,b(t,(function(t){return t.get("scaleLimit")}))),i.push(a),a.resize=Cl,a.resize(t[0],e),h(t,(function(t){t.coordinateSystem=a,function(t,e){h(e.get("geoCoord"),(function(e,i){t.addGeoCoord(i,e)}))}(a,t)}))})),i},t.prototype.getFilledRegions=function(t,e,i,n){for(var o=(t||[]).slice(),r=me(),a=0;a<o.length;a++)r.set(o[a].name,o[a]);var s=Ks(e,i,n);return h(s.regions,(function(t){var e=t.name;!r.get(e)&&o.push({name:e})})),o},t}(),Nl=new Ll,Pl=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return p(e,t),e.prototype.init=function(t,e,i){var n=Js(t.map);if(n&&"geoJSON"===n.type){var o=t.itemStyle=t.itemStyle||{};"color"in o||(o.color="#eee")}this.mergeDefaultAndTheme(t,i),Be(t,"label",["show"])},e.prototype.optionUpdated=function(){var t=this,e=this.option;e.regions=Nl.getFilledRegions(e.regions,e.map,e.nameMap,e.nameProperty);var i={};this._optionModelMap=Ge(e.regions||[],(function(e,n){var o=n.name;return o&&(e.set(o,new Ut(n,t,t.ecModel)),n.selected&&(i[o]=!0)),e}),me()),e.selectedMap||(e.selectedMap=i)},e.prototype.getRegionModel=function(t){return this._optionModelMap.get(t)||new Ut(null,this,this.ecModel)},e.prototype.getFormattedLabel=function(t,e){var i=this.getRegionModel(t),n="normal"===e?i.get(["label","formatter"]):i.get(["emphasis","label","formatter"]),o={name:t};return Q(n)?(o.status=e,n(o)):N(n)?n.replace("{a}",null!=t?t:""):void 0},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.select=function(t){var e=this.option,i=e.selectedMode;i&&("multiple"!==i&&(e.selectedMap=null),(e.selectedMap||(e.selectedMap={}))[t]=!0)},e.prototype.unSelect=function(t){var e=this.option.selectedMap;e&&(e[t]=!1)},e.prototype.toggleSelected=function(t){this[this.isSelected(t)?"unSelect":"select"](t)},e.prototype.isSelected=function(t){var e=this.option.selectedMap;return!(!e||!e[t])},e.type="geo",e.layoutMode="box",e.defaultOption={z:0,show:!0,left:"center",top:"center",aspectScale:null,silent:!1,map:"",boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},regions:[]},e}(Yt),kl=Pl;function El(t,e){return t.pointToProjected?t.pointToProjected(e):t.pointToData(e)}function Rl(t,e,i,n){var o=t.getZoom(),r=t.getCenter(),a=e.zoom,s=t.projectedToPoint?t.projectedToPoint(r):t.dataToPoint(r);if(null!=e.dx&&null!=e.dy&&(s[0]-=e.dx,s[1]-=e.dy,t.setCenter(El(t,s),n)),null!=a){if(i){var l=i.min||0,u=i.max||1/0;a=Math.max(Math.min(o*a,u),l)/o}t.scaleX*=a,t.scaleY*=a;var c=(e.originX-t.x)*(a-1),d=(e.originY-t.y)*(a-1);t.x-=c,t.y-=d,t.updateTransform(),t.setCenter(El(t,s),n),t.setZoom(a*o)}return{center:t.getCenter(),zoom:t.getZoom()}}var Vl=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i.focusBlurEnabled=!0,i}return p(e,t),e.prototype.init=function(t,e){this._api=e},e.prototype.render=function(t,e,i,n){if(this._model=t,!t.get("show"))return this._mapDraw&&this._mapDraw.remove(),void(this._mapDraw=null);this._mapDraw||(this._mapDraw=new hl(i));var o=this._mapDraw;o.draw(t,e,i,this,n),o.group.on("click",this._handleRegionClick,this),o.group.silent=t.get("silent"),this.group.add(o.group),this.updateSelectStatus(t,e,i)},e.prototype._handleRegionClick=function(t){var e;Fe(t.target,(function(t){return null!=(e=xt(t).eventData)}),!0),e&&this._api.dispatchAction({type:"geoToggleSelect",geoId:this._model.id,name:e.name})},e.prototype.updateSelectStatus=function(t,e,i){var n=this;this._mapDraw.group.traverse((function(t){var e=xt(t).eventData;if(e)return n._model.isSelected(e.name)?i.enterSelect(t):i.leaveSelect(t),!0}))},e.prototype.findHighDownDispatchers=function(t){return this._mapDraw&&this._mapDraw.findHighDownDispatchers(t,this._model)},e.prototype.dispose=function(){this._mapDraw&&this._mapDraw.remove()},e.type="geo",e}($t),zl=Vl;function Ol(t,e,i){qs(t,e,i)}function Bl(t){function e(e,i){i.update="geo:updateSelectStatus",t.registerAction(i,(function(t,i){var n={},o=[];return i.eachComponent({mainType:"geo",query:t},(function(i){i[e](t.name);var r=i.coordinateSystem;h(r.regions,(function(t){n[t.name]=i.isSelected(t.name)||!1}));var a=[];h(n,(function(t,e){n[e]&&a.push(e)})),o.push({geoIndex:i.componentIndex,name:a})})),{selected:n,allSelected:o,name:t.name}}))}t.registerCoordinateSystem("geo",Nl),t.registerComponentModel(kl),t.registerComponentView(zl),t.registerImpl("registerMap",Ol),t.registerImpl("getMap",(function(t){return Qs(t)})),e("toggleSelected",{type:"geoToggleSelect",event:"geoselectchanged"}),e("select",{type:"geoSelect",event:"geoselected"}),e("unSelect",{type:"geoUnSelect",event:"geounselected"}),t.registerAction({type:"geoRoam",event:"geoRoam",update:"updateTransform"},(function(t,e,i){var n=t.componentType||"series";e.eachComponent({mainType:n,query:t},(function(e){var o=e.coordinateSystem;if("geo"===o.type){var r=Rl(o,t,e.get("scaleLimit"),i);e.setCenter&&e.setCenter(r.center),e.setZoom&&e.setZoom(r.zoom),"series"===n&&h(e.seriesGroup,(function(t){t.setCenter(r.center),t.setZoom(r.zoom)}))}}))}))}function Gl(t,e){var i=t.isExpand?t.children:[],n=t.parentNode.children,o=t.hierNode.i?n[t.hierNode.i-1]:null;if(i.length){!function(t){var e=t.children,i=e.length,n=0,o=0;for(;--i>=0;){var r=e[i];r.hierNode.prelim+=n,r.hierNode.modifier+=n,o+=r.hierNode.change,n+=r.hierNode.shift+o}}(t);var r=(i[0].hierNode.prelim+i[i.length-1].hierNode.prelim)/2;o?(t.hierNode.prelim=o.hierNode.prelim+e(t,o),t.hierNode.modifier=t.hierNode.prelim-r):t.hierNode.prelim=r}else o&&(t.hierNode.prelim=o.hierNode.prelim+e(t,o));t.parentNode.hierNode.defaultAncestor=function(t,e,i,n){if(e){for(var o=t,r=t,a=r.parentNode.children[0],s=e,l=o.hierNode.modifier,u=r.hierNode.modifier,c=a.hierNode.modifier,d=s.hierNode.modifier;s=Ul(s),r=jl(r),s&&r;){o=Ul(o),a=jl(a),o.hierNode.ancestor=t;var p=s.hierNode.prelim+d-r.hierNode.prelim-u+n(s,r);p>0&&(Yl(Xl(s,t,i),t,p),u+=p,l+=p),d+=s.hierNode.modifier,u+=r.hierNode.modifier,l+=o.hierNode.modifier,c+=a.hierNode.modifier}s&&!Ul(o)&&(o.hierNode.thread=s,o.hierNode.modifier+=d-l),r&&!jl(a)&&(a.hierNode.thread=r,a.hierNode.modifier+=u-c,i=t)}return i}(t,o,t.parentNode.hierNode.defaultAncestor||n[0],e)}function Fl(t){var e=t.hierNode.prelim+t.parentNode.hierNode.modifier;t.setLayout({x:e},!0),t.hierNode.modifier+=t.parentNode.hierNode.modifier}function Wl(t){return arguments.length?t:Zl}function Hl(t,e){return t-=Math.PI/2,{x:e*Math.cos(t),y:e*Math.sin(t)}}function Ul(t){var e=t.children;return e.length&&t.isExpand?e[e.length-1]:t.hierNode.thread}function jl(t){var e=t.children;return e.length&&t.isExpand?e[0]:t.hierNode.thread}function Xl(t,e,i){return t.hierNode.ancestor.parentNode===e.parentNode?t.hierNode.ancestor:i}function Yl(t,e,i){var n=i/(e.hierNode.i-t.hierNode.i);e.hierNode.change-=n,e.hierNode.shift+=i,e.hierNode.modifier+=i,e.hierNode.prelim+=i,t.hierNode.change+=n}function Zl(t,e){return t.parentNode===e.parentNode?1:2}var ql=function(){this.parentPoint=[],this.childPoints=[]},Jl=function(t){function e(e){return t.call(this,e)||this}return p(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new ql},e.prototype.buildPath=function(t,e){var i=e.childPoints,n=i.length,o=e.parentPoint,r=i[0],a=i[n-1];if(1===n)return t.moveTo(o[0],o[1]),void t.lineTo(r[0],r[1]);var s=e.orient,l="TB"===s||"BT"===s?0:1,u=1-l,c=ee(e.forkPosition,1),d=[];d[l]=o[l],d[u]=o[u]+(a[u]-o[u])*c,t.moveTo(o[0],o[1]),t.lineTo(d[0],d[1]),t.moveTo(r[0],r[1]),d[l]=r[l],t.lineTo(d[0],d[1]),d[l]=a[l],t.lineTo(d[0],d[1]),t.lineTo(a[0],a[1]);for(var p=1;p<n-1;p++){var h=i[p];t.moveTo(h[0],h[1]),d[l]=h[l],t.lineTo(d[0],d[1])}},e}(B),Ql=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i._mainGroup=new mt,i}return p(e,t),e.prototype.init=function(t,e){this._controller=new _e(e.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},e.prototype.render=function(t,e,i){var n=t.getData(),o=t.layoutInfo,r=this._mainGroup;"radial"===t.get("layout")?(r.x=o.x+o.width/2,r.y=o.y+o.height/2):(r.x=o.x,r.y=o.y),this._updateViewCoordSys(t,i),this._updateController(t,e,i);var a=this._data;n.diff(a).add((function(e){Kl(n,e)&&$l(n,e,null,r,t)})).update((function(e,i){var o=a.getItemGraphicEl(i);Kl(n,e)?$l(n,e,o,r,t):o&&iu(a,i,o,r,t)})).remove((function(e){var i=a.getItemGraphicEl(e);i&&iu(a,e,i,r,t)})).execute(),this._nodeScaleRatio=t.get("nodeScaleRatio"),this._updateNodeAndLinkScale(t),!0===t.get("expandAndCollapse")&&n.eachItemGraphicEl((function(e,n){e.off("click").on("click",(function(){i.dispatchAction({type:"treeExpandAndCollapse",seriesId:t.id,dataIndex:n})}))})),this._data=n},e.prototype._updateViewCoordSys=function(t,e){var i=t.getData(),n=[];i.each((function(t){var e=i.getItemLayout(t);!e||isNaN(e.x)||isNaN(e.y)||n.push([+e.x,+e.y])}));var o=[],r=[];He(n,o,r);var a=this._min,s=this._max;r[0]-o[0]==0&&(o[0]=a?a[0]:o[0]-1,r[0]=s?s[0]:r[0]+1),r[1]-o[1]==0&&(o[1]=a?a[1]:o[1]-1,r[1]=s?s[1]:r[1]+1);var l=t.coordinateSystem=new wl;l.zoomLimit=t.get("scaleLimit"),l.setBoundingRect(o[0],o[1],r[0]-o[0],r[1]-o[1]),l.setCenter(t.get("center"),e),l.setZoom(t.get("zoom")),this.group.attr({x:l.x,y:l.y,scaleX:l.scaleX,scaleY:l.scaleY}),this._min=o,this._max=r},e.prototype._updateController=function(t,e,i){var n=this,o=this._controller,r=this._controllerHost,a=this.group;o.setPointerChecker((function(e,n,o){var r=a.getBoundingRect();return r.applyTransform(a.transform),r.contain(n,o)&&!we(e,i,t)})),o.enable(t.get("roam")),r.zoomLimit=t.get("scaleLimit"),r.zoom=t.coordinateSystem.getZoom(),o.off("pan").off("zoom").on("pan",(function(e){gs(r,e.dx,e.dy),i.dispatchAction({seriesId:t.id,type:"treeRoam",dx:e.dx,dy:e.dy})})).on("zoom",(function(e){fs(r,e.scale,e.originX,e.originY),i.dispatchAction({seriesId:t.id,type:"treeRoam",zoom:e.scale,originX:e.originX,originY:e.originY}),n._updateNodeAndLinkScale(t),i.updateLabelLayout()}))},e.prototype._updateNodeAndLinkScale=function(t){var e=t.getData(),i=this._getNodeGlobalScale(t);e.eachItemGraphicEl((function(t,e){t.setSymbolScale(i)}))},e.prototype._getNodeGlobalScale=function(t){var e=t.coordinateSystem;if("view"!==e.type)return 1;var i=this._nodeScaleRatio,n=e.scaleX||1;return((e.getZoom()-1)*i+1)/n},e.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype.remove=function(){this._mainGroup.removeAll(),this._data=null},e.type="tree",e}(St);function Kl(t,e){var i=t.getItemLayout(e);return i&&!isNaN(i.x)&&!isNaN(i.y)}function $l(t,e,i,n,o){var r=!i,a=t.tree.getNodeByDataIndex(e),s=a.getModel(),l=a.getVisual("style").fill,u=!1===a.isExpand&&0!==a.children.length?l:"#fff",c=t.tree.root,d=a.parentNode===c?a:a.parentNode||a,p=t.getItemGraphicEl(d.dataIndex),h=d.getLayout(),g=p?{x:p.__oldX,y:p.__oldY,rawX:p.__radialOldRawX,rawY:p.__radialOldRawY}:h,f=a.getLayout();r?((i=new Ue(t,e,null,{symbolInnerColor:u,useNameLabel:!0})).x=g.x,i.y=g.y):i.updateData(t,e,null,{symbolInnerColor:u,useNameLabel:!0}),i.__radialOldRawX=i.__radialRawX,i.__radialOldRawY=i.__radialRawY,i.__radialRawX=f.rawX,i.__radialRawY=f.rawY,n.add(i),t.setItemGraphicEl(e,i),i.__oldX=i.x,i.__oldY=i.y,Lt(i,{x:f.x,y:f.y},o);var y=i.getSymbolPath();if("radial"===o.get("layout")){var m=c.children[0],v=m.getLayout(),x=m.children.length,_=void 0,b=void 0;if(f.x===v.x&&!0===a.isExpand&&m.children.length){var S={x:(m.children[0].getLayout().x+m.children[x-1].getLayout().x)/2,y:(m.children[0].getLayout().y+m.children[x-1].getLayout().y)/2};(_=Math.atan2(S.y-v.y,S.x-v.x))<0&&(_=2*Math.PI+_),(b=S.x<v.x)&&(_-=Math.PI)}else(_=Math.atan2(f.y-v.y,f.x-v.x))<0&&(_=2*Math.PI+_),0===a.children.length||0!==a.children.length&&!1===a.isExpand?(b=f.x<v.x)&&(_-=Math.PI):(b=f.x>v.x)||(_-=Math.PI);var w=b?"left":"right",M=s.getModel("label"),I=M.get("rotate"),A=I*(Math.PI/180),D=y.getTextContent();D&&(y.setTextConfig({position:M.get("position")||w,rotation:null==I?-_:A,origin:"center"}),D.setStyle("verticalAlign","middle"))}var T=s.get(["emphasis","focus"]),C="relative"===T?je(a.getAncestorsIndices(),a.getDescendantIndices()):"ancestor"===T?a.getAncestorsIndices():"descendant"===T?a.getDescendantIndices():null;C&&(xt(i).focus=C),function(t,e,i,n,o,r,a,s){var l=e.getModel(),u=t.get("edgeShape"),c=t.get("layout"),d=t.getOrient(),p=t.get(["lineStyle","curveness"]),h=t.get("edgeForkPosition"),g=l.getModel("lineStyle").getLineStyle(),f=n.__edge;if("curve"===u)e.parentNode&&e.parentNode!==i&&(f||(f=n.__edge=new Ye({shape:nu(c,d,p,o,o)})),Lt(f,{shape:nu(c,d,p,r,a)},t));else if("polyline"===u){if("orthogonal"!==c)throw new Error("The polyline edgeShape can only be used in orthogonal layout");if(e!==i&&e.children&&0!==e.children.length&&!0===e.isExpand){for(var y=e.children,m=[],v=0;v<y.length;v++){var x=y[v].getLayout();m.push([x.x,x.y])}f||(f=n.__edge=new Jl({shape:{parentPoint:[a.x,a.y],childPoints:[[a.x,a.y]],orient:d,forkPosition:h}})),Lt(f,{shape:{parentPoint:[a.x,a.y],childPoints:m}},t)}}f&&("polyline"!==u||e.isExpand)&&(f.useStyle(Nt({strokeNoScale:!0,fill:null},g)),Pt(f,l,"lineStyle"),Se(f),s.add(f))}(o,a,c,i,g,h,f,n),i.__edge&&(i.onHoverStateChange=function(e){if("blur"!==e){var n=a.parentNode&&t.getItemGraphicEl(a.parentNode.dataIndex);n&&n.hoverState===Xe||Te(i.__edge,e)}})}function tu(t,e,i,n,o){var r=eu(e.tree.root,t),a=r.source,s=r.sourceLayout,l=e.getItemGraphicEl(t.dataIndex);if(l){var u=e.getItemGraphicEl(a.dataIndex).__edge,c=l.__edge||(!1===a.isExpand||1===a.children.length?u:void 0),d=n.get("edgeShape"),p=n.get("layout"),h=n.get("orient"),g=n.get(["lineStyle","curveness"]);c&&("curve"===d?Ze(c,{shape:nu(p,h,g,s,s),style:{opacity:0}},n,{cb:function(){i.remove(c)},removeOpt:o}):"polyline"===d&&"orthogonal"===n.get("layout")&&Ze(c,{shape:{parentPoint:[s.x,s.y],childPoints:[[s.x,s.y]]},style:{opacity:0}},n,{cb:function(){i.remove(c)},removeOpt:o}))}}function eu(t,e){for(var i,n=e.parentNode===t?e:e.parentNode||e;null==(i=n.getLayout());)n=n.parentNode===t?n:n.parentNode||n;return{source:n,sourceLayout:i}}function iu(t,e,i,n,o){var r=t.tree.getNodeByDataIndex(e),a=eu(t.tree.root,r).sourceLayout,s={duration:o.get("animationDurationUpdate"),easing:o.get("animationEasingUpdate")};Ze(i,{x:a.x+1,y:a.y+1},o,{cb:function(){n.remove(i),t.setItemGraphicEl(e,null)},removeOpt:s}),i.fadeOut(null,t.hostModel,{fadeLabel:!0,animation:s}),r.children.forEach((function(e){tu(e,t,n,o,s)})),tu(r,t,n,o,s)}function nu(t,e,i,n,o){var r,a,s,l,u,c,d,p;if("radial"===t){u=n.rawX,d=n.rawY,c=o.rawX,p=o.rawY;var h=Hl(u,d),g=Hl(u,d+(p-d)*i),f=Hl(c,p+(d-p)*i),y=Hl(c,p);return{x1:h.x||0,y1:h.y||0,x2:y.x||0,y2:y.y||0,cpx1:g.x||0,cpy1:g.y||0,cpx2:f.x||0,cpy2:f.y||0}}return u=n.x,d=n.y,c=o.x,p=o.y,"LR"!==e&&"RL"!==e||(r=u+(c-u)*i,a=d,s=c+(u-c)*i,l=p),"TB"!==e&&"BT"!==e||(r=u,a=d+(p-d)*i,s=c,l=p+(d-p)*i),{x1:u,y1:d,x2:c,y2:p,cpx1:r,cpy1:a,cpx2:s,cpy2:l}}var ou=Ql,ru=ve();function au(t){var e=t.mainData,i=t.datas;i||(i={main:e},t.datasAttr={main:"data"}),t.datas=t.mainData=null,pu(e,i,t),h(i,(function(i){h(e.TRANSFERABLE_METHODS,(function(e){i.wrapMethod(e,Ce(su,t))}))})),e.wrapMethod("cloneShallow",Ce(uu,t)),h(e.CHANGABLE_METHODS,(function(i){e.wrapMethod(i,Ce(lu,t))})),Z(i[e.dataType]===e)}function su(t,e){if(ru(n=this).mainData===n){var i=E({},ru(this).datas);i[this.dataType]=e,pu(e,i,t)}else hu(e,this.dataType,ru(this).mainData,t);var n;return e}function lu(t,e){return t.struct&&t.struct.update(),e}function uu(t,e){return h(ru(e).datas,(function(i,n){i!==e&&hu(i.cloneShallow(),n,e,t)})),e}function cu(t){var e=ru(this).mainData;return null==t||null==e?e:ru(e).datas[t]}function du(){var t=ru(this).mainData;return null==t?[{data:t}]:b(T(ru(t).datas),(function(e){return{type:e,data:ru(t).datas[e]}}))}function pu(t,e,i){ru(t).datas={},h(e,(function(e,n){hu(e,n,t,i)}))}function hu(t,e,i,n){ru(i).datas[e]=t,ru(t).mainData=i,t.dataType=e,n.struct&&(t[n.structAttr]=n.struct,n.struct[n.datasAttr[e]]=t),t.getLinkedData=cu,t.getLinkedDataAll=du}var gu=function(){function t(t,e){this.depth=0,this.height=0,this.dataIndex=-1,this.children=[],this.viewChildren=[],this.isExpand=!1,this.name=t||"",this.hostTree=e}return t.prototype.isRemoved=function(){return this.dataIndex<0},t.prototype.eachNode=function(t,e,i){Q(t)&&(i=e,e=t,t=null),N(t=t||{})&&(t={order:t});var n,o=t.order||"preorder",r=this[t.attr||"children"];"preorder"===o&&(n=e.call(i,this));for(var a=0;!n&&a<r.length;a++)r[a].eachNode(t,e,i);"postorder"===o&&e.call(i,this)},t.prototype.updateDepthAndHeight=function(t){var e=0;this.depth=t;for(var i=0;i<this.children.length;i++){var n=this.children[i];n.updateDepthAndHeight(t+1),n.height>e&&(e=n.height)}this.height=e+1},t.prototype.getNodeById=function(t){if(this.getId()===t)return this;for(var e=0,i=this.children,n=i.length;e<n;e++){var o=i[e].getNodeById(t);if(o)return o}},t.prototype.contains=function(t){if(t===this)return!0;for(var e=0,i=this.children,n=i.length;e<n;e++){var o=i[e].contains(t);if(o)return o}},t.prototype.getAncestors=function(t){for(var e=[],i=t?this:this.parentNode;i;)e.push(i),i=i.parentNode;return e.reverse(),e},t.prototype.getAncestorsIndices=function(){for(var t=[],e=this;e;)t.push(e.dataIndex),e=e.parentNode;return t.reverse(),t},t.prototype.getDescendantIndices=function(){var t=[];return this.eachNode((function(e){t.push(e.dataIndex)})),t},t.prototype.getValue=function(t){var e=this.hostTree.data;return e.getStore().get(e.getDimensionIndex(t||"value"),this.dataIndex)},t.prototype.setLayout=function(t,e){this.dataIndex>=0&&this.hostTree.data.setItemLayout(this.dataIndex,t,e)},t.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},t.prototype.getModel=function(t){if(!(this.dataIndex<0))return this.hostTree.data.getItemModel(this.dataIndex).getModel(t)},t.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},t.prototype.setVisual=function(t,e){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,t,e)},t.prototype.getVisual=function(t){return this.hostTree.data.getItemVisual(this.dataIndex,t)},t.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},t.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},t.prototype.getChildIndex=function(){if(this.parentNode){for(var t=this.parentNode.children,e=0;e<t.length;++e)if(t[e]===this)return e;return-1}return-1},t.prototype.isAncestorOf=function(t){for(var e=t.parentNode;e;){if(e===this)return!0;e=e.parentNode}return!1},t.prototype.isDescendantOf=function(t){return t!==this&&t.isAncestorOf(this)},t}(),fu=function(){function t(t){this.type="tree",this._nodes=[],this.hostModel=t}return t.prototype.eachNode=function(t,e,i){this.root.eachNode(t,e,i)},t.prototype.getNodeByDataIndex=function(t){var e=this.data.getRawIndex(t);return this._nodes[e]},t.prototype.getNodeById=function(t){return this.root.getNodeById(t)},t.prototype.update=function(){for(var t=this.data,e=this._nodes,i=0,n=e.length;i<n;i++)e[i].dataIndex=-1;for(i=0,n=t.count();i<n;i++)e[t.getRawIndex(i)].dataIndex=i},t.prototype.clearLayouts=function(){this.data.clearItemLayouts()},t.createTree=function(e,i,n){var o=new t(i),r=[],a=1;!function t(e,i){var n=e.value;a=Math.max(a,ct(n)?n.length:1),r.push(e);var s=new gu(qe(e.name,""),o);i?function(t,e){var i=e.children;if(t.parentNode===e)return;i.push(t),t.parentNode=e}(s,i):o.root=s,o._nodes.push(s);var l=e.children;if(l)for(var u=0;u<l.length;u++)t(l[u],s)}(e),o.root.updateDepthAndHeight(0);var s=Je(r,{coordDimensions:["value"],dimensionsCount:a}).dimensions,l=new Qe(s,i);return l.initData(r),n&&n(l),au({mainData:l,struct:o,structAttr:"tree"}),o.update(),o},t}();var yu=fu;function mu(t,e,i){if(t&&Ke(e,t.type)>=0){var n=i.getData().tree.root,o=t.targetNode;if(N(o)&&(o=n.getNodeById(o)),o&&n.contains(o))return{node:o};var r=t.targetNodeId;if(null!=r&&(o=n.getNodeById(r)))return{node:o}}}function vu(t){for(var e=[];t;)(t=t.parentNode)&&e.push(t);return e.reverse()}function xu(t,e){var i=vu(t);return Ke(i,e)>=0}function _u(t,e){for(var i=[];t;){var n=t.dataIndex;i.push({name:t.name,dataIndex:n,value:e.getRawValue(n)}),t=t.parentNode}return i.reverse(),i}var bu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.hasSymbolVisual=!0,e.ignoreStyleOnData=!0,e}return p(e,t),e.prototype.getInitialData=function(t){var e={name:t.name,children:t.data},i=t.leaves||{},n=new Ut(i,this,this.ecModel),o=yu.createTree(e,this,(function(t){t.wrapMethod("getItemModel",(function(t,e){var i=o.getNodeByDataIndex(e);return i&&i.children.length&&i.isExpand||(t.parentModel=n),t}))}));var r=0;o.eachNode("preorder",(function(t){t.depth>r&&(r=t.depth)}));var a=t.expandAndCollapse&&t.initialTreeDepth>=0?t.initialTreeDepth:r;return o.root.eachNode("preorder",(function(t){var e=t.hostTree.data.getRawDataItem(t.dataIndex);t.isExpand=e&&null!=e.collapsed?!e.collapsed:t.depth<=a})),o.data},e.prototype.getOrient=function(){var t=this.get("orient");return"horizontal"===t?t="LR":"vertical"===t&&(t="TB"),t},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.formatTooltip=function(t,e,i){for(var n=this.getData().tree,o=n.root.children[0],r=n.getNodeByDataIndex(t),a=r.getValue(),s=r.name;r&&r!==o;)s=r.parentNode.name+"."+s,r=r.parentNode;return Wt("nameValue",{name:s,value:a,noValue:isNaN(a)||null==a})},e.prototype.getDataParams=function(e){var i=t.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(e);return i.treeAncestors=_u(n,this),i.collapsed=!n.isExpand,i},e.type="series.tree",e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},e}(yt),Su=bu;function wu(t,e){for(var i,n=[t];i=n.pop();)if(e(i),i.isExpand){var o=i.children;if(o.length)for(var r=o.length-1;r>=0;r--)n.push(o[r])}}function Mu(t,e){t.eachSeriesByType("tree",(function(t){!function(t,e){var i=function(t,e){return Oe(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,e);t.layoutInfo=i;var n=t.get("layout"),o=0,r=0,a=null;"radial"===n?(o=2*Math.PI,r=Math.min(i.height,i.width)/2,a=Wl((function(t,e){return(t.parentNode===e.parentNode?1:2)/t.depth}))):(o=i.width,r=i.height,a=Wl());var s=t.getData().tree.root,l=s.children[0];if(l){!function(t){var e=t;e.hierNode={defaultAncestor:null,ancestor:e,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var i,n,o=[e];i=o.pop();)if(n=i.children,i.isExpand&&n.length)for(var r=n.length-1;r>=0;r--){var a=n[r];a.hierNode={defaultAncestor:null,ancestor:a,prelim:0,modifier:0,change:0,shift:0,i:r,thread:null},o.push(a)}}(s),function(t,e,i){for(var n,o=[t],r=[];n=o.pop();)if(r.push(n),n.isExpand){var a=n.children;if(a.length)for(var s=0;s<a.length;s++)o.push(a[s])}for(;n=r.pop();)e(n,i)}(l,Gl,a),s.hierNode.modifier=-l.hierNode.prelim,wu(l,Fl);var u=l,c=l,d=l;wu(l,(function(t){var e=t.getLayout().x;e<u.getLayout().x&&(u=t),e>c.getLayout().x&&(c=t),t.depth>d.depth&&(d=t)}));var p=u===c?1:a(u,c)/2,h=p-u.getLayout().x,g=0,f=0,y=0,m=0;if("radial"===n)g=o/(c.getLayout().x+p+h),f=r/(d.depth-1||1),wu(l,(function(t){y=(t.getLayout().x+h)*g,m=(t.depth-1)*f;var e=Hl(y,m);t.setLayout({x:e.x,y:e.y,rawX:y,rawY:m},!0)}));else{var v=t.getOrient();"RL"===v||"LR"===v?(f=r/(c.getLayout().x+p+h),g=o/(d.depth-1||1),wu(l,(function(t){m=(t.getLayout().x+h)*f,y="LR"===v?(t.depth-1)*g:o-(t.depth-1)*g,t.setLayout({x:y,y:m},!0)}))):"TB"!==v&&"BT"!==v||(g=o/(c.getLayout().x+p+h),f=r/(d.depth-1||1),wu(l,(function(t){y=(t.getLayout().x+h)*g,m="TB"===v?(t.depth-1)*f:r-(t.depth-1)*f,t.setLayout({x:y,y:m},!0)})))}}}(t,e)}))}function Iu(t){t.eachSeriesByType("tree",(function(t){var e=t.getData();e.tree.eachNode((function(t){var i=t.getModel().getModel("itemStyle").getItemStyle(),n=e.ensureUniqueItemVisual(t.dataIndex,"style");E(n,i)}))}))}var Au=["treemapZoomToNode","treemapRender","treemapMove"];function Du(t){var e=t.getData().tree,i={};e.eachNode((function(e){for(var n=e;n&&n.depth>1;)n=n.parentNode;var o=$e(t.ecModel,n.name||n.dataIndex+"",i);e.setVisual("decal",o)}))}var Tu=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i.preventUsingHoverLayer=!0,i}return p(e,t),e.prototype.getInitialData=function(t,e){var i={name:t.name,children:t.data};Cu(i);var n=t.levels||[],o=this.designatedVisualItemStyle={},r=new Ut({itemStyle:o},this,e);n=t.levels=function(t,e){var i,n,o=ti(e.get("color")),r=ti(e.get(["aria","decal","decals"]));if(!o)return;h(t=t||[],(function(t){var e=new Ut(t),o=e.get("color"),r=e.get("decal");(e.get(["itemStyle","color"])||o&&"none"!==o)&&(i=!0),(e.get(["itemStyle","decal"])||r&&"none"!==r)&&(n=!0)}));var a=t[0]||(t[0]={});i||(a.color=o.slice());!n&&r&&(a.decal=r.slice());return t}(n,e);var a=b(n||[],(function(t){return new Ut(t,r,e)}),this),s=yu.createTree(i,this,(function(t){t.wrapMethod("getItemModel",(function(t,e){var i=s.getNodeByDataIndex(e),n=i?a[i.depth]:null;return t.parentModel=n||r,t}))}));return s.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.formatTooltip=function(t,e,i){var n=this.getData(),o=this.getRawValue(t),r=n.getName(t);return Wt("nameValue",{name:r,value:o})},e.prototype.getDataParams=function(e){var i=t.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(e);return i.treeAncestors=_u(n,this),i.treePathInfo=i.treeAncestors,i},e.prototype.setLayoutInfo=function(t){this.layoutInfo=this.layoutInfo||{},E(this.layoutInfo,t)},e.prototype.mapIdToIndex=function(t){var e=this._idIndexMap;e||(e=this._idIndexMap=me(),this._idIndexMapCount=0);var i=e.get(t);return null==i&&e.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 e=this.getRawData().tree.root;t&&(t===e||e.contains(t))||(this._viewRoot=e)},e.prototype.enableAriaDecal=function(){Du(this)},e.type="series.treemap",e.layoutMode="box",e.defaultOption={progressive:0,left:"center",top:"middle",width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.1024,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",textStyle:{color:"#fff"}},emphasis:{itemStyle:{color:"rgba(0,0,0,0.9)"}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",overflow:"truncate"},upperLabel:{show:!1,position:[0,"50%"],height:20,overflow:"truncate",verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],overflow:"truncate",verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},e}(yt);function Cu(t){var e=0;h(t.children,(function(t){Cu(t);var i=t.value;ct(i)&&(i=i[0]),e+=i}));var i=t.value;ct(i)&&(i=i[0]),(null==i||isNaN(i))&&(i=e),i<0&&(i=0),ct(t.value)?t.value[0]=i:t.value=i}var Lu=Tu,Nu=function(){function t(t){this.group=new mt,t.add(this.group)}return t.prototype.render=function(t,e,i,n){var o=t.getModel("breadcrumb"),r=this.group;if(r.removeAll(),o.get("show")&&i){var a=o.getModel("itemStyle"),s=o.getModel("emphasis"),l=a.getModel("textStyle"),u=s.getModel(["itemStyle","textStyle"]),c={pos:{left:o.get("left"),right:o.get("right"),top:o.get("top"),bottom:o.get("bottom")},box:{width:e.getWidth(),height:e.getHeight()},emptyItemWidth:o.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(i,c,l),this._renderContent(t,c,a,s,l,u,n),ei(r,c.pos,c.box)}},t.prototype._prepare=function(t,e,i){for(var n=t;n;n=n.parentNode){var o=qe(n.getModel().get("name"),""),r=i.getTextRect(o),a=Math.max(r.width+16,e.emptyItemWidth);e.totalWidth+=a+8,e.renderList.push({node:n,text:o,width:a})}},t.prototype._renderContent=function(t,e,i,n,o,r,a){for(var s=0,l=e.emptyItemWidth,u=t.get(["breadcrumb","height"]),c=ii(e.pos,e.box),d=e.totalWidth,p=e.renderList,h=n.getModel("itemStyle").getItemStyle(),g=p.length-1;g>=0;g--){var f=p[g],y=f.node,m=f.width,v=f.text;d>c.width&&(d-=m-l,m=l,v=null);var x=new At({shape:{points:Pu(s,0,m,u,g===p.length-1,0===g)},style:Nt(i.getItemStyle(),{lineJoin:"bevel"}),textContent:new ni({style:oi(o,{text:v})}),textConfig:{position:"inside"},z2:1e4*De,onclick:Ce(a,y)});x.disableLabelAnimation=!0,x.getTextContent().ensureState("emphasis").style=oi(r,{text:v}),x.ensureState("emphasis").style=h,Rt(x,n.get("focus"),n.get("blurScope"),n.get("disabled")),this.group.add(x),ku(x,t,y),s+=m+8}},t.prototype.remove=function(){this.group.removeAll()},t}();function Pu(t,e,i,n,o,r){var a=[[o?t:t-5,e],[t+i,e],[t+i,e+n],[o?t:t-5,e+n]];return!r&&a.splice(2,0,[t+i+5,e+n/2]),!o&&a.push([t,e+n/2]),a}function ku(t,e,i){xt(t).eventData={componentType:"series",componentSubType:"treemap",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:i&&i.dataIndex,name:i&&i.name},treePathInfo:i&&_u(i,e)}}var Eu=Nu,Ru=function(){function t(){this._storage=[],this._elExistsMap={}}return t.prototype.add=function(t,e,i,n,o){return!this._elExistsMap[t.id]&&(this._elExistsMap[t.id]=!0,this._storage.push({el:t,target:e,duration:i,delay:n,easing:o}),!0)},t.prototype.finished=function(t){return this._finishedCallback=t,this},t.prototype.start=function(){for(var t=this,e=this._storage.length,i=function(){--e<=0&&(t._storage.length=0,t._elExistsMap={},t._finishedCallback&&t._finishedCallback())},n=0,o=this._storage.length;n<o;n++){var r=this._storage[n];r.el.animateTo(r.target,{duration:r.duration,delay:r.delay,easing:r.easing,setToFinal:!0,done:i,aborted:i})}return this},t}();var Vu=mt,zu=re,Ou="label",Bu="upperLabel",Gu=10*De,Fu=2*De,Wu=3*De,Hu=ri([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),Uu=function(t){var e=Hu(t);return e.stroke=e.fill=e.lineWidth=null,e},ju=ve(),Xu=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i._state="ready",i._storage={nodeGroup:[],background:[],content:[]},i}return p(e,t),e.prototype.render=function(t,e,i,n){var o=e.findComponents({mainType:"series",subType:"treemap",query:n});if(!(Ke(o,t)<0)){this.seriesModel=t,this.api=i,this.ecModel=e;var r=mu(n,["treemapZoomToNode","treemapRootToNode"],t),a=n&&n.type,s=t.layoutInfo,l=!this._oldTree,u=this._storage,c="treemapRootToNode"===a&&r&&u?{rootNodeGroup:u.nodeGroup[r.node.getRawIndex()],direction:n.direction}:null,d=this._giveContainerGroup(s),p=t.get("animation"),h=this._doRender(d,t,c);!p||l||a&&"treemapZoomToNode"!==a&&"treemapRootToNode"!==a?h.renderFinally():this._doAnimation(d,h,t,c),this._resetController(i),this._renderBreadcrumb(t,i,r)}},e.prototype._giveContainerGroup=function(t){var e=this._containerGroup;return e||(e=this._containerGroup=new Vu,this._initEvents(e),this.group.add(e)),e.x=t.x,e.y=t.y,e},e.prototype._doRender=function(t,e,i){var n=e.getData().tree,o=this._oldTree,r={nodeGroup:[],background:[],content:[]},a={nodeGroup:[],background:[],content:[]},s=this._storage,l=[];function u(t,n,o,u){return function(t,e,i,n,o,r,a,s,l,u){if(!a)return;var c=a.getLayout(),d=t.getData(),p=a.getModel();if(d.setItemGraphicEl(a.dataIndex,null),!c||!c.isInView)return;var h=c.width,g=c.height,f=c.borderWidth,y=c.invisible,m=a.getRawIndex(),v=s&&s.getRawIndex(),x=a.viewChildren,_=c.upperHeight,b=x&&x.length,S=p.getModel("itemStyle"),w=p.getModel(["emphasis","itemStyle"]),M=p.getModel(["blur","itemStyle"]),I=p.getModel(["select","itemStyle"]),A=S.get("borderRadius")||0,D=F("nodeGroup",Vu);if(!D)return;if(l.add(D),D.x=c.x||0,D.y=c.y||0,D.markRedraw(),ju(D).nodeWidth=h,ju(D).nodeHeight=g,c.isAboveViewRoot)return D;var T=F("background",zu,u,Fu);T&&V(D,T,b&&c.upperLabelHeight);var C=p.getModel("emphasis"),L=C.get("focus"),N=C.get("blurScope"),P=C.get("disabled"),k="ancestor"===L?a.getAncestorsIndices():"descendant"===L?a.getDescendantIndices():L;if(b)li(D)&&ui(D,!1),T&&(ui(T,!P),d.setItemGraphicEl(a.dataIndex,T),ci(T,k,N));else{var R=F("content",zu,u,Wu);R&&z(D,R),T.disableMorphing=!0,T&&li(T)&&ui(T,!1),ui(D,!P),d.setItemGraphicEl(a.dataIndex,D),ci(D,k,N)}return D;function V(e,i,n){var o=xt(i);if(o.dataIndex=a.dataIndex,o.seriesIndex=t.seriesIndex,i.setShape({x:0,y:0,width:h,height:g,r:A}),y)O(i);else{i.invisible=!1;var r=a.getVisual("style"),s=r.stroke,l=Uu(S);l.fill=s;var u=Hu(w);u.fill=w.get("borderColor");var c=Hu(M);c.fill=M.get("borderColor");var d=Hu(I);if(d.fill=I.get("borderColor"),n){var p=h-2*f;B(i,s,r.opacity,{x:f,y:0,width:p,height:_})}else i.removeTextContent();i.setStyle(l),i.ensureState("emphasis").style=u,i.ensureState("blur").style=c,i.ensureState("select").style=d,Se(i)}e.add(i)}function z(e,i){var n=xt(i);n.dataIndex=a.dataIndex,n.seriesIndex=t.seriesIndex;var o=Math.max(h-2*f,0),r=Math.max(g-2*f,0);if(i.culling=!0,i.setShape({x:f,y:f,width:o,height:r,r:A}),y)O(i);else{i.invisible=!1;var s=a.getVisual("style"),l=s.fill,u=Uu(S);u.fill=l,u.decal=s.decal;var c=Hu(w),d=Hu(M),p=Hu(I);B(i,l,s.opacity,null),i.setStyle(u),i.ensureState("emphasis").style=c,i.ensureState("blur").style=d,i.ensureState("select").style=p,Se(i)}e.add(i)}function O(t){!t.invisible&&r.push(t)}function B(e,i,n,o){var r=p.getModel(o?Bu:Ou),s=qe(p.get("name"),null),l=r.getShallow("show");kt(e,Et(p,o?Bu:Ou),{defaultText:l?s:null,inheritColor:i,defaultOpacity:n,labelFetcher:t,labelDataIndex:a.dataIndex});var u=e.getTextContent();if(u){var d=u.style,h=di(d.padding||0);o&&(e.setTextConfig({layoutRect:o}),u.disableLabelLayout=!0),u.beforeUpdate=function(){var t=Math.max((o?o.width:e.shape.width)-h[1]-h[3],0),i=Math.max((o?o.height:e.shape.height)-h[0]-h[2],0);d.width===t&&d.height===i||u.setStyle({width:t,height:i})},d.truncateMinChar=2,d.lineOverflow="truncate",G(d,o,c);var g=u.getState("emphasis");G(g?g.style:null,o,c)}}function G(e,i,n){var o=e?e.text:null;if(!i&&n.isLeafRoot&&null!=o){var r=t.get("drillDownIcon",!0);e.text=r?r+" "+o:o}}function F(t,n,r,a){var s=null!=v&&i[t][v],l=o[t];return s?(i[t][v]=null,W(l,s)):y||((s=new n)instanceof be&&(s.z2=function(t,e){return t*Gu+e}(r,a)),H(l,s)),e[t][m]=s}function W(t,e){var i=t[m]={};e instanceof Vu?(i.oldX=e.x,i.oldY=e.y):i.oldShape=E({},e.shape)}function H(t,e){var i=t[m]={},r=a.parentNode,s=e instanceof mt;if(r&&(!n||"drillDown"===n.direction)){var l=0,u=0,c=o.background[r.getRawIndex()];!n&&c&&c.oldShape&&(l=c.oldShape.width,u=c.oldShape.height),s?(i.oldX=0,i.oldY=u):i.oldShape={x:l,y:u,width:0,height:0}}i.fadein=!s}}(e,a,s,i,r,l,t,n,o,u)}!function t(e,i,n,o,r){o?(i=e,h(e,(function(t,e){!t.isRemoved()&&s(e,e)}))):new ai(i,e,a,a).add(s).update(s).remove(Ce(s,null)).execute();function a(t){return t.getId()}function s(a,s){var l=null!=a?e[a]:null,c=null!=s?i[s]:null,d=u(l,c,n,r);d&&t(l&&l.viewChildren||[],c&&c.viewChildren||[],d,o,r+1)}}(n.root?[n.root]:[],o&&o.root?[o.root]:[],t,n===o||!o,0);var c=function(t){var e={nodeGroup:[],background:[],content:[]};return t&&h(t,(function(t,i){var n=e[i];h(t,(function(t){t&&(n.push(t),ju(t).willDelete=!0)}))})),e}(s);return this._oldTree=n,this._storage=a,{lastsForAnimation:r,willDeleteEls:c,renderFinally:function(){h(c,(function(t){h(t,(function(t){t.parent&&t.parent.remove(t)}))})),h(l,(function(t){t.invisible=!0,t.dirty()}))}}},e.prototype._doAnimation=function(t,e,i,n){var o=i.get("animationDurationUpdate"),r=i.get("animationEasing"),a=(Q(o)?0:o)||0,s=(Q(r)?null:r)||"cubicOut",l=new Ru;h(e.willDeleteEls,(function(t,e){h(t,(function(t,i){if(!t.invisible){var o,r=t.parent,u=ju(r);if(n&&"drillDown"===n.direction)o=r===n.rootNodeGroup?{shape:{x:0,y:0,width:u.nodeWidth,height:u.nodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var c=0,d=0;u.willDelete||(c=u.nodeWidth/2,d=u.nodeHeight/2),o="nodeGroup"===e?{x:c,y:d,style:{opacity:0}}:{shape:{x:c,y:d,width:0,height:0},style:{opacity:0}}}o&&l.add(t,o,a,0,s)}}))})),h(this._storage,(function(t,i){h(t,(function(t,n){var o=e.lastsForAnimation[i][n],r={};o&&(t instanceof mt?null!=o.oldX&&(r.x=t.x,r.y=t.y,t.x=o.oldX,t.y=o.oldY):(o.oldShape&&(r.shape=E({},t.shape),t.setShape(o.oldShape)),o.fadein?(t.setStyle("opacity",0),r.style={opacity:1}):1!==t.style.opacity&&(r.style={opacity:1})),l.add(t,r,a,0,s))}))}),this),this._state="animating",l.finished(Bt((function(){this._state="ready",e.renderFinally()}),this)).start()},e.prototype._resetController=function(t){var e=this._controller;e||((e=this._controller=new _e(t.getZr())).enable(this.seriesModel.get("roam")),e.on("pan",Bt(this._onPan,this)),e.on("zoom",Bt(this._onZoom,this)));var i=new g(0,0,t.getWidth(),t.getHeight());e.setPointerChecker((function(t,e,n){return i.contain(e,n)}))},e.prototype._clearController=function(){var t=this._controller;t&&(t.dispose(),t=null)},e.prototype._onPan=function(t){if("animating"!==this._state&&(Math.abs(t.dx)>3||Math.abs(t.dy)>3)){var e=this.seriesModel.getData().tree.root;if(!e)return;var i=e.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 e=t.originX,i=t.originY;if("animating"!==this._state){var n=this.seriesModel.getData().tree.root;if(!n)return;var o=n.getLayout();if(!o)return;var r=new g(o.x,o.y,o.width,o.height),a=this.seriesModel.layoutInfo;e-=a.x,i-=a.y;var s=ye();fe(s,s,[-e,-i]),ge(s,s,[t.scale,t.scale]),fe(s,s,[e,i]),r.applyTransform(s),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:r.x,y:r.y,width:r.width,height:r.height}})}},e.prototype._initEvents=function(t){var e=this;t.on("click",(function(t){if("ready"===e._state){var i=e.seriesModel.get("nodeClick",!0);if(i){var n=e.findTarget(t.offsetX,t.offsetY);if(n){var o=n.node;if(o.getLayout().isLeafRoot)e._rootToNode(n);else if("zoomToNode"===i)e._zoomToNode(n);else if("link"===i){var r=o.hostTree.data.getItemModel(o.dataIndex),a=r.get("link",!0),s=r.get("target",!0)||"blank";a&&si(a,s)}}}}}),this)},e.prototype._renderBreadcrumb=function(t,e,i){var n=this;i||(i=null!=t.get("leafDepth",!0)?{node:t.getViewRoot()}:this.findTarget(e.getWidth()/2,e.getHeight()/2))||(i={node:t.getData().tree.root}),(this._breadcrumb||(this._breadcrumb=new Eu(this.group))).render(t,e,i.node,(function(e){"animating"!==n._state&&(xu(t.getViewRoot(),e)?n._rootToNode({node:e}):n._zoomToNode({node:e}))}))},e.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage={nodeGroup:[],background:[],content:[]},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,e){var i;return this.seriesModel.getViewRoot().eachNode({attr:"viewChildren",order:"preorder"},(function(n){var o=this._storage.background[n.getRawIndex()];if(o){var r=o.transformCoordToLocal(t,e),a=o.shape;if(!(a.x<=r[0]&&r[0]<=a.x+a.width&&a.y<=r[1]&&r[1]<=a.y+a.height))return!1;i={node:n,offsetX:r[0],offsetY:r[1]}}}),this),i},e.type="treemap",e}(St);var Yu=Xu,Zu=h,qu=dt,Ju=-1,Qu=function(){function t(e){var i=e.mappingMethod,n=e.type,o=this.option=J(e);this.type=n,this.mappingMethod=i,this._normalizeData=sc[i];var r=t.visualHandlers[n];this.applyVisual=r.applyVisual,this.getColorMapper=r.getColorMapper,this._normalizedToVisual=r._normalizedToVisual[i],"piecewise"===i?(Ku(o),function(t){var e=t.pieceList;t.hasSpecialVisual=!1,h(e,(function(e,i){e.originIndex=i,null!=e.visual&&(t.hasSpecialVisual=!0)}))}(o)):"category"===i?o.categories?function(t){var e=t.categories,i=t.categoryMap={},n=t.visual;if(Zu(e,(function(t,e){i[t]=e})),!ct(n)){var o=[];dt(n)?Zu(n,(function(t,e){var n=i[e];o[null!=n?n:Ju]=t})):o[-1]=n,n=ac(t,o)}for(var r=e.length-1;r>=0;r--)null==n[r]&&(delete i[e[r]],e.pop())}(o):Ku(o,!0):(Z("linear"!==i||o.dataExtent),Ku(o))}return t.prototype.mapValueToVisual=function(t){var e=this._normalizeData(t);return this._normalizedToVisual(e,t)},t.prototype.getNormalizer=function(){return Bt(this._normalizeData,this)},t.listVisualTypes=function(){return T(t.visualHandlers)},t.isValidType=function(e){return t.visualHandlers.hasOwnProperty(e)},t.eachVisual=function(t,e,i){dt(t)?h(t,e,i):e.call(i,t)},t.mapVisual=function(e,i,n){var o,r=ct(e)?[]:dt(e)?{}:(o=!0,null);return t.eachVisual(e,(function(t,e){var a=i.call(n,t,e);o?r=a:r[e]=a})),r},t.retrieveVisuals=function(e){var i,n={};return e&&Zu(t.visualHandlers,(function(t,o){e.hasOwnProperty(o)&&(n[o]=e[o],i=!0)})),i?n:null},t.prepareVisualTypes=function(t){if(ct(t))t=t.slice();else{if(!qu(t))return[];var e=[];Zu(t,(function(t,i){e.push(i)})),t=e}return t.sort((function(t,e){return"color"===e&&"color"!==t&&0===t.indexOf("color")?1:-1})),t},t.dependsOn=function(t,e){return"color"===e?!(!t||0!==t.indexOf(e)):t===e},t.findPieceIndex=function(t,e,i){for(var n,o=1/0,r=0,a=e.length;r<a;r++){var s=e[r].value;if(null!=s){if(s===t||N(s)&&s===t+"")return r;i&&d(s,r)}}for(r=0,a=e.length;r<a;r++){var l=e[r],u=l.interval,c=l.close;if(u){if(u[0]===-1/0){if(lc(c[1],t,u[1]))return r}else if(u[1]===1/0){if(lc(c[0],u[0],t))return r}else if(lc(c[0],u[0],t)&&lc(c[1],t,u[1]))return r;i&&d(u[0],r),i&&d(u[1],r)}}if(i)return t===1/0?e.length-1:t===-1/0?0:n;function d(e,i){var r=Math.abs(e-t);r<o&&(o=r,n=i)}},t.visualHandlers={color:{applyVisual:ec("color"),getColorMapper:function(){var t=this.option;return Bt("category"===t.mappingMethod?function(t,e){return!e&&(t=this._normalizeData(t)),ic.call(this,t)}:function(e,i,n){var o=!!n;return!i&&(e=this._normalizeData(e)),n=pi(e,t.parsedVisual,n),o?n:hi(n,"rgba")},this)},_normalizedToVisual:{linear:function(t){return hi(pi(t,this.option.parsedVisual),"rgba")},category:ic,piecewise:function(t,e){var i=rc.call(this,e);return null==i&&(i=hi(pi(t,this.option.parsedVisual),"rgba")),i},fixed:nc}},colorHue:$u((function(t,e){return yi(t,e)})),colorSaturation:$u((function(t,e){return yi(t,null,e)})),colorLightness:$u((function(t,e){return yi(t,null,null,e)})),colorAlpha:$u((function(t,e){return mi(t,e)})),decal:{applyVisual:ec("decal"),_normalizedToVisual:{linear:null,category:ic,piecewise:null,fixed:null}},opacity:{applyVisual:ec("opacity"),_normalizedToVisual:oc([0,1])},liftZ:{applyVisual:ec("liftZ"),_normalizedToVisual:{linear:nc,category:nc,piecewise:nc,fixed:nc}},symbol:{applyVisual:function(t,e,i){i("symbol",this.mapValueToVisual(t))},_normalizedToVisual:{linear:tc,category:ic,piecewise:function(t,e){var i=rc.call(this,e);return null==i&&(i=tc.call(this,t)),i},fixed:nc}},symbolSize:{applyVisual:ec("symbolSize"),_normalizedToVisual:oc([0,1])}},t}();function Ku(t,e){var i=t.visual,n=[];dt(i)?Zu(i,(function(t){n.push(t)})):null!=i&&n.push(i);e||1!==n.length||{color:1,symbol:1}.hasOwnProperty(t.type)||(n[1]=n[0]),ac(t,n)}function $u(t){return{applyVisual:function(e,i,n){var o=this.mapValueToVisual(e);n("color",t(i("color"),o))},_normalizedToVisual:oc([0,1])}}function tc(t){var e=this.option.visual;return e[Math.round(gi(t,[0,1],[0,e.length-1],!0))]||{}}function ec(t){return function(e,i,n){n(t,this.mapValueToVisual(e))}}function ic(t){var e=this.option.visual;return e[this.option.loop&&t!==Ju?t%e.length:t]}function nc(){return this.option.visual[0]}function oc(t){return{linear:function(e){return gi(e,t,this.option.visual,!0)},category:ic,piecewise:function(e,i){var n=rc.call(this,i);return null==n&&(n=gi(e,t,this.option.visual,!0)),n},fixed:nc}}function rc(t){var e=this.option,i=e.pieceList;if(e.hasSpecialVisual){var n=i[Qu.findPieceIndex(t,i)];if(n&&n.visual)return n.visual[this.type]}}function ac(t,e){return t.visual=e,"color"===t.type&&(t.parsedVisual=b(e,(function(t){var e=fi(t);return e||Ee("'"+t+"' is an illegal color, fallback to '#000000'",!0),e||[0,0,0,1]}))),e}var sc={linear:function(t){return gi(t,this.option.dataExtent,[0,1],!0)},piecewise:function(t){var e=this.option.pieceList,i=Qu.findPieceIndex(t,e,!0);if(null!=i)return gi(i,[0,e.length-1],[0,1],!0)},category:function(t){var e=this.option.categories?this.option.categoryMap[t]:t;return null==e?Ju:e},fixed:gt};function lc(t,e,i){return t?e<=i:e<i}var uc=Qu,cc=ve(),dc={seriesType:"treemap",reset:function(t){var e=t.getData().tree.root;e.isRemoved()||pc(e,{},t.getViewRoot().getAncestors(),t)}};function pc(t,e,i,n){var o=t.getModel(),r=t.getLayout(),a=t.hostTree.data;if(r&&!r.invisible&&r.isInView){var s,l=o.getModel("itemStyle"),u=function(t,e,i){var n=E({},e),o=i.designatedVisualItemStyle;return h(["color","colorAlpha","colorSaturation"],(function(i){o[i]=e[i];var r=t.get(i);o[i]=null,null!=r&&(n[i]=r)})),n}(l,e,n),c=a.ensureUniqueItemVisual(t.dataIndex,"style"),d=l.get("borderColor"),p=l.get("borderColorSaturation");null!=p&&(d=function(t,e){return null!=e?yi(e,null,null,t):null}(p,s=hc(u))),c.stroke=d;var g=t.viewChildren;if(g&&g.length){var f=function(t,e,i,n,o,r){if(!r||!r.length)return;var a=fc(e,"color")||null!=o.color&&"none"!==o.color&&(fc(e,"colorAlpha")||fc(e,"colorSaturation"));if(!a)return;var s=e.get("visualMin"),l=e.get("visualMax"),u=i.dataExtent.slice();null!=s&&s<u[0]&&(u[0]=s),null!=l&&l>u[1]&&(u[1]=l);var c=e.get("colorMappingBy"),d={type:a.name,dataExtent:u,visual:a.range};"color"!==d.type||"index"!==c&&"id"!==c?d.mappingMethod="linear":(d.mappingMethod="category",d.loop=!0);var p=new uc(d);return cc(p).drColorMappingBy=c,p}(0,o,r,0,u,g);h(g,(function(t,e){if(t.depth>=i.length||t===i[t.depth]){var r=function(t,e,i,n,o,r){var a=E({},e);if(o){var s=o.type,l="color"===s&&cc(o).drColorMappingBy,u="index"===l?n:"id"===l?r.mapIdToIndex(i.getId()):i.getValue(t.get("visualDimension"));a[s]=o.mapValueToVisual(u)}return a}(o,u,t,e,f,n);pc(t,r,i,n)}}))}else s=hc(u),c.fill=s}}function hc(t){var e=gc(t,"color");if(e){var i=gc(t,"colorAlpha"),n=gc(t,"colorSaturation");return n&&(e=yi(e,null,null,n)),i&&(e=mi(e,i)),e}}function gc(t,e){var i=t[e];if(null!=i&&"none"!==i)return i}function fc(t,e){var i=t.get(e);return ct(i)&&i.length?{name:e,range:i}:null}var yc=Math.max,mc=Math.min,vc=ze,xc=h,_c=["itemStyle","borderWidth"],bc=["itemStyle","gapWidth"],Sc=["upperLabel","show"],wc=["upperLabel","height"],Mc={seriesType:"treemap",reset:function(t,e,i,n){var o=i.getWidth(),r=i.getHeight(),a=t.option,s=Oe(t.getBoxLayoutParams(),{width:i.getWidth(),height:i.getHeight()}),l=a.size||[],u=ee(vc(s.width,l[0]),o),c=ee(vc(s.height,l[1]),r),d=n&&n.type,p=mu(n,["treemapZoomToNode","treemapRootToNode"],t),h="treemapRender"===d||"treemapMove"===d?n.rootRect:null,f=t.getViewRoot(),y=vu(f);if("treemapMove"!==d){var m="treemapZoomToNode"===d?function(t,e,i,n,o){var r,a=(e||{}).node,s=[n,o];if(!a||a===i)return s;var l=n*o,u=l*t.option.zoomToNodeRatio;for(;r=a.parentNode;){for(var c=0,d=r.children,p=0,h=d.length;p<h;p++)c+=d[p].getValue();var g=a.getValue();if(0===g)return s;u*=c/g;var f=r.getModel(),y=f.get(_c);(u+=4*y*y+(3*y+Math.max(y,Cc(f)))*Math.pow(u,.5))>vi&&(u=vi),a=r}u<l&&(u=l);var m=Math.pow(u/l,.5);return[n*m,o*m]}(t,p,f,u,c):h?[h.width,h.height]:[u,c],v=a.sort;v&&"asc"!==v&&"desc"!==v&&(v="desc");var x={squareRatio:a.squareRatio,sort:v,leafDepth:a.leafDepth};f.hostTree.clearLayouts();var _={x:0,y:0,width:m[0],height:m[1],area:m[0]*m[1]};f.setLayout(_),Ic(f,x,!1,0),_=f.getLayout(),xc(y,(function(t,e){var i=(y[e+1]||f).getValue();t.setLayout(E({dataExtent:[i,i],borderWidth:0,upperHeight:0},_))}))}var b=t.getData().tree.root;b.setLayout(function(t,e,i){if(e)return{x:e.x,y:e.y};var n={x:0,y:0};if(!i)return n;var o=i.node,r=o.getLayout();if(!r)return n;var a=[r.width/2,r.height/2],s=o;for(;s;){var l=s.getLayout();a[0]+=l.x,a[1]+=l.y,s=s.parentNode}return{x:t.width/2-a[0],y:t.height/2-a[1]}}(s,h,p),!0),t.setLayoutInfo(s),Tc(b,new g(-s.x,-s.y,o,r),y,f,0)}};function Ic(t,e,i,n){var o,r;if(!t.isRemoved()){var a=t.getLayout();o=a.width,r=a.height;var s=t.getModel(),l=s.get(_c),u=s.get(bc)/2,c=Cc(s),d=Math.max(l,c),p=l-u,h=d-u;t.setLayout({borderWidth:l,upperHeight:d,upperLabelHeight:c},!0);var g=(o=yc(o-2*p,0))*(r=yc(r-p-h,0)),f=function(t,e,i,n,o,r){var a=t.children||[],s=n.sort;"asc"!==s&&"desc"!==s&&(s=null);var l=null!=n.leafDepth&&n.leafDepth<=r;if(o&&!l)return t.viewChildren=[];a=S(a,(function(t){return!t.isRemoved()})),function(t,e){e&&t.sort((function(t,i){var n="asc"===e?t.getValue()-i.getValue():i.getValue()-t.getValue();return 0===n?"asc"===e?t.dataIndex-i.dataIndex:i.dataIndex-t.dataIndex:n}))}(a,s);var u=function(t,e,i){for(var n=0,o=0,r=e.length;o<r;o++)n+=e[o].getValue();var a,s=t.get("visualDimension");e&&e.length?"value"===s&&i?(a=[e[e.length-1].getValue(),e[0].getValue()],"asc"===i&&a.reverse()):(a=[1/0,-1/0],xc(e,(function(t){var e=t.getValue(s);e<a[0]&&(a[0]=e),e>a[1]&&(a[1]=e)}))):a=[NaN,NaN];return{sum:n,dataExtent:a}}(e,a,s);if(0===u.sum)return t.viewChildren=[];if(u.sum=function(t,e,i,n,o){if(!n)return i;for(var r=t.get("visibleMin"),a=o.length,s=a,l=a-1;l>=0;l--){var u=o["asc"===n?a-l-1:l].getValue();u/i*e<r&&(s=l,i-=u)}return"asc"===n?o.splice(0,a-s):o.splice(s,a-s),i}(e,i,u.sum,s,a),0===u.sum)return t.viewChildren=[];for(var c=0,d=a.length;c<d;c++){var p=a[c].getValue()/u.sum*i;a[c].setLayout({area:p})}l&&(a.length&&t.setLayout({isLeafRoot:!0},!0),a.length=0);return t.viewChildren=a,t.setLayout({dataExtent:u.dataExtent},!0),a}(t,s,g,e,i,n);if(f.length){var y={x:p,y:h,width:o,height:r},m=mc(o,r),v=1/0,x=[];x.area=0;for(var _=0,b=f.length;_<b;){var w=f[_];x.push(w),x.area+=w.getLayout().area;var M=Ac(x,m,e.squareRatio);M<=v?(_++,v=M):(x.area-=x.pop().getLayout().area,Dc(x,m,y,u,!1),m=mc(y.width,y.height),x.length=x.area=0,v=1/0)}if(x.length&&Dc(x,m,y,u,!0),!i){var I=s.get("childrenVisibleMin");null!=I&&g<I&&(i=!0)}for(_=0,b=f.length;_<b;_++)Ic(f[_],e,i,n+1)}}}function Ac(t,e,i){for(var n=0,o=1/0,r=0,a=void 0,s=t.length;r<s;r++)(a=t[r].getLayout().area)&&(a<o&&(o=a),a>n&&(n=a));var l=t.area*t.area,u=e*e*i;return l?yc(u*n/l,l/(u*o)):1/0}function Dc(t,e,i,n,o){var r=e===i.width?0:1,a=1-r,s=["x","y"],l=["width","height"],u=i[s[r]],c=e?t.area/e:0;(o||c>i[l[a]])&&(c=i[l[a]]);for(var d=0,p=t.length;d<p;d++){var h=t[d],g={},f=c?h.getLayout().area/c:0,y=g[l[a]]=yc(c-2*n,0),m=i[s[r]]+i[l[r]]-u,v=d===p-1||m<f?m:f,x=g[l[r]]=yc(v-2*n,0);g[s[a]]=i[s[a]]+mc(n,y/2),g[s[r]]=u+mc(n,x/2),u+=v,h.setLayout(g,!0)}i[s[a]]+=c,i[l[a]]-=c}function Tc(t,e,i,n,o){var r=t.getLayout(),a=i[o],s=a&&a===t;if(!(a&&!s||o===i.length&&t!==n)){t.setLayout({isInView:!0,invisible:!s&&!e.intersect(r),isAboveViewRoot:s},!0);var l=new g(e.x-r.x,e.y-r.y,e.width,e.height);xc(t.viewChildren||[],(function(t){Tc(t,l,i,n,o+1)}))}}function Cc(t){return t.get(Sc)?t.get(wc):0}function Lc(t){var e=t.findComponents({mainType:"legend"});e&&e.length&&t.eachSeriesByType("graph",(function(t){var i=t.getCategoriesData(),n=t.getGraph().data,o=i.mapArray(i.getName);n.filterSelf((function(t){var i=n.getItemModel(t).getShallow("category");if(null!=i){O(i)&&(i=o[i]);for(var r=0;r<e.length;r++)if(!e[r].isSelected(i))return!1}return!0}))}))}function Nc(t){var e={};t.eachSeriesByType("graph",(function(t){var i=t.getCategoriesData(),n=t.getData(),o={};i.each((function(n){var r=i.getName(n);o["ec-"+r]=n;var a=i.getItemModel(n),s=a.getModel("itemStyle").getItemStyle();s.fill||(s.fill=t.getColorFromPalette(r,e)),i.setItemVisual(n,"style",s);for(var l=["symbol","symbolSize","symbolKeepAspect"],u=0;u<l.length;u++){var c=a.getShallow(l[u],!0);null!=c&&i.setItemVisual(n,l[u],c)}})),i.count()&&n.each((function(t){var e=n.getItemModel(t).getShallow("category");if(null!=e){N(e)&&(e=o["ec-"+e]);var r=i.getItemVisual(e,"style"),a=n.ensureUniqueItemVisual(t,"style");E(a,r);for(var s=["symbol","symbolSize","symbolKeepAspect"],l=0;l<s.length;l++)n.setItemVisual(t,s[l],i.getItemVisual(e,s[l]))}}))}))}function Pc(t){return t instanceof Array||(t=[t,t]),t}function kc(t){t.eachSeriesByType("graph",(function(t){var e=t.getGraph(),i=t.getEdgeData(),n=Pc(t.get("edgeSymbol")),o=Pc(t.get("edgeSymbolSize"));i.setVisual("fromSymbol",n&&n[0]),i.setVisual("toSymbol",n&&n[1]),i.setVisual("fromSymbolSize",o&&o[0]),i.setVisual("toSymbolSize",o&&o[1]),i.setVisual("style",t.getModel("lineStyle").getLineStyle()),i.each((function(t){var n=i.getItemModel(t),o=e.getEdgeByIndex(t),r=Pc(n.getShallow("symbol",!0)),a=Pc(n.getShallow("symbolSize",!0)),s=n.getModel("lineStyle").getLineStyle(),l=i.ensureUniqueItemVisual(t,"style");switch(E(l,s),l.stroke){case"source":var u=o.node1.getVisual("style");l.stroke=u&&u.fill;break;case"target":u=o.node2.getVisual("style");l.stroke=u&&u.fill}r[0]&&o.setVisual("fromSymbol",r[0]),r[1]&&o.setVisual("toSymbol",r[1]),a[0]&&o.setVisual("fromSymbolSize",a[0]),a[1]&&o.setVisual("toSymbolSize",a[1])}))}))}var Ec="--\x3e",Rc=function(t){return t.get("autoCurveness")||null},Vc=function(t,e){var i=Rc(t),n=20,o=[];if(O(i))n=i;else if(ct(i))return void(t.__curvenessList=i);e>n&&(n=e);var r=n%2?n+2:n+3;o=[];for(var a=0;a<r;a++)o.push((a%2?a+1:a)/10*(a%2?-1:1));t.__curvenessList=o},zc=function(t,e,i){var n=[t.id,t.dataIndex].join("."),o=[e.id,e.dataIndex].join(".");return[i.uid,n,o].join(Ec)},Oc=function(t){var e=t.split(Ec);return[e[0],e[2],e[1]].join(Ec)},Bc=function(t,e){var i=e.__edgeMap;return i[t]?i[t].length:0};function Gc(t,e,i,n){var o=Rc(e),r=ct(o);if(!o)return null;var a=function(t,e){var i=zc(t.node1,t.node2,e);return e.__edgeMap[i]}(t,e);if(!a)return null;for(var s=-1,l=0;l<a.length;l++)if(a[l]===i){s=l;break}var u=function(t,e){return Bc(zc(t.node1,t.node2,e),e)+Bc(zc(t.node2,t.node1,e),e)}(t,e);Vc(e,u),t.lineStyle=t.lineStyle||{};var c=zc(t.node1,t.node2,e),d=e.__curvenessList,p=r||u%2?0:1;if(a.isForward)return d[p+s];var h=Oc(c),g=Bc(h,e),f=d[s+g+p];return n?r?o&&0===o[0]?(g+p)%2?f:-f:((g%2?0:1)+p)%2?f:-f:(g+p)%2?f:-f:d[s+g+p]}function Fc(t){var e=t.coordinateSystem;if(!e||"view"===e.type){var i=t.getGraph();i.eachNode((function(t){var e=t.getModel();t.setLayout([+e.get("x"),+e.get("y")])})),Wc(i,t)}}function Wc(t,e){t.eachEdge((function(t,i){var n=xi(t.getModel().get(["lineStyle","curveness"]),-Gc(t,e,i,!0),0),o=_i(t.node1.getLayout()),r=_i(t.node2.getLayout()),a=[o,r];+n&&a.push([(o[0]+r[0])/2-(o[1]-r[1])*n,(o[1]+r[1])/2-(r[0]-o[0])*n]),t.setLayout(a)}))}function Hc(t,e){t.eachSeriesByType("graph",(function(t){var e=t.get("layout"),i=t.coordinateSystem;if(i&&"view"!==i.type){var n=t.getData(),o=[];h(i.dimensions,(function(t){o=o.concat(n.mapDimensionsAll(t))}));for(var r=0;r<n.count();r++){for(var a=[],s=!1,l=0;l<o.length;l++){var u=n.get(o[l],r);isNaN(u)||(s=!0),a.push(u)}s?n.setItemLayout(r,i.dataToPoint(a)):n.setItemLayout(r,[NaN,NaN])}Wc(n.graph,t)}else e&&"none"!==e||Fc(t)}))}function Uc(t){var e=t.coordinateSystem;if("view"!==e.type)return 1;var i=t.option.nodeScaleRatio,n=e.scaleX;return((e.getZoom()-1)*i+1)/n}function jc(t){var e=t.getVisual("symbolSize");return e instanceof Array&&(e=(e[0]+e[1])/2),+e}var Xc=Math.PI,Yc=[];function Zc(t,e,i,n){var o=t.coordinateSystem;if(!o||"view"===o.type){var r=o.getBoundingRect(),a=t.getData(),s=a.graph,l=r.width/2+r.x,u=r.height/2+r.y,c=Math.min(r.width,r.height)/2,d=a.count();if(a.setLayout({cx:l,cy:u}),d){if(i){var p=o.pointToData(n),h=p[0],g=p[1],f=[h-l,g-u];bi(f,f),Si(f,f,c),i.setLayout([l+f[0],u+f[1]],!0),Jc(i,t.get(["circular","rotateLabel"]),l,u)}qc[e](t,s,a,c,l,u,d),s.eachEdge((function(e,i){var n,o=xi(e.getModel().get(["lineStyle","curveness"]),Gc(e,t,i),0),r=_i(e.node1.getLayout()),a=_i(e.node2.getLayout()),s=(r[0]+a[0])/2,c=(r[1]+a[1])/2;+o&&(n=[l*(o*=3)+s*(1-o),u*o+c*(1-o)]),e.setLayout([r,a,n])}))}}}var qc={value:function(t,e,i,n,o,r,a){var s=0,l=i.getSum("value"),u=2*Math.PI/(l||a);e.eachNode((function(t){var e=t.getValue("value"),i=u*(l?e:1)/2;s+=i,t.setLayout([n*Math.cos(s)+o,n*Math.sin(s)+r]),s+=i}))},symbolSize:function(t,e,i,n,o,r,a){var s=0;Yc.length=a;var l=Uc(t);e.eachNode((function(t){var e=jc(t);isNaN(e)&&(e=2),e<0&&(e=0),e*=l;var i=Math.asin(e/2/n);isNaN(i)&&(i=Xc/2),Yc[t.dataIndex]=i,s+=2*i}));var u=(2*Xc-s)/a/2,c=0;e.eachNode((function(t){var e=u+Yc[t.dataIndex];c+=e,(!t.getLayout()||!t.getLayout().fixed)&&t.setLayout([n*Math.cos(c)+o,n*Math.sin(c)+r]),c+=e}))}};function Jc(t,e,i,n){var o=t.getGraphicEl();if(o){var r=t.getModel().get(["label","rotate"])||0,a=o.getSymbolPath();if(e){var s=t.getLayout(),l=Math.atan2(s[1]-n,s[0]-i);l<0&&(l=2*Math.PI+l);var u=s[0]<i;u&&(l-=Math.PI);var c=u?"left":"right";a.setTextConfig({rotation:-l,position:c,origin:"center"});var d=a.ensureState("emphasis");E(d.textConfig||(d.textConfig={}),{position:c})}else a.setTextConfig({rotation:r*=Math.PI/180})}}function Qc(t){t.eachSeriesByType("graph",(function(t){"circular"===t.get("layout")&&Zc(t,"symbolSize")}))}var Kc=Di;function $c(t){t.eachSeriesByType("graph",(function(t){var e=t.coordinateSystem;if(!e||"view"===e.type)if("force"===t.get("layout")){var i=t.preservedPoints||{},n=t.getGraph(),o=n.data,r=n.edgeData,a=t.getModel("force"),s=a.get("initLayout");t.preservedPoints?o.each((function(t){var e=o.getId(t);o.setItemLayout(t,i[e]||[NaN,NaN])})):s&&"none"!==s?"circular"===s&&Zc(t,"value"):Fc(t);var l=o.getDataExtent("value"),u=r.getDataExtent("value"),c=a.get("repulsion"),d=a.get("edgeLength"),p=ct(c)?c:[c,c],h=ct(d)?d:[d,d];h=[h[1],h[0]];var g=o.mapArray("value",(function(t,e){var i=o.getItemLayout(e),n=gi(t,l,p);return isNaN(n)&&(n=(p[0]+p[1])/2),{w:n,rep:n,fixed:o.getItemModel(e).get("fixed"),p:!i||isNaN(i[0])||isNaN(i[1])?null:i}})),f=r.mapArray("value",(function(e,i){var o=n.getEdgeByIndex(i),r=gi(e,u,h);isNaN(r)&&(r=(h[0]+h[1])/2);var a=o.getModel(),s=xi(o.getModel().get(["lineStyle","curveness"]),-Gc(o,t,i,!0),0);return{n1:g[o.node1.dataIndex],n2:g[o.node2.dataIndex],d:r,curveness:s,ignoreForceLayout:a.get("ignoreForceLayout")}})),y=e.getBoundingRect(),m=function(t,e,i){for(var n=t,o=e,r=i.rect,a=r.width,s=r.height,l=[r.x+a/2,r.y+s/2],u=null==i.gravity?.1:i.gravity,c=0;c<n.length;c++){var d=n[c];d.p||(d.p=wi(a*(Math.random()-.5)+l[0],s*(Math.random()-.5)+l[1])),d.pp=_i(d.p),d.edges=null}var p,h,g=null==i.friction?.6:i.friction,f=g;return{warmUp:function(){f=.8*g},setFixed:function(t){n[t].fixed=!0},setUnfixed:function(t){n[t].fixed=!1},beforeStep:function(t){p=t},afterStep:function(t){h=t},step:function(t){p&&p(n,o);for(var e=[],i=n.length,r=0;r<o.length;r++){var a=o[r];if(!a.ignoreForceLayout){var s=a.n1,c=a.n2;Mi(e,c.p,s.p);var d=Ii(e)-a.d,g=c.w/(s.w+c.w);isNaN(g)&&(g=0),bi(e,e),!s.fixed&&Kc(s.p,s.p,e,g*d*f),!c.fixed&&Kc(c.p,c.p,e,-(1-g)*d*f)}}for(r=0;r<i;r++)(x=n[r]).fixed||(Mi(e,l,x.p),Kc(x.p,x.p,e,u*f));for(r=0;r<i;r++){s=n[r];for(var y=r+1;y<i;y++){c=n[y],Mi(e,c.p,s.p),0===(d=Ii(e))&&(Ai(e,Math.random()-.5,Math.random()-.5),d=1);var m=(s.rep+c.rep)/d/d;!s.fixed&&Kc(s.pp,s.pp,e,m),!c.fixed&&Kc(c.pp,c.pp,e,-m)}}var v=[];for(r=0;r<i;r++){var x;(x=n[r]).fixed||(Mi(v,x.p,x.pp),Kc(x.p,x.p,v,f),ke(x.pp,x.p))}var _=(f*=.992)<.01;h&&h(n,o,_),t&&t(_)}}}(g,f,{rect:y,gravity:a.get("gravity"),friction:a.get("friction")});m.beforeStep((function(t,e){for(var i=0,o=t.length;i<o;i++)t[i].fixed&&ke(t[i].p,n.getNodeByIndex(i).getLayout())})),m.afterStep((function(t,e,r){for(var a=0,s=t.length;a<s;a++)t[a].fixed||n.getNodeByIndex(a).setLayout(t[a].p),i[o.getId(a)]=t[a].p;for(a=0,s=e.length;a<s;a++){var l=e[a],u=n.getEdgeByIndex(a),c=l.n1.p,d=l.n2.p,p=u.getLayout();(p=p?p.slice():[])[0]=p[0]||[],p[1]=p[1]||[],ke(p[0],c),ke(p[1],d),+l.curveness&&(p[2]=[(c[0]+d[0])/2-(c[1]-d[1])*l.curveness,(c[1]+d[1])/2-(d[0]-c[0])*l.curveness]),u.setLayout(p)}})),t.forceLayout=m,t.preservedPoints=i,m.step()}else t.forceLayout=null}))}function td(t,e){var i=[];return t.eachSeriesByType("graph",(function(t){var n=t.get("coordinateSystem");if(!n||"view"===n){var o=t.getData(),r=o.mapArray((function(t){var e=o.getItemModel(t);return[+e.get("x"),+e.get("y")]})),a=[],s=[];He(r,a,s),s[0]-a[0]==0&&(s[0]+=1,a[0]-=1),s[1]-a[1]==0&&(s[1]+=1,a[1]-=1);var l=(s[0]-a[0])/(s[1]-a[1]),u=function(t,e,i){var n=E(t.getBoxLayoutParams(),{aspect:i});return Oe(n,{width:e.getWidth(),height:e.getHeight()})}(t,e,l);isNaN(l)&&(a=[u.x,u.y],s=[u.x+u.width,u.y+u.height]);var c=s[0]-a[0],d=s[1]-a[1],p=u.width,h=u.height,g=t.coordinateSystem=new wl;g.zoomLimit=t.get("scaleLimit"),g.setBoundingRect(a[0],a[1],c,d),g.setViewRect(u.x,u.y,p,h),g.setCenter(t.get("center"),e),g.setZoom(t.get("zoom")),i.push(g)}})),i}var ed=se.prototype,id=Ye.prototype,nd=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1};function od(t){return isNaN(+t.cpx1)||isNaN(+t.cpy1)}!function(t){function e(){return null!==t&&t.apply(this,arguments)||this}p(e,t)}(nd);var rd=function(t){function e(e){var i=t.call(this,e)||this;return i.type="ec-line",i}return p(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new nd},e.prototype.buildPath=function(t,e){od(e)?ed.buildPath.call(this,t,e):id.buildPath.call(this,t,e)},e.prototype.pointAt=function(t){return od(this.shape)?ed.pointAt.call(this,t):id.pointAt.call(this,t)},e.prototype.tangentAt=function(t){var e=this.shape,i=od(e)?[e.x2-e.x1,e.y2-e.y1]:id.tangentAt.call(this,t);return bi(i,i)},e}(B),ad=["fromSymbol","toSymbol"];function sd(t){return"_"+t+"Type"}function ld(t,e,i){var n=e.getItemVisual(i,t);if(!n||"none"===n)return n;var o=e.getItemVisual(i,t+"Size"),r=e.getItemVisual(i,t+"Rotate"),a=e.getItemVisual(i,t+"Offset"),s=e.getItemVisual(i,t+"KeepAspect"),l=zt(o);return n+l+Pi(a||0,l)+(r||"")+(s||"")}function ud(t,e,i){var n=e.getItemVisual(i,t);if(n&&"none"!==n){var o=e.getItemVisual(i,t+"Size"),r=e.getItemVisual(i,t+"Rotate"),a=e.getItemVisual(i,t+"Offset"),s=e.getItemVisual(i,t+"KeepAspect"),l=zt(o),u=Pi(a||0,l),c=vt(n,-l[0]/2+u[0],-l[1]/2+u[1],l[0],l[1],null,s);return c.__specifiedRotation=null==r||isNaN(r)?void 0:+r*Math.PI/180||0,c.name=t,c}}function cd(t,e){t.x1=e[0][0],t.y1=e[0][1],t.x2=e[1][0],t.y2=e[1][1],t.percent=1;var i=e[2];i?(t.cpx1=i[0],t.cpy1=i[1]):(t.cpx1=NaN,t.cpy1=NaN)}var dd=function(t){function e(e,i,n){var o=t.call(this)||this;return o._createLine(e,i,n),o}return p(e,t),e.prototype._createLine=function(t,e,i){var n=t.hostModel,o=function(t){var e=new rd({name:"line",subPixelOptimize:!0});return cd(e.shape,t),e}(t.getItemLayout(e));o.shape.percent=0,Tt(o,{shape:{percent:1}},n,e),this.add(o),h(ad,(function(i){var n=ud(i,t,e);this.add(n),this[sd(i)]=ld(i,t,e)}),this),this._updateCommonStl(t,e,i)},e.prototype.updateData=function(t,e,i){var n=t.hostModel,o=this.childOfName("line"),r=t.getItemLayout(e),a={shape:{}};cd(a.shape,r),Lt(o,a,n,e),h(ad,(function(i){var n=ld(i,t,e),o=sd(i);if(this[o]!==n){this.remove(this.childOfName(i));var r=ud(i,t,e);this.add(r)}this[o]=n}),this),this._updateCommonStl(t,e,i)},e.prototype.getLinePath=function(){return this.childAt(0)},e.prototype._updateCommonStl=function(t,e,i){var n=t.hostModel,o=this.childOfName("line"),r=i&&i.emphasisLineStyle,a=i&&i.blurLineStyle,s=i&&i.selectLineStyle,l=i&&i.labelStatesModels,u=i&&i.emphasisDisabled,c=i&&i.focus,d=i&&i.blurScope;if(!i||t.hasItemOption){var p=t.getItemModel(e),g=p.getModel("emphasis");r=g.getModel("lineStyle").getLineStyle(),a=p.getModel(["blur","lineStyle"]).getLineStyle(),s=p.getModel(["select","lineStyle"]).getLineStyle(),u=g.get("disabled"),c=g.get("focus"),d=g.get("blurScope"),l=Et(p)}var f=t.getItemVisual(e,"style"),y=f.stroke;o.useStyle(f),o.style.fill=null,o.style.strokeNoScale=!0,o.ensureState("emphasis").style=r,o.ensureState("blur").style=a,o.ensureState("select").style=s,h(ad,(function(t){var e=this.childOfName(t);if(e){e.setColor(y),e.style.opacity=f.opacity;for(var i=0;i<Ti.length;i++){var n=Ti[i],r=o.getState(n);if(r){var a=r.style||{},s=e.ensureState(n),l=s.style||(s.style={});null!=a.stroke&&(l[e.__isEmptyBrush?"stroke":"fill"]=a.stroke),null!=a.opacity&&(l.opacity=a.opacity)}}e.markRedraw()}}),this);var m=n.getRawValue(e);kt(this,l,{labelDataIndex:e,labelFetcher:{getFormattedLabel:function(e,i){return n.getFormattedLabel(e,i,t.dataType)}},inheritColor:y||"#000",defaultOpacity:f.opacity,defaultText:(null==m?t.getName(e):isFinite(m)?Ci(m):m)+""});var v=this.getTextContent();if(v){var x=l.normal;v.__align=v.style.align,v.__verticalAlign=v.style.verticalAlign,v.__position=x.get("position")||"middle";var _=x.get("distance");ct(_)||(_=[_,_]),v.__labelDistance=_}this.setTextConfig({position:null,local:!0,inside:!1}),Rt(this,c,d,u)},e.prototype.highlight=function(){Li(this)},e.prototype.downplay=function(){Ni(this)},e.prototype.updateLayout=function(t,e){this.setLinePoints(t.getItemLayout(e))},e.prototype.setLinePoints=function(t){var e=this.childOfName("line");cd(e.shape,t),e.dirty()},e.prototype.beforeUpdate=function(){var t=this,e=t.childOfName("fromSymbol"),i=t.childOfName("toSymbol"),n=t.getTextContent();if(e||i||n&&!n.ignore){for(var o=1,r=this.parent;r;)r.scaleX&&(o/=r.scaleX),r=r.parent;var a=t.childOfName("line");if(this.__dirty||a.__dirty){var s=a.shape.percent,l=a.pointAt(0),u=a.pointAt(s),c=Mi([],u,l);if(bi(c,c),e&&(e.setPosition(l),w(e,0),e.scaleX=e.scaleY=o*s,e.markRedraw()),i&&(i.setPosition(u),w(i,1),i.scaleX=i.scaleY=o*s,i.markRedraw()),n&&!n.ignore){n.x=n.y=0,n.originX=n.originY=0;var d=void 0,p=void 0,h=n.__labelDistance,g=h[0]*o,f=h[1]*o,y=s/2,m=a.tangentAt(y),v=[m[1],-m[0]],x=a.pointAt(y);v[1]>0&&(v[0]=-v[0],v[1]=-v[1]);var _=m[0]<0?-1:1;if("start"!==n.__position&&"end"!==n.__position){var b=-Math.atan2(m[1],m[0]);u[0]<l[0]&&(b=Math.PI+b),n.rotation=b}var S=void 0;switch(n.__position){case"insideStartTop":case"insideMiddleTop":case"insideEndTop":case"middle":S=-f,p="bottom";break;case"insideStartBottom":case"insideMiddleBottom":case"insideEndBottom":S=f,p="top";break;default:S=0,p="middle"}switch(n.__position){case"end":n.x=c[0]*g+u[0],n.y=c[1]*f+u[1],d=c[0]>.8?"left":c[0]<-.8?"right":"center",p=c[1]>.8?"top":c[1]<-.8?"bottom":"middle";break;case"start":n.x=-c[0]*g+l[0],n.y=-c[1]*f+l[1],d=c[0]>.8?"right":c[0]<-.8?"left":"center",p=c[1]>.8?"bottom":c[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":n.x=g*_+l[0],n.y=l[1]+S,d=m[0]<0?"right":"left",n.originX=-g*_,n.originY=-S;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":n.x=x[0],n.y=x[1]+S,d="center",n.originY=-S;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":n.x=-g*_+u[0],n.y=u[1]+S,d=m[0]>=0?"right":"left",n.originX=g*_,n.originY=-S}n.scaleX=n.scaleY=o,n.setStyle({verticalAlign:n.__verticalAlign||p,align:n.__align||d})}}}function w(t,e){var i=t.__specifiedRotation;if(null==i){var n=a.tangentAt(e);t.attr("rotation",(1===e?-1:1)*Math.PI/2-Math.atan2(n[1],n[0]))}else t.attr("rotation",i)}},e}(mt),pd=dd;function hd(t){var e=t.hostModel,i=e.getModel("emphasis");return{lineStyle:e.getModel("lineStyle").getLineStyle(),emphasisLineStyle:i.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:e.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:e.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:i.get("disabled"),blurScope:i.get("blurScope"),focus:i.get("focus"),labelStatesModels:Et(e)}}function gd(t){return isNaN(t[0])||isNaN(t[1])}function fd(t){return t&&!gd(t[0])&&!gd(t[1])}var yd=function(){function t(t){this.group=new mt,this._LineCtor=t||pd}return t.prototype.updateData=function(t){var e=this;this._progressiveEls=null;var i=this,n=i.group,o=i._lineData;i._lineData=t,o||n.removeAll();var r=hd(t);t.diff(o).add((function(i){e._doAdd(t,i,r)})).update((function(i,n){e._doUpdate(o,t,n,i,r)})).remove((function(t){n.remove(o.getItemGraphicEl(t))})).execute()},t.prototype.updateLayout=function(){var t=this._lineData;t&&t.eachItemGraphicEl((function(e,i){e.updateLayout(t,i)}),this)},t.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=hd(t),this._lineData=null,this.group.removeAll()},t.prototype.incrementalUpdate=function(t,e){function i(t){t.isGroup||function(t){return t.animators&&t.animators.length>0}(t)||(t.incremental=!0,t.ensureState("emphasis").hoverLayer=!0)}this._progressiveEls=[];for(var n=t.start;n<t.end;n++){if(fd(e.getItemLayout(n))){var o=new this._LineCtor(e,n,this._seriesScope);o.traverse(i),this.group.add(o),e.setItemGraphicEl(n,o),this._progressiveEls.push(o)}}},t.prototype.remove=function(){this.group.removeAll()},t.prototype.eachRendered=function(t){ki(this._progressiveEls||this.group,t)},t.prototype._doAdd=function(t,e,i){if(fd(t.getItemLayout(e))){var n=new this._LineCtor(t,e,i);t.setItemGraphicEl(e,n),this.group.add(n)}},t.prototype._doUpdate=function(t,e,i,n,o){var r=t.getItemGraphicEl(i);fd(e.getItemLayout(n))?(r?r.updateData(e,n,o):r=new this._LineCtor(e,n,o),e.setItemGraphicEl(n,r),this.group.add(r)):this.group.remove(r)},t}(),md=[],vd=[],xd=[],_d=Ri,bd=Vi,Sd=Math.abs;function wd(t,e,i){for(var n,o=t[0],r=t[1],a=t[2],s=1/0,l=i*i,u=.1,c=.1;c<=.9;c+=.1){md[0]=_d(o[0],r[0],a[0],c),md[1]=_d(o[1],r[1],a[1],c),(h=Sd(bd(md,e)-l))<s&&(s=h,n=c)}for(var d=0;d<32;d++){var p=n+u;vd[0]=_d(o[0],r[0],a[0],n),vd[1]=_d(o[1],r[1],a[1],n),xd[0]=_d(o[0],r[0],a[0],p),xd[1]=_d(o[1],r[1],a[1],p);var h=bd(vd,e)-l;if(Sd(h)<.01)break;var g=bd(xd,e)-l;u/=2,h<0?g>=0?n+=u:n-=u:g>=0?n-=u:n+=u}return n}function Md(t,e){var i=[],n=Ei,o=[[],[],[]],r=[[],[]],a=[];e/=2,t.eachEdge((function(t,s){var l=t.getLayout(),u=t.getVisual("fromSymbol"),c=t.getVisual("toSymbol");l.__original||(l.__original=[_i(l[0]),_i(l[1])],l[2]&&l.__original.push(_i(l[2])));var d=l.__original;if(null!=l[2]){if(ke(o[0],d[0]),ke(o[1],d[2]),ke(o[2],d[1]),u&&"none"!==u){var p=jc(t.node1),h=wd(o,d[0],p*e);n(o[0][0],o[1][0],o[2][0],h,i),o[0][0]=i[3],o[1][0]=i[4],n(o[0][1],o[1][1],o[2][1],h,i),o[0][1]=i[3],o[1][1]=i[4]}if(c&&"none"!==c){p=jc(t.node2),h=wd(o,d[1],p*e);n(o[0][0],o[1][0],o[2][0],h,i),o[1][0]=i[1],o[2][0]=i[2],n(o[0][1],o[1][1],o[2][1],h,i),o[1][1]=i[1],o[2][1]=i[2]}ke(l[0],o[0]),ke(l[1],o[2]),ke(l[2],o[1])}else{if(ke(r[0],d[0]),ke(r[1],d[1]),Mi(a,r[1],r[0]),bi(a,a),u&&"none"!==u){p=jc(t.node1);Di(r[0],r[0],a,p*e)}if(c&&"none"!==c){p=jc(t.node2);Di(r[1],r[1],a,-p*e)}ke(l[0],r[0]),ke(l[1],r[1])}}))}function Id(t){return"view"===t.type}var Ad=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return p(e,t),e.prototype.init=function(t,e){var i=new bt,n=new yd,o=this.group;this._controller=new _e(e.getZr()),this._controllerHost={target:o},o.add(i.group),o.add(n.group),this._symbolDraw=i,this._lineDraw=n,this._firstRender=!0},e.prototype.render=function(t,e,i){var n=this,o=t.coordinateSystem;this._model=t;var r=this._symbolDraw,a=this._lineDraw,s=this.group;if(Id(o)){var l={x:o.x,y:o.y,scaleX:o.scaleX,scaleY:o.scaleY};this._firstRender?s.attr(l):Lt(s,l,t)}Md(t.getGraph(),Uc(t));var u=t.getData();r.updateData(u);var c=t.getEdgeData();a.updateData(c),this._updateNodeAndLinkScale(),this._updateController(t,e,i),clearTimeout(this._layoutTimeout);var d=t.forceLayout,p=t.get(["force","layoutAnimation"]);d&&this._startForceLayoutIteration(d,p);var h=t.get("layout");u.graph.eachNode((function(e){var i=e.dataIndex,o=e.getGraphicEl(),r=e.getModel();if(o){o.off("drag").off("dragend");var a=r.get("draggable");a&&o.on("drag",(function(r){switch(h){case"force":d.warmUp(),!n._layouting&&n._startForceLayoutIteration(d,p),d.setFixed(i),u.setItemLayout(i,[o.x,o.y]);break;case"circular":u.setItemLayout(i,[o.x,o.y]),e.setLayout({fixed:!0},!0),Zc(t,"symbolSize",e,[r.offsetX,r.offsetY]),n.updateLayout(t);break;default:u.setItemLayout(i,[o.x,o.y]),Wc(t.getGraph(),t),n.updateLayout(t)}})).on("dragend",(function(){d&&d.setUnfixed(i)})),o.setDraggable(a,!!r.get("cursor")),"adjacency"===r.get(["emphasis","focus"])&&(xt(o).focus=e.getAdjacentDataIndices())}})),u.graph.eachEdge((function(t){var e=t.getGraphicEl(),i=t.getModel().get(["emphasis","focus"]);e&&"adjacency"===i&&(xt(e).focus={edge:[t.dataIndex],node:[t.node1.dataIndex,t.node2.dataIndex]})}));var g="circular"===t.get("layout")&&t.get(["circular","rotateLabel"]),f=u.getLayout("cx"),y=u.getLayout("cy");u.graph.eachNode((function(t){Jc(t,g,f,y)})),this._firstRender=!1},e.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype._startForceLayoutIteration=function(t,e){var i=this;!function n(){t.step((function(t){i.updateLayout(i._model),(i._layouting=!t)&&(e?i._layoutTimeout=setTimeout(n,16):n())}))}()},e.prototype._updateController=function(t,e,i){var n=this,o=this._controller,r=this._controllerHost,a=this.group;o.setPointerChecker((function(e,n,o){var r=a.getBoundingRect();return r.applyTransform(a.transform),r.contain(n,o)&&!we(e,i,t)})),Id(t.coordinateSystem)?(o.enable(t.get("roam")),r.zoomLimit=t.get("scaleLimit"),r.zoom=t.coordinateSystem.getZoom(),o.off("pan").off("zoom").on("pan",(function(e){gs(r,e.dx,e.dy),i.dispatchAction({seriesId:t.id,type:"graphRoam",dx:e.dx,dy:e.dy})})).on("zoom",(function(e){fs(r,e.scale,e.originX,e.originY),i.dispatchAction({seriesId:t.id,type:"graphRoam",zoom:e.scale,originX:e.originX,originY:e.originY}),n._updateNodeAndLinkScale(),Md(t.getGraph(),Uc(t)),n._lineDraw.updateLayout(),i.updateLabelLayout()}))):o.disable()},e.prototype._updateNodeAndLinkScale=function(){var t=this._model,e=t.getData(),i=Uc(t);e.eachItemGraphicEl((function(t,e){t&&t.setSymbolScale(i)}))},e.prototype.updateLayout=function(t){Md(t.getGraph(),Uc(t)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},e.prototype.remove=function(t,e){this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()},e.type="graph",e}(St),Dd=Ad;function Td(t){return"_EC_"+t}var Cd=function(){function t(t){this.type="graph",this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=t||!1}return t.prototype.isDirected=function(){return this._directed},t.prototype.addNode=function(t,e){t=null==t?""+e:""+t;var i=this._nodesMap;if(!i[Td(t)]){var n=new Ld(t,e);return n.hostGraph=this,this.nodes.push(n),i[Td(t)]=n,n}console.error("Graph nodes have duplicate name or id")},t.prototype.getNodeByIndex=function(t){var e=this.data.getRawIndex(t);return this.nodes[e]},t.prototype.getNodeById=function(t){return this._nodesMap[Td(t)]},t.prototype.addEdge=function(t,e,i){var n=this._nodesMap,o=this._edgesMap;if(O(t)&&(t=this.nodes[t]),O(e)&&(e=this.nodes[e]),t instanceof Ld||(t=n[Td(t)]),e instanceof Ld||(e=n[Td(e)]),t&&e){var r=t.id+"-"+e.id,a=new Nd(t,e,i);return a.hostGraph=this,this._directed&&(t.outEdges.push(a),e.inEdges.push(a)),t.edges.push(a),t!==e&&e.edges.push(a),this.edges.push(a),o[r]=a,a}},t.prototype.getEdgeByIndex=function(t){var e=this.edgeData.getRawIndex(t);return this.edges[e]},t.prototype.getEdge=function(t,e){t instanceof Ld&&(t=t.id),e instanceof Ld&&(e=e.id);var i=this._edgesMap;return this._directed?i[t+"-"+e]:i[t+"-"+e]||i[e+"-"+t]},t.prototype.eachNode=function(t,e){for(var i=this.nodes,n=i.length,o=0;o<n;o++)i[o].dataIndex>=0&&t.call(e,i[o],o)},t.prototype.eachEdge=function(t,e){for(var i=this.edges,n=i.length,o=0;o<n;o++)i[o].dataIndex>=0&&i[o].node1.dataIndex>=0&&i[o].node2.dataIndex>=0&&t.call(e,i[o],o)},t.prototype.breadthFirstTraverse=function(t,e,i,n){if(e instanceof Ld||(e=this._nodesMap[Td(e)]),e){for(var o="out"===i?"outEdges":"in"===i?"inEdges":"edges",r=0;r<this.nodes.length;r++)this.nodes[r].__visited=!1;if(!t.call(n,e,null))for(var a=[e];a.length;){var s=a.shift(),l=s[o];for(r=0;r<l.length;r++){var u=l[r],c=u.node1===s?u.node2:u.node1;if(!c.__visited){if(t.call(n,c,s))return;a.push(c),c.__visited=!0}}}}},t.prototype.update=function(){for(var t=this.data,e=this.edgeData,i=this.nodes,n=this.edges,o=0,r=i.length;o<r;o++)i[o].dataIndex=-1;for(o=0,r=t.count();o<r;o++)i[t.getRawIndex(o)].dataIndex=o;e.filterSelf((function(t){var i=n[e.getRawIndex(t)];return i.node1.dataIndex>=0&&i.node2.dataIndex>=0}));for(o=0,r=n.length;o<r;o++)n[o].dataIndex=-1;for(o=0,r=e.count();o<r;o++)n[e.getRawIndex(o)].dataIndex=o},t.prototype.clone=function(){for(var e=new t(this._directed),i=this.nodes,n=this.edges,o=0;o<i.length;o++)e.addNode(i[o].id,i[o].dataIndex);for(o=0;o<n.length;o++){var r=n[o];e.addEdge(r.node1.id,r.node2.id,r.dataIndex)}return e},t}(),Ld=function(){function t(t,e){this.inEdges=[],this.outEdges=[],this.edges=[],this.dataIndex=-1,this.id=null==t?"":t,this.dataIndex=null==e?-1:e}return t.prototype.degree=function(){return this.edges.length},t.prototype.inDegree=function(){return this.inEdges.length},t.prototype.outDegree=function(){return this.outEdges.length},t.prototype.getModel=function(t){if(!(this.dataIndex<0))return this.hostGraph.data.getItemModel(this.dataIndex).getModel(t)},t.prototype.getAdjacentDataIndices=function(){for(var t={edge:[],node:[]},e=0;e<this.edges.length;e++){var i=this.edges[e];i.dataIndex<0||(t.edge.push(i.dataIndex),t.node.push(i.node1.dataIndex,i.node2.dataIndex))}return t},t.prototype.getTrajectoryDataIndices=function(){for(var t=me(),e=me(),i=0;i<this.edges.length;i++){var n=this.edges[i];if(!(n.dataIndex<0)){t.set(n.dataIndex,!0);for(var o=[n.node1],r=[n.node2],a=0;a<o.length;){var s=o[a];a++,e.set(s.dataIndex,!0);for(var l=0;l<s.inEdges.length;l++)t.set(s.inEdges[l].dataIndex,!0),o.push(s.inEdges[l].node1)}for(a=0;a<r.length;){var u=r[a];a++,e.set(u.dataIndex,!0);for(l=0;l<u.outEdges.length;l++)t.set(u.outEdges[l].dataIndex,!0),r.push(u.outEdges[l].node2)}}}return{edge:t.keys(),node:e.keys()}},t}(),Nd=function(){function t(t,e,i){this.dataIndex=-1,this.node1=t,this.node2=e,this.dataIndex=null==i?-1:i}return t.prototype.getModel=function(t){if(!(this.dataIndex<0))return this.hostGraph.edgeData.getItemModel(this.dataIndex).getModel(t)},t.prototype.getAdjacentDataIndices=function(){return{edge:[this.dataIndex],node:[this.node1.dataIndex,this.node2.dataIndex]}},t.prototype.getTrajectoryDataIndices=function(){var t=me(),e=me();t.set(this.dataIndex,!0);for(var i=[this.node1],n=[this.node2],o=0;o<i.length;){var r=i[o];o++,e.set(r.dataIndex,!0);for(var a=0;a<r.inEdges.length;a++)t.set(r.inEdges[a].dataIndex,!0),i.push(r.inEdges[a].node1)}for(o=0;o<n.length;){var s=n[o];o++,e.set(s.dataIndex,!0);for(a=0;a<s.outEdges.length;a++)t.set(s.outEdges[a].dataIndex,!0),n.push(s.outEdges[a].node2)}return{edge:t.keys(),node:e.keys()}},t}();function Pd(t,e){return{getValue:function(i){var n=this[t][e];return n.getStore().get(n.getDimensionIndex(i||"value"),this.dataIndex)},setVisual:function(i,n){this.dataIndex>=0&&this[t][e].setItemVisual(this.dataIndex,i,n)},getVisual:function(i){return this[t][e].getItemVisual(this.dataIndex,i)},setLayout:function(i,n){this.dataIndex>=0&&this[t][e].setItemLayout(this.dataIndex,i,n)},getLayout:function(){return this[t][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[t][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[t][e].getRawIndex(this.dataIndex)}}}jt(Ld,Pd("hostGraph","data")),jt(Nd,Pd("hostGraph","edgeData"));var kd=Cd;function Ed(t,e,i,n,o){for(var r=new kd(n),a=0;a<t.length;a++)r.addNode(ze(t[a].id,t[a].name,a),a);var s=[],l=[],u=0;for(a=0;a<e.length;a++){var c=e[a],d=c.source,p=c.target;r.addEdge(d,p,u)&&(l.push(c),s.push(ze(qe(c.id,null),d+" > "+p)),u++)}var h,g=i.get("coordinateSystem");if("cartesian2d"===g||"polar"===g)h=ft(t,i);else{var f=zi.get(g),y=f&&f.dimensions||[];Ke(y,"value")<0&&y.concat(["value"]);var m=Je(t,{coordDimensions:y,encodeDefine:i.getEncode()}).dimensions;(h=new Qe(m,i)).initData(t)}var v=new Qe(["value"],i);return v.initData(l,s),o&&o(h,v),au({mainData:h,struct:r,structAttr:"graph",datas:{node:h,edge:v},datasAttr:{node:"data",edge:"edgeData"}}),r.update(),r}var Rd=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i.hasSymbolVisual=!0,i}return p(e,t),e.prototype.init=function(e){t.prototype.init.apply(this,arguments);var i=this;function n(){return i._categoriesData}this.legendVisualProvider=new Ot(n,n),this.fillDataTextStyle(e.edges||e.links),this._updateCategoriesData()},e.prototype.mergeOption=function(e){t.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(e.edges||e.links),this._updateCategoriesData()},e.prototype.mergeDefaultAndTheme=function(e){t.prototype.mergeDefaultAndTheme.apply(this,arguments),Be(e,"edgeLabel",["show"])},e.prototype.getInitialData=function(t,e){var i,n=t.edges||t.links||[],o=t.data||t.nodes||[],r=this;if(o&&n){Rc(i=this)&&(i.__curvenessList=[],i.__edgeMap={},Vc(i));var a=Ed(o,n,this,!0,(function(t,e){t.wrapMethod("getItemModel",(function(t){var e=r._categoriesModels[t.getShallow("category")];return e&&(e.parentModel=t.parentModel,t.parentModel=e),t}));var i=Ut.prototype.getModel;function n(t,e){var n=i.call(this,t,e);return n.resolveParentPath=o,n}function o(t){if(t&&("label"===t[0]||"label"===t[1])){var e=t.slice();return"label"===t[0]?e[0]="edgeLabel":"label"===t[1]&&(e[1]="edgeLabel"),e}return t}e.wrapMethod("getItemModel",(function(t){return t.resolveParentPath=o,t.getModel=n,t}))}));return h(a.edges,(function(t){!function(t,e,i,n){if(Rc(i)){var o=zc(t,e,i),r=i.__edgeMap,a=r[Oc(o)];r[o]&&!a?r[o].isForward=!0:a&&r[o]&&(a.isForward=!0,r[o].isForward=!1),r[o]=r[o]||[],r[o].push(n)}}(t.node1,t.node2,this,t.dataIndex)}),this),a.data}},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,e,i){if("edge"===i){var n=this.getData(),o=this.getDataParams(t,i),r=n.graph.getEdgeByIndex(t),a=n.getName(r.node1.dataIndex),s=n.getName(r.node2.dataIndex),l=[];return null!=a&&l.push(a),null!=s&&l.push(s),Wt("nameValue",{name:l.join(" > "),value:o.value,noValue:null==o.value})}return Oi({series:this,dataIndex:t,multipleSeries:e})},e.prototype._updateCategoriesData=function(){var t=b(this.option.categories||[],(function(t){return null!=t.value?t:E({value:0},t)})),e=new Qe(["value"],this);e.initData(t),this._categoriesData=e,this._categoriesModels=e.mapArray((function(t){return e.getItemModel(t)}))},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.isAnimationEnabled=function(){return t.prototype.isAnimationEnabled.call(this)&&!("force"===this.get("layout")&&this.get(["force","layoutAnimation"]))},e.type="series.graph",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={z:2,coordinateSystem:"view",legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},e}(yt),Vd=Rd,zd={type:"graphRoam",event:"graphRoam",update:"none"};var Od=function(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0},Bd=function(t){function e(e){var i=t.call(this,e)||this;return i.type="pointer",i}return p(e,t),e.prototype.getDefaultShape=function(){return new Od},e.prototype.buildPath=function(t,e){var i=Math.cos,n=Math.sin,o=e.r,r=e.width,a=e.angle,s=e.x-i(a)*r*(r>=o/3?1:2),l=e.y-n(a)*r*(r>=o/3?1:2);a=e.angle-Math.PI/2,t.moveTo(s,l),t.lineTo(e.x+i(a)*r,e.y+n(a)*r),t.lineTo(e.x+i(e.angle)*o,e.y+n(e.angle)*o),t.lineTo(e.x-i(a)*r,e.y-n(a)*r),t.lineTo(s,l)},e}(B),Gd=Bd;function Fd(t,e){var i=null==t?"":t+"";return e&&(N(e)?i=e.replace("{value}",i):Q(e)&&(i=e(t))),i}var Wd=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return p(e,t),e.prototype.render=function(t,e,i){this.group.removeAll();var n=t.get(["axisLine","lineStyle","color"]),o=function(t,e){var i=t.get("center"),n=e.getWidth(),o=e.getHeight(),r=Math.min(n,o);return{cx:ee(i[0],e.getWidth()),cy:ee(i[1],e.getHeight()),r:ee(t.get("radius"),r/2)}}(t,i);this._renderMain(t,e,i,n,o),this._data=t.getData()},e.prototype.dispose=function(){},e.prototype._renderMain=function(t,e,i,n,o){var r=this.group,a=t.get("clockwise"),s=-t.get("startAngle")/180*Math.PI,l=-t.get("endAngle")/180*Math.PI,u=t.getModel("axisLine"),c=u.get("roundCap")?Hi:Ui,d=u.get("show"),p=u.getModel("lineStyle"),g=p.get("width"),f=[s,l];Bi(f,!a);for(var y=(l=f[1])-(s=f[0]),m=s,v=[],x=0;d&&x<n.length;x++){var _=new c({shape:{startAngle:m,endAngle:l=s+y*Math.min(Math.max(n[x][0],0),1),cx:o.cx,cy:o.cy,clockwise:a,r0:o.r-g,r:o.r},silent:!0});_.setStyle({fill:n[x][1]}),_.setStyle(p.getLineStyle(["color","width"])),v.push(_),m=l}v.reverse(),h(v,(function(t){return r.add(t)}));var b=function(t){if(t<=0)return n[0][1];var e;for(e=0;e<n.length;e++)if(n[e][0]>=t&&(0===e?0:n[e-1][0])<t)return n[e][1];return n[e-1][1]};this._renderTicks(t,e,i,b,o,s,l,a,g),this._renderTitleAndDetail(t,e,i,b,o),this._renderAnchor(t,o),this._renderPointer(t,e,i,b,o,s,l,a,g)},e.prototype._renderTicks=function(t,e,i,n,o,r,a,s,l){for(var u,c,d=this.group,p=o.cx,h=o.cy,g=o.r,f=+t.get("min"),y=+t.get("max"),m=t.getModel("splitLine"),v=t.getModel("axisTick"),x=t.getModel("axisLabel"),_=t.get("splitNumber"),b=v.get("splitNumber"),S=ee(m.get("length"),g),w=ee(v.get("length"),g),M=r,I=(a-r)/_,A=I/b,D=m.getModel("lineStyle").getLineStyle(),T=v.getModel("lineStyle").getLineStyle(),C=m.get("distance"),L=0;L<=_;L++){if(u=Math.cos(M),c=Math.sin(M),m.get("show")){var N=new se({shape:{x1:u*(g-(P=C?C+l:l))+p,y1:c*(g-P)+h,x2:u*(g-S-P)+p,y2:c*(g-S-P)+h},style:D,silent:!0});"auto"===D.stroke&&N.setStyle({stroke:n(L/_)}),d.add(N)}if(x.get("show")){var P=x.get("distance")+C,k=Fd(Ci(L/_*(y-f)+f),x.get("formatter")),E=n(L/_),R=u*(g-S-P)+p,V=c*(g-S-P)+h,z=x.get("rotate"),B=0;"radial"===z?(B=-M+2*Math.PI)>Math.PI/2&&(B+=Math.PI):"tangential"===z?B=-M-Math.PI/2:O(z)&&(B=z*Math.PI/180),0===B?d.add(new ni({style:oi(x,{text:k,x:R,y:V,verticalAlign:c<-.8?"top":c>.8?"bottom":"middle",align:u<-.4?"left":u>.4?"right":"center"},{inheritColor:E}),silent:!0})):d.add(new ni({style:oi(x,{text:k,x:R,y:V,verticalAlign:"middle",align:"center"},{inheritColor:E}),silent:!0,originX:R,originY:V,rotation:B}))}if(v.get("show")&&L!==_){P=(P=v.get("distance"))?P+l:l;for(var G=0;G<=b;G++){u=Math.cos(M),c=Math.sin(M);var F=new se({shape:{x1:u*(g-P)+p,y1:c*(g-P)+h,x2:u*(g-w-P)+p,y2:c*(g-w-P)+h},silent:!0,style:T});"auto"===T.stroke&&F.setStyle({stroke:n((L+G/b)/_)}),d.add(F),M+=A}M-=A}else M+=I}},e.prototype._renderPointer=function(t,e,i,n,o,r,a,s,l){var u=this.group,c=this._data,d=this._progressEls,p=[],h=t.get(["pointer","show"]),g=t.getModel("progress"),f=g.get("show"),y=t.getData(),m=y.mapDimension("value"),v=+t.get("min"),x=+t.get("max"),_=[v,x],b=[r,a];function S(e,i){var n,r=y.getItemModel(e).getModel("pointer"),a=ee(r.get("width"),o.r),s=ee(r.get("length"),o.r),l=t.get(["pointer","icon"]),u=r.get("offsetCenter"),c=ee(u[0],o.r),d=ee(u[1],o.r),p=r.get("keepAspect");return(n=l?vt(l,c-a/2,d-s,a,s,null,p):new Gd({shape:{angle:-Math.PI/2,width:a,r:s,x:c,y:d}})).rotation=-(i+Math.PI/2),n.x=o.cx,n.y=o.cy,n}function w(t,e){var i=g.get("roundCap")?Hi:Ui,n=g.get("overlap"),a=n?g.get("width"):l/y.count(),u=n?o.r-a:o.r-(t+1)*a,c=n?o.r:o.r-t*a,d=new i({shape:{startAngle:r,endAngle:e,cx:o.cx,cy:o.cy,clockwise:s,r0:u,r:c}});return n&&(d.z2=x-y.get(m,t)%x),d}(f||h)&&(y.diff(c).add((function(e){var i=y.get(m,e);if(h){var n=S(e,r);Tt(n,{rotation:-((isNaN(+i)?b[0]:gi(i,_,b,!0))+Math.PI/2)},t),u.add(n),y.setItemGraphicEl(e,n)}if(f){var o=w(e,r),a=g.get("clip");Tt(o,{shape:{endAngle:gi(i,_,b,a)}},t),u.add(o),Gi(t.seriesIndex,y.dataType,e,o),p[e]=o}})).update((function(e,i){var n=y.get(m,e);if(h){var o=c.getItemGraphicEl(i),a=o?o.rotation:r,s=S(e,a);s.rotation=a,Lt(s,{rotation:-((isNaN(+n)?b[0]:gi(n,_,b,!0))+Math.PI/2)},t),u.add(s),y.setItemGraphicEl(e,s)}if(f){var l=d[i],v=w(e,l?l.shape.endAngle:r),x=g.get("clip");Lt(v,{shape:{endAngle:gi(n,_,b,x)}},t),u.add(v),Gi(t.seriesIndex,y.dataType,e,v),p[e]=v}})).execute(),y.each((function(t){var e=y.getItemModel(t),i=e.getModel("emphasis"),o=i.get("focus"),r=i.get("blurScope"),a=i.get("disabled");if(h){var s=y.getItemGraphicEl(t),l=y.getItemVisual(t,"style"),u=l.fill;if(s instanceof M){var c=s.style;s.useStyle(E({image:c.image,x:c.x,y:c.y,width:c.width,height:c.height},l))}else s.useStyle(l),"pointer"!==s.type&&s.setColor(u);s.setStyle(e.getModel(["pointer","itemStyle"]).getItemStyle()),"auto"===s.style.fill&&s.setStyle("fill",n(gi(y.get(m,t),_,[0,1],!0))),s.z2EmphasisLift=0,Pt(s,e),Rt(s,o,r,a)}if(f){var d=p[t];d.useStyle(y.getItemVisual(t,"style")),d.setStyle(e.getModel(["progress","itemStyle"]).getItemStyle()),d.z2EmphasisLift=0,Pt(d,e),Rt(d,o,r,a)}})),this._progressEls=p)},e.prototype._renderAnchor=function(t,e){var i=t.getModel("anchor");if(i.get("show")){var n=i.get("size"),o=i.get("icon"),r=i.get("offsetCenter"),a=i.get("keepAspect"),s=vt(o,e.cx-n/2+ee(r[0],e.r),e.cy-n/2+ee(r[1],e.r),n,n,null,a);s.z2=i.get("showAbove")?1:0,s.setStyle(i.getModel("itemStyle").getItemStyle()),this.group.add(s)}},e.prototype._renderTitleAndDetail=function(t,e,i,n,o){var r=this,a=t.getData(),s=a.mapDimension("value"),l=+t.get("min"),u=+t.get("max"),c=new mt,d=[],p=[],h=t.isAnimationEnabled(),g=t.get(["pointer","showAbove"]);a.diff(this._data).add((function(t){d[t]=new ni({silent:!0}),p[t]=new ni({silent:!0})})).update((function(t,e){d[t]=r._titleEls[e],p[t]=r._detailEls[e]})).execute(),a.each((function(e){var i=a.getItemModel(e),r=a.get(s,e),f=new mt,y=n(gi(r,[l,u],[0,1],!0)),m=i.getModel("title");if(m.get("show")){var v=m.get("offsetCenter"),x=o.cx+ee(v[0],o.r),_=o.cy+ee(v[1],o.r);(T=d[e]).attr({z2:g?0:2,style:oi(m,{x:x,y:_,text:a.getName(e),align:"center",verticalAlign:"middle"},{inheritColor:y})}),f.add(T)}var b=i.getModel("detail");if(b.get("show")){var S=b.get("offsetCenter"),w=o.cx+ee(S[0],o.r),M=o.cy+ee(S[1],o.r),I=ee(b.get("width"),o.r),A=ee(b.get("height"),o.r),D=t.get(["progress","show"])?a.getItemVisual(e,"style").fill:y,T=p[e],C=b.get("formatter");T.attr({z2:g?0:2,style:oi(b,{x:w,y:M,text:Fd(r,C),width:isNaN(I)?null:I,height:isNaN(A)?null:A,align:"center",verticalAlign:"middle"},{inheritColor:D})}),Fi(T,{normal:b},r,(function(t){return Fd(t,C)})),h&&Wi(T,e,a,t,{getFormattedLabel:function(t,e,i,n,o,a){return Fd(a?a.interpolatedValue:r,C)}}),f.add(T)}c.add(f)})),this.group.add(c),this._titleEls=d,this._detailEls=p},e.type="gauge",e}(St),Hd=Wd,Ud=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i.visualStyleAccessPath="itemStyle",i}return p(e,t),e.prototype.getInitialData=function(t,e){return Gt(this,["value"])},e.type="series.gauge",e.defaultOption={z:2,colorBy:"data",center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,"#E6EBF8"]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:"#63677A",width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:"#63677A",width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:"#464646",fontSize:12,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:"#fff",borderWidth:0,borderColor:"#5470c6"}},title:{show:!0,offsetCenter:[0,"20%"],color:"#464646",fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"#464646",fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},e}(yt),jd=Ud;var Xd=["itemStyle","opacity"],Yd=function(t){function e(e,i){var n=t.call(this)||this,o=n,r=new Dt,a=new ni;return o.setTextContent(a),n.setTextGuideLine(r),n.updateData(e,i,!0),n}return p(e,t),e.prototype.updateData=function(t,e,i){var n=this,o=t.hostModel,r=t.getItemModel(e),a=t.getItemLayout(e),s=r.getModel("emphasis"),l=r.get(Xd);l=null==l?1:l,i||Ct(n),n.useStyle(t.getItemVisual(e,"style")),n.style.lineJoin="round",i?(n.setShape({points:a.points}),n.style.opacity=0,Tt(n,{style:{opacity:l}},o,e)):Lt(n,{style:{opacity:l},shape:{points:a.points}},o,e),Pt(n,r),this._updateLabel(t,e),Rt(this,s.get("focus"),s.get("blurScope"),s.get("disabled"))},e.prototype._updateLabel=function(t,e){var i=this,n=this.getTextGuideLine(),o=i.getTextContent(),r=t.hostModel,a=t.getItemModel(e),s=t.getItemLayout(e).label,l=t.getItemVisual(e,"style"),u=l.fill;kt(o,Et(a),{labelFetcher:t.hostModel,labelDataIndex:e,defaultOpacity:l.opacity,defaultText:t.getName(e)},{normal:{align:s.textAlign,verticalAlign:s.verticalAlign}}),i.setTextConfig({local:!0,inside:!!s.inside,insideStroke:u,outsideFill:u});var c=s.linePoints;n.setShape({points:c}),i.textGuideLineConfig={anchor:c?new ji(c[0][0],c[0][1]):null},Lt(o,{style:{x:s.x,y:s.y}},r,e),o.attr({rotation:s.rotation,originX:s.x,originY:s.y,z2:10}),Xi(i,Yi(a),{stroke:u})},e}(At),Zd=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i.ignoreLabelLineUpdate=!0,i}return p(e,t),e.prototype.render=function(t,e,i){var n=t.getData(),o=this._data,r=this.group;n.diff(o).add((function(t){var e=new Yd(n,t);n.setItemGraphicEl(t,e),r.add(e)})).update((function(t,e){var i=o.getItemGraphicEl(e);i.updateData(n,t),r.add(i),n.setItemGraphicEl(t,i)})).remove((function(e){var i=o.getItemGraphicEl(e);Zi(i,t,e)})).execute(),this._data=n},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.prototype.dispose=function(){},e.type="funnel",e}(St),qd=Zd,Jd=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return p(e,t),e.prototype.init=function(e){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new Ot(Bt(this.getData,this),Bt(this.getRawData,this)),this._defaultLabelLine(e)},e.prototype.getInitialData=function(t,e){return Gt(this,{coordDimensions:["value"],encodeDefaulter:Ce(Le,this)})},e.prototype._defaultLabelLine=function(t){Be(t,"labelLine",["show"]);var e=t.labelLine,i=t.emphasis.labelLine;e.show=e.show&&t.label.show,i.show=i.show&&t.emphasis.label.show},e.prototype.getDataParams=function(e){var i=this.getData(),n=t.prototype.getDataParams.call(this,e),o=i.mapDimension("value"),r=i.getSum(o);return n.percent=r?+(i.get(o,e)/r*100).toFixed(2):0,n.$vars.push("percent"),n},e.type="series.funnel",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",orient:"vertical",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},e}(yt),Qd=Jd;function Kd(t,e){t.eachSeriesByType("funnel",(function(t){var i=t.getData(),n=i.mapDimension("value"),o=t.get("sort"),r=function(t,e){return Oe(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,e),a=t.get("orient"),s=r.width,l=r.height,u=function(t,e){for(var i=t.mapDimension("value"),n=t.mapArray(i,(function(t){return t})),o=[],r="ascending"===e,a=0,s=t.count();a<s;a++)o[a]=a;return Q(e)?o.sort(e):"none"!==e&&o.sort((function(t,e){return r?n[t]-n[e]:n[e]-n[t]})),o}(i,o),c=r.x,d=r.y,p="horizontal"===a?[ee(t.get("minSize"),l),ee(t.get("maxSize"),l)]:[ee(t.get("minSize"),s),ee(t.get("maxSize"),s)],h=i.getDataExtent(n),g=t.get("min"),f=t.get("max");null==g&&(g=Math.min(h[0],0)),null==f&&(f=h[1]);var y=t.get("funnelAlign"),m=t.get("gap"),v=(("horizontal"===a?s:l)-m*(i.count()-1))/i.count(),x=function(t,e){if("horizontal"===a){var o=i.get(n,t)||0,r=gi(o,[g,f],p,!0),u=void 0;switch(y){case"top":u=d;break;case"center":u=d+(l-r)/2;break;case"bottom":u=d+(l-r)}return[[e,u],[e,u+r]]}var h,m=i.get(n,t)||0,v=gi(m,[g,f],p,!0);switch(y){case"left":h=c;break;case"center":h=c+(s-v)/2;break;case"right":h=c+s-v}return[[h,e],[h+v,e]]};"ascending"===o&&(v=-v,m=-m,"horizontal"===a?c+=s:d+=l,u=u.reverse());for(var _=0;_<u.length;_++){var b=u[_],S=u[_+1],w=i.getItemModel(b);if("horizontal"===a){var M=w.get(["itemStyle","width"]);null==M?M=v:(M=ee(M,s),"ascending"===o&&(M=-M));var I=x(b,c),A=x(S,c+M);c+=M+m,i.setItemLayout(b,{points:I.concat(A.slice().reverse())})}else{var D=w.get(["itemStyle","height"]);null==D?D=v:(D=ee(D,l),"ascending"===o&&(D=-D));I=x(b,d),A=x(S,d+D);d+=D+m,i.setItemLayout(b,{points:I.concat(A.slice().reverse())})}}!function(t){var e=t.hostModel.get("orient");t.each((function(i){var n,o,r,a,s=t.getItemModel(i),l=s.getModel("label").get("position"),u=s.getModel("labelLine"),c=t.getItemLayout(i),d=c.points,p="inner"===l||"inside"===l||"center"===l||"insideLeft"===l||"insideRight"===l;if(p)"insideLeft"===l?(o=(d[0][0]+d[3][0])/2+5,r=(d[0][1]+d[3][1])/2,n="left"):"insideRight"===l?(o=(d[1][0]+d[2][0])/2-5,r=(d[1][1]+d[2][1])/2,n="right"):(o=(d[0][0]+d[1][0]+d[2][0]+d[3][0])/4,r=(d[0][1]+d[1][1]+d[2][1]+d[3][1])/4,n="center"),a=[[o,r],[o,r]];else{var h=void 0,g=void 0,f=void 0,y=void 0,m=u.get("length");"vertical"===e&&["top","bottom"].indexOf(l)>-1&&(l="left",console.warn("Position error: Funnel chart on vertical orient dose not support top and bottom.")),"horizontal"===e&&["left","right"].indexOf(l)>-1&&(l="bottom",console.warn("Position error: Funnel chart on horizontal orient dose not support left and right.")),"left"===l?(h=(d[3][0]+d[0][0])/2,g=(d[3][1]+d[0][1])/2,o=(f=h-m)-5,n="right"):"right"===l?(h=(d[1][0]+d[2][0])/2,g=(d[1][1]+d[2][1])/2,o=(f=h+m)+5,n="left"):"top"===l?(h=(d[3][0]+d[0][0])/2,r=(y=(g=(d[3][1]+d[0][1])/2)-m)-5,n="center"):"bottom"===l?(h=(d[1][0]+d[2][0])/2,r=(y=(g=(d[1][1]+d[2][1])/2)+m)+5,n="center"):"rightTop"===l?(h="horizontal"===e?d[3][0]:d[1][0],g="horizontal"===e?d[3][1]:d[1][1],"horizontal"===e?(r=(y=g-m)-5,n="center"):(o=(f=h+m)+5,n="top")):"rightBottom"===l?(h=d[2][0],g=d[2][1],"horizontal"===e?(r=(y=g+m)+5,n="center"):(o=(f=h+m)+5,n="bottom")):"leftTop"===l?(h=d[0][0],g="horizontal"===e?d[0][1]:d[1][1],"horizontal"===e?(r=(y=g-m)-5,n="center"):(o=(f=h-m)-5,n="right")):"leftBottom"===l?(h="horizontal"===e?d[1][0]:d[3][0],g="horizontal"===e?d[1][1]:d[2][1],"horizontal"===e?(r=(y=g+m)+5,n="center"):(o=(f=h-m)-5,n="right")):(h=(d[1][0]+d[2][0])/2,g=(d[1][1]+d[2][1])/2,"horizontal"===e?(r=(y=g+m)+5,n="center"):(o=(f=h+m)+5,n="left")),"horizontal"===e?o=f=h:r=y=g,a=[[h,g],[f,y]]}c.label={linePoints:a,x:o,y:r,verticalAlign:"middle",textAlign:n,inside:p}}))}(i)}))}var $d=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i._dataGroup=new mt,i._initialized=!1,i}return p(e,t),e.prototype.init=function(){this.group.add(this._dataGroup)},e.prototype.render=function(t,e,i,n){this._progressiveEls=null;var o=this._dataGroup,r=t.getData(),a=this._data,s=t.coordinateSystem,l=s.dimensions,u=ip(t);if(r.diff(a).add((function(t){np(ep(r,o,t,l,s),r,t,u)})).update((function(e,i){var n=a.getItemGraphicEl(i),o=tp(r,e,l,s);r.setItemGraphicEl(e,n),Lt(n,{shape:{points:o}},t,e),Ct(n),np(n,r,e,u)})).remove((function(t){var e=a.getItemGraphicEl(t);o.remove(e)})).execute(),!this._initialized){this._initialized=!0;var c=function(t,e,i){var n=t.model,o=t.getRect(),r=new re({shape:{x:o.x,y:o.y,width:o.width,height:o.height}}),a="horizontal"===n.get("layout")?"width":"height";return r.setShape(a,0),Tt(r,{shape:{width:o.width,height:o.height}},e,i),r}(s,t,(function(){setTimeout((function(){o.removeClipPath()}))}));o.setClipPath(c)}this._data=r},e.prototype.incrementalPrepareRender=function(t,e,i){this._initialized=!0,this._data=null,this._dataGroup.removeAll()},e.prototype.incrementalRender=function(t,e,i){for(var n=e.getData(),o=e.coordinateSystem,r=o.dimensions,a=ip(e),s=this._progressiveEls=[],l=t.start;l<t.end;l++){var u=ep(n,this._dataGroup,l,r,o);u.incremental=!0,np(u,n,l,a),s.push(u)}},e.prototype.remove=function(){this._dataGroup&&this._dataGroup.removeAll(),this._data=null},e.type="parallel",e}(St);function tp(t,e,i,n){for(var o,r=[],a=0;a<i.length;a++){var s=i[a],l=t.get(t.mapDimension(s),e);o=l,("category"===n.getAxis(s).type?null==o:null==o||isNaN(o))||r.push(n.dataToPoint(l,s))}return r}function ep(t,e,i,n,o){var r=tp(t,i,n,o),a=new Dt({shape:{points:r},z2:10});return e.add(a),t.setItemGraphicEl(i,a),a}function ip(t){var e=t.get("smooth",!0);return!0===e&&(e=.3),e=qi(e),Ji(e)&&(e=0),{smooth:e}}function np(t,e,i,n){t.useStyle(e.getItemVisual(i,"style")),t.style.fill=null,t.setShape("smooth",n.smooth);var o=e.getItemModel(i),r=o.getModel("emphasis");Pt(t,o,"lineStyle"),Rt(t,r.get("focus"),r.get("blurScope"),r.get("disabled"))}var op=$d,rp=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i.visualStyleAccessPath="lineStyle",i.visualDrawType="stroke",i}return p(e,t),e.prototype.getInitialData=function(t,e){return ft(null,this,{useEncodeDefaulter:Bt(ap,null,this)})},e.prototype.getRawIndicesByActiveState=function(t){var e=this.coordinateSystem,i=this.getData(),n=[];return e.eachActiveState(i,(function(e,o){t===e&&n.push(i.getRawIndex(o))})),n},e.type="series.parallel",e.dependencies=["parallel"],e.defaultOption={z:2,coordinateSystem:"parallel",parallelIndex:0,label:{show:!1},inactiveOpacity:.05,activeOpacity:1,lineStyle:{width:1,opacity:.45,type:"solid"},emphasis:{label:{show:!1}},progressive:500,smooth:!1,animationEasing:"linear"},e}(yt);function ap(t){var e=t.ecModel.getComponent("parallel",t.get("parallelIndex"));if(e){var i={};return h(e.dimensions,(function(t){var e=+t.replace("dim","");i[t]=e})),i}}var sp=rp,lp=["lineStyle","opacity"],up={seriesType:"parallel",reset:function(t,e){var i=t.coordinateSystem,n={normal:t.get(["lineStyle","opacity"]),active:t.get("activeOpacity"),inactive:t.get("inactiveOpacity")};return{progress:function(t,e){i.eachActiveState(e,(function(t,i){var o=n[t];if("normal"===t&&e.hasItemOption){var r=e.getItemModel(i).get(lp,!0);null!=r&&(o=r)}e.ensureUniqueItemVisual(i,"style").opacity=o}),t.start,t.end)}}}};function cp(t){!function(t){if(t.parallel)return;var e=!1;h(t.series,(function(t){t&&"parallel"===t.type&&(e=!0)})),e&&(t.parallel=[{}])}(t),function(t){var e=ti(t.parallelAxis);h(e,(function(e){if(dt(e)){var i=e.parallelIndex||0,n=ti(t.parallel)[i];n&&n.parallelAxisDefault&&Ht(e,n.parallelAxisDefault,!1)}}))}(t)}var dp=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return p(e,t),e.prototype.render=function(t,e,i){this._model=t,this._api=i,this._handlers||(this._handlers={},h(pp,(function(t,e){i.getZr().on(e,this._handlers[e]=Bt(t,this))}),this)),Qi(this,"_throttledDispatchExpand",t.get("axisExpandRate"),"fixRate")},e.prototype.dispose=function(t,e){Ki(this,"_throttledDispatchExpand"),h(this._handlers,(function(t,i){e.getZr().off(i,t)})),this._handlers=null},e.prototype._throttledDispatchExpand=function(t){this._dispatchExpand(t)},e.prototype._dispatchExpand=function(t){t&&this._api.dispatchAction(E({type:"parallelAxisExpand"},t))},e.type="parallel",e}($t),pp={mousedown:function(t){hp(this,"click")&&(this._mouseDownPoint=[t.offsetX,t.offsetY])},mouseup:function(t){var e=this._mouseDownPoint;if(hp(this,"click")&&e){var i=[t.offsetX,t.offsetY];if(Math.pow(e[0]-i[0],2)+Math.pow(e[1]-i[1],2)>5)return;var n=this._model.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]);"none"!==n.behavior&&this._dispatchExpand({axisExpandWindow:n.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(t){if(!this._mouseDownPoint&&hp(this,"mousemove")){var e=this._model,i=e.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]),n=i.behavior;"jump"===n&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand("none"===n?null:{axisExpandWindow:i.axisExpandWindow,animation:"jump"===n?null:{duration:0}})}}};function hp(t,e){var i=t._model;return i.get("axisExpandable")&&i.get("axisExpandTriggerOn")===e}var gp=dp,fp=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return p(e,t),e.prototype.init=function(){t.prototype.init.apply(this,arguments),this.mergeOption({})},e.prototype.mergeOption=function(t){var e=this.option;t&&Ht(e,t,!0),this._initDimensions()},e.prototype.contains=function(t,e){var i=t.get("parallelIndex");return null!=i&&e.getComponent("parallel",i)===this},e.prototype.setAxisExpand=function(t){h(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],(function(e){t.hasOwnProperty(e)&&(this.option[e]=t[e])}),this)},e.prototype._initDimensions=function(){var t=this.dimensions=[],e=this.parallelAxisIndex=[],i=S(this.ecModel.queryComponents({mainType:"parallelAxis"}),(function(t){return(t.get("parallelIndex")||0)===this.componentIndex}),this);h(i,(function(i){t.push("dim"+i.get("dim")),e.push(i.componentIndex)}))},e.type="parallel",e.dependencies=["parallelAxis"],e.layoutMode="box",e.defaultOption={z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},e}(Yt),yp=fp,mp=function(t){function e(e,i,n,o,r){var a=t.call(this,e,i,n)||this;return a.type=o||"value",a.axisIndex=r,a}return p(e,t),e.prototype.isHorizontal=function(){return"horizontal"!==this.coordinateSystem.getModel().get("layout")},e}(te),vp=mp,xp=h,_p=Math.min,bp=Math.max,Sp=Math.floor,wp=Math.ceil,Mp=Ci,Ip=Math.PI,Ap=function(){function t(t,e,i){this.type="parallel",this._axesMap=me(),this._axesLayout={},this.dimensions=t.dimensions,this._model=t,this._init(t,e,i)}return t.prototype._init=function(t,e,i){var n=t.dimensions,o=t.parallelAxisIndex;xp(n,(function(t,i){var n=o[i],r=e.getComponent("parallelAxis",n),a=this._axesMap.set(t,new vp(t,$i(r),[0,0],r.get("type"),n)),s="category"===a.type;a.onBand=s&&r.get("boundaryGap"),a.inverse=r.get("inverse"),r.axis=a,a.model=r,a.coordinateSystem=r.coordinateSystem=this}),this)},t.prototype.update=function(t,e){this._updateAxesFromSeries(this._model,t)},t.prototype.containPoint=function(t){var e=this._makeLayoutInfo(),i=e.axisBase,n=e.layoutBase,o=e.pixelDimIndex,r=t[1-o],a=t[o];return r>=i&&r<=i+e.axisLength&&a>=n&&a<=n+e.layoutLength},t.prototype.getModel=function(){return this._model},t.prototype._updateAxesFromSeries=function(t,e){e.eachSeries((function(i){if(t.contains(i,e)){var n=i.getData();xp(this.dimensions,(function(t){var e=this._axesMap.get(t);e.scale.unionExtentFromData(n,n.mapDimension(t)),tn(e.scale,e.model)}),this)}}),this)},t.prototype.resize=function(t,e){this._rect=Oe(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()}),this._layoutAxes()},t.prototype.getRect=function(){return this._rect},t.prototype._makeLayoutInfo=function(){var t,e=this._model,i=this._rect,n=["x","y"],o=["width","height"],r=e.get("layout"),a="horizontal"===r?0:1,s=i[o[a]],l=[0,s],u=this.dimensions.length,c=Dp(e.get("axisExpandWidth"),l),d=Dp(e.get("axisExpandCount")||0,[0,u]),p=e.get("axisExpandable")&&u>3&&u>d&&d>1&&c>0&&s>0,h=e.get("axisExpandWindow");h?(t=Dp(h[1]-h[0],l),h[1]=h[0]+t):(t=Dp(c*(d-1),l),(h=[c*(e.get("axisExpandCenter")||Sp(u/2))-t/2])[1]=h[0]+t);var g=(s-t)/(u-d);g<3&&(g=0);var f=[Sp(Mp(h[0]/c,1))+1,wp(Mp(h[1]/c,1))-1],y=g/c*h[0];return{layout:r,pixelDimIndex:a,layoutBase:i[n[a]],layoutLength:s,axisBase:i[n[1-a]],axisLength:i[o[1-a]],axisExpandable:p,axisExpandWidth:c,axisCollapseWidth:g,axisExpandWindow:h,axisCount:u,winInnerIndices:f,axisExpandWindow0Pos:y}},t.prototype._layoutAxes=function(){var t=this._rect,e=this._axesMap,i=this.dimensions,n=this._makeLayoutInfo(),o=n.layout;e.each((function(t){var e=[0,n.axisLength],i=t.inverse?1:0;t.setExtent(e[i],e[1-i])})),xp(i,(function(e,i){var r=(n.axisExpandable?Cp:Tp)(i,n),a={horizontal:{x:r.position,y:n.axisLength},vertical:{x:0,y:r.position}},s={horizontal:Ip/2,vertical:0},l=[a[o].x+t.x,a[o].y+t.y],u=s[o],c=ye();he(c,c,u),fe(c,c,l),this._axesLayout[e]={position:l,rotation:u,transform:c,axisNameAvailableWidth:r.axisNameAvailableWidth,axisLabelShow:r.axisLabelShow,nameTruncateMaxWidth:r.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}}),this)},t.prototype.getAxis=function(t){return this._axesMap.get(t)},t.prototype.dataToPoint=function(t,e){return this.axisCoordToPoint(this._axesMap.get(e).dataToCoord(t),e)},t.prototype.eachActiveState=function(t,e,i,n){null==i&&(i=0),null==n&&(n=t.count());var o=this._axesMap,r=this.dimensions,a=[],s=[];h(r,(function(e){a.push(t.mapDimension(e)),s.push(o.get(e).model)}));for(var l=this.hasAxisBrushed(),u=i;u<n;u++){var c=void 0;if(l){c="active";for(var d=t.getValues(a,u),p=0,g=r.length;p<g;p++){if("inactive"===s[p].getActiveState(d[p])){c="inactive";break}}}else c="normal";e(c,u)}},t.prototype.hasAxisBrushed=function(){for(var t=this.dimensions,e=this._axesMap,i=!1,n=0,o=t.length;n<o;n++)"normal"!==e.get(t[n]).model.getActiveState()&&(i=!0);return i},t.prototype.axisCoordToPoint=function(t,e){var i=this._axesLayout[e];return en([t,0],i.transform)},t.prototype.getAxisLayout=function(t){return J(this._axesLayout[t])},t.prototype.getSlidedAxisExpandWindow=function(t){var e=this._makeLayoutInfo(),i=e.pixelDimIndex,n=e.axisExpandWindow.slice(),o=n[1]-n[0],r=[0,e.axisExpandWidth*(e.axisCount-1)];if(!this.containPoint(t))return{behavior:"none",axisExpandWindow:n};var a,s=t[i]-e.layoutBase-e.axisExpandWindow0Pos,l="slide",u=e.axisCollapseWidth,c=this._model.get("axisExpandSlideTriggerArea"),d=null!=c[0];if(u)d&&u&&s<o*c[0]?(l="jump",a=s-o*c[2]):d&&u&&s>o*(1-c[0])?(l="jump",a=s-o*(1-c[2])):(a=s-o*c[1])>=0&&(a=s-o*(1-c[1]))<=0&&(a=0),(a*=e.axisExpandWidth/u)?nn(a,n,r,"all"):l="none";else{var p=n[1]-n[0];(n=[bp(0,r[1]*s/p-p/2)])[1]=_p(r[1],n[0]+p),n[0]=n[1]-p}return{axisExpandWindow:n,behavior:l}},t}();function Dp(t,e){return _p(bp(t,e[0]),e[1])}function Tp(t,e){var i=e.layoutLength/(e.axisCount-1);return{position:i*t,axisNameAvailableWidth:i,axisLabelShow:!0}}function Cp(t,e){var i,n,o=e.layoutLength,r=e.axisExpandWidth,a=e.axisCount,s=e.axisCollapseWidth,l=e.winInnerIndices,u=s,c=!1;return t<l[0]?(i=t*s,n=s):t<=l[1]?(i=e.axisExpandWindow0Pos+t*r-e.axisExpandWindow[0],u=r,c=!0):(i=o-(a-1-t)*s,n=s),{position:i,axisNameAvailableWidth:u,axisLabelShow:c,nameTruncateMaxWidth:n}}var Lp=Ap;var Np={create:function(t,e){var i=[];return t.eachComponent("parallel",(function(n,o){var r=new Lp(n,t,e);r.name="parallel_"+o,r.resize(n,e),n.coordinateSystem=r,r.model=n,i.push(r)})),t.eachSeries((function(t){if("parallel"===t.get("coordinateSystem")){var e=t.getReferringComponents("parallel",Re).models[0];t.coordinateSystem=e.coordinateSystem}})),i}},Pp=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i.activeIntervals=[],i}return p(e,t),e.prototype.getAreaSelectStyle=function(){return ri([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},e.prototype.setActiveIntervals=function(t){var e=this.activeIntervals=J(t);if(e)for(var i=e.length-1;i>=0;i--)on(e[i])},e.prototype.getActiveState=function(t){var e=this.activeIntervals;if(!e.length)return"normal";if(null==t||isNaN(+t))return"inactive";if(1===e.length){var i=e[0];if(i[0]<=t&&t<=i[1])return"active"}else for(var n=0,o=e.length;n<o;n++)if(e[n][0]<=t&&t<=e[n][1])return"active";return"inactive"},e}(Yt);jt(Pp,Xt);var kp=Pp,Ep=["axisLine","axisTickLabel","axisName"],Rp=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return p(e,t),e.prototype.init=function(e,i){t.prototype.init.apply(this,arguments),(this._brushController=new rn(i.getZr())).on("brush",Bt(this._onBrush,this))},e.prototype.render=function(t,e,i,n){if(!function(t,e,i){return i&&"axisAreaSelect"===i.type&&e.findComponents({mainType:"parallelAxis",query:i})[0]===t}(t,e,n)){this.axisModel=t,this.api=i,this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new mt,this.group.add(this._axisGroup),t.get("show")){var r=function(t,e){return e.getComponent("parallel",t.get("parallelIndex"))}(t,e),a=r.coordinateSystem,s=t.getAreaSelectStyle(),l=s.width,u=t.axis.dim,c=a.getAxisLayout(u),d=E({strokeContainThreshold:l},c),p=new qt(t,d);h(Ep,p.add,p),this._axisGroup.add(p.getGroup()),this._refreshBrushController(d,s,t,r,l,i),an(o,this._axisGroup,t)}}},e.prototype._refreshBrushController=function(t,e,i,n,o,r){var a=i.axis.getExtent(),s=a[1]-a[0],l=Math.min(30,.1*Math.abs(s)),u=g.create({x:a[0],y:-o/2,width:s,height:o});u.x-=l,u.width+=2*l,this._brushController.mount({enableGlobalPan:!0,rotation:t.rotation,x:t.position[0],y:t.position[1]}).setPanels([{panelId:"pl",clipPath:sn(u),isTargetByCursor:ln(u,r,n),getLinearBrushOtherExtent:un(u,0)}]).enableBrush({brushType:"lineX",brushStyle:e,removeOnClick:!0}).updateCovers(function(t){var e=t.axis;return b(t.activeIntervals,(function(t){return{brushType:"lineX",panelId:"pl",range:[e.dataToCoord(t[0],!0),e.dataToCoord(t[1],!0)]}}))}(i))},e.prototype._onBrush=function(t){var e=t.areas,i=this.axisModel,n=i.axis,o=b(e,(function(t){return[n.coordToData(t.range[0],!0),n.coordToData(t.range[1],!0)]}));(!i.option.realtime===t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:i.id,intervals:o})},e.prototype.dispose=function(){this._brushController.dispose()},e.type="parallelAxis",e}($t);var Vp=Rp,zp={type:"axisAreaSelect",event:"axisAreaSelected"};var Op={type:"value",areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};function Bp(t){t.registerComponentView(gp),t.registerComponentModel(yp),t.registerCoordinateSystem("parallel",Np),t.registerPreprocessor(cp),t.registerComponentModel(kp),t.registerComponentView(Vp),cn(t,"parallel",kp,Op),function(t){t.registerAction(zp,(function(t,e){e.eachComponent({mainType:"parallelAxis",query:t},(function(e){e.axis.model.setActiveIntervals(t.intervals)}))})),t.registerAction("parallelAxisExpand",(function(t,e){e.eachComponent({mainType:"parallel",query:t},(function(e){e.setAxisExpand(t)}))}))}(t)}var Gp=function(){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},Fp=function(t){function e(e){return t.call(this,e)||this}return p(e,t),e.prototype.getDefaultShape=function(){return new Gp},e.prototype.buildPath=function(t,e){var i=e.extent;t.moveTo(e.x1,e.y1),t.bezierCurveTo(e.cpx1,e.cpy1,e.cpx2,e.cpy2,e.x2,e.y2),"vertical"===e.orient?(t.lineTo(e.x2+i,e.y2),t.bezierCurveTo(e.cpx2+i,e.cpy2,e.cpx1+i,e.cpy1,e.x1+i,e.y1)):(t.lineTo(e.x2,e.y2+i),t.bezierCurveTo(e.cpx2,e.cpy2+i,e.cpx1,e.cpy1+i,e.x1,e.y1+i)),t.closePath()},e.prototype.highlight=function(){Li(this)},e.prototype.downplay=function(){Ni(this)},e}(B),Wp=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i._focusAdjacencyDisabled=!1,i}return p(e,t),e.prototype.render=function(t,e,i){var n=this,o=t.getGraph(),r=this.group,a=t.layoutInfo,s=a.width,l=a.height,u=t.getData(),c=t.getData("edge"),d=t.get("orient");this._model=t,r.removeAll(),r.x=a.x,r.y=a.y,o.eachEdge((function(e){var i=new Fp,n=xt(i);n.dataIndex=e.dataIndex,n.seriesIndex=t.seriesIndex,n.dataType="edge";var o,a,u,p,h,g,f,y,m=e.getModel(),v=m.getModel("lineStyle"),x=v.get("curveness"),_=e.node1.getLayout(),b=e.node1.getModel(),S=b.get("localX"),w=b.get("localY"),M=e.node2.getLayout(),I=e.node2.getModel(),A=I.get("localX"),D=I.get("localY"),T=e.getLayout();i.shape.extent=Math.max(1,T.dy),i.shape.orient=d,"vertical"===d?(o=(null!=S?S*s:_.x)+T.sy,a=(null!=w?w*l:_.y)+_.dy,u=(null!=A?A*s:M.x)+T.ty,h=o,g=a*(1-x)+(p=null!=D?D*l:M.y)*x,f=u,y=a*x+p*(1-x)):(o=(null!=S?S*s:_.x)+_.dx,a=(null!=w?w*l:_.y)+T.sy,h=o*(1-x)+(u=null!=A?A*s:M.x)*x,g=a,f=o*x+u*(1-x),y=p=(null!=D?D*l:M.y)+T.ty),i.setShape({x1:o,y1:a,x2:u,y2:p,cpx1:h,cpy1:g,cpx2:f,cpy2:y}),i.useStyle(v.getItemStyle()),Hp(i.style,d,e);var C=""+m.get("value"),L=Et(m,"edgeLabel");kt(i,L,{labelFetcher:{getFormattedLabel:function(e,i,n,o,r,a){return t.getFormattedLabel(e,i,"edge",o,xi(r,L.normal&&L.normal.get("formatter"),C),a)}},labelDataIndex:e.dataIndex,defaultText:C}),i.setTextConfig({position:"inside"});var N=m.getModel("emphasis");Pt(i,m,"lineStyle",(function(t){var i=t.getItemStyle();return Hp(i,d,e),i})),r.add(i),c.setItemGraphicEl(e.dataIndex,i);var P=N.get("focus");Rt(i,"adjacency"===P?e.getAdjacentDataIndices():"trajectory"===P?e.getTrajectoryDataIndices():P,N.get("blurScope"),N.get("disabled"))})),o.eachNode((function(e){var i=e.getLayout(),n=e.getModel(),o=n.get("localX"),a=n.get("localY"),c=n.getModel("emphasis"),d=new re({shape:{x:null!=o?o*s:i.x,y:null!=a?a*l:i.y,width:i.dx,height:i.dy},style:n.getModel("itemStyle").getItemStyle(),z2:10});kt(d,Et(n),{labelFetcher:{getFormattedLabel:function(e,i){return t.getFormattedLabel(e,i,"node")}},labelDataIndex:e.dataIndex,defaultText:e.id}),d.disableLabelAnimation=!0,d.setStyle("fill",e.getVisual("color")),d.setStyle("decal",e.getVisual("style").decal),Pt(d,n),r.add(d),u.setItemGraphicEl(e.dataIndex,d),xt(d).dataType="node";var p=c.get("focus");Rt(d,"adjacency"===p?e.getAdjacentDataIndices():"trajectory"===p?e.getTrajectoryDataIndices():p,c.get("blurScope"),c.get("disabled"))})),u.eachItemGraphicEl((function(e,o){u.getItemModel(o).get("draggable")&&(e.drift=function(e,r){n._focusAdjacencyDisabled=!0,this.shape.x+=e,this.shape.y+=r,this.dirty(),i.dispatchAction({type:"dragNode",seriesId:t.id,dataIndex:u.getRawIndex(o),localX:this.shape.x/s,localY:this.shape.y/l})},e.ondragend=function(){n._focusAdjacencyDisabled=!1},e.draggable=!0,e.cursor="move")})),!this._data&&t.isAnimationEnabled()&&r.setClipPath(function(t,e,i){var n=new re({shape:{x:t.x-10,y:t.y-10,width:0,height:t.height+20}});return Tt(n,{shape:{width:t.width+20}},e,i),n}(r.getBoundingRect(),t,(function(){r.removeClipPath()}))),this._data=t.getData()},e.prototype.dispose=function(){},e.type="sankey",e}(St);function Hp(t,e,i){switch(t.fill){case"source":t.fill=i.node1.getVisual("color"),t.decal=i.node1.getVisual("style").decal;break;case"target":t.fill=i.node2.getVisual("color"),t.decal=i.node2.getVisual("style").decal;break;case"gradient":var n=i.node1.getVisual("color"),o=i.node2.getVisual("color");N(n)&&N(o)&&(t.fill=new ce(0,0,+("horizontal"===e),+("vertical"===e),[{color:n,offset:0},{color:o,offset:1}]))}}var Up=Wp,jp=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return p(e,t),e.prototype.getInitialData=function(t,e){var i=t.edges||t.links,n=t.data||t.nodes,o=t.levels;this.levelModels=[];for(var r=this.levelModels,a=0;a<o.length;a++){if(!(null!=o[a].depth&&o[a].depth>=0))throw new Error("levels[i].depth is mandatory and should be natural number");r[o[a].depth]=new Ut(o[a],this,e)}if(n&&i){var s=Ed(n,i,this,!0,(function(t,e){t.wrapMethod("getItemModel",(function(t,e){var i=t.parentModel,n=i.getData().getItemLayout(e);if(n){var o=n.depth,r=i.levelModels[o];r&&(t.parentModel=r)}return t})),e.wrapMethod("getItemModel",(function(t,e){var i=t.parentModel,n=i.getGraph().getEdgeByIndex(e).node1.getLayout();if(n){var o=n.depth,r=i.levelModels[o];r&&(t.parentModel=r)}return t}))}));return s.data}},e.prototype.setNodePosition=function(t,e){var i=(this.option.data||this.option.nodes)[t];i.localX=e[0],i.localY=e[1]},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.formatTooltip=function(t,e,i){function n(t){return isNaN(t)||null==t}if("edge"===i){var o=this.getDataParams(t,i),r=o.data,a=o.value,s=r.source+" -- "+r.target;return Wt("nameValue",{name:s,value:a,noValue:n(a)})}var l=this.getGraph().getNodeByIndex(t).getLayout().value,u=this.getDataParams(t,i).data.name;return Wt("nameValue",{name:null!=u?u+"":null,value:l,noValue:n(l)})},e.prototype.optionUpdated=function(){},e.prototype.getDataParams=function(e,i){var n=t.prototype.getDataParams.call(this,e,i);if(null==n.value&&"node"===i){var o=this.getGraph().getNodeByIndex(e).getLayout().value;n.value=o}return n},e.type="series.sankey",e.defaultOption={z:2,coordinateSystem:"view",left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,label:{show:!0,position:"right",fontSize:12},edgeLabel:{show:!1,fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:"#212121"}},animationEasing:"linear",animationDuration:1e3},e}(yt),Xp=jp;function Yp(t,e){t.eachSeriesByType("sankey",(function(t){var i=t.get("nodeWidth"),n=t.get("nodeGap"),o=function(t,e){return Oe(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,e);t.layoutInfo=o;var r=o.width,a=o.height,s=t.getGraph(),l=s.nodes,u=s.edges;!function(t){h(t,(function(t){var e=nh(t.outEdges,ih),i=nh(t.inEdges,ih),n=t.getValue()||0,o=Math.max(e,i,n);t.setLayout({value:o},!0)}))}(l),function(t,e,i,n,o,r,a,s,l){(function(t,e,i,n,o,r,a){for(var s=[],l=[],u=[],c=[],d=0,p=0;p<e.length;p++)s[p]=1;for(p=0;p<t.length;p++)l[p]=t[p].inEdges.length,0===l[p]&&u.push(t[p]);var g=-1;for(;u.length;){for(var f=0;f<u.length;f++){var y=u[f],m=y.hostGraph.data.getRawDataItem(y.dataIndex),v=null!=m.depth&&m.depth>=0;v&&m.depth>g&&(g=m.depth),y.setLayout({depth:v?m.depth:d},!0),"vertical"===r?y.setLayout({dy:i},!0):y.setLayout({dx:i},!0);for(var x=0;x<y.outEdges.length;x++){var _=y.outEdges[x];s[e.indexOf(_)]=0;var b=_.node2;0==--l[t.indexOf(b)]&&c.indexOf(b)<0&&c.push(b)}}++d,u=c,c=[]}for(p=0;p<s.length;p++)if(1===s[p])throw new Error("Sankey is a DAG, the original data has cycle!");var S=g>d-1?g:d-1;a&&"left"!==a&&function(t,e,i,n){if("right"===e){for(var o=[],r=t,a=0;r.length;){for(var s=0;s<r.length;s++){var l=r[s];l.setLayout({skNodeHeight:a},!0);for(var u=0;u<l.inEdges.length;u++){var c=l.inEdges[u];o.indexOf(c.node1)<0&&o.push(c.node1)}}r=o,o=[],++a}h(t,(function(t){Zp(t)||t.setLayout({depth:Math.max(0,n-t.getLayout().skNodeHeight)},!0)}))}else"justify"===e&&function(t,e){h(t,(function(t){Zp(t)||t.outEdges.length||t.setLayout({depth:e},!0)}))}(t,n)}(t,a,0,S);!function(t,e,i){h(t,(function(t){var n=t.getLayout().depth*e;"vertical"===i?t.setLayout({y:n},!0):t.setLayout({x:n},!0)}))}(t,"vertical"===r?(o-i)/S:(n-i)/S,r)})(t,e,i,o,r,s,l),function(t,e,i,n,o,r,a){var s=function(t,e){var i=[],n="vertical"===e?"y":"x",o=dn(t,(function(t){return t.getLayout()[n]}));return o.keys.sort((function(t,e){return t-e})),h(o.keys,(function(t){i.push(o.buckets.get(t))})),i}(t,a);(function(t,e,i,n,o,r){var a=1/0;h(t,(function(t){var e=t.length,s=0;h(t,(function(t){s+=t.getLayout().value}));var l="vertical"===r?(n-(e-1)*o)/s:(i-(e-1)*o)/s;l<a&&(a=l)})),h(t,(function(t){h(t,(function(t,e){var i=t.getLayout().value*a;"vertical"===r?(t.setLayout({x:e},!0),t.setLayout({dx:i},!0)):(t.setLayout({y:e},!0),t.setLayout({dy:i},!0))}))})),h(e,(function(t){var e=+t.getValue()*a;t.setLayout({dy:e},!0)}))})(s,e,i,n,o,a),qp(s,o,i,n,a);for(var l=1;r>0;r--)Jp(s,l*=.99,a),qp(s,o,i,n,a),oh(s,l,a),qp(s,o,i,n,a)}(t,e,r,o,n,a,s),function(t,e){var i="vertical"===e?"x":"y";h(t,(function(t){t.outEdges.sort((function(t,e){return t.node2.getLayout()[i]-e.node2.getLayout()[i]})),t.inEdges.sort((function(t,e){return t.node1.getLayout()[i]-e.node1.getLayout()[i]}))})),h(t,(function(t){var e=0,i=0;h(t.outEdges,(function(t){t.setLayout({sy:e},!0),e+=t.getLayout().dy})),h(t.inEdges,(function(t){t.setLayout({ty:i},!0),i+=t.getLayout().dy}))}))}(t,s)}(l,u,i,n,r,a,0!==S(l,(function(t){return 0===t.getLayout().value})).length?0:t.get("layoutIterations"),t.get("orient"),t.get("nodeAlign"))}))}function Zp(t){var e=t.hostGraph.data.getRawDataItem(t.dataIndex);return null!=e.depth&&e.depth>=0}function qp(t,e,i,n,o){var r="vertical"===o?"x":"y";h(t,(function(t){var a,s,l;t.sort((function(t,e){return t.getLayout()[r]-e.getLayout()[r]}));for(var u=0,c=t.length,d="vertical"===o?"dx":"dy",p=0;p<c;p++)(l=u-(s=t[p]).getLayout()[r])>0&&(a=s.getLayout()[r]+l,"vertical"===o?s.setLayout({x:a},!0):s.setLayout({y:a},!0)),u=s.getLayout()[r]+s.getLayout()[d]+e;if((l=u-e-("vertical"===o?n:i))>0){a=s.getLayout()[r]-l,"vertical"===o?s.setLayout({x:a},!0):s.setLayout({y:a},!0),u=a;for(p=c-2;p>=0;--p)(l=(s=t[p]).getLayout()[r]+s.getLayout()[d]+e-u)>0&&(a=s.getLayout()[r]-l,"vertical"===o?s.setLayout({x:a},!0):s.setLayout({y:a},!0)),u=s.getLayout()[r]}}))}function Jp(t,e,i){h(t.slice().reverse(),(function(t){h(t,(function(t){if(t.outEdges.length){var n=nh(t.outEdges,Qp,i)/nh(t.outEdges,ih);if(isNaN(n)){var o=t.outEdges.length;n=o?nh(t.outEdges,Kp,i)/o:0}if("vertical"===i){var r=t.getLayout().x+(n-eh(t,i))*e;t.setLayout({x:r},!0)}else{var a=t.getLayout().y+(n-eh(t,i))*e;t.setLayout({y:a},!0)}}}))}))}function Qp(t,e){return eh(t.node2,e)*t.getValue()}function Kp(t,e){return eh(t.node2,e)}function $p(t,e){return eh(t.node1,e)*t.getValue()}function th(t,e){return eh(t.node1,e)}function eh(t,e){return"vertical"===e?t.getLayout().x+t.getLayout().dx/2:t.getLayout().y+t.getLayout().dy/2}function ih(t){return t.getValue()}function nh(t,e,i){for(var n=0,o=t.length,r=-1;++r<o;){var a=+e(t[r],i);isNaN(a)||(n+=a)}return n}function oh(t,e,i){h(t,(function(t){h(t,(function(t){if(t.inEdges.length){var n=nh(t.inEdges,$p,i)/nh(t.inEdges,ih);if(isNaN(n)){var o=t.inEdges.length;n=o?nh(t.inEdges,th,i)/o:0}if("vertical"===i){var r=t.getLayout().x+(n-eh(t,i))*e;t.setLayout({x:r},!0)}else{var a=t.getLayout().y+(n-eh(t,i))*e;t.setLayout({y:a},!0)}}}))}))}function rh(t){t.eachSeriesByType("sankey",(function(t){var e=t.getGraph(),i=e.nodes,n=e.edges;if(i.length){var o=1/0,r=-1/0;h(i,(function(t){var e=t.getLayout().value;e<o&&(o=e),e>r&&(r=e)})),h(i,(function(e){var i=new uc({type:"color",mappingMethod:"linear",dataExtent:[o,r],visual:t.get("color")}).mapValueToVisual(e.getLayout().value),n=e.getModel().get(["itemStyle","color"]);null!=n?(e.setVisual("color",n),e.setVisual("style",{fill:n})):(e.setVisual("color",i),e.setVisual("style",{fill:i}))}))}n.length&&h(n,(function(t){var e=t.getModel().get("lineStyle");t.setVisual("style",e)}))}))}var ah=function(){function t(){}return t.prototype.getInitialData=function(t,e){var i,n,o=e.getComponent("xAxis",this.get("xAxisIndex")),r=e.getComponent("yAxis",this.get("yAxisIndex")),a=o.get("type"),s=r.get("type");"category"===a?(t.layout="horizontal",i=o.getOrdinalMeta(),n=!0):"category"===s?(t.layout="vertical",i=r.getOrdinalMeta(),n=!0):t.layout=t.layout||"horizontal";var l=["x","y"],u="horizontal"===t.layout?0:1,c=this._baseAxisDim=l[u],d=l[1-u],p=[o,r],g=p[u].get("type"),f=p[1-u].get("type"),y=t.data;if(y&&n){var m=[];h(y,(function(t,e){var i;ct(t)?(i=t.slice(),t.unshift(e)):ct(t.value)?((i=E({},t)).value=i.value.slice(),t.value.unshift(e)):i=t,m.push(i)})),t.data=m}var v=this.defaultValueDimensions,x=[{name:c,type:pn(g),ordinalMeta:i,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:d,type:pn(f),dimsDef:v.slice()}];return Gt(this,{coordDimensions:x,dimensionsCount:v.length+1,encodeDefaulter:Ce(hn,x,this)})},t.prototype.getBaseAxis=function(){var t=this._baseAxisDim;return this.ecModel.getComponent(t+"Axis",this.get(t+"AxisIndex")).axis},t}(),sh=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],i.visualDrawType="stroke",i}return p(e,t),e.type="series.boxplot",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:"#fff",borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}},animationDuration:800},e}(yt);jt(sh,ah,!0);var lh=sh,uh=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return p(e,t),e.prototype.render=function(t,e,i){var n=t.getData(),o=this.group,r=this._data;this._data||o.removeAll();var a="horizontal"===t.get("layout")?1:0;n.diff(r).add((function(t){if(n.hasValue(t)){var e=ph(n.getItemLayout(t),n,t,a,!0);n.setItemGraphicEl(t,e),o.add(e)}})).update((function(t,e){var i=r.getItemGraphicEl(e);if(n.hasValue(t)){var s=n.getItemLayout(t);i?(Ct(i),hh(s,i,n,t)):i=ph(s,n,t,a),o.add(i),n.setItemGraphicEl(t,i)}else o.remove(i)})).remove((function(t){var e=r.getItemGraphicEl(t);e&&o.remove(e)})).execute(),this._data=n},e.prototype.remove=function(t){var e=this.group,i=this._data;this._data=null,i&&i.eachItemGraphicEl((function(t){t&&e.remove(t)}))},e.type="boxplot",e}(St),ch=function(){},dh=function(t){function e(e){var i=t.call(this,e)||this;return i.type="boxplotBoxPath",i}return p(e,t),e.prototype.getDefaultShape=function(){return new ch},e.prototype.buildPath=function(t,e){var i=e.points,n=0;for(t.moveTo(i[n][0],i[n][1]),n++;n<4;n++)t.lineTo(i[n][0],i[n][1]);for(t.closePath();n<i.length;n++)t.moveTo(i[n][0],i[n][1]),n++,t.lineTo(i[n][0],i[n][1])},e}(B);function ph(t,e,i,n,o){var r=t.ends,a=new dh({shape:{points:o?gh(r,n,t):r}});return hh(t,a,e,i,o),a}function hh(t,e,i,n,o){var r=i.hostModel;(0,Vt[o?"initProps":"updateProps"])(e,{shape:{points:t.ends}},r,n),e.useStyle(i.getItemVisual(n,"style")),e.style.strokeNoScale=!0,e.z2=100;var a=i.getItemModel(n),s=a.getModel("emphasis");Pt(e,a),Rt(e,s.get("focus"),s.get("blurScope"),s.get("disabled"))}function gh(t,e,i){return b(t,(function(t){return(t=t.slice())[e]=i.initBaseline,t}))}var fh=uh,yh=h;function mh(t){var e=function(t){var e=[],i=[];return t.eachSeriesByType("boxplot",(function(t){var n=t.getBaseAxis(),o=Ke(i,n);o<0&&(o=i.length,i[o]=n,e[o]={axis:n,seriesModels:[]}),e[o].seriesModels.push(t)})),e}(t);yh(e,(function(t){var e=t.seriesModels;e.length&&(!function(t){var e,i=t.axis,n=t.seriesModels,o=n.length,r=t.boxWidthList=[],a=t.boxOffsetList=[],s=[];if("category"===i.type)e=i.getBandWidth();else{var l=0;yh(n,(function(t){l=Math.max(l,t.getData().count())}));var u=i.getExtent();e=Math.abs(u[1]-u[0])/l}yh(n,(function(t){var i=t.get("boxWidth");ct(i)||(i=[i,i]),s.push([ee(i[0],e)||0,ee(i[1],e)||0])}));var c=.8*e-2,d=c/o*.3,p=(c-d*(o-1))/o,h=p/2-c/2;yh(n,(function(t,e){a.push(h),h+=d+p,r.push(Math.min(Math.max(p,s[e][0]),s[e][1]))}))}(t),yh(e,(function(e,i){!function(t,e,i){var n=t.coordinateSystem,o=t.getData(),r=i/2,a="horizontal"===t.get("layout")?0:1,s=1-a,l=["x","y"],u=o.mapDimension(l[a]),c=o.mapDimensionsAll(l[s]);if(null==u||c.length<5)return;for(var d=0;d<o.count();d++){var p=o.get(u,d),h=x(p,c[2],d),g=x(p,c[0],d),f=x(p,c[1],d),y=x(p,c[3],d),m=x(p,c[4],d),v=[];_(v,f,!1),_(v,y,!0),v.push(g,f,m,y),b(v,g),b(v,m),b(v,h),o.setItemLayout(d,{initBaseline:h[s],ends:v})}function x(t,i,r){var l,u=o.get(i,r),c=[];return c[a]=t,c[s]=u,isNaN(t)||isNaN(u)?l=[NaN,NaN]:(l=n.dataToPoint(c))[a]+=e,l}function _(t,e,i){var n=e.slice(),o=e.slice();n[a]+=r,o[a]-=r,i?t.push(n,o):t.push(o,n)}function b(t,e){var i=e.slice(),n=e.slice();i[a]-=r,n[a]+=r,t.push(i,n)}}(e,t.boxOffsetList[i],t.boxWidthList[i])})))}))}var vh={type:"echarts:boxplot",transform:function(t){var e=t.upstream;if(e.sourceFormat!==fn){var i;i=yn("source data is not applicable for this boxplot transform. Expect number[][]."),mn(i)}var n=function(t,e){for(var i=[],n=[],o=(e=e||{}).boundIQR,r="none"===o||0===o,a=0;a<t.length;a++){var s=on(t[a].slice()),l=gn(s,.25),u=gn(s,.5),c=gn(s,.75),d=s[0],p=s[s.length-1],h=(null==o?1.5:o)*(c-l),g=r?d:Math.max(d,l-h),f=r?p:Math.min(p,c+h),y=e.itemNameFormatter,m=Q(y)?y({value:a}):N(y)?y.replace("{value}",a+""):a+"";i.push([m,g,l,u,c,f]);for(var v=0;v<s.length;v++){var x=s[v];if(x<g||x>f){var _=[m,x];n.push(_)}}}return{boxData:i,outliers:n}}(e.getRawData(),t.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:n.boxData},{data:n.outliers}]}};var xh=["color","borderColor"],_h=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return p(e,t),e.prototype.render=function(t,e,i){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(t),this._isLargeDraw?this._renderLarge(t):this._renderNormal(t)},e.prototype.incrementalPrepareRender=function(t,e,i){this._clear(),this._updateDrawMode(t)},e.prototype.incrementalRender=function(t,e,i,n){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(t,e):this._incrementalRenderNormal(t,e)},e.prototype.eachRendered=function(t){ki(this._progressiveEls||this.group,t)},e.prototype._updateDrawMode=function(t){var e=t.pipelineContext.large;null!=this._isLargeDraw&&e===this._isLargeDraw||(this._isLargeDraw=e,this._clear())},e.prototype._renderNormal=function(t){var e=t.getData(),i=this._data,n=this.group,o=e.getLayout("isSimpleBox"),r=t.get("clip",!0),a=t.coordinateSystem,s=a.getArea&&a.getArea();this._data||n.removeAll(),e.diff(i).add((function(i){if(e.hasValue(i)){var a=e.getItemLayout(i);if(r&&Mh(s,a))return;var l=wh(a,i,!0);Tt(l,{shape:{points:a.ends}},t,i),Ih(l,e,i,o),n.add(l),e.setItemGraphicEl(i,l)}})).update((function(a,l){var u=i.getItemGraphicEl(l);if(e.hasValue(a)){var c=e.getItemLayout(a);r&&Mh(s,c)?n.remove(u):(u?(Lt(u,{shape:{points:c.ends}},t,a),Ct(u)):u=wh(c),Ih(u,e,a,o),n.add(u),e.setItemGraphicEl(a,u))}else n.remove(u)})).remove((function(t){var e=i.getItemGraphicEl(t);e&&n.remove(e)})).execute(),this._data=e},e.prototype._renderLarge=function(t){this._clear(),Ch(t,this.group);var e=t.get("clip",!0)?vn(t.coordinateSystem,!1,t):null;e?this.group.setClipPath(e):this.group.removeClipPath()},e.prototype._incrementalRenderNormal=function(t,e){for(var i,n=e.getData(),o=n.getLayout("isSimpleBox");null!=(i=t.next());){var r=wh(n.getItemLayout(i));Ih(r,n,i,o),r.incremental=!0,this.group.add(r),this._progressiveEls.push(r)}},e.prototype._incrementalRenderLarge=function(t,e){Ch(e,this.group,this._progressiveEls,!0)},e.prototype.remove=function(t){this._clear()},e.prototype._clear=function(){this.group.removeAll(),this._data=null},e.type="candlestick",e}(St),bh=function(){},Sh=function(t){function e(e){var i=t.call(this,e)||this;return i.type="normalCandlestickBox",i}return p(e,t),e.prototype.getDefaultShape=function(){return new bh},e.prototype.buildPath=function(t,e){var i=e.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}(B);function wh(t,e,i){var n=t.ends;return new Sh({shape:{points:i?Ah(n,t):n},z2:100})}function Mh(t,e){for(var i=!0,n=0;n<e.ends.length;n++)if(t.contain(e.ends[n][0],e.ends[n][1])){i=!1;break}return i}function Ih(t,e,i,n){var o=e.getItemModel(i);t.useStyle(e.getItemVisual(i,"style")),t.style.strokeNoScale=!0,t.__simpleBox=n,Pt(t,o)}function Ah(t,e){return b(t,(function(t){return(t=t.slice())[1]=e.initBaseline,t}))}var Dh=function(){},Th=function(t){function e(e){var i=t.call(this,e)||this;return i.type="largeCandlestickBox",i}return p(e,t),e.prototype.getDefaultShape=function(){return new Dh},e.prototype.buildPath=function(t,e){for(var i=e.points,n=0;n<i.length;)if(this.__sign===i[n++]){var o=i[n++];t.moveTo(o,i[n++]),t.lineTo(o,i[n++])}else n+=3},e}(B);function Ch(t,e,i,n){var o=t.getData().getLayout("largePoints"),r=new Th({shape:{points:o},__sign:1,ignoreCoarsePointer:!0});e.add(r);var a=new Th({shape:{points:o},__sign:-1,ignoreCoarsePointer:!0});e.add(a);var s=new Th({shape:{points:o},__sign:0,ignoreCoarsePointer:!0});e.add(s),Lh(1,r,t),Lh(-1,a,t),Lh(0,s,t),n&&(r.incremental=!0,a.incremental=!0),i&&i.push(r,a)}function Lh(t,e,i,n){var o=i.get(["itemStyle",t>0?"borderColor":"borderColor0"])||i.get(["itemStyle",t>0?"color":"color0"]);0===t&&(o=i.get(["itemStyle","borderColorDoji"]));var r=i.getModel("itemStyle").getItemStyle(xh);e.useStyle(r),e.style.fill=null,e.style.stroke=o}var Nh=_h,Ph=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i.defaultValueDimensions=[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],i}return p(e,t),e.prototype.getShadowDim=function(){return"open"},e.prototype.brushSelector=function(t,e,i){var n=e.getItemLayout(t);return n&&i.rect(n.brushRect)},e.type="series.candlestick",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,clip:!0,itemStyle:{color:"#eb5454",color0:"#47b262",borderColor:"#eb5454",borderColor0:"#47b262",borderColorDoji:null,borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationEasing:"linear",animationDuration:300},e}(yt);jt(Ph,ah,!0);var kh=Ph;function Eh(t){t&&ct(t.series)&&h(t.series,(function(t){dt(t)&&"k"===t.type&&(t.type="candlestick")}))}var Rh=["itemStyle","borderColor"],Vh=["itemStyle","borderColor0"],zh=["itemStyle","borderColorDoji"],Oh=["itemStyle","color"],Bh=["itemStyle","color0"],Gh={seriesType:"candlestick",plan:xn(),performRawSeries:!0,reset:function(t,e){function i(t,e){return e.get(t>0?Oh:Bh)}function n(t,e){return e.get(0===t?zh:t>0?Rh:Vh)}if(!e.isSeriesFiltered(t))return!t.pipelineContext.large&&{progress:function(t,e){for(var o;null!=(o=t.next());){var r=e.getItemModel(o),a=e.getItemLayout(o).sign,s=r.getItemStyle();s.fill=i(a,r),s.stroke=n(a,r)||s.fill;var l=e.ensureUniqueItemVisual(o,"style");E(l,s)}}}}},Fh={seriesType:"candlestick",plan:xn(),reset:function(t){var e=t.coordinateSystem,i=t.getData(),n=function(t,e){var i,n=t.getBaseAxis(),o="category"===n.type?n.getBandWidth():(i=n.getExtent(),Math.abs(i[1]-i[0])/e.count()),r=ee(H(t.get("barMaxWidth"),o),o),a=ee(H(t.get("barMinWidth"),1),o),s=t.get("barWidth");return null!=s?ee(s,o):Math.max(Math.min(o/2,r),a)}(t,i),o=["x","y"],r=i.getDimensionIndex(i.mapDimension(o[0])),a=b(i.mapDimensionsAll(o[1]),i.getDimensionIndex,i),s=a[0],l=a[1],u=a[2],c=a[3];if(i.setLayout({candleWidth:n,isSimpleBox:n<=1.3}),!(r<0||a.length<4))return{progress:t.pipelineContext.large?function(i,n){var o,a,d=bn(4*i.count),p=0,h=[],g=[],f=n.getStore(),y=!!t.get(["itemStyle","borderColorDoji"]);for(;null!=(a=i.next());){var m=f.get(r,a),v=f.get(s,a),x=f.get(l,a),_=f.get(u,a),b=f.get(c,a);isNaN(m)||isNaN(_)||isNaN(b)?(d[p++]=NaN,p+=3):(d[p++]=Wh(f,a,v,x,l,y),h[0]=m,h[1]=_,o=e.dataToPoint(h,null,g),d[p++]=o?o[0]:NaN,d[p++]=o?o[1]:NaN,h[1]=b,o=e.dataToPoint(h,null,g),d[p++]=o?o[1]:NaN)}n.setLayout("largePoints",d)}:function(t,i){var o,a=i.getStore();for(;null!=(o=t.next());){var d=a.get(r,o),p=a.get(s,o),h=a.get(l,o),g=a.get(u,o),f=a.get(c,o),y=Math.min(p,h),m=Math.max(p,h),v=M(y,d),x=M(m,d),_=M(g,d),b=M(f,d),S=[];I(S,x,0),I(S,v,1),S.push(D(b),D(x),D(_),D(v));var w=!!i.getItemModel(o).get(["itemStyle","borderColorDoji"]);i.setItemLayout(o,{sign:Wh(a,o,p,h,l,w),initBaseline:p>h?x[1]:v[1],ends:S,brushRect:A(g,f,d)})}function M(t,i){var n=[];return n[0]=i,n[1]=t,isNaN(i)||isNaN(t)?[NaN,NaN]:e.dataToPoint(n)}function I(t,e,i){var o=e.slice(),r=e.slice();o[0]=_n(o[0]+n/2,1,!1),r[0]=_n(r[0]-n/2,1,!0),i?t.push(o,r):t.push(r,o)}function A(t,e,i){var o=M(t,i),r=M(e,i);return o[0]-=n/2,r[0]-=n/2,{x:o[0],y:o[1],width:n,height:r[1]-o[1]}}function D(t){return t[0]=_n(t[0],1),t}}}}};function Wh(t,e,i,n,o,r){return i>n?-1:i<n?1:r?0:e>0?t.get(o,e-1)<=n?1:-1:1}var Hh=Fh;function Uh(t,e){var i=e.rippleEffectColor||e.color;t.eachChild((function(t){t.attr({z:e.z,zlevel:e.zlevel,style:{stroke:"stroke"===e.brushType?i:null,fill:"fill"===e.brushType?i:null}})}))}var jh=function(t){function e(e,i){var n=t.call(this)||this,o=new Ue(e,i),r=new mt;return n.add(o),n.add(r),n.updateData(e,i),n}return p(e,t),e.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},e.prototype.startEffectAnimation=function(t){for(var e=t.symbolType,i=t.color,n=t.rippleNumber,o=this.childAt(1),r=0;r<n;r++){var a=vt(e,-1,-1,2,2,i);a.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scaleX:.5,scaleY:.5});var s=-r/n*t.period+t.effectOffset;a.animate("",!0).when(t.period,{scaleX:t.rippleScale/2,scaleY:t.rippleScale/2}).delay(s).start(),a.animateStyle(!0).when(t.period,{opacity:0}).delay(s).start(),o.add(a)}Uh(o,t)},e.prototype.updateEffectAnimation=function(t){for(var e=this._effectCfg,i=this.childAt(1),n=["symbolType","period","rippleScale","rippleNumber"],o=0;o<n.length;o++){var r=n[o];if(e[r]!==t[r])return this.stopEffectAnimation(),void this.startEffectAnimation(t)}Uh(i,t)},e.prototype.highlight=function(){Li(this)},e.prototype.downplay=function(){Ni(this)},e.prototype.getSymbolType=function(){var t=this.childAt(0);return t&&t.getSymbolType()},e.prototype.updateData=function(t,e){var i=this,n=t.hostModel;this.childAt(0).updateData(t,e);var o=this.childAt(1),r=t.getItemModel(e),a=t.getItemVisual(e,"symbol"),s=zt(t.getItemVisual(e,"symbolSize")),l=t.getItemVisual(e,"style"),u=l&&l.fill,c=r.getModel("emphasis");o.setScale(s),o.traverse((function(t){t.setStyle("fill",u)}));var d=Pi(t.getItemVisual(e,"symbolOffset"),s);d&&(o.x=d[0],o.y=d[1]);var p=t.getItemVisual(e,"symbolRotate");o.rotation=(p||0)*Math.PI/180||0;var h={};h.showEffectOn=n.get("showEffectOn"),h.rippleScale=r.get(["rippleEffect","scale"]),h.brushType=r.get(["rippleEffect","brushType"]),h.period=1e3*r.get(["rippleEffect","period"]),h.effectOffset=e/t.count(),h.z=n.getShallow("z")||0,h.zlevel=n.getShallow("zlevel")||0,h.symbolType=a,h.color=u,h.rippleEffectColor=r.get(["rippleEffect","color"]),h.rippleNumber=r.get(["rippleEffect","number"]),"render"===h.showEffectOn?(this._effectCfg?this.updateEffectAnimation(h):this.startEffectAnimation(h),this._effectCfg=h):(this._effectCfg=null,this.stopEffectAnimation(),this.onHoverStateChange=function(t){"emphasis"===t?"render"!==h.showEffectOn&&i.startEffectAnimation(h):"normal"===t&&"render"!==h.showEffectOn&&i.stopEffectAnimation()}),this._effectCfg=h,Rt(this,c.get("focus"),c.get("blurScope"),c.get("disabled"))},e.prototype.fadeOut=function(t){t&&t()},e}(mt),Xh=jh,Yh=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return p(e,t),e.prototype.init=function(){this._symbolDraw=new bt(Xh)},e.prototype.render=function(t,e,i){var n=t.getData(),o=this._symbolDraw;o.updateData(n,{clipShape:this._getClipShape(t)}),this.group.add(o.group)},e.prototype._getClipShape=function(t){var e=t.coordinateSystem,i=e&&e.getArea&&e.getArea();return t.get("clip",!0)?i:null},e.prototype.updateTransform=function(t,e,i){var n=t.getData();this.group.dirty();var o=_t("").reset(t,e,i);o.progress&&o.progress({start:0,end:n.count(),count:n.count()},n),this._symbolDraw.updateLayout()},e.prototype._updateGroupTransform=function(t){var e=t.coordinateSystem;e&&e.getRoamTransform&&(this.group.transform=Sn(e.getRoamTransform()),this.group.decomposeTransform())},e.prototype.remove=function(t,e){this._symbolDraw&&this._symbolDraw.remove(!0)},e.type="effectScatter",e}(St),Zh=Yh,qh=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i.hasSymbolVisual=!0,i}return p(e,t),e.prototype.getInitialData=function(t,e){return ft(null,this,{useEncodeDefaulter:!0})},e.prototype.brushSelector=function(t,e,i){return i.point(e.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}(yt),Jh=qh;var Qh=function(t){function e(e,i,n){var o=t.call(this)||this;return o.add(o.createLine(e,i,n)),o._updateEffectSymbol(e,i),o}return p(e,t),e.prototype.createLine=function(t,e,i){return new pd(t,e,i)},e.prototype._updateEffectSymbol=function(t,e){var i=t.getItemModel(e).getModel("effect"),n=i.get("symbolSize"),o=i.get("symbol");ct(n)||(n=[n,n]);var r=t.getItemVisual(e,"style"),a=i.get("color")||r&&r.stroke,s=this.childAt(1);this._symbolType!==o&&(this.remove(s),(s=vt(o,-.5,-.5,1,1,a)).z2=100,s.culling=!0,this.add(s)),s&&(s.setStyle("shadowColor",a),s.setStyle(i.getItemStyle(["color"])),s.scaleX=n[0],s.scaleY=n[1],s.setColor(a),this._symbolType=o,this._symbolScale=n,this._updateEffectAnimation(t,i,e))},e.prototype._updateEffectAnimation=function(t,e,i){var n=this.childAt(1);if(n){var o=t.getItemLayout(i),r=1e3*e.get("period"),a=e.get("loop"),s=e.get("roundTrip"),l=e.get("constantSpeed"),u=ze(e.get("delay"),(function(e){return e/t.count()*r/3}));if(n.ignore=!0,this._updateAnimationPoints(n,o),l>0&&(r=this._getLineLength(n)/l*1e3),r!==this._period||a!==this._loop||s!==this._roundTrip){n.stopAnimation();var c=void 0;c=Q(u)?u(i):u,n.__t>0&&(c=-r*n.__t),this._animateSymbol(n,r,c,a,s)}this._period=r,this._loop=a,this._roundTrip=s}},e.prototype._animateSymbol=function(t,e,i,n,o){if(e>0){t.__t=0;var r=this,a=t.animate("",n).when(o?2*e:e,{__t:o?2:1}).delay(i).during((function(){r._updateSymbolPosition(t)}));n||a.done((function(){r.remove(t)})),a.start()}},e.prototype._getLineLength=function(t){return wn(t.__p1,t.__cp1)+wn(t.__cp1,t.__p2)},e.prototype._updateAnimationPoints=function(t,e){t.__p1=e[0],t.__p2=e[1],t.__cp1=e[2]||[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2]},e.prototype.updateData=function(t,e,i){this.childAt(0).updateData(t,e,i),this._updateEffectSymbol(t,e)},e.prototype._updateSymbolPosition=function(t){var e=t.__p1,i=t.__p2,n=t.__cp1,o=t.__t<1?t.__t:2-t.__t,r=[t.x,t.y],a=r.slice(),s=Ri,l=Mn;r[0]=s(e[0],n[0],i[0],o),r[1]=s(e[1],n[1],i[1],o);var u=t.__t<1?l(e[0],n[0],i[0],o):l(i[0],n[0],e[0],1-o),c=t.__t<1?l(e[1],n[1],i[1],o):l(i[1],n[1],e[1],1-o);t.rotation=-Math.atan2(c,u)-Math.PI/2,"line"!==this._symbolType&&"rect"!==this._symbolType&&"roundRect"!==this._symbolType||(void 0!==t.__lastT&&t.__lastT<t.__t?(t.scaleY=1.05*wn(a,r),1===o&&(r[0]=a[0]+(r[0]-a[0])/2,r[1]=a[1]+(r[1]-a[1])/2)):1===t.__lastT?t.scaleY=2*wn(e,r):t.scaleY=this._symbolScale[1]),t.__lastT=t.__t,t.ignore=!1,t.x=r[0],t.y=r[1]},e.prototype.updateLayout=function(t,e){this.childAt(0).updateLayout(t,e);var i=t.getItemModel(e).getModel("effect");this._updateEffectAnimation(t,i,e)},e}(mt),Kh=Qh,$h=function(t){function e(e,i,n){var o=t.call(this)||this;return o._createPolyline(e,i,n),o}return p(e,t),e.prototype._createPolyline=function(t,e,i){var n=t.getItemLayout(e),o=new Dt({shape:{points:n}});this.add(o),this._updateCommonStl(t,e,i)},e.prototype.updateData=function(t,e,i){var n=t.hostModel,o=this.childAt(0),r={shape:{points:t.getItemLayout(e)}};Lt(o,r,n,e),this._updateCommonStl(t,e,i)},e.prototype._updateCommonStl=function(t,e,i){var n=this.childAt(0),o=t.getItemModel(e),r=i&&i.emphasisLineStyle,a=i&&i.focus,s=i&&i.blurScope,l=i&&i.emphasisDisabled;if(!i||t.hasItemOption){var u=o.getModel("emphasis");r=u.getModel("lineStyle").getLineStyle(),l=u.get("disabled"),a=u.get("focus"),s=u.get("blurScope")}n.useStyle(t.getItemVisual(e,"style")),n.style.fill=null,n.style.strokeNoScale=!0,n.ensureState("emphasis").style=r,Rt(this,a,s,l)},e.prototype.updateLayout=function(t,e){this.childAt(0).setShape("points",t.getItemLayout(e))},e}(mt),tg=$h,eg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._lastFrame=0,e._lastFramePercent=0,e}return p(e,t),e.prototype.createLine=function(t,e,i){return new tg(t,e,i)},e.prototype._updateAnimationPoints=function(t,e){this._points=e;for(var i=[0],n=0,o=1;o<e.length;o++){var r=e[o-1],a=e[o];n+=wn(r,a),i.push(n)}if(0!==n){for(o=0;o<i.length;o++)i[o]/=n;this._offsets=i,this._length=n}else this._length=0},e.prototype._getLineLength=function(){return this._length},e.prototype._updateSymbolPosition=function(t){var e=t.__t<1?t.__t:2-t.__t,i=this._points,n=this._offsets,o=i.length;if(n){var r,a=this._lastFrame;if(e<this._lastFramePercent){for(r=Math.min(a+1,o-1);r>=0&&!(n[r]<=e);r--);r=Math.min(r,o-2)}else{for(r=a;r<o&&!(n[r]>e);r++);r=Math.min(r-1,o-2)}var s=(e-n[r])/(n[r+1]-n[r]),l=i[r],u=i[r+1];t.x=l[0]*(1-s)+s*u[0],t.y=l[1]*(1-s)+s*u[1];var c=t.__t<1?u[0]-l[0]:l[0]-u[0],d=t.__t<1?u[1]-l[1]:l[1]-u[1];t.rotation=-Math.atan2(d,c)-Math.PI/2,this._lastFrame=r,this._lastFramePercent=e,t.ignore=!1}},e}(Kh),ig=eg,ng=function(){this.polyline=!1,this.curveness=0,this.segs=[]},og=function(t){function e(e){var i=t.call(this,e)||this;return i._off=0,i.hoverDataIdx=-1,i}return p(e,t),e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new ng},e.prototype.buildPath=function(t,e){var i,n=e.segs,o=e.curveness;if(e.polyline)for(i=this._off;i<n.length;){var r=n[i++];if(r>0){t.moveTo(n[i++],n[i++]);for(var a=1;a<r;a++)t.lineTo(n[i++],n[i++])}}else for(i=this._off;i<n.length;){var s=n[i++],l=n[i++],u=n[i++],c=n[i++];if(t.moveTo(s,l),o>0){var d=(s+u)/2-(l-c)*o,p=(l+c)/2-(u-s)*o;t.quadraticCurveTo(d,p,u,c)}else t.lineTo(u,c)}this.incremental&&(this._off=i,this.notClear=!0)},e.prototype.findDataIndex=function(t,e){var i=this.shape,n=i.segs,o=i.curveness,r=this.style.lineWidth;if(i.polyline)for(var a=0,s=0;s<n.length;){var l=n[s++];if(l>0)for(var u=n[s++],c=n[s++],d=1;d<l;d++){var p=n[s++],h=n[s++];if(In(u,c,p,h,r,t,e))return a}a++}else for(a=0,s=0;s<n.length;){u=n[s++],c=n[s++],p=n[s++],h=n[s++];if(o>0){if(An(u,c,(u+p)/2-(c-h)*o,(c+h)/2-(p-u)*o,p,h,r,t,e))return a}else if(In(u,c,p,h,r,t,e))return a;a++}return-1},e.prototype.contain=function(t,e){var i=this.transformCoordToLocal(t,e),n=this.getBoundingRect();return t=i[0],e=i[1],n.contain(t,e)?(this.hoverDataIdx=this.findDataIndex(t,e))>=0:(this.hoverDataIdx=-1,!1)},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var e=this.shape.segs,i=1/0,n=1/0,o=-1/0,r=-1/0,a=0;a<e.length;){var s=e[a++],l=e[a++];i=Math.min(s,i),o=Math.max(s,o),n=Math.min(l,n),r=Math.max(l,r)}t=this._rect=new g(i,n,o,r)}return t},e}(B),rg=function(){function t(){this.group=new mt}return t.prototype.updateData=function(t){this._clear();var e=this._create();e.setShape({segs:t.getLayout("linesPoints")}),this._setCommon(e,t)},t.prototype.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clear()},t.prototype.incrementalUpdate=function(t,e){var i=this._newAdded[0],n=e.getLayout("linesPoints"),o=i&&i.shape.segs;if(o&&o.length<2e4){var r=o.length,a=new Float32Array(r+n.length);a.set(o),a.set(n,r),i.setShape({segs:a})}else{this._newAdded=[];var s=this._create();s.incremental=!0,s.setShape({segs:n}),this._setCommon(s,e),s.__startIndex=t.start}},t.prototype.remove=function(){this._clear()},t.prototype.eachRendered=function(t){this._newAdded[0]&&t(this._newAdded[0])},t.prototype._create=function(){var t=new og({cursor:"default",ignoreCoarsePointer:!0});return this._newAdded.push(t),this.group.add(t),t},t.prototype._setCommon=function(t,e,i){var n=e.hostModel;t.setShape({polyline:n.get("polyline"),curveness:n.get(["lineStyle","curveness"])}),t.useStyle(n.getModel("lineStyle").getLineStyle()),t.style.strokeNoScale=!0;var o=e.getVisual("style");o&&o.stroke&&t.setStyle("stroke",o.stroke),t.setStyle("fill",null);var r=xt(t);r.seriesIndex=n.seriesIndex,t.on("mousemove",(function(e){r.dataIndex=null;var i=t.hoverDataIdx;i>0&&(r.dataIndex=i+t.__startIndex)}))},t.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},t}(),ag={seriesType:"lines",plan:xn(),reset:function(t){var e=t.coordinateSystem;if(e){var i=t.get("polyline"),n=t.pipelineContext.large;return{progress:function(o,r){var a=[];if(n){var s=void 0,l=o.end-o.start;if(i){for(var u=0,c=o.start;c<o.end;c++)u+=t.getLineCoordsCount(c);s=new Float32Array(l+2*u)}else s=new Float32Array(4*l);var d=0,p=[];for(c=o.start;c<o.end;c++){var h=t.getLineCoords(c,a);i&&(s[d++]=h);for(var g=0;g<h;g++)p=e.dataToPoint(a[g],!1,p),s[d++]=p[0],s[d++]=p[1]}r.setLayout("linesPoints",s)}else for(c=o.start;c<o.end;c++){var f=r.getItemModel(c),y=(h=t.getLineCoords(c,a),[]);if(i)for(var m=0;m<h;m++)y.push(e.dataToPoint(a[m]));else{y[0]=e.dataToPoint(a[0]),y[1]=e.dataToPoint(a[1]);var v=f.get(["lineStyle","curveness"]);+v&&(y[2]=[(y[0][0]+y[1][0])/2-(y[0][1]-y[1][1])*v,(y[0][1]+y[1][1])/2-(y[1][0]-y[0][0])*v])}r.setItemLayout(c,y)}}}}Dn("The lines series must have a coordinate system.")}},sg=ag,lg=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return p(e,t),e.prototype.render=function(t,e,i){var n=t.getData(),o=this._updateLineDraw(n,t),r=t.get("zlevel"),a=t.get(["effect","trailLength"]),s=i.getZr(),l="svg"===s.painter.getType();l||s.painter.getLayer(r).clear(!0),null==this._lastZlevel||l||s.configLayer(this._lastZlevel,{motionBlur:!1}),this._showEffect(t)&&a>0&&(l?console.warn("SVG render mode doesn't support lines with trail effect"):s.configLayer(r,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(a/10+.9,1),0)})),o.updateData(n);var u=t.get("clip",!0)&&vn(t.coordinateSystem,!1,t);u?this.group.setClipPath(u):this.group.removeClipPath(),this._lastZlevel=r,this._finished=!0},e.prototype.incrementalPrepareRender=function(t,e,i){var n=t.getData();this._updateLineDraw(n,t).incrementalPrepareUpdate(n),this._clearLayer(i),this._finished=!1},e.prototype.incrementalRender=function(t,e,i){this._lineDraw.incrementalUpdate(t,e.getData()),this._finished=t.end===e.getData().count()},e.prototype.eachRendered=function(t){this._lineDraw&&this._lineDraw.eachRendered(t)},e.prototype.updateTransform=function(t,e,i){var n=t.getData(),o=t.pipelineContext;if(!this._finished||o.large||o.progressiveRender)return{update:!0};var r=sg.reset(t,e,i);r.progress&&r.progress({start:0,end:n.count(),count:n.count()},n),this._lineDraw.updateLayout(),this._clearLayer(i)},e.prototype._updateLineDraw=function(t,e){var i=this._lineDraw,n=this._showEffect(e),o=!!e.get("polyline"),r=e.pipelineContext.large;return n&&r&&console.warn("Large lines not support effect"),i&&n===this._hasEffet&&o===this._isPolyline&&r===this._isLargeDraw||(i&&i.remove(),i=this._lineDraw=r?new rg:new yd(o?n?ig:tg:n?Kh:pd),this._hasEffet=n,this._isPolyline=o,this._isLargeDraw=r),this.group.add(i.group),i},e.prototype._showEffect=function(t){return!!t.get(["effect","show"])},e.prototype._clearLayer=function(t){var e=t.getZr();"svg"===e.painter.getType()||null==this._lastZlevel||e.painter.getLayer(this._lastZlevel).clear(!0)},e.prototype.remove=function(t,e){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(e)},e.prototype.dispose=function(t,e){this.remove(t,e)},e.type="lines",e}(St),ug=lg,cg="undefined"==typeof Uint32Array?Array:Uint32Array,dg="undefined"==typeof Float64Array?Array:Float64Array;function pg(t){var e=t.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(console.warn("Lines data configuration has been changed to { coords:[[1,2],[2,3]] }"),t.data=b(e,(function(t){var e={coords:[t[0].coord,t[1].coord]};return t[0].name&&(e.fromName=t[0].name),t[1].name&&(e.toName=t[1].name),Ve([e,t[0],t[1]])})))}var hg=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i.visualStyleAccessPath="lineStyle",i.visualDrawType="stroke",i}return p(e,t),e.prototype.init=function(e){e.data=e.data||[],pg(e);var i=this._processFlatCoordsArray(e.data);this._flatCoords=i.flatCoords,this._flatCoordsOffset=i.flatCoordsOffset,i.flatCoords&&(e.data=new Float32Array(i.count)),t.prototype.init.apply(this,arguments)},e.prototype.mergeOption=function(e){if(pg(e),e.data){var i=this._processFlatCoordsArray(e.data);this._flatCoords=i.flatCoords,this._flatCoordsOffset=i.flatCoordsOffset,i.flatCoords&&(e.data=new Float32Array(i.count))}t.prototype.mergeOption.apply(this,arguments)},e.prototype.appendData=function(t){var e=this._processFlatCoordsArray(t.data);e.flatCoords&&(this._flatCoords?(this._flatCoords=je(this._flatCoords,e.flatCoords),this._flatCoordsOffset=je(this._flatCoordsOffset,e.flatCoordsOffset)):(this._flatCoords=e.flatCoords,this._flatCoordsOffset=e.flatCoordsOffset),t.data=new Float32Array(e.count)),this.getRawData().appendData(t.data)},e.prototype._getCoordsFromItemModel=function(t){var e=this.getData().getItemModel(t),i=e.option instanceof Array?e.option:e.getShallow("coords");if(!(i instanceof Array&&i.length>0&&i[0]instanceof Array))throw new Error("Invalid coords "+JSON.stringify(i)+". Lines must have 2d coords array in data item.");return i},e.prototype.getLineCoordsCount=function(t){return this._flatCoordsOffset?this._flatCoordsOffset[2*t+1]:this._getCoordsFromItemModel(t).length},e.prototype.getLineCoords=function(t,e){if(this._flatCoordsOffset){for(var i=this._flatCoordsOffset[2*t],n=this._flatCoordsOffset[2*t+1],o=0;o<n;o++)e[o]=e[o]||[],e[o][0]=this._flatCoords[i+2*o],e[o][1]=this._flatCoords[i+2*o+1];return n}var r=this._getCoordsFromItemModel(t);for(o=0;o<r.length;o++)e[o]=e[o]||[],e[o][0]=r[o][0],e[o][1]=r[o][1];return r.length},e.prototype._processFlatCoordsArray=function(t){var e=0;if(this._flatCoords&&(e=this._flatCoords.length),O(t[0])){for(var i=t.length,n=new cg(i),o=new dg(i),r=0,a=0,s=0,l=0;l<i;){s++;var u=t[l++];n[a++]=r+e,n[a++]=u;for(var c=0;c<u;c++){var d=t[l++],p=t[l++];if(o[r++]=d,o[r++]=p,l>i)throw new Error("Invalid data format.")}}return{flatCoordsOffset:new Uint32Array(n.buffer,0,a),flatCoords:o,count:s}}return{flatCoordsOffset:null,flatCoords:null,count:t.length}},e.prototype.getInitialData=function(t,e){if(!zi.get(t.coordinateSystem))throw new Error("Unknown coordinate system "+t.coordinateSystem);var i=new Qe(["value"],this);return i.hasItemOption=!1,i.initData(t.data,[],(function(t,e,n,o){if(t instanceof Array)return NaN;i.hasItemOption=!0;var r=t.value;return null!=r?r instanceof Array?r[o]:r:void 0})),i},e.prototype.formatTooltip=function(t,e,i){var n=this.getData().getItemModel(t),o=n.get("name");if(o)return o;var r=n.get("fromName"),a=n.get("toName"),s=[];return null!=r&&s.push(r),null!=a&&s.push(a),Wt("nameValue",{name:s.join(" > ")})},e.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},e.prototype.getProgressive=function(){var t=this.option.progressive;return null==t?this.option.large?1e4:this.get("progressive"):t},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?2e4:this.get("progressiveThreshold"):t},e.prototype.getZLevelKey=function(){var t=this.getModel("effect"),e=t.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:t.get("show")&&e>0?e+"":""},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}(yt),gg=hg;function fg(t){return t instanceof Array||(t=[t,t]),t}var yg={seriesType:"lines",reset:function(t){var e=fg(t.get("symbol")),i=fg(t.get("symbolSize")),n=t.getData();return n.setVisual("fromSymbol",e&&e[0]),n.setVisual("toSymbol",e&&e[1]),n.setVisual("fromSymbolSize",i&&i[0]),n.setVisual("toSymbolSize",i&&i[1]),{dataEach:n.hasItemOption?function(t,e){var i=t.getItemModel(e),n=fg(i.getShallow("symbol",!0)),o=fg(i.getShallow("symbolSize",!0));n[0]&&t.setItemVisual(e,"fromSymbol",n[0]),n[1]&&t.setItemVisual(e,"toSymbol",n[1]),o[0]&&t.setItemVisual(e,"fromSymbolSize",o[0]),o[1]&&t.setItemVisual(e,"toSymbolSize",o[1])}:null}}};var mg=function(){function t(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var t=Tn.createCanvas();this.canvas=t}return t.prototype.update=function(t,e,i,n,o,r){var a=this._getBrush(),s=this._getGradient(o,"inRange"),l=this._getGradient(o,"outOfRange"),u=this.pointSize+this.blurSize,c=this.canvas,d=c.getContext("2d"),p=t.length;c.width=e,c.height=i;for(var h=0;h<p;++h){var g=t[h],f=g[0],y=g[1],m=n(g[2]);d.globalAlpha=m,d.drawImage(a,f-u,y-u)}if(!c.width||!c.height)return c;for(var v=d.getImageData(0,0,c.width,c.height),x=v.data,_=0,b=x.length,S=this.minOpacity,w=this.maxOpacity-S;_<b;){m=x[_+3]/256;var M=4*Math.floor(255*m);if(m>0){var I=r(m)?s:l;m>0&&(m=m*w+S),x[_++]=I[M],x[_++]=I[M+1],x[_++]=I[M+2],x[_++]=I[M+3]*m*256}else _+=4}return d.putImageData(v,0,0),c},t.prototype._getBrush=function(){var t=this._brushCanvas||(this._brushCanvas=Tn.createCanvas()),e=this.pointSize+this.blurSize,i=2*e;t.width=i,t.height=i;var n=t.getContext("2d");return n.clearRect(0,0,i,i),n.shadowOffsetX=i,n.shadowBlur=this.blurSize,n.shadowColor="#000",n.beginPath(),n.arc(-e,e,this.pointSize,0,2*Math.PI,!0),n.closePath(),n.fill(),t},t.prototype._getGradient=function(t,e){for(var i=this._gradientPixels,n=i[e]||(i[e]=new Uint8ClampedArray(1024)),o=[0,0,0,0],r=0,a=0;a<256;a++)t[e](a/255,!0,o),n[r++]=o[0],n[r++]=o[1],n[r++]=o[2],n[r++]=o[3];return n},t}(),vg=mg;function xg(t){var e=t.dimensions;return"lng"===e[0]&&"lat"===e[1]}var _g=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return p(e,t),e.prototype.render=function(t,e,i){var n;if(e.eachComponent("visualMap",(function(e){e.eachTargetSeries((function(i){i===t&&(n=e)}))})),!n)throw new Error("Heatmap must use with visualMap");this._progressiveEls=null,this.group.removeAll();var o=t.coordinateSystem;"cartesian2d"===o.type||"calendar"===o.type?this._renderOnCartesianAndCalendar(t,i,0,t.getData().count()):xg(o)&&this._renderOnGeo(o,t,n,i)},e.prototype.incrementalPrepareRender=function(t,e,i){this.group.removeAll()},e.prototype.incrementalRender=function(t,e,i,n){var o=e.coordinateSystem;o&&(xg(o)?this.render(e,i,n):(this._progressiveEls=[],this._renderOnCartesianAndCalendar(e,n,t.start,t.end,!0)))},e.prototype.eachRendered=function(t){ki(this._progressiveEls||this.group,t)},e.prototype._renderOnCartesianAndCalendar=function(t,e,i,n,o){var r,a,s,l,u=t.coordinateSystem,c=Cn(u,"cartesian2d");if(c){var d=u.getAxis("x"),p=u.getAxis("y");if("category"!==d.type||"category"!==p.type)throw new Error("Heatmap on cartesian must have two category axes");if(!d.onBand||!p.onBand)throw new Error("Heatmap on cartesian must have two axes with boundaryGap true");r=d.getBandWidth()+.5,a=p.getBandWidth()+.5,s=d.scale.getExtent(),l=p.scale.getExtent()}for(var h=this.group,g=t.getData(),f=t.getModel(["emphasis","itemStyle"]).getItemStyle(),y=t.getModel(["blur","itemStyle"]).getItemStyle(),m=t.getModel(["select","itemStyle"]).getItemStyle(),v=t.get(["itemStyle","borderRadius"]),x=Et(t),_=t.getModel("emphasis"),b=_.get("focus"),S=_.get("blurScope"),w=_.get("disabled"),M=c?[g.mapDimension("x"),g.mapDimension("y"),g.mapDimension("value")]:[g.mapDimension("time"),g.mapDimension("value")],I=i;I<n;I++){var A=void 0,D=g.getItemVisual(I,"style");if(c){var T=g.get(M[0],I),C=g.get(M[1],I);if(isNaN(g.get(M[2],I))||isNaN(T)||isNaN(C)||T<s[0]||T>s[1]||C<l[0]||C>l[1])continue;var L=u.dataToPoint([T,C]);A=new re({shape:{x:L[0]-r/2,y:L[1]-a/2,width:r,height:a},style:D})}else{if(isNaN(g.get(M[1],I)))continue;A=new re({z2:1,shape:u.dataToRect([g.get(M[0],I)]).contentShape,style:D})}if(g.hasItemOption){var N=g.getItemModel(I),P=N.getModel("emphasis");f=P.getModel("itemStyle").getItemStyle(),y=N.getModel(["blur","itemStyle"]).getItemStyle(),m=N.getModel(["select","itemStyle"]).getItemStyle(),v=N.get(["itemStyle","borderRadius"]),b=P.get("focus"),S=P.get("blurScope"),w=P.get("disabled"),x=Et(N)}A.shape.r=v;var k=t.getRawValue(I),E="-";k&&null!=k[2]&&(E=k[2]+""),kt(A,x,{labelFetcher:t,labelDataIndex:I,defaultOpacity:D.opacity,defaultText:E}),A.ensureState("emphasis").style=f,A.ensureState("blur").style=y,A.ensureState("select").style=m,Rt(A,b,S,w),A.incremental=o,o&&(A.states.emphasis.hoverLayer=!0),h.add(A),g.setItemGraphicEl(I,A),this._progressiveEls&&this._progressiveEls.push(A)}},e.prototype._renderOnGeo=function(t,e,i,n){var o=i.targetVisuals.inRange,r=i.targetVisuals.outOfRange,a=e.getData(),s=this._hmLayer||this._hmLayer||new vg;s.blurSize=e.get("blurSize"),s.pointSize=e.get("pointSize"),s.minOpacity=e.get("minOpacity"),s.maxOpacity=e.get("maxOpacity");var l=t.getViewRect().clone(),u=t.getRoamTransform();l.applyTransform(u);var c=Math.max(l.x,0),d=Math.max(l.y,0),p=Math.min(l.width+l.x,n.getWidth()),h=Math.min(l.height+l.y,n.getHeight()),g=p-c,f=h-d,y=[a.mapDimension("lng"),a.mapDimension("lat"),a.mapDimension("value")],m=a.mapArray(y,(function(e,i,n){var o=t.dataToPoint([e,i]);return o[0]-=c,o[1]-=d,o.push(n),o})),v=i.getExtent(),x="visualMap.continuous"===i.type?function(t,e){var i=t[1]-t[0];return e=[(e[0]-t[0])/i,(e[1]-t[0])/i],function(t){return t>=e[0]&&t<=e[1]}}(v,i.option.range):function(t,e,i){var n=t[1]-t[0],o=(e=b(e,(function(e){return{interval:[(e.interval[0]-t[0])/n,(e.interval[1]-t[0])/n]}}))).length,r=0;return function(t){var n;for(n=r;n<o;n++)if((a=e[n].interval)[0]<=t&&t<=a[1]){r=n;break}if(n===o)for(n=r-1;n>=0;n--){var a;if((a=e[n].interval)[0]<=t&&t<=a[1]){r=n;break}}return n>=0&&n<o&&i[n]}}(v,i.getPieceList(),i.option.selected);s.update(m,g,f,o.color.getNormalizer(),{inRange:o.color.getColorMapper(),outOfRange:r.color.getColorMapper()},x);var _=new M({style:{width:g,height:f,x:c,y:d,image:s.canvas},silent:!0});this.group.add(_)},e.type="heatmap",e}(St),bg=_g,Sg=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return p(e,t),e.prototype.getInitialData=function(t,e){return ft(null,this,{generateCoord:"value"})},e.prototype.preventIncremental=function(){var t=zi.get(this.get("coordinateSystem"));if(t&&t.dimensions)return"lng"===t.dimensions[0]&&"lat"===t.dimensions[1]},e.type="series.heatmap",e.dependencies=["grid","geo","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:"#212121"}}},e}(yt),wg=Sg;var Mg=["itemStyle","borderWidth"],Ig=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],Ag=new Jt,Dg=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return p(e,t),e.prototype.render=function(t,e,i){var n=this.group,o=t.getData(),r=this._data,a=t.coordinateSystem,s=a.getBaseAxis().isHorizontal(),l=a.master.getRect(),u={ecSize:{width:i.getWidth(),height:i.getHeight()},seriesModel:t,coordSys:a,coordSysExtent:[[l.x,l.x+l.width],[l.y,l.y+l.height]],isHorizontal:s,valueDim:Ig[+s],categoryDim:Ig[1-+s]};return o.diff(r).add((function(t){if(o.hasValue(t)){var e=Rg(o,t),i=Tg(o,t,e,u),r=Og(o,u,i);o.setItemGraphicEl(t,r),n.add(r),Hg(r,u,i)}})).update((function(t,e){var i=r.getItemGraphicEl(e);if(o.hasValue(t)){var a=Rg(o,t),s=Tg(o,t,a,u),l=Gg(o,s);i&&l!==i.__pictorialShapeStr&&(n.remove(i),o.setItemGraphicEl(t,null),i=null),i?function(t,e,i){var n=i.animationModel,o=i.dataIndex,r=t.__pictorialBundle;Lt(r,{x:i.bundlePosition[0],y:i.bundlePosition[1]},n,o),i.symbolRepeat?Ng(t,e,i,!0):Pg(t,e,i,!0);kg(t,i,!0),Eg(t,e,i,!0)}(i,u,s):i=Og(o,u,s,!0),o.setItemGraphicEl(t,i),i.__pictorialSymbolMeta=s,n.add(i),Hg(i,u,s)}else n.remove(i)})).remove((function(t){var e=r.getItemGraphicEl(t);e&&Bg(r,t,e.__pictorialSymbolMeta.animationModel,e)})).execute(),this._data=o,this.group},e.prototype.remove=function(t,e){var i=this.group,n=this._data;t.get("animation")?n&&n.eachItemGraphicEl((function(e){Bg(n,xt(e).dataIndex,t,e)})):i.removeAll()},e.type="pictorialBar",e}(St);function Tg(t,e,i,n){var o=t.getItemLayout(e),r=i.get("symbolRepeat"),a=i.get("symbolClip"),s=i.get("symbolPosition")||"start",l=(i.get("symbolRotate")||0)*Math.PI/180||0,u=i.get("symbolPatternSize")||2,c=i.isAnimationEnabled(),d={dataIndex:e,layout:o,itemModel:i,symbolType:t.getItemVisual(e,"symbol")||"circle",style:t.getItemVisual(e,"style"),symbolClip:a,symbolRepeat:r,symbolRepeatDirection:i.get("symbolRepeatDirection"),symbolPatternSize:u,rotation:l,animationModel:c?i:null,hoverScale:c&&i.get(["emphasis","scale"]),z2:i.getShallow("z",!0)||0};!function(t,e,i,n,o){var r,a=n.valueDim,s=t.get("symbolBoundingData"),l=n.coordSys.getOtherAxis(n.coordSys.getBaseAxis()),u=l.toGlobalCoord(l.dataToCoord(0)),c=1-+(i[a.wh]<=0);if(ct(s)){var d=[Cg(l,s[0])-u,Cg(l,s[1])-u];d[1]<d[0]&&d.reverse(),r=d[c]}else r=null!=s?Cg(l,s)-u:e?n.coordSysExtent[a.index][c]-u:i[a.wh];o.boundingLength=r,e&&(o.repeatCutLength=i[a.wh]);o.pxSign=r>0?1:-1}(i,r,o,n,d),function(t,e,i,n,o,r,a,s,l,u){var c,d=l.valueDim,p=l.categoryDim,h=Math.abs(i[p.wh]),g=t.getItemVisual(e,"symbolSize");c=ct(g)?g.slice():null==g?["100%","100%"]:[g,g];c[p.index]=ee(c[p.index],h),c[d.index]=ee(c[d.index],n?h:Math.abs(r)),u.symbolSize=c,(u.symbolScale=[c[0]/s,c[1]/s])[d.index]*=(l.isHorizontal?-1:1)*a}(t,e,o,r,0,d.boundingLength,d.pxSign,u,n,d),function(t,e,i,n,o){var r=t.get(Mg)||0;r&&(Ag.attr({scaleX:e[0],scaleY:e[1],rotation:i}),Ag.updateTransform(),r/=Ag.getLineScale(),r*=e[n.valueDim.index]);o.valueLineWidth=r||0}(i,d.symbolScale,l,n,d);var p=d.symbolSize,h=Pi(i.get("symbolOffset"),p);return function(t,e,i,n,o,r,a,s,l,u,c,d){var p=c.categoryDim,h=c.valueDim,g=d.pxSign,f=Math.max(e[h.index]+s,0),y=f;if(n){var m=Math.abs(l),v=ze(t.get("symbolMargin"),"15%")+"",x=!1;v.lastIndexOf("!")===v.length-1&&(x=!0,v=v.slice(0,v.length-1));var _=ee(v,e[h.index]),b=Math.max(f+2*_,0),S=x?0:2*_,w=Ln(n),M=w?n:Ug((m+S)/b);b=f+2*(_=(m-M*f)/2/(x?M:Math.max(M-1,1))),S=x?0:2*_,w||"fixed"===n||(M=u?Ug((Math.abs(u)+S)/b):0),y=M*b-S,d.repeatTimes=M,d.symbolMargin=_}var I=g*(y/2),A=d.pathPosition=[];A[p.index]=i[p.wh]/2,A[h.index]="start"===a?I:"end"===a?l-I:l/2,r&&(A[0]+=r[0],A[1]+=r[1]);var D=d.bundlePosition=[];D[p.index]=i[p.xy],D[h.index]=i[h.xy];var T=d.barRectShape=E({},i);T[h.wh]=g*Math.max(Math.abs(i[h.wh]),Math.abs(A[h.index]+I)),T[p.wh]=i[p.wh];var C=d.clipShape={};C[p.xy]=-i[p.xy],C[p.wh]=c.ecSize[p.wh],C[h.xy]=0,C[h.wh]=i[h.wh]}(i,p,o,r,0,h,s,d.valueLineWidth,d.boundingLength,d.repeatCutLength,n,d),d}function Cg(t,e){return t.toGlobalCoord(t.dataToCoord(t.scale.parse(e)))}function Lg(t){var e=t.symbolPatternSize,i=vt(t.symbolType,-e/2,-e/2,e,e);return i.attr({culling:!0}),"image"!==i.type&&i.setStyle({strokeNoScale:!0}),i}function Ng(t,e,i,n){var o=t.__pictorialBundle,r=i.symbolSize,a=i.valueLineWidth,s=i.pathPosition,l=e.valueDim,u=i.repeatTimes||0,c=0,d=r[e.valueDim.index]+a+2*i.symbolMargin;for(Fg(t,(function(t){t.__pictorialAnimationIndex=c,t.__pictorialRepeatTimes=u,c<u?Wg(t,null,g(c),i,n):Wg(t,null,{scaleX:0,scaleY:0},i,n,(function(){o.remove(t)})),c++}));c<u;c++){var p=Lg(i);p.__pictorialAnimationIndex=c,p.__pictorialRepeatTimes=u,o.add(p);var h=g(c);Wg(p,{x:h.x,y:h.y,scaleX:0,scaleY:0},{scaleX:h.scaleX,scaleY:h.scaleY,rotation:h.rotation},i,n)}function g(t){var e=s.slice(),n=i.pxSign,o=t;return("start"===i.symbolRepeatDirection?n>0:n<0)&&(o=u-1-t),e[l.index]=d*(o-u/2+.5)+s[l.index],{x:e[0],y:e[1],scaleX:i.symbolScale[0],scaleY:i.symbolScale[1],rotation:i.rotation}}}function Pg(t,e,i,n){var o=t.__pictorialBundle,r=t.__pictorialMainPath;r?Wg(r,null,{x:i.pathPosition[0],y:i.pathPosition[1],scaleX:i.symbolScale[0],scaleY:i.symbolScale[1],rotation:i.rotation},i,n):(r=t.__pictorialMainPath=Lg(i),o.add(r),Wg(r,{x:i.pathPosition[0],y:i.pathPosition[1],scaleX:0,scaleY:0,rotation:i.rotation},{scaleX:i.symbolScale[0],scaleY:i.symbolScale[1]},i,n))}function kg(t,e,i){var n=E({},e.barRectShape),o=t.__pictorialBarRect;o?Wg(o,null,{shape:n},e,i):((o=t.__pictorialBarRect=new re({z2:2,shape:n,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}})).disableMorphing=!0,t.add(o))}function Eg(t,e,i,n){if(i.symbolClip){var o=t.__pictorialClipPath,r=E({},i.clipShape),a=e.valueDim,s=i.animationModel,l=i.dataIndex;if(o)Lt(o,{shape:r},s,l);else{r[a.wh]=0,o=new re({shape:r}),t.__pictorialBundle.setClipPath(o),t.__pictorialClipPath=o;var u={};u[a.wh]=i.clipShape[a.wh],Vt[n?"updateProps":"initProps"](o,{shape:u},s,l)}}}function Rg(t,e){var i=t.getItemModel(e);return i.getAnimationDelayParams=Vg,i.isAnimationEnabled=zg,i}function Vg(t){return{index:t.__pictorialAnimationIndex,count:t.__pictorialRepeatTimes}}function zg(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function Og(t,e,i,n){var o=new mt,r=new mt;return o.add(r),o.__pictorialBundle=r,r.x=i.bundlePosition[0],r.y=i.bundlePosition[1],i.symbolRepeat?Ng(o,e,i):Pg(o,0,i),kg(o,i,n),Eg(o,e,i,n),o.__pictorialShapeStr=Gg(t,i),o.__pictorialSymbolMeta=i,o}function Bg(t,e,i,n){var o=n.__pictorialBarRect;o&&o.removeTextContent();var r=[];Fg(n,(function(t){r.push(t)})),n.__pictorialMainPath&&r.push(n.__pictorialMainPath),n.__pictorialClipPath&&(i=null),h(r,(function(t){Ze(t,{scaleX:0,scaleY:0},i,e,(function(){n.parent&&n.parent.remove(n)}))})),t.setItemGraphicEl(e,null)}function Gg(t,e){return[t.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function Fg(t,e,i){h(t.__pictorialBundle.children(),(function(n){n!==t.__pictorialBarRect&&e.call(i,n)}))}function Wg(t,e,i,n,o,r){e&&t.attr(e),n.symbolClip&&!o?i&&t.attr(i):i&&Vt[o?"updateProps":"initProps"](t,i,n.animationModel,n.dataIndex,r)}function Hg(t,e,i){var n=i.dataIndex,o=i.itemModel,r=o.getModel("emphasis"),a=r.getModel("itemStyle").getItemStyle(),s=o.getModel(["blur","itemStyle"]).getItemStyle(),l=o.getModel(["select","itemStyle"]).getItemStyle(),u=o.getShallow("cursor"),c=r.get("focus"),d=r.get("blurScope"),p=r.get("scale");Fg(t,(function(t){if(t instanceof M){var e=t.style;t.useStyle(E({image:e.image,x:e.x,y:e.y,width:e.width,height:e.height},i.style))}else t.useStyle(i.style);var n=t.ensureState("emphasis");n.style=a,p&&(n.scaleX=1.1*t.scaleX,n.scaleY=1.1*t.scaleY),t.ensureState("blur").style=s,t.ensureState("select").style=l,u&&(t.cursor=u),t.z2=i.z2}));var h=e.valueDim.posDesc[+(i.boundingLength>0)],g=t.__pictorialBarRect;kt(g,Et(o),{labelFetcher:e.seriesModel,labelDataIndex:n,defaultText:Nn(e.seriesModel.getData(),n),inheritColor:i.style.fill,defaultOpacity:i.style.opacity,defaultOutsidePosition:h}),Rt(t,c,d,r.get("disabled"))}function Ug(t){var e=Math.round(t);return Math.abs(t-e)<1e-4?e:Math.ceil(t)}var jg=Dg,Xg=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i.hasSymbolVisual=!0,i.defaultSymbol="roundRect",i}return p(e,t),e.prototype.getInitialData=function(e){return e.stack=null,t.prototype.getInitialData.apply(this,arguments)},e.type="series.pictorialBar",e.dependencies=["grid"],e.defaultOption=Pn(kn.defaultOption,{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:"#212121"}}}),e}(kn),Yg=Xg;var Zg=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i._layers=[],i}return p(e,t),e.prototype.render=function(t,e,i){var n=t.getData(),o=this,r=this.group,a=t.getLayerSeries(),s=n.getLayout("layoutInfo"),l=s.rect,u=s.boundaryGap;function c(t){return t.name}r.x=0,r.y=l.y+u[0];var d=new ai(this._layersSeries||[],a,c,c),p=[];function h(e,i,s){var l=o._layers;if("remove"!==e){for(var u,c,d=[],h=[],g=a[i].indices,f=0;f<g.length;f++){var y=n.getItemLayout(g[f]),m=y.x,v=y.y0,x=y.y;d.push(m,v),h.push(m,v+x),u=n.getItemVisual(g[f],"style")}var _=n.getItemLayout(g[0]),b=t.getModel("label").get("margin"),S=t.getModel("emphasis");if("add"===e){var w=p[i]=new mt;c=new Vn({shape:{points:d,stackedOnPoints:h,smooth:.4,stackedOnSmooth:.4,smoothConstraint:!1},z2:0}),w.add(c),r.add(w),t.isAnimationEnabled()&&c.setClipPath(function(t,e,i){var n=new re({shape:{x:t.x-10,y:t.y-10,width:0,height:t.height+20}});return Tt(n,{shape:{x:t.x-50,width:t.width+100,height:t.height+20}},e,i),n}(c.getBoundingRect(),t,(function(){c.removeClipPath()})))}else{w=l[s];c=w.childAt(0),r.add(w),p[i]=w,Lt(c,{shape:{points:d,stackedOnPoints:h}},t),Ct(c)}kt(c,Et(t),{labelDataIndex:g[f-1],defaultText:n.getName(g[f-1]),inheritColor:u.fill},{normal:{verticalAlign:"middle"}}),c.setTextConfig({position:null,local:!0});var M=c.getTextContent();M&&(M.x=_.x-b,M.y=_.y0+_.y/2),c.useStyle(u),n.setItemGraphicEl(i,c),Pt(c,t),Rt(c,S.get("focus"),S.get("blurScope"),S.get("disabled"))}else r.remove(l[i])}d.add(Bt(h,this,"add")).update(Bt(h,this,"update")).remove(Bt(h,this,"remove")).execute(),this._layersSeries=a,this._layers=p},e.type="themeRiver",e}(St);var qg=Zg,Jg=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return p(e,t),e.prototype.init=function(e){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new Ot(Bt(this.getData,this),Bt(this.getRawData,this))},e.prototype.fixData=function(t){var e=t.length,i={},n=dn(t,(function(t){return i.hasOwnProperty(t[0]+"")||(i[t[0]+""]=-1),t[2]})),o=[];n.buckets.each((function(t,e){o.push({name:e,dataList:t})}));for(var r=o.length,a=0;a<r;++a){for(var s=o[a].name,l=0;l<o[a].dataList.length;++l){var u=o[a].dataList[l][0]+"";i[u]=a}for(var u in i)i.hasOwnProperty(u)&&i[u]!==a&&(i[u]=a,t[e]=[u,0,s],e++)}return t},e.prototype.getInitialData=function(t,e){for(var i=this.getReferringComponents("singleAxis",Re).models[0].get("type"),n=S(t.data,(function(t){return void 0!==t[2]})),o=this.fixData(n||[]),r=[],a=this.nameMap=me(),s=0,l=0;l<o.length;++l)r.push(o[l][2]),a.get(o[l][2])||(a.set(o[l][2],s),s++);var u=Je(o,{coordDimensions:["single"],dimensionsDefine:[{name:"time",type:pn(i)},{name:"value",type:"float"},{name:"name",type:"ordinal"}],encodeDefine:{single:0,value:1,itemName:2}}).dimensions,c=new Qe(u,this);return c.initData(o),c},e.prototype.getLayerSeries=function(){for(var t=this.getData(),e=t.count(),i=[],n=0;n<e;++n)i[n]=n;var o=t.mapDimension("single"),r=dn(i,(function(e){return t.get("name",e)})),a=[];return r.buckets.each((function(e,i){e.sort((function(e,i){return t.get(o,e)-t.get(o,i)})),a.push({name:i,indices:e})})),a},e.prototype.getAxisTooltipData=function(t,e,i){ct(t)||(t=t?[t]:[]);for(var n,o=this.getData(),r=this.getLayerSeries(),a=[],s=r.length,l=0;l<s;++l){for(var u=Number.MAX_VALUE,c=-1,d=r[l].indices.length,p=0;p<d;++p){var h=o.get(t[0],r[l].indices[p]),g=Math.abs(h-e);g<=u&&(n=h,u=g,c=r[l].indices[p])}a.push(c)}return{dataIndices:a,nestestValue:n}},e.prototype.formatTooltip=function(t,e,i){var n=this.getData(),o=n.getName(t),r=n.get(n.mapDimension("value"),t);return Wt("nameValue",{name:o,value:r})},e.type="series.themeRiver",e.dependencies=["singleAxis"],e.defaultOption={z:2,colorBy:"data",coordinateSystem:"singleAxis",boundaryGap:["10%","10%"],singleAxisIndex:0,animationEasing:"linear",label:{margin:4,show:!0,position:"left",fontSize:11},emphasis:{label:{show:!0}}},e}(yt),Qg=Jg;function Kg(t,e){t.eachSeriesByType("themeRiver",(function(t){var e=t.getData(),i=t.coordinateSystem,n={},o=i.getRect();n.rect=o;var r=t.get("boundaryGap"),a=i.getAxis();(n.boundaryGap=r,"horizontal"===a.orient)?(r[0]=ee(r[0],o.height),r[1]=ee(r[1],o.height),$g(e,t,o.height-r[0]-r[1])):(r[0]=ee(r[0],o.width),r[1]=ee(r[1],o.width),$g(e,t,o.width-r[0]-r[1]));e.setLayout("layoutInfo",n)}))}function $g(t,e,i){if(t.count())for(var n,o=e.coordinateSystem,r=e.getLayerSeries(),a=t.mapDimension("single"),s=t.mapDimension("value"),l=b(r,(function(e){return b(e.indices,(function(e){var i=o.dataToPoint(t.get(a,e));return i[1]=t.get(s,e),i}))})),u=function(t){for(var e=t.length,i=t[0].length,n=[],o=[],r=0,a=0;a<i;++a){for(var s=0,l=0;l<e;++l)s+=t[l][a][1];s>r&&(r=s),n.push(s)}for(var u=0;u<i;++u)o[u]=(r-n[u])/2;r=0;for(var c=0;c<i;++c){var d=n[c]+o[c];d>r&&(r=d)}return{y0:o,max:r}}(l),c=u.y0,d=i/u.max,p=r.length,h=r[0].indices.length,g=0;g<h;++g){n=c[g]*d,t.setItemLayout(r[0].indices[g],{layerIndex:0,x:l[0][g][0],y0:n,y:l[0][g][1]*d});for(var f=1;f<p;++f)n+=l[f-1][g][1]*d,t.setItemLayout(r[f].indices[g],{layerIndex:f,x:l[f][g][0],y0:n,y:l[f][g][1]*d})}}var tf=function(t){function e(e,i,n,o){var r=t.call(this)||this;r.z2=2,r.textConfig={inside:!0},xt(r).seriesIndex=i.seriesIndex;var a=new ni({z2:4,silent:e.getModel().get(["label","silent"])});return r.setTextContent(a),r.updateData(!0,e,i,n,o),r}return p(e,t),e.prototype.updateData=function(t,e,i,n,o){this.node=e,e.piece=this,i=i||this._seriesModel,n=n||this._ecModel;var r=this;xt(r).dataIndex=e.dataIndex;var a=e.getModel(),s=a.getModel("emphasis"),l=e.getLayout(),u=E({},l);u.label=null;var c=e.getVisual("style");c.lineJoin="bevel";var d=e.getVisual("decal");d&&(c.decal=Me(d,o));var p=zn(a.getModel("itemStyle"),u,!0);E(u,p),h(Ti,(function(t){var e=r.ensureState(t),i=a.getModel([t,"itemStyle"]);e.style=i.getItemStyle();var n=zn(i,u);n&&(e.shape=n)})),t?(r.setShape(u),r.shape.r=l.r0,Tt(r,{shape:{r:l.r}},i,e.dataIndex)):(Lt(r,{shape:u},i),Ct(r)),r.useStyle(c),this._updateLabel(i);var g=a.getShallow("cursor");g&&r.attr("cursor",g),this._seriesModel=i||this._seriesModel,this._ecModel=n||this._ecModel;var f=s.get("focus"),y="ancestor"===f?e.getAncestorsIndices():"descendant"===f?e.getDescendantIndices():f;Rt(this,y,s.get("blurScope"),s.get("disabled"))},e.prototype._updateLabel=function(t){var e=this,i=this.node.getModel(),n=i.getModel("label"),o=this.node.getLayout(),r=o.endAngle-o.startAngle,a=(o.startAngle+o.endAngle)/2,s=Math.cos(a),l=Math.sin(a),u=this,c=u.getTextContent(),d=this.node.dataIndex,p=n.get("minAngle")/180*Math.PI,g=n.get("show")&&!(null!=p&&Math.abs(r)<p);function f(t,e){var i=t.get(e);return null==i?n.get(e):i}c.ignore=!g,h(Bn,(function(n){var p="normal"===n?i.getModel("label"):i.getModel([n,"label"]),h="normal"===n,g=h?c:c.ensureState(n),y=t.getFormattedLabel(d,n);h&&(y=y||e.node.name),g.style=oi(p,{},null,"normal"!==n,!0),y&&(g.style.text=y);var m=p.get("show");null==m||h||(g.ignore=!m);var v,x=f(p,"position"),_=h?u:u.states[n],b=_.style.fill;_.textConfig={outsideFill:"inherit"===p.get("color")?b:null,inside:"outside"!==x};var S=f(p,"distance")||0,w=f(p,"align");"outside"===x?(v=o.r+S,w=a>Math.PI/2?"right":"left"):w&&"center"!==w?"left"===w?(v=o.r0+S,a>Math.PI/2&&(w="right")):"right"===w&&(v=o.r-S,a>Math.PI/2&&(w="left")):(v=r===2*Math.PI&&0===o.r0?0:(o.r+o.r0)/2,w="center"),g.style.align=w,g.style.verticalAlign=f(p,"verticalAlign")||"middle",g.x=v*s+o.cx,g.y=v*l+o.cy;var M=f(p,"rotate"),I=0;"radial"===M?(I=On(-a))>Math.PI/2&&I<1.5*Math.PI&&(I+=Math.PI):"tangential"===M?(I=Math.PI/2-a)>Math.PI/2?I-=Math.PI:I<-Math.PI/2&&(I+=Math.PI):O(M)&&(I=M*Math.PI/180),g.rotation=On(I)})),c.dirtyStyle()},e}(Ui),ef=tf,nf="sunburstRootToNode",of="sunburstHighlight";var rf=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return p(e,t),e.prototype.render=function(t,e,i,n){var o=this;this.seriesModel=t,this.api=i,this.ecModel=e;var r=t.getData(),a=r.tree.root,s=t.getViewRoot(),l=this.group,u=t.get("renderLabelForZeroData"),c=[];s.eachNode((function(t){c.push(t)}));var d=this._oldChildren||[];!function(n,o){if(0===n.length&&0===o.length)return;function s(t){return t.getId()}function c(s,c){!function(n,o){u||!n||n.getValue()||(n=null);if(n!==a&&o!==a)if(o&&o.piece)n?(o.piece.updateData(!1,n,t,e,i),r.setItemGraphicEl(n.dataIndex,o.piece)):function(t){if(!t)return;t.piece&&(l.remove(t.piece),t.piece=null)}(o);else if(n){var s=new ef(n,t,e,i);l.add(s),r.setItemGraphicEl(n.dataIndex,s)}}(null==s?null:n[s],null==c?null:o[c])}new ai(o,n,s,s).add(c).update(c).remove(Ce(c,null)).execute()}(c,d),function(n,r){r.depth>0?(o.virtualPiece?o.virtualPiece.updateData(!1,n,t,e,i):(o.virtualPiece=new ef(n,t,e,i),l.add(o.virtualPiece)),r.piece.off("click"),o.virtualPiece.on("click",(function(t){o._rootToNode(r.parentNode)}))):o.virtualPiece&&(l.remove(o.virtualPiece),o.virtualPiece=null)}(a,s),this._initEvents(),this._oldChildren=c},e.prototype._initEvents=function(){var t=this;this.group.off("click"),this.group.on("click",(function(e){var i=!1;t.seriesModel.getViewRoot().eachNode((function(n){if(!i&&n.piece&&n.piece===e.target){var o=n.getModel().get("nodeClick");if("rootToNode"===o)t._rootToNode(n);else if("link"===o){var r=n.getModel(),a=r.get("link");if(a){var s=r.get("target",!0)||"_blank";si(a,s)}}i=!0}}))}))},e.prototype._rootToNode=function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:nf,from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},e.prototype.containPoint=function(t,e){var i=e.getData().getItemLayout(0);if(i){var n=t[0]-i.cx,o=t[1]-i.cy,r=Math.sqrt(n*n+o*o);return r<=i.r&&r>=i.r0}},e.type="sunburst",e}(St),af=rf,sf=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i.ignoreStyleOnData=!0,i}return p(e,t),e.prototype.getInitialData=function(t,e){var i={name:t.name,children:t.data};lf(i);var n=this._levelModels=b(t.levels||[],(function(t){return new Ut(t,this,e)}),this),o=yu.createTree(i,this,(function(t){t.wrapMethod("getItemModel",(function(t,e){var i=o.getNodeByDataIndex(e),r=n[i.depth];return r&&(t.parentModel=r),t}))}));return o.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.getDataParams=function(e){var i=t.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(e);return i.treePathInfo=_u(n,this),i},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 e=this.getRawData().tree.root;t&&(t===e||e.contains(t))||(this._viewRoot=e)},e.prototype.enableAriaDecal=function(){Du(this)},e.type="series.sunburst",e.defaultOption={z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,stillShowZeroSum:!0,nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},emphasis:{focus:"descendant"},blur:{itemStyle:{opacity:.2},label:{opacity:.1}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,data:[],sort:"desc"},e}(yt);function lf(t){var e=0;h(t.children,(function(t){lf(t);var i=t.value;ct(i)&&(i=i[0]),e+=i}));var i=t.value;ct(i)&&(i=i[0]),(null==i||isNaN(i))&&(i=e),i<0&&(i=0),ct(t.value)?t.value[0]=i:t.value=i}var uf=sf,cf=Math.PI/180;function df(t,e,i){e.eachSeriesByType(t,(function(t){var e=t.get("center"),n=t.get("radius");ct(n)||(n=[0,n]),ct(e)||(e=[e,e]);var o=i.getWidth(),r=i.getHeight(),a=Math.min(o,r),s=ee(e[0],o),l=ee(e[1],r),u=ee(n[0],a/2),c=ee(n[1],a/2),d=-t.get("startAngle")*cf,p=t.get("minAngle")*cf,g=t.getData().tree.root,f=t.getViewRoot(),y=f.depth,m=t.get("sort");null!=m&&pf(f,m);var v=0;h(f.children,(function(t){!isNaN(t.getValue())&&v++}));var x=f.getValue(),_=Math.PI/(x||v)*2,b=f.depth>0,S=f.height-(b?-1:1),w=(c-u)/(S||1),M=t.get("clockwise"),I=t.get("stillShowZeroSum"),A=M?1:-1,D=function(e,i){if(e){var n=i;if(e!==g){var o=e.getValue(),r=0===x&&I?_:o*_;r<p&&(r=p),n=i+A*r;var c=e.depth-y-(b?-1:1),d=u+w*c,f=u+w*(c+1),m=t.getLevelModel(e);if(m){var v=m.get("r0",!0),S=m.get("r",!0),T=m.get("radius",!0);null!=T&&(v=T[0],S=T[1]),null!=v&&(d=ee(v,a/2)),null!=S&&(f=ee(S,a/2))}e.setLayout({angle:r,startAngle:i,endAngle:n,clockwise:M,cx:s,cy:l,r0:d,r:f})}if(e.children&&e.children.length){var C=0;h(e.children,(function(t){C+=D(t,i+C)}))}return n-i}};if(b){var T=u,C=u+w,L=2*Math.PI;g.setLayout({angle:L,startAngle:d,endAngle:d+L,clockwise:M,cx:s,cy:l,r0:T,r:C})}D(f,d)}))}function pf(t,e){var i=t.children||[];t.children=function(t,e){if(Q(e)){var i=b(t,(function(t,e){var i=t.getValue();return{params:{depth:t.depth,height:t.height,dataIndex:t.dataIndex,getValue:function(){return i}},index:e}}));return i.sort((function(t,i){return e(t.params,i.params)})),b(i,(function(e){return t[e.index]}))}var n="asc"===e;return t.sort((function(t,e){var i=(t.getValue()-e.getValue())*(n?1:-1);return 0===i?(t.dataIndex-e.dataIndex)*(n?-1:1):i}))}(i,e),i.length&&h(t.children,(function(t){pf(t,e)}))}function hf(t){var e={};t.eachSeriesByType("sunburst",(function(t){var i=t.getData(),n=i.tree;n.eachNode((function(o){var r=o.getModel().getModel("itemStyle").getItemStyle();r.fill||(r.fill=function(t,i,n){for(var o=t;o&&o.depth>1;)o=o.parentNode;var r=i.getColorFromPalette(o.name||o.dataIndex+"",e);return t.depth>1&&N(r)&&(r=Fn(r,(t.depth-1)/(n-1)*.5)),r}(o,t,n.root.height));var a=i.ensureUniqueItemVisual(o.dataIndex,"style");E(a,r)}))}))}var gf={color:"fill",borderColor:"stroke"},ff={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},yf=ve(),mf=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return p(e,t),e.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},e.prototype.getInitialData=function(t,e){return ft(null,this)},e.prototype.getDataParams=function(e,i,n){var o=t.prototype.getDataParams.call(this,e,i);return n&&(o.info=yf(n).info),o},e.type="series.custom",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},e}(yt),vf=mf;function xf(t,e){return e=e||[0,0],b(["x","y"],(function(i,n){var o=this.getAxis(i),r=e[n],a=t[n]/2;return"category"===o.type?o.getBandWidth():Math.abs(o.dataToCoord(r-a)-o.dataToCoord(r+a))}),this)}function _f(t,e){return e=e||[0,0],b([0,1],(function(i){var n=e[i],o=t[i]/2,r=[],a=[];return r[i]=n-o,a[i]=n+o,r[1-i]=a[1-i]=e[1-i],Math.abs(this.dataToPoint(r)[i]-this.dataToPoint(a)[i])}),this)}function bf(t,e){var i=this.getAxis(),n=e instanceof Array?e[0]:e,o=(t instanceof Array?t[0]:t)/2;return"category"===i.type?i.getBandWidth():Math.abs(i.dataToCoord(n-o)-i.dataToCoord(n+o))}function Sf(t,e){return e=e||[0,0],b(["Radius","Angle"],(function(i,n){var o=this["get"+i+"Axis"](),r=e[n],a=t[n]/2,s="category"===o.type?o.getBandWidth():Math.abs(o.dataToCoord(r-a)-o.dataToCoord(r+a));return"Angle"===i&&(s=s*Math.PI/180),s}),this)}var wf={};function Mf(t,e,i,n){return t&&(t.legacy||!1!==t.legacy&&!i&&!n&&"tspan"!==e&&("text"===e||ae(t,"text")))}function If(t,e,i){var n,o,r,a=t;if("text"===e)r=a;else{r={},ae(a,"text")&&(r.text=a.text),ae(a,"rich")&&(r.rich=a.rich),ae(a,"textFill")&&(r.fill=a.textFill),ae(a,"textStroke")&&(r.stroke=a.textStroke),ae(a,"fontFamily")&&(r.fontFamily=a.fontFamily),ae(a,"fontSize")&&(r.fontSize=a.fontSize),ae(a,"fontStyle")&&(r.fontStyle=a.fontStyle),ae(a,"fontWeight")&&(r.fontWeight=a.fontWeight),o={type:"text",style:r,silent:!0},n={};var s=ae(a,"textPosition");i?n.position=s?a.textPosition:"inside":s&&(n.position=a.textPosition),ae(a,"textPosition")&&(n.position=a.textPosition),ae(a,"textOffset")&&(n.offset=a.textOffset),ae(a,"textRotation")&&(n.rotation=a.textRotation),ae(a,"textDistance")&&(n.distance=a.textDistance)}return Af(r,t),h(r.rich,(function(t){Af(t,t)})),{textConfig:n,textContent:o}}function Af(t,e){e&&(e.font=e.textFont||e.font,ae(e,"textStrokeWidth")&&(t.lineWidth=e.textStrokeWidth),ae(e,"textAlign")&&(t.align=e.textAlign),ae(e,"textVerticalAlign")&&(t.verticalAlign=e.textVerticalAlign),ae(e,"textLineHeight")&&(t.lineHeight=e.textLineHeight),ae(e,"textWidth")&&(t.width=e.textWidth),ae(e,"textHeight")&&(t.height=e.textHeight),ae(e,"textBackgroundColor")&&(t.backgroundColor=e.textBackgroundColor),ae(e,"textPadding")&&(t.padding=e.textPadding),ae(e,"textBorderColor")&&(t.borderColor=e.textBorderColor),ae(e,"textBorderWidth")&&(t.borderWidth=e.textBorderWidth),ae(e,"textBorderRadius")&&(t.borderRadius=e.textBorderRadius),ae(e,"textBoxShadowColor")&&(t.shadowColor=e.textBoxShadowColor),ae(e,"textBoxShadowBlur")&&(t.shadowBlur=e.textBoxShadowBlur),ae(e,"textBoxShadowOffsetX")&&(t.shadowOffsetX=e.textBoxShadowOffsetX),ae(e,"textBoxShadowOffsetY")&&(t.shadowOffsetY=e.textBoxShadowOffsetY))}function Df(t,e,i){var n=t;n.textPosition=n.textPosition||i.position||"inside",null!=i.offset&&(n.textOffset=i.offset),null!=i.rotation&&(n.textRotation=i.rotation),null!=i.distance&&(n.textDistance=i.distance);var o=n.textPosition.indexOf("inside")>=0,r=t.fill||"#000";Tf(n,e);var a=null==n.textFill;return o?a&&(n.textFill=i.insideFill||"#fff",!n.textStroke&&i.insideStroke&&(n.textStroke=i.insideStroke),!n.textStroke&&(n.textStroke=r),null==n.textStrokeWidth&&(n.textStrokeWidth=2)):(a&&(n.textFill=t.fill||i.outsideFill||"#000"),!n.textStroke&&i.outsideStroke&&(n.textStroke=i.outsideStroke)),n.text=e.text,n.rich=e.rich,h(e.rich,(function(t){Tf(t,t)})),n}function Tf(t,e){e&&(ae(e,"fill")&&(t.textFill=e.fill),ae(e,"stroke")&&(t.textStroke=e.fill),ae(e,"lineWidth")&&(t.textStrokeWidth=e.lineWidth),ae(e,"font")&&(t.font=e.font),ae(e,"fontStyle")&&(t.fontStyle=e.fontStyle),ae(e,"fontWeight")&&(t.fontWeight=e.fontWeight),ae(e,"fontSize")&&(t.fontSize=e.fontSize),ae(e,"fontFamily")&&(t.fontFamily=e.fontFamily),ae(e,"align")&&(t.textAlign=e.align),ae(e,"verticalAlign")&&(t.textVerticalAlign=e.verticalAlign),ae(e,"lineHeight")&&(t.textLineHeight=e.lineHeight),ae(e,"width")&&(t.textWidth=e.width),ae(e,"height")&&(t.textHeight=e.height),ae(e,"backgroundColor")&&(t.textBackgroundColor=e.backgroundColor),ae(e,"padding")&&(t.textPadding=e.padding),ae(e,"borderColor")&&(t.textBorderColor=e.borderColor),ae(e,"borderWidth")&&(t.textBorderWidth=e.borderWidth),ae(e,"borderRadius")&&(t.textBorderRadius=e.borderRadius),ae(e,"shadowColor")&&(t.textBoxShadowColor=e.shadowColor),ae(e,"shadowBlur")&&(t.textBoxShadowBlur=e.shadowBlur),ae(e,"shadowOffsetX")&&(t.textBoxShadowOffsetX=e.shadowOffsetX),ae(e,"shadowOffsetY")&&(t.textBoxShadowOffsetY=e.shadowOffsetY),ae(e,"textShadowColor")&&(t.textShadowColor=e.textShadowColor),ae(e,"textShadowBlur")&&(t.textShadowBlur=e.textShadowBlur),ae(e,"textShadowOffsetX")&&(t.textShadowOffsetX=e.textShadowOffsetX),ae(e,"textShadowOffsetY")&&(t.textShadowOffsetY=e.textShadowOffsetY))}function Cf(t,e){var i=t+"^_^"+e;wf[i]||(console.warn('[ECharts] DEPRECATED: "'+t+'" has been deprecated. '+e),wf[i]=!0)}var Lf={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},Nf=T(Lf),Pf=Ge(Wn,(function(t,e){return t[e]=1,t}),{}),kf=Wn.join(", "),Ef=["","style","shape","extra"],Rf=ve();function Vf(t,e,i,n,o){var r=t+"Animation",a=jn(t,n,o)||{},s=Rf(e).userDuring;return a.duration>0&&(a.during=s?Bt(jf,{el:e,userDuring:s}):null,a.setToFinal=!0,a.scope=t),E(a,i[r]),a}function zf(t,e,i,n){var o=(n=n||{}).dataIndex,r=n.isInit,a=n.clearStyle,s=i.isAnimationEnabled(),l=Rf(t),u=e.style;l.userDuring=e.during;var c={},d={};if(function(t,e,i){for(var n=0;n<Nf.length;n++){var o=Nf[n],r=Lf[o],a=e[o];a&&(i[r[0]]=a[0],i[r[1]]=a[1])}for(n=0;n<Wn.length;n++){var s=Wn[n];null!=e[s]&&(i[s]=e[s])}}(0,e,d),Yf("shape",e,d),Yf("extra",e,d),!r&&s&&(function(t,e,i){for(var n=e.transition,o=Gf(n)?Wn:ti(n||[]),r=0;r<o.length;r++){var a=o[r];if("style"!==a&&"shape"!==a&&"extra"!==a){var s=t[a];Ff(a,"el.transition"),i[a]=s}}}(t,e,c),Xf("shape",t,e,c),Xf("extra",t,e,c),function(t,e,i,n){if(!i)return;var o,r=t.style;if(r){var a=i.transition,s=e.transition;if(a&&!Gf(a)){var l=ti(a);!o&&(o=n.style={});for(var u=0;u<l.length;u++){var c=r[g=l[u]];o[g]=c}}else if(t.getAnimationStyleProps&&(Gf(s)||Gf(a)||Ke(s,"style")>=0)){var d=t.getAnimationStyleProps(),p=d?d.style:null;if(p){!o&&(o=n.style={});var h=T(i);for(u=0;u<h.length;u++){var g;if(p[g=h[u]]){c=r[g];o[g]=c}}}}}}(t,e,u,c)),d.style=u,function(t,e,i){var n=e.style;if(!t.isGroup&&n){if(i){t.useStyle({});for(var o=t.animators,r=0;r<o.length;r++){var a=o[r];"style"===a.targetName&&a.changeTarget(t.style)}}t.setStyle(n)}e&&(e.style=null,e&&t.attr(e),e.style=n)}(t,d,a),function(t,e){ae(e,"silent")&&(t.silent=e.silent),ae(e,"ignore")&&(t.ignore=e.ignore),t instanceof be&&ae(e,"invisible")&&(t.invisible=e.invisible);t instanceof B&&ae(e,"autoBatch")&&(t.autoBatch=e.autoBatch)}(t,e),s)if(r){var p={};h(Ef,(function(t){var i=t?e[t]:e;i&&i.enterFrom&&(t&&(p[t]=p[t]||{}),E(t?p[t]:p,i.enterFrom))}));var g=Vf("enter",t,e,i,o);g.duration>0&&t.animateFrom(p,g)}else!function(t,e,i,n,o){if(o){var r=Vf("update",t,e,n,i);r.duration>0&&t.animateFrom(o,r)}}(t,e,o||0,i,c);Of(t,e),u?t.dirty():t.markRedraw()}function Of(t,e){for(var i=Rf(t).leaveToProps,n=0;n<Ef.length;n++){var o=Ef[n],r=o?e[o]:e;r&&r.leaveTo&&(i||(i=Rf(t).leaveToProps={}),o&&(i[o]=i[o]||{}),E(o?i[o]:i,r.leaveTo))}}function Bf(t,e,i,n){if(t){var o=t.parent,r=Rf(t).leaveToProps;if(r){var a=Vf("update",t,e,i,0);a.done=function(){o.remove(t),n&&n()},t.animateTo(r,a)}else o.remove(t),n&&n()}}function Gf(t){return"all"===t}var Ff,Wf={},Hf={setTransform:function(t,e){return Z(ae(Pf,t),"Only "+kf+" available in `setTransform`."),Wf.el[t]=e,this},getTransform:function(t){return Z(ae(Pf,t),"Only "+kf+" available in `getTransform`."),Wf.el[t]},setShape:function(t,e){Uf(t);var i=Wf.el;return(i.shape||(i.shape={}))[t]=e,i.dirtyShape&&i.dirtyShape(),this},getShape:function(t){Uf(t);var e=Wf.el.shape;if(e)return e[t]},setStyle:function(t,e){Uf(t);var i=Wf.el,n=i.style;return n&&(Ji(e)&&Ee("style."+t+" must not be assigned with NaN."),n[t]=e,i.dirtyStyle&&i.dirtyStyle()),this},getStyle:function(t){Uf(t);var e=Wf.el.style;if(e)return e[t]},setExtra:function(t,e){return Uf(t),(Wf.el.extra||(Wf.el.extra={}))[t]=e,this},getExtra:function(t){Uf(t);var e=Wf.el.extra;if(e)return e[t]}};function Uf(t){if("transition"===t||"enterFrom"===t||"leaveTo"===t)throw new Error('key must not be "'+t+'"')}function jf(){var t=this,e=t.el;if(e){var i=Rf(e).userDuring,n=t.userDuring;i===n?(Wf.el=e,n(Hf)):t.el=t.userDuring=null}}function Xf(t,e,i,n){var o=i[t];if(o){var r,a=e[t];if(a){var s=i.transition,l=o.transition;if(l)if(!r&&(r=n[t]={}),Gf(l))E(r,a);else for(var u=ti(l),c=0;c<u.length;c++){var d=a[h=u[c]];r[h]=d}else if(Gf(s)||Ke(s,t)>=0){!r&&(r=n[t]={});var p=T(a);for(c=0;c<p.length;c++){var h;d=a[h=p[c]];Zf(o[h],d)&&(r[h]=d)}}}}}function Yf(t,e,i){var n=e[t];if(n)for(var o=i[t]={},r=T(n),a=0;a<r.length;a++){var s=r[a];o[s]=Hn(n[s])}}function Zf(t,e){return Un(t)?t!==e:null!=t&&isFinite(t)}Ff=function(t,e){ae(Pf,t)||Ee("Prop `"+t+"` is not a permitted in `"+e+"`. Only `"+T(Pf).join("`, `")+"` are permitted.")};var qf=ve(),Jf=["percent","easing","shape","style","extra"];function Qf(t){t.stopAnimation("keyframe"),t.attr(qf(t))}function Kf(t,e,i){if(i.isAnimationEnabled()&&e)if(ct(e))h(e,(function(e){Kf(t,e,i)}));else{var n=e.keyframes,o=e.duration;if(i&&null==o){var r=jn("enter",i,0);o=r&&r.duration}if(n&&o){var a=qf(t);h(Ef,(function(i){if(!i||t[i]){var r,s=!1;n.sort((function(t,e){return t.percent-e.percent})),h(n,(function(n){var l=t.animators,u=i?n[i]:n;if(n.percent>=1&&(s=!0),u){var c=T(u);if(i||(c=S(c,(function(t){return Ke(Jf,t)<0}))),c.length){r||((r=t.animate(i,e.loop,!0)).scope="keyframe");for(var d=0;d<l.length;d++)l[d]!==r&&l[d].targetName===r.targetName&&l[d].stopTracks(c);i&&(a[i]=a[i]||{});var p=i?a[i]:a;h(c,(function(e){p[e]=((i?t[i]:t)||{})[e]})),r.whenWithKeys(o*n.percent,u,c,n.easing)}}})),r&&(s||Ee("End frame with percent: 1 is missing in the keyframeAnimation.",!0),r.delay(e.delay||0).duration(o).start(e.easing))}}))}}}var $f="emphasis",ty="normal",ey="blur",iy="select",ny=[ty,$f,ey,iy],oy={normal:["itemStyle"],emphasis:[$f,"itemStyle"],blur:[ey,"itemStyle"],select:[iy,"itemStyle"]},ry={normal:["label"],emphasis:[$f,"label"],blur:[ey,"label"],select:[iy,"label"]},ay=["x","y"],sy={normal:{},emphasis:{},blur:{},select:{}},ly={cartesian2d:function(t){var e=t.master.getRect();return{coordSys:{type:"cartesian2d",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(e){return t.dataToPoint(e)},size:Bt(xf,t)}}},geo:function(t){var e=t.getBoundingRect();return{coordSys:{type:"geo",x:e.x,y:e.y,width:e.width,height:e.height,zoom:t.getZoom()},api:{coord:function(e){return t.dataToPoint(e)},size:Bt(_f,t)}}},single:function(t){var e=t.getRect();return{coordSys:{type:"singleAxis",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(e){return t.dataToPoint(e)},size:Bt(bf,t)}}},polar:function(t){var e=t.getRadiusAxis(),i=t.getAngleAxis(),n=e.getExtent();return n[0]>n[1]&&n.reverse(),{coordSys:{type:"polar",cx:t.cx,cy:t.cy,r:n[1],r0:n[0]},api:{coord:function(n){var o=e.dataToRadius(n[0]),r=i.dataToAngle(n[1]),a=t.coordToPoint([o,r]);return a.push(o,r*Math.PI/180),a},size:Bt(Sf,t)}}},calendar:function(t){var e=t.getRect(),i=t.getRangeInfo();return{coordSys:{type:"calendar",x:e.x,y:e.y,width:e.width,height:e.height,cellWidth:t.getCellWidth(),cellHeight:t.getCellHeight(),rangeInfo:{start:i.start,end:i.end,weeks:i.weeks,dayCount:i.allDay}},api:{coord:function(e,i){return t.dataToPoint(e,i)}}}}};function uy(t){return t instanceof B}function cy(t){return t instanceof be}var dy=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return p(e,t),e.prototype.render=function(t,e,i,n){this._progressiveEls=null;var o=this._data,r=t.getData(),a=this.group,s=my(t,r,e,i);o||a.removeAll(),r.diff(o).add((function(e){xy(i,null,e,s(e,n),t,a,r)})).remove((function(e){var i=o.getItemGraphicEl(e);i&&Bf(i,yf(i).option,t)})).update((function(e,l){var u=o.getItemGraphicEl(l);xy(i,u,e,s(e,n),t,a,r)})).execute();var l=t.get("clip",!0)?vn(t.coordinateSystem,!1,t):null;l?a.setClipPath(l):a.removeClipPath(),this._data=r},e.prototype.incrementalPrepareRender=function(t,e,i){this.group.removeAll(),this._data=null},e.prototype.incrementalRender=function(t,e,i,n,o){var r=e.getData(),a=my(e,r,i,n),s=this._progressiveEls=[];function l(t){t.isGroup||(t.incremental=!0,t.ensureState("emphasis").hoverLayer=!0)}for(var u=t.start;u<t.end;u++){var c=xy(null,null,u,a(u,o),e,this.group,r);c&&(c.traverse(l),s.push(c))}},e.prototype.eachRendered=function(t){ki(this._progressiveEls||this.group,t)},e.prototype.filterForExposedEvent=function(t,e,i,n){var o=e.element;if(null==o||i.name===o)return!0;for(;(i=i.__hostTarget||i.parent)&&i!==this.group;)if(i.name===o)return!0;return!1},e.type="custom",e}(St),py=dy;function hy(t){var e,i=t.type;if("path"===i){var n=t.shape,o=null!=n.width&&null!=n.height?{x:n.x||0,y:n.y||0,width:n.width,height:n.height}:null,r=Cy(n);e=qn(r,null,o,n.layout||"center"),yf(e).customPathData=r}else if("image"===i)e=new M({}),yf(e).customImagePath=t.style.image;else if("text"===i)e=new ni({});else if("group"===i)e=new mt;else{if("compoundPath"===i)throw new Error('"compoundPath" is not supported yet.');var a=Jn(i);if(!a){mn('graphic type "'+i+'" can not be found.')}e=new a}return yf(e).customGraphicType=i,e.name=t.name,e.z2EmphasisLift=1,e.z2SelectLift=1,e}function gy(t,e,i,n,o,r,a){Qf(e);var s=o&&o.normal.cfg;s&&e.setTextConfig(s),n&&null==n.transition&&(n.transition=ay);var l=n&&n.style;if(l){if("text"===e.type){var u=l;ae(u,"textFill")&&(u.fill=u.textFill),ae(u,"textStroke")&&(u.stroke=u.textStroke)}var c=void 0,d=uy(e)?l.decal:null;t&&d&&(d.dirty=!0,c=Me(d,t)),l.__decalPattern=c}cy(e)&&(l&&(c=l.__decalPattern)&&(l.decal=c));zf(e,n,r,{dataIndex:i,isInit:a,clearStyle:!0}),Kf(e,n.keyframeAnimation,r)}function fy(t,e,i,n,o){var r=e.isGroup?null:e,a=o&&o[t].cfg;if(r){var s=r.ensureState(t);if(!1===n){var l=r.getState(t);l&&(l.style=null)}else s.style=n||null;a&&(s.textConfig=a),Se(r)}}function yy(t,e,i){var n=i===ty,o=n?e:wy(e,i),r=o?o.z2:null;null!=r&&((n?t:t.ensureState(i)).z2=r||0)}function my(t,e,i,n){var o=t.get("renderItem"),r=t.coordinateSystem,a={};r&&(Z(o,"series.render is required."),Z(r.prepareCustoms||ly[r.type],"This coordSys does not support custom series."),a=r.prepareCustoms?r.prepareCustoms(r):ly[r.type](r));for(var s,l,u=Nt({getWidth:n.getWidth,getHeight:n.getHeight,getZr:n.getZr,getDevicePixelRatio:n.getDevicePixelRatio,value:function(t,i){return null==i&&(i=s),e.getStore().get(e.getDimensionIndex(t||0),i)},style:function(i,n){Cf("api.style","Please write literal style directly instead."),null==n&&(n=s);var o=e.getItemVisual(n,"style"),r=o&&o.fill,a=o&&o.opacity,l=v(n,ty).getItemStyle();null!=r&&(l.fill=r),null!=a&&(l.opacity=a);var u={inheritColor:N(r)?r:"#000"},c=x(n,ty),d=oi(c,null,u,!1,!0);d.text=c.getShallow("show")?H(t.getFormattedLabel(n,ty),Nn(e,n)):null;var p=Xn(c,u,!1);return b(i,l),l=Df(l,d,p),i&&_(l,i),l.legacy=!0,l},ordinalRawValue:function(t,i){null==i&&(i=s),t=t||0;var n=e.getDimensionInfo(t);if(!n){var o=e.getDimensionIndex(t);return o>=0?e.getStore().get(o,i):void 0}var r=e.get(n.name,i),a=n&&n.ordinalMeta;return a?a.categories[r]:r},styleEmphasis:function(i,n){Cf("api.styleEmphasis","Please write literal style directly instead."),null==n&&(n=s);var o=v(n,$f).getItemStyle(),r=x(n,$f),a=oi(r,null,null,!0,!0);a.text=r.getShallow("show")?xi(t.getFormattedLabel(n,$f),t.getFormattedLabel(n,ty),Nn(e,n)):null;var l=Xn(r,null,!0);return b(i,o),o=Df(o,a,l),i&&_(o,i),o.legacy=!0,o},visual:function(t,i){if(null==i&&(i=s),ae(gf,t)){var n=e.getItemVisual(i,"style");return n?n[gf[t]]:null}if(ae(ff,t))return e.getItemVisual(i,t)},barLayout:function(t){if("cartesian2d"===r.type){var e=r.getBaseAxis();return Yn(Nt({axis:e},t))}},currentSeriesIndices:function(){return i.getCurrentSeriesIndices()},font:function(t){return Zn(t,i)}},a.api||{}),c={context:{},seriesId:t.id,seriesName:t.name,seriesIndex:t.seriesIndex,coordSys:a.coordSys,dataInsideLength:e.count(),encode:vy(t.getData())},d={},p={},h={},g={},f=0;f<ny.length;f++){var y=ny[f];h[y]=t.getModel(oy[y]),g[y]=t.getModel(ry[y])}function m(t){return t===s?l||(l=e.getItemModel(t)):e.getItemModel(t)}function v(t,i){return e.hasItemOption?t===s?d[i]||(d[i]=m(t).getModel(oy[i])):m(t).getModel(oy[i]):h[i]}function x(t,i){return e.hasItemOption?t===s?p[i]||(p[i]=m(t).getModel(ry[i])):m(t).getModel(ry[i]):g[i]}return function(t,i){return s=t,l=null,d={},p={},o&&o(Nt({dataIndexInside:t,dataIndex:e.getRawIndex(t),actionType:i?i.type:null},c),u)};function _(t,e){for(var i in e)ae(e,i)&&(t[i]=e[i])}function b(t,e){t&&(t.textFill&&(e.textFill=t.textFill),t.textPosition&&(e.textPosition=t.textPosition))}}function vy(t){var e={};return h(t.dimensions,(function(i){var n=t.getDimensionInfo(i);if(!n.isExtraCoord){var o=n.coordDim;(e[o]=e[o]||[])[n.coordDimIndex]=t.getDimensionIndex(i)}})),e}function xy(t,e,i,n,o,r,a){if(n){var s=_y(t,e,i,n,o,r);return s&&a.setItemGraphicEl(i,s),s&&Rt(s,n.focus,n.blurScope,n.emphasisDisabled),s}r.remove(e)}function _y(t,e,i,n,o,r){Z(n,"should not have an null/undefined element setting");var a=-1,s=e;e&&by(e,n,o)&&(a=Ke(r.childrenRef(),e),e=null);var l,u,c=!e,d=e;d?d.clearStates():(d=hy(n),s&&(l=s,(u=d).copyTransform(l),cy(u)&&cy(l)&&(u.setStyle(l.style),u.z=l.z,u.z2=l.z2,u.zlevel=l.zlevel,u.invisible=l.invisible,u.ignore=l.ignore,uy(u)&&uy(l)&&u.setShape(l.shape)))),!1===n.morph?d.disableMorphing=!0:d.disableMorphing&&(d.disableMorphing=!1),sy.normal.cfg=sy.normal.conOpt=sy.emphasis.cfg=sy.emphasis.conOpt=sy.blur.cfg=sy.blur.conOpt=sy.select.cfg=sy.select.conOpt=null,sy.isLegacy=!1,function(t,e,i,n,o,r){if(t.isGroup)return;Sy(i,null,r),Sy(i,$f,r);var a=r.normal.conOpt,s=r.emphasis.conOpt,l=r.blur.conOpt,u=r.select.conOpt;if(null!=a||null!=s||null!=u||null!=l){var c=t.getTextContent();if(!1===a)c&&t.removeTextContent();else{a=r.normal.conOpt=a||{type:"text"},c?c.clearStates():(c=hy(a),t.setTextContent(c)),gy(null,c,e,a,null,n,o);for(var d=a&&a.style,p=0;p<ny.length;p++){var h=ny[p];if(h!==ty){var g=r[h].conOpt;fy(h,c,0,My(a,g,h),null)}}d?c.dirty():c.markRedraw()}}}(d,i,n,o,c,sy),function(t,e,i,n,o){var r=i.clipPath;if(!1===r)t&&t.getClipPath()&&t.removeClipPath();else if(r){var a=t.getClipPath();a&&by(a,r,n)&&(a=null),a||(a=hy(r),Z(uy(a),"Only any type of `path` can be used in `clipPath`, rather than "+a.type+"."),t.setClipPath(a)),gy(null,a,e,r,null,n,o)}}(d,i,n,o,c),gy(t,d,i,n,sy,o,c),ae(n,"info")&&(yf(d).info=n.info);for(var p=0;p<ny.length;p++){var h=ny[p];if(h!==ty){var g=wy(n,h);fy(h,d,0,My(n,g,h),sy)}}return function(t,e,i){if(!t.isGroup){var n=t,o=i.currentZ,r=i.currentZLevel;n.z=o,n.zlevel=r;var a=e.z2;null!=a&&(n.z2=a||0);for(var s=0;s<ny.length;s++)yy(n,e,ny[s])}}(d,n,o),"group"===n.type&&function(t,e,i,n,o){var r=n.children,a=r?r.length:0,s=n.$mergeChildren,l="byName"===s||n.diffChildrenByName,u=!1===s;if(!a&&!l&&!u)return;if(l)return c={api:t,oldChildren:e.children()||[],newChildren:r||[],dataIndex:i,seriesModel:o,group:e},void new ai(c.oldChildren,c.newChildren,Ay,Ay,c).add(Dy).update(Dy).remove(Ty).execute();var c;u&&e.removeAll();for(var d=0;d<a;d++){var p=r[d],h=e.childAt(d);p?(null==p.ignore&&(p.ignore=!1),_y(t,h,i,p,o,e)):(Z(h,"renderItem should not return a group containing elements as null/undefined/{} if they do not exist before."),h.ignore=!0)}for(var g=e.childCount()-1;g>=d;g--){var f=e.childAt(g);Iy(e,f,o)}}(t,d,i,n,o),a>=0?r.replaceAt(d,a):r.add(d),d}function by(t,e,i){var n,o=yf(t),r=e.type,a=e.shape,s=e.style;return i.isUniversalTransitionEnabled()||null!=r&&r!==o.customGraphicType||"path"===r&&((n=a)&&(ae(n,"pathData")||ae(n,"d")))&&Cy(a)!==o.customPathData||"image"===r&&ae(s,"image")&&s.image!==o.customImagePath}function Sy(t,e,i){var n=e?wy(t,e):t,o=e?My(t,n,$f):t.style,r=t.type,a=n?n.textConfig:null,s=t.textContent,l=s?e?wy(s,e):s:null;if(o&&(i.isLegacy||Mf(o,r,!!a,!!l))){i.isLegacy=!0;var u=If(o,r,!e);!a&&u.textConfig&&(a=u.textConfig),!l&&u.textContent&&(l=u.textContent)}if(!e&&l){var c=l;!c.type&&(c.type="text"),Z("text"===c.type,'textContent.type must be "text"')}var d=e?i[e]:i.normal;d.cfg=a,d.conOpt=l}function wy(t,e){return e?t?t[e]:null:t}function My(t,e,i){var n=e&&e.style;return null==n&&i===$f&&t&&(n=t.styleEmphasis),n}function Iy(t,e,i){e&&Bf(e,yf(t).option,i)}function Ay(t,e){var i=t&&t.name;return null!=i?i:"e\0\0"+e}function Dy(t,e){var i=this.context,n=null!=t?i.newChildren[t]:null,o=null!=e?i.oldChildren[e]:null;_y(i.api,o,i.dataIndex,n,i.seriesModel,i.group)}function Ty(t){var e=this.context,i=e.oldChildren[t];i&&Bf(i,yf(i).option,e.seriesModel)}function Cy(t){return t&&(t.pathData||t.d)}var Ly=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return p(e,t),e.prototype.makeElOption=function(t,e,i,n,o){var r=i.axis;"angle"===r.dim&&(this.animationThreshold=Math.PI/18);var a=r.polar,s=a.getOtherAxis(r).getExtent(),l=r.dataToCoord(e),u=n.get("type");if(u&&"none"!==u){var c=Qn(n),d=Ny[u](r,a,l,s);d.style=c,t.graphicKey=d.type,t.pointer=d}var p=function(t,e,i,n,o){var r=e.axis,a=r.dataToCoord(t),s=n.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l,u,c,d=n.getRadiusAxis().getExtent();if("radius"===r.dim){var p=ye();he(p,p,s),fe(p,p,[n.cx,n.cy]),l=en([a,-o],p);var h=e.getModel("axisLabel").get("rotate")||0,g=qt.innerTextLayout(s,h*Math.PI/180,-1);u=g.textAlign,c=g.textVerticalAlign}else{var f=d[1];l=n.coordToPoint([f+o,a]);var y=n.cx,m=n.cy;u=Math.abs(l[0]-y)/f<.3?"center":l[0]>y?"left":"right",c=Math.abs(l[1]-m)/f<.3?"middle":l[1]>m?"top":"bottom"}return{position:l,align:u,verticalAlign:c}}(e,i,0,a,n.get(["label","margin"]));Kn(t,i,n,o,p)},e}($n);var Ny={line:function(t,e,i,n){return"angle"===t.dim?{type:"Line",shape:to(e.coordToPoint([n[0],i]),e.coordToPoint([n[1],i]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r:i}}},shadow:function(t,e,i,n){var o=Math.max(1,t.getBandWidth()),r=Math.PI/180;return"angle"===t.dim?{type:"Sector",shape:eo(e.cx,e.cy,n[0],n[1],(-i-o/2)*r,(o/2-i)*r)}:{type:"Sector",shape:eo(e.cx,e.cy,i-o/2,i+o/2,0,2*Math.PI)}}},Py=Ly,ky=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return p(e,t),e.prototype.findAxisModel=function(t){var e;return this.ecModel.eachComponent(t,(function(t){t.getCoordSysModel()===this&&(e=t)}),this),e},e.type="polar",e.dependencies=["radiusAxis","angleAxis"],e.defaultOption={z:0,center:["50%","50%"],radius:"80%"},e}(Yt),Ey=ky,Ry=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return p(e,t),e.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",Re).models[0]},e.type="polarAxis",e}(Yt);jt(Ry,Xt);var Vy=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return p(e,t),e.type="angleAxis",e}(Ry),zy=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return p(e,t),e.type="radiusAxis",e}(Ry),Oy=function(t){function e(e,i){return t.call(this,"radius",e,i)||this}return p(e,t),e.prototype.pointToData=function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},e}(te);Oy.prototype.dataToRadius=te.prototype.dataToCoord,Oy.prototype.radiusToData=te.prototype.coordToData;var By=Oy,Gy=ve(),Fy=function(t){function e(e,i){return t.call(this,"angle",e,i||[0,360])||this}return p(e,t),e.prototype.pointToData=function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},e.prototype.calculateCategoryInterval=function(){var t=this,e=t.getLabelModel(),i=t.scale,n=i.getExtent(),o=i.count();if(n[1]-n[0]<1)return 0;var r=n[0],a=t.dataToCoord(r+1)-t.dataToCoord(r),s=Math.abs(a),l=io(null==r?"":r+"",e.getFont(),"center","top"),u=Math.max(l.height,7)/s;isNaN(u)&&(u=1/0);var c=Math.max(0,Math.floor(u)),d=Gy(t.model),p=d.lastAutoInterval,h=d.lastTickCount;return null!=p&&null!=h&&Math.abs(p-c)<=1&&Math.abs(h-o)<=1&&p>c?c=p:(d.lastTickCount=o,d.lastAutoInterval=c),c},e}(te);Fy.prototype.dataToAngle=te.prototype.dataToCoord,Fy.prototype.angleToData=te.prototype.coordToData;var Wy=Fy,Hy=["radius","angle"],Uy=function(){function t(t){this.dimensions=Hy,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new By,this._angleAxis=new Wy,this.axisPointerEnabled=!0,this.name=t||"",this._radiusAxis.polar=this._angleAxis.polar=this}return t.prototype.containPoint=function(t){var e=this.pointToCoord(t);return this._radiusAxis.contain(e[0])&&this._angleAxis.contain(e[1])},t.prototype.containData=function(t){return this._radiusAxis.containData(t[0])&&this._angleAxis.containData(t[1])},t.prototype.getAxis=function(t){return this["_"+t+"Axis"]},t.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},t.prototype.getAxesByScale=function(t){var e=[],i=this._angleAxis,n=this._radiusAxis;return i.scale.type===t&&e.push(i),n.scale.type===t&&e.push(n),e},t.prototype.getAngleAxis=function(){return this._angleAxis},t.prototype.getRadiusAxis=function(){return this._radiusAxis},t.prototype.getOtherAxis=function(t){var e=this._angleAxis;return t===e?this._radiusAxis:e},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},t.prototype.getTooltipAxes=function(t){var e=null!=t&&"auto"!==t?this.getAxis(t):this.getBaseAxis();return{baseAxes:[e],otherAxes:[this.getOtherAxis(e)]}},t.prototype.dataToPoint=function(t,e){return this.coordToPoint([this._radiusAxis.dataToRadius(t[0],e),this._angleAxis.dataToAngle(t[1],e)])},t.prototype.pointToData=function(t,e){var i=this.pointToCoord(t);return[this._radiusAxis.radiusToData(i[0],e),this._angleAxis.angleToData(i[1],e)]},t.prototype.pointToCoord=function(t){var e=t[0]-this.cx,i=t[1]-this.cy,n=this.getAngleAxis(),o=n.getExtent(),r=Math.min(o[0],o[1]),a=Math.max(o[0],o[1]);n.inverse?r=a-360:a=r+360;var s=Math.sqrt(e*e+i*i);e/=s,i/=s;for(var l=Math.atan2(-i,e)/Math.PI*180,u=l<r?1:-1;l<r||l>a;)l+=360*u;return[s,l]},t.prototype.coordToPoint=function(t){var e=t[0],i=t[1]/180*Math.PI;return[Math.cos(i)*e+this.cx,-Math.sin(i)*e+this.cy]},t.prototype.getArea=function(){var t=this.getAngleAxis(),e=this.getRadiusAxis().getExtent().slice();e[0]>e[1]&&e.reverse();var i=t.getExtent(),n=Math.PI/180;return{cx:this.cx,cy:this.cy,r0:e[0],r:e[1],startAngle:-i[0]*n,endAngle:-i[1]*n,clockwise:t.inverse,contain:function(t,e){var i=t-this.cx,n=e-this.cy,o=i*i+n*n-1e-4,r=this.r,a=this.r0;return o<=r*r&&o>=a*a}}},t.prototype.convertToPixel=function(t,e,i){return jy(e)===this?this.dataToPoint(i):null},t.prototype.convertFromPixel=function(t,e,i){return jy(e)===this?this.pointToData(i):null},t}();function jy(t){var e=t.seriesModel,i=t.polarModel;return i&&i.coordinateSystem||e&&e.coordinateSystem}var Xy=Uy;function Yy(t,e){var i=this,n=i.getAngleAxis(),o=i.getRadiusAxis();if(n.scale.setExtent(1/0,-1/0),o.scale.setExtent(1/0,-1/0),t.eachSeries((function(t){if(t.coordinateSystem===i){var e=t.getData();h(no(e,"radius"),(function(t){o.scale.unionExtentFromData(e,t)})),h(no(e,"angle"),(function(t){n.scale.unionExtentFromData(e,t)}))}})),tn(n.scale,n.model),tn(o.scale,o.model),"category"===n.type&&!n.onBand){var r=n.getExtent(),a=360/n.scale.count();n.inverse?r[1]+=a:r[1]-=a,n.setExtent(r[0],r[1])}}function Zy(t,e){if(t.type=e.get("type"),t.scale=$i(e),t.onBand=e.get("boundaryGap")&&"category"===t.type,t.inverse=e.get("inverse"),function(t){return"angleAxis"===t.mainType}(e)){t.inverse=t.inverse!==e.get("clockwise");var i=e.get("startAngle");t.setExtent(i,i+(t.inverse?-360:360))}e.axis=t,t.model=e}var qy={dimensions:Hy,create:function(t,e){var i=[];return t.eachComponent("polar",(function(t,n){var o=new Xy(n+"");o.update=Yy;var r=o.getRadiusAxis(),a=o.getAngleAxis(),s=t.findAxisModel("radiusAxis"),l=t.findAxisModel("angleAxis");Zy(r,s),Zy(a,l),function(t,e,i){var n=e.get("center"),o=i.getWidth(),r=i.getHeight();t.cx=ee(n[0],o),t.cy=ee(n[1],r);var a=t.getRadiusAxis(),s=Math.min(o,r)/2,l=e.get("radius");null==l?l=[0,"100%"]:ct(l)||(l=[0,l]);var u=[ee(l[0],s),ee(l[1],s)];a.inverse?a.setExtent(u[1],u[0]):a.setExtent(u[0],u[1])}(o,t,e),i.push(o),t.coordinateSystem=o,o.model=t})),t.eachSeries((function(t){if("polar"===t.get("coordinateSystem")){var e=t.getReferringComponents("polar",Re).models[0];if(!e)throw new Error('Polar "'+ze(t.get("polarIndex"),t.get("polarId"),0)+'" not found');t.coordinateSystem=e.coordinateSystem}})),i}},Jy=qy,Qy=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function Ky(t,e,i){e[1]>e[0]&&(e=e.slice().reverse());var n=t.coordToPoint([e[0],i]),o=t.coordToPoint([e[1],i]);return{x1:n[0],y1:n[1],x2:o[0],y2:o[1]}}function $y(t){return t.getRadiusAxis().inverse?0:1}function tm(t){var e=t[0],i=t[t.length-1];e&&i&&Math.abs(Math.abs(e.coord-i.coord)-360)<1e-4&&t.pop()}var em=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i.axisPointerClass="PolarAxisPointer",i}return p(e,t),e.prototype.render=function(t,e){if(this.group.removeAll(),t.get("show")){var i=t.axis,n=i.polar,o=n.getRadiusAxis().getExtent(),r=i.getTicksCoords(),a=i.getMinorTicksCoords(),s=b(i.getViewLabels(),(function(t){t=J(t);var e=i.scale,n="ordinal"===e.type?e.getRawOrdinalNumber(t.tickValue):t.tickValue;return t.coord=i.dataToCoord(n),t}));tm(s),tm(r),h(Qy,(function(e){!t.get([e,"show"])||i.scale.isBlank()&&"axisLine"!==e||im[e](this.group,t,n,r,a,o,s)}),this)}},e.type="angleAxis",e}(oo),im={axisLine:function(t,e,i,n,o,r){var a,s=e.getModel(["axisLine","lineStyle"]),l=$y(i),u=l?0:1;(a=0===r[u]?new Jt({shape:{cx:i.cx,cy:i.cy,r:r[l]},style:s.getLineStyle(),z2:1,silent:!0}):new Qt({shape:{cx:i.cx,cy:i.cy,r:r[l],r0:r[u]},style:s.getLineStyle(),z2:1,silent:!0})).style.fill=null,t.add(a)},axisTick:function(t,e,i,n,o,r){var a=e.getModel("axisTick"),s=(a.get("inside")?-1:1)*a.get("length"),l=r[$y(i)],u=b(n,(function(t){return new se({shape:Ky(i,[l,l+s],t.coord)})}));t.add(Kt(u,{style:Nt(a.getModel("lineStyle").getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])})}))},minorTick:function(t,e,i,n,o,r){if(o.length){for(var a=e.getModel("axisTick"),s=e.getModel("minorTick"),l=(a.get("inside")?-1:1)*s.get("length"),u=r[$y(i)],c=[],d=0;d<o.length;d++)for(var p=0;p<o[d].length;p++)c.push(new se({shape:Ky(i,[u,u+l],o[d][p].coord)}));t.add(Kt(c,{style:Nt(s.getModel("lineStyle").getLineStyle(),Nt(a.getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])}))}))}},axisLabel:function(t,e,i,n,o,r,a){var s=e.getCategories(!0),l=e.getModel("axisLabel"),u=l.get("margin"),c=e.get("triggerEvent");h(a,(function(n,o){var a=l,d=n.tickValue,p=r[$y(i)],h=i.coordToPoint([p+u,n.coord]),g=i.cx,f=i.cy,y=Math.abs(h[0]-g)/p<.3?"center":h[0]>g?"left":"right",m=Math.abs(h[1]-f)/p<.3?"middle":h[1]>f?"top":"bottom";if(s&&s[d]){var v=s[d];dt(v)&&v.textStyle&&(a=new Ut(v.textStyle,l,l.ecModel))}var x=new ni({silent:qt.isLabelSilent(e),style:oi(a,{x:h[0],y:h[1],fill:a.getTextColor()||e.get(["axisLine","lineStyle","color"]),text:n.formattedLabel,align:y,verticalAlign:m})});if(t.add(x),c){var _=qt.makeAxisEventDataBase(e);_.targetType="axisLabel",_.value=n.rawLabel,xt(x).eventData=_}}),this)},splitLine:function(t,e,i,n,o,r){var a=e.getModel("splitLine").getModel("lineStyle"),s=a.get("color"),l=0;s=s instanceof Array?s:[s];for(var u=[],c=0;c<n.length;c++){var d=l++%s.length;u[d]=u[d]||[],u[d].push(new se({shape:Ky(i,r,n[c].coord)}))}for(c=0;c<u.length;c++)t.add(Kt(u[c],{style:Nt({stroke:s[c%s.length]},a.getLineStyle()),silent:!0,z:e.get("z")}))},minorSplitLine:function(t,e,i,n,o,r){if(o.length){for(var a=e.getModel("minorSplitLine").getModel("lineStyle"),s=[],l=0;l<o.length;l++)for(var u=0;u<o[l].length;u++)s.push(new se({shape:Ky(i,r,o[l][u].coord)}));t.add(Kt(s,{style:a.getLineStyle(),silent:!0,z:e.get("z")}))}},splitArea:function(t,e,i,n,o,r){if(n.length){var a=e.getModel("splitArea").getModel("areaStyle"),s=a.get("color"),l=0;s=s instanceof Array?s:[s];for(var u=[],c=Math.PI/180,d=-n[0].coord*c,p=Math.min(r[0],r[1]),h=Math.max(r[0],r[1]),g=e.get("clockwise"),f=1,y=n.length;f<=y;f++){var m=f===y?n[0].coord:n[f].coord,v=l++%s.length;u[v]=u[v]||[],u[v].push(new Ui({shape:{cx:i.cx,cy:i.cy,r0:p,r:h,startAngle:d,endAngle:-m*c,clockwise:g},silent:!0})),d=-m*c}for(f=0;f<u.length;f++)t.add(Kt(u[f],{style:Nt({fill:s[f%s.length]},a.getAreaStyle()),silent:!0}))}}},nm=em,om=["axisLine","axisTickLabel","axisName"],rm=["splitLine","splitArea","minorSplitLine"],am=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i.axisPointerClass="PolarAxisPointer",i}return p(e,t),e.prototype.render=function(t,e){if(this.group.removeAll(),t.get("show")){var i=this._axisGroup,n=this._axisGroup=new mt;this.group.add(n);var o=t.axis,r=o.polar,a=r.getAngleAxis(),s=o.getTicksCoords(),l=o.getMinorTicksCoords(),u=a.getExtent()[0],c=o.getExtent(),d=function(t,e,i){return{position:[t.cx,t.cy],rotation:i/180*Math.PI,labelDirection:-1,tickDirection:-1,nameDirection:1,labelRotate:e.getModel("axisLabel").get("rotate"),z2:1}}(r,t,u),p=new qt(t,d);h(om,p.add,p),n.add(p.getGroup()),an(i,n,t),h(rm,(function(e){t.get([e,"show"])&&!o.scale.isBlank()&&sm[e](this.group,t,r,u,c,s,l)}),this)}},e.type="radiusAxis",e}(oo),sm={splitLine:function(t,e,i,n,o,r){var a=e.getModel("splitLine").getModel("lineStyle"),s=a.get("color"),l=0;s=s instanceof Array?s:[s];for(var u=[],c=0;c<r.length;c++){var d=l++%s.length;u[d]=u[d]||[],u[d].push(new Jt({shape:{cx:i.cx,cy:i.cy,r:Math.max(r[c].coord,0)}}))}for(c=0;c<u.length;c++)t.add(Kt(u[c],{style:Nt({stroke:s[c%s.length],fill:null},a.getLineStyle()),silent:!0}))},minorSplitLine:function(t,e,i,n,o,r,a){if(a.length){for(var s=e.getModel("minorSplitLine").getModel("lineStyle"),l=[],u=0;u<a.length;u++)for(var c=0;c<a[u].length;c++)l.push(new Jt({shape:{cx:i.cx,cy:i.cy,r:a[u][c].coord}}));t.add(Kt(l,{style:Nt({fill:null},s.getLineStyle()),silent:!0}))}},splitArea:function(t,e,i,n,o,r){if(r.length){var a=e.getModel("splitArea").getModel("areaStyle"),s=a.get("color"),l=0;s=s instanceof Array?s:[s];for(var u=[],c=r[0].coord,d=1;d<r.length;d++){var p=l++%s.length;u[p]=u[p]||[],u[p].push(new Ui({shape:{cx:i.cx,cy:i.cy,r0:c,r:r[d].coord,startAngle:0,endAngle:2*Math.PI},silent:!0})),c=r[d].coord}for(d=0;d<u.length;d++)t.add(Kt(u[d],{style:Nt({fill:s[d%s.length]},a.getAreaStyle()),silent:!0}))}}};var lm=am;function um(t){return t.get("stack")||"__ec_stack_"+t.seriesIndex}function cm(t,e){return e.dim+t.model.componentIndex}function dm(t,e,i){var n={},o=function(t){var e={};h(t,(function(t,i){var n=t.getData(),o=t.coordinateSystem,r=o.getBaseAxis(),a=cm(o,r),s=r.getExtent(),l="category"===r.type?r.getBandWidth():Math.abs(s[1]-s[0])/n.count(),u=e[a]||{bandWidth:l,remainedWidth:l,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},c=u.stacks;e[a]=u;var d=um(t);c[d]||u.autoWidthCount++,c[d]=c[d]||{width:0,maxWidth:0};var p=ee(t.get("barWidth"),l),h=ee(t.get("barMaxWidth"),l),g=t.get("barGap"),f=t.get("barCategoryGap");p&&!c[d].width&&(p=Math.min(u.remainedWidth,p),c[d].width=p,u.remainedWidth-=p),h&&(c[d].maxWidth=h),null!=g&&(u.gap=g),null!=f&&(u.categoryGap=f)}));var i={};return h(e,(function(t,e){i[e]={};var n=t.stacks,o=t.bandWidth,r=ee(t.categoryGap,o),a=ee(t.gap,1),s=t.remainedWidth,l=t.autoWidthCount,u=(s-r)/(l+(l-1)*a);u=Math.max(u,0),h(n,(function(t,e){var i=t.maxWidth;i&&i<u&&(i=Math.min(i,s),t.width&&(i=Math.min(i,t.width)),s-=i,t.width=i,l--)})),u=(s-r)/(l+(l-1)*a),u=Math.max(u,0);var c,d=0;h(n,(function(t,e){t.width||(t.width=u),c=t,d+=t.width*(1+a)})),c&&(d-=c.width*a);var p=-d/2;h(n,(function(t,n){i[e][n]=i[e][n]||{offset:p,width:t.width},p+=t.width*(1+a)}))})),i}(S(e.getSeriesByType(t),(function(t){return!e.isSeriesFiltered(t)&&t.coordinateSystem&&"polar"===t.coordinateSystem.type})));e.eachSeriesByType(t,(function(t){if("polar"===t.coordinateSystem.type){var e=t.getData(),i=t.coordinateSystem,r=i.getBaseAxis(),a=cm(i,r),s=um(t),l=o[a][s],u=l.offset,c=l.width,d=i.getOtherAxis(r),p=t.coordinateSystem.cx,h=t.coordinateSystem.cy,g=t.get("barMinHeight")||0,f=t.get("barMinAngle")||0;n[s]=n[s]||[];for(var y=e.mapDimension(d.dim),m=e.mapDimension(r.dim),v=ro(e,y),x="radius"!==r.dim||!t.get("roundCap",!0),_=d.dataToCoord(0),b=0,S=e.count();b<S;b++){var w=e.get(y,b),M=e.get(m,b),I=w>=0?"p":"n",A=_;v&&(n[s][M]||(n[s][M]={p:_,n:_}),A=n[s][M][I]);var D=void 0,T=void 0,C=void 0,L=void 0;if("radius"===d.dim){var N=d.dataToCoord(w)-_,P=r.dataToCoord(M);Math.abs(N)<g&&(N=(N<0?-1:1)*g),D=A,T=A+N,L=(C=P-u)-c,v&&(n[s][M][I]=T)}else{var k=d.dataToCoord(w,x)-_,E=r.dataToCoord(M);Math.abs(k)<f&&(k=(k<0?-1:1)*f),T=(D=E+u)+c,C=A,L=A+k,v&&(n[s][M][I]=L)}e.setItemLayout(b,{cx:p,cy:h,r0:D,r:T,startAngle:-C*Math.PI/180,endAngle:-L*Math.PI/180,clockwise:C>=L})}}}))}var pm={startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:0}},hm={splitNumber:5},gm=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return p(e,t),e.type="polar",e}($t);function fm(t,e){e=e||{};var i=t.coordinateSystem,n=t.axis,o={},r=n.position,a=n.orient,s=i.getRect(),l=[s.x,s.x+s.width,s.y,s.y+s.height],u={horizontal:{top:l[2],bottom:l[3]},vertical:{left:l[0],right:l[1]}};o.position=["vertical"===a?u.vertical[r]:l[0],"horizontal"===a?u.horizontal[r]:l[3]];o.rotation=Math.PI/2*{horizontal:0,vertical:1}[a];o.labelDirection=o.tickDirection=o.nameDirection={top:-1,bottom:1,right:1,left:-1}[r],t.get(["axisTick","inside"])&&(o.tickDirection=-o.tickDirection),ze(e.labelInside,t.get(["axisLabel","inside"]))&&(o.labelDirection=-o.labelDirection);var c=e.rotate;return null==c&&(c=t.get(["axisLabel","rotate"])),o.labelRotation="top"===r?-c:c,o.z2=1,o}var ym=["axisLine","axisTickLabel","axisName"],mm=["splitArea","splitLine"],vm=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i.axisPointerClass="SingleAxisPointer",i}return p(e,t),e.prototype.render=function(e,i,n,o){var r=this.group;r.removeAll();var a=this._axisGroup;this._axisGroup=new mt;var s=fm(e),l=new qt(e,s);h(ym,l.add,l),r.add(this._axisGroup),r.add(l.getGroup()),h(mm,(function(t){e.get([t,"show"])&&xm[t](this,this.group,this._axisGroup,e)}),this),an(a,this._axisGroup,e),t.prototype.render.call(this,e,i,n,o)},e.prototype.remove=function(){so(this)},e.type="singleAxis",e}(oo),xm={splitLine:function(t,e,i,n){var o=n.axis;if(!o.scale.isBlank()){var r=n.getModel("splitLine"),a=r.getModel("lineStyle"),s=a.get("color");s=s instanceof Array?s:[s];for(var l=a.get("width"),u=n.coordinateSystem.getRect(),c=o.isHorizontal(),d=[],p=0,h=o.getTicksCoords({tickModel:r}),g=[],f=[],y=0;y<h.length;++y){var m=o.toGlobalCoord(h[y].coord);c?(g[0]=m,g[1]=u.y,f[0]=m,f[1]=u.y+u.height):(g[0]=u.x,g[1]=m,f[0]=u.x+u.width,f[1]=m);var v=new se({shape:{x1:g[0],y1:g[1],x2:f[0],y2:f[1]},silent:!0});lo(v.shape,l);var x=p++%s.length;d[x]=d[x]||[],d[x].push(v)}var _=a.getLineStyle(["color"]);for(y=0;y<d.length;++y)e.add(Kt(d[y],{style:Nt({stroke:s[y%s.length]},_),silent:!0}))}},splitArea:function(t,e,i,n){uo(t,i,n,n)}},_m=vm,bm=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return p(e,t),e.prototype.getCoordSysModel=function(){return this},e.type="singleAxis",e.layoutMode="box",e.defaultOption={left:"5%",top:"5%",right:"5%",bottom:"5%",type:"value",position:"bottom",orient:"horizontal",axisLine:{show:!0,lineStyle:{width:1,type:"solid"}},tooltip:{show:!0},axisTick:{show:!0,length:6,lineStyle:{width:1}},axisLabel:{show:!0,interval:"auto"},splitLine:{show:!0,lineStyle:{type:"dashed",opacity:.2}}},e}(Yt);jt(bm,Xt.prototype);var Sm=bm,wm=function(t){function e(e,i,n,o,r){var a=t.call(this,e,i,n)||this;return a.type=o||"value",a.position=r||"bottom",a}return p(e,t),e.prototype.isHorizontal=function(){var t=this.position;return"top"===t||"bottom"===t},e.prototype.pointToData=function(t,e){return this.coordinateSystem.pointToData(t)[0]},e}(te),Mm=wm,Im=["single"],Am=function(){function t(t,e,i){this.type="single",this.dimension="single",this.dimensions=Im,this.axisPointerEnabled=!0,this.model=t,this._init(t,e,i)}return t.prototype._init=function(t,e,i){var n=this.dimension,o=new Mm(n,$i(t),[0,0],t.get("type"),t.get("position")),r="category"===o.type;o.onBand=r&&t.get("boundaryGap"),o.inverse=t.get("inverse"),o.orient=t.get("orient"),t.axis=o,o.model=t,o.coordinateSystem=this,this._axis=o},t.prototype.update=function(t,e){t.eachSeries((function(t){if(t.coordinateSystem===this){var e=t.getData();h(e.mapDimensionsAll(this.dimension),(function(t){this._axis.scale.unionExtentFromData(e,t)}),this),tn(this._axis.scale,this._axis.model)}}),this)},t.prototype.resize=function(t,e){this._rect=Oe({left:t.get("left"),top:t.get("top"),right:t.get("right"),bottom:t.get("bottom"),width:t.get("width"),height:t.get("height")},{width:e.getWidth(),height:e.getHeight()}),this._adjustAxis()},t.prototype.getRect=function(){return this._rect},t.prototype._adjustAxis=function(){var t=this._rect,e=this._axis,i=e.isHorizontal(),n=i?[0,t.width]:[0,t.height],o=e.inverse?1:0;e.setExtent(n[o],n[1-o]),this._updateAxisTransform(e,i?t.x:t.y)},t.prototype._updateAxisTransform=function(t,e){var i=t.getExtent(),n=i[0]+i[1],o=t.isHorizontal();t.toGlobalCoord=o?function(t){return t+e}:function(t){return n-t+e},t.toLocalCoord=o?function(t){return t-e}:function(t){return n-t+e}},t.prototype.getAxis=function(){return this._axis},t.prototype.getBaseAxis=function(){return this._axis},t.prototype.getAxes=function(){return[this._axis]},t.prototype.getTooltipAxes=function(){return{baseAxes:[this.getAxis()],otherAxes:[]}},t.prototype.containPoint=function(t){var e=this.getRect(),i=this.getAxis();return"horizontal"===i.orient?i.contain(i.toLocalCoord(t[0]))&&t[1]>=e.y&&t[1]<=e.y+e.height:i.contain(i.toLocalCoord(t[1]))&&t[0]>=e.y&&t[0]<=e.y+e.height},t.prototype.pointToData=function(t){var e=this.getAxis();return[e.coordToData(e.toLocalCoord(t["horizontal"===e.orient?0:1]))]},t.prototype.dataToPoint=function(t){var e=this.getAxis(),i=this.getRect(),n=[],o="horizontal"===e.orient?0:1;return t instanceof Array&&(t=t[0]),n[o]=e.toGlobalCoord(e.dataToCoord(+t)),n[1-o]=0===o?i.y+i.height/2:i.x+i.width/2,n},t.prototype.convertToPixel=function(t,e,i){return Dm(e)===this?this.dataToPoint(i):null},t.prototype.convertFromPixel=function(t,e,i){return Dm(e)===this?this.pointToData(i):null},t}();function Dm(t){var e=t.seriesModel,i=t.singleAxisModel;return i&&i.coordinateSystem||e&&e.coordinateSystem}var Tm={create:function(t,e){var i=[];return t.eachComponent("singleAxis",(function(n,o){var r=new Am(n,t,e);r.name="single_"+o,r.resize(n,e),n.coordinateSystem=r,i.push(r)})),t.eachSeries((function(t){if("singleAxis"===t.get("coordinateSystem")){var e=t.getReferringComponents("singleAxis",Re).models[0];t.coordinateSystem=e&&e.coordinateSystem}})),i},dimensions:Im},Cm=["x","y"],Lm=["width","height"],Nm=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return p(e,t),e.prototype.makeElOption=function(t,e,i,n,o){var r=i.axis,a=r.coordinateSystem,s=Em(a,1-km(r)),l=a.dataToPoint(e)[0],u=n.get("type");if(u&&"none"!==u){var c=Qn(n),d=Pm[u](r,l,s);d.style=c,t.graphicKey=d.type,t.pointer=d}var p=fm(i);co(e,t,p,i,n,o)},e.prototype.getHandleTransform=function(t,e,i){var n=fm(e,{labelInside:!1});n.labelMargin=i.get(["handle","margin"]);var o=po(e.axis,t,n);return{x:o[0],y:o[1],rotation:n.rotation+(n.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,e,i,n){var o=i.axis,r=o.coordinateSystem,a=km(o),s=Em(r,a),l=[t.x,t.y];l[a]+=e[a],l[a]=Math.min(s[1],l[a]),l[a]=Math.max(s[0],l[a]);var u=Em(r,1-a),c=(u[1]+u[0])/2,d=[c,c];return d[a]=l[a],{x:l[0],y:l[1],rotation:t.rotation,cursorPoint:d,tooltipOption:{verticalAlign:"middle"}}},e}($n),Pm={line:function(t,e,i){return{type:"Line",subPixelOptimize:!0,shape:to([e,i[0]],[e,i[1]],km(t))}},shadow:function(t,e,i){var n=t.getBandWidth(),o=i[1]-i[0];return{type:"Rect",shape:ho([e-n/2,i[0]],[n,o],km(t))}}};function km(t){return t.isHorizontal()?0:1}function Em(t,e){var i=t.getRect();return[i[Cm[e]],i[Cm[e]]+i[Lm[e]]]}var Rm=Nm,Vm=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return p(e,t),e.type="single",e}($t);var zm=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return p(e,t),e.prototype.init=function(e,i,n){var o=go(e);t.prototype.init.apply(this,arguments),Om(e,o)},e.prototype.mergeOption=function(e){t.prototype.mergeOption.apply(this,arguments),Om(this.option,e)},e.prototype.getCellSize=function(){return this.option.cellSize},e.type="calendar",e.defaultOption={z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{color:"#fff",borderWidth:1,borderColor:"#ccc"},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},e}(Yt);function Om(t,e){var i,n=t.cellSize;1===(i=ct(n)?n:t.cellSize=[n,n]).length&&(i[1]=i[0]);var o=b([0,1],(function(t){return fo(e,t)&&(i[t]="auto"),null!=i[t]&&"auto"!==i[t]}));yo(t,e,{type:"box",ignoreSize:o})}var Bm=zm,Gm=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return p(e,t),e.prototype.render=function(t,e,i){var n=this.group;n.removeAll();var o=t.coordinateSystem,r=o.getRangeInfo(),a=o.getOrient(),s=e.getLocaleModel();this._renderDayRect(t,r,n),this._renderLines(t,r,a,n),this._renderYearText(t,r,a,n),this._renderMonthText(t,s,a,n),this._renderWeekText(t,s,r,a,n)},e.prototype._renderDayRect=function(t,e,i){for(var n=t.coordinateSystem,o=t.getModel("itemStyle").getItemStyle(),r=n.getCellWidth(),a=n.getCellHeight(),s=e.start.time;s<=e.end.time;s=n.getNextNDay(s,1).time){var l=n.dataToRect([s],!1).tl,u=new re({shape:{x:l[0],y:l[1],width:r,height:a},cursor:"default",style:o});i.add(u)}},e.prototype._renderLines=function(t,e,i,n){var o=this,r=t.coordinateSystem,a=t.getModel(["splitLine","lineStyle"]).getLineStyle(),s=t.get(["splitLine","show"]),l=a.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var u=e.start,c=0;u.time<=e.end.time;c++){p(u.formatedDate),0===c&&(u=r.getDateInfo(e.start.y+"-"+e.start.m));var d=u.date;d.setMonth(d.getMonth()+1),u=r.getDateInfo(d)}function p(e){o._firstDayOfMonth.push(r.getDateInfo(e)),o._firstDayPoints.push(r.dataToRect([e],!1).tl);var l=o._getLinePointsOfOneWeek(t,e,i);o._tlpoints.push(l[0]),o._blpoints.push(l[l.length-1]),s&&o._drawSplitline(l,a,n)}p(r.getNextNDay(e.end.time,1).formatedDate),s&&this._drawSplitline(o._getEdgesPoints(o._tlpoints,l,i),a,n),s&&this._drawSplitline(o._getEdgesPoints(o._blpoints,l,i),a,n)},e.prototype._getEdgesPoints=function(t,e,i){var n=[t[0].slice(),t[t.length-1].slice()],o="horizontal"===i?0:1;return n[0][o]=n[0][o]-e/2,n[1][o]=n[1][o]+e/2,n},e.prototype._drawSplitline=function(t,e,i){var n=new Dt({z2:20,shape:{points:t},style:e});i.add(n)},e.prototype._getLinePointsOfOneWeek=function(t,e,i){for(var n=t.coordinateSystem,o=n.getDateInfo(e),r=[],a=0;a<7;a++){var s=n.getNextNDay(o.time,a),l=n.dataToRect([s.time],!1);r[2*s.day]=l.tl,r[2*s.day+1]=l["horizontal"===i?"bl":"tr"]}return r},e.prototype._formatterLabel=function(t,e){return N(t)&&t?mo(t,e):Q(t)?t(e):e.nameMap},e.prototype._yearTextPositionControl=function(t,e,i,n,o){var r=e[0],a=e[1],s=["center","bottom"];"bottom"===n?(a+=o,s=["center","top"]):"left"===n?r-=o:"right"===n?(r+=o,s=["center","top"]):a-=o;var l=0;return"left"!==n&&"right"!==n||(l=Math.PI/2),{rotation:l,x:r,y:a,style:{align:s[0],verticalAlign:s[1]}}},e.prototype._renderYearText=function(t,e,i,n){var o=t.getModel("yearLabel");if(o.get("show")){var r=o.get("margin"),a=o.get("position");a||(a="horizontal"!==i?"top":"left");var s=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],l=(s[0][0]+s[1][0])/2,u=(s[0][1]+s[1][1])/2,c="horizontal"===i?0:1,d={top:[l,s[c][1]],bottom:[l,s[1-c][1]],left:[s[1-c][0],u],right:[s[c][0],u]},p=e.start.y;+e.end.y>+e.start.y&&(p=p+"-"+e.end.y);var h=o.get("formatter"),g={start:e.start.y,end:e.end.y,nameMap:p},f=this._formatterLabel(h,g),y=new ni({z2:30,style:oi(o,{text:f})});y.attr(this._yearTextPositionControl(y,d[a],i,a,r)),n.add(y)}},e.prototype._monthTextPositionControl=function(t,e,i,n,o){var r="left",a="top",s=t[0],l=t[1];return"horizontal"===i?(l+=o,e&&(r="center"),"start"===n&&(a="bottom")):(s+=o,e&&(a="middle"),"start"===n&&(r="right")),{x:s,y:l,align:r,verticalAlign:a}},e.prototype._renderMonthText=function(t,e,i,n){var o=t.getModel("monthLabel");if(o.get("show")){var r=o.get("nameMap"),a=o.get("margin"),s=o.get("position"),l=o.get("align"),u=[this._tlpoints,this._blpoints];r&&!N(r)||(r&&(e=vo(r)||e),r=e.get(["time","monthAbbr"])||[]);var c="start"===s?0:1,d="horizontal"===i?0:1;a="start"===s?-a:a;for(var p="center"===l,h=0;h<u[c].length-1;h++){var g=u[c][h].slice(),f=this._firstDayOfMonth[h];if(p){var y=this._firstDayPoints[h];g[d]=(y[d]+u[0][h+1][d])/2}var m=o.get("formatter"),v=r[+f.m-1],x={yyyy:f.y,yy:(f.y+"").slice(2),MM:f.m,M:+f.m,nameMap:v},_=this._formatterLabel(m,x),b=new ni({z2:30,style:E(oi(o,{text:_}),this._monthTextPositionControl(g,p,i,s,a))});n.add(b)}}},e.prototype._weekTextPositionControl=function(t,e,i,n,o){var r="center",a="middle",s=t[0],l=t[1],u="start"===i;return"horizontal"===e?(s=s+n+(u?1:-1)*o[0]/2,r=u?"right":"left"):(l=l+n+(u?1:-1)*o[1]/2,a=u?"bottom":"top"),{x:s,y:l,align:r,verticalAlign:a}},e.prototype._renderWeekText=function(t,e,i,n,o){var r=t.getModel("dayLabel");if(r.get("show")){var a=t.coordinateSystem,s=r.get("position"),l=r.get("nameMap"),u=r.get("margin"),c=a.getFirstDayOfWeek();if(!l||N(l))l&&(e=vo(l)||e),l=e.get(["time","dayOfWeekShort"])||b(e.get(["time","dayOfWeekAbbr"]),(function(t){return t[0]}));var d=a.getNextNDay(i.end.time,7-i.lweek).time,p=[a.getCellWidth(),a.getCellHeight()];u=ee(u,Math.min(p[1],p[0])),"start"===s&&(d=a.getNextNDay(i.start.time,-(7+i.fweek)).time,u=-u);for(var h=0;h<7;h++){var g,f=a.getNextNDay(d,h),y=a.dataToRect([f.time],!1).center;g=Math.abs((h+c)%7);var m=new ni({z2:30,style:E(oi(r,{text:l[g]}),this._weekTextPositionControl(y,n,s,u,p))});o.add(m)}}},e.type="calendar",e}($t),Fm=Gm,Wm=864e5;function Hm(t){var e=t.calendarModel,i=t.seriesModel;return e?e.coordinateSystem:i?i.coordinateSystem:null}var Um=function(){function t(e,i,n){this.type="calendar",this.dimensions=t.dimensions,this.getDimensionsInfo=t.getDimensionsInfo,this._model=e}return t.getDimensionsInfo=function(){return[{name:"time",type:"time"},"value"]},t.prototype.getRangeInfo=function(){return this._rangeInfo},t.prototype.getModel=function(){return this._model},t.prototype.getRect=function(){return this._rect},t.prototype.getCellWidth=function(){return this._sw},t.prototype.getCellHeight=function(){return this._sh},t.prototype.getOrient=function(){return this._orient},t.prototype.getFirstDayOfWeek=function(){return this._firstDayOfWeek},t.prototype.getDateInfo=function(t){var e=(t=xo(t)).getFullYear(),i=t.getMonth()+1,n=i<10?"0"+i:""+i,o=t.getDate(),r=o<10?"0"+o:""+o,a=t.getDay();return{y:e+"",m:n,d:r,day:a=Math.abs((a+7-this.getFirstDayOfWeek())%7),time:t.getTime(),formatedDate:e+"-"+n+"-"+r,date:t}},t.prototype.getNextNDay=function(t,e){return 0===(e=e||0)||(t=new Date(this.getDateInfo(t).time)).setDate(t.getDate()+e),this.getDateInfo(t)},t.prototype.update=function(t,e){this._firstDayOfWeek=+this._model.getModel("dayLabel").get("firstDay"),this._orient=this._model.get("orient"),this._lineWidth=this._model.getModel("itemStyle").getItemStyle().lineWidth||0,this._rangeInfo=this._getRangeInfo(this._initRangeOption());var i=this._rangeInfo.weeks||1,n=["width","height"],o=this._model.getCellSize().slice(),r=this._model.getBoxLayoutParams(),a="horizontal"===this._orient?[i,7]:[7,i];h([0,1],(function(t){u(o,t)&&(r[n[t]]=o[t]*a[t])}));var s={width:e.getWidth(),height:e.getHeight()},l=this._rect=Oe(r,s);function u(t,e){return null!=t[e]&&"auto"!==t[e]}h([0,1],(function(t){u(o,t)||(o[t]=l[n[t]]/a[t])})),this._sw=o[0],this._sh=o[1]},t.prototype.dataToPoint=function(t,e){ct(t)&&(t=t[0]),null==e&&(e=!0);var i=this.getDateInfo(t),n=this._rangeInfo,o=i.formatedDate;if(e&&!(i.time>=n.start.time&&i.time<n.end.time+Wm))return[NaN,NaN];var r=i.day,a=this._getRangeInfo([n.start.time,o]).nthWeek;return"vertical"===this._orient?[this._rect.x+r*this._sw+this._sw/2,this._rect.y+a*this._sh+this._sh/2]:[this._rect.x+a*this._sw+this._sw/2,this._rect.y+r*this._sh+this._sh/2]},t.prototype.pointToData=function(t){var e=this.pointToDate(t);return e&&e.time},t.prototype.dataToRect=function(t,e){var i=this.dataToPoint(t,e);return{contentShape:{x:i[0]-(this._sw-this._lineWidth)/2,y:i[1]-(this._sh-this._lineWidth)/2,width:this._sw-this._lineWidth,height:this._sh-this._lineWidth},center:i,tl:[i[0]-this._sw/2,i[1]-this._sh/2],tr:[i[0]+this._sw/2,i[1]-this._sh/2],br:[i[0]+this._sw/2,i[1]+this._sh/2],bl:[i[0]-this._sw/2,i[1]+this._sh/2]}},t.prototype.pointToDate=function(t){var e=Math.floor((t[0]-this._rect.x)/this._sw)+1,i=Math.floor((t[1]-this._rect.y)/this._sh)+1,n=this._rangeInfo.range;return"vertical"===this._orient?this._getDateByWeeksAndDay(i,e-1,n):this._getDateByWeeksAndDay(e,i-1,n)},t.prototype.convertToPixel=function(t,e,i){var n=Hm(e);return n===this?n.dataToPoint(i):null},t.prototype.convertFromPixel=function(t,e,i){var n=Hm(e);return n===this?n.pointToData(i):null},t.prototype.containPoint=function(t){return console.warn("Not implemented."),!1},t.prototype._initRangeOption=function(){var t,e=this._model.get("range");if(ct(e)&&1===e.length&&(e=e[0]),ct(e))t=e;else{var i=e.toString();if(/^\d{4}$/.test(i)&&(t=[i+"-01-01",i+"-12-31"]),/^\d{4}[\/|-]\d{1,2}$/.test(i)){var n=this.getDateInfo(i),o=n.date;o.setMonth(o.getMonth()+1);var r=this.getNextNDay(o,-1);t=[n.formatedDate,r.formatedDate]}/^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(i)&&(t=[i,i])}if(!t)return U("Invalid date range."),e;var a=this._getRangeInfo(t);return a.start.time>a.end.time&&t.reverse(),t},t.prototype._getRangeInfo=function(t){var e,i=[this.getDateInfo(t[0]),this.getDateInfo(t[1])];i[0].time>i[1].time&&(e=!0,i.reverse());var n=Math.floor(i[1].time/Wm)-Math.floor(i[0].time/Wm)+1,o=new Date(i[0].time),r=o.getDate(),a=i[1].date.getDate();o.setDate(r+n-1);var s=o.getDate();if(s!==a)for(var l=o.getTime()-i[1].time>0?1:-1;(s=o.getDate())!==a&&(o.getTime()-i[1].time)*l>0;)n-=l,o.setDate(s-l);var u=Math.floor((n+i[0].day+6)/7),c=e?1-u:u-1;return e&&i.reverse(),{range:[i[0].formatedDate,i[1].formatedDate],start:i[0],end:i[1],allDay:n,weeks:u,nthWeek:c,fweek:i[0].day,lweek:i[1].day}},t.prototype._getDateByWeeksAndDay=function(t,e,i){var n=this._getRangeInfo(i);if(t>n.weeks||0===t&&e<n.fweek||t===n.weeks&&e>n.lweek)return null;var o=7*(t-1)-n.fweek+e,r=new Date(n.start.time);return r.setDate(+n.start.d+o),this.getDateInfo(r)},t.create=function(e,i){var n=[];return e.eachComponent("calendar",(function(e){var i=new t(e);n.push(i),e.coordinateSystem=i})),e.eachSeries((function(t){"calendar"===t.get("coordinateSystem")&&(t.coordinateSystem=n[t.get("calendarIndex")||0])})),n},t.dimensions=["time","value"],t}();function jm(t,e){var i;return h(e,(function(e){null!=t[e]&&"auto"!==t[e]&&(i=!0)})),i}var Xm=["transition","enterFrom","leaveTo"],Ym=Xm.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function Zm(t,e,i){if(i&&(!t[i]&&e[i]&&(t[i]={}),t=t[i],e=e[i]),t&&e)for(var n=i?Xm:Ym,o=0;o<n.length;o++){var r=n[o];null==t[r]&&null!=e[r]&&(t[r]=e[r])}}var qm=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i.preventAutoZ=!0,i}return p(e,t),e.prototype.mergeOption=function(e,i){var n=this.option.elements;this.option.elements=null,t.prototype.mergeOption.call(this,e,i),this.option.elements=n},e.prototype.optionUpdated=function(t,e){var i=this.option,n=(e?i:t).elements,o=i.elements=e?[]:i.elements,r=[];this._flatten(n,r,null);var a=_o(o,r,"normalMerge"),s=this._elOptionsToUpdate=[];h(a,(function(t,e){var i=t.newOption;Z(dt(i)||t.existing,"Empty graphic option definition"),i&&(s.push(i),function(t,e){var i=t.existing;if(e.id=t.keyInfo.id,!e.type&&i&&(e.type=i.type),null==e.parentId){var n=e.parentOption;n?e.parentId=n.id:i&&(e.parentId=i.parentId)}e.parentOption=null}(t,i),function(t,e,i){var n=E({},i),o=t[e],r=i.$action||"merge";if("merge"===r)if(o){var a=i.type;Z(!a||o.type===a,'Please set $action: "replace" to change `type`'),Ht(o,n,!0),yo(o,n,{ignoreSize:!0}),bo(i,o),Zm(i,o),Zm(i,o,"shape"),Zm(i,o,"style"),Zm(i,o,"extra"),i.clipPath=o.clipPath}else t[e]=n;else"replace"===r?t[e]=n:"remove"===r&&o&&(t[e]=null)}(o,e,i),function(t,e){if(t&&(t.hv=e.hv=[jm(e,["left","right"]),jm(e,["top","bottom"])],"group"===t.type)){var i=t,n=e;null==i.width&&(i.width=n.width=0),null==i.height&&(i.height=n.height=0)}}(o[e],i))}),this),i.elements=S(o,(function(t){return t&&delete t.$action,null!=t}))},e.prototype._flatten=function(t,e,i){h(t,(function(t){if(t){i&&(t.parentOption=i),e.push(t);var n=t.children;n&&n.length&&this._flatten(n,e,t),delete t.children}}),this)},e.prototype.useElOptionsToUpdate=function(){var t=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,t},e.type="graphic",e.defaultOption={elements:[]},e}(Yt),Jm={path:null,compoundPath:null,group:mt,image:M,text:ni},Qm=ve(),Km=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return p(e,t),e.prototype.init=function(){this._elMap=me()},e.prototype.render=function(t,e,i){t!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=t,this._updateElements(t),this._relocate(t,i)},e.prototype._updateElements=function(t){var e=t.useElOptionsToUpdate();if(e){var i=this._elMap,n=this.group,o=t.get("z"),r=t.get("zlevel");h(e,(function(e){var a=qe(e.id,null),s=null!=a?i.get(a):null,l=qe(e.parentId,null),u=null!=l?i.get(l):n,c=e.type,d=e.style;"text"===c&&d&&e.hv&&e.hv[1]&&(d.textVerticalAlign=d.textBaseline=d.verticalAlign=d.align=null);var p=e.textContent,g=e.textConfig;if(d&&Mf(d,c,!!g,!!p)){var f=If(d,c,!0);!g&&f.textConfig&&(g=e.textConfig=f.textConfig),!p&&f.textContent&&(p=f.textContent)}var y=function(t){return t=E({},t),h(["id","parentId","$action","hv","bounding","textContent","clipPath"].concat(So),(function(e){delete t[e]})),t}(e);s&&Z(u===s.parent,"Changing parent is not supported.");var m=e.$action||"merge",v="merge"===m,x="replace"===m;if(v){var _=s;(D=!s)?_=tv(a,u,e.type,i):(_&&(Qm(_).isNew=!1),Qf(_)),_&&(zf(_,y,t,{isInit:D}),iv(_,e,o,r))}else if(x){ev(s,e,i,t);var b=tv(a,u,e.type,i);b&&(zf(b,y,t,{isInit:!0}),iv(b,e,o,r))}else"remove"===m&&(Of(s,e),ev(s,e,i,t));var S=i.get(a);if(S&&p)if(v){var w=S.getTextContent();w?w.attr(p):S.setTextContent(new ni(p))}else x&&S.setTextContent(new ni(p));if(S){var M=e.clipPath;if(M){var I=M.type,A=void 0,D=!1;if(v){var T=S.getClipPath();A=(D=!T||Qm(T).type!==I)?$m(I):T}else x&&(D=!0,A=$m(I));S.setClipPath(A),zf(A,M,t,{isInit:D}),Kf(A,M.keyframeAnimation,t)}var C=Qm(S);S.setTextConfig(g),C.option=e,function(t,e,i){var n=xt(t).eventData;t.silent||t.ignore||n||(n=xt(t).eventData={componentType:"graphic",componentIndex:e.componentIndex,name:t.name});n&&(n.info=i.info)}(S,t,e),Ie({el:S,componentModel:t,itemName:S.name,itemTooltipOption:e.tooltip}),Kf(S,e.keyframeAnimation,t)}}))}},e.prototype._relocate=function(t,e){for(var i=t.option.elements,n=this.group,o=this._elMap,r=e.getWidth(),a=e.getHeight(),s=["x","y"],l=0;l<i.length;l++){var u=i[l];if((g=null!=(h=qe(u.id,null))?o.get(h):null)&&g.isGroup){var c=(f=g.parent)===n,d=Qm(g),p=Qm(f);d.width=ee(d.option.width,c?r:p.width)||0,d.height=ee(d.option.height,c?a:p.height)||0}}for(l=i.length-1;l>=0;l--){var h,g;u=i[l];if(g=null!=(h=qe(u.id,null))?o.get(h):null){var f=g.parent,y=(p=Qm(f),f===n?{width:r,height:a}:{width:p.width,height:p.height}),m={},v=ei(g,u,y,null,{hv:u.hv,boundingMode:u.bounding},m);if(!Qm(g).isNew&&v){for(var x=u.transition,_={},b=0;b<s.length;b++){var S=s[b],w=m[S];x&&(Gf(x)||Ke(x,S)>=0)?_[S]=w:g[S]=w}Lt(g,_,t,0)}else g.attr(m)}}},e.prototype._clear=function(){var t=this,e=this._elMap;e.each((function(i){ev(i,Qm(i).option,e,t._lastGraphicModel)})),this._elMap=me()},e.prototype.dispose=function(){this._clear()},e.type="graphic",e}($t);function $m(t){Z(t,"graphic type MUST be set");var e=ae(Jm,t)?Jm[t]:Jn(t);Z(e,"graphic type "+t+" can not be found");var i=new e({});return Qm(i).type=t,i}function tv(t,e,i,n){var o=$m(i);return e.add(o),n.set(t,o),Qm(o).id=t,Qm(o).isNew=!0,o}function ev(t,e,i,n){t&&t.parent&&("group"===t.type&&t.traverse((function(t){ev(t,e,i,n)})),Bf(t,e,n),i.removeKey(Qm(t).id))}function iv(t,e,i,n){t.isGroup||h([["cursor",be.prototype.cursor],["zlevel",n||0],["z",i||0],["z2",0]],(function(i){var n=i[0];ae(e,n)?t[n]=H(e[n],i[1]):null==t[n]&&(t[n]=i[1])})),h(T(e),(function(i){if(0===i.indexOf("on")){var n=e[i];t[i]=Q(n)?n:null}})),ae(e,"draggable")&&(t.draggable=e.draggable),null!=e.name&&(t.name=e.name),null!=e.id&&(t.id=e.id)}var nv=["rect","polygon","keep","clear"];function ov(t,e){var i=ti(t?t.brush:[]);if(i.length){var n=[];h(i,(function(t){var e=t.hasOwnProperty("toolbox")?t.toolbox:[];e instanceof Array&&(n=n.concat(e))}));var o=t&&t.toolbox;ct(o)&&(o=o[0]),o||(o={feature:{}},t.toolbox=[o]);var r=o.feature||(o.feature={}),a=r.brush||(r.brush={}),s=a.type||(a.type=[]);s.push.apply(s,n),function(t){var e={};h(t,(function(t){e[t]=1})),t.length=0,h(e,(function(e,i){t.push(i)}))}(s),e&&!s.length&&s.push.apply(s,nv)}}var rv=h;function av(t){if(t)for(var e in t)if(t.hasOwnProperty(e))return!0}function sv(t,e,i){var n={};return rv(e,(function(e){var o,r=n[e]=((o=function(){}).prototype.__hidden=o.prototype,new o);rv(t[e],(function(t,n){if(uc.isValidType(n)){var o={type:n,visual:t};i&&i(o,e),r[n]=new uc(o),"opacity"===n&&((o=J(o)).type="colorAlpha",r.__hidden.__alphaForOpacity=new uc(o))}}))})),n}function lv(t,e,i){var n;h(i,(function(t){e.hasOwnProperty(t)&&av(e[t])&&(n=!0)})),n&&h(i,(function(i){e.hasOwnProperty(i)&&av(e[i])?t[i]=J(e[i]):delete t[i]}))}var uv={lineX:cv(0),lineY:cv(1),rect:{point:function(t,e,i){return t&&i.boundingRect.contain(t[0],t[1])},rect:function(t,e,i){return t&&i.boundingRect.intersect(t)}},polygon:{point:function(t,e,i){return t&&i.boundingRect.contain(t[0],t[1])&&mr(i.range,t[0],t[1])},rect:function(t,e,i){var n=i.range;if(!t||n.length<=1)return!1;var o=t.x,r=t.y,a=t.width,s=t.height,l=n[0];return!!(mr(n,o,r)||mr(n,o+a,r)||mr(n,o,r+s)||mr(n,o+a,r+s)||g.create(t).contain(l[0],l[1])||Io(o,r,o+a,r,n)||Io(o,r,o,r+s,n)||Io(o+a,r,o+a,r+s,n)||Io(o,r+s,o+a,r+s,n))||void 0}}};function cv(t){var e=["x","y"],i=["width","height"];return{point:function(e,i,n){if(e){var o=n.range;return dv(e[t],o)}},rect:function(n,o,r){if(n){var a=r.range,s=[n[e[t]],n[e[t]]+n[i[t]]];return s[1]<s[0]&&s.reverse(),dv(s[0],a)||dv(s[1],a)||dv(a[0],s)||dv(a[1],s)}}}}function dv(t,e){return e[0]<=t&&t<=e[1]}var pv=["inBrush","outOfBrush"],hv="__ecBrushSelect",gv="__ecInBrushSelectEvent";function fv(t){t.eachComponent({mainType:"brush"},(function(e){(e.brushTargetManager=new Ao(e.option,t)).setInputRanges(e.areas,t)}))}function yv(t,e,i){var n,o,r=[];t.eachComponent({mainType:"brush"},(function(t){i&&"takeGlobalCursor"===i.type&&t.setBrushOption("brush"===i.key?i.brushOption:{brushType:!1})})),fv(t),t.eachComponent({mainType:"brush"},(function(e,i){var a={brushId:e.id,brushIndex:i,brushName:e.name,areas:J(e.areas),selected:[]};r.push(a);var s=e.option,l=s.brushLink,u=[],c=[],d=[],p=!1;i||(n=s.throttleType,o=s.throttleDelay);var g=b(e.areas,(function(t){var e=xv[t.brushType],i=Nt({boundingRect:e?e(t):void 0},t);return i.selectors=function(t){var e=t.brushType,i={point:function(n){return uv[e].point(n,i,t)},rect:function(n){return uv[e].rect(n,i,t)}};return i}(i),i})),f=sv(e.option,pv,(function(t){t.mappingMethod="fixed"}));function y(t){return"all"===l||!!u[t]}function m(t){return!!t.length}ct(l)&&h(l,(function(t){u[t]=1})),t.eachSeries((function(i,n){var o=d[n]=[];"parallel"===i.subType?function(t,e){var i=t.coordinateSystem;p=p||i.hasAxisBrushed(),y(e)&&i.eachActiveState(t.getData(),(function(t,e){"active"===t&&(c[e]=1)}))}(i,n):function(i,n,o){if(!i.brushSelector||function(t,e){var i=t.option.seriesIndex;return null!=i&&"all"!==i&&(ct(i)?Ke(i,e)<0:e!==i)}(e,n))return;if(h(g,(function(n){e.brushTargetManager.controlSeries(n,i,t)&&o.push(n),p=p||m(o)})),y(n)&&m(o)){var r=i.getData();r.each((function(t){vv(i,o,r,t)&&(c[t]=1)}))}}(i,n,o)})),t.eachSeries((function(t,e){var i={seriesId:t.id,seriesIndex:e,seriesName:t.name,dataIndex:[]};a.selected.push(i);var n=d[e],o=t.getData(),r=y(e)?function(t){return c[t]?(i.dataIndex.push(o.getRawIndex(t)),"inBrush"):"outOfBrush"}:function(e){return vv(t,n,o,e)?(i.dataIndex.push(o.getRawIndex(e)),"inBrush"):"outOfBrush"};(y(e)?p:m(n))&&function(t,e,i,n,o,r){var a,s={};function l(t){return wo(i,a,t)}function u(t,e){Mo(i,a,t,e)}function c(t,c){a=null==r?t:c;var d=i.getRawDataItem(a);if(!d||!1!==d.visualMap)for(var p=n.call(o,t),h=e[p],g=s[p],f=0,y=g.length;f<y;f++){var m=g[f];h[m]&&h[m].applyVisual(t,l,u)}}h(t,(function(t){var i=uc.prepareVisualTypes(e[t]);s[t]=i})),null==r?i.each(c):i.each([r],c)}(pv,f,o,r)}))})),function(t,e,i,n,o){if(!o)return;var r=t.getZr();if(r[gv])return;r.__ecBrushSelect||(r.__ecBrushSelect=mv);Qi(r,hv,i,e)(t,n)}(e,n,o,r,i)}function mv(t,e){if(!t.isDisposed()){var i=t.getZr();i[gv]=!0,t.dispatchAction({type:"brushSelect",batch:e}),i[gv]=!1}}function vv(t,e,i,n){for(var o=0,r=e.length;o<r;o++){var a=e[o];if(t.brushSelector(n,i,a.selectors,a))return!0}}var xv={rect:function(t){return _v(t.range)},polygon:function(t){for(var e,i=t.range,n=0,o=i.length;n<o;n++){e=e||[[1/0,-1/0],[1/0,-1/0]];var r=i[n];r[0]<e[0][0]&&(e[0][0]=r[0]),r[0]>e[0][1]&&(e[0][1]=r[0]),r[1]<e[1][0]&&(e[1][0]=r[1]),r[1]>e[1][1]&&(e[1][1]=r[1])}return e&&_v(e)}};function _v(t){return new g(t[0][0],t[1][0],t[0][1]-t[0][0],t[1][1]-t[1][0])}var bv=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return p(e,t),e.prototype.init=function(t,e){this.ecModel=t,this.api=e,this.model,(this._brushController=new rn(e.getZr())).on("brush",Bt(this._onBrush,this)).mount()},e.prototype.render=function(t,e,i,n){this.model=t,this._updateController(t,e,i,n)},e.prototype.updateTransform=function(t,e,i,n){fv(e),this._updateController(t,e,i,n)},e.prototype.updateVisual=function(t,e,i,n){this.updateTransform(t,e,i,n)},e.prototype.updateView=function(t,e,i,n){this._updateController(t,e,i,n)},e.prototype._updateController=function(t,e,i,n){(!n||n.$from!==t.id)&&this._brushController.setPanels(t.brushTargetManager.makePanelOpts(i)).enableBrush(t.brushOption).updateCovers(t.areas.slice())},e.prototype.dispose=function(){this._brushController.dispose()},e.prototype._onBrush=function(t){var e=this.model.id,i=this.model.brushTargetManager.setOutputRanges(t.areas,this.ecModel);(!t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:e,areas:J(i),$from:e}),t.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:e,areas:J(i),$from:e})},e.type="brush",e}($t),Sv=bv,wv=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i.areas=[],i.brushOption={},i}return p(e,t),e.prototype.optionUpdated=function(t,e){var i=this.option;!e&&lv(i,t,["inBrush","outOfBrush"]);var n=i.inBrush=i.inBrush||{};i.outOfBrush=i.outOfBrush||{color:"#ddd"},n.hasOwnProperty("liftZ")||(n.liftZ=5)},e.prototype.setAreas=function(t){Z(ct(t)),h(t,(function(t){Z(t.brushType,"Illegal areas")})),t&&(this.areas=b(t,(function(t){return Mv(this.option,t)}),this))},e.prototype.setBrushOption=function(t){this.brushOption=Mv(this.option,t),this.brushType=this.brushOption.brushType},e.type="brush",e.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],e.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(210,219,238,0.3)",borderColor:"#D2DBEE"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},e}(Yt);function Mv(t,e){return Ht({brushType:t.brushType,brushMode:t.brushMode,transformable:t.transformable,brushStyle:new Ut(t.brushStyle).getItemStyle(),removeOnClick:t.removeOnClick,z:t.z},e,!0)}var Iv=wv,Av=["rect","polygon","lineX","lineY","keep","clear"],Dv=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return p(e,t),e.prototype.render=function(t,e,i){var n,o,r;e.eachComponent({mainType:"brush"},(function(t){n=t.brushType,o=t.brushOption.brushMode||"single",r=r||!!t.areas.length})),this._brushType=n,this._brushMode=o,h(t.get("type",!0),(function(e){t.setIconStatus(e,("keep"===e?"multiple"===o:"clear"===e?r:e===n)?"emphasis":"normal")}))},e.prototype.updateView=function(t,e,i){this.render(t,e,i)},e.prototype.getIcons=function(){var t=this.model,e=t.get("icon",!0),i={};return h(t.get("type",!0),(function(t){e[t]&&(i[t]=e[t])})),i},e.prototype.onclick=function(t,e,i){var n=this._brushType,o=this._brushMode;"clear"===i?(e.dispatchAction({type:"axisAreaSelect",intervals:[]}),e.dispatchAction({type:"brush",command:"clear",areas:[]})):e.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"keep"===i?n:n!==i&&i,brushMode:"keep"===i?"multiple"===o?"single":"multiple":o}})},e.getDefaultOption=function(t){return{show:!0,type:Av.slice(),icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:t.getLocaleModel().get(["toolbox","brush","title"])}},e}(Do),Tv=Dv;var Cv=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i.layoutMode="box",i}return p(e,t),e.prototype.init=function(t,e,i){this.mergeDefaultAndTheme(t,i),this._initData()},e.prototype.mergeOption=function(e){t.prototype.mergeOption.apply(this,arguments),this._initData()},e.prototype.setCurrentIndex=function(t){null==t&&(t=this.option.currentIndex);var e=this._data.count();this.option.loop?t=(t%e+e)%e:(t>=e&&(t=e-1),t<0&&(t=0)),this.option.currentIndex=t},e.prototype.getCurrentIndex=function(){return this.option.currentIndex},e.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},e.prototype.setPlayState=function(t){this.option.autoPlay=!!t},e.prototype.getPlayState=function(){return!!this.option.autoPlay},e.prototype._initData=function(){var t,e=this.option,i=e.data||[],n=e.axisType,o=this._names=[];"category"===n?(t=[],h(i,(function(e,i){var n,r=qe(Co(e),"");dt(e)?(n=J(e)).value=i:n=i,t.push(n),o.push(r)}))):t=i;var r={category:"ordinal",time:"time",value:"number"}[n]||"number";(this._data=new Qe([{name:"value",type:r}],this)).initData(t,o)},e.prototype.getData=function(){return this._data},e.prototype.getCategories=function(){if("category"===this.get("axisType"))return this._names.slice()},e.type="timeline",e.defaultOption={z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},e}(Yt),Lv=Cv,Nv=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return p(e,t),e.type="timeline.slider",e.defaultOption=Pn(Lv.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:"#DAE1F5"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#A4B1D7"},itemStyle:{color:"#A4B1D7",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:15,color:"#316bf3",borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0, 0, 0, 0.3)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"M2,18.5A1.52,1.52,0,0,1,.92,18a1.49,1.49,0,0,1,0-2.12L7.81,9.36,1,3.11A1.5,1.5,0,1,1,3,.89l8,7.34a1.48,1.48,0,0,1,.49,1.09,1.51,1.51,0,0,1-.46,1.1L3,18.08A1.5,1.5,0,0,1,2,18.5Z",prevIcon:"M10,.5A1.52,1.52,0,0,1,11.08,1a1.49,1.49,0,0,1,0,2.12L4.19,9.64,11,15.89a1.5,1.5,0,1,1-2,2.22L1,10.77A1.48,1.48,0,0,1,.5,9.68,1.51,1.51,0,0,1,1,8.58L9,.92A1.5,1.5,0,0,1,10,.5Z",prevBtnSize:18,nextBtnSize:18,color:"#A4B1D7",borderColor:"#A4B1D7",borderWidth:1},emphasis:{label:{show:!0,color:"#6f778d"},itemStyle:{color:"#316BF3"},controlStyle:{color:"#316BF3",borderColor:"#316BF3",borderWidth:2}},progress:{lineStyle:{color:"#316BF3"},itemStyle:{color:"#316BF3"},label:{color:"#6f778d"}},data:[]}),e}(Lv);jt(Nv,Lo.prototype);var Pv=Nv,kv=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return p(e,t),e.type="timeline",e}($t),Ev=kv,Rv=function(t){function e(e,i,n,o){var r=t.call(this,e,i,n)||this;return r.type=o||"value",r}return p(e,t),e.prototype.getLabelModel=function(){return this.model.getModel("label")},e.prototype.isHorizontal=function(){return"horizontal"===this.model.get("orient")},e}(te),Vv=Rv,zv=Math.PI,Ov=ve(),Bv=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return p(e,t),e.prototype.init=function(t,e){this.api=e},e.prototype.render=function(t,e,i){if(this.model=t,this.api=i,this.ecModel=e,this.group.removeAll(),t.get("show",!0)){var n=this._layout(t,i),o=this._createGroup("_mainGroup"),r=this._createGroup("_labelGroup"),a=this._axis=this._createAxis(n,t);t.formatTooltip=function(t){var e=a.scale.getLabel({value:t});return Wt("nameValue",{noName:!0,value:e})},h(["AxisLine","AxisTick","Control","CurrentPointer"],(function(e){this["_render"+e](n,o,a,t)}),this),this._renderAxisLabel(n,r,a,t),this._position(n,t)}this._doPlayStop(),this._updateTicksStatus()},e.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},e.prototype.dispose=function(){this._clearTimer()},e.prototype._layout=function(t,e){var i,n,o,r,a=t.get(["label","position"]),s=t.get("orient"),l=function(t,e){return Oe(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()},t.get("padding"))}(t,e),u={horizontal:"center",vertical:(i=null==a||"auto"===a?"horizontal"===s?l.y+l.height/2<e.getHeight()/2?"-":"+":l.x+l.width/2<e.getWidth()/2?"+":"-":N(a)?{horizontal:{top:"-",bottom:"+"},vertical:{left:"-",right:"+"}}[s][a]:a)>=0||"+"===i?"left":"right"},c={horizontal:i>=0||"+"===i?"top":"bottom",vertical:"middle"},d={horizontal:0,vertical:zv/2},p="vertical"===s?l.height:l.width,h=t.getModel("controlStyle"),g=h.get("show",!0),f=g?h.get("itemSize"):0,y=g?h.get("itemGap"):0,m=f+y,v=t.get(["label","rotate"])||0;v=v*zv/180;var x=h.get("position",!0),_=g&&h.get("showPlayBtn",!0),b=g&&h.get("showPrevBtn",!0),S=g&&h.get("showNextBtn",!0),w=0,M=p;"left"===x||"bottom"===x?(_&&(n=[0,0],w+=m),b&&(o=[w,0],w+=m),S&&(r=[M-f,0],M-=m)):(_&&(n=[M-f,0],M-=m),b&&(o=[0,0],w+=m),S&&(r=[M-f,0],M-=m));var I=[w,M];return t.get("inverse")&&I.reverse(),{viewRect:l,mainLength:p,orient:s,rotation:d[s],labelRotation:v,labelPosOpt:i,labelAlign:t.get(["label","align"])||u[s],labelBaseline:t.get(["label","verticalAlign"])||t.get(["label","baseline"])||c[s],playPosition:n,prevBtnPosition:o,nextBtnPosition:r,axisExtent:I,controlSize:f,controlGap:y}},e.prototype._position=function(t,e){var i=this._mainGroup,n=this._labelGroup,o=t.viewRect;if("vertical"===t.orient){var r=ye(),a=o.x,s=o.y+o.height;fe(r,r,[-a,-s]),he(r,r,-zv/2),fe(r,r,[a,s]),(o=o.clone()).applyTransform(r)}var l=y(o),u=y(i.getBoundingRect()),c=y(n.getBoundingRect()),d=[i.x,i.y],p=[n.x,n.y];p[0]=d[0]=l[0][0];var h,g=t.labelPosOpt;null==g||N(g)?(m(d,u,l,1,h="+"===g?0:1),m(p,c,l,1,1-h)):(m(d,u,l,1,h=g>=0?0:1),p[1]=d[1]+g);function f(t){t.originX=l[0][0]-t.x,t.originY=l[1][0]-t.y}function y(t){return[[t.x,t.x+t.width],[t.y,t.y+t.height]]}function m(t,e,i,n,o){t[n]+=i[n][o]-e[n][o]}i.setPosition(d),n.setPosition(p),i.rotation=n.rotation=t.rotation,f(i),f(n)},e.prototype._createAxis=function(t,e){var i=e.getData(),n=e.get("axisType"),o=function(t,e){if(e=e||t.get("type"))switch(e){case"category":return new Eo({ordinalMeta:t.getCategories(),extent:[1/0,-1/0]});case"time":return new ko({locale:t.ecModel.getLocaleModel(),useUTC:t.ecModel.get("useUTC")});default:return new ie}}(e,n);o.getTicks=function(){return i.mapArray(["value"],(function(t){return{value:t}}))};var r=i.getDataExtent("value");o.setExtent(r[0],r[1]),o.calcNiceTicks();var a=new Vv("value",o,t.axisExtent,n);return a.model=e,a},e.prototype._createGroup=function(t){var e=this[t]=new mt;return this.group.add(e),e},e.prototype._renderAxisLine=function(t,e,i,n){var o=i.getExtent();if(n.get(["lineStyle","show"])){var r=new se({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:E({lineCap:"round"},n.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});e.add(r);var a=this._progressLine=new se({shape:{x1:o[0],x2:this._currentPointer?this._currentPointer.x:o[0],y1:0,y2:0},style:Nt({lineCap:"round",lineWidth:r.style.lineWidth},n.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});e.add(a)}},e.prototype._renderAxisTick=function(t,e,i,n){var o=this,r=n.getData(),a=i.scale.getTicks();this._tickSymbols=[],h(a,(function(t){var a=i.dataToCoord(t.value),s=r.getItemModel(t.value),l=s.getModel("itemStyle"),u=s.getModel(["emphasis","itemStyle"]),c=s.getModel(["progress","itemStyle"]),d={x:a,y:0,onclick:Bt(o._changeTimeline,o,t.value)},p=Gv(s,l,e,d);p.ensureState("emphasis").style=u.getItemStyle(),p.ensureState("progress").style=c.getItemStyle(),No(p);var h=xt(p);s.get("tooltip")?(h.dataIndex=t.value,h.dataModel=n):h.dataIndex=h.dataModel=null,o._tickSymbols.push(p)}))},e.prototype._renderAxisLabel=function(t,e,i,n){var o=this;if(i.getLabelModel().get("show")){var r=n.getData(),a=i.getViewLabels();this._tickLabels=[],h(a,(function(n){var a=n.tickValue,s=r.getItemModel(a),l=s.getModel("label"),u=s.getModel(["emphasis","label"]),c=s.getModel(["progress","label"]),d=i.dataToCoord(n.tickValue),p=new ni({x:d,y:0,rotation:t.labelRotation-t.rotation,onclick:Bt(o._changeTimeline,o,a),silent:!1,style:oi(l,{text:n.formattedLabel,align:t.labelAlign,verticalAlign:t.labelBaseline})});p.ensureState("emphasis").style=oi(u),p.ensureState("progress").style=oi(c),e.add(p),No(p),Ov(p).dataIndex=a,o._tickLabels.push(p)}))}},e.prototype._renderControl=function(t,e,i,n){var o=t.controlSize,r=t.rotation,a=n.getModel("controlStyle").getItemStyle(),s=n.getModel(["emphasis","controlStyle"]).getItemStyle(),l=n.getPlayState(),u=n.get("inverse",!0);function c(t,i,l,u){if(t){var c=Po(H(n.get(["controlStyle",i+"BtnSize"]),o),o),d=function(t,e,i,n){var o=n.style,r=Ro(t.get(["controlStyle",e]),n||{},new g(i[0],i[1],i[2],i[3]));o&&r.setStyle(o);return r}(n,i+"Icon",[0,-c/2,c,c],{x:t[0],y:t[1],originX:o/2,originY:0,rotation:u?-r:0,rectHover:!0,style:a,onclick:l});d.ensureState("emphasis").style=s,e.add(d),No(d)}}c(t.nextBtnPosition,"next",Bt(this._changeTimeline,this,u?"-":"+")),c(t.prevBtnPosition,"prev",Bt(this._changeTimeline,this,u?"+":"-")),c(t.playPosition,l?"stop":"play",Bt(this._handlePlayClick,this,!l),!0)},e.prototype._renderCurrentPointer=function(t,e,i,n){var o=n.getData(),r=n.getCurrentIndex(),a=o.getItemModel(r).getModel("checkpointStyle"),s=this,l={onCreate:function(t){t.draggable=!0,t.drift=Bt(s._handlePointerDrag,s),t.ondragend=Bt(s._handlePointerDragend,s),Fv(t,s._progressLine,r,i,n,!0)},onUpdate:function(t){Fv(t,s._progressLine,r,i,n)}};this._currentPointer=Gv(a,a,this._mainGroup,{},this._currentPointer,l)},e.prototype._handlePlayClick=function(t){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:t,from:this.uid})},e.prototype._handlePointerDrag=function(t,e,i){this._clearTimer(),this._pointerChangeTimeline([i.offsetX,i.offsetY])},e.prototype._handlePointerDragend=function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},e.prototype._pointerChangeTimeline=function(t,e){var i=this._toAxisCoord(t)[0],n=this._axis,o=on(n.getExtent().slice());i>o[1]&&(i=o[1]),i<o[0]&&(i=o[0]),this._currentPointer.x=i,this._currentPointer.markRedraw();var r=this._progressLine;r&&(r.shape.x2=i,r.dirty());var a=this._findNearestTick(i),s=this.model;(e||a!==s.getCurrentIndex()&&s.get("realtime"))&&this._changeTimeline(a)},e.prototype._doPlayStop=function(){var t=this;this._clearTimer(),this.model.getPlayState()&&(this._timer=setTimeout((function(){var e=t.model;t._changeTimeline(e.getCurrentIndex()+(e.get("rewind",!0)?-1:1))}),this.model.get("playInterval")))},e.prototype._toAxisCoord=function(t){var e=this._mainGroup.getLocalTransform();return en(t,e,!0)},e.prototype._findNearestTick=function(t){var e,i=this.model.getData(),n=1/0,o=this._axis;return i.each(["value"],(function(i,r){var a=o.dataToCoord(i),s=Math.abs(a-t);s<n&&(n=s,e=r)})),e},e.prototype._clearTimer=function(){this._timer&&(clearTimeout(this._timer),this._timer=null)},e.prototype._changeTimeline=function(t){var e=this.model.getCurrentIndex();"+"===t?t=e+1:"-"===t&&(t=e-1),this.api.dispatchAction({type:"timelineChange",currentIndex:t,from:this.uid})},e.prototype._updateTicksStatus=function(){var t=this.model.getCurrentIndex(),e=this._tickSymbols,i=this._tickLabels;if(e)for(var n=0;n<e.length;n++)e&&e[n]&&e[n].toggleState("progress",n<t);if(i)for(n=0;n<i.length;n++)i&&i[n]&&i[n].toggleState("progress",Ov(i[n]).dataIndex<=t)},e.type="timeline.slider",e}(Ev);function Gv(t,e,i,n,o,r){var a=e.get("color");if(o)o.setColor(a),i.add(o),r&&r.onUpdate(o);else{var s=t.get("symbol");(o=vt(s,-1,-1,2,2,a)).setStyle("strokeNoScale",!0),i.add(o),r&&r.onCreate(o)}var l=e.getItemStyle(["color"]);o.setStyle(l),n=Ht({rectHover:!0,z2:100},n,!0);var u=zt(t.get("symbolSize"));n.scaleX=u[0]/2,n.scaleY=u[1]/2;var c=Pi(t.get("symbolOffset"),u);c&&(n.x=(n.x||0)+c[0],n.y=(n.y||0)+c[1]);var d=t.get("symbolRotate");return n.rotation=(d||0)*Math.PI/180||0,o.attr(n),o.updateTransform(),o}function Fv(t,e,i,n,o,r){if(!t.dragging){var a=o.getModel("checkpointStyle"),s=n.dataToCoord(o.getData().get("value",i));if(r||!a.get("animation",!0))t.attr({x:s,y:0}),e&&e.attr({shape:{x2:s}});else{var l={duration:a.get("animationDuration",!0),easing:a.get("animationEasing",!0)};t.stopAnimation(null,!0),t.animateTo({x:s,y:0},l),e&&e.animateTo({shape:{x2:s}},l)}}}var Wv=Bv;function Hv(t){var e=t&&t.timeline;ct(e)||(e=e?[e]:[]),h(e,(function(t){t&&function(t){var e=t.type,i={number:"value",time:"time"};i[e]&&(t.axisType=i[e],delete t.type);if(Uv(t),jv(t,"controlPosition")){var n=t.controlStyle||(t.controlStyle={});jv(n,"position")||(n.position=t.controlPosition),"none"!==n.position||jv(n,"show")||(n.show=!1,delete n.position),delete t.controlPosition}h(t.data||[],(function(t){dt(t)&&!ct(t)&&(!jv(t,"value")&&jv(t,"name")&&(t.value=t.name),Uv(t))}))}(t)}))}function Uv(t){var e=t.itemStyle||(t.itemStyle={}),i=e.emphasis||(e.emphasis={}),n=t.label||t.label||{},o=n.normal||(n.normal={}),r={normal:1,emphasis:1};h(n,(function(t,e){r[e]||jv(o,e)||(o[e]=t)})),i.label&&!jv(n,"emphasis")&&(n.emphasis=i.label,delete i.label)}function jv(t,e){return t.hasOwnProperty(e)}function Xv(t,e){if(!t)return!1;for(var i=ct(t)?t:[t],n=0;n<i.length;n++)if(i[n]&&i[n][e])return!0;return!1}function Yv(t){Be(t,"label",["show"])}var Zv=ve(),qv=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i.createdBySelf=!1,i}return p(e,t),e.prototype.init=function(t,e,i){if("marker"===this.type)throw new Error("Marker component is abstract component. Use markLine, markPoint, markArea instead.");this.mergeDefaultAndTheme(t,i),this._mergeOption(t,i,!1,!0)},e.prototype.isAnimationEnabled=function(){if(Vo.node)return!1;var t=this.__hostSeries;return this.getShallow("animation")&&t&&t.isAnimationEnabled()},e.prototype.mergeOption=function(t,e){this._mergeOption(t,e,!1,!1)},e.prototype._mergeOption=function(t,e,i,n){var o=this.mainType;i||e.eachSeries((function(t){var i=t.get(this.mainType,!0),r=Zv(t)[o];i&&i.data?(r?r._mergeOption(i,e,!0):(n&&Yv(i),h(i.data,(function(t){t instanceof Array?(Yv(t[0]),Yv(t[1])):Yv(t)})),r=this.createMarkerModelFromSeries(i,this,e),E(r,{mainType:this.mainType,seriesIndex:t.seriesIndex,name:t.name,createdBySelf:!0}),r.__hostSeries=t),Zv(t)[o]=r):Zv(t)[o]=null}),this)},e.prototype.formatTooltip=function(t,e,i){var n=this.getData(),o=this.getRawValue(t),r=n.getName(t);return Wt("section",{header:this.name,blocks:[Wt("nameValue",{name:r,value:o,noName:!r,noValue:null==o})]})},e.prototype.getData=function(){return this._data},e.prototype.setData=function(t){this._data=t},e.getMarkerModelFromSeries=function(t,e){return Zv(t)[e]},e.type="marker",e.dependencies=["series","grid","polar","geo"],e}(Yt);jt(qv,Lo.prototype);var Jv=qv,Qv=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return p(e,t),e.prototype.createMarkerModelFromSeries=function(t,i,n){return new e(t,i,n)},e.type="markPoint",e.defaultOption={z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}},e}(Jv),Kv=Qv;function $v(t){return!(isNaN(parseFloat(t.x))&&isNaN(parseFloat(t.y)))}function tx(t,e,i,n,o,r){var a=[],s=ro(e,n)?e.getCalculationInfo("stackResultDimension"):n,l=ax(e,s,t),u=e.indicesOfNearest(s,l)[0];a[o]=e.get(i,u),a[r]=e.get(s,u);var c=e.get(n,u),d=zo(e.get(n,u));return(d=Math.min(d,20))>=0&&(a[r]=+a[r].toFixed(d)),[a,c]}var ex={min:Ce(tx,"min"),max:Ce(tx,"max"),average:Ce(tx,"average"),median:Ce(tx,"median")};function ix(t,e){if(e){var i=t.getData(),n=t.coordinateSystem,o=n&&n.dimensions;if(!function(t){return!isNaN(parseFloat(t.x))&&!isNaN(parseFloat(t.y))}(e)&&!ct(e.coord)&&ct(o)){var r=nx(e,i,n,t);if((e=J(e)).type&&ex[e.type]&&r.baseAxis&&r.valueAxis){var a=Ke(o,r.baseAxis.dim),s=Ke(o,r.valueAxis.dim),l=ex[e.type](i,r.baseDataDim,r.valueDataDim,a,s);e.coord=l[0],e.value=l[1]}else e.coord=[null!=e.xAxis?e.xAxis:e.radiusAxis,null!=e.yAxis?e.yAxis:e.angleAxis]}if(null!=e.coord&&ct(o))for(var u=e.coord,c=0;c<2;c++)ex[u[c]]&&(u[c]=ax(i,i.mapDimension(o[c]),u[c]));else e.coord=[];return e}}function nx(t,e,i,n){var o={};return null!=t.valueIndex||null!=t.valueDim?(o.valueDataDim=null!=t.valueIndex?e.getDimension(t.valueIndex):t.valueDim,o.valueAxis=i.getAxis(function(t,e){var i=t.getData().getDimensionInfo(e);return i&&i.coordDim}(n,o.valueDataDim)),o.baseAxis=i.getOtherAxis(o.valueAxis),o.baseDataDim=e.mapDimension(o.baseAxis.dim)):(o.baseAxis=n.getBaseAxis(),o.valueAxis=i.getOtherAxis(o.baseAxis),o.baseDataDim=e.mapDimension(o.baseAxis.dim),o.valueDataDim=e.mapDimension(o.valueAxis.dim)),o}function ox(t,e){return!(t&&t.containData&&e.coord&&!$v(e))||t.containData(e.coord)}function rx(t,e){return t?function(t,i,n,o){var r=o<2?t.coord&&t.coord[o]:t.value;return Oo(r,e[o])}:function(t,i,n,o){return Oo(t.value,e[o])}}function ax(t,e,i){if("average"===i){var n=0,o=0;return t.each(e,(function(t,e){isNaN(t)||(n+=t,o++)})),n/o}return"median"===i?t.getMedian(e):t.getDataExtent(e)["max"===i?1:0]}var sx=ve(),lx=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return p(e,t),e.prototype.init=function(){this.markerGroupMap=me()},e.prototype.render=function(t,e,i){var n=this,o=this.markerGroupMap;o.each((function(t){sx(t).keep=!1})),e.eachSeries((function(t){var o=Jv.getMarkerModelFromSeries(t,n.type);o&&n.renderSeries(t,o,e,i)})),o.each((function(t){!sx(t).keep&&n.group.remove(t.group)}))},e.prototype.markKeep=function(t){sx(t).keep=!0},e.prototype.toggleBlurSeries=function(t,e){var i=this;h(t,(function(t){var n=Jv.getMarkerModelFromSeries(t,i.type);n&&n.getData().eachItemGraphicEl((function(t){t&&(e?Bo(t):Go(t))}))}))},e.type="marker",e}($t),ux=lx;function cx(t,e,i){var n=e.coordinateSystem;t.each((function(o){var r,a=t.getItemModel(o),s=ee(a.get("x"),i.getWidth()),l=ee(a.get("y"),i.getHeight());if(isNaN(s)||isNaN(l)){if(e.getMarkerPosition)r=e.getMarkerPosition(t.getValues(t.dimensions,o));else if(n){var u=t.get(n.dimensions[0],o),c=t.get(n.dimensions[1],o);r=n.dataToPoint([u,c])}}else r=[s,l];isNaN(s)||(r[0]=s),isNaN(l)||(r[1]=l),t.setItemLayout(o,r)}))}var dx=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return p(e,t),e.prototype.updateTransform=function(t,e,i){e.eachSeries((function(t){var e=Jv.getMarkerModelFromSeries(t,"markPoint");e&&(cx(e.getData(),t,i),this.markerGroupMap.get(t.id).updateLayout())}),this)},e.prototype.renderSeries=function(t,e,i,n){var o=t.coordinateSystem,r=t.id,a=t.getData(),s=this.markerGroupMap,l=s.get(r)||s.set(r,new bt),u=function(t,e,i){var n;n=t?b(t&&t.dimensions,(function(t){var i=e.getData().getDimensionInfo(e.getData().mapDimension(t))||{};return E(E({},i),{name:t,ordinalMeta:null})})):[{name:"value",type:"float"}];var o=new Qe(n,i),r=b(i.get("data"),Ce(ix,e));t&&(r=S(r,Ce(ox,t)));var a=rx(!!t,n);return o.initData(r,null,a),o}(o,t,e);e.setData(u),cx(e.getData(),t,n),u.each((function(t){var i=u.getItemModel(t),n=i.getShallow("symbol"),o=i.getShallow("symbolSize"),r=i.getShallow("symbolRotate"),s=i.getShallow("symbolOffset"),l=i.getShallow("symbolKeepAspect");if(Q(n)||Q(o)||Q(r)||Q(s)){var c=e.getRawValue(t),d=e.getDataParams(t);Q(n)&&(n=n(c,d)),Q(o)&&(o=o(c,d)),Q(r)&&(r=r(c,d)),Q(s)&&(s=s(c,d))}var p=i.getModel("itemStyle").getItemStyle(),h=Fo(a,"color");p.fill||(p.fill=h),u.setItemVisual(t,{symbol:n,symbolSize:o,symbolRotate:r,symbolOffset:s,symbolKeepAspect:l,style:p})})),l.updateData(u),this.group.add(l.group),u.eachItemGraphicEl((function(t){t.traverse((function(t){xt(t).dataModel=e}))})),this.markKeep(l),l.group.silent=e.get("silent")||t.get("silent")},e.type="markPoint",e}(ux);var px=dx;var hx=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return p(e,t),e.prototype.createMarkerModelFromSeries=function(t,i,n){return new e(t,i,n)},e.type="markLine",e.defaultOption={z:5,symbol:["circle","arrow"],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"},e}(Jv),gx=hx,fx=ve(),yx=function(t,e,i,n){var o,r=t.getData();if(ct(n))o=n;else{var a=n.type;if("min"===a||"max"===a||"average"===a||"median"===a||null!=n.xAxis||null!=n.yAxis){var s=void 0,l=void 0;if(null!=n.yAxis||null!=n.xAxis)s=e.getAxis(null!=n.yAxis?"y":"x"),l=ze(n.yAxis,n.xAxis);else{var u=nx(n,r,e,t);s=u.valueAxis,l=ax(r,Wo(r,u.valueDataDim),a)}var c="x"===s.dim?0:1,d=1-c,p=J(n),h={coord:[]};p.type=null,p.coord=[],p.coord[d]=-1/0,h.coord[d]=1/0;var g=i.get("precision");g>=0&&O(l)&&(l=+l.toFixed(Math.min(g,20))),p.coord[c]=h.coord[c]=l,o=[p,h,{type:a,valueIndex:n.valueIndex,value:l}]}else U("Invalid markLine data."),o=[]}var f=[ix(t,o[0]),ix(t,o[1]),E({},o[2])];return f[2].type=f[2].type||null,Ht(f[2],f[0]),Ht(f[2],f[1]),f};function mx(t){return!isNaN(t)&&!isFinite(t)}function vx(t,e,i,n){var o=1-t,r=n.dimensions[t];return mx(e[o])&&mx(i[o])&&e[t]===i[t]&&n.getAxis(r).containData(e[t])}function xx(t,e){if("cartesian2d"===t.type){var i=e[0].coord,n=e[1].coord;if(i&&n&&(vx(1,i,n,t)||vx(0,i,n,t)))return!0}return ox(t,e[0])&&ox(t,e[1])}function _x(t,e,i,n,o){var r,a=n.coordinateSystem,s=t.getItemModel(e),l=ee(s.get("x"),o.getWidth()),u=ee(s.get("y"),o.getHeight());if(isNaN(l)||isNaN(u)){if(n.getMarkerPosition)r=n.getMarkerPosition(t.getValues(t.dimensions,e));else{var c=a.dimensions,d=t.get(c[0],e),p=t.get(c[1],e);r=a.dataToPoint([d,p])}if(Cn(a,"cartesian2d")){var h=a.getAxis("x"),g=a.getAxis("y");c=a.dimensions;mx(t.get(c[0],e))?r[0]=h.toGlobalCoord(h.getExtent()[i?0:1]):mx(t.get(c[1],e))&&(r[1]=g.toGlobalCoord(g.getExtent()[i?0:1]))}isNaN(l)||(r[0]=l),isNaN(u)||(r[1]=u)}else r=[l,u];t.setItemLayout(e,r)}var bx=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return p(e,t),e.prototype.updateTransform=function(t,e,i){e.eachSeries((function(t){var e=Jv.getMarkerModelFromSeries(t,"markLine");if(e){var n=e.getData(),o=fx(e).from,r=fx(e).to;o.each((function(e){_x(o,e,!0,t,i),_x(r,e,!1,t,i)})),n.each((function(t){n.setItemLayout(t,[o.getItemLayout(t),r.getItemLayout(t)])})),this.markerGroupMap.get(t.id).updateLayout()}}),this)},e.prototype.renderSeries=function(t,e,i,n){var o=t.coordinateSystem,r=t.id,a=t.getData(),s=this.markerGroupMap,l=s.get(r)||s.set(r,new yd);this.group.add(l.group);var u=function(t,e,i){var n;n=t?b(t&&t.dimensions,(function(t){var i=e.getData().getDimensionInfo(e.getData().mapDimension(t))||{};return E(E({},i),{name:t,ordinalMeta:null})})):[{name:"value",type:"float"}];var o=new Qe(n,i),r=new Qe(n,i),a=new Qe([],i),s=b(i.get("data"),Ce(yx,e,t,i));t&&(s=S(s,Ce(xx,t)));var l=rx(!!t,n);return o.initData(b(s,(function(t){return t[0]})),null,l),r.initData(b(s,(function(t){return t[1]})),null,l),a.initData(b(s,(function(t){return t[2]}))),a.hasItemOption=!0,{from:o,to:r,line:a}}(o,t,e),c=u.from,d=u.to,p=u.line;fx(e).from=c,fx(e).to=d,e.setData(p);var h=e.get("symbol"),g=e.get("symbolSize"),f=e.get("symbolRotate"),y=e.get("symbolOffset");function m(e,i,o){var r=e.getItemModel(i);_x(e,i,o,t,n);var s=r.getModel("itemStyle").getItemStyle();null==s.fill&&(s.fill=Fo(a,"color")),e.setItemVisual(i,{symbolKeepAspect:r.get("symbolKeepAspect"),symbolOffset:H(r.get("symbolOffset",!0),y[o?0:1]),symbolRotate:H(r.get("symbolRotate",!0),f[o?0:1]),symbolSize:H(r.get("symbolSize"),g[o?0:1]),symbol:H(r.get("symbol",!0),h[o?0:1]),style:s})}ct(h)||(h=[h,h]),ct(g)||(g=[g,g]),ct(f)||(f=[f,f]),ct(y)||(y=[y,y]),u.from.each((function(t){m(c,t,!0),m(d,t,!1)})),p.each((function(t){var e=p.getItemModel(t).getModel("lineStyle").getLineStyle();p.setItemLayout(t,[c.getItemLayout(t),d.getItemLayout(t)]),null==e.stroke&&(e.stroke=c.getItemVisual(t,"style").fill),p.setItemVisual(t,{fromSymbolKeepAspect:c.getItemVisual(t,"symbolKeepAspect"),fromSymbolOffset:c.getItemVisual(t,"symbolOffset"),fromSymbolRotate:c.getItemVisual(t,"symbolRotate"),fromSymbolSize:c.getItemVisual(t,"symbolSize"),fromSymbol:c.getItemVisual(t,"symbol"),toSymbolKeepAspect:d.getItemVisual(t,"symbolKeepAspect"),toSymbolOffset:d.getItemVisual(t,"symbolOffset"),toSymbolRotate:d.getItemVisual(t,"symbolRotate"),toSymbolSize:d.getItemVisual(t,"symbolSize"),toSymbol:d.getItemVisual(t,"symbol"),style:e})})),l.updateData(p),u.line.eachItemGraphicEl((function(t){xt(t).dataModel=e,t.traverse((function(t){xt(t).dataModel=e}))})),this.markKeep(l),l.group.silent=e.get("silent")||t.get("silent")},e.type="markLine",e}(ux);var Sx=bx;var wx=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return p(e,t),e.prototype.createMarkerModelFromSeries=function(t,i,n){return new e(t,i,n)},e.type="markArea",e.defaultOption={z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},e}(Jv),Mx=wx,Ix=ve(),Ax=function(t,e,i,n){var o=n[0],r=n[1];if(o&&r){var a=ix(t,o),s=ix(t,r),l=a.coord,u=s.coord;l[0]=ze(l[0],-1/0),l[1]=ze(l[1],-1/0),u[0]=ze(u[0],1/0),u[1]=ze(u[1],1/0);var c=Ve([{},a,s]);return c.coord=[a.coord,s.coord],c.x0=a.x,c.y0=a.y,c.x1=s.x,c.y1=s.y,c}};function Dx(t){return!isNaN(t)&&!isFinite(t)}function Tx(t,e,i,n){var o=1-t;return Dx(e[o])&&Dx(i[o])}function Cx(t,e){var i=e.coord[0],n=e.coord[1],o={coord:i,x:e.x0,y:e.y0},r={coord:n,x:e.x1,y:e.y1};return Cn(t,"cartesian2d")?!(!i||!n||!Tx(1,i,n)&&!Tx(0,i,n))||function(t,e,i){return!(t&&t.containZone&&e.coord&&i.coord&&!$v(e)&&!$v(i))||t.containZone(e.coord,i.coord)}(t,o,r):ox(t,o)||ox(t,r)}function Lx(t,e,i,n,o){var r,a=n.coordinateSystem,s=t.getItemModel(e),l=ee(s.get(i[0]),o.getWidth()),u=ee(s.get(i[1]),o.getHeight());if(isNaN(l)||isNaN(u)){if(n.getMarkerPosition){var c=t.getValues(["x0","y0"],e),d=t.getValues(["x1","y1"],e),p=a.clampData(c),h=a.clampData(d),g=[];"x0"===i[0]?g[0]=p[0]>h[0]?d[0]:c[0]:g[0]=p[0]>h[0]?c[0]:d[0],"y0"===i[1]?g[1]=p[1]>h[1]?d[1]:c[1]:g[1]=p[1]>h[1]?c[1]:d[1],r=n.getMarkerPosition(g,i,!0)}else{var f=[v=t.get(i[0],e),x=t.get(i[1],e)];a.clampData&&a.clampData(f,f),r=a.dataToPoint(f,!0)}if(Cn(a,"cartesian2d")){var y=a.getAxis("x"),m=a.getAxis("y"),v=t.get(i[0],e),x=t.get(i[1],e);Dx(v)?r[0]=y.toGlobalCoord(y.getExtent()["x0"===i[0]?0:1]):Dx(x)&&(r[1]=m.toGlobalCoord(m.getExtent()["y0"===i[1]?0:1]))}isNaN(l)||(r[0]=l),isNaN(u)||(r[1]=u)}else r=[l,u];return r}var Nx=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],Px=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return p(e,t),e.prototype.updateTransform=function(t,e,i){e.eachSeries((function(t){var e=Jv.getMarkerModelFromSeries(t,"markArea");if(e){var n=e.getData();n.each((function(e){var o=b(Nx,(function(o){return Lx(n,e,o,t,i)}));n.setItemLayout(e,o),n.getItemGraphicEl(e).setShape("points",o)}))}}),this)},e.prototype.renderSeries=function(t,e,i,n){var o=t.coordinateSystem,r=t.id,a=t.getData(),s=this.markerGroupMap,l=s.get(r)||s.set(r,{group:new mt});this.group.add(l.group),this.markKeep(l);var u=function(t,e,i){var n,o,r=["x0","y0","x1","y1"];if(t){var a=b(t&&t.dimensions,(function(t){var i=e.getData(),n=i.getDimensionInfo(i.mapDimension(t))||{};return E(E({},n),{name:t,ordinalMeta:null})}));o=b(r,(function(t,e){return{name:t,type:a[e%2].type}})),n=new Qe(o,i)}else n=new Qe(o=[{name:"value",type:"float"}],i);var s=b(i.get("data"),Ce(Ax,e,t,i));t&&(s=S(s,Ce(Cx,t)));var l=t?function(t,e,i,n){var r=t.coord[Math.floor(n/2)][n%2];return Oo(r,o[n])}:function(t,e,i,n){return Oo(t.value,o[n])};return n.initData(s,null,l),n.hasItemOption=!0,n}(o,t,e);e.setData(u),u.each((function(e){var i=b(Nx,(function(i){return Lx(u,e,i,t,n)})),r=o.getAxis("x").scale,s=o.getAxis("y").scale,l=r.getExtent(),c=s.getExtent(),d=[r.parse(u.get("x0",e)),r.parse(u.get("x1",e))],p=[s.parse(u.get("y0",e)),s.parse(u.get("y1",e))];on(d),on(p);var h=!!(l[0]>d[1]||l[1]<d[0]||c[0]>p[1]||c[1]<p[0]);u.setItemLayout(e,{points:i,allClipped:h});var g=u.getItemModel(e).getModel("itemStyle").getItemStyle(),f=Fo(a,"color");g.fill||(g.fill=f,N(g.fill)&&(g.fill=mi(g.fill,.4))),g.stroke||(g.stroke=f),u.setItemVisual(e,"style",g)})),u.diff(Ix(l).data).add((function(t){var e=u.getItemLayout(t);if(!e.allClipped){var i=new At({shape:{points:e.points}});u.setItemGraphicEl(t,i),l.group.add(i)}})).update((function(t,i){var n=Ix(l).data.getItemGraphicEl(i),o=u.getItemLayout(t);o.allClipped?n&&l.group.remove(n):(n?Lt(n,{shape:{points:o.points}},e,t):n=new At({shape:{points:o.points}}),u.setItemGraphicEl(t,n),l.group.add(n))})).remove((function(t){var e=Ix(l).data.getItemGraphicEl(t);l.group.remove(e)})).execute(),u.eachItemGraphicEl((function(t,i){var n=u.getItemModel(i),o=u.getItemVisual(i,"style");t.useStyle(u.getItemVisual(i,"style")),kt(t,Et(n),{labelFetcher:e,labelDataIndex:i,defaultText:u.getName(i)||"",inheritColor:N(o.fill)?mi(o.fill,1):"#000"}),Pt(t,n),Rt(t,null,null,n.get(["emphasis","disabled"])),xt(t).dataModel=e})),Ix(l).data=u,l.group.silent=e.get("silent")||t.get("silent")},e.type="markArea",e}(ux);var kx=Px;var Ex={get:function(t,e,i){var n=J((Rx[t]||{})[e]);return i&&ct(n)?n[n.length-1]:n}},Rx={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}},Vx=Ex,zx=uc.mapVisual,Ox=uc.eachVisual,Bx=ct,Gx=h,Fx=on,Wx=gi,Hx=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i.stateList=["inRange","outOfRange"],i.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],i.layoutMode={type:"box",ignoreSize:!0},i.dataBound=[-1/0,1/0],i.targetVisuals={},i.controllerVisuals={},i}return p(e,t),e.prototype.init=function(t,e,i){this.mergeDefaultAndTheme(t,i)},e.prototype.optionUpdated=function(t,e){var i=this.option;!e&&lv(i,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},e.prototype.resetVisual=function(t){var e=this.stateList;t=Bt(t,this),this.controllerVisuals=sv(this.option.controller,e,t),this.targetVisuals=sv(this.option.target,e,t)},e.prototype.getItemSymbol=function(){return null},e.prototype.getTargetSeriesIndices=function(){var t=this.option.seriesIndex,e=[];return null==t||"all"===t?this.ecModel.eachSeries((function(t,i){e.push(i)})):e=ti(t),e},e.prototype.eachTargetSeries=function(t,e){h(this.getTargetSeriesIndices(),(function(i){var n=this.ecModel.getSeriesByIndex(i);n&&t.call(e,n)}),this)},e.prototype.isTargetSeries=function(t){var e=!1;return this.eachTargetSeries((function(i){i===t&&(e=!0)})),e},e.prototype.formatValueText=function(t,e,i){var n,o=this.option,r=o.precision,a=this.dataBound,s=o.formatter;i=i||["<",">"],ct(t)&&(t=t.slice(),n=!0);var l=e?t:n?[u(t[0]),u(t[1])]:u(t);return N(s)?s.replace("{value}",n?l[0]:l).replace("{value2}",n?l[1]:l):Q(s)?n?s(t[0],t[1]):s(t):n?t[0]===a[0]?i[0]+" "+l[1]:t[1]===a[1]?i[1]+" "+l[0]:l[0]+" - "+l[1]:l;function u(t){return t===a[0]?"min":t===a[1]?"max":(+t).toFixed(Math.min(r,20))}},e.prototype.resetExtent=function(){var t=this.option,e=Fx([t.min,t.max]);this._dataExtent=e},e.prototype.getDataDimensionIndex=function(t){var e=this.option.dimension;if(null!=e)return t.getDimensionIndex(e);for(var i=t.dimensions,n=i.length-1;n>=0;n--){var o=i[n],r=t.getDimensionInfo(o);if(!r.isCalculationCoord)return r.storeDimIndex}},e.prototype.getExtent=function(){return this._dataExtent.slice()},e.prototype.completeVisualOption=function(){var t=this.ecModel,e=this.option,i={inRange:e.inRange,outOfRange:e.outOfRange},n=e.target||(e.target={}),o=e.controller||(e.controller={});Ht(n,i),Ht(o,i);var r=this.isCategory();function a(i){Bx(e.color)&&!i.inRange&&(i.inRange={color:e.color.slice().reverse()}),i.inRange=i.inRange||{color:t.get("gradientColor")}}a.call(this,n),a.call(this,o),function(t,e,i){var n=t[e],o=t[i];n&&!o&&(o=t[i]={},Gx(n,(function(t,e){if(uc.isValidType(e)){var i=Vx.get(e,"inactive",r);null!=i&&(o[e]=i,"color"!==e||o.hasOwnProperty("opacity")||o.hasOwnProperty("colorAlpha")||(o.opacity=[0,0]))}})))}.call(this,n,"inRange","outOfRange"),function(t){var e=(t.inRange||{}).symbol||(t.outOfRange||{}).symbol,i=(t.inRange||{}).symbolSize||(t.outOfRange||{}).symbolSize,n=this.get("inactiveColor"),o=this.getItemSymbol()||"roundRect";Gx(this.stateList,(function(a){var s=this.itemSize,l=t[a];l||(l=t[a]={color:r?n:[n]}),null==l.symbol&&(l.symbol=e&&J(e)||(r?o:[o])),null==l.symbolSize&&(l.symbolSize=i&&J(i)||(r?s[0]:[s[0],s[0]])),l.symbol=zx(l.symbol,(function(t){return"none"===t?o:t}));var u=l.symbolSize;if(null!=u){var c=-1/0;Ox(u,(function(t){t>c&&(c=t)})),l.symbolSize=zx(u,(function(t){return Wx(t,[0,c],[0,s[0]],!0)}))}}),this)}.call(this,o)},e.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},e.prototype.isCategory=function(){return!!this.option.categories},e.prototype.setSelected=function(t){},e.prototype.getSelected=function(){return null},e.prototype.getValueState=function(t){return null},e.prototype.getVisualMeta=function(t){return null},e.type="visualMap",e.dependencies=["series"],e.defaultOption={show:!0,z:4,seriesIndex:"all",min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,textStyle:{color:"#333"}},e}(Yt),Ux=Hx,jx=[20,140],Xx=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return p(e,t),e.prototype.optionUpdated=function(e,i){t.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual((function(t){t.mappingMethod="linear",t.dataExtent=this.getExtent()})),this._resetRange()},e.prototype.resetItemSize=function(){t.prototype.resetItemSize.apply(this,arguments);var e=this.itemSize;(null==e[0]||isNaN(e[0]))&&(e[0]=jx[0]),(null==e[1]||isNaN(e[1]))&&(e[1]=jx[1])},e.prototype._resetRange=function(){var t=this.getExtent(),e=this.option.range;!e||e.auto?(t.auto=1,this.option.range=t):ct(e)&&(e[0]>e[1]&&e.reverse(),e[0]=Math.max(e[0],t[0]),e[1]=Math.min(e[1],t[1]))},e.prototype.completeVisualOption=function(){t.prototype.completeVisualOption.apply(this,arguments),h(this.stateList,(function(t){var e=this.option.controller[t].symbolSize;e&&e[0]!==e[1]&&(e[0]=e[1]/3)}),this)},e.prototype.setSelected=function(t){this.option.range=t.slice(),this._resetRange()},e.prototype.getSelected=function(){var t=this.getExtent(),e=on((this.get("range")||[]).slice());return e[0]>t[1]&&(e[0]=t[1]),e[1]>t[1]&&(e[1]=t[1]),e[0]<t[0]&&(e[0]=t[0]),e[1]<t[0]&&(e[1]=t[0]),e},e.prototype.getValueState=function(t){var e=this.option.range,i=this.getExtent();return(e[0]<=i[0]||e[0]<=t)&&(e[1]>=i[1]||t<=e[1])?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var e=[];return this.eachTargetSeries((function(i){var n=[],o=i.getData();o.each(this.getDataDimensionIndex(o),(function(e,i){t[0]<=e&&e<=t[1]&&n.push(i)}),this),e.push({seriesId:i.id,dataIndex:n})}),this),e},e.prototype.getVisualMeta=function(t){var e=Yx(this,"outOfRange",this.getExtent()),i=Yx(this,"inRange",this.option.range.slice()),n=[];function o(e,i){n.push({value:e,color:t(e,i)})}for(var r=0,a=0,s=i.length,l=e.length;a<l&&(!i.length||e[a]<=i[0]);a++)e[a]<i[r]&&o(e[a],"outOfRange");for(var u=1;r<s;r++,u=0)u&&n.length&&o(i[r],"outOfRange"),o(i[r],"inRange");for(u=1;a<l;a++)(!i.length||i[i.length-1]<e[a])&&(u&&(n.length&&o(n[n.length-1].value,"outOfRange"),u=0),o(e[a],"outOfRange"));var c=n.length;return{stops:n,outerColors:[c?n[0].color:"transparent",c?n[c-1].color:"transparent"]}},e.type="visualMap.continuous",e.defaultOption=Pn(Ux.defaultOption,{align:"auto",calculable:!1,hoverLink:!0,realtime:!0,handleIcon:"path://M-11.39,9.77h0a3.5,3.5,0,0,1-3.5,3.5h-22a3.5,3.5,0,0,1-3.5-3.5h0a3.5,3.5,0,0,1,3.5-3.5h22A3.5,3.5,0,0,1-11.39,9.77Z",handleSize:"120%",handleStyle:{borderColor:"#fff",borderWidth:1},indicatorIcon:"circle",indicatorSize:"50%",indicatorStyle:{borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}}),e}(Ux);function Yx(t,e,i){if(i[0]===i[1])return i.slice();for(var n=(i[1]-i[0])/200,o=i[0],r=[],a=0;a<=200&&o<i[1];a++)r.push(o),o+=n;return r.push(i[1]),r}var Zx=Xx,qx=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i.autoPositionValues={left:1,right:1,top:1,bottom:1},i}return p(e,t),e.prototype.init=function(t,e){this.ecModel=t,this.api=e},e.prototype.render=function(t,e,i,n){this.visualMapModel=t,!1!==t.get("show")?this.doRender(t,e,i,n):this.group.removeAll()},e.prototype.renderBackground=function(t){var e=this.visualMapModel,i=Ho(e.get("padding")||0),n=t.getBoundingRect();t.add(new re({z2:-1,silent:!0,shape:{x:n.x-i[3],y:n.y-i[0],width:n.width+i[3]+i[1],height:n.height+i[0]+i[2]},style:{fill:e.get("backgroundColor"),stroke:e.get("borderColor"),lineWidth:e.get("borderWidth")}}))},e.prototype.getControllerVisual=function(t,e,i){var n=(i=i||{}).forceState,o=this.visualMapModel,r={};if("color"===e){var a=o.get("contentColor");r.color=a}function s(t){return r[t]}function l(t,e){r[t]=e}var u=o.controllerVisuals[n||o.getValueState(t)],c=uc.prepareVisualTypes(u);return h(c,(function(n){var o=u[n];i.convertOpacityToAlpha&&"opacity"===n&&(n="colorAlpha",o=u.__alphaForOpacity),uc.dependsOn(n,e)&&o&&o.applyVisual(t,s,l)})),r[e]},e.prototype.positionGroup=function(t){var e=this.visualMapModel,i=this.api;ei(t,e.getBoxLayoutParams(),{width:i.getWidth(),height:i.getHeight()})},e.prototype.doRender=function(t,e,i,n){},e.type="visualMap",e}($t),Jx=qx,Qx=[["left","right","width"],["top","bottom","height"]];function Kx(t,e,i){var n=t.option,o=n.align;if(null!=o&&"auto"!==o)return o;for(var r={width:e.getWidth(),height:e.getHeight()},a="horizontal"===n.orient?1:0,s=Qx[a],l=[0,null,10],u={},c=0;c<3;c++)u[Qx[1-a][c]]=l[c],u[s[c]]=2===c?i[0]:n[s[c]];var d=[["x","width",3],["y","height",0]][a],p=Oe(u,r,n.padding);return s[(p.margin[d[2]]||0)+p[d[0]]+.5*p[d[1]]<.5*r[d[1]]?0:1]}function $x(t,e){return h(t||[],(function(t){null!=t.dataIndex&&(t.dataIndexInside=t.dataIndex,t.dataIndex=null),t.highlightKey="visualMap"+(e?e.componentIndex:"")})),t}var t_=gi,e_=h,i_=Math.min,n_=Math.max,o_=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i._shapes={},i._dataInterval=[],i._handleEnds=[],i._hoverLinkDataIndices=[],i}return p(e,t),e.prototype.doRender=function(t,e,i,n){this._api=i,n&&"selectDataRange"===n.type&&n.from===this.uid||this._buildView()},e.prototype._buildView=function(){this.group.removeAll();var t=this.visualMapModel,e=this.group;this._orient=t.get("orient"),this._useHandle=t.get("calculable"),this._resetInterval(),this._renderBar(e);var i=t.get("text");this._renderEndsText(e,i,0),this._renderEndsText(e,i,1),this._updateView(!0),this.renderBackground(e),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(e)},e.prototype._renderEndsText=function(t,e,i){if(e){var n=e[1-i];n=null!=n?n+"":"";var o=this.visualMapModel,r=o.get("textGap"),a=o.itemSize,s=this._shapes.mainGroup,l=this._applyTransform([a[0]/2,0===i?-r:a[1]+r],s),u=this._applyTransform(0===i?"bottom":"top",s),c=this._orient,d=this.visualMapModel.textStyleModel;this.group.add(new ni({style:oi(d,{x:l[0],y:l[1],verticalAlign:"horizontal"===c?"middle":u,align:"horizontal"===c?u:"center",text:n})}))}},e.prototype._renderBar=function(t){var e=this.visualMapModel,i=this._shapes,n=e.itemSize,o=this._orient,r=this._useHandle,a=Kx(e,this.api,n),s=i.mainGroup=this._createBarGroup(a),l=new mt;s.add(l),l.add(i.outOfRange=r_()),l.add(i.inRange=r_(null,r?s_(this._orient):null,Bt(this._dragHandle,this,"all",!1),Bt(this._dragHandle,this,"all",!0))),l.setClipPath(new re({shape:{x:0,y:0,width:n[0],height:n[1],r:3}}));var u=e.textStyleModel.getTextRect("国"),c=n_(u.width,u.height);r&&(i.handleThumbs=[],i.handleLabels=[],i.handleLabelPoints=[],this._createHandle(e,s,0,n,c,o),this._createHandle(e,s,1,n,c,o)),this._createIndicator(e,s,n,c,o),t.add(s)},e.prototype._createHandle=function(t,e,i,n,o,r){var a=Bt(this._dragHandle,this,i,!1),s=Bt(this._dragHandle,this,i,!0),l=Po(t.get("handleSize"),n[0]),u=vt(t.get("handleIcon"),-l/2,-l/2,l,l,null,!0),c=s_(this._orient);u.attr({cursor:c,draggable:!0,drift:a,ondragend:s,onmousemove:function(t){Uo(t.event)}}),u.x=n[0]/2,u.useStyle(t.getModel("handleStyle").getItemStyle()),u.setStyle({strokeNoScale:!0,strokeFirst:!0}),u.style.lineWidth*=2,u.ensureState("emphasis").style=t.getModel(["emphasis","handleStyle"]).getItemStyle(),ui(u,!0),e.add(u);var d=this.visualMapModel.textStyleModel,p=new ni({cursor:c,draggable:!0,drift:a,onmousemove:function(t){Uo(t.event)},ondragend:s,style:oi(d,{x:0,y:0,text:""})});p.ensureState("blur").style={opacity:.1},p.stateTransition={duration:200},this.group.add(p);var h=[l,0],g=this._shapes;g.handleThumbs[i]=u,g.handleLabelPoints[i]=h,g.handleLabels[i]=p},e.prototype._createIndicator=function(t,e,i,n,o){var r=Po(t.get("indicatorSize"),i[0]),a=vt(t.get("indicatorIcon"),-r/2,-r/2,r,r,null,!0);a.attr({cursor:"move",invisible:!0,silent:!0,x:i[0]/2});var s=t.getModel("indicatorStyle").getItemStyle();if(a instanceof M){var l=a.style;a.useStyle(E({image:l.image,x:l.x,y:l.y,width:l.width,height:l.height},s))}else a.useStyle(s);e.add(a);var u=this.visualMapModel.textStyleModel,c=new ni({silent:!0,invisible:!0,style:oi(u,{x:0,y:0,text:""})});this.group.add(c);var d=[("horizontal"===o?n/2:6)+i[0]/2,0],p=this._shapes;p.indicator=a,p.indicatorLabel=c,p.indicatorLabelPoint=d,this._firstShowIndicator=!0},e.prototype._dragHandle=function(t,e,i,n){if(this._useHandle){if(this._dragging=!e,!e){var o=this._applyTransform([i,n],this._shapes.mainGroup,!0);this._updateInterval(t,o[1]),this._hideIndicator(),this._updateView()}e===!this.visualMapModel.get("realtime")&&this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),e?!this._hovering&&this._clearHoverLinkToSeries():a_(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[t],!1)}},e.prototype._resetInterval=function(){var t=this.visualMapModel,e=this._dataInterval=t.getSelected(),i=t.getExtent(),n=[0,t.itemSize[1]];this._handleEnds=[t_(e[0],i,n,!0),t_(e[1],i,n,!0)]},e.prototype._updateInterval=function(t,e){e=e||0;var i=this.visualMapModel,n=this._handleEnds,o=[0,i.itemSize[1]];nn(e,n,o,t,0);var r=i.getExtent();this._dataInterval=[t_(n[0],o,r,!0),t_(n[1],o,r,!0)]},e.prototype._updateView=function(t){var e=this.visualMapModel,i=e.getExtent(),n=this._shapes,o=[0,e.itemSize[1]],r=t?o:this._handleEnds,a=this._createBarVisual(this._dataInterval,i,r,"inRange"),s=this._createBarVisual(i,i,o,"outOfRange");n.inRange.setStyle({fill:a.barColor}).setShape("points",a.barPoints),n.outOfRange.setStyle({fill:s.barColor}).setShape("points",s.barPoints),this._updateHandle(r,a)},e.prototype._createBarVisual=function(t,e,i,n){var o={forceState:n,convertOpacityToAlpha:!0},r=this._makeColorGradient(t,o),a=[this.getControllerVisual(t[0],"symbolSize",o),this.getControllerVisual(t[1],"symbolSize",o)],s=this._createBarPoints(i,a);return{barColor:new ce(0,0,0,1,r),barPoints:s,handlesColor:[r[0].color,r[r.length-1].color]}},e.prototype._makeColorGradient=function(t,e){var i=[],n=(t[1]-t[0])/100;i.push({color:this.getControllerVisual(t[0],"color",e),offset:0});for(var o=1;o<100;o++){var r=t[0]+n*o;if(r>t[1])break;i.push({color:this.getControllerVisual(r,"color",e),offset:o/100})}return i.push({color:this.getControllerVisual(t[1],"color",e),offset:1}),i},e.prototype._createBarPoints=function(t,e){var i=this.visualMapModel.itemSize;return[[i[0]-e[0],t[0]],[i[0],t[0]],[i[0],t[1]],[i[0]-e[1],t[1]]]},e.prototype._createBarGroup=function(t){var e=this._orient,i=this.visualMapModel.get("inverse");return new mt("horizontal"!==e||i?"horizontal"===e&&i?{scaleX:"bottom"===t?-1:1,rotation:-Math.PI/2}:"vertical"!==e||i?{scaleX:"left"===t?1:-1}:{scaleX:"left"===t?1:-1,scaleY:-1}:{scaleX:"bottom"===t?1:-1,rotation:Math.PI/2})},e.prototype._updateHandle=function(t,e){if(this._useHandle){var i=this._shapes,n=this.visualMapModel,o=i.handleThumbs,r=i.handleLabels,a=n.itemSize,s=n.getExtent();e_([0,1],(function(l){var u=o[l];u.setStyle("fill",e.handlesColor[l]),u.y=t[l];var c=t_(t[l],[0,a[1]],s,!0),d=this.getControllerVisual(c,"symbolSize");u.scaleX=u.scaleY=d/a[0],u.x=a[0]-d/2;var p=en(i.handleLabelPoints[l],jo(u,this.group));r[l].setStyle({x:p[0],y:p[1],text:n.formatValueText(this._dataInterval[l]),verticalAlign:"middle",align:"vertical"===this._orient?this._applyTransform("left",i.mainGroup):"center"})}),this)}},e.prototype._showIndicator=function(t,e,i,n){var o=this.visualMapModel,r=o.getExtent(),a=o.itemSize,s=[0,a[1]],l=this._shapes,u=l.indicator;if(u){u.attr("invisible",!1);var c=this.getControllerVisual(t,"color",{convertOpacityToAlpha:!0}),d=this.getControllerVisual(t,"symbolSize"),p=t_(t,r,s,!0),h=a[0]-d/2,g={x:u.x,y:u.y};u.y=p,u.x=h;var f=en(l.indicatorLabelPoint,jo(u,this.group)),y=l.indicatorLabel;y.attr("invisible",!1);var m=this._applyTransform("left",l.mainGroup),v="horizontal"===this._orient;y.setStyle({text:(i||"")+o.formatValueText(e),verticalAlign:v?m:"middle",align:v?"center":m});var x={x:h,y:p,style:{fill:c}},_={style:{x:f[0],y:f[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var b={duration:100,easing:"cubicInOut",additive:!0};u.x=g.x,u.y=g.y,u.animateTo(x,b),y.animateTo(_,b)}else u.attr(x),y.attr(_);this._firstShowIndicator=!1;var S=this._shapes.handleLabels;if(S)for(var w=0;w<S.length;w++)this._api.enterBlur(S[w])}},e.prototype._enableHoverLinkToSeries=function(){var t=this;this._shapes.mainGroup.on("mousemove",(function(e){if(t._hovering=!0,!t._dragging){var i=t.visualMapModel.itemSize,n=t._applyTransform([e.offsetX,e.offsetY],t._shapes.mainGroup,!0,!0);n[1]=i_(n_(0,n[1]),i[1]),t._doHoverLinkToSeries(n[1],0<=n[0]&&n[0]<=i[0])}})).on("mouseout",(function(){t._hovering=!1,!t._dragging&&t._clearHoverLinkToSeries()}))},e.prototype._enableHoverLinkFromSeries=function(){var t=this.api.getZr();this.visualMapModel.option.hoverLink?(t.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),t.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},e.prototype._doHoverLinkToSeries=function(t,e){var i=this.visualMapModel,n=i.itemSize;if(i.option.hoverLink){var o=[0,n[1]],r=i.getExtent();t=i_(n_(o[0],t),o[1]);var a=function(t,e,i){var n=6,o=t.get("hoverLinkDataSize");o&&(n=t_(o,e,i,!0)/2);return n}(i,r,o),s=[t-a,t+a],l=t_(t,o,r,!0),u=[t_(s[0],o,r,!0),t_(s[1],o,r,!0)];s[0]<o[0]&&(u[0]=-1/0),s[1]>o[1]&&(u[1]=1/0),e&&(u[0]===-1/0?this._showIndicator(l,u[1],"< ",a):u[1]===1/0?this._showIndicator(l,u[0],"> ",a):this._showIndicator(l,l,"≈ ",a));var c=this._hoverLinkDataIndices,d=[];(e||a_(i))&&(d=this._hoverLinkDataIndices=i.findTargetDataIndices(u));var p=Xo(c,d);this._dispatchHighDown("downplay",$x(p[0],i)),this._dispatchHighDown("highlight",$x(p[1],i))}},e.prototype._hoverLinkFromSeriesMouseOver=function(t){var e;if(Fe(t.target,(function(t){var i=xt(t);if(null!=i.dataIndex)return e=i,!0}),!0),e){var i=this.ecModel.getSeriesByIndex(e.seriesIndex),n=this.visualMapModel;if(n.isTargetSeries(i)){var o=i.getData(e.dataType),r=o.getStore().get(n.getDataDimensionIndex(o),e.dataIndex);isNaN(r)||this._showIndicator(r,r)}}},e.prototype._hideIndicator=function(){var t=this._shapes;t.indicator&&t.indicator.attr("invisible",!0),t.indicatorLabel&&t.indicatorLabel.attr("invisible",!0);var e=this._shapes.handleLabels;if(e)for(var i=0;i<e.length;i++)this._api.leaveBlur(e[i])},e.prototype._clearHoverLinkToSeries=function(){this._hideIndicator();var t=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",$x(t,this.visualMapModel)),t.length=0},e.prototype._clearHoverLinkFromSeries=function(){this._hideIndicator();var t=this.api.getZr();t.off("mouseover",this._hoverLinkFromSeriesMouseOver),t.off("mouseout",this._hideIndicator)},e.prototype._applyTransform=function(t,e,i,n){var o=jo(e,n?null:this.group);return ct(t)?en(t,o,i):Yo(t,o,i)},e.prototype._dispatchHighDown=function(t,e){e&&e.length&&this.api.dispatchAction({type:t,batch:e})},e.prototype.dispose=function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},e.prototype.remove=function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},e.type="visualMap.continuous",e}(Jx);function r_(t,e,i,n){return new At({shape:{points:t},draggable:!!i,cursor:e,drift:i,onmousemove:function(t){Uo(t.event)},ondragend:n})}function a_(t){var e=t.get("hoverLinkOnHandle");return!!(null==e?t.get("realtime"):e)}function s_(t){return"vertical"===t?"ns-resize":"ew-resize"}var l_=o_,u_={type:"selectDataRange",event:"dataRangeSelected",update:"update"},c_=function(t,e){e.eachComponent({mainType:"visualMap",query:t},(function(e){e.setSelected(t.selected)}))},d_=[{createOnAllSeries:!0,reset:function(t,e){var i=[];return e.eachComponent("visualMap",(function(e){var n,o,r,a,s,l=t.pipelineContext;!e.isTargetSeries(t)||l&&l.large||i.push((n=e.stateList,o=e.targetVisuals,r=Bt(e.getValueState,e),a=e.getDataDimensionIndex(t.getData()),s={},h(n,(function(t){var e=uc.prepareVisualTypes(o[t]);s[t]=e})),{progress:function(t,e){var i,n;function l(t){return wo(e,n,t)}function u(t,i){Mo(e,n,t,i)}null!=a&&(i=e.getDimensionIndex(a));for(var c=e.getStore();null!=(n=t.next());){var d=e.getRawDataItem(n);if(!d||!1!==d.visualMap)for(var p=null!=a?c.get(i,n):n,h=r(p),g=o[h],f=s[h],y=0,m=f.length;y<m;y++){var v=f[y];g[v]&&g[v].applyVisual(p,l,u)}}}}))})),i}},{createOnAllSeries:!0,reset:function(t,e){var i=t.getData(),n=[];e.eachComponent("visualMap",(function(e){if(e.isTargetSeries(t)){var o=e.getVisualMeta(Bt(p_,null,t,e))||{stops:[],outerColors:[]},r=e.getDataDimensionIndex(i);r>=0&&(o.dimension=r,n.push(o))}})),t.getData().setVisual("visualMeta",n)}}];function p_(t,e,i,n){for(var o=e.targetVisuals[n],r=uc.prepareVisualTypes(o),a={color:Fo(t.getData(),"color")},s=0,l=r.length;s<l;s++){var u=r[s],c=o["opacity"===u?"__alphaForOpacity":u];c&&c.applyVisual(i,d,p)}return a.color;function d(t){return a[t]}function p(t,e){a[t]=e}}var h_=h;function g_(t){var e=t&&t.visualMap;ct(e)||(e=e?[e]:[]),h_(e,(function(t){if(t){f_(t,"splitList")&&!f_(t,"pieces")&&(t.pieces=t.splitList,delete t.splitList);var e=t.pieces;e&&ct(e)&&h_(e,(function(t){dt(t)&&(f_(t,"start")&&!f_(t,"min")&&(t.min=t.start),f_(t,"end")&&!f_(t,"max")&&(t.max=t.end))}))}}))}function f_(t,e){return t&&t.hasOwnProperty&&t.hasOwnProperty(e)}var y_=!1;function m_(t){y_||(y_=!0,t.registerSubTypeDefaulter("visualMap",(function(t){return t.categories||(t.pieces?t.pieces.length>0:t.splitNumber>0)&&!t.calculable?"piecewise":"continuous"})),t.registerAction(u_,c_),h(d_,(function(e){t.registerVisual(t.PRIORITY.VISUAL.COMPONENT,e)})),t.registerPreprocessor(g_))}function v_(t){t.registerComponentModel(Zx),t.registerComponentView(l_),m_(t)}var x_=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i._pieceList=[],i}return p(e,t),e.prototype.optionUpdated=function(e,i){t.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var n=this._mode=this._determineMode();this._pieceList=[],__[this._mode].call(this,this._pieceList),this._resetSelected(e,i);var o=this.option.categories;this.resetVisual((function(t,e){"categories"===n?(t.mappingMethod="category",t.categories=J(o)):(t.dataExtent=this.getExtent(),t.mappingMethod="piecewise",t.pieceList=b(this._pieceList,(function(t){return t=J(t),"inRange"!==e&&(t.visual=null),t})))}))},e.prototype.completeVisualOption=function(){var e=this.option,i={},n=uc.listVisualTypes(),o=this.isCategory();function r(t,e,i){return t&&t[e]&&t[e].hasOwnProperty(i)}h(e.pieces,(function(t){h(n,(function(e){t.hasOwnProperty(e)&&(i[e]=1)}))})),h(i,(function(t,i){var n=!1;h(this.stateList,(function(t){n=n||r(e,t,i)||r(e.target,t,i)}),this),!n&&h(this.stateList,(function(t){(e[t]||(e[t]={}))[i]=Vx.get(i,"inRange"===t?"active":"inactive",o)}))}),this),t.prototype.completeVisualOption.apply(this,arguments)},e.prototype._resetSelected=function(t,e){var i=this.option,n=this._pieceList,o=(e?i:t).selected||{};if(i.selected=o,h(n,(function(t,e){var i=this.getSelectedMapKey(t);o.hasOwnProperty(i)||(o[i]=!0)}),this),"single"===i.selectedMode){var r=!1;h(n,(function(t,e){var i=this.getSelectedMapKey(t);o[i]&&(r?o[i]=!1:r=!0)}),this)}},e.prototype.getItemSymbol=function(){return this.get("itemSymbol")},e.prototype.getSelectedMapKey=function(t){return"categories"===this._mode?t.value+"":t.index+""},e.prototype.getPieceList=function(){return this._pieceList},e.prototype._determineMode=function(){var t=this.option;return t.pieces&&t.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},e.prototype.setSelected=function(t){this.option.selected=J(t)},e.prototype.getValueState=function(t){var e=uc.findPieceIndex(t,this._pieceList);return null!=e&&this.option.selected[this.getSelectedMapKey(this._pieceList[e])]?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var e=[],i=this._pieceList;return this.eachTargetSeries((function(n){var o=[],r=n.getData();r.each(this.getDataDimensionIndex(r),(function(e,n){uc.findPieceIndex(e,i)===t&&o.push(n)}),this),e.push({seriesId:n.id,dataIndex:o})}),this),e},e.prototype.getRepresentValue=function(t){var e;if(this.isCategory())e=t.value;else if(null!=t.value)e=t.value;else{var i=t.interval||[];e=i[0]===-1/0&&i[1]===1/0?0:(i[0]+i[1])/2}return e},e.prototype.getVisualMeta=function(t){if(!this.isCategory()){var e=[],i=["",""],n=this,o=this._pieceList.slice();if(o.length){var r=o[0].interval[0];r!==-1/0&&o.unshift({interval:[-1/0,r]}),(r=o[o.length-1].interval[1])!==1/0&&o.push({interval:[r,1/0]})}else o.push({interval:[-1/0,1/0]});var a=-1/0;return h(o,(function(t){var e=t.interval;e&&(e[0]>a&&s([a,e[0]],"outOfRange"),s(e.slice()),a=e[1])}),this),{stops:e,outerColors:i}}function s(o,r){var a=n.getRepresentValue({interval:o});r||(r=n.getValueState(a));var s=t(a,r);o[0]===-1/0?i[0]=s:o[1]===1/0?i[1]=s:e.push({value:o[0],color:s},{value:o[1],color:s})}},e.type="visualMap.piecewise",e.defaultOption=Pn(Ux.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),e}(Ux),__={splitNumber:function(t){var e=this.option,i=Math.min(e.precision,20),n=this.getExtent(),o=e.splitNumber;o=Math.max(parseInt(o,10),1),e.splitNumber=o;for(var r=(n[1]-n[0])/o;+r.toFixed(i)!==r&&i<5;)i++;e.precision=i,r=+r.toFixed(i),e.minOpen&&t.push({interval:[-1/0,n[0]],close:[0,0]});for(var a=0,s=n[0];a<o;s+=r,a++){var l=a===o-1?n[1]:s+r;t.push({interval:[s,l],close:[1,1]})}e.maxOpen&&t.push({interval:[n[1],1/0],close:[0,0]}),Zo(t),h(t,(function(t,e){t.index=e,t.text=this.formatValueText(t.interval)}),this)},categories:function(t){var e=this.option;h(e.categories,(function(e){t.push({text:this.formatValueText(e,!0),value:e})}),this),b_(e,t)},pieces:function(t){var e=this.option;h(e.pieces,(function(e,i){dt(e)||(e={value:e});var n={text:"",index:i};if(null!=e.label&&(n.text=e.label),e.hasOwnProperty("value")){var o=n.value=e.value;n.interval=[o,o],n.close=[1,1]}else{for(var r=n.interval=[],a=n.close=[0,0],s=[1,0,1],l=[-1/0,1/0],u=[],c=0;c<2;c++){for(var d=[["gte","gt","min"],["lte","lt","max"]][c],p=0;p<3&&null==r[c];p++)r[c]=e[d[p]],a[c]=s[p],u[c]=2===p;null==r[c]&&(r[c]=l[c])}u[0]&&r[1]===1/0&&(a[0]=0),u[1]&&r[0]===-1/0&&(a[1]=0),r[0]>r[1]&&console.warn("Piece "+i+"is illegal: "+r+" lower bound should not greater then uppper bound."),r[0]===r[1]&&a[0]&&a[1]&&(n.value=r[0])}n.visual=uc.retrieveVisuals(e),t.push(n)}),this),b_(e,t),Zo(t),h(t,(function(t){var e=t.close,i=[["<","≤"][e[1]],[">","≥"][e[0]]];t.text=t.text||this.formatValueText(null!=t.value?t.value:t.interval,!1,i)}),this)}};function b_(t,e){var i=t.inverse;("vertical"===t.orient?!i:i)&&e.reverse()}var S_=x_,w_=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return p(e,t),e.prototype.doRender=function(){var t=this.group;t.removeAll();var e=this.visualMapModel,i=e.get("textGap"),n=e.textStyleModel,o=n.getFont(),r=n.getTextColor(),a=this._getItemAlign(),s=e.itemSize,l=this._getViewData(),u=l.endsText,c=ze(e.get("showLabel",!0),!u);u&&this._renderEndsText(t,u[0],s,c,a),h(l.viewPieceList,(function(n){var l=n.piece,u=new mt;u.onclick=Bt(this._onItemClick,this,l),this._enableHoverLink(u,n.indexInModelPieceList);var d=e.getRepresentValue(l);if(this._createItemSymbol(u,d,[0,0,s[0],s[1]]),c){var p=this.visualMapModel.getValueState(d);u.add(new ni({style:{x:"right"===a?-i:s[0]+i,y:s[1]/2,text:l.text,verticalAlign:"middle",align:a,font:o,fill:r,opacity:"outOfRange"===p?.5:1}}))}t.add(u)}),this),u&&this._renderEndsText(t,u[1],s,c,a),qo(e.get("orient"),t,e.get("itemGap")),this.renderBackground(t),this.positionGroup(t)},e.prototype._enableHoverLink=function(t,e){var i=this;t.on("mouseover",(function(){return n("highlight")})).on("mouseout",(function(){return n("downplay")}));var n=function(t){var n=i.visualMapModel;n.option.hoverLink&&i.api.dispatchAction({type:t,batch:$x(n.findTargetDataIndices(e),n)})}},e.prototype._getItemAlign=function(){var t=this.visualMapModel,e=t.option;if("vertical"===e.orient)return Kx(t,this.api,t.itemSize);var i=e.align;return i&&"auto"!==i||(i="left"),i},e.prototype._renderEndsText=function(t,e,i,n,o){if(e){var r=new mt,a=this.visualMapModel.textStyleModel;r.add(new ni({style:oi(a,{x:n?"right"===o?i[0]:0:i[0]/2,y:i[1]/2,verticalAlign:"middle",align:n?o:"center",text:e})})),t.add(r)}},e.prototype._getViewData=function(){var t=this.visualMapModel,e=b(t.getPieceList(),(function(t,e){return{piece:t,indexInModelPieceList:e}})),i=t.get("text"),n=t.get("orient"),o=t.get("inverse");return("horizontal"===n?o:!o)?e.reverse():i&&(i=i.slice().reverse()),{viewPieceList:e,endsText:i}},e.prototype._createItemSymbol=function(t,e,i){t.add(vt(this.getControllerVisual(e,"symbol"),i[0],i[1],i[2],i[3],this.getControllerVisual(e,"color")))},e.prototype._onItemClick=function(t){var e=this.visualMapModel,i=e.option,n=i.selectedMode;if(n){var o=J(i.selected),r=e.getSelectedMapKey(t);"single"===n||!0===n?(o[r]=!0,h(o,(function(t,e){o[e]=e===r}))):o[r]=!o[r],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:o})}},e.type="visualMap.piecewise",e}(Jx),M_=w_;function I_(t){t.registerComponentModel(S_),t.registerComponentView(M_),m_(t)}var A_={label:{enabled:!0},decal:{show:!1}},D_=ve(),T_={};function C_(t,e){var i=t.getModel("aria");if(i.get("enabled")){var n=J(A_);Ht(n.label,t.getLocaleModel().get("aria"),!1),Ht(i.option,n,!1),function(){if(i.getModel("decal").get("show")){var e=me();t.eachSeries((function(t){if(!t.isColorBySeries()){var i=e.get(t.type);i||(i={},e.set(t.type,i)),D_(t).scope=i}})),t.eachRawSeries((function(e){if(!t.isSeriesFiltered(e))if(Q(e.enableAriaDecal))e.enableAriaDecal();else{var i=e.getData();if(e.isColorBySeries()){var n=$e(e.ecModel,e.name,T_,t.getSeriesCount()),o=i.getVisual("decal");i.setVisual("decal",u(o,n))}else{var r=e.getRawData(),a={},s=D_(e).scope;i.each((function(t){var e=i.getRawIndex(t);a[e]=t}));var l=r.count();r.each((function(t){var n=a[t],o=r.getName(t)||t+"",c=$e(e.ecModel,o,s,l),d=i.getItemVisual(n,"decal");i.setItemVisual(n,"decal",u(d,c))}))}}function u(t,e){var i=t?E(E({},e),t):e;return i.dirty=!0,i}}))}}(),function(){var n=t.getLocaleModel().get("aria"),r=i.getModel("label");if(r.option=Nt(r.option,n),!r.get("enabled"))return;var a=e.getZr().dom;if(r.get("description"))return void a.setAttribute("aria-label",r.get("description"));var s,l=t.getSeriesCount(),u=r.get(["data","maxCount"])||10,c=r.get(["series","maxCount"])||10,d=Math.min(l,c);if(l<1)return;var p=function(){var e=t.get("title");e&&e.length&&(e=e[0]);return e&&e.text}();if(p){var h=r.get(["general","withTitle"]);s=o(h,{title:p})}else s=r.get(["general","withoutTitle"]);var g=[],f=l>1?r.get(["series","multiple","prefix"]):r.get(["series","single","prefix"]);s+=o(f,{seriesCount:l}),t.eachSeries((function(e,i){if(i<d){var n=void 0,a=e.get("name")?"withName":"withoutName";n=o(n=l>1?r.get(["series","multiple",a]):r.get(["series","single",a]),{seriesId:e.seriesIndex,seriesName:e.get("name"),seriesType:(x=e.subType,t.getLocaleModel().get(["series","typeNames"])[x]||"自定义图")});var s=e.getData();if(s.count()>u)n+=o(r.get(["data","partialData"]),{displayCnt:u});else n+=r.get(["data","allData"]);for(var c=r.get(["data","separator","middle"]),p=r.get(["data","separator","end"]),h=[],f=0;f<s.count();f++)if(f<u){var y=s.getName(f),m=s.getValues(f),v=r.get(["data",y?"withName":"withoutName"]);h.push(o(v,{name:y,value:m.join(c)}))}n+=h.join(c)+p,g.push(n)}var x}));var y=r.getModel(["series","multiple","separator"]),m=y.get("middle"),v=y.get("end");s+=g.join(m)+v,a.setAttribute("aria-label",s)}()}function o(t,e){if(!N(t))return t;var i=t;return h(e,(function(t,e){i=i.replace(new RegExp("\\{\\s*"+e+"\\s*\\}","g"),t)})),i}}function L_(t){if(t&&t.aria){var e=t.aria;null!=e.show&&(e.enabled=e.show),e.label=e.label||{},h(["description","general","series","data"],(function(t){null!=e[t]&&(e.label[t]=e[t])}))}}wt([Jo]),wt([function(t){t.registerPainter("svg",Oa)}]),wt([Qo,Ko,$o,function(t){wt(Mt),t.registerSeriesModel(Ga),t.registerChartView(Xa),t.registerLayout(_t("scatter"))},function(t){wt(hs),t.registerChartView(Ka),t.registerSeriesModel(ts),t.registerLayout(Ya),t.registerProcessor(oe("radar")),t.registerPreprocessor(Ja)},function(t){wt(Bl),t.registerChartView(fl),t.registerSeriesModel(ml),t.registerLayout(xl),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,vl),We("map",t.registerAction)},function(t){t.registerChartView(ou),t.registerSeriesModel(Su),t.registerLayout(Mu),t.registerVisual(Iu),function(t){t.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},(function(t,e){e.eachComponent({mainType:"series",subType:"tree",query:t},(function(e){var i=t.dataIndex,n=e.getData().tree.getNodeByDataIndex(i);n.isExpand=!n.isExpand}))})),t.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},(function(t,e,i){e.eachComponent({mainType:"series",subType:"tree",query:t},(function(e){var n=Rl(e.coordinateSystem,t,void 0,i);e.setCenter&&e.setCenter(n.center),e.setZoom&&e.setZoom(n.zoom)}))}))}(t)},function(t){t.registerSeriesModel(Lu),t.registerChartView(Yu),t.registerVisual(dc),t.registerLayout(Mc),function(t){for(var e=0;e<Au.length;e++)t.registerAction({type:Au[e],update:"updateView"},gt);t.registerAction({type:"treemapRootToNode",update:"updateView"},(function(t,e){e.eachComponent({mainType:"series",subType:"treemap",query:t},(function(e,i){var n=mu(t,["treemapZoomToNode","treemapRootToNode"],e);if(n){var o=e.getViewRoot();o&&(t.direction=xu(o,n.node)?"rollUp":"drillDown"),e.resetViewRoot(n.node)}}))}))}(t)},function(t){t.registerChartView(Dd),t.registerSeriesModel(Vd),t.registerProcessor(Lc),t.registerVisual(Nc),t.registerVisual(kc),t.registerLayout(Hc),t.registerLayout(t.PRIORITY.VISUAL.POST_CHART_LAYOUT,Qc),t.registerLayout($c),t.registerCoordinateSystem("graphView",{dimensions:wl.dimensions,create:td}),t.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},gt),t.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},gt),t.registerAction(zd,(function(t,e,i){e.eachComponent({mainType:"series",query:t},(function(e){var n=Rl(e.coordinateSystem,t,void 0,i);e.setCenter&&e.setCenter(n.center),e.setZoom&&e.setZoom(n.zoom)}))}))},function(t){t.registerChartView(Hd),t.registerSeriesModel(jd)},function(t){t.registerChartView(qd),t.registerSeriesModel(Qd),t.registerLayout(Kd),t.registerProcessor(oe("funnel"))},function(t){wt(Bp),t.registerChartView(op),t.registerSeriesModel(sp),t.registerVisual(t.PRIORITY.VISUAL.BRUSH,up)},function(t){t.registerChartView(Up),t.registerSeriesModel(Xp),t.registerLayout(Yp),t.registerVisual(rh),t.registerAction({type:"dragNode",event:"dragnode",update:"update"},(function(t,e){e.eachComponent({mainType:"series",subType:"sankey",query:t},(function(e){e.setNodePosition(t.dataIndex,[t.localX,t.localY])}))}))},function(t){t.registerSeriesModel(lh),t.registerChartView(fh),t.registerLayout(mh),t.registerTransform(vh)},function(t){t.registerChartView(Nh),t.registerSeriesModel(kh),t.registerPreprocessor(Eh),t.registerVisual(Gh),t.registerLayout(Hh)},function(t){t.registerChartView(Zh),t.registerSeriesModel(Jh),t.registerLayout(_t("effectScatter"))},function(t){t.registerChartView(ug),t.registerSeriesModel(gg),t.registerLayout(sg),t.registerVisual(yg)},function(t){t.registerChartView(bg),t.registerSeriesModel(wg)},function(t){t.registerChartView(jg),t.registerSeriesModel(Yg),t.registerLayout(t.PRIORITY.VISUAL.LAYOUT,Ce(Rn,"pictorialBar")),t.registerLayout(t.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,En("pictorialBar"))},function(t){t.registerChartView(qg),t.registerSeriesModel(Qg),t.registerLayout(Kg),t.registerProcessor(oe("themeRiver"))},function(t){t.registerChartView(af),t.registerSeriesModel(uf),t.registerLayout(Ce(df,"sunburst")),t.registerProcessor(Ce(oe,"sunburst")),t.registerVisual(hf),function(t){t.registerAction({type:nf,update:"updateView"},(function(t,e){e.eachComponent({mainType:"series",subType:"sunburst",query:t},(function(e,i){var n=mu(t,[nf],e);if(n){var o=e.getViewRoot();o&&(t.direction=xu(o,n.node)?"rollUp":"drillDown"),e.resetViewRoot(n.node)}}))})),t.registerAction({type:of,update:"none"},(function(t,e,i){t=E({},t),e.eachComponent({mainType:"series",subType:"sunburst",query:t},(function(e){var i=mu(t,[of],e);i&&(t.dataIndex=i.node.dataIndex)})),Gn("sunburstHighlight","highlight"),i.dispatchAction(E(t,{type:"highlight"}))})),t.registerAction({type:"sunburstUnhighlight",update:"updateView"},(function(t,e,i){t=E({},t),Gn("sunburstUnhighlight","downplay"),i.dispatchAction(E(t,{type:"downplay"}))}))}(t)},function(t){t.registerChartView(py),t.registerSeriesModel(vf)}]),wt(tr),wt((function(t){wt(ao),oo.registerAxisPointerClass("PolarAxisPointer",Py),t.registerCoordinateSystem("polar",Jy),t.registerComponentModel(Ey),t.registerComponentView(gm),cn(t,"angle",Vy,pm),cn(t,"radius",zy,hm),t.registerComponentView(nm),t.registerComponentView(lm),t.registerLayout(Ce(dm,"bar"))})),wt(Bl),wt((function(t){wt(ao),oo.registerAxisPointerClass("SingleAxisPointer",Rm),t.registerComponentView(Vm),t.registerComponentView(_m),t.registerComponentModel(Sm),cn(t,"single",Sm,Sm.defaultOption),t.registerCoordinateSystem("single",Tm)})),wt(Bp),wt((function(t){t.registerComponentModel(Bm),t.registerComponentView(Fm),t.registerCoordinateSystem("calendar",Um)})),wt((function(t){t.registerComponentModel(qm),t.registerComponentView(Km),t.registerPreprocessor((function(t){var e=t.graphic;ct(e)?e[0]&&e[0].elements?t.graphic=[t.graphic[0]]:t.graphic=[{elements:e}]:e&&!e.elements&&(t.graphic=[{elements:[e]}])}))})),wt(er),wt(ir),wt(ao),wt((function(t){t.registerComponentView(Sv),t.registerComponentModel(Iv),t.registerPreprocessor(ov),t.registerVisual(t.PRIORITY.VISUAL.BRUSH,yv),t.registerAction({type:"brush",event:"brush",update:"updateVisual"},(function(t,e){e.eachComponent({mainType:"brush",query:t},(function(e){e.setAreas(t.areas)}))})),t.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},gt),t.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},gt),To("brush",Tv)})),wt(nr),wt((function(t){t.registerComponentModel(Pv),t.registerComponentView(Wv),t.registerSubTypeDefaulter("timeline",(function(){return"slider"})),function(t){t.registerAction({type:"timelineChange",event:"timelineChanged",update:"prepareAndUpdate"},(function(t,e,i){var n=e.getComponent("timeline");return n&&null!=t.currentIndex&&(n.setCurrentIndex(t.currentIndex),!n.get("loop",!0)&&n.isIndexMax()&&n.getPlayState()&&(n.setPlayState(!1),i.dispatchAction({type:"timelinePlayChange",playState:!1,from:t.from}))),e.resetOption("timeline",{replaceMerge:n.get("replaceMerge",!0)}),Nt({currentIndex:n.option.currentIndex},t)})),t.registerAction({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},(function(t,e){var i=e.getComponent("timeline");i&&null!=t.playState&&i.setPlayState(t.playState)}))}(t),t.registerPreprocessor(Hv)})),wt((function(t){t.registerComponentModel(Kv),t.registerComponentView(px),t.registerPreprocessor((function(t){Xv(t.series,"markPoint")&&(t.markPoint=t.markPoint||{})}))})),wt((function(t){t.registerComponentModel(gx),t.registerComponentView(Sx),t.registerPreprocessor((function(t){Xv(t.series,"markLine")&&(t.markLine=t.markLine||{})}))})),wt((function(t){t.registerComponentModel(Mx),t.registerComponentView(kx),t.registerPreprocessor((function(t){Xv(t.series,"markArea")&&(t.markArea=t.markArea||{})}))})),wt(or),wt(rr),wt(ar),wt(sr),wt((function(t){wt(v_),wt(I_)})),wt(v_),wt(I_),wt((function(t){t.registerPreprocessor(L_),t.registerVisual(t.PRIORITY.VISUAL.ARIA,C_)})),wt(lr),wt(ur),wt(cr),wt(dr);const N_={type:"line",symbol:"circle",symbolSize:6,triggerLineEvent:!0};t("default",e({name:"subject-echarts",setup(){const t=o({index:-1,sum:{practiceRate:0,passNum:0,noPassNum:0,noMemberNum:0},practiceThisWeeks:[],colors:[{color:"#FF8057",borderColor:"rgba(255,128,87,0.5)",text:"达标率",select:!0,key:"practiceRate"},{color:"#2FC58D",borderColor:"rgba(47,197,141,0.5)",text:"达标",select:!0,key:"passNum"},{color:"#4A99FF",borderColor:"rgba(74,153,255,0.5)",text:"未达标",select:!0,key:"noPassNum"},{color:"#9884BA",borderColor:"rgba(152,132,186,0.5)",text:"未统计",select:!0,key:"noMemberNum"}]}),e=r((()=>t.practiceThisWeeks.map((t=>t.subjectName))));let d;const p=i=>{const{content:n}=i;if(!n)return;d&&d.dispose(),t.sum=n.sum||{},t.practiceThisWeeks=n.practiceThisWeeks||[];const o=document.getElementById("subjectEcharts");d=pr(o);const r={tooltip:{trigger:"axis",showContent:!1,axisPointer:{type:"line",lineStyle:{width:30,type:"solid",opacity:.2}}},grid:{left:8,top:5,right:5,bottom:5,containLabel:!0},legend:{type:"plain",align:"auto",itemGap:10,itemWidth:6,itemStyle:{opacity:0},lineStyle:{width:0,opacity:0},textStyle:{opacity:0}},xAxis:{type:"category",axisLine:{show:!1},axisLabel:{interval:0,color:"#333",fontSize:9},axisTick:{alignWithLabel:!0,show:!1},data:e.value},yAxis:[{type:"value",position:"left",axisLine:{show:!1,lineStyle:{color:"#999"}},splitLine:{show:!0,lineStyle:{color:["rgba(249, 234, 220, 1)"]}},min:0,splitNumber:5},{type:"value",position:"right",splitLine:{show:!0,lineStyle:{color:["rgba(249, 234, 220, 1)"]}},axisLine:{show:!1,lineStyle:{color:"#999"}},interval:20,min:0,max:100,splitNumber:5,axisLabel:{formatter:function(t,e){return t+"%"}}}],series:["practiceRate","passNum","noPassNum","noMemberNum"].map(((e,i)=>({name:t.colors[i].text,color:t.colors[i].color,...N_,yAxisIndex:0===i?1:0,data:t.practiceThisWeeks.map((t=>t[e]))})))};let a=Math.max(...r.series.map((t=>t.data)).flat());Math.min(...r.series.map((t=>t.data)).flat()),a=10*Math.ceil(a/9.5),r.yAxis[0].interval=Math.ceil(Math.ceil(a)/5),r.yAxis[0].max=5*Math.ceil(Math.ceil(a)/5),r&&d.setOption(r),d.on("highlight",(function(e){t.index=e.batch[0].dataIndex}))};a((()=>{s("setAccomanyEcharts",p),l({api:"setAccomanyEcharts"})})),u((()=>{c("setAccomanyEcharts",p)}));return()=>i("div",{class:hr.subjectEcharts},[i("div",{class:[hr.container,hr.ensemble]},[i("div",{class:hr.head},[i("div",{class:hr.headLeft},[i("img",{class:hr.icon,src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAAAXNSR0IArs4c6QAABOJJREFUWEfNmGtsFFUUx39nW4oUeQQUEGoJiRCwIZDoB4KJCQoBUZGoLYgoooipSAAhoAhxo2IkPApCBJRADcYoqNFEES2NfvMREkUoigSQUpRHQGlDW0q7x9zO7O7szJ2dBYJxPjTde8/jf8/5nzP3jOB79P2lJbS2zgDGAMWgXVBXSPzCfm3f76R8Ut9sizQAtZCoIp/NMmV5jVcr5UK3xwtoal6FJspB8jJNhyGKABS93YbIBjpdN1/K4i3teM0fjccL6N+4E/TuDBtXG5mkMb8db8ScqFVzrHC8xOMtDqAtC9ah+lz0ga6hhMh6eXLlbNG355UQk71AXoorSb9+DgQ45B5V3A2NSG0YB531NhI6TPSduRUoc6/h2XM3LawR3TRnP2hJppb/xJ7d/AIoHgL9h8IN/aCwG+R1gKZ6qD8Ldb/C0V+g4SzBiIfYTUVOakQ3zq5H6eK4zMJiicHgEXDbOCjsmv3UJnW//wh7voQL5z2yATb749Ag+tYsjeROx04wehoUDXZx+7iTqqbkurvQ3Ai7K+HEIWsCUosenKLry/2wM5ULOsHEOdC9T5YIZgmYJqBqK/yxLycuib75jBefo5TMqamee2amI5OTSYvQpRb4bA2c+yszwgFRQXTtTEuE3KUhI+HOSRYPEVwI5ELgTC18sjrySKIVM+wpM9X0yBLoHEHgSBcegap34chP6QWLZ9HVT3mWPf8OGA5jn8gsvstxbpOtOwhfbMxGOERXTg/iNBwaNRUG3W6vjuxlEO4w0QaVL0FLc6iM6IppdvNli6DHTVcbk6D+p2vh5NEsgJY/roGWaqpr+jLoWBgB6AouSF9vhcPm1el90jERfWOqPUJPr4D8Dj69kIZYvQ3+Pu3pU2HnEGg4B80XskTo9Sl2QFOXQteedlL7bwEfrYJ/TkH33tkj6tU7c9wqK7pschCQWZkwC4oGuUoRLDaAzPPwgpBU+E5wsRG2LA4B9Ooku7fho2DkA7mRuh2QWgCFqJuO/cHyEECvlNoBmXQ9usRcL6NB7XAjVDo/WtZIHNwD1e+FAIo/ZOlDLohRk2HIiHAnyRuiAWRUSt2UJddTh/G52FUJh38OAfTyg2lpv6Hru8GkRdHl3x4hTQPKFqfG87DtNWi7FJRSRXTpRHunNuJmp2gg3F8OsZjFjRvJHSudvVxS9u2HUPNdlrJfMiH6RTBgKIx5DDoUuIZ8vNruAipLVlnIzbP2N/h8E5g7Usgjuvi+4H0oJexphD37wl2ToVdx0JQfkA3PuZPw8VpoaYLUdOI3Ze5DL95r70NGNlBgAgOHO0TvdwvE3AF3u0vqMrfK/BaPH4SvKuFiU2QVir4wvh5V95Lvk7fN5kkRc7Xt2Qc6d4O6Q9C1B6RS5goZAv+wCw58nzVNaa/SILpw3H7AHYOi6eQoW16qN94ME591powzJ+DIPjh2AFot1RQepxrRhWMrSOj/Y1DEDIqLxpbQmtgLmh6lc2jOkWS4bAFpIxEb5nxseH70OjSR/tiQmtWTVnNNZbBqnJWooUBBYutl9e7ZDqDSWwso6r0TJfNzzGWf8goVhGrqTo2XHQeczzEpUH17rUIpb0/ff/JIG8IG/jw934Cxdhqdd0cJrXkzQMcgUhzaEjIAh5HONudIA6q1IFXk522Wim8yPun9C9eIpLzmb7PtAAAAAElFTkSuQmCC"},null),i("div",null,[n("总体情况")])])]),i("div",{class:hr.content,onClick:()=>(()=>{const t=location.origin+location.pathname+"#/exercise-record";console.log("🚀 ~ url:",t),l({api:"openWebView",content:{url:t,orientation:1}})})()},[i(fr,{value:Number(t.sum.practiceRate)||0,size:80,color:"#FF8057",strokeWidth:6},null),i("div",{class:hr.items},[i("div",{class:hr.item},[i("div",{class:hr.itemNum},[i("span",{class:hr.rect},null),i("span",{style:{color:"#FF8057"}},[t.sum.passNum])]),i("div",{class:hr.itemTitle},[n("达标人数")])]),i("div",{class:[hr.item,hr.line]},[i("div",{class:hr.itemNum},[i("span",{class:hr.rect,style:{background:"#4A99FF"}},null),i("span",null,[t.sum.noPassNum])]),i("div",{class:hr.itemTitle},[n("未达标人数")])]),i("div",{class:hr.item},[i("div",{class:hr.itemNum},[i("span",{class:hr.rect,style:{background:"#9884BA"}},null),i("span",null,[t.sum.noMemberNum])]),i("div",{class:hr.itemTitle},[n("未统计人数")])])])])]),i("div",{class:[hr.container,hr.ensemble]},[i("div",{class:hr.head},[i("div",{class:hr.headLeft},[i("img",{class:hr.icon,src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAAAXNSR0IArs4c6QAABHtJREFUWEe9mFtsVFUUhr81A1MwtOoLqZBweVOHQnwwXqKJxigyBJCqSDReovWCthGtaWO0OlJ8ANNIAgmRlKp4B6TSalMlGB8M1MdCa9BEa0kMKEFjR21anNlmz5wzs3tmn8u00f22z1l77X///1prXwRP29KvkggNwK3AIqWo9trMpC+QQTiN4gjQ+dLtMmz6E7eT3q8S1NABbFKK+EwmjTpWIIuwmzGa0xtkUo/LA9JgctX0objFdKacThG103e/+03sZ+9+944X4WgsQ0qDytu09amdStEYdWX/hZ0Iu9pT0iRt/SqZzTKIRSZxlqTCKImK0I+iglbZeJwV8vyn6nUUm20+y6h1jTyO/aT1xemrHTuktVcNAUnr4DBmphtcPisVGJaWHjWmcFI7KoCIdkUi/Ow9C9IlQZ47rBQBnCdroX45VFcZHFoo/2McDg7Cd+cgBtxzFdQtgFm6A2QmoPsEDJ21aGHML89+EhyybbdB9Zxo+X7+L9j2JSyrhQeuLp9Yg2r/IjgDZHN3MEPb14SnkEvYRBZe7IPrlsD6Ovu41l6KghQtTIaePlTOkPtFp70NkJ/CGlCbBrQY1i+3A2rpDWGo6eNgyQIZ8sTSpMvQTAA1HiwBsiXDa4ZkYcmlAWmGrtWSaYYs6d3a48+QNpcnD0RgyFtvXJ+eCV3JNKB6HUOWOhUq2RP7gwG9sgrmzo6WZUXJfIJ6/AK83B8SQ49/ZAFkxMY1S2DdMog79aR4RLAocuoX6PoGFl4MT91QqkGaqWwODp+EgdFy4kyI8uiH4Vvn7DhclAhemfai64zrrWoWzHGZBf6ehAvZCCXkkQ/CAS2+1CiOTtUd/a3gfF4V6P/uycBvT9RgR3+PAOjh9y11yBmnlVtXB9cv9ThSsHcAvj8Hz9wEtTXhE2mLYyMF2YKaPPReMEOvrgYtmbcdOgEDP0F7CrQ8tuYtoFqyFz4LAfTgu8F1aPtau4Puk3B8BLamIOEDyDayxahDttOL3P+OUrZ64TrbZgGkHemd+/hogaFEBVcCa2E0kMl9+0IKowHIlCAPSEu2ugTIr36aTJkM2RiUe/cpVYTkeCw6VmBjSDPaPVgAtNUAFCW0NSBvRprzy8a3AxjyA+RIpoN6S0BQ2wDq40dglm14yzgPuZZGpW6+GeY7d1dTkjeOwQ/nofFGWHTJ1Cn8NuFfM9DxlQWOMUDuetPCkGOgqb2sBlZeXiiAuv2Tg6Ez8PWPhc18/jxYdQXUuKdKn+X/OQH9p+DsWMnABlzu7FLaZHr397CrbZQon7qAjNR3qSFU4RoUdt7x1b7ii1nBUxleYVju2Bt+Uax8oVHyzWIj7JA1e1RShEH4f148AqBmlWJFfvFrO9XOXK702BB0BZ/m2kOHxWLs6mmQpvzcd6dVYnwhfSo39TnG9TLNEAkFUawyMY7O/ZnUgbTzHKN/XJlWiaUL6MgpNtleQiJ7r8RQyMZg98gZmr9NGw9Wpo+Ve1SSHA1SwZNexDtAIbOEDHBawRFidH7+2NQnvX8BBdCOWcDBrfEAAAAASUVORK5CYII="},null),i("div",null,[n("声部情况")])]),i("div",{class:hr.headRight},[t.colors.map((t=>i("div",{style:t.select?{color:"#fff",borderColor:t.color,backgroundColor:t.color}:{color:t.color,borderColor:t.borderColor},onClick:()=>(t=>{var e;null===(e=d)||void 0===e||e.dispatchAction({type:t.select?"legendUnSelect":"legendSelect",name:t.text}),t.select=!t.select})(t)},[t.text])))])]),i("div",{class:hr.headLabelWrap},[t.colors.map(((e,n)=>i("div",{class:hr.headLabel,style:{display:e.select?"":"none"}},[i("div",{class:hr.headLabelDot,style:{background:e.color,color:e.color}},null),i("div",{style:{color:e.color}},[t.sum[e.key]||0,0===n?"%":"人"])])))]),i("div",{id:"subjectEcharts",class:hr.echartsMain},null),!t.practiceThisWeeks.length&&i("div",{class:hr.emtry},[n("暂无练习记录")])]),i("div",{class:[hr.container,hr.subjectWrap]},[t.practiceThisWeeks.map(((e,o)=>i("div",{class:[hr.listItem,o===t.index?hr.listItemActive:""],onClick:()=>(e=>{var i;t.index=e,null===(i=d)||void 0===i||i.dispatchAction({type:"showTip",seriesIndex:0,dataIndex:e})})(o)},[i("div",{class:hr.dot},null),i("div",{class:hr.itemLeft},[i("div",{class:hr.subjectName},[e.subjectName]),i("div",{class:hr.subjectType},[n("声部")])]),i("div",{class:hr.listitems},[t.colors.map(((t,n)=>i("div",{class:hr.item},[i("div",{class:hr.itemNum},[i("span",{style:{color:t.color}},[e[t.key],0===n?"%":""])]),i("div",{class:hr.itemTitle},[t.text,0===n?"":"人数"])])))])])))])])}}))}}}))}();
|