import{_ as H}from"./tslib@2.3.0-Cg4x8ZAA.js";import{i as Fg,e as W,a as q,b as C,c as ut,d as ue,f as X,r as Wa,m as Y,g as N,h as $,j as Z,k as ce,l as Po,n as ye,P as Ce,o as ru,p as $n,q as qe,s as j,Z as Zr,t as Wg,u as Hg,v as oe,w as ze,x as Ug,T as Yg,y as Ns,z as lr,A as Xg,B as Zg,C as $g,D as Iv,E as Lv,F as Ee,G as Kg,H as vi,I as Q,J as hi,K as Pv,S as pr,R as kv,L as zs,M as Kn,N as de,O as ur,Q as Rv,U as Vs,V as qg,W as Se,X as jg,Y as Ev,_ as Ov,$ as pe,a0 as Qg,a1 as De,a2 as qn,a3 as Bv,a4 as Gs,a5 as J,a6 as bt,a7 as We,a8 as ie,a9 as Jg,aa as ne,ab as Ne,ac as Ha,ad as ko,ae as em,af as Ro,ag as tm,ah as nu,ai as au,aj as rm,ak as Eo,al as nm,am as iu,an as Ei,ao as we,ap as St,aq as am,ar as im,as as Nv,at as om,au as jn,av as ou,aw as Oi,ax as sm,ay as Ua,az as Fs,aA as zv,aB as In,aC as su,aD as lm,aE as um,aF as cm,aG as Oo,aH as lu,aI as fm,aJ as vm,aK as hm,aL as dm,aM as pm,aN as gm,aO as mm,aP as ym,aQ as _m,aR as Sm,aS as xm,aT as bm,aU as wm}from"./zrender@6.0.0-Co73lGCa.js";var Cm=".",qt="___EC__COMPONENT__CONTAINER___",Vv="___EC__EXTENDED_CLASS___";function it(r){var t={main:"",sub:""};if(r){var e=r.split(Cm);t.main=e[0]||"",t.sub=e[1]||""}return t}function Tm(r){ut(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(r),'componentType "'+r+'" illegal')}function Dm(r){return!!(r&&r[Vv])}function Ws(r,t){r.$constructor=r,r.extend=function(e){var n=this,a;return Am(n)?a=(function(i){H(o,i);function o(){return i.apply(this,arguments)||this}return o})(n):(a=function(){(e.$constructor||n).apply(this,arguments)},Fg(a,this)),W(a.prototype,e),a[Vv]=!0,a.extend=this.extend,a.superCall=Lm,a.superApply=Pm,a.superClass=n,a}}function Am(r){return q(r)&&/^class\s/.test(Function.prototype.toString.call(r))}function Gv(r,t){r.extend=t.extend}var Mm=Math.round(Math.random()*10);function Im(r){var t=["__\0is_clz",Mm++].join("_");r.prototype[t]=!0,r.isInstance=function(e){return!!(e&&e[t])}}function Lm(r,t){for(var e=[],n=2;n=0||i&&ue(i,l)<0)){var u=n.getShallow(l,t);u!=null&&(o[r[s][0]]=u)}}return o}}var km=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],Rm=Ln(km),Em=(function(){function r(){}return r.prototype.getAreaStyle=function(t,e){return Rm(this,t,e)},r})(),uu=1e-4,Fv=20;function Om(r){return r.replace(/^\s+|\s+$/g,"")}var Pn=Math.min,Fe=Math.max,ot=Math.abs;function Bt(r,t,e,n){var a=t[0],i=t[1],o=e[0],s=e[1],l=i-a,u=s-o;if(l===0)return u===0?o:(o+s)/2;if(n)if(l>0){if(r<=a)return o;if(r>=i)return s}else{if(r>=a)return o;if(r<=i)return s}else{if(r===a)return o;if(r===i)return s}return(r-a)/l*u+o}var se=Bm;function Bm(r,t,e){switch(r){case"center":case"middle":r="50%";break;case"left":case"top":r="0%";break;case"right":case"bottom":r="100%";break}return Bo(r,t,e)}function Bo(r,t,e){return X(r)?Om(r).match(/%$/)?parseFloat(r)/100*t+(e||0):parseFloat(r):r==null?NaN:+r}function Le(r,t,e){return t==null&&(t=10),t=Math.min(Math.max(0,t),Fv),r=(+r).toFixed(t),e?r:+r}function Nm(r){return r.sort(function(t,e){return t-e}),r}function yt(r){if(r=+r,isNaN(r))return 0;if(r>1e-14){for(var t=1,e=0;e<15;e++,t*=10)if(Math.round(r*t)/t===r)return e}return zm(r)}function zm(r){var t=r.toString().toLowerCase(),e=t.indexOf("e"),n=e>0?+t.slice(e+1):0,a=e>0?e:t.length,i=t.indexOf("."),o=i<0?0:a-1-i;return Math.max(0,o-n)}function Wv(r,t){var e=Math.log,n=Math.LN10,a=Math.floor(e(r[1]-r[0])/n),i=Math.round(e(ot(t[1]-t[0]))/n),o=Math.min(Math.max(-a+i,0),20);return isFinite(o)?o:20}function Vm(r,t){var e=Wa(r,function(v,d){return v+(isNaN(d)?0:d)},0);if(e===0)return[];for(var n=Math.pow(10,t),a=Y(r,function(v){return(isNaN(v)?0:v)/e*n*100}),i=n*100,o=Y(a,function(v){return Math.floor(v)}),s=Wa(o,function(v,d){return v+d},0),l=Y(a,function(v,d){return v-o[d]});su&&(u=l[f],c=f);++o[c],l[c]=0,++s}return Y(o,function(v){return v/n})}function Gm(r,t){var e=Math.max(yt(r),yt(t)),n=r+t;return e>Fv?n:Le(n,e)}function Hv(r){var t=Math.PI*2;return(r%t+t)%t}function Ya(r){return r>-uu&&r=10&&t++,t}function Uv(r,t){var e=Hs(r),n=Math.pow(10,e),a=r/n,i;return a<1.5?i=1:a<2.5?i=2:a<4?i=3:a<7?i=5:i=10,r=i*n,e>=-20?+r.toFixed(e<0?-e:0):r}function Ht(r){var t=parseFloat(r);return t==r&&(t!==0||!X(r)||r.indexOf("x")<=0)?t:NaN}function Yv(r){return!isNaN(Ht(r))}function Xv(){return Math.round(Math.random()*9)}function Zv(r,t){return t===0?r:Zv(t,r%t)}function cu(r,t){return r==null?t:t==null?r:r*t/Zv(r,t)}function $v(r,t){}function re(r){throw new Error(r)}function fu(r,t,e){return(t-r)*e+r}var Kv="series\0",qv="\0_ec_\0";function _e(r){return r instanceof Array?r:r==null?[]:[r]}function No(r,t,e){if(r){r[t]=r[t]||{},r.emphasis=r.emphasis||{},r.emphasis[t]=r.emphasis[t]||{};for(var n=0,a=e.length;n=0,i=!1;if(r instanceof Ce){var o=Jv(r),s=a&&o.selectFill||o.normalFill,l=a&&o.selectStroke||o.normalStroke;if(Sr(s)||Sr(l)){n=n||{};var u=n.style||{};u.fill==="inherit"?(i=!0,n=W({},n),u=W({},u),u.fill=s):!Sr(u.fill)&&Sr(s)?(i=!0,n=W({},n),u=W({},u),u.fill=ru(s)):!Sr(u.stroke)&&Sr(l)&&(i||(n=W({},n),u=W({},u)),u.stroke=ru(l)),n.style=u}}if(n&&n.z2==null){i||(n=W({},n));var c=r.z2EmphasisLift;n.z2=r.z2+(c??oy)}return n}function vy(r,t,e){if(e&&e.z2==null){e=W({},e);var n=r.z2SelectLift;e.z2=r.z2+(n??sy)}return e}function hy(r,t,e){var n=ue(r.currentStates,t)>=0,a=r.style.opacity,i=n?null:cy(r,["opacity"],t,{opacity:1});e=e||{};var o=e.style||{};return o.opacity==null&&(e=W({},e),o=W({opacity:n?a:i.opacity*.1},o),e.style=o),e}function Bi(r,t){var e=this.states[r];if(this.style){if(r==="emphasis")return fy(this,r,t,e);if(r==="blur")return hy(this,r,e);if(r==="select")return vy(this,r,e)}return e}function dy(r){r.stateProxy=Bi;var t=r.getTextContent(),e=r.getTextGuideLine();t&&(t.stateProxy=Bi),e&&(e.stateProxy=Bi)}function mu(r,t){!oh(r,t)&&!r.__highByOuter&&wt(r,eh)}function yu(r,t){!oh(r,t)&&!r.__highByOuter&&wt(r,th)}function zr(r,t){r.__highByOuter|=1<<(t||0),wt(r,eh)}function Vr(r,t){!(r.__highByOuter&=~(1<<(t||0)))&&wt(r,th)}function py(r){wt(r,Ks)}function nh(r){wt(r,rh)}function ah(r){wt(r,ly)}function ih(r){wt(r,uy)}function oh(r,t){return r.__highDownSilentOnTouch&&t.zrByTouch}function sh(r){var t=r.getModel(),e=[],n=[];t.eachComponent(function(a,i){var o=Xs(i),s=a==="series",l=s?r.getViewOfSeriesModel(i):r.getViewOfComponentModel(i);!s&&n.push(l),o.isBlured&&(l.group.traverse(function(u){rh(u)}),s&&e.push(i)),o.isBlured=!1}),C(n,function(a){a&&a.toggleBlurSeries&&a.toggleBlurSeries(e,!1,t)})}function Vo(r,t,e,n){var a=n.getModel();e=e||"coordinateSystem";function i(u,c){for(var f=0;f0){var s={dataIndex:o,seriesIndex:e.seriesIndex};i!=null&&(s.dataType=i),t.push(s)}})}),t}function Fo(r,t,e){lh(r,!0),wt(r,dy),by(r,t,e)}function xy(r){lh(r,!1)}function fr(r,t,e,n){n?xy(r):Fo(r,t,e)}function by(r,t,e){var n=ee(r);t!=null?(n.focus=t,n.blurScope=e):n.focus&&(n.focus=null)}var Su=["emphasis","blur","select"],wy={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function Rn(r,t,e,n){e=e||"itemStyle";for(var a=0;a0){var f=c.duration,h=c.delay,v=c.easing,d={duration:f,delay:h||0,easing:v,done:i,force:!!i||!!o,setToFinal:!u,scope:r,during:o};s?t.animateFrom(e,d):t.animateTo(e,d)}else t.stopAnimation(),!s&&t.attr(e),o&&o(1),i&&i()}function Ae(r,t,e,n,a,i){js("update",r,t,e,n,a,i)}function Ve(r,t,e,n,a,i){js("enter",r,t,e,n,a,i)}function bn(r){if(!r.__zr)return!0;for(var t=0;tot(i[1])?i[0]>0?"right":"left":i[1]>0?"bottom":"top"}function wu(r){return!r.isGroup}function Ry(r){return r.shape!=null}function dh(r,t,e){if(!r||!t)return;function n(o){var s={};return o.traverse(function(l){wu(l)&&l.anid&&(s[l.anid]=l)}),s}function a(o){var s={x:o.x,y:o.y,rotation:o.rotation};return Ry(o)&&(s.shape=Q(o.shape)),s}var i=n(r);t.traverse(function(o){if(wu(o)&&o.anid){var s=i[o.anid];if(s){var l=a(o);o.attr(a(s)),Ae(o,l,e,ee(o).dataIndex)}}})}function ph(r,t){return Y(r,function(e){var n=e[0];n=Fe(n,t.x),n=Pn(n,t.x+t.width);var a=e[1];return a=Fe(a,t.y),a=Pn(a,t.y+t.height),[n,a]})}function Ey(r,t){var e=Fe(r.x,t.x),n=Pn(r.x+r.width,t.x+t.width),a=Fe(r.y,t.y),i=Pn(r.y+r.height,t.y+t.height);if(n>=e&&i>=a)return{x:e,y:a,width:n-e,height:i-a}}function Si(r,t,e){var n=W({rectHover:!0},t),a=n.style={strokeNoScale:!0};if(e=e||{x:-1,y:-1,width:2,height:2},r)return r.indexOf("image://")===0?(a.image=r.slice(8),oe(a,e),new Zr(n)):Qs(r.replace("path://",""),n,e,"center")}function Oy(r,t,e,n,a){for(var i=0,o=a[a.length-1];i1)return!1;var m=Ni(v,d,c,f)/h;return!(m<0||m>1)}function Ni(r,t,e,n){return r*n-e*t}function By(r){return r<=1e-6&&r>=-1e-6}function Ka(r,t,e,n,a){return t==null||(ce(t)?ve[0]=ve[1]=ve[2]=ve[3]=t:(ve[0]=t[0],ve[1]=t[1],ve[2]=t[2],ve[3]=t[3]),n&&(ve[0]=Fe(0,ve[0]),ve[1]=Fe(0,ve[1]),ve[2]=Fe(0,ve[2]),ve[3]=Fe(0,ve[3])),e&&(ve[0]=-ve[0],ve[1]=-ve[1],ve[2]=-ve[2],ve[3]=-ve[3]),Cu(r,ve,"x","width",3,1,a&&a[0]||0),Cu(r,ve,"y","height",0,2,a&&a[1]||0)),r}var ve=[0,0,0,0];function Cu(r,t,e,n,a,i,o){var s=t[i]+t[a],l=r[n];r[n]+=s,o=Fe(0,Pn(o,l)),r[n]=0?-t[a]:t[i]>=0?l+t[i]:ot(s)>1e-8?(l-o)*t[a]/s:0):r[e]-=t[a]}function ea(r){var t=r.itemTooltipOption,e=r.componentModel,n=r.itemName,a=X(t)?{formatter:t}:t,i=e.mainType,o=e.componentIndex,s={componentType:i,name:n,$vars:["name"]};s[i+"Index"]=o;var l=r.formatterParamsExtra;l&&C(qe(l),function(c){ze(s,c)||(s[c]=l[c],s.$vars.push(c))});var u=ee(r.el);u.componentMainType=i,u.componentIndex=o,u.tooltipConfig={name:n,option:oe({content:n,encodeHTMLContent:!0,formatterParams:s},a)}}function Yo(r,t){var e;r.isGroup&&(e=t(r)),e||r.traverse(t)}function ta(r,t){if(r)if(N(r))for(var e=0;et&&(t=o),ot&&(e=t=0),{min:e,max:t}}function mh(r,t,e){yh(r,t,e,-1/0)}function yh(r,t,e,n){if(r.ignoreModelZ)return n;var a=r.getTextContent(),i=r.getTextGuideLine(),o=r.isGroup;if(o)for(var s=r.childrenRef(),l=0;l1){var c=l.shift();l.length===1&&(n[s]=l[0]),this._update&&this._update(c,o)}else u===1?(n[s]=null,this._update&&this._update(l,o)):this._remove&&this._remove(o)}this._performRestAdd(i,n)},r.prototype._executeMultiple=function(){var t=this._old,e=this._new,n={},a={},i=[],o=[];this._initIndexMap(t,n,i,"_oldKeyGetter"),this._initIndexMap(e,a,o,"_newKeyGetter");for(var s=0;s1&&h===1)this._updateManyToOne&&this._updateManyToOne(c,u),a[l]=null;else if(f===1&&h>1)this._updateOneToMany&&this._updateOneToMany(c,u),a[l]=null;else if(f===1&&h===1)this._update&&this._update(c,u),a[l]=null;else if(f>1&&h>1)this._updateManyToMany&&this._updateManyToMany(c,u),a[l]=null;else if(f>1)for(var v=0;v1)for(var s=0;sp&&(p=_)}v[0]=d,v[1]=p}},a=function(){return this._data?this._data.length/this._dimSize:0};Eu=(t={},t[Pe+"_"+et]={pure:!0,appendData:i},t[Pe+"_"+gr]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},t[Ye]={pure:!0,appendData:i},t[nt]={pure:!0,appendData:function(o){var s=this._data;C(o,function(l,u){for(var c=s[u]||(s[u]=[]),f=0;f<(l||[]).length;f++)c.push(l[f])})}},t[Ue]={appendData:i},t[Ft]={persistent:!1,pure:!0,appendData:function(o){this._data=o},clean:function(){this._offset+=this.count(),this._data=null}},t);function i(o){for(var s=0;st},gte:function(r,t){return r>=t}},s0=(function(){function r(t,e){if(!ce(e)){var n="";re(n)}this._opFn=Bh[t],this._rvalFloat=Ht(e)}return r.prototype.evaluate=function(t){return ce(t)?this._opFn(t,this._rvalFloat):this._opFn(Ht(t),this._rvalFloat)},r})(),Nh=(function(){function r(t,e){var n=t==="desc";this._resultLT=n?1:-1,e==null&&(e=n?"min":"max"),this._incomparable=e==="min"?-1/0:1/0}return r.prototype.evaluate=function(t,e){var n=ce(t)?t:Ht(t),a=ce(e)?e:Ht(e),i=isNaN(n),o=isNaN(a);if(i&&(n=this._incomparable),o&&(a=this._incomparable),i&&o){var s=X(t),l=X(e);s&&(n=l?t:0),l&&(a=s?e:0)}return na?-this._resultLT:0},r})(),l0=(function(){function r(t,e){this._rval=e,this._isEQ=t,this._rvalTypeof=typeof e,this._rvalFloat=Ht(e)}return r.prototype.evaluate=function(t){var e=t===this._rval;if(!e){var n=typeof t;n!==this._rvalTypeof&&(n==="number"||this._rvalTypeof==="number")&&(e=Ht(t)===this._rvalFloat)}return this._isEQ?e:!e},r})();function u0(r,t){return r==="eq"||r==="ne"?new l0(r==="eq",t):ze(Bh,r)?new s0(r,t):null}var Ci="undefined",c0=typeof Uint32Array===Ci?Array:Uint32Array,f0=typeof Uint16Array===Ci?Array:Uint16Array,zh=typeof Int32Array===Ci?Array:Int32Array,zu=typeof Float64Array===Ci?Array:Float64Array,Vh={float:zu,int:zh,ordinal:Array,number:Array,time:zu},Wi;function xr(r){return r>65535?c0:f0}function br(){return[1/0,-1/0]}function v0(r){var t=r.constructor;return t===Array?r.slice():new t(r)}function Vu(r,t,e,n,a){var i=Vh[e||"float"];if(a){var o=r[t],s=o&&o.length;if(s!==n){for(var l=new i(n),u=0;um[1]&&(m[1]=p)}return this._rawCount=this._count=l,{start:s,end:l}},r.prototype._initDataFromProvider=function(t,e,n){for(var a=this._provider,i=this._chunks,o=this._dimensions,s=o.length,l=this._rawExtent,u=Y(o,function(y){return y.property}),c=0;cg[1]&&(g[1]=m)}}!a.persistent&&a.clean&&a.clean(),this._rawCount=this._count=e,this._extent=[]},r.prototype.count=function(){return this._count},r.prototype.get=function(t,e){if(!(e>=0&&e=0&&e=this._rawCount||t<0)return-1;if(!this._indices)return t;var e=this._indices,n=e[t];if(n!=null&&nt)i=o-1;else return o}return-1},r.prototype.getIndices=function(){var t,e=this._indices;if(e){var n=e.constructor,a=this._count;if(n===Array){t=new n(a);for(var i=0;i=f&&y<=h||isNaN(y))&&(l[u++]=p),p++}d=!0}else if(i===2){for(var m=v[a[0]],_=v[a[1]],S=t[a[1]][0],b=t[a[1]][1],g=0;g=f&&y<=h||isNaN(y))&&(x>=S&&x<=b||isNaN(x))&&(l[u++]=p),p++}d=!0}}if(!d)if(i===1)for(var g=0;g=f&&y<=h||isNaN(y))&&(l[u++]=w)}else for(var g=0;gt[M][1])&&(T=!1)}T&&(l[u++]=e.getRawIndex(g))}return ug[1]&&(g[1]=m)}}}},r.prototype.lttbDownSample=function(t,e){var n=this.clone([t],!0),a=n._chunks,i=a[t],o=this.count(),s=0,l=Math.floor(1/e),u=this.getRawIndex(0),c,f,h,v=new(xr(this._rawCount))(Math.min((Math.ceil(o/l)+2)*2,o));v[s++]=u;for(var d=1;dc&&(c=f,h=S)}A>0&&As&&(p=s-c);for(var m=0;md&&(d=y,v=c+m)}var _=this.getRawIndex(f),S=this.getRawIndex(v);fc-d&&(l=c-d,s.length=l);for(var p=0;pf[1]&&(f[1]=g),h[v++]=y}return i._count=v,i._indices=h,i._updateGetRawIdx(),i},r.prototype.each=function(t,e){if(this._count)for(var n=t.length,a=this._chunks,i=0,o=this.count();il&&(l=f)}return o=[s,l],this._extent[t]=o,o},r.prototype.getRawDataItem=function(t){var e=this.getRawIndex(t);if(this._provider.persistent)return this._provider.getItem(e);for(var n=[],a=this._chunks,i=0;i=0?this._indices[t]:-1},r.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},r.internalField=(function(){function t(e,n,a,i){return Oa(e[i],this._dimensions[i])}Wi={arrayRows:t,objectRows:function(e,n,a,i){return Oa(e[n],this._dimensions[i])},keyedColumns:t,original:function(e,n,a,i){var o=e&&(e.value==null?e:e.value);return Oa(o instanceof Array?o[i]:o,this._dimensions[i])},typedArray:function(e,n,a,i){return e[i]}}})(),r})(),h0=fe(),d0={float:"f",int:"i",ordinal:"o",number:"n",time:"t"},Gh=(function(){function r(t){this.dimensions=t.dimensions,this._dimOmitted=t.dimensionOmitted,this.source=t.source,this._fullDimCount=t.fullDimensionCount,this._updateDimOmitted(t.dimensionOmitted)}return r.prototype.isDimensionOmitted=function(){return this._dimOmitted},r.prototype._updateDimOmitted=function(t){this._dimOmitted=t,t&&(this._dimNameMap||(this._dimNameMap=Hh(this.source)))},r.prototype.getSourceDimensionIndex=function(t){return j(this._dimNameMap.get(t),-1)},r.prototype.getSourceDimension=function(t){var e=this.source.dimensionsDefine;if(e)return e[t]},r.prototype.makeStoreSchema=function(){for(var t=this._fullDimCount,e=Lh(this.source),n=!Uh(t),a="",i=[],o=0,s=0;o30}var rn=$,At=Y,p0=typeof Int32Array>"u"?Array:Int32Array,g0="e\0\0",Gu=-1,m0=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],y0=["_approximateExtent"],Fu,fa,nn,an,Hi,on,Ui,Yh=(function(){function r(t,e){this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","minmaxDownSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","minmaxDownSample","lttbDownSample"];var n,a=!1;Fh(t)?(n=t.dimensions,this._dimOmitted=t.isDimensionOmitted(),this._schema=t):(a=!0,n=t),n=n||["x","y"];for(var i={},o=[],s={},l=!1,u={},c=0;c=e)){var n=this._store,a=n.getProvider();this._updateOrdinalMeta();var i=this._nameList,o=this._idList,s=a.getSource().sourceFormat,l=s===Ue;if(l&&!a.pure)for(var u=[],c=t;c0},r.prototype.ensureUniqueItemVisual=function(t,e){var n=this._itemVisuals,a=n[t];a||(a=n[t]={});var i=a[e];return i==null&&(i=this.getVisual(e),N(i)?i=i.slice():rn(i)&&(i=W({},i)),a[e]=i),i},r.prototype.setItemVisual=function(t,e,n){var a=this._itemVisuals[t]||{};this._itemVisuals[t]=a,rn(e)?W(a,e):a[e]=n},r.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},r.prototype.setLayout=function(t,e){rn(t)?W(this._layout,t):this._layout[t]=e},r.prototype.getLayout=function(t){return this._layout[t]},r.prototype.getItemLayout=function(t){return this._itemLayouts[t]},r.prototype.setItemLayout=function(t,e,n){this._itemLayouts[t]=n?W(this._itemLayouts[t]||{},e):e},r.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},r.prototype.setItemGraphicEl=function(t,e){var n=this.hostModel&&this.hostModel.seriesIndex;iy(n,this.dataType,t,e),this._graphicEls[t]=e},r.prototype.getItemGraphicEl=function(t){return this._graphicEls[t]},r.prototype.eachItemGraphicEl=function(t,e){C(this._graphicEls,function(n,a){n&&t&&t.call(e,n,a)})},r.prototype.cloneShallow=function(t){return t||(t=new r(this._schema?this._schema:At(this.dimensions,this._getDimInfo,this),this.hostModel)),Hi(t,this),t._store=this._store,t},r.prototype.wrapMethod=function(t,e){var n=this[t];q(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var a=n.apply(this,arguments);return e.apply(this,[a].concat(Jg(arguments)))})},r.internalField=(function(){Fu=function(t){var e=t._invertedIndicesMap;C(e,function(n,a){var i=t._dimInfos[a],o=i.ordinalMeta,s=t._store;if(o){n=e[a]=new p0(o.categories.length);for(var l=0;l1&&(l+="__ec__"+c),a[e]=l}}})(),r})();function Xh(r,t){il(r)||(r=Mh(r)),t=t||{};var e=t.coordDimensions||[],n=t.dimensionsDefine||r.dimensionsDefine||[],a=Z(),i=[],o=S0(r,e,n,t.dimensionsCount),s=t.canOmitUnusedDimensions&&Uh(o),l=n===r.dimensionsDefine,u=l?Hh(r):Wh(n),c=t.encodeDefine;!c&&t.encodeDefaulter&&(c=t.encodeDefaulter(r,o));for(var f=Z(c),h=new zh(o),v=0;v0&&(n.name=a+(i-1)),i++,t.set(a,i)}}function S0(r,t,e,n){var a=Math.max(r.dimensionsDetectedCount||1,t.length,e.length,n||0);return C(t,function(i){var o;$(i)&&(o=i.dimsDef)&&(a=Math.max(a,o.length))}),a}function x0(r,t,e){if(e||t.hasKey(r)){for(var n=0;t.hasKey(r+n);)n++;r+=n}return t.set(r,!0),r}var Ba={},Yi={},sl=(function(){function r(){this._normalMasterList=[],this._nonSeriesBoxMasterList=[]}return r.prototype.create=function(t,e){this._nonSeriesBoxMasterList=n(Ba),this._normalMasterList=n(Yi);function n(a,i){var o=[];return C(a,function(s,l){var u=s.create(t,e);o=o.concat(u||[])}),o}},r.prototype.update=function(t,e){C(this._normalMasterList,function(n){n.update&&n.update(t,e)})},r.prototype.getCoordinateSystems=function(){return this._normalMasterList.concat(this._nonSeriesBoxMasterList)},r.register=function(t,e){if(t==="matrix"||t==="calendar"){Ba[t]=e;return}Yi[t]=e},r.get=function(t){return Yi[t]||Ba[t]},r})();function b0(r){return!!Ba[r]}var Ko={coord:1,coord2:2};function w0(r){Zh.set(r.fullType,{getCoord2:void 0}).getCoord2=r.getCoord2}var Zh=Z();function C0(r){var t=r.getShallow("coord",!0),e=Ko.coord;if(t==null){var n=Zh.get(r.type);n&&n.getCoord2&&(e=Ko.coord2,t=n.getCoord2(r))}return{coord:t,from:e}}var mt={none:0,dataCoordSys:1,boxCoordSys:2};function T0(r,t){var e=r.getShallow("coordinateSystem"),n=r.getShallow("coordinateSystemUsage",!0),a=mt.none;if(e){var i=r.mainType==="series";n==null&&(n=i?"data":"box"),n==="data"?(a=mt.dataCoordSys,i||(a=mt.none)):n==="box"&&(a=mt.boxCoordSys,!i&&!b0(e)&&(a=mt.none))}return{coordSysType:e,kind:a}}function D0(r){var t=r.targetModel,e=r.coordSysType,n=r.coordSysProvider,a=r.isDefaultDataCoordSys,i=T0(t),o=i.kind,s=i.coordSysType;if(a&&o!==mt.dataCoordSys&&(o=mt.dataCoordSys,s=e),o===mt.none||s!==e)return!1;var l=n(e,t);return l?(o===mt.dataCoordSys?t.coordinateSystem=l:t.boxCoordinateSystem=l,!0):!1}var A0=(function(){function r(t){this.coordSysDims=[],this.axisMap=Z(),this.categoryAxisMap=Z(),this.coordSysName=t}return r})();function M0(r){var t=r.get("coordinateSystem"),e=new A0(t),n=I0[t];if(n)return n(r,e,e.axisMap,e.categoryAxisMap),e}var I0={cartesian2d:function(r,t,e,n){var a=r.getReferringComponents("xAxis",Re).models[0],i=r.getReferringComponents("yAxis",Re).models[0];t.coordSysDims=["x","y"],e.set("x",a),e.set("y",i),wr(a)&&(n.set("x",a),t.firstCategoryDimIndex=0),wr(i)&&(n.set("y",i),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},singleAxis:function(r,t,e,n){var a=r.getReferringComponents("singleAxis",Re).models[0];t.coordSysDims=["single"],e.set("single",a),wr(a)&&(n.set("single",a),t.firstCategoryDimIndex=0)},polar:function(r,t,e,n){var a=r.getReferringComponents("polar",Re).models[0],i=a.findAxisModel("radiusAxis"),o=a.findAxisModel("angleAxis");t.coordSysDims=["radius","angle"],e.set("radius",i),e.set("angle",o),wr(i)&&(n.set("radius",i),t.firstCategoryDimIndex=0),wr(o)&&(n.set("angle",o),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},geo:function(r,t,e,n){t.coordSysDims=["lng","lat"]},parallel:function(r,t,e,n){var a=r.ecModel,i=a.getComponent("parallel",r.get("parallelIndex")),o=t.coordSysDims=i.dimensions.slice();C(i.parallelAxisIndex,function(s,l){var u=a.getComponent("parallelAxis",s),c=o[l];e.set(c,u),wr(u)&&(n.set(c,u),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=l))})},matrix:function(r,t,e,n){var a=r.getReferringComponents("matrix",Re).models[0];t.coordSysDims=["x","y"];var i=a.getDimensionModel("x"),o=a.getDimensionModel("y");e.set("x",i),e.set("y",o),n.set("x",i),n.set("y",o)}};function wr(r){return r.get("type")==="category"}function L0(r,t,e){e=e||{};var n=e.byIndex,a=e.stackedCoordDimension,i,o,s;P0(t)?i=t:(o=t.schema,i=o.dimensions,s=t.store);var l=!!(r&&r.get("stack")),u,c,f,h;if(C(i,function(y,_){X(y)&&(i[_]=y={name:y}),l&&!y.isExtraCoord&&(!n&&!u&&y.ordinalMeta&&(u=y),!c&&y.type!=="ordinal"&&y.type!=="time"&&(!a||a===y.coordDim)&&(c=y))}),c&&!n&&!u&&(n=!0),c){f="__\0ecstackresult_"+r.id,h="__\0ecstackedover_"+r.id,u&&(u.createInvertedIndices=!0);var v=c.coordDim,d=c.type,p=0;C(i,function(y){y.coordDim===v&&p++});var m={name:f,coordDim:v,coordDimIndex:p,type:d,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length},g={name:h,coordDim:h,coordDimIndex:p+1,type:d,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length+1};o?(s&&(m.storeDimIndex=s.ensureCalculationDimension(h,d),g.storeDimIndex=s.ensureCalculationDimension(f,d)),o.appendCalculationDimension(m),o.appendCalculationDimension(g)):(i.push(m),i.push(g))}return{stackedDimension:c&&c.name,stackedByDimension:u&&u.name,isStackedByIndex:n,stackedOverDimension:h,stackResultDimension:f}}function P0(r){return!Fh(r.schema)}function Wr(r,t){return!!t&&t===r.getCalculationInfo("stackedDimension")}function k0(r,t){return Wr(r,t)?r.getCalculationInfo("stackResultDimension"):t}function R0(r,t){var e=r.get("coordinateSystem"),n=sl.get(e),a;return t&&t.coordSysDims&&(a=Y(t.coordSysDims,function(i){var o={name:i},s=t.axisMap.get(i);if(s){var l=s.get("type");o.type=Zo(l)}return o})),a||(a=n&&(n.getDimensionsInfo?n.getDimensionsInfo():n.dimensions.slice())||["x","y"]),a}function E0(r,t,e){var n,a;return e&&C(r,function(i,o){var s=i.coordDim,l=e.categoryAxisMap.get(s);l&&(n==null&&(n=o),i.ordinalMeta=l.getOrdinalMeta(),t&&(i.createInvertedIndices=!0)),i.otherDims.itemName!=null&&(a=!0)}),!a&&n!=null&&(r[n].otherDims.itemName=0),n}function Ti(r,t,e){e=e||{};var n=t.getSourceManager(),a,i=!1;a=n.getSource(),i=a.sourceFormat===Ue;var o=M0(t),s=R0(t,o),l=e.useEncodeDefaulter,u=q(l)?l:l?ne(Th,s,t):null,c={coordDimensions:s,generateCoord:e.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!i},f=Xh(a,c),h=E0(f.dimensions,e.createInvertedIndices,o),v=i?null:n.getSharedDataStore(f),d=L0(t,{schema:f,store:v}),p=new Yh(f,t);p.setCalculationInfo(d);var m=h!=null&&O0(a)?function(g,y,_,S){return S===h?_:this.defaultDimValueGetter(g,y,_,S)}:null;return p.hasItemOption=!1,p.initData(i?a:v,null,m),p}function O0(r){if(r.sourceFormat===Ue){var t=B0(r.data||[]);return!N(Qn(t))}}function B0(r){for(var t=0;t=0&&s.push(l)}),s}}function ll(r,t){return J(J({},r,!0),t,!0)}const G0={time:{month:["January","February","March","April","May","June","July","August","September","October","November","December"],monthAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayOfWeekAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},legend:{selector:{all:"All",inverse:"Inv"}},toolbox:{brush:{title:{rect:"Box Select",polygon:"Lasso Select",lineX:"Horizontally Select",lineY:"Vertically Select",keep:"Keep Selections",clear:"Clear Selections"}},dataView:{title:"Data View",lang:["Data View","Close","Refresh"]},dataZoom:{title:{zoom:"Zoom",back:"Zoom Reset"}},magicType:{title:{line:"Switch to Line Chart",bar:"Switch to Bar Chart",stack:"Stack",tiled:"Tile"}},restore:{title:"Restore"},saveAsImage:{title:"Save as Image",lang:["Right Click to Save Image"]}},series:{typeNames:{pie:"Pie chart",bar:"Bar chart",line:"Line chart",scatter:"Scatter plot",effectScatter:"Ripple scatter plot",radar:"Radar chart",tree:"Tree",treemap:"Treemap",boxplot:"Boxplot",candlestick:"Candlestick",k:"K line chart",heatmap:"Heat map",map:"Map",parallel:"Parallel coordinate map",lines:"Line graph",graph:"Relationship graph",sankey:"Sankey diagram",funnel:"Funnel chart",gauge:"Gauge",pictorialBar:"Pictorial bar",themeRiver:"Theme River Map",sunburst:"Sunburst",custom:"Custom chart",chart:"Chart"}},aria:{general:{withTitle:'This is a chart about "{title}"',withoutTitle:"This is a chart"},series:{single:{prefix:"",withName:" with type {seriesType} named {seriesName}.",withoutName:" with type {seriesType}."},multiple:{prefix:". It consists of {seriesCount} series count.",withName:" The {seriesId} series is a {seriesType} representing {seriesName}.",withoutName:" The {seriesId} series is a {seriesType}.",separator:{middle:"",end:""}}},data:{allData:"The data is as follows: ",partialData:"The first {displayCnt} items are: ",withName:"the data for {name} is {value}",withoutName:"{value}",separator:{middle:", ",end:". "}}}},F0={time:{month:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthAbbr:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeek:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayOfWeekAbbr:["日","一","二","三","四","五","六"]},legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图",custom:"自定义图表",chart:"图表"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType},",withoutName:"第{seriesId}个系列是一个{seriesType},",separator:{middle:";",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:",",end:""}}}};var ja="ZH",ul="EN",Or=ul,Na={},cl={},$h=ye.domSupported?(function(){var r=(document.documentElement.lang||navigator.language||navigator.browserLanguage||Or).toUpperCase();return r.indexOf(ja)>-1?ja:Or})():Or;function Kh(r,t){r=r.toUpperCase(),cl[r]=new he(t),Na[r]=t}function W0(r){if(X(r)){var t=Na[r.toUpperCase()]||{};return r===ja||r===ul?Q(t):J(Q(t),Q(Na[Or]),!1)}else return J(Q(r),Q(Na[Or]),!1)}function H0(r){return cl[r]}function U0(){return cl[Or]}Kh(ul,G0);Kh(ja,F0);var Y0=null;function Qa(){return Y0}var fl=1e3,vl=fl*60,Cn=vl*60,$e=Cn*24,Wu=$e*365,X0={year:/({yyyy}|{yy})/,month:/({MMMM}|{MMM}|{MM}|{M})/,day:/({dd}|{d})/,hour:/({HH}|{H}|{hh}|{h})/,minute:/({mm}|{m})/,second:/({ss}|{s})/,millisecond:/({SSS}|{S})/},za={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}"},Z0="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}",va="{yyyy}-{MM}-{dd}",Hu={year:"{yyyy}",month:"{yyyy}-{MM}",day:va,hour:va+" "+za.hour,minute:va+" "+za.minute,second:va+" "+za.second,millisecond:Z0},or=["year","month","day","hour","minute","second","millisecond"],$0=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function K0(r){return!X(r)&&!q(r)?q0(r):r}function q0(r){r=r||{};var t={},e=!0;return C(or,function(n){e&&(e=r[n]==null)}),C(or,function(n,a){var i=r[n];t[n]={};for(var o=null,s=a;s>=0;s--){var l=or[s],u=$(i)&&!N(i)?i[l]:i,c=void 0;N(u)?(c=u.slice(),o=c[0]||""):X(u)?(o=u,c=[o]):(o==null?o=za[n]:X0[l].test(o)||(o=t[l][l][0]+" "+o),c=[o],e&&(c[1]="{primary|"+o+"}")),t[n][l]=c}}),t}function Mt(r,t){return r+="","0000".substr(0,t-r.length)+r}function Tn(r){switch(r){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return r}}function j0(r){return r===Tn(r)}function Q0(r){switch(r){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function Di(r,t,e,n){var a=$r(r),i=a[qh(e)](),o=a[hl(e)]()+1,s=Math.floor((o-1)/3)+1,l=a[dl(e)](),u=a["get"+(e?"UTC":"")+"Day"](),c=a[pl(e)](),f=(c-1)%12+1,h=a[gl(e)](),v=a[ml(e)](),d=a[yl(e)](),p=c>=12?"pm":"am",m=p.toUpperCase(),g=n instanceof he?n:H0(n||$h)||U0(),y=g.getModel("time"),_=y.get("month"),S=y.get("monthAbbr"),b=y.get("dayOfWeek"),x=y.get("dayOfWeekAbbr");return(t||"").replace(/{a}/g,p+"").replace(/{A}/g,m+"").replace(/{yyyy}/g,i+"").replace(/{yy}/g,Mt(i%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,_[o-1]).replace(/{MMM}/g,S[o-1]).replace(/{MM}/g,Mt(o,2)).replace(/{M}/g,o+"").replace(/{dd}/g,Mt(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,b[u]).replace(/{ee}/g,x[u]).replace(/{e}/g,u+"").replace(/{HH}/g,Mt(c,2)).replace(/{H}/g,c+"").replace(/{hh}/g,Mt(f+"",2)).replace(/{h}/g,f+"").replace(/{mm}/g,Mt(h,2)).replace(/{m}/g,h+"").replace(/{ss}/g,Mt(v,2)).replace(/{s}/g,v+"").replace(/{SSS}/g,Mt(d,3)).replace(/{S}/g,d+"")}function J0(r,t,e,n,a){var i=null;if(X(e))i=e;else if(q(e)){var o={time:r.time,level:r.time.level},s=Qa();s&&s.makeAxisLabelFormatterParamBreak(o,r.break),i=e(r.value,t,o)}else{var l=r.time;if(l){var u=e[l.lowerTimeUnit][l.upperTimeUnit];i=u[Math.min(l.level,u.length-1)]||""}else{var c=Ja(r.value,a);i=e[c][c][0]}}return Di(new Date(r.value),i,a,n)}function Ja(r,t){var e=$r(r),n=e[hl(t)]()+1,a=e[dl(t)](),i=e[pl(t)](),o=e[gl(t)](),s=e[ml(t)](),l=e[yl(t)](),u=l===0,c=u&&s===0,f=c&&o===0,h=f&&i===0,v=h&&a===1,d=v&&n===1;return d?"year":v?"month":h?"day":f?"hour":c?"minute":u?"second":"millisecond"}function qo(r,t,e){switch(t){case"year":r[jh(e)](0);case"month":r[Qh(e)](1);case"day":r[Jh(e)](0);case"hour":r[ed(e)](0);case"minute":r[td(e)](0);case"second":r[rd(e)](0)}return r}function qh(r){return r?"getUTCFullYear":"getFullYear"}function hl(r){return r?"getUTCMonth":"getMonth"}function dl(r){return r?"getUTCDate":"getDate"}function pl(r){return r?"getUTCHours":"getHours"}function gl(r){return r?"getUTCMinutes":"getMinutes"}function ml(r){return r?"getUTCSeconds":"getSeconds"}function yl(r){return r?"getUTCMilliseconds":"getMilliseconds"}function e_(r){return r?"setUTCFullYear":"setFullYear"}function jh(r){return r?"setUTCMonth":"setMonth"}function Qh(r){return r?"setUTCDate":"setDate"}function Jh(r){return r?"setUTCHours":"setHours"}function ed(r){return r?"setUTCMinutes":"setMinutes"}function td(r){return r?"setUTCSeconds":"setSeconds"}function rd(r){return r?"setUTCMilliseconds":"setMilliseconds"}function nd(r){if(!Yv(r))return X(r)?r:"-";var t=(r+"").split(".");return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")}function ad(r,t){return r=(r||"").toLowerCase().replace(/-(.)/g,function(e,n){return n.toUpperCase()}),t&&r&&(r=r.charAt(0).toUpperCase()+r.slice(1)),r}var Ai=Bv;function jo(r,t,e){var n="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function a(c){return c&&qn(c)?c:"-"}function i(c){return!!(c!=null&&!isNaN(c)&&isFinite(c))}var o=t==="time",s=r instanceof Date;if(o||s){var l=o?$r(r):r;if(isNaN(+l)){if(s)return"-"}else return Di(l,n,e)}if(t==="ordinal")return Po(r)?a(r):ce(r)&&i(r)?r+"":"-";var u=Ht(r);return i(u)?nd(u):Po(r)?a(r):typeof r=="boolean"?r+"":"-"}var Uu=["a","b","c","d","e","f","g"],Xi=function(r,t){return"{"+r+(t??"")+"}"};function id(r,t,e){N(t)||(t=[t]);var n=t.length;if(!n)return"";for(var a=t[0].$vars||[],i=0;i':'';var o=e.markerId||"markerX";return{renderMode:i,content:"{"+o+"|} ",style:a==="subItem"?{width:4,height:4,borderRadius:2,backgroundColor:n}:{width:10,height:10,borderRadius:5,backgroundColor:n}}}function vr(r,t){return t=t||"transparent",X(r)?r:$(r)&&r.colorStops&&(r.colorStops[0]||{}).color||t}function Yu(r,t){if(t==="_blank"||t==="blank"){var e=window.open();e.opener=null,e.location.href=r}else window.open(r,t)}var Va=C,r_=["left","right","top","bottom","width","height"],ha=[["width","left","right"],["height","top","bottom"]];function _l(r,t,e,n,a){var i=0,o=0;n==null&&(n=1/0),a==null&&(a=1/0);var s=0;t.eachChild(function(l,u){var c=l.getBoundingRect(),f=t.childAt(u+1),h=f&&f.getBoundingRect(),v,d;if(r==="horizontal"){var p=c.width+(h?-h.x+c.x:0);v=i+p,v>n||l.newline?(i=0,v=p,o+=s+e,s=c.height):s=Math.max(s,c.height)}else{var m=c.height+(h?-h.y+c.y:0);d=o+m,d>a||l.newline?(i+=s+e,o=0,d=m,s=c.width):s=Math.max(s,c.width)}l.newline||(l.x=i,l.y=o,l.markRedraw(),r==="horizontal"?i=v+e:o=d+e)})}var Br=_l;ne(_l,"vertical");ne(_l,"horizontal");function n_(r,t){return{left:r.getShallow("left",t),top:r.getShallow("top",t),right:r.getShallow("right",t),bottom:r.getShallow("bottom",t),width:r.getShallow("width",t),height:r.getShallow("height",t)}}function a_(r,t){var e=na(r,t,{enableLayoutOnlyByCenter:!0}),n=r.getBoxLayoutParams(),a,i;if(e.type===pn.point)i=e.refPoint,a=ct(n,{width:t.getWidth(),height:t.getHeight()});else{var o=r.get("center"),s=N(o)?o:[o,o];a=ct(n,e.refContainer),i=e.boxCoordFrom===Ko.coord2?e.refPoint:[se(s[0],a.width)+a.x,se(s[1],a.height)+a.y]}return{viewRect:a,center:i}}function i_(r,t){var e=a_(r,t),n=e.viewRect,a=e.center,i=r.get("radius");N(i)||(i=[0,i]);var o=se(n.width,t.getWidth()),s=se(n.height,t.getHeight()),l=Math.min(o,s),u=se(i[0],l/2),c=se(i[1],l/2);return{cx:a[0],cy:a[1],r0:u,r:c,viewRect:n}}function ct(r,t,e){e=Ai(e||0);var n=t.width,a=t.height,i=se(r.left,n),o=se(r.top,a),s=se(r.right,n),l=se(r.bottom,a),u=se(r.width,n),c=se(r.height,a),f=e[2]+e[0],h=e[1]+e[3],v=r.aspect;switch(isNaN(u)&&(u=n-s-h-i),isNaN(c)&&(c=a-l-f-o),v!=null&&(isNaN(u)&&isNaN(c)&&(v>n/a?u=n*.8:c=a*.8),isNaN(u)&&(u=v*c),isNaN(c)&&(c=u/v)),isNaN(i)&&(i=n-s-u-h),isNaN(o)&&(o=a-l-c-f),r.left||r.right){case"center":i=n/2-u/2-e[3];break;case"right":i=n-u-h;break}switch(r.top||r.bottom){case"middle":case"center":o=a/2-c/2-e[0];break;case"bottom":o=a-c-f;break}i=i||0,o=o||0,isNaN(u)&&(u=n-h-i-(s||0)),isNaN(c)&&(c=a-f-o-(l||0));var d=new Ee((t.x||0)+i+e[3],(t.y||0)+o+e[0],u,c);return d.margin=e,d}var pn={rect:1,point:2};function na(r,t,e){var n,a,i,o=r.boxCoordinateSystem,s;if(o){var l=C0(r),u=l.coord,c=l.from;if(o.dataToLayout){i=pn.rect,s=c;var f=o.dataToLayout(u);n=f.contentRect||f.rect}else e&&e.enableLayoutOnlyByCenter&&o.dataToPoint&&(i=pn.point,s=c,a=o.dataToPoint(u))}return i==null&&(i=pn.rect),i===pn.rect&&(n||(n={x:0,y:0,width:t.getWidth(),height:t.getHeight()}),a=[n.x+n.width/2,n.y+n.height/2]),{type:i,refContainer:n,refPoint:a,boxCoordFrom:s}}function o_(r,t,e,n,a,i){i=i||r,i.x=r.x,i.y=r.y;var o;if(o=r.getBoundingRect(),r.needLocalTransform()){var s=r.getLocalTransform();o=o.clone(),o.applyTransform(s)}var l=ct(oe({width:o.width,height:o.height},t),e,n),u=l.x-o.x,c=l.y-o.y;return i.x+=u,i.y+=c,i===r&&r.markRedraw(),!0}function zn(r){var t=r.layoutMode||r.constructor.layoutMode;return $(t)?t:t?{type:t}:null}function Yt(r,t,e){var n=e&&e.ignoreSize;!N(n)&&(n=[n,n]);var a=o(ha[0],0),i=o(ha[1],1);l(ha[0],r,a),l(ha[1],r,i);function o(u,c){var f={},h=0,v={},d=0,p=2;if(Va(u,function(y){v[y]=r[y]}),Va(u,function(y){ze(t,y)&&(f[y]=v[y]=t[y]),s(f,y)&&h++,s(v,y)&&d++}),n[c])return s(t,u[1])?v[u[2]]=null:s(t,u[2])&&(v[u[1]]=null),v;if(d===p||!h)return v;if(h>=p)return f;for(var m=0;m=0;l--)s=J(s,a[l],!0);n.defaultOption=s}return n.defaultOption},t.prototype.getReferringComponents=function(e,n){var a=e+"Index",i=e+"Id";return Jn(this.ecModel,e,{index:this.get(a,!0),id:this.get(i,!0)},n)},t.prototype.getBoxLayoutParams=function(){return n_(this,!1)},t.prototype.getZLevelKey=function(){return""},t.prototype.setZLevel=function(e){this.option.zlevel=e},t.protoInitialize=(function(){var e=t.prototype;e.type="component",e.id="",e.name="",e.mainType="",e.subType="",e.componentIndex=0})(),t})(he);Gv(ae,he);di(ae);z0(ae);V0(ae,u_);function u_(r){var t=[];return C(ae.getClassesByMainType(r),function(e){t=t.concat(e.dependencies||e.prototype.dependencies||[])}),t=Y(t,function(e){return it(e).main}),r!=="dataset"&&ue(t,"dataset")<=0&&t.unshift("dataset"),t}var Xu=fe(),c_=fe(),Sl=(function(){function r(){}return r.prototype.getColorFromPalette=function(t,e,n){var a=_e(this.get("color",!0)),i=this.get("colorLayer",!0);return od(this,Xu,a,i,t,e,n)},r.prototype.clearColorPalette=function(){v_(this,Xu)},r})();function Zu(r,t,e,n){var a=_e(r.get(["aria","decal","decals"]));return od(r,c_,a,null,t,e,n)}function f_(r,t){for(var e=r.length,n=0;nt)return r[n];return r[e-1]}function od(r,t,e,n,a,i,o){i=i||r;var s=t(i),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(a))return u[a];var c=o==null||!n?e:f_(n,o);if(c=c||e,!(!c||!c.length)){var f=c[l];return a&&(u[a]=f),s.paletteIdx=(l+1)%c.length,f}}function v_(r,t){t(r).paletteIdx=0,t(r).paletteNameMap={}}var h_=/\{@(.+?)\}/g,d_=(function(){function r(){}return r.prototype.getDataParams=function(t,e){var n=this.getData(e),a=this.getRawValue(t,e),i=n.getRawIndex(t),o=n.getName(t),s=n.getRawDataItem(t),l=n.getItemVisual(t,"style"),u=l&&l[n.getItemVisual(t,"drawType")||"fill"],c=l&&l.stroke,f=this.mainType,h=f==="series",v=n.userOutput&&n.userOutput.get();return{componentType:f,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:h?this.subType:null,seriesIndex:this.seriesIndex,seriesId:h?this.id:null,seriesName:h?this.name:null,name:o,dataIndex:i,data:s,dataType:e,value:a,color:u,borderColor:c,dimensionNames:v?v.fullDimensions:null,encode:v?v.encode:null,$vars:["seriesName","name","value"]}},r.prototype.getFormattedLabel=function(t,e,n,a,i,o){e=e||"normal";var s=this.getData(n),l=this.getDataParams(t,n);if(o&&(l.value=o.interpolatedValue),a!=null&&N(l.value)&&(l.value=l.value[a]),!i){var u=s.getItemModel(t);i=u.get(e==="normal"?["label","formatter"]:[e,"label","formatter"])}if(q(i))return l.status=e,l.dimensionIndex=a,i(l);if(X(i)){var c=id(i,l);return c.replace(h_,function(f,h){var v=h.length,d=h;d.charAt(0)==="["&&d.charAt(v-1)==="]"&&(d=+d.slice(1,v-1));var p=Fr(s,t,d);if(o&&N(o.interpolatedValue)){var m=s.getDimensionIndex(d);m>=0&&(p=o.interpolatedValue[m])}return p!=null?p+"":""})}},r.prototype.getRawValue=function(t,e){return Fr(this.getData(e),t)},r.prototype.formatTooltip=function(t,e,n){},r})();function $u(r){var t,e;return $(r)?r.type&&(e=r):t=r,{text:t,frag:e}}function Dn(r){return new p_(r)}var p_=(function(){function r(t){t=t||{},this._reset=t.reset,this._plan=t.plan,this._count=t.count,this._onDirty=t.onDirty,this._dirty=!0}return r.prototype.perform=function(t){var e=this._upstream,n=t&&t.skip;if(this._dirty&&e){var a=this.context;a.data=a.outputData=e.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var i;this._plan&&!n&&(i=this._plan(this.context));var o=c(this._modBy),s=this._modDataCount||0,l=c(t&&t.modBy),u=t&&t.modDataCount||0;(o!==l||s!==u)&&(i="reset");function c(y){return!(y>=1)&&(y=1),y}var f;(this._dirty||i==="reset")&&(this._dirty=!1,f=this._doReset(n)),this._modBy=l,this._modDataCount=u;var h=t&&t.step;if(e?this._dueEnd=e._outputDueEnd:this._dueEnd=this._count?this._count(this.context):1/0,this._progress){var v=this._dueIndex,d=Math.min(h!=null?this._dueIndex+h:1/0,this._dueEnd);if(!n&&(f||v1&&n>0?s:o}};return i;function o(){return t=r?null:l9e10&&(this._versionSignBase=0)},r.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},r.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},r.prototype._createSource=function(){this._setLocalSource([],[]);var t=this._sourceHost,e=this._getUpstreamSourceManagers(),n=!!e.length,a,i;if(da(t)){var o=t,s=void 0,l=void 0,u=void 0;if(n){var c=e[0];c.prepareSource(),u=c.getSource(),s=u.data,l=u.sourceFormat,i=[c._getVersionSign()]}else s=o.get("data",!0),l=We(s)?Ft:Ue,i=[];var f=this._getSourceMetaRawOption()||{},h=u&&u.metaRawOption||{},v=j(f.seriesLayoutBy,h.seriesLayoutBy)||null,d=j(f.sourceHeader,h.sourceHeader),p=j(f.dimensions,h.dimensions),m=v!==h.seriesLayoutBy||!!d!=!!h.sourceHeader||p;a=m?[Xo(s,{seriesLayoutBy:v,sourceHeader:d,dimensions:p},l)]:[]}else{var g=t;if(n){var y=this._applyTransform(e);a=y.sourceList,i=y.upstreamSignList}else{var _=g.get("source",!0);a=[Xo(_,this._getSourceMetaRawOption(),null)],i=[]}}this._setLocalSource(a,i)},r.prototype._applyTransform=function(t){var e=this._sourceHost,n=e.get("transform",!0),a=e.get("fromTransformResult",!0);if(a!=null){var i="";t.length!==1&&ju(i)}var o,s=[],l=[];return C(t,function(u){u.prepareSource();var c=u.getSource(a||0),f="";a!=null&&!c&&ju(f),s.push(c),l.push(u._getVersionSign())}),n?o=w_(n,s,{datasetIndex:e.componentIndex}):a!=null&&(o=[jy(s[0])]),{sourceList:o,upstreamSignList:l}},r.prototype._isDirty=function(){if(this._dirty)return!0;for(var t=this._getUpstreamSourceManagers(),e=0;e1||e>0&&!r.noHeader;return C(r.blocks,function(a){var i=vd(a);i>=t&&(t=i+ +(n&&(!i||Qo(a)&&!a.noHeader)))}),t}return 0}function M_(r,t,e,n){var a=t.noHeader,i=L_(vd(t)),o=[],s=t.blocks||[];ut(!s||N(s)),s=s||[];var l=r.orderMode;if(t.sortBlocks&&l){s=s.slice();var u={valueAsc:"asc",valueDesc:"desc"};if(ze(u,l)){var c=new Nh(u[l],null);s.sort(function(p,m){return c.evaluate(p.sortParam,m.sortParam)})}else l==="seriesDesc"&&s.reverse()}C(s,function(p,m){var g=t.valueFormatter,y=fd(p)(g?W(W({},r),{valueFormatter:g}):r,p,m>0?i.html:0,n);y!=null&&o.push(y)});var f=r.renderMode==="richText"?o.join(i.richText):Jo(n,o.join(""),a?e:i.html);if(a)return f;var h=jo(t.header,"ordinal",r.useUTC),v=cd(n,r.renderMode).nameStyle,d=ud(n);return r.renderMode==="richText"?hd(r,h,v)+i.richText+f:Jo(n,'
'+Ne(h)+"
"+f,e)}function I_(r,t,e,n){var a=r.renderMode,i=t.noName,o=t.noValue,s=!t.markerType,l=t.name,u=r.useUTC,c=t.valueFormatter||r.valueFormatter||function(S){return S=N(S)?S:[S],Y(S,function(b,x){return jo(b,N(v)?v[x]:v,u)})};if(!(i&&o)){var f=s?"":r.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||z.color.secondary,a),h=i?"":jo(l,"ordinal",u),v=t.valueType,d=o?[]:c(t.value,t.dataIndex),p=!s||!i,m=!s&&i,g=cd(n,a),y=g.nameStyle,_=g.valueStyle;return a==="richText"?(s?"":f)+(i?"":hd(r,h,y))+(o?"":R_(r,d,p,m,_)):Jo(n,(s?"":f)+(i?"":P_(h,!s,y))+(o?"":k_(d,p,m,_)),e)}}function Ju(r,t,e,n,a,i){if(r){var o=fd(r),s={useUTC:a,renderMode:e,orderMode:n,markupStyleCreator:t,valueFormatter:r.valueFormatter};return o(s,r,0,i)}}function L_(r){return{html:D_[r],richText:A_[r]}}function Jo(r,t,e){var n='
',a="margin: "+e+"px 0 0",i=ud(r);return'
'+t+n+"
"}function P_(r,t,e){var n=t?"margin-left:2px":"";return''+Ne(r)+""}function k_(r,t,e,n){var a=e?"10px":"20px",i=t?"float:right;margin-left:"+a:"";return r=N(r)?r:[r],''+Y(r,function(o){return Ne(o)}).join("  ")+""}function hd(r,t,e){return r.markupStyleCreator.wrapRichTextStyle(t,e)}function R_(r,t,e,n,a){var i=[a],o=n?10:20;return e&&i.push({padding:[0,0,0,o],align:"right"}),r.markupStyleCreator.wrapRichTextStyle(N(t)?t.join(" "):t,i)}function E_(r,t){var e=r.getData().getItemVisual(t,"style"),n=e[r.visualDrawType];return vr(n)}function dd(r,t){var e=r.get("padding");return e??(t==="richText"?[8,10]:10)}var Zi=(function(){function r(){this.richTextStyles={},this._nextStyleNameId=Xv()}return r.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},r.prototype.makeTooltipMarker=function(t,e,n){var a=n==="richText"?this._generateStyleName():null,i=t_({color:e,type:t,renderMode:n,markerId:a});return X(i)?i:(this.richTextStyles[a]=i.style,i.content)},r.prototype.wrapRichTextStyle=function(t,e){var n={};N(e)?C(e,function(i){return W(n,i)}):W(n,e);var a=this._generateStyleName();return this.richTextStyles[a]=n,"{"+a+"|"+t+"}"},r})();function O_(r){var t=r.series,e=r.dataIndex,n=r.multipleSeries,a=t.getData(),i=a.mapDimensionsAll("defaultedTooltip"),o=i.length,s=t.getRawValue(e),l=N(s),u=E_(t,e),c,f,h,v;if(o>1||l&&!o){var d=B_(s,t,e,i,u);c=d.inlineValues,f=d.inlineValueTypes,h=d.blocks,v=d.inlineValues[0]}else if(o){var p=a.getDimensionInfo(i[0]);v=c=Fr(a,e,i[0]),f=p.type}else v=c=l?s[0]:s;var m=Us(t),g=m&&t.name||"",y=a.getName(e),_=n?g:y;return Vn("section",{header:g,noHeader:n||!m,sortParam:v,blocks:[Vn("nameValue",{markerType:"item",markerColor:u,name:_,noName:!qn(_),value:c,valueType:f,dataIndex:e})].concat(h||[])})}function B_(r,t,e,n,a){var i=t.getData(),o=Wa(r,function(f,h,v){var d=i.getDimensionInfo(v);return f=f||d&&d.tooltip!==!1&&d.displayName!=null},!1),s=[],l=[],u=[];n.length?C(n,function(f){c(Fr(i,e,f),f)}):C(r,c);function c(f,h){var v=i.getDimensionInfo(h);!v||v.otherDims.tooltip===!1||(o?u.push(Vn("nameValue",{markerType:"subItem",markerColor:a,name:v.displayName,value:f,valueType:v.type})):(s.push(f),l.push(v.type)))}return{inlineValues:s,inlineValueTypes:l,blocks:u}}var It=fe();function pa(r,t){return r.getName(t)||r.getId(t)}var Ga="__universalTransitionEnabled",He=(function(r){H(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e._selectedDataIndicesMap={},e}return t.prototype.init=function(e,n,a){this.seriesIndex=this.componentIndex,this.dataTask=Dn({count:z_,reset:V_}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,a);var i=It(this).sourceManager=new ld(this);i.prepareSource();var o=this.getInitialData(e,a);tc(o,this),this.dataTask.context.data=o,It(this).dataBeforeProcessed=o,ec(this),this._initSelectedMapFromData(o)},t.prototype.mergeDefaultAndTheme=function(e,n){var a=zn(this),i=a?aa(e):{},o=this.subType;ae.hasClass(o)&&(o+="Series"),J(e,n.getTheme().get(this.subType)),J(e,this.getDefaultOption()),No(e,"label",["show"]),this.fillDataTextStyle(e.data),a&&Yt(e,i,a)},t.prototype.mergeOption=function(e,n){e=J(this.option,e,!0),this.fillDataTextStyle(e.data);var a=zn(this);a&&Yt(this.option,e,a);var i=It(this).sourceManager;i.dirty(),i.prepareSource();var o=this.getInitialData(e,n);tc(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,It(this).dataBeforeProcessed=o,ec(this),this._initSelectedMapFromData(o)},t.prototype.fillDataTextStyle=function(e){if(e&&!We(e))for(var n=["show"],a=0;a=0&&h<0)&&(f=y,h=g,v=0),g===h&&(c[v++]=p))}),c.length=v,c},t.prototype.formatTooltip=function(e,n,a){return O_({series:this,dataIndex:e,multipleSeries:n})},t.prototype.isAnimationEnabled=function(){var e=this.ecModel;if(ye.node&&!(e&&e.ssr))return!1;var n=this.getShallow("animation");return n&&this.getData().count()>this.getShallow("animationThreshold")&&(n=!1),!!n},t.prototype.restoreData=function(){this.dataTask.dirty()},t.prototype.getColorFromPalette=function(e,n,a){var i=this.ecModel,o=Sl.prototype.getColorFromPalette.call(this,e,n,a);return o||(o=i.getColorFromPalette(e,n,a)),o},t.prototype.coordDimToDataDim=function(e){return this.getRawData().mapDimensionsAll(e)},t.prototype.getProgressive=function(){return this.get("progressive")},t.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},t.prototype.select=function(e,n){this._innerSelect(this.getData(n),e)},t.prototype.unselect=function(e,n){var a=this.option.selectedMap;if(a){var i=this.option.selectedMode,o=this.getData(n);if(i==="series"||a==="all"){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var s=0;s=0&&a.push(o)}return a},t.prototype.isSelected=function(e,n){var a=this.option.selectedMap;if(!a)return!1;var i=this.getData(n);return(a==="all"||a[pa(i,e)])&&!i.getItemModel(e).get(["select","disabled"])},t.prototype.isUniversalTransitionEnabled=function(){if(this[Ga])return!0;var e=this.option.universalTransition;return e?e===!0?!0:e&&e.enabled:!1},t.prototype._innerSelect=function(e,n){var a,i,o=this.option,s=o.selectedMode,l=n.length;if(!(!s||!l)){if(s==="series")o.selectedMap="all";else if(s==="multiple"){$(o.selectedMap)||(o.selectedMap={});for(var u=o.selectedMap,c=0;c0&&this._innerSelect(e,n)}},t.registerClass=function(e){return ae.registerClass(e)},t.protoInitialize=(function(){var e=t.prototype;e.type="series.__base__",e.seriesIndex=0,e.ignoreStyleOnData=!1,e.hasSymbolVisual=!1,e.defaultSymbol="circle",e.visualStyleAccessPath="itemStyle",e.visualDrawType="fill"})(),t})(ae);bt(He,d_);bt(He,Sl);Gv(He,ae);function ec(r){var t=r.name;Us(r)||(r.name=N_(r)||t)}function N_(r){var t=r.getRawData(),e=t.mapDimensionsAll("seriesName"),n=[];return C(e,function(a){var i=t.getDimensionInfo(a);i.displayName&&n.push(i.displayName)}),n.join(" ")}function z_(r){return r.model.getRawData().count()}function V_(r){var t=r.model;return t.setData(t.getRawData().cloneShallow()),G_}function G_(r,t){t.outputData&&r.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function tc(r,t){C(em(r.CHANGABLE_METHODS,r.DOWNSAMPLE_METHODS),function(e){r.wrapMethod(e,ne(F_,t))})}function F_(r,t){var e=es(r);return e&&e.setOutputEnd((t||this).count()),t}function es(r){var t=(r.ecModel||{}).scheduler,e=t&&t.getPipeline(r.uid);if(e){var n=e.currentTask;if(n){var a=n.agentStubMap;a&&(n=a.get(r.uid))}return n}}var W_=Ce.extend({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(r,t){var e=t.cx,n=t.cy,a=t.width/2,i=t.height/2;r.moveTo(e,n-i),r.lineTo(e+a,n+i),r.lineTo(e-a,n+i),r.closePath()}}),H_=Ce.extend({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(r,t){var e=t.cx,n=t.cy,a=t.width/2,i=t.height/2;r.moveTo(e,n-i),r.lineTo(e+a,n),r.lineTo(e,n+i),r.lineTo(e-a,n),r.closePath()}}),U_=Ce.extend({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(r,t){var e=t.x,n=t.y,a=t.width/5*3,i=Math.max(a,t.height),o=a/2,s=o*o/(i-o),l=n-i+o+s,u=Math.asin(s/o),c=Math.cos(u)*o,f=Math.sin(u),h=Math.cos(u),v=o*.6,d=o*.7;r.moveTo(e-c,l+s),r.arc(e,l,o,Math.PI-u,Math.PI*2+u),r.bezierCurveTo(e+c-f*v,l+s+h*v,e,n-d,e,n),r.bezierCurveTo(e,n-d,e-c+f*v,l+s+h*v,e-c,l+s),r.closePath()}}),Y_=Ce.extend({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(r,t){var e=t.height,n=t.width,a=t.x,i=t.y,o=n/3*2;r.moveTo(a,i),r.lineTo(a+o,i+e),r.lineTo(a,i+e/4*3),r.lineTo(a-o,i+e),r.lineTo(a,i),r.closePath()}}),X_={line:ur,rect:de,roundRect:de,square:de,circle:hi,diamond:H_,pin:U_,arrow:Y_,triangle:W_},Z_={line:function(r,t,e,n,a){a.x1=r,a.y1=t+n/2,a.x2=r+e,a.y2=t+n/2},rect:function(r,t,e,n,a){a.x=r,a.y=t,a.width=e,a.height=n},roundRect:function(r,t,e,n,a){a.x=r,a.y=t,a.width=e,a.height=n,a.r=Math.min(e,n)/4},square:function(r,t,e,n,a){var i=Math.min(e,n);a.x=r,a.y=t,a.width=i,a.height=i},circle:function(r,t,e,n,a){a.cx=r+e/2,a.cy=t+n/2,a.r=Math.min(e,n)/2},diamond:function(r,t,e,n,a){a.cx=r+e/2,a.cy=t+n/2,a.width=e,a.height=n},pin:function(r,t,e,n,a){a.x=r+e/2,a.y=t+n/2,a.width=e,a.height=n},arrow:function(r,t,e,n,a){a.x=r+e/2,a.y=t+n/2,a.width=e,a.height=n},triangle:function(r,t,e,n,a){a.cx=r+e/2,a.cy=t+n/2,a.width=e,a.height=n}},ts={};C(X_,function(r,t){ts[t]=new r});var $_=Ce.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(r,t,e){var n=Ro(r,t,e),a=this.shape;return a&&a.symbolType==="pin"&&t.position==="inside"&&(n.y=e.y+e.height*.4),n},buildPath:function(r,t,e){var n=t.symbolType;if(n!=="none"){var a=ts[n];a||(n="rect",a=ts[n]),Z_[n](t.x,t.y,t.width,t.height,a.shape),a.buildPath(r,a.shape,e)}}});function K_(r,t){if(this.type!=="image"){var e=this.style;this.__isEmptyBrush?(e.stroke=r,e.fill=t||z.color.neutral00,e.lineWidth=2):this.shape.symbolType==="line"?e.stroke=r:e.fill=r,this.markRedraw()}}function Xt(r,t,e,n,a,i,o){var s=r.indexOf("empty")===0;s&&(r=r.substr(5,1).toLowerCase()+r.substr(6));var l;return r.indexOf("image://")===0?l=ch(r.slice(8),new Ee(t,e,n,a),o?"center":"cover"):r.indexOf("path://")===0?l=Qs(r.slice(7),{},new Ee(t,e,n,a),o?"center":"cover"):l=new $_({shape:{symbolType:r,x:t,y:e,width:n,height:a}}),l.__isEmptyBrush=s,l.setColor=K_,i&&l.setColor(i),l}function q_(r){return N(r)||(r=[+r,+r]),[r[0]||0,r[1]||0]}function bl(r,t){if(r!=null)return N(r)||(r=[r,r]),[se(r[0],t[0])||0,se(j(r[1],r[0]),t[1])||0]}var j_=(function(r){H(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.hasSymbolVisual=!0,e}return t.prototype.getInitialData=function(e){return Ti(null,this,{useEncodeDefaulter:!0})},t.prototype.getLegendIcon=function(e){var n=new Se,a=Xt("line",0,e.itemHeight/2,e.itemWidth,0,e.lineStyle.stroke,!1);n.add(a),a.setStyle(e.lineStyle);var i=this.getData().getVisual("symbol"),o=this.getData().getVisual("symbolRotate"),s=i==="none"?"circle":i,l=e.itemHeight*.8,u=Xt(s,(e.itemWidth-l)/2,(e.itemHeight-l)/2,l,l,e.itemStyle.fill);n.add(u),u.setStyle(e.itemStyle);var c=e.iconRotate==="inherit"?o:e.iconRotate||0;return u.rotation=c*Math.PI/180,u.setOrigin([e.itemWidth/2,e.itemHeight/2]),s.indexOf("empty")>-1&&(u.style.stroke=u.style.fill,u.style.fill=z.color.neutral00,u.style.lineWidth=2),n},t.type="series.line",t.dependencies=["grid","polar"],t.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:6,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},t})(He);function Mi(r,t){var e=r.mapDimensionsAll("defaultedLabel"),n=e.length;if(n===1){var a=Fr(r,t,e[0]);return a!=null?a+"":null}else if(n){for(var i=[],o=0;o=0&&n.push(t[i])}return n.join(" ")}var wl=(function(r){H(t,r);function t(e,n,a,i){var o=r.call(this)||this;return o.updateData(e,n,a,i),o}return t.prototype._createSymbol=function(e,n,a,i,o,s){this.removeAll();var l=Xt(e,-1,-1,2,2,null,s);l.attr({z2:j(o,100),culling:!0,scaleX:i[0]/2,scaleY:i[1]/2}),l.drift=Q_,this._symbolType=e,this.add(l)},t.prototype.stopSymbolAnimation=function(e){this.childAt(0).stopAnimation(null,e)},t.prototype.getSymbolType=function(){return this._symbolType},t.prototype.getSymbolPath=function(){return this.childAt(0)},t.prototype.highlight=function(){zr(this.childAt(0))},t.prototype.downplay=function(){Vr(this.childAt(0))},t.prototype.setZ=function(e,n){var a=this.childAt(0);a.zlevel=e,a.z=n},t.prototype.setDraggable=function(e,n){var a=this.childAt(0);a.draggable=e,a.cursor=!n&&e?"move":a.cursor},t.prototype.updateData=function(e,n,a,i){this.silent=!1;var o=e.getItemVisual(n,"symbol")||"circle",s=e.hostModel,l=t.getSymbolSize(e,n),u=t.getSymbolZ2(e,n),c=o!==this._symbolType,f=i&&i.disableAnimation;if(c){var h=e.getItemVisual(n,"symbolKeepAspect");this._createSymbol(o,e,n,l,u,h)}else{var v=this.childAt(0);v.silent=!1;var d={scaleX:l[0]/2,scaleY:l[1]/2};f?v.attr(d):Ae(v,d,s,n),_i(v)}if(this._updateCommon(e,n,l,a,i),c){var v=this.childAt(0);if(!f){var d={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:v.style.opacity}};v.scaleX=v.scaleY=0,v.style.opacity=0,Ve(v,d,s,n)}}f&&this.childAt(0).stopAnimation("leave")},t.prototype._updateCommon=function(e,n,a,i,o){var s=this.childAt(0),l=e.hostModel,u,c,f,h,v,d,p,m,g;if(i&&(u=i.emphasisItemStyle,c=i.blurItemStyle,f=i.selectItemStyle,h=i.focus,v=i.blurScope,p=i.labelStatesModels,m=i.hoverScale,g=i.cursorStyle,d=i.emphasisDisabled),!i||e.hasItemOption){var y=i&&i.itemModel?i.itemModel:e.getItemModel(n),_=y.getModel("emphasis");u=_.getModel("itemStyle").getItemStyle(),f=y.getModel(["select","itemStyle"]).getItemStyle(),c=y.getModel(["blur","itemStyle"]).getItemStyle(),h=_.get("focus"),v=_.get("blurScope"),d=_.get("disabled"),p=qr(y),m=_.getShallow("scale"),g=y.getShallow("cursor")}var S=e.getItemVisual(n,"symbolRotate");s.attr("rotation",(S||0)*Math.PI/180||0);var b=bl(e.getItemVisual(n,"symbolOffset"),a);b&&(s.x=b[0],s.y=b[1]),g&&s.attr("cursor",g);var x=e.getItemVisual(n,"style"),w=x.fill;if(s instanceof Zr){var T=s.style;s.useStyle(W({image:T.image,x:T.x,y:T.y,width:T.width,height:T.height},x))}else s.__isEmptyBrush?s.useStyle(W({},x)):s.useStyle(x),s.style.decal=null,s.setColor(w,o&&o.symbolInnerColor),s.style.strokeNoScale=!0;var D=e.getItemVisual(n,"liftZ"),M=this._z2;D!=null?M==null&&(this._z2=s.z2,s.z2+=D):M!=null&&(s.z2=M,this._z2=null);var A=o&&o.useNameLabel;Kr(s,p,{labelFetcher:l,labelDataIndex:n,defaultText:L,inheritColor:w,defaultOpacity:x.opacity});function L(k){return A?e.getName(k):Mi(e,k)}this._sizeX=a[0]/2,this._sizeY=a[1]/2;var I=s.ensureState("emphasis");I.style=u,s.ensureState("select").style=f,s.ensureState("blur").style=c;var P=m==null||m===!0?Math.max(1.1,3/this._sizeY):isFinite(m)&&m>0?+m:1;I.scaleX=this._sizeX*P,I.scaleY=this._sizeY*P,this.setSymbolScale(1),fr(this,h,v,d)},t.prototype.setSymbolScale=function(e){this.scaleX=this.scaleY=e},t.prototype.fadeOut=function(e,n,a){var i=this.childAt(0),o=ee(this).dataIndex,s=a&&a.animation;if(this.silent=i.silent=!0,a&&a.fadeLabel){var l=i.getTextContent();l&&En(l,{style:{opacity:0}},n,{dataIndex:o,removeOpt:s,cb:function(){i.removeTextContent()}})}else i.removeTextContent();En(i,{style:{opacity:0},scaleX:0,scaleY:0},n,{dataIndex:o,cb:e,removeOpt:s})},t.getSymbolSize=function(e,n){return q_(e.getItemVisual(n,"symbolSize"))},t.getSymbolZ2=function(e,n){return e.getItemVisual(n,"z2")},t})(Se);function Q_(r,t){this.parent.drift(r,t)}function $i(r,t,e,n){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(n.isIgnore&&n.isIgnore(e))&&!(n.clipShape&&!n.clipShape.contain(t[0],t[1]))&&r.getItemVisual(e,"symbol")!=="none"}function rc(r){return r!=null&&!$(r)&&(r={isIgnore:r}),r||{}}function nc(r){var t=r.hostModel,e=t.getModel("emphasis");return{emphasisItemStyle:e.getModel("itemStyle").getItemStyle(),blurItemStyle:t.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:t.getModel(["select","itemStyle"]).getItemStyle(),focus:e.get("focus"),blurScope:e.get("blurScope"),emphasisDisabled:e.get("disabled"),hoverScale:e.get("scale"),labelStatesModels:qr(t),cursorStyle:t.get("cursor")}}var gd=(function(){function r(t){this.group=new Se,this._SymbolCtor=t||wl}return r.prototype.updateData=function(t,e){this._progressiveEls=null,e=rc(e);var n=this.group,a=t.hostModel,i=this._data,o=this._SymbolCtor,s=e.disableAnimation,l=nc(t),u={disableAnimation:s},c=e.getSymbolPoint||function(f){return t.getItemLayout(f)};i||n.removeAll(),t.diff(i).add(function(f){var h=c(f);if($i(t,h,f,e)){var v=new o(t,f,l,u);v.setPosition(h),t.setItemGraphicEl(f,v),n.add(v)}}).update(function(f,h){var v=i.getItemGraphicEl(h),d=c(f);if(!$i(t,d,f,e)){n.remove(v);return}var p=t.getItemVisual(f,"symbol")||"circle",m=v&&v.getSymbolType&&v.getSymbolType();if(!v||m&&m!==p)n.remove(v),v=new o(t,f,l,u),v.setPosition(d);else{v.updateData(t,f,l,u);var g={x:d[0],y:d[1]};s?v.attr(g):Ae(v,g,a)}n.add(v),t.setItemGraphicEl(f,v)}).remove(function(f){var h=i.getItemGraphicEl(f);h&&h.fadeOut(function(){n.remove(h)},a)}).execute(),this._getSymbolPoint=c,this._data=t},r.prototype.updateLayout=function(){var t=this,e=this._data;e&&e.eachItemGraphicEl(function(n,a){var i=t._getSymbolPoint(a);n.setPosition(i),n.markRedraw()})},r.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=nc(t),this._data=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(t,e,n){this._progressiveEls=[],n=rc(n);function a(l){l.isGroup||(l.incremental=!0,l.ensureState("emphasis").hoverLayer=!0)}for(var i=t.start;i0?e=n[0]:n[1]<0&&(e=n[1]),e}function yd(r,t,e,n){var a=NaN;r.stacked&&(a=e.get(e.getCalculationInfo("stackedOverDimension"),n)),isNaN(a)&&(a=r.valueStart);var i=r.baseDataOffset,o=[];return o[i]=e.get(r.baseDim,n),o[1-i]=a,t.dataToPoint(o)}var _d=typeof Float32Array<"u",eS=_d?Float32Array:Array;function st(r){return N(r)?_d?new Float32Array(r):r:new eS(r)}function tS(r,t){var e=[];return t.diff(r).add(function(n){e.push({cmd:"+",idx:n})}).update(function(n,a){e.push({cmd:"=",idx:a,idx1:n})}).remove(function(n){e.push({cmd:"-",idx:n})}).execute(),e}function rS(r,t,e,n,a,i,o,s){for(var l=tS(r,t),u=[],c=[],f=[],h=[],v=[],d=[],p=[],m=md(a,t,o),g=r.getLayout("points")||[],y=t.getLayout("points")||[],_=0;_=a||p<0)break;if(sr(g,y)){if(l){p+=i;continue}break}if(p===e)r[i>0?"moveTo":"lineTo"](g,y),f=g,h=y;else{var _=g-u,S=y-c;if(_*_+S*S<.5){p+=i;continue}if(o>0){for(var b=p+i,x=t[b*2],w=t[b*2+1];x===g&&w===y&&m=n||sr(x,w))v=g,d=y;else{M=x-u,A=w-c;var P=g-u,k=x-g,E=y-c,U=w-y,R=void 0,O=void 0;if(s==="x"){R=Math.abs(P),O=Math.abs(k);var V=M>0?1:-1;v=g-V*R*o,d=y,L=g+V*O*o,I=y}else if(s==="y"){R=Math.abs(E),O=Math.abs(U);var B=A>0?1:-1;v=g,d=y-B*R*o,L=g,I=y+B*O*o}else R=Math.sqrt(P*P+E*E),O=Math.sqrt(k*k+U*U),D=O/(O+R),v=g-M*o*(1-D),d=y-A*o*(1-D),L=g+M*o*D,I=y+A*o*D,L=Lt(L,Pt(x,g)),I=Lt(I,Pt(w,y)),L=Pt(L,Lt(x,g)),I=Pt(I,Lt(w,y)),M=L-g,A=I-y,v=g-M*R/O,d=y-A*R/O,v=Lt(v,Pt(u,g)),d=Lt(d,Pt(c,y)),v=Pt(v,Lt(u,g)),d=Pt(d,Lt(c,y)),M=g-v,A=y-d,L=g+M*O/R,I=y+A*O/R}r.bezierCurveTo(f,h,v,d,g,y),f=L,h=I}else r.lineTo(g,y)}u=g,c=y,p+=i}return m}var Sd=(function(){function r(){this.smooth=0,this.smoothConstraint=!0}return r})(),nS=(function(r){H(t,r);function t(e){var n=r.call(this,e)||this;return n.type="ec-polyline",n}return t.prototype.getDefaultStyle=function(){return{stroke:z.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new Sd},t.prototype.buildPath=function(e,n){var a=n.points,i=0,o=a.length/2;if(n.connectNulls){for(;o>0&&sr(a[o*2-2],a[o*2-1]);o--);for(;i=0){var S=u?(d-l)*_+l:(v-s)*_+s;return u?[e,S]:[S,e]}s=v,l=d;break;case o.C:v=i[f++],d=i[f++],p=i[f++],m=i[f++],g=i[f++],y=i[f++];var b=u?nu(s,v,p,g,e,c):nu(l,d,m,y,e,c);if(b>0)for(var x=0;x=0){var S=u?au(l,d,m,y,w):au(s,v,p,g,w);return u?[e,S]:[S,e]}}s=g,l=y;break}}},t})(Ce),aS=(function(r){H(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t})(Sd),iS=(function(r){H(t,r);function t(e){var n=r.call(this,e)||this;return n.type="ec-polygon",n}return t.prototype.getDefaultShape=function(){return new aS},t.prototype.buildPath=function(e,n){var a=n.points,i=n.stackedOnPoints,o=0,s=a.length/2,l=n.smoothMonotone;if(n.connectNulls){for(;s>0&&sr(a[s*2-2],a[s*2-1]);s--);for(;ot){i?e.push(o(i,l,t)):a&&e.push(o(a,l,0),o(a,l,t));break}else a&&(e.push(o(a,l,0)),a=null),e.push(l),i=l}return e}function vS(r,t,e){var n=r.getVisual("visualMeta");if(!(!n||!n.length||!r.count())&&t.type==="cartesian2d"){for(var a,i,o=n.length-1;o>=0;o--){var s=r.getDimensionInfo(n[o].dimension);if(a=s&&s.coordDim,a==="x"||a==="y"){i=n[o];break}}if(i){var l=t.getAxis(a),u=Y(i.stops,function(_){return{coord:l.toGlobalCoord(l.dataToCoord(_.value)),color:_.color}}),c=u.length,f=i.outerColors.slice();c&&u[0].coord>u[c-1].coord&&(u.reverse(),f.reverse());var h=fS(u,a==="x"?e.getWidth():e.getHeight()),v=h.length;if(!v&&c)return u[0].coord<0?f[1]?f[1]:u[c-1].color:f[0]?f[0]:u[0].color;var d=10,p=h[0].coord-d,m=h[v-1].coord+d,g=m-p;if(g<.001)return"transparent";C(h,function(_){_.offset=(_.coord-p)/g}),h.push({offset:v?h[v-1].offset:.5,color:f[1]||"transparent"}),h.unshift({offset:v?h[0].offset:.5,color:f[0]||"transparent"});var y=new Ev(0,0,0,0,h,!0);return y[a]=p,y[a+"2"]=m,y}}}function hS(r,t,e){var n=r.get("showAllSymbol"),a=n==="auto";if(!(n&&!a)){var i=e.getAxesByScale("ordinal")[0];if(i&&!(a&&dS(i,t))){var o=t.mapDimension(i.dim),s={};return C(i.getViewLabels(),function(l){var u=i.scale.getRawOrdinalNumber(l.tickValue);s[u]=1}),function(l){return!s.hasOwnProperty(t.get(o,l))}}}}function dS(r,t){var e=r.getExtent(),n=Math.abs(e[1]-e[0])/r.scale.count();isNaN(n)&&(n=0);for(var a=t.count(),i=Math.max(1,Math.round(a/5)),o=0;on)return!1;return!0}function pS(r,t){return isNaN(r)||isNaN(t)}function gS(r){for(var t=r.length/2;t>0&&pS(r[t*2-2],r[t*2-1]);t--);return t-1}function cc(r,t){return[r[t*2],r[t*2+1]]}function mS(r,t,e){for(var n=r.length/2,a=e==="x"?0:1,i,o,s=0,l=-1,u=0;u=t||i>=t&&o<=t){l=u;break}s=u,i=o}return{range:[s,l],t:(t-i)/(o-i)}}function Cd(r){if(r.get(["endLabel","show"]))return!0;for(var t=0;t0&&e.get(["emphasis","lineStyle","width"])==="bolder"){var O=d.getState("emphasis").style;O.lineWidth=+d.style.lineWidth+1}ee(d).seriesIndex=e.seriesIndex,fr(d,E,U,R);var V=uc(e.get("smooth")),B=e.get("smoothMonotone");if(d.setShape({smooth:V,smoothMonotone:B,connectNulls:w}),p){var G=s.getCalculationInfo("stackedOnSeries"),K=0;p.useStyle(oe(u.getAreaStyle(),{fill:L,opacity:.7,lineJoin:"bevel",decal:s.getVisual("style").decal})),G&&(K=uc(G.get("smooth"))),p.setShape({smooth:V,stackedOnSmooth:K,smoothMonotone:B,connectNulls:w}),Rn(p,e,"areaStyle"),ee(p).seriesIndex=e.seriesIndex,fr(p,E,U,R)}var te=this._changePolyState;s.eachItemGraphicEl(function(le){le&&(le.onHoverStateChange=te)}),this._polyline.onHoverStateChange=te,this._data=s,this._coordSys=i,this._stackedOnPoints=b,this._points=c,this._step=M,this._valueOrigin=_,e.get("triggerLineEvent")&&(this.packEventData(e,d),p&&this.packEventData(e,p))},t.prototype.packEventData=function(e,n){ee(n).eventData={componentType:"series",componentSubType:"line",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"line"}},t.prototype.highlight=function(e,n,a,i){var o=e.getData(),s=cr(o,i);if(this._changePolyState("emphasis"),!(s instanceof Array)&&s!=null&&s>=0){var l=o.getLayout("points"),u=o.getItemGraphicEl(s);if(!u){var c=l[s*2],f=l[s*2+1];if(isNaN(c)||isNaN(f)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(c,f))return;var h=e.get("zlevel")||0,v=e.get("z")||0;u=new wl(o,s),u.x=c,u.y=f,u.setZ(h,v);var d=u.getSymbolPath().getTextContent();d&&(d.zlevel=h,d.z=v,d.z2=this._polyline.z2+1),u.__temp=!0,o.setItemGraphicEl(s,u),u.stopSymbolAnimation(!0),this.group.add(u)}u.highlight()}else Be.prototype.highlight.call(this,e,n,a,i)},t.prototype.downplay=function(e,n,a,i){var o=e.getData(),s=cr(o,i);if(this._changePolyState("normal"),s!=null&&s>=0){var l=o.getItemGraphicEl(s);l&&(l.__temp?(o.setItemGraphicEl(s,null),this.group.remove(l)):l.downplay())}else Be.prototype.downplay.call(this,e,n,a,i)},t.prototype._changePolyState=function(e){var n=this._polygon;gu(this._polyline,e),n&&gu(n,e)},t.prototype._newPolyline=function(e){var n=this._polyline;return n&&this._lineGroup.remove(n),n=new nS({shape:{points:e},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(n),this._polyline=n,n},t.prototype._newPolygon=function(e,n){var a=this._polygon;return a&&this._lineGroup.remove(a),a=new iS({shape:{points:e,stackedOnPoints:n},segmentIgnoreThreshold:2}),this._lineGroup.add(a),this._polygon=a,a},t.prototype._initSymbolLabelAnimation=function(e,n,a){var i,o,s=n.getBaseAxis(),l=s.inverse;n.type==="cartesian2d"?(i=s.isHorizontal(),o=!1):n.type==="polar"&&(i=s.dim==="angle",o=!0);var u=e.hostModel,c=u.get("animationDuration");q(c)&&(c=c(null));var f=u.get("animationDelay")||0,h=q(f)?f(null):f;e.eachItemGraphicEl(function(v,d){var p=v;if(p){var m=[v.x,v.y],g=void 0,y=void 0,_=void 0;if(a)if(o){var S=a,b=n.pointToCoord(m);i?(g=S.startAngle,y=S.endAngle,_=-b[1]/180*Math.PI):(g=S.r0,y=S.r,_=b[0])}else{var x=a;i?(g=x.x,y=x.x+x.width,_=v.x):(g=x.y+x.height,y=x.y,_=v.y)}var w=y===g?0:(_-g)/(y-g);l&&(w=1-w);var T=q(f)?f(d):c*w+h,D=p.getSymbolPath(),M=D.getTextContent();p.attr({scaleX:0,scaleY:0}),p.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:T}),M&&M.animateFrom({style:{opacity:0}},{duration:300,delay:T}),D.disableLabelAnimation=!0}})},t.prototype._initOrUpdateEndLabel=function(e,n,a){var i=e.getModel("endLabel");if(Cd(e)){var o=e.getData(),s=this._polyline,l=o.getLayout("points");if(!l){s.removeTextContent(),this._endLabel=null;return}var u=this._endLabel;u||(u=this._endLabel=new De({z2:200}),u.ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var c=gS(l);c>=0&&(Kr(s,qr(e,"endLabel"),{inheritColor:a,labelFetcher:e,labelDataIndex:c,defaultText:function(f,h,v){return v!=null?pd(o,v):Mi(o,f)},enableTextSetter:!0},yS(i,n)),s.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},t.prototype._endLabelOnDuring=function(e,n,a,i,o,s,l){var u=this._endLabel,c=this._polyline;if(u){e<1&&i.originalX==null&&(i.originalX=u.x,i.originalY=u.y);var f=a.getLayout("points"),h=a.hostModel,v=h.get("connectNulls"),d=s.get("precision"),p=s.get("distance")||0,m=l.getBaseAxis(),g=m.isHorizontal(),y=m.inverse,_=n.shape,S=y?g?_.x:_.y+_.height:g?_.x+_.width:_.y,b=(g?p:0)*(y?-1:1),x=(g?0:-p)*(y?-1:1),w=g?"x":"y",T=mS(f,S,w),D=T.range,M=D[1]-D[0],A=void 0;if(M>=1){if(M>1&&!v){var L=cc(f,D[0]);u.attr({x:L[0]+b,y:L[1]+x}),o&&(A=h.getRawValue(D[0]))}else{var L=c.getPointOn(S,w);L&&u.attr({x:L[0]+b,y:L[1]+x});var I=h.getRawValue(D[0]),P=h.getRawValue(D[1]);o&&(A=ay(a,d,I,P,T.t))}i.lastFrameIndex=D[0]}else{var k=e===1||i.lastFrameIndex>0?D[0]:0,L=cc(f,k);o&&(A=h.getRawValue(k)),u.attr({x:L[0]+b,y:L[1]+x})}if(o){var E=bi(u);typeof E.setLabelText=="function"&&E.setLabelText(A)}}},t.prototype._doUpdateAnimation=function(e,n,a,i,o,s,l){var u=this._polyline,c=this._polygon,f=e.hostModel,h=rS(this._data,e,this._stackedOnPoints,n,this._coordSys,a,this._valueOrigin),v=h.current,d=h.stackedOnCurrent,p=h.next,m=h.stackedOnNext;if(o&&(d=kt(h.stackedOnCurrent,h.current,a,o,l),v=kt(h.current,null,a,o,l),m=kt(h.stackedOnNext,h.next,a,o,l),p=kt(h.next,null,a,o,l)),lc(v,p)>3e3||c&&lc(d,m)>3e3){u.stopAnimation(),u.setShape({points:p}),c&&(c.stopAnimation(),c.setShape({points:p,stackedOnPoints:m}));return}u.shape.__points=h.current,u.shape.points=v;var g={shape:{points:p}};h.current!==v&&(g.shape.__points=h.next),u.stopAnimation(),Ae(u,g,f),c&&(c.setShape({points:v,stackedOnPoints:d}),c.stopAnimation(),Ae(c,{shape:{stackedOnPoints:m}},f),u.shape.points!==c.shape.points&&(c.shape.points=u.shape.points));for(var y=[],_=h.status,S=0;S<_.length;S++){var b=_[S].cmd;if(b==="="){var x=e.getItemGraphicEl(_[S].idx1);x&&y.push({el:x,ptIdx:S})}}u.animators&&u.animators.length&&u.animators[0].during(function(){c&&c.dirtyShape();for(var w=u.shape.__points,T=0;Tt&&(t=r[e]);return isFinite(t)?t:NaN},min:function(r){for(var t=1/0,e=0;e10&&o.type==="cartesian2d"&&i){var l=o.getBaseAxis(),u=o.getOtherAxis(l),c=l.getExtent(),f=n.getDevicePixelRatio(),h=Math.abs(c[1]-c[0])*(f||1),v=Math.round(s/h);if(isFinite(v)&&v>1){i==="lttb"?t.setData(a.lttbDownSample(a.mapDimension(u.dim),1/v)):i==="minmax"&&t.setData(a.minmaxDownSample(a.mapDimension(u.dim),1/v));var d=void 0;X(i)?d=SS[i]:q(i)&&(d=i),d&&t.setData(a.downSample(a.mapDimension(u.dim),1/v,d,xS))}}}}}function TD(r){r.registerChartView(_S),r.registerSeriesModel(j_),r.registerLayout(Dl("line",!0)),r.registerVisual({seriesType:"line",reset:function(t){var e=t.getData(),n=t.getModel("lineStyle").getLineStyle();n&&!n.stroke&&(n.stroke=e.getVisual("style").fill),e.setVisual("legendLineStyle",n)}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,Td("line"))}var bS="__ec_stack_";function Dd(r){return r.get("stack")||bS+r.seriesIndex}function Al(r){return r.dim+r.index}function Ad(r,t){var e=[];return t.eachSeriesByType(r,function(n){Pd(n)&&e.push(n)}),e}function wS(r){var t={};C(r,function(l){var u=l.coordinateSystem,c=u.getBaseAxis();if(!(c.type!=="time"&&c.type!=="value"))for(var f=l.getData(),h=c.dim+"_"+c.index,v=f.getDimensionIndex(f.mapDimension(c.dim)),d=f.getStore(),p=0,m=d.count();p0&&(i=i===null?s:Math.min(i,s))}e[n]=i}}return e}function Md(r){var t=wS(r),e=[];return C(r,function(n){var a=n.coordinateSystem,i=a.getBaseAxis(),o=i.getExtent(),s;if(i.type==="category")s=i.getBandWidth();else if(i.type==="value"||i.type==="time"){var l=i.dim+"_"+i.index,u=t[l],c=Math.abs(o[1]-o[0]),f=i.scale.getExtent(),h=Math.abs(f[1]-f[0]);s=u?c/h*u:c}else{var v=n.getData();s=Math.abs(o[1]-o[0])/v.count()}var d=se(n.get("barWidth"),s),p=se(n.get("barMaxWidth"),s),m=se(n.get("barMinWidth")||(kd(n)?.5:1),s),g=n.get("barGap"),y=n.get("barCategoryGap"),_=n.get("defaultBarGap");e.push({bandWidth:s,barWidth:d,barMaxWidth:p,barMinWidth:m,barGap:g,barCategoryGap:y,defaultBarGap:_,axisKey:Al(i),stackId:Dd(n)})}),CS(e)}function CS(r){var t={};C(r,function(n,a){var i=n.axisKey,o=n.bandWidth,s=t[i]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:n.defaultBarGap||0,stacks:{}},l=s.stacks;t[i]=s;var u=n.stackId;l[u]||s.autoWidthCount++,l[u]=l[u]||{width:0,maxWidth:0};var c=n.barWidth;c&&!l[u].width&&(l[u].width=c,c=Math.min(s.remainedWidth,c),s.remainedWidth-=c);var f=n.barMaxWidth;f&&(l[u].maxWidth=f);var h=n.barMinWidth;h&&(l[u].minWidth=h);var v=n.barGap;v!=null&&(s.gap=v);var d=n.barCategoryGap;d!=null&&(s.categoryGap=d)});var e={};return C(t,function(n,a){e[a]={};var i=n.stacks,o=n.bandWidth,s=n.categoryGap;if(s==null){var l=qe(i).length;s=Math.max(35-l*4,15)+"%"}var u=se(s,o),c=se(n.gap,1),f=n.remainedWidth,h=n.autoWidthCount,v=(f-u)/(h+(h-1)*c);v=Math.max(v,0),C(i,function(g){var y=g.maxWidth,_=g.minWidth;if(g.width){var S=g.width;y&&(S=Math.min(S,y)),_&&(S=Math.max(S,_)),g.width=S,f-=S+c*S,h--}else{var S=v;y&&yS&&(S=_),S!==v&&(g.width=S,f-=S+c*S,h--)}}),v=(f-u)/(h+(h-1)*c),v=Math.max(v,0);var d=0,p;C(i,function(g,y){g.width||(g.width=v),p=g,d+=g.width*(1+c)}),p&&(d-=p.width*c);var m=-d/2;C(i,function(g,y){e[a][y]=e[a][y]||{bandWidth:o,offset:m,width:g.width},m+=g.width*(1+c)})}),e}function TS(r,t,e){if(r&&t){var n=r[Al(t)];return n}}function Id(r,t){var e=Ad(r,t),n=Md(e);C(e,function(a){var i=a.getData(),o=a.coordinateSystem,s=o.getBaseAxis(),l=Dd(a),u=n[Al(s)][l],c=u.offset,f=u.width;i.setLayout({bandWidth:u.bandWidth,offset:c,size:f})})}function Ld(r){return{seriesType:r,plan:ia(),reset:function(t){if(Pd(t)){var e=t.getData(),n=t.coordinateSystem,a=n.getBaseAxis(),i=n.getOtherAxis(a),o=e.getDimensionIndex(e.mapDimension(i.dim)),s=e.getDimensionIndex(e.mapDimension(a.dim)),l=t.get("showBackground",!0),u=e.mapDimension(i.dim),c=e.getCalculationInfo("stackResultDimension"),f=Wr(e,u)&&!!e.getCalculationInfo("stackedOnSeries"),h=i.isHorizontal(),v=DS(a,i),d=kd(t),p=t.get("barMinHeight")||0,m=c&&e.getDimensionIndex(c),g=e.getLayout("size"),y=e.getLayout("offset");return{progress:function(_,S){for(var b=_.count,x=d&&st(b*3),w=d&&l&&st(b*3),T=d&&st(b),D=n.master.getRect(),M=h?D.width:D.height,A,L=S.getStore(),I=0;(A=_.next())!=null;){var P=L.get(f?m:o,A),k=L.get(s,A),E=v,U=void 0;f&&(U=+P-L.get(o,A));var R=void 0,O=void 0,V=void 0,B=void 0;if(h){var G=n.dataToPoint([P,k]);if(f){var K=n.dataToPoint([U,k]);E=K[0]}R=E,O=G[1]+y,V=G[0]-E,B=g,Math.abs(V)0?e:1:e))}var Gn=(function(r){H(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.getInitialData=function(e,n){return Ti(null,this,{useEncodeDefaulter:!0})},t.prototype.getMarkerPosition=function(e,n,a){var i=this.coordinateSystem;if(i&&i.clampData){var o=i.clampData(e),s=i.dataToPoint(o);if(a)C(i.getAxes(),function(h,v){if(h.type==="category"&&n!=null){var d=h.getTicksCoords(),p=h.getTickModel().get("alignWithLabel"),m=o[v],g=n[v]==="x1"||n[v]==="y1";if(g&&!p&&(m+=1),d.length<2)return;if(d.length===2){s[v]=h.toGlobalCoord(h.getExtent()[g?1:0]);return}for(var y=void 0,_=void 0,S=1,b=0;bm){_=(x+y)/2;break}b===1&&(S=w-d[0].tickValue)}_==null&&(y?y&&(_=d[d.length-1].coord):_=d[0].coord),s[v]=h.toGlobalCoord(_)}});else{var l=this.getData(),u=l.getLayout("offset"),c=l.getLayout("size"),f=i.getBaseAxis().isHorizontal()?0:1;s[f]+=u+c/2}return s}return[NaN,NaN]},t.type="series.__base_bar__",t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod",defaultBarGap:"10%"},t})(He);He.registerClass(Gn);var AS=(function(r){H(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.getInitialData=function(){return Ti(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},t.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},t.prototype.getProgressiveThreshold=function(){var e=this.get("progressiveThreshold"),n=this.get("largeThreshold");return n>e&&(e=n),e},t.prototype.brushSelector=function(e,n,a){return a.rect(n.getItemLayout(e))},t.type="series.bar",t.dependencies=["grid","polar"],t.defaultOption=ll(Gn.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:z.color.primary,borderWidth:2}},realtimeSort:!1}),t})(Gn),ei="\0__throttleOriginMethod",fc="\0__throttleRate",vc="\0__throttleType";function Ml(r,t,e){var n,a=0,i=0,o=null,s,l,u,c;t=t||0;function f(){i=new Date().getTime(),o=null,r.apply(l,u||[])}var h=function(){for(var v=[],d=0;d=0?f():o=setTimeout(f,-s),a=n};return h.clear=function(){o&&(clearTimeout(o),o=null)},h.debounceNextCall=function(v){c=v},h}function Rd(r,t,e,n){var a=r[t];if(a){var i=a[ei]||a,o=a[vc],s=a[fc];if(s!==e||o!==n){if(e==null||!n)return r[t]=i;a=r[t]=Ml(i,e,n==="debounce"),a[ei]=i,a[vc]=n,a[fc]=e}return a}}function ns(r,t){var e=r[t];e&&e[ei]&&(e.clear&&e.clear(),r[t]=e[ei])}var MS=(function(){function r(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return r})(),hc=(function(r){H(t,r);function t(e){var n=r.call(this,e)||this;return n.type="sausage",n}return t.prototype.getDefaultShape=function(){return new MS},t.prototype.buildPath=function(e,n){var a=n.cx,i=n.cy,o=Math.max(n.r0||0,0),s=Math.max(n.r,0),l=(s-o)*.5,u=o+l,c=n.startAngle,f=n.endAngle,h=n.clockwise,v=Math.PI*2,d=h?f-cMath.PI/2&&cs)return!0;s=f}return!1},t.prototype._isOrderDifferentInView=function(e,n){for(var a=n.scale,i=a.getExtent(),o=Math.max(0,i[0]),s=Math.min(i[1],a.getOrdinalMeta().categories.length-1);o<=s;++o)if(e.ordinalNumbers[o]!==a.getRawOrdinalNumber(o))return!0},t.prototype._updateSortWithinSameData=function(e,n,a,i){if(this._isOrderChangedWithinSameData(e,n,a)){var o=this._dataSort(e,a,n);this._isOrderDifferentInView(o,a)&&(this._removeOnRenderedListener(i),i.dispatchAction({type:"changeAxisOrder",componentType:a.dim+"Axis",axisId:a.index,sortInfo:o}))}},t.prototype._dispatchInitSort=function(e,n,a){var i=n.baseAxis,o=this._dataSort(e,i,function(s){return e.get(e.mapDimension(n.otherAxis.dim),s)});a.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",isInitSort:!0,axisId:i.index,sortInfo:o})},t.prototype.remove=function(e,n){this._clear(this._model),this._removeOnRenderedListener(n)},t.prototype.dispose=function(e,n){this._removeOnRenderedListener(n)},t.prototype._removeOnRenderedListener=function(e){this._onRendered&&(e.getZr().off("rendered",this._onRendered),this._onRendered=null)},t.prototype._clear=function(e){var n=this.group,a=this._data;e&&e.isAnimationEnabled()&&a&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],a.eachItemGraphicEl(function(i){wn(i,e,ee(i).dataIndex)})):n.removeAll(),this._data=null,this._isFirstFrame=!0},t.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},t.type="bar",t})(Be),dc={cartesian2d:function(r,t){var e=t.width<0?-1:1,n=t.height<0?-1:1;e<0&&(t.x+=t.width,t.width=-t.width),n<0&&(t.y+=t.height,t.height=-t.height);var a=r.x+r.width,i=r.y+r.height,o=qi(t.x,r.x),s=ji(t.x+t.width,a),l=qi(t.y,r.y),u=ji(t.y+t.height,i),c=sa?s:o,t.y=f&&l>i?u:l,t.width=c?0:s-o,t.height=f?0:u-l,e<0&&(t.x+=t.width,t.width=-t.width),n<0&&(t.y+=t.height,t.height=-t.height),c||f},polar:function(r,t){var e=t.r0<=t.r?1:-1;if(e<0){var n=t.r;t.r=t.r0,t.r0=n}var a=ji(t.r,r.r),i=qi(t.r0,r.r0);t.r=a,t.r0=i;var o=a-i<0;if(e<0){var n=t.r;t.r=t.r0,t.r0=n}return o}},pc={cartesian2d:function(r,t,e,n,a,i,o,s,l){var u=new de({shape:W({},n),z2:1});if(u.__dataIndex=e,u.name="item",i){var c=u.shape,f=a?"height":"width";c[f]=0}return u},polar:function(r,t,e,n,a,i,o,s,l){var u=!a&&l?hc:pr,c=new u({shape:n,z2:1});c.name="item";var f=Ed(a);if(c.calculateTextPosition=IS(f,{isRoundCap:u===hc}),i){var h=c.shape,v=a?"r":"endAngle",d={};h[v]=a?n.r0:n.startAngle,d[v]=n[v],(s?Ae:Ve)(c,{shape:d},i)}return c}};function RS(r,t){var e=r.get("realtimeSort",!0),n=t.getBaseAxis();if(e&&n.type==="category"&&t.type==="cartesian2d")return{baseAxis:n,otherAxis:t.getOtherAxis(n)}}function gc(r,t,e,n,a,i,o,s){var l,u;i?(u={x:n.x,width:n.width},l={y:n.y,height:n.height}):(u={y:n.y,height:n.height},l={x:n.x,width:n.width}),s||(o?Ae:Ve)(e,{shape:l},t,a,null);var c=t?r.baseAxis.model:null;(o?Ae:Ve)(e,{shape:u},c,a)}function mc(r,t){for(var e=0;e0?1:-1,o=n.height>0?1:-1;return{x:n.x+i*a/2,y:n.y+o*a/2,width:n.width-i*a,height:n.height-o*a}},polar:function(r,t,e){var n=r.getItemLayout(t);return{cx:n.cx,cy:n.cy,r0:n.r0,r:n.r,startAngle:n.startAngle,endAngle:n.endAngle,clockwise:n.clockwise}}};function BS(r){return r.startAngle!=null&&r.endAngle!=null&&r.startAngle===r.endAngle}function Ed(r){return(function(t){var e=t?"Arc":"Angle";return function(n){switch(n){case"start":case"insideStart":case"end":case"insideEnd":return n+e;default:return n}}})(r)}function _c(r,t,e,n,a,i,o,s){var l=t.getItemVisual(e,"style");if(s){if(!i.get("roundCap")){var c=r.shape,f=gn(n.getModel("itemStyle"),c,!0);W(c,f),r.setShape(c)}}else{var u=n.get(["itemStyle","borderRadius"])||0;r.setShape("r",u)}r.useStyle(l);var h=n.getShallow("cursor");h&&r.attr("cursor",h);var v=s?o?a.r>=a.r0?"endArc":"startArc":a.endAngle>=a.startAngle?"endAngle":"startAngle":o?a.height>=0?"bottom":"top":a.width>=0?"right":"left",d=qr(n);Kr(r,d,{labelFetcher:i,labelDataIndex:e,defaultText:Mi(i.getData(),e),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:v});var p=r.getTextContent();if(s&&p){var m=n.get(["label","position"]);r.textConfig.inside=m==="middle"?!0:null,LS(r,m==="outside"?v:m,Ed(o),n.get(["label","rotate"]))}Fy(p,d,i.getRawValue(e),function(y){return pd(t,y)});var g=n.getModel(["emphasis"]);fr(r,g.get("focus"),g.get("blurScope"),g.get("disabled")),Rn(r,n),BS(a)&&(r.style.fill="none",r.style.stroke="none",C(r.states,function(y){y.style&&(y.style.fill=y.style.stroke="none")}))}function NS(r,t){var e=r.get(["itemStyle","borderColor"]);if(!e||e==="none")return 0;var n=r.get(["itemStyle","borderWidth"])||0,a=isNaN(t.width)?Number.MAX_VALUE:Math.abs(t.width),i=isNaN(t.height)?Number.MAX_VALUE:Math.abs(t.height);return Math.min(n,a,i)}var zS=(function(){function r(){}return r})(),Sc=(function(r){H(t,r);function t(e){var n=r.call(this,e)||this;return n.type="largeBar",n}return t.prototype.getDefaultShape=function(){return new zS},t.prototype.buildPath=function(e,n){for(var a=n.points,i=this.baseDimIdx,o=1-this.baseDimIdx,s=[],l=[],u=this.barWidth,c=0;c=0?e:null},30,!1);function VS(r,t,e){for(var n=r.baseDimIdx,a=1-n,i=r.shape.points,o=r.largeDataIndices,s=[],l=[],u=r.barWidth,c=0,f=i.length/3;c=s[0]&&t<=s[0]+l[0]&&e>=s[1]&&e<=s[1]+l[1])return o[c]}return-1}function Od(r,t,e){if(Tl(e,"cartesian2d")){var n=t,a=e.getArea();return{x:r?n.x:a.x,y:r?a.y:n.y,width:r?n.width:a.width,height:r?a.height:n.height}}else{var a=e.getArea(),i=t;return{cx:a.cx,cy:a.cy,r0:r?a.r0:i.r0,r:r?a.r:i.r,startAngle:r?i.startAngle:0,endAngle:r?i.endAngle:Math.PI*2}}}function GS(r,t,e){var n=r.type==="polar"?pr:de;return new n({shape:Od(t,e,r),silent:!0,z2:0})}function DD(r){r.registerChartView(kS),r.registerSeriesModel(AS),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,ne(Id,"bar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,Ld("bar")),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,Td("bar")),r.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(t,e){var n=t.componentType||"series";e.eachComponent({mainType:n,query:t},function(a){t.sortInfo&&a.axis.setCategorySortInfo(t.sortInfo)})})}function FS(r,t){function e(n,a){var i=[];return n.eachComponent({mainType:"series",subType:r,query:a},function(o){i.push(o.seriesIndex)}),i}C([[r+"ToggleSelect","toggleSelect"],[r+"Select","select"],[r+"UnSelect","unselect"]],function(n){t(n[0],function(a,i,o){a=W({},a),o.dispatchAction(W(a,{type:n[1],seriesIndex:e(i,a)}))})})}function Cr(r,t,e,n,a){var i=r+t;e.isSilent(i)||n.eachComponent({mainType:"series",subType:"pie"},function(o){for(var s=o.seriesIndex,l=o.option.selectedMap,u=a.selected,c=0;cO?(B=k+T*O/2,G=B):(B=k+M,G=V-M),a.setItemLayout(R,{angle:O,startAngle:B,endAngle:G,clockwise:S,cx:s,cy:l,r0:c,r:b?Bt(U,w,[c,u]):u}),k=V}),I0){t=t/180*Math.PI,zt.fromArray(r[0]),me.fromArray(r[1]),Ie.fromArray(r[2]),pe.sub(Vt,zt,me),pe.sub(at,Ie,me);var e=Vt.len(),n=at.len();if(!(e<.001||n<.001)){Vt.scale(1/e),at.scale(1/n);var a=Vt.dot(at),i=Math.cos(t);if(i1&&pe.copy(Oe,Ie),Oe.toArray(r[1])}}}}function XS(r,t,e){if(e<=180&&e>0){e=e/180*Math.PI,zt.fromArray(r[0]),me.fromArray(r[1]),Ie.fromArray(r[2]),pe.sub(Vt,me,zt),pe.sub(at,Ie,me);var n=Vt.len(),a=at.len();if(!(n<.001||a<.001)){Vt.scale(1/n),at.scale(1/a);var i=Vt.dot(t),o=Math.cos(e);if(i=l)pe.copy(Oe,Ie);else{Oe.scaleAndAdd(at,s/Math.tan(Math.PI/2-c));var f=Ie.x!==me.x?(Oe.x-me.x)/(Ie.x-me.x):(Oe.y-me.y)/(Ie.y-me.y);if(isNaN(f))return;f<0?pe.copy(Oe,me):f>1&&pe.copy(Oe,Ie)}Oe.toArray(r[1])}}}}function Qi(r,t,e,n){var a=e==="normal",i=a?r:r.ensureState(e);i.ignore=t;var o=n.get("smooth");o&&o===!0&&(o=.3),i.shape=i.shape||{},o>0&&(i.shape.smooth=o);var s=n.getModel("lineStyle").getLineStyle();a?r.useStyle(s):i.style=s}function ZS(r,t){var e=t.smooth,n=t.points;if(n)if(r.moveTo(n[0][0],n[0][1]),e>0&&n.length>=3){var a=iu(n[0],n[1]),i=iu(n[1],n[2]);if(!a||!i){r.lineTo(n[1][0],n[1][1]),r.lineTo(n[2][0],n[2][1]);return}var o=Math.min(a,i)*e,s=Ei([],n[1],n[0],o/a),l=Ei([],n[1],n[2],o/i),u=Ei([],s,l,.5);r.bezierCurveTo(s[0],s[1],s[0],s[1],u[0],u[1]),r.bezierCurveTo(l[0],l[1],l[0],l[1],n[2][0],n[2][1])}else for(var c=1;c0){S(M*D,0,i);var A=M+w;A<0&&b(-A*D,1)}else b(-w*D,1)}}function S(w,T,D){w!==0&&(c=!0);for(var M=T;M0)for(var A=0;A0;A--){var k=D[A-1]*P;S(-k,A,i)}}}function x(w){var T=w<0?-1:1;w=Math.abs(w);for(var D=Math.ceil(w/(i-1)),M=0;M0?S(D,0,M+1):S(-D,i-M-1,i),w-=D,w<=0)return}return c}function ex(r){var t=[];r.sort(function(u,c){return(c.suggestIgnore?1:0)-(u.suggestIgnore?1:0)||c.priority-u.priority});function e(u){if(!u.ignore){var c=u.ensureState("emphasis");c.ignore==null&&(c.ignore=!1)}u.ignore=!0}for(var n=0;ne?g:m,b=Math.abs(_.label.y-e);if(b>=S.maxY){var x=_.label.x-t-_.len2*a,w=n+_.len,T=Math.abs(x)r.unconstrainedWidth?null:h:null;n.setStyle("width",v)}Wd(i,n)}}}function Wd(r,t){Mc.rect=r,Gd(Mc,t,nx)}var nx={minMarginForce:[null,0,null,0],marginDefault:[1,0,1,0]},Mc={};function eo(r){return r.position==="center"}function ax(r){var t=r.getData(),e=[],n,a,i=!1,o=(r.get("minShowLabelAngle")||0)*tx,s=t.getLayout("viewRect"),l=t.getLayout("r"),u=s.width,c=s.x,f=s.y,h=s.height;function v(x){x.ignore=!0}function d(x){if(!x.ignore)return!0;for(var w in x.states)if(x.states[w].ignore===!1)return!0;return!1}t.each(function(x){var w=t.getItemGraphicEl(x),T=w.shape,D=w.getTextContent(),M=w.getTextGuideLine(),A=t.getItemModel(x),L=A.getModel("label"),I=L.get("position")||A.get(["emphasis","label","position"]),P=L.get("distanceToLabelLine"),k=L.get("alignTo"),E=se(L.get("edgeDistance"),u),U=L.get("bleedMargin");U==null&&(U=Math.min(u,h)>200?10:2);var R=A.getModel("labelLine"),O=R.get("length");O=se(O,u);var V=R.get("length2");if(V=se(V,u),Math.abs(T.endAngle-T.startAngle)0?"right":"left":G>0?"left":"right"}var Dt=Math.PI,vt=0,en=L.get("rotate");if(ce(en))vt=en*(Dt/180);else if(I==="center")vt=0;else if(en==="radial"||en===!0){var Vg=G<0?-B+Dt:-B;vt=Vg}else if(en==="tangential"&&I!=="outside"&&I!=="outer"){var _r=Math.atan2(G,K);_r<0&&(_r=Dt*2+_r);var Gg=K>0;Gg&&(_r=Dt+_r),vt=_r-Dt}if(i=!!vt,D.x=te,D.y=le,D.rotation=vt,D.setStyle({verticalAlign:"middle"}),Tt){D.setStyle({align:yr});var Ri=D.states.select;Ri&&(Ri.x+=D.x,Ri.y+=D.y)}else{var ki=new Ee(0,0,0,0);Wd(ki,D),e.push({label:D,labelLine:M,position:I,len:O,len2:V,minTurnAngle:R.get("minTurnAngle"),maxSurfaceAngle:R.get("maxSurfaceAngle"),surfaceNormal:new pe(G,K),linePoints:Ct,textAlign:yr,labelDistance:P,labelAlignTo:k,edgeDistance:E,bleedMargin:U,rect:ki,unconstrainedWidth:ki.width,labelStyleWidth:D.style.width})}w.setTextConfig({inside:Tt})}}),!i&&r.get("avoidLabelOverlap")&&rx(e,n,a,l,u,h,c,f);for(var p=0;p0){for(var c=o.getItemLayout(0),f=1;isNaN(c&&c.startAngle)&&f=i.r0}},t.type="pie",t})(Be);function Hd(r,t,e){t=N(t)&&{coordDimensions:t}||W({encodeDefine:r.getEncode()},t);var n=r.getSource(),a=Xh(n,t).dimensions,i=new Yh(a,r);return i.initData(n,e),i}var sx=(function(){function r(t,e){this._getDataWithEncodedVisual=t,this._getRawData=e}return r.prototype.getAllNames=function(){var t=this._getRawData();return t.mapArray(t.getName)},r.prototype.containName=function(t){var e=this._getRawData();return e.indexOfName(t)>=0},r.prototype.indexOfName=function(t){var e=this._getDataWithEncodedVisual();return e.indexOfName(t)},r.prototype.getItemVisual=function(t,e){var n=this._getDataWithEncodedVisual();return n.getItemVisual(t,e)},r})(),lx=fe(),Ud=(function(r){H(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.init=function(e){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new sx(ie(this.getData,this),ie(this.getRawData,this)),this._defaultLabelLine(e)},t.prototype.mergeOption=function(){r.prototype.mergeOption.apply(this,arguments)},t.prototype.getInitialData=function(){return Hd(this,{coordDimensions:["value"],encodeDefaulter:ne(Ky,this)})},t.prototype.getDataParams=function(e){var n=this.getData(),a=lx(n),i=a.seats;if(!i){var o=[];n.each(n.mapDimension("value"),function(l){o.push(l)}),i=a.seats=Vm(o,n.hostModel.get("percentPrecision"))}var s=r.prototype.getDataParams.call(this,e);return s.percent=i[e]||0,s.$vars.push("percent"),s},t.prototype._defaultLabelLine=function(e){No(e,"labelLine",["show"]);var n=e.labelLine,a=e.emphasis.labelLine;n.show=n.show&&e.label.show,a.show=a.show&&e.emphasis.label.show},t.type="series.pie",t.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"50%"],clockwise:!0,startAngle:90,endAngle:"auto",padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,coordinateSystemUsage:"box",left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:30,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},t})(He);w0({fullType:Ud.type,getCoord2:function(r){return r.getShallow("center")}});function ux(r){return{seriesType:r,reset:function(t,e){var n=t.getData();n.filterSelf(function(a){var i=n.mapDimension("value"),o=n.get(i,a);return!(ce(o)&&!isNaN(o)&&o<0)})}}}function AD(r){r.registerChartView(ox),r.registerSeriesModel(Ud),FS("pie",r.registerAction),r.registerLayout(ne(HS,"pie")),r.registerProcessor(US("pie")),r.registerProcessor(ux("pie"))}var Yd="";typeof navigator<"u"&&(Yd=navigator.platform||"");var Tr="rgba(0, 0, 0, 0.2)",Xd=z.color.theme[0],cx=ko(Xd,null,null,.9);const fx={darkMode:"auto",colorBy:"series",color:z.color.theme,gradientColor:[cx,Xd],aria:{decal:{decals:[{color:Tr,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:Tr,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:Tr,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:Tr,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:Tr,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:Tr,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:Yd.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,stateAnimation:{duration:300,easing:"cubicOut"},animation:"auto",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicInOut",animationEasingUpdate:"cubicInOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1};var as=Z();function vx(r,t){ut(as.get(r)==null&&t),as.set(r,t)}function hx(r,t,e){var n=as.get(t);if(!n)return e;var a=n(r);return a?e.concat(a):e}var Sa,sn,Ic,Lc="\0_ec_inner",dx=1,Ll=(function(r){H(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.init=function(e,n,a,i,o,s){i=i||{},this.option=null,this._theme=new he(i),this._locale=new he(o),this._optionManager=s},t.prototype.setOption=function(e,n,a){var i=Rc(n);this._optionManager.setOption(e,a,i),this._resetOption(null,i)},t.prototype.resetOption=function(e,n){return this._resetOption(e,Rc(n))},t.prototype._resetOption=function(e,n){var a=!1,i=this._optionManager;if(!e||e==="recreate"){var o=i.mountOption(e==="recreate");!this.option||e==="recreate"?Ic(this,o):(this.restoreData(),this._mergeOption(o,n)),a=!0}if((e==="timeline"||e==="media")&&this.restoreData(),!e||e==="recreate"||e==="timeline"){var s=i.getTimelineOption(this);s&&(a=!0,this._mergeOption(s,n))}if(!e||e==="recreate"||e==="media"){var l=i.getMediaOption(this);l.length&&C(l,function(u){a=!0,this._mergeOption(u,n)},this)}return a},t.prototype.mergeOption=function(e){this._mergeOption(e,null)},t.prototype._mergeOption=function(e,n){var a=this.option,i=this._componentsMap,o=this._componentsCount,s=[],l=Z(),u=n&&n.replaceMergeMainTypeMap;$y(this),C(e,function(f,h){f!=null&&(ae.hasClass(h)?h&&(s.push(h),l.set(h,!0)):a[h]=a[h]==null?Q(f):J(a[h],f,!0))}),u&&u.each(function(f,h){ae.hasClass(h)&&!l.get(h)&&(s.push(h),l.set(h,!0))}),ae.topologicalTravel(s,ae.getAllClassMainTypes(),c,this);function c(f){var h=hx(this,f,_e(e[f])),v=i.get(f),d=v?u&&u.get(f)?"replaceMerge":"normalMerge":"replaceAll",p=Um(v,h,d);Qm(p,f,ae),a[f]=null,i.set(f,null),o.set(f,0);var m=[],g=[],y=0,_;C(p,function(S,b){var x=S.existing,w=S.newOption;if(!w)x&&(x.mergeOption({},this),x.optionUpdated({},!1));else{var T=f==="series",D=ae.getClass(f,S.keyInfo.subType,!T);if(!D)return;if(f==="tooltip"){if(_)return;_=!0}if(x&&x.constructor===D)x.name=S.keyInfo.name,x.mergeOption(w,this),x.optionUpdated(w,!1);else{var M=W({componentIndex:b},S.keyInfo);x=new D(w,this,this,M),W(x,M),S.brandNew&&(x.__requireNewView=!0),x.init(w,this,this),x.optionUpdated(null,!0)}}x?(m.push(x.option),g.push(x),y++):(m.push(void 0),g.push(void 0))},this),a[f]=m,i.set(f,g),o.set(f,y),f==="series"&&Sa(this)}this._seriesIndices||Sa(this)},t.prototype.getOption=function(){var e=Q(this.option);return C(e,function(n,a){if(ae.hasClass(a)){for(var i=_e(n),o=i.length,s=!1,l=o-1;l>=0;l--)i[l]&&!kn(i[l])?s=!0:(i[l]=null,!s&&o--);i.length=o,e[a]=i}}),delete e[Lc],e},t.prototype.setTheme=function(e){this._theme=new he(e),this._resetOption("recreate",null)},t.prototype.getTheme=function(){return this._theme},t.prototype.getLocaleModel=function(){return this._locale},t.prototype.setUpdatePayload=function(e){this._payload=e},t.prototype.getUpdatePayload=function(){return this._payload},t.prototype.getComponent=function(e,n){var a=this._componentsMap.get(e);if(a){var i=a[n||0];if(i)return i;if(n==null){for(var o=0;o=t:e==="max"?r<=t:r===t}function wx(r,t){return r.join(",")===t.join(",")}var je=C,Fn=$,Ec=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function to(r){var t=r&&r.itemStyle;if(t)for(var e=0,n=Ec.length;e0?e[o-1].seriesModel:null)}),kx(e)}})}function kx(r){C(r,function(t,e){var n=[],a=[NaN,NaN],i=[t.stackResultDimension,t.stackedOverDimension],o=t.data,s=t.isStackedByIndex,l=t.seriesModel.get("stackStrategy")||"samesign";o.modify(i,function(u,c,f){var h=o.get(t.stackedDimension,f);if(isNaN(h))return a;var v,d;s?d=o.getRawIndex(f):v=o.get(t.stackedByDimension,f);for(var p=NaN,m=e-1;m>=0;m--){var g=r[m];if(s||(d=g.data.rawIndexOf(g.stackedByDimension,v)),d>=0){var y=g.data.getByRawIndex(g.stackResultDimension,d);if(l==="all"||l==="positive"&&y>0||l==="negative"&&y<0||l==="samesign"&&h>=0&&y>0||l==="samesign"&&h<=0&&y<0){h=Gm(h,y),p=y;break}}}return n[0]=h,n[1]=p,n})})}var Ge=(function(){function r(){this.group=new Se,this.uid=ra("viewComponent")}return r.prototype.init=function(t,e){},r.prototype.render=function(t,e,n,a){},r.prototype.dispose=function(t,e){},r.prototype.updateView=function(t,e,n,a){},r.prototype.updateLayout=function(t,e,n,a){},r.prototype.updateVisual=function(t,e,n,a){},r.prototype.toggleBlurSeries=function(t,e,n){},r.prototype.eachRendered=function(t){var e=this.group;e&&e.traverse(t)},r})();Ws(Ge);di(Ge);var Vc=fe(),Gc={itemStyle:Ln(xh,!0),lineStyle:Ln(Sh,!0)},Rx={lineStyle:"stroke",itemStyle:"fill"};function qd(r,t){var e=r.visualStyleMapper||Gc[t];return e||Gc.itemStyle}function jd(r,t){var e=r.visualDrawType||Rx[t];return e||"fill"}var Ex={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,t){var e=r.getData(),n=r.visualStyleAccessPath||"itemStyle",a=r.getModel(n),i=qd(r,n),o=i(a),s=a.getShallow("decal");s&&(e.setVisual("decal",s),s.dirty=!0);var l=jd(r,n),u=o[l],c=q(u)?u:null,f=o.fill==="auto"||o.stroke==="auto";if(!o[l]||c||f){var h=r.getColorFromPalette(r.name,null,t.getSeriesCount());o[l]||(o[l]=h,e.setVisual("colorFromPalette",!0)),o.fill=o.fill==="auto"||q(o.fill)?h:o.fill,o.stroke=o.stroke==="auto"||q(o.stroke)?h:o.stroke}if(e.setVisual("style",o),e.setVisual("drawType",l),!t.isSeriesFiltered(r)&&c)return e.setVisual("colorFromPalette",!1),{dataEach:function(v,d){var p=r.getDataParams(d),m=W({},o);m[l]=c(p),v.setItemVisual(d,"style",m)}}}},un=new he,Ox={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,t){if(!(r.ignoreStyleOnData||t.isSeriesFiltered(r))){var e=r.getData(),n=r.visualStyleAccessPath||"itemStyle",a=qd(r,n),i=e.getVisual("drawType");return{dataEach:e.hasItemOption?function(o,s){var l=o.getRawDataItem(s);if(l&&l[n]){un.option=l[n];var u=a(un),c=o.ensureUniqueItemVisual(s,"style");W(c,u),un.option.decal&&(o.setItemVisual(s,"decal",un.option.decal),un.option.decal.dirty=!0),i in u&&o.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},Bx={performRawSeries:!0,overallReset:function(r){var t=Z();r.eachSeries(function(e){var n=e.getColorBy();if(!e.isColorBySeries()){var a=e.type+"-"+n,i=t.get(a);i||(i={},t.set(a,i)),Vc(e).scope=i}}),r.eachSeries(function(e){if(!(e.isColorBySeries()||r.isSeriesFiltered(e))){var n=e.getRawData(),a={},i=e.getData(),o=Vc(e).scope,s=e.visualStyleAccessPath||"itemStyle",l=jd(e,s);i.each(function(u){var c=i.getRawIndex(u);a[c]=u}),n.each(function(u){var c=a[u],f=i.getItemVisual(c,"colorFromPalette");if(f){var h=i.ensureUniqueItemVisual(c,"style"),v=n.getName(u)||u+"",d=n.count();h[l]=e.getColorFromPalette(v,o,d)}})}})}},xa=Math.PI;function Nx(r,t){t=t||{},oe(t,{text:"loading",textColor:z.color.primary,fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255,255,255,0.8)",showSpinner:!0,color:z.color.theme[0],spinnerRadius:10,lineWidth:5,zlevel:0});var e=new Se,n=new de({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});e.add(n);var a=new De({style:{text:t.text,fill:t.textColor,fontSize:t.fontSize,fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontFamily:t.fontFamily},zlevel:t.zlevel,z:10001}),i=new de({style:{fill:"none"},textContent:a,textConfig:{position:"right",distance:10},zlevel:t.zlevel,z:10001});e.add(i);var o;return t.showSpinner&&(o=new Vs({shape:{startAngle:-xa/2,endAngle:-xa/2+.1,r:t.spinnerRadius},style:{stroke:t.color,lineCap:"round",lineWidth:t.lineWidth},zlevel:t.zlevel,z:10001}),o.animateShape(!0).when(1e3,{endAngle:xa*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:xa*3/2}).delay(300).start("circularInOut"),e.add(o)),e.resize=function(){var s=a.getBoundingRect().width,l=t.showSpinner?t.spinnerRadius:0,u=(r.getWidth()-l*2-(t.showSpinner&&s?10:0)-s)/2-(t.showSpinner&&s?0:5+s/2)+(t.showSpinner?0:s/2)+(s?0:l),c=r.getHeight()/2;t.showSpinner&&o.setShape({cx:u,cy:c}),i.setShape({x:u-l,y:c-l,width:l*2,height:l*2}),n.setShape({x:0,y:0,width:r.getWidth(),height:r.getHeight()})},e.resize(),e}var Qd=(function(){function r(t,e,n,a){this._stageTaskMap=Z(),this.ecInstance=t,this.api=e,n=this._dataProcessorHandlers=n.slice(),a=this._visualHandlers=a.slice(),this._allHandlers=n.concat(a)}return r.prototype.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each(function(n){var a=n.overallTask;a&&a.dirty()})},r.prototype.getPerformArgs=function(t,e){if(t.__pipeline){var n=this._pipelineMap.get(t.__pipeline.id),a=n.context,i=!e&&n.progressiveEnabled&&(!a||a.progressiveRender)&&t.__idxInPipeline>n.blockIndex,o=i?n.step:null,s=a&&a.modDataCount,l=s!=null?Math.ceil(s/o):null;return{step:o,modBy:l,modDataCount:s}}},r.prototype.getPipeline=function(t){return this._pipelineMap.get(t)},r.prototype.updateStreamModes=function(t,e){var n=this._pipelineMap.get(t.uid),a=t.getData(),i=a.count(),o=n.progressiveEnabled&&e.incrementalPrepareRender&&i>=n.threshold,s=t.get("large")&&i>=t.get("largeThreshold"),l=t.get("progressiveChunkMode")==="mod"?i:null;t.pipelineContext=n.context={progressiveRender:o,modDataCount:l,large:s}},r.prototype.restorePipelines=function(t){var e=this,n=e._pipelineMap=Z();t.eachSeries(function(a){var i=a.getProgressive(),o=a.uid;n.set(o,{id:o,head:null,tail:null,threshold:a.getProgressiveThreshold(),progressiveEnabled:i&&!(a.preventIncremental&&a.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),e._pipe(a,a.dataTask)})},r.prototype.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.api.getModel(),n=this.api;C(this._allHandlers,function(a){var i=t.get(a.uid)||t.set(a.uid,{}),o="";ut(!(a.reset&&a.overallReset),o),a.reset&&this._createSeriesStageTask(a,i,e,n),a.overallReset&&this._createOverallStageTask(a,i,e,n)},this)},r.prototype.prepareView=function(t,e,n,a){var i=t.renderTask,o=i.context;o.model=e,o.ecModel=n,o.api=a,i.__block=!t.incrementalPrepareRender,this._pipe(e,i)},r.prototype.performDataProcessorTasks=function(t,e){this._performStageTasks(this._dataProcessorHandlers,t,e,{block:!0})},r.prototype.performVisualTasks=function(t,e,n){this._performStageTasks(this._visualHandlers,t,e,n)},r.prototype._performStageTasks=function(t,e,n,a){a=a||{};var i=!1,o=this;C(t,function(l,u){if(!(a.visualType&&a.visualType!==l.visualType)){var c=o._stageTaskMap.get(l.uid),f=c.seriesTaskMap,h=c.overallTask;if(h){var v,d=h.agentStubMap;d.each(function(m){s(a,m)&&(m.dirty(),v=!0)}),v&&h.dirty(),o.updatePayload(h,n);var p=o.getPerformArgs(h,a.block);d.each(function(m){m.perform(p)}),h.perform(p)&&(i=!0)}else f&&f.each(function(m,g){s(a,m)&&m.dirty();var y=o.getPerformArgs(m,a.block);y.skip=!l.performRawSeries&&e.isSeriesFiltered(m.context.model),o.updatePayload(m,n),m.perform(y)&&(i=!0)})}});function s(l,u){return l.setDirty&&(!l.dirtyMap||l.dirtyMap.get(u.__pipeline.id))}this.unfinished=i||this.unfinished},r.prototype.performSeriesTasks=function(t){var e;t.eachSeries(function(n){e=n.dataTask.perform()||e}),this.unfinished=e||this.unfinished},r.prototype.plan=function(){this._pipelineMap.each(function(t){var e=t.tail;do{if(e.__block){t.blockIndex=e.__idxInPipeline;break}e=e.getUpstream()}while(e)})},r.prototype.updatePayload=function(t,e){e!=="remain"&&(t.context.payload=e)},r.prototype._createSeriesStageTask=function(t,e,n,a){var i=this,o=e.seriesTaskMap,s=e.seriesTaskMap=Z(),l=t.seriesType,u=t.getTargetSeries;t.createOnAllSeries?n.eachRawSeries(c):l?n.eachRawSeriesByType(l,c):u&&u(n,a).each(c);function c(f){var h=f.uid,v=s.set(h,o&&o.get(h)||Dn({plan:Wx,reset:Hx,count:Yx}));v.context={model:f,ecModel:n,api:a,useClearVisual:t.isVisual&&!t.isLayout,plan:t.plan,reset:t.reset,scheduler:i},i._pipe(f,v)}},r.prototype._createOverallStageTask=function(t,e,n,a){var i=this,o=e.overallTask=e.overallTask||Dn({reset:zx});o.context={ecModel:n,api:a,overallReset:t.overallReset,scheduler:i};var s=o.agentStubMap,l=o.agentStubMap=Z(),u=t.seriesType,c=t.getTargetSeries,f=!0,h=!1,v="";ut(!t.createOnAllSeries,v),u?n.eachRawSeriesByType(u,d):c?c(n,a).each(d):(f=!1,C(n.getSeries(),d));function d(p){var m=p.uid,g=l.set(m,s&&s.get(m)||(h=!0,Dn({reset:Vx,onDirty:Fx})));g.context={model:p,overallProgress:f},g.agent=o,g.__block=f,i._pipe(p,g)}h&&o.dirty()},r.prototype._pipe=function(t,e){var n=t.uid,a=this._pipelineMap.get(n);!a.head&&(a.head=e),a.tail&&a.tail.pipe(e),a.tail=e,e.__idxInPipeline=a.count++,e.__pipeline=a},r.wrapStageHandler=function(t,e){return q(t)&&(t={overallReset:t,seriesType:Xx(t)}),t.uid=ra("stageHandler"),e&&(t.visualType=e),t},r})();function zx(r){r.overallReset(r.ecModel,r.api,r.payload)}function Vx(r){return r.overallProgress&&Gx}function Gx(){this.agent.dirty(),this.getDownstream().dirty()}function Fx(){this.agent&&this.agent.dirty()}function Wx(r){return r.plan?r.plan(r.model,r.ecModel,r.api,r.payload):null}function Hx(r){r.useClearVisual&&r.data.clearAllVisual();var t=r.resetDefines=_e(r.reset(r.model,r.ecModel,r.api,r.payload));return t.length>1?Y(t,function(e,n){return Jd(n)}):Ux}var Ux=Jd(0);function Jd(r){return function(t,e){var n=e.data,a=e.resetDefines[r];if(a&&a.dataEach)for(var i=t.start;i0&&v===u.length-h.length){var d=u.slice(0,v);d!=="data"&&(e.mainType=d,e[h.toLowerCase()]=l,c=!0)}}s.hasOwnProperty(u)&&(n[u]=l,c=!0),c||(a[u]=l)})}return{cptQuery:e,dataQuery:n,otherQuery:a}},r.prototype.filter=function(t,e){var n=this.eventInfo;if(!n)return!0;var a=n.targetEl,i=n.packedEvent,o=n.model,s=n.view;if(!o||!s)return!0;var l=e.cptQuery,u=e.dataQuery;return c(l,o,"mainType")&&c(l,o,"subType")&&c(l,o,"index","componentIndex")&&c(l,o,"name")&&c(l,o,"id")&&c(u,i,"name")&&c(u,i,"dataIndex")&&c(u,i,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(t,e.otherQuery,a,i));function c(f,h,v,d){return f[v]==null||h[d||v]===f[v]}},r.prototype.afterTrigger=function(){this.eventInfo=null},r})(),is=["symbol","symbolSize","symbolRotate","symbolOffset"],Wc=is.concat(["symbolKeepAspect"]),Kx={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,t){var e=r.getData();if(r.legendIcon&&e.setVisual("legendIcon",r.legendIcon),!r.hasSymbolVisual)return;for(var n={},a={},i=!1,o=0;o0&&e.unfinished);e.unfinished||this._zr.flush()}}},t.prototype.getDom=function(){return this._dom},t.prototype.getId=function(){return this.id},t.prototype.getZr=function(){return this._zr},t.prototype.isSSR=function(){return this._ssr},t.prototype.setOption=function(e,n,a){if(!this[be]){if(this._disposed){this.id;return}var i,o,s;if($(n)&&(a=n.lazyUpdate,i=n.silent,o=n.replaceMerge,s=n.transition,n=n.notMerge),this[be]=!0,Mr(this),!this._model||n){var l=new _x(this._api),u=this._theme,c=this._model=new Ll;c.scheduler=this._scheduler,c.ssr=this._ssr,c.init(null,null,null,u,this._locale,l)}this._model.setOption(e,{replaceMerge:o},cs);var f={seriesTransition:s,optionChanged:!0};if(a)this[Te]={silent:i,updateParams:f},this[be]=!1,this.getZr().wakeUp();else{try{rr(this),dt.update.call(this,null,f)}catch(h){throw this[Te]=null,this[be]=!1,h}this._ssr||this._zr.flush(),this[Te]=null,this[be]=!1,Dr.call(this,i),Ar.call(this,i)}}},t.prototype.setTheme=function(e,n){if(!this[be]){if(this._disposed){this.id;return}var a=this._model;if(a){var i=n&&n.silent,o=null;this[Te]&&(i==null&&(i=this[Te].silent),o=this[Te].updateParams,this[Te]=null),this[be]=!0,Mr(this);try{this._updateTheme(e),a.setTheme(this._theme),rr(this),dt.update.call(this,{type:"setTheme"},o)}catch(s){throw this[be]=!1,s}this[be]=!1,Dr.call(this,i),Ar.call(this,i)}}},t.prototype._updateTheme=function(e){X(e)&&(e=mp[e]),e&&(e=Q(e),e&&Kd(e,!0),this._theme=e)},t.prototype.getModel=function(){return this._model},t.prototype.getOption=function(){return this._model&&this._model.getOption()},t.prototype.getWidth=function(){return this._zr.getWidth()},t.prototype.getHeight=function(){return this._zr.getHeight()},t.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||ye.hasGlobalWindow&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(e){return this.renderToCanvas(e)},t.prototype.renderToCanvas=function(e){e=e||{};var n=this._zr.painter;return n.getRenderedCanvas({backgroundColor:e.backgroundColor||this._model.get("backgroundColor"),pixelRatio:e.pixelRatio||this.getDevicePixelRatio()})},t.prototype.renderToSVGString=function(e){e=e||{};var n=this._zr.painter;return n.renderToString({useViewBox:e.useViewBox})},t.prototype.getSvgDataURL=function(){var e=this._zr,n=e.storage.getDisplayList();return C(n,function(a){a.stopAnimation(null,!0)}),e.painter.toDataURL()},t.prototype.getDataURL=function(e){if(this._disposed){this.id;return}e=e||{};var n=e.excludeComponents,a=this._model,i=[],o=this;C(n,function(l){a.eachComponent({mainType:l},function(u){var c=o._componentsMap[u.__viewId];c.group.ignore||(i.push(c),c.group.ignore=!0)})});var s=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(e).toDataURL("image/"+(e&&e.type||"png"));return C(i,function(l){l.group.ignore=!1}),s},t.prototype.getConnectedDataURL=function(e){if(this._disposed){this.id;return}var n=e.type==="svg",a=this.group,i=Math.min,o=Math.max,s=1/0;if(Qc[a]){var l=s,u=s,c=-s,f=-s,h=[],v=e&&e.pixelRatio||this.getDevicePixelRatio();C(An,function(_,S){if(_.group===a){var b=n?_.getZr().painter.getSvgDom().innerHTML:_.renderToCanvas(Q(e)),x=_.getDom().getBoundingClientRect();l=i(x.left,l),u=i(x.top,u),c=o(x.right,c),f=o(x.bottom,f),h.push({dom:b,left:x.left,top:x.top})}}),l*=v,u*=v,c*=v,f*=v;var d=c-l,p=f-u,m=Nv.createCanvas(),g=ou(m,{renderer:n?"svg":"canvas"});if(g.resize({width:d,height:p}),n){var y="";return C(h,function(_){var S=_.left-l,b=_.top-u;y+=''+_.dom+""}),g.painter.getSvgRoot().innerHTML=y,e.connectedBackgroundColor&&g.painter.setBackgroundColor(e.connectedBackgroundColor),g.refreshImmediately(),g.painter.toDataURL()}else return e.connectedBackgroundColor&&g.add(new de({shape:{x:0,y:0,width:d,height:p},style:{fill:e.connectedBackgroundColor}})),C(h,function(_){var S=new Zr({style:{x:_.left*v-l,y:_.top*v-u,image:_.dom}});g.add(S)}),g.refreshImmediately(),m.toDataURL("image/"+(e&&e.type||"png"))}else return this.getDataURL(e)},t.prototype.convertToPixel=function(e,n,a){return Ca(this,"convertToPixel",e,n,a)},t.prototype.convertToLayout=function(e,n,a){return Ca(this,"convertToLayout",e,n,a)},t.prototype.convertFromPixel=function(e,n,a){return Ca(this,"convertFromPixel",e,n,a)},t.prototype.containPixel=function(e,n){if(this._disposed){this.id;return}var a=this._model,i,o=xn(a,e);return C(o,function(s,l){l.indexOf("Models")>=0&&C(s,function(u){var c=u.coordinateSystem;if(c&&c.containPoint)i=i||!!c.containPoint(n);else if(l==="seriesModels"){var f=this._chartsMap[u.__viewId];f&&f.containPoint&&(i=i||f.containPoint(n,u))}},this)},this),!!i},t.prototype.getVisual=function(e,n){var a=this._model,i=xn(a,e,{defaultMainType:"series"}),o=i.seriesModel,s=o.getData(),l=i.hasOwnProperty("dataIndexInside")?i.dataIndexInside:i.hasOwnProperty("dataIndex")?s.indexOfRawIndex(i.dataIndex):null;return l!=null?jx(s,l,n):Qx(s,n)},t.prototype.getViewOfComponentModel=function(e){return this._componentsMap[e.__viewId]},t.prototype.getViewOfSeriesModel=function(e){return this._chartsMap[e.__viewId]},t.prototype._initEvents=function(){var e=this;C(yb,function(a){var i=function(o){var s=e.getModel(),l=o.target,u,c=a==="globalout";if(c?u={}:l&&yn(l,function(p){var m=ee(p);if(m&&m.dataIndex!=null){var g=m.dataModel||s.getSeriesByIndex(m.seriesIndex);return u=g&&g.getDataParams(m.dataIndex,m.dataType,l)||{},!0}else if(m.eventData)return u=W({},m.eventData),!0},!0),u){var f=u.componentType,h=u.componentIndex;(f==="markLine"||f==="markPoint"||f==="markArea")&&(f="series",h=u.seriesIndex);var v=f&&h!=null&&s.getComponent(f,h),d=v&&e[v.mainType==="series"?"_chartsMap":"_componentsMap"][v.__viewId];u.event=o,u.type=a,e._$eventProcessor.eventInfo={targetEl:l,packedEvent:u,model:v,view:d},e.trigger(a,u)}};i.zrEventfulCallAtLast=!0,e._zr.on(a,i,e)});var n=this._messageCenter;C(ls,function(a,i){n.on(i,function(o){e.trigger(i,o)})}),WS(n,this,this._api)},t.prototype.isDisposed=function(){return this._disposed},t.prototype.clear=function(){if(this._disposed){this.id;return}this.setOption({series:[]},!0)},t.prototype.dispose=function(){if(this._disposed){this.id;return}this._disposed=!0;var e=this.getDom();e&&Qv(this.getDom(),Rl,"");var n=this,a=n._api,i=n._model;C(n._componentsViews,function(o){o.dispose(i,a)}),C(n._chartsViews,function(o){o.dispose(i,a)}),n._zr.dispose(),n._dom=n._model=n._chartsMap=n._componentsMap=n._chartsViews=n._componentsViews=n._scheduler=n._api=n._zr=n._throttledZrFlush=n._theme=n._coordSysMgr=n._messageCenter=null,delete An[n.id]},t.prototype.resize=function(e){if(!this[be]){if(this._disposed){this.id;return}this._zr.resize(e);var n=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!n){var a=n.resetOption("media"),i=e&&e.silent;this[Te]&&(i==null&&(i=this[Te].silent),a=!0,this[Te]=null),this[be]=!0,Mr(this);try{a&&rr(this),dt.update.call(this,{type:"resize",animation:W({duration:0},e&&e.animation)})}catch(o){throw this[be]=!1,o}this[be]=!1,Dr.call(this,i),Ar.call(this,i)}}},t.prototype.showLoading=function(e,n){if(this._disposed){this.id;return}if($(e)&&(n=e,e=""),e=e||"default",this.hideLoading(),!!fs[e]){var a=fs[e](this._api,n),i=this._zr;this._loadingFX=a,i.add(a)}},t.prototype.hideLoading=function(){if(this._disposed){this.id;return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},t.prototype.makeActionFromEvent=function(e){var n=W({},e);return n.type=ss[e.type],n},t.prototype.dispatchAction=function(e,n){if(this._disposed){this.id;return}if($(n)||(n={silent:!!n}),!!ii[e.type]&&this._model){if(this[be]){this._pendingActions.push(e);return}var a=n.silent;lo.call(this,e,a);var i=n.flush;i?this._zr.flush():i!==!1&&ye.browser.weChat&&this._throttledZrFlush(),Dr.call(this,a),Ar.call(this,a)}},t.prototype.updateLabelLayout=function(){Qe.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(e){if(this._disposed){this.id;return}var n=e.seriesIndex,a=this.getModel(),i=a.getSeriesByIndex(n);i.appendData(e),this._scheduler.unfinished=!0,this.getZr().wakeUp()},t.internalField=(function(){rr=function(f){var h=f._scheduler;h.restorePipelines(f._model),h.prepareStageTasks(),oo(f,!0),oo(f,!1),h.plan()},oo=function(f,h){for(var v=f._model,d=f._scheduler,p=h?f._componentsViews:f._chartsViews,m=h?f._componentsMap:f._chartsMap,g=f._zr,y=f._api,_=0;_h.get("hoverLayerThreshold")&&!ye.node&&!ye.worker&&h.eachSeries(function(m){if(!m.preventUsingHoverLayer){var g=f._chartsMap[m.__viewId];g.__alive&&g.eachRendered(function(y){y.states.emphasis&&(y.states.emphasis.hoverLayer=!0)})}})}function s(f,h){var v=f.get("blendMode")||null;h.eachRendered(function(d){d.isGroup||(d.style.blend=v)})}function l(f,h){if(!f.preventAutoZ){var v=qa(f);h.eachRendered(function(d){return mh(d,v.z,v.zlevel),!0})}}function u(f,h){h.eachRendered(function(v){if(!bn(v)){var d=v.getTextContent(),p=v.getTextGuideLine();v.stateTransition&&(v.stateTransition=null),d&&d.stateTransition&&(d.stateTransition=null),p&&p.stateTransition&&(p.stateTransition=null),v.hasState()?(v.prevStates=v.currentStates,v.clearStates()):v.prevStates&&(v.prevStates=null)}})}function c(f,h){var v=f.getModel("stateAnimation"),d=f.isAnimationEnabled(),p=v.get("duration"),m=p>0?{duration:p,delay:v.get("delay"),easing:v.get("easing")}:null;h.eachRendered(function(g){if(g.states&&g.states.emphasis){if(bn(g))return;if(g instanceof Ce&&Ty(g),g.__dirty){var y=g.prevStates;y&&g.useStates(y)}if(d){g.stateTransition=m;var _=g.getTextContent(),S=g.getTextGuideLine();_&&(_.stateTransition=m),S&&(S.stateTransition=m)}g.__dirty&&i(g)}})}qc=function(f){return new((function(h){H(v,h);function v(){return h!==null&&h.apply(this,arguments)||this}return v.prototype.getCoordinateSystems=function(){return f._coordSysMgr.getCoordinateSystems()},v.prototype.getComponentByElement=function(d){for(;d;){var p=d.__ecComponentInfo;if(p!=null)return f._model.getComponent(p.mainType,p.index);d=d.parent}},v.prototype.enterEmphasis=function(d,p){zr(d,p),Xe(f)},v.prototype.leaveEmphasis=function(d,p){Vr(d,p),Xe(f)},v.prototype.enterBlur=function(d){py(d),Xe(f)},v.prototype.leaveBlur=function(d){nh(d),Xe(f)},v.prototype.enterSelect=function(d){ah(d),Xe(f)},v.prototype.leaveSelect=function(d){ih(d),Xe(f)},v.prototype.getModel=function(){return f.getModel()},v.prototype.getViewOfComponentModel=function(d){return f.getViewOfComponentModel(d)},v.prototype.getViewOfSeriesModel=function(d){return f.getViewOfSeriesModel(d)},v.prototype.getMainProcessVersion=function(){return f[ba]},v})(Zd))(f)},pp=function(f){function h(v,d){for(var p=0;p=0)){Jc.push(e);var i=Qd.wrapStageHandler(e,a);i.__prio=t,i.__raw=e,r.push(i)}}function xp(r,t){fs[r]=t}function Tb(r,t,e){var n=nb("registerMap");n&&n(r,t,e)}var Db=b_;mr(Pl,Ex);mr(Ii,Ox);mr(Ii,Bx);mr(Pl,Kx);mr(Ii,qx);mr(up,tb);_p(Kd);Sp(ob,Px);xp("default",Nx);ft({type:ir,event:ir,update:ir},St);ft({type:ka,event:ka,update:ka},St);ft({type:Za,event:$s,update:Za,action:St,refineEvent:Bl,publishNonRefinedEvent:!0});ft({type:zo,event:$s,update:zo,action:St,refineEvent:Bl,publishNonRefinedEvent:!0});ft({type:$a,event:$s,update:$a,action:St,refineEvent:Bl,publishNonRefinedEvent:!0});function Bl(r,t,e,n){return{eventContent:{selected:Sy(e),isFromClick:t.isFromClick||!1}}}yp("default",{});yp("dark",rp);var ef=[],Ab={registerPreprocessor:_p,registerProcessor:Sp,registerPostInit:xb,registerPostUpdate:bb,registerUpdateLifecycle:El,registerAction:ft,registerCoordinateSystem:wb,registerLayout:Cb,registerVisual:mr,registerTransform:Db,registerLoading:xp,registerMap:Tb,registerImpl:rb,PRIORITY:pb,ComponentModel:ae,ComponentView:Ge,SeriesModel:He,ChartView:Be,registerComponentModel:function(r){ae.registerClass(r)},registerComponentView:function(r){Ge.registerClass(r)},registerSeriesModel:function(r){He.registerClass(r)},registerChartView:function(r){Be.registerClass(r)},registerCustomSeries:function(r,t){},registerSubTypeDefaulter:function(r,t){ae.registerSubTypeDefaulter(r,t)},registerPainter:function(r,t){sm(r,t)}};function xt(r){if(N(r)){C(r,function(t){xt(t)});return}ue(ef,r)>=0||(ef.push(r),q(r)&&(r={install:r}),r.install(Ab))}var Mb=(function(r){H(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.hasSymbolVisual=!0,e}return t.prototype.getInitialData=function(e,n){return Ti(null,this,{useEncodeDefaulter:!0})},t.prototype.getProgressive=function(){var e=this.option.progressive;return e??(this.option.large?5e3:this.get("progressive"))},t.prototype.getProgressiveThreshold=function(){var e=this.option.progressiveThreshold;return e??(this.option.large?1e4:this.get("progressiveThreshold"))},t.prototype.brushSelector=function(e,n,a){return a.point(n.getItemLayout(e))},t.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},t.type="series.scatter",t.dependencies=["grid","polar","geo","singleAxis","calendar","matrix"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:z.color.primary}},universalTransition:{divideShape:"clone"}},t})(He),bp=4,Ib=(function(){function r(){}return r})(),Lb=(function(r){H(t,r);function t(e){var n=r.call(this,e)||this;return n._off=0,n.hoverDataIdx=-1,n}return t.prototype.getDefaultShape=function(){return new Ib},t.prototype.reset=function(){this.notClear=!1,this._off=0},t.prototype.buildPath=function(e,n){var a=n.points,i=n.size,o=this.symbolProxy,s=o.shape,l=e.getContext?e.getContext():e,u=l&&i[0]=0;u--){var c=u*2,f=i[c]-s/2,h=i[c+1]-l/2;if(e>=f&&n>=h&&e<=f+s&&n<=h+l)return u}return-1},t.prototype.contain=function(e,n){var a=this.transformCoordToLocal(e,n),i=this.getBoundingRect();if(e=a[0],n=a[1],i.contain(e,n)){var o=this.hoverDataIdx=this.findDataIndex(e,n);return o>=0}return this.hoverDataIdx=-1,!1},t.prototype.getBoundingRect=function(){var e=this._rect;if(!e){for(var n=this.shape,a=n.points,i=n.size,o=i[0],s=i[1],l=1/0,u=1/0,c=-1/0,f=-1/0,h=0;h=0&&(u.dataIndex=f+(t.startIndex||0))})},r.prototype.remove=function(){this._clear()},r.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},r})(),kb=(function(r){H(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,n,a){var i=e.getData(),o=this._updateSymbolDraw(i,e);o.updateData(i,{clipShape:this._getClipShape(e)}),this._finished=!0},t.prototype.incrementalPrepareRender=function(e,n,a){var i=e.getData(),o=this._updateSymbolDraw(i,e);o.incrementalPrepareUpdate(i),this._finished=!1},t.prototype.incrementalRender=function(e,n,a){this._symbolDraw.incrementalUpdate(e,n.getData(),{clipShape:this._getClipShape(n)}),this._finished=e.end===n.getData().count()},t.prototype.updateTransform=function(e,n,a){var i=e.getData();if(this.group.dirty(),!this._finished||i.count()>1e4)return{update:!0};var o=Dl("").reset(e,n,a);o.progress&&o.progress({start:0,end:i.count(),count:i.count()},i),this._symbolDraw.updateLayout(i)},t.prototype.eachRendered=function(e){this._symbolDraw&&this._symbolDraw.eachRendered(e)},t.prototype._getClipShape=function(e){if(e.get("clip",!0)){var n=e.coordinateSystem;return n&&n.getArea&&n.getArea(.1)}},t.prototype._updateSymbolDraw=function(e,n){var a=this._symbolDraw,i=n.pipelineContext,o=i.large;return(!a||o!==this._isLargeDraw)&&(a&&a.remove(),a=this._symbolDraw=o?new Pb:new gd,this._isLargeDraw=o,this.group.removeAll()),this.group.add(a.group),a},t.prototype.remove=function(e,n){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},t.prototype.dispose=function(){},t.type="scatter",t})(Be),wp={left:0,right:0,top:0,bottom:0},si=["25%","25%"],Rb=(function(r){H(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.mergeDefaultAndTheme=function(e,n){var a=aa(e.outerBounds);r.prototype.mergeDefaultAndTheme.apply(this,arguments),a&&e.outerBounds&&Yt(e.outerBounds,a)},t.prototype.mergeOption=function(e,n){r.prototype.mergeOption.apply(this,arguments),this.option.outerBounds&&e.outerBounds&&Yt(this.option.outerBounds,e.outerBounds)},t.type="grid",t.dependencies=["xAxis","yAxis"],t.layoutMode="box",t.defaultOption={show:!1,z:0,left:"15%",top:65,right:"10%",bottom:80,containLabel:!1,outerBoundsMode:"auto",outerBounds:wp,outerBoundsContain:"all",outerBoundsClampWidth:si[0],outerBoundsClampHeight:si[1],backgroundColor:z.color.transparent,borderWidth:1,borderColor:z.color.neutral30},t})(ae),Eb=(function(){function r(){}return r.prototype.getNeedCrossZero=function(){var t=this.option;return!t.scale},r.prototype.getCoordSysModel=function(){},r})(),vs=(function(r){H(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",Re).models[0]},t.type="cartesian2dAxis",t})(ae);bt(vs,Eb);var Cp={show:!0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:z.color.axisLine,width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15],breakLine:!0},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12,color:z.color.axisLabel,textMargin:[0,3]},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:z.color.axisSplitLine,width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:[z.color.backgroundTint,z.color.backgroundTransparent]}},breakArea:{show:!0,itemStyle:{color:z.color.neutral00,borderColor:z.color.border,borderWidth:1,borderType:[3,3],opacity:.6},zigzagAmplitude:4,zigzagMinSpan:4,zigzagMaxSpan:20,zigzagZ:100,expandOnClick:!0},breakLabelLayout:{moveOverlap:"auto"}},Ob=J({boundaryGap:!0,deduplication:null,jitter:0,jitterOverlap:!0,jitterMargin:2,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto",show:"auto"},axisLabel:{interval:"auto"}},Cp),Nl=J({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:z.color.axisMinorSplitLine,width:1}}},Cp),Bb=J({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},Nl),Nb=oe({logBase:10},Nl);const zb={category:Ob,value:Nl,time:Bb,log:Nb};var Vb=0,hs=(function(){function r(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this.uid=++Vb,this._onCollect=t.onCollect}return r.createByAxisModel=function(t){var e=t.option,n=e.data,a=n&&Y(n,Gb);return new r({categories:a,needCollect:!a,deduplication:e.dedplication!==!1})},r.prototype.getOrdinal=function(t){return this._getOrCreateMap().get(t)},r.prototype.parseAndCollect=function(t){var e,n=this._needCollect;if(!X(t)&&!n)return t;if(n&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,this._onCollect&&this._onCollect(t,e),e;var a=this._getOrCreateMap();return e=a.get(t),e==null&&(n?(e=this.categories.length,this.categories[e]=t,a.set(t,e),this._onCollect&&this._onCollect(t,e)):e=NaN),e},r.prototype._getOrCreateMap=function(){return this._map||(this._map=Z(this.categories))},r})();function Gb(r){return $(r)&&r.value!=null?r.value:r+""}var Fb={value:1,category:1,time:1,log:1},Wb=null;function Hb(){return Wb}function tf(r,t,e,n){C(Fb,function(a,i){var o=J(J({},zb[i],!0),n,!0),s=(function(l){H(u,l);function u(){var c=l!==null&&l.apply(this,arguments)||this;return c.type=t+"Axis."+i,c}return u.prototype.mergeDefaultAndTheme=function(c,f){var h=zn(this),v=h?aa(c):{},d=f.getTheme();J(c,d.get(i+"Axis")),J(c,this.getDefaultOption()),c.type=rf(c),h&&Yt(c,v,h)},u.prototype.optionUpdated=function(){var c=this.option;c.type==="category"&&(this.__ordinalMeta=hs.createByAxisModel(this))},u.prototype.getCategories=function(c){var f=this.option;if(f.type==="category")return c?f.data:this.__ordinalMeta.categories},u.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},u.prototype.updateAxisBreaks=function(c){return{breaks:[]}},u.type=t+"Axis."+i,u.defaultOption=o,u})(e);r.registerComponentModel(s)}),r.registerSubTypeDefaulter(t+"Axis",rf)}function rf(r){return r.type||(r.data?"category":"value")}function ds(r){return r.type==="interval"||r.type==="log"}function Ub(r,t,e,n,a){var i={},o=i.interval=Uv(t/e);n!=null&&oa&&(o=i.interval=a);var s=i.intervalPrecision=Hn(o),l=i.niceTickExtent=[Le(Math.ceil(r[0]/o)*o,s),Le(Math.floor(r[1]/o)*o,s)];return Yb(l,r),i}function co(r){var t=Math.pow(10,Hs(r)),e=r/t;return e?e===2?e=3:e===3?e=5:e*=2:e=1,Le(e*t)}function Hn(r){return yt(r)+2}function nf(r,t,e){r[t]=Math.max(Math.min(r[t],e[1]),e[0])}function Yb(r,t){!isFinite(r[0])&&(r[0]=t[0]),!isFinite(r[1])&&(r[1]=t[1]),nf(r,0,t),nf(r,1,t),r[0]>r[1]&&(r[0]=r[1])}function zl(r,t){return r>=t[0]&&r<=t[1]}var Xb=(function(){function r(){this.normalize=af,this.scale=of}return r.prototype.updateMethods=function(t){t.hasBreaks()?(this.normalize=ie(t.normalize,t),this.scale=ie(t.scale,t)):(this.normalize=af,this.scale=of)},r})();function af(r,t){return t[1]===t[0]?.5:(r-t[0])/(t[1]-t[0])}function of(r,t){return r*(t[1]-t[0])+t[0]}function ps(r,t,e){var n=Math.log(r);return[Math.log(e?t[0]:Math.max(0,t[0]))/n,Math.log(e?t[1]:Math.max(0,t[1]))/n]}var $t=(function(){function r(t){this._calculator=new Xb,this._setting=t||{},this._extent=[1/0,-1/0]}return r.prototype.getSetting=function(t){return this._setting[t]},r.prototype._innerUnionExtent=function(t){var e=this._extent;this._innerSetExtent(t[0]e[1]?t[1]:e[1])},r.prototype.unionExtentFromData=function(t,e){this._innerUnionExtent(t.getApproximateExtent(e))},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.setExtent=function(t,e){this._innerSetExtent(t,e)},r.prototype._innerSetExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=t),isNaN(e)||(n[1]=e),this._brkCtx&&this._brkCtx.update(n)},r.prototype.setBreaksFromOption=function(t){},r.prototype._innerSetBreak=function(t){this._brkCtx&&(this._brkCtx.setBreaks(t),this._calculator.updateMethods(this._brkCtx),this._brkCtx.update(this._extent))},r.prototype._innerGetBreaks=function(){return this._brkCtx?this._brkCtx.breaks:[]},r.prototype.hasBreaks=function(){return this._brkCtx?this._brkCtx.hasBreaks():!1},r.prototype._getExtentSpanWithBreaks=function(){return this._brkCtx&&this._brkCtx.hasBreaks()?this._brkCtx.getExtentSpan():this._extent[1]-this._extent[0]},r.prototype.isInExtentRange=function(t){return this._extent[0]<=t&&this._extent[1]>=t},r.prototype.isBlank=function(){return this._isBlank},r.prototype.setBlank=function(t){this._isBlank=t},r})();di($t);var Vl=(function(r){H(t,r);function t(e){var n=r.call(this,e)||this;n.type="ordinal";var a=n.getSetting("ordinalMeta");return a||(a=new hs({})),N(a)&&(a=new hs({categories:Y(a,function(i){return $(i)?i.value:i})})),n._ordinalMeta=a,n._extent=n.getSetting("extent")||[0,a.categories.length-1],n}return t.prototype.parse=function(e){return e==null?NaN:X(e)?this._ordinalMeta.getOrdinal(e):Math.round(e)},t.prototype.contain=function(e){return zl(e,this._extent)&&e>=0&&e=0&&e=0&&e=e},t.prototype.getOrdinalMeta=function(){return this._ordinalMeta},t.prototype.calcNiceTicks=function(){},t.prototype.calcNiceExtent=function(){},t.type="ordinal",t})($t);$t.registerClass(Vl);var Rt=Le,Hr=(function(r){H(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="interval",e._interval=0,e._intervalPrecision=2,e}return t.prototype.parse=function(e){return e==null||e===""?NaN:Number(e)},t.prototype.contain=function(e){return zl(e,this._extent)},t.prototype.normalize=function(e){return this._calculator.normalize(e,this._extent)},t.prototype.scale=function(e){return this._calculator.scale(e,this._extent)},t.prototype.getInterval=function(){return this._interval},t.prototype.setInterval=function(e){this._interval=e,this._niceExtent=this._extent.slice(),this._intervalPrecision=Hn(e)},t.prototype.getTicks=function(e){e=e||{};var n=this._interval,a=this._extent,i=this._niceExtent,o=this._intervalPrecision,s=Qa(),l=[];if(!n)return l;e.breakTicks;var u=1e4;a[0]=0&&(f=Rt(f+h*n,o))}if(l.length>0&&f===l[l.length-1].value)break;if(l.length>u)return[]}var v=l.length?l[l.length-1].value:i[1];return a[1]>v&&(e.expandToNicedExtent?l.push({value:Rt(v+n,o)}):l.push({value:a[1]})),e.breakTicks,l},t.prototype.getMinorTicks=function(e){for(var n=this.getTicks({expandToNicedExtent:!0}),a=[],i=this.getExtent(),o=1;oi[0]&&d>>1;r[a][1]a&&(this._approxInterval=a);var o=Da.length,s=Math.min(Zb(Da,this._approxInterval,0,o),o-1);this._interval=Da[s][1],this._intervalPrecision=Hn(this._interval),this._minLevelUnit=Da[Math.max(s-1,0)][0]},t.prototype.parse=function(e){return ce(e)?e:+$r(e)},t.prototype.contain=function(e){return zl(e,this._extent)},t.prototype.normalize=function(e){return this._calculator.normalize(e,this._extent)},t.prototype.scale=function(e){return this._calculator.scale(e,this._extent)},t.type="time",t})(Hr),Da=[["second",fl],["minute",vl],["hour",Cn],["quarter-day",Cn*6],["half-day",Cn*12],["day",$e*1.2],["half-week",$e*3.5],["week",$e*7],["month",$e*31],["quarter",$e*95],["half-year",Wu/2],["year",Wu]];function $b(r,t,e,n){return qo(new Date(t),r,n).getTime()===qo(new Date(e),r,n).getTime()}function Kb(r,t){return r/=$e,r>16?16:r>7.5?7:r>3.5?4:r>1.5?2:1}function qb(r){var t=30*$e;return r/=t,r>6?6:r>3?3:r>2?2:1}function jb(r){return r/=Cn,r>12?12:r>6?6:r>3.5?4:r>2?2:1}function sf(r,t){return r/=t?vl:fl,r>30?30:r>20?20:r>15?15:r>10?10:r>5?5:r>2?2:1}function Qb(r){return Uv(r)}function Jb(r,t,e){var n=Math.max(0,ue(or,t)-1);return qo(new Date(r),or[n],e).getTime()}function ew(r,t){var e=new Date(0);e[r](1);var n=e.getTime();e[r](1+t);var a=e.getTime()-n;return function(i,o){return Math.max(0,Math.round((o-i)/a))}}function tw(r,t,e,n,a,i){var o=1e4,s=$0,l=0;function u(I,P,k,E,U,R,O){for(var V=ew(U,I),B=P,G=new Date(B);Bo));)if(G[U](G[E]()+I),B=G.getTime(),i){var K=i.calcNiceTickMultiple(B,V);K>0&&(G[U](G[E]()+K*I),B=G.getTime())}O.push({value:B,notAdd:!0})}function c(I,P,k){var E=[],U=!P.length;if(!$b(Tn(I),n[0],n[1],e)){U&&(P=[{value:Jb(n[0],I,e)},{value:n[1]}]);for(var R=0;R=n[0]&&O<=n[1]&&u(B,O,V,G,K,te,E),I==="year"&&k.length>1&&R===0&&k.unshift({value:k[0].value-B})}}for(var R=0;R=n[0]&&S<=n[1]&&v++)}var b=a/t;if(v>b*1.5&&d>b/1.5||(f.push(y),v>b||r===s[p]))break}h=[]}}}for(var x=we(Y(f,function(I){return we(I,function(P){return P.value>=n[0]&&P.value<=n[1]&&!P.notAdd})}),function(I){return I.length>0}),w=[],T=x.length-1,p=0;p0;)i*=10;var s=[gs(nw(n[0]/i)*i),gs(rw(n[1]/i)*i)];this._interval=i,this._intervalPrecision=Hn(i),this._niceExtent=s}},t.prototype.calcNiceExtent=function(e){r.prototype.calcNiceExtent.call(this,e),this._fixMin=e.fixMin,this._fixMax=e.fixMax},t.prototype.contain=function(e){return e=Ma(e)/Ma(this.base),r.prototype.contain.call(this,e)},t.prototype.normalize=function(e){return e=Ma(e)/Ma(this.base),r.prototype.normalize.call(this,e)},t.prototype.scale=function(e){return e=r.prototype.scale.call(this,e),Aa(this.base,e)},t.prototype.setBreaksFromOption=function(e){},t.type="log",t})(Hr);function fo(r,t){return gs(r,yt(t))}$t.registerClass(Dp);var aw=(function(){function r(t,e,n){this._prepareParams(t,e,n)}return r.prototype._prepareParams=function(t,e,n){n[1]0&&l>0&&!u&&(s=0),s<0&&l<0&&!c&&(l=0));var h=this._determinedMin,v=this._determinedMax;return h!=null&&(s=h,u=!0),v!=null&&(l=v,c=!0),{min:s,max:l,minFixed:u,maxFixed:c,isBlank:f}},r.prototype.modifyDataMinMax=function(t,e){this[ow[t]]=e},r.prototype.setDeterminedMinMax=function(t,e){var n=iw[t];this[n]=e},r.prototype.freeze=function(){this.frozen=!0},r})(),iw={min:"_determinedMin",max:"_determinedMax"},ow={min:"_dataMin",max:"_dataMax"};function Ap(r,t,e){var n=r.rawExtentInfo;return n||(n=new aw(r,t,e),r.rawExtentInfo=n,n)}function Ia(r,t){return t==null?null:Ua(t)?NaN:r.parse(t)}function Mp(r,t){var e=r.type,n=Ap(r,t,r.getExtent()).calculate();r.setBlank(n.isBlank);var a=n.min,i=n.max,o=t.ecModel;if(o&&e==="time"){var s=Ad("bar",o),l=!1;if(C(s,function(f){l=l||f.getBaseAxis()===t.axis}),l){var u=Md(s),c=sw(a,i,t,u);a=c.min,i=c.max}}return{extent:[a,i],fixMin:n.minFixed,fixMax:n.maxFixed}}function sw(r,t,e,n){var a=e.axis.getExtent(),i=Math.abs(a[1]-a[0]),o=TS(n,e.axis);if(o===void 0)return{min:r,max:t};var s=1/0;C(o,function(v){s=Math.min(v.offset,s)});var l=-1/0;C(o,function(v){l=Math.max(v.offset+v.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,c=t-r,f=1-(s+l)/i,h=c/f-c;return t+=h*(l/u),r-=h*(s/u),{min:r,max:t}}function lf(r,t){var e=t,n=Mp(r,e),a=n.extent,i=e.get("splitNumber");r instanceof Dp&&(r.base=e.get("logBase"));var o=r.type,s=e.get("interval"),l=o==="interval"||o==="time";r.setBreaksFromOption(Pp(e)),r.setExtent(a[0],a[1]),r.calcNiceExtent({splitNumber:i,fixMin:n.fixMin,fixMax:n.fixMax,minInterval:l?e.get("minInterval"):null,maxInterval:l?e.get("maxInterval"):null}),s!=null&&r.setInterval&&r.setInterval(s)}function lw(r,t){if(t=t||r.get("type"),t)switch(t){case"category":return new Vl({ordinalMeta:r.getOrdinalMeta?r.getOrdinalMeta():r.getCategories(),extent:[1/0,-1/0]});case"time":return new Tp({locale:r.ecModel.getLocaleModel(),useUTC:r.ecModel.get("useUTC")});default:return new($t.getClass(t)||Hr)}}function uw(r){var t=r.scale.getExtent(),e=t[0],n=t[1];return!(e>0&&n>0||e<0&&n<0)}function jr(r){var t=r.getLabelModel().get("formatter");if(r.type==="time"){var e=K0(t);return function(a,i){return r.scale.getFormattedLabel(a,i,e)}}else{if(X(t))return function(a){var i=r.scale.getLabel(a),o=t.replace("{value}",i??"");return o};if(q(t)){if(r.type==="category")return function(a,i){return t(li(r,a),a.value-r.scale.getExtent()[0],null)};var n=Qa();return function(a,i){var o=null;return n&&(o=n.makeAxisLabelFormatterParamBreak(o,a.break)),t(li(r,a),i,o)}}else return function(a){return r.scale.getLabel(a)}}}function li(r,t){return r.type==="category"?r.scale.getLabel(t):t.value}function Gl(r){var t=r.get("interval");return t??"auto"}function Ip(r){return r.type==="category"&&Gl(r.getLabelModel())===0}function Lp(r,t){var e={};return C(r.mapDimensionsAll(t),function(n){e[k0(r,n)]=!0}),qe(e)}function cw(r,t,e){t&&C(Lp(t,e),function(n){var a=t.getApproximateExtent(n);a[0]r[1]&&(r[1]=a[1])})}function Ur(r){return r==="middle"||r==="center"}function Un(r){return r.getShallow("show")}function Pp(r){var t=r.get("breaks",!0);t==null}var fw=(function(){function r(t){this.type="cartesian",this._dimList=[],this._axes={},this.name=t||""}return r.prototype.getAxis=function(t){return this._axes[t]},r.prototype.getAxes=function(){return Y(this._dimList,function(t){return this._axes[t]},this)},r.prototype.getAxesByScale=function(t){return t=t.toLowerCase(),we(this.getAxes(),function(e){return e.scale.type===t})},r.prototype.addAxis=function(t){var e=t.dim;this._axes[e]=t,this._dimList.push(e)},r})(),ms=["x","y"];function uf(r){return(r.type==="interval"||r.type==="time")&&!r.hasBreaks()}var vw=(function(r){H(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="cartesian2d",e.dimensions=ms,e}return t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var e=this.getAxis("x").scale,n=this.getAxis("y").scale;if(!(!uf(e)||!uf(n))){var a=e.getExtent(),i=n.getExtent(),o=this.dataToPoint([a[0],i[0]]),s=this.dataToPoint([a[1],i[1]]),l=a[1]-a[0],u=i[1]-i[0];if(!(!l||!u)){var c=(s[0]-o[0])/l,f=(s[1]-o[1])/u,h=o[0]-a[0]*c,v=o[1]-i[0]*f,d=this._transform=[c,0,0,f,h,v];this._invTransform=Ns([],d)}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},t.prototype.containPoint=function(e){var n=this.getAxis("x"),a=this.getAxis("y");return n.contain(n.toLocalCoord(e[0]))&&a.contain(a.toLocalCoord(e[1]))},t.prototype.containData=function(e){return this.getAxis("x").containData(e[0])&&this.getAxis("y").containData(e[1])},t.prototype.containZone=function(e,n){var a=this.dataToPoint(e),i=this.dataToPoint(n),o=this.getArea(),s=new Ee(a[0],a[1],i[0]-a[0],i[1]-a[1]);return o.intersect(s)},t.prototype.dataToPoint=function(e,n,a){a=a||[];var i=e[0],o=e[1];if(this._transform&&i!=null&&isFinite(i)&&o!=null&&isFinite(o))return lr(a,e,this._transform);var s=this.getAxis("x"),l=this.getAxis("y");return a[0]=s.toGlobalCoord(s.dataToCoord(i,n)),a[1]=l.toGlobalCoord(l.dataToCoord(o,n)),a},t.prototype.clampData=function(e,n){var a=this.getAxis("x").scale,i=this.getAxis("y").scale,o=a.getExtent(),s=i.getExtent(),l=a.parse(e[0]),u=i.parse(e[1]);return n=n||[],n[0]=Math.min(Math.max(Math.min(o[0],o[1]),l),Math.max(o[0],o[1])),n[1]=Math.min(Math.max(Math.min(s[0],s[1]),u),Math.max(s[0],s[1])),n},t.prototype.pointToData=function(e,n,a){if(a=a||[],this._invTransform)return lr(a,e,this._invTransform);var i=this.getAxis("x"),o=this.getAxis("y");return a[0]=i.coordToData(i.toLocalCoord(e[0]),n),a[1]=o.coordToData(o.toLocalCoord(e[1]),n),a},t.prototype.getOtherAxis=function(e){return this.getAxis(e.dim==="x"?"y":"x")},t.prototype.getArea=function(e){e=e||0;var n=this.getAxis("x").getGlobalExtent(),a=this.getAxis("y").getGlobalExtent(),i=Math.min(n[0],n[1])-e,o=Math.min(a[0],a[1])-e,s=Math.max(n[0],n[1])-i+e,l=Math.max(a[0],a[1])-o+e;return new Ee(i,o,s,l)},t})(fw),hw=fe(),Mn=fe(),tt={estimate:1,determine:2};function ui(r){return{out:{noPxChangeTryDetermine:[]},kind:r}}function kp(r,t){var e=Y(t,function(n){return r.scale.parse(n)});return r.type==="time"&&e.length>0&&(e.sort(),e.unshift(e[0]),e.push(e[e.length-1])),e}function dw(r,t){var e=r.getLabelModel().get("customValues");if(e){var n=jr(r),a=r.scale.getExtent(),i=kp(r,e),o=we(i,function(s){return s>=a[0]&&s<=a[1]});return{labels:Y(o,function(s){var l={value:s};return{formattedLabel:n(l),rawLabel:r.scale.getLabel(l),tickValue:s,time:void 0,break:void 0}})}}return r.type==="category"?gw(r,t):yw(r)}function pw(r,t,e){var n=r.getTickModel().get("customValues");if(n){var a=r.scale.getExtent(),i=kp(r,n);return{ticks:we(i,function(o){return o>=a[0]&&o<=a[1]})}}return r.type==="category"?mw(r,t):{ticks:Y(r.scale.getTicks(e),function(o){return o.value})}}function gw(r,t){var e=r.getLabelModel(),n=Rp(r,e,t);return!e.get("show")||r.scale.isBlank()?{labels:[]}:n}function Rp(r,t,e){var n=Sw(r),a=Gl(t),i=e.kind===tt.estimate;if(!i){var o=Op(n,a);if(o)return o}var s,l;q(a)?s=zp(r,a):(l=a==="auto"?xw(r,e):a,s=Np(r,l));var u={labels:s,labelCategoryInterval:l};return i?e.out.noPxChangeTryDetermine.push(function(){return ys(n,a,u),!0}):ys(n,a,u),u}function mw(r,t){var e=_w(r),n=Gl(t),a=Op(e,n);if(a)return a;var i,o;if((!t.get("show")||r.scale.isBlank())&&(i=[]),q(n))i=zp(r,n,!0);else if(n==="auto"){var s=Rp(r,r.getLabelModel(),ui(tt.determine));o=s.labelCategoryInterval,i=Y(s.labels,function(l){return l.tickValue})}else o=n,i=Np(r,o,!0);return ys(e,n,{ticks:i,tickCategoryInterval:o})}function yw(r){var t=r.scale.getTicks(),e=jr(r);return{labels:Y(t,function(n,a){return{formattedLabel:e(n,a),rawLabel:r.scale.getLabel(n),tickValue:n.value,time:n.time,break:n.break}})}}var _w=Ep("axisTick"),Sw=Ep("axisLabel");function Ep(r){return function(e){return Mn(e)[r]||(Mn(e)[r]={list:[]})}}function Op(r,t){for(var e=0;ec&&(u=Math.max(1,Math.floor(l/c)));for(var f=s[0],h=r.dataToCoord(f+1)-r.dataToCoord(f),v=Math.abs(h*Math.cos(i)),d=Math.abs(h*Math.sin(i)),p=0,m=0;f<=s[1];f+=u){var g=0,y=0,_=Fs(a({value:f}),n.font,"center","top");g=_.width*1.3,y=_.height*1.3,p=Math.max(p,g,7),m=Math.max(m,y,7)}var S=p/v,b=m/d;isNaN(S)&&(S=1/0),isNaN(b)&&(b=1/0);var x=Math.max(0,Math.floor(Math.min(S,b)));if(e===tt.estimate)return t.out.noPxChangeTryDetermine.push(ie(ww,null,r,x,l)),x;var w=Bp(r,x,l);return w??x}function ww(r,t,e){return Bp(r,t,e)==null}function Bp(r,t,e){var n=hw(r.model),a=r.getExtent(),i=n.lastAutoInterval,o=n.lastTickCount;if(i!=null&&o!=null&&Math.abs(i-t)<=1&&Math.abs(o-e)<=1&&i>t&&n.axisExtent0===a[0]&&n.axisExtent1===a[1])return i;n.lastTickCount=e,n.lastAutoInterval=t,n.axisExtent0=a[0],n.axisExtent1=a[1]}function Cw(r){var t=r.getLabelModel();return{axisRotate:r.getRotate?r.getRotate():r.isHorizontal&&!r.isHorizontal()?90:0,labelRotate:t.get("rotate")||0,font:t.getFont()}}function Np(r,t,e){var n=jr(r),a=r.scale,i=a.getExtent(),o=r.getLabelModel(),s=[],l=Math.max((t||0)+1,1),u=i[0],c=a.count();u!==0&&l>1&&c/l>2&&(u=Math.round(Math.ceil(u/l)*l));var f=Ip(r),h=o.get("showMinLabel")||f,v=o.get("showMaxLabel")||f;h&&u!==i[0]&&p(i[0]);for(var d=u;d<=i[1];d+=l)p(d);v&&d-l!==i[1]&&p(i[1]);function p(m){var g={value:m};s.push(e?m:{formattedLabel:n(g),rawLabel:a.getLabel(g),tickValue:m,time:void 0,break:void 0})}return s}function zp(r,t,e){var n=r.scale,a=jr(r),i=[];return C(n.getTicks(),function(o){var s=n.getLabel(o),l=o.value;t(o.value,s)&&i.push(e?l:{formattedLabel:a(o),rawLabel:s,tickValue:l,time:void 0,break:void 0})}),i}var cf=[0,1],Tw=(function(){function r(t,e,n){this.onBand=!1,this.inverse=!1,this.dim=t,this.scale=e,this._extent=n||[0,0]}return r.prototype.contain=function(t){var e=this._extent,n=Math.min(e[0],e[1]),a=Math.max(e[0],e[1]);return t>=n&&t<=a},r.prototype.containData=function(t){return this.scale.contain(this.scale.parse(t))},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.getPixelPrecision=function(t){return Wv(t||this.scale.getExtent(),this._extent)},r.prototype.setExtent=function(t,e){var n=this._extent;n[0]=t,n[1]=e},r.prototype.dataToCoord=function(t,e){var n=this._extent,a=this.scale;return t=a.normalize(a.parse(t)),this.onBand&&a.type==="ordinal"&&(n=n.slice(),ff(n,a.count())),Bt(t,cf,n,e)},r.prototype.coordToData=function(t,e){var n=this._extent,a=this.scale;this.onBand&&a.type==="ordinal"&&(n=n.slice(),ff(n,a.count()));var i=Bt(t,n,cf,e);return this.scale.scale(i)},r.prototype.pointToData=function(t,e){},r.prototype.getTicksCoords=function(t){t=t||{};var e=t.tickModel||this.getTickModel(),n=pw(this,e,{breakTicks:t.breakTicks,pruneByBreak:t.pruneByBreak}),a=n.ticks,i=Y(a,function(s){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(s):s),tickValue:s}},this),o=e.get("alignWithLabel");return Dw(this,i,o,t.clamp),i},r.prototype.getMinorTicksCoords=function(){if(this.scale.type==="ordinal")return[];var t=this.model.getModel("minorTick"),e=t.get("splitNumber");e>0&&e<100||(e=5);var n=this.scale.getMinorTicks(e),a=Y(n,function(i){return Y(i,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return a},r.prototype.getViewLabels=function(t){return t=t||ui(tt.determine),dw(this,t).labels},r.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},r.prototype.getTickModel=function(){return this.model.getModel("axisTick")},r.prototype.getBandWidth=function(){var t=this._extent,e=this.scale.getExtent(),n=e[1]-e[0]+(this.onBand?1:0);n===0&&(n=1);var a=Math.abs(t[1]-t[0]);return Math.abs(a)/n},r.prototype.calculateCategoryInterval=function(t){return t=t||ui(tt.determine),bw(this,t)},r})();function ff(r,t){var e=r[1]-r[0],n=t,a=e/n/2;r[0]+=a,r[1]-=a}function Dw(r,t,e,n){var a=t.length;if(!r.onBand||e||!a)return;var i=r.getExtent(),o,s;if(a===1)t[0].coord=i[0],t[0].onBand=!0,o=t[1]={coord:i[1],tickValue:t[0].tickValue,onBand:!0};else{var l=t[a-1].tickValue-t[0].tickValue,u=(t[a-1].coord-t[0].coord)/l;C(t,function(v){v.coord-=u/2,v.onBand=!0});var c=r.scale.getExtent();s=1+c[1]-t[a-1].tickValue,o={coord:t[a-1].coord+u*s,tickValue:c[1]+1,onBand:!0},t.push(o)}var f=i[0]>i[1];h(t[0].coord,i[0])&&(n?t[0].coord=i[0]:t.shift()),n&&h(i[0],t[0].coord)&&t.unshift({coord:i[0],onBand:!0}),h(i[1],o.coord)&&(n?o.coord=i[1]:t.pop()),n&&h(o.coord,i[1])&&t.push({coord:i[1],onBand:!0});function h(v,d){return v=Le(v),d=Le(d),f?v>d:vn[1]&&n.reverse(),n},t.prototype.pointToData=function(e,n){return this.coordToData(this.toLocalCoord(e[this.dim==="x"?0:1]),n)},t.prototype.setCategorySortInfo=function(e){if(this.type!=="category")return!1;this.model.option.categorySortInfo=e,this.scale.setSortInfo(e)},t})(Tw),Mw="expandAxisBreak",Gt=Math.PI,Iw=[[1,2,1,2],[5,3,5,3],[8,3,8,3]],Lw=[[0,1,0,1],[0,3,0,3],[0,3,0,3]],Yn=fe(),Vp=fe(),Gp=(function(){function r(t){this.recordMap={},this.resolveAxisNameOverlap=t}return r.prototype.ensureRecord=function(t){var e=t.axis.dim,n=t.componentIndex,a=this.recordMap,i=a[e]||(a[e]=[]);return i[n]||(i[n]={ready:{}})},r})();function Pw(r,t,e,n){var a=e.axis,i=t.ensureRecord(e),o=[],s,l=Fl(r.axisName)&&Ur(r.nameLocation);C(n,function(d){var p=Zt(d);if(!(!p||p.label.ignore)){o.push(p);var m=i.transGroup;l&&(m.transform?Ns(fn,m.transform):Iv(fn),p.transform&&Lv(fn,fn,p.transform),Ee.copy(La,p.localRect),La.applyTransform(fn),s?s.union(La):Ee.copy(s=new Ee(0,0,0,0),La))}});var u=Math.abs(i.dirVec.x)>.1?"x":"y",c=i.transGroup[u];if(o.sort(function(d,p){return Math.abs(d.label[u]-c)-Math.abs(p.label[u]-c)}),l&&s){var f=a.getExtent(),h=Math.min(f[0],f[1]),v=Math.max(f[0],f[1])-h;s.union(new Ee(h,0,v,1))}i.stOccupiedRect=s,i.labelInfoList=o}var fn=vi(),La=new Ee(0,0,0,0),Fp=function(r,t,e,n,a,i){if(Ur(r.nameLocation)){var o=i.stOccupiedRect;o&&Wp(jS({},o,i.transGroup.transform),n,a)}else Hp(i.labelInfoList,i.dirVec,n,a)};function Wp(r,t,e){var n=new pe;Il(r,t,n,{direction:Math.atan2(e.y,e.x),bidirectional:!1,touchThreshold:.05})&&QS(t,n)}function Hp(r,t,e,n){for(var a=pe.dot(n,t)>=0,i=0,o=r.length;i0?"top":"bottom",i="center"):Ya(a-Gt)?(o=n>0?"bottom":"top",i="center"):(o="middle",a>0&&a0?"right":"left":i=n>0?"left":"right"),{rotation:a,textAlign:i,textVerticalAlign:o}},r.makeAxisEventDataBase=function(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e},r.isLabelSilent=function(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)},r})(),kw=["axisLine","axisTickLabelEstimate","axisTickLabelDetermine","axisName"],Rw={axisLine:function(r,t,e,n,a,i,o){var s=n.get(["axisLine","show"]);if(s==="auto"&&(s=!0,r.raw.axisLineAutoShow!=null&&(s=!!r.raw.axisLineAutoShow)),!!s){var l=n.axis.getExtent(),u=i.transform,c=[l[0],0],f=[l[1],0],h=c[0]>f[0];u&&(lr(c,c,u),lr(f,f,u));var v=W({lineCap:"round"},n.getModel(["axisLine","lineStyle"]).getLineStyle()),d={strokeContainThreshold:r.raw.strokeContainThreshold||5,silent:!0,z2:1,style:v};if(n.get(["axisLine","breakLine"])&&n.axis.scale.hasBreaks())Hb().buildAxisBreakLine(n,a,i,d);else{var p=new ur(W({shape:{x1:c[0],y1:c[1],x2:f[0],y2:f[1]}},d));On(p.shape,p.style.lineWidth),p.anid="line",a.add(p)}var m=n.get(["axisLine","symbol"]);if(m!=null){var g=n.get(["axisLine","symbolSize"]);X(m)&&(m=[m,m]),(X(g)||ce(g))&&(g=[g,g]);var y=bl(n.get(["axisLine","symbolOffset"])||0,g),_=g[0],S=g[1];C([{rotate:r.rotation+Math.PI/2,offset:y[0],r:0},{rotate:r.rotation-Math.PI/2,offset:y[1],r:Math.sqrt((c[0]-f[0])*(c[0]-f[0])+(c[1]-f[1])*(c[1]-f[1]))}],function(b,x){if(m[x]!=="none"&&m[x]!=null){var w=Xt(m[x],-_/2,-S/2,_,S,v.stroke,!0),T=b.r+b.offset,D=h?f:c;w.attr({rotation:b.rotate,x:D[0]+T*Math.cos(r.rotation),y:D[1]-T*Math.sin(r.rotation),silent:!0,z2:11}),a.add(w)}})}}},axisTickLabelEstimate:function(r,t,e,n,a,i,o,s){var l=hf(t,a,s);l&&vf(r,t,e,n,a,i,o,tt.estimate)},axisTickLabelDetermine:function(r,t,e,n,a,i,o,s){var l=hf(t,a,s);l&&vf(r,t,e,n,a,i,o,tt.determine);var u=Nw(r,a,i,n);Bw(r,t.labelLayoutList,u),zw(r,a,i,n,r.tickDirection)},axisName:function(r,t,e,n,a,i,o,s){var l=e.ensureRecord(n);t.nameEl&&(a.remove(t.nameEl),t.nameEl=l.nameLayout=l.nameLocation=null);var u=r.axisName;if(Fl(u)){var c=r.nameLocation,f=r.nameDirection,h=n.getModel("nameTextStyle"),v=n.get("nameGap")||0,d=n.axis.getExtent(),p=n.axis.inverse?-1:1,m=new pe(0,0),g=new pe(0,0);c==="start"?(m.x=d[0]-p*v,g.x=-p):c==="end"?(m.x=d[1]+p*v,g.x=p):(m.x=(d[0]+d[1])/2,m.y=r.labelOffset+f*v,g.y=f);var y=vi();g.transform(zv(y,y,r.rotation));var _=n.get("nameRotate");_!=null&&(_=_*Gt/180);var S,b;Ur(c)?S=Wt.innerTextLayout(r.rotation,_??r.rotation,f):(S=Ew(r.rotation,c,_||0,d),b=r.raw.axisNameAvailableWidth,b!=null&&(b=Math.abs(b/Math.sin(S.rotation)),!isFinite(b)&&(b=null)));var x=h.getFont(),w=n.get("nameTruncate",!0)||{},T=w.ellipsis,D=In(r.raw.nameTruncateMaxWidth,w.maxWidth,b),M=s.nameMarginLevel||0,A=new De({x:m.x,y:m.y,rotation:S.rotation,silent:Wt.isLabelSilent(n),style:Ut(h,{text:u,font:x,overflow:"truncate",width:D,ellipsis:T,fill:h.getTextColor()||n.get(["axisLine","lineStyle","color"]),align:h.get("align")||S.textAlign,verticalAlign:h.get("verticalAlign")||S.textVerticalAlign}),z2:1});if(ea({el:A,componentModel:n,itemName:u}),A.__fullText=u,A.anid="name",n.get("triggerEvent")){var L=Wt.makeAxisEventDataBase(n);L.targetType="axisName",L.name=u,ee(A).eventData=L}i.add(A),A.updateTransform(),t.nameEl=A;var I=l.nameLayout=Zt({label:A,priority:A.z2,defaultAttr:{ignore:A.ignore},marginDefault:Ur(c)?Iw[M]:Lw[M]});if(l.nameLocation=c,a.add(A),A.decomposeTransform(),r.shouldNameMoveOverlap&&I){var P=e.ensureRecord(n);e.resolveAxisNameOverlap(r,e,n,I,g,P)}}}};function vf(r,t,e,n,a,i,o,s){Yp(t)||Vw(r,t,a,s,n,o);var l=t.labelLayoutList;Gw(r,n,l,i),r.rotation;var u=r.optionHideOverlap;Ow(n,l,u),u&&ex(we(l,function(c){return c&&!c.label.ignore})),Pw(r,e,n,l)}function Ew(r,t,e,n){var a=Hv(e-r),i,o,s=n[0]>n[1],l=t==="start"&&!s||t!=="start"&&s;return Ya(a-Gt/2)?(o=l?"bottom":"top",i="center"):Ya(a-Gt*1.5)?(o=l?"top":"bottom",i="center"):(o="middle",aGt/2?i=l?"left":"right":i=l?"right":"left"),{rotation:a,textAlign:i,textVerticalAlign:o}}function Ow(r,t,e){if(Ip(r.axis))return;function n(s,l,u){var c=Zt(t[l]),f=Zt(t[u]);if(!(!c||!f)){if(s===!1||c.suggestIgnore){_n(c.label);return}if(f.suggestIgnore){_n(f.label);return}var h=.1;if(!e){var v=[0,0,0,0];c=Tc({marginForce:v},c),f=Tc({marginForce:v},f)}Il(c,f,null,{touchThreshold:h})&&_n(s?f.label:c.label)}}var a=r.get(["axisLabel","showMinLabel"]),i=r.get(["axisLabel","showMaxLabel"]),o=t.length;n(a,0,1),n(i,o-1,o-2)}function Bw(r,t,e){r.showMinorTicks||C(t,function(n){if(n&&n.label.ignore)for(var a=0;au[0]&&isFinite(d)&&isFinite(u[0]);)v=co(v),d=u[1]-v*o;else{var m=r.getTicks().length-1;m>o&&(v=co(v));var g=v*o;p=Math.ceil(u[1]/v)*v,d=Le(p-g),d<0&&u[0]>=0?(d=0,p=Le(g)):p>0&&u[1]<=0&&(p=0,d=-Le(g))}var y=(a[0].value-i[0].value)/s,_=(a[o].value-i[o].value)/s;n.setExtent.call(r,d+v*y,p+v*_),n.setInterval.call(r,v),(y||_)&&n.setNiceExtent.call(r,d+v,p-v)}var pf=[[3,1],[0,2]],Zw=(function(){function r(t,e,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=ms,this._initCartesian(t,e,n),this.model=t}return r.prototype.getRect=function(){return this._rect},r.prototype.update=function(t,e){var n=this._axesMap;this._updateScale(t,this.model);function a(o){var s,l=qe(o),u=l.length;if(u){for(var c=[],f=u-1;f>=0;f--){var h=+l[f],v=o[h],d=v.model,p=v.scale;ds(p)&&d.get("alignTicks")&&d.get("interval")==null?c.push(v):(lf(p,d),ds(p)&&(s=v))}c.length&&(s||(s=c.pop(),lf(s.scale,s.model)),C(c,function(m){Xw(m.scale,m.model,s.scale)}))}}a(n.x),a(n.y);var i={};C(n.x,function(o){gf(n,"y",o,i)}),C(n.y,function(o){gf(n,"x",o,i)}),this.resize(this.model,e)},r.prototype.resize=function(t,e,n){var a=na(t,e),i=this._rect=ct(t.getBoxLayoutParams(),a.refContainer),o=this._axesMap,s=this._coordsList,l=t.get("containLabel");if(Ss(o,i),!n){var u=qw(i,s,o,l,e),c=void 0;if(l)xs?(xs(this._axesList,i),Ss(o,i)):c=_f(i.clone(),"axisLabel",null,i,o,u,a);else{var f=jw(t,i,a),h=f.outerBoundsRect,v=f.parsedOuterBoundsContain,d=f.outerBoundsClamp;h&&(c=_f(h,v,d,i,o,u,a))}Xp(i,o,tt.determine,null,c,a)}C(this._coordsList,function(p){p.calcAffineTransform()})},r.prototype.getAxis=function(t,e){var n=this._axesMap[t];if(n!=null)return n[e||0]},r.prototype.getAxes=function(){return this._axesList.slice()},r.prototype.getCartesian=function(t,e){if(t!=null&&e!=null){var n="x"+t+"y"+e;return this._coordsMap[n]}$(t)&&(e=t.yAxisIndex,t=t.xAxisIndex);for(var a=0,i=this._coordsList;a0})==null;return Ka(n,s,!0,!0,e),Ss(a,n),l;function u(h){C(a[Nt[h]],function(v){if(Un(v.model)){var d=i.ensureRecord(v.model),p=d.labelInfoList;if(p)for(var m=0;m0&&!Ua(v)&&v>1e-4&&(h/=v),h}}function qw(r,t,e,n,a){var i=new Gp(Qw);return C(e,function(o){return C(o,function(s){if(Un(s.model)){var l=!n;s.axisBuilder=Uw(r,t,s.model,a,i,l)}})}),i}function Xp(r,t,e,n,a,i){var o=e===tt.determine;C(t,function(u){return C(u,function(c){Un(c.model)&&(Yw(c.axisBuilder,r,c.model),c.axisBuilder.build(o?{axisTickLabelDetermine:!0}:{axisTickLabelEstimate:!0},{noPxChange:a}))})});var s={x:0,y:0};l(0),l(1);function l(u){s[Nt[1-u]]=r[Gr[u]]<=i.refContainer[Gr[u]]*.5?0:1-u===1?2:1}C(t,function(u,c){return C(u,function(f){Un(f.model)&&((n==="all"||o)&&f.axisBuilder.build({axisName:!0},{nameMarginLevel:s[c]}),o&&f.axisBuilder.build({axisLine:!0}))})})}function jw(r,t,e){var n,a=r.get("outerBoundsMode",!0);a==="same"?n=t.clone():(a==null||a==="auto")&&(n=ct(r.get("outerBounds",!0)||wp,e.refContainer));var i=r.get("outerBoundsContain",!0),o;i==null||i==="auto"||ue(["all","axisLabel"],i)<0?o="all":o=i;var s=[Bo(j(r.get("outerBoundsClampWidth",!0),si[0]),t.width),Bo(j(r.get("outerBoundsClampHeight",!0),si[1]),t.height)];return{outerBoundsRect:n,parsedOuterBoundsContain:o,outerBoundsClamp:s}}var Qw=function(r,t,e,n,a,i){var o=e.axis.dim==="x"?"y":"x";Fp(r,t,e,n,a,i),Ur(r.nameLocation)||C(t.recordMap[o],function(s){s&&s.labelInfoList&&s.dirVec&&Hp(s.labelInfoList,s.dirVec,n,a)})};function Jw(r,t){var e={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return eC(e,r,t),e.seriesInvolved&&rC(e,r),e}function eC(r,t,e){var n=t.getComponent("tooltip"),a=t.getComponent("axisPointer"),i=a.get("link",!0)||[],o=[];C(e.getCoordinateSystems(),function(s){if(!s.axisPointerEnabled)return;var l=Xn(s.model),u=r.coordSysAxesInfo[l]={};r.coordSysMap[l]=s;var c=s.model,f=c.getModel("tooltip",n);if(C(s.getAxes(),ne(p,!1,null)),s.getTooltipAxes&&n&&f.get("show")){var h=f.get("trigger")==="axis",v=f.get(["axisPointer","type"])==="cross",d=s.getTooltipAxes(f.get(["axisPointer","axis"]));(h||v)&&C(d.baseAxes,ne(p,v?"cross":!0,h)),v&&C(d.otherAxes,ne(p,"cross",!1))}function p(m,g,y){var _=y.model.getModel("axisPointer",a),S=_.get("show");if(!(!S||S==="auto"&&!m&&!bs(_))){g==null&&(g=_.get("triggerTooltip")),_=m?tC(y,f,a,t,m,g):_;var b=_.get("snap"),x=_.get("triggerEmphasis"),w=Xn(y.model),T=g||b||y.type==="category",D=r.axesInfo[w]={key:w,axis:y,coordSys:s,axisPointerModel:_,triggerTooltip:g,triggerEmphasis:x,involveSeries:T,snap:b,useHandle:bs(_),seriesModels:[],linkGroup:null};u[w]=D,r.seriesInvolved=r.seriesInvolved||T;var M=nC(i,y);if(M!=null){var A=o[M]||(o[M]={axesInfo:{}});A.axesInfo[w]=D,A.mapper=i[M].mapper,D.linkGroup=A}}}})}function tC(r,t,e,n,a,i){var o=t.getModel("axisPointer"),s=["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],l={};C(s,function(h){l[h]=Q(o.get(h))}),l.snap=r.type!=="category"&&!!i,o.get("type")==="cross"&&(l.type="line");var u=l.label||(l.label={});if(u.show==null&&(u.show=!1),a==="cross"){var c=o.get(["label","show"]);if(u.show=c??!0,!i){var f=l.lineStyle=o.get("crossStyle");f&&oe(u,f.textStyle)}}return r.model.getModel("axisPointer",new he(l,e,n))}function rC(r,t){t.eachSeries(function(e){var n=e.coordinateSystem,a=e.get(["tooltip","trigger"],!0),i=e.get(["tooltip","show"],!0);!n||!n.model||a==="none"||a===!1||a==="item"||i===!1||e.get(["axisPointer","show"],!0)===!1||C(r.coordSysAxesInfo[Xn(n.model)],function(o){var s=o.axis;n.getAxis(s.dim)===s&&(o.seriesModels.push(e),o.seriesDataCount==null&&(o.seriesDataCount=0),o.seriesDataCount+=e.getData().count())})})}function nC(r,t){for(var e=t.model,n=t.dim,a=0;a=0||r===t}function aC(r){var t=Wl(r);if(t){var e=t.axisPointerModel,n=t.axis.scale,a=e.option,i=e.get("status"),o=e.get("value");o!=null&&(o=n.parse(o));var s=bs(e);i==null&&(a.status=s?"show":"hide");var l=n.getExtent().slice();l[0]>l[1]&&l.reverse(),(o==null||o>l[1])&&(o=l[1]),oi&&(t[1-n]=t[n]+f.sign*i),t}function po(r,t){var e=r[t]-r[1-t];return{span:Math.abs(e),sign:e>0?-1:e<0?1:t?-1:1}}function Ir(r,t){return Math.min(t[1]!=null?t[1]:1/0,Math.max(t[0]!=null?t[0]:-1/0,r))}var hr=!0,Zn=Math.min,Yr=Math.max,gC=Math.pow,mC=1e4,yC=6,_C=6,bf="globalPan",SC={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},xC={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},wf={brushStyle:{lineWidth:2,stroke:z.color.backgroundTint,fill:z.color.borderTint},transformable:!0,brushMode:"single",removeOnClick:!1},bC=0,wC=(function(r){H(t,r);function t(e){var n=r.call(this)||this;return n._track=[],n._covers=[],n._handlers={},n._zr=e,n.group=new Se,n._uid="brushController_"+bC++,C(LC,function(a,i){this._handlers[i]=ie(a,this)},n),n}return t.prototype.enableBrush=function(e){return this._brushType&&this._doDisableBrush(),e.brushType&&this._doEnableBrush(e),this},t.prototype._doEnableBrush=function(e){var n=this._zr;this._enableGlobalPan||vC(n,bf,this._uid),C(this._handlers,function(a,i){n.on(i,a)}),this._brushType=e.brushType,this._brushOption=J(Q(wf),e,!0)},t.prototype._doDisableBrush=function(){var e=this._zr;hC(e,bf,this._uid),C(this._handlers,function(n,a){e.off(a,n)}),this._brushType=this._brushOption=null},t.prototype.setPanels=function(e){if(e&&e.length){var n=this._panels={};C(e,function(a){n[a.panelId]=Q(a)})}else this._panels=null;return this},t.prototype.mount=function(e){e=e||{},this._enableGlobalPan=e.enableGlobalPan;var n=this.group;return this._zr.add(n),n.attr({x:e.x||0,y:e.y||0,rotation:e.rotation||0,scaleX:e.scaleX||1,scaleY:e.scaleY||1}),this._transform=n.getLocalTransform(),this},t.prototype.updateCovers=function(e){e=Y(e,function(h){return J(Q(wf),h,!0)});var n="\0-brush-index-",a=this._covers,i=this._covers=[],o=this,s=this._creatingCover;return new Nn(a,e,u,l).add(c).update(c).remove(f).execute(),this;function l(h,v){return(h.id!=null?h.id:n+v)+"-"+h.brushType}function u(h,v){return l(h.__brushOption,v)}function c(h,v){var d=e[h];if(v!=null&&a[v]===s)i[h]=a[v];else{var p=i[h]=v!=null?(a[v].__brushOption=d,a[v]):eg(o,Jp(o,d));Hl(o,p)}}function f(h){a[h]!==s&&o.group.remove(a[h])}},t.prototype.unmount=function(){return this.enableBrush(!1),Cs(this),this._zr.remove(this.group),this},t.prototype.dispose=function(){this.unmount(),this.off()},t})(jn);function Jp(r,t){var e=Li[t.brushType].createCover(r,t);return e.__brushOption=t,rg(e,t),r.group.add(e),e}function eg(r,t){var e=Ul(t);return e.endCreating&&(e.endCreating(r,t),rg(t,t.__brushOption)),t}function tg(r,t){var e=t.__brushOption;Ul(t).updateCoverShape(r,t,e.range,e)}function rg(r,t){var e=t.z;e==null&&(e=mC),r.traverse(function(n){n.z=e,n.z2=e})}function Hl(r,t){Ul(t).updateCommon(r,t),tg(r,t)}function Ul(r){return Li[r.__brushOption.brushType]}function Yl(r,t,e){var n=r._panels;if(!n)return hr;var a,i=r._transform;return C(n,function(o){o.isTargetByCursor(t,e,i)&&(a=o)}),a}function ng(r,t){var e=r._panels;if(!e)return hr;var n=t.__brushOption.panelId;return n!=null?e[n]:hr}function Cs(r){var t=r._covers,e=t.length;return C(t,function(n){r.group.remove(n)},r),t.length=0,!!e}function dr(r,t){var e=Y(r._covers,function(n){var a=n.__brushOption,i=Q(a.range);return{brushType:a.brushType,panelId:a.panelId,range:i}});r.trigger("brush",{areas:e,isEnd:!!t.isEnd,removeOnClick:!!t.removeOnClick})}function CC(r){var t=r._track;if(!t.length)return!1;var e=t[t.length-1],n=t[0],a=e[0]-n[0],i=e[1]-n[1],o=gC(a*a+i*i,.5);return o>yC}function ag(r){var t=r.length-1;return t<0&&(t=0),[r[0],r[t]]}function ig(r,t,e,n){var a=new Se;return a.add(new de({name:"main",style:Xl(e),silent:!0,draggable:!0,cursor:"move",drift:ne(Cf,r,t,a,["n","s","w","e"]),ondragend:ne(dr,t,{isEnd:!0})})),C(n,function(i){a.add(new de({name:i.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:ne(Cf,r,t,a,i),ondragend:ne(dr,t,{isEnd:!0})}))}),a}function og(r,t,e,n){var a=n.brushStyle.lineWidth||0,i=Yr(a,_C),o=e[0][0],s=e[1][0],l=o-a/2,u=s-a/2,c=e[0][1],f=e[1][1],h=c-i+a/2,v=f-i+a/2,d=c-o,p=f-s,m=d+a,g=p+a;gt(r,t,"main",o,s,d,p),n.transformable&&(gt(r,t,"w",l,u,i,g),gt(r,t,"e",h,u,i,g),gt(r,t,"n",l,u,m,i),gt(r,t,"s",l,v,m,i),gt(r,t,"nw",l,u,i,i),gt(r,t,"ne",h,u,i,i),gt(r,t,"sw",l,v,i,i),gt(r,t,"se",h,v,i,i))}function Ts(r,t){var e=t.__brushOption,n=e.transformable,a=t.childAt(0);a.useStyle(Xl(e)),a.attr({silent:!n,cursor:n?"move":"default"}),C([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],function(i){var o=t.childOfName(i.join("")),s=i.length===1?Ds(r,i[0]):DC(r,i);o&&o.attr({silent:!n,invisible:!n,cursor:n?xC[s]+"-resize":null})})}function gt(r,t,e,n,a,i,o){var s=t.childOfName(e);s&&s.setShape(MC(Zl(r,t,[[n,a],[n+i,a+o]])))}function Xl(r){return oe({strokeNoScale:!0},r.brushStyle)}function sg(r,t,e,n){var a=[Zn(r,e),Zn(t,n)],i=[Yr(r,e),Yr(t,n)];return[[a[0],i[0]],[a[1],i[1]]]}function TC(r){return Js(r.group)}function Ds(r,t){var e={w:"left",e:"right",n:"top",s:"bottom"},n={left:"w",right:"e",top:"n",bottom:"s"},a=hh(e[t],TC(r));return n[a]}function DC(r,t){var e=[Ds(r,t[0]),Ds(r,t[1])];return(e[0]==="e"||e[0]==="w")&&e.reverse(),e.join("")}function Cf(r,t,e,n,a,i){var o=e.__brushOption,s=r.toRectRange(o.range),l=lg(t,a,i);C(n,function(u){var c=SC[u];s[c[0]][c[1]]+=l[c[0]]}),o.range=r.fromRectRange(sg(s[0][0],s[1][0],s[0][1],s[1][1])),Hl(t,e),dr(t,{isEnd:!1})}function AC(r,t,e,n){var a=t.__brushOption.range,i=lg(r,e,n);C(a,function(o){o[0]+=i[0],o[1]+=i[1]}),Hl(r,t),dr(r,{isEnd:!1})}function lg(r,t,e){var n=r.group,a=n.transformCoordToLocal(t,e),i=n.transformCoordToLocal(0,0);return[a[0]-i[0],a[1]-i[1]]}function Zl(r,t,e){var n=ng(r,t);return n&&n!==hr?n.clipPath(e,r._transform):Q(e)}function MC(r){var t=Zn(r[0][0],r[1][0]),e=Zn(r[0][1],r[1][1]),n=Yr(r[0][0],r[1][0]),a=Yr(r[0][1],r[1][1]);return{x:t,y:e,width:n-t,height:a-e}}function IC(r,t,e){if(!(!r._brushType||PC(r,t.offsetX,t.offsetY))){var n=r._zr,a=r._covers,i=Yl(r,t,e);if(!r._dragging)for(var o=0;on.getWidth()||e<0||e>n.getHeight()}var Li={lineX:Af(0),lineY:Af(1),rect:{createCover:function(r,t){function e(n){return n}return ig({toRectRange:e,fromRectRange:e},r,t,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(r){var t=ag(r);return sg(t[1][0],t[1][1],t[0][0],t[0][1])},updateCoverShape:function(r,t,e,n){og(r,t,e,n)},updateCommon:Ts,contain:Ms},polygon:{createCover:function(r,t){var e=new Se;return e.add(new Kn({name:"main",style:Xl(t),silent:!0})),e},getCreatingRange:function(r){return r},endCreating:function(r,t){t.remove(t.childAt(0)),t.add(new zs({name:"main",draggable:!0,drift:ne(AC,r,t),ondragend:ne(dr,r,{isEnd:!0})}))},updateCoverShape:function(r,t,e,n){t.childAt(0).setShape({points:Zl(r,t,e)})},updateCommon:Ts,contain:Ms}};function Af(r){return{createCover:function(t,e){return ig({toRectRange:function(n){var a=[n,[0,100]];return r&&a.reverse(),a},fromRectRange:function(n){return n[r]}},t,e,[[["w"],["e"]],[["n"],["s"]]][r])},getCreatingRange:function(t){var e=ag(t),n=Zn(e[0][r],e[1][r]),a=Yr(e[0][r],e[1][r]);return[n,a]},updateCoverShape:function(t,e,n,a){var i,o=ng(t,e);if(o!==hr&&o.getLinearBrushOtherExtent)i=o.getLinearBrushOtherExtent(r);else{var s=t._zr;i=[0,[s.getWidth(),s.getHeight()][1-r]]}var l=[n,i];r&&l.reverse(),og(t,e,l,a)},updateCommon:Ts,contain:Ms}}function kC(r){return r=$l(r),function(t){return ph(t,r)}}function RC(r,t){return r=$l(r),function(e){var n=t??e,a=n?r.width:r.height,i=n?r.x:r.y;return[i,i+(a||0)]}}function EC(r,t,e){var n=$l(r);return function(a,i){return n.contain(i[0],i[1])&&!pC(a,t,e)}}function $l(r){return Ee.create(r)}var OC=(function(){function r(){}return r.prototype._hasEncodeRule=function(t){var e=this.getEncode();return e&&e.get(t)!=null},r.prototype.getInitialData=function(t,e){var n,a=e.getComponent("xAxis",this.get("xAxisIndex")),i=e.getComponent("yAxis",this.get("yAxisIndex")),o=a.get("type"),s=i.get("type"),l;o==="category"?(t.layout="horizontal",n=a.getOrdinalMeta(),l=!this._hasEncodeRule("x")):s==="category"?(t.layout="vertical",n=i.getOrdinalMeta(),l=!this._hasEncodeRule("y")):t.layout=t.layout||"horizontal";var u=["x","y"],c=t.layout==="horizontal"?0:1,f=this._baseAxisDim=u[c],h=u[1-c],v=[a,i],d=v[c].get("type"),p=v[1-c].get("type"),m=t.data;if(m&&l){var g=[];C(m,function(S,b){var x;N(S)?(x=S.slice(),S.unshift(b)):N(S.value)?(x=W({},S),x.value=x.value.slice(),S.value.unshift(b)):x=S,g.push(x)}),t.data=g}var y=this.defaultValueDimensions,_=[{name:f,type:Zo(d),ordinalMeta:n,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:h,type:Zo(p),dimsDef:y.slice()}];return Hd(this,{coordDimensions:_,dimensionsCount:y.length+1,encodeDefaulter:ne(Th,_,this)})},r.prototype.getBaseAxis=function(){var t=this._baseAxisDim;return this.ecModel.getComponent(t+"Axis",this.get(t+"AxisIndex")).axis},r})(),BC=["itemStyle","borderColor"],NC=["itemStyle","borderColor0"],zC=["itemStyle","borderColorDoji"],VC=["itemStyle","color"],GC=["itemStyle","color0"];function Kl(r,t){return t.get(r>0?VC:GC)}function ql(r,t){return t.get(r===0?zC:r>0?BC:NC)}var FC={seriesType:"candlestick",plan:ia(),performRawSeries:!0,reset:function(r,t){if(!t.isSeriesFiltered(r)){var e=r.pipelineContext.large;return!e&&{progress:function(n,a){for(var i;(i=n.next())!=null;){var o=a.getItemModel(i),s=a.getItemLayout(i).sign,l=o.getItemStyle();l.fill=Kl(s,o),l.stroke=ql(s,o)||l.fill;var u=a.ensureUniqueItemVisual(i,"style");W(u,l)}}}}}},WC=["color","borderColor"],HC=(function(r){H(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,n,a){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(e),this._isLargeDraw?this._renderLarge(e):this._renderNormal(e)},t.prototype.incrementalPrepareRender=function(e,n,a){this._clear(),this._updateDrawMode(e)},t.prototype.incrementalRender=function(e,n,a,i){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(e,n):this._incrementalRenderNormal(e,n)},t.prototype.eachRendered=function(e){ta(this._progressiveEls||this.group,e)},t.prototype._updateDrawMode=function(e){var n=e.pipelineContext.large;(this._isLargeDraw==null||n!==this._isLargeDraw)&&(this._isLargeDraw=n,this._clear())},t.prototype._renderNormal=function(e){var n=e.getData(),a=this._data,i=this.group,o=n.getLayout("isSimpleBox"),s=e.get("clip",!0),l=e.coordinateSystem,u=l.getArea&&l.getArea();this._data||i.removeAll(),n.diff(a).add(function(c){if(n.hasValue(c)){var f=n.getItemLayout(c);if(s&&Mf(u,f))return;var h=go(f,c,!0);Ve(h,{shape:{points:f.ends}},e,c),mo(h,n,c,o),i.add(h),n.setItemGraphicEl(c,h)}}).update(function(c,f){var h=a.getItemGraphicEl(f);if(!n.hasValue(c)){i.remove(h);return}var v=n.getItemLayout(c);if(s&&Mf(u,v)){i.remove(h);return}h?(Ae(h,{shape:{points:v.ends}},e,c),_i(h)):h=go(v),mo(h,n,c,o),i.add(h),n.setItemGraphicEl(c,h)}).remove(function(c){var f=a.getItemGraphicEl(c);f&&i.remove(f)}).execute(),this._data=n},t.prototype._renderLarge=function(e){this._clear(),If(e,this.group);var n=e.get("clip",!0)?Cl(e.coordinateSystem,!1,e):null;n?this.group.setClipPath(n):this.group.removeClipPath()},t.prototype._incrementalRenderNormal=function(e,n){for(var a=n.getData(),i=a.getLayout("isSimpleBox"),o;(o=e.next())!=null;){var s=a.getItemLayout(o),l=go(s);mo(l,a,o,i),l.incremental=!0,this.group.add(l),this._progressiveEls.push(l)}},t.prototype._incrementalRenderLarge=function(e,n){If(n,this.group,this._progressiveEls,!0)},t.prototype.remove=function(e){this._clear()},t.prototype._clear=function(){this.group.removeAll(),this._data=null},t.type="candlestick",t})(Be),UC=(function(){function r(){}return r})(),YC=(function(r){H(t,r);function t(e){var n=r.call(this,e)||this;return n.type="normalCandlestickBox",n}return t.prototype.getDefaultShape=function(){return new UC},t.prototype.buildPath=function(e,n){var a=n.points;this.__simpleBox?(e.moveTo(a[4][0],a[4][1]),e.lineTo(a[6][0],a[6][1])):(e.moveTo(a[0][0],a[0][1]),e.lineTo(a[1][0],a[1][1]),e.lineTo(a[2][0],a[2][1]),e.lineTo(a[3][0],a[3][1]),e.closePath(),e.moveTo(a[4][0],a[4][1]),e.lineTo(a[5][0],a[5][1]),e.moveTo(a[6][0],a[6][1]),e.lineTo(a[7][0],a[7][1]))},t})(Ce);function go(r,t,e){var n=r.ends;return new YC({shape:{points:e?XC(n,r):n},z2:100})}function Mf(r,t){for(var e=!0,n=0;nb?A[i]:M[i],ends:P,brushRect:O(x,w,_)})}function U(B,G){var K=[];return K[a]=G,K[i]=B,isNaN(G)||isNaN(B)?[NaN,NaN]:t.dataToPoint(K)}function R(B,G,K){var te=G.slice(),le=G.slice();te[a]=Ra(te[a]+n/2,1,!1),le[a]=Ra(le[a]-n/2,1,!0),K?B.push(te,le):B.push(le,te)}function O(B,G,K){var te=U(B,K),le=U(G,K);return te[a]-=n/2,le[a]-=n/2,{x:te[0],y:te[1],width:n,height:le[1]-te[1]}}function V(B){return B[a]=Ra(B[a],1),B}}function d(p,m){for(var g=st(p.count*4),y=0,_,S=[],b=[],x,w=m.getStore(),T=!!r.get(["itemStyle","borderColorDoji"]);(x=p.next())!=null;){var D=w.get(s,x),M=w.get(u,x),A=w.get(c,x),L=w.get(f,x),I=w.get(h,x);if(isNaN(D)||isNaN(L)||isNaN(I)){g[y++]=NaN,y+=3;continue}g[y++]=Lf(w,x,M,A,c,T),S[a]=D,S[i]=L,_=t.dataToPoint(S,null,b),g[y++]=_?_[0]:NaN,g[y++]=_?_[1]:NaN,S[i]=I,_=t.dataToPoint(S,null,b),g[y++]=_?_[1]:NaN}m.setLayout("largePoints",g)}}};function Lf(r,t,e,n,a,i){var o;return e>n?o=-1:e0?r.get(a,t-1)<=n?1:-1:1,o}function qC(r,t){var e=r.getBaseAxis(),n,a=e.type==="category"?e.getBandWidth():(n=e.getExtent(),Math.abs(n[1]-n[0])/t.count()),i=se(j(r.get("barMaxWidth"),a),a),o=se(j(r.get("barMinWidth"),1),a),s=r.get("barWidth");return s!=null?se(s,a):Math.max(Math.min(a/2,i),o)}function LD(r){r.registerChartView(HC),r.registerSeriesModel(cg),r.registerPreprocessor($C),r.registerVisual(FC),r.registerLayout(KC)}var jC=["itemStyle","borderWidth"],Pf=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],So=new hi,QC=(function(r){H(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,n,a){var i=this.group,o=e.getData(),s=this._data,l=e.coordinateSystem,u=l.getBaseAxis(),c=u.isHorizontal(),f=l.master.getRect(),h={ecSize:{width:a.getWidth(),height:a.getHeight()},seriesModel:e,coordSys:l,coordSysExtent:[[f.x,f.x+f.width],[f.y,f.y+f.height]],isHorizontal:c,valueDim:Pf[+c],categoryDim:Pf[1-+c]};o.diff(s).add(function(d){if(o.hasValue(d)){var p=Rf(o,d),m=kf(o,d,p,h),g=Ef(o,h,m);o.setItemGraphicEl(d,g),i.add(g),Bf(g,h,m)}}).update(function(d,p){var m=s.getItemGraphicEl(p);if(!o.hasValue(d)){i.remove(m);return}var g=Rf(o,d),y=kf(o,d,g,h),_=gg(o,y);m&&_!==m.__pictorialShapeStr&&(i.remove(m),o.setItemGraphicEl(d,null),m=null),m?iT(m,h,y):m=Ef(o,h,y,!0),o.setItemGraphicEl(d,m),m.__pictorialSymbolMeta=y,i.add(m),Bf(m,h,y)}).remove(function(d){var p=s.getItemGraphicEl(d);p&&Of(s,d,p.__pictorialSymbolMeta.animationModel,p)}).execute();var v=e.get("clip",!0)?Cl(e.coordinateSystem,!1,e):null;return v?i.setClipPath(v):i.removeClipPath(),this._data=o,this.group},t.prototype.remove=function(e,n){var a=this.group,i=this._data;e.get("animation")?i&&i.eachItemGraphicEl(function(o){Of(i,ee(o).dataIndex,e,o)}):a.removeAll()},t.type="pictorialBar",t})(Be);function kf(r,t,e,n){var a=r.getItemLayout(t),i=e.get("symbolRepeat"),o=e.get("symbolClip"),s=e.get("symbolPosition")||"start",l=e.get("symbolRotate"),u=(l||0)*Math.PI/180||0,c=e.get("symbolPatternSize")||2,f=e.isAnimationEnabled(),h={dataIndex:t,layout:a,itemModel:e,symbolType:r.getItemVisual(t,"symbol")||"circle",style:r.getItemVisual(t,"style"),symbolClip:o,symbolRepeat:i,symbolRepeatDirection:e.get("symbolRepeatDirection"),symbolPatternSize:c,rotation:u,animationModel:f?e:null,hoverScale:f&&e.get(["emphasis","scale"]),z2:e.getShallow("z",!0)||0};JC(e,i,a,n,h),eT(r,t,a,i,o,h.boundingLength,h.pxSign,c,n,h),tT(e,h.symbolScale,u,n,h);var v=h.symbolSize,d=bl(e.get("symbolOffset"),v);return rT(e,v,a,i,o,d,s,h.valueLineWidth,h.boundingLength,h.repeatCutLength,n,h),h}function JC(r,t,e,n,a){var i=n.valueDim,o=r.get("symbolBoundingData"),s=n.coordSys.getOtherAxis(n.coordSys.getBaseAxis()),l=s.toGlobalCoord(s.dataToCoord(0)),u=1-+(e[i.wh]<=0),c;if(N(o)){var f=[xo(s,o[0])-l,xo(s,o[1])-l];f[1]=0?1:-1:c>0?1:-1}function xo(r,t){return r.toGlobalCoord(r.dataToCoord(r.scale.parse(t)))}function eT(r,t,e,n,a,i,o,s,l,u){var c=l.valueDim,f=l.categoryDim,h=Math.abs(e[f.wh]),v=r.getItemVisual(t,"symbolSize"),d;N(v)?d=v.slice():v==null?d=["100%","100%"]:d=[v,v],d[f.index]=se(d[f.index],h),d[c.index]=se(d[c.index],n?h:Math.abs(i)),u.symbolSize=d;var p=u.symbolScale=[d[0]/s,d[1]/s];p[c.index]*=(l.isHorizontal?-1:1)*o}function tT(r,t,e,n,a){var i=r.get(jC)||0;i&&(So.attr({scaleX:t[0],scaleY:t[1],rotation:e}),So.updateTransform(),i/=So.getLineScale(),i*=t[n.valueDim.index]),a.valueLineWidth=i||0}function rT(r,t,e,n,a,i,o,s,l,u,c,f){var h=c.categoryDim,v=c.valueDim,d=f.pxSign,p=Math.max(t[v.index]+s,0),m=p;if(n){var g=Math.abs(l),y=In(r.get("symbolMargin"),"15%")+"",_=!1;y.lastIndexOf("!")===y.length-1&&(_=!0,y=y.slice(0,y.length-1));var S=se(y,t[v.index]),b=Math.max(p+S*2,0),x=_?0:S*2,w=Yv(n),T=w?n:Nf((g+x)/b),D=g-T*p;S=D/2/(_?T:Math.max(T-1,1)),b=p+S*2,x=_?0:S*2,!w&&n!=="fixed"&&(T=u?Nf((Math.abs(u)+x)/b):0),m=T*b-x,f.repeatTimes=T,f.symbolMargin=S}var M=d*(m/2),A=f.pathPosition=[];A[h.index]=e[h.wh]/2,A[v.index]=o==="start"?M:o==="end"?l-M:l/2,i&&(A[0]+=i[0],A[1]+=i[1]);var L=f.bundlePosition=[];L[h.index]=e[h.xy],L[v.index]=e[v.xy];var I=f.barRectShape=W({},e);I[v.wh]=d*Math.max(Math.abs(e[v.wh]),Math.abs(A[v.index]+M)),I[h.wh]=e[h.wh];var P=f.clipShape={};P[h.xy]=-e[h.xy],P[h.wh]=c.ecSize[h.wh],P[v.xy]=0,P[v.wh]=e[v.wh]}function fg(r){var t=r.symbolPatternSize,e=Xt(r.symbolType,-t/2,-t/2,t,t);return e.attr({culling:!0}),e.type!=="image"&&e.setStyle({strokeNoScale:!0}),e}function vg(r,t,e,n){var a=r.__pictorialBundle,i=e.symbolSize,o=e.valueLineWidth,s=e.pathPosition,l=t.valueDim,u=e.repeatTimes||0,c=0,f=i[t.valueDim.index]+o+e.symbolMargin*2;for(jl(r,function(p){p.__pictorialAnimationIndex=c,p.__pictorialRepeatTimes=u,c0:g<0)&&(y=u-1-p),m[l.index]=f*(y-u/2+.5)+s[l.index],{x:m[0],y:m[1],scaleX:e.symbolScale[0],scaleY:e.symbolScale[1],rotation:e.rotation}}}function hg(r,t,e,n){var a=r.__pictorialBundle,i=r.__pictorialMainPath;i?Nr(i,null,{x:e.pathPosition[0],y:e.pathPosition[1],scaleX:e.symbolScale[0],scaleY:e.symbolScale[1],rotation:e.rotation},e,n):(i=r.__pictorialMainPath=fg(e),a.add(i),Nr(i,{x:e.pathPosition[0],y:e.pathPosition[1],scaleX:0,scaleY:0,rotation:e.rotation},{scaleX:e.symbolScale[0],scaleY:e.symbolScale[1]},e,n))}function dg(r,t,e){var n=W({},t.barRectShape),a=r.__pictorialBarRect;a?Nr(a,null,{shape:n},t,e):(a=r.__pictorialBarRect=new de({z2:2,shape:n,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),a.disableMorphing=!0,r.add(a))}function pg(r,t,e,n){if(e.symbolClip){var a=r.__pictorialClipPath,i=W({},e.clipShape),o=t.valueDim,s=e.animationModel,l=e.dataIndex;if(a)Ae(a,{shape:i},s,l);else{i[o.wh]=0,a=new de({shape:i}),r.__pictorialBundle.setClipPath(a),r.__pictorialClipPath=a;var u={};u[o.wh]=e.clipShape[o.wh],nl[n?"updateProps":"initProps"](a,{shape:u},s,l)}}}function Rf(r,t){var e=r.getItemModel(t);return e.getAnimationDelayParams=nT,e.isAnimationEnabled=aT,e}function nT(r){return{index:r.__pictorialAnimationIndex,count:r.__pictorialRepeatTimes}}function aT(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function Ef(r,t,e,n){var a=new Se,i=new Se;return a.add(i),a.__pictorialBundle=i,i.x=e.bundlePosition[0],i.y=e.bundlePosition[1],e.symbolRepeat?vg(a,t,e):hg(a,t,e),dg(a,e,n),pg(a,t,e,n),a.__pictorialShapeStr=gg(r,e),a.__pictorialSymbolMeta=e,a}function iT(r,t,e){var n=e.animationModel,a=e.dataIndex,i=r.__pictorialBundle;Ae(i,{x:e.bundlePosition[0],y:e.bundlePosition[1]},n,a),e.symbolRepeat?vg(r,t,e,!0):hg(r,t,e,!0),dg(r,e,!0),pg(r,t,e,!0)}function Of(r,t,e,n){var a=n.__pictorialBarRect;a&&a.removeTextContent();var i=[];jl(n,function(o){i.push(o)}),n.__pictorialMainPath&&i.push(n.__pictorialMainPath),n.__pictorialClipPath&&(e=null),C(i,function(o){En(o,{scaleX:0,scaleY:0},e,t,function(){n.parent&&n.parent.remove(n)})}),r.setItemGraphicEl(t,null)}function gg(r,t){return[r.getItemVisual(t.dataIndex,"symbol")||"none",!!t.symbolRepeat,!!t.symbolClip].join(":")}function jl(r,t,e){C(r.__pictorialBundle.children(),function(n){n!==r.__pictorialBarRect&&t.call(e,n)})}function Nr(r,t,e,n,a,i){t&&r.attr(t),n.symbolClip&&!a?e&&r.attr(e):e&&nl[a?"updateProps":"initProps"](r,e,n.animationModel,n.dataIndex,i)}function Bf(r,t,e){var n=e.dataIndex,a=e.itemModel,i=a.getModel("emphasis"),o=i.getModel("itemStyle").getItemStyle(),s=a.getModel(["blur","itemStyle"]).getItemStyle(),l=a.getModel(["select","itemStyle"]).getItemStyle(),u=a.getShallow("cursor"),c=i.get("focus"),f=i.get("blurScope"),h=i.get("scale");jl(r,function(p){if(p instanceof Zr){var m=p.style;p.useStyle(W({image:m.image,x:m.x,y:m.y,width:m.width,height:m.height},e.style))}else p.useStyle(e.style);var g=p.ensureState("emphasis");g.style=o,h&&(g.scaleX=p.scaleX*1.1,g.scaleY=p.scaleY*1.1),p.ensureState("blur").style=s,p.ensureState("select").style=l,u&&(p.cursor=u),p.z2=e.z2});var v=t.valueDim.posDesc[+(e.boundingLength>0)],d=r.__pictorialBarRect;d.ignoreClip=!0,Kr(d,qr(a),{labelFetcher:t.seriesModel,labelDataIndex:n,defaultText:Mi(t.seriesModel.getData(),n),inheritColor:e.style.fill,defaultOpacity:e.style.opacity,defaultOutsidePosition:v}),fr(r,c,f,i.get("disabled"))}function Nf(r){var t=Math.round(r);return Math.abs(r-t)<1e-4?t:Math.ceil(r)}var oT=(function(r){H(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.hasSymbolVisual=!0,e.defaultSymbol="roundRect",e}return t.prototype.getInitialData=function(e){return e.stack=null,r.prototype.getInitialData.apply(this,arguments)},t.type="series.pictorialBar",t.dependencies=["grid"],t.defaultOption=ll(Gn.defaultOption,{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",clip:!1,progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:z.color.primary}}}),t})(Gn);function PD(r){r.registerChartView(QC),r.registerSeriesModel(oT),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,ne(Id,"pictorialBar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,Ld("pictorialBar"))}var ar=fe(),zf=Q,bo=ie,sT=(function(){function r(){this._dragging=!1,this.animationThreshold=15}return r.prototype.render=function(t,e,n,a){var i=e.get("value"),o=e.get("status");if(this._axisModel=t,this._axisPointerModel=e,this._api=n,!(!a&&this._lastValue===i&&this._lastStatus===o)){this._lastValue=i,this._lastStatus=o;var s=this._group,l=this._handle;if(!o||o==="hide"){s&&s.hide(),l&&l.hide();return}s&&s.show(),l&&l.show();var u={};this.makeElOption(u,i,t,e,n);var c=u.graphicKey;c!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=c;var f=this._moveAnimation=this.determineAnimation(t,e);if(!s)s=this._group=new Se,this.createPointerEl(s,u,t,e),this.createLabelEl(s,u,t,e),n.getZr().add(s);else{var h=ne(Vf,e,f);this.updatePointerEl(s,u,h),this.updateLabelEl(s,u,h,e)}Ff(s,e,!0),this._renderHandle(i)}},r.prototype.remove=function(t){this.clear(t)},r.prototype.dispose=function(t){this.clear(t)},r.prototype.determineAnimation=function(t,e){var n=e.get("animation"),a=t.axis,i=a.type==="category",o=e.get("snap");if(!o&&!i)return!1;if(n==="auto"||n==null){var s=this.animationThreshold;if(i&&a.getBandWidth()>s)return!0;if(o){var l=Wl(t).seriesDataCount,u=a.getExtent();return Math.abs(u[0]-u[1])/l>s}return!1}return n===!0},r.prototype.makeElOption=function(t,e,n,a,i){},r.prototype.createPointerEl=function(t,e,n,a){var i=e.pointer;if(i){var o=ar(t).pointerEl=new nl[i.type](zf(e.pointer));t.add(o)}},r.prototype.createLabelEl=function(t,e,n,a){if(e.label){var i=ar(t).labelEl=new De(zf(e.label));t.add(i),Gf(i,a)}},r.prototype.updatePointerEl=function(t,e,n){var a=ar(t).pointerEl;a&&e.pointer&&(a.setStyle(e.pointer.style),n(a,{shape:e.pointer.shape}))},r.prototype.updateLabelEl=function(t,e,n,a){var i=ar(t).labelEl;i&&(i.setStyle(e.label.style),n(i,{x:e.label.x,y:e.label.y}),Gf(i,a))},r.prototype._renderHandle=function(t){if(!(this._dragging||!this.updateHandleTransform)){var e=this._axisPointerModel,n=this._api.getZr(),a=this._handle,i=e.getModel("handle"),o=e.get("status");if(!i.get("show")||!o||o==="hide"){a&&n.remove(a),this._handle=null;return}var s;this._handle||(s=!0,a=this._handle=Si(i.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){um(u.event)},onmousedown:bo(this._onHandleDragMove,this,0,0),drift:bo(this._onHandleDragMove,this),ondragend:bo(this._onHandleDragEnd,this)}),n.add(a)),Ff(a,e,!1),a.setStyle(i.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=i.get("size");N(l)||(l=[l,l]),a.scaleX=l[0]/2,a.scaleY=l[1]/2,Rd(this,"_doDispatchAxisPointer",i.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,s)}},r.prototype._moveHandleToValue=function(t,e){Vf(this._axisPointerModel,!e&&this._moveAnimation,this._handle,wo(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},r.prototype._onHandleDragMove=function(t,e){var n=this._handle;if(n){this._dragging=!0;var a=this.updateHandleTransform(wo(n),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=a,n.stopAnimation(),n.attr(wo(a)),ar(n).lastProp=null,this._doDispatchAxisPointer()}},r.prototype._doDispatchAxisPointer=function(){var t=this._handle;if(t){var e=this._payloadInfo,n=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:n.axis.dim,axisIndex:n.componentIndex}]})}},r.prototype._onHandleDragEnd=function(){this._dragging=!1;var t=this._handle;if(t){var e=this._axisPointerModel.get("value");this._moveHandleToValue(e),this._api.dispatchAction({type:"hideTip"})}},r.prototype.clear=function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),n=this._group,a=this._handle;e&&n&&(this._lastGraphicKey=null,n&&e.remove(n),a&&e.remove(a),this._group=null,this._handle=null,this._payloadInfo=null),ns(this,"_doDispatchAxisPointer")},r.prototype.doClear=function(){},r.prototype.buildLabel=function(t,e,n){return n=n||0,{x:t[n],y:t[1-n],width:e[n],height:e[1-n]}},r})();function Vf(r,t,e,n){mg(ar(e).lastProp,n)||(ar(e).lastProp=n,t?Ae(e,n,r):(e.stopAnimation(),e.attr(n)))}function mg(r,t){if($(r)&&$(t)){var e=!0;return C(t,function(n,a){e=e&&mg(r[a],n)}),!!e}else return r===t}function Gf(r,t){r[t.get(["label","show"])?"show":"hide"]()}function wo(r){return{x:r.x||0,y:r.y||0,rotation:r.rotation||0}}function Ff(r,t,e){var n=t.get("z"),a=t.get("zlevel");r&&r.traverse(function(i){i.type!=="group"&&(n!=null&&(i.z=n),a!=null&&(i.zlevel=a),i.silent=e)})}function lT(r){var t=r.get("type"),e=r.getModel(t+"Style"),n;return t==="line"?(n=e.getLineStyle(),n.fill=null):t==="shadow"&&(n=e.getAreaStyle(),n.stroke=null),n}function uT(r,t,e,n,a){var i=e.get("value"),o=yg(i,t.axis,t.ecModel,e.get("seriesDataIndices"),{precision:e.get(["label","precision"]),formatter:e.get(["label","formatter"])}),s=e.getModel("label"),l=Ai(s.get("padding")||0),u=s.getFont(),c=Fs(o,u),f=a.position,h=c.width+l[1]+l[3],v=c.height+l[0]+l[2],d=a.align;d==="right"&&(f[0]-=h),d==="center"&&(f[0]-=h/2);var p=a.verticalAlign;p==="bottom"&&(f[1]-=v),p==="middle"&&(f[1]-=v/2),cT(f,h,v,n);var m=s.get("backgroundColor");(!m||m==="auto")&&(m=t.get(["axisLine","lineStyle","color"])),r.label={x:f[0],y:f[1],style:Ut(s,{text:o,font:u,fill:s.getTextColor(),padding:l,backgroundColor:m}),z2:10}}function cT(r,t,e,n){var a=n.getWidth(),i=n.getHeight();r[0]=Math.min(r[0]+t,a)-t,r[1]=Math.min(r[1]+e,i)-e,r[0]=Math.max(r[0],0),r[1]=Math.max(r[1],0)}function yg(r,t,e,n,a){r=t.scale.parse(r);var i=t.scale.getLabel({value:r},{precision:a.precision}),o=a.formatter;if(o){var s={value:li(t,{value:r}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};C(n,function(l){var u=e.getSeriesByIndex(l.seriesIndex),c=l.dataIndexInside,f=u&&u.getDataParams(c);f&&s.seriesData.push(f)}),X(o)?i=o.replace("{value}",i):q(o)&&(i=o(s))}return i}function _g(r,t,e){var n=vi();return zv(n,n,e.rotation),cm(n,n,e.position),el([r.dataToCoord(t),(e.labelOffset||0)+(e.labelDirection||1)*(e.labelMargin||0)],n)}function fT(r,t,e,n,a,i){var o=Wt.innerTextLayout(e.rotation,0,e.labelDirection);e.labelMargin=a.get(["label","margin"]),uT(t,n,a,i,{position:_g(n.axis,r,e),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function vT(r,t,e){return e=e||0,{x1:r[e],y1:r[1-e],x2:t[e],y2:t[1-e]}}function hT(r,t,e){return e=e||0,{x:r[e],y:r[1-e],width:t[e],height:t[1-e]}}var dT=(function(r){H(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.makeElOption=function(e,n,a,i,o){var s=a.axis,l=s.grid,u=i.get("type"),c=Wf(l,s).getOtherAxis(s).getGlobalExtent(),f=s.toGlobalCoord(s.dataToCoord(n,!0));if(u&&u!=="none"){var h=lT(i),v=pT[u](s,f,c);v.style=h,e.graphicKey=v.type,e.pointer=v}var d=ci(l.getRect(),a);fT(n,e,d,a,i,o)},t.prototype.getHandleTransform=function(e,n,a){var i=ci(n.axis.grid.getRect(),n,{labelInside:!1});i.labelMargin=a.get(["handle","margin"]);var o=_g(n.axis,e,i);return{x:o[0],y:o[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,n,a,i){var o=a.axis,s=o.grid,l=o.getGlobalExtent(!0),u=Wf(s,o).getOtherAxis(o).getGlobalExtent(),c=o.dim==="x"?0:1,f=[e.x,e.y];f[c]+=n[c],f[c]=Math.min(l[1],f[c]),f[c]=Math.max(l[0],f[c]);var h=(u[1]+u[0])/2,v=[h,h];v[c]=f[c];var d=[{verticalAlign:"middle"},{align:"center"}];return{x:f[0],y:f[1],rotation:e.rotation,cursorPoint:v,tooltipOption:d[c]}},t})(sT);function Wf(r,t){var e={};return e[t.dim+"AxisIndex"]=t.index,r.getCartesian(e)}var pT={line:function(r,t,e){var n=vT([t,e[0]],[t,e[1]],Hf(r));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(r,t,e){var n=Math.max(1,r.getBandWidth()),a=e[1]-e[0];return{type:"Rect",shape:hT([t-n/2,e[0]],[n,a],Hf(r))}}};function Hf(r){return r.dim==="x"?0:1}var gT=(function(r){H(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="axisPointer",t.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:z.color.border,width:1,type:"dashed"},shadowStyle:{color:z.color.shadowTint},label:{show:!0,formatter:null,precision:"auto",margin:3,color:z.color.neutral00,padding:[5,7,5,7],backgroundColor:z.color.accent60,borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:z.color.accent40,throttle:40}},t})(ae),_t=fe(),mT=C;function Sg(r,t,e){if(!ye.node){var n=t.getZr();_t(n).records||(_t(n).records={}),yT(n,t);var a=_t(n).records[r]||(_t(n).records[r]={});a.handler=e}}function yT(r,t){if(_t(r).initialized)return;_t(r).initialized=!0,e("click",ne(Uf,"click")),e("mousemove",ne(Uf,"mousemove")),e("globalout",ST);function e(n,a){r.on(n,function(i){var o=xT(t);mT(_t(r).records,function(s){s&&a(s,i,o.dispatchAction)}),_T(o.pendings,t)})}}function _T(r,t){var e=r.showTip.length,n=r.hideTip.length,a;e?a=r.showTip[e-1]:n&&(a=r.hideTip[n-1]),a&&(a.dispatchAction=null,t.dispatchAction(a))}function ST(r,t,e){r.handler("leave",null,e)}function Uf(r,t,e,n){t.handler(r,e,n)}function xT(r){var t={showTip:[],hideTip:[]},e=function(n){var a=t[n.type];a?a.push(n):(n.dispatchAction=e,r.dispatchAction(n))};return{dispatchAction:e,pendings:t}}function Is(r,t){if(!ye.node){var e=t.getZr(),n=(_t(e).records||{})[r];n&&(_t(e).records[r]=null)}}var bT=(function(r){H(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,n,a){var i=n.getComponent("tooltip"),o=e.get("triggerOn")||i&&i.get("triggerOn")||"mousemove|click";Sg("axisPointer",a,function(s,l,u){o!=="none"&&(s==="leave"||o.indexOf(s)>=0)&&u({type:"updateAxisPointer",currTrigger:s,x:l&&l.offsetX,y:l&&l.offsetY})})},t.prototype.remove=function(e,n){Is("axisPointer",n)},t.prototype.dispose=function(e,n){Is("axisPointer",n)},t.type="axisPointer",t})(Ge);function xg(r,t){var e=[],n=r.seriesIndex,a;if(n==null||!(a=t.getSeriesByIndex(n)))return{point:[]};var i=a.getData(),o=cr(i,r);if(o==null||o<0||N(o))return{point:[]};var s=i.getItemGraphicEl(o),l=a.coordinateSystem;if(a.getTooltipPosition)e=a.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)if(r.isStacked){var u=l.getBaseAxis(),c=l.getOtherAxis(u),f=c.dim,h=u.dim,v=f==="x"||f==="radius"?1:0,d=i.mapDimension(h),p=[];p[v]=i.get(d,o),p[1-v]=i.get(i.getCalculationInfo("stackResultDimension"),o),e=l.dataToPoint(p)||[]}else e=l.dataToPoint(i.getValues(Y(l.dimensions,function(g){return i.mapDimension(g)}),o))||[];else if(s){var m=s.getBoundingRect().clone();m.applyTransform(s.transform),e=[m.x+m.width/2,m.y+m.height/2]}return{point:e,el:s}}var Yf=fe();function wT(r,t,e){var n=r.currTrigger,a=[r.x,r.y],i=r,o=r.dispatchAction||ie(e.dispatchAction,e),s=t.getComponent("axisPointer").coordSysAxesInfo;if(s){Fa(a)&&(a=xg({seriesIndex:i.seriesIndex,dataIndex:i.dataIndex},t).point);var l=Fa(a),u=i.axesInfo,c=s.axesInfo,f=n==="leave"||Fa(a),h={},v={},d={list:[],map:{}},p={showPointer:ne(TT,v),showTooltip:ne(DT,d)};C(s.coordSysMap,function(g,y){var _=l||g.containPoint(a);C(s.coordSysAxesInfo[y],function(S,b){var x=S.axis,w=LT(u,S);if(!f&&_&&(!u||w)){var T=w&&w.value;T==null&&!l&&(T=x.pointToData(a)),T!=null&&Xf(S,T,p,!1,h)}})});var m={};return C(c,function(g,y){var _=g.linkGroup;_&&!v[y]&&C(_.axesInfo,function(S,b){var x=v[b];if(S!==g&&x){var w=x.value;_.mapper&&(w=g.axis.scale.parse(_.mapper(w,Zf(S),Zf(g)))),m[g.key]=w}})}),C(m,function(g,y){Xf(c[y],g,p,!0,h)}),AT(v,c,h),MT(d,a,r,o),IT(c,o,e),h}}function Xf(r,t,e,n,a){var i=r.axis;if(!(i.scale.isBlank()||!i.containData(t))){if(!r.involveSeries){e.showPointer(r,t);return}var o=CT(t,r),s=o.payloadBatch,l=o.snapToValue;s[0]&&a.seriesIndex==null&&W(a,s[0]),!n&&r.snap&&i.containData(l)&&l!=null&&(t=l),e.showPointer(r,t,s),e.showTooltip(r,o,l)}}function CT(r,t){var e=t.axis,n=e.dim,a=r,i=[],o=Number.MAX_VALUE,s=-1;return C(t.seriesModels,function(l,u){var c=l.getData().mapDimensionsAll(n),f,h;if(l.getAxisTooltipData){var v=l.getAxisTooltipData(c,r,e);h=v.dataIndices,f=v.nestestValue}else{if(h=l.indicesOfNearest(n,c[0],r,e.type==="category"?.5:null),!h.length)return;f=l.getData().get(c[0],h[0])}if(!(f==null||!isFinite(f))){var d=r-f,p=Math.abs(d);p<=o&&((p=0&&s<0)&&(o=p,s=d,a=f,i.length=0),C(h,function(m){i.push({seriesIndex:l.seriesIndex,dataIndexInside:m,dataIndex:l.getData().getRawIndex(m)})}))}}),{payloadBatch:i,snapToValue:a}}function TT(r,t,e,n){r[t.key]={value:e,payloadBatch:n}}function DT(r,t,e,n){var a=e.payloadBatch,i=t.axis,o=i.model,s=t.axisPointerModel;if(!(!t.triggerTooltip||!a.length)){var l=t.coordSys.model,u=Xn(l),c=r.map[u];c||(c=r.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},r.list.push(c)),c.dataByAxis.push({axisDim:i.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:n,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:a.slice()})}}function AT(r,t,e){var n=e.axesInfo=[];C(t,function(a,i){var o=a.axisPointerModel.option,s=r[i];s?(!a.useHandle&&(o.status="show"),o.value=s.value,o.seriesDataIndices=(s.payloadBatch||[]).slice()):!a.useHandle&&(o.status="hide"),o.status==="show"&&n.push({axisDim:a.axis.dim,axisIndex:a.axis.model.componentIndex,value:o.value})})}function MT(r,t,e,n){if(Fa(t)||!r.list.length){n({type:"hideTip"});return}var a=((r.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};n({type:"showTip",escapeConnect:!0,x:t[0],y:t[1],tooltipOption:e.tooltipOption,position:e.position,dataIndexInside:a.dataIndexInside,dataIndex:a.dataIndex,seriesIndex:a.seriesIndex,dataByCoordSys:r.list})}function IT(r,t,e){var n=e.getZr(),a="axisPointerLastHighlights",i=Yf(n)[a]||{},o=Yf(n)[a]={};C(r,function(u,c){var f=u.axisPointerModel.option;f.status==="show"&&u.triggerEmphasis&&C(f.seriesDataIndices,function(h){var v=h.seriesIndex+" | "+h.dataIndex;o[v]=h})});var s=[],l=[];C(i,function(u,c){!o[c]&&l.push(u)}),C(o,function(u,c){!i[c]&&s.push(u)}),l.length&&e.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&e.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}function LT(r,t){for(var e=0;e<(r||[]).length;e++){var n=r[e];if(t.axis.dim===n.axisDim&&t.axis.model.componentIndex===n.axisIndex)return n}}function Zf(r){var t=r.axis.model,e={},n=e.axisDim=r.axis.dim;return e.axisIndex=e[n+"AxisIndex"]=t.componentIndex,e.axisName=e[n+"AxisName"]=t.name,e.axisId=e[n+"AxisId"]=t.id,e}function Fa(r){return!r||r[0]==null||isNaN(r[0])||r[1]==null||isNaN(r[1])}function bg(r){Zp.registerAxisPointerClass("CartesianAxisPointer",dT),r.registerComponentModel(gT),r.registerComponentView(bT),r.registerPreprocessor(function(t){if(t){(!t.axisPointer||t.axisPointer.length===0)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!N(e)&&(t.axisPointer.link=[e])}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=Jw(t,e)}),r.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},wT)}function kD(r){xt(qp),xt(bg)}var $f=["x","y","radius","angle","single"],PT=["cartesian2d","polar","singleAxis"];function kT(r){var t=r.get("coordinateSystem");return ue(PT,t)>=0}function Er(r){return r+"Axis"}function RT(r,t){var e=Z(),n=[],a=Z();r.eachComponent({mainType:"dataZoom",query:t},function(c){a.get(c.uid)||s(c)});var i;do i=!1,r.eachComponent("dataZoom",o);while(i);function o(c){!a.get(c.uid)&&l(c)&&(s(c),i=!0)}function s(c){a.set(c.uid,!0),n.push(c),u(c)}function l(c){var f=!1;return c.eachTargetAxis(function(h,v){var d=e.get(h);d&&d[v]&&(f=!0)}),f}function u(c){c.eachTargetAxis(function(f,h){(e.get(f)||e.set(f,[]))[h]=!0})}return n}var Co=(function(){function r(){this.indexList=[],this.indexMap=[]}return r.prototype.add=function(t){this.indexMap[t]||(this.indexList.push(t),this.indexMap[t]=!0)},r})(),ET=(function(r){H(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._autoThrottle=!0,e._noTarget=!0,e._rangePropMode=["percent","percent"],e}return t.prototype.init=function(e,n,a){var i=Kf(e);this.settledOption=i,this.mergeDefaultAndTheme(e,a),this._doInit(i)},t.prototype.mergeOption=function(e){var n=Kf(e);J(this.option,e,!0),J(this.settledOption,n,!0),this._doInit(n)},t.prototype._doInit=function(e){var n=this.option;this._setDefaultThrottle(e),this._updateRangeUse(e);var a=this.settledOption;C([["start","startValue"],["end","endValue"]],function(i,o){this._rangePropMode[o]==="value"&&(n[i[0]]=a[i[0]]=null)},this),this._resetTarget()},t.prototype._resetTarget=function(){var e=this.get("orient",!0),n=this._targetAxisInfoMap=Z(),a=this._fillSpecifiedTargetAxis(n);a?this._orient=e||this._makeAutoOrientByTargetAxis():(this._orient=e||"horizontal",this._fillAutoTargetAxisByOrient(n,this._orient)),this._noTarget=!0,n.each(function(i){i.indexList.length&&(this._noTarget=!1)},this)},t.prototype._fillSpecifiedTargetAxis=function(e){var n=!1;return C($f,function(a){var i=this.getReferringComponents(Er(a),ty);if(i.specified){n=!0;var o=new Co;C(i.models,function(s){o.add(s.componentIndex)}),e.set(a,o)}},this),n},t.prototype._fillAutoTargetAxisByOrient=function(e,n){var a=this.ecModel,i=!0;if(i){var o=n==="vertical"?"y":"x",s=a.findComponents({mainType:o+"Axis"});l(s,o)}if(i){var s=a.findComponents({mainType:"singleAxis",filter:function(c){return c.get("orient",!0)===n}});l(s,"single")}function l(u,c){var f=u[0];if(f){var h=new Co;if(h.add(f.componentIndex),e.set(c,h),i=!1,c==="x"||c==="y"){var v=f.getReferringComponents("grid",Re).models[0];v&&C(u,function(d){f.componentIndex!==d.componentIndex&&v===d.getReferringComponents("grid",Re).models[0]&&h.add(d.componentIndex)})}}}i&&C($f,function(u){if(i){var c=a.findComponents({mainType:Er(u),filter:function(h){return h.get("type",!0)==="category"}});if(c[0]){var f=new Co;f.add(c[0].componentIndex),e.set(u,f),i=!1}}},this)},t.prototype._makeAutoOrientByTargetAxis=function(){var e;return this.eachTargetAxis(function(n){!e&&(e=n)},this),e==="y"?"vertical":"horizontal"},t.prototype._setDefaultThrottle=function(e){if(e.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var n=this.ecModel.option;this.option.throttle=n.animation&&n.animationDurationUpdate>0?100:20}},t.prototype._updateRangeUse=function(e){var n=this._rangePropMode,a=this.get("rangeMode");C([["start","startValue"],["end","endValue"]],function(i,o){var s=e[i[0]]!=null,l=e[i[1]]!=null;s&&!l?n[o]="percent":!s&&l?n[o]="value":a?n[o]=a[o]:s&&(n[o]="percent")})},t.prototype.noTarget=function(){return this._noTarget},t.prototype.getFirstTargetAxisModel=function(){var e;return this.eachTargetAxis(function(n,a){e==null&&(e=this.ecModel.getComponent(Er(n),a))},this),e},t.prototype.eachTargetAxis=function(e,n){this._targetAxisInfoMap.each(function(a,i){C(a.indexList,function(o){e.call(n,i,o)})})},t.prototype.getAxisProxy=function(e,n){var a=this.getAxisModel(e,n);if(a)return a.__dzAxisProxy},t.prototype.getAxisModel=function(e,n){var a=this._targetAxisInfoMap.get(e);if(a&&a.indexMap[n])return this.ecModel.getComponent(Er(e),n)},t.prototype.setRawRange=function(e){var n=this.option,a=this.settledOption;C([["start","startValue"],["end","endValue"]],function(i){(e[i[0]]!=null||e[i[1]]!=null)&&(n[i[0]]=a[i[0]]=e[i[0]],n[i[1]]=a[i[1]]=e[i[1]])},this),this._updateRangeUse(e)},t.prototype.setCalculatedRange=function(e){var n=this.option;C(["start","startValue","end","endValue"],function(a){n[a]=e[a]})},t.prototype.getPercentRange=function(){var e=this.findRepresentativeAxisProxy();if(e)return e.getDataPercentWindow()},t.prototype.getValueRange=function(e,n){if(e==null&&n==null){var a=this.findRepresentativeAxisProxy();if(a)return a.getDataValueWindow()}else return this.getAxisProxy(e,n).getDataValueWindow()},t.prototype.findRepresentativeAxisProxy=function(e){if(e)return e.__dzAxisProxy;for(var n,a=this._targetAxisInfoMap.keys(),i=0;io[1];if(_&&!S&&!b)return!0;_&&(m=!0),S&&(d=!0),b&&(p=!0)}return m&&d&&p})}else kr(c,function(v){if(i==="empty")l.setData(u=u.map(v,function(p){return s(p)?p:NaN}));else{var d={};d[v]=o,u.selectRange(d)}});kr(c,function(v){u.setApproximateExtent(o,v)})}});function s(l){return l>=o[0]&&l<=o[1]}},r.prototype._updateMinMaxSpan=function(){var t=this._minMaxSpan={},e=this._dataZoomModel,n=this._dataExtent;kr(["min","max"],function(a){var i=e.get(a+"Span"),o=e.get(a+"ValueSpan");o!=null&&(o=this.getAxisModel().axis.scale.parse(o)),o!=null?i=Bt(n[0]+o,n,[0,100],!0):i!=null&&(o=Bt(i,[0,100],n,!0)-n[0]),t[a+"Span"]=i,t[a+"ValueSpan"]=o},this)},r.prototype._setAxisModel=function(){var t=this.getAxisModel(),e=this._percentWindow,n=this._valueWindow;if(e){var a=Wv(n,[0,500]);a=Math.min(a,20);var i=t.axis.scale.rawExtentInfo;e[0]!==0&&i.setDeterminedMinMax("min",+n[0].toFixed(a)),e[1]!==100&&i.setDeterminedMinMax("max",+n[1].toFixed(a)),i.freeze()}},r})();function VT(r,t,e){var n=[1/0,-1/0];kr(e,function(o){cw(n,o.getData(),t)});var a=r.getAxisModel(),i=Ap(a.axis.scale,a,n).calculate();return[i.min,i.max]}var GT={getTargetSeries:function(r){function t(a){r.eachComponent("dataZoom",function(i){i.eachTargetAxis(function(o,s){var l=r.getComponent(Er(o),s);a(o,s,l,i)})})}t(function(a,i,o,s){o.__dzAxisProxy=null});var e=[];t(function(a,i,o,s){o.__dzAxisProxy||(o.__dzAxisProxy=new zT(a,i,s,r),e.push(o.__dzAxisProxy))});var n=Z();return C(e,function(a){C(a.getTargetSeriesModels(),function(i){n.set(i.uid,i)})}),n},overallReset:function(r,t){r.eachComponent("dataZoom",function(e){e.eachTargetAxis(function(n,a){e.getAxisProxy(n,a).reset(e)}),e.eachTargetAxis(function(n,a){e.getAxisProxy(n,a).filterData(e,t)})}),r.eachComponent("dataZoom",function(e){var n=e.findRepresentativeAxisProxy();if(n){var a=n.getDataPercentWindow(),i=n.getDataValueWindow();e.setCalculatedRange({start:a[0],end:a[1],startValue:i[0],endValue:i[1]})}})}};function FT(r){r.registerAction("dataZoom",function(t,e){var n=RT(e,t);C(n,function(a){a.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})})})}var jf=!1;function WT(r){jf||(jf=!0,r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,GT),FT(r),r.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function HT(r){r.registerComponentModel(OT),r.registerComponentView(NT),WT(r)}var Je=(function(){function r(){}return r})(),wg={};function vn(r,t){wg[r]=t}function Cg(r){return wg[r]}var UT=(function(r){H(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.optionUpdated=function(){r.prototype.optionUpdated.apply(this,arguments);var e=this.ecModel;C(this.option.feature,function(n,a){var i=Cg(a);i&&(i.getDefaultOption&&(i.defaultOption=i.getDefaultOption(e)),J(n,i.defaultOption))})},t.type="toolbox",t.layoutMode={type:"box",ignoreSize:!0},t.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:z.color.border,borderRadius:0,borderWidth:0,padding:z.size.m,itemSize:15,itemGap:z.size.s,showTitle:!0,iconStyle:{borderColor:z.color.accent50,color:"none"},emphasis:{iconStyle:{borderColor:z.color.accent50}},tooltip:{show:!1,position:"bottom"}},t})(ae);function Tg(r,t){var e=Ai(t.get("padding")),n=t.getItemStyle(["color","opacity"]);n.fill=t.get("backgroundColor");var a=new de({shape:{x:r.x-e[3],y:r.y-e[0],width:r.width+e[1]+e[3],height:r.height+e[0]+e[2],r:t.get("borderRadius")},style:n,silent:!0,z2:-1});return a}var YT=(function(r){H(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.render=function(e,n,a,i){var o=this.group;if(o.removeAll(),!e.get("show"))return;var s=+e.get("itemSize"),l=e.get("orient")==="vertical",u=e.get("feature")||{},c=this._features||(this._features={}),f=[];C(u,function(y,_){f.push(_)}),new Nn(this._featureNames||[],f).add(h).update(h).remove(ne(h,null)).execute(),this._featureNames=f;function h(y,_){var S=f[y],b=f[_],x=u[S],w=new he(x,e,e.ecModel),T;if(i&&i.newTitle!=null&&i.featureName===S&&(x.title=i.newTitle),S&&!b){if(XT(S))T={onclick:w.option.onclick,featureName:S};else{var D=Cg(S);if(!D)return;T=new D}c[S]=T}else if(T=c[b],!T)return;T.uid=ra("toolbox-feature"),T.model=w,T.ecModel=n,T.api=a;var M=T instanceof Je;if(!S&&b){M&&T.dispose&&T.dispose(n,a);return}if(!w.get("show")||M&&T.unusable){M&&T.remove&&T.remove(n,a);return}v(w,T,S),w.setIconStatus=function(A,L){var I=this.option,P=this.iconPaths;I.iconStatus=I.iconStatus||{},I.iconStatus[A]=L,P[A]&&(L==="emphasis"?zr:Vr)(P[A])},T instanceof Je&&T.render&&T.render(w,n,a,i)}function v(y,_,S){var b=y.getModel("iconStyle"),x=y.getModel(["emphasis","iconStyle"]),w=_ instanceof Je&&_.getIcons?_.getIcons():y.get("icon"),T=y.get("title")||{},D,M;X(w)?(D={},D[S]=w):D=w,X(T)?(M={},M[S]=T):M=T;var A=y.iconPaths={};C(D,function(L,I){var P=Si(L,{},{x:-s/2,y:-s/2,width:s,height:s});P.setStyle(b.getItemStyle());var k=P.ensureState("emphasis");k.style=x.getItemStyle();var E=new De({style:{text:M[I],align:x.get("textAlign"),borderRadius:x.get("textBorderRadius"),padding:x.get("textPadding"),fill:null,font:_h({fontStyle:x.get("textFontStyle"),fontFamily:x.get("textFontFamily"),fontSize:x.get("textFontSize"),fontWeight:x.get("textFontWeight")},n)},ignore:!0});P.setTextContent(E),ea({el:P,componentModel:e,itemName:I,formatterParamsExtra:{title:M[I]}}),P.__title=M[I],P.on("mouseover",function(){var U=x.getItemStyle(),R=l?e.get("right")==null&&e.get("left")!=="right"?"right":"left":e.get("bottom")==null&&e.get("top")!=="bottom"?"bottom":"top";E.setStyle({fill:x.get("textFill")||U.fill||U.stroke||z.color.neutral99,backgroundColor:x.get("textBackgroundColor")}),P.setTextConfig({position:x.get("textPosition")||R}),E.ignore=!e.get("showTitle"),a.enterEmphasis(this)}).on("mouseout",function(){y.get(["iconStatus",I])!=="emphasis"&&a.leaveEmphasis(this),E.hide()}),(y.get(["iconStatus",I])==="emphasis"?zr:Vr)(P),o.add(P),P.on("click",ie(_.onclick,_,n,a,I)),A[I]=P})}var d=na(e,a).refContainer,p=e.getBoxLayoutParams(),m=e.get("padding"),g=ct(p,d,m);Br(e.get("orient"),o,e.get("itemGap"),g.width,g.height),o_(o,p,d,m),o.add(Tg(o.getBoundingRect(),e)),l||o.eachChild(function(y){var _=y.__title,S=y.ensureState("emphasis"),b=S.textConfig||(S.textConfig={}),x=y.getTextContent(),w=x&&x.ensureState("emphasis");if(w&&!q(w)&&_){var T=w.style||(w.style={}),D=Fs(_,De.makeFont(T)),M=y.x+o.x,A=y.y+o.y+s,L=!1;A+D.height>a.getHeight()&&(b.position="top",L=!0);var I=L?-5-D.height:s+10;M+D.width/2>a.getWidth()?(b.position=["100%",I],T.align="right"):M-D.width/2<0&&(b.position=[0,I],T.align="left")}})},t.prototype.updateView=function(e,n,a,i){C(this._features,function(o){o instanceof Je&&o.updateView&&o.updateView(o.model,n,a,i)})},t.prototype.remove=function(e,n){C(this._features,function(a){a instanceof Je&&a.remove&&a.remove(e,n)}),this.group.removeAll()},t.prototype.dispose=function(e,n){C(this._features,function(a){a instanceof Je&&a.dispose&&a.dispose(e,n)})},t.type="toolbox",t})(Ge);function XT(r){return r.indexOf("my")===0}var ZT=(function(r){H(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.onclick=function(e,n){var a=this.model,i=a.get("name")||e.get("title.0.text")||"echarts",o=n.getZr().painter.getType()==="svg",s=o?"svg":a.get("type",!0)||"png",l=n.getConnectedDataURL({type:s,backgroundColor:a.get("backgroundColor",!0)||e.get("backgroundColor")||z.color.neutral00,connectedBackgroundColor:a.get("connectedBackgroundColor"),excludeComponents:a.get("excludeComponents"),pixelRatio:a.get("pixelRatio")}),u=ye.browser;if(typeof MouseEvent=="function"&&(u.newEdge||!u.ie&&!u.edge)){var c=document.createElement("a");c.download=i+"."+s,c.target="_blank",c.href=l;var f=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});c.dispatchEvent(f)}else if(window.navigator.msSaveOrOpenBlob||o){var h=l.split(","),v=h[0].indexOf("base64")>-1,d=o?decodeURIComponent(h[1]):h[1];v&&(d=window.atob(d));var p=i+"."+s;if(window.navigator.msSaveOrOpenBlob){for(var m=d.length,g=new Uint8Array(m);m--;)g[m]=d.charCodeAt(m);var y=new Blob([g]);window.navigator.msSaveOrOpenBlob(y,p)}else{var _=document.createElement("iframe");document.body.appendChild(_);var S=_.contentWindow,b=S.document;b.open("image/svg+xml","replace"),b.write(d),b.close(),S.focus(),b.execCommand("SaveAs",!0,p),document.body.removeChild(_)}}else{var x=a.get("lang"),w='',T=window.open();T.document.write(w),T.document.title=i}},t.getDefaultOption=function(e){var n={show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:e.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:z.color.neutral00,name:"",excludeComponents:["toolbox"],lang:e.getLocaleModel().get(["toolbox","saveAsImage","lang"])};return n},t})(Je),Qf="__ec_magicType_stack__",$T=[["line","bar"],["stack"]],KT=(function(r){H(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.getIcons=function(){var e=this.model,n=e.get("icon"),a={};return C(e.get("type"),function(i){n[i]&&(a[i]=n[i])}),a},t.getDefaultOption=function(e){var n={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:e.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}};return n},t.prototype.onclick=function(e,n,a){var i=this.model,o=i.get(["seriesIndex",a]);if(Jf[a]){var s={series:[]},l=function(f){var h=f.subType,v=f.id,d=Jf[a](h,v,f,i);d&&(oe(d,f.option),s.series.push(d));var p=f.coordinateSystem;if(p&&p.type==="cartesian2d"&&(a==="line"||a==="bar")){var m=p.getAxesByScale("ordinal")[0];if(m){var g=m.dim,y=g+"Axis",_=f.getReferringComponents(y,Re).models[0],S=_.componentIndex;s[y]=s[y]||[];for(var b=0;b<=S;b++)s[y][S]=s[y][S]||{};s[y][S].boundaryGap=a==="bar"}}};C($T,function(f){ue(f,a)>=0&&C(f,function(h){i.setIconStatus(h,"normal")})}),i.setIconStatus(a,"emphasis"),e.eachComponent({mainType:"series",query:o==null?null:{seriesIndex:o}},l);var u,c=a;a==="stack"&&(u=J({stack:i.option.title.tiled,tiled:i.option.title.stack},i.option.title),i.get(["iconStatus",a])!=="emphasis"&&(c="tiled")),n.dispatchAction({type:"changeMagicType",currentType:c,newOption:s,newTitle:u,featureName:"magicType"})}},t})(Je),Jf={line:function(r,t,e,n){if(r==="bar")return J({id:t,type:"line",data:e.get("data"),stack:e.get("stack"),markPoint:e.get("markPoint"),markLine:e.get("markLine")},n.get(["option","line"])||{},!0)},bar:function(r,t,e,n){if(r==="line")return J({id:t,type:"bar",data:e.get("data"),stack:e.get("stack"),markPoint:e.get("markPoint"),markLine:e.get("markLine")},n.get(["option","bar"])||{},!0)},stack:function(r,t,e,n){var a=e.get("stack")===Qf;if(r==="line"||r==="bar")return n.setIconStatus("stack",a?"normal":"emphasis"),J({id:t,stack:a?"":Qf},n.get(["option","stack"])||{},!0)}};ft({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(r,t){t.mergeOption(r.newOption)});var Pi=new Array(60).join("-"),Xr=" ";function qT(r){var t={},e=[],n=[];return r.eachRawSeries(function(a){var i=a.coordinateSystem;if(i&&(i.type==="cartesian2d"||i.type==="polar")){var o=i.getBaseAxis();if(o.type==="category"){var s=o.dim+"_"+o.index;t[s]||(t[s]={categoryAxis:o,valueAxis:i.getOtherAxis(o),series:[]},n.push({axisDim:o.dim,axisIndex:o.index})),t[s].series.push(a)}else e.push(a)}else e.push(a)}),{seriesGroupByCategoryAxis:t,other:e,meta:n}}function jT(r){var t=[];return C(r,function(e,n){var a=e.categoryAxis,i=e.valueAxis,o=i.dim,s=[" "].concat(Y(e.series,function(v){return v.name})),l=[a.model.getCategories()];C(e.series,function(v){var d=v.getRawData();l.push(v.getRawData().mapArray(d.mapDimension(o),function(p){return p}))});for(var u=[s.join(Xr)],c=0;c=0)return!0}var Ls=new RegExp("["+Xr+"]+","g");function t1(r){for(var t=r.split(/\n+/g),e=fi(t.shift()).split(Ls),n=[],a=Y(e,function(l){return{name:l,data:[]}}),i=0;i=0;i--){var o=e[i];if(o[a])break}if(i<0){var s=r.queryComponents({mainType:"dataZoom",subType:"select",id:a})[0];if(s){var l=s.getPercentRange();e[0][a]={dataZoomId:a,start:l[0],end:l[1]}}}}),e.push(t)}function s1(r){var t=Ql(r),e=t[t.length-1];t.length>1&&t.pop();var n={};return Dg(e,function(a,i){for(var o=t.length-1;o>=0;o--)if(a=t[o][i],a){n[i]=a;break}}),n}function l1(r){Ag(r).snapshots=null}function u1(r){return Ql(r).length}function Ql(r){var t=Ag(r);return t.snapshots||(t.snapshots=[{}]),t.snapshots}var c1=(function(r){H(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.onclick=function(e,n){l1(e),n.dispatchAction({type:"restore",from:this.uid})},t.getDefaultOption=function(e){var n={show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:e.getLocaleModel().get(["toolbox","restore","title"])};return n},t})(Je);ft({type:"restore",event:"restore",update:"prepareAndUpdate"},function(r,t){t.resetOption("recreate")});var f1=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],Mg=(function(){function r(t,e,n){var a=this;this._targetInfoList=[];var i=ev(e,t);C(v1,function(o,s){(!n||!n.include||ue(n.include,s)>=0)&&o(i,a._targetInfoList)})}return r.prototype.setOutputRanges=function(t,e){return this.matchOutputRanges(t,e,function(n,a,i){if((n.coordRanges||(n.coordRanges=[])).push(a),!n.coordRange){n.coordRange=a;var o=To[n.brushType](0,i,a);n.__rangeOffset={offset:av[n.brushType](o.values,n.range,[1,1]),xyMinMax:o.xyMinMax}}}),t},r.prototype.matchOutputRanges=function(t,e,n){C(t,function(a){var i=this.findTargetInfo(a,e);i&&i!==!0&&C(i.coordSyses,function(o){var s=To[a.brushType](1,o,a.range,!0);n(a,s.values,o,e)})},this)},r.prototype.setInputRanges=function(t,e){C(t,function(n){var a=this.findTargetInfo(n,e);if(n.range=n.range||[],a&&a!==!0){n.panelId=a.panelId;var i=To[n.brushType](0,a.coordSys,n.coordRange),o=n.__rangeOffset;n.range=o?av[n.brushType](i.values,o.offset,h1(i.xyMinMax,o.xyMinMax)):i.values}},this)},r.prototype.makePanelOpts=function(t,e){return Y(this._targetInfoList,function(n){var a=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:e?e(n):null,clipPath:kC(a),isTargetByCursor:EC(a,t,n.coordSysModel),getLinearBrushOtherExtent:RC(a)}})},r.prototype.controlSeries=function(t,e,n){var a=this.findTargetInfo(t,n);return a===!0||a&&ue(a.coordSyses,e.coordinateSystem)>=0},r.prototype.findTargetInfo=function(t,e){for(var n=this._targetInfoList,a=ev(e,t),i=0;ir[1]&&r.reverse(),r}function ev(r,t){return xn(r,t,{includeMainTypes:f1})}var v1={grid:function(r,t){var e=r.xAxisModels,n=r.yAxisModels,a=r.gridModels,i=Z(),o={},s={};!e&&!n&&!a||(C(e,function(l){var u=l.axis.grid.model;i.set(u.id,u),o[u.id]=!0}),C(n,function(l){var u=l.axis.grid.model;i.set(u.id,u),s[u.id]=!0}),C(a,function(l){i.set(l.id,l),o[l.id]=!0,s[l.id]=!0}),i.each(function(l){var u=l.coordinateSystem,c=[];C(u.getCartesians(),function(f,h){(ue(e,f.getAxis("x").model)>=0||ue(n,f.getAxis("y").model)>=0)&&c.push(f)}),t.push({panelId:"grid--"+l.id,gridModel:l,coordSysModel:l,coordSys:c[0],coordSyses:c,getPanelRect:rv.grid,xAxisDeclared:o[l.id],yAxisDeclared:s[l.id]})}))},geo:function(r,t){C(r.geoModels,function(e){var n=e.coordinateSystem;t.push({panelId:"geo--"+e.id,geoModel:e,coordSysModel:e,coordSys:n,coordSyses:[n],getPanelRect:rv.geo})})}},tv=[function(r,t){var e=r.xAxisModel,n=r.yAxisModel,a=r.gridModel;return!a&&e&&(a=e.axis.grid.model),!a&&n&&(a=n.axis.grid.model),a&&a===t.gridModel},function(r,t){var e=r.geoModel;return e&&e===t.geoModel}],rv={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var r=this.coordSys,t=r.getBoundingRect().clone();return t.applyTransform(Js(r)),t}},To={lineX:ne(nv,0),lineY:ne(nv,1),rect:function(r,t,e,n){var a=r?t.pointToData([e[0][0],e[1][0]],n):t.dataToPoint([e[0][0],e[1][0]],n),i=r?t.pointToData([e[0][1],e[1][1]],n):t.dataToPoint([e[0][1],e[1][1]],n),o=[Ps([a[0],i[0]]),Ps([a[1],i[1]])];return{values:o,xyMinMax:o}},polygon:function(r,t,e,n){var a=[[1/0,-1/0],[1/0,-1/0]],i=Y(e,function(o){var s=r?t.pointToData(o,n):t.dataToPoint(o,n);return a[0][0]=Math.min(a[0][0],s[0]),a[1][0]=Math.min(a[1][0],s[1]),a[0][1]=Math.max(a[0][1],s[0]),a[1][1]=Math.max(a[1][1],s[1]),s});return{values:i,xyMinMax:a}}};function nv(r,t,e,n){var a=e.getAxis(["x","y"][r]),i=Ps(Y([0,1],function(s){return t?a.coordToData(a.toLocalCoord(n[s]),!0):a.toGlobalCoord(a.dataToCoord(n[s]))})),o=[];return o[r]=i,o[1-r]=[NaN,NaN],{values:i,xyMinMax:o}}var av={lineX:ne(iv,0),lineY:ne(iv,1),rect:function(r,t,e){return[[r[0][0]-e[0]*t[0][0],r[0][1]-e[0]*t[0][1]],[r[1][0]-e[1]*t[1][0],r[1][1]-e[1]*t[1][1]]]},polygon:function(r,t,e){return Y(r,function(n,a){return[n[0]-e[0]*t[a][0],n[1]-e[1]*t[a][1]]})}};function iv(r,t,e,n){return[t[0]-n[r]*e[0],t[1]-n[r]*e[1]]}function h1(r,t){var e=ov(r),n=ov(t),a=[e[0]/n[0],e[1]/n[1]];return isNaN(a[0])&&(a[0]=1),isNaN(a[1])&&(a[1]=1),a}function ov(r){return r?[r[0][1]-r[0][0],r[1][1]-r[1][0]]:[NaN,NaN]}var ks=C,d1=jm("toolbox-dataZoom_"),p1=(function(r){H(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.render=function(e,n,a,i){this._brushController||(this._brushController=new wC(a.getZr()),this._brushController.on("brush",ie(this._onBrush,this)).mount()),y1(e,n,this,i,a),m1(e,n)},t.prototype.onclick=function(e,n,a){g1[a].call(this)},t.prototype.remove=function(e,n){this._brushController&&this._brushController.unmount()},t.prototype.dispose=function(e,n){this._brushController&&this._brushController.dispose()},t.prototype._onBrush=function(e){var n=e.areas;if(!e.isEnd||!n.length)return;var a={},i=this.ecModel;this._brushController.updateCovers([]);var o=new Mg(Jl(this.model),i,{include:["grid"]});o.matchOutputRanges(n,i,function(u,c,f){if(f.type==="cartesian2d"){var h=u.brushType;h==="rect"?(s("x",f,c[0]),s("y",f,c[1])):s({lineX:"x",lineY:"y"}[h],f,c)}}),o1(i,a),this._dispatchZoomAction(a);function s(u,c,f){var h=c.getAxis(u),v=h.model,d=l(u,v,i),p=d.findRepresentativeAxisProxy(v).getMinMaxSpan();(p.minValueSpan!=null||p.maxValueSpan!=null)&&(f=Qp(0,f.slice(),h.scale.getExtent(),0,p.minValueSpan,p.maxValueSpan)),d&&(a[d.id]={dataZoomId:d.id,startValue:f[0],endValue:f[1]})}function l(u,c,f){var h;return f.eachComponent({mainType:"dataZoom",subType:"select"},function(v){var d=v.getAxisModel(u,c.componentIndex);d&&(h=v)}),h}},t.prototype._dispatchZoomAction=function(e){var n=[];ks(e,function(a,i){n.push(Q(a))}),n.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:n})},t.getDefaultOption=function(e){var n={show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:e.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:z.color.backgroundTint}};return n},t})(Je),g1={zoom:function(){var r=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:r})},back:function(){this._dispatchZoomAction(s1(this.ecModel))}};function Jl(r){var t={xAxisIndex:r.get("xAxisIndex",!0),yAxisIndex:r.get("yAxisIndex",!0),xAxisId:r.get("xAxisId",!0),yAxisId:r.get("yAxisId",!0)};return t.xAxisIndex==null&&t.xAxisId==null&&(t.xAxisIndex="all"),t.yAxisIndex==null&&t.yAxisId==null&&(t.yAxisIndex="all"),t}function m1(r,t){r.setIconStatus("back",u1(t)>1?"emphasis":"normal")}function y1(r,t,e,n,a){var i=e._isZoomActive;n&&n.type==="takeGlobalCursor"&&(i=n.key==="dataZoomSelect"?n.dataZoomSelectActive:!1),e._isZoomActive=i,r.setIconStatus("zoom",i?"emphasis":"normal");var o=new Mg(Jl(r),t,{include:["grid"]}),s=o.makePanelOpts(a,function(l){return l.xAxisDeclared&&!l.yAxisDeclared?"lineX":!l.xAxisDeclared&&l.yAxisDeclared?"lineY":"rect"});e._brushController.setPanels(s).enableBrush(i&&s.length?{brushType:"auto",brushStyle:r.getModel("brushStyle").getItemStyle()}:!1)}vx("dataZoom",function(r){var t=r.getComponent("toolbox",0),e=["feature","dataZoom"];if(!t||t.get(e)==null)return;var n=t.getModel(e),a=[],i=Jl(n),o=xn(r,i);ks(o.xAxisModels,function(l){return s(l,"xAxis","xAxisIndex")}),ks(o.yAxisModels,function(l){return s(l,"yAxis","yAxisIndex")});function s(l,u,c){var f=l.componentIndex,h={type:"select",$fromToolbox:!0,filterMode:n.get("filterMode",!0)||"filter",id:d1+u+f};h[c]=f,a.push(h)}return a});function RD(r){r.registerComponentModel(UT),r.registerComponentView(YT),vn("saveAsImage",ZT),vn("magicType",KT),vn("dataView",a1),vn("dataZoom",p1),vn("restore",c1),xt(HT)}var _1=(function(r){H(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="tooltip",t.dependencies=["axisPointer"],t.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,displayTransition:!0,enterable:!1,backgroundColor:z.color.neutral00,shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,defaultBorderColor:z.color.border,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:z.color.borderShade,width:1,type:"dashed",textStyle:{}}},textStyle:{color:z.color.tertiary,fontSize:14}},t})(ae);function Ig(r){var t=r.get("confine");return t!=null?!!t:r.get("renderMode")==="richText"}function Lg(r){if(ye.domSupported){for(var t=document.documentElement.style,e=0,n=r.length;e-1?(s+="top:50%",l+="translateY(-50%) rotate("+(u=i==="left"?-225:-45)+"deg)"):(s+="left:50%",l+="translateX(-50%) rotate("+(u=i==="top"?225:45)+"deg)");var c=u*Math.PI/180,f=o+a,h=f*Math.abs(Math.cos(c))+f*Math.abs(Math.sin(c)),v=Math.round(((h-Math.SQRT2*a)/2+Math.SQRT2*a-(h-f)/2)*100)/100;s+=";"+i+":-"+v+"px";var d=t+" solid "+a+"px;",p=["position:absolute;width:"+o+"px;height:"+o+"px;z-index:-1;",s+";"+l+";","border-bottom:"+d,"border-right:"+d,"background-color:"+n+";"];return'
'}function D1(r,t,e){var n="cubic-bezier(0.23,1,0.32,1)",a="",i="";return e&&(a=" "+r/2+"s "+n,i="opacity"+a+",visibility"+a),t||(a=" "+r+"s "+n,i+=(i.length?",":"")+(ye.transformSupported?""+eu+a:",left"+a+",top"+a)),b1+":"+i}function sv(r,t,e){var n=r.toFixed(0)+"px",a=t.toFixed(0)+"px";if(!ye.transformSupported)return e?"top:"+a+";left:"+n+";":[["top",a],["left",n]];var i=ye.transform3dSupported,o="translate"+(i?"3d":"")+"("+n+","+a+(i?",0":"")+")";return e?"top:0;left:0;"+eu+":"+o+";":[["top",0],["left",0],[Pg,o]]}function A1(r){var t=[],e=r.get("fontSize"),n=r.getTextColor();n&&t.push("color:"+n),t.push("font:"+r.getFont());var a=j(r.get("lineHeight"),Math.round(e*3/2));e&&t.push("line-height:"+a+"px");var i=r.get("textShadowColor"),o=r.get("textShadowBlur")||0,s=r.get("textShadowOffsetX")||0,l=r.get("textShadowOffsetY")||0;return i&&o&&t.push("text-shadow:"+s+"px "+l+"px "+o+"px "+i),C(["decoration","align"],function(u){var c=r.get(u);c&&t.push("text-"+u+":"+c)}),t.join(";")}function M1(r,t,e,n){var a=[],i=r.get("transitionDuration"),o=r.get("backgroundColor"),s=r.get("shadowBlur"),l=r.get("shadowColor"),u=r.get("shadowOffsetX"),c=r.get("shadowOffsetY"),f=r.getModel("textStyle"),h=dd(r,"html"),v=u+"px "+c+"px "+s+"px "+l;return a.push("box-shadow:"+v),t&&i>0&&a.push(D1(i,e,n)),o&&a.push("background-color:"+o),C(["width","color","radius"],function(d){var p="border-"+d,m=ad(p),g=r.get(m);g!=null&&a.push(p+":"+g+(d==="color"?"":"px"))}),a.push(A1(f)),h!=null&&a.push("padding:"+Ai(h).join("px ")+"px"),a.join(";")+";"}function lv(r,t,e,n,a){var i=t&&t.painter;if(e){var o=i&&i.getViewportRoot();o&&vm(r,o,e,n,a)}else{r[0]=n,r[1]=a;var s=i&&i.getViewportRootOffset();s&&(r[0]+=s.offsetLeft,r[1]+=s.offsetTop)}r[2]=r[0]/t.getWidth(),r[3]=r[1]/t.getHeight()}var I1=(function(){function r(t,e){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,ye.wxa)return null;var n=document.createElement("div");n.domBelongToZr=!0,this.el=n;var a=this._zr=t.getZr(),i=e.appendTo,o=i&&(X(i)?document.querySelector(i):Oo(i)?i:q(i)&&i(t.getDom()));lv(this._styleCoord,a,o,t.getWidth()/2,t.getHeight()/2),(o||t.getDom()).appendChild(n),this._api=t,this._container=o;var s=this;n.onmouseenter=function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0},n.onmousemove=function(l){if(l=l||window.event,!s._enterable){var u=a.handler,c=a.painter.getViewportRoot();fm(c,l,!0),u.dispatch("mousemove",l)}},n.onmouseleave=function(){s._inContent=!1,s._enterable&&s._show&&s.hideLater(s._hideDelay)}}return r.prototype.update=function(t){if(!this._container){var e=this._api.getDom(),n=x1(e,"position"),a=e.style;a.position!=="absolute"&&n!=="absolute"&&(a.position="relative")}var i=t.get("alwaysShowContent");i&&this._moveIfResized(),this._alwaysShowContent=i,this._enableDisplayTransition=t.get("displayTransition")&&t.get("transitionDuration")>0,this.el.className=t.get("className")||""},r.prototype.show=function(t,e){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,a=n.style,i=this._styleCoord;n.innerHTML?a.cssText=w1+M1(t,!this._firstShow,this._longHide,this._enableDisplayTransition)+sv(i[0],i[1],!0)+("border-color:"+vr(e)+";")+(t.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):a.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},r.prototype.setContent=function(t,e,n,a,i){var o=this.el;if(t==null){o.innerHTML="";return}var s="";if(X(i)&&n.get("trigger")==="item"&&!Ig(n)&&(s=T1(n,a,i)),X(t))o.innerHTML=t+s;else if(t){o.innerHTML="",N(t)||(t=[t]);for(var l=0;l=0?this._tryShow(i,o):a==="leave"&&this._hide(o))},this))},t.prototype._keepShow=function(){var e=this._tooltipModel,n=this._ecModel,a=this._api,i=e.get("triggerOn");if(this._lastX!=null&&this._lastY!=null&&i!=="none"&&i!=="click"){var o=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!a.isDisposed()&&o.manuallyShowTip(e,n,a,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})})}},t.prototype.manuallyShowTip=function(e,n,a,i){if(!(i.from===this.uid||ye.node||!a.getDom())){var o=fv(i,a);this._ticket="";var s=i.dataByCoordSys,l=B1(i,n,a);if(l){var u=l.el.getBoundingRect().clone();u.applyTransform(l.el.transform),this._tryShow({offsetX:u.x+u.width/2,offsetY:u.y+u.height/2,target:l.el,position:i.position,positionDefault:"bottom"},o)}else if(i.tooltip&&i.x!=null&&i.y!=null){var c=P1;c.x=i.x,c.y=i.y,c.update(),ee(c).tooltipConfig={name:null,option:i.tooltip},this._tryShow({offsetX:i.x,offsetY:i.y,target:c},o)}else if(s)this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,dataByCoordSys:s,tooltipOption:i.tooltipOption},o);else if(i.seriesIndex!=null){if(this._manuallyAxisShowTip(e,n,a,i))return;var f=xg(i,n),h=f.point[0],v=f.point[1];h!=null&&v!=null&&this._tryShow({offsetX:h,offsetY:v,target:f.el,position:i.position,positionDefault:"bottom"},o)}else i.x!=null&&i.y!=null&&(a.dispatchAction({type:"updateAxisPointer",x:i.x,y:i.y}),this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,target:a.getZr().findHover(i.x,i.y).target},o))}},t.prototype.manuallyHideTip=function(e,n,a,i){var o=this._tooltipContent;this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,i.from!==this.uid&&this._hide(fv(i,a))},t.prototype._manuallyAxisShowTip=function(e,n,a,i){var o=i.seriesIndex,s=i.dataIndex,l=n.getComponent("axisPointer").coordSysAxesInfo;if(!(o==null||s==null||l==null)){var u=n.getSeriesByIndex(o);if(u){var c=u.getData(),f=hn([c.getItemModel(s),u,(u.coordinateSystem||{}).model],this._tooltipModel);if(f.get("trigger")==="axis")return a.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:s,position:i.position}),!0}}},t.prototype._tryShow=function(e,n){var a=e.target,i=this._tooltipModel;if(i){this._lastX=e.offsetX,this._lastY=e.offsetY;var o=e.dataByCoordSys;if(o&&o.length)this._showAxisTooltip(o,e);else if(a){var s=ee(a);if(s.ssrType==="legend")return;this._lastDataByCoordSys=null;var l,u;yn(a,function(c){if(c.tooltipDisabled)return l=u=null,!0;l||u||(ee(c).dataIndex!=null?l=c:ee(c).tooltipConfig!=null&&(u=c))},!0),l?this._showSeriesItemTooltip(e,l,n):u?this._showComponentItemTooltip(e,u,n):this._hide(n)}else this._lastDataByCoordSys=null,this._hide(n)}},t.prototype._showOrMove=function(e,n){var a=e.get("showDelay");n=ie(n,this),clearTimeout(this._showTimout),a>0?this._showTimout=setTimeout(n,a):n()},t.prototype._showAxisTooltip=function(e,n){var a=this._ecModel,i=this._tooltipModel,o=[n.offsetX,n.offsetY],s=hn([n.tooltipOption],i),l=this._renderMode,u=[],c=Vn("section",{blocks:[],noHeader:!0}),f=[],h=new Zi;C(e,function(y){C(y.dataByAxis,function(_){var S=a.getComponent(_.axisDim+"Axis",_.axisIndex),b=_.value;if(!(!S||b==null)){var x=yg(b,S.axis,a,_.seriesDataIndices,_.valueLabelOpt),w=Vn("section",{header:x,noHeader:!qn(x),sortBlocks:!0,blocks:[]});c.blocks.push(w),C(_.seriesDataIndices,function(T){var D=a.getSeriesByIndex(T.seriesIndex),M=T.dataIndexInside,A=D.getDataParams(M);if(!(A.dataIndex<0)){A.axisDim=_.axisDim,A.axisIndex=_.axisIndex,A.axisType=_.axisType,A.axisId=_.axisId,A.axisValue=li(S.axis,{value:b}),A.axisValueLabel=x,A.marker=h.makeTooltipMarker("item",vr(A.color),l);var L=$u(D.formatTooltip(M,!0,null)),I=L.frag;if(I){var P=hn([D],i).get("valueFormatter");w.blocks.push(P?W({valueFormatter:P},I):I)}L.text&&f.push(L.text),u.push(A)}})}})}),c.blocks.reverse(),f.reverse();var v=n.position,d=s.get("order"),p=Ju(c,h,l,d,a.get("useUTC"),s.get("textStyle"));p&&f.unshift(p);var m=l==="richText"?` `:"
",g=f.join(m);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(e,u)?this._updatePosition(s,v,o[0],o[1],this._tooltipContent,u):this._showTooltipContent(s,g,u,Math.random()+"",o[0],o[1],v,null,h)})},t.prototype._showSeriesItemTooltip=function(e,n,a){var i=this._ecModel,o=ee(n),s=o.seriesIndex,l=i.getSeriesByIndex(s),u=o.dataModel||l,c=o.dataIndex,f=o.dataType,h=u.getData(f),v=this._renderMode,d=e.positionDefault,p=hn([h.getItemModel(c),u,l&&(l.coordinateSystem||{}).model],this._tooltipModel,d?{position:d}:null),m=p.get("trigger");if(!(m!=null&&m!=="item")){var g=u.getDataParams(c,f),y=new Zi;g.marker=y.makeTooltipMarker("item",vr(g.color),v);var _=$u(u.formatTooltip(c,!1,f)),S=p.get("order"),b=p.get("valueFormatter"),x=_.frag,w=x?Ju(b?W({valueFormatter:b},x):x,y,v,S,i.get("useUTC"),p.get("textStyle")):_.text,T="item_"+u.name+"_"+c;this._showOrMove(p,function(){this._showTooltipContent(p,w,g,T,e.offsetX,e.offsetY,e.position,e.target,y)}),a({type:"showTip",dataIndexInside:c,dataIndex:h.getRawIndex(c),seriesIndex:s,from:this.uid})}},t.prototype._showComponentItemTooltip=function(e,n,a){var i=this._renderMode==="html",o=ee(n),s=o.tooltipConfig,l=s.option||{},u=l.encodeHTMLContent;if(X(l)){var c=l;l={content:c,formatter:c},u=!0}u&&i&&l.content&&(l=Q(l),l.content=Ne(l.content));var f=[l],h=this._ecModel.getComponent(o.componentMainType,o.componentIndex);h&&f.push(h),f.push({formatter:l.content});var v=e.positionDefault,d=hn(f,this._tooltipModel,v?{position:v}:null),p=d.get("content"),m=Math.random()+"",g=new Zi;this._showOrMove(d,function(){var y=Q(d.get("formatterParams")||{});this._showTooltipContent(d,p,y,m,e.offsetX,e.offsetY,e.position,n,g)}),a({type:"showTip",from:this.uid})},t.prototype._showTooltipContent=function(e,n,a,i,o,s,l,u,c){if(this._ticket="",!(!e.get("showContent")||!e.get("show"))){var f=this._tooltipContent;f.setEnterable(e.get("enterable"));var h=e.get("formatter");l=l||e.get("position");var v=n,d=this._getNearestPoint([o,s],a,e.get("trigger"),e.get("borderColor"),e.get("defaultBorderColor",!0)),p=d.color;if(h)if(X(h)){var m=e.ecModel.get("useUTC"),g=N(a)?a[0]:a,y=g&&g.axisType&&g.axisType.indexOf("time")>=0;v=h,y&&(v=Di(g.axisValue,v,m)),v=id(v,a,!0)}else if(q(h)){var _=ie(function(S,b){S===this._ticket&&(f.setContent(b,c,e,p,l),this._updatePosition(e,l,o,s,f,a,u))},this);this._ticket=i,v=h(a,i,_)}else v=h;f.setContent(v,c,e,p,l),f.show(e,p),this._updatePosition(e,l,o,s,f,a,u)}},t.prototype._getNearestPoint=function(e,n,a,i,o){if(a==="axis"||N(n))return{color:i||o};if(!N(n))return{color:i||n.color||n.borderColor}},t.prototype._updatePosition=function(e,n,a,i,o,s,l){var u=this._api.getWidth(),c=this._api.getHeight();n=n||e.get("position");var f=o.getSize(),h=e.get("align"),v=e.get("verticalAlign"),d=l&&l.getBoundingRect().clone();if(l&&d.applyTransform(l.transform),q(n)&&(n=n([a,i],s,o.el,d,{viewSize:[u,c],contentSize:f.slice()})),N(n))a=se(n[0],u),i=se(n[1],c);else if($(n)){var p=n;p.width=f[0],p.height=f[1];var m=ct(p,{width:u,height:c});a=m.x,i=m.y,h=null,v=null}else if(X(n)&&l){var g=O1(n,d,f,e.get("borderWidth"));a=g[0],i=g[1]}else{var g=R1(a,i,o,u,c,h?null:20,v?null:20);a=g[0],i=g[1]}if(h&&(a-=vv(h)?f[0]/2:h==="right"?f[0]:0),v&&(i-=vv(v)?f[1]/2:v==="bottom"?f[1]:0),Ig(e)){var g=E1(a,i,o,u,c);a=g[0],i=g[1]}o.moveTo(a,i)},t.prototype._updateContentNotChangedOnAxis=function(e,n){var a=this._lastDataByCoordSys,i=this._cbParamsList,o=!!a&&a.length===e.length;return o&&C(a,function(s,l){var u=s.dataByAxis||[],c=e[l]||{},f=c.dataByAxis||[];o=o&&u.length===f.length,o&&C(u,function(h,v){var d=f[v]||{},p=h.seriesDataIndices||[],m=d.seriesDataIndices||[];o=o&&h.value===d.value&&h.axisType===d.axisType&&h.axisId===d.axisId&&p.length===m.length,o&&C(p,function(g,y){var _=m[y];o=o&&g.seriesIndex===_.seriesIndex&&g.dataIndex===_.dataIndex}),i&&C(h.seriesDataIndices,function(g){var y=g.seriesIndex,_=n[y],S=i[y];_&&S&&S.data!==_.data&&(o=!1)})})}),this._lastDataByCoordSys=e,this._cbParamsList=n,!!o},t.prototype._hide=function(e){this._lastDataByCoordSys=null,e({type:"hideTip",from:this.uid})},t.prototype.dispose=function(e,n){ye.node||!n.getDom()||(ns(this,"_updatePosition"),this._tooltipContent.dispose(),Is("itemTooltip",n))},t.type="tooltip",t})(Ge);function hn(r,t,e){var n=t.ecModel,a;e?(a=new he(e,n,n),a=new he(t.option,a,n)):a=t;for(var i=r.length-1;i>=0;i--){var o=r[i];o&&(o instanceof he&&(o=o.get("tooltip",!0)),X(o)&&(o={formatter:o}),o&&(a=new he(o,a,n)))}return a}function fv(r,t){return r.dispatchAction||ie(t.dispatchAction,t)}function R1(r,t,e,n,a,i,o){var s=e.getSize(),l=s[0],u=s[1];return i!=null&&(r+l+i+2>n?r-=l+i:r+=i),o!=null&&(t+u+o>a?t-=u+o:t+=o),[r,t]}function E1(r,t,e,n,a){var i=e.getSize(),o=i[0],s=i[1];return r=Math.min(r+o,n)-o,t=Math.min(t+s,a)-s,r=Math.max(r,0),t=Math.max(t,0),[r,t]}function O1(r,t,e,n){var a=e[0],i=e[1],o=Math.ceil(Math.SQRT2*n)+8,s=0,l=0,u=t.width,c=t.height;switch(r){case"inside":s=t.x+u/2-a/2,l=t.y+c/2-i/2;break;case"top":s=t.x+u/2-a/2,l=t.y-i-o;break;case"bottom":s=t.x+u/2-a/2,l=t.y+c+o;break;case"left":s=t.x-a-o,l=t.y+c/2-i/2;break;case"right":s=t.x+u+o,l=t.y+c/2-i/2}return[s,l]}function vv(r){return r==="center"||r==="middle"}function B1(r,t,e){var n=Ys(r).queryOptionMap,a=n.keys()[0];if(!(!a||a==="series")){var i=Jn(t,a,n.get(a),{useDefault:!1,enableAll:!1,enableNone:!1}),o=i.models[0];if(o){var s=e.getViewOfComponentModel(o),l;if(s.group.traverse(function(u){var c=ee(u).tooltipConfig;if(c&&c.name===r.name)return l=u,!0}),l)return{componentMainType:a,componentIndex:o.componentIndex,el:l}}}}function ED(r){xt(bg),r.registerComponentModel(_1),r.registerComponentView(k1),r.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},St),r.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},St)}var N1=(function(r){H(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.layoutMode={type:"box",ignoreSize:!0},e}return t.type="title",t.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:"center",top:z.size.m,backgroundColor:z.color.transparent,borderColor:z.color.primary,borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:z.color.primary},subtextStyle:{fontSize:12,color:z.color.quaternary}},t})(ae),z1=(function(r){H(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,n,a){if(this.group.removeAll(),!!e.get("show")){var i=this.group,o=e.getModel("textStyle"),s=e.getModel("subtextStyle"),l=e.get("textAlign"),u=j(e.get("textBaseline"),e.get("textVerticalAlign")),c=new De({style:Ut(o,{text:e.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),f=c.getBoundingRect(),h=e.get("subtext"),v=new De({style:Ut(s,{text:h,fill:s.getTextColor(),y:f.height+e.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),d=e.get("link"),p=e.get("sublink"),m=e.get("triggerEvent",!0);c.silent=!d&&!m,v.silent=!p&&!m,d&&c.on("click",function(){Yu(d,"_"+e.get("target"))}),p&&v.on("click",function(){Yu(p,"_"+e.get("subtarget"))}),ee(c).eventData=ee(v).eventData=m?{componentType:"title",componentIndex:e.componentIndex}:null,i.add(c),h&&i.add(v);var g=i.getBoundingRect(),y=e.getBoxLayoutParams();y.width=g.width,y.height=g.height;var _=na(e,a),S=ct(y,_.refContainer,e.get("padding"));l||(l=e.get("left")||e.get("right"),l==="middle"&&(l="center"),l==="right"?S.x+=S.width:l==="center"&&(S.x+=S.width/2)),u||(u=e.get("top")||e.get("bottom"),u==="center"&&(u="middle"),u==="bottom"?S.y+=S.height:u==="middle"&&(S.y+=S.height/2),u=u||"top"),i.x=S.x,i.y=S.y,i.markRedraw();var b={align:l,verticalAlign:u};c.setStyle(b),v.setStyle(b),g=i.getBoundingRect();var x=S.margin,w=e.getItemStyle(["color","opacity"]);w.fill=e.get("backgroundColor");var T=new de({shape:{x:g.x-x[3],y:g.y-x[0],width:g.width+x[1]+x[3],height:g.height+x[0]+x[2],r:e.get("borderRadius")},style:w,subPixelOptimize:!0,silent:!0});i.add(T)}},t.type="title",t})(Ge);function OD(r){r.registerComponentModel(N1),r.registerComponentView(z1)}var V1=function(r,t){if(t==="all")return{type:"all",title:r.getLocaleModel().get(["legend","selector","all"])};if(t==="inverse")return{type:"inverse",title:r.getLocaleModel().get(["legend","selector","inverse"])}},Rs=(function(r){H(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.layoutMode={type:"box",ignoreSize:!0},e}return t.prototype.init=function(e,n,a){this.mergeDefaultAndTheme(e,a),e.selected=e.selected||{},this._updateSelector(e)},t.prototype.mergeOption=function(e,n){r.prototype.mergeOption.call(this,e,n),this._updateSelector(e)},t.prototype._updateSelector=function(e){var n=e.selector,a=this.ecModel;n===!0&&(n=e.selector=["all","inverse"]),N(n)&&C(n,function(i,o){X(i)&&(i={type:i}),n[o]=J(i,V1(a,i.type))})},t.prototype.optionUpdated=function(){this._updateData(this.ecModel);var e=this._data;if(e[0]&&this.get("selectedMode")==="single"){for(var n=!1,a=0;a=0},t.prototype.getOrient=function(){return this.get("orient")==="vertical"?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},t.type="legend.plain",t.dependencies=["series"],t.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",bottom:z.size.m,align:"auto",backgroundColor:z.color.transparent,borderColor:z.color.border,borderRadius:0,borderWidth:0,padding:5,itemGap:8,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:z.color.disabled,inactiveBorderColor:z.color.disabled,inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:z.color.disabled,inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:z.color.secondary},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:z.color.tertiary,borderWidth:1,borderColor:z.color.border},emphasis:{selectorLabel:{show:!0,color:z.color.quaternary}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1},triggerEvent:!1},t})(ae),Lr=ne,Es=C,Pa=Se,Rg=(function(r){H(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.newlineDisabled=!1,e}return t.prototype.init=function(){this.group.add(this._contentGroup=new Pa),this.group.add(this._selectorGroup=new Pa),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(e,n,a){var i=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!e.get("show",!0)){var o=e.get("align"),s=e.get("orient");(!o||o==="auto")&&(o=e.get("left")==="right"&&s==="vertical"?"right":"left");var l=e.get("selector",!0),u=e.get("selectorPosition",!0);l&&(!u||u==="auto")&&(u=s==="horizontal"?"end":"start"),this.renderInner(o,e,n,a,l,s,u);var c=na(e,a).refContainer,f=e.getBoxLayoutParams(),h=e.get("padding"),v=ct(f,c,h),d=this.layoutInner(e,o,v,i,l,u),p=ct(oe({width:d.width,height:d.height},f),c,h);this.group.x=p.x-d.x,this.group.y=p.y-d.y,this.group.markRedraw(),this.group.add(this._backgroundEl=Tg(d,e))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(e,n,a,i,o,s,l){var u=this.getContentGroup(),c=Z(),f=n.get("selectedMode"),h=n.get("triggerEvent"),v=[];a.eachRawSeries(function(d){!d.get("legendHoverLink")&&v.push(d.id)}),Es(n.getData(),function(d,p){var m=this,g=d.get("name");if(!this.newlineDisabled&&(g===""||g===` `)){var y=new Pa;y.newline=!0,u.add(y);return}var _=a.getSeriesByName(g)[0];if(!c.get(g))if(_){var S=_.getData(),b=S.getVisual("legendLineStyle")||{},x=S.getVisual("legendIcon"),w=S.getVisual("style"),T=this._createItem(_,g,p,d,n,e,b,w,x,f,i);T.on("click",Lr(hv,g,null,i,v)).on("mouseover",Lr(Os,_.name,null,i,v)).on("mouseout",Lr(Bs,_.name,null,i,v)),a.ssr&&T.eachChild(function(D){var M=ee(D);M.seriesIndex=_.seriesIndex,M.dataIndex=p,M.ssrType="legend"}),h&&T.eachChild(function(D){m.packEventData(D,n,_,p,g)}),c.set(g,!0)}else a.eachRawSeries(function(D){var M=this;if(!c.get(g)&&D.legendVisualProvider){var A=D.legendVisualProvider;if(!A.containName(g))return;var L=A.indexOfName(g),I=A.getItemVisual(L,"style"),P=A.getItemVisual(L,"legendIcon"),k=dm(I.fill);k&&k[3]===0&&(k[3]=.2,I=W(W({},I),{fill:pm(k,"rgba")}));var E=this._createItem(D,g,p,d,n,e,{},I,P,f,i);E.on("click",Lr(hv,null,g,i,v)).on("mouseover",Lr(Os,null,g,i,v)).on("mouseout",Lr(Bs,null,g,i,v)),a.ssr&&E.eachChild(function(U){var R=ee(U);R.seriesIndex=D.seriesIndex,R.dataIndex=p,R.ssrType="legend"}),h&&E.eachChild(function(U){M.packEventData(U,n,D,p,g)}),c.set(g,!0)}},this)},this),o&&this._createSelector(o,n,i,s,l)},t.prototype.packEventData=function(e,n,a,i,o){var s={componentType:"legend",componentIndex:n.componentIndex,dataIndex:i,value:o,seriesIndex:a.seriesIndex};ee(e).eventData=s},t.prototype._createSelector=function(e,n,a,i,o){var s=this.getSelectorGroup();Es(e,function(u){var c=u.type,f=new De({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){a.dispatchAction({type:c==="all"?"legendAllSelect":"legendInverseSelect",legendId:n.id})}});s.add(f);var h=n.getModel("selectorLabel"),v=n.getModel(["emphasis","selectorLabel"]);Kr(f,{normal:h,emphasis:v},{defaultText:u.title}),Fo(f)})},t.prototype._createItem=function(e,n,a,i,o,s,l,u,c,f,h){var v=e.visualDrawType,d=o.get("itemWidth"),p=o.get("itemHeight"),m=o.isSelected(n),g=i.get("symbolRotate"),y=i.get("symbolKeepAspect"),_=i.get("icon");c=_||c||"roundRect";var S=G1(c,i,l,u,v,m,h),b=new Pa,x=i.getModel("textStyle");if(q(e.getLegendIcon)&&(!_||_==="inherit"))b.add(e.getLegendIcon({itemWidth:d,itemHeight:p,icon:c,iconRotate:g,itemStyle:S.itemStyle,lineStyle:S.lineStyle,symbolKeepAspect:y}));else{var w=_==="inherit"&&e.getData().getVisual("symbol")?g==="inherit"?e.getData().getVisual("symbolRotate"):g:0;b.add(F1({itemWidth:d,itemHeight:p,icon:c,iconRotate:w,itemStyle:S.itemStyle,symbolKeepAspect:y}))}var T=s==="left"?d+5:-5,D=s,M=o.get("formatter"),A=n;X(M)&&M?A=M.replace("{name}",n??""):q(M)&&(A=M(n));var L=m?x.getTextColor():i.get("inactiveColor");b.add(new De({style:Ut(x,{text:A,x:T,y:p/2,fill:L,align:D,verticalAlign:"middle"},{inheritColor:L})}));var I=new de({shape:b.getBoundingRect(),style:{fill:"transparent"}}),P=i.getModel("tooltip");return P.get("show")&&ea({el:I,componentModel:o,itemName:n,itemTooltipOption:P.option}),b.add(I),b.eachChild(function(k){k.silent=!0}),I.silent=!f,this.getContentGroup().add(b),Fo(b),b.__legendDataIndex=a,b},t.prototype.layoutInner=function(e,n,a,i,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();Br(e.get("orient"),l,e.get("itemGap"),a.width,a.height);var c=l.getBoundingRect(),f=[-c.x,-c.y];if(u.markRedraw(),l.markRedraw(),o){Br("horizontal",u,e.get("selectorItemGap",!0));var h=u.getBoundingRect(),v=[-h.x,-h.y],d=e.get("selectorButtonGap",!0),p=e.getOrient().index,m=p===0?"width":"height",g=p===0?"height":"width",y=p===0?"y":"x";s==="end"?v[p]+=c[m]+d:f[p]+=h[m]+d,v[1-p]+=c[g]/2-h[g]/2,u.x=v[0],u.y=v[1],l.x=f[0],l.y=f[1];var _={x:0,y:0};return _[m]=c[m]+d+h[m],_[g]=Math.max(c[g],h[g]),_[y]=Math.min(0,h[y]+v[1-p]),_}else return l.x=f[0],l.y=f[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type="legend.plain",t})(Ge);function G1(r,t,e,n,a,i,o){function s(m,g){m.lineWidth==="auto"&&(m.lineWidth=g.lineWidth>0?2:0),Es(m,function(y,_){m[_]==="inherit"&&(m[_]=g[_])})}var l=t.getModel("itemStyle"),u=l.getItemStyle(),c=r.lastIndexOf("empty",0)===0?"fill":"stroke",f=l.getShallow("decal");u.decal=!f||f==="inherit"?n.decal:os(f,o),u.fill==="inherit"&&(u.fill=n[a]),u.stroke==="inherit"&&(u.stroke=n[c]),u.opacity==="inherit"&&(u.opacity=(a==="fill"?n:e).opacity),s(u,n);var h=t.getModel("lineStyle"),v=h.getLineStyle();if(s(v,e),u.fill==="auto"&&(u.fill=n.fill),u.stroke==="auto"&&(u.stroke=n.fill),v.stroke==="auto"&&(v.stroke=n.fill),!i){var d=t.get("inactiveBorderWidth"),p=u[c];u.lineWidth=d==="auto"?n.lineWidth>0&&p?2:0:u.lineWidth,u.fill=t.get("inactiveColor"),u.stroke=t.get("inactiveBorderColor"),v.stroke=h.get("inactiveColor"),v.lineWidth=h.get("inactiveWidth")}return{itemStyle:u,lineStyle:v}}function F1(r){var t=r.icon||"roundRect",e=Xt(t,0,0,r.itemWidth,r.itemHeight,r.itemStyle.fill,r.symbolKeepAspect);return e.setStyle(r.itemStyle),e.rotation=(r.iconRotate||0)*Math.PI/180,e.setOrigin([r.itemWidth/2,r.itemHeight/2]),t.indexOf("empty")>-1&&(e.style.stroke=e.style.fill,e.style.fill=z.color.neutral00,e.style.lineWidth=2),e}function hv(r,t,e,n){Bs(r,t,e,n),e.dispatchAction({type:"legendToggleSelect",name:r??t}),Os(r,t,e,n)}function Eg(r){for(var t=r.getZr().storage.getDisplayList(),e,n=0,a=t.length;na[o],m=[-v.x,-v.y];n||(m[i]=c[u]);var g=[0,0],y=[-d.x,-d.y],_=j(e.get("pageButtonGap",!0),e.get("itemGap",!0));if(p){var S=e.get("pageButtonPosition",!0);S==="end"?y[i]+=a[o]-d[o]:g[i]+=d[o]+_}y[1-i]+=v[s]/2-d[s]/2,c.setPosition(m),f.setPosition(g),h.setPosition(y);var b={x:0,y:0};if(b[o]=p?a[o]:v[o],b[s]=Math.max(v[s],d[s]),b[l]=Math.min(0,d[l]+y[1-i]),f.__rectSize=a[o],p){var x={x:0,y:0};x[o]=Math.max(a[o]-d[o]-_,0),x[s]=b[s],f.setClipPath(new de({shape:x})),f.__rectSize=x[o]}else h.eachChild(function(T){T.attr({invisible:!0,silent:!0})});var w=this._getPageInfo(e);return w.pageIndex!=null&&Ae(c,{x:w.contentPosition[0],y:w.contentPosition[1]},p?e:null),this._updatePageInfoView(e,w),b},t.prototype._pageGo=function(e,n,a){var i=this._getPageInfo(n)[e];i!=null&&a.dispatchAction({type:"legendScroll",scrollDataIndex:i,legendId:n.id})},t.prototype._updatePageInfoView=function(e,n){var a=this._controllerGroup;C(["pagePrev","pageNext"],function(c){var f=c+"DataIndex",h=n[f]!=null,v=a.childOfName(c);v&&(v.setStyle("fill",h?e.get("pageIconColor",!0):e.get("pageIconInactiveColor",!0)),v.cursor=h?"pointer":"default")});var i=a.childOfName("pageText"),o=e.get("pageFormatter"),s=n.pageIndex,l=s!=null?s+1:0,u=n.pageCount;i&&o&&i.setStyle("text",X(o)?o.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):o({current:l,total:u}))},t.prototype._getPageInfo=function(e){var n=e.get("scrollDataIndex",!0),a=this.getContentGroup(),i=this._containerGroup.__rectSize,o=e.getOrient().index,s=Do[o],l=Ao[o],u=this._findTargetItemIndex(n),c=a.children(),f=c[u],h=c.length,v=h?1:0,d={contentPosition:[a.x,a.y],pageCount:v,pageIndex:v-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!f)return d;var p=S(f);d.contentPosition[o]=-p.s;for(var m=u+1,g=p,y=p,_=null;m<=h;++m)_=S(c[m]),(!_&&y.e>g.s+i||_&&!b(_,g.s))&&(y.i>g.i?g=y:g=_,g&&(d.pageNextDataIndex==null&&(d.pageNextDataIndex=g.i),++d.pageCount)),y=_;for(var m=u-1,g=p,y=p,_=null;m>=-1;--m)_=S(c[m]),(!_||!b(y,_.s))&&g.i=w&&x.s<=w+i}},t.prototype._findTargetItemIndex=function(e){if(!this._showController)return 0;var n,a=this.getContentGroup(),i;return a.eachChild(function(o,s){var l=o.__legendDataIndex;i==null&&l!=null&&(i=s),l===e&&(n=s)}),n??i},t.type="legend.scroll",t})(Rg);function X1(r){r.registerAction("legendScroll","legendscroll",function(t,e){var n=t.scrollDataIndex;n!=null&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},function(a){a.setScrollDataIndex(n)})})}function Z1(r){xt(Og),r.registerComponentModel(U1),r.registerComponentView(Y1),X1(r)}function BD(r){xt(Og),xt(Z1)}var $1={label:{enabled:!0},decal:{show:!1}},mv=fe(),K1={};function q1(r,t){var e=r.getModel("aria");if(!e.get("enabled"))return;var n=Q($1);J(n.label,r.getLocaleModel().get("aria"),!1),J(e.option,n,!1),a(),i();function a(){var u=e.getModel("decal"),c=u.get("show");if(c){var f=Z();r.eachSeries(function(h){if(!h.isColorBySeries()){var v=f.get(h.type);v||(v={},f.set(h.type,v)),mv(h).scope=v}}),r.eachRawSeries(function(h){if(r.isSeriesFiltered(h))return;if(q(h.enableAriaDecal)){h.enableAriaDecal();return}var v=h.getData();if(h.isColorBySeries()){var y=Zu(h.ecModel,h.name,K1,r.getSeriesCount()),_=v.getVisual("decal");v.setVisual("decal",S(_,y))}else{var d=h.getRawData(),p={},m=mv(h).scope;v.each(function(b){var x=v.getRawIndex(b);p[x]=b});var g=d.count();d.each(function(b){var x=p[b],w=d.getName(b)||b+"",T=Zu(h.ecModel,w,m,g),D=v.getItemVisual(x,"decal");v.setItemVisual(x,"decal",S(D,T))})}function S(b,x){var w=b?W(W({},x),b):x;return w.dirty=!0,w}})}}function i(){var u=t.getZr().dom;if(u){var c=r.getLocaleModel().get("aria"),f=e.getModel("label");if(f.option=oe(f.option,c),!!f.get("enabled")){if(u.setAttribute("role","img"),f.get("description")){u.setAttribute("aria-label",f.get("description"));return}var h=r.getSeriesCount(),v=f.get(["data","maxCount"])||10,d=f.get(["series","maxCount"])||10,p=Math.min(h,d),m;if(!(h<1)){var g=s();if(g){var y=f.get(["general","withTitle"]);m=o(y,{title:g})}else m=f.get(["general","withoutTitle"]);var _=[],S=h>1?f.get(["series","multiple","prefix"]):f.get(["series","single","prefix"]);m+=o(S,{seriesCount:h}),r.eachSeries(function(T,D){if(D1?f.get(["series","multiple",L]):f.get(["series","single",L]),M=o(M,{seriesId:T.seriesIndex,seriesName:T.get("name"),seriesType:l(T.subType)});var I=T.getData();if(I.count()>v){var P=f.get(["data","partialData"]);M+=o(P,{displayCnt:v})}else M+=f.get(["data","allData"]);for(var k=f.get(["data","separator","middle"]),E=f.get(["data","separator","end"]),U=f.get(["data","excludeDimensionId"]),R=[],O=0;O":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},Q1=(function(){function r(t){var e=this._condVal=X(t)?new RegExp(t):gm(t)?t:null;if(e==null){var n="";re(n)}}return r.prototype.evaluate=function(t){var e=typeof t;return X(e)?this._condVal.test(t):ce(e)?this._condVal.test(t+""):!1},r})(),J1=(function(){function r(){}return r.prototype.evaluate=function(){return this.value},r})(),eD=(function(){function r(){}return r.prototype.evaluate=function(){for(var t=this.children,e=0;e=0;a--)if(!e[a].many.length){var l=e[s].many;if(l.length<=1)if(s)s=0;else return e;var i=l.length,u=Math.ceil(i/2);e[a].many=l.slice(u,i),e[s].many=l.slice(0,u),s++}return e}var vD={clone:function(r){for(var t=[],e=1-Math.pow(1-r.path.style.opacity,1/r.count),n=0;n0))return;var s=n.getModel("universalTransition").get("delay"),l=Object.assign({setToFinal:!0},o),u,c;Sv(r)&&(u=r,c=t),Sv(t)&&(u=t,c=r);function f(g,y,_,S,b){var x=g.many,w=g.one;if(x.length===1&&!b){var T=y?x[0]:w,D=y?w:x[0];if(mm(T))f({many:[T],one:D},!0,_,S,!0);else{var M=s?oe({delay:s(_,S)},l):l;ym(T,D,M),i(T,D,T,D,M)}}else for(var A=oe({dividePath:vD[e],individualDelay:s&&function(U,R,O,V){return s(U+_,S)}},l),L=y?_m(x,w,A):Sm(w,x,A),I=L.fromIndividuals,P=L.toIndividuals,k=I.length,E=0;Et.length,v=u?xv(c,u):xv(h?t:r,[h?r:t]),d=0,p=0;pNg))for(var i=n.getIndices(),o=0;o0&&x.group.traverse(function(T){T instanceof Ce&&!T.animators.length&&T.animateFrom({style:{opacity:0}},w)})})}function Dv(r){var t=r.getModel("universalTransition").get("seriesKey");return t||r.id}function Av(r){return N(r)?r.sort().join(","):r}function Ot(r){if(r.hostModel)return r.hostModel.getModel("universalTransition").get("divideShape")}function _D(r,t){var e=Z(),n=Z(),a=Z();return C(r.oldSeries,function(i,o){var s=r.oldDataGroupIds[o],l=r.oldData[o],u=Dv(i),c=Av(u);n.set(c,{dataGroupId:s,data:l}),N(u)&&C(u,function(f){a.set(f,{key:c,dataGroupId:s,data:l})})}),C(t.updatedSeries,function(i){if(i.isUniversalTransitionEnabled()&&i.isAnimationEnabled()){var o=i.get("dataGroupId"),s=i.getData(),l=Dv(i),u=Av(l),c=n.get(u);if(c)e.set(u,{oldSeries:[{dataGroupId:c.dataGroupId,divide:Ot(c.data),data:c.data}],newSeries:[{dataGroupId:o,divide:Ot(s),data:s}]});else if(N(l)){var f=[];C(l,function(d){var p=n.get(d);p.data&&f.push({dataGroupId:p.dataGroupId,divide:Ot(p.data),data:p.data})}),f.length&&e.set(u,{oldSeries:f,newSeries:[{dataGroupId:o,data:s,divide:Ot(s)}]})}else{var h=a.get(l);if(h){var v=e.get(h.key);v||(v={oldSeries:[{dataGroupId:h.dataGroupId,data:h.data,divide:Ot(h.data)}],newSeries:[]},e.set(h.key,v)),v.newSeries.push({dataGroupId:o,data:s,divide:Ot(s)})}}}}),e}function Mv(r,t){for(var e=0;e=0&&a.push({dataGroupId:t.oldDataGroupIds[s],data:t.oldData[s],divide:Ot(t.oldData[s]),groupIdDim:o.dimension})}),C(_e(r.to),function(o){var s=Mv(e.updatedSeries,o);if(s>=0){var l=e.updatedSeries[s].getData();i.push({dataGroupId:t.oldDataGroupIds[s],data:l,divide:Ot(l),groupIdDim:o.dimension})}}),a.length>0&&i.length>0&&zg(a,i,n)}function GD(r){r.registerUpdateLifecycle("series:beforeupdate",function(t,e,n){C(_e(n.seriesTransition),function(a){C(_e(a.to),function(i){for(var o=n.updatedSeries,s=0;s40&&(u=Math.ceil(a/40));for(var c=0;c