import{$ as e,$a as t,$i as n,$n as r,$r as i,$t as a,A as o,Aa as s,Ai as c,An as l,Ao as u,Ar as d,At as f,B as p,Ba as m,Bi as h,Bn as g,Bo as _,Br as v,Bt as y,C as b,Ca as x,Ci as S,Cn as C,Co as w,Ct as T,D as E,Da as D,Di as O,Dn as k,Do as A,Dr as j,Dt as M,E as N,Ea as P,Ei as F,En as ee,Eo as te,Er as ne,Et as re,F as ie,Fa as ae,Fi as oe,Fn as se,Fo as ce,Fr as le,Ft as ue,G as de,Ga as fe,Gi as pe,Gn as me,Go as he,Gr as ge,Gt as _e,H as ve,Ha as ye,Hi as be,Hn as xe,Hr as Se,Ht as Ce,I as we,Ia as Te,Ii as Ee,In as De,Io as Oe,Ir as ke,It as Ae,J as je,Ja as Me,Ji as I,Jn as Ne,Jr as Pe,Jt as Fe,K as Ie,Ka as Le,Ki as Re,Kn as ze,Ko as L,Kr as Be,Kt as Ve,L as He,La as Ue,Li as We,Ln as Ge,Lo as Ke,Lr as qe,Lt as Je,M as Ye,Ma as Xe,Mi as Ze,Mn as Qe,Mo as $e,Mr as et,Mt as tt,N as nt,Na as rt,Ni as it,Nn as at,No as ot,Nr as st,Nt as ct,O as lt,Oa as ut,Oi as dt,On as ft,Oo as R,Or as pt,Ot as mt,P as ht,Pa as gt,Pi as _t,Pn as vt,Po as yt,Pr as bt,Pt as xt,Q as St,Qa as Ct,Qi as wt,Qn as Tt,Qr as Et,Qt as Dt,R as Ot,Ra as kt,Ri as At,Rn as jt,Ro as z,Rr as Mt,Rt as Nt,S as Pt,Sa as Ft,Si as It,Sn as Lt,So as B,St as Rt,T as zt,Ta as Bt,Ti as Vt,Tn as Ht,To as V,Tr as H,Tt as Ut,U as Wt,Ua as Gt,Ui as Kt,Un as qt,Ur as Jt,Ut as Yt,V as Xt,Va as Zt,Vi as U,Vn as Qt,Vo as $t,Vr as en,Vt as tn,W as nn,Wa as rn,Wi as an,Wn as on,Wo as sn,Wr as cn,Wt as ln,X as un,Xa as dn,Xi as fn,Xn as pn,Xr as mn,Xt as hn,Y as gn,Ya as _n,Yi as vn,Yn as yn,Yr as bn,Yt as xn,Z as Sn,Za as Cn,Zi as W,Zn as wn,Zr as Tn,Zt as En,_ as Dn,_a as On,_i as kn,_n as An,_o as G,_r as jn,_t as Mn,a as Nn,aa as Pn,ai as Fn,an as In,ao as Ln,ar as Rn,at as zn,b as Bn,ba as Vn,bi as Hn,bn as Un,bo as K,bt as Wn,c as Gn,ca as Kn,ci as qn,cn as Jn,co as Yn,cr as Xn,ct as Zn,d as Qn,da as $n,di as er,dn as tr,do as nr,dr as rr,dt as ir,ea as ar,ei as or,en as sr,eo as cr,er as lr,et as ur,f as dr,fa as fr,fi as pr,fn as mr,fo as q,fr as hr,ft as gr,g as _r,ga as vr,gi as yr,gn as br,go as xr,gr as Sr,gt as Cr,h as wr,ha as Tr,hi as Er,hn as Dr,ho as J,hr as Or,ht as kr,i as Ar,ia as jr,ii as Mr,in as Nr,io as Pr,ir as Fr,it as Ir,j as Lr,ja as Rr,ji as zr,jn as Br,jo as Vr,jr as Hr,jt as Ur,k as Wr,ka as Gr,ki as Y,kn as Kr,ko as qr,kr as Jr,kt as Yr,l as Xr,la as Zr,li as Qr,ln as $r,lo as X,lr as ei,lt as Z,m as ti,ma as ni,mi as ri,mn as ii,mo as ai,mr as oi,mt as si,na as ci,ni as li,nn as ui,no as di,nr as fi,nt as pi,o as mi,oa as hi,oi as gi,on as _i,oo as vi,or as yi,ot as bi,p as xi,pa as Si,pi as Ci,pn as wi,po as Q,pr as Ti,pt as Ei,q as Di,qa as Oi,qi as ki,qn as Ai,qr as ji,qt as Mi,ra as Ni,ri as Pi,rn as Fi,ro as Ii,rr as Li,rt as Ri,s as zi,sa as Bi,si as $,sn as Vi,so as Hi,sr as Ui,st as Wi,ta as Gi,ti as Ki,tn as qi,to as Ji,tr as Yi,tt as Xi,u as Zi,ua as Qi,ui as $i,un as ea,uo as ta,ur as na,ut as ra,v as ia,va as aa,vi as oa,vn as sa,vo as ca,vr as la,vt as ua,w as da,wa as fa,wi as pa,wn as ma,wo as ha,wr as ga,wt as _a,x as va,xa as ya,xi as ba,xn as xa,xo as Sa,xr as Ca,xt as wa,y as Ta,ya as Ea,yi as Da,yn as Oa,yo as ka,yr as Aa,yt as ja,z as Ma,za as Na,zi as Pa,zn as Fa,zo as Ia,zr as La,zt as Ra}from"./dist-DvPi11yk.js";import{st as za}from"./src-BZeKMj5W.js";import{f as Ba,m as Va,s as Ha,u as Ua}from"./theme-CeckkpZt.js";function Wa(e){return e==null?0:e.length||1}function Ga(e){return e}var Ka=function(){function e(e,t,n,r,i,a){this._old=e,this._new=t,this._oldKeyGetter=n||Ga,this._newKeyGetter=r||Ga,this.context=i,this._diffModeMultiple=a===`multiple`}return e.prototype.add=function(e){return this._add=e,this},e.prototype.update=function(e){return this._update=e,this},e.prototype.updateManyToOne=function(e){return this._updateManyToOne=e,this},e.prototype.updateOneToMany=function(e){return this._updateOneToMany=e,this},e.prototype.updateManyToMany=function(e){return this._updateManyToMany=e,this},e.prototype.remove=function(e){return this._remove=e,this},e.prototype.execute=function(){this[this._diffModeMultiple?`_executeMultiple`:`_executeOneToOne`]()},e.prototype._executeOneToOne=function(){var e=this._old,t=this._new,n={},r=Array(e.length),i=Array(t.length);this._initIndexMap(e,null,r,`_oldKeyGetter`),this._initIndexMap(t,n,i,`_newKeyGetter`);for(var a=0;a<e.length;a++){var o=r[a],s=n[o],c=Wa(s);if(c>1){var l=s.shift();s.length===1&&(n[o]=s[0]),this._update&&this._update(l,a)}else c===1?(n[o]=null,this._update&&this._update(s,a)):this._remove&&this._remove(a)}this._performRestAdd(i,n)},e.prototype._executeMultiple=function(){var e=this._old,t=this._new,n={},r={},i=[],a=[];this._initIndexMap(e,n,i,`_oldKeyGetter`),this._initIndexMap(t,r,a,`_newKeyGetter`);for(var o=0;o<i.length;o++){var s=i[o],c=n[s],l=r[s],u=Wa(c),d=Wa(l);if(u>1&&d===1)this._updateManyToOne&&this._updateManyToOne(l,c),r[s]=null;else if(u===1&&d>1)this._updateOneToMany&&this._updateOneToMany(l,c),r[s]=null;else if(u===1&&d===1)this._update&&this._update(l,c),r[s]=null;else if(u>1&&d>1)this._updateManyToMany&&this._updateManyToMany(l,c),r[s]=null;else if(u>1)for(var f=0;f<u;f++)this._remove&&this._remove(c[f]);else this._remove&&this._remove(c)}this._performRestAdd(a,r)},e.prototype._performRestAdd=function(e,t){for(var n=0;n<e.length;n++){var r=e[n],i=t[r],a=Wa(i);if(a>1)for(var o=0;o<a;o++)this._add&&this._add(i[o]);else a===1&&this._add&&this._add(i);t[r]=null}},e.prototype._initIndexMap=function(e,t,n,r){for(var i=this._diffModeMultiple,a=0;a<e.length;a++){var o=`_ec_`+this[r](e[a],a);if(i||(n[a]=o),t){var s=t[o],c=Wa(s);c===0?(t[o]=a,i&&n.push(o)):c===1?t[o]=[s,a]:s.push(a)}}},e}(),qa=function(){function e(e,t){this._encode=e,this._schema=t}return e.prototype.get=function(){return{fullDimensions:this._getFullDimensionNames(),encode:this._encode}},e.prototype._getFullDimensionNames=function(){return this._cachedDimNames||=this._schema?this._schema.makeOutputDimensionNames():[],this._cachedDimNames},e}();function Ja(e,t){var n={},r=n.encode={},i=q(),a=[],o=[],s={};J(e.dimensions,function(t){var n=e.getDimensionInfo(t),c=n.coordDim;if(c){var l=n.coordDimIndex;Ya(r,c)[l]=t,n.isExtraCoord||(i.set(c,1),Za(n.type)&&(a[0]=t),Ya(s,c)[l]=e.getDimensionIndex(n.name)),n.defaultTooltip&&o.push(t)}ga.each(function(e,t){var i=Ya(r,t),a=n.otherDims[t];a!=null&&a!==!1&&(i[a]=n.name)})});var c=[],l={};i.each(function(e,t){var n=r[t];l[t]=n[0],c=c.concat(n)}),n.dataDimsOnCoord=c,n.dataDimIndicesOnCoord=u(c,function(t){return e.getDimensionInfo(t).storeDimIndex}),n.encodeFirstDimNotExtra=l;var d=r.label;d&&d.length&&(a=d.slice());var f=r.tooltip;return f&&f.length?o=f.slice():o.length||(o=a.slice()),r.defaultedLabel=a,r.defaultedTooltip=o,n.userOutput=new qa(s,t),n}function Ya(e,t){return e.hasOwnProperty(t)||(e[t]=[]),e[t]}function Xa(e){return e===`category`?`ordinal`:e===`time`?`time`:`float`}function Za(e){return!(e===`ordinal`||e===`time`)}var Qa=function(){function e(e){this.otherDims={},e!=null&&G(this,e)}return e}(),$a=$(),eo={float:`f`,int:`i`,ordinal:`o`,number:`n`,time:`t`},to=function(){function e(e){this.dimensions=e.dimensions,this._dimOmitted=e.dimensionOmitted,this.source=e.source,this._fullDimCount=e.fullDimensionCount,this._updateDimOmitted(e.dimensionOmitted)}return e.prototype.isDimensionOmitted=function(){return this._dimOmitted},e.prototype._updateDimOmitted=function(e){this._dimOmitted=e,e&&(this._dimNameMap||=io(this.source))},e.prototype.getSourceDimensionIndex=function(e){return z(this._dimNameMap.get(e),-1)},e.prototype.getSourceDimension=function(e){var t=this.source.dimensionsDefine;if(t)return t[e]},e.prototype.makeStoreSchema=function(){for(var e=this._fullDimCount,t=Ri(this.source),n=!ao(e),r=``,i=[],a=0,o=0;a<e;a++){var s=void 0,c=void 0,l=void 0,u=this.dimensions[o];if(u&&u.storeDimIndex===a)s=t?u.name:null,c=u.type,l=u.ordinalMeta,o++;else{var d=this.getSourceDimension(a);d&&(s=t?d.name:null,c=d.type)}i.push({property:s,type:c,ordinalMeta:l}),t&&s!=null&&(!u||!u.isCalculationCoord)&&(r+=n?s.replace(/\`/g,"`1").replace(/\$/g,"`2"):s),r+=`$`,r+=eo[c]||`f`,l&&(r+=l.uid),r+=`$`}var f=this.source;return{dimensions:i,hash:[f.seriesLayoutBy,f.startIndex,r].join(`$$`)}},e.prototype.makeOutputDimensionNames=function(){for(var e=[],t=0,n=0;t<this._fullDimCount;t++){var r=void 0,i=this.dimensions[n];if(i&&i.storeDimIndex===t)i.isCalculationCoord||(r=i.name),n++;else{var a=this.getSourceDimension(t);a&&(r=a.name)}e.push(r)}return e},e.prototype.appendCalculationDimension=function(e){this.dimensions.push(e),e.isCalculationCoord=!0,this._fullDimCount++,this._updateDimOmitted(!0)},e}();function no(e){return e instanceof to}function ro(e){for(var t=q(),n=0;n<(e||[]).length;n++){var r=e[n],i=A(r)?r.name:r;i!=null&&t.get(i)==null&&t.set(i,n)}return t}function io(e){var t=$a(e);return t.dimNameMap||=ro(e.dimensionsDefine)}function ao(e){return e>30}var oo=A,so=u,co=typeof Int32Array>`u`?Array:Int32Array,lo=`e\0\0`,uo=-1,fo=[`hasItemOption`,`_nameList`,`_idList`,`_invertedIndicesMap`,`_dimSummary`,`userOutput`,`_rawData`,`_dimValueGetter`,`_nameDimIdx`,`_idDimIdx`,`_nameRepeatCount`],po=[`_approximateExtent`],mo,ho,go,_o,vo,yo,bo,xo=function(){function t(e,t){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,r=!1;no(e)?(n=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(r=!0,n=e),n||=[`x`,`y`];for(var i={},a=[],o={},s=!1,c={},l=0;l<n.length;l++){var u=n[l],d=R(u)?new Qa({name:u}):u instanceof Qa?u:new Qa(u),f=d.name;d.type=d.type||`float`,d.coordDim||(d.coordDim=f,d.coordDimIndex=0);var p=d.otherDims=d.otherDims||{};a.push(f),i[f]=d,c[f]!=null&&(s=!0),d.createInvertedIndices&&(o[f]=[]),r&&(d.storeDimIndex=l),p.itemName===0&&(this._nameDimIdx=d.storeDimIndex),p.itemId===0&&(this._idDimIdx=d.storeDimIndex)}if(this.dimensions=a,this._dimInfos=i,this._initGetDimensionInfo(s),this.hostModel=t,this._invertedIndicesMap=o,this._dimOmitted){var m=this._dimIdxToName=q();J(a,function(e){m.set(i[e].storeDimIndex,e)})}}return t.prototype.getDimension=function(e){var t=this._recognizeDimIndex(e);if(t==null)return e;if(t=e,!this._dimOmitted)return this.dimensions[t];var n=this._dimIdxToName.get(t);if(n!=null)return n;var r=this._schema.getSourceDimension(t);if(r)return r.name},t.prototype.getDimensionIndex=function(e){var t=this._recognizeDimIndex(e);if(t!=null)return t;if(e==null)return-1;var n=this._getDimInfo(e);return n?n.storeDimIndex:this._dimOmitted?this._schema.getSourceDimensionIndex(e):-1},t.prototype._recognizeDimIndex=function(e){if(te(e)||e!=null&&!isNaN(e)&&!this._getDimInfo(e)&&(!this._dimOmitted||this._schema.getSourceDimensionIndex(e)<0))return+e},t.prototype._getStoreDimIndex=function(e){return this.getDimensionIndex(e)},t.prototype.getDimensionInfo=function(e){return this._getDimInfo(this.getDimension(e))},t.prototype._initGetDimensionInfo=function(e){var t=this._dimInfos;this._getDimInfo=e?function(e){return t.hasOwnProperty(e)?t[e]:void 0}:function(e){return t[e]}},t.prototype.getDimensionsOnCoord=function(){return this._dimSummary.dataDimsOnCoord.slice()},t.prototype.mapDimension=function(e,t){var n=this._dimSummary;if(t==null)return n.encodeFirstDimNotExtra[e];var r=n.encode[e];return r?r[t]:null},t.prototype.mapDimensionsAll=function(e){return(this._dimSummary.encode[e]||[]).slice()},t.prototype.getStore=function(){return this._store},t.prototype.initData=function(t,n,r){var i=this,a;if(t instanceof Di&&(a=t),!a){var o=this.dimensions,s=pi(t)||w(t)?new e(t,o.length):t;a=new Di;var c=so(o,function(e){return{type:i._dimInfos[e].type,property:e}});a.initData(s,c,r)}this._store=a,this._nameList=(n||[]).slice(),this._idList=[],this._nameRepeatCount={},this._doInit(0,a.count()),this._dimSummary=Ja(this,this._schema),this.userOutput=this._dimSummary.userOutput},t.prototype.appendData=function(e){var t=this._store.appendData(e);this._doInit(t[0],t[1])},t.prototype.appendValues=function(e,t){var n=this._store.appendValues(e,t&&t.length),r=n.start,i=n.end,a=this._shouldMakeIdFromName();if(this._updateOrdinalMeta(),t)for(var o=r;o<i;o++){var s=o-r;this._nameList[o]=t[s],a&&bo(this,o)}},t.prototype._updateOrdinalMeta=function(){for(var e=this._store,t=this.dimensions,n=0;n<t.length;n++){var r=this._dimInfos[t[n]];r.ordinalMeta&&e.collectOrdinalMeta(r.storeDimIndex,r.ordinalMeta)}},t.prototype._shouldMakeIdFromName=function(){var e=this._store.getProvider();return this._idDimIdx==null&&e.getSource().sourceFormat!==`typedArray`&&!e.fillStorage},t.prototype._doInit=function(e,t){if(!(e>=t)){var n=this._store.getProvider();this._updateOrdinalMeta();var r=this._nameList,i=this._idList;if(n.getSource().sourceFormat===`original`&&!n.pure)for(var a=[],o=e;o<t;o++){var s=n.getItem(o,a);if(!this.hasItemOption&&li(s)&&(this.hasItemOption=!0),s){var c=s.name;r[o]==null&&c!=null&&(r[o]=ge(c,null));var l=s.id;i[o]==null&&l!=null&&(i[o]=ge(l,null))}}if(this._shouldMakeIdFromName())for(var o=e;o<t;o++)bo(this,o);mo(this)}},t.prototype.getApproximateExtent=function(e,t){return this._approximateExtent[e]||this._store.getDataExtent(this._getStoreDimIndex(e),t)},t.prototype.setApproximateExtent=function(e,t){t=this.getDimension(t),this._approximateExtent[t]=e.slice()},t.prototype.getCalculationInfo=function(e){return this._calculationInfo[e]},t.prototype.setCalculationInfo=function(e,t){oo(e)?G(this._calculationInfo,e):this._calculationInfo[e]=t},t.prototype.getName=function(e){var t=this.getRawIndex(e),n=this._nameList[t];return n==null&&this._nameDimIdx!=null&&(n=go(this,this._nameDimIdx,t)),n??=``,n},t.prototype._getCategory=function(e,t){var n=this._store.get(e,t),r=this._store.getOrdinalMeta(e);return r?r.categories[n]:n},t.prototype.getId=function(e){return ho(this,this.getRawIndex(e))},t.prototype.count=function(){return this._store.count()},t.prototype.get=function(e,t){var n=this._store,r=this._dimInfos[e];if(r)return n.get(r.storeDimIndex,t)},t.prototype.getByRawIndex=function(e,t){var n=this._store,r=this._dimInfos[e];if(r)return n.getByRawIndex(r.storeDimIndex,t)},t.prototype.getIndices=function(){return this._store.getIndices()},t.prototype.getDataExtent=function(e){return this._store.getDataExtent(this._getStoreDimIndex(e),null)},t.prototype.getSum=function(e){return this._store.getSum(this._getStoreDimIndex(e))},t.prototype.getMedian=function(e){return this._store.getMedian(this._getStoreDimIndex(e))},t.prototype.getValues=function(e,t){var n=this,r=this._store;return B(e)?r.getValues(so(e,function(e){return n._getStoreDimIndex(e)}),t):r.getValues(e)},t.prototype.hasValue=function(e){for(var t=this._dimSummary.dataDimIndicesOnCoord,n=0,r=t.length;n<r;n++)if(isNaN(this._store.get(t[n],e)))return!1;return!0},t.prototype.indexOfName=function(e){for(var t=0,n=this._store.count();t<n;t++)if(this.getName(t)===e)return t;return-1},t.prototype.getRawIndex=function(e){return this._store.getRawIndex(e)},t.prototype.indexOfRawIndex=function(e){return this._store.indexOfRawIndex(e)},t.prototype.rawIndexOf=function(e,t){var n=e&&this._invertedIndicesMap[e],r=n&&n[t];return r==null||isNaN(r)?uo:r},t.prototype.each=function(e,t,n){V(e)&&(n=t,t=e,e=[]);var r=n||this,i=so(_o(e),this._getStoreDimIndex,this);this._store.each(i,r?X(t,r):t)},t.prototype.filterSelf=function(e,t,n){V(e)&&(n=t,t=e,e=[]);var r=n||this,i=so(_o(e),this._getStoreDimIndex,this);return this._store=this._store.filter(i,r?X(t,r):t),this},t.prototype.selectRange=function(e){var t=this,n={},r=qr(e),i=[];return J(r,function(r){var a=t._getStoreDimIndex(r);n[a]=e[r],i.push(a)}),this._store=this._store.selectRange(n),this},t.prototype.mapArray=function(e,t,n){V(e)&&(n=t,t=e,e=[]),n||=this;var r=[];return this.each(e,function(){r.push(t&&t.apply(this,arguments))},n),r},t.prototype.map=function(e,t,n,r){var i=n||r||this,a=so(_o(e),this._getStoreDimIndex,this),o=yo(this);return o._store=this._store.map(a,i?X(t,i):t),o},t.prototype.modify=function(e,t,n,r){var i=n||r||this,a=so(_o(e),this._getStoreDimIndex,this);this._store.modify(a,i?X(t,i):t)},t.prototype.downSample=function(e,t,n,r){var i=yo(this);return i._store=this._store.downSample(this._getStoreDimIndex(e),t,n,r),i},t.prototype.minmaxDownSample=function(e,t){var n=yo(this);return n._store=this._store.minmaxDownSample(this._getStoreDimIndex(e),t),n},t.prototype.lttbDownSample=function(e,t){var n=yo(this);return n._store=this._store.lttbDownSample(this._getStoreDimIndex(e),t),n},t.prototype.getRawDataItem=function(e){return this._store.getRawDataItem(e)},t.prototype.getItemModel=function(e){var t=this.hostModel;return new ii(this.getRawDataItem(e),t,t&&t.ecModel)},t.prototype.diff=function(e){var t=this;return new Ka(e?e.getStore().getIndices():[],this.getStore().getIndices(),function(t){return ho(e,t)},function(e){return ho(t,e)})},t.prototype.getVisual=function(e){var t=this._visual;return t&&t[e]},t.prototype.setVisual=function(e,t){this._visual=this._visual||{},oo(e)?G(this._visual,e):this._visual[e]=t},t.prototype.getItemVisual=function(e,t){var n=this._itemVisuals[e];return(n&&n[t])??this.getVisual(t)},t.prototype.hasItemVisual=function(){return this._itemVisuals.length>0},t.prototype.ensureUniqueItemVisual=function(e,t){var n=this._itemVisuals,r=n[e];r||=n[e]={};var i=r[t];return i??(i=this.getVisual(t),B(i)?i=i.slice():oo(i)&&(i=G({},i)),r[t]=i),i},t.prototype.setItemVisual=function(e,t,n){var r=this._itemVisuals[e]||{};this._itemVisuals[e]=r,oo(t)?G(r,t):r[t]=n},t.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},t.prototype.setLayout=function(e,t){oo(e)?G(this._layout,e):this._layout[e]=t},t.prototype.getLayout=function(e){return this._layout[e]},t.prototype.getItemLayout=function(e){return this._itemLayouts[e]},t.prototype.setItemLayout=function(e,t,n){this._itemLayouts[e]=n?G(this._itemLayouts[e]||{},t):t},t.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},t.prototype.setItemGraphicEl=function(e,t){ne(this.hostModel&&this.hostModel.seriesIndex,this.dataType,e,t),this._graphicEls[e]=t},t.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},t.prototype.eachItemGraphicEl=function(e,t){J(this._graphicEls,function(n,r){n&&e&&e.call(t,n,r)})},t.prototype.cloneShallow=function(e){return e||=new t(this._schema?this._schema:so(this.dimensions,this._getDimInfo,this),this.hostModel),vo(e,this),e._store=this._store,e},t.prototype.wrapMethod=function(e,t){var n=this[e];V(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var e=n.apply(this,arguments);return t.apply(this,[e].concat(_(arguments)))})},t.internalField=function(){mo=function(e){var t=e._invertedIndicesMap;J(t,function(n,r){var i=e._dimInfos[r],a=i.ordinalMeta,o=e._store;if(a){n=t[r]=new co(a.categories.length);for(var s=0;s<n.length;s++)n[s]=uo;for(var s=0;s<o.count();s++)n[o.get(i.storeDimIndex,s)]=s}})},go=function(e,t,n){return ge(e._getCategory(t,n),null)},ho=function(e,t){var n=e._idList[t];return n==null&&e._idDimIdx!=null&&(n=go(e,e._idDimIdx,t)),n??=lo+t,n},_o=function(e){return B(e)||(e=e==null?[]:[e]),e},yo=function(e){var n=new t(e._schema?e._schema:so(e.dimensions,e._getDimInfo,e),e.hostModel);return vo(n,e),n},vo=function(e,t){J(fo.concat(t.__wrappedMethods||[]),function(n){t.hasOwnProperty(n)&&(e[n]=t[n])}),e.__wrappedMethods=t.__wrappedMethods,J(po,function(n){e[n]=ta(t[n])}),e._calculationInfo=G({},t._calculationInfo)},bo=function(e,t){var n=e._nameList,r=e._idList,i=e._nameDimIdx,a=e._idDimIdx,o=n[t],s=r[t];if(o==null&&i!=null&&(n[t]=o=go(e,i,t)),s==null&&a!=null&&(r[t]=s=go(e,a,t)),s==null&&o!=null){var c=e._nameRepeatCount,l=c[o]=(c[o]||0)+1;s=o,l>1&&(s+=`__ec__`+l),r[t]=s}}}(),t}();function So(e,t){pi(e)||(e=Xi(e)),t||={};var n=t.coordDimensions||[],r=t.dimensionsDefine||e.dimensionsDefine||[],i=q(),a=[],o=Co(e,n,r,t.dimensionsCount),s=t.canOmitUnusedDimensions&&ao(o),c=r===e.dimensionsDefine,l=c?io(e):ro(r),u=t.encodeDefine;!u&&t.encodeDefaulter&&(u=t.encodeDefaulter(e,o));for(var d=q(u),f=new Ie(o),p=0;p<f.length;p++)f[p]=-1;function m(e){var t=f[e];if(t<0){var n=r[e],i=A(n)?n:{name:n},o=new Qa,s=i.name;return s!=null&&l.get(s)!=null&&(o.name=o.displayName=s),i.type!=null&&(o.type=i.type),i.displayName!=null&&(o.displayName=i.displayName),f[e]=a.length,o.storeDimIndex=e,a.push(o),o}return a[t]}if(!s)for(var p=0;p<o;p++)m(p);d.each(function(e,t){var n=qn(e).slice();if(n.length===1&&!R(n[0])&&n[0]<0){d.set(t,!1);return}var r=d.set(t,[]);J(n,function(e,n){var i=R(e)?l.get(e):e;i!=null&&i<o&&(r[n]=i,g(m(i),t,n))})});var h=0;J(n,function(e){var t,n,r,i;if(R(e))t=e,i={};else{i=e,t=i.name;var a=i.ordinalMeta;i.ordinalMeta=null,i=G({},i),i.ordinalMeta=a,n=i.dimsDef,r=i.otherDims,i.name=i.coordDim=i.coordDimIndex=i.dimsDef=i.otherDims=null}var s=d.get(t);if(s!==!1){if(s=qn(s),!s.length)for(var l=0;l<(n&&n.length||1);l++){for(;h<o&&m(h).coordDim!=null;)h++;h<o&&s.push(h++)}J(s,function(e,a){var o=m(e);if(c&&i.type!=null&&(o.type=i.type),g(ai(o,i),t,a),o.name==null&&n){var s=n[a];!A(s)&&(s={name:s}),o.name=o.displayName=s.name,o.defaultTooltip=s.defaultTooltip}r&&ai(o.otherDims,r)})}});function g(e,t,n){ga.get(t)==null?(e.coordDim=t,e.coordDimIndex=n,i.set(t,!0)):e.otherDims[t]=n}var _=t.generateCoord,v=t.generateCoordCount,y=v!=null;v=_?v||1:0;var b=_||`value`;function x(e){e.name??=e.coordDim}if(s)J(a,function(e){x(e)}),a.sort(function(e,t){return e.storeDimIndex-t.storeDimIndex});else for(var S=0;S<o;S++){var C=m(S);C.coordDim??(C.coordDim=wo(b,i,y),C.coordDimIndex=0,(!_||v<=0)&&(C.isExtraCoord=!0),v--),x(C),C.type==null&&(bi(e,S)===zn.Must||C.isExtraCoord&&(C.otherDims.itemName!=null||C.otherDims.seriesName!=null))&&(C.type=`ordinal`)}return Ci(a,function(e){return e.name},function(e,t){t>0&&(e.name+=t-1)}),new to({source:e,dimensions:a,fullDimensionCount:o,dimensionOmitted:s})}function Co(e,t,n,r){var i=Math.max(e.dimensionsDetectedCount||1,t.length,n.length,r||0);return J(t,function(e){var t;A(e)&&(t=e.dimsDef)&&(i=Math.max(i,t.length))}),i}function wo(e,t,n){if(n||t.hasKey(e)){for(var r=0;t.hasKey(e+r);)r++;e+=r}return t.set(e,!0),e}var To=function(){function e(e){this.coordSysDims=[],this.axisMap=q(),this.categoryAxisMap=q(),this.coordSysName=e}return e}();function Eo(e){var t=e.get(`coordinateSystem`),n=new To(t),r=Do[t];if(r)return r(e,n,n.axisMap,n.categoryAxisMap),n}var Do={cartesian2d:function(e,t,n,r){var i=e.getReferringComponents(`xAxis`,Jt).models[0],a=e.getReferringComponents(`yAxis`,Jt).models[0];t.coordSysDims=[`x`,`y`],n.set(`x`,i),n.set(`y`,a),Oo(i)&&(r.set(`x`,i),t.firstCategoryDimIndex=0),Oo(a)&&(r.set(`y`,a),t.firstCategoryDimIndex??=1)},singleAxis:function(e,t,n,r){var i=e.getReferringComponents(`singleAxis`,Jt).models[0];t.coordSysDims=[`single`],n.set(`single`,i),Oo(i)&&(r.set(`single`,i),t.firstCategoryDimIndex=0)},polar:function(e,t,n,r){var i=e.getReferringComponents(`polar`,Jt).models[0],a=i.findAxisModel(`radiusAxis`),o=i.findAxisModel(`angleAxis`);t.coordSysDims=[`radius`,`angle`],n.set(`radius`,a),n.set(`angle`,o),Oo(a)&&(r.set(`radius`,a),t.firstCategoryDimIndex=0),Oo(o)&&(r.set(`angle`,o),t.firstCategoryDimIndex??=1)},geo:function(e,t,n,r){t.coordSysDims=[`lng`,`lat`]},parallel:function(e,t,n,r){var i=e.ecModel,a=i.getComponent(`parallel`,e.get(`parallelIndex`)),o=t.coordSysDims=a.dimensions.slice();J(a.parallelAxisIndex,function(e,a){var s=i.getComponent(`parallelAxis`,e),c=o[a];n.set(c,s),Oo(s)&&(r.set(c,s),t.firstCategoryDimIndex??=a)})},matrix:function(e,t,n,r){var i=e.getReferringComponents(`matrix`,Jt).models[0];t.coordSysDims=[`x`,`y`];var a=i.getDimensionModel(`x`),o=i.getDimensionModel(`y`);n.set(`x`,a),n.set(`y`,o),r.set(`x`,a),r.set(`y`,o)}};function Oo(e){return e.get(`type`)===`category`}function ko(e,t,n){n||={};var r=n.byIndex,i=n.stackedCoordDimension,a,o,s;Ao(t)?a=t:(o=t.schema,a=o.dimensions,s=t.store);var c=!!(e&&e.get(`stack`)),l,u,d,f,p=!0;function m(e){return e.type!==`ordinal`&&e.type!==`time`}if(J(a,function(e,t){R(e)&&(a[t]=e={name:e}),m(e)||(p=!1)}),J(a,function(e,t){c&&!e.isExtraCoord&&(!r&&!l&&e.ordinalMeta&&(l=e),!u&&m(e)&&(!p||e.coordDim!==`x`&&e.coordDim!==`angle`)&&(!i||i===e.coordDim)&&(u=e))}),u&&!r&&!l&&(r=!0),u){d=`__\0ecstackresult_`+e.id,f=`__\0ecstackedover_`+e.id,l&&(l.createInvertedIndices=!0);var h=u.coordDim,g=u.type,_=0;J(a,function(e){e.coordDim===h&&_++});var v={name:d,coordDim:h,coordDimIndex:_,type:g,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length},y={name:f,coordDim:f,coordDimIndex:_+1,type:g,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length+1};o?(s&&(v.storeDimIndex=s.ensureCalculationDimension(f,g),y.storeDimIndex=s.ensureCalculationDimension(d,g)),o.appendCalculationDimension(v),o.appendCalculationDimension(y)):(a.push(v),a.push(y))}return{stackedDimension:u&&u.name,stackedByDimension:l&&l.name,isStackedByIndex:r,stackedOverDimension:f,stackResultDimension:d}}function Ao(e){return!no(e.schema)}function jo(e,t){return!!t&&t===e.getCalculationInfo(`stackedDimension`)}function Mo(e,t){return jo(e,t)?e.getCalculationInfo(`stackResultDimension`):t}function No(e,t){var n=e.get(`coordinateSystem`),r=Wn.get(n),i;return t&&t.coordSysDims&&(i=u(t.coordSysDims,function(e){var n={name:e},r=t.axisMap.get(e);return r&&(n.type=Xa(r.get(`type`))),n})),i||=r&&(r.getDimensionsInfo?r.getDimensionsInfo():r.dimensions.slice())||[`x`,`y`],i}function Po(e,t,n){var r,i;return n&&J(e,function(e,a){var o=e.coordDim,s=n.categoryAxisMap.get(o);s&&(r??=a,e.ordinalMeta=s.getOrdinalMeta(),t&&(e.createInvertedIndices=!0)),e.otherDims.itemName!=null&&(i=!0)}),!i&&r!=null&&(e[r].otherDims.itemName=0),r}function Fo(e,t,n){n||={};var r=t.getSourceManager(),i,a=!1;e?(a=!0,i=Xi(e)):(i=r.getSource(),a=i.sourceFormat===Ca);var o=Eo(t),s=No(t,o),c=n.useEncodeDefaulter,l=V(c)?c:c?Q(Wi,s,t):null,u={coordDimensions:s,generateCoord:n.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:l,canOmitUnusedDimensions:!a},d=So(i,u),f=Po(d.dimensions,n.createInvertedIndices,o),p=a?null:r.getSharedDataStore(d),m=ko(t,{schema:d,store:p}),h=new xo(d,t);h.setCalculationInfo(m);var g=f!=null&&Io(i)?function(e,t,n,r){return r===f?n:this.defaultDimValueGetter(e,t,n,r)}:null;return h.hasItemOption=!1,h.initData(a?i:p,null,g),h}function Io(e){if(e.sourceFormat===`original`)return!B(Tn(Lo(e.data||[])))}function Lo(e){for(var t=0;t<e.length&&e[t]==null;)t++;return e[t]}var Ro=function(){function e(){}return e.prototype.isBlank=function(){return this._isBlank},e.prototype.setBlank=function(e){this._isBlank=e},e}();en(Ro);var zo=0,Bo=function(){function e(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++zo,this._onCollect=e.onCollect}return e.createByAxisModel=function(t){var n=t.option,r=n.data,i=r&&u(r,Vo);return new e({categories:i,needCollect:!i,deduplication:n.dedplication!==!1})},e.prototype.getOrdinal=function(e){return this._getOrCreateMap().get(e)},e.prototype.parseAndCollect=function(e){var t,n=this._needCollect;if(!R(e)&&!n)return e;if(n&&!this._deduplication)return t=this.categories.length,this.categories[t]=e,this._onCollect&&this._onCollect(e,t),t;var r=this._getOrCreateMap();return t=r.get(e),t??(n?(t=this.categories.length,this.categories[t]=e,r.set(e,t),this._onCollect&&this._onCollect(e,t)):t=NaN),t},e.prototype._getOrCreateMap=function(){return this._map||=q(this.categories)},e}();function Vo(e){return A(e)&&e.value!=null?e.value:e+``}var Ho=qr({needTransform:1,normalize:1,scale:1,transformIn:1,transformOut:1,contain:1,getExtent:1,getExtentUnsafe:1,setExtent:1,setExtent2:1,getFilter:1,sanitize:1,getDefaultStartValue:1,freeze:1});function Uo(e,t,n){var r;e||={};var i=$r();if(i){var a=i.createBreakScaleMapper(t,n);a.hasBreaks()&&(J(Ho,function(t){a[t]&&(e[t]=X(a[t],a))}),r=a)}return r??Xo(e,n),{brk:r,mapper:e}}function Wo(e,t){J(Ho,function(n){e[n]=t[n]})}function Go(e,t){e.freeze=yt}function Ko(e){return e.getExtentUnsafe(0,2)}function qo(e,t){return e.getExtentUnsafe(1,t)||e.getExtentUnsafe(0,t)}function Jo(e){var t=qo(e,3);return t[1]-t[0]}function Yo(e){var t=e.getExtentUnsafe(0,3);return t[1]-t[0]}function Xo(e,t){var n=e||{},r=[];return n._extents=r,r[0]=t?t.slice():or(),G(n,Zo),n}var Zo={needTransform:function(){return!1},normalize:function(e){var t=this._extents[1]||this._extents[0];return t[1]===t[0]?.5:(e-t[0])/(t[1]-t[0])},scale:function(e){var t=this._extents[1]||this._extents[0];return e*(t[1]-t[0])+t[0]},transformIn:function(e){return e},transformOut:function(e){return e},contain:function(e){var t=qo(this,null);return e>=t[0]&&e<=t[1]},getExtent:function(){return this._extents[0].slice()},getExtentUnsafe:function(e){return this._extents[e]},setExtent:function(e,t){Qo(this._extents,0,e,t)},setExtent2:function(e,t,n){var r=this._extents;r[e]||(r[e]=r[0].slice()),Qo(r,e,t,n)},freeze:function(){}};function Qo(e,t,n,r){Mr(n,r)&&(e[t][0]=n,e[t][1]=r)}function $o(e){return es(e)||ns(e)}function es(e){return e.type===`interval`}function ts(e){return e.type===`time`}function ns(e){return e.type===`log`}function rs(e){return e.type===`ordinal`}function is(e){var t=pe(e),n=We(10,t),r=At(e/n);return r?r===2?r=3:r===3?r=5:r*=2:r=1,I(r*n,-t)}function as(e){return F(e)+2}function os(e,t){return it(e)/it(t)}function ss(e,t,n){var r=n&&n.lookup;if(r){for(var i=0;i<r.from.length;i++)if(e===r.from[i])return r.to[i]}return We(t,e)}function cs(e,t,n){var r=e.slice();if(r[0]===r[1]){var i=n&&n.ctnShp;if(r[0]!==0){var a=c(r[0]);t[1]||(r[1]+=a/2),r[0]-=a/2}else i&&(r[0]=-1),r[1]=1}return(!Fn(r[0])||!Fn(r[1]))&&(r[0]=0,r[1]=1),r[1]<r[0]&&r.reverse(),r}function ls(e,t){return[e[0]!==t[0],e[1]!==t[1]]}function us(e,t){return e||=t,At(_t(e,1))}function ds(e,t,n){var r=Ko(e),i=r[0],a=e.count(),o=Math.max((t||0)+1,1);i!==0&&o>1&&a/o>2&&(i=Math.round(Math.ceil(i/o)*o)),i!==r[0]&&c(r[0],!0,!0);for(var s=i;s<=r[1];s+=o)c(s,!1,s===r[0]||s===r[1]);s-o!==r[1]&&c(r[1],!0,!0);function c(e,t,r){n({value:e,offInterval:t},r)}}var fs=function(e){L(t,e);function t(n){var r=e.call(this)||this;r.type=`ordinal`,r.parse=t.parse,Wo(r,t.decoratedMethods);var i=n.ordinalMeta;i||=new Bo({}),B(i)&&(i=new Bo({categories:u(i,function(e){return A(e)?e.value:e})})),r._ordinalMeta=i;var a=Uo(null,null,n.extent||[0,i.categories.length-1]);return r._mapper=a.mapper,Go(r,a.mapper),r}return t.parse=function(e){return e==null?e=NaN:R(e)?(e=this._ordinalMeta.getOrdinal(e),e??=NaN):e=At(e),e},t.prototype.getTicks=function(){var e=[];return ds(this,0,function(t){e.push(t)}),e},t.prototype.getMinorTicks=function(e){},t.prototype.setSortInfo=function(e){if(e==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var t=e.ordinalNumbers,n=this._ordinalNumbersByTick=[],r=this._ticksByOrdinalNumber=[],i=0,a=this._ordinalMeta.categories.length,o=oe(a,t.length);i<o;++i){var s=n[i]=t[i];r[s]=i}for(var c=0;i<a;++i){for(;r[c]!=null;)c++;n[i]=c,r[c]=i}},t.prototype._getTickNumber=function(e){var t=this._ticksByOrdinalNumber;return t&&e>=0&&e<t.length?t[e]:e},t.prototype.getRawOrdinalNumber=function(e){var t=this._ordinalNumbersByTick;return t&&e>=0&&e<t.length?t[e]:e},t.prototype.getLabel=function(e){if(!this.isBlank()){var t=this.getRawOrdinalNumber(e.value),n=this._ordinalMeta.categories[t];return n==null?``:n+``}},t.prototype.count=function(){var e=Ko(this._mapper);return e[1]-e[0]+1},t.prototype.getOrdinalMeta=function(){return this._ordinalMeta},t.type=`ordinal`,t.decoratedMethods={needTransform:function(){return this._mapper.needTransform()},contain:function(e){return this._mapper.contain(this._getTickNumber(e))&&e>=0&&e<this._ordinalMeta.categories.length},normalize:function(e){return this._mapper.normalize(this._getTickNumber(e))},scale:function(e){return this.getRawOrdinalNumber(At(this._mapper.scale(e)))},transformIn:function(e,t){return this._mapper.transformIn(this._getTickNumber(e),t)},transformOut:function(e,t){return this.getRawOrdinalNumber(this._mapper.transformOut(e,t))},getExtent:function(){return this._mapper.getExtent()},getExtentUnsafe:function(e,t){return this._mapper.getExtentUnsafe(e,t)},setExtent:function(e,t){return this._mapper.setExtent(e,t)},setExtent2:function(e,t,n){return this._mapper.setExtent2(e,t,n)}},t}(Ro);Ro.registerClass(fs);function ps(e,t,n,r){for(var i=e.getTicks({expandToNicedExtent:!0}),a=[],o=e.getExtent(),s=1;s<i.length;s++){var c=i[s],l=i[s-1];if(!(l.break||c.break)){for(var u=0,d=[],f=(c.value-l.value)/t,p=as(f);u<t-1;){var m=I(l.value+(u+1)*f,p);m>o[0]&&m<o[1]&&d.push(m),u++}var h=$r();h&&h.pruneTicksByBreak(`auto`,d,n,function(e){return e},r,o),a.push(d)}}return a}var ms=function(e){L(t,e);function t(n){var r=e.call(this)||this;return r.type=`interval`,r.parse=t.parse,n||={},r.brk=Uo(r,tr(r,n),null).brk,r._cfg={interval:0,intervalPrecision:2,intervalCount:void 0,niceExtent:void 0},r}return t.parse=function(e){return e==null||e===``?NaN:Number(e)},t.prototype.getConfig=function(){return ta(this._cfg)},t.prototype.setConfig=function(e){var t=Ko(this);this._cfg=e=ta(e),e.niceExtent??=t.slice(),e.intervalPrecision??=as(e.interval)},t.prototype.getTicks=function(e){e||={};var t=this._cfg,n=t.interval,r=Ko(this),i=t.niceExtent,a=t.intervalPrecision,o=$r(),s=this.brk,c=o&&s,l=[];if(!n)return l;if(e.breakTicks===`only_break`&&c)return o.addBreaksToTicks(l,s.breaks,r),l;var u=3e3;r[0]<i[0]&&l.push({value:e.expandToNicedExtent?I(i[0]-n,a):r[0]});for(var d=function(e,t){return At((t-e)/n)},f=t.intervalCount,p=i[0],m=0;;m++){if(f==null){if(p>i[1]||!isFinite(p)||!isFinite(i[1]))break}else{if(m>f)break;p=oe(p,i[1]),m===f&&(p=i[1])}if(l.push({value:p}),p=I(p+n,a),s){var h=s.calcNiceTickMultiple(p,d);h>=0&&(p=I(p+h*n,a))}if(l.length>0&&p===l[l.length-1].value)break;if(l.length>u)return[]}var g=l.length?l[l.length-1].value:i[1];return r[1]>g&&l.push({value:e.expandToNicedExtent?I(g+n,a):r[1]}),c&&o.pruneTicksByBreak(e.pruneByBreak,l,s.breaks,function(e){return e.value},t.interval,r),c&&e.breakTicks!==`none`&&o.addBreaksToTicks(l,s.breaks,r),l},t.prototype.getMinorTicks=function(e){return ps(this,e,Jn(this),this._cfg.interval)},t.prototype.getLabel=function(e,t){if(e==null)return``;var n=t&&t.precision;return n==null?n=F(e.value)||0:n===`auto`&&(n=this._cfg.intervalPrecision),Ut(I(e.value,n,!0))},t.type=`interval`,t}(Ro);Ro.registerClass(ms);var hs=function(e,t,n,r){for(;n<r;){var i=n+r>>>1;e[i][1]<t?n=i+1:r=i}return n},gs=function(e){L(t,e);function t(n){var r=e.call(this)||this;return r.type=`time`,r.parse=t.parse,r._locale=n.locale,r._useUTC=n.useUTC,r._interval=0,r.brk=Uo(r,tr(r,n),null).brk,r}return t.prototype.getLabel=function(e){return Ra(e.value,y[Yt(ln(this._minLevelUnit))]||y.second,this._useUTC,this._locale)},t.prototype.getFormattedLabel=function(e,t,n){return xn(e,t,n,this._locale,this._useUTC)},t.prototype.getTicks=function(e){e||={};var t=this._interval,n=Ko(this),r=$r(),i=this.brk,a=r&&i,o=[];if(!t)return o;var s=this._useUTC;if(a&&e.breakTicks===`only_break`)return $r().addBreaksToTicks(o,i.breaks,n),o;o=Es(this._minLevelUnit,this._approxInterval,s,n,Yo(this),i);var c=Fi.length-1,l=0;return J(o,function(e){e.time&&(c=Math.min(c,Sa(Fi,e.time.upperTimeUnit)),l=Math.max(l,e.time.level))}),a&&$r().pruneTicksByBreak(e.pruneByBreak,o,i.breaks,function(e){return e.value},this._approxInterval,n),a&&e.breakTicks!==`none`&&$r().addBreaksToTicks(o,i.breaks,n,function(e){for(var t=Math.max(Sa(Fi,_e(e.vmin,s)),Sa(Fi,_e(e.vmax,s))),n=0,r=0;r<Fi.length;r++)if(!vs(Fi[r],e.vmin,e.vmax,s)){n=r;break}var i=Math.min(n,c);return{level:l,lowerTimeUnit:Fi[Math.max(i,t)],upperTimeUnit:Fi[i]}}),o},t.prototype.getMinorTicks=function(e){return ps(this,e,Jn(this),this._interval)},t.prototype.setTimeInterval=function(e){this._interval=e.interval,this._approxInterval=e.approxInterval,this._minLevelUnit=e.minLevelUnit},t.parse=function(e){return te(e)?Math.round(e):+h(e)},t.type=`time`,t}(Ro),_s=[[`second`,ue],[`minute`,xt],[`hour`,ct],[`quarter-day`,ct*6],[`half-day`,ct*12],[`day`,tt*1.2],[`half-week`,tt*3.5],[`week`,tt*7],[`month`,tt*31],[`quarter`,tt*95],[`half-year`,Ae/2],[`year`,Ae]];function vs(e,t,n,r){return Nr(new Date(t),e,r).getTime()===Nr(new Date(n),e,r).getTime()}function ys(e,t){return e/=tt,e>16?16:e>7.5?7:e>3.5?4:e>1.5?2:1}function bs(e){var t=30*tt;return e/=t,e>6?6:e>3?3:e>2?2:1}function xs(e){return e/=ct,e>12?12:e>6?6:e>3.5?4:e>2?2:1}function Ss(e,t){return e/=t?xt:ue,e>30?30:e>20?20:e>15?15:e>10?10:e>5?5:e>2?2:1}function Cs(e){return _t(Pa(e,!0),1)}function ws(e,t,n){var r=Math.max(0,Sa(Fi,t)-1);return Nr(new Date(e),Fi[r],n).getTime()}function Ts(e,t){var n=new Date(0);n[e](1);var r=n.getTime();n[e](1+t);var i=n.getTime()-r;return function(e,t){return Math.max(0,Math.round((t-e)/i))}}function Es(e,t,n,r,i,o){var s=3e3,c=Vi,l=0;function d(e,t,n,i,a,c,u){for(var d=Ts(a,e),f=t,p=new Date(f);f<n&&f<=r[1]&&(u.push({value:f}),!(l++>s));)if(p[a](p[i]()+e),f=p.getTime(),o){var m=o.calcNiceTickMultiple(f,d);m>0&&(p[a](p[i]()+m*e),f=p.getTime())}u.push({value:f,notAdd:f>r[1]})}function f(e,i,o){var s=[],c=!i.length;if(!vs(ln(e),r[0],r[1],n)){c&&(i=[{value:ws(r[0],e,n)},{value:r[1]}]);for(var l=0;l<i.length-1;l++){var u=i[l].value,f=i[l+1].value;if(u!==f){var p=void 0,m=void 0,h=void 0,g=!1;switch(e){case`year`:p=Math.max(1,Math.round(t/tt/365)),m=tn(n),h=Ce(n);break;case`half-year`:case`quarter`:case`month`:p=bs(t),m=sr(n),h=qi(n);break;case`week`:case`half-week`:case`day`:p=ys(t,31),m=Je(n),h=Nt(n),g=!0;break;case`half-day`:case`quarter-day`:case`hour`:p=xs(t),m=Ve(n),h=Mi(n);break;case`minute`:p=Ss(t,!0),m=Dt(n),h=a(n);break;case`second`:p=Ss(t,!1),m=In(n),h=_i(n);break;case`millisecond`:p=Cs(t),m=hn(n),h=En(n);break}f>=r[0]&&u<=r[1]&&d(p,u,f,m,h,g,s),e===`year`&&o.length>1&&l===0&&o.unshift({value:o[0].value-p})}}for(var l=0;l<s.length;l++)o.push(s[l])}}for(var p=[],m=[],h=0,g=0,_=0;_<c.length;++_){var v=ln(c[_]);if(Fe(c[_])&&(f(c[_],p[p.length-1]||[],m),v!==(c[_+1]?ln(c[_+1]):null))){if(m.length){g=h,m.sort(function(e,t){return e.value-t.value});for(var y=[],b=0;b<m.length;++b){var x=m[b].value;(b===0||m[b-1].value!==x)&&(y.push(m[b]),x>=r[0]&&x<=r[1]&&h++)}var S=i/t;if(h>S*1.5&&g>S/1.5||(p.push(y),h>S||e===c[_]))break}m=[]}}for(var C=ca(u(p,function(e){return ca(e,function(e){return e.value>=r[0]&&e.value<=r[1]&&!e.notAdd})}),function(e){return e.length>0}),w=C.length-1,T=[],_=0;_<C.length;++_)for(var E=C[_],D=0;D<E.length;++D){var O=_e(E[D].value,n);T.push({value:E[D].value,time:{level:w-_,upperTimeUnit:O,lowerTimeUnit:O}})}Ci(T,Er,null),T.sort(function(e,t){return e.value-t.value});var k=T[0],A=T[T.length-1],j=_e(r[0],n),M=_e(r[1],n);return(!k||k.value>r[0])&&T.unshift({value:r[0],time:{level:0,upperTimeUnit:j,lowerTimeUnit:j},notNice:!0}),(!A||A.value<r[1])&&T.push({value:r[1],time:{level:0,upperTimeUnit:M,lowerTimeUnit:M},notNice:!0}),T}var Ds=function(e,t){var n=e.getExtent();if(n[0]===n[1]&&(n[0]-=tt,n[1]+=tt),n[1]===-1/0&&n[0]===1/0){var r=new Date;n[1]=+new Date(r.getFullYear(),r.getMonth(),r.getDate()),n[0]=n[1]-tt}e.setExtent(n[0],n[1]);var i=us(t.splitNumber,10),a=Yo(e)/i,o=t.minInterval,s=t.maxInterval;o!=null&&a<o&&(a=o),s!=null&&a>s&&(a=s);var c=_s.length,l=Math.min(hs(_s,a,0,c),c-1),u=_s[l][1],d=_s[Math.max(l-1,0)][0];e.setTimeInterval({approxInterval:a,interval:u,minLevelUnit:d})};Ro.registerClass(gs);var Os=0,ks=1,As=2,js=function(e){L(t,e);function t(n){var r=e.call(this)||this;r.type=`log`,r.parse=ms.parse,r.base=n.logBase||10;var i=[],a=[],o=r._lookup={from:i,to:a};i[Os]=i[ks]=a[Os]=a[ks]=NaN,Wo(r,t.mapperMethods);var s=$r(),c=n.breakOption,l={lookup:o};return s&&s.parseAxisBreakOptionInwardTransform(c,r,{noNegative:!0},As,l),r.powStub=new ms({breakParsed:l.original}),r.intervalStub=new ms({breakParsed:l.transformed}),Go(r,r.intervalStub),r}return t.prototype.getTicks=function(e){var t=this.base,n=this.powStub,r=$r(),i=this.intervalStub,a={lookup:{from:i.getExtent(),to:n.getExtent()}};return u(i.getTicks(e||{}),function(e){var i=e.value,o=ss(i,t,a),s;if(r){var c=r.getTicksBreakOutwardTransform(this,e,Jn(n),this._lookup);c&&(s=c.vBreak,o=c.tickVal)}return{value:o,break:s}},this)},t.prototype.getMinorTicks=function(e){return ps(this,e,Jn(this.powStub),this.intervalStub.getConfig().interval)},t.prototype.getLabel=function(e,t){return this.intervalStub.getLabel(e,t)},t.type=`log`,t.mapperMethods={needTransform:function(){return!0},normalize:function(e){return this.intervalStub.normalize(os(e,this.base))},scale:function(e){return ss(this.intervalStub.scale(e),this.base,null)},transformIn:function(e,t){return e=os(e,this.base),t&&t.depth===2?e:this.intervalStub.transformIn(e,t)},transformOut:function(e,t){var n=t?t.depth:null;return Ms.depth=n,Ns.lookup=this._lookup,ss(n===2?e:this.intervalStub.transformOut(e,Ms),this.base,Ns)},contain:function(e){return this.powStub.contain(e)},setExtent:function(e,t){this.setExtent2(0,e,t)},setExtent2:function(e,t,n){if(!(!Mr(t,n)||t<=0||n<=0)){var r=Ps,i=Ps;if(e===0){var a=this._lookup;r=a.to,i=a.from}this.powStub.setExtent2(e,r[Os]=t,r[ks]=n);var o=this.base;this.intervalStub.setExtent2(e,i[Os]=os(t,o),i[ks]=os(n,o))}},getFilter:function(){return{g:0}},sanitize:function(e,t){return Mr(t[0],t[1])&&O(e)&&e<=0&&(e=t[0]),e},getDefaultStartValue:function(){return 1},getExtent:function(){return this.powStub.getExtent()},getExtentUnsafe:function(e,t){return t===null?this.powStub.getExtentUnsafe(e,null):this.intervalStub.getExtentUnsafe(e,t)}},t}(Ro);Ro.registerClass(js);var Ms={},Ns={},Ps=[],Fs={value:1,category:1,time:1,log:1},Is=$();function Ls(e){var t=e.get(`type`);return(t==null||!K(Fs,t)&&!Ro.getClass(t))&&(t=`value`),t}function Rs(e,t,n){var r=$r(),i;switch(r&&(i=Ys(e,t,n)),t){case`category`:return new fs({ordinalMeta:e.getOrdinalMeta?e.getOrdinalMeta():e.getCategories(),extent:or()});case`time`:return new gs({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get(`useUTC`),breakOption:i});case`log`:return new js({logBase:e.get(`logBase`),breakOption:i});case`value`:return new ms({breakOption:i});default:return new((Ro.getClass(t))||ms)({})}}function zs(e,t,n){var r=n?qo(e,null):e.getExtentUnsafe(0,null),i=r[0],a=r[1];return Mr(i,a)?i===t||a===t?2:i<t&&a>t?1:3:3}function Bs(e){Is(e).noOnMyZero=!0}function Vs(e){return Is(e).noOnMyZero}function Hs(e){var t=e.getLabelModel().get(`formatter`);if(e.type===`time`){var n=ui(t);return function(t,r){return e.scale.getFormattedLabel(t,r,n)}}else if(R(t))return function(n){var r=e.scale.getLabel(n);return t.replace(`{value}`,r??``)};else if(V(t)){if(e.type===`category`)return function(n,r){return t(Us(e,n),n.value-e.scale.getExtent()[0],null)};var r=$r();return function(n,i){var a=null;return r&&(a=r.makeAxisLabelFormatterParamBreak(a,n.break)),t(Us(e,n),i,a)}}else return function(t){return e.scale.getLabel(t)}}function Us(e,t){var n=e.scale;return rs(n)?n.getLabel(t):t.value}function Ws(e){return e.get(`interval`)??`auto`}function Gs(e){return e.type===`category`&&Ws(e.getLabelModel())===0}function Ks(e,t){var n={};return J(e.mapDimensionsAll(t),function(t){n[Mo(e,t)]=!0}),qr(n)}function qs(e){return e===`middle`||e===`center`}function Js(e){return e.getShallow(`show`)}function Ys(e,t,n){var r=e.get(`breaks`,!0);if(r!=null)return!$r()||!n||!Xs(t)?void 0:r}function Xs(e){return e!==`category`}function Zs(e,t,n,r,i,a){var o=ns(e),s=o?e.intervalStub:e;if(s.setExtent(r[0],r[1]),o){var c=e.powStub,l={depth:2},u=e.transformOut(r[0],l),d=e.transformOut(r[1],l),f=ls(n,r);t[0]&&!f[0]&&(u=i[0]),t[1]&&!f[1]&&(d=i[1]),c.setExtent(u,d)}s.setConfig(a)}function Qs(e,t){return rs(e)?e.getRawOrdinalNumber(t.value):t.value}function $s(e,t){return rs(e)&&!!t.get(`boundaryGap`)}var ec=function(){function e(){}return e.prototype.needIncludeZero=function(){return!this.option.scale},e.prototype.getCoordSysModel=function(){},e}(),tc=gi(),nc=$(),rc=$();function ic(e,t){var n=e.model,r=nc(zt(n.ecModel)).keyed,i=r&&r.get(t);return i&&i.get(n.uid)}function ac(e,t){return cc(ic(e,t))}function oc(e,t){var n=[];return sc(e.model.ecModel,function(e){for(var r=0;r<t.length;r++)t[r]&&e.serByIdx[t[r].seriesIndex]&&n.push(cc(e))}),n}function sc(e,t){var n=nc(zt(e)).keyed;n&&n.each(function(e,n){e.each(function(e,r){t(e,n,r)})})}function cc(e){return{liPosMinGap:e?e.liPosMinGap:void 0}}function lc(e,t){var n=e.model.ecModel,r=nc(zt(n)).axSer;r&&dc(n,r.get(e.model.uid),t)}function uc(e,t,n){var r=ic(e,t);r&&dc(e.model.ecModel,r.sers,n)}function dc(e,t,n){if(t)for(var r=0;r<t.length;r++){var i=t[r];e.isSeriesFiltered(i)||n(i)}}function fc(e,t){var n=ic(e,t);if(!n||!n.sers.length)return 0;var r=0;return dc(e.model.ecModel,n.sers,function(){r++}),r}function pc(e,t,n){var r=nc(zt(e)).keyed,i=r&&r.get(t);i&&i.each(function(e){n(e.axis)})}function mc(e,t){var n=e.model,r=nc(zt(n.ecModel)).keys;r&&J(r.get(n.uid),function(e){t(e)})}function hc(e){var t=rc(N(e)),n=t.keyed||=q();sc(e,function(t,r,i){var a=n.get(r)||n.set(r,q()),o=a.get(i)||a.set(i,{});t.metrics.liPosMinGap&&_c.liPosMinGap(e,t,o)})}function gc(e,t){_c[e]=t}var _c={};function vc(e,t,n){if(e){var r=t.ecModel,i=nc(zt(r)),a=e.model.uid,o=i.axSer||=q();(o.get(a)||o.set(a,[])).push(t);var s=t.subType,c=t.getBaseAxis()===e,l=xc.get(yc(s,c,n))||xc.get(yc(s,c,null));if(l){var u=i.keyed||=q(),d=i.keys||=q(),f=l.key,p=u.get(f)||u.set(f,q()),m=p.get(a);m||(m=p.set(a,{axis:e,sers:[],serByIdx:[]}),m.metrics=l.getMetrics(e),(d.get(a)||d.set(a,[])).push(f)),m.sers.push(t),m.serByIdx[t.seriesIndex]=t}}}function yc(e,t,n){return e+`|&`+z(t,!0)+`|&`+(n||``)}function bc(e,t){var n=yc(t.seriesType,t.baseAxis,t.coordSysType);xc.set(n,t),tc(e,function(){e.registerProcessor(e.PRIORITY.PROCESSOR.AXIS_STATISTICS,{overallReset:hc})})}var xc=q(),Sc=$(),Cc=3,wc=function(){function e(e,t,n,r,i){var a=rs(e),o=a?t.getCategories().length:null,s;if(a){var c=t.getCategories(!0);s=c&&!c.length}var l=n.slice();(es(e)||ns(e)||ts(e))&&(Da(l,Ec(e,t.get(`dataMin`,!0))),yr(l,Ec(e,t.get(`dataMax`,!0)))),mn(l)||(l[0]=l[1]=NaN);var u=[],d=[!1,!1],f=t.get(`min`,!0);f===`dataMin`?(u[0]=l[0],d[0]=!0):(u[0]=Ec(e,V(f)?f({min:l[0],max:l[1]}):f),d[0]=u[0]!=null);var p=t.get(`max`,!0);p===`dataMax`?(u[1]=l[1],d[1]=!0):(u[1]=Ec(e,V(p)?p({min:l[0],max:l[1]}):p),d[1]=u[1]!=null);var m=Dc(e,t),h=a?null:l[1]-l[0]||Math.abs(l[0]);u[0]??=a?s?l[0]:o?0:NaN:l[0]-m[0]*h,u[1]??=a?s?l[1]:o?o-1:NaN:l[1]+m[1]*h,!Fn(u[0])&&(u[0]=NaN),!Fn(u[1])&&(u[1]=NaN);var g=s||xr(u[0])||xr(u[1])||a&&!o,_=es(e),v=_&&t.needIncludeZero&&t.needIncludeZero();v&&(u[0]>0&&u[1]>0&&!d[0]&&(u[0]=0),u[0]<0&&u[1]<0&&!d[1]&&(u[1]=0));var y=!1;u[0]>u[1]&&(u.reverse(),y=!0);var b=Ec(e,t.get(`startValue`,!0)),x=b!=null;!O(b)&&r&&(b=e.getDefaultStartValue?e.getDefaultStartValue():0),O(b)&&(x||!_||v)&&(b<u[0]&&!d[0]?(u[0]=b,d[0]=!0):b>u[1]&&!d[1]&&(u[1]=b,d[1]=!0)),Tc(this._i={scale:e,dataMM:l,noZoomEffMM:u,zoomMM:[],fixMM:d,zoomFixMM:[!1,!1],startValue:b,isBlank:g,incl0:v,tggAxInv:y,ctnShp:i},u)}return e.prototype.makeNoZoom=function(){return this._i.noZoomEffMM.slice()},e.prototype.makeFinal=function(){var e=this._i,t=e.zoomMM,n=e.noZoomEffMM,r=e.zoomFixMM,i=e.fixMM,a={fixMM:i,zoomFixMM:r,isBlank:e.isBlank,incl0:e.incl0,tggAxInv:e.tggAxInv,ctnShp:e.ctnShp,effMM:n.slice()},o=a.effMM;return t[0]!=null&&(o[0]=t[0],i[0]=r[0]=!0),t[1]!=null&&(o[1]=t[1],i[1]=r[1]=!0),Tc(e,o),a},e.prototype.makeRenderInfo=function(){return{startValue:this._i.startValue}},e.prototype.setZoomMM=function(e,t){this._i.zoomMM[e]=t},e}();function Tc(e,t){var n=e.scale,r=e.dataMM;n.sanitize&&(t[0]=n.sanitize(t[0],r),t[1]=n.sanitize(t[1],r),bn(t))}function Ec(e,t){return t==null?null:xr(t)?NaN:e.parse(t)}function Dc(e,t){var n;if(rs(e))n=[0,0];else{var r=t.get(`boundaryGap`);typeof r==`boolean`&&(r=null),n=B(r)?r:[r,r]}return[Oc(n[0]),Oc(n[1])]}function Oc(e){return Gi(typeof e==`boolean`?0:e,1)||0}function kc(e){var t=Sc(e.scale);return t.extent||=or(),t}function Ac(e,t){kc(e).dimIdxInCoord=t.get(e.dim)}function jc(e,t){var n=e.scale,r=e.model,i=e.dim;n.rawExtentInfo||Mc(n,e,i,r,t)}function Mc(e,t,n,r,i){var a=kc(t),o=a.extent,s=!1;lc(t,function(r){if(r.boxCoordinateSystem){var i=wa(r).coord,c=a.dimIdxInCoord;if(c>=0&&B(i)){var l=i[c];l!=null&&!B(l)&&oa(o,e.parse(l))}}else if(r.coordinateSystem){var u=r.getData();if(u){var d=e.getFilter?e.getFilter():null;J(Ks(u,n),function(e){kn(o,u.getApproximateExtent(e,d))})}r.__requireStartValue&&r.__requireStartValue(t)&&(s=!0)}});var c=Rc(e,t,r);Pc(e,new wc(e,r,o,s,c),i),a.extent=null}function Nc(e,t){var n=e.scale;Pc(n,new wc(n,e.model,t,!1,!1),Cc)}function Pc(e,t,n){e.rawExtentInfo=t,t.from=n}function Fc(e,t){Ic.set(e,t)}var Ic=q();function Lc(e,t,n,r,i){e.rawExtentInfo||Nc({scale:e,model:t},i||or());var a=e.rawExtentInfo.makeFinal(),o=a.effMM;return e.setExtent(o[0],o[1]),e.setBlank(a.isBlank),r&&a.tggAxInv&&n&&!n.get(`legacyMinMaxDontInverseAxis`)&&(r.inverse=!r.inverse),a}function Rc(e,t,n){var r=$s(e,n),i=n.get(`containShape`,!0);if(i==null&&!r&&(i=!0),!i)return!1;var a=!1;return mc(t,function(e){a=!!Ic.get(e)||a}),a}function zc(e,t,n,r){if(n.ctnShp){var i;if(mc(e,function(t){var n=Ic.get(t);if(n){var a=n(e,r);a&&(i||=[0,0],Da(i,a[0]),yr(i,a[1]),Bs(e))}}),i){var a=t.getExtent();if(rs(t))e.onBand||t.setExtent2(1,oe(a[0],a[0]+i[0]),_t(a[1],a[1]+i[1]));else{var o=a.slice();n.zoomFixMM[0]||(o[0]=oe(o[0],t.transformOut(t.transformIn(o[0],null)+i[0],null))),n.zoomFixMM[1]||(o[1]=_t(o[1],t.transformOut(t.transformIn(o[1],null)+i[1],null))),(o[0]<a[0]||o[1]>a[1])&&t.setExtent2(1,o[0],o[1])}}}}function Bc(e,t){var n=ns(e),r=n?e.intervalStub:e,i=t.fixMinMax||[],a=n?e.getExtent():null,o=r.getExtent(),s=cs(o,i,t.rawExtentResult);r.setExtent(s[0],s[1]),s=r.getExtent();var c=n?Hc(r,t):Vc(r,t),l=c.intervalPrecision,u=c.interval,d=t.userInterval;d!=null&&(c.interval=d,c.intervalPrecision=as(d)),i[0]||(s[0]=I(Ze(s[0]/u)*u,l)),i[1]||(s[1]=I(zr(s[1]/u)*u,l)),d!=null&&(c.niceExtent=s.slice()),Zs(e,i,o,s,a,c)}function Vc(e,t){var n=us(t.splitNumber,5),r=Yo(e),i=t.minInterval,a=t.maxInterval,o=Pa(r/n,!0);i!=null&&o<i&&(o=i),a!=null&&o>a&&(o=a);var s=as(o),c=e.getExtent(),l=[I(zr(c[0]/o)*o,s),I(Ze(c[1]/o)*o,s)];return{interval:o,intervalPrecision:s,niceExtent:l}}function Hc(e,t){var n=us(t.splitNumber,10),r=e.getExtent(),i=Yo(e),a=_t(an(i),1);n/i*a<=.5&&(a*=10);var o=as(a),s=[I(zr(r[0]/a)*a,o),I(Ze(r[1]/a)*a,o)];return{intervalPrecision:o,interval:a,niceExtent:s}}function Uc(e){var t=e.scale,n=e.model,r=n.axis,i=n.ecModel;Wc(t,n,r,i,null)}function Wc(e,t,n,r,i){var a=Lc(e,t,r,n,i),o=es(e)||ts(e);Gc(e,{splitNumber:t.get(`splitNumber`),fixMinMax:a.fixMM,userInterval:t.get(`interval`),minInterval:o?t.get(`minInterval`):null,maxInterval:o?t.get(`maxInterval`):null,rawExtentResult:a}),n&&r&&zc(n,e,a,r)}function Gc(e,t){Kc[e.type](e,t)}var Kc={interval:Bc,log:Bc,time:Ds,ordinal:yt},qc=[],Jc={registerPreprocessor:dr,registerProcessor:xi,registerPostInit:Zi,registerPostUpdate:Qn,registerUpdateLifecycle:_r,registerAction:Nn,registerCoordinateSystem:mi,registerLayout:zi,registerVisual:Dn,registerTransform:wr,registerLoading:Gn,registerMap:Xr,registerImpl:Wr,PRIORITY:Ar,ComponentModel:ra,ComponentView:p,SeriesModel:Xt,ChartView:Ot,registerComponentModel:function(e){ra.registerClass(e)},registerComponentView:function(e){p.registerClass(e)},registerSeriesModel:function(e){Xt.registerClass(e)},registerChartView:function(e){Ot.registerClass(e)},registerCustomSeries:function(e,t){lt(e,t)},registerSubTypeDefaulter:function(e,t){ra.registerSubTypeDefaulter(e,t)},registerPainter:function(e,t){fn(e,t)}};function Yc(e){if(B(e)){J(e,function(e){Yc(e)});return}Sa(qc,e)>=0||(qc.push(e),V(e)&&(e={install:e}),e.install(Jc))}var Xc=$(),Zc=$(),Qc={estimate:1,determine:2};function $c(e){return{out:{noPxChangeTryDetermine:[]},kind:e}}function el(e,t){var n=e.getLabelModel().get(`customValues`);if(n){var r=e.scale;return{labels:u(nl(n,r),function(t,n){return{formattedLabel:Hs(e)(t,n),rawLabel:r.getLabel(t),tick:t}})}}return e.type===`category`?rl(e,t):ol(e)}function tl(e,t,n){var r=e.scale,i=e.getTickModel().get(`customValues`);return i?{ticks:nl(i,r)}:e.type===`category`?al(e,t):{ticks:r.getTicks(n)}}function nl(e,t){var n=t.getExtent(),r=[];return J(e,function(e){e=t.parse(e),e>=n[0]&&e<=n[1]&&r.push(e)}),Ci(r,ri,null),S(r),u(r,function(e){return{value:e}})}function rl(e,t){var n=e.getLabelModel(),r=il(e,n,t);return!n.get(`show`)||e.scale.isBlank()?{labels:[]}:r}function il(e,t,n){var r=cl(e),i=Ws(t),a=n.kind===Qc.estimate;if(!a){var o=ul(r,i);if(o)return o}var s,c;V(i)?s=_l(e,i,!1):(c=i===`auto`?fl(e,n):i,s=_l(e,c,!1));var l={labels:s,labelCategoryInterval:c};return a?n.out.noPxChangeTryDetermine.push(function(){return dl(r,i,l),!0}):dl(r,i,l),l}function al(e,t){var n=sl(e),r=Ws(t),i=ul(n,r);if(i)return i;var a,o;if((!t.get(`show`)||e.scale.isBlank())&&(a=[]),V(r))a=_l(e,r,!0);else if(r===`auto`){var s=il(e,e.getLabelModel(),$c(Qc.determine));o=s.labelCategoryInterval,a=u(s.labels,function(e){return e.tick})}else o=r,a=_l(e,o,!0);return dl(n,r,{ticks:a,tickCategoryInterval:o})}function ol(e){var t=e.scale.getTicks(),n=Hs(e);return{labels:u(t,function(t,r){return{formattedLabel:n(t,r),rawLabel:e.scale.getLabel(t),tick:t}})}}var sl=ll(`axisTick`),cl=ll(`axisLabel`);function ll(e){return function(t){return Zc(t)[e]||(Zc(t)[e]={list:[]})}}function ul(e,t){for(var n=0;n<e.list.length;n++)if(e.list[n].key===t)return e.list[n].value}function dl(e,t,n){return e.list.push({key:t,value:n}),n}function fl(e,t){if(t.kind===Qc.estimate){var n=e.calculateCategoryInterval(t);return t.out.noPxChangeTryDetermine.push(function(){return Zc(e).autoInterval=n,!0}),n}return Zc(e).autoInterval??(Zc(e).autoInterval=e.calculateCategoryInterval(t))}function pl(e,t){var r=t.kind,i=gl(e),a=Hs(e),o=(i.axisRotate-i.labelRotate)/180*Math.PI,s=e.scale,c=s.getExtent(),l=s.count();if(c[1]-c[0]<1)return 0;var u=1,d=40;l>d&&(u=Math.max(1,Math.floor(l/d)));for(var f=c[0],p=e.dataToCoord(f+1)-e.dataToCoord(f),m=Math.abs(p*Math.cos(o)),h=Math.abs(p*Math.sin(o)),g=0,_=0;f<=c[1];f+=u){var v=0,y=0,b=n(a({value:f}),i.font,`center`,`top`);v=b.width*1.3,y=b.height*1.3,g=Math.max(g,v,7),_=Math.max(_,y,7)}var x=g/m,S=_/h;isNaN(x)&&(x=1/0),isNaN(S)&&(S=1/0);var C=Math.max(0,Math.floor(Math.min(x,S)));return r===Qc.estimate?(t.out.noPxChangeTryDetermine.push(X(ml,null,e,C,l)),C):hl(e,C,l)??C}function ml(e,t,n){return hl(e,t,n)==null}function hl(e,t,n){var r=Xc(e.model),i=e.getExtent(),a=r.lastAutoInterval,o=r.lastTickCount;if(a!=null&&o!=null&&Math.abs(a-t)<=1&&Math.abs(o-n)<=1&&a>t&&r.axisExtent0===i[0]&&r.axisExtent1===i[1])return a;r.lastTickCount=n,r.lastAutoInterval=t,r.axisExtent0=i[0],r.axisExtent1=i[1]}function gl(e){var t=e.getLabelModel();return{axisRotate:e.getRotate?e.getRotate():e.isHorizontal&&!e.isHorizontal()?90:0,labelRotate:t.get(`rotate`)||0,font:t.getFont()}}function _l(e,t,n){var r=Hs(e),i=e.scale,a=[],o=V(t);return ds(i,o?0:t,function(e,s){var c=i.getLabel(e);if(o){var l=!!t(e.value,c);if(e.offInterval=!l,!l&&!s)return}a.push(n?e:{formattedLabel:r(e),rawLabel:c,tick:e})}),a}var vl=.8;function yl(e,t){t||={};var n={w:NaN,w2:NaN},r=e.scale,i=t.fromStat,a=t.min,o=Jo(r);O(o)||(o=NaN);var s=e.getExtent(),l=c(s[1]-s[0]);return rs(r)?bl(n,e,o,l):i&&xl(n,e,o,l,i),a!=null&&(n.w=O(n.w)?_t(a,n.w):a),n}function bl(e,t,n,r){var i=t.onBand,a=n+ +!!i;a===0&&(a=1),e.w=r/a,!i&&n&&r&&(e.w2=e.w*n/r)}function xl(e,t,n,r,i){var a=!1,o=-1/0;J(i.key?[ac(t,i.key)]:oc(t,i.sers||[]),function(e){var t=e.liPosMinGap;t!=null&&(t>0?(t>o&&(o=t),a=!1):t===-2&&(a=!0))}),O(n)&&n>0&&O(o)?(e.w=r/n*o,e.w2=o):a&&(e.w=r*vl,e.w2=e.w*n/r)}var Sl=[0,1],Cl=function(){function e(e,t,n){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=t,this._extent=n||[0,0]}return e.prototype.contain=function(e){var t=this._extent,n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]);return e>=n&&e<=r},e.prototype.containData=function(e){return this.scale.contain(this.scale.parse(e))},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.setExtent=function(e,t){var n=this._extent;n[0]=e,n[1]=t},e.prototype.dataToCoord=function(e,t){var n=this.scale;return e=n.normalize(n.parse(e)),Y(e,Sl,wl(this),t)},e.prototype.coordToData=function(e,t){var n=Y(e,wl(this),Sl,t);return this.scale.scale(n)},e.prototype.pointToData=function(e,t){},e.prototype.getTicksCoords=function(e){e||={};var t=e.tickModel||this.getTickModel(),n=u(tl(this,t,{breakTicks:e.breakTicks,pruneByBreak:e.pruneByBreak}).ticks,function(e){return{coord:this.dataToCoord(Qs(this.scale,e)),tick:e}},this),r=t.get(`alignWithLabel`),i=Tl(this,n,r);return u(n,function(e){return{coord:e.coord,tickValue:e.tick.value,onBand:i}})},e.prototype.getMinorTicksCoords=function(){if(rs(this.scale))return[];var e=this.model.getModel(`minorTick`).get(`splitNumber`);return e>0&&e<100||(e=5),u(this.scale.getMinorTicks(e),function(e){return u(e,function(e){return{coord:this.dataToCoord(e),tickValue:e}},this)},this)},e.prototype.getViewLabels=function(e){return e||=$c(Qc.determine),el(this,e).labels},e.prototype.getLabelModel=function(){return this.model.getModel(`axisLabel`)},e.prototype.getTickModel=function(){return this.model.getModel(`axisTick`)},e.prototype.getBandWidth=function(){return yl(this,{min:1}).w},e.prototype.calculateCategoryInterval=function(e){return e||=$c(Qc.determine),pl(this,e)},e}();function wl(e){var t=e.getExtent();if(e.onBand){var n=(t[1]-t[0])/e.scale.count()/2;t[0]+=n,t[1]-=n}return t}function Tl(e,t,n){var r=t.length;if(!e.onBand||n||!r)return!1;var i=yl(e).w;if(!i)return!1;J(t,function(e){e.coord-=i/2});var a=e.scale.getExtent(),o=t[r-1];return o.tick.offInterval&&t.pop(),t.push({coord:o.coord+i,tick:{value:a[1]+1}}),!0}Math.PI*2,ke.CMD;function El(e,t,n,r,i,a,o,s){var c=i-e,l=a-t,u=n-e,d=r-t,f=Math.sqrt(u*u+d*d);u/=f,d/=f;var p=(c*u+l*d)/f;s&&(p=Math.min(Math.max(p,0),1)),p*=f;var m=o[0]=e+p*u,h=o[1]=t+p*d;return Math.sqrt((m-i)*(m-i)+(h-a)*(h-a))}var Dl=new Zt,Ol=new Zt,kl=new Zt,Al=new Zt,jl=new Zt,Ml=[],Nl=new Zt;function Pl(e,t){if(t<=180&&t>0){t=t/180*Math.PI,Dl.fromArray(e[0]),Ol.fromArray(e[1]),kl.fromArray(e[2]),Zt.sub(Al,Dl,Ol),Zt.sub(jl,kl,Ol);var n=Al.len(),r=jl.len();if(!(n<.001||r<.001)){Al.scale(1/n),jl.scale(1/r);var i=Al.dot(jl);if(Math.cos(t)<i){var a=El(Ol.x,Ol.y,kl.x,kl.y,Dl.x,Dl.y,Ml,!1);Nl.fromArray(Ml),Nl.scaleAndAdd(jl,a/Math.tan(Math.PI-t));var o=kl.x===Ol.x?(Nl.y-Ol.y)/(kl.y-Ol.y):(Nl.x-Ol.x)/(kl.x-Ol.x);if(isNaN(o))return;o<0?Zt.copy(Nl,Ol):o>1&&Zt.copy(Nl,kl),Nl.toArray(e[1])}}}}function Fl(e,t,n){if(n<=180&&n>0){n=n/180*Math.PI,Dl.fromArray(e[0]),Ol.fromArray(e[1]),kl.fromArray(e[2]),Zt.sub(Al,Ol,Dl),Zt.sub(jl,kl,Ol);var r=Al.len(),i=jl.len();if(!(r<.001||i<.001)&&(Al.scale(1/r),jl.scale(1/i),Al.dot(t)<Math.cos(n))){var a=El(Ol.x,Ol.y,kl.x,kl.y,Dl.x,Dl.y,Ml,!1);Nl.fromArray(Ml);var o=Math.PI/2,s=o+Math.acos(jl.dot(t))-n;if(s>=o)Zt.copy(Nl,kl);else{Nl.scaleAndAdd(jl,a/Math.tan(Math.PI/2-s));var c=kl.x===Ol.x?(Nl.y-Ol.y)/(kl.y-Ol.y):(Nl.x-Ol.x)/(kl.x-Ol.x);if(isNaN(c))return;c<0?Zt.copy(Nl,Ol):c>1&&Zt.copy(Nl,kl)}Nl.toArray(e[1])}}}function Il(e,t,n,r){var i=n===`normal`,a=i?e:e.ensureState(n);a.ignore=t;var o=r.get(`smooth`);o=o===!0?.3:Math.max(+o,0)||0,a.shape=a.shape||{},a.shape.smooth=o;var s=r.getModel(`lineStyle`).getLineStyle();i?e.useStyle(s):a.style=s}function Ll(e,t){var n=t.smooth,r=t.points;if(r)if(e.moveTo(r[0][0],r[0][1]),n>0&&r.length>=3){var i=Pr(r[0],r[1]),a=Pr(r[1],r[2]);if(!i||!a){e.lineTo(r[1][0],r[1][1]),e.lineTo(r[2][0],r[2][1]);return}var o=Math.min(i,a)*n,s=Ln([],r[1],r[0],o/i),c=Ln([],r[1],r[2],o/a),l=Ln([],s,c,.5);e.bezierCurveTo(s[0],s[1],s[0],s[1],l[0],l[1]),e.bezierCurveTo(c[0],c[1],c[0],c[1],r[2][0],r[2][1])}else for(var u=1;u<r.length;u++)e.lineTo(r[u][0],r[u][1])}function Rl(e,t,n){var r=e.getTextGuideLine(),i=e.getTextContent();if(!i){r&&e.removeTextGuideLine();return}for(var a=t.normal,o=a.get(`show`),s=i.ignore,c=0;c<yi.length;c++){var l=yi[c],u=t[l],d=l===`normal`;if(u){var f=u.get(`show`);if((d?s:z(i.states[l]&&i.states[l].ignore,s))||!z(f,o)){var p=d?r:r&&r.states[l];p&&(p.ignore=!0),r&&Il(r,!0,l,u);continue}r||(r=new Yi,e.setTextGuideLine(r),!d&&(s||!o)&&Il(r,!0,`normal`,t.normal),e.stateProxy&&(r.stateProxy=e.stateProxy)),Il(r,!1,l,u)}}if(r){ai(r.style,n),r.style.fill=null;var m=a.get(`showAbove`),h=e.textGuideLineConfig=e.textGuideLineConfig||{};h.showAbove=m||!1,r.buildPath=Ll}}function zl(e,t){t||=`labelLine`;for(var n={normal:e.getModel(t)},r=0;r<Ui.length;r++){var i=Ui[r];n[i]=e.getModel([i,t])}return n}var Bl=[`label`,`labelLine`,`layoutOption`,`priority`,`defaultAttr`,`marginForce`,`minMarginForce`,`marginDefault`,`suggestIgnore`],Vl=1,Hl=2,Ul=Vl|Hl;function Wl(e,t,n){n||=Ul,t?e.dirty|=n:e.dirty&=~n}function Gl(e,t){return t||=Ul,e.dirty==null||!!(e.dirty&t)}function Kl(e){if(e)return Gl(e)&&ql(e,e.label,e),e}function ql(e,t,n){var r=t.getComputedTransform();e.transform=Kr(e.transform,r);var i=e.localRect=ft(e.localRect,t.getBoundingRect()),a=t.style,o=a.margin,s=n&&n.marginForce,c=n&&n.minMarginForce,u=n&&n.marginDefault,d=a.__marginType;d==null&&u&&(o=u,d=Dr.textMargin);for(var f=0;f<4;f++)Jl[f]=d===Dr.minMargin&&c&&c[f]!=null?c[f]:s&&s[f]!=null?s[f]:o?o[f]:0;d===Dr.textMargin&&l(i,Jl,!1,!1);var p=e.rect=ft(e.rect,i);return r&&p.applyTransform(r),d===Dr.minMargin&&l(p,Jl,!1,!1),e.axisAligned=se(r),(e.label=e.label||{}).ignore=t.ignore,Wl(e,!1),Wl(e,!0,Hl),e}var Jl=[0,0,0,0];function Yl(e,t,n){return e.transform=Kr(e.transform,n),e.localRect=ft(e.localRect,t),e.rect=ft(e.rect,t),n&&e.rect.applyTransform(n),e.axisAligned=se(n),e.obb=void 0,(e.label=e.label||{}).ignore=!1,e}function Xl(e,t){if(e){e.label.x+=t.x,e.label.y+=t.y,e.label.markRedraw();var n=e.transform;n&&(n[4]+=t.x,n[5]+=t.y);var r=e.rect;r&&(r.x+=t.x,r.y+=t.y);var i=e.obb;i&&i.fromBoundingRect(e.localRect,n)}}function Zl(e,t){for(var n=0;n<Bl.length;n++){var r=Bl[n];e[r]??(e[r]=t[r])}return Kl(e)}function Ql(e){var t=e.obb;return(!t||Gl(e,Hl))&&(e.obb=t||=new pn,t.fromBoundingRect(e.localRect,e.transform),Wl(e,!1,Hl)),t}function $l(e,t,n,r,i){var a=e.length,o=Ht[t],s=ma[t];if(a<2)return!1;e.sort(function(e,t){return e.rect[o]-t.rect[o]});for(var c=0,l,u=!1,d=0,f=0;f<a;f++){var p=e[f],m=p.rect;l=m[o]-c,l<0&&(m[o]-=l,p.label[o]-=l,u=!0);var h=Math.max(-l,0);d+=h,c=m[o]+m[s]}d>0&&i&&S(-d/a,0,a);var g=e[0],_=e[a-1],v,y;b(),v<0&&C(-v,.8),y<0&&C(y,.8),b(),x(v,y,1),x(y,v,-1),b(),v<0&&w(-v),y<0&&w(y);function b(){v=g.rect[o]-n,y=r-_.rect[o]-_.rect[s]}function x(e,t,n){if(e<0){var r=Math.min(t,-e);if(r>0){S(r*n,0,a);var i=r+e;i<0&&C(-i*n,1)}else C(-e*n,1)}}function S(t,n,r){t!==0&&(u=!0);for(var i=n;i<r;i++){var a=e[i],s=a.rect;s[o]+=t,a.label[o]+=t}}function C(t,n){for(var r=[],i=0,c=1;c<a;c++){var l=e[c-1].rect,u=Math.max(e[c].rect[o]-l[o]-l[s],0);r.push(u),i+=u}if(i){var d=Math.min(Math.abs(t)/i,n);if(t>0)for(var c=0;c<a-1;c++){var f=r[c]*d;S(f,0,c+1)}else for(var c=a-1;c>0;c--){var f=r[c-1]*d;S(-f,c,a)}}}function w(e){var t=e<0?-1:1;e=Math.abs(e);for(var n=Math.ceil(e/(a-1)),r=0;r<a-1;r++)if(t>0?S(n,0,r+1):S(-n,a-r-1,a),e-=n,e<=0)return}return u}function eu(e){var t=[];e.sort(function(e,t){return!!t.suggestIgnore-+!!e.suggestIgnore||t.priority-e.priority});function n(e){if(!e.ignore){var t=e.ensureState(`emphasis`);t.ignore??=!1}e.ignore=!0}for(var r=0;r<e.length;r++){var i=Kl(e[r]);if(!i.label.ignore){for(var a=i.label,o=i.labelLine,s=!1,c=0;c<t.length;c++)if(tu(i,t[c],null,{touchThreshold:.05})){s=!0;break}s?(n(a),o&&n(o)):t.push(i)}}}function tu(e,t,n,r){return!e||!t||e.label&&e.label.ignore||t.label&&t.label.ignore||!e.rect.intersect(t.rect,n,r)?!1:e.axisAligned&&t.axisAligned?!0:Ql(e).intersect(Ql(t),n,r)}var nu=Math.sin,ru=Math.cos,iu=Math.PI,au=Math.PI*2,ou=180/iu,su=function(){function e(){}return e.prototype.reset=function(e){this._start=!0,this._d=[],this._str=``,this._p=10**(e||4)},e.prototype.moveTo=function(e,t){this._add(`M`,e,t)},e.prototype.lineTo=function(e,t){this._add(`L`,e,t)},e.prototype.bezierCurveTo=function(e,t,n,r,i,a){this._add(`C`,e,t,n,r,i,a)},e.prototype.quadraticCurveTo=function(e,t,n,r){this._add(`Q`,e,t,n,r)},e.prototype.arc=function(e,t,n,r,i,a){this.ellipse(e,t,n,n,0,r,i,a)},e.prototype.ellipse=function(e,t,n,r,i,a,o,s){var c=o-a,l=!s,u=Math.abs(c),d=On(u-au)||(l?c>=au:-c>=au),f=c>0?c%au:c%au+au,p=!1;p=d?!0:On(u)?!1:f>=iu==!!l;var m=e+n*ru(a),h=t+r*nu(a);this._start&&this._add(`M`,m,h);var g=Math.round(i*ou);if(d){var _=1/this._p,v=(l?1:-1)*(au-_);this._add(`A`,n,r,g,1,+l,e+n*ru(a+v),t+r*nu(a+v)),_>.01&&this._add(`A`,n,r,g,0,+l,m,h)}else{var y=e+n*ru(o),b=t+r*nu(o);this._add(`A`,n,r,g,+p,+l,y,b)}},e.prototype.rect=function(e,t,n,r){this._add(`M`,e,t),this._add(`l`,n,0),this._add(`l`,0,r),this._add(`l`,-n,0),this._add(`Z`)},e.prototype.closePath=function(){this._d.length>0&&this._add(`Z`)},e.prototype._add=function(e,t,n,r,i,a,o,s,c){for(var l=[],u=this._p,d=1;d<arguments.length;d++){var f=arguments[d];if(isNaN(f)){this._invalid=!0;return}l.push(Math.round(f*u)/u)}this._d.push(e+l.join(` `)),this._start=e===`Z`},e.prototype.generateStr=function(){this._str=this._invalid?``:this._d.join(``),this._d=[]},e.prototype.getStr=function(){return this._str},e}(),cu=`none`,lu=Math.round;function uu(e){var t=e.fill;return t!=null&&t!==cu}function du(e){var t=e.stroke;return t!=null&&t!==cu}var fu=[`lineCap`,`miterLimit`,`lineJoin`],pu=u(fu,function(e){return`stroke-`+e.toLowerCase()});function mu(e,t,n,r){var i=t.opacity==null?1:t.opacity;if(n instanceof Hr){e(`opacity`,i);return}if(uu(t)){var a=x(t.fill);e(`fill`,a.color);var o=t.fillOpacity==null?a.opacity*i:t.fillOpacity*a.opacity*i;(r||o<1)&&e(`fill-opacity`,o)}else e(`fill`,cu);if(du(t)){var s=x(t.stroke);e(`stroke`,s.color);var c=t.strokeNoScale?n.getLineScale():1,l=c?(t.lineWidth||0)/c:0,u=t.strokeOpacity==null?s.opacity*i:t.strokeOpacity*s.opacity*i,d=t.strokeFirst;if((r||l!==1)&&e(`stroke-width`,l),(r||d)&&e(`paint-order`,d?`stroke`:`fill`),(r||u<1)&&e(`stroke-opacity`,u),t.lineDash){var f=Ta(n),p=f[0],m=f[1];p&&(m=lu(m||0),e(`stroke-dasharray`,p.join(`,`)),(m||r)&&e(`stroke-dashoffset`,m))}else r&&e(`stroke-dasharray`,cu);for(var h=0;h<fu.length;h++){var g=fu[h];if(r||t[g]!==st[g]){var _=t[g]||st[g];_&&e(pu[h],_)}}}else r&&e(`stroke`,cu)}var hu=`http://www.w3.org/2000/svg`,gu=`http://www.w3.org/1999/xlink`,_u=`http://www.w3.org/2000/xmlns/`,vu=`http://www.w3.org/XML/1998/namespace`,yu=`ecmeta_`;function bu(e){return document.createElementNS(hu,e)}function xu(e,t,n,r,i){return{tag:e,attrs:n||{},children:r,text:i,key:t}}function Su(e,t){var n=[];if(t)for(var r in t){var i=t[r],a=r;i!==!1&&(i!==!0&&i!=null&&(a+=`="`+i+`"`),n.push(a))}return`<`+e+` `+n.join(` `)+`>`}function Cu(e){return`</`+e+`>`}function wu(e,t){t||={};var n=t.newline?`
`:``;function r(e){var t=e.children,i=e.tag,a=e.attrs,o=e.text;return Su(i,a)+(i===`style`?o||``:Ct(o))+(t?``+n+u(t,function(e){return r(e)}).join(n)+n:``)+Cu(i)}return r(e)}function Tu(e,t,n){n||={};var r=n.newline?`
`:``,i=` {`+r,a=r+`}`,o=u(qr(e),function(t){return t+i+u(qr(e[t]),function(n){return n+`:`+e[t][n]+`;`}).join(r)+a}).join(r),s=u(qr(t),function(e){return`@keyframes `+e+i+u(qr(t[e]),function(n){return n+i+u(qr(t[e][n]),function(r){var i=t[e][n][r];return r===`d`&&(i=`path("`+i+`")`),r+`:`+i+`;`}).join(r)+a}).join(r)+a}).join(r);return!o&&!s?``:[`<![CDATA[`,o,s,`]]>`].join(r)}function Eu(e){return{zrId:e,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function Du(e,t,n,r){return xu(`svg`,`root`,{width:e,height:t,xmlns:hu,"xmlns:xlink":gu,version:`1.1`,baseProfile:`full`,viewBox:r?`0 0 `+e+` `+t:!1},n)}var Ou=0;function ku(){return Ou++}var Au={cubicIn:`0.32,0,0.67,0`,cubicOut:`0.33,1,0.68,1`,cubicInOut:`0.65,0,0.35,1`,quadraticIn:`0.11,0,0.5,0`,quadraticOut:`0.5,1,0.89,1`,quadraticInOut:`0.45,0,0.55,1`,quarticIn:`0.5,0,0.75,0`,quarticOut:`0.25,1,0.5,1`,quarticInOut:`0.76,0,0.24,1`,quinticIn:`0.64,0,0.78,0`,quinticOut:`0.22,1,0.36,1`,quinticInOut:`0.83,0,0.17,1`,sinusoidalIn:`0.12,0,0.39,0`,sinusoidalOut:`0.61,1,0.88,1`,sinusoidalInOut:`0.37,0,0.63,1`,exponentialIn:`0.7,0,0.84,0`,exponentialOut:`0.16,1,0.3,1`,exponentialInOut:`0.87,0,0.13,1`,circularIn:`0.55,0,1,0.45`,circularOut:`0,0.55,0.45,1`,circularInOut:`0.85,0,0.15,1`},ju=`transform-origin`;function Mu(e,t,n){var r=G({},e.shape);G(r,t),e.buildPath(n,r);var i=new su;return i.reset(Si(e)),n.rebuildPath(i,1),i.generateStr(),i.getStr()}function Nu(e,t){var n=t.originX,r=t.originY;(n||r)&&(e[ju]=n+`px `+r+`px`)}var Pu={fill:`fill`,opacity:`opacity`,lineWidth:`stroke-width`,lineDashOffset:`stroke-dashoffset`};function Fu(e,t){var n=t.zrId+`-ani-`+ t.cssAnimIdx++;return t.cssAnims[n]=e,n}function Iu(e,t,n){var r=e.shape.paths,i={},a,o;if(J(r,function(e){var t=Eu(n.zrId);t.animation=!0,Ru(e,{},t,!0);var r=t.cssAnims,s=t.cssNodes,c=qr(r),l=c.length;if(l){o=c[l-1];var u=r[o];for(var d in u){var f=u[d];i[d]=i[d]||{d:``},i[d].d+=f.d||``}for(var p in s){var m=s[p].animation;m.indexOf(o)>=0&&(a=m)}}}),a){t.d=!1;var s=Fu(i,n);return a.replace(o,s)}}function Lu(e){return R(e)?Au[e]?`cubic-bezier(`+Au[e]+`)`:rt(e)?e:``:``}function Ru(e,t,n,r){var i=e.animators,a=i.length,o=[];if(e instanceof Tt){var s=Iu(e,t,n);if(s)o.push(s);else if(!a)return}else if(!a)return;for(var c={},l=0;l<a;l++){var u=i[l],d=[u.getMaxTime()/1e3+`s`],f=Lu(u.getClip().easing),p=u.getDelay();f?d.push(f):d.push(`linear`),p&&d.push(p/1e3+`s`),u.getLoop()&&d.push(`infinite`);var m=d.join(` `);c[m]=c[m]||[m,[]],c[m][1].push(u)}function h(i){var a=i[1],o=a.length,s={},c={},l={},u=`animation-timing-function`;function d(e,t,n){for(var r=e.getTracks(),i=e.getMaxTime(),a=0;a<r.length;a++){var o=r[a];if(o.needsAnimate()){var s=o.keyframes,c=o.propName;if(n&&(c=n(c)),c)for(var l=0;l<s.length;l++){var d=s[l],f=Math.round(d.time/i*100)+`%`,p=Lu(d.easing),m=d.rawValue;(R(m)||te(m))&&(t[f]=t[f]||{},t[f][c]=d.rawValue,p&&(t[f][u]=p))}}}}for(var f=0;f<o;f++){var p=a[f],m=p.targetName;m?m===`shape`&&d(p,c):!r&&d(p,s)}for(var h in s){var g={};jr(g,e),G(g,s[h]);var _=ni(g),v=s[h][u];l[h]=_?{transform:_}:{},Nu(l[h],g),v&&(l[h][u]=v)}var y,b=!0;for(var h in c){l[h]=l[h]||{};var x=!y,v=c[h][u];x&&(y=new ke);var S=y.len();y.reset(),l[h].d=Mu(e,c[h],y);var C=y.len();if(!x&&S!==C){b=!1;break}v&&(l[h][u]=v)}if(!b)for(var h in l)delete l[h].d;if(!r)for(var f=0;f<o;f++){var p=a[f],m=p.targetName;m===`style`&&d(p,l,function(e){return Pu[e]})}for(var w=qr(l),T=!0,E,f=1;f<w.length;f++){var D=w[f-1],O=w[f];if(l[D][ju]!==l[O][ju]){T=!1;break}E=l[D][ju]}if(T&&E){for(var h in l)l[h][ju]&&delete l[h][ju];t[ju]=E}if(ca(w,function(e){return qr(l[e]).length>0}).length)return Fu(l,n)+` `+i[0]+` both`}for(var g in c){var s=h(c[g]);s&&o.push(s)}if(o.length){var _=n.zrId+`-cls-`+ku();n.cssNodes[`.`+_]={animation:o.join(`,`)},t.class=_}}function zu(e,t,n){if(!e.ignore)if(e.isSilent()){var r={"pointer-events":`none`};Bu(r,t,n,!0)}else{var i=e.states.emphasis&&e.states.emphasis.style?e.states.emphasis.style:{},a=i.fill;if(!a){var o=e.style&&e.style.fill,s=e.states.select&&e.states.select.style&&e.states.select.style.fill,c=e.currentStates.indexOf(`select`)>=0&&s||o;c&&(a=ut(c))}var l=i.lineWidth;if(l){var u=!i.strokeNoScale&&e.transform?e.transform[0]:1;l/=u}var r={cursor:`pointer`};a&&(r.fill=a),i.stroke&&(r.stroke=i.stroke),l&&(r[`stroke-width`]=l),Bu(r,t,n,!0)}}function Bu(e,t,n,r){var i=JSON.stringify(e),a=n.cssStyleCache[i];a||(a=n.zrId+`-cls-`+ku(),n.cssStyleCache[i]=a,n.cssNodes[`.`+a+(r?`:hover`:``)]=e),t.class=t.class?t.class+` `+a:a}var Vu=Math.round;function Hu(e){return e&&R(e.src)}function Uu(e){return e&&V(e.toDataURL)}function Wu(e,t,n,r){mu(function(i,a){var o=i===`fill`||i===`stroke`;o&&aa(a)?ad(t,e,i,r):o&&ya(a)?od(n,e,i,r):e[i]=a,o&&r.ssr&&a===`none`&&(e[`pointer-events`]=`visible`)},t,n,!1),id(n,e,r)}function Gu(e,t){var n=vn(t);n&&(n.each(function(t,n){t!=null&&(e[(`ecmeta_`+n).toLowerCase()]=t+``)}),t.isSilent()&&(e[yu+`silent`]=`true`))}function Ku(e){return On(e[0]-1)&&On(e[1])&&On(e[2])&&On(e[3]-1)}function qu(e){return On(e[4])&&On(e[5])}function Ju(e,t,n){if(t&&!(qu(t)&&Ku(t))){var r=n?10:1e4;e.transform=Ku(t)?`translate(`+Vu(t[4]*r)/r+` `+Vu(t[5]*r)/r+`)`:fr(t)}}function Yu(e,t,n){for(var r=e.points,i=[],a=0;a<r.length;a++)i.push(Vu(r[a][0]*n)/n),i.push(Vu(r[a][1]*n)/n);t.points=i.join(` `)}function Xu(e){return!e.smooth}function Zu(e){var t=u(e,function(e){return typeof e==`string`?[e,e]:e});return function(e,n,r){for(var i=0;i<t.length;i++){var a=t[i],o=e[a[0]];o!=null&&(n[a[1]]=Vu(o*r)/r)}}}var Qu={circle:[Zu([`cx`,`cy`,`r`])],polyline:[Yu,Xu],polygon:[Yu,Xu]};function $u(e){for(var t=e.animators,n=0;n<t.length;n++)if(t[n].targetName===`shape`)return!0;return!1}function ed(e,t){var n=e.style,r=e.shape,i=Qu[e.type],a={},o=t.animation,s=`path`,c=e.style.strokePercent,l=t.compress&&Si(e)||4;if(i&&!t.willUpdate&&!(i[1]&&!i[1](r))&&!(o&&$u(e))&&!(c<1)){s=e.type;var u=10**l;i[0](r,a,u)}else{var d=!e.path||e.shapeChanged();e.path||e.createPathProxy();var f=e.path;d&&(f.beginPath(),e.buildPath(f,e.shape),e.pathUpdated());var p=f.getVersion(),m=e,h=m.__svgPathBuilder;(m.__svgPathVersion!==p||!h||c!==m.__svgPathStrokePercent)&&(h||=m.__svgPathBuilder=new su,h.reset(l),f.rebuildPath(h,c),h.generateStr(),m.__svgPathVersion=p,m.__svgPathStrokePercent=c),a.d=h.getStr()}return Ju(a,e.transform),Wu(a,n,e,t),Gu(a,e),t.animation&&Ru(e,a,t),t.emphasis&&zu(e,a,t),xu(s,e.id+``,a)}function td(e,t){var n=e.style,r=n.image;if(r&&!R(r)&&(Hu(r)?r=r.src:Uu(r)&&(r=r.toDataURL())),r){var i=n.x||0,a=n.y||0,o=n.width,s=n.height,c={href:r,width:o,height:s};return i&&(c.x=i),a&&(c.y=a),Ju(c,e.transform),Wu(c,n,e,t),Gu(c,e),t.animation&&Ru(e,c,t),xu(`image`,e.id+``,c)}}function nd(e,t){var n=e.style,r=n.text;if(r!=null&&(r+=``),!(!r||isNaN(n.x)||isNaN(n.y))){var i=n.font||`12px sans-serif`,a=n.x||0,o=Zr(n.y||0,ar(i),n.textBaseline),s={"dominant-baseline":`central`,"text-anchor":Kn[n.textAlign]||n.textAlign};if(pt(n)){var c=``,l=n.fontStyle,u=Jr(n.fontSize);if(!parseFloat(u))return;var d=n.fontFamily||`sans-serif`,f=n.fontWeight;c+=`font-size:`+u+`;font-family:`+d+`;`,l&&l!==`normal`&&(c+=`font-style:`+l+`;`),f&&f!==`normal`&&(c+=`font-weight:`+f+`;`),s.style=c}else s.style=`font: `+i;return r.match(/\s/)&&(s[`xml:space`]=`preserve`),a&&(s.x=a),o&&(s.y=o),Ju(s,e.transform),Wu(s,n,e,t),Gu(s,e),t.animation&&Ru(e,s,t),xu(`text`,e.id+``,s,void 0,r)}}function rd(e,t){if(e instanceof bt)return ed(e,t);if(e instanceof Hr)return td(e,t);if(e instanceof et)return nd(e,t)}function id(e,t,n){var r=e.style;if(vr(r)){var i=Tr(e),a=n.shadowCache,o=a[i];if(!o){var s=e.getGlobalScale(),c=s[0],l=s[1];if(!c||!l)return;var u=r.shadowOffsetX||0,d=r.shadowOffsetY||0,f=r.shadowBlur,p=x(r.shadowColor),m=p.opacity,h=p.color,g=f/2/c,_=f/2/l,v=g+` `+_;o=n.zrId+`-s`+ n.shadowIdx++,n.defs[o]=xu(`filter`,o,{id:o,x:`-100%`,y:`-100%`,width:`300%`,height:`300%`},[xu(`feDropShadow`,``,{dx:u/c,dy:d/l,stdDeviation:v,"flood-color":h,"flood-opacity":m})]),a[i]=o}t.filter=$n(o)}}function ad(e,t,n,r){var i=e[n],a,o={gradientUnits:i.global?`userSpaceOnUse`:`objectBoundingBox`};if(Vn(i))a=`linearGradient`,o.x1=i.x,o.y1=i.y,o.x2=i.x2,o.y2=i.y2;else if(Ft(i))a=`radialGradient`,o.cx=z(i.x,.5),o.cy=z(i.y,.5),o.r=z(i.r,.5);else return;for(var s=i.colorStops,c=[],l=0,u=s.length;l<u;++l){var d=fa(s[l].offset)*100+`%`,f=s[l].color,p=x(f),m=p.color,h=p.opacity,g={offset:d};g[`stop-color`]=m,h<1&&(g[`stop-opacity`]=h),c.push(xu(`stop`,l+``,g))}var _=wu(xu(a,``,o,c)),v=r.gradientCache,y=v[_];y||(y=r.zrId+`-g`+ r.gradientIdx++,v[_]=y,o.id=y,r.defs[y]=xu(a,y,o,c)),t[n]=$n(y)}function od(e,t,n,r){var i=e.style[n],a=e.getBoundingRect(),o={},s=i.repeat,c=s===`no-repeat`,l=s===`repeat-x`,u=s===`repeat-y`,d;if(Ea(i)){var f=i.imageWidth,p=i.imageHeight,m=void 0,h=i.image;if(R(h)?m=h:Hu(h)?m=h.src:Uu(h)&&(m=h.toDataURL()),typeof Image>`u`){var g=`Image width/height must been given explictly in svg-ssr renderer.`;Yn(f,g),Yn(p,g)}else if(f==null||p==null){var _=function(e,t){if(e){var n=e.elm,r=f||t.width,i=p||t.height;e.tag===`pattern`&&(l?(i=1,r/=a.width):u&&(r=1,i/=a.height)),e.attrs.width=r,e.attrs.height=i,n&&(n.setAttribute(`width`,r),n.setAttribute(`height`,i))}},v=La(m,null,e,function(e){c||_(S,e),_(d,e)});v&&v.width&&v.height&&(f||=v.width,p||=v.height)}d=xu(`image`,`img`,{href:m,width:f,height:p}),o.width=f,o.height=p}else i.svgElement&&(d=ta(i.svgElement),o.width=i.svgWidth,o.height=i.svgHeight);if(d){var y,b;c?y=b=1:l?(b=1,y=o.width/a.width):u?(y=1,b=o.height/a.height):o.patternUnits=`userSpaceOnUse`,y!=null&&!isNaN(y)&&(o.width=y),b!=null&&!isNaN(b)&&(o.height=b);var x=ni(i);x&&(o.patternTransform=x);var S=xu(`pattern`,``,o,[d]),C=wu(S),w=r.patternCache,T=w[C];T||(T=r.zrId+`-p`+ r.patternIdx++,w[C]=T,o.id=T,S=r.defs[T]=xu(`pattern`,T,o,[d])),t[n]=$n(T)}}function sd(e,t,n){var r=n.clipPathCache,i=n.defs,a=r[e.id];if(!a){a=n.zrId+`-c`+ n.clipPathIdx++;var o={id:a};r[e.id]=a,i[a]=xu(`clipPath`,a,o,[ed(e,n)])}t[`clip-path`]=$n(a)}function cd(e){return document.createTextNode(e)}function ld(e,t,n){e.insertBefore(t,n)}function ud(e,t){e.removeChild(t)}function dd(e,t){e.appendChild(t)}function fd(e){return e.parentNode}function pd(e){return e.nextSibling}function md(e,t){e.textContent=t}var hd=58,gd=120,_d=xu(``,``);function vd(e){return e===void 0}function yd(e){return e!==void 0}function bd(e,t,n){for(var r={},i=t;i<=n;++i){var a=e[i].key;a!==void 0&&(r[a]=i)}return r}function xd(e,t){var n=e.key===t.key;return e.tag===t.tag&&n}function Sd(e){var t,n=e.children,r=e.tag;if(yd(r)){var i=e.elm=bu(r);if(Td(_d,e),B(n))for(t=0;t<n.length;++t){var a=n[t];a!=null&&dd(i,Sd(a))}else yd(e.text)&&!A(e.text)&&dd(i,cd(e.text))}else e.elm=cd(e.text);return e.elm}function Cd(e,t,n,r,i){for(;r<=i;++r){var a=n[r];a!=null&&ld(e,Sd(a),t)}}function wd(e,t,n,r){for(;n<=r;++n){var i=t[n];i!=null&&(yd(i.tag)?ud(fd(i.elm),i.elm):ud(e,i.elm))}}function Td(e,t){var n,r=t.elm,i=e&&e.attrs||{},a=t.attrs||{};if(i!==a){for(n in a){var o=a[n];i[n]!==o&&(o===!0?r.setAttribute(n,``):o===!1?r.removeAttribute(n):n===`style`?r.style.cssText=o:n.charCodeAt(0)===gd?n===`xmlns:xlink`||n===`xmlns`?r.setAttributeNS(_u,n,o):n.charCodeAt(3)===hd?r.setAttributeNS(vu,n,o):n.charCodeAt(5)===hd?r.setAttributeNS(gu,n,o):r.setAttribute(n,o):r.setAttribute(n,o))}for(n in i)n in a||r.removeAttribute(n)}}function Ed(e,t,n){for(var r=0,i=0,a=t.length-1,o=t[0],s=t[a],c=n.length-1,l=n[0],u=n[c],d,f,p,m;r<=a&&i<=c;)o==null?o=t[++r]:s==null?s=t[--a]:l==null?l=n[++i]:u==null?u=n[--c]:xd(o,l)?(Dd(o,l),o=t[++r],l=n[++i]):xd(s,u)?(Dd(s,u),s=t[--a],u=n[--c]):xd(o,u)?(Dd(o,u),ld(e,o.elm,pd(s.elm)),o=t[++r],u=n[--c]):xd(s,l)?(Dd(s,l),ld(e,s.elm,o.elm),s=t[--a],l=n[++i]):(vd(d)&&(d=bd(t,r,a)),f=d[l.key],vd(f)?ld(e,Sd(l),o.elm):(p=t[f],p.tag===l.tag?(Dd(p,l),t[f]=void 0,ld(e,p.elm,o.elm)):ld(e,Sd(l),o.elm)),l=n[++i]);(r<=a||i<=c)&&(r>a?(m=n[c+1]==null?null:n[c+1].elm,Cd(e,m,n,i,c)):wd(e,t,r,a))}function Dd(e,t){var n=t.elm=e.elm,r=e.children,i=t.children;e!==t&&(Td(e,t),vd(t.text)?yd(r)&&yd(i)?r!==i&&Ed(n,r,i):yd(i)?(yd(e.text)&&md(n,``),Cd(n,null,i,0,i.length-1)):yd(r)?wd(n,r,0,r.length-1):yd(e.text)&&md(n,``):e.text!==t.text&&(yd(r)&&wd(n,r,0,r.length-1),md(n,t.text)))}function Od(e,t){if(xd(e,t))Dd(e,t);else{var n=e.elm,r=fd(n);Sd(t),r!==null&&(ld(r,t.elm,pd(n)),wd(r,[e],0,0))}return t}var kd=0,Ad=function(){function e(e,t,n){if(this.type=`svg`,this.configLayer=jd(`configLayer`),this.storage=t,this._opts=n=G({},n),this.root=e,this._id=`zr`+ kd++,this._oldVNode=Du(n.width,n.height),e&&!n.ssr){var r=this._viewport=document.createElement(`div`);r.style.cssText=`position:relative;overflow:hidden`;var i=this._svgDom=this._oldVNode.elm=bu(`svg`);Td(null,this._oldVNode),r.appendChild(i),e.appendChild(r)}this.resize(n.width,n.height)}return e.prototype.getType=function(){return this.type},e.prototype.getViewportRoot=function(){return this._viewport},e.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},e.prototype.getSvgDom=function(){return this._svgDom},e.prototype.refresh=function(){if(this.root){var e=this.renderToVNode({willUpdate:!0});e.attrs.style=`position:absolute;left:0;top:0;user-select:none`,Od(this._oldVNode,e),this._oldVNode=e}},e.prototype.renderOneToVNode=function(e){return rd(e,Eu(this._id))},e.prototype.renderToVNode=function(e){e||={};var t=this.storage.getDisplayList(!0),n=this._width,r=this._height,i=Eu(this._id);i.animation=e.animation,i.willUpdate=e.willUpdate,i.compress=e.compress,i.emphasis=e.emphasis,i.ssr=this._opts.ssr;var a=[],o=this._bgVNode=Md(n,r,this._backgroundColor,i);o&&a.push(o);var s=e.compress?null:this._mainVNode=xu(`g`,`main`,{},[]);this._paintList(t,i,s?s.children:a),s&&a.push(s);var c=u(qr(i.defs),function(e){return i.defs[e]});if(c.length&&a.push(xu(`defs`,`defs`,{},c)),e.animation){var l=Tu(i.cssNodes,i.cssAnims,{newline:!0});if(l){var d=xu(`style`,`stl`,{},[],l);a.push(d)}}return Du(n,r,a,e.useViewBox)},e.prototype.renderToString=function(e){return e||={},wu(this.renderToVNode({animation:z(e.cssAnimation,!0),emphasis:z(e.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:z(e.useViewBox,!0)}),{newline:!0})},e.prototype.setBackgroundColor=function(e){this._backgroundColor=e},e.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},e.prototype._paintList=function(e,t,n){for(var r=e.length,i=[],a=0,o,s,c=0,l=0;l<r;l++){var u=e[l];if(!u.invisible){var d=u.__clipPaths,f=d&&d.length||0,p=s&&s.length||0,m=void 0;for(m=Math.max(f-1,p-1);m>=0&&!(d&&s&&d[m]===s[m]);m--);for(var h=p-1;h>m;h--)a--,o=i[a-1];for(var g=m+1;g<f;g++){var _={};sd(d[g],_,t);var v=xu(`g`,`clip-g-`+ c++,_,[]);(o?o.children:n).push(v),i[a++]=v,o=v}s=d;var y=rd(u,t);y&&(o?o.children:n).push(y)}}},e.prototype.resize=function(e,t){var n=this._opts,r=this.root,i=this._viewport;if(e!=null&&(n.width=e),t!=null&&(n.height=t),r&&i&&(i.style.display=`none`,e=Bn(r,0,n),t=Bn(r,1,n),i.style.display=``),this._width!==e||this._height!==t){if(this._width=e,this._height=t,i){var a=i.style;a.width=e+`px`,a.height=t+`px`}if(ya(this._backgroundColor))this.refresh();else{var o=this._svgDom;o&&(o.setAttribute(`width`,e),o.setAttribute(`height`,t));var s=this._bgVNode&&this._bgVNode.elm;s&&(s.setAttribute(`width`,e),s.setAttribute(`height`,t))}}},e.prototype.getWidth=function(){return this._width},e.prototype.getHeight=function(){return this._height},e.prototype.dispose=function(){this.root&&(this.root.innerHTML=``),this._svgDom=this._viewport=this.storage=this._oldVNode=this._bgVNode=this._mainVNode=null},e.prototype.clear=function(){this._svgDom&&(this._svgDom.innerHTML=null),this._oldVNode=null},e.prototype.toDataURL=function(e){var t=this.renderToString(),n=`data:image/svg+xml;`;return e?(t=Qi(t),t&&n+`base64,`+t):n+`charset=UTF-8,`+encodeURIComponent(t)},e}();function jd(e){return function(){}}function Md(e,t,n,r){var i;if(n&&n!==`none`)if(i=xu(`rect`,`bg`,{width:e,height:t,x:`0`,y:`0`}),aa(n))ad({fill:n},i.attrs,`fill`,r);else if(ya(n))od({style:{fill:n},dirty:yt,getBoundingRect:function(){return{width:e,height:t}}},i.attrs,`fill`,r);else{var a=x(n),o=a.color,s=a.opacity;i.attrs.fill=o,s<1&&(i.attrs[`fill-opacity`]=s)}return i}function Nd(e){e.registerPainter(`svg`,Ad)}var Pd=function(e){L(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return t.prototype.getInitialData=function(e){return Fo(null,this,{useEncodeDefaulter:!0})},t.prototype.getLegendIcon=function(e){var t=new W,n=va(`line`,0,e.itemHeight/2,e.itemWidth,0,e.lineStyle.stroke,!1);t.add(n),n.setStyle(e.lineStyle);var r=this.getData().getVisual(`symbol`),i=this.getData().getVisual(`symbolRotate`),a=r===`none`?`circle`:r,o=e.itemHeight*.8,s=va(a,(e.itemWidth-o)/2,(e.itemHeight-o)/2,o,o,e.itemStyle.fill);return t.add(s),s.setStyle(e.itemStyle),s.rotation=(e.iconRotate===`inherit`?i:e.iconRotate||0)*Math.PI/180,s.setOrigin([e.itemWidth/2,e.itemHeight/2]),a.indexOf(`empty`)>-1&&(s.style.stroke=s.style.fill,s.style.fill=Z.color.neutral00,s.style.lineWidth=2),t},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,triggerEvent:!1},t}(Xt);function Fd(e,t){var n=e.mapDimensionsAll(`defaultedLabel`),r=n.length;if(r===1){var i=ur(e,t,n[0]);return i==null?null:i+``}else if(r){for(var a=[],o=0;o<n.length;o++)a.push(ur(e,t,n[o]));return a.join(` `)}}function Id(e,t){var n=e.mapDimensionsAll(`defaultedLabel`);if(!B(t))return t+``;for(var r=[],i=0;i<n.length;i++){var a=e.getDimensionIndex(n[i]);a>=0&&r.push(t[a])}return r.join(` `)}var Ld=function(e){L(t,e);function t(t,n,r,i){var a=e.call(this)||this;return a.updateData(t,n,r,i),a}return t.prototype._createSymbol=function(e,t,n,r,i,a){this.removeAll();var o=va(e,-1,-1,2,2,null,a);o.attr({z2:z(i,100),culling:!0,scaleX:r[0]/2,scaleY:r[1]/2}),o.drift=Rd,this._symbolType=e,this.add(o)},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(){rr(this.childAt(0))},t.prototype.downplay=function(){oi(this.childAt(0))},t.prototype.setZ=function(e,t){var n=this.childAt(0);n.zlevel=e,n.z=t},t.prototype.setDraggable=function(e,t){var n=this.childAt(0);n.draggable=e,n.cursor=!t&&e?`move`:n.cursor},t.prototype.updateData=function(e,n,r,i){this.silent=!1;var a=e.getItemVisual(n,`symbol`)||`circle`,o=e.hostModel,s=t.getSymbolSize(e,n),c=t.getSymbolZ2(e,n),l=a!==this._symbolType,u=i&&i.disableAnimation;if(l){var d=e.getItemVisual(n,`symbolKeepAspect`);this._createSymbol(a,e,n,s,c,d)}else{var f=this.childAt(0);f.silent=!1;var p={scaleX:s[0]/2,scaleY:s[1]/2};u?f.attr(p):yn(f,p,o,n),Ne(f)}if(this._updateCommon(e,n,s,r,i),l){var f=this.childAt(0);if(!u){var p={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:f.style.opacity}};f.scaleX=f.scaleY=0,f.style.opacity=0,me(f,p,o,n)}}u&&this.childAt(0).stopAnimation(`leave`)},t.prototype._updateCommon=function(e,t,n,r,i){var a=this.childAt(0),o=e.hostModel,s,c,l,u,d,f,p,m,h;if(r&&(s=r.emphasisItemStyle,c=r.blurItemStyle,l=r.selectItemStyle,u=r.focus,d=r.blurScope,p=r.labelStatesModels,m=r.hoverScale,h=r.cursorStyle,f=r.emphasisDisabled),!r||e.hasItemOption){var g=r&&r.itemModel?r.itemModel:e.getItemModel(t),_=g.getModel(`emphasis`);s=_.getModel(`itemStyle`).getItemStyle(),l=g.getModel([`select`,`itemStyle`]).getItemStyle(),c=g.getModel([`blur`,`itemStyle`]).getItemStyle(),u=_.get(`focus`),d=_.get(`blurScope`),f=_.get(`disabled`),p=Un(g),m=_.getShallow(`scale`),h=g.getShallow(`cursor`)}var v=e.getItemVisual(t,`symbolRotate`);a.attr(`rotation`,(v||0)*Math.PI/180||0);var y=Pt(e.getItemVisual(t,`symbolOffset`),n);y&&(a.x=y[0],a.y=y[1]),h&&a.attr(`cursor`,h);var b=e.getItemVisual(t,`style`),x=b.fill;if(a instanceof Hr){var S=a.style;a.useStyle(G({image:S.image,x:S.x,y:S.y,width:S.width,height:S.height},b))}else a.__isEmptyBrush?a.useStyle(G({},b)):a.useStyle(b),a.style.decal=null,a.setColor(x,i&&i.symbolInnerColor),a.style.strokeNoScale=!0;var C=e.getItemVisual(t,`liftZ`),w=this._z2;C==null?w!=null&&(a.z2=w,this._z2=null):w??(this._z2=a.z2,a.z2+=C);var T=i&&i.useNameLabel;Lt(a,p,{labelFetcher:o,labelDataIndex:t,defaultText:E,inheritColor:x,defaultOpacity:b.opacity});function E(t){return T?e.getName(t):Fd(e,t)}this._sizeX=n[0]/2,this._sizeY=n[1]/2;var D=a.ensureState(`emphasis`);D.style=s,a.ensureState(`select`).style=l,a.ensureState(`blur`).style=c;var O=m==null||m===!0?Math.max(1.1,3/this._sizeY):isFinite(m)&&m>0?+m:1;D.scaleX=this._sizeX*O,D.scaleY=this._sizeY*O,this.setSymbolScale(1),Aa(this,u,d,f)},t.prototype.setSymbolScale=function(e){this.scaleX=this.scaleY=e},t.prototype.fadeOut=function(e,t,n){var r=this.childAt(0),i=H(this).dataIndex,a=n&&n.animation;if(this.silent=r.silent=!0,n&&n.fadeLabel){var o=r.getTextContent();o&&ze(o,{style:{opacity:0}},t,{dataIndex:i,removeOpt:a,cb:function(){r.removeTextContent()}})}else r.removeTextContent();ze(r,{style:{opacity:0},scaleX:0,scaleY:0},t,{dataIndex:i,cb:e,removeOpt:a})},t.getSymbolSize=function(e,t){return b(e.getItemVisual(t,`symbolSize`))},t.getSymbolZ2=function(e,t){return e.getItemVisual(t,`z2`)},t}(W);function Rd(e,t){this.parent.drift(e,t)}function zd(e,t,n,r){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(r&&r.isIgnore&&r.isIgnore(n))&&!(r&&r.clipShape&&!r.clipShape.contain(t[0],t[1]))&&e.getItemVisual(n,`symbol`)!==`none`}function Bd(e){return e!=null&&!A(e)&&(e={isIgnore:e}),e||{}}function Vd(e){var t=e.hostModel,n=t.getModel(`emphasis`);return{emphasisItemStyle:n.getModel(`itemStyle`).getItemStyle(),blurItemStyle:t.getModel([`blur`,`itemStyle`]).getItemStyle(),selectItemStyle:t.getModel([`select`,`itemStyle`]).getItemStyle(),focus:n.get(`focus`),blurScope:n.get(`blurScope`),emphasisDisabled:n.get(`disabled`),hoverScale:n.get(`scale`),labelStatesModels:Un(t),cursorStyle:t.get(`cursor`)}}function Hd(e,t,n,r,i,a,o){var s=new e(t,n,r,i);return s.setPosition(a),t.setItemGraphicEl(n,s),o.add(s),s}var Ud=function(){function e(e){this.group=new W,this._SymbolCtor=e||Ld}return e.prototype.updateData=function(e,t){this._progressiveEls=null,t=Bd(t);var n=this.group,r=e.hostModel,i=this._data,a=this._SymbolCtor,o=t.disableAnimation,s=this._seriesScope=Vd(e),c={disableAnimation:o},l=t.getSymbolPoint||function(t){return e.getItemLayout(t)};i||n.removeAll(),e.diff(i).add(function(r){var i=l(r);zd(e,i,r,t)&&Hd(a,e,r,s,c,i,n)}).update(function(u,d){var f=i.getItemGraphicEl(d),p=l(u);if(!zd(e,p,u,t)){n.remove(f);return}var m=e.getItemVisual(u,`symbol`)||`circle`,h=f&&f.getSymbolType&&f.getSymbolType();if(!f||h&&h!==m)n.remove(f),f=new a(e,u,s,c),f.setPosition(p);else{f.updateData(e,u,s,c);var g={x:p[0],y:p[1]};o?f.attr(g):yn(f,g,r)}n.add(f),e.setItemGraphicEl(u,f)}).remove(function(e){var t=i.getItemGraphicEl(e);t&&t.fadeOut(function(){n.remove(t)},r)}).execute(),this._getSymbolPoint=l,this._data=e},e.prototype.updateLayout=function(e){var t=this._data;if(t)for(var n=this,r=t.getStore(),i=0,a=r.count();i<a;i++){var o=t.getItemGraphicEl(i),s=n._getSymbolPoint(i);zd(t,s,i,e)?(o||=Hd(n._SymbolCtor,t,i,n._seriesScope,{disableAnimation:!0},s,n.group),o.stopAnimation(),o.setPosition(s),o.markRedraw()):o&&(n.group.remove(o),t.setItemGraphicEl(i,null))}},e.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=Vd(e),this._data=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(e,t,n,r){this._progressiveEls=[],r=Bd(r);function i(e){e.isGroup||(e.incremental=n,e.ensureState(`emphasis`).hoverLayer=2)}for(var a=e.start;a<e.end;a++){var o=t.getItemLayout(a);if(zd(t,o,a,r)){var s=new this._SymbolCtor(t,a,this._seriesScope);s.traverse(i),s.setPosition(o),this.group.add(s),t.setItemGraphicEl(a,s),this._progressiveEls.push(s)}}},e.prototype.eachRendered=function(e){xe(this._progressiveEls||this.group,e)},e.prototype.remove=function(e){var t=this.group,n=this._data;n&&e?n.eachItemGraphicEl(function(e){e.fadeOut(function(){t.remove(e)},n.hostModel)}):t.removeAll()},e}();function Wd(e,t,n){var r=e.getBaseAxis(),i=e.getOtherAxis(r),a=Gd(i,n),o=r.dim,s=i.dim,c=t.mapDimension(s),l=t.mapDimension(o),d=+(s===`x`||s===`radius`),f=u(e.dimensions,function(e){return t.mapDimension(e)}),p=!1,m=t.getCalculationInfo(`stackResultDimension`);return jo(t,f[0])&&(p=!0,f[0]=m),jo(t,f[1])&&(p=!0,f[1]=m),{dataDimsForPoint:f,valueStart:a,valueAxisDim:s,baseAxisDim:o,stacked:!!p,valueDim:c,baseDim:l,baseDataOffset:d,stackedOverDimension:t.getCalculationInfo(`stackedOverDimension`)}}function Gd(e,t){var n=0,r=e.scale.getExtent();return t===`start`?n=r[0]:t===`end`?n=r[1]:te(t)&&!isNaN(t)?n=t:r[0]>0?n=r[0]:r[1]<0&&(n=r[1]),n}function Kd(e,t,n,r){var i=NaN;e.stacked&&(i=n.get(n.getCalculationInfo(`stackedOverDimension`),r)),isNaN(i)&&(i=e.valueStart);var a=e.baseDataOffset,o=[];return o[a]=n.get(e.baseDim,r),o[1-a]=i,t.dataToPoint(o)}function qd(e,t){return!isFinite(e)||!isFinite(t)}var Jd=typeof Float32Array<`u`?Float32Array:void 0,Yd=typeof Float64Array<`u`?Float64Array:void 0;function Xd(e){return Zd({ctor:Jd},e).arr}function Zd(e,t){var n=e.arr,r=e.ctor;if(t>ba&&(t=ba),!n||e.typed&&n.length<t){var i=void 0;if(r)try{i=new r(t),e.typed=!0,n&&i.set(n)}catch{}if(!i&&(i=[],e.typed=!1,n))for(var a=0,o=n.length;a<o;a++)i[a]=n[a];e.arr=i}return e}function Qd(e,t){var n=[];return t.diff(e).add(function(e){n.push({cmd:`+`,idx:e})}).update(function(e,t){n.push({cmd:`=`,idx:t,idx1:e})}).remove(function(e){n.push({cmd:`-`,idx:e})}).execute(),n}function $d(e,t,n,r,i,a,o,s){for(var c=Qd(e,t),l=[],u=[],d=[],f=[],p=[],m=[],h=[],g=Wd(i,t,o),_=e.getLayout(`points`)||[],v=t.getLayout(`points`)||[],y=0;y<c.length;y++){var b=c[y],x=!0,S=void 0,C=void 0;switch(b.cmd){case`=`:S=b.idx*2,C=b.idx1*2;var w=_[S],T=_[S+1],E=v[C],D=v[C+1];(isNaN(w)||isNaN(T))&&(w=E,T=D),l.push(w,T),u.push(E,D),d.push(n[S],n[S+1]),f.push(r[C],r[C+1]),h.push(t.getRawIndex(b.idx1));break;case`+`:var O=b.idx,k=g.dataDimsForPoint,A=i.dataToPoint([t.get(k[0],O),t.get(k[1],O)]);C=O*2,l.push(A[0],A[1]),u.push(v[C],v[C+1]);var j=Kd(g,i,t,O);d.push(j[0],j[1]),f.push(r[C],r[C+1]),h.push(t.getRawIndex(O));break;case`-`:x=!1}x&&(p.push(b),m.push(m.length))}m.sort(function(e,t){return h[e]-h[t]});for(var M=l.length,N=Xd(M),P=Xd(M),F=Xd(M),ee=Xd(M),te=[],y=0;y<m.length;y++){var ne=m[y],re=y*2,ie=ne*2;N[re]=l[ie],N[re+1]=l[ie+1],P[re]=u[ie],P[re+1]=u[ie+1],F[re]=d[ie],F[re+1]=d[ie+1],ee[re]=f[ie],ee[re+1]=f[ie+1],te[y]=p[ne]}return{current:N,next:P,stackedOnCurrent:F,stackedOnNext:ee,status:te}}var ef=Math.min,tf=Math.max;function nf(e,t,n,r,i,a,o,s,c){for(var l,u,d,f,p,m,h=n,g=0;g<r;g++){var _=t[h*2],v=t[h*2+1];if(h>=i||h<0)break;if(qd(_,v)){if(c){h+=a;continue}break}if(h===n)e[a>0?`moveTo`:`lineTo`](_,v),d=_,f=v;else{var y=_-l,b=v-u;if(y*y+b*b<.5){h+=a;continue}if(o>0){for(var x=h+a,S=t[x*2],C=t[x*2+1];S===_&&C===v&&g<r;)g++,x+=a,h+=a,S=t[x*2],C=t[x*2+1],_=t[h*2],v=t[h*2+1],y=_-l,b=v-u;var w=g+1;if(c)for(;qd(S,C)&&w<r;)w++,x+=a,S=t[x*2],C=t[x*2+1];var T=.5,E=0,D=0,O=void 0,k=void 0;if(w>=r||qd(S,C))p=_,m=v;else{E=S-l,D=C-u;var A=_-l,j=S-_,M=v-u,N=C-v,P=void 0,F=void 0;if(s===`x`){P=Math.abs(A),F=Math.abs(j);var ee=E>0?1:-1;p=_-ee*P*o,m=v,O=_+ee*F*o,k=v}else if(s===`y`){P=Math.abs(M),F=Math.abs(N);var te=D>0?1:-1;p=_,m=v-te*P*o,O=_,k=v+te*F*o}else P=Math.sqrt(A*A+M*M),F=Math.sqrt(j*j+N*N),T=F/(F+P),p=_-E*o*(1-T),m=v-D*o*(1-T),O=_+E*o*T,k=v+D*o*T,O=ef(O,tf(S,_)),k=ef(k,tf(C,v)),O=tf(O,ef(S,_)),k=tf(k,ef(C,v)),E=O-_,D=k-v,p=_-E*P/F,m=v-D*P/F,p=ef(p,tf(l,_)),m=ef(m,tf(u,v)),p=tf(p,ef(l,_)),m=tf(m,ef(u,v)),E=_-p,D=v-m,O=_+E*F/P,k=v+D*F/P}e.bezierCurveTo(d,f,p,m,_,v),d=O,f=k}else e.lineTo(_,v)}l=_,u=v,h+=a}return g}var rf=function(){function e(){this.smooth=0,this.smoothConstraint=!0}return e}(),af=function(e){L(t,e);function t(t){var n=e.call(this,t)||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 rf},t.prototype.buildPath=function(e,t){var n=t.points,r=0,i=n.length/2;if(t.connectNulls){for(;i>0&&qd(n[i*2-2],n[i*2-1]);i--);for(;r<i&&qd(n[r*2],n[r*2+1]);r++);}for(;r<i;)r+=nf(e,n,r,i,i,1,t.smooth,t.smoothMonotone,t.connectNulls)+1},t.prototype.getPointOn=function(e,t){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var n=this.path.data,r=ke.CMD,i,a,o=t===`x`,s=[],c=0;c<n.length;){var l=n[c++],u=void 0,d=void 0,f=void 0,p=void 0,m=void 0,h=void 0,g=void 0;switch(l){case r.M:i=n[c++],a=n[c++];break;case r.L:if(u=n[c++],d=n[c++],g=o?(e-i)/(u-i):(e-a)/(d-a),g<=1&&g>=0){var _=o?(d-a)*g+a:(u-i)*g+i;return o?[e,_]:[_,e]}i=u,a=d;break;case r.C:u=n[c++],d=n[c++],f=n[c++],p=n[c++],m=n[c++],h=n[c++];var v=o?ae(i,u,f,m,e,s):ae(a,d,p,h,e,s);if(v>0)for(var y=0;y<v;y++){var b=s[y];if(b<=1&&b>=0){var _=o?gt(a,d,p,h,b):gt(i,u,f,m,b);return o?[e,_]:[_,e]}}i=m,a=h;break}}},t}(bt),of=function(e){L(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(rf),sf=function(e){L(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`ec-polygon`,n}return t.prototype.getDefaultShape=function(){return new of},t.prototype.buildPath=function(e,t){var n=t.points,r=t.stackedOnPoints,i=0,a=n.length/2,o=t.smoothMonotone;if(t.connectNulls){for(;a>0&&qd(n[a*2-2],n[a*2-1]);a--);for(;i<a&&qd(n[i*2],n[i*2+1]);i++);}for(;i<a;){var s=nf(e,n,i,a,a,1,t.smooth,o,t.connectNulls);nf(e,r,i+s-1,s,a,-1,t.stackedOnSmooth,o,t.connectNulls),i+=s+1,e.closePath()}},t}(bt);function cf(e,t,n,r,i){var a=e.getArea(),o=a.x,s=a.y,c=a.width,l=a.height,u=n.get([`lineStyle`,`width`])||0;o-=u/2,s-=u/2,c+=u,l+=u,c=Math.ceil(c),o!==Math.floor(o)&&(o=Math.floor(o),c++);var f=new d({shape:{x:o,y:s,width:c,height:l}});if(t){var p=e.getBaseAxis(),m=p.isHorizontal(),h=p.inverse;m?(h&&(f.shape.x+=c),f.shape.width=0):(h||(f.shape.y+=l),f.shape.height=0);var g=V(i)?function(e){i(e,f)}:null;me(f,{shape:{width:c,height:l,x:o,y:s}},n,null,r,g)}return f}function lf(e,t,n){var r=e.getArea(),i=I(r.r0,1),a=I(r.r,1),o=new Fr({shape:{cx:I(e.cx,1),cy:I(e.cy,1),r0:i,r:a,startAngle:r.startAngle,endAngle:r.endAngle,clockwise:r.clockwise}});return t&&(e.getBaseAxis().dim===`angle`?o.shape.endAngle=r.startAngle:o.shape.r=i,me(o,{shape:{endAngle:r.endAngle,r:a}},n)),o}function uf(e,t,n,r,i){return e?e.type===`polar`?lf(e,t,n):e.type===`cartesian2d`?cf(e,t,n,r,i):null:null}function df(e,t,n){e?t.setClipPath(n):t.removeClipPath()}function ff(e){var t=e.coordinateSystem;if(e.get(`clip`,!0)&&t&&(!t.shouldClip||t.shouldClip()))return t.getArea&&t.getArea(.1)}function pf(e,t){return e.type===t}function mf(e){var t=e.dimensions;return t[0]===`lng`&&t[1]===`lat`&&!!e.getViewRect}function hf(e,t,n,r){return e&&(e.legacy||e.legacy!==!1&&!n&&!r&&t!==`tspan`&&(t===`text`||K(e,`text`)))}function gf(e,t,n){var r=e,i,a,o;if(t===`text`)o=r;else{o={},K(r,`text`)&&(o.text=r.text),K(r,`rich`)&&(o.rich=r.rich),K(r,`textFill`)&&(o.fill=r.textFill),K(r,`textStroke`)&&(o.stroke=r.textStroke),K(r,`fontFamily`)&&(o.fontFamily=r.fontFamily),K(r,`fontSize`)&&(o.fontSize=r.fontSize),K(r,`fontStyle`)&&(o.fontStyle=r.fontStyle),K(r,`fontWeight`)&&(o.fontWeight=r.fontWeight),a={type:`text`,style:o,silent:!0},i={};var s=K(r,`textPosition`);n?i.position=s?r.textPosition:`inside`:s&&(i.position=r.textPosition),K(r,`textPosition`)&&(i.position=r.textPosition),K(r,`textOffset`)&&(i.offset=r.textOffset),K(r,`textRotation`)&&(i.rotation=r.textRotation),K(r,`textDistance`)&&(i.distance=r.textDistance)}return _f(o,e),J(o.rich,function(e){_f(e,e)}),{textConfig:i,textContent:a}}function _f(e,t){t&&(t.font=t.textFont||t.font,K(t,`textStrokeWidth`)&&(e.lineWidth=t.textStrokeWidth),K(t,`textAlign`)&&(e.align=t.textAlign),K(t,`textVerticalAlign`)&&(e.verticalAlign=t.textVerticalAlign),K(t,`textLineHeight`)&&(e.lineHeight=t.textLineHeight),K(t,`textWidth`)&&(e.width=t.textWidth),K(t,`textHeight`)&&(e.height=t.textHeight),K(t,`textBackgroundColor`)&&(e.backgroundColor=t.textBackgroundColor),K(t,`textPadding`)&&(e.padding=t.textPadding),K(t,`textBorderColor`)&&(e.borderColor=t.textBorderColor),K(t,`textBorderWidth`)&&(e.borderWidth=t.textBorderWidth),K(t,`textBorderRadius`)&&(e.borderRadius=t.textBorderRadius),K(t,`textBoxShadowColor`)&&(e.shadowColor=t.textBoxShadowColor),K(t,`textBoxShadowBlur`)&&(e.shadowBlur=t.textBoxShadowBlur),K(t,`textBoxShadowOffsetX`)&&(e.shadowOffsetX=t.textBoxShadowOffsetX),K(t,`textBoxShadowOffsetY`)&&(e.shadowOffsetY=t.textBoxShadowOffsetY))}function vf(e,t,n){var r=e;r.textPosition=r.textPosition||n.position||`inside`,n.offset!=null&&(r.textOffset=n.offset),n.rotation!=null&&(r.textRotation=n.rotation),n.distance!=null&&(r.textDistance=n.distance);var i=r.textPosition.indexOf(`inside`)>=0,a=e.fill||Z.color.neutral99;yf(r,t);var o=r.textFill==null;return i?o&&(r.textFill=n.insideFill||Z.color.neutral00,!r.textStroke&&n.insideStroke&&(r.textStroke=n.insideStroke),!r.textStroke&&(r.textStroke=a),r.textStrokeWidth??=2):(o&&(r.textFill=e.fill||n.outsideFill||Z.color.neutral00),!r.textStroke&&n.outsideStroke&&(r.textStroke=n.outsideStroke)),r.text=t.text,r.rich=t.rich,J(t.rich,function(e){yf(e,e)}),r}function yf(e,t){t&&(K(t,`fill`)&&(e.textFill=t.fill),K(t,`stroke`)&&(e.textStroke=t.fill),K(t,`lineWidth`)&&(e.textStrokeWidth=t.lineWidth),K(t,`font`)&&(e.font=t.font),K(t,`fontStyle`)&&(e.fontStyle=t.fontStyle),K(t,`fontWeight`)&&(e.fontWeight=t.fontWeight),K(t,`fontSize`)&&(e.fontSize=t.fontSize),K(t,`fontFamily`)&&(e.fontFamily=t.fontFamily),K(t,`align`)&&(e.textAlign=t.align),K(t,`verticalAlign`)&&(e.textVerticalAlign=t.verticalAlign),K(t,`lineHeight`)&&(e.textLineHeight=t.lineHeight),K(t,`width`)&&(e.textWidth=t.width),K(t,`height`)&&(e.textHeight=t.height),K(t,`backgroundColor`)&&(e.textBackgroundColor=t.backgroundColor),K(t,`padding`)&&(e.textPadding=t.padding),K(t,`borderColor`)&&(e.textBorderColor=t.borderColor),K(t,`borderWidth`)&&(e.textBorderWidth=t.borderWidth),K(t,`borderRadius`)&&(e.textBorderRadius=t.borderRadius),K(t,`shadowColor`)&&(e.textBoxShadowColor=t.shadowColor),K(t,`shadowBlur`)&&(e.textBoxShadowBlur=t.shadowBlur),K(t,`shadowOffsetX`)&&(e.textBoxShadowOffsetX=t.shadowOffsetX),K(t,`shadowOffsetY`)&&(e.textBoxShadowOffsetY=t.shadowOffsetY),K(t,`textShadowColor`)&&(e.textShadowColor=t.textShadowColor),K(t,`textShadowBlur`)&&(e.textShadowBlur=t.textShadowBlur),K(t,`textShadowOffsetX`)&&(e.textShadowOffsetX=t.textShadowOffsetX),K(t,`textShadowOffsetY`)&&(e.textShadowOffsetY=t.textShadowOffsetY))}function bf(e,t){if(e.length===t.length){for(var n=0;n<e.length;n++)if(e[n]!==t[n])return;return!0}}function xf(e){for(var t=or(),n=or(),r=0;r<e.length;){var i=e[r++],a=e[r++];qd(i,a)||(oa(t,i),oa(n,a))}return[t,n]}function Sf(e,t){var n=xf(e),r=n[0],i=n[1],a=xf(t),o=a[0],s=a[1];return Math.max(Math.abs(r[0]-o[0]),Math.abs(i[0]-s[0]),Math.abs(r[1]-o[1]),Math.abs(i[1]-s[1]))}function Cf(e){return te(e)?e:e?.5:0}function wf(e,t,n){if(n.valueDim==null)return[];for(var r=t.count(),i=Xd(r*2),a=0;a<r;a++){var o=Kd(n,e,t,a);i[a*2]=o[0],i[a*2+1]=o[1]}return i}function Tf(e,t,n,r,i){var a=n.getBaseAxis(),o=a.dim===`x`||a.dim===`radius`?0:1,s=[],c=0,l=[],u=[],d=[],f=[];if(i){for(c=0;c<e.length;c+=2){var p=t||e;qd(p[c],p[c+1])||f.push(e[c],e[c+1])}e=f}for(c=0;c<e.length-2;c+=2)switch(d[0]=e[c+2],d[1]=e[c+3],u[0]=e[c],u[1]=e[c+1],s.push(u[0],u[1]),r){case`end`:l[o]=d[o],l[1-o]=u[1-o],s.push(l[0],l[1]);break;case`middle`:var m=(u[o]+d[o])/2,h=[];l[o]=h[o]=m,l[1-o]=u[1-o],h[1-o]=d[1-o],s.push(l[0],l[1]),s.push(h[0],h[1]);break;default:l[o]=u[o],l[1-o]=d[1-o],s.push(l[0],l[1])}return s.push(e[c++],e[c++]),s}function Ef(e,t){var n=[],r=e.length,i,a;function o(e,t,n){var r=e.coord;return{coord:n,color:P((n-r)/(t.coord-r),[e.color,t.color])}}for(var s=0;s<r;s++){var c=e[s],l=c.coord;if(l<0)i=c;else if(l>t){a?n.push(o(a,c,t)):i&&n.push(o(i,c,0),o(i,c,t));break}else i&&=(n.push(o(i,c,0)),null),n.push(c),a=c}return n}function Df(e,t,n){var r=e.getVisual(`visualMeta`);if(!(!r||!r.length||!e.count())&&t.type===`cartesian2d`){for(var i,a,o=r.length-1;o>=0;o--){var s=e.getDimensionInfo(r[o].dimension);if(i=s&&s.coordDim,i===`x`||i===`y`){a=r[o];break}}if(a){var c=t.getAxis(i),l=u(a.stops,function(e){return{coord:c.toGlobalCoord(c.dataToCoord(e.value)),color:e.color}}),d=l.length,f=a.outerColors.slice();d&&l[0].coord>l[d-1].coord&&(l.reverse(),f.reverse());var p=Ef(l,i===`x`?n.getWidth():n.getHeight()),m=p.length;if(!m&&d)return l[0].coord<0?f[1]?f[1]:l[d-1].color:f[0]?f[0]:l[0].color;var h=10,g=p[0].coord-h,_=p[m-1].coord+h,v=_-g;if(v<.001)return`transparent`;J(p,function(e){e.offset=(e.coord-g)/v}),p.push({offset:m?p[m-1].offset:.5,color:f[1]||`transparent`}),p.unshift({offset:m?p[0].offset:.5,color:f[0]||`transparent`});var y=new wn(0,0,0,0,p,!0);return y[i]=g,y[i+`2`]=_,y}}}function Of(e,t,n){var r=e.get(`showAllSymbol`),i=r===`auto`;if(!(r&&!i)){var a=n.getAxesByScale(`ordinal`)[0];if(a&&!(i&&kf(a,t))){var o=t.mapDimension(a.dim),s={};return J(a.getViewLabels(),function(e){e.tick.offInterval||(s[Qs(a.scale,e.tick)]=1)}),function(e){return!s.hasOwnProperty(t.get(o,e))}}}}function kf(e,t){var n=e.getExtent(),r=Math.abs(n[1]-n[0])/e.scale.count();isNaN(r)&&(r=0);for(var i=t.count(),a=Math.max(1,Math.round(i/5)),o=0;o<i;o+=a)if(Ld.getSymbolSize(t,o)[+!!e.isHorizontal()]*1.5>r)return!1;return!0}function Af(e){for(var t=e.length/2;t>0&&qd(e[t*2-2],e[t*2-1]);t--);return t-1}function jf(e,t){return[e[t*2],e[t*2+1]]}function Mf(e,t,n){for(var r=e.length/2,i=n===`x`?0:1,a,o,s=0,c=-1,l=0;l<r;l++)if(o=e[l*2+i],!qd(o,e[l*2+1-i])){if(l===0){a=o;continue}if(a<=t&&o>=t||a>=t&&o<=t){c=l;break}s=l,a=o}return{range:[s,c],t:(t-a)/(o-a)}}function Nf(e){if(e.get([`endLabel`,`show`]))return!0;for(var t=0;t<Ui.length;t++)if(e.get([Ui[t],`endLabel`,`show`]))return!0;return!1}function Pf(e,t,n,r){if(pf(t,`cartesian2d`)){var i=r.getModel(`endLabel`),a=i.get(`valueAnimation`),o=r.getData(),s={lastFrameIndex:0},c=Nf(r)?function(n,r){e._endLabelOnDuring(n,r,o,s,a,i,t)}:null,l=t.getBaseAxis().isHorizontal(),u=cf(t,n,r,function(){var t=e._endLabel;t&&n&&s.originalX!=null&&t.attr({x:s.originalX,y:s.originalY})},c);if(!r.get(`clip`,!0)){var d=u.shape,f=Math.max(d.width,d.height);l?(d.y-=f,d.height+=f*2):(d.x-=f,d.width+=f*2)}return c&&c(1,u),u}else return lf(t,n,r)}function Ff(e,t){var n=t.getBaseAxis(),r=n.isHorizontal(),i=n.inverse,a=r?i?`right`:`left`:`center`,o=r?`middle`:i?`top`:`bottom`;return{normal:{align:e.get(`align`)||a,verticalAlign:e.get(`verticalAlign`)||o}}}var If=function(e){L(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.init=function(){var e=new W,t=new Ud;this.group.add(t.group),this._symbolDraw=t,this._lineGroup=e,this._changePolyState=X(this._changePolyState,this)},t.prototype.render=function(e,t,n){var r=e.coordinateSystem,i=this.group,a=e.getData(),o=e.getModel(`lineStyle`),s=e.getModel(`areaStyle`),c=a.getLayout(`points`)||[],l=r.type===`polar`,u=this._coordSys,d=this._symbolDraw,f=this._polyline,p=this._polygon,m=this._lineGroup,h=!t.ssr&&e.get(`animation`),g=!s.isEmpty(),_=s.get(`origin`),v=Wd(r,a,_),y=g&&wf(r,a,v),b=e.get(`showSymbol`),x=e.get(`connectNulls`),S=b&&!l&&Of(e,a,r),C=this._data;C&&C.eachItemGraphicEl(function(e,t){e.__temp&&(i.remove(e),C.setItemGraphicEl(t,null))}),b||d.remove(),i.add(m);var w=l?!1:e.get(`step`),T;r&&r.getArea&&e.get(`clip`,!0)&&(T=r.getArea(),T.width==null?T.r0&&(T.r0-=.5,T.r+=.5):(T.x-=.1,T.y-=.1,T.width+=.2,T.height+=.2)),this._clipShapeForSymbol=T;var E=Df(a,r,n)||a.getVisual(`style`)[a.getVisual(`drawType`)];if(!(f&&u.type===r.type&&w===this._step))b&&d.updateData(a,{isIgnore:S,clipShape:T,disableAnimation:!0,getSymbolPoint:function(e){return[c[e*2],c[e*2+1]]}}),h&&this._initSymbolLabelAnimation(a,r,T),w&&(y&&=Tf(y,c,r,w,x),c=Tf(c,null,r,w,x)),f=this._newPolyline(c),g?p=this._newPolygon(c,y):p&&=(m.remove(p),this._polygon=null),l||this._initOrUpdateEndLabel(e,r,re(E)),m.setClipPath(Pf(this,r,!0,e));else{g&&!p?p=this._newPolygon(c,y):p&&!g&&(m.remove(p),p=this._polygon=null),l||this._initOrUpdateEndLabel(e,r,re(E));var D=m.getClipPath();D?me(D,{shape:Pf(this,r,!1,e).shape},e):m.setClipPath(Pf(this,r,!0,e)),b&&d.updateData(a,{isIgnore:S,clipShape:T,disableAnimation:!0,getSymbolPoint:function(e){return[c[e*2],c[e*2+1]]}}),(!bf(this._stackedOnPoints,y)||!bf(this._points,c))&&(h?this._doUpdateAnimation(a,y,r,n,w,_,x):(w&&(y&&=Tf(y,c,r,w,x),c=Tf(c,null,r,w,x)),f.setShape({points:c}),p&&p.setShape({points:c,stackedOnPoints:y})))}var O=e.getModel(`emphasis`),k=O.get(`focus`),A=O.get(`blurScope`),j=O.get(`disabled`);if(f.useStyle(ai(o.getLineStyle(),{fill:`none`,stroke:E,lineJoin:`bevel`})),la(f,e,`lineStyle`),f.style.lineWidth>0&&e.get([`emphasis`,`lineStyle`,`width`])===`bolder`){var M=f.getState(`emphasis`).style;M.lineWidth=+f.style.lineWidth+1}H(f).seriesIndex=e.seriesIndex,Aa(f,k,A,j);var N=Cf(e.get(`smooth`)),P=e.get(`smoothMonotone`);if(f.setShape({smooth:N,smoothMonotone:P,connectNulls:x}),p){var F=a.getCalculationInfo(`stackedOnSeries`),ee=0;p.useStyle(ai(s.getAreaStyle(),{fill:E,opacity:.7,lineJoin:`bevel`,decal:a.getVisual(`style`).decal})),F&&(ee=Cf(F.get(`smooth`))),p.setShape({smooth:N,stackedOnSmooth:ee,smoothMonotone:P,connectNulls:x}),la(p,e,`areaStyle`),H(p).seriesIndex=e.seriesIndex,Aa(p,k,A,j)}var te=this._changePolyState;a.eachItemGraphicEl(function(e){e&&(e.onHoverStateChange=te)}),this._polyline.onHoverStateChange=te,this._data=a,this._coordSys=r,this._stackedOnPoints=y,this._points=c,this._step=w,this._valueOrigin=_;var ne=e.get(`triggerEvent`),ie=e.get(`triggerLineEvent`),ae=ie===!0||ne===!0||ne===`line`,oe=ie===!0||ne===!0||ne===`area`;this.packEventData(e,f,ae),p&&this.packEventData(e,p,oe)},t.prototype.packEventData=function(e,t,n){H(t).eventData=n?{componentType:`series`,componentSubType:`line`,componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:`line`,selfType:t===this._polygon?`area`:`line`}:null},t.prototype.highlight=function(e,t,n,r){var i=e.getData(),a=er(i,r);if(this._changePolyState(`emphasis`),!(a instanceof Array)&&a!=null&&a>=0){var o=i.getLayout(`points`),s=i.getItemGraphicEl(a);if(!s){var c=o[a*2],l=o[a*2+1];if(qd(c,l)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(c,l))return;var u=e.get(`zlevel`)||0,d=e.get(`z`)||0;s=new Ld(i,a),s.x=c,s.y=l,s.setZ(u,d);var f=s.getSymbolPath().getTextContent();f&&(f.zlevel=u,f.z=d,f.z2=this._polyline.z2+1),s.__temp=!0,i.setItemGraphicEl(a,s),s.stopSymbolAnimation(!0),this.group.add(s)}s.highlight()}else Ot.prototype.highlight.call(this,e,t,n,r)},t.prototype.downplay=function(e,t,n,r){var i=e.getData(),a=er(i,r);if(this._changePolyState(`normal`),a!=null&&a>=0){var o=i.getItemGraphicEl(a);o&&(o.__temp?(i.setItemGraphicEl(a,null),this.group.remove(o)):o.downplay())}else Ot.prototype.downplay.call(this,e,t,n,r)},t.prototype._changePolyState=function(e){var t=this._polygon;jn(this._polyline,e),t&&jn(t,e)},t.prototype._newPolyline=function(e){var t=this._polyline;return t&&this._lineGroup.remove(t),t=new af({shape:{points:e},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(t),this._polyline=t,t},t.prototype._newPolygon=function(e,t){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new sf({shape:{points:e,stackedOnPoints:t},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},t.prototype._initSymbolLabelAnimation=function(e,t,n){var r,i,a=t.getBaseAxis(),o=a.inverse;t.type===`cartesian2d`?(r=a.isHorizontal(),i=!1):t.type===`polar`&&(r=a.dim===`angle`,i=!0);var s=e.hostModel,c=s.get(`animationDuration`);V(c)&&(c=c(null));var l=s.get(`animationDelay`)||0,u=V(l)?l(null):l;e.eachItemGraphicEl(function(e,a){var s=e;if(s){var d=[e.x,e.y],f=void 0,p=void 0,m=void 0;if(n)if(i){var h=n,g=t.pointToCoord(d);r?(f=h.startAngle,p=h.endAngle,m=-g[1]/180*Math.PI):(f=h.r0,p=h.r,m=g[0])}else{var _=n;r?(f=_.x,p=_.x+_.width,m=e.x):(f=_.y+_.height,p=_.y,m=e.y)}var v=p===f?0:(m-f)/(p-f);o&&(v=1-v);var y=V(l)?l(a):c*v+u,b=s.getSymbolPath(),x=b.getTextContent();s.attr({scaleX:0,scaleY:0}),s.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:y}),x&&x.animateFrom({style:{opacity:0}},{duration:300,delay:y}),b.disableLabelAnimation=!0}})},t.prototype._initOrUpdateEndLabel=function(e,t,n){var r=e.getModel(`endLabel`);if(Nf(e)){var i=e.getData(),a=this._polyline,o=i.getLayout(`points`);if(!o){a.removeTextContent(),this._endLabel=null;return}var s=this._endLabel;s||(s=this._endLabel=new j({z2:200}),s.ignoreClip=!0,a.setTextContent(this._endLabel),a.disableLabelAnimation=!0);var c=Af(o);c>=0&&(Lt(a,Un(e,`endLabel`),{inheritColor:n,labelFetcher:e,labelDataIndex:c,defaultText:function(e,t,n){return n==null?Fd(i,e):Id(i,n)},enableTextSetter:!0},Ff(r,t)),a.textConfig.position=null)}else this._endLabel&&=(this._polyline.removeTextContent(),null)},t.prototype._endLabelOnDuring=function(e,t,n,r,i,a,o){var s=this._endLabel,c=this._polyline;if(s){e<1&&r.originalX==null&&(r.originalX=s.x,r.originalY=s.y);var l=n.getLayout(`points`),u=n.hostModel,d=u.get(`connectNulls`),f=a.get(`precision`),p=a.get(`distance`)||0,m=o.getBaseAxis(),h=m.isHorizontal(),g=m.inverse,_=t.shape,v=g?h?_.x:_.y+_.height:h?_.x+_.width:_.y,y=(h?p:0)*(g?-1:1),b=(h?0:-p)*(g?-1:1),x=h?`x`:`y`,S=Mf(l,v,x),C=S.range,w=C[1]-C[0],T=void 0;if(w>=1){if(w>1&&!d){var E=jf(l,C[0]);s.attr({x:E[0]+y,y:E[1]+b}),i&&(T=u.getRawValue(C[0]))}else{var E=c.getPointOn(v,x);E&&s.attr({x:E[0]+y,y:E[1]+b});var D=u.getRawValue(C[0]),O=u.getRawValue(C[1]);i&&(T=Ki(n,f,D,O,S.t))}r.lastFrameIndex=C[0]}else{var k=e===1||r.lastFrameIndex>0?C[0]:0,E=jf(l,k);i&&(T=u.getRawValue(k)),s.attr({x:E[0]+y,y:E[1]+b})}if(i){var A=xa(s);typeof A.setLabelText==`function`&&A.setLabelText(T)}}},t.prototype._doUpdateAnimation=function(e,t,n,r,i,a,o){var s=this._polyline,c=this._polygon,l=e.hostModel,u=$d(this._data,e,this._stackedOnPoints,t,this._coordSys,n,this._valueOrigin,a),d=u.current,f=u.stackedOnCurrent,p=u.next,m=u.stackedOnNext;if(i&&(f=Tf(u.stackedOnCurrent,u.current,n,i,o),d=Tf(u.current,null,n,i,o),m=Tf(u.stackedOnNext,u.next,n,i,o),p=Tf(u.next,null,n,i,o)),Sf(d,p)>3e3||c&&Sf(f,m)>3e3){s.stopAnimation(),s.setShape({points:p}),c&&(c.stopAnimation(),c.setShape({points:p,stackedOnPoints:m}));return}s.shape.__points=u.current,s.shape.points=d;var h={shape:{points:p}};u.current!==d&&(h.shape.__points=u.next),s.stopAnimation(),yn(s,h,l),c&&(c.setShape({points:d,stackedOnPoints:f}),c.stopAnimation(),yn(c,{shape:{stackedOnPoints:m}},l),s.shape.points!==c.shape.points&&(c.shape.points=s.shape.points));for(var g=[],_=u.status,v=0;v<_.length;v++)if(_[v].cmd===`=`){var y=e.getItemGraphicEl(_[v].idx1);y&&g.push({el:y,ptIdx:v})}s.animators&&s.animators.length&&s.animators[0].during(function(){c&&c.dirtyShape();for(var e=s.shape.__points,t=0;t<g.length;t++){var n=g[t].el,r=g[t].ptIdx*2;n.x=e[r],n.y=e[r+1],n.markRedraw()}})},t.prototype.remove=function(e){var t=this.group,n=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),n&&n.eachItemGraphicEl(function(e,r){e.__temp&&(t.remove(e),n.setItemGraphicEl(r,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._endLabel=this._data=null},t.type=`line`,t}(Ot);function Lf(e,t){return{seriesType:e,plan:Ma(),reset:function(e){var n=e.getData(),r=e.coordinateSystem,i=e.pipelineContext,a=t||i.large;if(r){var o=u(r.dimensions,function(e){return n.mapDimension(e)}).slice(0,2),s=o.length,c=n.getCalculationInfo(`stackResultDimension`);jo(n,o[0])&&(o[0]=c),jo(n,o[1])&&(o[1]=c);var l=n.getStore(),d=n.getDimensionIndex(o[0]),f=n.getDimensionIndex(o[1]);return s&&{progress:function(e,t){for(var n=e.end-e.start,i=a&&Xd(n*s),o=[],c=[],u=e.start,p=0;u<e.end;u++){var m=void 0;if(s===1){var h=l.get(d,u);m=r.dataToPoint(h,null,c)}else o[0]=l.get(d,u),o[1]=l.get(f,u),m=r.dataToPoint(o,null,c);a?(i[p++]=m[0],i[p++]=m[1]):t.setItemLayout(u,m.slice())}a&&(t.setLayout(`points`,i),t.setLayout(`pointsRange`,{start:e.start,end:e.end}))}}}}}}var Rf={average:function(e){for(var t=0,n=0,r=0;r<e.length;r++)isNaN(e[r])||(t+=e[r],n++);return n===0?NaN:t/n},sum:function(e){for(var t=0,n=0;n<e.length;n++)t+=e[n]||0;return t},max:function(e){for(var t=-1/0,n=0;n<e.length;n++)e[n]>t&&(t=e[n]);return isFinite(t)?t:NaN},min:function(e){for(var t=1/0,n=0;n<e.length;n++)e[n]<t&&(t=e[n]);return isFinite(t)?t:NaN},nearest:function(e){return e[0]}},zf=function(e){return Math.round(e.length/2)};function Bf(e){return{seriesType:e,reset:function(e,t,n){var r=e.getData(),i=e.get(`sampling`),a=e.coordinateSystem,o=r.count();if(o>10&&a.type===`cartesian2d`&&i){var s=a.getBaseAxis(),c=a.getOtherAxis(s),l=s.getExtent(),u=n.getDevicePixelRatio(),d=Math.abs(l[1]-l[0])*(u||1),f=Math.round(o/d);if(isFinite(f)&&f>1){i===`lttb`?e.setData(r.lttbDownSample(r.mapDimension(c.dim),1/f)):i===`minmax`&&e.setData(r.minmaxDownSample(r.mapDimension(c.dim),1/f));var p=void 0;R(i)?p=Rf[i]:V(i)&&(p=i),p&&e.setData(r.downSample(r.mapDimension(c.dim),1/f,p,zf))}}}}}function Vf(e){e.registerChartView(If),e.registerSeriesModel(Pd),e.registerLayout(Lf(`line`,!0)),e.registerVisual({seriesType:`line`,reset:function(e){var t=e.getData(),n=e.getModel(`lineStyle`).getLineStyle();n&&!n.stroke&&(n.stroke=t.getVisual(`style`).fill),t.setVisual(`legendLineStyle`,n)}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,Bf(`line`))}var Hf=function(e){L(t,e);function t(t,n,r,i,a){var o=e.call(this,t,n,r)||this;return o.index=0,o.type=i||`value`,o.position=a||`bottom`,o}return t.prototype.isHorizontal=function(){var e=this.position;return e===`top`||e===`bottom`},t.prototype.getGlobalExtent=function(e){var t=this.getExtent();return t[0]=this.toGlobalCoord(t[0]),t[1]=this.toGlobalCoord(t[1]),e&&t[0]>t[1]&&t.reverse(),t},t.prototype.pointToData=function(e,t){return this.coordToData(this.toLocalCoord(e[this.dim===`x`?0:1]),t)},t.prototype.setCategorySortInfo=function(e){if(this.type!==`category`)return!1;this.model.option.categorySortInfo=e,this.scale.setSortInfo(e)},t}(Cl),Uf=null;function Wf(){return Uf}var Gf=`expandAxisBreak`,Kf=Math.PI,qf=[[1,2,1,2],[5,3,5,3],[8,3,8,3]],Jf=[[0,1,0,1],[0,3,0,3],[0,3,0,3]],Yf=$(),Xf=$(),Zf=function(){function e(e){this.recordMap={},this.resolveAxisNameOverlap=e}return e.prototype.ensureRecord=function(e){var t=e.axis.dim,n=e.componentIndex,r=this.recordMap,i=r[t]||(r[t]=[]);return i[n]||(i[n]={ready:{}})},e}();function Qf(e,t,n,r){var i=n.axis,a=t.ensureRecord(n),o=[],s,c=Sp(e.axisName)&&qs(e.nameLocation);J(r,function(e){var t=Kl(e);if(!(!t||t.label.ignore)){o.push(t);var n=a.transGroup;c&&(n.transform?rn($f,n.transform):Gt($f),t.transform&&fe($f,$f,t.transform),Te.copy(ep,t.localRect),ep.applyTransform($f),s?s.union(ep):Te.copy(s=new Te(0,0,0,0),ep))}});var l=Math.abs(a.dirVec.x)>.1?`x`:`y`,u=a.transGroup[l];if(o.sort(function(e,t){return Math.abs(e.label[l]-u)-Math.abs(t.label[l]-u)}),c&&s){var d=i.getExtent(),f=Math.min(d[0],d[1]),p=Math.max(d[0],d[1])-f;s.union(new Te(f,0,p,1))}a.stOccupiedRect=s,a.labelInfoList=o}var $f=ye(),ep=new Te(0,0,0,0),tp=function(e,t,n,r,i,a){if(qs(e.nameLocation)){var o=a.stOccupiedRect;o&&np(Yl({},o,a.transGroup.transform),r,i)}else rp(a.labelInfoList,a.dirVec,r,i)};function np(e,t,n){var r=new Zt;tu(e,t,r,{direction:Math.atan2(n.y,n.x),bidirectional:!1,touchThreshold:.05})&&Xl(t,r)}function rp(e,t,n,r){for(var i=Zt.dot(r,t)>=0,a=0,o=e.length;a<o;a++){var s=e[i?a:o-1-a];s.label.ignore||np(s,n,r)}}var ip=function(){function e(e,t,n,r){this.group=new W,this._axisModel=e,this._api=t,this._local={},this._shared=r||new Zf(tp),this._resetCfgDetermined(n)}return e.prototype.updateCfg=function(e){var t=this._cfg.raw;t.position=e.position,t.labelOffset=e.labelOffset,this._resetCfgDetermined(t)},e.prototype.__getRawCfg=function(){return this._cfg.raw},e.prototype._resetCfgDetermined=function(e){var t=this._axisModel,n=t.getDefaultOption?t.getDefaultOption():{},r=z(e.axisName,t.get(`name`)),i=t.get(`nameMoveOverlap`);(i==null||i===`auto`)&&(i=z(e.defaultNameMoveOverlap,!0));var a={raw:e,position:e.position,rotation:e.rotation,nameDirection:z(e.nameDirection,1),tickDirection:z(e.tickDirection,1),labelDirection:z(e.labelDirection,1),labelOffset:z(e.labelOffset,0),silent:z(e.silent,!0),axisName:r,nameLocation:Ia(t.get(`nameLocation`),n.nameLocation,`end`),shouldNameMoveOverlap:Sp(r)&&i,optionHideOverlap:t.get([`axisLabel`,`hideOverlap`]),showMinorTicks:t.get([`minorTick`,`show`])};this._cfg=a;var o=new W({x:a.position[0],y:a.position[1],rotation:a.rotation});o.updateTransform(),this._transformGroup=o;var s=this._shared.ensureRecord(t);s.transGroup=this._transformGroup,s.dirVec=new Zt(Math.cos(-a.rotation),Math.sin(-a.rotation))},e.prototype.build=function(e,t){var n=this;return e||={axisLine:!0,axisTickLabelEstimate:!1,axisTickLabelDetermine:!0,axisName:!0},J(ap,function(r){e[r]&&op[r](n._cfg,n._local,n._shared,n._axisModel,n.group,n._transformGroup,n._api,t||{})}),this},e.innerTextLayout=function(e,t,n){var r=ki(t-e),i,a;return dt(r)?(a=n>0?`top`:`bottom`,i=`center`):dt(r-Kf)?(a=n>0?`bottom`:`top`,i=`center`):(a=`middle`,i=r>0&&r<Kf?n>0?`right`:`left`:n>0?`left`:`right`),{rotation:r,textAlign:i,textVerticalAlign:a}},e.makeAxisEventDataBase=function(e){var t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+`Index`]=e.componentIndex,t},e.isLabelSilent=function(e){var t=e.get(`tooltip`);return e.get(`silent`)||!(e.get(`triggerEvent`)||t&&t.show)},e}(),ap=[`axisLine`,`axisTickLabelEstimate`,`axisTickLabelDetermine`,`axisName`],op={axisLine:function(e,t,n,r,i,a,o){var s=r.get([`axisLine`,`show`]);if(s===`auto`&&(s=!0,e.raw.axisLineAutoShow!=null&&(s=!!e.raw.axisLineAutoShow)),s){var c=r.axis.getExtent(),l=a.transform,u=[c[0],0],d=[c[1],0],f=u[0]>d[0];l&&(di(u,u,l),di(d,d,l));var p=G({lineCap:`round`},r.getModel([`axisLine`,`lineStyle`]).getLineStyle()),m={strokeContainThreshold:e.raw.strokeContainThreshold||5,silent:!0,z2:1,style:p};if(r.get([`axisLine`,`breakLine`])&&ea(r.axis.scale))Wf().buildAxisBreakLine(r,i,a,m);else{var h=new lr(G({shape:{x1:u[0],y1:u[1],x2:d[0],y2:d[1]}},m));g(h.shape,h.style.lineWidth),h.anid=`line`,i.add(h)}var _=r.get([`axisLine`,`symbol`]);if(_!=null){var v=r.get([`axisLine`,`symbolSize`]);R(_)&&(_=[_,_]),(R(v)||te(v))&&(v=[v,v]);var y=Pt(r.get([`axisLine`,`symbolOffset`])||0,v),b=v[0],x=v[1];J([{rotate:e.rotation+Math.PI/2,offset:y[0],r:0},{rotate:e.rotation-Math.PI/2,offset:y[1],r:Math.sqrt((u[0]-d[0])*(u[0]-d[0])+(u[1]-d[1])*(u[1]-d[1]))}],function(t,n){if(_[n]!==`none`&&_[n]!=null){var r=va(_[n],-b/2,-x/2,b,x,p.stroke,!0),a=t.r+t.offset,o=f?d:u;r.attr({rotation:t.rotate,x:o[0]+a*Math.cos(e.rotation),y:o[1]-a*Math.sin(e.rotation),silent:!0,z2:11}),i.add(r)}})}}},axisTickLabelEstimate:function(e,t,n,r,i,a,o,s){hp(t,i,s)&&sp(e,t,n,r,i,a,o,Qc.estimate)},axisTickLabelDetermine:function(e,t,n,r,i,a,o,s){hp(t,i,s)&&sp(e,t,n,r,i,a,o,Qc.determine);var c=pp(e,i,a,r);up(e,t.labelLayoutList,c),mp(e,i,a,r,e.tickDirection)},axisName:function(e,t,n,r,i,a,o,s){var c=n.ensureRecord(r);t.nameEl&&=(i.remove(t.nameEl),c.nameLayout=c.nameLocation=null);var l=e.axisName;if(Sp(l)){var u=e.nameLocation,d=e.nameDirection,f=r.getModel(`nameTextStyle`),p=r.get(`nameGap`)||0,m=r.axis.getExtent(),h=r.axis.inverse?-1:1,g=new Zt(0,0),_=new Zt(0,0);u===`start`?(g.x=m[0]-h*p,_.x=-h):u===`end`?(g.x=m[1]+h*p,_.x=h):(g.x=(m[0]+m[1])/2,g.y=e.labelOffset+d*p,_.y=d);var v=ye();_.transform(Le(v,v,e.rotation));var y=r.get(`nameRotate`);y!=null&&(y=y*Kf/180);var b,x;qs(u)?b=ip.innerTextLayout(e.rotation,y??e.rotation,d):(b=cp(e.rotation,u,y||0,m),x=e.raw.axisNameAvailableWidth,x!=null&&(x=Math.abs(x/Math.sin(b.rotation)),!isFinite(x)&&(x=null)));var S=f.getFont(),C=r.get(`nameTruncate`,!0)||{},w=C.ellipsis,T=Ke(e.raw.nameTruncateMaxWidth,C.maxWidth,x),E=s.nameMarginLevel||0,D=new j({x:g.x,y:g.y,rotation:b.rotation,silent:ip.isLabelSilent(r),style:sa(f,{text:l,font:S,overflow:`truncate`,width:T,ellipsis:w,fill:f.getTextColor()||r.get([`axisLine`,`lineStyle`,`color`]),align:f.get(`align`)||b.textAlign,verticalAlign:f.get(`verticalAlign`)||b.textVerticalAlign}),z2:1});if(Fa({el:D,componentModel:r,itemName:l}),D.__fullText=l,D.anid=`name`,r.get(`triggerEvent`)){var O=ip.makeAxisEventDataBase(r);O.targetType=`axisName`,O.name=l,H(D).eventData=O}a.add(D),D.updateTransform(),t.nameEl=D;var k=c.nameLayout=Kl({label:D,priority:D.z2,defaultAttr:{ignore:D.ignore},marginDefault:qs(u)?qf[E]:Jf[E]});if(c.nameLocation=u,i.add(D),D.decomposeTransform(),e.shouldNameMoveOverlap&&k){var A=n.ensureRecord(r);n.resolveAxisNameOverlap(e,n,r,k,_,A)}}}};function sp(e,t,n,r,i,a,o,s){_p(t)||gp(e,t,i,s,r,o);var c=t.labelLayoutList;yp(e,r,c,a),wp(r,e.rotation,c);var l=e.optionHideOverlap;lp(r,c,l),l&&eu(ca(c,function(e){return e&&!e.label.ignore})),Qf(e,n,r,c)}function cp(e,t,n,r){var i=ki(n-e),a,o,s=r[0]>r[1],c=t===`start`&&!s||t!==`start`&&s;return dt(i-Kf/2)?(o=c?`bottom`:`top`,a=`center`):dt(i-Kf*1.5)?(o=c?`top`:`bottom`,a=`center`):(o=`middle`,a=i<Kf*1.5&&i>Kf/2?c?`left`:`right`:c?`right`:`left`),{rotation:i,textAlign:a,textVerticalAlign:o}}function lp(e,t,n){var r=e.axis,i=e.get([`axisLabel`,`customValues`]);if(Gs(r))return;function a(e,a,o){var s=Kl(t[a]),c=Kl(t[o]),l=r.scale;if(!(!s||!c)){if(e==null){if(!n&&i)return;var u=Yf(s.label).labelInfo.tick;if(ts(l)&&u.notNice||rs(l)&&u.offInterval){dp(s.label);return}}if(e===!1||s.suggestIgnore){dp(s.label);return}if(c.suggestIgnore){dp(c.label);return}var d=.1;if(!n){var f=[0,0,0,0];s=Zl({marginForce:f},s),c=Zl({marginForce:f},c)}tu(s,c,null,{touchThreshold:d})&&dp(e?c.label:s.label)}}var o=e.get([`axisLabel`,`showMinLabel`]),s=e.get([`axisLabel`,`showMaxLabel`]),c=t.length;a(o,0,1),a(s,c-1,c-2)}function up(e,t,n){e.showMinorTicks||J(t,function(e){if(e&&e.label.ignore)for(var t=0;t<n.length;t++){var r=n[t],i=Xf(r),a=Yf(e.label);if(i.tickValue!=null&&!i.onBand&&i.tickValue===a.labelInfo.tick.value){dp(r);return}}})}function dp(e){e&&(e.ignore=!0)}function fp(e,t,n,r,i){for(var a=[],o=[],s=[],c=0;c<e.length;c++){var l=e[c].coord;o[0]=l,o[1]=0,s[0]=l,s[1]=n,t&&(di(o,o,t),di(s,s,t));var u=new lr({shape:{x1:o[0],y1:o[1],x2:s[0],y2:s[1]},style:r,z2:2,autoBatch:!0,silent:!0});g(u.shape,u.style.lineWidth),u.anid=i+`_`+e[c].tickValue,a.push(u);var d=Xf(u);d.onBand=!!e[c].onBand,d.tickValue=e[c].tickValue}return a}function pp(e,t,n,r){var i=r.axis,a=r.getModel(`axisTick`),o=a.get(`show`);if(o===`auto`&&(o=!0,e.raw.axisTickAutoShow!=null&&(o=!!e.raw.axisTickAutoShow)),!o||i.scale.isBlank())return[];for(var s=a.getModel(`lineStyle`),c=e.tickDirection*a.get(`length`),l=fp(i.getTicksCoords(),n.transform,c,ai(s.getLineStyle(),{stroke:r.get([`axisLine`,`lineStyle`,`color`])}),`ticks`),u=0;u<l.length;u++)t.add(l[u]);return l}function mp(e,t,n,r,i){var a=r.axis,o=r.getModel(`minorTick`);if(!(!e.showMinorTicks||a.scale.isBlank())){var s=a.getMinorTicksCoords();if(s.length)for(var c=o.getModel(`lineStyle`),l=i*o.get(`length`),u=ai(c.getLineStyle(),ai(r.getModel(`axisTick`).getLineStyle(),{stroke:r.get([`axisLine`,`lineStyle`,`color`])})),d=0;d<s.length;d++)for(var f=fp(s[d],n.transform,l,u,`minorticks_`+d),p=0;p<f.length;p++)t.add(f[p])}}function hp(e,t,n){if(_p(e)){var r=e.axisLabelsCreationContext.out.noPxChangeTryDetermine;if(n.noPxChange){for(var i=!0,a=0;a<r.length;a++)i&&=r[a]();if(i)return!1}r.length&&(t.remove(e.labelGroup),vp(e,null,null,null))}return!0}function gp(e,t,n,r,i,a){var o=i.axis,s=Ke(e.raw.axisLabelShow,i.get([`axisLabel`,`show`])),c=new W;n.add(c);var l=$c(r);if(!s||o.scale.isBlank()){vp(t,[],c,l);return}var d=i.getModel(`axisLabel`),f=o.getViewLabels(l),p=(Ke(e.raw.labelRotate,d.get(`rotate`))||0)*Kf/180,m=ip.innerTextLayout(e.rotation,p,e.labelDirection),h=i.getCategories&&i.getCategories(!0),g=[],_=i.get(`triggerEvent`),v=1/0,y=-1/0;J(f,function(e,t){var n=e.tick,r=e.formattedLabel,s=e.rawLabel,l=d,u=Qs(o.scale,n);if(h&&h[u]){var p=h[u];A(p)&&p.textStyle&&(l=new ii(p.textStyle,d,i.ecModel))}var b=l.getTextColor()||i.get([`axisLine`,`lineStyle`,`color`]),x=l.getShallow(`align`,!0)||m.textAlign,S=z(l.getShallow(`alignMinLabel`,!0),x),C=z(l.getShallow(`alignMaxLabel`,!0),x),w=l.getShallow(`verticalAlign`,!0)||l.getShallow(`baseline`,!0)||m.textVerticalAlign,T=z(l.getShallow(`verticalAlignMinLabel`,!0),w),E=z(l.getShallow(`verticalAlignMaxLabel`,!0),w),D=10+(n.time?.level||0);v=Math.min(v,D),y=Math.max(y,D);var O=new j({x:0,y:0,rotation:0,silent:ip.isLabelSilent(i),z2:D,style:sa(l,{text:r,align:t===0?S:t===f.length-1?C:x,verticalAlign:t===0?T:t===f.length-1?E:w,fill:V(b)?b(o.type===`category`?s:o.type===`value`?u+``:u,t):b})});O.anid=`label_`+u;var k=Yf(O);if(k.labelInfo=e,k.layoutRotation=m.rotation,Fa({el:O,componentModel:i,itemName:r,formatterParamsExtra:{isTruncated:function(){return O.isTruncated},value:s,tickIndex:t}}),_){var M=ip.makeAxisEventDataBase(i);M.targetType=`axisLabel`,M.value=s,M.tickIndex=t;var N=e.tick.break;if(N){var P=N.parsedBreak;M.break={start:P.vmin,end:P.vmax}}o.type===`category`&&(M.dataIndex=u),H(O).eventData=M,N&&Cp(i,a,O,N)}g.push(O),c.add(O)}),vp(t,u(g,function(e){return{label:e,priority:Yf(e).labelInfo.tick.break?e.z2+(y-v+1):e.z2,defaultAttr:{ignore:e.ignore}}}),c,l)}function _p(e){return!!e.labelLayoutList}function vp(e,t,n,r){e.labelLayoutList=t,e.labelGroup=n,e.axisLabelsCreationContext=r}function yp(e,t,n,r){var i=t.get([`axisLabel`,`margin`]);J(n,function(n,a){var o=Kl(n);if(o){var s=o.label,c=Yf(s);o.suggestIgnore=s.ignore,s.ignore=!1,jr(bp,xp);var l=t.axis;bp.x=l.dataToCoord(Qs(l.scale,c.labelInfo.tick)),bp.y=e.labelOffset+e.labelDirection*i,bp.rotation=c.layoutRotation,r.add(bp),bp.updateTransform(),r.remove(bp),bp.decomposeTransform(),jr(s,bp),s.markRedraw(),Wl(o,!0),Kl(o)}})}var bp=new d,xp=new d;function Sp(e){return!!e}function Cp(e,t,n,r){n.on(`click`,function(n){var i={type:Gf,breaks:[{start:r.parsedBreak.breakOption.start,end:r.parsedBreak.breakOption.end}]};i[e.axis.dim+`AxisIndex`]=e.componentIndex,t.dispatchAction(i)})}function wp(e,t,n){var r=$r();if(r){var i=r.retrieveAxisBreakPairs(n,function(e){return e&&Yf(e.label).labelInfo.tick.break},!0),a=e.get([`breakLabelLayout`,`moveOverlap`],!0);(a===!0||a===`auto`)&&J(i,function(r){Wf().adjustBreakLabelPair(e.axis.inverse,t,[Kl(n[r[0]]),Kl(n[r[1]])])})}}function Tp(e,t,n){n||={};var r=t.axis,i={},a=r.getAxesOnZeroOf()[0],o=r.position,s=a?`onZero`:o,c=r.dim,l=[e.x,e.x+e.width,e.y,e.y+e.height],u={left:0,right:1,top:0,bottom:1,onZero:2},d=t.get(`offset`)||0,f=c===`x`?[l[2]-d,l[3]+d]:[l[0]-d,l[1]+d];if(a){var p=a.toGlobalCoord(a.dataToCoord(0));f[u.onZero]=Math.max(Math.min(p,f[1]),f[0])}i.position=[c===`y`?f[u[s]]:l[0],c===`x`?f[u[s]]:l[3]],i.rotation=Math.PI/2*(c===`x`?0:1),i.labelDirection=i.tickDirection=i.nameDirection={top:-1,bottom:1,left:-1,right:1}[o],i.labelOffset=a?f[u[o]]-f[u.onZero]:0,t.get([`axisTick`,`inside`])&&(i.tickDirection=-i.tickDirection),Ke(n.labelInside,t.get([`axisLabel`,`inside`]))&&(i.labelDirection=-i.labelDirection);var m=t.get([`axisLabel`,`rotate`]);return i.labelRotate=s===`top`?-m:m,i.z2=1,i}function Ep(e){return e.coordinateSystem&&e.coordinateSystem.type===`cartesian2d`}function Dp(e){var t={xAxisModel:null,yAxisModel:null};return J(t,function(n,r){var i=r.replace(/Model$/,``);t[r]=e.getReferringComponents(i,Jt).models[0]}),t}function Op(e,t,n,r,i,a){for(var o=Tp(e,n),s=!1,c=!1,l=0;l<t.length;l++)$o(t[l].getOtherAxis(n.axis).scale)&&(s=c=!0,n.axis.type===`category`&&n.axis.onBand&&(c=!1));return o.axisLineAutoShow=s,o.axisTickAutoShow=c,o.defaultNameMoveOverlap=a,new ip(n,r,o,i)}function kp(e,t,n){var r=Tp(t,n);e.updateCfg(r)}function Ap(){gc(`liPosMinGap`,jp)}function jp(e,t,n){var r=q(),i=n.serUids,a=n.liPosMinGap,o,s=t.axis,c=s.scale,l=c.needTransform(),u=c.getFilter?c.getFilter():null,d=gn(u);function f(n){dc(e,t.sers,function(e){var t=e.getRawData(),r=t.getDimensionIndex(t.mapDimension(s.dim));r>=0&&n(r,e,t.getStore())})}var p=0;if(f(function(e,t,n){r.set(t.uid,1),(!i||!i.hasKey(t.uid))&&(o=!0),p+=n.count()}),(!i||i.keys().length!==r.keys().length)&&(o=!0),!o&&a!=null){t.liPosMinGap=a;return}Zd(Mp,p);var m=0;f(function(e,t,n){for(var r=0,i=n.count();r<i;++r){var a=n.get(e,r);isFinite(a)&&(!u||un(d,a))&&(l&&(a=c.transformIn(a,null)),Mp.arr[m++]=a)}});var h=Mp.typed?Mp.arr.subarray(0,m):(Mp.arr.length=m,Mp.arr);Mp.typed?h.sort():S(h);for(var g=1/0,_=1;_<m;++_){var v=h[_]-h[_-1];v>0&&v<g&&(g=v)}n.liPosMinGap=t.liPosMinGap=O(g)?g:m>0?-2:-1,n.serUids=r}var Mp=Zd({ctor:Yd},50);function Np(e){return function(t,n){var r=yl(t,{fromStat:{key:e}});if(O(r.w2))return[-r.w2/2,r.w2/2]}}function Pp(e){return e+`|&`}function Fp(e,t){return e+`|&`+t}function Ip(e){return Ap(),{liPosMinGap:!rs(e.scale)}}function Lp(e,t,n,r){bc(e,{key:t,seriesType:n,coordSysType:r,getMetrics:Ip})}function Rp(e){return e.scale.rawExtentInfo.makeRenderInfo().startValue}var zp={left:0,right:0,top:0,bottom:0},Bp=[`25%`,`25%`],Vp=`cartesian2d`,Hp=function(e){L(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.mergeDefaultAndTheme=function(t,n){var r=kr(t.outerBounds);e.prototype.mergeDefaultAndTheme.apply(this,arguments),r&&t.outerBounds&&Mn(t.outerBounds,r)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.apply(this,arguments),this.option.outerBounds&&t.outerBounds&&Mn(this.option.outerBounds,t.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:zp,outerBoundsContain:`all`,outerBoundsClampWidth:Bp[0],outerBoundsClampHeight:Bp[1],backgroundColor:Z.color.transparent,borderWidth:1,borderColor:Z.color.neutral30},t}(ra),Up=gi(),Wp=`__ec_stack_`;function Gp(e){return e.get(`stack`)||Wp+e.seriesIndex}function Kp(e){if(rs(e.axis.scale)){for(var t=yl(e.axis),n=[],r=0;r<e.count;r++)n.push(ai({stackId:Wp+r},e));for(var i=Yp({bandWidthResult:t,seriesInfo:n}),a=[],r=0;r<e.count;r++){var o=i[Wp+r];o.offsetCenter=o.offset+o.width/2,a.push(o)}return a}}function qp(e,t){var n=Jp(e,t);return n.columnMap=Yp(n),n}function Jp(e,t){var n=Fp(t,Vp),r=[],i=yl(e,{fromStat:{key:n},min:1});return uc(e,n,function(e){r.push({barWidth:U(e.get(`barWidth`),i.w),barMaxWidth:U(e.get(`barMaxWidth`),i.w),barMinWidth:U(e.get(`barMinWidth`)||(Qp(e)?.5:1),i.w),barGap:e.get(`barGap`),barCategoryGap:e.get(`barCategoryGap`),defaultBarGap:e.get(`defaultBarGap`),stackId:Gp(e)})}),{bandWidthResult:i,seriesInfo:r}}function Yp(e){var t=e.bandWidthResult.w,n=t,r=0,i,a,o=[],s={};J(e.seriesInfo,function(e,t){t||(a=e.defaultBarGap||0);var c=e.stackId;K(s,c)||r++;var l=s[c];l||(l=s[c]={width:0,maxWidth:0},o.push(c));var u=e.barWidth;u&&!l.width&&(l.width=u,u=oe(n,u),n-=u);var d=e.barMaxWidth;d&&(l.maxWidth=d);var f=e.barMinWidth;f&&(l.minWidth=f);var p=e.barGap;p!=null&&(a=p);var m=e.barCategoryGap;m!=null&&(i=m)}),i??=_t(35-o.length*4,15)+`%`;var c=U(i,t),l=U(a,1),u=(n-c)/(r+(r-1)*l);u=_t(u,0),J(o,function(e){var t=s[e],i=t.maxWidth,a=t.minWidth;if(t.width){var o=t.width;i&&(o=oe(o,i)),a&&(o=_t(o,a)),t.width=o,n-=o+l*o,r--}else{var o=u;i&&i<o&&(o=oe(i,n)),a&&a>o&&(o=a),o!==u&&(t.width=o,n-=o+l*o,r--)}}),u=(n-c)/(r+(r-1)*l),u=_t(u,0);var d=0,f;J(o,function(e){var t=s[e];t.width||=u,f=t,d+=t.width*(1+l)}),f&&(d-=f.width*l);var p={},m=-d/2;return J(o,function(e){var n=s[e];p[e]=p[e]||{bandWidth:t,offset:m,width:n.width},m+=n.width*(1+l)}),p}function Xp(e){return{seriesType:e,overallReset:function(t){var n=Fp(e,Vp);pc(t,n,function(t){var r=qp(t,e);uc(t,n,function(e){var t=r.columnMap[Gp(e)];e.getData().setLayout({bandWidth:t.bandWidth,offset:t.offset,size:t.width})})})}}}function Zp(e){return{seriesType:e,plan:Ma(),reset:function(e){if(Ep(e)){var t=e.getData(),n=e.coordinateSystem,r=n.getBaseAxis(),i=n.getOtherAxis(r),a=t.getDimensionIndex(t.mapDimension(i.dim)),o=t.getDimensionIndex(t.mapDimension(r.dim)),s=e.get(`showBackground`,!0),l=t.mapDimension(i.dim),u=t.getCalculationInfo(`stackResultDimension`),d=jo(t,l)&&!!t.getCalculationInfo(`stackedOnSeries`),f=i.isHorizontal(),p=i.toGlobalCoord(i.dataToCoord(Rp(i))),m=Qp(e),h=e.get(`barMinHeight`)||0,g=u&&t.getDimensionIndex(u),_=t.getLayout(`size`),v=t.getLayout(`offset`);return{progress:function(e,t){for(var r=e.count,i=m&&Xd(r*3),l=m&&s&&Xd(r*3),u=m&&Xd(r),y=n.master.getRect(),b=f?y.width:y.height,x,S=t.getStore(),C=0;(x=e.next())!=null;){var w=S.get(d?g:a,x),T=S.get(o,x),E=p,D=void 0;d&&(D=+w-S.get(a,x));var O=void 0,k=void 0,A=void 0,j=void 0;if(f){var M=n.dataToPoint([w,T]);d&&(E=n.dataToPoint([D,T])[0]),O=E,k=M[1]+v,A=M[0]-E,j=_,c(A)<h&&(A=(A<0?-1:1)*h)}else{var M=n.dataToPoint([T,w]);d&&(E=n.dataToPoint([T,D])[1]),O=M[0]+v,k=E,A=_,j=M[1]-E,c(j)<h&&(j=(j<=0?-1:1)*h)}m?(i[C]=O,i[C+1]=k,i[C+2]=f?A:j,l&&(l[C]=f?y.x:O,l[C+1]=f?k:y.y,l[C+2]=b),u[x]=x):t.setItemLayout(x,{x:O,y:k,width:A,height:j}),C+=3}m&&t.setLayout({largePoints:i,largeDataIndices:u,largeBackgroundPoints:l,valueAxisHorizontal:f})}}}}}}function Qp(e){return e.pipelineContext&&e.pipelineContext.large}function $p(e){return Np(Fp(e,Vp))}function em(e){Up(e,function(){function t(t){var n=Fp(t,Vp);Lp(e,n,t,Vp),Fc(n,$p(t))}t(`bar`),t(`pictorialBar`)})}var tm=function(e){L(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.getInitialData=function(e,t){return Fo(null,this,{useEncodeDefaulter:!0})},t.prototype.getMarkerPosition=function(e,t,n){var r=this.coordinateSystem;if(r&&r.clampData){var i=r.clampData(e),a=r.dataToPoint(i);if(n)J(r.getAxes(),function(e,n){if(e.type===`category`&&t!=null){var r=e.getTicksCoords(),o=e.getTickModel().get(`alignWithLabel`),s=i[n],c=t[n]===`x1`||t[n]===`y1`;if(c&&!o&&(s+=1),r.length<2)return;if(r.length===2){a[n]=e.toGlobalCoord(e.getExtent()[+!!c]);return}for(var l=void 0,u=void 0,d=1,f=0;f<r.length;f++){var p=r[f].coord,m=f===r.length-1?r[f-1].tickValue+d:r[f].tickValue;if(m===s){u=p;break}else if(m<s)l=p;else if(l!=null&&m>s){u=(p+l)/2;break}f===1&&(d=m-r[0].tickValue)}u??(l?l&&(u=r[r.length-1].coord):u=r[0].coord),a[n]=e.toGlobalCoord(u)}});else{var o=this.getData(),s=o.getLayout(`offset`),c=o.getLayout(`size`),l=+!r.getBaseAxis().isHorizontal();a[l]+=s+c/2}return a}return[NaN,NaN]},t.prototype.__requireStartValue=function(e){return this.getBaseAxis()!==e},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}(Xt);Xt.registerClass(tm);var nm=function(e){L(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.getInitialData=function(){return Fo(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get(`realtimeSort`,!0)||null})},t.prototype.getProgressive=function(){return this.get(`large`)?this.get(`progressive`):!1},t.prototype.__preparePipelineContext=function(e,t){var n=$i(this,e,t);return n.progressiveRender&&(n.large=!0),n},t.prototype.brushSelector=function(e,t,n){return n.rect(t.getItemLayout(e))},t.type=`series.bar`,t.dependencies=[`grid`,`polar`],t.defaultOption=wi(tm.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}(tm),rm=function(){function e(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return e}(),im=function(e){L(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`sausage`,n}return t.prototype.getDefaultShape=function(){return new rm},t.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,i=Math.max(t.r0||0,0),a=Math.max(t.r,0),o=(a-i)*.5,s=i+o,c=t.startAngle,l=t.endAngle,u=t.clockwise,d=Math.PI*2,f=u?l-c<d:c-l<d;f||(c=l-(u?d:-d));var p=Math.cos(c),m=Math.sin(c),h=Math.cos(l),g=Math.sin(l);f?(e.moveTo(p*i+n,m*i+r),e.arc(p*s+n,m*s+r,o,-Math.PI+c,c,!u)):e.moveTo(p*a+n,m*a+r),e.arc(n,r,a,c,l,!u),e.arc(h*s+n,g*s+r,o,l-Math.PI*2,l-Math.PI,!u),i!==0&&e.arc(n,r,i,l,c,u)},t}(bt);function am(e,t){t||={};var n=t.isRoundCap;return function(t,r,i){var a=r.position;if(!a||a instanceof Array)return wt(t,r,i);var o=e(a),s=r.distance==null?5:r.distance,c=this.shape,l=c.cx,u=c.cy,d=c.r,f=c.r0,p=(d+f)/2,m=c.startAngle,h=c.endAngle,g=(m+h)/2,_=n?Math.abs(d-f)/2:0,v=Math.cos,y=Math.sin,b=l+d*v(m),x=u+d*y(m),S=`left`,C=`top`;switch(o){case`startArc`:b=l+(f-s)*v(g),x=u+(f-s)*y(g),S=`center`,C=`top`;break;case`insideStartArc`:b=l+(f+s)*v(g),x=u+(f+s)*y(g),S=`center`,C=`bottom`;break;case`startAngle`:b=l+p*v(m)+sm(m,s+_,!1),x=u+p*y(m)+cm(m,s+_,!1),S=`right`,C=`middle`;break;case`insideStartAngle`:b=l+p*v(m)+sm(m,-s+_,!1),x=u+p*y(m)+cm(m,-s+_,!1),S=`left`,C=`middle`;break;case`middle`:b=l+p*v(g),x=u+p*y(g),S=`center`,C=`middle`;break;case`endArc`:b=l+(d+s)*v(g),x=u+(d+s)*y(g),S=`center`,C=`bottom`;break;case`insideEndArc`:b=l+(d-s)*v(g),x=u+(d-s)*y(g),S=`center`,C=`top`;break;case`endAngle`:b=l+p*v(h)+sm(h,s+_,!0),x=u+p*y(h)+cm(h,s+_,!0),S=`left`,C=`middle`;break;case`insideEndAngle`:b=l+p*v(h)+sm(h,-s+_,!0),x=u+p*y(h)+cm(h,-s+_,!0),S=`right`,C=`middle`;break;default:return wt(t,r,i)}return t||={},t.x=b,t.y=x,t.align=S,t.verticalAlign=C,t}}function om(e,t,n,r){if(te(r)){e.setTextConfig({rotation:r});return}else if(B(t)){e.setTextConfig({rotation:0});return}var i=e.shape,a=i.clockwise?i.startAngle:i.endAngle,o=i.clockwise?i.endAngle:i.startAngle,s=(a+o)/2,c,l=n(t);switch(l){case`startArc`:case`insideStartArc`:case`middle`:case`insideEndArc`:case`endArc`:c=s;break;case`startAngle`:case`insideStartAngle`:c=a;break;case`endAngle`:case`insideEndAngle`:c=o;break;default:e.setTextConfig({rotation:0});return}var u=Math.PI*1.5-c;l===`middle`&&u>Math.PI/2&&u<Math.PI*1.5&&(u-=Math.PI),e.setTextConfig({rotation:u})}function sm(e,t,n){return t*Math.sin(e)*(n?-1:1)}function cm(e,t,n){return t*Math.cos(e)*(n?1:-1)}function lm(e,t,n){var r=e.get(`borderRadius`);if(r==null)return n?{cornerRadius:0}:null;B(r)||(r=[r,r,r,r]);var i=Math.abs(t.r||0-t.r0||0);return{cornerRadius:u(r,function(e){return Gi(e,i)})}}var um=Math.max,dm=Math.min,fm=function(e){L(t,e);function t(){var t=e.call(this)||this;return t.type=`bar`,t._isFirstFrame=!0,t}return t.prototype.render=function(e,t,n,r){this._model=e,this._removeOnRenderedListener(n),this._updateDrawMode(e);var i=e.get(`coordinateSystem`);(i===`cartesian2d`||i===`polar`)&&(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(e,t,n):this._renderNormal(e,t,n,r))},t.prototype.incrementalPrepareRender=function(e){this._clear(),this._updateDrawMode(e),this._updateLargeClip(e)},t.prototype.incrementalRender=function(e,t){this._progressiveEls=[],this._incrementalRenderLarge(e,t)},t.prototype.eachRendered=function(e){xe(this._progressiveEls||this.group,e)},t.prototype._updateDrawMode=function(e){var t=e.pipelineContext.large;(this._isLargeDraw==null||t!==this._isLargeDraw)&&(this._isLargeDraw=t,this._clear())},t.prototype._renderNormal=function(e,t,n,r){var i=this.group,a=e.getData(),o=this._data,s=e.coordinateSystem,c=s.getBaseAxis(),l;s.type===`cartesian2d`?l=c.isHorizontal():s.type===`polar`&&(l=c.dim===`angle`);var u=e.isAnimationEnabled()?e:null,d=hm(e,s);d&&this._enableRealtimeSort(d,a,n);var f=e.get(`clip`,!0)||d,p=s.getArea();i.removeClipPath();var m=e.get(`roundCap`,!0),h=e.get(`showBackground`,!0),g=e.getModel(`backgroundStyle`),_=g.get(`borderRadius`)||0,v=[],y=this._backgroundEls,b=r&&r.isInitSort,x=r&&r.type===`changeAxisOrder`;function S(e){var t=xm[s.type](a,e);if(!t)return null;var n=Mm(s,l,t);return n.useStyle(g.getItemStyle()),s.type===`cartesian2d`?n.setShape(`r`,_):n.setShape(`cornerRadius`,_),v[e]=n,n}a.diff(o).add(function(t){var n=a.getItemModel(t),r=xm[s.type](a,t,n);if(r&&(h&&S(t),!(!a.hasValue(t)||!bm[s.type](r)))){var o=!1;f&&(o=pm[s.type](p,r));var g=mm[s.type](e,a,t,r,l,u,c.model,!1,m);d&&(g.forceLabelAnimation=!0),wm(g,a,t,n,r,e,l,s.type===`polar`),b?g.attr({shape:r}):d?gm(d,u,g,r,t,l,!1,!1):me(g,{shape:r},e,t),a.setItemGraphicEl(t,g),i.add(g),g.ignore=o}}).update(function(t,n){var r=a.getItemModel(t),C=xm[s.type](a,t,r);if(C){if(h){var w=void 0;y.length===0?w=S(n):(w=y[n],w.useStyle(g.getItemStyle()),s.type===`cartesian2d`?w.setShape(`r`,_):w.setShape(`cornerRadius`,_),v[t]=w);var T=xm[s.type](a,t),E=jm(l,T,s);yn(w,{shape:E},u,t)}var D=o.getItemGraphicEl(n);if(!a.hasValue(t)||!bm[s.type](C)){i.remove(D);return}var O=!1;if(f&&(O=pm[s.type](p,C),O&&i.remove(D)),D&&(D.type===`sector`&&m||D.type===`sausage`&&!m)&&(D&&Ai(D,e,n),D=null),D?Ne(D):D=mm[s.type](e,a,t,C,l,u,c.model,!0,m),d&&(D.forceLabelAnimation=!0),x){var k=D.getTextContent();if(k){var A=xa(k);A.prevValue!=null&&(A.prevValue=A.value)}}else wm(D,a,t,r,C,e,l,s.type===`polar`);b?D.attr({shape:C}):d?gm(d,u,D,C,t,l,!0,x):yn(D,{shape:C},e,t,null),a.setItemGraphicEl(t,D),D.ignore=O,i.add(D)}}).remove(function(t){var n=o.getItemGraphicEl(t);n&&Ai(n,e,t)}).execute();var C=this._backgroundGroup||=new W;C.removeAll();for(var w=0;w<v.length;++w)C.add(v[w]);i.add(C),this._backgroundEls=v,this._data=a},t.prototype._renderLarge=function(e,t,n){this._clear(),Om(e,this.group),this._updateLargeClip(e)},t.prototype._incrementalRenderLarge=function(e,t){this._removeBackground(),Om(t,this.group,this._progressiveEls,!0)},t.prototype._updateLargeClip=function(e){var t=e.get(`clip`,!0)&&uf(e.coordinateSystem,!1,e),n=this.group;t?n.setClipPath(t):n.removeClipPath()},t.prototype._enableRealtimeSort=function(e,t,n){var r=this;if(t.count()){var i=e.baseAxis;if(this._isFirstFrame)this._dispatchInitSort(t,e,n),this._isFirstFrame=!1;else{var a=function(e){var n=t.getItemGraphicEl(e),r=n&&n.shape;return r&&Math.abs(i.isHorizontal()?r.height:r.width)||0};this._onRendered=function(){r._updateSortWithinSameData(t,a,i,n)},n.getZr().on(`rendered`,this._onRendered)}}},t.prototype._dataSort=function(e,t,n){var r=[];return e.each(e.mapDimension(t.dim),function(e,t){var i=n(t);i??=NaN,r.push({dataIndex:t,mappedValue:i,ordinalNumber:e})}),r.sort(function(e,t){return t.mappedValue-e.mappedValue}),{ordinalNumbers:u(r,function(e){return e.ordinalNumber})}},t.prototype._isOrderChangedWithinSameData=function(e,t,n){for(var r=n.scale,i=e.mapDimension(n.dim),a=Number.MAX_VALUE,o=0,s=r.getOrdinalMeta().categories.length;o<s;++o){var c=e.rawIndexOf(i,r.getRawOrdinalNumber(o)),l=c<0?Number.MIN_VALUE:t(e.indexOfRawIndex(c));if(l>a)return!0;a=l}return!1},t.prototype._isOrderDifferentInView=function(e,t){for(var n=t.scale,r=n.getExtent(),i=Math.max(0,r[0]),a=Math.min(r[1],n.getOrdinalMeta().categories.length-1);i<=a;++i)if(e.ordinalNumbers[i]!==n.getRawOrdinalNumber(i))return!0},t.prototype._updateSortWithinSameData=function(e,t,n,r){if(this._isOrderChangedWithinSameData(e,t,n)){var i=this._dataSort(e,n,t);this._isOrderDifferentInView(i,n)&&(this._removeOnRenderedListener(r),r.dispatchAction({type:`changeAxisOrder`,componentType:n.dim+`Axis`,axisId:n.index,sortInfo:i}))}},t.prototype._dispatchInitSort=function(e,t,n){var r=t.baseAxis,i=this._dataSort(e,r,function(n){return e.get(e.mapDimension(t.otherAxis.dim),n)});n.dispatchAction({type:`changeAxisOrder`,componentType:r.dim+`Axis`,isInitSort:!0,axisId:r.index,sortInfo:i})},t.prototype.remove=function(e,t){this._clear(this._model),this._removeOnRenderedListener(t)},t.prototype.dispose=function(e,t){this._removeOnRenderedListener(t)},t.prototype._removeOnRenderedListener=function(e){this._onRendered&&=(e.getZr().off(`rendered`,this._onRendered),null)},t.prototype._clear=function(e){var t=this.group,n=this._data;e&&e.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl(function(t){Ai(t,e,H(t).dataIndex)})):t.removeAll(),this._data=null,this._isFirstFrame=!0},t.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},t.type=`bar`,t}(Ot),pm={cartesian2d:function(e,t){var n=t.width<0?-1:1,r=t.height<0?-1:1;n<0&&(t.x+=t.width,t.width=-t.width),r<0&&(t.y+=t.height,t.height=-t.height);var i=e.x+e.width,a=e.y+e.height,o=um(t.x,e.x),s=dm(t.x+t.width,i),c=um(t.y,e.y),l=dm(t.y+t.height,a),u=s<o,d=l<c;return t.x=u&&o>i?s:o,t.y=d&&c>a?l:c,t.width=u?0:s-o,t.height=d?0:l-c,n<0&&(t.x+=t.width,t.width=-t.width),r<0&&(t.y+=t.height,t.height=-t.height),u||d},polar:function(e,t){var n=t.r0<=t.r?1:-1;if(n<0){var r=t.r;t.r=t.r0,t.r0=r}var i=dm(t.r,e.r),a=um(t.r0,e.r0);t.r=i,t.r0=a;var o=i-a<0;if(n<0){var r=t.r;t.r=t.r0,t.r0=r}return o}},mm={cartesian2d:function(e,t,n,r,i,a,o,s,c){var l=new d({shape:G({},r),z2:1});if(l.__dataIndex=n,l.name=`item`,a){var u=l.shape,f=i?`height`:`width`;u[f]=0}return l},polar:function(e,t,n,r,i,a,o,s,c){var l=!i&&c?im:Fr,u=new l({shape:r,z2:1});if(u.name=`item`,u.calculateTextPosition=am(Cm(i),{isRoundCap:l===im}),a){var d=u.shape,f=i?`r`:`endAngle`,p={};d[f]=i?r.r0:r.startAngle,p[f]=r[f],(s?yn:me)(u,{shape:p},a)}return u}};function hm(e,t){var n=e.get(`realtimeSort`,!0),r=t.getBaseAxis();if(n&&r.type===`category`&&t.type===`cartesian2d`)return{baseAxis:r,otherAxis:t.getOtherAxis(r)}}function gm(e,t,n,r,i,a,o,s){var c,l;a?(l={x:r.x,width:r.width},c={y:r.y,height:r.height}):(l={y:r.y,height:r.height},c={x:r.x,width:r.width}),s||(o?yn:me)(n,{shape:c},t,i,null);var u=t?e.baseAxis.model:null;(o?yn:me)(n,{shape:l},u,i)}function _m(e,t){for(var n=0;n<t.length;n++)if(!isFinite(e[t[n]]))return!0;return!1}var vm=[`x`,`y`,`width`,`height`],ym=[`cx`,`cy`,`r`,`startAngle`,`endAngle`],bm={cartesian2d:function(e){return!_m(e,vm)},polar:function(e){return!_m(e,ym)}},xm={cartesian2d:function(e,t,n){var r=e.getItemLayout(t);if(!r)return null;var i=n?Tm(n,r):0,a=r.width>0?1:-1,o=r.height>0?1:-1;return{x:r.x+a*i/2,y:r.y+o*i/2,width:r.width-a*i,height:r.height-o*i}},polar:function(e,t,n){var r=e.getItemLayout(t);return{cx:r.cx,cy:r.cy,r0:r.r0,r:r.r,startAngle:r.startAngle,endAngle:r.endAngle,clockwise:r.clockwise}}};function Sm(e){return e.startAngle!=null&&e.endAngle!=null&&e.startAngle===e.endAngle}function Cm(e){return function(e){var t=e?`Arc`:`Angle`;return function(e){switch(e){case`start`:case`insideStart`:case`end`:case`insideEnd`:return e+t;default:return e}}}(e)}function wm(e,t,n,r,i,a,o,s){var c=t.getItemVisual(n,`style`);if(!s){var l=r.get([`itemStyle`,`borderRadius`])||0;e.setShape(`r`,l)}else if(!a.get(`roundCap`)){var u=e.shape;G(u,lm(r.getModel(`itemStyle`),u,!0)),e.setShape(u)}e.useStyle(c);var d=r.getShallow(`cursor`);d&&e.attr(`cursor`,d);var f=s?o?i.r>=i.r0?`endArc`:`startArc`:i.endAngle>=i.startAngle?`endAngle`:`startAngle`:o?Nm(i,a.coordinateSystem):Pm(i,a.coordinateSystem),p=Un(r);Lt(e,p,{labelFetcher:a,labelDataIndex:n,defaultText:Fd(a.getData(),n),inheritColor:c.fill,defaultOpacity:c.opacity,defaultOutsidePosition:f});var m=e.getTextContent();if(s&&m){var h=r.get([`label`,`position`]);e.textConfig.inside=h===`middle`?!0:null,om(e,h===`outside`?f:h,Cm(o),r.get([`label`,`rotate`]))}C(m,p,a.getRawValue(n),function(e){return Id(t,e)});var g=r.getModel([`emphasis`]);Aa(e,g.get(`focus`),g.get(`blurScope`),g.get(`disabled`)),la(e,r),Sm(i)&&(e.style.fill=`none`,e.style.stroke=`none`,J(e.states,function(e){e.style&&(e.style.fill=e.style.stroke=`none`)}))}function Tm(e,t){var n=e.get([`itemStyle`,`borderColor`]);if(!n||n===`none`)return 0;var r=e.get([`itemStyle`,`borderWidth`])||0,i=isNaN(t.width)?Number.MAX_VALUE:Math.abs(t.width),a=isNaN(t.height)?Number.MAX_VALUE:Math.abs(t.height);return Math.min(r,i,a)}var Em=function(){function e(){}return e}(),Dm=function(e){L(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`largeBar`,n}return t.prototype.getDefaultShape=function(){return new Em},t.prototype.buildPath=function(e,t){for(var n=t.points,r=this.baseDimIdx,i=1-this.baseDimIdx,a=[],o=[],s=this.barWidth,c=0;c<n.length;c+=3)o[r]=s,o[i]=n[c+2],a[r]=n[c+r],a[i]=n[c+i],e.rect(a[0],a[1],o[0],o[1])},t}(bt);function Om(e,t,n,r){var i=e.getData(),a=+!!i.getLayout(`valueAxisHorizontal`),o=i.getLayout(`largeDataIndices`),s=i.getLayout(`size`),c=e.getModel(`backgroundStyle`),l=i.getLayout(`largeBackgroundPoints`),u=r?Et(e):0;if(l){var d=new Dm({shape:{points:l},incremental:u,silent:!0,z2:0});d.baseDimIdx=a,d.largeDataIndices=o,d.barWidth=s,d.useStyle(c.getItemStyle()),t.add(d),n&&n.push(d)}var f=new Dm({shape:{points:i.getLayout(`largePoints`)},incremental:u,ignoreCoarsePointer:!0,z2:1});f.baseDimIdx=a,f.largeDataIndices=o,f.barWidth=s,t.add(f),f.useStyle(i.getVisual(`style`)),f.style.stroke=null,H(f).seriesIndex=e.seriesIndex,e.get(`silent`)||(f.on(`mousedown`,km),f.on(`mousemove`,km)),n&&n.push(f)}var km=He(function(e){var t=this,n=Am(t,e.offsetX,e.offsetY);H(t).dataIndex=n>=0?n:null},30,!1);function Am(e,t,n){for(var r=e.baseDimIdx,i=1-r,a=e.shape.points,o=e.largeDataIndices,s=[],c=[],l=e.barWidth,u=0,d=a.length/3;u<d;u++){var f=u*3;if(c[r]=l,c[i]=a[f+2],s[r]=a[f+r],s[i]=a[f+i],c[i]<0&&(s[i]+=c[i],c[i]=-c[i]),t>=s[0]&&t<=s[0]+c[0]&&n>=s[1]&&n<=s[1]+c[1])return o[u]}return-1}function jm(e,t,n){if(pf(n,`cartesian2d`)){var r=t,i=n.getArea();return{x:e?r.x:i.x,y:e?i.y:r.y,width:e?r.width:i.width,height:e?i.height:r.height}}else{var i=n.getArea(),a=t;return{cx:i.cx,cy:i.cy,r0:e?i.r0:a.r0,r:e?i.r:a.r,startAngle:e?a.startAngle:0,endAngle:e?a.endAngle:Math.PI*2}}}function Mm(e,t,n){return new(e.type===`polar`?Fr:d)({shape:jm(t,n,e),silent:!0,z2:0})}function Nm(e,t){return e.height===0?t.getOtherAxis(t.getBaseAxis()).inverse?`bottom`:`top`:e.height>0?`bottom`:`top`}function Pm(e,t){return e.width===0?t.getOtherAxis(t.getBaseAxis()).inverse?`left`:`right`:e.width>=0?`right`:`left`}function Fm(e){e.registerChartView(fm),e.registerSeriesModel(nm),e.registerLayout(e.PRIORITY.VISUAL.LAYOUT,Xp(`bar`)),e.registerLayout(e.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,Zp(`bar`)),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,Bf(`bar`)),e.registerAction({type:`changeAxisOrder`,event:`changeAxisOrder`,update:`update`},function(e,t){var n=e.componentType||`series`;t.eachComponent({mainType:n,query:e},function(t){e.sortInfo&&t.axis.setCategorySortInfo(e.sortInfo)})}),em(e)}function Im(e){return{seriesType:e,reset:function(e,t){var n=t.findComponents({mainType:`legend`});if(!(!n||!n.length)){var r=e.getData();r.filterSelf(function(e){for(var t=r.getName(e),i=0;i<n.length;i++)if(!n[i].isSelected(t))return!1;return!0})}}}}function Lm(e,t,n){t=B(t)&&{coordDimensions:t}||G({encodeDefine:e.getEncode()},t);var r=e.getSource(),i=So(r,t).dimensions,a=new xo(i,e);return a.initData(r,n),a}var Rm=function(){function e(e,t){this._getDataWithEncodedVisual=e,this._getRawData=t}return e.prototype.getAllNames=function(){var e=this._getRawData();return e.mapArray(e.getName)},e.prototype.containName=function(e){return this._getRawData().indexOfName(e)>=0},e.prototype.indexOfName=function(e){return this._getDataWithEncodedVisual().indexOfName(e)},e.prototype.getItemVisual=function(e,t){return this._getDataWithEncodedVisual().getItemVisual(e,t)},e}(),zm=$(),Bm=function(e){L(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.init=function(t){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new Rm(X(this.getData,this),X(this.getRawData,this)),this._defaultLabelLine(t)},t.prototype.mergeOption=function(){e.prototype.mergeOption.apply(this,arguments)},t.prototype.getInitialData=function(){return Lm(this,{coordDimensions:[`value`],encodeDefaulter:Q(Zn,this)})},t.prototype.getDataParams=function(t){var n=this.getData(),r=zm(n),i=r.seats;if(!i){var a=[];n.each(n.mapDimension(`value`),function(e){a.push(e)}),i=r.seats=Vt(a,n.hostModel.get(`percentPrecision`))}var o=e.prototype.getDataParams.call(this,t);return o.percent=i[t]||0,o.$vars.push(`percent`),o},t.prototype._defaultLabelLine=function(e){Pe(e,`labelLine`,[`show`]);var t=e.labelLine,n=e.emphasis.labelLine;t.show=t.show&&e.label.show,n.show=n.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}(Xt);T({fullType:Bm.type,getCoord2:function(e){return e.getShallow(`center`)}});var Vm=Math.PI/180;function Hm(e,t,n,r,i,a,o,s,c,l){if(e.length<2)return;function u(e){for(var a=e.rB,o=a*a,s=0;s<e.list.length;s++){var c=e.list[s],l=Math.abs(c.label.y-n),u=r+c.len,d=u*u,f=t+(Math.sqrt(Math.abs((1-l*l/o)*d))+c.len2)*i,p=f-c.label.x;Wm(c,c.targetTextWidth-p*i,!0),c.label.x=f}}function d(e){for(var a={list:[],maxY:0},o={list:[],maxY:0},s=0;s<e.length;s++)if(e[s].labelAlignTo===`none`){var c=e[s],l=c.label.y>n?o:a,d=Math.abs(c.label.y-n);if(d>=l.maxY){var f=c.label.x-t-c.len2*i,p=r+c.len;l.rB=Math.abs(f)<p?Math.sqrt(d*d/(1-f*f/p/p)):p,l.maxY=d}l.list.push(c)}u(a),u(o)}for(var f=e.length,p=0;p<f;p++)if(e[p].position===`outer`&&e[p].labelAlignTo===`labelLine`){var m=e[p].label.x-l;e[p].linePoints[1][0]+=m,e[p].label.x=l}$l(e,1,c,c+o)&&d(e)}function Um(e,t,n,r,i,a,o,s){for(var c=[],l=[],u=Number.MAX_VALUE,d=-Number.MAX_VALUE,f=0;f<e.length;f++){var p=e[f].label;Jm(e[f])||(p.x<t?(u=Math.min(u,p.x),c.push(e[f])):(d=Math.max(d,p.x),l.push(e[f])))}for(var f=0;f<e.length;f++){var m=e[f];if(!Jm(m)&&m.linePoints){if(m.labelStyleWidth!=null)continue;var p=m.label,h=m.linePoints,g=void 0;g=m.labelAlignTo===`edge`?p.x<t?h[2][0]-m.labelDistance-o-m.edgeDistance:o+i-m.edgeDistance-h[2][0]-m.labelDistance:m.labelAlignTo===`labelLine`?p.x<t?u-o-m.bleedMargin:o+i-d-m.bleedMargin:p.x<t?p.x-o-m.bleedMargin:o+i-p.x-m.bleedMargin,m.targetTextWidth=g,Wm(m,g,!1)}}Hm(l,t,n,r,1,i,a,o,s,d),Hm(c,t,n,r,-1,i,a,o,s,u);for(var f=0;f<e.length;f++){var m=e[f];if(!Jm(m)&&m.linePoints){var p=m.label,h=m.linePoints,_=m.labelAlignTo===`edge`,v=p.style.padding,y=v?v[1]+v[3]:0,b=p.style.backgroundColor?0:y,x=m.rect.width+b,S=h[1][0]-h[2][0];_?p.x<t?h[2][0]=o+m.edgeDistance+x+m.labelDistance:h[2][0]=o+i-m.edgeDistance-x-m.labelDistance:(p.x<t?h[2][0]=p.x+m.labelDistance:h[2][0]=p.x-m.labelDistance,h[1][0]=h[2][0]+S),h[1][1]=h[2][1]=p.y}}}function Wm(e,t,n){if(e.labelStyleWidth==null){var r=e.label,i=r.style,a=e.rect,o=i.backgroundColor,s=i.padding,c=s?s[1]+s[3]:0,l=i.overflow,u=a.width+(o?0:c);if(t<u||n){if(l&&l.match(`break`)){r.setStyle(`backgroundColor`,null),r.setStyle(`width`,t-c);var d=r.getBoundingRect();r.setStyle(`width`,Math.ceil(d.width)),r.setStyle(`backgroundColor`,o)}else{var f=t-c,p=t<u?f:n?f>e.unconstrainedWidth?null:f:null;r.setStyle(`width`,p)}Gm(a,r)}}}function Gm(e,t){qm.rect=e,ql(qm,t,Km)}var Km={minMarginForce:[null,0,null,0],marginDefault:[1,0,1,0]},qm={};function Jm(e){return e.position===`center`}function Ym(e){var t=e.getData(),n=[],r,i,a=!1,o=(e.get(`minShowLabelAngle`)||0)*Vm,s=t.getLayout(`viewRect`),c=t.getLayout(`r`),l=s.width,u=s.x,d=s.y,f=s.height;function p(e){e.ignore=!0}function m(e){if(!e.ignore)return!0;for(var t in e.states)if(e.states[t].ignore===!1)return!0;return!1}t.each(function(e){var s=t.getItemGraphicEl(e),d=s.shape,h=s.getTextContent(),g=s.getTextGuideLine(),_=t.getItemModel(e),v=_.getModel(`label`),y=v.get(`position`)||_.get([`emphasis`,`label`,`position`]),b=v.get(`distanceToLabelLine`),x=v.get(`alignTo`),S=U(v.get(`edgeDistance`),l),C=v.get(`bleedMargin`);C??=Math.min(l,f)>200?10:2;var w=_.getModel(`labelLine`),T=w.get(`length`);T=U(T,l);var E=w.get(`length2`);if(E=U(E,l),Math.abs(d.endAngle-d.startAngle)<o){J(h.states,p),h.ignore=!0,g&&(J(g.states,p),g.ignore=!0);return}if(m(h)){var D=(d.startAngle+d.endAngle)/2,O=Math.cos(D),k=Math.sin(D),A,j,M,N;r=d.cx,i=d.cy;var P=y===`inside`||y===`inner`;if(y===`center`)A=d.cx,j=d.cy,N=`center`;else{var F=(P?(d.r+d.r0)/2*O:d.r*O)+r,ee=(P?(d.r+d.r0)/2*k:d.r*k)+i;if(A=F+O*3,j=ee+k*3,!P){var ne=F+O*(T+c-d.r),re=ee+k*(T+c-d.r),ie=ne+(O<0?-1:1)*E,ae=re;A=x===`edge`?O<0?u+S:u+l-S:ie+(O<0?-b:b),j=ae,M=[[F,ee],[ne,re],[ie,ae]]}N=P?`center`:x===`edge`?O>0?`right`:`left`:O>0?`left`:`right`}var oe=Math.PI,se=0,ce=v.get(`rotate`);if(te(ce))se=oe/180*ce;else if(y===`center`)se=0;else if(ce===`radial`||ce===!0)se=O<0?-D+oe:-D;else if(ce===`tangential`||ce===`tangential-noflip`&&y!==`outside`&&y!==`outer`){var le=Math.atan2(O,k);le<0&&(le=oe*2+le),k>0&&ce!==`tangential-noflip`&&(le=oe+le),se=le-oe}if(a=!!se,h.x=A,h.y=j,h.rotation=se,h.setStyle({verticalAlign:`middle`}),P){h.setStyle({align:N});var ue=h.states.select;ue&&(ue.x+=h.x,ue.y+=h.y)}else{var de=new Te(0,0,0,0);Gm(de,h),n.push({label:h,labelLine:g,position:y,len:T,len2:E,minTurnAngle:w.get(`minTurnAngle`),maxSurfaceAngle:w.get(`maxSurfaceAngle`),surfaceNormal:new Zt(O,k),linePoints:M,textAlign:N,labelDistance:b,labelAlignTo:x,edgeDistance:S,bleedMargin:C,rect:de,unconstrainedWidth:de.width,labelStyleWidth:h.style.width})}s.setTextConfig({inside:P})}}),!a&&e.get(`avoidLabelOverlap`)&&Um(n,r,i,c,l,f,u,d);for(var h=0;h<n.length;h++){var g=n[h],_=g.label,v=g.labelLine,y=isNaN(_.x)||isNaN(_.y);if(_){_.setStyle({align:g.textAlign}),y&&(J(_.states,p),_.ignore=!0);var b=_.states.select;b&&(b.x+=_.x,b.y+=_.y)}if(v){var x=g.linePoints;y||!x?(J(v.states,p),v.ignore=!0):(Pl(x,g.minTurnAngle),Fl(x,g.surfaceNormal,g.maxSurfaceAngle),v.setShape({points:x}),_.__hostTarget.textGuideLineConfig={anchor:new Zt(x[0][0],x[0][1])})}}}var Xm=Math.PI*2,Zm=Math.PI/180,Qm=Be(`pie`,$m);function $m(e,t){e.eachSeriesByType(`pie`,function(e){var n=e.getData(),r=n.mapDimension(`value`),i=si(e,t),a=i.cx,o=i.cy,s=i.r,c=i.r0,l=i.viewRect,u=-e.get(`startAngle`)*Zm,d=e.get(`endAngle`),f=e.get(`padAngle`)*Zm;d=d===`auto`?u-Xm:-d*Zm;var p=e.get(`minAngle`)*Zm+f,m=0;n.each(r,function(e){!isNaN(e)&&m++});var h=n.getSum(r),g=Math.PI/(h||m)*2,_=e.get(`clockwise`),v=e.get(`roseType`),y=e.get(`stillShowZeroSum`),b=n.getDataExtent(r);b[0]=0;var x=_?1:-1,S=[u,d],C=x*f/2;qe(S,!_),u=S[0],d=S[1];var w=eh(e);w.startAngle=u,w.endAngle=d,w.clockwise=_,w.cx=a,w.cy=o,w.r=s,w.r0=c;var T=Math.abs(d-u),E=T,D=0,O=u;if(n.setLayout({viewRect:l,r:s}),n.each(r,function(e,t){var r;if(isNaN(e)){n.setItemLayout(t,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:_,cx:a,cy:o,r0:c,r:v?NaN:s});return}r=v===`area`?T/m:h===0&&y?g:e*g,r<p?(r=p,E-=p):D+=e;var i=O+x*r,l=0,u=0;f>r?(l=O+x*r/2,u=l):(l=O+C,u=i-C),n.setItemLayout(t,{angle:r,startAngle:l,endAngle:u,clockwise:_,cx:a,cy:o,r0:c,r:v?Y(e,b,[c,s]):s}),O=i}),E<Xm&&m)if(E<=.001){var k=T/m;n.each(r,function(e,t){if(!isNaN(e)){var r=n.getItemLayout(t);r.angle=k;var i=0,a=0;k<f?(i=u+x*(t+1/2)*k,a=i):(i=u+x*t*k+C,a=u+x*(t+1)*k-C),r.startAngle=i,r.endAngle=a}})}else g=E/D,O=u,n.each(r,function(e,t){if(!isNaN(e)){var r=n.getItemLayout(t),i=r.angle===p?p:e*g,a=0,o=0;i<f?(a=O+x*i/2,o=a):(a=O+C,o=O+x*i-C),r.startAngle=a,r.endAngle=o,O+=x*i}})})}var eh=$(),th=function(e){L(t,e);function t(t,n,r){var i=e.call(this)||this;i.z2=2;var a=new j;return i.setTextContent(a),i.updateData(t,n,r,!0),i}return t.prototype.updateData=function(e,t,n,r){var i=this,a=e.hostModel,o=e.getItemModel(t),s=o.getModel(`emphasis`),c=e.getItemLayout(t),l=G(lm(o.getModel(`itemStyle`),c,!0),c);if(isNaN(l.startAngle)){i.setShape(l);return}if(r){i.setShape(l);var u=a.getShallow(`animationType`);a.ecModel.ssr?(me(i,{scaleX:0,scaleY:0},a,{dataIndex:t,isFrom:!0}),i.originX=l.cx,i.originY=l.cy):u===`scale`?(i.shape.r=c.r0,me(i,{shape:{r:c.r}},a,t)):n==null?(i.shape.endAngle=c.startAngle,yn(i,{shape:{endAngle:c.endAngle}},a,t)):(i.setShape({startAngle:n,endAngle:n}),me(i,{shape:{startAngle:c.startAngle,endAngle:c.endAngle}},a,t))}else Ne(i),yn(i,{shape:l},a,t);i.useStyle(e.getItemVisual(t,`style`)),la(i,o);var d=(c.startAngle+c.endAngle)/2,f=a.get(`selectedOffset`),p=Math.cos(d)*f,m=Math.sin(d)*f,h=o.getShallow(`cursor`);h&&i.attr(`cursor`,h),this._updateLabel(a,e,t),i.ensureState(`emphasis`).shape=G({r:c.r+(s.get(`scale`)&&s.get(`scaleSize`)||0)},lm(s.getModel(`itemStyle`),c)),G(i.ensureState(`select`),{x:p,y:m,shape:lm(o.getModel([`select`,`itemStyle`]),c)}),G(i.ensureState(`blur`),{shape:lm(o.getModel([`blur`,`itemStyle`]),c)});var g=i.getTextGuideLine(),_=i.getTextContent();g&&G(g.ensureState(`select`),{x:p,y:m}),G(_.ensureState(`select`),{x:p,y:m}),Aa(this,s.get(`focus`),s.get(`blurScope`),s.get(`disabled`))},t.prototype._updateLabel=function(e,t,n){var r=this,i=t.getItemModel(n),a=i.getModel(`labelLine`),o=t.getItemVisual(n,`style`),s=o&&o.fill,c=o&&o.opacity;Lt(r,Un(i),{labelFetcher:t.hostModel,labelDataIndex:n,inheritColor:s,defaultOpacity:c,defaultText:e.getFormattedLabel(n,`normal`)||t.getName(n)});var l=r.getTextContent();r.setTextConfig({position:null,rotation:null}),l.attr({z2:10});var u=i.get([`label`,`position`]);if(u!==`outside`&&u!==`outer`)r.removeTextGuideLine();else{var d=this.getTextGuideLine();d||(d=new Yi,this.setTextGuideLine(d)),Rl(this,zl(i),{stroke:s,opacity:Ia(a.get([`lineStyle`,`opacity`]),c,1)})}},t}(Fr),nh=function(e){L(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=`pie`,t.ignoreLabelLineUpdate=!0,t}return t.prototype.render=function(e,t,n,r){var i=e.getData(),a=this._data,o=this.group,s;if(!a&&i.count()>0){for(var c=i.getItemLayout(0),l=1;isNaN(c&&c.startAngle)&&l<i.count();++l)c=i.getItemLayout(l);c&&(s=c.startAngle)}if(this._emptyCircleSector&&o.remove(this._emptyCircleSector),i.count()===0&&e.get(`showEmptyCircle`)){var u=new Fr({shape:ta(eh(e))});u.useStyle(e.getModel(`emptyCircleStyle`).getItemStyle()),this._emptyCircleSector=u,o.add(u)}i.diff(a).add(function(e){var t=new th(i,e,s);i.setItemGraphicEl(e,t),o.add(t)}).update(function(e,t){var n=a.getItemGraphicEl(t);n.updateData(i,e,s),n.off(`click`),o.add(n),i.setItemGraphicEl(e,n)}).remove(function(t){Ai(a.getItemGraphicEl(t),e,t)}).execute(),Ym(e),e.get(`animationTypeUpdate`)!==`expansion`&&(this._data=i)},t.prototype.dispose=function(){},t.prototype.containPoint=function(e,t){var n=t.getData().getItemLayout(0);if(n){var r=e[0]-n.cx,i=e[1]-n.cy,a=Math.sqrt(r*r+i*i);return a<=n.r&&a>=n.r0}},t.type=`pie`,t}(Ot);function rh(e){return{seriesType:e,reset:function(e,t){var n=e.getData();n.filterSelf(function(e){var t=n.mapDimension(`value`),r=n.get(t,e);return!(te(r)&&!isNaN(r)&&r<0)})}}}function ih(e){e.registerChartView(nh),e.registerSeriesModel(Bm),Lr(`pie`,e.registerAction),e.registerLayout(Qm),e.registerProcessor(Im(`pie`)),e.registerProcessor(rh(`pie`))}var ah=function(e){L(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return t.prototype.getInitialData=function(e,t){return Fo(null,this,{useEncodeDefaulter:!0})},t.prototype.getProgressive=function(){return this.option.progressive??(this.option.large?5e3:this.get(`progressive`))},t.prototype.getProgressiveThreshold=function(){return this.option.progressiveThreshold??(this.option.large?1e4:this.get(`progressiveThreshold`))},t.prototype.brushSelector=function(e,t,n){return n.point(t.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}(Xt),oh=4,sh=function(){function e(){}return e}(),ch=function(e){L(t,e);function t(t){var n=e.call(this,t)||this;return n._off=0,n.hoverDataIdx=-1,n}return t.prototype.getDefaultShape=function(){return new sh},t.prototype.reset=function(){this.notClear=!1,this._off=0},t.prototype.beforeBrush=function(e){e&&!e.contentRetained&&this.reset()},t.prototype.buildPath=function(e,t){var n=t.points,r=t.size,i=this.symbolProxy,a=i.shape,o=e.getContext?e.getContext():e,s=o&&r[0]<oh,c=this.softClipShape,l;if(s){this._ctx=o;return}for(this._ctx=null,l=this._off;l<n.length;){var u=n[l++],d=n[l++];isNaN(u)||isNaN(d)||c&&!c.contain(u,d)||(a.x=u-r[0]/2,a.y=d-r[1]/2,a.width=r[0],a.height=r[1],i.buildPath(e,a,!0))}this.incremental&&(this._off=l,this.notClear=!0)},t.prototype.afterBrush=function(){var e=this.shape,t=e.points,n=e.size,r=this._ctx,i=this.softClipShape,a;if(r){for(a=this._off;a<t.length;){var o=t[a++],s=t[a++];isNaN(o)||isNaN(s)||i&&!i.contain(o,s)||r.fillRect(o-n[0]/2,s-n[1]/2,n[0],n[1])}this.incremental&&(this._off=a,this.notClear=!0)}},t.prototype.findDataIndex=function(e,t){for(var n=this.shape,r=n.points,i=n.size,a=Math.max(i[0],4),o=Math.max(i[1],4),s=r.length/2-1;s>=0;s--){var c=s*2,l=r[c]-a/2,u=r[c+1]-o/2;if(e>=l&&t>=u&&e<=l+a&&t<=u+o)return s}return-1},t.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t),r=this.getBoundingRect();return e=n[0],t=n[1],r.contain(e,t)?(this.hoverDataIdx=this.findDataIndex(e,t))>=0:(this.hoverDataIdx=-1,!1)},t.prototype.getBoundingRect=function(){var e=this._rect;if(!e){for(var t=this.shape,n=t.points,r=t.size,i=r[0],a=r[1],o=1/0,s=1/0,c=-1/0,l=-1/0,u=0;u<n.length;){var d=n[u++],f=n[u++];o=Math.min(d,o),c=Math.max(d,c),s=Math.min(f,s),l=Math.max(f,l)}e=this._rect=new Te(o-i/2,s-a/2,c-o+i,l-s+a)}return e},t}(bt),lh=function(){function e(){this.group=new W}return e.prototype.updateData=function(e,t){this._clear(),this._data=e;var n=this._create();n.setShape({points:e.getLayout(`points`)}),this._setCommon(n,e,t)},e.prototype.updateLayout=function(e){var t=this._data;if(t){var n=t.getLayout(`points`);this.group.eachChild(function(e){if(e.startIndex!=null){var t=(e.endIndex-e.startIndex)*2,r=e.startIndex*4*2;n=new Float32Array(n.buffer,r,t)}e.setShape(`points`,n),e.reset(),e.stopAnimation()})}},e.prototype.incrementalPrepareUpdate=function(e){this._clear()},e.prototype.incrementalUpdate=function(e,t,n,r){var i=this._newAdded[0],a=t.getLayout(`points`),o=i&&i.shape.points;if(o&&o.length<2e4){var s=o.length,c=new Float32Array(s+a.length);c.set(o),c.set(a,s),i.endIndex=e.end,i.setShape({points:c})}else{this._newAdded=[];var l=this._create();l.startIndex=e.start,l.endIndex=e.end,l.incremental=n,l.setShape({points:a}),this._setCommon(l,t,r)}},e.prototype.eachRendered=function(e){this._newAdded[0]&&e(this._newAdded[0])},e.prototype._create=function(){var e=new ch({cursor:`default`});return e.ignoreCoarsePointer=!0,this.group.add(e),this._newAdded.push(e),e},e.prototype._setCommon=function(e,t,n){var r=t.hostModel;n||={};var i=t.getVisual(`symbolSize`);e.setShape(`size`,i instanceof Array?i:[i,i]),e.softClipShape=n.clipShape||null,e.symbolProxy=va(t.getVisual(`symbol`),0,0,0,0),e.setColor=e.symbolProxy.setColor;var a=e.shape.size[0]<oh;e.useStyle(r.getModel(`itemStyle`).getItemStyle(a?[`color`,`shadowBlur`,`shadowColor`]:[`color`]));var o=t.getVisual(`style`),s=o&&o.fill;s&&e.setColor(s);var c=H(e);c.seriesIndex=r.seriesIndex,e.on(`mousemove`,function(t){c.dataIndex=null;var n=e.hoverDataIdx;n>=0&&(c.dataIndex=n+(e.startIndex||0))})},e.prototype.remove=function(){this._clear()},e.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},e}(),uh=function(e){L(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){var r=e.getData();this._updateSymbolDraw(r,e).updateData(r,dh(e)),this._finished=!0},t.prototype.incrementalPrepareRender=function(e,t,n){var r=e.getData();this._updateSymbolDraw(r,e).incrementalPrepareUpdate(r),this._finished=!1},t.prototype.incrementalRender=function(e,t,n){this._symbolDraw.incrementalUpdate(e,t.getData(),Et(t),dh(t)),this._finished=e.end===t.getData().count()},t.prototype.updateTransform=function(e,t,n){var r=e.getData();if(this.group.dirty(),this._finished){var i=Lf(``).reset(e,t,n);i.progress&&i.progress({start:0,end:r.count(),count:r.count()},r),this._symbolDraw.updateLayout(dh(e))}else return{update:!0}},t.prototype.eachRendered=function(e){this._symbolDraw&&this._symbolDraw.eachRendered(e)},t.prototype._updateSymbolDraw=function(e,t){var n=this._symbolDraw,r=t.pipelineContext.large;return(!n||r!==this._isLargeDraw)&&(n&&n.remove(),n=this._symbolDraw=r?new lh:new Ud,this._isLargeDraw=r,this.group.removeAll()),this.group.add(n.group),n},t.prototype.remove=function(e,t){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},t.prototype.dispose=function(){},t.type=`scatter`,t}(Ot);function dh(e){return{clipShape:ff(e)}}var fh=function(e){L(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents(`grid`,Jt).models[0]},t.type=`cartesian2dAxis`,t}(ra);ot(fh,ec);var ph={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:`auto`,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`}},mh=Vr({boundaryGap:!0,deduplication:null,jitter:0,jitterOverlap:!0,jitterMargin:2,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:`auto`,show:`auto`},axisLabel:{interval:`auto`}},ph),hh=Vr({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}}},ph),gh={category:mh,value:hh,time:Vr({splitNumber:6,axisLabel:{rich:{primary:{fontWeight:`bold`}}},splitLine:{show:!1}},hh),log:ai({logBase:10},hh)};function _h(e,t,n,r){J(Fs,function(i,a){var o=Vr(Vr({},gh[a],!0),r,!0),s=function(e){L(n,e);function n(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t+`Axis.`+a,n}return n.prototype.mergeDefaultAndTheme=function(e,t){var n=Ei(this),r=n?kr(e):{};Vr(e,t.getTheme().get(a+`Axis`)),Vr(e,this.getDefaultOption()),e.type=vh(e),n&&Mn(e,r,n)},n.prototype.optionUpdated=function(){this.option.type===`category`&&(this.__ordinalMeta=Bo.createByAxisModel(this))},n.prototype.getCategories=function(e){var t=this.option;if(t.type===`category`)return e?t.data:this.__ordinalMeta.categories},n.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},n.prototype.updateAxisBreaks=function(e){var t=Wf();return t?t.updateModelAxisBreak(this,e):{breaks:[]}},n.type=t+`Axis.`+a,n.defaultOption=o,n}(n);e.registerComponentModel(s)}),e.registerSubTypeDefaulter(t+`Axis`,vh)}function vh(e){return e.type||(e.data?`category`:`value`)}var yh=function(){function e(e){this.type=`cartesian`,this._dimList=[],this._axes={},this.name=e||``}return e.prototype.getAxis=function(e){return this._axes[e]},e.prototype.getAxes=function(){return u(this._dimList,function(e){return this._axes[e]},this)},e.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),ca(this.getAxes(),function(t){return t.scale.type===e})},e.prototype.addAxis=function(e){var t=e.dim;this._axes[t]=e,this._dimList.push(t)},e}(),bh=[`x`,`y`];function xh(e){return(e.type===`interval`||e.type===`time`)&&!ea(e)}var Sh=function(e){L(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=Vp,t.dimensions=bh,t}return t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var e=this.getAxis(`x`).scale,t=this.getAxis(`y`).scale;if(!(!xh(e)||!xh(t))){var n=qo(e,null),r=qo(t,null),i=this.dataToPoint([n[0],r[0]]),a=this.dataToPoint([n[1],r[1]]),o=n[1]-n[0],s=r[1]-r[0];if(!(!o||!s)){var c=(a[0]-i[0])/o,l=(a[1]-i[1])/s,u=i[0]-n[0]*c,d=i[1]-r[0]*l,f=this._transform=[c,0,0,l,u,d];this._invTransform=rn([],f)}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale(`ordinal`)[0]||this.getAxesByScale(`time`)[0]||this.getAxis(`x`)},t.prototype.containPoint=function(e){var t=this.getAxis(`x`),n=this.getAxis(`y`);return t.contain(t.toLocalCoord(e[0]))&&n.contain(n.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,t){var n=this.dataToPoint(e),r=this.dataToPoint(t),i=this.getArea(),a=new Te(n[0],n[1],r[0]-n[0],r[1]-n[1]);return i.intersect(a)},t.prototype.dataToPoint=function(e,t,n){n||=[];var r=e[0],i=e[1];if(this._transform&&r!=null&&isFinite(r)&&i!=null&&isFinite(i))return di(n,e,this._transform);var a=this.getAxis(`x`),o=this.getAxis(`y`);return n[0]=a.toGlobalCoord(a.dataToCoord(r,t)),n[1]=o.toGlobalCoord(o.dataToCoord(i,t)),n},t.prototype.clampData=function(e,t){var n=this.getAxis(`x`).scale,r=this.getAxis(`y`).scale,i=n.getExtent(),a=r.getExtent(),o=n.parse(e[0]),s=r.parse(e[1]);return t||=[],t[0]=Math.min(Math.max(Math.min(i[0],i[1]),o),Math.max(i[0],i[1])),t[1]=Math.min(Math.max(Math.min(a[0],a[1]),s),Math.max(a[0],a[1])),t},t.prototype.pointToData=function(e,t,n){if(n||=[],this._invTransform)return di(n,e,this._invTransform);var r=this.getAxis(`x`),i=this.getAxis(`y`);return n[0]=r.coordToData(r.toLocalCoord(e[0]),t),n[1]=i.coordToData(i.toLocalCoord(e[1]),t),n},t.prototype.getOtherAxis=function(e){return this.getAxis(e.dim===`x`?`y`:`x`)},t.prototype.getArea=function(e){e||=0;var t=this.getAxis(`x`).getGlobalExtent(),n=this.getAxis(`y`).getGlobalExtent(),r=Math.min(t[0],t[1])-e,i=Math.min(n[0],n[1])-e;return new Te(r,i,Math.max(t[0],t[1])-r+e,Math.max(n[0],n[1])-i+e)},t}(yh);function Ch(e,t){var n=e.scale,r=e.model,i=Lc(n,r,r.ecModel,e,null),a=ns(n),o=ns(t)?t.intervalStub:t,s=a?n.intervalStub:n,l=n.base,u=o.getTicks(),d=o.getTicks({expandToNicedExtent:!0}),f=u.length-1,p,m,h;if(f===1)p=m=0,h=1;else if(f===2){var g=c(u[0].value-u[1].value),_=c(u[1].value-u[2].value);p=m=0,g===_?h=2:(h=1,g<_?p=g/_:m=_/g)}else{var v=o.getConfig().interval;p=(1-(u[0].value-d[0].value)/v)%1,m=(1-(d[f].value-u[f].value)/v)%1,h=f-+!!p-!!m}var y=i.zoomFixMM,b=y[0]||y[1],x=[i.fixMM[0]||b,i.fixMM[1]||b],S=n.getExtent(),C=s.getExtent(),w=cs(C,x),T,E,D,k,A,j;function M(e){for(var t=50,n=0;n<t&&!e();n++)D=a?D*_t(l,2):is(D),k=as(D)}function N(){T=I(j-D*p,k)}function P(){E=I(A+D*m,k)}function F(){j=p?I(T+D*p,k):T}function ee(){A=m?I(E-D*m,k):E}if(x[0]&&x[1]){T=w[0],E=w[1],D=(E-T)/(h+p+m);var te=e.getExtent(),ne=c(te[1]-te[0]);k=pa([E,T],ne,.5/h),F(),ee(),O(k)&&(D=I(D,k))}else{var re=w[1]-w[0];D=a?_t(an(re),1):Pa(re/h,2),k=as(D),x[0]?(T=w[0],M(function(){if(F(),A=I(j+D*h,k),P(),E>=w[1])return!0})):x[1]?(E=w[1],M(function(){if(ee(),j=I(A-D*h,k),N(),T<=w[0])return!0})):M(function(){j=I(zr(w[0]/D)*D,k),A=I(Ze(w[1]/D)*D,k);var e=At((A-j)/D);if(e<=h){var t=h-e,n=void 0,r=i.incl0||a;if(r&&w[0]===0)n=[0,t];else if(r&&w[1]===0)n=[t,0];else{var o=Ze(t/2);n=t%2==0?[o,o]:T+E<w[0]+w[1]?[o,o+1]:[o+1,o]}if(j=I(j-D*n[0],k),A=I(A+D*n[1],k),N(),P(),T<=w[0]&&E>=w[1])return!0}})}Zs(n,x,C,[T,E],S,{interval:D,intervalCount:h,intervalPrecision:k,niceExtent:[j,A]})}var wh=[[3,1],[0,2]],Th=function(){function e(e,t,n){this.type=`grid`,this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=bh,this._initCartesian(e,t,n),this.model=e}return e.prototype.getRect=function(){return this._rect},e.prototype.update=function(e,t){var n=this._axesMap;J(this._axesList,function(e){jc(e,1);var t=e.scale;rs(t)&&t.setSortInfo(e.model.get(`categorySortInfo`))});function r(e){for(var t=qr(e),n=[],r=t.length-1;r>=0;r--){var i=e[+t[r]];i.__alignTo?n.push(i):Uc(i)}J(n,function(e){Ah(e,e.__alignTo)?Uc(e):Ch(e,e.__alignTo.scale)})}r(n.x),r(n.y);var i={};J(n.x,function(e){Dh(n,`y`,e,i)}),J(n.y,function(e){Dh(n,`x`,e,i)}),this.resize(this.model,t)},e.prototype.resize=function(e,t,n){var r=gr(e,t),i=this._rect=Cr(e.getBoxLayoutParams(),r.refContainer),a=this._axesMap,o=this._coordsList,s=e.get(`containLabel`);if(Mh(a,i),!n){var c=Ih(i,o,a,s,t),l=void 0;if(s)Ph?(Ph(this._axesList,i),Mh(a,i)):l=Fh(i.clone(),`axisLabel`,null,i,a,c,r);else{var u=Rh(e,i,r),d=u.outerBoundsRect,f=u.parsedOuterBoundsContain,p=u.outerBoundsClamp;d&&(l=Fh(d,f,p,i,a,c,r))}Lh(i,a,Qc.determine,null,l,r),J(this._coordsList,function(e){e.calcAffineTransform()})}},e.prototype.getAxis=function(e,t){var n=this._axesMap[e];if(n!=null)return n[t||0]},e.prototype.getAxes=function(){return this._axesList.slice()},e.prototype.getCartesian=function(e,t){if(e!=null&&t!=null){var n=`x`+e+`y`+t;return this._coordsMap[n]}A(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(var r=0,i=this._coordsList;r<i.length;r++)if(i[r].getAxis(`x`).index===e||i[r].getAxis(`y`).index===t)return i[r]},e.prototype.getCartesians=function(){return this._coordsList.slice()},e.prototype.convertToPixel=function(e,t,n){var r=this._findConvertTarget(t);return r.cartesian?r.cartesian.dataToPoint(n):r.axis?r.axis.toGlobalCoord(r.axis.dataToCoord(n)):null},e.prototype.convertFromPixel=function(e,t,n){var r=this._findConvertTarget(t);return r.cartesian?r.cartesian.pointToData(n):r.axis?r.axis.coordToData(r.axis.toLocalCoord(n)):null},e.prototype._findConvertTarget=function(e){var t=e.seriesModel,n=e.xAxisModel||t&&t.getReferringComponents(`xAxis`,Jt).models[0],r=e.yAxisModel||t&&t.getReferringComponents(`yAxis`,Jt).models[0],i=e.gridModel,a=this._coordsList,o,s;return t?(o=t.coordinateSystem,Sa(a,o)<0&&(o=null)):n&&r?o=this.getCartesian(n.componentIndex,r.componentIndex):n?s=this.getAxis(`x`,n.componentIndex):r?s=this.getAxis(`y`,r.componentIndex):i&&i.coordinateSystem===this&&(o=this._coordsList[0]),{cartesian:o,axis:s}},e.prototype.containPoint=function(e){var t=this._coordsList[0];if(t)return t.containPoint(e)},e.prototype._initCartesian=function(e,t,n){var r=this,i=this,a={left:!1,right:!1,top:!1,bottom:!1},o={x:{},y:{}},s={x:0,y:0};if(t.eachComponent(`xAxis`,c(`x`),this),t.eachComponent(`yAxis`,c(`y`),this),!s.x||!s.y){this._axesMap={},this._axesList=[];return}this._axesMap=o,J(o.x,function(t,n){J(o.y,function(i,a){var o=`x`+n+`y`+a,s=new Sh(o);s.master=r,s.model=e,r._coordsMap[o]=s,r._coordsList.push(s),s.addAxis(t),s.addAxis(i)})}),kh(o.x),kh(o.y);function c(t){return function(n,r){if(Eh(n,e)){var c=n.get(`position`);t===`x`?c!==`top`&&c!==`bottom`&&(c=a.bottom?`top`:`bottom`):c!==`left`&&c!==`right`&&(c=a.left?`right`:`left`),a[c]=!0;var l=Ls(n),u=new Hf(t,Rs(n,l,!0),[0,0],l,c);u.onBand=$s(u.scale,n),u.inverse=n.get(`inverse`),n.axis=u,u.model=n,u.grid=i,u.index=r,i._axesList.push(u),o[t][r]=u,s[t]++}}}},e.prototype.getTooltipAxes=function(e){var t=[],n=[];return J(this.getCartesians(),function(r){var i=e!=null&&e!==`auto`?r.getAxis(e):r.getBaseAxis(),a=r.getOtherAxis(i);Sa(t,i)<0&&t.push(i),Sa(n,a)<0&&n.push(a)}),{baseAxes:t,otherAxes:n}},e.create=function(t,n){var r=[];return t.eachComponent(`grid`,function(i,a){var o=new e(i,t,n);o.name=`grid_`+a,o.resize(i,n,!0),i.coordinateSystem=o,r.push(o),J(o._axesList,function(t){Ac(t,e.dimIdxMap)})}),t.eachSeries(function(e){var t,n;Rt({targetModel:e,coordSysType:Vp,coordSysProvider:r});function r(){var r=Dp(e),i=r.xAxisModel,a=r.yAxisModel;return t=i.axis,n=a.axis,i.getCoordSysModel().coordinateSystem.getCartesian(i.componentIndex,a.componentIndex)}t&&n&&(vc(t,e,Vp),vc(n,e,Vp))},this),r},e.dimensions=bh,e.dimIdxMap=ro(bh),e}();function Eh(e,t){return e.getCoordSysModel()===t}function Dh(e,t,n,r){n.getAxesOnZeroOf=function(){return a?[a]:[]};var i=e[t],a,o=n.model,s=o.get([`axisLine`,`onZero`]),c=o.get([`axisLine`,`onZeroAxisIndex`]);if(!s)return;if(c!=null)Oh(s,i[c])&&(a=i[c]);else for(var l in i)if(K(i,l)&&Oh(s,i[l])&&!r[u(i[l])]){a=i[l];break}a&&(r[u(a)]=!0);function u(e){return e.dim+`_`+e.index}}function Oh(e,t){if(!t)return!1;var n=t.scale,r=zs(n,0,!1),i=t&&t.type!==`category`&&t.type!==`time`&&r!==3;return i&&e===`auto`&&Vs(t)&&(i=!1),i}function kh(e){for(var t=qr(e),n,r=[],i=t.length-1;i>=0;i--){var a=e[+t[i]];$o(a.scale)&&Ys(a.model,a.type,!0)==null&&(a.model.get(`alignTicks`)&&a.model.get(`interval`)==null?r.push(a):n=a)}n||=r.pop(),n&&J(r,function(e){e.__alignTo=n})}function Ah(e,t){return ea(e.scale)||ea(t.scale)||t.scale.getTicks().length<2}function jh(e,t){var n=e.getExtent(),r=n[0]+n[1];e.toGlobalCoord=e.dim===`x`?function(e){return e+t}:function(e){return r-e+t},e.toLocalCoord=e.dim===`x`?function(e){return e-t}:function(e){return r-e+t}}function Mh(e,t){J(e.x,function(e){return Nh(e,t.x,t.width)}),J(e.y,function(e){return Nh(e,t.y,t.height)})}function Nh(e,t,n){var r=[0,n],i=+!!e.inverse;e.setExtent(r[i],r[1-i]),jh(e,t)}var Ph;function Fh(e,t,n,r,i,a,o){Lh(r,i,Qc.estimate,t,!1,o);var s=[0,0,0,0];u(0),u(1),d(r,0,NaN),d(r,1,NaN);var c=ka(s,function(e){return e>0})==null;return l(r,s,!0,!0,n),Mh(i,r),c;function u(e){J(i[Ht[e]],function(t){if(Js(t.model)){var n=a.ensureRecord(t.model),r=n.labelInfoList;if(r)for(var i=0;i<r.length;i++){var o=r[i],s=t.scale.normalize(Qs(t.scale,Yf(o.label).labelInfo.tick));s=e===1?1-s:s,d(o.rect,e,s),d(o.rect,1-e,NaN)}var c=n.nameLayout;if(c){var s=qs(n.nameLocation)?.5:NaN;d(c.rect,e,s),d(c.rect,1-e,NaN)}}})}function d(t,n,r){var i=e[Ht[n]]-t[Ht[n]],a=t[ma[n]]+t[Ht[n]]-(e[ma[n]]+e[Ht[n]]);i=f(i,1-r),a=f(a,r);var o=wh[n][0],c=wh[n][1];s[o]=_t(s[o],i),s[c]=_t(s[c],a)}function f(e,t){return e>0&&!xr(t)&&t>1e-4&&(e/=t),e}}function Ih(e,t,n,r,i){var a=new Zf(zh);return J(n,function(n){return J(n,function(n){if(Js(n.model)){var o=!r;n.axisBuilder=Op(e,t,n.model,i,a,o)}})}),a}function Lh(e,t,n,r,i,a){var o=n===Qc.determine;J(t,function(t){return J(t,function(t){Js(t.model)&&(kp(t.axisBuilder,e,t.model),t.axisBuilder.build(o?{axisTickLabelDetermine:!0}:{axisTickLabelEstimate:!0},{noPxChange:i}))})});var s={x:0,y:0};c(0),c(1);function c(t){s[Ht[1-t]]=e[ma[t]]<=a.refContainer[ma[t]]*.5?0:1-t==1?2:1}J(t,function(e,t){return J(e,function(e){Js(e.model)&&((r===`all`||o)&&e.axisBuilder.build({axisName:!0},{nameMarginLevel:s[t]}),o&&e.axisBuilder.build({axisLine:!0}))})})}function Rh(e,t,n){var r,i=e.get(`outerBoundsMode`,!0);i===`same`?r=t.clone():(i==null||i===`auto`)&&(r=Cr(e.get(`outerBounds`,!0)||zp,n.refContainer));var a=e.get(`outerBoundsContain`,!0),o=a==null||a===`auto`||Sa([`all`,`axisLabel`],a)<0?`all`:a,s=[be(z(e.get(`outerBoundsClampWidth`,!0),Bp[0]),t.width),be(z(e.get(`outerBoundsClampHeight`,!0),Bp[1]),t.height)];return{outerBoundsRect:r,parsedOuterBoundsContain:o,outerBoundsClamp:s}}var zh=function(e,t,n,r,i,a){var o=n.axis.dim===`x`?`y`:`x`;tp(e,t,n,r,i,a),qs(e.nameLocation)||J(t.recordMap[o],function(e){e&&e.labelInfoList&&e.dirVec&&rp(e.labelInfoList,e.dirVec,r,i)})};function Bh(e,t){var n={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return Vh(n,e,t),n.seriesInvolved&&Uh(n,e),n}function Vh(e,t,n){var r=t.getComponent(`tooltip`),i=t.getComponent(`axisPointer`),a=i.get(`link`,!0)||[],o=[];J(n.getCoordinateSystems(),function(n){if(!n.axisPointerEnabled)return;var s=Xh(n.model),c=e.coordSysAxesInfo[s]={};e.coordSysMap[s]=n;var l=n.model.getModel(`tooltip`,r);if(J(n.getAxes(),Q(p,!1,null)),n.getTooltipAxes&&r&&l.get(`show`)){var u=l.get(`trigger`)===`axis`,d=l.get([`axisPointer`,`type`])===`cross`,f=n.getTooltipAxes(l.get([`axisPointer`,`axis`]));(u||d)&&J(f.baseAxes,Q(p,d?`cross`:!0,u)),d&&J(f.otherAxes,Q(p,`cross`,!1))}function p(r,s,u){var d=u.model.getModel(`axisPointer`,i),f=d.get(`show`);if(!(!f||f===`auto`&&!r&&!Yh(d))){s??=d.get(`triggerTooltip`),d=r?Hh(u,l,i,t,r,s):d;var p=d.get(`snap`),m=d.get(`triggerEmphasis`),h=Xh(u.model),g=s||p||u.type===`category`,_=e.axesInfo[h]={key:h,axis:u,coordSys:n,axisPointerModel:d,triggerTooltip:s,triggerEmphasis:m,involveSeries:g,snap:p,useHandle:Yh(d),seriesModels:[],linkGroup:null};c[h]=_,e.seriesInvolved=e.seriesInvolved||g;var v=Wh(a,u);if(v!=null){var y=o[v]||(o[v]={axesInfo:{}});y.axesInfo[h]=_,y.mapper=a[v].mapper,_.linkGroup=y}}}})}function Hh(e,t,n,r,i,a){var o=t.getModel(`axisPointer`),s=[`type`,`snap`,`lineStyle`,`shadowStyle`,`label`,`animation`,`animationDurationUpdate`,`animationEasingUpdate`,`z`],c={};J(s,function(e){c[e]=ta(o.get(e))}),c.snap=e.type!==`category`&&!!a,o.get(`type`)===`cross`&&(c.type=`line`);var l=c.label||={};if(l.show??=!1,i===`cross`&&(l.show=o.get([`label`,`show`])??!0,!a)){var u=c.lineStyle=o.get(`crossStyle`);u&&ai(l,u.textStyle)}return e.model.getModel(`axisPointer`,new ii(c,n,r))}function Uh(e,t){t.eachSeries(function(t){var n=t.coordinateSystem,r=t.get([`tooltip`,`trigger`],!0),i=t.get([`tooltip`,`show`],!0);!n||!n.model||r===`none`||r===!1||r===`item`||i===!1||t.get([`axisPointer`,`show`],!0)===!1||J(e.coordSysAxesInfo[Xh(n.model)],function(e){var r=e.axis;n.getAxis(r.dim)===r&&(e.seriesModels.push(t),e.seriesDataCount??=0,e.seriesDataCount+=t.getData().count())})})}function Wh(e,t){for(var n=t.model,r=t.dim,i=0;i<e.length;i++){var a=e[i]||{};if(Gh(a[r+`AxisId`],n.id)||Gh(a[r+`AxisIndex`],n.componentIndex)||Gh(a[r+`AxisName`],n.name))return i}}function Gh(e,t){return e===`all`||B(e)&&Sa(e,t)>=0||e===t}function Kh(e){var t=qh(e);if(t){var n=t.axisPointerModel,r=t.axis.scale,i=n.option,a=n.get(`status`),o=n.get(`value`);o!=null&&(o=r.parse(o));var s=Yh(n);a??(i.status=s?`show`:`hide`);var c=r.getExtent();(o==null||o>c[1])&&(o=c[1]),o<c[0]&&(o=c[0]),i.value=o,s&&(i.status=t.axis.scale.isBlank()?`hide`:`show`)}}function qh(e){var t=(e.ecModel.getComponent(`axisPointer`)||{}).coordSysAxesInfo;return t&&t.axesInfo[Xh(e)]}function Jh(e){var t=qh(e);return t&&t.axisPointerModel}function Yh(e){return!!e.get([`handle`,`show`])}function Xh(e){return e.type+`||`+e.id}var Zh={},Qh=function(e){L(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(t,n,r,i){this.axisPointerClass&&Kh(t),e.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(t,r,!0)},t.prototype.updateAxisPointer=function(e,t,n,r){this._doUpdateAxisPointerClass(e,n,!1)},t.prototype.remove=function(e,t){var n=this._axisPointer;n&&n.remove(t)},t.prototype.dispose=function(t,n){this._disposeAxisPointer(n),e.prototype.dispose.apply(this,arguments)},t.prototype._doUpdateAxisPointerClass=function(e,n,r){var i=t.getAxisPointerClass(this.axisPointerClass);if(i){var a=Jh(e);a?(this._axisPointer||=new i).render(e,a,n,r):this._disposeAxisPointer(n)}},t.prototype._disposeAxisPointer=function(e){this._axisPointer&&this._axisPointer.dispose(e),this._axisPointer=null},t.registerAxisPointerClass=function(e,t){Zh[e]=t},t.getAxisPointerClass=function(e){return e&&Zh[e]},t.type=`axis`,t}(p),$h=$();function eg(e,t,n,r){var i=n.axis;if(!i.scale.isBlank()){var a=n.getModel(`splitArea`),o=a.getModel(`areaStyle`),s=o.get(`color`),c=r.coordinateSystem.getRect(),l=i.getTicksCoords({tickModel:a,breakTicks:`none`,pruneByBreak:`preserve_extent_bound`});if(l.length){var u=s.length,f=$h(e).splitAreaColors,p=q(),m=0;if(f)for(var h=0;h<l.length;h++){var g=f.get(l[h].tickValue);if(g!=null){m=(g+(u-1)*h)%u;break}}var _=i.toGlobalCoord(l[0].coord),v=o.getAreaStyle();s=B(s)?s:[s];for(var h=1;h<l.length;h++){var y=i.toGlobalCoord(l[h].coord),b=void 0,x=void 0,S=void 0,C=void 0;i.isHorizontal()?(b=_,x=c.y,S=y-b,C=c.height,_=b+S):(b=c.x,x=_,S=c.width,C=y-x,_=x+C);var w=l[h-1].tickValue;w!=null&&p.set(w,m),t.add(new d({anid:w==null?null:`area_`+w,shape:{x:b,y:x,width:S,height:C},style:ai({fill:s[m]},v),autoBatch:!0,silent:!0})),m=(m+1)%u}$h(e).splitAreaColors=p}}}function tg(e){$h(e).splitAreaColors=null}var ng=[`splitArea`,`splitLine`,`minorSplitLine`,`breakArea`],rg=function(e){L(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.axisPointerClass=`CartesianAxisPointer`,n}return t.prototype.render=function(t,n,r,i){this.group.removeAll();var a=this._axisGroup;this._axisGroup=new W,this.group.add(this._axisGroup),Js(t)&&(this._axisGroup.add(t.axis.axisBuilder.group),J(ng,function(e){t.get([e,`show`])&&ig[e](this,this._axisGroup,t,t.getCoordSysModel(),r)},this),i&&i.type===`changeAxisOrder`&&i.isInitSort||vt(a,this._axisGroup,t),e.prototype.render.call(this,t,n,r,i))},t.prototype.remove=function(){tg(this)},t.type=`cartesianAxis`,t}(Qh),ig={splitLine:function(e,t,n,r,i){var a=n.axis;if(!a.scale.isBlank()){var o=n.getModel(`splitLine`),s=o.getModel(`lineStyle`),c=s.get(`color`),l=o.get(`showMinLine`)!==!1,u=o.get(`showMaxLine`)!==!1;c=B(c)?c:[c];for(var d=r.coordinateSystem.getRect(),f=a.isHorizontal(),p=0,m=a.getTicksCoords({tickModel:o,breakTicks:`none`,pruneByBreak:`preserve_extent_bound`}),h=[],_=[],v=s.getLineStyle(),y=0;y<m.length;y++){var b=a.toGlobalCoord(m[y].coord);if(!(y===0&&!l||y===m.length-1&&!u)){var x=m[y].tickValue;f?(h[0]=b,h[1]=d.y,_[0]=b,_[1]=d.y+d.height):(h[0]=d.x,h[1]=b,_[0]=d.x+d.width,_[1]=b);var S=p++%c.length,C=new lr({anid:x==null?null:`line_`+x,autoBatch:!0,shape:{x1:h[0],y1:h[1],x2:_[0],y2:_[1]},style:ai({stroke:c[S]},v),silent:!0});g(C.shape,v.lineWidth),t.add(C)}}}},minorSplitLine:function(e,t,n,r,i){var a=n.axis,o=n.getModel(`minorSplitLine`).getModel(`lineStyle`),s=r.coordinateSystem.getRect(),c=a.isHorizontal(),l=a.getMinorTicksCoords();if(l.length)for(var u=[],d=[],f=o.getLineStyle(),p=0;p<l.length;p++)for(var m=0;m<l[p].length;m++){var h=a.toGlobalCoord(l[p][m].coord);c?(u[0]=h,u[1]=s.y,d[0]=h,d[1]=s.y+s.height):(u[0]=s.x,u[1]=h,d[0]=s.x+s.width,d[1]=h);var _=new lr({anid:`minor_line_`+l[p][m].tickValue,autoBatch:!0,shape:{x1:u[0],y1:u[1],x2:d[0],y2:d[1]},style:f,silent:!0});g(_.shape,f.lineWidth),t.add(_)}},splitArea:function(e,t,n,r,i){eg(e,t,n,r)},breakArea:function(e,t,n,r,i){var a=Wf(),o=n.axis.scale;a&&o.type!==`ordinal`&&a.rectCoordBuildBreakAxis(t,e,n,r.coordinateSystem.getRect(),i)}},ag=function(e){L(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`xAxis`,t}(rg),og=function(e){L(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=ag.type,t}return t.type=`yAxis`,t}(rg),sg=function(e){L(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=`grid`,t}return t.prototype.render=function(e,t){this.group.removeAll(),e.get(`show`)&&this.group.add(new d({shape:e.coordinateSystem.getRect(),style:ai({fill:e.get(`backgroundColor`)},e.getItemStyle()),silent:!0,z2:-1}))},t.type=`grid`,t}(p),cg={offset:0};function lg(e){e.registerComponentView(sg),e.registerComponentModel(Hp),e.registerCoordinateSystem(`cartesian2d`,Th),_h(e,`x`,fh,cg),_h(e,`y`,fh,cg),e.registerComponentView(ag),e.registerComponentView(og),e.registerPreprocessor(function(e){e.xAxis&&e.yAxis&&!e.grid&&(e.grid={})})}function ug(e){Yc(lg),e.registerSeriesModel(ah),e.registerChartView(uh),e.registerLayout(Lf(`scatter`))}var dg=$();function fg(e,t){return!!dg(e)[t]}Nn({type:`takeGlobalCursor`,event:`globalCursorTaken`,update:`update`},yt);var pg={axisPointer:1,tooltip:1,brush:1};function mg(e,t,n){var r=t.getComponentByElement(e.topTarget);if(!r||r===n||pg.hasOwnProperty(r.mainType))return!1;var i=r.coordinateSystem;if(!i||i.model===n)return!1;var a=jt(r),o=jt(n);return!((a.zlevel-o.zlevel||a.z-o.z)<=0)}var hg=function(e){L(t,e);function t(t){var n=e.call(this)||this;n._zr=t;var r=X(n._mousedownHandler,n),i=X(n._mousemoveHandler,n),a=X(n._mouseupHandler,n),o=X(n._mousewheelHandler,n),s=X(n._pinchHandler,n);return n.enable=function(e,n){var c=n.zInfo,l=jt(c.component),u=l.z,d=l.zlevel,f={component:c.component,z:u,zlevel:d,z2:z(c.z2,-1/0)},p=G({},n.triggerInfo);this._opt=ai(G({},n),{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0,zInfoParsed:f,triggerInfo:p,cursorGrab:`grab`,cursorGrabbing:`grabbing`}),e??=!0,(!this._enabled||this._controlType!==e)&&(this.disable(),this._enabled=!0,(e===!0||e===`move`||e===`pan`)&&(yg(t,`mousedown`,r,f),yg(t,`mousemove`,i,f),yg(t,`mouseup`,a,f)),(e===!0||e===`scale`||e===`zoom`)&&(yg(t,`mousewheel`,o,f),yg(t,`pinch`,s,f)))},n.disable=function(){this._enabled&&(this._enabled=!1,bg(t,`mousedown`,r),bg(t,`mousemove`,i),bg(t,`mouseup`,a),bg(t,`mousewheel`,o),bg(t,`pinch`,s))},n}return t.prototype.isDragging=function(){return this._dragging},t.prototype.isPinching=function(){return this._pinching},t.prototype._checkPointer=function(e,t,n){var r=this._opt,i=r.zInfoParsed;if(mg(e,r.api,i.component))return!1;var a=r.triggerInfo,o=a.roamTrigger,s=!1;return o===`global`&&(s=!0),s||=a.isInSelf(e,t,n),s&&a.isInClip&&!a.isInClip(e,t,n)&&(s=!1),s},t.prototype._decideCursorStyle=function(e,t,n,r){var i=e.target;if(!i&&this._checkPointer(e,t,n))return this._opt.cursorGrab;if(r)return i&&i.cursor||`default`},t.prototype.dispose=function(){this.disable()},t.prototype._mousedownHandler=function(e){if(!(_n(e)||gg(e))){for(var t=e.target;t;){if(t.draggable)return;t=t.__hostTarget||t.parent}var n=e.offsetX,r=e.offsetY;this._checkPointer(e,n,r)&&(this._x=n,this._y=r,this._dragging=!0)}},t.prototype._mousemoveHandler=function(e){var t=this._zr;if(!(e.gestureEvent===`pinch`||fg(t,`globalPan`)||gg(e))){var n=e.offsetX,r=e.offsetY;if(!this._dragging||!wg(`moveOnMouseMove`,e,this._opt)){var i=this._decideCursorStyle(e,n,r,!1);i&&t.setCursorStyle(i);return}t.setCursorStyle(this._opt.cursorGrabbing);var a=this._x,o=this._y,s=n-a,c=r-o;this._x=n,this._y=r,this._opt.preventDefaultMouseMove&&Cn(e.event),e.__ecRoamConsumed=!0,Cg(this,`pan`,`moveOnMouseMove`,e,{dx:s,dy:c,oldX:a,oldY:o,newX:n,newY:r,isAvailableBehavior:null})}},t.prototype._mouseupHandler=function(e){if(!gg(e)){var t=this._zr;if(!_n(e)){this._dragging=!1;var n=this._decideCursorStyle(e,e.offsetX,e.offsetY,!0);n&&t.setCursorStyle(n)}}},t.prototype._mousewheelHandler=function(e){if(!gg(e)){var t=wg(`zoomOnMouseWheel`,e,this._opt),n=wg(`moveOnMouseWheel`,e,this._opt),r=e.wheelDelta,i=Math.abs(r),a=e.offsetX,o=e.offsetY;if(!(r===0||!t&&!n)){if(t){var s=i>3?1.4:i>1?1.2:1.1,c=r>0?s:1/s;this._checkTriggerMoveZoom(this,`zoom`,`zoomOnMouseWheel`,e,{scale:c,originX:a,originY:o,isAvailableBehavior:null})}if(n){var l=Math.abs(r),u=(r>0?1:-1)*(l>3?.4:l>1?.15:.05);this._checkTriggerMoveZoom(this,`scrollMove`,`moveOnMouseWheel`,e,{scrollDelta:u,originX:a,originY:o,isAvailableBehavior:null})}}}},t.prototype._pinchHandler=function(e){if(!(fg(this._zr,`globalPan`)||gg(e))){var t=e.pinchScale>1?1.1:1/1.1;this._checkTriggerMoveZoom(this,`zoom`,null,e,{scale:t,originX:e.pinchX,originY:e.pinchY,isAvailableBehavior:null})}},t.prototype._checkTriggerMoveZoom=function(e,t,n,r,i){e._checkPointer(r,i.originX,i.originY)&&(Cn(r.event),r.__ecRoamConsumed=!0,Cg(e,t,n,r,i))},t}(Ji);function gg(e){return e.__ecRoamConsumed}var _g=$();function vg(e){var t=_g(e);return t.roam=t.roam||{},t.uniform=t.uniform||{},t}function yg(e,t,n,r){for(var i=vg(e).roam,a=i[t]=i[t]||[],o=0;o<a.length;o++){var s=a[o].zInfoParsed;if((s.zlevel-r.zlevel||s.z-r.z||s.z2-r.z2)<=0)break}a.splice(o,0,{listener:n,zInfoParsed:r}),xg(e,t)}function bg(e,t,n){for(var r=vg(e).roam[t]||[],i=0;i<r.length;i++)if(r[i].listener===n){r.splice(i,1),r.length||Sg(e,t);return}}function xg(e,t){var n=vg(e);n.uniform[t]||e.on(t,n.uniform[t]=function(e){var r=n.roam[t];if(r)for(var i=0;i<r.length;i++)r[i].listener(e)})}function Sg(e,t){var n=vg(e).uniform;n[t]&&(e.off(t,n[t]),n[t]=null)}function Cg(e,t,n,r,i){i.isAvailableBehavior=X(wg,null,n,r),e.trigger(t,i)}function wg(e,t,n){var r=n[e];return!e||r&&(!R(r)||t.event[r+`Key`])}function Tg(e){return e}var Eg=`view`;(function(e){L(t,e);function t(t,n,r){var i=e.call(this)||this;i.type=Eg,i.dimensions=[`x`,`y`];var a=Tg(i);a.invertY=t,a.lgCt=n,a.lgGeo=r;var o=a.trans=[];return o[0]=Pn(),o[1]=Pn(),o[2]=Pn(),a.mtRaw=ye(),a.mtRawInv=ye(),a.mtOverall=ye(),a.mtOverallInv=ye(),a.zoom=1,i}return t.prototype.getBoundingRect=function(){return kg(null,this)},t.prototype.getViewRect=function(){return Ag(null,this)},t.prototype.getRoamTransform=function(){return hi(Tg(this).trans[1])},t.prototype.dataToPoint=function(e,t,n){var r=t?Tg(this).mtRaw:Tg(this).mtOverall;return n||=[],r?di(n,e,r):Ii(n,e)},t.prototype.pointToData=function(e,t,n){n||=[];var r=Tg(this).mtOverallInv;return r?di(n,e,r):Ii(n,e)},t.prototype.convertToPixel=function(e,t,n){var r=jg(t);return r===this?r.dataToPoint(n):null},t.prototype.convertFromPixel=function(e,t,n){var r=jg(t);return r===this?r.pointToData(n):null},t.prototype.containPoint=function(e){var t=Tg(this);return Na(Dg,t.dataRect),Ue(Dg,Dg,t.mtOverall),kt(Dg,e[0],e[1])},t.dimensions=[`x`,`y`],t})(Ni);var Dg=m();function Og(e){return Tg(e).zoom}function kg(e,t){return Na(e||m(),Tg(t).dataRect)}function Ag(e,t){return Na(e||m(),Tg(t).viewRect)}ye(),ye(),m(),ye(),ye();function jg(e){var t=e.seriesModel;return t?t.coordinateSystem:null}Pn(),Pn();function Mg(e,t){if(t){var n=t.min||0,r=t.max||1/0;e=Math.max(Math.min(r,e),n)}return e}var Ng=$();function Pg(e){var t=e.mainData,n=e.datas;n||(n={main:t},e.datasAttr={main:`data`}),e.datas=e.mainData=null,Vg(t,n,e),J(n,function(n){J(t.TRANSFERABLE_METHODS,function(t){n.wrapMethod(t,Q(Fg,e))})}),t.wrapMethod(`cloneShallow`,Q(Lg,e)),J(t.CHANGABLE_METHODS,function(n){t.wrapMethod(n,Q(Ig,e))}),Yn(n[t.dataType]===t)}function Fg(e,t){if(Bg(this)){var n=G({},Ng(this).datas);n[this.dataType]=t,Vg(t,n,e)}else Hg(t,this.dataType,Ng(this).mainData,e);return t}function Ig(e,t){return e.struct&&e.struct.update(),t}function Lg(e,t){return J(Ng(t).datas,function(n,r){n!==t&&Hg(n.cloneShallow(),r,t,e)}),t}function Rg(e){var t=Ng(this).mainData;return e==null||t==null?t:Ng(t).datas[e]}function zg(){var e=Ng(this).mainData;return e==null?[{data:e}]:u(qr(Ng(e).datas),function(t){return{type:t,data:Ng(e).datas[t]}})}function Bg(e){return Ng(e).mainData===e}function Vg(e,t,n){Ng(e).datas={},J(t,function(t,r){Hg(t,r,e,n)})}function Hg(e,t,n,r){Ng(n).datas[t]=e,Ng(e).mainData=n,e.dataType=t,r.struct&&(e[r.structAttr]=r.struct,r.struct[r.datasAttr[t]]=e),e.getLinkedData=Rg,e.getLinkedDataAll=zg}var Ug=function(){function e(e,t){this.depth=0,this.height=0,this.dataIndex=-1,this.children=[],this.viewChildren=[],this.isExpand=!1,this.name=e||``,this.hostTree=t}return e.prototype.isRemoved=function(){return this.dataIndex<0},e.prototype.eachNode=function(e,t,n){V(e)&&(n=t,t=e,e=null),e||={},R(e)&&(e={order:e});var r=e.order||`preorder`,i=this[e.attr||`children`],a;r===`preorder`&&(a=t.call(n,this));for(var o=0;!a&&o<i.length;o++)i[o].eachNode(e,t,n);r===`postorder`&&t.call(n,this)},e.prototype.updateDepthAndHeight=function(e){var t=0;this.depth=e;for(var n=0;n<this.children.length;n++){var r=this.children[n];r.updateDepthAndHeight(e+1),r.height>t&&(t=r.height)}this.height=t+1},e.prototype.getNodeById=function(e){if(this.getId()===e)return this;for(var t=0,n=this.children,r=n.length;t<r;t++){var i=n[t].getNodeById(e);if(i)return i}},e.prototype.contains=function(e){if(e===this)return!0;for(var t=0,n=this.children,r=n.length;t<r;t++){var i=n[t].contains(e);if(i)return i}},e.prototype.getAncestors=function(e){for(var t=[],n=e?this:this.parentNode;n;)t.push(n),n=n.parentNode;return t.reverse(),t},e.prototype.getAncestorsIndices=function(){for(var e=[],t=this;t;)e.push(t.dataIndex),t=t.parentNode;return e.reverse(),e},e.prototype.getDescendantIndices=function(){var e=[];return this.eachNode(function(t){e.push(t.dataIndex)}),e},e.prototype.getValue=function(e){var t=this.hostTree.data;return t.getStore().get(t.getDimensionIndex(e||`value`),this.dataIndex)},e.prototype.setLayout=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemLayout(this.dataIndex,e,t)},e.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},e.prototype.getModel=function(e){if(!(this.dataIndex<0))return this.hostTree.data.getItemModel(this.dataIndex).getModel(e)},e.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},e.prototype.setVisual=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,e,t)},e.prototype.getVisual=function(e){return this.hostTree.data.getItemVisual(this.dataIndex,e)},e.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},e.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},e.prototype.getChildIndex=function(){if(this.parentNode){for(var e=this.parentNode.children,t=0;t<e.length;++t)if(e[t]===this)return t;return-1}return-1},e.prototype.isAncestorOf=function(e){for(var t=e.parentNode;t;){if(t===this)return!0;t=t.parentNode}return!1},e.prototype.isDescendantOf=function(e){return e!==this&&e.isAncestorOf(this)},e}(),Wg=function(){function e(e){this.type=`tree`,this._nodes=[],this.hostModel=e}return e.prototype.eachNode=function(e,t,n){this.root.eachNode(e,t,n)},e.prototype.getNodeByDataIndex=function(e){var t=this.data.getRawIndex(e);return this._nodes[t]},e.prototype.getNodeById=function(e){return this.root.getNodeById(e)},e.prototype.update=function(){for(var e=this.data,t=this._nodes,n=0,r=t.length;n<r;n++)t[n].dataIndex=-1;for(var n=0,r=e.count();n<r;n++)t[e.getRawIndex(n)].dataIndex=n},e.prototype.clearLayouts=function(){this.data.clearItemLayouts()},e.createTree=function(t,n,r){var i=new e(n),a=[],o=1;s(t);function s(e,t){var n=e.value;o=Math.max(o,B(n)?n.length:1),a.push(e);var r=new Ug(ge(e.name,``),i);t?Gg(r,t):i.root=r,i._nodes.push(r);var c=e.children;if(c)for(var l=0;l<c.length;l++)s(c[l],r)}i.root.updateDepthAndHeight(0);var c=So(a,{coordDimensions:[`value`],dimensionsCount:o}).dimensions,l=new xo(c,n);return l.initData(a),r&&r(l),Pg({mainData:l,struct:i,structAttr:`tree`}),i.update(),i},e}();function Gg(e,t){var n=t.children;e.parentNode!==t&&(n.push(e),e.parentNode=t)}function Kg(e,t,n){if(e&&Sa(t,e.type)>=0){var r=n.getData().tree.root,i=e.targetNode;if(R(i)&&(i=r.getNodeById(i)),i&&r.contains(i))return{node:i};var a=e.targetNodeId;if(a!=null&&(i=r.getNodeById(a)))return{node:i}}}function qg(e){for(var t=[];e;)e=e.parentNode,e&&t.push(e);return t.reverse()}function Jg(e,t){return Sa(qg(e),t)>=0}function Yg(e,t){for(var n=[];e;){var r=e.dataIndex;n.push({name:e.name,dataIndex:r,value:t.getRawValue(r)}),e=e.parentNode}return n.reverse(),n}var Xg=[`treemapZoomToNode`,`treemapRender`,`treemapMove`];function Zg(e){for(var t=0;t<Xg.length;t++)e.registerAction({type:Xg[t],update:`updateView`},yt);e.registerAction({type:`treemapRootToNode`,update:`updateView`},function(e,t){t.eachComponent({mainType:`series`,subType:`treemap`,query:e},n);function n(t,n){var r=Kg(e,[`treemapZoomToNode`,`treemapRootToNode`],t);if(r){var i=t.getViewRoot();i&&(e.direction=Jg(i,r.node)?`rollUp`:`drillDown`),t.resetViewRoot(r.node)}}})}function Qg(e){var t=e.getData().tree,n={};t.eachNode(function(t){for(var r=t;r&&r.depth>1;)r=r.parentNode;var i=Ir(e.ecModel,r.name||r.dataIndex+``,n);t.setVisual(`decal`,i)})}var $g=function(e){L(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.preventUsingHoverLayer=!0,n}return t.prototype.getInitialData=function(e,t){var n={name:e.name,children:e.data};e_(n);var r=e.levels||[],i=new ii({itemStyle:this.designatedVisualItemStyle={}},this,t);r=e.levels=t_(r,t);var a=u(r||[],function(e){return new ii(e,i,t)},this),o=Wg.createTree(n,this,s);function s(e){e.wrapMethod(`getItemModel`,function(e,t){var n=o.getNodeByDataIndex(t);return e.parentModel=(n?a[n.depth]:null)||i,e})}return o.data},t.prototype.optionUpdated=function(){this.resetViewRoot()},t.prototype.formatTooltip=function(e,t,n){var r=this.getData(),i=this.getRawValue(e);return nn(`nameValue`,{name:r.getName(e),value:i})},t.prototype.getDataParams=function(t){var n=e.prototype.getDataParams.apply(this,arguments);return n.treeAncestors=Yg(this.getData().tree.getNodeByDataIndex(t),this),n.treePathInfo=n.treeAncestors,n},t.prototype.setLayoutInfo=function(e){this.layoutInfo=this.layoutInfo||{},G(this.layoutInfo,e)},t.prototype.mapIdToIndex=function(e){var t=this._idIndexMap;t||(t=this._idIndexMap=q(),this._idIndexMapCount=0);var n=t.get(e);return n??t.set(e,n=this._idIndexMapCount++),n},t.prototype.getViewRoot=function(){return this._viewRoot},t.prototype.resetViewRoot=function(e){e?this._viewRoot=e:e=this._viewRoot;var t=this.getRawData().tree.root;(!e||e!==t&&!t.contains(e))&&(this._viewRoot=t)},t.prototype.enableAriaDecal=function(){Qg(this)},t.type=`series.treemap`,t.layoutMode=`box`,t.defaultOption={progressive:0,coordinateSystemUsage:`box`,left:Z.size.l,top:Z.size.xxxl,right:Z.size.l,bottom:Z.size.xxxl,sort:!0,clipWindow:`origin`,squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:`▶`,zoomToNodeRatio:.32*.32,scaleLimit:{max:5,min:.2},roam:!0,roamTrigger:`global`,nodeClick:`zoomToNode`,animation:!0,animationDurationUpdate:900,animationEasing:`quinticInOut`,breadcrumb:{show:!0,height:22,left:`center`,bottom:Z.size.m,emptyItemWidth:25,itemStyle:{color:Z.color.backgroundShade,textStyle:{color:Z.color.secondary}},emphasis:{itemStyle:{color:Z.color.background}}},label:{show:!0,distance:0,padding:5,position:`inside`,color:Z.color.neutral00,overflow:`truncate`},upperLabel:{show:!1,position:[0,`50%`],height:20,overflow:`truncate`,verticalAlign:`middle`},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:Z.color.neutral00,borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,`50%`],overflow:`truncate`,verticalAlign:`middle`}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:`index`,visibleMin:10,childrenVisibleMin:null,levels:[]},t}(Xt);function e_(e){var t=0;J(e.children,function(e){e_(e);var n=e.value;B(n)&&(n=n[0]),t+=n});var n=e.value;B(n)&&(n=n[0]),(n==null||isNaN(n))&&(n=t),n<0&&(n=0),B(e.value)?e.value[0]=n:e.value=n}function t_(e,t){var n=qn(t.get(`color`)),r=qn(t.get([`aria`,`decal`,`decals`]));if(n){e||=[];var i,a;J(e,function(e){var t=new ii(e),n=t.get(`color`),r=t.get(`decal`);(t.get([`itemStyle`,`color`])||n&&n!==`none`)&&(i=!0),(t.get([`itemStyle`,`decal`])||r&&r!==`none`)&&(a=!0)});var o=e[0]||={};return i||(o.color=n.slice()),!a&&r&&(o.decal=r.slice()),e}}var n_=8,r_=8,i_=5,a_=function(){function e(e){this.group=new W,e.add(this.group)}return e.prototype.render=function(e,t,n,r){var i=e.getModel(`breadcrumb`),a=this.group;if(a.removeAll(),!(!i.get(`show`)||!n)){var o=i.getModel(`itemStyle`),s=i.getModel(`emphasis`),c=o.getModel(`textStyle`),l=s.getModel([`itemStyle`,`textStyle`]),u=gr(e,t).refContainer,d={left:i.get(`left`),right:i.get(`right`),top:i.get(`top`),bottom:i.get(`bottom`)},f={emptyItemWidth:i.get(`emptyItemWidth`),totalWidth:0,renderList:[]},p=Cr(d,u);this._prepare(n,f,c),this._renderContent(e,f,p,o,s,c,l,r),ua(a,d,u)}},e.prototype._prepare=function(e,t,n){for(var r=e;r;r=r.parentNode){var i=ge(r.getModel().get(`name`),``),a=n.getTextRect(i),o=Math.max(a.width+n_*2,t.emptyItemWidth);t.totalWidth+=o+r_,t.renderList.push({node:r,text:i,width:o})}},e.prototype._renderContent=function(e,t,n,r,i,a,o,s){for(var c=0,l=t.emptyItemWidth,u=e.get([`breadcrumb`,`height`]),d=t.totalWidth,f=t.renderList,p=i.getModel(`itemStyle`).getItemStyle(),m=f.length-1;m>=0;m--){var h=f[m],g=h.node,_=h.width,v=h.text;d>n.width&&(d-=_-l,_=l,v=null);var y=new fi({shape:{points:o_(c,0,_,u,m===f.length-1,m===0)},style:ai(r.getItemStyle(),{lineJoin:`bevel`}),textContent:new j({style:sa(a,{text:v})}),textConfig:{position:`inside`},z2:10*1e4,onclick:Q(s,g)});y.disableLabelAnimation=!0,y.getTextContent().ensureState(`emphasis`).style=sa(o,{text:v}),y.ensureState(`emphasis`).style=p,Aa(y,i.get(`focus`),i.get(`blurScope`),i.get(`disabled`)),this.group.add(y),s_(y,e,g),c+=_+r_}},e.prototype.remove=function(){this.group.removeAll()},e}();function o_(e,t,n,r,i,a){var o=[[i?e:e-i_,t],[e+n,t],[e+n,t+r],[i?e:e-i_,t+r]];return!a&&o.splice(2,0,[e+n+i_,t+r/2]),!i&&o.push([e,t+r/2]),o}function s_(e,t,n){H(e).eventData={componentType:`series`,componentSubType:`treemap`,componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:`treemap`,selfType:`breadcrumb`,nodeData:{dataIndex:n&&n.dataIndex,name:n&&n.name},treePathInfo:n&&Yg(n,t)}}var c_=function(){function e(){this._storage=[],this._elExistsMap={}}return e.prototype.add=function(e,t,n,r,i){return this._elExistsMap[e.id]?!1:(this._elExistsMap[e.id]=!0,this._storage.push({el:e,target:t,duration:n,delay:r,easing:i}),!0)},e.prototype.finished=function(e){return this._finishedCallback=e,this},e.prototype.start=function(){for(var e=this,t=this._storage.length,n=function(){t--,t<=0&&(e._storage.length=0,e._elExistsMap={},e._finishedCallback&&e._finishedCallback())},r=0,i=this._storage.length;r<i;r++){var a=this._storage[r];a.el.animateTo(a.target,{duration:a.duration,delay:a.delay,easing:a.easing,setToFinal:!0,done:n,aborted:n})}return this},e}();function l_(){return new c_}var u_=Math.max,d_=Math.min,f_=J,p_=[`itemStyle`,`borderWidth`],m_=[`itemStyle`,`gapWidth`],h_=[`upperLabel`,`show`],g_=[`upperLabel`,`height`],__={seriesType:`treemap`,reset:function(e,t,n,r){var i=e.option,a=gr(e,n).refContainer,o=Cr(e.getBoxLayoutParams(),a),s=r&&r.type,c=Kg(r,[`treemapZoomToNode`,`treemapRootToNode`],e),l=s===`treemapRender`||s===`treemapMove`?r.rootRect:null,u=e.getViewRoot(),d=qg(u);if(s!==`treemapMove`){var f=!1,p=s===`treemapZoomToNode`?(f=!0,T_(e,c,u,o)):l?(f=!0,G({},l)):G({},o);if(f){var m=k_(o,p);m=A_(m,e),p.width=o.width*m,p.height=o.height*m}var h=i.sort;h&&h!==`asc`&&h!==`desc`&&(h=`desc`);var g={squareRatio:i.squareRatio,sort:h,leafDepth:i.leafDepth};u.hostTree.clearLayouts();var _={x:0,y:0,width:p.width,height:p.height,area:p.width*p.height};u.setLayout(_),v_(u,g,!1,0),_=u.getLayout(),f_(d,function(e,t){var n=(d[t+1]||u).getValue();e.setLayout(G({dataExtent:[n,n],borderWidth:0,upperHeight:0},_))})}var v=e.getData().tree.root;v.setLayout(E_(o,l,c),!0),e.setLayoutInfo(o),D_(v,new Te(-o.x,-o.y,n.getWidth(),n.getHeight()),d,u,0)}};function v_(e,t,n,r){var i,a;if(!e.isRemoved()){var o=e.getLayout();i=o.width,a=o.height;var s=e.getModel(),c=s.get(p_),l=s.get(m_)/2,u=O_(s),d=Math.max(c,u),f=c-l,p=d-l;e.setLayout({borderWidth:c,upperHeight:d,upperLabelHeight:u},!0),i=u_(i-2*f,0),a=u_(a-f-p,0);var m=i*a,h=y_(e,s,m,t,n,r);if(h.length){var g={x:f,y:p,width:i,height:a},_=d_(i,a),v=1/0,y=[];y.area=0;for(var b=0,x=h.length;b<x;){var S=h[b];y.push(S),y.area+=S.getLayout().area;var C=C_(y,_,t.squareRatio);C<=v?(b++,v=C):(y.area-=y.pop().getLayout().area,w_(y,_,g,l,!1),_=d_(g.width,g.height),y.length=y.area=0,v=1/0)}if(y.length&&w_(y,_,g,l,!0),!n){var w=s.get(`childrenVisibleMin`);w!=null&&m<w&&(n=!0)}for(var b=0,x=h.length;b<x;b++)v_(h[b],t,n,r+1)}}}function y_(e,t,n,r,i,a){var o=e.children||[],s=r.sort;s!==`asc`&&s!==`desc`&&(s=null);var c=r.leafDepth!=null&&r.leafDepth<=a;if(i&&!c)return e.viewChildren=[];o=ca(o,function(e){return!e.isRemoved()}),x_(o,s);var l=S_(t,o,s);if(l.sum===0||(l.sum=b_(t,n,l.sum,s,o),l.sum===0))return e.viewChildren=[];for(var u=0,d=o.length;u<d;u++){var f=o[u].getValue()/l.sum*n;o[u].setLayout({area:f})}return c&&(o.length&&e.setLayout({isLeafRoot:!0},!0),o.length=0),e.viewChildren=o,e.setLayout({dataExtent:l.dataExtent},!0),o}function b_(e,t,n,r,i){if(!r)return n;for(var a=e.get(`visibleMin`),o=i.length,s=o,c=o-1;c>=0;c--){var l=i[r===`asc`?o-c-1:c].getValue();l/n*t<a&&(s=c,n-=l)}return r===`asc`?i.splice(0,o-s):i.splice(s,o-s),n}function x_(e,t){return t&&e.sort(function(e,n){var r=t===`asc`?e.getValue()-n.getValue():n.getValue()-e.getValue();return r===0?t===`asc`?e.dataIndex-n.dataIndex:n.dataIndex-e.dataIndex:r}),e}function S_(e,t,n){for(var r=0,i=0,a=t.length;i<a;i++)r+=t[i].getValue();var o=e.get(`visualDimension`),s;return!t||!t.length?s=[NaN,NaN]:o===`value`&&n?(s=[t[t.length-1].getValue(),t[0].getValue()],n===`asc`&&s.reverse()):(s=or(),f_(t,function(e){var t=e.getValue(o);t<s[0]&&(s[0]=t),t>s[1]&&(s[1]=t)})),{sum:r,dataExtent:s}}function C_(e,t,n){for(var r=0,i=1/0,a=0,o=void 0,s=e.length;a<s;a++)o=e[a].getLayout().area,o&&(o<i&&(i=o),o>r&&(r=o));var c=e.area*e.area,l=t*t*n;return c?u_(l*r/c,c/(l*i)):1/0}function w_(e,t,n,r,i){var a=t===n.width?0:1,o=1-a,s=[`x`,`y`],c=[`width`,`height`],l=n[s[a]],u=t?e.area/t:0;(i||u>n[c[o]])&&(u=n[c[o]]);for(var d=0,f=e.length;d<f;d++){var p=e[d],m={},h=u?p.getLayout().area/u:0,g=m[c[o]]=u_(u-2*r,0),_=n[s[a]]+n[c[a]]-l,v=d===f-1||_<h?_:h,y=m[c[a]]=u_(v-2*r,0);m[s[o]]=n[s[o]]+d_(r,g/2),m[s[a]]=l+d_(r,y/2),l+=v,p.setLayout(m,!0)}n[s[o]]+=u,n[c[o]]-=u}function T_(e,t,n,r){var i=(t||{}).node,a=r.width,o=r.height,s=G({},r);if(!i||i===n)return s;for(var c,l=a*o,u=l*e.option.zoomToNodeRatio;c=i.parentNode;){for(var d=0,f=c.children,p=0,m=f.length;p<m;p++)d+=f[p].getValue();var h=i.getValue();if(h===0)return s;u*=d/h;var g=c.getModel(),_=g.get(p_),v=Math.max(_,O_(g));u+=4*_*_+(3*_+v)*u**.5,u>ba&&(u=ba),i=c}u<l&&(u=l);var y=(u/l)**.5;return{width:a*y,height:o*y}}function E_(e,t,n){if(t)return{x:t.x,y:t.y};var r={x:0,y:0};if(!n)return r;var i=n.node,a=i.getLayout();if(!a)return r;for(var o=[a.width/2,a.height/2],s=i;s;){var c=s.getLayout();o[0]+=c.x,o[1]+=c.y,s=s.parentNode}return{x:e.width/2-o[0],y:e.height/2-o[1]}}function D_(e,t,n,r,i){var a=e.getLayout(),o=n[i],s=o&&o===e;if(!(o&&!s||i===n.length&&e!==r)){e.setLayout({isInView:!0,invisible:!s&&!t.intersect(a),isAboveViewRoot:s},!0);var c=new Te(t.x-a.x,t.y-a.y,t.width,t.height);f_(e.viewChildren||[],function(e){D_(e,c,n,r,i+1)})}}function O_(e){return e.get(h_)?e.get(g_):0}function k_(e,t){return t.width/e.width||t.height/e.height||1}function A_(e,t){return Mg(e,t.get(`scaleLimit`,!0))}var j_=W,M_=d,N_=3,P_=`label`,F_=`upperLabel`,I_=100,L_=20,R_=30,z_=v([[`fill`,`color`],[`stroke`,`strokeColor`],[`lineWidth`,`strokeWidth`],[`shadowBlur`],[`shadowOffsetX`],[`shadowOffsetY`],[`shadowColor`]]),B_=function(e){var t=z_(e);return t.stroke=t.fill=t.lineWidth=null,t},V_=$(),H_=function(e){L(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n._state=`ready`,n._storage=U_(),n}return t.prototype.render=function(e,t,n,r){if(!(Sa(t.findComponents({mainType:`series`,subType:`treemap`,query:r}),e)<0)){this.seriesModel=e,this.api=n,this.ecModel=t;var i=Kg(r,[`treemapZoomToNode`,`treemapRootToNode`],e),a=r&&r.type,o=e.layoutInfo,s=!this._oldTree,c=this._storage,l=a===`treemapRootToNode`&&i&&c?{rootNodeGroup:c.nodeGroup[i.node.getRawIndex()],direction:r.direction}:null,u=this._giveContainerGroup(o),d=e.get(`animation`),f=this._doRender(u,e,l);d&&!s&&(!a||a===`treemapZoomToNode`||a===`treemapRootToNode`)?this._doAnimation(u,f,e,l):f.renderFinally(),this._resetController(n),this._renderBreadcrumb(e,n,i)}},t.prototype._giveContainerGroup=function(e){var t=this._containerGroup;return t||(t=this._containerGroup=new j_,this._initEvents(t),this.group.add(t)),t.x=e.x,t.y=e.y,t},t.prototype._doRender=function(e,t,n){var r=t.getData().tree,i=this._oldTree,a=U_(),o=U_(),s=this._storage,c=[];function l(e,r,i,l){return W_(t,o,s,n,a,c,e,r,i,l)}d(r.root?[r.root]:[],i&&i.root?[i.root]:[],e,r===i||!i,0);var u=f(s);return this._oldTree=r,this._storage=o,{lastsForAnimation:a,willDeleteEls:u,renderFinally:p};function d(e,t,n,r,i){r?(t=e,J(e,function(e,t){!e.isRemoved()&&o(t,t)})):new Ka(t,e,a,a).add(o).update(o).remove(Q(o,null)).execute();function a(e){return e.getId()}function o(a,o){var s=a==null?null:e[a],c=o==null?null:t[o],u=l(s,c,n,i);u&&d(s&&s.viewChildren||[],c&&c.viewChildren||[],u,r,i+1)}}function f(e){var t=U_();return e&&J(e,function(e,n){var r=t[n];J(e,function(e){e&&(r.push(e),V_(e).willDelete=!0)})}),t}function p(){J(u,function(e){J(e,function(e){e.parent&&e.parent.remove(e)})}),J(c,function(e){e.invisible=!0,e.dirty()})}},t.prototype._doAnimation=function(e,t,n,r){var i=n.get(`animationDurationUpdate`),a=n.get(`animationEasing`),o=(V(i)?0:i)||0,s=(V(a)?null:a)||`cubicOut`,c=l_();J(t.willDeleteEls,function(e,t){J(e,function(e,n){if(!e.invisible){var i=e.parent,a,l=V_(i);if(r&&r.direction===`drillDown`)a=i===r.rootNodeGroup?{shape:{x:0,y:0,width:l.nodeWidth,height:l.nodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var u=0,d=0;l.willDelete||(u=l.nodeWidth/2,d=l.nodeHeight/2),a=t===`nodeGroup`?{x:u,y:d,style:{opacity:0}}:{shape:{x:u,y:d,width:0,height:0},style:{opacity:0}}}a&&c.add(e,a,o,0,s)}})}),J(this._storage,function(e,n){J(e,function(e,r){var i=t.lastsForAnimation[n][r],a={};i&&(e instanceof W?i.oldX!=null&&(a.x=e.x,a.y=e.y,e.x=i.oldX,e.y=i.oldY):(i.oldShape&&(a.shape=G({},e.shape),e.setShape(i.oldShape)),i.fadein?(e.setStyle(`opacity`,0),a.style={opacity:1}):e.style.opacity!==1&&(a.style={opacity:1})),c.add(e,a,o,0,s))})},this),this._state=`animating`,c.finished(X(function(){this._state=`ready`,t.renderFinally()},this)).start()},t.prototype._resetController=function(e){var t=this,n=this.seriesModel,r=this._controller;r||(r=this._controller=new hg(e.getZr()),r.on(`pan`,X(this._onPan,this)),r.on(`zoom`,X(this._onZoom,this))),r.enable(n.get(`roam`),{api:e,zInfo:{component:n},triggerInfo:{roamTrigger:n.get(`roamTrigger`),isInSelf:function(e,n,r){var i=t._containerGroup;return i?i.getBoundingRect().contain(n-i.x,r-i.y):!1}}})},t.prototype._clearController=function(){var e=this._controller;e&&=(e.dispose(),null)},t.prototype._onPan=function(e){if(this._state!==`animating`&&(Math.abs(e.dx)>N_||Math.abs(e.dy)>N_)){var t=this.seriesModel.getData().tree.root;if(!t)return;var n=t.getLayout();if(!n)return;this.api.dispatchAction({type:`treemapMove`,from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:n.x+e.dx,y:n.y+e.dy,width:n.width,height:n.height}})}},t.prototype._onZoom=function(e){var t=e.originX,n=e.originY,r=e.scale,i=this.seriesModel;if(this._state!==`animating`){var a=i.getData().tree.root;if(!a)return;var o=a.getLayout();if(!o)return;var s=new Te(o.x,o.y,o.width,o.height),c=i.layoutInfo,l=k_(c,o),u=l*r;u=A_(u,i);var d=u/l;t-=c.x,n-=c.y;var f=ye();Me(f,f,[-t,-n]),Oi(f,f,[d,d]),Me(f,f,[t,n]),s.applyTransform(f),this.api.dispatchAction({type:`treemapRender`,from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:s.x,y:s.y,width:s.width,height:s.height}})}},t.prototype._initEvents=function(e){var t=this;e.on(`click`,function(e){if(t._state===`ready`){var n=t.seriesModel.get(`nodeClick`,!0);if(n){var r=t.findTarget(e.offsetX,e.offsetY);if(r){var i=r.node;if(i.getLayout().isLeafRoot)t._rootToNode(r);else if(n===`zoomToNode`)t._zoomToNode(r);else if(n===`link`){var a=i.hostTree.data.getItemModel(i.dataIndex),o=a.get(`link`,!0),s=a.get(`target`,!0)||`blank`;o&&Ur(o,s)}}}}},this)},t.prototype._renderBreadcrumb=function(e,t,n){var r=this;n||(n=e.get(`leafDepth`,!0)==null?this.findTarget(t.getWidth()/2,t.getHeight()/2):{node:e.getViewRoot()},n||={node:e.getData().tree.root}),(this._breadcrumb||=new a_(this.group)).render(e,t,n.node,function(t){r._state!==`animating`&&(Jg(e.getViewRoot(),t)?r._rootToNode({node:t}):r._zoomToNode({node:t}))})},t.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=U_(),this._state=`ready`,this._breadcrumb&&this._breadcrumb.remove()},t.prototype.dispose=function(){this._clearController()},t.prototype._zoomToNode=function(e){this.api.dispatchAction({type:`treemapZoomToNode`,from:this.uid,seriesId:this.seriesModel.id,targetNode:e.node})},t.prototype._rootToNode=function(e){this.api.dispatchAction({type:`treemapRootToNode`,from:this.uid,seriesId:this.seriesModel.id,targetNode:e.node})},t.prototype.findTarget=function(e,t){var n;return this.seriesModel.getViewRoot().eachNode({attr:`viewChildren`,order:`preorder`},function(r){var i=this._storage.background[r.getRawIndex()];if(i){var a=i.transformCoordToLocal(e,t),o=i.shape;if(o.x<=a[0]&&a[0]<=o.x+o.width&&o.y<=a[1]&&a[1]<=o.y+o.height)n={node:r,offsetX:a[0],offsetY:a[1]};else return!1}},this),n},t.type=`treemap`,t}(Ot);function U_(){return{nodeGroup:[],background:[],content:[]}}function W_(e,t,n,r,i,a,o,s,c,l){if(!o)return;var u=o.getLayout(),d=e.getData(),f=o.getModel();if(d.setItemGraphicEl(o.dataIndex,null),!u||!u.isInView)return;var p=u.width,m=u.height,h=u.borderWidth,g=u.invisible,_=o.getRawIndex(),v=s&&s.getRawIndex(),y=o.viewChildren,b=u.upperHeight,x=y&&y.length,S=f.getModel(`itemStyle`),C=f.getModel([`emphasis`,`itemStyle`]),w=f.getModel([`blur`,`itemStyle`]),T=f.getModel([`select`,`itemStyle`]),E=S.get(`borderRadius`)||0,D=ae(`nodeGroup`,j_);if(!D)return;if(c.add(D),D.x=u.x||0,D.y=u.y||0,D.markRedraw(),V_(D).nodeWidth=p,V_(D).nodeHeight=m,u.isAboveViewRoot)return D;var O=ae(`background`,M_,l,L_);O&&ee(D,O,x&&u.upperLabelHeight);var k=f.getModel(`emphasis`),A=k.get(`focus`),j=k.get(`blurScope`),M=k.get(`disabled`),N=A===`ancestor`?o.getAncestorsIndices():A===`descendant`?o.getDescendantIndices():A;if(x)hr(D)&&Or(D,!1),O&&(Or(O,!M),d.setItemGraphicEl(o.dataIndex,O),ei(O,N,j));else{var P=ae(`content`,M_,l,R_);P&&te(D,P),O.disableMorphing=!0,O&&hr(O)&&Or(O,!1),Or(D,!M),d.setItemGraphicEl(o.dataIndex,D);var F=f.getShallow(`cursor`);F&&P.attr(`cursor`,F),ei(D,N,j)}return D;function ee(t,n,r){var i=H(n);if(i.dataIndex=o.dataIndex,i.seriesIndex=e.seriesIndex,n.setShape({x:0,y:0,width:p,height:m,r:E}),g)ne(n);else{n.invisible=!1;var a=o.getVisual(`style`),s=a.stroke,c=B_(S);c.fill=s;var l=z_(C);l.fill=C.get(`borderColor`);var u=z_(w);u.fill=w.get(`borderColor`);var d=z_(T);if(d.fill=T.get(`borderColor`),r){var f=p-2*h;re(n,s,a.opacity,{x:h,y:0,width:f,height:b})}else n.removeTextContent();n.setStyle(c),n.ensureState(`emphasis`).style=l,n.ensureState(`blur`).style=u,n.ensureState(`select`).style=d,Sr(n)}t.add(n)}function te(t,n){var r=H(n);r.dataIndex=o.dataIndex,r.seriesIndex=e.seriesIndex;var i=Math.max(p-2*h,0),a=Math.max(m-2*h,0);if(n.culling=!0,n.setShape({x:h,y:h,width:i,height:a,r:E}),g)ne(n);else{n.invisible=!1;var s=o.getVisual(`style`),c=s.fill,l=B_(S);l.fill=c,l.decal=s.decal;var u=z_(C),d=z_(w),f=z_(T);re(n,c,s.opacity,null),n.setStyle(l),n.ensureState(`emphasis`).style=u,n.ensureState(`blur`).style=d,n.ensureState(`select`).style=f,Sr(n)}t.add(n)}function ne(e){!e.invisible&&a.push(e)}function re(t,n,r,i){var a=f.getModel(i?F_:P_),s=ge(f.get(`name`),null),c=a.getShallow(`show`);Lt(t,Un(f,i?F_:P_),{defaultText:c?s:null,inheritColor:n,defaultOpacity:r,labelFetcher:e,labelDataIndex:o.dataIndex});var l=t.getTextContent();if(l){var d=l.style,p=ce(d.padding||0);i&&(t.setTextConfig({layoutRect:i}),l.disableLabelLayout=!0),l.beforeUpdate=function(){var e=Math.max((i?i.width:t.shape.width)-p[1]-p[3],0),n=Math.max((i?i.height:t.shape.height)-p[0]-p[2],0);(d.width!==e||d.height!==n)&&l.setStyle({width:e,height:n})},d.truncateMinChar=2,d.lineOverflow=`truncate`,ie(d,i,u);var m=l.getState(`emphasis`);ie(m?m.style:null,i,u)}}function ie(t,n,r){var i=t?t.text:null;if(!n&&r.isLeafRoot&&i!=null){var a=e.get(`drillDownIcon`,!0);t.text=a?a+` `+i:i}}function ae(e,r,a,o){var s=v!=null&&n[e][v],c=i[e];return s?(n[e][v]=null,oe(c,s)):g||(s=new r,s instanceof Mt&&(s.z2=G_(a,o)),se(c,s)),t[e][_]=s}function oe(e,t){var n=e[_]={};t instanceof j_?(n.oldX=t.x,n.oldY=t.y):n.oldShape=G({},t.shape)}function se(e,t){var n=e[_]={},a=o.parentNode,s=t instanceof W;if(a&&(!r||r.direction===`drillDown`)){var c=0,l=0,u=i.background[a.getRawIndex()];!r&&u&&u.oldShape&&(c=u.oldShape.width,l=u.oldShape.height),s?(n.oldX=0,n.oldY=l):n.oldShape={x:c,y:l,width:0,height:0}}n.fadein=!s}}function G_(e,t){return e*I_+t}var K_=J,q_=A,J_=-1,Y_=function(){function e(t){var n=t.mappingMethod,r=t.type,i=this.option=ta(t);this.type=r,this.mappingMethod=n,this._normalizeData=sv[n];var a=e.visualHandlers[r];this.applyVisual=a.applyVisual,this.getColorMapper=a.getColorMapper,this._normalizedToVisual=a._normalizedToVisual[n],n===`piecewise`?(Q_(i),X_(i)):n===`category`?i.categories?Z_(i):Q_(i,!0):(Yn(n!==`linear`||i.dataExtent),Q_(i))}return e.prototype.mapValueToVisual=function(e){var t=this._normalizeData(e);return this._normalizedToVisual(t,e)},e.prototype.getNormalizer=function(){return X(this._normalizeData,this)},e.listVisualTypes=function(){return qr(e.visualHandlers)},e.isValidType=function(t){return e.visualHandlers.hasOwnProperty(t)},e.eachVisual=function(e,t,n){A(e)?J(e,t,n):t.call(n,e)},e.mapVisual=function(t,n,r){var i,a=B(t)?[]:A(t)?{}:(i=!0,null);return e.eachVisual(t,function(e,t){var o=n.call(r,e,t);i?a=o:a[t]=o}),a},e.retrieveVisuals=function(t){var n={},r;return t&&K_(e.visualHandlers,function(e,i){t.hasOwnProperty(i)&&(n[i]=t[i],r=!0)}),r?n:null},e.prepareVisualTypes=function(e){if(B(e))e=e.slice();else if(q_(e)){var t=[];K_(e,function(e,n){t.push(n)}),e=t}else return[];return e.sort(function(e,t){return t===`color`&&e!==`color`&&e.indexOf(`color`)===0?1:-1}),e},e.dependsOn=function(e,t){return t===`color`?!!(e&&e.indexOf(t)===0):e===t},e.findPieceIndex=function(e,t,n){for(var r,i=1/0,a=0,o=t.length;a<o;a++){var s=t[a].value;if(s!=null){if(s===e||R(s)&&s===e+``)return a;n&&d(s,a)}}for(var a=0,o=t.length;a<o;a++){var c=t[a],l=c.interval,u=c.close;if(l){if(l[0]===-1/0){if(cv(u[1],e,l[1]))return a}else if(l[1]===1/0){if(cv(u[0],l[0],e))return a}else if(cv(u[0],l[0],e)&&cv(u[1],e,l[1]))return a;n&&d(l[0],a),n&&d(l[1],a)}}if(n)return e===1/0?t.length-1:e===-1/0?0:r;function d(t,n){var a=Math.abs(t-e);a<i&&(i=a,r=n)}},e.visualHandlers={color:{applyVisual:tv(`color`),getColorMapper:function(){var e=this.option;return X(e.mappingMethod===`category`?function(e,t){return!t&&(e=this._normalizeData(e)),nv.call(this,e)}:function(t,n,r){var i=!!r;return!n&&(t=this._normalizeData(t)),r=Bt(t,e.parsedVisual,r),i?r:Xe(r,`rgba`)},this)},_normalizedToVisual:{linear:function(e){return Xe(Bt(e,this.option.parsedVisual),`rgba`)},category:nv,piecewise:function(e,t){var n=av.call(this,t);return n??=Xe(Bt(e,this.option.parsedVisual),`rgba`),n},fixed:rv}},colorHue:$_(function(e,t){return s(e,t)}),colorSaturation:$_(function(e,t){return s(e,null,t)}),colorLightness:$_(function(e,t){return s(e,null,null,t)}),colorAlpha:$_(function(e,t){return Gr(e,t)}),decal:{applyVisual:tv(`decal`),_normalizedToVisual:{linear:null,category:nv,piecewise:null,fixed:null}},opacity:{applyVisual:tv(`opacity`),_normalizedToVisual:iv([0,1])},liftZ:{applyVisual:tv(`liftZ`),_normalizedToVisual:{linear:rv,category:rv,piecewise:rv,fixed:rv}},symbol:{applyVisual:function(e,t,n){n(`symbol`,this.mapValueToVisual(e))},_normalizedToVisual:{linear:ev,category:nv,piecewise:function(e,t){var n=av.call(this,t);return n??=ev.call(this,e),n},fixed:rv}},symbolSize:{applyVisual:tv(`symbolSize`),_normalizedToVisual:iv([0,1])}},e}();function X_(e){var t=e.pieceList;e.hasSpecialVisual=!1,J(t,function(t,n){t.originIndex=n,t.visual!=null&&(e.hasSpecialVisual=!0)})}function Z_(e){var t=e.categories,n=e.categoryMap={},r=e.visual;if(K_(t,function(e,t){n[e]=t}),!B(r)){var i=[];A(r)?K_(r,function(e,t){var r=n[t];i[r??J_]=e}):i[J_]=r,r=ov(e,i)}for(var a=t.length-1;a>=0;a--)r[a]??(delete n[t[a]],t.pop())}function Q_(e,t){var n=e.visual,r=[];A(n)?K_(n,function(e){r.push(e)}):n!=null&&r.push(n),!t&&r.length===1&&!{color:1,symbol:1}.hasOwnProperty(e.type)&&(r[1]=r[0]),ov(e,r)}function $_(e){return{applyVisual:function(t,n,r){var i=this.mapValueToVisual(t);r(`color`,e(n(`color`),i))},_normalizedToVisual:iv([0,1])}}function ev(e){var t=this.option.visual;return t[Math.round(Y(e,[0,1],[0,t.length-1],!0))]||{}}function tv(e){return function(t,n,r){r(e,this.mapValueToVisual(t))}}function nv(e){var t=this.option.visual;return t[this.option.loop&&e!==J_?e%t.length:e]}function rv(){return this.option.visual[0]}function iv(e){return{linear:function(t){return Y(t,e,this.option.visual,!0)},category:nv,piecewise:function(t,n){var r=av.call(this,n);return r??=Y(t,e,this.option.visual,!0),r},fixed:rv}}function av(e){var t=this.option,n=t.pieceList;if(t.hasSpecialVisual){var r=n[Y_.findPieceIndex(e,n)];if(r&&r.visual)return r.visual[this.type]}}function ov(e,t){return e.visual=t,e.type===`color`&&(e.parsedVisual=u(t,function(e){return Rr(e)||[0,0,0,1]})),t}var sv={linear:function(e){return Y(e,this.option.dataExtent,[0,1],!0)},piecewise:function(e){var t=this.option.pieceList,n=Y_.findPieceIndex(e,t,!0);if(n!=null)return Y(n,[0,t.length-1],[0,1],!0)},category:function(e){return(this.option.categories?this.option.categoryMap[e]:e)??J_},fixed:yt};function cv(e,t,n){return e?t<=n:t<n}var lv=`itemStyle`,uv=$(),dv={seriesType:`treemap`,reset:function(e){var t=e.getData().tree.root;t.isRemoved()||fv(t,{},e.getViewRoot().getAncestors(),e)}};function fv(e,t,n,r){var i=e.getModel(),a=e.getLayout(),o=e.hostTree.data;if(!(!a||a.invisible||!a.isInView)){var s=i.getModel(lv),c=pv(s,t,r),l=o.ensureUniqueItemVisual(e.dataIndex,`style`),u=s.get(`borderColor`),d=s.get(`borderColorSaturation`),f;d!=null&&(f=mv(c),u=hv(d,f)),l.stroke=u;var p=e.viewChildren;if(!p||!p.length)f=mv(c),l.fill=f;else{var m=_v(e,i,a,s,c,p);J(p,function(e,t){(e.depth>=n.length||e===n[e.depth])&&fv(e,yv(i,c,e,t,m,r),n,r)})}}}function pv(e,t,n){var r=G({},t),i=n.designatedVisualItemStyle;return J([`color`,`colorAlpha`,`colorSaturation`],function(n){i[n]=t[n];var a=e.get(n);i[n]=null,a!=null&&(r[n]=a)}),r}function mv(e){var t=gv(e,`color`);if(t){var n=gv(e,`colorAlpha`),r=gv(e,`colorSaturation`);return r&&(t=s(t,null,null,r)),n&&(t=Gr(t,n)),t}}function hv(e,t){return t==null?null:s(t,null,null,e)}function gv(e,t){var n=e[t];if(n!=null&&n!==`none`)return n}function _v(e,t,n,r,i,a){if(!(!a||!a.length)){var o=vv(t,`color`)||i.color!=null&&i.color!==`none`&&(vv(t,`colorAlpha`)||vv(t,`colorSaturation`));if(o){var s=t.get(`visualMin`),c=t.get(`visualMax`),l=n.dataExtent.slice();s!=null&&s<l[0]&&(l[0]=s),c!=null&&c>l[1]&&(l[1]=c);var u=t.get(`colorMappingBy`),d={type:o.name,dataExtent:l,visual:o.range};d.type===`color`&&(u===`index`||u===`id`)?(d.mappingMethod=`category`,d.loop=!0):d.mappingMethod=`linear`;var f=new Y_(d);return uv(f).drColorMappingBy=u,f}}}function vv(e,t){var n=e.get(t);return B(n)&&n.length?{name:t,range:n}:null}function yv(e,t,n,r,i,a){var o=G({},t);if(i){var s=i.type,c=s===`color`&&uv(i).drColorMappingBy,l=c===`index`?r:c===`id`?a.mapIdToIndex(n.getId()):n.getValue(e.get(`visualDimension`));o[s]=i.mapValueToVisual(l)}return o}function bv(e){e.registerSeriesModel($g),e.registerChartView(H_),e.registerVisual(dv),e.registerLayout(__),Zg(e)}function xv(e){return`_EC_`+e}var Sv=function(){function e(e){this.type=`graph`,this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=e||!1}return e.prototype.isDirected=function(){return this._directed},e.prototype.addNode=function(e,t){e=e==null?``+t:``+e;var n=this._nodesMap;if(!n[xv(e)]){var r=new Cv(e,t);return r.hostGraph=this,this.nodes.push(r),n[xv(e)]=r,r}},e.prototype.getNodeByIndex=function(e){var t=this.data.getRawIndex(e);return this.nodes[t]},e.prototype.getNodeById=function(e){return this._nodesMap[xv(e)]},e.prototype.addEdge=function(e,t,n){var r=this._nodesMap,i=this._edgesMap;if(te(e)&&(e=this.nodes[e]),te(t)&&(t=this.nodes[t]),e instanceof Cv||(e=r[xv(e)]),t instanceof Cv||(t=r[xv(t)]),!(!e||!t)){var a=e.id+`-`+t.id,o=new wv(e,t,n);return o.hostGraph=this,this._directed&&(e.outEdges.push(o),t.inEdges.push(o)),e.edges.push(o),e!==t&&t.edges.push(o),this.edges.push(o),i[a]=o,o}},e.prototype.getEdgeByIndex=function(e){var t=this.edgeData.getRawIndex(e);return this.edges[t]},e.prototype.getEdge=function(e,t){e instanceof Cv&&(e=e.id),t instanceof Cv&&(t=t.id);var n=this._edgesMap;return this._directed?n[e+`-`+t]:n[e+`-`+t]||n[t+`-`+e]},e.prototype.eachNode=function(e,t){for(var n=this.nodes,r=n.length,i=0;i<r;i++)n[i].dataIndex>=0&&e.call(t,n[i],i)},e.prototype.eachEdge=function(e,t){for(var n=this.edges,r=n.length,i=0;i<r;i++)n[i].dataIndex>=0&&n[i].node1.dataIndex>=0&&n[i].node2.dataIndex>=0&&e.call(t,n[i],i)},e.prototype.breadthFirstTraverse=function(e,t,n,r){if(t instanceof Cv||(t=this._nodesMap[xv(t)]),t){for(var i=n===`out`?`outEdges`:n===`in`?`inEdges`:`edges`,a=0;a<this.nodes.length;a++)this.nodes[a].__visited=!1;if(!e.call(r,t,null))for(var o=[t];o.length;)for(var s=o.shift(),c=s[i],a=0;a<c.length;a++){var l=c[a],u=l.node1===s?l.node2:l.node1;if(!u.__visited){if(e.call(r,u,s))return;o.push(u),u.__visited=!0}}}},e.prototype.update=function(){for(var e=this.data,t=this.edgeData,n=this.nodes,r=this.edges,i=0,a=n.length;i<a;i++)n[i].dataIndex=-1;for(var i=0,a=e.count();i<a;i++)n[e.getRawIndex(i)].dataIndex=i;t.filterSelf(function(e){var n=r[t.getRawIndex(e)];return n.node1.dataIndex>=0&&n.node2.dataIndex>=0});for(var i=0,a=r.length;i<a;i++)r[i].dataIndex=-1;for(var i=0,a=t.count();i<a;i++)r[t.getRawIndex(i)].dataIndex=i},e.prototype.clone=function(){for(var t=new e(this._directed),n=this.nodes,r=this.edges,i=0;i<n.length;i++)t.addNode(n[i].id,n[i].dataIndex);for(var i=0;i<r.length;i++){var a=r[i];t.addEdge(a.node1.id,a.node2.id,a.dataIndex)}return t},e}(),Cv=function(){function e(e,t){this.inEdges=[],this.outEdges=[],this.edges=[],this.dataIndex=-1,this.id=e??``,this.dataIndex=t??-1}return e.prototype.degree=function(){return this.edges.length},e.prototype.inDegree=function(){return this.inEdges.length},e.prototype.outDegree=function(){return this.outEdges.length},e.prototype.getModel=function(e){if(!(this.dataIndex<0))return this.hostGraph.data.getItemModel(this.dataIndex).getModel(e)},e.prototype.getAdjacentDataIndices=function(){for(var e={edge:[],node:[]},t=0;t<this.edges.length;t++){var n=this.edges[t];n.dataIndex<0||(e.edge.push(n.dataIndex),e.node.push(n.node1.dataIndex,n.node2.dataIndex))}return e},e.prototype.getTrajectoryDataIndices=function(){for(var e=q(),t=q(),n=0,r=this.edges.length;n<r;n++){var i=this.edges[n];if(!(i.dataIndex<0)){e.set(i.dataIndex,!0);for(var a=[i.node1],o=[i.node2],s=0;s<a.length;){var c=a[s];s++,t.set(c.dataIndex,!0);for(var l=c.inEdges,u=0,d=l.length,f=void 0,p=void 0;u<d;u++)f=l[u],p=f.dataIndex,p>=0&&!e.hasKey(p)&&(e.set(p,!0),a.push(f.node1))}for(s=0;s<o.length;){var m=o[s];s++,t.set(m.dataIndex,!0);for(var h=m.outEdges,u=0,g=h.length,_=void 0,v=void 0;u<g;u++)_=h[u],v=_.dataIndex,v>=0&&!e.hasKey(v)&&(e.set(v,!0),o.push(_.node2))}}}return{edge:e.keys(),node:t.keys()}},e}(),wv=function(){function e(e,t,n){this.dataIndex=-1,this.node1=e,this.node2=t,this.dataIndex=n??-1}return e.prototype.getModel=function(e){if(!(this.dataIndex<0))return this.hostGraph.edgeData.getItemModel(this.dataIndex).getModel(e)},e.prototype.getAdjacentDataIndices=function(){return{edge:[this.dataIndex],node:[this.node1.dataIndex,this.node2.dataIndex]}},e.prototype.getTrajectoryDataIndices=function(){var e=q(),t=q();e.set(this.dataIndex,!0);for(var n=[this.node1],r=[this.node2],i=0;i<n.length;){var a=n[i];i++,t.set(a.dataIndex,!0);for(var o=a.inEdges,s=0,c=o.length,l=void 0,u=void 0;s<c;s++)l=a.inEdges[s],u=l.dataIndex,u>=0&&!e.hasKey(u)&&(e.set(u,!0),n.push(l.node1))}for(i=0;i<r.length;){var d=r[i];i++,t.set(d.dataIndex,!0);for(var f=d.outEdges,s=0,c=f.length,p=void 0,m=void 0;s<c;s++)p=d.outEdges[s],m=p.dataIndex,m>=0&&!e.hasKey(m)&&(e.set(m,!0),r.push(p.node2))}return{edge:e.keys(),node:t.keys()}},e}();function Tv(e,t){return{getValue:function(n){var r=this[e][t];return r.getStore().get(r.getDimensionIndex(n||`value`),this.dataIndex)},setVisual:function(n,r){this.dataIndex>=0&&this[e][t].setItemVisual(this.dataIndex,n,r)},getVisual:function(n){return this[e][t].getItemVisual(this.dataIndex,n)},setLayout:function(n,r){this.dataIndex>=0&&this[e][t].setItemLayout(this.dataIndex,n,r)},getLayout:function(){return this[e][t].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[e][t].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[e][t].getRawIndex(this.dataIndex)}}}ot(Cv,Tv(`hostGraph`,`data`)),ot(wv,Tv(`hostGraph`,`edgeData`));function Ev(e,t,n,r,i){for(var a=new Sv(r),o=0;o<e.length;o++)a.addNode(Ke(e[o].id,e[o].name,o),o);for(var s=[],c=[],l=0,o=0;o<t.length;o++){var u=t[o],d=u.source,f=u.target;a.addEdge(d,f,l)&&(c.push(u),s.push(Ke(ge(u.id,null),d+` > `+f)),l++)}var p=n.get(`coordinateSystem`),m;if(p===`cartesian2d`||p===`polar`||p===`matrix`)m=Fo(e,n);else{var h=Wn.get(p),g=h&&h.dimensions||[];Sa(g,`value`)<0&&g.concat([`value`]);var _=So(e,{coordDimensions:g,encodeDefine:n.getEncode()}).dimensions;m=new xo(_,n),m.initData(e)}var v=new xo([`value`],n);return v.initData(c,s),i&&i(m,v),Pg({mainData:m,struct:a,structAttr:`graph`,datas:{node:m,edge:v},datasAttr:{node:`data`,edge:`edgeData`}}),a.update(),a}var Dv=lr.prototype,Ov=r.prototype,kv=function(){function e(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return e}();(function(e){L(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t})(kv);function Av(e){return isNaN(+e.cpx1)||isNaN(+e.cpy1)}var jv=function(e){L(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`ec-line`,n}return t.prototype.getDefaultStyle=function(){return{stroke:Z.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new kv},t.prototype.buildPath=function(e,t){Av(t)?Dv.buildPath.call(this,e,t):Ov.buildPath.call(this,e,t)},t.prototype.pointAt=function(e){return Av(this.shape)?Dv.pointAt.call(this,e):Ov.pointAt.call(this,e)},t.prototype.tangentAt=function(e){var t=this.shape,n=Av(t)?[t.x2-t.x1,t.y2-t.y1]:Ov.tangentAt.call(this,e);return vi(n,n)},t}(bt),Mv=[`fromSymbol`,`toSymbol`];function Nv(e){return`_`+e+`Type`}function Pv(e,t,n){var r=t.getItemVisual(n,e);if(!r||r===`none`)return r;var i=t.getItemVisual(n,e+`Size`),a=t.getItemVisual(n,e+`Rotate`),o=t.getItemVisual(n,e+`Offset`),s=t.getItemVisual(n,e+`KeepAspect`),c=b(i),l=Pt(o||0,c);return r+c+l+(a||``)+(s||``)}function Fv(e,t,n){var r=t.getItemVisual(n,e);if(!(!r||r===`none`)){var i=t.getItemVisual(n,e+`Size`),a=t.getItemVisual(n,e+`Rotate`),o=t.getItemVisual(n,e+`Offset`),s=t.getItemVisual(n,e+`KeepAspect`),c=b(i),l=Pt(o||0,c),u=va(r,-c[0]/2+l[0],-c[1]/2+l[1],c[0],c[1],null,s);return u.__specifiedRotation=a==null||isNaN(a)?void 0:+a*Math.PI/180||0,u.name=e,u}}function Iv(e){var t=new jv({name:`line`,subPixelOptimize:!0});return Lv(t.shape,e),t}function Lv(e,t){e.x1=t[0][0],e.y1=t[0][1],e.x2=t[1][0],e.y2=t[1][1],e.percent=1;var n=t[2];n?(e.cpx1=n[0],e.cpy1=n[1]):(e.cpx1=NaN,e.cpy1=NaN)}var Rv=function(e){L(t,e);function t(t,n,r){var i=e.call(this)||this;return i._createLine(t,n,r),i}return t.prototype._createLine=function(e,t,n){var r=e.hostModel,i=e.getItemLayout(t),a=e.getItemVisual(t,`z2`),o=Iv(i);o.shape.percent=0,me(o,{z2:z(a,0),shape:{percent:1}},r,t),this.add(o),J(Mv,function(n){var r=Fv(n,e,t);this.add(r),this[Nv(n)]=Pv(n,e,t)},this),this._updateCommonStl(e,t,n)},t.prototype.updateData=function(e,t,n){var r=e.hostModel,i=this.childOfName(`line`),a=e.getItemLayout(t),o={shape:{}};Lv(o.shape,a),yn(i,o,r,t),J(Mv,function(n){var r=Pv(n,e,t),i=Nv(n);if(this[i]!==r){this.remove(this.childOfName(n));var a=Fv(n,e,t);this.add(a)}this[i]=r},this),this._updateCommonStl(e,t,n)},t.prototype.getLinePath=function(){return this.childAt(0)},t.prototype._updateCommonStl=function(e,t,n){var r=e.hostModel,i=this.childOfName(`line`),a=n&&n.emphasisLineStyle,o=n&&n.blurLineStyle,s=n&&n.selectLineStyle,c=n&&n.labelStatesModels,l=n&&n.emphasisDisabled,u=n&&n.focus,d=n&&n.blurScope;if(!n||e.hasItemOption){var f=e.getItemModel(t),p=f.getModel(`emphasis`);a=p.getModel(`lineStyle`).getLineStyle(),o=f.getModel([`blur`,`lineStyle`]).getLineStyle(),s=f.getModel([`select`,`lineStyle`]).getLineStyle(),l=p.get(`disabled`),u=p.get(`focus`),d=p.get(`blurScope`),c=Un(f)}var m=e.getItemVisual(t,`style`),h=m.stroke;i.useStyle(m),i.style.fill=null,i.style.strokeNoScale=!0,i.ensureState(`emphasis`).style=a,i.ensureState(`blur`).style=o,i.ensureState(`select`).style=s,J(Mv,function(e){var t=this.childOfName(e);if(t){t.setColor(h),t.style.opacity=m.opacity;for(var n=0;n<Ui.length;n++){var r=Ui[n],a=i.getState(r);if(a){var o=a.style||{},s=t.ensureState(r),c=s.style||={};o.stroke!=null&&(c[t.__isEmptyBrush?`stroke`:`fill`]=o.stroke),o.opacity!=null&&(c.opacity=o.opacity)}}t.markRedraw()}},this);var g=r.getRawValue(t);Lt(this,c,{labelDataIndex:t,labelFetcher:{getFormattedLabel:function(t,n){return r.getFormattedLabel(t,n,e.dataType)}},inheritColor:h||Z.color.neutral99,defaultOpacity:m.opacity,defaultText:(g==null?e.getName(t):isFinite(g)?I(g,10):g)+``});var _=this.getTextContent();if(_){var v=c.normal;_.__align=_.style.align,_.__verticalAlign=_.style.verticalAlign,_.__position=v.get(`position`)||`middle`;var y=v.get(`distance`);B(y)||(y=[y,y]),_.__labelDistance=y}this.setTextConfig({position:null,local:!0,inside:!1}),Aa(this,u,d,l)},t.prototype.highlight=function(){rr(this)},t.prototype.downplay=function(){oi(this)},t.prototype.updateLayout=function(e,t){this.childOfName(`line`).stopAnimation(),this.setLinePoints(e.getItemLayout(t))},t.prototype.setLinePoints=function(e){var t=this.childOfName(`line`);Lv(t.shape,e),t.dirty()},t.prototype.beforeUpdate=function(){var e=this,t=e.childOfName(`fromSymbol`),n=e.childOfName(`toSymbol`),r=e.getTextContent();if(!t&&!n&&(!r||r.ignore))return;for(var i=1,a=this.parent;a;)a.scaleX&&(i/=a.scaleX),a=a.parent;var o=e.childOfName(`line`);if(!this.__dirty&&!o.__dirty)return;var s=o.shape.percent,c=o.pointAt(0),l=o.pointAt(s),u=Hi([],l,c);vi(u,u);function d(e,t){var n=e.__specifiedRotation;if(n==null){var r=o.tangentAt(t);e.attr(`rotation`,(t===1?-1:1)*Math.PI/2-Math.atan2(r[1],r[0]))}else e.attr(`rotation`,n)}if(t&&(t.setPosition(c),d(t,0),t.scaleX=t.scaleY=i*s,t.markRedraw()),n&&(n.setPosition(l),d(n,1),n.scaleX=n.scaleY=i*s,n.markRedraw()),r&&!r.ignore){r.x=r.y=0,r.originX=r.originY=0;var f=void 0,p=void 0,m=r.__labelDistance,h=m[0]*i,g=m[1]*i,_=s/2,v=o.tangentAt(_),y=[v[1],-v[0]],b=o.pointAt(_);y[1]>0&&(y[0]=-y[0],y[1]=-y[1]);var x=v[0]<0?-1:1;if(r.__position!==`start`&&r.__position!==`end`){var S=-Math.atan2(v[1],v[0]);l[0]<c[0]&&(S=Math.PI+S),r.rotation=S}var C=void 0;switch(r.__position){case`insideStartTop`:case`insideMiddleTop`:case`insideEndTop`:case`middle`:C=-g,p=`bottom`;break;case`insideStartBottom`:case`insideMiddleBottom`:case`insideEndBottom`:C=g,p=`top`;break;default:C=0,p=`middle`}switch(r.__position){case`end`:r.x=u[0]*h+l[0],r.y=u[1]*g+l[1],f=u[0]>.8?`left`:u[0]<-.8?`right`:`center`,p=u[1]>.8?`top`:u[1]<-.8?`bottom`:`middle`;break;case`start`:r.x=-u[0]*h+c[0],r.y=-u[1]*g+c[1],f=u[0]>.8?`right`:u[0]<-.8?`left`:`center`,p=u[1]>.8?`bottom`:u[1]<-.8?`top`:`middle`;break;case`insideStartTop`:case`insideStart`:case`insideStartBottom`:r.x=h*x+c[0],r.y=c[1]+C,f=v[0]<0?`right`:`left`,r.originX=-h*x,r.originY=-C;break;case`insideMiddleTop`:case`insideMiddle`:case`insideMiddleBottom`:case`middle`:r.x=b[0],r.y=b[1]+C,f=`center`,r.originY=-C;break;case`insideEndTop`:case`insideEnd`:case`insideEndBottom`:r.x=-h*x+l[0],r.y=l[1]+C,f=v[0]>=0?`right`:`left`,r.originX=h*x,r.originY=-C;break}r.scaleX=r.scaleY=i,r.setStyle({verticalAlign:r.__verticalAlign||p,align:r.__align||f})}},t}(W),zv=function(){function e(e){this.group=new W,this._LineCtor=e||Rv}return e.prototype.updateData=function(e){var t=this;this._progressiveEls=null;var n=this,r=n.group,i=n._lineData;n._lineData=e,i||r.removeAll();var a=Vv(e);e.diff(i).add(function(n){t._doAdd(e,n,a)}).update(function(n,r){t._doUpdate(i,e,r,n,a)}).remove(function(e){r.remove(i.getItemGraphicEl(e))}).execute()},e.prototype.updateLayout=function(){var e=this._lineData;e&&e.eachItemGraphicEl(function(t,n){t.updateLayout(e,n)},this)},e.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=Vv(e),this._lineData=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(e,t,n){this._progressiveEls=[];function r(e){!e.isGroup&&!Bv(e)&&(e.incremental=n,e.ensureState(`emphasis`).hoverLayer=2)}for(var i=e.start;i<e.end;i++)if(Uv(t.getItemLayout(i))){var a=new this._LineCtor(t,i,this._seriesScope);a.traverse(r),this.group.add(a),t.setItemGraphicEl(i,a),this._progressiveEls.push(a)}},e.prototype.remove=function(){this.group.removeAll()},e.prototype.eachRendered=function(e){xe(this._progressiveEls||this.group,e)},e.prototype._doAdd=function(e,t,n){if(Uv(e.getItemLayout(t))){var r=new this._LineCtor(e,t,n);e.setItemGraphicEl(t,r),this.group.add(r)}},e.prototype._doUpdate=function(e,t,n,r,i){var a=e.getItemGraphicEl(n);if(!Uv(t.getItemLayout(r))){this.group.remove(a);return}a?a.updateData(t,r,i):a=new this._LineCtor(t,r,i),t.setItemGraphicEl(r,a),this.group.add(a)},e}();function Bv(e){return e.animators&&e.animators.length>0}function Vv(e){var t=e.hostModel,n=t.getModel(`emphasis`);return{lineStyle:t.getModel(`lineStyle`).getLineStyle(),emphasisLineStyle:n.getModel([`lineStyle`]).getLineStyle(),blurLineStyle:t.getModel([`blur`,`lineStyle`]).getLineStyle(),selectLineStyle:t.getModel([`select`,`lineStyle`]).getLineStyle(),emphasisDisabled:n.get(`disabled`),blurScope:n.get(`blurScope`),focus:n.get(`focus`),labelStatesModels:Un(t)}}function Hv(e){return isNaN(e[0])||isNaN(e[1])}function Uv(e){return e&&!Hv(e[0])&&!Hv(e[1])}var Wv=`chord`,Gv=function(e){L(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.init=function(t){e.prototype.init.apply(this,arguments),this.fillDataTextStyle(t.edges||t.links),this.legendVisualProvider=new Rm(X(this.getData,this),X(this.getRawData,this))},t.prototype.mergeOption=function(t){e.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(t.edges||t.links)},t.prototype.getInitialData=function(e,t){var n=e.edges||e.links||[],r=e.data||e.nodes||[];if(r&&n)return Ev(r,n,this,!0,i).data;function i(e,t){var n=ii.prototype.getModel;function r(e,t){var r=n.call(this,e,t);return r.resolveParentPath=i,r}t.wrapMethod(`getItemModel`,function(e){return e.resolveParentPath=i,e.getModel=r,e});function i(e){if(e&&(e[0]===`label`||e[1]===`label`)){var t=e.slice();return e[0]===`label`?t[0]=`edgeLabel`:e[1]===`label`&&(t[1]=`edgeLabel`),t}return e}}},t.prototype.getGraph=function(){return this.getData().graph},t.prototype.getEdgeData=function(){return this.getGraph().edgeData},t.prototype.formatTooltip=function(e,t,n){var r=this.getDataParams(e,n);if(n===`edge`){var i=this.getData(),a=i.graph.getEdgeByIndex(e),o=i.getName(a.node1.dataIndex),s=i.getName(a.node2.dataIndex),c=[];return o!=null&&c.push(o),s!=null&&c.push(s),nn(`nameValue`,{name:c.join(` > `),value:r.value,noValue:r.value==null})}return nn(`nameValue`,{name:r.name,value:r.value,noValue:r.value==null})},t.prototype.getDataParams=function(t,n){var r=e.prototype.getDataParams.call(this,t,n);if(n===`node`){var i=this.getData(),a=this.getGraph().getNodeByIndex(t);r.name??=i.getName(t),r.value??=a.getLayout().value}return r},t.type=`series.`+Wv,t.defaultOption={z:2,coordinateSystem:`none`,legendHoverLink:!0,colorBy:`data`,left:0,top:0,right:0,bottom:0,width:null,height:null,center:[`50%`,`50%`],radius:[`70%`,`80%`],clockwise:!0,startAngle:90,endAngle:`auto`,minAngle:0,padAngle:3,itemStyle:{borderRadius:[0,0,5,5]},lineStyle:{width:0,color:`source`,opacity:.2},label:{show:!0,position:`outside`,distance:5},emphasis:{focus:`adjacency`,lineStyle:{opacity:.5}}},t}(Xt),Kv=function(e){L(t,e);function t(t,n,r){var i=e.call(this)||this;H(i).dataType=`node`,i.z2=2;var a=new j;return i.setTextContent(a),i.updateData(t,n,r,!0),i}return t.prototype.updateData=function(e,t,n,r){var i=this,a=e.graph.getNodeByIndex(t),o=e.hostModel,s=a.getModel(),c=s.getModel(`emphasis`),l=e.getItemLayout(t),u=G(lm(s.getModel(`itemStyle`),l,!0),l),d=this;if(isNaN(u.startAngle)){d.setShape(u);return}r?d.setShape(u):yn(d,{shape:u},o,t);var f=G(lm(s.getModel(`itemStyle`),l,!0),l);i.setShape(f),i.useStyle(e.getItemVisual(t,`style`)),la(i,s),this._updateLabel(o,s,a),e.setItemGraphicEl(t,d),la(d,s,`itemStyle`);var p=c.get(`focus`);Aa(this,p===`adjacency`?a.getAdjacentDataIndices():p,c.get(`blurScope`),c.get(`disabled`))},t.prototype._updateLabel=function(e,t,n){var r=this.getTextContent(),i=n.getLayout(),a=(i.startAngle+i.endAngle)/2,o=Math.cos(a),s=Math.sin(a),c=t.getModel(`label`);r.ignore=!c.get(`show`);var l=Un(t),u=n.getVisual(`style`);Lt(r,l,{labelFetcher:{getFormattedLabel:function(n,r,i,a,o,s){return e.getFormattedLabel(n,r,`node`,a,Ia(o,l.normal&&l.normal.get(`formatter`),t.get(`name`)),s)}},labelDataIndex:n.dataIndex,defaultText:n.dataIndex+``,inheritColor:u.fill,defaultOpacity:u.opacity,defaultOutsidePosition:`startArc`});var d=c.get(`position`)||`outside`,f=c.get(`distance`)||0,p=d===`outside`?i.r+f:(i.r+i.r0)/2;this.textConfig={inside:d!==`outside`};var m=d===`outside`?o>0?`left`:`right`:c.get(`align`)||`center`,h=d===`outside`?s>0?`top`:`bottom`:c.get(`verticalAlign`)||`middle`;r.attr({x:o*p+i.cx,y:s*p+i.cy,rotation:0,style:{align:m,verticalAlign:h}})},t}(Fr);(function(){function e(){this.s1=[0,0],this.s2=[0,0],this.sStartAngle=0,this.sEndAngle=0,this.t1=[0,0],this.t2=[0,0],this.tStartAngle=0,this.tEndAngle=0,this.cx=0,this.cy=0,this.r=0,this.clockwise=!0}return e})();var qv=function(e){L(t,e);function t(t,n,r,i){var a=e.call(this)||this;return H(a).dataType=`edge`,a.updateData(t,n,r,i,!0),a}return t.prototype.buildPath=function(e,t){e.moveTo(t.s1[0],t.s1[1]);var n=.7,r=t.clockwise;e.arc(t.cx,t.cy,t.r,t.sStartAngle,t.sEndAngle,!r),e.bezierCurveTo((t.cx-t.s2[0])*n+t.s2[0],(t.cy-t.s2[1])*n+t.s2[1],(t.cx-t.t1[0])*n+t.t1[0],(t.cy-t.t1[1])*n+t.t1[1],t.t1[0],t.t1[1]),e.arc(t.cx,t.cy,t.r,t.tStartAngle,t.tEndAngle,!r),e.bezierCurveTo((t.cx-t.t2[0])*n+t.t2[0],(t.cy-t.t2[1])*n+t.t2[1],(t.cx-t.s1[0])*n+t.s1[0],(t.cy-t.s1[1])*n+t.s1[1],t.s1[0],t.s1[1]),e.closePath()},t.prototype.updateData=function(e,t,n,r,i){var a=e.hostModel,o=t.graph.getEdgeByIndex(n),s=o.getLayout(),c=o.node1.getModel(),l=t.getItemModel(o.dataIndex),u=l.getModel(`lineStyle`),d=l.getModel(`emphasis`),f=d.get(`focus`),p=G(lm(c.getModel(`itemStyle`),s,!0),s),m=this;if(isNaN(p.sStartAngle)||isNaN(p.tStartAngle)){m.setShape(p);return}i?(m.setShape(p),Jv(m,o,e,u)):(Ne(m),Jv(m,o,e,u),yn(m,{shape:p},a,n)),Aa(this,f===`adjacency`?o.getAdjacentDataIndices():f,d.get(`blurScope`),d.get(`disabled`)),la(m,l,`lineStyle`),t.setItemGraphicEl(o.dataIndex,m)},t}(bt);function Jv(e,t,n,r){var i=t.node1,a=t.node2,o=e.style;switch(e.setStyle(r.getLineStyle()),r.get(`color`)){case`source`:o.fill=n.getItemVisual(i.dataIndex,`style`).fill,o.decal=i.getVisual(`style`).decal;break;case`target`:o.fill=n.getItemVisual(a.dataIndex,`style`).fill,o.decal=a.getVisual(`style`).decal;break;case`gradient`:var s=n.getItemVisual(i.dataIndex,`style`).fill,c=n.getItemVisual(a.dataIndex,`style`).fill;if(R(s)&&R(c)){var l=e.shape;o.fill=new wn((l.s1[0]+l.s2[0])/2,(l.s1[1]+l.s2[1])/2,(l.t1[0]+l.t2[0])/2,(l.t1[1]+l.t2[1])/2,[{offset:0,color:s},{offset:1,color:c}],!0)}break}}var Yv=Math.PI/180,Xv=function(e){L(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=Wv,t}return t.prototype.init=function(e,t){},t.prototype.render=function(e,t,n){var r=e.getData(),i=this._data,a=this.group,o=-e.get(`startAngle`)*Yv;if(r.diff(i).add(function(e){if(r.getItemLayout(e)){var t=new Kv(r,e,o);H(t).dataIndex=e,a.add(t)}}).update(function(t,n){var s=i.getItemGraphicEl(n);if(!r.getItemLayout(t)){s&&Ai(s,e,n);return}s?s.updateData(r,t,o):s=new Kv(r,t,o),a.add(s)}).remove(function(t){var n=i.getItemGraphicEl(t);n&&Ai(n,e,t)}).execute(),!i){var s=e.get(`center`);this.group.scaleX=.01,this.group.scaleY=.01,this.group.originX=U(s[0],n.getWidth()),this.group.originY=U(s[1],n.getHeight()),me(this.group,{scaleX:1,scaleY:1},e)}this._data=r,this.renderEdges(e,o)},t.prototype.renderEdges=function(e,t){var n=e.getData(),r=e.getEdgeData(),i=this._edgeData,a=this.group;r.diff(i).add(function(e){var i=new qv(n,r,e,t);H(i).dataIndex=e,a.add(i)}).update(function(e,o){var s=i.getItemGraphicEl(o);s.updateData(n,r,e,t),a.add(s)}).remove(function(t){var n=i.getItemGraphicEl(t);n&&Ai(n,e,t)}).execute(),this._edgeData=r},t.prototype.dispose=function(){},t.type=Wv,t}(Ot),Zv=Math.PI/180,Qv=Be(Wv,$v);function $v(e,t){e.eachSeriesByType(Wv,function(e){ey(e,t)})}function ey(e,t){var n=e.getData(),r=n.graph,i=e.getEdgeData();if(i.count()){var a=si(e,t),o=a.cx,s=a.cy,c=a.r,l=a.r0,u=Math.max((e.get(`padAngle`)||0)*Zv,0),d=Math.max((e.get(`minAngle`)||0)*Zv,0),f=-e.get(`startAngle`)*Zv,p=f+Math.PI*2,m=e.get(`clockwise`),h=m?1:-1,g=[f,p];qe(g,!m);var _=g[0],v=g[1]-_,y=n.getSum(`value`)===0&&i.getSum(`value`)===0,b=[],x=0;r.eachEdge(function(e){var t=y?1:e.getValue(`value`);y&&(t>0||d)&&(x+=2);var n=e.node1.dataIndex,r=e.node2.dataIndex;b[n]=(b[n]||0)+t,b[r]=(b[r]||0)+t});var S=0;if(r.eachNode(function(e){var t=e.getValue(`value`);isNaN(t)||(b[e.dataIndex]=Math.max(t,b[e.dataIndex]||0)),!y&&(b[e.dataIndex]>0||d)&&x++,S+=b[e.dataIndex]||0}),!(x===0||S===0)){u*x>=Math.abs(v)&&(u=Math.max(0,(Math.abs(v)-d*x)/x)),(u+d)*x>=Math.abs(v)&&(d=(Math.abs(v)-u*x)/x);var C=(v-u*x*h)/S,w=0,T=0,E=0,D=1/0;r.eachNode(function(e){var t=b[e.dataIndex]||0,n=C*(S?t:1)*h;Math.abs(n)<d?w+=d-Math.abs(n):(D=Math.min(D,Math.abs(n)-d),T+=Math.abs(n)-d,E+=Math.abs(n)),e.setLayout({angle:n,value:t})});var O=!1;if(w>T){var k=w/T;r.eachNode(function(e){var t=e.getLayout().angle;Math.abs(t)>=d?e.setLayout({angle:t*k,ratio:k},!0):e.setLayout({angle:d,ratio:d===0?1:t/d},!0)})}else r.eachNode(function(e){if(!O){var t=e.getLayout().angle;t-Math.min(t/E,1)*w<d&&(O=!0)}});var A=w;r.eachNode(function(e){if(!(A<=0)){var t=e.getLayout().angle;if(t>d&&d>0){var n=O?1:Math.min(t/E,1),r=t-d,i=Math.min(r,Math.min(A,w*n));A-=i,e.setLayout({angle:t-i,ratio:(t-i)/t},!0)}else d>0&&e.setLayout({angle:d,ratio:t===0?1:d/t},!0)}});var j=_,M=[];r.eachNode(function(e){var t=Math.max(e.getLayout().angle,d);e.setLayout({cx:o,cy:s,r0:l,r:c,startAngle:j,endAngle:j+t*h,clockwise:m},!0),M[e.dataIndex]=j,j+=(t+u)*h}),r.eachEdge(function(e){var t=y?1:e.getValue(`value`),n=C*(S?t:1)*h,r=e.node1.dataIndex,i=M[r]||0,a=i+Math.abs((e.node1.getLayout().ratio||1)*n)*h,c=[o+l*Math.cos(i),s+l*Math.sin(i)],u=[o+l*Math.cos(a),s+l*Math.sin(a)],d=e.node2.dataIndex,f=M[d]||0,p=f+Math.abs((e.node2.getLayout().ratio||1)*n)*h,g=[o+l*Math.cos(f),s+l*Math.sin(f)],_=[o+l*Math.cos(p),s+l*Math.sin(p)];e.setLayout({s1:c,s2:u,sStartAngle:i,sEndAngle:a,t1:g,t2:_,tStartAngle:f,tEndAngle:p,cx:o,cy:s,r:l,value:t,clockwise:m}),M[r]=a,M[d]=p})}}}function ty(e){e.registerChartView(Xv),e.registerSeriesModel(Gv),e.registerLayout(e.PRIORITY.VISUAL.POST_CHART_LAYOUT,Qv),e.registerProcessor(Im(`chord`))}var ny=function(){function e(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return e}(),ry=function(e){L(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`pointer`,n}return t.prototype.getDefaultShape=function(){return new ny},t.prototype.buildPath=function(e,t){var n=Math.cos,r=Math.sin,i=t.r,a=t.width,o=t.angle,s=t.x-n(o)*a*(a>=i/3?1:2),c=t.y-r(o)*a*(a>=i/3?1:2);o=t.angle-Math.PI/2,e.moveTo(s,c),e.lineTo(t.x+n(o)*a,t.y+r(o)*a),e.lineTo(t.x+n(t.angle)*i,t.y+r(t.angle)*i),e.lineTo(t.x-n(o)*a,t.y-r(o)*a),e.lineTo(s,c)},t}(bt);function iy(e,t){var n=e.get(`center`),r=t.getWidth(),i=t.getHeight(),a=Math.min(r,i);return{cx:U(n[0],t.getWidth()),cy:U(n[1],t.getHeight()),r:U(e.get(`radius`),a/2)}}function ay(e,t){var n=e==null?``:e+``;return t&&(R(t)?n=t.replace(`{value}`,n):V(t)&&(n=t(e))),n}var oy=function(e){L(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){this.group.removeAll();var r=e.get([`axisLine`,`lineStyle`,`color`]),i=iy(e,n);this._renderMain(e,t,n,r,i),this._data=e.getData()},t.prototype.dispose=function(){},t.prototype._renderMain=function(e,t,n,r,i){var a=this.group,o=e.get(`clockwise`),s=-e.get(`startAngle`)/180*Math.PI,c=-e.get(`endAngle`)/180*Math.PI,l=e.getModel(`axisLine`),u=l.get(`roundCap`)?im:Fr,d=l.get(`show`),f=l.getModel(`lineStyle`),p=f.get(`width`),m=[s,c];qe(m,!o),s=m[0],c=m[1];for(var h=c-s,g=s,_=[],v=0;d&&v<r.length;v++){var y=Math.min(Math.max(r[v][0],0),1);c=s+h*y;var b=new u({shape:{startAngle:g,endAngle:c,cx:i.cx,cy:i.cy,clockwise:o,r0:i.r-p,r:i.r},silent:!0});b.setStyle({fill:r[v][1]}),b.setStyle(f.getLineStyle([`color`,`width`])),_.push(b),g=c}_.reverse(),J(_,function(e){return a.add(e)});var x=function(e){if(e<=0)return r[0][1];var t;for(t=0;t<r.length;t++)if(r[t][0]>=e&&(t===0?0:r[t-1][0])<e)return r[t][1];return r[t-1][1]};this._renderTicks(e,t,n,x,i,s,c,o,p),this._renderTitleAndDetail(e,t,n,x,i),this._renderAnchor(e,i),this._renderPointer(e,t,n,x,i,s,c,o,p)},t.prototype._renderTicks=function(e,t,n,r,i,a,o,s,c){for(var l=this.group,u=i.cx,d=i.cy,f=i.r,p=+e.get(`min`),m=+e.get(`max`),h=e.getModel(`splitLine`),g=e.getModel(`axisTick`),_=e.getModel(`axisLabel`),v=e.get(`splitNumber`),y=g.get(`splitNumber`),b=U(h.get(`length`),f),x=U(g.get(`length`),f),S=a,C=(o-a)/v,w=C/y,T=h.getModel(`lineStyle`).getLineStyle(),E=g.getModel(`lineStyle`).getLineStyle(),D=h.get(`distance`),O,k,A=0;A<=v;A++){if(O=Math.cos(S),k=Math.sin(S),h.get(`show`)){var M=D?D+c:c,N=new lr({shape:{x1:O*(f-M)+u,y1:k*(f-M)+d,x2:O*(f-b-M)+u,y2:k*(f-b-M)+d},style:T,silent:!0});T.stroke===`auto`&&N.setStyle({stroke:r(A/v)}),l.add(N)}if(_.get(`show`)){var M=_.get(`distance`)+D,P=ay(I(A*(m-p)/v+p,14),_.get(`formatter`)),F=r(A/v),ee=O*(f-b-M)+u,ne=k*(f-b-M)+d,re=_.get(`rotate`),ie=0;re===`radial`?(ie=-S+2*Math.PI,ie>Math.PI/2&&(ie+=Math.PI)):re===`tangential`?ie=-S-Math.PI/2:te(re)&&(ie=re*Math.PI/180),ie===0?l.add(new j({style:sa(_,{text:P,x:ee,y:ne,verticalAlign:k<-.8?`top`:k>.8?`bottom`:`middle`,align:O<-.4?`left`:O>.4?`right`:`center`},{inheritColor:F}),silent:!0})):l.add(new j({style:sa(_,{text:P,x:ee,y:ne,verticalAlign:`middle`,align:`center`},{inheritColor:F}),silent:!0,originX:ee,originY:ne,rotation:ie}))}if(g.get(`show`)&&A!==v){var M=g.get(`distance`);M=M?M+c:c;for(var ae=0;ae<=y;ae++){O=Math.cos(S),k=Math.sin(S);var oe=new lr({shape:{x1:O*(f-M)+u,y1:k*(f-M)+d,x2:O*(f-x-M)+u,y2:k*(f-x-M)+d},silent:!0,style:E});E.stroke===`auto`&&oe.setStyle({stroke:r((A+ae/y)/v)}),l.add(oe),S+=w}S-=w}else S+=C}},t.prototype._renderPointer=function(e,t,n,r,i,a,o,s,c){var l=this.group,u=this._data,d=this._progressEls,f=[],p=e.get([`pointer`,`show`]),m=e.getModel(`progress`),h=m.get(`show`),g=e.getData(),_=g.mapDimension(`value`),v=+e.get(`min`),y=+e.get(`max`),b=[v,y],x=[a,o];function S(t,n){var r=g.getItemModel(t).getModel(`pointer`),a=U(r.get(`width`),i.r),o=U(r.get(`length`),i.r),s=e.get([`pointer`,`icon`]),c=r.get(`offsetCenter`),l=U(c[0],i.r),u=U(c[1],i.r),d=r.get(`keepAspect`),f=s?va(s,l-a/2,u-o,a,o,null,d):new ry({shape:{angle:-Math.PI/2,width:a,r:o,x:l,y:u}});return f.rotation=-(n+Math.PI/2),f.x=i.cx,f.y=i.cy,f}function C(e,t){var n=m.get(`roundCap`)?im:Fr,r=m.get(`overlap`),o=r?m.get(`width`):c/g.count(),l=r?i.r-o:i.r-(e+1)*o,u=r?i.r:i.r-e*o,d=new n({shape:{startAngle:a,endAngle:t,cx:i.cx,cy:i.cy,clockwise:s,r0:l,r:u}});return r&&(d.z2=Y(g.get(_,e),[v,y],[100,0],!0)),d}(h||p)&&(g.diff(u).add(function(t){var n=g.get(_,t);if(p){var r=S(t,a);me(r,{rotation:-((isNaN(+n)?x[0]:Y(n,b,x,!0))+Math.PI/2)},e),l.add(r),g.setItemGraphicEl(t,r)}if(h){var i=C(t,a);me(i,{shape:{endAngle:Y(n,b,x,m.get(`clip`))}},e),l.add(i),ne(e.seriesIndex,g.dataType,t,i),f[t]=i}}).update(function(t,n){var r=g.get(_,t);if(p){var i=u.getItemGraphicEl(n),o=i?i.rotation:a,s=S(t,o);s.rotation=o,yn(s,{rotation:-((isNaN(+r)?x[0]:Y(r,b,x,!0))+Math.PI/2)},e),l.add(s),g.setItemGraphicEl(t,s)}if(h){var c=d[n],v=C(t,c?c.shape.endAngle:a);yn(v,{shape:{endAngle:Y(r,b,x,m.get(`clip`))}},e),l.add(v),ne(e.seriesIndex,g.dataType,t,v),f[t]=v}}).execute(),g.each(function(e){var t=g.getItemModel(e),n=t.getModel(`emphasis`),i=n.get(`focus`),a=n.get(`blurScope`),o=n.get(`disabled`),s=r(Y(g.get(_,e),b,[0,1],!0));if(p){var c=g.getItemGraphicEl(e),l=g.getItemVisual(e,`style`),u=l.fill;if(c instanceof Hr){var d=c.style;c.useStyle(G({image:d.image,x:d.x,y:d.y,width:d.width,height:d.height},l))}else c.useStyle(l),c.type!==`pointer`&&c.setColor(u);c.setStyle(t.getModel([`pointer`,`itemStyle`]).getItemStyle()),c.style.fill===`auto`&&c.setStyle(`fill`,s),c.z2EmphasisLift=0,la(c,t),Aa(c,i,a,o)}if(h){var m=f[e];m.useStyle(g.getItemVisual(e,`style`)),m.setStyle(t.getModel([`progress`,`itemStyle`]).getItemStyle()),m.style.fill===`auto`&&m.setStyle(`fill`,s),m.z2EmphasisLift=0,la(m,t),Aa(m,i,a,o)}}),this._progressEls=f)},t.prototype._renderAnchor=function(e,t){var n=e.getModel(`anchor`);if(n.get(`show`)){var r=n.get(`size`),i=n.get(`icon`),a=n.get(`offsetCenter`),o=n.get(`keepAspect`),s=va(i,t.cx-r/2+U(a[0],t.r),t.cy-r/2+U(a[1],t.r),r,r,null,o);s.z2=+!!n.get(`showAbove`),s.setStyle(n.getModel(`itemStyle`).getItemStyle()),this.group.add(s)}},t.prototype._renderTitleAndDetail=function(e,t,n,r,i){var a=this,o=e.getData(),s=o.mapDimension(`value`),c=+e.get(`min`),l=+e.get(`max`),u=new W,d=[],f=[],p=e.isAnimationEnabled(),m=e.get([`pointer`,`showAbove`]);o.diff(this._data).add(function(e){d[e]=new j({silent:!0}),f[e]=new j({silent:!0})}).update(function(e,t){d[e]=a._titleEls[t],f[e]=a._detailEls[t]}).execute(),o.each(function(t){var n=o.getItemModel(t),a=o.get(s,t),h=new W,g=r(Y(a,[c,l],[0,1],!0)),_=n.getModel(`title`);if(_.get(`show`)){var v=_.get(`offsetCenter`),y=i.cx+U(v[0],i.r),b=i.cy+U(v[1],i.r),x=d[t];x.attr({z2:m?0:2,style:sa(_,{x:y,y:b,text:o.getName(t),align:`center`,verticalAlign:`middle`},{inheritColor:g})}),h.add(x)}var S=n.getModel(`detail`);if(S.get(`show`)){var w=S.get(`offsetCenter`),T=i.cx+U(w[0],i.r),E=i.cy+U(w[1],i.r),D=U(S.get(`width`),i.r),O=U(S.get(`height`),i.r),k=e.get([`progress`,`show`])?o.getItemVisual(t,`style`).fill:g,x=f[t],A=S.get(`formatter`);x.attr({z2:m?0:2,style:sa(S,{x:T,y:E,text:ay(a,A),width:isNaN(D)?null:D,height:isNaN(O)?null:O,align:`center`,verticalAlign:`middle`},{inheritColor:k})}),C(x,{normal:S},a,function(e){return ay(e,A)}),p&&br(x,t,o,e,{getFormattedLabel:function(e,t,n,r,i,o){return ay(o?o.interpolatedValue:a,A)}}),h.add(x)}u.add(h)}),this.group.add(u),this._titleEls=d,this._detailEls=f},t.type=`gauge`,t}(Ot),sy=function(e){L(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.visualStyleAccessPath=`itemStyle`,n}return t.prototype.getInitialData=function(e,t){return Lm(this,[`value`])},t.type=`series.gauge`,t.defaultOption={z:2,colorBy:`data`,center:[`50%`,`50%`],legendHoverLink:!0,radius:`75%`,startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,Z.color.neutral10]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:Z.color.axisTick,width:3,type:`solid`}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:Z.color.axisTickMinor,width:1,type:`solid`}},axisLabel:{show:!0,distance:15,color:Z.color.axisLabel,fontSize:12,rotate:0},pointer:{icon:null,offsetCenter:[0,0],show:!0,showAbove:!0,length:`60%`,width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:`circle`,offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:Z.color.neutral00,borderWidth:0,borderColor:Z.color.theme[0]}},title:{show:!0,offsetCenter:[0,`20%`],color:Z.color.secondary,fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:Z.color.transparent,borderWidth:0,borderColor:Z.color.neutral40,width:100,height:null,padding:[5,10],offsetCenter:[0,`40%`],color:Z.color.primary,fontSize:30,fontWeight:`bold`,lineHeight:30,valueAnimation:!1}},t}(Xt);function cy(e){e.registerChartView(oy),e.registerSeriesModel(sy)}var ly=`funnel`,uy=function(e){L(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.init=function(t){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new Rm(X(this.getData,this),X(this.getRawData,this)),this._defaultLabelLine(t)},t.prototype.getInitialData=function(e,t){return Lm(this,{coordDimensions:[`value`],encodeDefaulter:Q(Zn,this)})},t.prototype._defaultLabelLine=function(e){Pe(e,`labelLine`,[`show`]);var t=e.labelLine,n=e.emphasis.labelLine;t.show=t.show&&e.label.show,n.show=n.show&&e.emphasis.label.show},t.prototype.getDataParams=function(t){var n=this.getData(),r=e.prototype.getDataParams.call(this,t),i=n.mapDimension(`value`),a=n.getSum(i);return r.percent=a?+(n.get(i,t)/a*100).toFixed(2):0,r.$vars.push(`percent`),r},t.type=`series.`+ly,t.defaultOption={coordinateSystemUsage:`box`,z:2,legendHoverLink:!0,colorBy:`data`,left:80,top:60,right:80,bottom:65,minSize:`0%`,maxSize:`100%`,sort:`descending`,orient:`vertical`,gap:0,funnelAlign:`center`,label:{show:!0,position:`outer`},labelLine:{show:!0,length:20,lineStyle:{width:1}},itemStyle:{borderColor:Z.color.neutral00,borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:Z.color.primary}}},t}(Xt),dy=[`itemStyle`,`opacity`],fy=function(e){L(t,e);function t(t,n){var r=e.call(this)||this,i=r,a=new Yi,o=new j;return i.setTextContent(o),r.setTextGuideLine(a),r.updateData(t,n,!0),r}return t.prototype.updateData=function(e,t,n){var r=this,i=e.hostModel,a=e.getItemModel(t),o=e.getItemLayout(t),s=a.getModel(`emphasis`),c=a.get(dy);c??=1,n||Ne(r),r.useStyle(e.getItemVisual(t,`style`)),r.style.lineJoin=`round`,n?(r.setShape({points:o.points}),r.style.opacity=0,me(r,{style:{opacity:c}},i,t)):yn(r,{style:{opacity:c},shape:{points:o.points}},i,t),la(r,a),this._updateLabel(e,t),Aa(this,s.get(`focus`),s.get(`blurScope`),s.get(`disabled`))},t.prototype._updateLabel=function(e,t){var n=this,r=this.getTextGuideLine(),i=n.getTextContent(),a=e.hostModel,o=e.getItemModel(t),s=e.getItemLayout(t).label,c=e.getItemVisual(t,`style`),l=c.fill;Lt(i,Un(o),{labelFetcher:e.hostModel,labelDataIndex:t,defaultOpacity:c.opacity,defaultText:e.getName(t)},{normal:{align:s.textAlign,verticalAlign:s.verticalAlign}});var u=o.getModel(`label`).get(`color`)===`inherit`?l:null;n.setTextConfig({local:!0,inside:!!s.inside,insideStroke:u,outsideFill:u});var d=s.linePoints;r.setShape({points:d}),n.textGuideLineConfig={anchor:d?new Zt(d[0][0],d[0][1]):null},yn(i,{style:{x:s.x,y:s.y}},a,t),i.attr({rotation:s.rotation,originX:s.x,originY:s.y,z2:10}),Rl(n,zl(o),{stroke:l})},t}(fi),py=function(e){L(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=ly,t.ignoreLabelLineUpdate=!0,t}return t.prototype.render=function(e,t,n){var r=e.getData(),i=this._data,a=this.group;r.diff(i).add(function(e){var t=new fy(r,e);r.setItemGraphicEl(e,t),a.add(t)}).update(function(e,t){var n=i.getItemGraphicEl(t);n.updateData(r,e),a.add(n),r.setItemGraphicEl(e,n)}).remove(function(t){Ai(i.getItemGraphicEl(t),e,t)}).execute(),this._data=r},t.prototype.remove=function(){this.group.removeAll(),this._data=null},t.prototype.dispose=function(){},t.type=ly,t}(Ot);function my(e,t){for(var n=e.mapDimension(`value`),r=e.mapArray(n,function(e){return e}),i=[],a=t===`ascending`,o=0,s=e.count();o<s;o++)i[o]=o;return V(t)?i.sort(t):t!==`none`&&i.sort(function(e,t){return a?r[e]-r[t]:r[t]-r[e]}),i}function hy(e){var t=e.hostModel,n=vy(t);e.each(function(t){var r=e.getItemModel(t),i=r.getModel(`label`).get(`position`),a=r.getModel(`labelLine`),o=e.getItemLayout(t),s=o.points,c=i===`inner`||i===`inside`||i===`center`||i===`insideLeft`||i===`insideRight`,l,u,d,f;if(c)i===`insideLeft`?(u=(s[0][0]+s[3][0])/2+5,d=(s[0][1]+s[3][1])/2,l=`left`):i===`insideRight`?(u=(s[1][0]+s[2][0])/2-5,d=(s[1][1]+s[2][1])/2,l=`right`):(u=(s[0][0]+s[1][0]+s[2][0]+s[3][0])/4,d=(s[0][1]+s[1][1]+s[2][1]+s[3][1])/4,l=`center`),f=[[u,d],[u,d]];else{var p=void 0,m=void 0,h=void 0,g=void 0,_=a.get(`length`);R(i)&&(!n&&Sa([`top`,`bottom`],i)>-1&&(i=`left`),n&&Sa([`left`,`right`],i)>-1&&(i=`bottom`)),i===`left`?(p=(s[3][0]+s[0][0])/2,m=(s[3][1]+s[0][1])/2,h=p-_,u=h-5,l=`right`):i===`right`?(p=(s[1][0]+s[2][0])/2,m=(s[1][1]+s[2][1])/2,h=p+_,u=h+5,l=`left`):i===`top`?(p=(s[3][0]+s[0][0])/2,m=(s[3][1]+s[0][1])/2,g=m-_,d=g-5,l=`center`):i===`bottom`?(p=(s[1][0]+s[2][0])/2,m=(s[1][1]+s[2][1])/2,g=m+_,d=g+5,l=`center`):i===`rightTop`?(p=n?s[3][0]:s[1][0],m=n?s[3][1]:s[1][1],n?(g=m-_,d=g-5,l=`center`):(h=p+_,u=h+5,l=`top`)):i===`rightBottom`?(p=s[2][0],m=s[2][1],n?(g=m+_,d=g+5,l=`center`):(h=p+_,u=h+5,l=`bottom`)):i===`leftTop`?(p=s[0][0],m=n?s[0][1]:s[1][1],n?(g=m-_,d=g-5,l=`center`):(h=p-_,u=h-5,l=`right`)):i===`leftBottom`?(p=n?s[1][0]:s[3][0],m=n?s[1][1]:s[2][1],n?(g=m+_,d=g+5,l=`center`):(h=p-_,u=h-5,l=`right`)):(p=(s[1][0]+s[2][0])/2,m=(s[1][1]+s[2][1])/2,n?(g=m+_,d=g+5,l=`center`):(h=p+_,u=h+5,l=`left`)),n?(h=p,u=h):(g=m,d=g),f=[[p,m],[h,g]]}o.label={linePoints:f,x:u,y:d,verticalAlign:`middle`,textAlign:l,inside:c}})}var gy=Be(ly,_y);function _y(e,t){e.eachSeriesByType(ly,function(e){var n=e.getData(),r=n.mapDimension(`value`),i=e.get(`sort`),a=gr(e,t),o=Cr(e.getBoxLayoutParams(),a.refContainer),s=vy(e),c=o.width,l=o.height,u=my(n,i),d=o.x,f=o.y,p=s?[U(e.get(`minSize`),l),U(e.get(`maxSize`),l)]:[U(e.get(`minSize`),c),U(e.get(`maxSize`),c)],m=n.getDataExtent(r),h=e.get(`min`),g=e.get(`max`);h??=Math.min(m[0],0),g??=m[1];var _=e.get(`funnelAlign`),v=e.get(`gap`),y=((s?c:l)-v*(n.count()-1))/n.count(),b=function(e,t){if(s){var i=Y(n.get(r,e)||0,[h,g],p,!0),a=void 0;switch(_){case`top`:a=f;break;case`center`:a=f+(l-i)/2;break;case`bottom`:a=f+(l-i);break}return[[t,a],[t,a+i]]}var o=Y(n.get(r,e)||0,[h,g],p,!0),u;switch(_){case`left`:u=d;break;case`center`:u=d+(c-o)/2;break;case`right`:u=d+c-o;break}return[[u,t],[u+o,t]]};i===`ascending`&&(y=-y,v=-v,s?d+=c:f+=l,u=u.reverse());for(var x=0;x<u.length;x++){var S=u[x],C=u[x+1],w=n.getItemModel(S);if(s){var T=w.get([`itemStyle`,`width`]);T==null?T=y:(T=U(T,c),i===`ascending`&&(T=-T));var E=b(S,d),D=b(C,d+T);d+=T+v,n.setItemLayout(S,{points:E.concat(D.slice().reverse())})}else{var O=w.get([`itemStyle`,`height`]);O==null?O=y:(O=U(O,l),i===`ascending`&&(O=-O));var E=b(S,f),D=b(C,f+O);f+=O+v,n.setItemLayout(S,{points:E.concat(D.slice().reverse())})}}hy(n)})}function vy(e){return e.get(`orient`)===`horizontal`}function yy(e){e.registerChartView(py),e.registerSeriesModel(uy),e.registerLayout(gy),e.registerProcessor(Im(ly))}function by(e,t,n,r,i,a){e||=0;var o=It(n[1],-n[0]);if(i!=null&&(i=Sy(i,[0,o])),a!=null&&(a=Math.max(a,i??0)),r===`all`){var s=Math.abs(It(t[1],-t[0]));s=Sy(s,[0,o]),i=a=Sy(s,[i,a]),r=0}t[0]=Sy(t[0],n),t[1]=Sy(t[1],n);var c=xy(t,r);t[r]+=e;var l=i||0,u=n.slice();c.sign<0?u[0]=It(u[0],l):u[1]=It(u[1],-l),t[r]=Sy(t[r],u);var d=xy(t,r);return i!=null&&(d.sign!==c.sign||d.span<i)&&(t[1-r]=It(t[r],c.sign*i)),d=xy(t,r),a!=null&&d.span>a&&(t[1-r]=It(t[r],d.sign*a)),t}function xy(e,t){var n=e[t]-e[1-t];return{span:Math.abs(n),sign:n>0?-1:n<0?1:t?-1:1}}function Sy(e,t){return Math.min(t[1]==null?1/0:t[1],Math.max(t[0]==null?-1/0:t[0],e))}var Cy=function(){function e(){}return e.prototype._hasEncodeRule=function(e){var t=this.getEncode();return t&&t.get(e)!=null},e.prototype.getInitialData=function(e,t){var n,r=t.getComponent(`xAxis`,this.get(`xAxisIndex`)),i=t.getComponent(`yAxis`,this.get(`yAxisIndex`)),a=r.get(`type`),o=i.get(`type`),s,c=e.layout;a===`category`?(c=`horizontal`,n=r.getOrdinalMeta(),s=!this._hasEncodeRule(`x`)):o===`category`&&(c=`vertical`,n=i.getOrdinalMeta(),s=!this._hasEncodeRule(`y`)),c||=o===`time`?`vertical`:`horizontal`,this._layout=c;var l=[`x`,`y`],u=c===`horizontal`?0:1,d=this._baseAxisDim=l[u],f=l[1-u],p=[r,i],m=p[u].get(`type`),h=p[1-u].get(`type`),g=e.data;if(g&&s){var _=[];J(g,function(e,t){var n;B(e)?(n=e.slice(),e.unshift(t)):B(e.value)?(n=G({},e),n.value=n.value.slice(),e.value.unshift(t)):n=e,_.push(n)}),e.data=_}var v=this.defaultValueDimensions,y=[{name:d,type:Xa(m),ordinalMeta:n,otherDims:{tooltip:!1,itemName:0},dimsDef:[`base`]},{name:f,type:Xa(h),dimsDef:v.slice()}];return Lm(this,{coordDimensions:y,dimensionsCount:v.length+1,encodeDefaulter:Q(Wi,y,this)})},e.prototype.getBaseAxis=function(){var e=this._baseAxisDim;return this.ecModel.getComponent(e+`Axis`,this.get(e+`AxisIndex`)).axis},e.prototype.getWhiskerBoxesLayout=function(){return this._layout},e}();function wy(e,t){for(var n=t.ends.length,r=0,i=0;i<n;i++)e.contain(t.ends[i][0],t.ends[i][1])&&r++;return r?+(r<n):2}var Ty=`boxplot`,Ey=function(e){L(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.defaultValueDimensions=[{name:`min`,defaultTooltip:!0},{name:`Q1`,defaultTooltip:!0},{name:`median`,defaultTooltip:!0},{name:`Q3`,defaultTooltip:!0},{name:`max`,defaultTooltip:!0}],n.visualDrawType=`stroke`,n}return t.type=`series.`+Ty,t.dependencies=[`xAxis`,`yAxis`,`grid`],t.defaultOption={z:2,coordinateSystem:`cartesian2d`,legendHoverLink:!0,layout:null,clip:!0,boxWidth:[7,50],itemStyle:{color:Z.color.neutral00,borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:Z.color.shadow}},animationDuration:800},t}(Xt);ot(Ey,Cy,!0);var Dy=function(e){L(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=Ty,t}return t.prototype.render=function(e,t,n){var r=e.getData(),i=this.group,a=this._data;this._data||i.removeAll();var o=+(e.getWhiskerBoxesLayout()===`horizontal`),s=e.get(`clip`,!0),c=e.coordinateSystem,l=c.getArea&&c.getArea(),u=s&&uf(c,!1,e);r.diff(a).add(function(e){if(r.hasValue(e)){var t=r.getItemLayout(e),n=s?wy(l,t):0;if(n===2)return;var a=Ay(t,r,e,o,!0);df(n===1,a,u),r.setItemGraphicEl(e,a),i.add(a)}}).update(function(e,t){var n=a.getItemGraphicEl(t);if(!r.hasValue(e)){i.remove(n);return}var c=r.getItemLayout(e),d=s?wy(l,c):0;if(d===2){i.remove(n);return}n?(Ne(n),jy(c,n,r,e)):n=Ay(c,r,e,o),df(d===1,n,u),i.add(n),r.setItemGraphicEl(e,n)}).remove(function(e){var t=a.getItemGraphicEl(e);t&&i.remove(t)}).execute(),this._data=r},t.prototype.remove=function(e){var t=this.group,n=this._data;this._data=null,n&&n.eachItemGraphicEl(function(e){e&&t.remove(e)})},t.type=Ty,t}(Ot),Oy=function(){function e(){}return e}(),ky=function(e){L(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`boxplotBoxPath`,n}return t.prototype.getDefaultShape=function(){return new Oy},t.prototype.buildPath=function(e,t){var n=t.points,r=0;for(e.moveTo(n[r][0],n[r][1]),r++;r<4;r++)e.lineTo(n[r][0],n[r][1]);for(e.closePath();r<n.length;r++)e.moveTo(n[r][0],n[r][1]),r++,e.lineTo(n[r][0],n[r][1])},t}(bt);function Ay(e,t,n,r,i){var a=e.ends,o=new ky({shape:{points:i?My(a,r,e):a}});return jy(e,o,t,n,i),o}function jy(e,t,n,r,i){var a=n.hostModel,o=at[i?`initProps`:`updateProps`];o(t,{shape:{points:e.ends}},a,r),t.useStyle(n.getItemVisual(r,`style`)),t.style.strokeNoScale=!0,t.z2=100;var s=n.getItemModel(r),c=s.getModel(`emphasis`);la(t,s),Aa(t,c.get(`focus`),c.get(`blurScope`),c.get(`disabled`))}function My(e,t,n){return u(e,function(e){return e=e.slice(),e[t]=n.initBaseline,e})}var Ny=gi(),Py=Be(Ty,Fy);function Fy(e){var t=Pp(Ty);pc(e,t,function(e){var n=fc(e,t);if(n){var r=Iy(e,n);uc(e,t,function(e){var t=e.seriesIndex;Ly(e,r.boxOffsetList[t],r.boxWidthList[t])})}})}function Iy(e,t){var n=[],r=[],i=[],a=yl(e,{fromStat:{key:Pp(Ty)},min:1}).w;uc(e,Pp(Ty),function(e){var t=e.get(`boxWidth`);B(t)||(t=[t,t]),i[e.seriesIndex]=[U(t[0],a)||0,U(t[1],a)||0]});var o=a*.8-2,s=o/t*.3,c=(o-s*(t-1))/t,l=c/2-o/2;return uc(e,Pp(Ty),function(e){var t=e.seriesIndex;r[t]=l,l+=s+c,n[t]=oe(_t(c,i[t][0]),i[t][1])}),{boxOffsetList:r,boxWidthList:n}}function Ly(e,t,n){var r=e.coordinateSystem,i=e.getData(),a=n/2,o=e.getWhiskerBoxesLayout()===`horizontal`?0:1,s=1-o,c=[`x`,`y`],l=i.mapDimension(c[o]),u=i.mapDimensionsAll(c[s]);if(l==null||u.length<5)return;for(var d=0;d<i.count();d++){var f=i.get(l,d),p=y(f,u[2],d),m=y(f,u[0],d),h=y(f,u[1],d),g=y(f,u[3],d),_=y(f,u[4],d),v=[];b(v,h,!1),b(v,g,!0),v.push(m,h,_,g),x(v,m),x(v,_),x(v,p),i.setItemLayout(d,{initBaseline:p[s],ends:v})}function y(e,n,a){var c=i.get(n,a),l=[];l[o]=e,l[s]=c;var u;return isNaN(e)||isNaN(c)?u=[NaN,NaN]:(u=r.dataToPoint(l),u[o]+=t),u}function b(e,t,n){var r=t.slice(),i=t.slice();r[o]+=a,i[o]-=a,n?e.push(r,i):e.push(i,r)}function x(e,t){var n=t.slice(),r=t.slice();n[o]-=a,r[o]+=a,e.push(n,r)}}function Ry(e){Ny(e,function(){var t=Pp(Ty);bc(e,{key:t,seriesType:Ty,getMetrics:Ip}),Fc(t,Np(t))})}function zy(e,t){t||={};for(var n=[],r=[],i=t.boundIQR,a=i===`none`||i===0,o=0;o<e.length;o++){var s=S(e[o].slice()),c=Kt(s,.25),l=Kt(s,.5),u=Kt(s,.75),d=s[0],f=s[s.length-1],p=(i??1.5)*(u-c),m=a?d:Math.max(d,c-p),h=a?f:Math.min(f,u+p),g=t.itemNameFormatter,_=V(g)?g({value:o}):R(g)?g.replace(`{value}`,o+``):o+``;n.push([_,m,c,l,u,h]);for(var v=0;v<s.length;v++){var y=s[v];if(y<m||y>h){var b=[_,y];r.push(b)}}}return{boxData:n,outliers:r}}var By={type:`echarts:boxplot`,transform:function(e){var t=e.upstream;t.sourceFormat!==`arrayRows`&&Hn(``);var n=zy(t.getRawData(),e.config);return[{dimensions:[`ItemName`,`Low`,`Q1`,`Q2`,`Q3`,`High`],data:n.boxData},{data:n.outliers}]}};function Vy(e){e.registerSeriesModel(Ey),e.registerChartView(Dy),e.registerLayout(Py),e.registerTransform(By),Ry(e)}var Hy=256,Uy=function(){function e(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var e=sn.createCanvas();this.canvas=e}return e.prototype.update=function(e,t,n,r,i,a){var o=this._getBrush(),s=this._getGradient(i,`inRange`),c=this._getGradient(i,`outOfRange`),l=this.pointSize+this.blurSize,u=this.canvas,d=u.getContext(`2d`),f=e.length;u.width=t,u.height=n;for(var p=0;p<f;++p){var m=e[p],h=m[0],g=m[1],_=m[2],v=r(_);d.globalAlpha=v,d.drawImage(o,h-l,g-l)}if(!u.width||!u.height)return u;for(var y=d.getImageData(0,0,u.width,u.height),b=y.data,x=0,S=b.length,C=this.minOpacity,w=this.maxOpacity-C;x<S;){var v=b[x+3]/256,T=Math.floor(v*(Hy-1))*4;if(v>0){var E=a(v)?s:c;v>0&&(v=v*w+C),b[x++]=E[T],b[x++]=E[T+1],b[x++]=E[T+2],b[x++]=E[T+3]*v*256}else x+=4}return d.putImageData(y,0,0),u},e.prototype._getBrush=function(){var e=this._brushCanvas||=sn.createCanvas(),t=this.pointSize+this.blurSize,n=t*2;e.width=n,e.height=n;var r=e.getContext(`2d`);return r.clearRect(0,0,n,n),r.shadowOffsetX=n,r.shadowBlur=this.blurSize,r.shadowColor=Z.color.neutral99,r.beginPath(),r.arc(-t,t,this.pointSize,0,Math.PI*2,!0),r.closePath(),r.fill(),e},e.prototype._getGradient=function(e,t){for(var n=this._gradientPixels,r=n[t]||(n[t]=new Uint8ClampedArray(256*4)),i=[0,0,0,0],a=0,o=0;o<256;o++)e[t](o/255,!0,i),r[a++]=i[0],r[a++]=i[1],r[a++]=i[2],r[a++]=i[3];return r},e}();function Wy(e,t,n){var r=e[1]-e[0];t=u(t,function(t){return{interval:[(t.interval[0]-e[0])/r,(t.interval[1]-e[0])/r]}});var i=t.length,a=0;return function(e){var r;for(r=a;r<i;r++){var o=t[r].interval;if(o[0]<=e&&e<=o[1]){a=r;break}}if(r===i)for(r=a-1;r>=0;r--){var o=t[r].interval;if(o[0]<=e&&e<=o[1]){a=r;break}}return r>=0&&r<i&&n[r]}}function Gy(e,t){var n=e[1]-e[0];return t=[(t[0]-e[0])/n,(t[1]-e[0])/n],function(e){return e>=t[0]&&e<=t[1]}}var Ky=function(e){L(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){var r;t.eachComponent(`visualMap`,function(t){t.eachTargetSeries(function(n){n===e&&(r=t)})}),this._progressiveEls=null,this.group.removeAll();var i=e.coordinateSystem;i.type===`cartesian2d`||i.type===`calendar`||i.type===`matrix`?this._renderOnGridLike(e,n,0,e.getData().count()):mf(i)&&this._renderOnGeo(i,e,r,n)},t.prototype.incrementalPrepareRender=function(e,t,n){this.group.removeAll()},t.prototype.incrementalRender=function(e,t,n,r){var i=t.coordinateSystem;i&&(mf(i)?this.render(t,n,r):(this._progressiveEls=[],this._renderOnGridLike(t,r,e.start,e.end,!0)))},t.prototype.eachRendered=function(e){xe(this._progressiveEls||this.group,e)},t.prototype._renderOnGridLike=function(e,t,n,r,i){var a=e.coordinateSystem,o=pf(a,`cartesian2d`),s=pf(a,`matrix`),c,l,u,f;if(o){var p=a.getAxis(`x`),m=a.getAxis(`y`);c=yl(p).w+.5,l=yl(m).w+.5,u=p.scale.getExtent(),f=m.scale.getExtent()}for(var h=this.group,g=e.getData(),_=e.getModel([`emphasis`,`itemStyle`]).getItemStyle(),v=e.getModel([`blur`,`itemStyle`]).getItemStyle(),y=e.getModel([`select`,`itemStyle`]).getItemStyle(),b=e.get([`itemStyle`,`borderRadius`]),x=Un(e),S=e.getModel(`emphasis`),C=S.get(`focus`),w=S.get(`blurScope`),T=S.get(`disabled`),E=o||s?[g.mapDimension(`x`),g.mapDimension(`y`),g.mapDimension(`value`)]:[g.mapDimension(`time`),g.mapDimension(`value`)],D=n;D<r;D++){var O=void 0,k=g.getItemVisual(D,`style`);if(o){var A=g.get(E[0],D),j=g.get(E[1],D);if(isNaN(g.get(E[2],D))||isNaN(A)||isNaN(j)||A<u[0]||A>u[1]||j<f[0]||j>f[1])continue;var M=a.dataToPoint([A,j]);O=new d({shape:{x:M[0]-c/2,y:M[1]-l/2,width:c,height:l},style:k})}else if(s){var N=a.dataToLayout([g.get(E[0],D),g.get(E[1],D)]).rect;if(xr(N.x))continue;O=new d({z2:1,shape:N,style:k})}else{if(isNaN(g.get(E[1],D)))continue;var P=a.dataToLayout([g.get(E[0],D)]),N=P.contentRect||P.rect;if(xr(N.x)||xr(N.y))continue;O=new d({z2:1,shape:N,style:k})}if(g.hasItemOption){var F=g.getItemModel(D),ee=F.getModel(`emphasis`);_=ee.getModel(`itemStyle`).getItemStyle(),v=F.getModel([`blur`,`itemStyle`]).getItemStyle(),y=F.getModel([`select`,`itemStyle`]).getItemStyle(),b=F.get([`itemStyle`,`borderRadius`]),C=ee.get(`focus`),w=ee.get(`blurScope`),T=ee.get(`disabled`),x=Un(F)}O.shape.r=b;var te=e.getRawValue(D),ne=`-`;te&&te[2]!=null&&(ne=te[2]+``),Lt(O,x,{labelFetcher:e,labelDataIndex:D,defaultOpacity:k.opacity,defaultText:ne}),O.ensureState(`emphasis`).style=_,O.ensureState(`blur`).style=v,O.ensureState(`select`).style=y,Aa(O,C,w,T),O.incremental=Et(e,i),i&&(O.states.emphasis.hoverLayer=2),h.add(O),g.setItemGraphicEl(D,O),this._progressiveEls&&this._progressiveEls.push(O)}},t.prototype._renderOnGeo=function(e,t,n,r){var i=n.targetVisuals.inRange,a=n.targetVisuals.outOfRange,o=t.getData(),s=this._hmLayer||this._hmLayer||new Uy;s.blurSize=t.get(`blurSize`),s.pointSize=t.get(`pointSize`),s.minOpacity=t.get(`minOpacity`),s.maxOpacity=t.get(`maxOpacity`);var c=e.getViewRect().clone(),l=e.getRoamTransform();c.applyTransform(l);var u=Math.max(c.x,0),d=Math.max(c.y,0),f=Math.min(c.width+c.x,r.getWidth()),p=Math.min(c.height+c.y,r.getHeight()),m=f-u,h=p-d,g=[o.mapDimension(`lng`),o.mapDimension(`lat`),o.mapDimension(`value`)],_=o.mapArray(g,function(t,n,r){var i=e.dataToPoint([t,n]);return i[0]-=u,i[1]-=d,i.push(r),i}),v=n.getExtent(),y=n.type===`visualMap.continuous`?Gy(v,n.option.range):Wy(v,n.getPieceList(),n.option.selected);s.update(_,m,h,i.color.getNormalizer(),{inRange:i.color.getColorMapper(),outOfRange:a.color.getColorMapper()},y);var b=new Hr({style:{width:m,height:h,x:u,y:d,image:s.canvas},silent:!0});this.group.add(b)},t.type=`heatmap`,t}(Ot),qy=function(e){L(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.getInitialData=function(e,t){return Fo(null,this,{generateCoord:`value`})},t.prototype.preventIncremental=function(){var e=Wn.get(this.get(`coordinateSystem`));if(e&&e.dimensions)return e.dimensions[0]===`lng`&&e.dimensions[1]===`lat`},t.type=`series.heatmap`,t.dependencies=[`grid`,`geo`,`calendar`,`matrix`],t.defaultOption={coordinateSystem:`cartesian2d`,z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:Z.color.primary}}},t}(Xt);function Jy(e){e.registerChartView(Ky),e.registerSeriesModel(qy)}var Yy=2,Xy=4,Zy=function(e){L(t,e);function t(t,n,r,i){var a=e.call(this)||this;a.z2=Yy,a.textConfig={inside:!0},H(a).seriesIndex=n.seriesIndex;var o=new j({z2:Xy,silent:t.getModel().get([`label`,`silent`])});return a.setTextContent(o),a.updateData(!0,t,n,r,i),a}return t.prototype.updateData=function(e,t,n,r,i){this.node=t,t.piece=this,n||=this._seriesModel,r||=this._ecModel;var a=this;H(a).dataIndex=t.dataIndex;var o=t.getModel(),s=o.getModel(`emphasis`),c=t.getLayout(),l=G({},c);l.label=null;var u=t.getVisual(`style`);u.lineJoin=`bevel`;var d=t.getVisual(`decal`);d&&(u.decal=ia(d,i)),G(l,lm(o.getModel(`itemStyle`),l,!0)),J(Ui,function(e){var t=a.ensureState(e),n=o.getModel([e,`itemStyle`]);t.style=n.getItemStyle();var r=lm(n,l);r&&(t.shape=r)}),e?(a.setShape(l),a.shape.r=c.r0,me(a,{shape:{r:c.r}},n,t.dataIndex)):(yn(a,{shape:l},n),Ne(a)),a.useStyle(u),this._updateLabel(n);var f=o.getShallow(`cursor`);f&&a.attr(`cursor`,f),this._seriesModel=n||this._seriesModel,this._ecModel=r||this._ecModel;var p=s.get(`focus`),m=p===`relative`?nr(t.getAncestorsIndices(),t.getDescendantIndices()):p===`ancestor`?t.getAncestorsIndices():p===`descendant`?t.getDescendantIndices():p;Aa(this,m,s.get(`blurScope`),s.get(`disabled`))},t.prototype._updateLabel=function(e){var t=this,n=this.node.getModel(),r=n.getModel(`label`),i=this.node.getLayout(),a=i.endAngle-i.startAngle,o=(i.startAngle+i.endAngle)/2,s=Math.cos(o),c=Math.sin(o),l=this,u=l.getTextContent(),d=this.node.dataIndex,f=r.get(`minAngle`)/180*Math.PI;u.ignore=!(r.get(`show`)&&!(f!=null&&Math.abs(a)<f)),J(yi,function(r){var f=r===`normal`?n.getModel(`label`):n.getModel([r,`label`]),m=r===`normal`,h=m?u:u.ensureState(r),g=e.getFormattedLabel(d,r);m&&(g||=t.node.name),h.style=sa(f,{},null,r!==`normal`,!0),g&&(h.style.text=g);var _=f.get(`show`);_!=null&&!m&&(h.ignore=!_);var v=p(f,`position`),y=m?l:l.states[r],b=y.style.fill;y.textConfig={outsideFill:f.get(`color`)===`inherit`?b:null,inside:v!==`outside`};var x,S=p(f,`distance`)||0,C=p(f,`align`),w=p(f,`rotate`),T=Math.PI*.5,E=Math.PI*1.5,D=le(w===`tangential`?Math.PI/2-o:o),O=D>T&&!dt(D-T)&&D<E;v===`outside`?(x=i.r+S,C=O?`right`:`left`):!C||C===`center`?(x=i.r0===0&&dt(a-2*Math.PI)?0:(i.r+i.r0)/2,C=`center`):C===`left`?(x=i.r0+S,C=O?`right`:`left`):C===`right`&&(x=i.r-S,C=O?`left`:`right`),h.style.align=C,h.style.verticalAlign=p(f,`verticalAlign`)||`middle`,h.x=x*s+i.cx,h.y=x*c+i.cy;var k=0;w===`radial`?k=le(-o)+(O?Math.PI:0):w===`tangential`?k=le(Math.PI/2-o)+(O?Math.PI:0):te(w)&&(k=w*Math.PI/180),h.rotation=le(k)});function p(e,t){return e.get(t)??r.get(t)}u.dirtyStyle()},t}(Fr),Qy=`sunburst`,$y=function(e){L(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.ignoreStyleOnData=!0,n}return t.prototype.getInitialData=function(e,t){var n={name:e.name,children:e.data};eb(n);var r=this._levelModels=u(e.levels||[],function(e){return new ii(e,this,t)},this),i=Wg.createTree(n,this,a);function a(e){e.wrapMethod(`getItemModel`,function(e,t){var n=r[i.getNodeByDataIndex(t).depth];return n&&(e.parentModel=n),e})}return i.data},t.prototype.optionUpdated=function(){this.resetViewRoot()},t.prototype.getDataParams=function(t){var n=e.prototype.getDataParams.apply(this,arguments);return n.treePathInfo=Yg(this.getData().tree.getNodeByDataIndex(t),this),n},t.prototype.getLevelModel=function(e){return this._levelModels&&this._levelModels[e.depth]},t.prototype.getViewRoot=function(){return this._viewRoot},t.prototype.resetViewRoot=function(e){e?this._viewRoot=e:e=this._viewRoot;var t=this.getRawData().tree.root;(!e||e!==t&&!t.contains(e))&&(this._viewRoot=t)},t.prototype.enableAriaDecal=function(){Qg(this)},t.type=`series.`+Qy,t.defaultOption={z:2,center:[`50%`,`50%`],radius:[0,`75%`],clockwise:!0,startAngle:90,minAngle:0,stillShowZeroSum:!0,nodeClick:`rootToNode`,renderLabelForZeroData:!1,label:{rotate:`radial`,show:!0,opacity:1,align:`center`,position:`inside`,distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:`white`,borderType:`solid`,shadowBlur:0,shadowColor:`rgba(0, 0, 0, 0.2)`,shadowOffsetX:0,shadowOffsetY:0,opacity:1},emphasis:{focus:`descendant`},blur:{itemStyle:{opacity:.2},label:{opacity:.1}},animationType:`expansion`,animationDuration:1e3,animationDurationUpdate:500,data:[],sort:`desc`},t}(Xt);function eb(e){var t=0;J(e.children,function(e){eb(e);var n=e.value;B(n)&&(n=n[0]),t+=n});var n=e.value;B(n)&&(n=n[0]),(n==null||isNaN(n))&&(n=t),n<0&&(n=0),B(e.value)?e.value[0]=n:e.value=n}var tb=`sunburstRootToNode`,nb=`sunburstHighlight`,rb=`sunburstUnhighlight`;function ib(e){e.registerAction({type:tb,update:`updateView`},function(e,t){t.eachComponent({mainType:`series`,subType:`sunburst`,query:e},n);function n(t,n){var r=Kg(e,[tb],t);if(r){var i=t.getViewRoot();i&&(e.direction=Jg(i,r.node)?`rollUp`:`drillDown`),t.resetViewRoot(r.node)}}}),e.registerAction({type:nb,update:`none`},function(e,t,n){e=G({},e),t.eachComponent({mainType:`series`,subType:`sunburst`,query:e},r);function r(t){var n=Kg(e,[nb],t);n&&(e.dataIndex=n.node.dataIndex)}n.dispatchAction(G(e,{type:`highlight`}))}),e.registerAction({type:rb,update:`updateView`},function(e,t,n){e=G({},e),n.dispatchAction(G(e,{type:`downplay`}))})}var ab=function(e){L(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=Qy,t}return t.prototype.render=function(e,t,n,r){var i=this;this.seriesModel=e,this.api=n,this.ecModel=t;var a=e.getData(),o=a.tree.root,s=e.getViewRoot(),c=this.group,l=e.get(`renderLabelForZeroData`),u=[];s.eachNode(function(e){u.push(e)}),d(u,this._oldChildren||[]),m(o,s),this._initEvents(),this._oldChildren=u;function d(e,t){if(e.length===0&&t.length===0)return;new Ka(t,e,n,n).add(r).update(r).remove(Q(r,null)).execute();function n(e){return e.getId()}function r(n,r){f(n==null?null:e[n],r==null?null:t[r])}}function f(r,i){if(!l&&r&&!r.getValue()&&(r=null),r!==o&&i!==o){if(i&&i.piece)r?(i.piece.updateData(!1,r,e,t,n),a.setItemGraphicEl(r.dataIndex,i.piece)):p(i);else if(r){var s=new Zy(r,e,t,n);c.add(s),a.setItemGraphicEl(r.dataIndex,s)}}}function p(e){e&&(e.piece&&=(c.remove(e.piece),null))}function m(r,a){a.depth>0?(i.virtualPiece?i.virtualPiece.updateData(!1,r,e,t,n):(i.virtualPiece=new Zy(r,e,t,n),c.add(i.virtualPiece)),a.piece.off(`click`),i.virtualPiece.on(`click`,function(e){i._rootToNode(a.parentNode)})):i.virtualPiece&&=(c.remove(i.virtualPiece),null)}},t.prototype._initEvents=function(){var e=this;this.group.off(`click`),this.group.on(`click`,function(t){var n=!1;e.seriesModel.getViewRoot().eachNode(function(r){if(!n&&r.piece&&r.piece===t.target){var i=r.getModel().get(`nodeClick`);if(i===`rootToNode`)e._rootToNode(r);else if(i===`link`){var a=r.getModel(),o=a.get(`link`);o&&Ur(o,a.get(`target`,!0)||`_blank`)}n=!0}})})},t.prototype._rootToNode=function(e){e!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:tb,from:this.uid,seriesId:this.seriesModel.id,targetNode:e})},t.prototype.containPoint=function(e,t){var n=t.getData().getItemLayout(0);if(n){var r=e[0]-n.cx,i=e[1]-n.cy,a=Math.sqrt(r*r+i*i);return a<=n.r&&a>=n.r0}},t.type=Qy,t}(Ot),ob=Be(Qy,sb);function sb(e){var t={};function n(e,n,r){if(e.depth===0)return Z.color.neutral50;for(var i=e;i&&i.depth>1;)i=i.parentNode;var a=n.getColorFromPalette(i.name||i.dataIndex+``,t);return e.depth>1&&R(a)&&(a=D(a,(e.depth-1)/(r-1)*.5)),a}e.eachSeriesByType(Qy,function(e){var t=e.getData(),r=t.tree;r.eachNode(function(i){var a=i.getModel().getModel(`itemStyle`).getItemStyle();a.fill||=n(i,e,r.root.height),G(t.ensureUniqueItemVisual(i.dataIndex,`style`),a)})})}var cb=Math.PI/180,lb=Be(Qy,ub);function ub(e,t){e.eachSeriesByType(Qy,function(e){var n=e.get(`center`),r=e.get(`radius`);B(r)||(r=[0,r]),B(n)||(n=[n,n]);var i=t.getWidth(),a=t.getHeight(),o=Math.min(i,a),s=U(n[0],i),c=U(n[1],a),l=U(r[0],o/2),u=U(r[1],o/2),d=-e.get(`startAngle`)*cb,f=e.get(`minAngle`)*cb,p=e.getData().tree.root,m=e.getViewRoot(),h=m.depth,g=e.get(`sort`);g!=null&&db(m,g);var _=0;J(m.children,function(e){!isNaN(e.getValue())&&_++});var v=m.getValue(),y=Math.PI/(v||_)*2,b=m.depth>0,x=m.height-(b?-1:1),S=(u-l)/(x||1),C=e.get(`clockwise`),w=e.get(`stillShowZeroSum`),T=C?1:-1,E=function(t,n){if(t){var r=n;if(t!==p){var i=t.getValue(),a=v===0&&w?y:i*y;a<f&&(a=f),r=n+T*a;var u=t.depth-h-(b?-1:1),d=l+S*u,m=l+S*(u+1),g=e.getLevelModel(t);if(g){var _=g.get(`r0`,!0),x=g.get(`r`,!0),D=g.get(`radius`,!0);D!=null&&(_=D[0],x=D[1]),_!=null&&(d=U(_,o/2)),x!=null&&(m=U(x,o/2))}t.setLayout({angle:a,startAngle:n,endAngle:r,clockwise:C,cx:s,cy:c,r0:d,r:m})}if(t.children&&t.children.length){var O=0;J(t.children,function(e){O+=E(e,n+O)})}return r-n}};if(b){var D=l,O=l+S,k=Math.PI*2;p.setLayout({angle:k,startAngle:d,endAngle:d+k,clockwise:C,cx:s,cy:c,r0:D,r:O})}E(m,d)})}function db(e,t){var n=e.children||[];e.children=fb(n,t),n.length&&J(e.children,function(e){db(e,t)})}function fb(e,t){if(V(t)){var n=u(e,function(e,t){var n=e.getValue();return{params:{depth:e.depth,height:e.height,dataIndex:e.dataIndex,getValue:function(){return n}},index:t}});return n.sort(function(e,n){return t(e.params,n.params)}),u(n,function(t){return e[t.index]})}else{var r=t===`asc`;return e.sort(function(e,t){var n=(e.getValue()-t.getValue())*(r?1:-1);return n===0?(e.dataIndex-t.dataIndex)*(r?-1:1):n})}}function pb(e){e.registerChartView(ab),e.registerSeriesModel($y),e.registerLayout(lb),e.registerVisual(ob),ib(e)}var mb={color:`fill`,borderColor:`stroke`},hb={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},gb=$(),_b=function(e){L(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.optionUpdated=function(){this.currentZLevel=this.get(`zlevel`,!0),this.currentZ=this.get(`z`,!0)},t.prototype.getInitialData=function(e,t){return Fo(null,this)},t.prototype.getDataParams=function(t,n,r){var i=e.prototype.getDataParams.call(this,t,n);return r&&(i.info=gb(r).info),i},t.type=`series.custom`,t.dependencies=[`grid`,`polar`,`geo`,`singleAxis`,`calendar`,`matrix`],t.defaultOption={coordinateSystem:`cartesian2d`,z:2,legendHoverLink:!0,clip:!1},t}(Xt);function vb(e,t){return t||=[0,0],u([`x`,`y`],function(n,r){var i=this.getAxis(n),a=t[r],o=e[r]/2;return i.type===`category`?yl(i).w:Math.abs(i.dataToCoord(a-o)-i.dataToCoord(a+o))},this)}function yb(e){var t=e.master.getRect();return{coordSys:{type:`cartesian2d`,x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(t){return e.dataToPoint(t)},size:X(vb,e)}}}function bb(e,t){return t||=[0,0],u([0,1],function(n){var r=t[n],i=e[n]/2,a=[],o=[];return a[n]=r-i,o[n]=r+i,a[1-n]=o[1-n]=t[1-n],Math.abs(this.dataToPoint(a)[n]-this.dataToPoint(o)[n])},this)}function xb(e){var t=e.view,n=t.getBoundingRect();return{coordSys:{type:`geo`,x:n.x,y:n.y,width:n.width,height:n.height,zoom:Og(t)},api:{coord:function(t){return e.dataToPoint(t)},size:X(bb,e)}}}function Sb(e,t){var n=this.getAxis(),r=t instanceof Array?t[0]:t,i=(e instanceof Array?e[0]:e)/2;return n.type===`category`?yl(n).w:Math.abs(n.dataToCoord(r-i)-n.dataToCoord(r+i))}function Cb(e){var t=e.getRect();return{coordSys:{type:`singleAxis`,x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(t){return e.dataToPoint(t)},size:X(Sb,e)}}}function wb(e,t){return t||=[0,0],u([`Radius`,`Angle`],function(n,r){var i=`get`+n+`Axis`,a=this[i](),o=t[r],s=e[r]/2,c=a.type===`category`?yl(a).w:Math.abs(a.dataToCoord(o-s)-a.dataToCoord(o+s));return n===`Angle`&&(c=c*Math.PI/180),c},this)}function Tb(e){var t=e.getRadiusAxis(),n=e.getAngleAxis(),r=t.getExtent();return r[0]>r[1]&&r.reverse(),{coordSys:{type:`polar`,cx:e.cx,cy:e.cy,r:r[1],r0:r[0]},api:{coord:function(r){var i=t.dataToRadius(r[0]),a=n.dataToAngle(r[1]),o=e.coordToPoint([i,a]);return o.push(i,a*Math.PI/180),o},size:X(wb,e)}}}function Eb(e){var t=e.getRect(),n=e.getRangeInfo();return{coordSys:{type:`calendar`,x:t.x,y:t.y,width:t.width,height:t.height,cellWidth:e.getCellWidth(),cellHeight:e.getCellHeight(),rangeInfo:{start:n.start,end:n.end,weeks:n.weeks,dayCount:n.allDay}},api:{coord:function(t,n){return e.dataToPoint(t,n)},layout:function(t,n){return e.dataToLayout(t,n)}}}}function Db(e){var t=e.getRect();return{coordSys:{type:`matrix`,x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(t,n){return e.dataToPoint(t,n)},layout:function(t,n){return e.dataToLayout(t,n)}}}}var Ob={position:[`x`,`y`],scale:[`scaleX`,`scaleY`],origin:[`originX`,`originY`]},kb=qr(Ob);Oe(ci,function(e,t){return e[t]=1,e},{}),ci.join(`, `);var Ab=[``,`style`,`shape`,`extra`],jb=$();function Mb(e,t,n,r,i){var a=e+`Animation`,o=on(e,r,i)||{},s=jb(t).userDuring;return o.duration>0&&(o.during=s?X(Hb,{el:t,userDuring:s}):null,o.setToFinal=!0,o.scope=e),G(o,n[a]),o}function Nb(e,t,n,r){r||={};var i=r.dataIndex,a=r.isInit,o=r.clearStyle,s=n.isAnimationEnabled(),c=jb(e),l=t.style;c.userDuring=t.during;var u={},d={};if(Kb(e,t,d),e.type===`compound`)for(var f=e.shape.paths,p=t.shape.paths,m=0;m<p.length;m++){var h=p[m];Wb(`shape`,h,f[m])}else Wb(`shape`,t,d),Wb(`extra`,t,d);if(!a&&s&&(Gb(e,t,u),Ub(`shape`,e,t,u),Ub(`extra`,e,t,u),qb(e,t,l,u)),d.style=l,Lb(e,d,o),zb(e,t),s)if(a){var g={};J(Ab,function(e){var n=e?t[e]:t;n&&n.enterFrom&&(e&&(g[e]=g[e]||{}),G(e?g[e]:g,n.enterFrom))});var _=Mb(`enter`,e,t,n,i);_.duration>0&&e.animateFrom(g,_)}else Rb(e,t,i||0,n,u);Pb(e,t),l?e.dirty():e.markRedraw()}function Pb(e,t){for(var n=jb(e).leaveToProps,r=0;r<Ab.length;r++){var i=Ab[r],a=i?t[i]:t;a&&a.leaveTo&&(n||=jb(e).leaveToProps={},i&&(n[i]=n[i]||{}),G(i?n[i]:n,a.leaveTo))}}function Fb(e,t,n,r){if(e){var i=e.parent,a=jb(e).leaveToProps;if(a){var o=Mb(`update`,e,t,n,0);o.done=function(){i&&i.remove(e),r&&r()},e.animateTo(a,o)}else i&&i.remove(e),r&&r()}}function Ib(e){return e===`all`}function Lb(e,t,n){var r=t.style;if(!e.isGroup&&r){if(n){e.useStyle({});for(var i=e.animators,a=0;a<i.length;a++){var o=i[a];o.targetName===`style`&&o.changeTarget(e.style)}}e.setStyle(r)}t&&(t.style=null,t&&e.attr(t),t.style=r)}function Rb(e,t,n,r,i){if(i){var a=Mb(`update`,e,t,r,n);a.duration>0&&e.animateFrom(i,a)}}function zb(e,t){K(t,`silent`)&&(e.silent=t.silent),K(t,`ignore`)&&(e.ignore=t.ignore),e instanceof Mt&&K(t,`invisible`)&&(e.invisible=t.invisible),e instanceof bt&&K(t,`autoBatch`)&&(e.autoBatch=t.autoBatch)}var Bb={},Vb={setTransform:function(e,t){return Bb.el[e]=t,this},getTransform:function(e){return Bb.el[e]},setShape:function(e,t){var n=Bb.el,r=n.shape||={};return r[e]=t,n.dirtyShape&&n.dirtyShape(),this},getShape:function(e){var t=Bb.el.shape;if(t)return t[e]},setStyle:function(e,t){var n=Bb.el,r=n.style;return r&&(r[e]=t,n.dirtyStyle&&n.dirtyStyle()),this},getStyle:function(e){var t=Bb.el.style;if(t)return t[e]},setExtra:function(e,t){var n=Bb.el.extra||(Bb.el.extra={});return n[e]=t,this},getExtra:function(e){var t=Bb.el.extra;if(t)return t[e]}};function Hb(){var e=this,t=e.el;if(t){var n=jb(t).userDuring,r=e.userDuring;if(n!==r){e.el=e.userDuring=null;return}Bb.el=t,r(Vb)}}function Ub(e,t,n,r){var i=n[e];if(i){var a=t[e],o;if(a){var s=n.transition,c=i.transition;if(c)if(!o&&(o=r[e]={}),Ib(c))G(o,a);else for(var l=qn(c),u=0;u<l.length;u++){var d=l[u],f=a[d];o[d]=f}else if(Ib(s)||Sa(s,e)>=0){!o&&(o=r[e]={});for(var p=qr(a),u=0;u<p.length;u++){var d=p[u],f=a[d];Jb(i[d],f)&&(o[d]=f)}}}}}function Wb(e,t,n){var r=t[e];if(r)for(var i=n[e]={},a=qr(r),o=0;o<a.length;o++){var s=a[o];i[s]=Bi(r[s])}}function Gb(e,t,n){for(var r=t.transition,i=Ib(r)?ci:qn(r||[]),a=0;a<i.length;a++){var o=i[a];o===`style`||o===`shape`||o===`extra`||(n[o]=e[o])}}function Kb(e,t,n){for(var r=0;r<kb.length;r++){var i=kb[r],a=Ob[i],o=t[i];o&&(n[a[0]]=o[0],n[a[1]]=o[1])}for(var r=0;r<ci.length;r++){var s=ci[r];t[s]!=null&&(n[s]=t[s])}}function qb(e,t,n,r){if(n){var i=e.style,a;if(i){var o=n.transition,s=t.transition;if(o&&!Ib(o)){var c=qn(o);!a&&(a=r.style={});for(var l=0;l<c.length;l++){var u=c[l],d=i[u];a[u]=d}}else if(e.getAnimationStyleProps&&(Ib(s)||Ib(o)||Sa(s,`style`)>=0)){var f=e.getAnimationStyleProps(),p=f?f.style:null;if(p){!a&&(a=r.style={});for(var m=qr(n),l=0;l<m.length;l++){var u=m[l];if(p[u]){var d=i[u];a[u]=d}}}}}}}function Jb(e,t){return w(e)?e!==t:e!=null&&isFinite(e)}var Yb=$(),Xb=[`percent`,`easing`,`shape`,`style`,`extra`];function Zb(e){e.stopAnimation(`keyframe`),e.attr(Yb(e))}function Qb(e,t,n){if(!(!n.isAnimationEnabled()||!t)){if(B(t)){J(t,function(t){Qb(e,t,n)});return}var r=t.keyframes,i=t.duration;if(n&&i==null){var a=on(`enter`,n,0);i=a&&a.duration}if(!(!r||!i)){var o=Yb(e);J(Ab,function(n){if(!(n&&!e[n])){var a;r.sort(function(e,t){return e.percent-t.percent}),J(r,function(r){var s=e.animators,c=n?r[n]:r;if(c){var l=qr(c);if(n||(l=ca(l,function(e){return Sa(Xb,e)<0})),l.length){a||(a=e.animate(n,t.loop,!0),a.scope=`keyframe`);for(var u=0;u<s.length;u++)s[u]!==a&&s[u].targetName===a.targetName&&s[u].stopTracks(l);n&&(o[n]=o[n]||{});var d=n?o[n]:o;J(l,function(t){d[t]=((n?e[n]:e)||{})[t]}),a.whenWithKeys(i*r.percent,c,l,r.easing)}}}),a&&a.delay(t.delay||0).duration(i).start(t.easing)}})}}}var $b=`emphasis`,ex=`normal`,tx=`blur`,nx=`select`,rx=[ex,$b,tx,nx],ix={normal:[`itemStyle`],emphasis:[$b,`itemStyle`],blur:[tx,`itemStyle`],select:[nx,`itemStyle`]},ax={normal:[`label`],emphasis:[$b,`label`],blur:[tx,`label`],select:[nx,`label`]},ox=[`x`,`y`],sx=`e\0\0`,cx={normal:{},emphasis:{},blur:{},select:{}},lx={cartesian2d:yb,geo:xb,single:Cb,polar:Tb,calendar:Eb,matrix:Db};function ux(e){return e instanceof bt}function dx(e){return e instanceof Mt}function fx(e,t){t.copyTransform(e),dx(t)&&dx(e)&&(t.setStyle(e.style),t.z=e.z,t.z2=e.z2,t.zlevel=e.zlevel,t.invisible=e.invisible,t.ignore=e.ignore,ux(t)&&ux(e)&&t.setShape(e.shape))}var px=function(e){L(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n,r){this._progressiveEls=null;var i=this._data,a=e.getData(),o=this.group,s=yx(e,a,t,n);i||o.removeAll(),a.diff(i).add(function(t){xx(n,null,t,s(t,r),e,o,a)}).remove(function(t){var n=i.getItemGraphicEl(t);n&&Fb(n,gb(n).option,e)}).update(function(t,c){xx(n,i.getItemGraphicEl(c),t,s(t,r),e,o,a)}).execute();var c=e.get(`clip`,!0)?uf(e.coordinateSystem,!1,e):null;c?o.setClipPath(c):o.removeClipPath(),this._data=a},t.prototype.incrementalPrepareRender=function(e,t,n){this.group.removeAll(),this._data=null},t.prototype.incrementalRender=function(e,t,n,r,i){var a=t.getData(),o=yx(t,a,n,r),s=this._progressiveEls=[];function c(e){e.isGroup||(e.incremental=Et(t),e.ensureState(`emphasis`).hoverLayer=2)}for(var l=e.start;l<e.end;l++){var u=xx(null,null,l,o(l,i),t,this.group,a);u&&(u.traverse(c),s.push(u))}},t.prototype.eachRendered=function(e){xe(this._progressiveEls||this.group,e)},t.prototype.filterForExposedEvent=function(e,t,n,r){var i=t.element;if(i==null||n.name===i)return!0;for(;(n=n.__hostTarget||n.parent)&&n!==this.group;)if(n.name===i)return!0;return!1},t.type=`custom`,t}(Ot);function mx(e){var t=e.type,n;if(t===`path`){var r=e.shape,i=r.width!=null&&r.height!=null?{x:r.x||0,y:r.y||0,width:r.width,height:r.height}:null,a=Fx(r);n=De(a,null,i,r.layout||`center`),gb(n).customPathData=a}else if(t===`image`)n=new Hr({}),gb(n).customImagePath=e.style.image;else if(t===`text`)n=new j({});else if(t===`group`)n=new W;else if(t===`compoundPath`){var r=e.shape;if(!r||!r.paths){var o=``;Hn(o)}n=new Tt({shape:{paths:u(r.paths,function(e){if(e.type===`path`)return De(e.shape.pathData,e,null);var t=Br(e.type);return t||Hn(``),new t})}})}else{var s=Br(t);if(!s){var o=``;Hn(o)}n=new s}return gb(n).customGraphicType=t,n.name=e.name,n.z2EmphasisLift=1,n.z2SelectLift=1,n}function hx(e,t,n,r,i,a,o){Zb(t);var s=i&&i.normal.cfg;s&&t.setTextConfig(s),r&&r.transition==null&&(r.transition=ox);var c=r&&r.style;if(c){if(t.type===`text`){var l=c;K(l,`textFill`)&&(l.fill=l.textFill),K(l,`textStroke`)&&(l.stroke=l.textStroke)}var u=void 0,d=ux(t)?c.decal:null;e&&d&&(d.dirty=!0,u=ia(d,e)),c.__decalPattern=u}if(dx(t)&&c){var u=c.__decalPattern;u&&(c.decal=u)}Nb(t,r,a,{dataIndex:n,isInit:o,clearStyle:!0}),Qb(t,r.keyframeAnimation,a)}function gx(e,t,n,r,i){var a=t.isGroup?null:t,o=i&&i[e].cfg;if(a){var s=a.ensureState(e);if(r===!1){var c=a.getState(e);c&&(c.style=null)}else s.style=r||null;o&&(s.textConfig=o),Sr(a)}}function _x(e,t,n){if(!e.isGroup){var r=e,i=n.currentZ,a=n.currentZLevel;r.z=i,r.zlevel=a;var o=t.z2;o!=null&&(r.z2=o||0);for(var s=0;s<rx.length;s++)vx(r,t,rx[s])}}function vx(e,t,n){var r=n===ex,i=r?t:Dx(t,n),a=i?i.z2:null,o;a!=null&&(o=r?e:e.ensureState(n),o.z2=a||0)}function yx(e,t,n,r){var i=e.get(`renderItem`);if(typeof i==`string`){var a=E(i);a&&(i=a)}var o=e.coordinateSystem,s={};o&&(s=o.prepareCustoms?o.prepareCustoms(o):lx[o.type](o));for(var c=ai({getWidth:r.getWidth,getHeight:r.getHeight,getZr:r.getZr,getDevicePixelRatio:r.getDevicePixelRatio,value:x,style:C,ordinalRawValue:S,styleEmphasis:w,visual:O,barLayout:k,currentSeriesIndices:A,font:j},s.api||{}),l={context:{},seriesId:e.id,seriesName:e.name,seriesIndex:e.seriesIndex,coordSys:s.coordSys,dataInsideLength:t.count(),encode:bx(e.getData()),itemPayload:e.get(`itemPayload`)||{}},u,d,f={},p={},m={},h={},g=0;g<rx.length;g++){var _=rx[g];m[_]=e.getModel(ix[_]),h[_]=e.getModel(ax[_])}function v(e){return e===u?d||=t.getItemModel(e):t.getItemModel(e)}function y(e,n){return t.hasItemOption?e===u?f[n]||(f[n]=v(e).getModel(ix[n])):v(e).getModel(ix[n]):m[n]}function b(e,n){return t.hasItemOption?e===u?p[n]||(p[n]=v(e).getModel(ax[n])):v(e).getModel(ax[n]):h[n]}return function(e,n){return u=e,d=null,f={},p={},i&&i(ai({dataIndexInside:e,dataIndex:t.getRawIndex(e),actionType:n?n.type:null},l),c)};function x(e,n){return n??=u,t.getStore().get(t.getDimensionIndex(e||0),n)}function S(e,n){n??=u,e||=0;var r=t.getDimensionInfo(e);if(!r){var i=t.getDimensionIndex(e);return i>=0?t.getStore().get(i,n):void 0}var a=t.get(r.name,n),o=r&&r.ordinalMeta;return o?o.categories[a]:a}function C(n,r){r??=u;var i=t.getItemVisual(r,`style`),a=i&&i.fill,o=i&&i.opacity,s=y(r,ex).getItemStyle();a!=null&&(s.fill=a),o!=null&&(s.opacity=o);var c={inheritColor:R(a)?a:Z.color.neutral99},l=b(r,ex),d=sa(l,null,c,!1,!0);d.text=l.getShallow(`show`)?z(e.getFormattedLabel(r,ex),Fd(t,r)):null;var f=An(l,c,!1);return D(n,s),s=vf(s,d,f),n&&T(s,n),s.legacy=!0,s}function w(n,r){r??=u;var i=y(r,$b).getItemStyle(),a=b(r,$b),o=sa(a,null,null,!0,!0);o.text=a.getShallow(`show`)?Ia(e.getFormattedLabel(r,$b),e.getFormattedLabel(r,ex),Fd(t,r)):null;var s=An(a,null,!0);return D(n,i),i=vf(i,o,s),n&&T(i,n),i.legacy=!0,i}function T(e,t){for(var n in t)K(t,n)&&(e[n]=t[n])}function D(e,t){e&&(e.textFill&&(t.textFill=e.textFill),e.textPosition&&(t.textPosition=e.textPosition))}function O(e,n){if(n??=u,K(mb,e)){var r=t.getItemVisual(n,`style`);return r?r[mb[e]]:null}if(K(hb,e))return t.getItemVisual(n,e)}function k(e){if(o.type===`cartesian2d`)return Kp(ai({axis:o.getBaseAxis()},e))}function A(){return n.getCurrentSeriesIndices()}function j(e){return Oa(e,n)}}function bx(e){var t={};return J(e.dimensions,function(n){var r=e.getDimensionInfo(n);if(!r.isExtraCoord){var i=r.coordDim,a=t[i]=t[i]||[];a[r.coordDimIndex]=e.getDimensionIndex(n)}}),t}function xx(e,t,n,r,i,a,o){if(!r){a.remove(t);return}var s=Sx(e,t,n,r,i,a);return s&&o.setItemGraphicEl(n,s),s&&Aa(s,r.focus,r.blurScope,r.emphasisDisabled),s}function Sx(e,t,n,r,i,a){var o=-1,s=t;t&&Cx(t,r,i)&&(o=Sa(a.childrenRef(),t),t=null);var c=!t,l=t;l?l.clearStates():(l=mx(r),s&&fx(s,l)),r.morph===!1?l.disableMorphing=!0:l.disableMorphing&&=!1,r.tooltipDisabled&&(l.tooltipDisabled=!0),cx.normal.cfg=cx.normal.conOpt=cx.emphasis.cfg=cx.emphasis.conOpt=cx.blur.cfg=cx.blur.conOpt=cx.select.cfg=cx.select.conOpt=null,cx.isLegacy=!1,Tx(l,n,r,i,c,cx),wx(l,n,r,i,c),hx(e,l,n,r,cx,i,c),K(r,`info`)&&(gb(l).info=r.info);for(var u=0;u<rx.length;u++){var d=rx[u];if(d!==ex){var f=Dx(r,d),p=Ox(r,f,d);gx(d,l,f,p,cx)}}return _x(l,r,i),r.type===`group`&&kx(e,l,n,r,i),o>=0?a.replaceAt(l,o):a.add(l),l}function Cx(e,t,n){var r=gb(e),i=t.type,a=t.shape,o=t.style;return n.isUniversalTransitionEnabled()||i!=null&&i!==r.customGraphicType||i===`path`&&Ix(a)&&Fx(a)!==r.customPathData||i===`image`&&K(o,`image`)&&o.image!==r.customImagePath}function wx(e,t,n,r,i){var a=n.clipPath;if(a===!1)e&&e.getClipPath()&&e.removeClipPath();else if(a){var o=e.getClipPath();o&&Cx(o,a,r)&&(o=null),o||(o=mx(a),e.setClipPath(o)),hx(null,o,t,a,null,r,i)}}function Tx(e,t,n,r,i,a){if(!(e.isGroup||e.type===`compoundPath`)){Ex(n,null,a),Ex(n,$b,a);var o=a.normal.conOpt,s=a.emphasis.conOpt,c=a.blur.conOpt,l=a.select.conOpt;if(o!=null||s!=null||l!=null||c!=null){var u=e.getTextContent();if(o===!1)u&&e.removeTextContent();else{o=a.normal.conOpt=o||{type:`text`},u?u.clearStates():(u=mx(o),e.setTextContent(u)),hx(null,u,t,o,null,r,i);for(var d=o&&o.style,f=0;f<rx.length;f++){var p=rx[f];if(p!==ex){var m=a[p].conOpt;gx(p,u,m,Ox(o,m,p),null)}}d?u.dirty():u.markRedraw()}}}}function Ex(e,t,n){var r=t?Dx(e,t):e,i=t?Ox(e,r,$b):e.style,a=e.type,o=r?r.textConfig:null,s=e.textContent,c=s?t?Dx(s,t):s:null;if(i&&(n.isLegacy||hf(i,a,!!o,!!c))){n.isLegacy=!0;var l=gf(i,a,!t);!o&&l.textConfig&&(o=l.textConfig),!c&&l.textContent&&(c=l.textContent)}if(!t&&c){var u=c;!u.type&&(u.type=`text`)}var d=t?n[t]:n.normal;d.cfg=o,d.conOpt=c}function Dx(e,t){return t?e?e[t]:null:e}function Ox(e,t,n){var r=t&&t.style;return r==null&&n===$b&&e&&(r=e.styleEmphasis),r}function kx(e,t,n,r,i){var a=r.children,o=a?a.length:0,s=r.$mergeChildren,c=s===`byName`||r.diffChildrenByName,l=s===!1;if(!(!o&&!c&&!l)){if(c){jx({api:e,oldChildren:t.children()||[],newChildren:a||[],dataIndex:n,seriesModel:i,group:t});return}l&&t.removeAll();for(var u=0;u<o;u++){var d=a[u],f=t.childAt(u);d?(d.ignore??=!1,Sx(e,f,n,d,i,t)):f.ignore=!0}for(var p=t.childCount()-1;p>=u;p--)Ax(t,t.childAt(p),i)}}function Ax(e,t,n){t&&Fb(t,gb(e).option,n)}function jx(e){new Ka(e.oldChildren,e.newChildren,Mx,Mx,e).add(Nx).update(Nx).remove(Px).execute()}function Mx(e,t){return(e&&e.name)??sx+t}function Nx(e,t){var n=this.context,r=e==null?null:n.newChildren[e],i=t==null?null:n.oldChildren[t];Sx(n.api,i,n.dataIndex,r,n.seriesModel,n.group)}function Px(e){var t=this.context,n=t.oldChildren[e];n&&Fb(n,gb(n).option,t.seriesModel)}function Fx(e){return e&&(e.pathData||e.d)}function Ix(e){return e&&(K(e,`pathData`)||K(e,`d`))}function Lx(e){e.registerChartView(px),e.registerSeriesModel(_b)}var Rx=$(),zx=ta,Bx=X,Vx=function(){function e(){this._dragging=!1,this.animationThreshold=15}return e.prototype.render=function(e,t,n,r){var i=t.get(`value`),a=t.get(`status`);if(this._axisModel=e,this._axisPointerModel=t,this._api=n,!(!r&&this._lastValue===i&&this._lastStatus===a)){this._lastValue=i,this._lastStatus=a;var o=this._group,s=this._handle;if(!a||a===`hide`){o&&o.hide(),s&&s.hide();return}o&&o.show(),s&&s.show();var c={};this.makeElOption(c,i,e,t,n);var l=c.graphicKey;l!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=l;var u=this._moveAnimation=this.determineAnimation(e,t);if(!o)o=this._group=new W,this.createPointerEl(o,c,e,t),this.createLabelEl(o,c,e,t),n.getZr().add(o);else{var d=Q(Hx,t,u);this.updatePointerEl(o,c,d),this.updateLabelEl(o,c,d,t)}Kx(o,t,!0),this._renderHandle(i)}},e.prototype.remove=function(e){this.clear(e)},e.prototype.dispose=function(e){this.clear(e)},e.prototype.determineAnimation=function(e,t){var n=t.get(`animation`),r=e.axis,i=r.type===`category`,a=t.get(`snap`);if(!a&&!i)return!1;if(n===`auto`||n==null){var o=this.animationThreshold;if(i&&yl(r).w>o)return!0;if(a){var s=qh(e).seriesDataCount,c=r.getExtent();return Math.abs(c[0]-c[1])/s>o}return!1}return n===!0},e.prototype.makeElOption=function(e,t,n,r,i){},e.prototype.createPointerEl=function(e,t,n,r){var i=t.pointer;if(i){var a=Rx(e).pointerEl=new at[i.type](zx(t.pointer));e.add(a)}},e.prototype.createLabelEl=function(e,t,n,r){if(t.label){var i=Rx(e).labelEl=new j(zx(t.label));e.add(i),Wx(i,r)}},e.prototype.updatePointerEl=function(e,t,n){var r=Rx(e).pointerEl;r&&t.pointer&&(r.setStyle(t.pointer.style),n(r,{shape:t.pointer.shape}))},e.prototype.updateLabelEl=function(e,t,n,r){var i=Rx(e).labelEl;i&&(i.setStyle(t.label.style),n(i,{x:t.label.x,y:t.label.y}),Wx(i,r))},e.prototype._renderHandle=function(e){if(!(this._dragging||!this.updateHandleTransform)){var t=this._axisPointerModel,n=this._api.getZr(),r=this._handle,i=t.getModel(`handle`),a=t.get(`status`);if(!i.get(`show`)||!a||a===`hide`){r&&n.remove(r),this._handle=null;return}var o;this._handle||(o=!0,r=this._handle=k(i.get(`icon`),{cursor:`move`,draggable:!0,onmousemove:function(e){Cn(e.event)},onmousedown:Bx(this._onHandleDragMove,this,0,0),drift:Bx(this._onHandleDragMove,this),ondragend:Bx(this._onHandleDragEnd,this)}),n.add(r)),Kx(r,t,!1),r.setStyle(i.getItemStyle(null,[`color`,`borderColor`,`borderWidth`,`opacity`,`shadowColor`,`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`]));var s=i.get(`size`);B(s)||(s=[s,s]),r.scaleX=s[0]/2,r.scaleY=s[1]/2,we(this,`_doDispatchAxisPointer`,i.get(`throttle`)||0,`fixRate`),this._moveHandleToValue(e,o)}},e.prototype._moveHandleToValue=function(e,t){Hx(this._axisPointerModel,!t&&this._moveAnimation,this._handle,Gx(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},e.prototype._onHandleDragMove=function(e,t){var n=this._handle;if(n){this._dragging=!0;var r=this.updateHandleTransform(Gx(n),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=r,n.stopAnimation(),n.attr(Gx(r)),Rx(n).lastProp=null,this._doDispatchAxisPointer()}},e.prototype._doDispatchAxisPointer=function(){if(this._handle){var e=this._payloadInfo,t=this._axisModel;this._api.dispatchAction({type:`updateAxisPointer`,x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:t.axis.dim,axisIndex:t.componentIndex}]})}},e.prototype._onHandleDragEnd=function(){if(this._dragging=!1,this._handle){var e=this._axisPointerModel.get(`value`);this._moveHandleToValue(e),this._api.dispatchAction({type:`hideTip`})}},e.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var t=e.getZr(),n=this._group,r=this._handle;t&&n&&(this._lastGraphicKey=null,n&&t.remove(n),r&&t.remove(r),this._group=null,this._handle=null,this._payloadInfo=null),ie(this,`_doDispatchAxisPointer`)},e.prototype.doClear=function(){},e.prototype.buildLabel=function(e,t,n){return n||=0,{x:e[n],y:e[1-n],width:t[n],height:t[1-n]}},e}();function Hx(e,t,n,r){Ux(Rx(n).lastProp,r)||(Rx(n).lastProp=r,t?yn(n,r,e):(n.stopAnimation(),n.attr(r)))}function Ux(e,t){if(A(e)&&A(t)){var n=!0;return J(t,function(t,r){n&&=Ux(e[r],t)}),!!n}else return e===t}function Wx(e,t){e[t.get([`label`,`show`])?`show`:`hide`]()}function Gx(e){return{x:e.x||0,y:e.y||0,rotation:e.rotation||0}}function Kx(e,t,n){var r=t.get(`z`),i=t.get(`zlevel`);e&&e.traverse(function(e){e.type!==`group`&&(r!=null&&(e.z=r),i!=null&&(e.zlevel=i),e.silent=n)})}function qx(e){var t=e.get(`type`),n=e.getModel(t+`Style`),r;return t===`line`?(r=n.getLineStyle(),r.fill=null):t===`shadow`&&(r=n.getAreaStyle(),r.stroke=null),r}function Jx(e,t,r,i,a){var o=Xx(r.get(`value`),t.axis,t.ecModel,r.get(`seriesDataIndices`),{precision:r.get([`label`,`precision`]),formatter:r.get([`label`,`formatter`])}),s=r.getModel(`label`),c=Yr(s.get(`padding`)||0),l=s.getFont(),u=n(o,l),d=a.position,f=u.width+c[1]+c[3],p=u.height+c[0]+c[2],m=a.align;m===`right`&&(d[0]-=f),m===`center`&&(d[0]-=f/2);var h=a.verticalAlign;h===`bottom`&&(d[1]-=p),h===`middle`&&(d[1]-=p/2),Yx(d,f,p,i);var g=s.get(`backgroundColor`);(!g||g===`auto`)&&(g=t.get([`axisLine`,`lineStyle`,`color`])),e.label={x:d[0],y:d[1],style:sa(s,{text:o,font:l,fill:s.getTextColor(),padding:c,backgroundColor:g}),z2:10}}function Yx(e,t,n,r){var i=r.getWidth(),a=r.getHeight();e[0]=Math.min(e[0]+t,i)-t,e[1]=Math.min(e[1]+n,a)-n,e[0]=Math.max(e[0],0),e[1]=Math.max(e[1],0)}function Xx(e,t,n,r,i){e=t.scale.parse(e);var a=t.scale.getLabel({value:e},{precision:i.precision}),o=i.formatter;if(o){var s={value:Us(t,{value:e}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};J(r,function(e){var t=n.getSeriesByIndex(e.seriesIndex),r=e.dataIndexInside,i=t&&t.getDataParams(r);i&&s.seriesData.push(i)}),R(o)?a=o.replace(`{value}`,a):V(o)&&(a=o(s))}return a}function Zx(e,t,n){var r=ye();return Le(r,r,n.rotation),Me(r,r,n.position),ee([e.dataToCoord(t),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],r)}function Qx(e,t,n,r,i,a){var o=ip.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=i.get([`label`,`margin`]),Jx(t,r,i,a,{position:Zx(r.axis,e,n),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function $x(e,t,n){return n||=0,{x1:e[n],y1:e[1-n],x2:t[n],y2:t[1-n]}}function eS(e,t,n){return n||=0,{x:e[n],y:e[1-n],width:t[n],height:t[1-n]}}function tS(e,t,n,r,i,a){return{cx:e,cy:t,r0:n,r,startAngle:i,endAngle:a,clockwise:!0}}function nS(e,t,n){return yl(e,{fromStat:{sers:u(t,function(e){return n.getSeriesByIndex(e.seriesIndex)})},min:1}).w}function rS(e,t,n){return[_t(oe(t[0],t[1]),e-n/2),oe(e+n/2,_t(t[0],t[1]))]}var iS=function(e){L(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.makeElOption=function(e,t,n,r,i){var a=n.axis,o=a.grid,s=r.get(`type`),c=a.getGlobalExtent(),l=aS(o,a).getOtherAxis(a).getGlobalExtent(),u=a.toGlobalCoord(a.dataToCoord(t,!0));if(s&&s!==`none`){var d=qx(r),f=oS[s](a,u,c,l,r.get(`seriesDataIndices`),r.ecModel);f.style=d,e.graphicKey=f.type,e.pointer=f}Qx(t,e,Tp(o.getRect(),n),n,r,i)},t.prototype.getHandleTransform=function(e,t,n){var r=Tp(t.axis.grid.getRect(),t,{labelInside:!1});r.labelMargin=n.get([`handle`,`margin`]);var i=Zx(t.axis,e,r);return{x:i[0],y:i[1],rotation:r.rotation+(r.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,t,n,r){var i=n.axis,a=i.grid,o=i.getGlobalExtent(!0),s=aS(a,i).getOtherAxis(i).getGlobalExtent(),c=i.dim===`x`?0:1,l=[e.x,e.y];l[c]+=t[c],l[c]=oe(o[1],l[c]),l[c]=_t(o[0],l[c]);var u=(s[1]+s[0])/2,d=[u,u];return d[c]=l[c],{x:l[0],y:l[1],rotation:e.rotation,cursorPoint:d,tooltipOption:[{verticalAlign:`middle`},{align:`center`}][c]}},t}(Vx);function aS(e,t){var n={};return n[t.dim+`AxisIndex`]=t.index,e.getCartesian(n)}var oS={line:function(e,t,n,r){return{type:`Line`,subPixelOptimize:!0,shape:$x([t,r[0]],[t,r[1]],sS(e))}},shadow:function(e,t,n,r,i,a){var o=nS(e,i,a),s=r[1]-r[0],c=rS(t,n,o),l=c[0],u=c[1];return{type:`Rect`,shape:eS([l,r[0]],[u-l,s],sS(e))}}};function sS(e){return e.dim===`x`?0:1}var cS=function(e){L(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}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}(ra),lS=$(),uS=J;function dS(e,t,n){if(!he.node){var r=t.getZr();lS(r).records||(lS(r).records={}),fS(r,t);var i=lS(r).records[e]||(lS(r).records[e]={});i.handler=n}}function fS(e,t){if(lS(e).initialized)return;lS(e).initialized=!0,n(`click`,Q(hS,`click`)),n(`mousemove`,Q(hS,`mousemove`)),n(`mousewheel`,Q(hS,`mousewheel`)),n(`globalout`,mS);function n(n,r){e.on(n,function(n){var i=gS(t);uS(lS(e).records,function(e){e&&r(e,n,i.dispatchAction)}),pS(i.pendings,t)})}}function pS(e,t){var n=e.showTip.length,r=e.hideTip.length,i;n?i=e.showTip[n-1]:r&&(i=e.hideTip[r-1]),i&&(i.dispatchAction=null,t.dispatchAction(i))}function mS(e,t,n){e.handler(`leave`,null,n)}function hS(e,t,n,r){t.handler(e,n,r)}function gS(e){var t={showTip:[],hideTip:[]},n=function(r){var i=t[r.type];i?i.push(r):(r.dispatchAction=n,e.dispatchAction(r))};return{dispatchAction:n,pendings:t}}function _S(e,t){if(!he.node){var n=t.getZr();(lS(n).records||{})[e]&&(lS(n).records[e]=null)}}var vS=function(e){L(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){var r=t.getComponent(`tooltip`),i=e.get(`triggerOn`)||r&&r.get(`triggerOn`)||`mousemove|click|mousewheel`;dS(`axisPointer`,n,function(e,t,n){i!==`none`&&(e===`leave`||i.indexOf(e)>=0)&&n({type:`updateAxisPointer`,currTrigger:e,x:t&&t.offsetX,y:t&&t.offsetY})})},t.prototype.remove=function(e,t){_S(`axisPointer`,t)},t.prototype.dispose=function(e,t){_S(`axisPointer`,t)},t.type=`axisPointer`,t}(p);function yS(e,t){var n=[],r=e.seriesIndex,i;if(r==null||!(i=t.getSeriesByIndex(r)))return{point:[]};var a=i.getData(),o=er(a,e);if(o==null||o<0||B(o))return{point:[]};var s=a.getItemGraphicEl(o),c=i.coordinateSystem;if(i.getTooltipPosition)n=i.getTooltipPosition(o)||[];else if(c&&c.dataToPoint)if(e.isStacked){var l=c.getBaseAxis(),d=c.getOtherAxis(l).dim,f=l.dim,p=+(d===`x`||d===`radius`),m=a.mapDimension(f),h=[];h[p]=a.get(m,o),h[1-p]=a.get(a.getCalculationInfo(`stackResultDimension`),o),n=c.dataToPoint(h)||[]}else n=c.dataToPoint(a.getValues(u(c.dimensions,function(e){return a.mapDimension(e)}),o))||[];else if(s){var g=s.getBoundingRect().clone();g.applyTransform(s.transform),n=[g.x+g.width/2,g.y+g.height/2]}return{point:n,el:s}}var bS=$();function xS(e,t,n){var r=e.currTrigger,i=[e.x,e.y],a=e,o=e.dispatchAction||X(n.dispatchAction,n),s=t.getComponent(`axisPointer`).coordSysAxesInfo;if(s){jS(i)&&(i=yS({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},t).point);var c=jS(i),l=a.axesInfo,u=s.axesInfo,d=r===`leave`||jS(i),f={},p={},m={list:[],map:{}},h={showPointer:Q(wS,p),showTooltip:Q(TS,m)};J(s.coordSysMap,function(e,t){var n=c||e.containPoint(i);J(s.coordSysAxesInfo[t],function(e,t){var r=e.axis,a=kS(l,e);if(!d&&n&&(!l||a)){var o=a&&a.value;o==null&&!c&&(o=r.pointToData(i)),o!=null&&SS(e,o,h,!1,f)}})});var g={};return J(u,function(e,t){var n=e.linkGroup;n&&!p[t]&&J(n.axesInfo,function(t,r){var i=p[r];if(t!==e&&i){var a=i.value;n.mapper&&(a=e.axis.scale.parse(n.mapper(a,AS(t),AS(e)))),g[e.key]=a}})}),J(g,function(e,t){SS(u[t],e,h,!0,f)}),ES(p,u,f),DS(m,i,e,o),OS(u,o,n),f}}function SS(e,t,n,r,i){var a=e.axis;if(!(a.scale.isBlank()||!a.containData(t))){if(!e.involveSeries){n.showPointer(e,t);return}var o=CS(t,e),s=o.payloadBatch,c=o.snapToValue;s[0]&&i.seriesIndex==null&&G(i,s[0]),!r&&e.snap&&a.containData(c)&&c!=null&&(t=c),n.showPointer(e,t,s),n.showTooltip(e,o,c)}}function CS(e,t){var n=t.axis,r=n.dim,i=e,a=[],o=Number.MAX_VALUE,s=-1;return J(t.seriesModels,function(t,c){var l=t.getData().mapDimensionsAll(r),u,d;if(t.getAxisTooltipData){var f=t.getAxisTooltipData(l,e,n);d=f.dataIndices,u=f.nestestValue}else{if(d=t.indicesOfNearest(r,l[0],e,n.type===`category`?.5:null),!d.length)return;u=t.getData().get(l[0],d[0])}if(O(u)){var p=e-u,m=Math.abs(p);m<=o&&((m<o||p>=0&&s<0)&&(o=m,s=p,i=u,a.length=0),J(d,function(e){a.push({seriesIndex:t.seriesIndex,dataIndexInside:e,dataIndex:t.getData().getRawIndex(e)})}))}}),{payloadBatch:a,snapToValue:i}}function wS(e,t,n,r){e[t.key]={value:n,payloadBatch:r}}function TS(e,t,n,r){var i=n.payloadBatch,a=t.axis,o=a.model,s=t.axisPointerModel;if(!(!t.triggerTooltip||!i.length)){var c=t.coordSys.model,l=Xh(c),u=e.map[l];u||(u=e.map[l]={coordSysId:c.id,coordSysIndex:c.componentIndex,coordSysType:c.type,coordSysMainType:c.mainType,dataByAxis:[]},e.list.push(u)),u.dataByAxis.push({axisDim:a.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:r,valueLabelOpt:{precision:s.get([`label`,`precision`]),formatter:s.get([`label`,`formatter`])},seriesDataIndices:i.slice()})}}function ES(e,t,n){var r=n.axesInfo=[];J(t,function(t,n){var i=t.axisPointerModel.option,a=e[n];a?(!t.useHandle&&(i.status=`show`),i.value=a.value,i.seriesDataIndices=(a.payloadBatch||[]).slice()):!t.useHandle&&(i.status=`hide`),i.status===`show`&&r.push({axisDim:t.axis.dim,axisIndex:t.axis.model.componentIndex,value:i.value})})}function DS(e,t,n,r){if(jS(t)||!e.list.length){r({type:`hideTip`});return}var i=((e.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};r({type:`showTip`,escapeConnect:!0,x:t[0],y:t[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:i.dataIndexInside,dataIndex:i.dataIndex,seriesIndex:i.seriesIndex,dataByCoordSys:e.list})}function OS(e,t,n){var r=n.getZr(),i=`axisPointerLastHighlights`,a=bS(r)[i]||{},o=bS(r)[i]={};J(e,function(e,t){var n=e.axisPointerModel.option;n.status===`show`&&e.triggerEmphasis&&J(n.seriesDataIndices,function(e){o[e.seriesIndex+`|`+e.dataIndex]=e})});var s=[],c=[];function l(e){return{seriesIndex:e.seriesIndex,dataIndex:e.dataIndex}}J(a,function(e,t){!o[t]&&c.push(l(e))}),J(o,function(e,t){!a[t]&&s.push(l(e))}),c.length&&n.dispatchAction({type:`downplay`,escapeConnect:!0,notBlur:!0,batch:c}),s.length&&n.dispatchAction({type:`highlight`,escapeConnect:!0,notBlur:!0,batch:s})}function kS(e,t){for(var n=0;n<(e||[]).length;n++){var r=e[n];if(t.axis.dim===r.axisDim&&t.axis.model.componentIndex===r.axisIndex)return r}}function AS(e){var t=e.axis.model,n={},r=n.axisDim=e.axis.dim;return n.axisIndex=n[r+`AxisIndex`]=t.componentIndex,n.axisName=n[r+`AxisName`]=t.name,n.axisId=n[r+`AxisId`]=t.id,n}function jS(e){return!e||e[0]==null||isNaN(e[0])||e[1]==null||isNaN(e[1])}function MS(e){Qh.registerAxisPointerClass(`CartesianAxisPointer`,iS),e.registerComponentModel(cS),e.registerComponentView(vS),e.registerPreprocessor(function(e){if(e){(!e.axisPointer||e.axisPointer.length===0)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!B(t)&&(e.axisPointer.link=[t])}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,{overallReset:function(e,t){e.getComponent(`axisPointer`).coordSysAxesInfo=Bh(e,t)}}),e.registerAction({type:`updateAxisPointer`,event:`updateAxisPointer`,update:`:updateAxisPointer`},xS)}function NS(e){Yc(lg),Yc(MS)}var PS=function(e){L(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.makeElOption=function(e,t,n,r,i){var a=n.axis;a.dim===`angle`&&(this.animationThreshold=Math.PI/18);var o=a.polar,s=a.getExtent(),c=o.getOtherAxis(a).getExtent(),l=a.dataToCoord(t),u=r.get(`type`);if(u&&u!==`none`){var d=qx(r),f=IS[u](a,o,l,s,c,r.get(`seriesDataIndices`),r.ecModel);f.style=d,e.graphicKey=f.type,e.pointer=f}Jx(e,n,r,i,FS(t,n,r,o,r.get([`label`,`margin`])))},t}(Vx);function FS(e,t,n,r,i){var a=t.axis,o=a.dataToCoord(e),s=r.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var c=r.getRadiusAxis().getExtent(),l,u,d;if(a.dim===`radius`){var f=ye();Le(f,f,s),Me(f,f,[r.cx,r.cy]),l=ee([o,-i],f);var p=t.getModel(`axisLabel`).get(`rotate`)||0,m=ip.innerTextLayout(s,p*Math.PI/180,-1);u=m.textAlign,d=m.textVerticalAlign}else{var h=c[1];l=r.coordToPoint([h+i,o]);var g=r.cx,_=r.cy;u=Math.abs(l[0]-g)/h<.3?`center`:l[0]>g?`left`:`right`,d=Math.abs(l[1]-_)/h<.3?`middle`:l[1]>_?`top`:`bottom`}return{position:l,align:u,verticalAlign:d}}var IS={line:function(e,t,n,r,i){return e.dim===`angle`?{type:`Line`,shape:$x(t.coordToPoint([i[0],n]),t.coordToPoint([i[1],n]))}:{type:`Circle`,shape:{cx:t.cx,cy:t.cy,r:n}}},shadow:function(e,t,n,r,i,a,o){var s=Math.PI/180,c=nS(e,a,o),l;if(e.dim===`angle`)l=tS(t.cx,t.cy,i[0],i[1],(-n-c/2)*s,(-n+c/2)*s);else{var u=rS(n,r,c),d=u[0],f=u[1];l=tS(t.cx,t.cy,d,f,0,Math.PI*2)}return{type:`Sector`,shape:l}}},LS=`polar`,RS=LS,zS=function(e){L(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.findAxisModel=function(e){var t;return this.ecModel.eachComponent(e,function(e){e.getCoordSysModel()===this&&(t=e)},this),t},t.type=LS,t.dependencies=[`radiusAxis`,`angleAxis`],t.defaultOption={z:0,center:[`50%`,`50%`],radius:`80%`},t}(ra),BS=function(e){L(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents(`polar`,Jt).models[0]},t.type=`polarAxis`,t}(ra);ot(BS,ec);var VS=function(e){L(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`angleAxis`,t}(BS),HS=function(e){L(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`radiusAxis`,t}(BS),US=function(e){L(t,e);function t(t,n){return e.call(this,`radius`,t,n)||this}return t.prototype.pointToData=function(e,t){return this.polar.pointToData(e,t)[this.dim===`radius`?0:1]},t}(Cl);US.prototype.dataToRadius=Cl.prototype.dataToCoord,US.prototype.radiusToData=Cl.prototype.coordToData;var WS=$(),GS=function(e){L(t,e);function t(t,n){return e.call(this,`angle`,t,n||[0,360])||this}return t.prototype.pointToData=function(e,t){return this.polar.pointToData(e,t)[this.dim===`radius`?0:1]},t.prototype.calculateCategoryInterval=function(){var e=this,t=e.getLabelModel(),r=e.scale,i=r.getExtent(),a=r.count();if(i[1]-i[0]<1)return 0;var o=i[0],s=e.dataToCoord(o+1)-e.dataToCoord(o),c=Math.abs(s),l=n(o==null?``:o+``,t.getFont(),`center`,`top`),u=Math.max(l.height,7)/c;isNaN(u)&&(u=1/0);var d=Math.max(0,Math.floor(u)),f=WS(e.model),p=f.lastAutoInterval,m=f.lastTickCount;return p!=null&&m!=null&&Math.abs(p-d)<=1&&Math.abs(m-a)<=1&&p>d?d=p:(f.lastTickCount=a,f.lastAutoInterval=d),d},t}(Cl);GS.prototype.dataToAngle=Cl.prototype.dataToCoord,GS.prototype.angleToData=Cl.prototype.coordToData;var KS=[`radius`,`angle`],qS=function(){function e(e){this.dimensions=KS,this.type=LS,this.cx=0,this.cy=0,this._radiusAxis=new US,this._angleAxis=new GS,this.axisPointerEnabled=!0,this.name=e||``,this._radiusAxis.polar=this._angleAxis.polar=this}return e.prototype.containPoint=function(e){var t=this.pointToCoord(e);return this._radiusAxis.contain(t[0])&&this._angleAxis.contain(t[1])},e.prototype.containData=function(e){return this._radiusAxis.containData(e[0])&&this._angleAxis.containData(e[1])},e.prototype.getAxis=function(e){var t=`_`+e+`Axis`;return this[t]},e.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},e.prototype.getAxesByScale=function(e){var t=[],n=this._angleAxis,r=this._radiusAxis;return n.scale.type===e&&t.push(n),r.scale.type===e&&t.push(r),t},e.prototype.getAngleAxis=function(){return this._angleAxis},e.prototype.getRadiusAxis=function(){return this._radiusAxis},e.prototype.getOtherAxis=function(e){var t=this._angleAxis;return e===t?this._radiusAxis:t},e.prototype.getBaseAxis=function(){return this.getAxesByScale(`ordinal`)[0]||this.getAxesByScale(`time`)[0]||this.getAngleAxis()},e.prototype.getTooltipAxes=function(e){var t=e!=null&&e!==`auto`?this.getAxis(e):this.getBaseAxis();return{baseAxes:[t],otherAxes:[this.getOtherAxis(t)]}},e.prototype.dataToPoint=function(e,t,n){return this.coordToPoint([this._radiusAxis.dataToRadius(e[0],t),this._angleAxis.dataToAngle(e[1],t)],n)},e.prototype.pointToData=function(e,t,n){n||=[];var r=this.pointToCoord(e);return n[0]=this._radiusAxis.radiusToData(r[0],t),n[1]=this._angleAxis.angleToData(r[1],t),n},e.prototype.pointToCoord=function(e){var t=e[0]-this.cx,n=e[1]-this.cy,r=this.getAngleAxis(),i=r.getExtent(),a=Math.min(i[0],i[1]),o=Math.max(i[0],i[1]);r.inverse?a=o-360:o=a+360;var s=Math.sqrt(t*t+n*n);t/=s,n/=s;for(var c=Math.atan2(-n,t)/Math.PI*180,l=c<a?1:-1;c<a||c>o;)c+=l*360;return[s,c]},e.prototype.coordToPoint=function(e,t){t||=[];var n=e[0],r=e[1]/180*Math.PI;return t[0]=Math.cos(r)*n+this.cx,t[1]=-Math.sin(r)*n+this.cy,t},e.prototype.getArea=function(){var e=this.getAngleAxis(),t=this.getRadiusAxis().getExtent().slice();t[0]>t[1]&&t.reverse();var n=e.getExtent(),r=Math.PI/180,i=1e-4;return{cx:this.cx,cy:this.cy,r0:t[0],r:t[1],startAngle:-n[0]*r,endAngle:-n[1]*r,clockwise:e.inverse,contain:function(e,t){var n=e-this.cx,r=t-this.cy,a=n*n+r*r,o=this.r,s=this.r0;return o!==s&&a-i<=o*o&&a+i>=s*s},x:this.cx-t[1],y:this.cy-t[1],width:t[1]*2,height:t[1]*2}},e.prototype.convertToPixel=function(e,t,n){return JS(t)===this?this.dataToPoint(n):null},e.prototype.convertFromPixel=function(e,t,n){return JS(t)===this?this.pointToData(n):null},e}();function JS(e){var t=e.seriesModel,n=e.polarModel;return n&&n.coordinateSystem||t&&t.coordinateSystem}function YS(e,t,n){var r=t.get(`center`),i=gr(t,n).refContainer;e.cx=U(r[0],i.width)+i.x,e.cy=U(r[1],i.height)+i.y;var a=e.getRadiusAxis(),o=Math.min(i.width,i.height)/2,s=t.get(`radius`);s==null?s=[0,`100%`]:B(s)||(s=[0,s]);var c=[U(s[0],o),U(s[1],o)];a.inverse?a.setExtent(c[1],c[0]):a.setExtent(c[0],c[1])}function XS(e,t){var n=this,r=n.getAngleAxis(),i=n.getRadiusAxis();if(jc(r,1),jc(i,1),Uc(r),Uc(i),r.type===`category`&&!r.onBand){var a=r.getExtent(),o=360/r.scale.count();r.inverse?a[1]+=o:a[1]-=o,r.setExtent(a[0],a[1])}}function ZS(e){return e.mainType===`angleAxis`}function QS(e,t){if(e.type=Ls(t),e.scale=Rs(t,e.type,!1),e.onBand=$s(e.scale,t),e.inverse=t.get(`inverse`),ZS(t)){e.inverse=e.inverse!==t.get(`clockwise`);var n=t.get(`startAngle`),r=t.get(`endAngle`)??n+(e.inverse?-360:360);e.setExtent(n,r)}t.axis=e,e.model=t}var $S={dimensions:KS,create:function(e,t){var n=[];return e.eachComponent(RS,function(e,r){var i=new qS(r+``);i.update=XS;var a=i.getRadiusAxis(),o=i.getAngleAxis(),s=e.findAxisModel(`radiusAxis`),c=e.findAxisModel(`angleAxis`);QS(a,s),QS(o,c),YS(i,e,t),n.push(i),e.coordinateSystem=i,i.model=e}),e.eachSeries(function(e){if(e.get(`coordinateSystem`)===`polar`){var t=e.coordinateSystem=e.getReferringComponents(RS,Jt).models[0].coordinateSystem;t&&(vc(t.getRadiusAxis(),e,LS),vc(t.getAngleAxis(),e,LS))}}),n}},eC=[`axisLine`,`axisLabel`,`axisTick`,`minorTick`,`splitLine`,`minorSplitLine`,`splitArea`];function tC(e,t,n){t[1]>t[0]&&(t=t.slice().reverse());var r=e.coordToPoint([t[0],n]),i=e.coordToPoint([t[1],n]);return{x1:r[0],y1:r[1],x2:i[0],y2:i[1]}}function nC(e){return+!e.getRadiusAxis().inverse}function rC(e){var t=e[0],n=e[e.length-1];t&&n&&Math.abs(Math.abs(t.coord-n.coord)-360)<1e-4&&e.pop()}var iC=function(e){L(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.axisPointerClass=`PolarAxisPointer`,n}return t.prototype.render=function(e,t){if(this.group.removeAll(),e.get(`show`)){var n=e.axis,r=n.polar,i=r.getRadiusAxis().getExtent(),a=n.getTicksCoords({breakTicks:`none`}),o=n.getMinorTicksCoords(),s=[];J(n.getViewLabels(),function(e){if(!e.tick.offInterval){e=ta(e);var t=n.scale;e.coord=n.dataToCoord(Qs(t,e.tick)),s.push(e)}}),rC(s),rC(a),J(eC,function(t){e.get([t,`show`])&&(!n.scale.isBlank()||t===`axisLine`)&&aC[t](this.group,e,r,a,o,i,s)},this)}},t.type=`angleAxis`,t}(Qh),aC={axisLine:function(e,t,n,r,i,a){var o=t.getModel([`axisLine`,`lineStyle`]),s=n.getAngleAxis(),c=Math.PI/180,l=s.getExtent(),u=nC(n),d=+!u,f,p=Math.abs(l[1]-l[0])===360?`Circle`:`Arc`;f=a[d]===0?new at[p]({shape:{cx:n.cx,cy:n.cy,r:a[u],startAngle:-l[0]*c,endAngle:-l[1]*c,clockwise:s.inverse},style:o.getLineStyle(),z2:1,silent:!0}):new Li({shape:{cx:n.cx,cy:n.cy,r:a[u],r0:a[d]},style:o.getLineStyle(),z2:1,silent:!0}),f.style.fill=null,e.add(f)},axisTick:function(e,t,n,r,i,a){var o=t.getModel(`axisTick`),s=(o.get(`inside`)?-1:1)*o.get(`length`),c=a[nC(n)],l=u(r,function(e){return new lr({shape:tC(n,[c,c+s],e.coord)})});e.add(Ge(l,{style:ai(o.getModel(`lineStyle`).getLineStyle(),{stroke:t.get([`axisLine`,`lineStyle`,`color`])})}))},minorTick:function(e,t,n,r,i,a){if(i.length){for(var o=t.getModel(`axisTick`),s=t.getModel(`minorTick`),c=(o.get(`inside`)?-1:1)*s.get(`length`),l=a[nC(n)],u=[],d=0;d<i.length;d++)for(var f=0;f<i[d].length;f++)u.push(new lr({shape:tC(n,[l,l+c],i[d][f].coord)}));e.add(Ge(u,{style:ai(s.getModel(`lineStyle`).getLineStyle(),ai(o.getLineStyle(),{stroke:t.get([`axisLine`,`lineStyle`,`color`])}))}))}},axisLabel:function(e,t,n,r,i,a,o){var s=t.getCategories(!0),c=t.getModel(`axisLabel`),l=c.get(`margin`),u=t.get(`triggerEvent`);J(o,function(r,i){var o=c,d=r.tick.value,f=a[nC(n)],p=n.coordToPoint([f+l,r.coord]),m=n.cx,h=n.cy,g=Math.abs(p[0]-m)/f<.3?`center`:p[0]>m?`left`:`right`,_=Math.abs(p[1]-h)/f<.3?`middle`:p[1]>h?`top`:`bottom`;if(s&&s[d]){var v=s[d];A(v)&&v.textStyle&&(o=new ii(v.textStyle,c,c.ecModel))}var y=new j({silent:ip.isLabelSilent(t),style:sa(o,{x:p[0],y:p[1],fill:o.getTextColor()||t.get([`axisLine`,`lineStyle`,`color`]),text:r.formattedLabel,align:g,verticalAlign:_})});if(e.add(y),Fa({el:y,componentModel:t,itemName:r.formattedLabel,formatterParamsExtra:{isTruncated:function(){return y.isTruncated},value:r.rawLabel,tickIndex:i}}),u){var b=ip.makeAxisEventDataBase(t);b.targetType=`axisLabel`,b.value=r.rawLabel,H(y).eventData=b}},this)},splitLine:function(e,t,n,r,i,a){var o=t.getModel(`splitLine`).getModel(`lineStyle`),s=o.get(`color`),c=0;s=s instanceof Array?s:[s];for(var l=[],u=0;u<r.length;u++){var d=c++%s.length;l[d]=l[d]||[],l[d].push(new lr({shape:tC(n,a,r[u].coord)}))}for(var u=0;u<l.length;u++)e.add(Ge(l[u],{style:ai({stroke:s[u%s.length]},o.getLineStyle()),silent:!0,z:t.get(`z`)}))},minorSplitLine:function(e,t,n,r,i,a){if(i.length){for(var o=t.getModel(`minorSplitLine`).getModel(`lineStyle`),s=[],c=0;c<i.length;c++)for(var l=0;l<i[c].length;l++)s.push(new lr({shape:tC(n,a,i[c][l].coord)}));e.add(Ge(s,{style:o.getLineStyle(),silent:!0,z:t.get(`z`)}))}},splitArea:function(e,t,n,r,i,a){if(r.length){var o=t.getModel(`splitArea`).getModel(`areaStyle`),s=o.get(`color`),c=0;s=s instanceof Array?s:[s];for(var l=[],u=Math.PI/180,d=-r[0].coord*u,f=Math.min(a[0],a[1]),p=Math.max(a[0],a[1]),m=t.get(`clockwise`),h=1,g=r.length;h<=g;h++){var _=h===g?r[0].coord:r[h].coord,v=c++%s.length;l[v]=l[v]||[],l[v].push(new Fr({shape:{cx:n.cx,cy:n.cy,r0:f,r:p,startAngle:d,endAngle:-_*u,clockwise:m},silent:!0})),d=-_*u}for(var h=0;h<l.length;h++)e.add(Ge(l[h],{style:ai({fill:s[h%s.length]},o.getAreaStyle()),silent:!0}))}}},oC=[`splitLine`,`splitArea`,`minorSplitLine`],sC=function(e){L(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.axisPointerClass=`PolarAxisPointer`,n}return t.prototype.render=function(e,t,n){if(this.group.removeAll(),e.get(`show`)){var r=this._axisGroup,i=this._axisGroup=new W;this.group.add(i);var a=e.axis,o=a.polar,s=o.getAngleAxis(),c=a.getTicksCoords(),l=a.getMinorTicksCoords(),u=s.getExtent()[0],d=a.getExtent(),f=new ip(e,n,lC(o,e,u));f.build(),i.add(f.group),vt(r,i,e),J(oC,function(t){e.get([t,`show`])&&!a.scale.isBlank()&&cC[t](this.group,e,o,u,d,c,l)},this)}},t.type=`radiusAxis`,t}(Qh),cC={splitLine:function(e,t,n,r,i,a){var o=t.getModel(`splitLine`).getModel(`lineStyle`),s=o.get(`color`),c=0,l=n.getAngleAxis(),u=Math.PI/180,d=l.getExtent(),f=Math.abs(d[1]-d[0])===360?`Circle`:`Arc`;s=s instanceof Array?s:[s];for(var p=[],m=0;m<a.length;m++){var h=c++%s.length;p[h]=p[h]||[],p[h].push(new at[f]({shape:{cx:n.cx,cy:n.cy,r:Math.max(a[m].coord,0),startAngle:-d[0]*u,endAngle:-d[1]*u,clockwise:l.inverse}}))}for(var m=0;m<p.length;m++)e.add(Ge(p[m],{style:ai({stroke:s[m%s.length],fill:null},o.getLineStyle()),silent:!0}))},minorSplitLine:function(e,t,n,r,i,a,o){if(o.length){for(var s=t.getModel(`minorSplitLine`).getModel(`lineStyle`),c=[],l=0;l<o.length;l++)for(var u=0;u<o[l].length;u++)c.push(new Rn({shape:{cx:n.cx,cy:n.cy,r:o[l][u].coord}}));e.add(Ge(c,{style:ai({fill:null},s.getLineStyle()),silent:!0}))}},splitArea:function(e,t,n,r,i,a){if(a.length){var o=t.getModel(`splitArea`).getModel(`areaStyle`),s=o.get(`color`),c=0;s=s instanceof Array?s:[s];for(var l=[],u=a[0].coord,d=1;d<a.length;d++){var f=c++%s.length;l[f]=l[f]||[],l[f].push(new Fr({shape:{cx:n.cx,cy:n.cy,r0:u,r:a[d].coord,startAngle:0,endAngle:Math.PI*2},silent:!0})),u=a[d].coord}for(var d=0;d<l.length;d++)e.add(Ge(l[d],{style:ai({fill:s[d%s.length]},o.getAreaStyle()),silent:!0}))}}};function lC(e,t,n){return{position:[e.cx,e.cy],rotation:n/180*Math.PI,labelDirection:-1,tickDirection:-1,nameDirection:1,labelRotate:t.getModel(`axisLabel`).get(`rotate`),z2:1}}var uC=gi();function dC(e){return e.get(`stack`)||`__ec_stack_`+e.seriesIndex}var fC=Be(`bar`,pC);function pC(e){var t=Fp(`bar`,LS);pc(e,t,function(e){var n=hC(e,`bar`),r={};uc(e,t,function(t){mC(e,t,n,r)})})}function mC(e,t,n,r){var i=t.getData(),a=dC(t),o=n[a],s=o.offset,l=o.width,u=t.coordinateSystem,d=u.getOtherAxis(e),f=u.cx,p=u.cy,m=t.get(`barMinHeight`)||0,h=t.get(`barMinAngle`)||0;r[a]=r[a]||[];for(var g=i.mapDimension(d.dim),_=i.mapDimension(e.dim),v=jo(i,g),y=e.dim!==`radius`||!t.get(`roundCap`,!0),b=d.dataToCoord(Rp(d)),x=0,S=i.count();x<S;x++){var C=i.get(g,x),w=i.get(_,x),T=C>=0?`p`:`n`,E=b;v&&(r[a][w]||(r[a][w]={p:b,n:b}),E=r[a][w][T]);var D=void 0,O=void 0,k=void 0,A=void 0;if(d.dim===`radius`){var j=d.dataToCoord(C)-b,M=e.dataToCoord(w);c(j)<m&&(j=(j<0?-1:1)*m),D=E,O=E+j,k=M-s,A=k-l,v&&(r[a][w][T]=O)}else{var N=d.dataToCoord(C,y)-b,P=e.dataToCoord(w);c(N)<h&&(N=(N<0?-1:1)*h),D=P+s,O=D+l,k=E,A=E+N,v&&(r[a][w][T]=A)}i.setItemLayout(x,{cx:f,cy:p,r0:D,r:O,startAngle:-k*Ee/180,endAngle:-A*Ee/180,clockwise:k>=A})}}function hC(e,t){var n=Fp(t,LS),r=yl(e,{fromStat:{key:n},min:1}).w,i=r,a=0,o=`20%`,s=`30%`,c={};uc(e,n,function(e){var t=dC(e);c[t]||a++,c[t]=c[t]||{width:0,maxWidth:0};var n=U(e.get(`barWidth`),r),l=U(e.get(`barMaxWidth`),r),u=e.get(`barGap`),d=e.get(`barCategoryGap`);n&&!c[t].width&&(n=oe(i,n),c[t].width=n,i-=n),l&&(c[t].maxWidth=l),u!=null&&(s=u),d!=null&&(o=d)});var l={},u=U(o,r),d=U(s,1),f=(i-u)/(a+(a-1)*d);f=_t(f,0),J(c,function(e,t){var n=e.maxWidth;n&&n<f&&(n=oe(n,i),e.width&&(n=oe(n,e.width)),i-=n,e.width=n,a--)}),f=(i-u)/(a+(a-1)*d),f=_t(f,0);var p=0,m;J(c,function(e,t){e.width||=f,m=e,p+=e.width*(1+d)}),m&&(p-=m.width*d);var h=-p/2;return J(c,function(e,t){l[t]=l[t]||{offset:h,width:e.width},h+=e.width*(1+d)}),l}function gC(e,t){uC(e,function(){var n=Fp(t,LS);Lp(e,n,t,LS),Fc(n,Np(n))})}var _C={startAngle:90,clockwise:!0,splitNumber:12,containShape:!1,axisLabel:{rotate:0}},vC={splitNumber:5},yC=function(e){L(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`polar`,t}(p);function bC(e){Yc(MS),Qh.registerAxisPointerClass(`PolarAxisPointer`,PS),e.registerCoordinateSystem(`polar`,$S),e.registerComponentModel(zS),e.registerComponentView(yC),_h(e,`angle`,VS,_C),_h(e,`radius`,HS,vC),e.registerComponentView(iC),e.registerComponentView(sC),e.registerLayout(fC),gC(e,`bar`)}var xC=function(e){L(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.init=function(t,n,r){var i=kr(t);e.prototype.init.apply(this,arguments),SC(t,i)},t.prototype.mergeOption=function(t){e.prototype.mergeOption.apply(this,arguments),SC(this.option,t)},t.prototype.getCellSize=function(){return this.option.cellSize},t.type=`calendar`,t.layoutMode=`box`,t.defaultOption={z:2,left:80,top:60,cellSize:20,orient:`horizontal`,splitLine:{show:!0,lineStyle:{color:Z.color.axisLine,width:1,type:`solid`}},itemStyle:{color:Z.color.neutral00,borderWidth:1,borderColor:Z.color.neutral10},dayLabel:{show:!0,firstDay:0,position:`start`,margin:Z.size.s,color:Z.color.secondary},monthLabel:{show:!0,position:`start`,margin:Z.size.s,align:`center`,formatter:null,color:Z.color.secondary},yearLabel:{show:!0,position:null,margin:Z.size.xl,formatter:null,color:Z.color.quaternary,fontFamily:`sans-serif`,fontWeight:`bolder`,fontSize:20}},t}(ra);function SC(e,t){var n=e.cellSize,r=B(n)?n:e.cellSize=[n,n];r.length===1&&(r[1]=r[0]),Mn(e,t,{type:`box`,ignoreSize:u([0,1],function(e){return ja(t,e)&&(r[e]=`auto`),r[e]!=null&&r[e]!==`auto`})})}var CC=function(e){L(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){var r=this.group;r.removeAll();var i=e.coordinateSystem,a=i.getRangeInfo(),o=i.getOrient(),s=t.getLocaleModel();this._renderDayRect(e,a,r),this._renderLines(e,a,o,r),this._renderYearText(e,a,o,r),this._renderMonthText(e,s,o,r),this._renderWeekText(e,s,a,o,r)},t.prototype._renderDayRect=function(e,t,n){for(var r=e.coordinateSystem,i=e.getModel(`itemStyle`).getItemStyle(),a=r.getCellWidth(),o=r.getCellHeight(),s=t.start.time;s<=t.end.time;s=r.getNextNDay(s,1).time){var c=r.dataToCalendarLayout([s],!1).tl,l=new d({shape:{x:c[0],y:c[1],width:a,height:o},cursor:`default`,style:i});n.add(l)}},t.prototype._renderLines=function(e,t,n,r){var i=this,a=e.coordinateSystem,o=e.getModel([`splitLine`,`lineStyle`]).getLineStyle(),s=e.get([`splitLine`,`show`]),c=o.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var l=t.start,u=0;l.time<=t.end.time;u++){f(l.formatedDate),u===0&&(l=a.getDateInfo(t.start.y+`-`+t.start.m));var d=l.date;d.setMonth(d.getMonth()+1),l=a.getDateInfo(d)}f(a.getNextNDay(t.end.time,1).formatedDate);function f(t){i._firstDayOfMonth.push(a.getDateInfo(t)),i._firstDayPoints.push(a.dataToCalendarLayout([t],!1).tl);var c=i._getLinePointsOfOneWeek(e,t,n);i._tlpoints.push(c[0]),i._blpoints.push(c[c.length-1]),s&&i._drawSplitline(c,o,r)}s&&this._drawSplitline(i._getEdgesPoints(i._tlpoints,c,n),o,r),s&&this._drawSplitline(i._getEdgesPoints(i._blpoints,c,n),o,r)},t.prototype._getEdgesPoints=function(e,t,n){var r=[e[0].slice(),e[e.length-1].slice()],i=n===`horizontal`?0:1;return r[0][i]=r[0][i]-t/2,r[1][i]=r[1][i]+t/2,r},t.prototype._drawSplitline=function(e,t,n){var r=new Yi({z2:20,shape:{points:e},style:t});n.add(r)},t.prototype._getLinePointsOfOneWeek=function(e,t,n){for(var r=e.coordinateSystem,i=r.getDateInfo(t),a=[],o=0;o<7;o++){var s=r.getNextNDay(i.time,o),c=r.dataToCalendarLayout([s.time],!1);a[2*s.day]=c.tl,a[2*s.day+1]=c[n===`horizontal`?`bl`:`tr`]}return a},t.prototype._formatterLabel=function(e,t){return R(e)&&e?mt(e,t):V(e)?e(t):t.nameMap},t.prototype._yearTextPositionControl=function(e,t,n,r,i){var a=t[0],o=t[1],s=[`center`,`bottom`];r===`bottom`?(o+=i,s=[`center`,`top`]):r===`left`?a-=i:r===`right`?(a+=i,s=[`center`,`top`]):o-=i;var c=0;return(r===`left`||r===`right`)&&(c=Math.PI/2),{rotation:c,x:a,y:o,style:{align:s[0],verticalAlign:s[1]}}},t.prototype._renderYearText=function(e,t,n,r){var i=e.getModel(`yearLabel`);if(i.get(`show`)){var a=i.get(`margin`),o=i.get(`position`);o||=n===`horizontal`?`left`:`top`;var s=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],c=(s[0][0]+s[1][0])/2,l=(s[0][1]+s[1][1])/2,u=n===`horizontal`?0:1,d={top:[c,s[u][1]],bottom:[c,s[1-u][1]],left:[s[1-u][0],l],right:[s[u][0],l]},f=t.start.y;+t.end.y>+t.start.y&&(f=f+`-`+t.end.y);var p=i.get(`formatter`),m={start:t.start.y,end:t.end.y,nameMap:f},h=new j({z2:30,style:sa(i,{text:this._formatterLabel(p,m)}),silent:i.get(`silent`)});h.attr(this._yearTextPositionControl(h,d[o],n,o,a)),r.add(h)}},t.prototype._monthTextPositionControl=function(e,t,n,r,i){var a=`left`,o=`top`,s=e[0],c=e[1];return n===`horizontal`?(c+=i,t&&(a=`center`),r===`start`&&(o=`bottom`)):(s+=i,t&&(o=`middle`),r===`start`&&(a=`right`)),{x:s,y:c,align:a,verticalAlign:o}},t.prototype._renderMonthText=function(e,t,n,r){var i=e.getModel(`monthLabel`);if(i.get(`show`)){var a=i.get(`nameMap`),o=i.get(`margin`),s=i.get(`position`),c=i.get(`align`),l=[this._tlpoints,this._blpoints];(!a||R(a))&&(a&&(t=mr(a)||t),a=t.get([`time`,`monthAbbr`])||[]);var u=s===`start`?0:1,d=n===`horizontal`?0:1;o=s===`start`?-o:o;for(var f=c===`center`,p=i.get(`silent`),m=0;m<l[u].length-1;m++){var h=l[u][m].slice(),g=this._firstDayOfMonth[m];f&&(h[d]=(this._firstDayPoints[m][d]+l[0][m+1][d])/2);var _=i.get(`formatter`),v=a[g.m-1],y={yyyy:g.y,yy:(g.y+``).slice(2),MM:g.m,M:+g.m,nameMap:v},b=new j({z2:30,style:G(sa(i,{text:this._formatterLabel(_,y)}),this._monthTextPositionControl(h,f,n,s,o)),silent:p});r.add(b)}}},t.prototype._weekTextPositionControl=function(e,t,n,r,i){var a=`center`,o=`middle`,s=e[0],c=e[1],l=n===`start`;return t===`horizontal`?(s=s+r+(l?1:-1)*i[0]/2,a=l?`right`:`left`):(c=c+r+(l?1:-1)*i[1]/2,o=l?`bottom`:`top`),{x:s,y:c,align:a,verticalAlign:o}},t.prototype._renderWeekText=function(e,t,n,r,i){var a=e.getModel(`dayLabel`);if(a.get(`show`)){var o=e.coordinateSystem,s=a.get(`position`),c=a.get(`nameMap`),l=a.get(`margin`),d=o.getFirstDayOfWeek();(!c||R(c))&&(c&&(t=mr(c)||t),c=t.get([`time`,`dayOfWeekShort`])||u(t.get([`time`,`dayOfWeekAbbr`]),function(e){return e[0]}));var f=o.getNextNDay(n.end.time,7-n.lweek).time,p=[o.getCellWidth(),o.getCellHeight()];l=U(l,Math.min(p[1],p[0])),s===`start`&&(f=o.getNextNDay(n.start.time,-(7+n.fweek)).time,l=-l);for(var m=a.get(`silent`),h=0;h<7;h++){var g=o.getNextNDay(f,h),_=o.dataToCalendarLayout([g.time],!1).center,v=h;v=Math.abs((h+d)%7);var y=new j({z2:30,style:G(sa(a,{text:c[v]}),this._weekTextPositionControl(_,r,s,l,p)),silent:m});i.add(y)}}},t.type=`calendar`,t}(p),wC=864e5,TC=function(){function e(t,n,r){this.type=`calendar`,this.dimensions=e.dimensions,this.getDimensionsInfo=e.getDimensionsInfo,this._model=t,this._update(n,r)}return e.getDimensionsInfo=function(){return[{name:`time`,type:`time`},`value`]},e.prototype.getRangeInfo=function(){return this._rangeInfo},e.prototype.getModel=function(){return this._model},e.prototype.getRect=function(){return this._rect},e.prototype.getCellWidth=function(){return this._sw},e.prototype.getCellHeight=function(){return this._sh},e.prototype.getOrient=function(){return this._orient},e.prototype.getFirstDayOfWeek=function(){return this._firstDayOfWeek},e.prototype.getDateInfo=function(e){e=h(e);var t=e.getFullYear(),n=e.getMonth()+1,r=n<10?`0`+n:``+n,i=e.getDate(),a=i<10?`0`+i:``+i,o=e.getDay();return o=Math.abs((o+7-this.getFirstDayOfWeek())%7),{y:t+``,m:r,d:a,day:o,time:e.getTime(),formatedDate:t+`-`+r+`-`+a,date:e}},e.prototype.getNextNDay=function(e,t){return t||=0,t===0?this.getDateInfo(e):(e=new Date(this.getDateInfo(e).time),e.setDate(e.getDate()+t),this.getDateInfo(e))},e.prototype._update=function(e,t){this._firstDayOfWeek=+this._model.getModel(`dayLabel`).get(`firstDay`),this._orient=this._model.get(`orient`),this._lineWidth=this._model.getModel(`itemStyle`).getItemStyle().lineWidth||0,this._rangeInfo=this._getRangeInfo(this._initRangeOption());var n=this._rangeInfo.weeks||1,r=[`width`,`height`],i=this._model.getCellSize().slice(),a=this._model.getBoxLayoutParams(),o=this._orient===`horizontal`?[n,7]:[7,n];J([0,1],function(e){l(i,e)&&(a[r[e]]=i[e]*o[e])});var s={width:t.getWidth(),height:t.getHeight()},c=this._rect=Cr(a,s);J([0,1],function(e){l(i,e)||(i[e]=c[r[e]]/o[e])});function l(e,t){return e[t]!=null&&e[t]!==`auto`}this._sw=i[0],this._sh=i[1]},e.prototype.dataToPoint=function(e,t,n){n||=[],B(e)&&(e=e[0]),t??=!0;var r=this.getDateInfo(e),i=this._rangeInfo,a=r.formatedDate;if(t&&!(r.time>=i.start.time&&r.time<i.end.time+wC))return n[0]=n[1]=NaN,n;var o=r.day,s=this._getRangeInfo([i.start.time,a]).nthWeek;return this._orient===`vertical`?(n[0]=this._rect.x+o*this._sw+this._sw/2,n[1]=this._rect.y+s*this._sh+this._sh/2):(n[0]=this._rect.x+s*this._sw+this._sw/2,n[1]=this._rect.y+o*this._sh+this._sh/2),n},e.prototype.pointToData=function(e){var t=this.pointToDate(e);return t&&t.time},e.prototype.dataToLayout=function(e,t,n){n||={};var r=n.rect=n.rect||{},i=n.contentRect=n.contentRect||{},a=this.dataToPoint(e,t);return r.x=a[0]-this._sw/2,r.y=a[1]-this._sh/2,r.width=this._sw,r.height=this._sh,Te.copy(i,r),l(i,this._lineWidth/2,!0,!0),n},e.prototype.dataToCalendarLayout=function(e,t){var n=this.dataToPoint(e,t);return{center:n,tl:[n[0]-this._sw/2,n[1]-this._sh/2],tr:[n[0]+this._sw/2,n[1]-this._sh/2],br:[n[0]+this._sw/2,n[1]+this._sh/2],bl:[n[0]-this._sw/2,n[1]+this._sh/2]}},e.prototype.pointToDate=function(e){var t=Math.floor((e[0]-this._rect.x)/this._sw)+1,n=Math.floor((e[1]-this._rect.y)/this._sh)+1,r=this._rangeInfo.range;return this._orient===`vertical`?this._getDateByWeeksAndDay(n,t-1,r):this._getDateByWeeksAndDay(t,n-1,r)},e.prototype.convertToPixel=function(e,t,n){var r=EC(t);return r===this?r.dataToPoint(n):null},e.prototype.convertToLayout=function(e,t,n){var r=EC(t);return r===this?r.dataToLayout(n):null},e.prototype.convertFromPixel=function(e,t,n){var r=EC(t);return r===this?r.pointToData(n):null},e.prototype.containPoint=function(e){return console.warn(`Not implemented.`),!1},e.prototype._initRangeOption=function(){var e=this._model.get(`range`),t;if(B(e)&&e.length===1&&(e=e[0]),B(e))t=e;else{var n=e.toString();if(/^\d{4}$/.test(n)&&(t=[n+`-01-01`,n+`-12-31`]),/^\d{4}[\/|-]\d{1,2}$/.test(n)){var r=this.getDateInfo(n),i=r.date;i.setMonth(i.getMonth()+1);var a=this.getNextNDay(i,-1);t=[r.formatedDate,a.formatedDate]}/^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(n)&&(t=[n,n])}if(!t)return e;var o=this._getRangeInfo(t);return o.start.time>o.end.time&&t.reverse(),t},e.prototype._getRangeInfo=function(e){var t=[this.getDateInfo(e[0]),this.getDateInfo(e[1])],n;t[0].time>t[1].time&&(n=!0,t.reverse());var r=Math.floor(t[1].time/wC)-Math.floor(t[0].time/wC)+1,i=new Date(t[0].time),a=i.getDate(),o=t[1].date.getDate();i.setDate(a+r-1);var s=i.getDate();if(s!==o)for(var c=i.getTime()-t[1].time>0?1:-1;(s=i.getDate())!==o&&(i.getTime()-t[1].time)*c>0;)r-=c,i.setDate(s-c);var l=Math.floor((r+t[0].day+6)/7),u=n?-l+1:l-1;return n&&t.reverse(),{range:[t[0].formatedDate,t[1].formatedDate],start:t[0],end:t[1],allDay:r,weeks:l,nthWeek:u,fweek:t[0].day,lweek:t[1].day}},e.prototype._getDateByWeeksAndDay=function(e,t,n){var r=this._getRangeInfo(n);if(e>r.weeks||e===0&&t<r.fweek||e===r.weeks&&t>r.lweek)return null;var i=(e-1)*7-r.fweek+t,a=new Date(r.start.time);return a.setDate(+r.start.d+i),this.getDateInfo(a)},e.create=function(t,n){var r=[];return t.eachComponent(`calendar`,function(i){var a=new e(i,t,n);r.push(a),i.coordinateSystem=a}),t.eachComponent(function(e,t){Rt({targetModel:t,coordSysType:`calendar`,coordSysProvider:_a})}),r},e.dimensions=[`time`,`value`],e}();function EC(e){var t=e.calendarModel,n=e.seriesModel;return t?t.coordinateSystem:n?n.coordinateSystem:null}function DC(e){e.registerComponentModel(xC),e.registerComponentView(CC),e.registerCoordinateSystem(`calendar`,TC)}var OC=[`x`,`y`,`radius`,`angle`,`single`],kC=$(),AC=[`cartesian2d`,`polar`,`singleAxis`];function jC(e){return Sa(AC,e.get(`coordinateSystem`))>=0}function MC(e){return e+`Axis`}function NC(e,t){var n=q(),r=[],i=q();e.eachComponent({mainType:`dataZoom`,query:t},function(e){i.get(e.uid)||s(e)});var a;do a=!1,e.eachComponent(`dataZoom`,o);while(a);function o(e){!i.get(e.uid)&&c(e)&&(s(e),a=!0)}function s(e){i.set(e.uid,!0),r.push(e),l(e)}function c(e){var t=!1;return e.eachTargetAxis(function(e,r){var i=n.get(e);i&&i[r]&&(t=!0)}),t}function l(e){e.eachTargetAxis(function(e,t){(n.get(e)||n.set(e,[]))[t]=!0})}return r}function PC(e){var t=e.ecModel,n={infoList:[],infoMap:q()};return e.eachTargetAxis(function(e,r){var i=t.getComponent(MC(e),r);if(i){var a=i.getCoordSysModel();if(a){var o=a.uid,s=n.infoMap.get(o);s||(s={model:a,axisModels:[]},n.infoList.push(s),n.infoMap.set(o,s)),s.axisModels.push(i)}}}),n}function FC(e){var t=kC(N(e));return t.axisProxyMap||=q()}function IC(e){if(e)return FC(e.ecModel).get(e.uid)}function LC(e,t){FC(e.ecModel).set(e.uid,t)}function RC(e,t){var n=t.getAxisModel().axis.__alignTo;return n&&e.getAxisProxy(n.dim,n.model.componentIndex)?IC(n.model):null}var zC=function(){function e(){this.indexList=[],this.indexMap=[]}return e.prototype.add=function(e){this.indexMap[e]||(this.indexList.push(e),this.indexMap[e]=!0)},e}(),BC=function(e){L(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n._autoThrottle=!0,n._noTarget=!0,n._rangePropMode=[`percent`,`percent`],n}return t.prototype.init=function(e,t,n){var r=VC(e);this.settledOption=r,this.mergeDefaultAndTheme(e,n),this._doInit(r)},t.prototype.mergeOption=function(e){var t=VC(e);Vr(this.option,e,!0),Vr(this.settledOption,t,!0),this._doInit(t)},t.prototype._doInit=function(e){var t=this.option;this._setDefaultThrottle(e),this._updateRangeUse(e);var n=this.settledOption;J([[`start`,`startValue`],[`end`,`endValue`]],function(e,r){this._rangePropMode[r]===`value`&&(t[e[0]]=n[e[0]]=null)},this),this._resetTarget()},t.prototype._resetTarget=function(){var e=this.get(`orient`,!0),t=this._targetAxisInfoMap=q();this._fillSpecifiedTargetAxis(t)?this._orient=e||this._makeAutoOrientByTargetAxis():(this._orient=e||`horizontal`,this._fillAutoTargetAxisByOrient(t,this._orient)),this._noTarget=!0,t.each(function(e){e.indexList.length&&(this._noTarget=!1)},this)},t.prototype._fillSpecifiedTargetAxis=function(e){var t=!1;return J(OC,function(n){var r=this.getReferringComponents(MC(n),Se);if(r.specified){t=!0;var i=new zC;J(r.models,function(e){i.add(e.componentIndex)}),e.set(n,i)}},this),t},t.prototype._fillAutoTargetAxisByOrient=function(e,t){var n=this.ecModel,r=!0;if(r){var i=t===`vertical`?`y`:`x`,a=n.findComponents({mainType:i+`Axis`});o(a,i)}if(r){var a=n.findComponents({mainType:`singleAxis`,filter:function(e){return e.get(`orient`,!0)===t}});o(a,`single`)}function o(t,n){var i=t[0];if(i){var a=new zC;if(a.add(i.componentIndex),e.set(n,a),r=!1,n===`x`||n===`y`){var o=i.getReferringComponents(`grid`,Jt).models[0];o&&J(t,function(e){i.componentIndex!==e.componentIndex&&o===e.getReferringComponents(`grid`,Jt).models[0]&&a.add(e.componentIndex)})}}}r&&J(OC,function(t){if(r){var i=n.findComponents({mainType:MC(t),filter:function(e){return e.get(`type`,!0)===`category`}});if(i[0]){var a=new zC;a.add(i[0].componentIndex),e.set(t,a),r=!1}}},this)},t.prototype._makeAutoOrientByTargetAxis=function(){var e;return this.eachTargetAxis(function(t){!e&&(e=t)},this),e===`y`?`vertical`:`horizontal`},t.prototype._setDefaultThrottle=function(e){if(e.hasOwnProperty(`throttle`)&&(this._autoThrottle=!1),this._autoThrottle){var t=this.ecModel.option;this.option.throttle=t.animation&&t.animationDurationUpdate>0?100:20}},t.prototype._updateRangeUse=function(e){var t=this._rangePropMode,n=this.get(`rangeMode`);J([[`start`,`startValue`],[`end`,`endValue`]],function(r,i){var a=e[r[0]]!=null,o=e[r[1]]!=null;a&&!o?t[i]=`percent`:!a&&o?t[i]=`value`:n?t[i]=n[i]:a&&(t[i]=`percent`)})},t.prototype.noTarget=function(){return this._noTarget},t.prototype.getFirstTargetAxisModel=function(){var e;return this.eachTargetAxis(function(t,n){e??=this.ecModel.getComponent(MC(t),n)},this),e},t.prototype.eachTargetAxis=function(e,t){this._targetAxisInfoMap.each(function(n,r){J(n.indexList,function(n){e.call(t,r,n)})})},t.prototype.getAxisProxy=function(e,t){return IC(this.getAxisModel(e,t))},t.prototype.getAxisModel=function(e,t){var n=this._targetAxisInfoMap.get(e);if(n&&n.indexMap[t])return this.ecModel.getComponent(MC(e),t)},t.prototype.setRawRange=function(e){var t=this.option,n=this.settledOption;J([[`start`,`startValue`],[`end`,`endValue`]],function(r){(e[r[0]]!=null||e[r[1]]!=null)&&(t[r[0]]=n[r[0]]=e[r[0]],t[r[1]]=n[r[1]]=e[r[1]])},this),this._updateRangeUse(e)},t.prototype.setCalculatedRange=function(e){var t=this.option;J([`start`,`startValue`,`end`,`endValue`],function(n){t[n]=e[n]})},t.prototype.getPercentRange=function(){var e=this.findRepresentativeAxisProxy();if(e)return e.getWindow().percent},t.prototype.getValueRange=function(e,t){if(e==null&&t==null){var n=this.findRepresentativeAxisProxy();if(n)return n.getWindow().value}else return this.getAxisProxy(e,t).getWindow().value},t.prototype.findRepresentativeAxisProxy=function(e){if(e)return IC(e);for(var t,n=this._targetAxisInfoMap.keys(),r=0;r<n.length;r++)for(var i=n[r],a=this._targetAxisInfoMap.get(i),o=0;o<a.indexList.length;o++){var s=this.getAxisProxy(i,a.indexList[o]);if(s.hostedBy(this))return s;t||=s}return t},t.prototype.getRangePropMode=function(){return this._rangePropMode.slice()},t.prototype.getOrient=function(){return this._orient},t.type=`dataZoom`,t.dependencies=[`xAxis`,`yAxis`,`radiusAxis`,`angleAxis`,`singleAxis`,`series`,`toolbox`],t.defaultOption={z:4,filterMode:`filter`,start:0,end:100},t}(ra);function VC(e){var t={};return J([`start`,`end`,`startValue`,`endValue`,`throttle`],function(n){e.hasOwnProperty(n)&&(t[n]=e[n])}),t}var HC=function(e){L(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n,r){this.dataZoomModel=e,this.ecModel=t,this.api=n},t.type=`dataZoom`,t}(p),UC=function(){function e(e,t,n,r){this._dimName=e,this._axisIndex=t,this.ecModel=r,this._dataZoomModel=n}return e.prototype.hostedBy=function(e){return this._dataZoomModel===e},e.prototype.getWindow=function(){return ta(this._window)},e.prototype.getTargetSeriesModels=function(){var e=[];return this.ecModel.eachSeries(function(t){if(jC(t)){var n=MC(this._dimName),r=t.getReferringComponents(n,Jt).models[0];r&&this._axisIndex===r.componentIndex&&e.push(t)}},this),e},e.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+`Axis`,this._axisIndex)},e.prototype.getMinMaxSpan=function(){return ta(this._minMaxSpan)},e.prototype.calculateDataWindow=function(e){var t=this._extent,n=this.getAxisModel().axis,r=n.scale,i=this._dataZoomModel.getRangePropMode(),a=[0,100],o=[],s=[],l,u=[!1,!1];J([`start`,`end`],function(n,c){var d=e[n],f=e[n+`Value`];i[c]===`percent`?(d??=a[c],f=Y(d,a,t),u[c]=!0):(l=!0,f==null?f=t[c]:(f=r.parse(f),r.sanitize&&(f=r.sanitize(f,t))),d=Y(f,t,a)),s[c]=f==null||isNaN(f)?t[c]:f,o[c]=d==null||isNaN(d)?a[c]:d}),S(s),S(o);var d=this._minMaxSpan;l?f(s,o,t,a,!1):f(o,s,a,t,!0);function f(e,t,n,r,i){var a=i?`Span`:`ValueSpan`;by(0,e,n,`all`,d[`min`+a],d[`max`+a]);for(var o=0;o<2;o++)t[o]=Y(e[o],n,r,!0),i&&(t[o]=t[o],u[o]=!0);bn(t)}var p=rs(r)||ts(r),m=n.getExtent(),h=c(m[1]-m[0]),g=p?0:pa(s,h,.5);J([[0,zr],[1,Ze]],function(e){var n=e[0],r=e[1];!u[n]||!isFinite(g)||(s[n]=I(s[n],g),s[n]=oe(t[1],_t(t[0],s[n])),o[n]===a[n]&&(s[n]=t[n],p&&(s[n]=r(s[n]))))}),bn(s);var _=[Y(s[0],t,a,!0),Y(s[1],t,a,!0)];return bn(_),{value:s,percent:o,percentInverted:_,valuePrecision:g}},e.prototype.reset=function(e,t){if(this.hostedBy(e)){var n=this.getAxisModel().axis;jc(n,2);var r=n.scale.rawExtentInfo;this._extent=r.makeNoZoom(),this._updateMinMaxSpan();var i=e.settledOption;t&&(i=ai({start:t[0],end:t[1]},i));var a=this._window=this.calculateDataWindow(i),o=a.percent,s=a.value;o[0]!==0&&r.setZoomMM(0,s[0]),o[1]!==100&&r.setZoomMM(1,s[1])}},e.prototype.filterData=function(e,t){if(!this.hostedBy(e))return;var n=this._dimName,r=this.getTargetSeriesModels(),i=e.get(`filterMode`),a=this._window.value;if(i===`none`)return;J(r,function(e){var t=e.getData(),r=t.mapDimensionsAll(n);if(r.length){if(i===`weakFilter`){var s=t.getStore(),c=u(r,function(e){return t.getDimensionIndex(e)},t);t.filterSelf(function(e){for(var t,n,i,o=0;o<r.length;o++){var l=s.get(c[o],e),u=!isNaN(l),d=l<a[0],f=l>a[1];if(u&&!d&&!f)return!0;u&&(i=!0),d&&(t=!0),f&&(n=!0)}return i&&t&&n})}else J(r,function(n){if(i===`empty`)e.setData(t=t.map(n,function(e){return o(e)?e:NaN}));else{var r={};r[n]=a,t.selectRange(r)}});J(r,function(e){t.setApproximateExtent(a,e)})}});function o(e){return e>=a[0]&&e<=a[1]}},e.prototype._updateMinMaxSpan=function(){var e=this._minMaxSpan={},t=this._dataZoomModel,n=this._extent;J([`min`,`max`],function(r){var i=t.get(r+`Span`),a=t.get(r+`ValueSpan`);a!=null&&(a=this.getAxisModel().axis.scale.parse(a)),a==null?i!=null&&(a=Y(i,[0,100],n,!0)-n[0]):i=Y(n[0]+a,n,[0,100],!0),e[r+`Span`]=i,e[r+`ValueSpan`]=a},this)},e}(),WC={dirtyOnOverallProgress:!0,getTargetSeries:function(e){function t(t){e.eachComponent(`dataZoom`,function(n){n.eachTargetAxis(function(r,i){t(r,i,e.getComponent(MC(r),i),n)})})}var n=[];t(function(t,r,i,a){if(!IC(i)){var o=new UC(t,r,a,e);n.push(o),LC(i,o)}});var r=q();return J(n,function(e){J(e.getTargetSeriesModels(),function(e){r.set(e.uid,e)})}),r},overallReset:function(e,t){e.eachComponent(`dataZoom`,function(e){var n=[];e.eachTargetAxis(function(t,r){var i=e.getAxisProxy(t,r),a=RC(e,i);a?n.push([i,a]):i.reset(e,null)}),J(n,function(t){t[0].reset(e,t[1].getWindow().percentInverted)}),e.eachTargetAxis(function(n,r){e.getAxisProxy(n,r).filterData(e,t)})}),e.eachComponent(`dataZoom`,function(e){var t=e.findRepresentativeAxisProxy();if(t){var n=t.getWindow(),r=n.percent,i=n.value;e.setCalculatedRange({start:r[0],end:r[1],startValue:i[0],endValue:i[1]})}})}};function GC(e){e.registerAction(`dataZoom`,function(e,t){J(NC(t,e),function(t){t.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})})})}var KC=gi();function qC(e){KC(e,function(){e.registerProcessor(e.PRIORITY.PROCESSOR.FILTER,WC),GC(e),e.registerSubTypeDefaulter(`dataZoom`,function(){return`slider`})})}function JC(e,t){var n=Yr(t.get(`padding`)),r=t.getItemStyle([`color`,`opacity`]);return r.fill=t.get(`backgroundColor`),new d({shape:{x:e.x-n[3],y:e.y-n[0],width:e.width+n[1]+n[3],height:e.height+n[0]+n[2],r:t.get(`borderRadius`)},style:r,silent:!0,z2:-1})}var YC=function(e){L(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`tooltip`,t.dependencies=[`axisPointer`],t.defaultOption={z:60,show:!0,showContent:!0,trigger:`item`,triggerOn:`mousemove|click|mousewheel`,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}(ra);function XC(e){var t=e.get(`confine`);return t==null?e.get(`renderMode`)===`richText`:!!t}function ZC(e){if(he.domSupported){for(var t=document.documentElement.style,n=0,r=e.length;n<r;n++)if(e[n]in t)return e[n]}}var QC=ZC([`transform`,`webkitTransform`,`OTransform`,`MozTransform`,`msTransform`]),$C=ZC([`webkitTransition`,`transition`,`OTransition`,`MozTransition`,`msTransition`]);function ew(e,t){if(!e)return t;t=f(t,!0);var n=e.indexOf(t);return e=n===-1?t:`-`+e.slice(0,n)+`-`+t,e.toLowerCase()}function tw(e,t){var n=e.currentStyle||document.defaultView&&document.defaultView.getComputedStyle(e);return n?t?n[t]:n:null}var nw=ew($C,`transition`),rw=ew(QC,`transform`),iw=`position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;`+(he.transform3dSupported?`will-change:transform;`:``);function aw(e){return e=e===`left`?`right`:e===`right`?`left`:e===`top`?`bottom`:`top`,e}function ow(e,t,n){if(!R(n)||n===`inside`)return``;var r=e.get(`backgroundColor`),i=e.get(`borderWidth`);t=re(t);var a=aw(n),o=Math.max(Math.round(i)*1.5,6),s=``,c=rw+`:`,l;Sa([`left`,`right`],a)>-1?(s+=`top:50%`,c+=`translateY(-50%) rotate(`+(l=a===`left`?-225:-45)+`deg)`):(s+=`left:50%`,c+=`translateX(-50%) rotate(`+(l=a===`top`?225:45)+`deg)`);var u=l*Math.PI/180,d=o+i,f=d*Math.abs(Math.cos(u))+d*Math.abs(Math.sin(u)),p=Math.round(((f-Math.SQRT2*i)/2+Math.SQRT2*i-(f-d)/2)*100)/100;s+=`;`+a+`:-`+p+`px`;var m=t+` solid `+i+`px;`;return`<div style="`+[`position:absolute;width:`+o+`px;height:`+o+`px;z-index:-1;`,s+`;`+c+`;`,`border-bottom:`+m,`border-right:`+m,`background-color:`+r+`;`].join(``)+`"></div>`}function sw(e,t,n){var r=`cubic-bezier(0.23,1,0.32,1)`,i=``,a=``;return n&&(i=` `+e/2+`s `+r,a=`opacity`+i+`,visibility`+i),t||(i=` `+e+`s `+r,a+=(a.length?`,`:``)+(he.transformSupported?``+rw+i:`,left`+i+`,top`+i)),nw+`:`+a}function cw(e,t,n){var r=e.toFixed(0)+`px`,i=t.toFixed(0)+`px`;if(!he.transformSupported)return n?`top:`+i+`;left:`+r+`;`:[[`top`,i],[`left`,r]];var a=he.transform3dSupported,o=`translate`+(a?`3d`:``)+`(`+r+`,`+i+(a?`,0`:``)+`)`;return n?`top:0;left:0;`+rw+`:`+o+`;`:[[`top`,0],[`left`,0],[QC,o]]}function lw(e){var t=[],n=e.get(`fontSize`),r=e.getTextColor();r&&t.push(`color:`+r),t.push(`font:`+e.getFont());var i=z(e.get(`lineHeight`),Math.round(n*3/2));n&&t.push(`line-height:`+i+`px`);var a=e.get(`textShadowColor`),o=e.get(`textShadowBlur`)||0,s=e.get(`textShadowOffsetX`)||0,c=e.get(`textShadowOffsetY`)||0;return a&&o&&t.push(`text-shadow:`+s+`px `+c+`px `+o+`px `+a),J([`decoration`,`align`],function(n){var r=e.get(n);r&&t.push(`text-`+n+`:`+r)}),t.join(`;`)}function uw(e,t,n,r){var i=[],a=e.get(`transitionDuration`),o=e.get(`backgroundColor`),s=e.get(`shadowBlur`),c=e.get(`shadowColor`),l=e.get(`shadowOffsetX`),u=e.get(`shadowOffsetY`),d=e.getModel(`textStyle`),p=de(e,`html`),m=l+`px `+u+`px `+s+`px `+c;return i.push(`box-shadow:`+m),t&&a>0&&i.push(sw(a,n,r)),o&&i.push(`background-color:`+o),J([`width`,`color`,`radius`],function(t){var n=`border-`+t,r=f(n),a=e.get(r);a!=null&&i.push(n+`:`+a+(t===`color`?``:`px`))}),i.push(lw(d)),p!=null&&i.push(`padding:`+Yr(p).join(`px `)+`px`),i.join(`;`)+`;`}function dw(e,n,r,i,a){var o=n&&n.painter;if(r){var s=o&&o.getViewportRoot();s&&t(e,s,r,i,a)}else{e[0]=i,e[1]=a;var c=o&&o.getViewportRootOffset();c&&(e[0]+=c.offsetLeft,e[1]+=c.offsetTop)}e[2]=e[0]/n.getWidth(),e[3]=e[1]/n.getHeight()}var fw=function(){function e(e,t){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,he.wxa)return null;var n=document.createElement(`div`);n.domBelongToZr=!0,this.el=n;var r=this._zr=e.getZr(),i=t.appendTo,a=i&&(R(i)?document.querySelector(i):ha(i)?i:V(i)&&i(e.getDom()));dw(this._styleCoord,r,a,e.getWidth()/2,e.getHeight()/2),(a||e.getDom()).appendChild(n),this._api=e,this._container=a;var o=this;n.onmouseenter=function(){o._enterable&&(clearTimeout(o._hideTimeout),o._show=!0),o._inContent=!0},n.onmousemove=function(e){if(e||=window.event,!o._enterable){var t=r.handler;dn(r.painter.getViewportRoot(),e,!0),t.dispatch(`mousemove`,e)}},n.onmouseleave=function(){o._inContent=!1,o._enterable&&o._show&&o.hideLater(o._hideDelay)}}return e.prototype.update=function(e){if(!this._container){var t=this._api.getDom(),n=tw(t,`position`),r=t.style;r.position!==`absolute`&&n!==`absolute`&&(r.position=`relative`)}var i=e.get(`alwaysShowContent`);i&&this._moveIfResized(),this._alwaysShowContent=i,this._enableDisplayTransition=e.get(`displayTransition`)&&e.get(`transitionDuration`)>0,this.el.className=e.get(`className`)||``},e.prototype.show=function(e,t){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,r=n.style,i=this._styleCoord;n.innerHTML?r.cssText=iw+uw(e,!this._firstShow,this._longHide,this._enableDisplayTransition)+cw(i[0],i[1],!0)+(`border-color:`+re(t)+`;`)+(e.get(`extraCssText`)||``)+(`;pointer-events:`+(this._enterable?`auto`:`none`)):r.display=`none`,this._show=!0,this._firstShow=!1,this._longHide=!1},e.prototype.setContent=function(e,t,n,r,i){var a=this.el;if(e==null){a.innerHTML=``;return}var o=``;if(R(i)&&n.get(`trigger`)===`item`&&!XC(n)&&(o=ow(n,r,i)),R(e))a.innerHTML=e+o;else if(e){a.innerHTML=``,B(e)||(e=[e]);for(var s=0;s<e.length;s++)ha(e[s])&&e[s].parentNode!==a&&a.appendChild(e[s]);if(o&&a.childNodes.length){var c=document.createElement(`div`);c.innerHTML=o,a.appendChild(c)}}},e.prototype.setEnterable=function(e){this._enterable=e},e.prototype.getSize=function(){var e=this.el;return e?[e.offsetWidth,e.offsetHeight]:[0,0]},e.prototype.moveTo=function(e,t){if(this.el){var n=this._styleCoord;if(dw(n,this._zr,this._container,e,t),n[0]!=null&&n[1]!=null){var r=this.el.style;J(cw(n[0],n[1]),function(e){r[e[0]]=e[1]})}}},e.prototype._moveIfResized=function(){var e=this._styleCoord[2],t=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),t*this._zr.getHeight())},e.prototype.hide=function(){var e=this,t=this.el.style;this._enableDisplayTransition?(t.visibility=`hidden`,t.opacity=`0`):t.display=`none`,he.transform3dSupported&&(t.willChange=``),this._show=!1,this._longHideTimeout=setTimeout(function(){return e._longHide=!0},500)},e.prototype.hideLater=function(e){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(X(this.hide,this),e)):this.hide())},e.prototype.isShow=function(){return this._show},e.prototype.dispose=function(){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var e=this._zr;cr(e&&e.painter&&e.painter.getViewportRoot(),this._container);var t=this.el;if(t){t.onmouseenter=t.onmousemove=t.onmouseleave=null;var n=t.parentNode;n&&n.removeChild(t)}this.el=this._container=null},e}(),pw=function(){function e(e){this._show=!1,this._styleCoord=[0,0,0,0],this._alwaysShowContent=!1,this._enterable=!0,this._zr=e.getZr(),gw(this._styleCoord,this._zr,e.getWidth()/2,e.getHeight()/2)}return e.prototype.update=function(e){var t=e.get(`alwaysShowContent`);t&&this._moveIfResized(),this._alwaysShowContent=t},e.prototype.show=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.show(),this._show=!0},e.prototype.setContent=function(e,t,n,r,i){var a=this;A(e)&&Hn(``),this.el&&this._zr.remove(this.el);var o=n.getModel(`textStyle`);this.el=new j({style:{rich:t.richTextStyles,text:e,lineHeight:22,borderWidth:1,borderColor:r,textShadowColor:o.get(`textShadowColor`),fill:n.get([`textStyle`,`color`]),padding:de(n,`richText`),verticalAlign:`top`,align:`left`},z:n.get(`z`)}),J([`backgroundColor`,`borderRadius`,`shadowColor`,`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`],function(e){a.el.style[e]=n.get(e)}),J([`textShadowBlur`,`textShadowOffsetX`,`textShadowOffsetY`],function(e){a.el.style[e]=o.get(e)||0}),this._zr.add(this.el);var s=this;this.el.on(`mouseover`,function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0}),this.el.on(`mouseout`,function(){s._enterable&&s._show&&s.hideLater(s._hideDelay),s._inContent=!1})},e.prototype.setEnterable=function(e){this._enterable=e},e.prototype.getSize=function(){var e=this.el,t=this.el.getBoundingRect(),n=hw(e.style);return[t.width+n.left+n.right,t.height+n.top+n.bottom]},e.prototype.moveTo=function(e,t){var n=this.el;if(n){var r=this._styleCoord;gw(r,this._zr,e,t),e=r[0],t=r[1];var i=n.style,a=mw(i.borderWidth||0),o=hw(i);n.x=e+a+o.left,n.y=t+a+o.top,n.markRedraw()}},e.prototype._moveIfResized=function(){var e=this._styleCoord[2],t=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),t*this._zr.getHeight())},e.prototype.hide=function(){this.el&&this.el.hide(),this._show=!1},e.prototype.hideLater=function(e){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(X(this.hide,this),e)):this.hide())},e.prototype.isShow=function(){return this._show},e.prototype.dispose=function(){this._zr.remove(this.el)},e}();function mw(e){return Math.max(0,e)}function hw(e){var t=mw(e.shadowBlur||0),n=mw(e.shadowOffsetX||0),r=mw(e.shadowOffsetY||0);return{left:mw(t-n),right:mw(t+n),top:mw(t-r),bottom:mw(t+r)}}function gw(e,t,n,r){e[0]=n,e[1]=r,e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var _w=new d({shape:{x:-1,y:-1,width:2,height:2}}),vw=function(e){L(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.init=function(e,t){if(!(he.node||!t.getDom())){var n=e.getComponent(`tooltip`),r=this._renderMode=i(n.get(`renderMode`));this._tooltipContent=r===`richText`?new pw(t):new fw(t,{appendTo:n.get(`appendToBody`,!0)?`body`:n.get(`appendTo`,!0)})}},t.prototype.render=function(e,t,n){if(!(he.node||!n.getDom())){this.group.removeAll(),this._tooltipModel=e,this._ecModel=t,this._api=n;var r=this._tooltipContent;r.update(e),r.setEnterable(e.get(`enterable`)),this._initGlobalListener(),this._keepShow(),this._renderMode!==`richText`&&e.get(`transitionDuration`)?we(this,`_updatePosition`,50,`fixRate`):ie(this,`_updatePosition`)}},t.prototype._initGlobalListener=function(){var e=this._tooltipModel.get(`triggerOn`);dS(`itemTooltip`,this._api,X(function(t,n,r){e!==`none`&&(e.indexOf(t)>=0?this._tryShow(n,r):t===`leave`&&this._hide(r))},this))},t.prototype._keepShow=function(){var e=this._tooltipModel,t=this._ecModel,n=this._api,r=e.get(`triggerOn`);if(e.get(`trigger`)!==`axis`&&(this._lastDataByCoordSys=null,this._cbParamsList=null),this._lastX!=null&&this._lastY!=null&&r!==`none`&&r!==`click`){var i=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!n.isDisposed()&&i.manuallyShowTip(e,t,n,{x:i._lastX,y:i._lastY,dataByCoordSys:i._lastDataByCoordSys})})}},t.prototype.manuallyShowTip=function(e,t,n,r){if(!(r.from===this.uid||he.node||!n.getDom())){var i=bw(r,n);this._ticket=``;var a=r.dataByCoordSys,o=Tw(r,t,n);if(o){var s=o.el.getBoundingRect().clone();s.applyTransform(o.el.transform),this._tryShow({offsetX:s.x+s.width/2,offsetY:s.y+s.height/2,target:o.el,position:r.position,positionDefault:`bottom`},i)}else if(r.tooltip&&r.x!=null&&r.y!=null){var c=_w;c.x=r.x,c.y=r.y,c.update(),H(c).tooltipConfig={name:null,option:r.tooltip},this._tryShow({offsetX:r.x,offsetY:r.y,target:c},i)}else if(a)this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,dataByCoordSys:a,tooltipOption:r.tooltipOption},i);else if(r.seriesIndex!=null){if(this._manuallyAxisShowTip(e,t,n,r))return;var l=yS(r,t),u=l.point[0],d=l.point[1];u!=null&&d!=null&&this._tryShow({offsetX:u,offsetY:d,target:l.el,position:r.position,positionDefault:`bottom`},i)}else r.x!=null&&r.y!=null&&(n.dispatchAction({type:`updateAxisPointer`,x:r.x,y:r.y}),this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,target:n.getZr().findHover(r.x,r.y).target},i))}},t.prototype.manuallyHideTip=function(e,t,n,r){var i=this._tooltipContent;this._tooltipModel&&i.hideLater(this._tooltipModel.get(`hideDelay`)),this._lastX=this._lastY=this._lastDataByCoordSys=null,this._cbParamsList=null,r.from!==this.uid&&this._hide(bw(r,n))},t.prototype._manuallyAxisShowTip=function(e,t,n,r){var i=r.seriesIndex,a=r.dataIndex,o=t.getComponent(`axisPointer`).coordSysAxesInfo;if(!(i==null||a==null||o==null)){var s=t.getSeriesByIndex(i);if(s&&yw([s.getData().getItemModel(a),s,(s.coordinateSystem||{}).model],this._tooltipModel).get(`trigger`)===`axis`)return n.dispatchAction({type:`updateAxisPointer`,seriesIndex:i,dataIndex:a,position:r.position}),!0}},t.prototype._tryShow=function(e,t){var n=e.target;if(this._tooltipModel){this._lastX=e.offsetX,this._lastY=e.offsetY;var r=e.dataByCoordSys;if(r&&r.length)this._showAxisTooltip(r,e);else if(n){if(H(n).ssrType===`legend`)return;this._lastDataByCoordSys=null,this._cbParamsList=null;var i,a;o(n,function(e){if(e.tooltipDisabled)return i=a=null,!0;i||a||(H(e).dataIndex==null?H(e).tooltipConfig!=null&&(a=e):i=e)},!0),i?this._showSeriesItemTooltip(e,i,t):a?this._showComponentItemTooltip(e,a,t):this._hide(t)}else this._lastDataByCoordSys=null,this._cbParamsList=null,this._hide(t)}},t.prototype._showOrMove=function(e,t){var n=e.get(`showDelay`);t=X(t,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(t,n):t()},t.prototype._showAxisTooltip=function(e,t){var n=this._ecModel,r=this._tooltipModel,i=[t.offsetX,t.offsetY],a=yw([t.tooltipOption],r),o=this._renderMode,s=[],c=nn(`section`,{blocks:[],noHeader:!0}),l=[],u=new ve;J(e,function(e){J(e.dataByAxis,function(e){var t=n.getComponent(e.axisDim+`Axis`,e.axisIndex),i=e.value,a=t.axis,d=a.scale.parse(i);if(!(!t||i==null)){var f=Xx(i,a,n,e.seriesDataIndices,e.valueLabelOpt),p=nn(`section`,{header:f,noHeader:!$t(f),sortBlocks:!0,blocks:[]});c.blocks.push(p),J(e.seriesDataIndices,function(i){var a=n.getSeriesByIndex(i.seriesIndex),c=i.dataIndexInside,m=a.getDataParams(c);if(!(m.dataIndex<0)){m.axisDim=e.axisDim,m.axisIndex=e.axisIndex,m.axisType=e.axisType,m.axisId=e.axisId,m.axisValue=Us(t.axis,{value:d}),m.axisValueLabel=f,m.marker=u.makeTooltipMarker(`item`,re(m.color),o);var h=St(a.formatTooltip(c,!0,null)),g=h.frag;if(g){var _=yw([a],r).get(`valueFormatter`);p.blocks.push(_?G({valueFormatter:_},g):g)}h.text&&l.push(h.text),s.push(m)}})}})}),c.blocks.reverse(),l.reverse();var d=t.position,f=Wt(c,u,o,a.get(`order`),n.get(`useUTC`),a.get(`textStyle`));f&&l.unshift(f);var p=o===`richText`?`

`:`<br/>`,m=l.join(p);this._showOrMove(a,function(){this._updateContentNotChangedOnAxis(e,s)?this._updatePosition(a,d,i[0],i[1],this._tooltipContent,s):this._showTooltipContent(a,m,s,Math.random()+``,i[0],i[1],d,null,u)})},t.prototype._showSeriesItemTooltip=function(e,t,n){var r=this._ecModel,i=H(t),a=i.seriesIndex,o=r.getSeriesByIndex(a),s=i.dataModel||o,c=i.dataIndex,l=i.dataType,u=s.getData(l),d=this._renderMode,f=e.positionDefault,p=yw([u.getItemModel(c),s,o&&(o.coordinateSystem||{}).model],this._tooltipModel,f?{position:f}:null),m=p.get(`trigger`);if(!(m!=null&&m!==`item`)){var h=s.getDataParams(c,l),g=new ve;h.marker=g.makeTooltipMarker(`item`,re(h.color),d);var _=St(s.formatTooltip(c,!1,l)),v=p.get(`order`),y=p.get(`valueFormatter`),b=_.frag,x=b?Wt(y?G({valueFormatter:y},b):b,g,d,v,r.get(`useUTC`),p.get(`textStyle`)):_.text,S=`item_`+s.name+`_`+c;this._showOrMove(p,function(){this._showTooltipContent(p,x,h,S,e.offsetX,e.offsetY,e.position,e.target,g)}),n({type:`showTip`,dataIndexInside:c,dataIndex:u.getRawIndex(c),seriesIndex:a,from:this.uid})}},t.prototype._showComponentItemTooltip=function(e,t,n){var r=this._renderMode===`html`,i=H(t),a=i.tooltipConfig.option||{},o=a.encodeHTMLContent;if(R(a)){var s=a;a={content:s,formatter:s},o=!0}o&&r&&a.content&&(a=ta(a),a.content=Ct(a.content));var c=[a],l=this._ecModel.getComponent(i.componentMainType,i.componentIndex);l&&c.push(l),c.push({formatter:a.content});var u=e.positionDefault,d=yw(c,this._tooltipModel,u?{position:u}:null),f=d.get(`content`),p=Math.random()+``,m=new ve;this._showOrMove(d,function(){var n=ta(d.get(`formatterParams`)||{});this._showTooltipContent(d,f,n,p,e.offsetX,e.offsetY,e.position,t,m)}),n({type:`showTip`,from:this.uid})},t.prototype._showTooltipContent=function(e,t,n,r,i,a,o,s,c){if(this._ticket=``,!(!e.get(`showContent`)||!e.get(`show`))){var l=this._tooltipContent;l.setEnterable(e.get(`enterable`));var u=e.get(`formatter`);o||=e.get(`position`);var d=t,f=this._getNearestPoint([i,a],n,e.get(`trigger`),e.get(`borderColor`),e.get(`defaultBorderColor`,!0)).color;if(u)if(R(u)){var p=e.ecModel.get(`useUTC`),m=B(n)?n[0]:n,h=m&&m.axisType&&m.axisType.indexOf(`time`)>=0;d=u,h&&(d=Ra(m.axisValue,d,p)),d=M(d,n,!0)}else if(V(u)){var g=X(function(t,r){t===this._ticket&&(l.setContent(r,c,e,f,o),this._updatePosition(e,o,i,a,l,n,s))},this);this._ticket=r,d=u(n,r,g)}else d=u;l.setContent(d,c,e,f,o),l.show(e,f),this._updatePosition(e,o,i,a,l,n,s)}},t.prototype._getNearestPoint=function(e,t,n,r,i){if(n===`axis`||B(t))return{color:r||i};if(!B(t))return{color:r||t.color||t.borderColor}},t.prototype._updatePosition=function(e,t,n,r,i,a,o){var s=this._api.getWidth(),c=this._api.getHeight();t||=e.get(`position`);var l=i.getSize(),u=e.get(`align`),d=e.get(`verticalAlign`),f=o&&o.getBoundingRect().clone();if(o&&f.applyTransform(o.transform),V(t)&&(t=t([n,r],a,i.el,f,{viewSize:[s,c],contentSize:l.slice()})),B(t))n=U(t[0],s),r=U(t[1],c);else if(A(t)){var p=t;p.width=l[0],p.height=l[1];var m=Cr(p,{width:s,height:c});n=m.x,r=m.y,u=null,d=null}else if(R(t)&&o){var h=Cw(t,f,l,e.get(`borderWidth`));n=h[0],r=h[1]}else{var h=xw(n,r,i,s,c,u?null:20,d?null:20);n=h[0],r=h[1]}if(u&&(n-=ww(u)?l[0]/2:u===`right`?l[0]:0),d&&(r-=ww(d)?l[1]/2:d===`bottom`?l[1]:0),XC(e)){var h=Sw(n,r,i,s,c);n=h[0],r=h[1]}i.moveTo(n,r)},t.prototype._updateContentNotChangedOnAxis=function(e,t){var n=this._lastDataByCoordSys,r=this._cbParamsList,i=!!n&&n.length===e.length;return i&&J(n,function(n,a){var o=n.dataByAxis||[],s=(e[a]||{}).dataByAxis||[];i&&=o.length===s.length,i&&J(o,function(e,n){var a=s[n]||{},o=e.seriesDataIndices||[],c=a.seriesDataIndices||[];i=i&&e.value===a.value&&e.axisType===a.axisType&&e.axisId===a.axisId&&o.length===c.length,i&&J(o,function(e,t){var n=c[t];i=i&&e.seriesIndex===n.seriesIndex&&e.dataIndex===n.dataIndex}),r&&J(e.seriesDataIndices,function(e){var n=e.seriesIndex,a=t[n],o=r[n];a&&o&&o.data!==a.data&&(i=!1)})})}),this._lastDataByCoordSys=e,this._cbParamsList=t,!!i},t.prototype._hide=function(e){this._lastDataByCoordSys=null,this._cbParamsList=null,e({type:`hideTip`,from:this.uid})},t.prototype.dispose=function(e,t){he.node||!t.getDom()||(ie(this,`_updatePosition`),this._tooltipContent.dispose(),_S(`itemTooltip`,t),this._tooltipContent=null,this._tooltipModel=null,this._lastDataByCoordSys=null,this._cbParamsList=null)},t.type=`tooltip`,t}(p);function yw(e,t,n){var r=t.ecModel,i;n?(i=new ii(n,r,r),i=new ii(t.option,i,r)):i=t;for(var a=e.length-1;a>=0;a--){var o=e[a];o&&(o instanceof ii&&(o=o.get(`tooltip`,!0)),R(o)&&(o={formatter:o}),o&&(i=new ii(o,i,r)))}return i}function bw(e,t){return e.dispatchAction||X(t.dispatchAction,t)}function xw(e,t,n,r,i,a,o){var s=n.getSize(),c=s[0],l=s[1];return a!=null&&(e+c+a+2>r?e-=c+a:e+=a),o!=null&&(t+l+o>i?t-=l+o:t+=o),[e,t]}function Sw(e,t,n,r,i){var a=n.getSize(),o=a[0],s=a[1];return e=Math.min(e+o,r)-o,t=Math.min(t+s,i)-s,e=Math.max(e,0),t=Math.max(t,0),[e,t]}function Cw(e,t,n,r){var i=n[0],a=n[1],o=Math.ceil(Math.SQRT2*r)+8,s=0,c=0,l=t.width,u=t.height;switch(e){case`inside`:s=t.x+l/2-i/2,c=t.y+u/2-a/2;break;case`top`:s=t.x+l/2-i/2,c=t.y-a-o;break;case`bottom`:s=t.x+l/2-i/2,c=t.y+u+o;break;case`left`:s=t.x-i-o,c=t.y+u/2-a/2;break;case`right`:s=t.x+l+o,c=t.y+u/2-a/2}return[s,c]}function ww(e){return e===`center`||e===`middle`}function Tw(e,t,n){var r=Qr(e).queryOptionMap,i=r.keys()[0];if(!(!i||i===`series`)){var a=pr(t,i,r.get(i),{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];if(a){var o=n.getViewOfComponentModel(a),s;if(o.group.traverse(function(t){var n=H(t).tooltipConfig;if(n&&n.name===e.name)return s=t,!0}),s)return{componentMainType:i,componentIndex:a.componentIndex,el:s}}}}function Ew(e){Yc(MS),e.registerComponentModel(YC),e.registerComponentView(vw),e.registerAction({type:`showTip`,event:`showTip`,update:`tooltip:manuallyShowTip`},yt),e.registerAction({type:`hideTip`,event:`hideTip`,update:`tooltip:manuallyHideTip`},yt)}var Dw=J;function Ow(e){if(e){for(var t in e)if(e.hasOwnProperty(t))return!0}}function kw(e,t,n){var r={};return Dw(t,function(t){var a=r[t]=i();Dw(e[t],function(e,r){if(Y_.isValidType(r)){var i={type:r,visual:e};n&&n(i,t),a[r]=new Y_(i),r===`opacity`&&(i=ta(i),i.type=`colorAlpha`,a.__hidden.__alphaForOpacity=new Y_(i))}})}),r;function i(){var e=function(){};return e.prototype.__hidden=e.prototype,new e}}function Aw(e,t,n){var r;J(n,function(e){t.hasOwnProperty(e)&&Ow(t[e])&&(r=!0)}),r&&J(n,function(n){t.hasOwnProperty(n)&&Ow(t[n])?e[n]=ta(t[n]):delete e[n]})}function jw(e,t,n,r){var i={};return J(e,function(e){i[e]=Y_.prepareVisualTypes(t[e])}),{progress:function(e,a){var o;r!=null&&(o=a.getDimensionIndex(r));function s(e){return Ye(a,l,e)}function c(e,t){ht(a,l,e,t)}for(var l,u=a.getStore();(l=e.next())!=null;){var d=a.getRawDataItem(l);if(!(d&&d.visualMap===!1))for(var f=r==null?l:u.get(o,l),p=n(f),m=t[p],h=i[p],g=0,_=h.length;g<_;g++){var v=h[g];m[v]&&m[v].applyVisual(f,s,c)}}}}}var Mw=function(e){L(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.layoutMode={type:`box`,ignoreSize:!0},n}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}(ra),Nw=function(e){L(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){if(this.group.removeAll(),e.get(`show`)){var r=this.group,i=e.getModel(`textStyle`),a=e.getModel(`subtextStyle`),o=e.get(`textAlign`),s=z(e.get(`textBaseline`),e.get(`textVerticalAlign`)),c=new j({style:sa(i,{text:e.get(`text`),fill:i.getTextColor()},{disableBox:!0}),z2:10}),l=c.getBoundingRect(),u=e.get(`subtext`),f=new j({style:sa(a,{text:u,fill:a.getTextColor(),y:l.height+e.get(`itemGap`),verticalAlign:`top`},{disableBox:!0}),z2:10}),p=e.get(`link`),m=e.get(`sublink`),h=e.get(`triggerEvent`,!0);c.silent=!p&&!h,f.silent=!m&&!h,p&&c.on(`click`,function(){Ur(p,`_`+e.get(`target`))}),m&&f.on(`click`,function(){Ur(m,`_`+e.get(`subtarget`))}),H(c).eventData=H(f).eventData=h?{componentType:`title`,componentIndex:e.componentIndex}:null,r.add(c),u&&r.add(f);var g=r.getBoundingRect(),_=e.getBoxLayoutParams();_.width=g.width,_.height=g.height;var v=Cr(_,gr(e,n).refContainer,e.get(`padding`));o||(o=e.get(`left`)||e.get(`right`),o===`middle`&&(o=`center`),o===`right`?v.x+=v.width:o===`center`&&(v.x+=v.width/2)),s||(s=e.get(`top`)||e.get(`bottom`),s===`center`&&(s=`middle`),s===`bottom`?v.y+=v.height:s===`middle`&&(v.y+=v.height/2),s||=`top`),r.x=v.x,r.y=v.y,r.markRedraw();var y={align:o,verticalAlign:s};c.setStyle(y),f.setStyle(y),g=r.getBoundingRect();var b=v.margin,x=e.getItemStyle([`color`,`opacity`]);x.fill=e.get(`backgroundColor`);var S=new d({shape:{x:g.x-b[3],y:g.y-b[0],width:g.width+b[1]+b[3],height:g.height+b[0]+b[2],r:e.get(`borderRadius`)},style:x,subPixelOptimize:!0,silent:!0});r.add(S)}},t.type=`title`,t}(p);function Pw(e){e.registerComponentModel(Mw),e.registerComponentView(Nw)}function Fw(e,t){if(!e)return!1;for(var n=B(e)?e:[e],r=0;r<n.length;r++)if(n[r]&&n[r][t])return!0;return!1}function Iw(e){Pe(e,`label`,[`show`])}var Lw=$(),Rw=function(e){L(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.createdBySelf=!1,n.preventAutoZ=!0,n}return t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n),this._mergeOption(e,n,!1,!0)},t.prototype.isAnimationEnabled=function(){if(he.node)return!1;var e=this.__hostSeries;return this.getShallow(`animation`)&&e&&e.isAnimationEnabled()},t.prototype.mergeOption=function(e,t){this._mergeOption(e,t,!1,!1)},t.prototype._mergeOption=function(e,t,n,r){var i=this.mainType;n||t.eachSeries(function(e){var n=e.get(this.mainType,!0),a=Lw(e)[i];if(!n||!n.data){Lw(e)[i]=null;return}a?a._mergeOption(n,t,!0):(r&&Iw(n),J(n.data,function(e){e instanceof Array?(Iw(e[0]),Iw(e[1])):Iw(e)}),a=this.createMarkerModelFromSeries(n,this,t),G(a,{mainType:this.mainType,seriesIndex:e.seriesIndex,name:e.name,createdBySelf:!0}),a.__hostSeries=e),Lw(e)[i]=a},this)},t.prototype.formatTooltip=function(e,t,n){var r=this.getData(),i=this.getRawValue(e),a=r.getName(e);return nn(`section`,{header:this.name,blocks:[nn(`nameValue`,{name:a,value:i,noName:!a,noValue:i==null})]})},t.prototype.getData=function(){return this._data},t.prototype.setData=function(e){this._data=e},t.prototype.getDataParams=function(e,t){var n=Sn.prototype.getDataParams.call(this,e,t),r=this.__hostSeries;return r&&(n.seriesId=r.id,n.seriesName=r.name,n.seriesType=r.subType),n},t.getMarkerModelFromSeries=function(e,t){return Lw(e)[t]},t.type=`marker`,t.dependencies=[`series`,`grid`,`polar`,`geo`],t}(ra);ot(Rw,Sn.prototype);var zw=function(e){L(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.createMarkerModelFromSeries=function(e,n,r){return new t(e,n,r)},t.type=`markPoint`,t.defaultOption={z:5,symbol:`pin`,symbolSize:50,tooltip:{trigger:`item`},label:{show:!0,position:`inside`},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}},t}(Rw);function Bw(e){return!(isNaN(parseFloat(e.x))&&isNaN(parseFloat(e.y)))}function Vw(e){return!isNaN(parseFloat(e.x))&&!isNaN(parseFloat(e.y))}function Hw(e,t,n,r,i,a,o){var s=[],c=jo(t,i)?t.getCalculationInfo(`stackResultDimension`):i,l=Xw(t,c,e),u=t.hostModel.indicesOfNearest(n,c,l)[0];s[a]=t.get(r,u),s[o]=t.get(c,u);var d=t.get(i,u),f=F(t.get(i,u));return f=Math.min(f,20),f>=0&&(s[o]=+s[o].toFixed(f)),[s,d]}var Uw={min:Q(Hw,`min`),max:Q(Hw,`max`),average:Q(Hw,`average`),median:Q(Hw,`median`)};function Ww(e,t){if(t){var n=e.getData(),r=e.coordinateSystem,i=r&&r.dimensions;if(!Vw(t)&&!B(t.coord)&&B(i)){var a=Gw(t,n,r,e);if(t=ta(t),t.type&&Uw[t.type]&&a.baseAxis&&a.valueAxis){var o=Sa(i,a.baseAxis.dim),s=Sa(i,a.valueAxis.dim),c=Uw[t.type](n,a.valueAxis.dim,a.baseDataDim,a.valueDataDim,o,s);t.coord=c[0],t.value=c[1]}else t.coord=[t.xAxis==null?t.radiusAxis:t.xAxis,t.yAxis==null?t.angleAxis:t.yAxis]}if(t.coord==null||!B(i)){t.coord=[];var l=e.getBaseAxis();if(l&&t.type&&Uw[t.type]){var u=r.getOtherAxis(l);u&&(t.value=Xw(n,n.mapDimension(u.dim),t.type))}}else for(var d=t.coord,f=0;f<2;f++)Uw[d[f]]&&(d[f]=Xw(n,n.mapDimension(i[f]),d[f]));return t}}function Gw(e,t,n,r){var i={};return e.valueIndex!=null||e.valueDim!=null?(i.valueDataDim=e.valueIndex==null?e.valueDim:t.getDimension(e.valueIndex),i.valueAxis=n.getAxis(Kw(r,i.valueDataDim)),i.baseAxis=n.getOtherAxis(i.valueAxis),i.baseDataDim=t.mapDimension(i.baseAxis.dim)):(i.baseAxis=r.getBaseAxis(),i.valueAxis=n.getOtherAxis(i.baseAxis),i.baseDataDim=t.mapDimension(i.baseAxis.dim),i.valueDataDim=t.mapDimension(i.valueAxis.dim)),i}function Kw(e,t){var n=e.getData().getDimensionInfo(t);return n&&n.coordDim}function qw(e,t){return e&&e.containData&&t.coord&&!Bw(t)?e.containData(t.coord):!0}function Jw(e,t,n){return e&&e.containZone&&t.coord&&n.coord&&!Bw(t)&&!Bw(n)?e.containZone(t.coord,n.coord):!0}function Yw(e,t){return e?function(e,n,r,i){return je(i<2?e.coord&&e.coord[i]:e.value,t[i])}:function(e,n,r,i){return je(e.value,t[i])}}function Xw(e,t,n){if(n===`average`){var r=0,i=0;return e.each(t,function(e,t){isNaN(e)||(r+=e,i++)}),r/i}else if(n===`median`)return e.getMedian(t);else return e.getDataExtent(t)[+(n===`max`)]}var Zw=$(),Qw=function(e){L(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.init=function(){this.markerGroupMap=q()},t.prototype.render=function(e,t,n){var r=this,i=this.markerGroupMap;i.each(function(e){Zw(e).keep=!1}),t.eachSeries(function(e){var i=Rw.getMarkerModelFromSeries(e,r.type);i&&r.renderSeries(e,i,t,n)}),i.each(function(e){!Zw(e).keep&&r.group.remove(e.group)}),$w(t,i,this.type)},t.prototype.markKeep=function(e){Zw(e).keep=!0},t.prototype.toggleBlurSeries=function(e,t){var n=this;J(e,function(e){var r=Rw.getMarkerModelFromSeries(e,n.type);r&&r.getData().eachItemGraphicEl(function(e){e&&(t?na(e):Ti(e))})})},t.type=`marker`,t}(p);function $w(e,t,n){e.eachSeries(function(e){var r=Rw.getMarkerModelFromSeries(e,n),i=t.get(e.id);if(r&&i&&i.group){var a=jt(r),o=a.z,s=a.zlevel;qt(i.group,o,s)}})}function eT(e,t,n){var r=t.coordinateSystem,i=n.getWidth(),a=n.getHeight(),o=r&&r.getArea&&r.getArea();e.each(function(n){var s=e.getItemModel(n),c=s.get(`relativeTo`)===`coordinate`,l=c?o?o.width:0:i,u=c?o?o.height:0:a,d=c&&o?o.x:0,f=c&&o?o.y:0,p,m=U(s.get(`x`),l)+d,h=U(s.get(`y`),u)+f;if(!isNaN(m)&&!isNaN(h))p=[m,h];else if(t.getMarkerPosition)p=t.getMarkerPosition(e.getValues(e.dimensions,n));else if(r){var g=e.get(r.dimensions[0],n),_=e.get(r.dimensions[1],n);p=r.dataToPoint([g,_])}isNaN(m)||(p[0]=m),isNaN(h)||(p[1]=h),e.setItemLayout(n,p)})}var tT=function(e){L(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.updateTransform=function(e,t,n){t.eachSeries(function(e){var t=Rw.getMarkerModelFromSeries(e,`markPoint`);t&&(eT(t.getData(),e,n),this.markerGroupMap.get(e.id).updateLayout())},this)},t.prototype.renderSeries=function(e,t,n,r){var i=e.coordinateSystem,a=e.id,o=e.getData(),s=this.markerGroupMap,c=s.get(a)||s.set(a,new Ud),l=nT(i,e,t);t.setData(l),eT(t.getData(),e,r),l.each(function(e){var n=l.getItemModel(e),r=n.getShallow(`symbol`),i=n.getShallow(`symbolSize`),a=n.getShallow(`symbolRotate`),s=n.getShallow(`symbolOffset`),c=n.getShallow(`symbolKeepAspect`);if(V(r)||V(i)||V(a)||V(s)){var u=t.getRawValue(e),d=t.getDataParams(e);V(r)&&(r=r(u,d)),V(i)&&(i=i(u,d)),V(a)&&(a=a(u,d)),V(s)&&(s=s(u,d))}var f=n.getModel(`itemStyle`).getItemStyle(),p=n.get(`z2`),m=nt(o,`color`);f.fill||=m,l.setItemVisual(e,{z2:z(p,0),symbol:r,symbolSize:i,symbolRotate:a,symbolOffset:s,symbolKeepAspect:c,style:f})}),c.updateData(l),this.group.add(c.group),l.eachItemGraphicEl(function(e){e.traverse(function(e){H(e).dataModel=t})}),this.markKeep(c),c.group.silent=t.get(`silent`)||e.get(`silent`)},t.type=`markPoint`,t}(Qw);function nT(e,t,n){var r=e?u(e&&e.dimensions,function(e){var n=t.getData();return G(G({},n.getDimensionInfo(n.mapDimension(e))||{}),{name:e,ordinalMeta:null})}):[{name:`value`,type:`float`}],i=new xo(r,n),a=u(n.get(`data`),Q(Ww,t));e&&(a=ca(a,Q(qw,e)));var o=Yw(!!e,r);return i.initData(a,null,o),i}function rT(e){e.registerComponentModel(zw),e.registerComponentView(tT),e.registerPreprocessor(function(e){Fw(e.series,`markPoint`)&&(e.markPoint=e.markPoint||{})})}var iT=function(e){L(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.createMarkerModelFromSeries=function(e,n,r){return new t(e,n,r)},t.type=`markLine`,t.defaultOption={z:5,symbol:[`circle`,`arrow`],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:`item`},label:{show:!0,position:`end`,distance:5},lineStyle:{type:`dashed`},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:`linear`},t}(Rw),aT=$(),oT=function(e,t,n,r){var i=e.getData(),a;if(B(r))a=r;else{var o=r.type;if(o===`min`||o===`max`||o===`average`||o===`median`||r.xAxis!=null||r.yAxis!=null){var s=void 0,c=void 0;if(r.yAxis!=null||r.xAxis!=null)s=t.getAxis(r.yAxis==null?`x`:`y`),c=Ke(r.yAxis,r.xAxis);else{var l=Gw(r,i,t,e);s=l.valueAxis,c=Xw(i,Mo(i,l.valueDataDim),o)}var u=s.dim===`x`?0:1,d=1-u,f=ta(r),p={coord:[]};f.type=null,f.coord=[],f.coord[d]=-1/0,p.coord[d]=1/0;var m=n.get(`precision`);m>=0&&te(c)&&(c=+c.toFixed(Math.min(m,20))),f.coord[u]=p.coord[u]=c,a=[f,p,{type:o,valueIndex:r.valueIndex,value:c}]}else a=[]}var h=[Ww(e,a[0]),Ww(e,a[1]),G({},a[2])];return h[2].type=h[2].type||null,Vr(h[2],h[0]),Vr(h[2],h[1]),h};function sT(e){return!isNaN(e)&&!isFinite(e)}function cT(e,t,n,r){var i=1-e,a=r.dimensions[e];return sT(t[i])&&sT(n[i])&&t[e]===n[e]&&r.getAxis(a).containData(t[e])}function lT(e,t){if(e.type===`cartesian2d`){var n=t[0].coord,r=t[1].coord;if(n&&r&&(cT(1,n,r,e)||cT(0,n,r,e)))return!0}return qw(e,t[0])&&qw(e,t[1])}function uT(e,t,n,r,i){var a=r.coordinateSystem,o=e.getItemModel(t),s,c=U(o.get(`x`),i.getWidth()),l=U(o.get(`y`),i.getHeight());if(!isNaN(c)&&!isNaN(l))s=[c,l];else{if(r.getMarkerPosition)s=r.getMarkerPosition(e.getValues(e.dimensions,t));else{var u=a.dimensions,d=e.get(u[0],t),f=e.get(u[1],t);s=a.dataToPoint([d,f])}if(pf(a,`cartesian2d`)){var p=a.getAxis(`x`),m=a.getAxis(`y`),u=a.dimensions;sT(e.get(u[0],t))?s[0]=p.toGlobalCoord(p.getExtent()[+!n]):sT(e.get(u[1],t))&&(s[1]=m.toGlobalCoord(m.getExtent()[+!n]))}isNaN(c)||(s[0]=c),isNaN(l)||(s[1]=l)}e.setItemLayout(t,s)}var dT=function(e){L(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.updateTransform=function(e,t,n){t.eachSeries(function(e){var t=Rw.getMarkerModelFromSeries(e,`markLine`);if(t){var r=t.getData(),i=aT(t).from,a=aT(t).to;i.each(function(t){uT(i,t,!0,e,n),uT(a,t,!1,e,n)}),r.each(function(e){r.setItemLayout(e,[i.getItemLayout(e),a.getItemLayout(e)])}),this.markerGroupMap.get(e.id).updateLayout()}},this)},t.prototype.renderSeries=function(e,t,n,r){var i=e.coordinateSystem,a=e.id,o=e.getData(),s=this.markerGroupMap,c=s.get(a)||s.set(a,new zv);this.group.add(c.group);var l=fT(i,e,t),u=l.from,d=l.to,f=l.line;aT(t).from=u,aT(t).to=d,t.setData(f);var p=t.get(`symbol`),m=t.get(`symbolSize`),h=t.get(`symbolRotate`),g=t.get(`symbolOffset`);B(p)||(p=[p,p]),B(m)||(m=[m,m]),B(h)||(h=[h,h]),B(g)||(g=[g,g]),l.from.each(function(e){_(u,e,!0),_(d,e,!1)}),f.each(function(e){var t=f.getItemModel(e),n=t.getModel(`lineStyle`).getLineStyle();f.setItemLayout(e,[u.getItemLayout(e),d.getItemLayout(e)]);var r=t.get(`z2`);n.stroke??=u.getItemVisual(e,`style`).fill,f.setItemVisual(e,{z2:z(r,0),fromSymbolKeepAspect:u.getItemVisual(e,`symbolKeepAspect`),fromSymbolOffset:u.getItemVisual(e,`symbolOffset`),fromSymbolRotate:u.getItemVisual(e,`symbolRotate`),fromSymbolSize:u.getItemVisual(e,`symbolSize`),fromSymbol:u.getItemVisual(e,`symbol`),toSymbolKeepAspect:d.getItemVisual(e,`symbolKeepAspect`),toSymbolOffset:d.getItemVisual(e,`symbolOffset`),toSymbolRotate:d.getItemVisual(e,`symbolRotate`),toSymbolSize:d.getItemVisual(e,`symbolSize`),toSymbol:d.getItemVisual(e,`symbol`),style:n})}),c.updateData(f),l.line.eachItemGraphicEl(function(e){H(e).dataModel=t,e.traverse(function(e){H(e).dataModel=t})});function _(t,n,i){var a=t.getItemModel(n);uT(t,n,i,e,r);var s=a.getModel(`itemStyle`).getItemStyle();s.fill??=nt(o,`color`),t.setItemVisual(n,{symbolKeepAspect:a.get(`symbolKeepAspect`),symbolOffset:z(a.get(`symbolOffset`,!0),g[+!i]),symbolRotate:z(a.get(`symbolRotate`,!0),h[+!i]),symbolSize:z(a.get(`symbolSize`),m[+!i]),symbol:z(a.get(`symbol`,!0),p[+!i]),style:s})}this.markKeep(c),c.group.silent=t.get(`silent`)||e.get(`silent`)},t.type=`markLine`,t}(Qw);function fT(e,t,n){var r=e?u(e&&e.dimensions,function(e){var n=t.getData();return G(G({},n.getDimensionInfo(n.mapDimension(e))||{}),{name:e,ordinalMeta:null})}):[{name:`value`,type:`float`}],i=new xo(r,n),a=new xo(r,n),o=new xo([],n),s=u(n.get(`data`),Q(oT,t,e,n));e&&(s=ca(s,Q(lT,e)));var c=Yw(!!e,r);return i.initData(u(s,function(e){return e[0]}),null,c),a.initData(u(s,function(e){return e[1]}),null,c),o.initData(u(s,function(e){return e[2]})),o.hasItemOption=!0,{from:i,to:a,line:o}}function pT(e){e.registerComponentModel(iT),e.registerComponentView(dT),e.registerPreprocessor(function(e){Fw(e.series,`markLine`)&&(e.markLine=e.markLine||{})})}var mT=function(e){L(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.createMarkerModelFromSeries=function(e,n,r){return new t(e,n,r)},t.type=`markArea`,t.defaultOption={z:1,tooltip:{trigger:`item`},animation:!1,label:{show:!0,position:`top`},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:`top`}}},t}(Rw),hT=$(),gT=function(e,t,n,r){var i=r[0],a=r[1];if(!(!i||!a)){var o=Ww(e,i),s=Ww(e,a),c=o.coord,l=s.coord;c[0]=Ke(c[0],-1/0),c[1]=Ke(c[1],-1/0),l[0]=Ke(l[0],1/0),l[1]=Ke(l[1],1/0);var u=$e([{},o,s]);return u.coord=[o.coord,s.coord],u.x0=o.x,u.y0=o.y,u.x1=s.x,u.y1=s.y,u}};function _T(e){return!isNaN(e)&&!isFinite(e)}function vT(e,t,n,r){var i=1-e;return _T(t[i])&&_T(n[i])}function yT(e,t){var n=t.coord[0],r=t.coord[1],i={coord:n,x:t.x0,y:t.y0},a={coord:r,x:t.x1,y:t.y1};return pf(e,`cartesian2d`)?n&&r&&(vT(1,n,r,e)||vT(0,n,r,e))?!0:Jw(e,i,a):qw(e,i)||qw(e,a)}function bT(e,t,n,r,i){var a=r.coordinateSystem,o=e.getItemModel(t),s,c=U(o.get(n[0]),i.getWidth()),l=U(o.get(n[1]),i.getHeight());if(!isNaN(c)&&!isNaN(l))s=[c,l];else{if(r.getMarkerPosition){var u=e.getValues([`x0`,`y0`],t),d=e.getValues([`x1`,`y1`],t),f=a.clampData(u),p=a.clampData(d),m=[];n[0]===`x0`?m[0]=f[0]>p[0]?d[0]:u[0]:m[0]=f[0]>p[0]?u[0]:d[0],n[1]===`y0`?m[1]=f[1]>p[1]?d[1]:u[1]:m[1]=f[1]>p[1]?u[1]:d[1],s=r.getMarkerPosition(m,n,!0)}else{var h=e.get(n[0],t),g=e.get(n[1],t),_=[h,g];a.clampData&&a.clampData(_,_),s=a.dataToPoint(_,!0)}if(pf(a,`cartesian2d`)){var v=a.getAxis(`x`),y=a.getAxis(`y`),h=e.get(n[0],t),g=e.get(n[1],t);_T(h)?s[0]=v.toGlobalCoord(v.getExtent()[n[0]===`x0`?0:1]):_T(g)&&(s[1]=y.toGlobalCoord(y.getExtent()[n[1]===`y0`?0:1]))}isNaN(c)||(s[0]=c),isNaN(l)||(s[1]=l)}return s}var xT=[[`x0`,`y0`],[`x1`,`y0`],[`x1`,`y1`],[`x0`,`y1`]],ST=function(e){L(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.updateTransform=function(e,t,n){t.eachSeries(function(e){var t=Rw.getMarkerModelFromSeries(e,`markArea`);if(t){var r=t.getData();r.each(function(t){var i=u(xT,function(i){return bT(r,t,i,e,n)});r.setItemLayout(t,i),r.getItemGraphicEl(t).setShape(`points`,i)})}},this)},t.prototype.renderSeries=function(e,t,n,r){var i=e.coordinateSystem,a=e.id,o=e.getData(),s=this.markerGroupMap,c=s.get(a)||s.set(a,{group:new W});this.group.add(c.group),this.markKeep(c);var l=CT(i,e,t);t.setData(l),l.each(function(t){var n=u(xT,function(n){return bT(l,t,n,e,r)}),a=i.getAxis(`x`).scale,s=i.getAxis(`y`).scale,c=a.getExtent(),d=s.getExtent(),f=[a.parse(l.get(`x0`,t)),a.parse(l.get(`x1`,t))],p=[s.parse(l.get(`y0`,t)),s.parse(l.get(`y1`,t))];S(f),S(p);var m=c[0]>f[1]||c[1]<f[0]||d[0]>p[1]||d[1]<p[0];l.setItemLayout(t,{points:n,allClipped:m});var h=l.getItemModel(t),g=h.getModel(`itemStyle`).getItemStyle(),_=h.get(`z2`),v=nt(o,`color`);g.fill||(g.fill=v,R(g.fill)&&(g.fill=Gr(g.fill,.4))),g.stroke||=v,l.setItemVisual(t,`style`,g),l.setItemVisual(t,`z2`,z(_,0))}),l.diff(hT(c).data).add(function(e){var t=l.getItemLayout(e),n=l.getItemVisual(e,`z2`);if(!t.allClipped){var r=new fi({z2:z(n,0),shape:{points:t.points}});l.setItemGraphicEl(e,r),c.group.add(r)}}).update(function(e,n){var r=hT(c).data.getItemGraphicEl(n),i=l.getItemLayout(e),a=l.getItemVisual(e,`z2`);i.allClipped?r&&c.group.remove(r):(r?yn(r,{z2:z(a,0),shape:{points:i.points}},t,e):r=new fi({shape:{points:i.points}}),l.setItemGraphicEl(e,r),c.group.add(r))}).remove(function(e){var t=hT(c).data.getItemGraphicEl(e);c.group.remove(t)}).execute(),l.eachItemGraphicEl(function(e,n){var r=l.getItemModel(n),i=l.getItemVisual(n,`style`);e.useStyle(l.getItemVisual(n,`style`)),Lt(e,Un(r),{labelFetcher:t,labelDataIndex:n,defaultText:l.getName(n)||``,inheritColor:R(i.fill)?Gr(i.fill,1):Z.color.neutral99}),la(e,r),Aa(e,null,null,r.get([`emphasis`,`disabled`])),H(e).dataModel=t}),hT(c).data=l,c.group.silent=t.get(`silent`)||e.get(`silent`)},t.type=`markArea`,t}(Qw);function CT(e,t,n){var r,i,a=[`x0`,`y0`,`x1`,`y1`];if(e){var o=u(e&&e.dimensions,function(e){var n=t.getData();return G(G({},n.getDimensionInfo(n.mapDimension(e))||{}),{name:e,ordinalMeta:null})});i=u(a,function(e,t){return{name:e,type:o[t%2].type}}),r=new xo(i,n)}else i=[{name:`value`,type:`float`}],r=new xo(i,n);var s=u(n.get(`data`),Q(gT,t,e,n));e&&(s=ca(s,Q(yT,e)));var c=e?function(e,t,n,r){var a=e.coord[Math.floor(r/2)][r%2];return je(a,i[r])}:function(e,t,n,r){return je(e.value,i[r])};return r.initData(s,null,c),r.hasItemOption=!0,r}function wT(e){e.registerComponentModel(mT),e.registerComponentView(ST),e.registerPreprocessor(function(e){Fw(e.series,`markArea`)&&(e.markArea=e.markArea||{})})}var TT=function(e,t){if(t===`all`)return{type:`all`,title:e.getLocaleModel().get([`legend`,`selector`,`all`])};if(t===`inverse`)return{type:`inverse`,title:e.getLocaleModel().get([`legend`,`selector`,`inverse`])}},ET=function(e){L(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.layoutMode={type:`box`,ignoreSize:!0},n}return t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n),e.selected=e.selected||{},this._updateSelector(e)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),this._updateSelector(t)},t.prototype._updateSelector=function(e){var t=e.selector,n=this.ecModel;t===!0&&(t=e.selector=[`all`,`inverse`]),B(t)&&J(t,function(e,r){R(e)&&(e={type:e}),t[r]=Vr(e,TT(n,e.type))})},t.prototype.optionUpdated=function(){this._updateData(this.ecModel);var e=this._data;if(e[0]&&this.get(`selectedMode`)===`single`){for(var t=!1,n=0;n<e.length;n++){var r=e[n].get(`name`);if(this.isSelected(r)){this.select(r),t=!0;break}}!t&&this.select(e[0].get(`name`))}},t.prototype._updateData=function(e){var t=[],n=[];e.eachRawSeries(function(r){var i=r.name;n.push(i);var a;if(r.legendVisualProvider){var o=r.legendVisualProvider.getAllNames();e.isSeriesFiltered(r)||(n=n.concat(o)),o.length?t=t.concat(o):a=!0}else a=!0;a&&Pi(r)&&t.push(r.name)}),this._availableNames=n;var r=this.get(`data`)||t,i=q(),a=u(r,function(e){return(R(e)||te(e))&&(e={name:e}),i.get(e.name)?null:(i.set(e.name,!0),new ii(e,this,this.ecModel))},this);this._data=ca(a,function(e){return!!e})},t.prototype.getData=function(){return this._data},t.prototype.select=function(e){var t=this.option.selected;if(this.get(`selectedMode`)===`single`){var n=this._data;J(n,function(e){t[e.get(`name`)]=!1})}t[e]=!0},t.prototype.unSelect=function(e){this.get(`selectedMode`)!==`single`&&(this.option.selected[e]=!1)},t.prototype.toggleSelected=function(e){var t=this.option.selected;t.hasOwnProperty(e)||(t[e]=!0),this[t[e]?`unSelect`:`select`](e)},t.prototype.allSelect=function(){var e=this._data,t=this.option.selected;J(e,function(e){t[e.get(`name`,!0)]=!0})},t.prototype.inverseSelect=function(){var e=this._data,t=this.option.selected;J(e,function(e){var n=e.get(`name`,!0);t.hasOwnProperty(n)||(t[n]=!0),t[n]=!t[n]})},t.prototype.isSelected=function(e){var t=this.option.selected;return!(t.hasOwnProperty(e)&&!t[e])&&Sa(this._availableNames,e)>=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}(ra),DT=Q,OT=J,kT=W,AT=function(e){L(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.newlineDisabled=!1,n}return t.prototype.init=function(){this.group.add(this._contentGroup=new kT),this.group.add(this._selectorGroup=new kT),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(e,t,n){var r=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),e.get(`show`,!0)){var i=e.get(`align`),a=e.get(`orient`);(!i||i===`auto`)&&(i=e.get(`left`)===`right`&&a===`vertical`?`right`:`left`);var o=e.get(`selector`,!0),s=e.get(`selectorPosition`,!0);o&&(!s||s===`auto`)&&(s=a===`horizontal`?`end`:`start`),this.renderInner(i,e,t,n,o,a,s);var c=gr(e,n).refContainer,l=e.getBoxLayoutParams(),u=e.get(`padding`),d=Cr(l,c,u),f=this.layoutInner(e,i,d,r,o,s),p=Cr(ai({width:f.width,height:f.height},l),c,u);this.group.x=p.x-f.x,this.group.y=p.y-f.y,this.group.markRedraw(),this.group.add(this._backgroundEl=JC(f,e))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(e,t,n,r,i,a,o){var s=this.getContentGroup(),c=q(),l=t.get(`selectedMode`),u=t.get(`triggerEvent`),d=[];n.eachRawSeries(function(e){!e.get(`legendHoverLink`)&&d.push(e.id)}),OT(t.getData(),function(i,a){var o=this,f=i.get(`name`);if(!this.newlineDisabled&&(f===``||f===`
`)){var p=new kT;p.newline=!0,s.add(p);return}var m=n.getSeriesByName(f)[0];if(!c.get(f))if(m){var h=m.getData(),g=h.getVisual(`legendLineStyle`)||{},_=h.getVisual(`legendIcon`),v=h.getVisual(`style`),y=this._createItem(m,f,a,i,t,e,g,v,_,l,r);y.on(`click`,DT(NT,f,null,r,d)).on(`mouseover`,DT(PT,m.name,null,r,d)).on(`mouseout`,DT(FT,m.name,null,r,d)),n.ssr&&y.eachChild(function(e){var t=H(e);t.seriesIndex=m.seriesIndex,t.dataIndex=a,t.ssrType=`legend`}),u&&y.eachChild(function(e){o.packEventData(e,t,m,a,f)}),c.set(f,!0)}else n.eachRawSeries(function(o){var s=this;if(!c.get(f)&&o.legendVisualProvider){var p=o.legendVisualProvider;if(!p.containName(f))return;var m=p.indexOfName(f),h=p.getItemVisual(m,`style`),g=p.getItemVisual(m,`legendIcon`),_=Rr(h.fill);_&&_[3]===0&&(_[3]=.2,h=G(G({},h),{fill:Xe(_,`rgba`)}));var v=this._createItem(o,f,a,i,t,e,{},h,g,l,r);v.on(`click`,DT(NT,null,f,r,d)).on(`mouseover`,DT(PT,null,f,r,d)).on(`mouseout`,DT(FT,null,f,r,d)),n.ssr&&v.eachChild(function(e){var t=H(e);t.seriesIndex=o.seriesIndex,t.dataIndex=a,t.ssrType=`legend`}),u&&v.eachChild(function(e){s.packEventData(e,t,o,a,f)}),c.set(f,!0)}},this)},this),i&&this._createSelector(i,t,r,a,o)},t.prototype.packEventData=function(e,t,n,r,i){var a={componentType:`legend`,componentIndex:t.componentIndex,dataIndex:r,value:i,seriesIndex:n.seriesIndex};H(e).eventData=a},t.prototype._createSelector=function(e,t,n,r,i){var a=this.getSelectorGroup();OT(e,function(e){var r=e.type,i=new j({style:{x:0,y:0,align:`center`,verticalAlign:`middle`},onclick:function(){n.dispatchAction({type:r===`all`?`legendAllSelect`:`legendInverseSelect`,legendId:t.id})}});a.add(i),Lt(i,{normal:t.getModel(`selectorLabel`),emphasis:t.getModel([`emphasis`,`selectorLabel`])},{defaultText:e.title}),Xn(i)})},t.prototype._createItem=function(e,t,n,r,i,a,o,s,c,l,u){var f=e.visualDrawType,p=i.get(`itemWidth`),m=i.get(`itemHeight`),h=i.isSelected(t),g=r.get(`symbolRotate`),_=r.get(`symbolKeepAspect`),v=r.get(`icon`);c=v||c||`roundRect`;var y=jT(c,r,o,s,f,h,u),b=new kT,x=r.getModel(`textStyle`);if(V(e.getLegendIcon)&&(!v||v===`inherit`))b.add(e.getLegendIcon({itemWidth:p,itemHeight:m,icon:c,iconRotate:g,itemStyle:y.itemStyle,lineStyle:y.lineStyle,symbolKeepAspect:_}));else{var S=v===`inherit`&&e.getData().getVisual(`symbol`)?g===`inherit`?e.getData().getVisual(`symbolRotate`):g:0;b.add(MT({itemWidth:p,itemHeight:m,icon:c,iconRotate:S,itemStyle:y.itemStyle,lineStyle:y.lineStyle,symbolKeepAspect:_}))}var C=a===`left`?p+5:-5,w=a,T=i.get(`formatter`),E=t;R(T)&&T?E=T.replace(`{name}`,t??``):V(T)&&(E=T(t));var D=h?x.getTextColor():r.get(`inactiveColor`);b.add(new j({style:sa(x,{text:E,x:C,y:m/2,fill:D,align:w,verticalAlign:`middle`},{inheritColor:D})}));var O=new d({shape:b.getBoundingRect(),style:{fill:`transparent`}}),k=r.getModel(`tooltip`);return k.get(`show`)&&Fa({el:O,componentModel:i,itemName:t,itemTooltipOption:k.option}),b.add(O),b.eachChild(function(e){e.silent=!0}),O.silent=!l,this.getContentGroup().add(b),Xn(b),b.__legendDataIndex=n,b},t.prototype.layoutInner=function(e,t,n,r,i,a){var o=this.getContentGroup(),s=this.getSelectorGroup();ir(e.get(`orient`),o,e.get(`itemGap`),n.width,n.height);var c=o.getBoundingRect(),l=[-c.x,-c.y];if(s.markRedraw(),o.markRedraw(),i){ir(`horizontal`,s,e.get(`selectorItemGap`,!0));var u=s.getBoundingRect(),d=[-u.x,-u.y],f=e.get(`selectorButtonGap`,!0),p=e.getOrient().index,m=p===0?`width`:`height`,h=p===0?`height`:`width`,g=p===0?`y`:`x`;a===`end`?d[p]+=c[m]+f:l[p]+=u[m]+f,d[1-p]+=c[h]/2-u[h]/2,s.x=d[0],s.y=d[1],o.x=l[0],o.y=l[1];var _={x:0,y:0};return _[m]=c[m]+f+u[m],_[h]=Math.max(c[h],u[h]),_[g]=Math.min(0,u[g]+d[1-p]),_}else return o.x=l[0],o.y=l[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type=`legend.plain`,t}(p);function jT(e,t,n,r,i,a,o){function s(e,t){e.lineWidth===`auto`&&(e.lineWidth=t.lineWidth>0?2:0),OT(e,function(n,r){e[r]===`inherit`&&(e[r]=t[r])})}var c=t.getModel(`itemStyle`),l=c.getItemStyle(),u=e.lastIndexOf(`empty`,0)===0?`fill`:`stroke`,d=c.getShallow(`decal`);l.decal=!d||d===`inherit`?r.decal:ia(d,o),l.fill===`inherit`&&(l.fill=r[i]),l.stroke===`inherit`&&(l.stroke=r[u]),l.opacity===`inherit`&&(l.opacity=(i===`fill`?r:n).opacity),s(l,r);var f=t.getModel(`lineStyle`),p=f.getLineStyle();if(s(p,n),l.fill===`auto`&&(l.fill=r.fill),l.stroke===`auto`&&(l.stroke=r.fill),p.stroke===`auto`&&(p.stroke=r.fill),!a){var m=t.get(`inactiveBorderWidth`),h=l[u];l.lineWidth=m===`auto`?r.lineWidth>0&&h?2:0:l.lineWidth,l.fill=t.get(`inactiveColor`),l.stroke=t.get(`inactiveBorderColor`),p.stroke=f.get(`inactiveColor`),p.lineWidth=f.get(`inactiveWidth`)}return{itemStyle:l,lineStyle:p}}function MT(e){var t=e.icon||`roundRect`,n=va(t,0,0,e.itemWidth,e.itemHeight,e.itemStyle.fill,e.symbolKeepAspect);return n.setStyle(e.itemStyle),n.rotation=(e.iconRotate||0)*Math.PI/180,n.setOrigin([e.itemWidth/2,e.itemHeight/2]),t.indexOf(`empty`)>-1&&(n.style.stroke=n.style.fill,n.style.fill=Z.color.neutral00,n.style.lineWidth=2),n}function NT(e,t,n,r){FT(e,t,n,r),n.dispatchAction({type:`legendToggleSelect`,name:e??t}),PT(e,t,n,r)}function PT(e,t,n,r){n.usingTHL()||n.dispatchAction({type:`highlight`,seriesName:e,name:t,excludeSeriesId:r})}function FT(e,t,n,r){n.usingTHL()||n.dispatchAction({type:`downplay`,seriesName:e,name:t,excludeSeriesId:r})}function IT(e,t,n){var r=e===`allSelect`||e===`inverseSelect`,i={},a=[];n.eachComponent({mainType:`legend`,query:t},function(n){r?n[e]():n[e](t.name),LT(n,i),a.push(n.componentIndex)});var o={};return n.eachComponent(`legend`,function(e){J(i,function(t,n){e[t?`select`:`unSelect`](n)}),LT(e,o)}),r?{selected:o,legendIndex:a}:{name:t.name,selected:o}}function LT(e,t){var n=t||{};return J(e.getData(),function(t){var r=t.get(`name`);if(!(r===`
`||r===``)){var i=e.isSelected(r);K(n,r)?n[r]=n[r]&&i:n[r]=i}}),n}function RT(e){e.registerAction(`legendToggleSelect`,`legendselectchanged`,Q(IT,`toggleSelected`)),e.registerAction(`legendAllSelect`,`legendselectall`,Q(IT,`allSelect`)),e.registerAction(`legendInverseSelect`,`legendinverseselect`,Q(IT,`inverseSelect`)),e.registerAction(`legendSelect`,`legendselected`,Q(IT,`select`)),e.registerAction(`legendUnSelect`,`legendunselected`,Q(IT,`unSelect`))}var zT=ji(BT);function BT(e){var t=e.findComponents({mainType:`legend`});t&&t.length&&e.filterSeries(function(e){for(var n=0;n<t.length;n++)if(!t[n].isSelected(e.name))return!1;return!0})}function VT(e){e.registerComponentModel(ET),e.registerComponentView(AT),e.registerProcessor(e.PRIORITY.PROCESSOR.SERIES_FILTER,zT),e.registerSubTypeDefaulter(`legend`,function(){return`plain`}),RT(e)}var HT=function(e){L(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.setScrollDataIndex=function(e){this.option.scrollDataIndex=e},t.prototype.init=function(t,n,r){var i=kr(t);e.prototype.init.call(this,t,n,r),UT(this,t,i)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),UT(this,this.option,t)},t.type=`legend.scroll`,t.defaultOption=wi(ET.defaultOption,{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:`end`,pageFormatter:`{current}/{total}`,pageIcons:{horizontal:[`M0,0L12,-10L12,10z`,`M0,0L-12,-10L-12,10z`],vertical:[`M0,0L20,0L10,-20z`,`M0,0L20,0L10,20z`]},pageIconColor:Z.color.accent50,pageIconInactiveColor:Z.color.accent10,pageIconSize:15,pageTextStyle:{color:Z.color.tertiary},animationDurationUpdate:800}),t}(ET);function UT(e,t,n){var r=e.getOrient(),i=[1,1];i[r.index]=0,Mn(t,n,{type:`box`,ignoreSize:!!i})}var WT=W,GT=[`width`,`height`],KT=[`x`,`y`],qT=function(e){L(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.newlineDisabled=!0,n._currentIndex=0,n}return t.prototype.init=function(){e.prototype.init.call(this),this.group.add(this._containerGroup=new WT),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new WT)},t.prototype.resetInner=function(){e.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},t.prototype.renderInner=function(t,n,r,i,a,o,s){var c=this;e.prototype.renderInner.call(this,t,n,r,i,a,o,s);var l=this._controllerGroup,u=n.get(`pageIconSize`,!0),d=B(u)?u:[u,u];p(`pagePrev`,0);var f=n.getModel(`pageTextStyle`);l.add(new j({name:`pageText`,style:{text:`xx/xx`,fill:f.getTextColor(),font:f.getFont(),verticalAlign:`middle`,align:`center`},silent:!0})),p(`pageNext`,1);function p(e,t){var r=e+`DataIndex`,a=k(n.get(`pageIcons`,!0)[n.getOrient().name][t],{onclick:X(c._pageGo,c,r,n,i)},{x:-d[0]/2,y:-d[1]/2,width:d[0],height:d[1]});a.name=e,l.add(a)}},t.prototype.layoutInner=function(e,t,n,r,i,a){var o=this.getSelectorGroup(),s=e.getOrient().index,c=GT[s],l=KT[s],u=GT[1-s],d=KT[1-s];i&&ir(`horizontal`,o,e.get(`selectorItemGap`,!0));var f=e.get(`selectorButtonGap`,!0),p=o.getBoundingRect(),m=[-p.x,-p.y],h=ta(n);i&&(h[c]=n[c]-p[c]-f);var g=this._layoutContentAndController(e,r,h,s,c,u,d,l);if(i){if(a===`end`)m[s]+=g[c]+f;else{var _=p[c]+f;m[s]-=_,g[l]-=_}g[c]+=p[c]+f,m[1-s]+=g[d]+g[u]/2-p[u]/2,g[u]=Math.max(g[u],p[u]),g[d]=Math.min(g[d],p[d]+m[1-s]),o.x=m[0],o.y=m[1],o.markRedraw()}return g},t.prototype._layoutContentAndController=function(e,t,n,r,i,a,o,s){var c=this.getContentGroup(),l=this._containerGroup,u=this._controllerGroup;ir(e.get(`orient`),c,e.get(`itemGap`),r?n.width:null,r?null:n.height),ir(`horizontal`,u,e.get(`pageButtonItemGap`,!0));var f=c.getBoundingRect(),p=u.getBoundingRect(),m=this._showController=f[i]>n[i],h=[-f.x,-f.y];t||(h[r]=c[s]);var g=[0,0],_=[-p.x,-p.y],v=z(e.get(`pageButtonGap`,!0),e.get(`itemGap`,!0));m&&(e.get(`pageButtonPosition`,!0)===`end`?_[r]+=n[i]-p[i]:g[r]+=p[i]+v),_[1-r]+=f[a]/2-p[a]/2,c.setPosition(h),l.setPosition(g),u.setPosition(_);var y={x:0,y:0};if(y[i]=m?n[i]:f[i],y[a]=Math.max(f[a],p[a]),y[o]=Math.min(0,p[o]+_[1-r]),l.__rectSize=n[i],m){var b={x:0,y:0};b[i]=Math.max(n[i]-p[i]-v,0),b[a]=y[a],l.setClipPath(new d({shape:b})),l.__rectSize=b[i]}else u.eachChild(function(e){e.attr({invisible:!0,silent:!0})});var x=this._getPageInfo(e);return x.pageIndex!=null&&yn(c,{x:x.contentPosition[0],y:x.contentPosition[1]},m?e:null),this._updatePageInfoView(e,x),y},t.prototype._pageGo=function(e,t,n){var r=this._getPageInfo(t)[e];r!=null&&n.dispatchAction({type:`legendScroll`,scrollDataIndex:r,legendId:t.id})},t.prototype._updatePageInfoView=function(e,t){var n=this._controllerGroup;J([`pagePrev`,`pageNext`],function(r){var i=t[r+`DataIndex`]!=null,a=n.childOfName(r);a&&(a.setStyle(`fill`,i?e.get(`pageIconColor`,!0):e.get(`pageIconInactiveColor`,!0)),a.cursor=i?`pointer`:`default`)});var r=n.childOfName(`pageText`),i=e.get(`pageFormatter`),a=t.pageIndex,o=a==null?0:a+1,s=t.pageCount;r&&i&&r.setStyle(`text`,R(i)?i.replace(`{current}`,o==null?``:o+``).replace(`{total}`,s==null?``:s+``):i({current:o,total:s}))},t.prototype._getPageInfo=function(e){var t=e.get(`scrollDataIndex`,!0),n=this.getContentGroup(),r=this._containerGroup.__rectSize,i=e.getOrient().index,a=GT[i],o=KT[i],s=this._findTargetItemIndex(t),c=n.children(),l=c[s],u=c.length,d=+!!u,f={contentPosition:[n.x,n.y],pageCount:d,pageIndex:d-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!l)return f;var p=v(l);f.contentPosition[i]=-p.s;for(var m=s+1,h=p,g=p,_=null;m<=u;++m)_=v(c[m]),(!_&&g.e>h.s+r||_&&!y(_,h.s))&&(h=g.i>h.i?g:_,h&&(f.pageNextDataIndex??=h.i,++f.pageCount)),g=_;for(var m=s-1,h=p,g=p,_=null;m>=-1;--m)_=v(c[m]),(!_||!y(g,_.s))&&h.i<g.i&&(g=h,f.pagePrevDataIndex??=h.i,++f.pageCount,++f.pageIndex),h=_;return f;function v(e){if(e){var t=e.getBoundingRect(),n=t[o]+e[o];return{s:n,e:n+t[a],i:e.__legendDataIndex}}}function y(e,t){return e.e>=t&&e.s<=t+r}},t.prototype._findTargetItemIndex=function(e){if(!this._showController)return 0;var t,n=this.getContentGroup(),r;return n.eachChild(function(n,i){var a=n.__legendDataIndex;r==null&&a!=null&&(r=i),a===e&&(t=i)}),t??r},t.type=`legend.scroll`,t}(AT);function JT(e){e.registerAction(`legendScroll`,`legendscroll`,function(e,t){var n=e.scrollDataIndex;n!=null&&t.eachComponent({mainType:`legend`,subType:`scroll`,query:e},function(e){e.setScrollDataIndex(n)})})}function YT(e){Yc(VT),e.registerComponentModel(HT),e.registerComponentView(qT),JT(e)}function XT(e){Yc(VT),Yc(YT)}var ZT=function(e){L(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`dataZoom.inside`,t.defaultOption=wi(BC.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),t}(BC),QT=$();function $T(e,t,n){QT(e).coordSysRecordMap.each(function(e){var r=e.dataZoomInfoMap.get(t.uid);r&&(r.getRange=n)})}function eE(e,t){for(var n=QT(e).coordSysRecordMap,r=n.keys(),i=0;i<r.length;i++){var a=r[i],o=n.get(a),s=o.dataZoomInfoMap;if(s){var c=t.uid;s.get(c)&&(s.removeKey(c),s.keys().length||tE(n,o))}}}function tE(e,t){if(t){e.removeKey(t.model.uid);var n=t.controller;n&&n.dispose()}}function nE(e,t){var n={model:t,containsPoint:Q(iE,t),dispatchAction:Q(rE,e),dataZoomInfoMap:null,controller:null},r=n.controller=new hg(e.getZr());return J([`pan`,`zoom`,`scrollMove`],function(e){r.on(e,function(t){var r=[];n.dataZoomInfoMap.each(function(i){if(t.isAvailableBehavior(i.model.option)){var a=(i.getRange||{})[e],o=a&&a(i.dzReferCoordSysInfo,n.model.mainType,n.controller,t);!i.model.get(`disabled`,!0)&&o&&r.push({dataZoomId:i.model.id,start:o[0],end:o[1]})}}),r.length&&n.dispatchAction(r)})}),n}function rE(e,t){e.isDisposed()||e.dispatchAction({type:`dataZoom`,animation:{easing:`cubicOut`,duration:100},batch:t})}function iE(e,t,n,r){return e.coordinateSystem.containPoint([n,r])}function aE(e,t,n){var r,i=`type_`,a={type_true:2,type_move:1,type_false:0,type_undefined:-1},o=!0,s,c;return e.each(function(e){var t=e.model,n=t.get(`disabled`,!0)?!1:t.get(`zoomLock`,!0)?`move`:!0;a[i+n]>a[i+r]&&(r=n),o&&=t.get(`preventDefaultMouseMove`,!0),s=z(t.get(`cursorGrab`,!0),s),c=z(t.get(`cursorGrabbing`,!0),c)}),{controlType:r,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!o,api:n,zInfo:{component:t.model},triggerInfo:{roamTrigger:null,isInSelf:t.containsPoint},cursorGrab:s,cursorGrabbing:c}}}function oE(e){e.registerUpdateLifecycle(`coordsys:aftercreate`,function(e,t){var n=QT(t),r=n.coordSysRecordMap||=q();r.each(function(e){e.dataZoomInfoMap=null}),e.eachComponent({mainType:`dataZoom`,subType:`inside`},function(e){J(PC(e).infoList,function(n){var i=n.model.uid,a=r.get(i)||r.set(i,nE(t,n.model));(a.dataZoomInfoMap||=q()).set(e.uid,{dzReferCoordSysInfo:n,model:e,getRange:null})})}),r.each(function(e){var n=e.controller,i,a=e.dataZoomInfoMap;if(a){var o=a.keys()[0];o!=null&&(i=a.get(o))}if(!i){tE(r,e);return}var s=aE(a,e,t);n.enable(s.controlType,s.opt),we(e,`dispatchAction`,i.model.get(`throttle`,!0),`fixRate`)})})}var sE=function(e){L(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=`dataZoom.inside`,t}return t.prototype.render=function(t,n,r){if(e.prototype.render.apply(this,arguments),t.noTarget()){this._clear();return}this.range=t.getPercentRange(),$T(r,t,{pan:X(cE.pan,this),zoom:X(cE.zoom,this),scrollMove:X(cE.scrollMove,this)})},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){eE(this.api,this.dataZoomModel),this.range=null},t.type=`dataZoom.inside`,t}(HC),cE={zoom:function(e,t,n,r){var i=this.range,a=i.slice(),o=e.axisModels[0];if(o){var s=uE[t](null,[r.originX,r.originY],o,n,e),c=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(a[1]-a[0])+a[0],l=Math.max(1/r.scale,0);a[0]=(a[0]-c)*l+c,a[1]=(a[1]-c)*l+c;var u=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(by(0,a,[0,100],0,u.minSpan,u.maxSpan),this.range=a,i[0]!==a[0]||i[1]!==a[1])return a}},pan:lE(function(e,t,n,r,i,a){var o=uE[r]([a.oldX,a.oldY],[a.newX,a.newY],t,i,n);return o.signal*(e[1]-e[0])*o.pixel/o.pixelLength}),scrollMove:lE(function(e,t,n,r,i,a){return uE[r]([0,0],[a.scrollDelta,a.scrollDelta],t,i,n).signal*(e[1]-e[0])*a.scrollDelta})};function lE(e){return function(t,n,r,i){var a=this.range,o=a.slice(),s=t.axisModels[0];if(s&&(by(e(o,s,t,n,r,i),o,[0,100],`all`),this.range=o,a[0]!==o[0]||a[1]!==o[1]))return o}}var uE={grid:function(e,t,n,r,i){var a=n.axis,o={},s=i.model.coordinateSystem.getRect();return e||=[0,0],a.dim===`x`?(o.pixel=t[0]-e[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=a.inverse?1:-1):(o.pixel=t[1]-e[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=a.inverse?-1:1),o},polar:function(e,t,n,r,i){var a=n.axis,o={},s=i.model.coordinateSystem,c=s.getRadiusAxis().getExtent(),l=s.getAngleAxis().getExtent();return e=e?s.pointToCoord(e):[0,0],t=s.pointToCoord(t),n.mainType===`radiusAxis`?(o.pixel=t[0]-e[0],o.pixelLength=c[1]-c[0],o.pixelStart=c[0],o.signal=a.inverse?1:-1):(o.pixel=t[1]-e[1],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=a.inverse?-1:1),o},singleAxis:function(e,t,n,r,i){var a=n.axis,o=i.model.coordinateSystem.getRect(),s={};return e||=[0,0],a.orient===`horizontal`?(s.pixel=t[0]-e[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=a.inverse?1:-1):(s.pixel=t[1]-e[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=a.inverse?-1:1),s}};function dE(e){qC(e),e.registerComponentModel(ZT),e.registerComponentView(sE),oE(e)}var fE=function(e){L(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`dataZoom.slider`,t.layoutMode=`box`,t.defaultOption=wi(BC.defaultOption,{show:!0,right:`ph`,top:`ph`,width:`ph`,height:`ph`,left:null,bottom:null,borderColor:Z.color.accent10,borderRadius:0,backgroundColor:Z.color.transparent,dataBackground:{lineStyle:{color:Z.color.accent30,width:.5},areaStyle:{color:Z.color.accent20,opacity:.2}},selectedDataBackground:{lineStyle:{color:Z.color.accent40,width:.5},areaStyle:{color:Z.color.accent20,opacity:.3}},fillerColor:`rgba(135,175,274,0.2)`,handleIcon:`path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z`,handleSize:`100%`,handleStyle:{color:Z.color.neutral00,borderColor:Z.color.accent20},moveHandleSize:7,moveHandleIcon:`path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z`,moveHandleStyle:{color:Z.color.accent40,opacity:.5},showDetail:!0,showDataShadow:`auto`,realtime:!0,zoomLock:!1,textStyle:{color:Z.color.tertiary},brushSelect:!0,brushStyle:{color:Z.color.accent30,opacity:.3},emphasis:{handleLabel:{show:!0},handleStyle:{borderColor:Z.color.accent40},moveHandleStyle:{opacity:.8}},defaultLocationEdgeGap:15}),t}(BC),pE=d,mE=1,hE=30,gE=7,_E=`horizontal`,vE=`vertical`,yE=5,bE=[`line`,`bar`,`candlestick`,`scatter`],xE={easing:`cubicOut`,duration:100,delay:0},SE=function(e){L(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n._displayables={},n}return t.prototype.init=function(e,t){this.api=t,this._onBrush=X(this._onBrush,this),this._onBrushEnd=X(this._onBrushEnd,this)},t.prototype.render=function(t,n,r,i){if(e.prototype.render.apply(this,arguments),we(this,`_dispatchZoomAction`,t.get(`throttle`),`fixRate`),this._orient=t.getOrient(),t.get(`show`)===!1){this.group.removeAll();return}if(t.noTarget()){this._clear(),this.group.removeAll();return}(!i||i.type!==`dataZoom`||i.from!==this.uid)&&this._buildView(),this._updateView()},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){ie(this,`_dispatchZoomAction`);var e=this.api.getZr();e.off(`mousemove`,this._onBrush),e.off(`mouseup`,this._onBrushEnd)},t.prototype._buildView=function(){var e=this.group;e.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var t=this._displayables.sliderGroup=new W;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),e.add(t),this._positionGroup()},t.prototype._resetLocation=function(){var e=this.dataZoomModel,t=this.api,n=e.get(`brushSelect`)?gE:0,r=gr(e,t).refContainer,i=this._findCoordRect(),a=e.get(`defaultLocationEdgeGap`,!0)||0,o=this._orient===_E?{right:r.width-i.x-i.width,top:r.height-hE-a-n,width:i.width,height:hE}:{right:a,top:i.y,width:hE,height:i.height},s=kr(e.option);J([`right`,`top`,`width`,`height`],function(e){s[e]===`ph`&&(s[e]=o[e])});var c=Cr(s,r);this._location={x:c.x,y:c.y},this._size=[c.width,c.height],this._orient===vE&&this._size.reverse()},t.prototype._positionGroup=function(){var e=this.group,t=this._location,n=this._orient,r=this.dataZoomModel.getFirstTargetAxisModel(),i=r&&r.get(`inverse`),a=this._displayables.sliderGroup,o=(this._dataShadowInfo||{}).otherAxisInverse;a.attr(n===_E&&!i?{scaleY:o?1:-1,scaleX:1}:n===_E&&i?{scaleY:o?1:-1,scaleX:-1}:n===vE&&!i?{scaleY:o?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:o?-1:1,scaleX:-1,rotation:Math.PI/2});var s=e.getBoundingRect([a]),c=isNaN(s.x)?0:s.x,l=isNaN(s.y)?0:s.y;e.x=t.x-c,e.y=t.y-l,e.markRedraw()},t.prototype._getViewExtent=function(){return[0,this._size[0]]},t.prototype._renderBackground=function(){var e=this.dataZoomModel,t=this._size,n=this._displayables.sliderGroup,r=e.get(`brushSelect`);n.add(new pE({silent:!0,shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:e.get(`backgroundColor`)},z2:-40}));var i=new pE({shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:`transparent`},z2:0,onclick:X(this._onClickPanel,this)}),a=this.api.getZr();r?(i.on(`mousedown`,this._onBrushStart,this),i.cursor=`crosshair`,a.on(`mousemove`,this._onBrush),a.on(`mouseup`,this._onBrushEnd)):(a.off(`mousemove`,this._onBrush),a.off(`mouseup`,this._onBrushEnd)),n.add(i)},t.prototype._renderDataShadow=function(){var e=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!e)return;var t=this._size,n=this._shadowSize||[],r=e.series,i=r.getRawData(),a=r.getShadowDim&&r.getShadowDim(),o=a&&i.getDimensionInfo(a)?r.getShadowDim():e.otherDim;if(o==null)return;var s=this._shadowPolygonPts,c=this._shadowPolylinePts;if(i!==this._shadowData||o!==this._shadowDim||t[0]!==n[0]||t[1]!==n[1]){var l=i.getDataExtent(e.thisDim),u=i.getDataExtent(o),d=(u[1]-u[0])*.3;u=[u[0]-d,u[1]+d];var f=[0,t[1]],p=[0,t[0]],m=[[t[0],0],[0,0]],h=[],g=p[1]/Math.max(1,i.count()-1),_=t[0]/(l[1]-l[0]),v=e.thisAxis.type===`time`,y=-g,b=Math.round(i.count()/t[0]),x;i.each([e.thisDim,o],function(e,t,n){if(b>0&&n%b){v||(y+=g);return}y=v?(+e-l[0])*_:y+g;var r=t==null||isNaN(t)||t===``,i=r?0:Y(t,u,f,!0);r&&!x&&n?(m.push([m[m.length-1][0],0]),h.push([h[h.length-1][0],0])):!r&&x&&(m.push([y,0]),h.push([y,0])),r||(m.push([y,i]),h.push([y,i])),x=r}),s=this._shadowPolygonPts=m,c=this._shadowPolylinePts=h}this._shadowData=i,this._shadowDim=o,this._shadowSize=[t[0],t[1]];var S=this.dataZoomModel;function C(e){var t=S.getModel(e?`selectedDataBackground`:`dataBackground`),n=new W,r=new fi({shape:{points:s},segmentIgnoreThreshold:1,style:t.getModel(`areaStyle`).getAreaStyle(),silent:!0,z2:-20}),i=new Yi({shape:{points:c},segmentIgnoreThreshold:1,style:t.getModel(`lineStyle`).getLineStyle(),silent:!0,z2:-19});return n.add(r),n.add(i),n}for(var w=0;w<3;w++){var T=C(w===1);this._displayables.sliderGroup.add(T),this._displayables.dataShadowSegs.push(T)}},t.prototype._prepareDataShadowInfo=function(){var e=this.dataZoomModel,t=e.get(`showDataShadow`);if(t!==!1){var n,r=this.ecModel;return e.eachTargetAxis(function(i,a){J(e.getAxisProxy(i,a).getTargetSeriesModels(),function(e){if(!n&&!(t!==!0&&Sa(bE,e.get(`type`))<0)){var o=r.getComponent(MC(i),a).axis,s=wE(i),c,l=e.coordinateSystem;s!=null&&l.getOtherAxis&&(c=l.getOtherAxis(o).inverse),s=e.getData().mapDimension(s),n={thisAxis:o,series:e,thisDim:e.getData().mapDimension(i),otherDim:s,otherAxisInverse:c}}},this)},this),n}},t.prototype._renderHandle=function(){var e=this.group,t=this._displayables,n=t.handles=[null,null],r=t.handleLabels=[null,null],i=this._displayables.sliderGroup,a=this._size,o=this.dataZoomModel,s=this.api,c=o.get(`borderRadius`)||0,l=o.get(`brushSelect`),u=t.filler=new pE({silent:l,style:{fill:o.get(`fillerColor`)},textConfig:{position:`inside`}});i.add(u),i.add(new pE({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:a[0],height:a[1],r:c},style:{stroke:o.get(`dataBackgroundColor`)||o.get(`borderColor`),lineWidth:mE,fill:Z.color.transparent}})),J([0,1],function(t){var a=o.get(`handleIcon`);!da[a]&&a.indexOf(`path://`)<0&&a.indexOf(`image://`)<0&&(a=`path://`+a);var s=va(a,-1,0,2,2,null,!0);s.attr({cursor:TE(this._orient),draggable:!0,drift:X(this._onDragMove,this,t),ondragend:X(this._onDragEnd,this),onmouseover:X(this._onOverDataInfoTriggerArea,this,!0),onmouseout:X(this._onOverDataInfoTriggerArea,this,!1),z2:5});var c=s.getBoundingRect(),l=o.get(`handleSize`);this._handleHeight=U(l,this._size[1]),this._handleWidth=c.width/c.height*this._handleHeight,s.setStyle(o.getModel(`handleStyle`).getItemStyle()),s.style.strokeNoScale=!0,s.rectHover=!0,s.ensureState(`emphasis`).style=o.getModel([`emphasis`,`handleStyle`]).getItemStyle(),Xn(s);var u=o.get(`handleColor`);u!=null&&(s.style.fill=u),i.add(n[t]=s);var d=o.getModel(`textStyle`),f=(o.get(`handleLabel`)||{}).show||!1;e.add(r[t]=new j({silent:!0,invisible:!f,style:sa(d,{x:0,y:0,text:``,verticalAlign:`middle`,align:`center`,fill:d.getTextColor(),font:d.getFont()}),z2:10}))},this);var f=u;if(l){var p=U(o.get(`moveHandleSize`),a[1]),m=t.moveHandle=new d({style:o.getModel(`moveHandleStyle`).getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:a[1]-.5,height:p}}),h=p*.8,g=t.moveHandleIcon=va(o.get(`moveHandleIcon`),-h/2,-h/2,h,h,Z.color.neutral00,!0);g.silent=!0,g.y=a[1]+p/2-.5,m.ensureState(`emphasis`).style=o.getModel([`emphasis`,`moveHandleStyle`]).getItemStyle();var _=Math.min(a[1]/2,Math.max(p,10));f=t.moveZone=new d({invisible:!0,shape:{y:a[1]-_,height:p+_}}),f.on(`mouseover`,function(){s.enterEmphasis(m)}).on(`mouseout`,function(){s.leaveEmphasis(m)}),i.add(m),i.add(g),i.add(f)}f.attr({draggable:!0,cursor:`grab`,drift:X(this._onActualMoveZoneDrift,this),ondragstart:X(this._onActualMoveZoneDragStart,this),ondragend:X(this._onActualMoveZoneDragEnd,this),onmouseover:X(this._onOverDataInfoTriggerArea,this,!0),onmouseout:X(this._onOverDataInfoTriggerArea,this,!1)})},t.prototype._resetInterval=function(){var e=this._range=this.dataZoomModel.getPercentRange(),t=this._getViewExtent();this._handleEnds=[Y(e[0],[0,100],t,!0),Y(e[1],[0,100],t,!0)]},t.prototype._updateInterval=function(e,t){var n=this.dataZoomModel,r=this._handleEnds,i=this._getViewExtent(),a=n.findRepresentativeAxisProxy().getMinMaxSpan(),o=[0,100];by(t,r,i,n.get(`zoomLock`)?`all`:e,a.minSpan==null?null:Y(a.minSpan,o,i,!0),a.maxSpan==null?null:Y(a.maxSpan,o,i,!0));var s=this._range,c=this._range=S([Y(r[0],i,o,!0),Y(r[1],i,o,!0)]);return!s||s[0]!==c[0]||s[1]!==c[1]},t.prototype._updateView=function(e){var t=this._displayables,n=this._handleEnds,r=S(n.slice()),i=this._size;J([0,1],function(e){var r=t.handles[e],a=this._handleHeight;r.attr({scaleX:a/2,scaleY:a/2,x:n[e]+(e?-1:1),y:i[1]/2-a/2})},this),t.filler.setShape({x:r[0],y:0,width:r[1]-r[0],height:i[1]});var a={x:r[0],width:r[1]-r[0]};t.moveHandle&&(t.moveHandle.setShape(a),t.moveZone.setShape(a),t.moveZone.getBoundingRect(),t.moveHandleIcon&&t.moveHandleIcon.attr(`x`,a.x+a.width/2));for(var o=t.dataShadowSegs,s=[0,r[0],r[1],i[0]],c=0;c<o.length;c++){var l=o[c],u=l.getClipPath();u||(u=new d,l.setClipPath(u)),u.setShape({x:s[c],y:0,width:s[c+1]-s[c],height:i[1]})}this._updateDataInfo(e)},t.prototype._updateDataInfo=function(e){var t=this.dataZoomModel,n=this._displayables,r=n.handleLabels,i=this._orient,a=[``,``];if(t.get(`showDetail`)){var o=t.findRepresentativeAxisProxy(),s=o.getAxisModel().axis.scale;if(o){var c=this._range,l;if(e){var u={start:c[0],end:c[1]},d=RC(t,o);if(d){var f=d.calculateDataWindow(u).percentInverted;u={start:f[0],end:f[1]}}l=o.calculateDataWindow(u)}else l=o.getWindow();a=[CE(t,0,l,s),CE(t,1,l,s)]}}var p=S(this._handleEnds.slice());m.call(this,0),m.call(this,1);function m(e){var t=Qe(n.handles[e].parent,this.group),o=Qt(e===0?`right`:`left`,t),s=this._handleWidth/2+yE,c=ee([p[e]+(e===0?-s:s),this._size[1]/2],t);r[e].setStyle({x:c[0],y:c[1],verticalAlign:i===_E?`middle`:o,align:i===_E?o:`center`,text:a[e]})}},t.prototype._onOverDataInfoTriggerArea=function(e){this._isOverDataInfoTriggerArea=e,this._showDataInfo(e)},t.prototype._showDataInfo=function(e){var t=(this.dataZoomModel.get(`handleLabel`)||{}).show||!1,n=this.dataZoomModel.getModel([`emphasis`,`handleLabel`]).get(`show`)||!1,r=e||this._dragging?n:t,i=this._displayables,a=i.handleLabels;a[0].attr(`invisible`,!r),a[1].attr(`invisible`,!r),i.moveHandle&&this.api[r?`enterEmphasis`:`leaveEmphasis`](i.moveHandle,1)},t.prototype._onActualMoveZoneDrift=function(e,t,n){this.api.getZr().setCursorStyle(`grabbing`),this._onDragMove(`all`,e,t,n)},t.prototype._onActualMoveZoneDragStart=function(e){e.target.attr(`cursor`,`grabbing`),this._showDataInfo(!0)},t.prototype._onActualMoveZoneDragEnd=function(e){e.target.attr(`cursor`,`grab`),this._onDragEnd()},t.prototype._onDragMove=function(e,t,n,r){this._dragging=!0,Cn(r.event);var i=this._displayables.sliderGroup.getLocalTransform(),a=ee([t,n],i,!0),o=this._updateInterval(e,a[0]),s=this.dataZoomModel.get(`realtime`);this._updateView(!s),o&&s&&this._dispatchZoomAction(!0)},t.prototype._onDragEnd=function(){this._dragging=!1,this._isOverDataInfoTriggerArea||this._showDataInfo(!1),!this.dataZoomModel.get(`realtime`)&&this._dispatchZoomAction(!1)},t.prototype._onClickPanel=function(e){var t=this._size,n=this._displayables.sliderGroup.transformCoordToLocal(e.offsetX,e.offsetY);if(!(n[0]<0||n[0]>t[0]||n[1]<0||n[1]>t[1])){var r=this._handleEnds,i=(r[0]+r[1])/2,a=this._updateInterval(`all`,n[0]-i);this._updateView(),a&&this._dispatchZoomAction(!1)}},t.prototype._onBrushStart=function(e){var t=e.offsetX,n=e.offsetY;this._brushStart=new Zt(t,n),this._brushing=!0,this._brushStartTime=+new Date},t.prototype._onBrushEnd=function(e){if(this._brushing){var t=this._displayables.brushRect;if(this._brushing=!1,t){t.attr(`ignore`,!0);var n=t.shape;if(!(+new Date-this._brushStartTime<200&&Math.abs(n.width)<5)){var r=this._getViewExtent(),i=[0,100],a=this._handleEnds=[n.x,n.x+n.width],o=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();by(0,a,r,0,o.minSpan==null?null:Y(o.minSpan,i,r,!0),o.maxSpan==null?null:Y(o.maxSpan,i,r,!0)),this._range=S([Y(a[0],r,i,!0),Y(a[1],r,i,!0)]),this._updateView(),this._dispatchZoomAction(!1)}}}},t.prototype._onBrush=function(e){this._brushing&&(Cn(e.event),this._updateBrushRect(e.offsetX,e.offsetY))},t.prototype._updateBrushRect=function(e,t){var n=this._displayables,r=this.dataZoomModel,i=n.brushRect;i||(i=n.brushRect=new pE({silent:!0,style:r.getModel(`brushStyle`).getItemStyle()}),n.sliderGroup.add(i)),i.attr(`ignore`,!1);var a=this._brushStart,o=this._displayables.sliderGroup,s=o.transformCoordToLocal(e,t),c=o.transformCoordToLocal(a.x,a.y),l=this._size;s[0]=Math.max(Math.min(l[0],s[0]),0),i.setShape({x:c[0],y:0,width:s[0]-c[0],height:l[1]})},t.prototype._dispatchZoomAction=function(e){var t=this._range;this.api.dispatchAction({type:`dataZoom`,from:this.uid,dataZoomId:this.dataZoomModel.id,animation:e?xE:null,start:t[0],end:t[1]})},t.prototype._findCoordRect=function(){var e,t=PC(this.dataZoomModel).infoList;if(!e&&t.length){var n=t[0].model.coordinateSystem;e=n.getRect&&n.getRect()}if(!e){var r=this.api.getWidth(),i=this.api.getHeight();e={x:r*.2,y:i*.2,width:r*.6,height:i*.6}}return e},t.type=`dataZoom.slider`,t}(HC);function CE(e,t,n,r){var i=e.get(`labelFormatter`),a=e.get(`labelPrecision`);(a==null||a===`auto`)&&(a=n.valuePrecision);var o=n.value[t],s=o==null||isNaN(o)?``:rs(r)||ts(r)?r.getLabel({value:Math.round(o)}):isFinite(a)?I(o,a,!0):o+``;return V(i)?i(o,s):R(i)?i.replace(`{value}`,s):s}function wE(e){return{x:`y`,y:`x`,radius:`angle`,angle:`radius`}[e]}function TE(e){return e===`vertical`?`ns-resize`:`ew-resize`}function EE(e){e.registerComponentModel(fE),e.registerComponentView(SE),qC(e)}var DE={get:function(e,t,n){var r=ta((OE[e]||{})[t]);return n&&B(r)?r[r.length-1]:r}},OE={color:{active:[`#006edd`,`#e0ffff`],inactive:[Z.color.transparent]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:[`circle`,`roundRect`,`diamond`],inactive:[`none`]},symbolSize:{active:[10,50],inactive:[0,0]}},kE=Y_.mapVisual,AE=Y_.eachVisual,jE=B,ME=J,NE=S,PE=Y,FE=function(e){L(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.stateList=[`inRange`,`outOfRange`],n.replacableOptionKeys=[`inRange`,`outOfRange`,`target`,`controller`,`color`],n.layoutMode={type:`box`,ignoreSize:!0},n.dataBound=[-1/0,1/0],n.targetVisuals={},n.controllerVisuals={},n}return t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n)},t.prototype.optionUpdated=function(e,t){var n=this.option;!t&&Aw(n,e,this.replacableOptionKeys),this.textStyleModel=this.getModel(`textStyle`),this.resetItemSize(),this.completeVisualOption()},t.prototype.resetVisual=function(e){var t=this.stateList;e=X(e,this),this.controllerVisuals=kw(this.option.controller,t,e),this.targetVisuals=kw(this.option.target,t,e)},t.prototype.getItemSymbol=function(){return null},t.prototype.getTargetSeriesIndices=function(){var e=this,t=this.option.seriesTargets;if(t){var n=[];return ME(t,function(t){if(t.seriesIndex!=null)n.push(t.seriesIndex);else if(t.seriesId!=null){var r;e.ecModel.eachSeries(function(e){e.id===t.seriesId&&(r=e)}),r&&n.push(r.componentIndex)}}),n}var r=this.option.seriesId,i=this.option.seriesIndex;i==null&&r==null&&(i=`all`);var a=pr(this.ecModel,`series`,{index:i,id:r},{useDefault:!1,enableAll:!0,enableNone:!1}).models;return u(a,function(e){return e.componentIndex})},t.prototype.eachTargetSeries=function(e,t){J(this.getTargetSeriesIndices(),function(n){var r=this.ecModel.getSeriesByIndex(n);r&&e.call(t,r)},this)},t.prototype.isTargetSeries=function(e){var t=!1;return this.eachTargetSeries(function(n){n===e&&(t=!0)}),t},t.prototype.formatValueText=function(e,t,n){var r=this.option,i=r.precision,a=this.dataBound,o=r.formatter,s;n||=[`<`,`>`],B(e)&&(e=e.slice(),s=!0);var c=t?e:s?[l(e[0]),l(e[1])]:l(e);if(R(o))return o.replace(`{value}`,s?c[0]:c).replace(`{value2}`,s?c[1]:c);if(V(o))return s?o(e[0],e[1]):o(e);if(s)return e[0]===a[0]?n[0]+` `+c[1]:e[1]===a[1]?n[1]+` `+c[0]:c[0]+` - `+c[1];return c;function l(e){return e===a[0]?`min`:e===a[1]?`max`:(+e).toFixed(Math.min(i,20))}},t.prototype.resetExtent=function(){var e=this.option,t=NE([e.min,e.max]);this._dataExtent=t},t.prototype.getDimension=function(e){var t=this,n=this.option.seriesTargets;if(n){var r=ka(n,function(n){return n.seriesIndex!=null&&n.seriesIndex===e||n.seriesId!=null&&n.seriesId===t.ecModel.getSeriesByIndex(e).id});if(r)return r.dimension}return this.option.dimension},t.prototype.getDataDimensionIndex=function(e){var t=e.hostModel.seriesIndex,n=this.getDimension(t);if(n!=null)return e.getDimensionIndex(n);for(var r=e.dimensions,i=r.length-1;i>=0;i--){var a=r[i],o=e.getDimensionInfo(a);if(!o.isCalculationCoord)return o.storeDimIndex}},t.prototype.getExtent=function(){return this._dataExtent.slice()},t.prototype.completeVisualOption=function(){var e=this.ecModel,t=this.option,n={inRange:t.inRange,outOfRange:t.outOfRange},r=t.target||={},i=t.controller||={};Vr(r,n),Vr(i,n);var a=this.isCategory();o.call(this,r),o.call(this,i),s.call(this,r,`inRange`,`outOfRange`),c.call(this,i);function o(n){jE(t.color)&&!n.inRange&&(n.inRange={color:t.color.slice().reverse()}),n.inRange=n.inRange||{color:e.get(`gradientColor`)}}function s(e,t,n){var r=e[t],i=e[n];r&&!i&&(i=e[n]={},ME(r,function(e,t){if(Y_.isValidType(t)){var n=DE.get(t,`inactive`,a);n!=null&&(i[t]=n,t===`color`&&!i.hasOwnProperty(`opacity`)&&!i.hasOwnProperty(`colorAlpha`)&&(i.opacity=[0,0]))}}))}function c(e){var t=(e.inRange||{}).symbol||(e.outOfRange||{}).symbol,n=(e.inRange||{}).symbolSize||(e.outOfRange||{}).symbolSize,r=this.get(`inactiveColor`),i=this.getItemSymbol()||`roundRect`;ME(this.stateList,function(o){var s=this.itemSize,c=e[o];c||=e[o]={color:a?r:[r]},c.symbol??=t&&ta(t)||(a?i:[i]),c.symbolSize??=n&&ta(n)||(a?s[0]:[s[0],s[0]]),c.symbol=kE(c.symbol,function(e){return e===`none`?i:e});var l=c.symbolSize;if(l!=null){var u=-1/0;AE(l,function(e){e>u&&(u=e)}),c.symbolSize=kE(l,function(e){return PE(e,[0,u],[0,s[0]],!0)})}},this)}},t.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get(`itemWidth`)),parseFloat(this.get(`itemHeight`))]},t.prototype.isCategory=function(){return!!this.option.categories},t.prototype.setSelected=function(e){},t.prototype.getSelected=function(){return null},t.prototype.getValueState=function(e){return null},t.prototype.getVisualMeta=function(e){return null},t.type=`visualMap`,t.dependencies=[`series`],t.defaultOption={show:!0,z:4,min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:`vertical`,backgroundColor:Z.color.transparent,borderColor:Z.color.borderTint,contentColor:Z.color.theme[0],inactiveColor:Z.color.disabled,borderWidth:0,padding:Z.size.m,textGap:10,precision:0,textStyle:{color:Z.color.secondary}},t}(ra),IE=[20,140],LE=function(e){L(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.optionUpdated=function(t,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(e){e.mappingMethod=`linear`,e.dataExtent=this.getExtent()}),this._resetRange()},t.prototype.resetItemSize=function(){e.prototype.resetItemSize.apply(this,arguments);var t=this.itemSize;(t[0]==null||isNaN(t[0]))&&(t[0]=IE[0]),(t[1]==null||isNaN(t[1]))&&(t[1]=IE[1])},t.prototype._resetRange=function(){var e=this.getExtent(),t=this.option.range;!t||t.auto?(e.auto=1,this.option.range=e):B(t)&&(t[0]>t[1]&&t.reverse(),t[0]=Math.max(t[0],e[0]),t[1]=Math.min(t[1],e[1]))},t.prototype.completeVisualOption=function(){e.prototype.completeVisualOption.apply(this,arguments),J(this.stateList,function(e){var t=this.option.controller[e].symbolSize;t&&t[0]!==t[1]&&(t[0]=t[1]/3)},this)},t.prototype.setSelected=function(e){this.option.range=e.slice(),this._resetRange()},t.prototype.getSelected=function(){var e=this.getExtent(),t=S((this.get(`range`)||[]).slice());return t[0]>e[1]&&(t[0]=e[1]),t[1]>e[1]&&(t[1]=e[1]),t[0]<e[0]&&(t[0]=e[0]),t[1]<e[0]&&(t[1]=e[0]),t},t.prototype.getValueState=function(e){var t=this.option.range,n=this.getExtent(),r=z(this.option.unboundedRange,!0);return(r&&t[0]<=n[0]||t[0]<=e)&&(r&&t[1]>=n[1]||e<=t[1])?`inRange`:`outOfRange`},t.prototype.findTargetDataIndices=function(e){var t=[];return this.eachTargetSeries(function(n){var r=[],i=n.getData();i.each(this.getDataDimensionIndex(i),function(t,n){e[0]<=t&&t<=e[1]&&r.push(n)},this),t.push({seriesId:n.id,dataIndex:r})},this),t},t.prototype.getVisualMeta=function(e){var t=RE(this,`outOfRange`,this.getExtent()),n=RE(this,`inRange`,this.option.range.slice()),r=[];function i(t,n){r.push({value:t,color:e(t,n)})}for(var a=0,o=0,s=n.length,c=t.length;o<c&&(!n.length||t[o]<=n[0]);o++)t[o]<n[a]&&i(t[o],`outOfRange`);for(var l=1;a<s;a++,l=0)l&&r.length&&i(n[a],`outOfRange`),i(n[a],`inRange`);for(var l=1;o<c;o++)(!n.length||n[n.length-1]<t[o])&&(l&&=(r.length&&i(r[r.length-1].value,`outOfRange`),0),i(t[o],`outOfRange`));var u=r.length;return{stops:r,outerColors:[u?r[0].color:`transparent`,u?r[u-1].color:`transparent`]}},t.type=`visualMap.continuous`,t.defaultOption=wi(FE.defaultOption,{align:`auto`,calculable:!1,hoverLink:!0,realtime:!0,handleIcon:`path://M-11.39,9.77h0a3.5,3.5,0,0,1-3.5,3.5h-22a3.5,3.5,0,0,1-3.5-3.5h0a3.5,3.5,0,0,1,3.5-3.5h22A3.5,3.5,0,0,1-11.39,9.77Z`,handleSize:`120%`,handleStyle:{borderColor:Z.color.neutral00,borderWidth:1},indicatorIcon:`circle`,indicatorSize:`50%`,indicatorStyle:{borderColor:Z.color.neutral00,borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:Z.color.shadow}}),t}(FE);function RE(e,t,n){if(n[0]===n[1])return n.slice();for(var r=200,i=(n[1]-n[0])/r,a=n[0],o=[],s=0;s<=r&&a<n[1];s++)o.push(a),a+=i;return o.push(n[1]),o}var zE=function(e){L(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.autoPositionValues={left:1,right:1,top:1,bottom:1},n}return t.prototype.init=function(e,t){this.ecModel=e,this.api=t},t.prototype.render=function(e,t,n,r){if(this.visualMapModel=e,e.get(`show`)===!1){this.group.removeAll();return}this.doRender(e,t,n,r)},t.prototype.renderBackground=function(e){var t=this.visualMapModel,n=Yr(t.get(`padding`)||0),r=e.getBoundingRect();e.add(new d({z2:-1,silent:!0,shape:{x:r.x-n[3],y:r.y-n[0],width:r.width+n[3]+n[1],height:r.height+n[0]+n[2]},style:{fill:t.get(`backgroundColor`),stroke:t.get(`borderColor`),lineWidth:t.get(`borderWidth`)}}))},t.prototype.getControllerVisual=function(e,t,n){n||={};var r=n.forceState,i=this.visualMapModel,a={};t===`color`&&(a.color=i.get(`contentColor`));function o(e){return a[e]}function s(e,t){a[e]=t}var c=i.controllerVisuals[r||i.getValueState(e)];return J(Y_.prepareVisualTypes(c),function(r){var i=c[r];n.convertOpacityToAlpha&&r===`opacity`&&(r=`colorAlpha`,i=c.__alphaForOpacity),Y_.dependsOn(r,t)&&i&&i.applyVisual(e,o,s)}),a[t]},t.prototype.positionGroup=function(e){var t=this.visualMapModel,n=this.api,r=gr(t,n).refContainer;ua(e,t.getBoxLayoutParams(),r)},t.prototype.doRender=function(e,t,n,r){},t.type=`visualMap`,t}(p),BE=[[`left`,`right`,`width`],[`top`,`bottom`,`height`]];function VE(e,t,n){var r=e.option,i=r.align;if(i!=null&&i!==`auto`)return i;for(var a={width:t.getWidth(),height:t.getHeight()},o=+(r.orient===`horizontal`),s=BE[o],c=[0,null,10],l={},u=0;u<3;u++)l[BE[1-o][u]]=c[u],l[s[u]]=u===2?n[0]:r[s[u]];var d=[[`x`,`width`,3],[`y`,`height`,0]][o],f=Cr(l,a,r.padding);return s[(f.margin[d[2]]||0)+f[d[0]]+f[d[1]]*.5<a[d[1]]*.5?0:1]}function HE(e,t){return J(e||[],function(e){e.dataIndex!=null&&(e.dataIndexInside=e.dataIndex,e.dataIndex=null),e.highlightKey=`visualMap`+(t?t.componentIndex:``)}),e}var UE=Y,WE=J,GE=Math.min,KE=Math.max,qE=12,JE=6,YE=function(e){L(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n._shapes={},n._dataInterval=[],n._handleEnds=[],n._hoverLinkDataIndices=[],n}return t.prototype.init=function(t,n){e.prototype.init.call(this,t,n),this._hoverLinkFromSeriesMouseOver=X(this._hoverLinkFromSeriesMouseOver,this),this._hideIndicator=X(this._hideIndicator,this)},t.prototype.doRender=function(e,t,n,r){(!r||r.type!==`selectDataRange`||r.from!==this.uid)&&this._buildView()},t.prototype._buildView=function(){this.group.removeAll();var e=this.visualMapModel,t=this.group;this._orient=e.get(`orient`),this._useHandle=e.get(`calculable`),this._resetInterval(),this._renderBar(t);var n=e.get(`text`);this._renderEndsText(t,n,0),this._renderEndsText(t,n,1),this._updateView(!0),this.renderBackground(t),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(t)},t.prototype._renderEndsText=function(e,t,n){if(t){var r=t[1-n];r=r==null?``:r+``;var i=this.visualMapModel,a=i.get(`textGap`),o=i.itemSize,s=this._shapes.mainGroup,c=this._applyTransform([o[0]/2,n===0?-a:o[1]+a],s),l=this._applyTransform(n===0?`bottom`:`top`,s),u=this._orient,d=this.visualMapModel.textStyleModel;this.group.add(new j({style:sa(d,{x:c[0],y:c[1],verticalAlign:d.get(`verticalAlign`)||(u===`horizontal`?`middle`:l),align:d.get(`align`)||(u===`horizontal`?l:`center`),text:r})}))}},t.prototype._renderBar=function(e){var t=this.visualMapModel,n=this._shapes,r=t.itemSize,i=this._orient,a=this._useHandle,o=VE(t,this.api,r),s=n.mainGroup=this._createBarGroup(o),c=new W;s.add(c),c.add(n.outOfRange=XE()),c.add(n.inRange=XE(null,a?$E(this._orient):null,X(this._dragHandle,this,`all`,!1),X(this._dragHandle,this,`all`,!0))),c.setClipPath(new d({shape:{x:0,y:0,width:r[0],height:r[1],r:3}}));var l=t.textStyleModel.getTextRect(`国`),u=KE(l.width,l.height);a&&(n.handleThumbs=[],n.handleLabels=[],n.handleLabelPoints=[],this._createHandle(t,s,0,r,u,i),this._createHandle(t,s,1,r,u,i)),this._createIndicator(t,s,r,u,i),e.add(s)},t.prototype._createHandle=function(e,t,n,r,i,a){var o=X(this._dragHandle,this,n,!1),s=X(this._dragHandle,this,n,!0),c=Gi(e.get(`handleSize`),r[0]),l=va(e.get(`handleIcon`),-c/2,-c/2,c,c,null,!0),u=$E(this._orient);l.attr({cursor:u,draggable:!0,drift:o,ondragend:s,onmousemove:function(e){Cn(e.event)}}),l.x=r[0]/2,l.useStyle(e.getModel(`handleStyle`).getItemStyle()),l.setStyle({strokeNoScale:!0,strokeFirst:!0}),l.style.lineWidth*=2,l.ensureState(`emphasis`).style=e.getModel([`emphasis`,`handleStyle`]).getItemStyle(),Or(l,!0),t.add(l);var d=this.visualMapModel.textStyleModel,f=new j({cursor:u,draggable:!0,drift:o,onmousemove:function(e){Cn(e.event)},ondragend:s,style:sa(d,{x:0,y:0,text:``})});f.ensureState(`blur`).style={opacity:.1},f.stateTransition={duration:200},this.group.add(f);var p=[c,0],m=this._shapes;m.handleThumbs[n]=l,m.handleLabelPoints[n]=p,m.handleLabels[n]=f},t.prototype._createIndicator=function(e,t,n,r,i){var a=Gi(e.get(`indicatorSize`),n[0]),o=va(e.get(`indicatorIcon`),-a/2,-a/2,a,a,null,!0);o.attr({cursor:`move`,invisible:!0,silent:!0,x:n[0]/2});var s=e.getModel(`indicatorStyle`).getItemStyle();if(o instanceof Hr){var c=o.style;o.useStyle(G({image:c.image,x:c.x,y:c.y,width:c.width,height:c.height},s))}else o.useStyle(s);t.add(o);var l=this.visualMapModel.textStyleModel,u=new j({silent:!0,invisible:!0,style:sa(l,{x:0,y:0,text:``})});this.group.add(u);var d=[(i===`horizontal`?r/2:JE)+n[0]/2,0],f=this._shapes;f.indicator=o,f.indicatorLabel=u,f.indicatorLabelPoint=d,this._firstShowIndicator=!0},t.prototype._dragHandle=function(e,t,n,r){if(this._useHandle){if(this._dragging=!t,!t){var i=this._applyTransform([n,r],this._shapes.mainGroup,!0);this._updateInterval(e,i[1]),this._hideIndicator(),this._updateView()}t===!this.visualMapModel.get(`realtime`)&&this.api.dispatchAction({type:`selectDataRange`,from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),t?!this._hovering&&this._clearHoverLinkToSeries():QE(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[e],!1)}},t.prototype._resetInterval=function(){var e=this.visualMapModel,t=this._dataInterval=e.getSelected(),n=e.getExtent(),r=[0,e.itemSize[1]];this._handleEnds=[UE(t[0],n,r,!0),UE(t[1],n,r,!0)]},t.prototype._updateInterval=function(e,t){t||=0;var n=this.visualMapModel,r=this._handleEnds,i=[0,n.itemSize[1]];by(t,r,i,e,0);var a=n.getExtent();this._dataInterval=[UE(r[0],i,a,!0),UE(r[1],i,a,!0)]},t.prototype._updateView=function(e){var t=this.visualMapModel,n=t.getExtent(),r=this._shapes,i=[0,t.itemSize[1]],a=e?i:this._handleEnds,o=this._createBarVisual(this._dataInterval,n,a,`inRange`),s=this._createBarVisual(n,n,i,`outOfRange`);r.inRange.setStyle({fill:o.barColor}).setShape(`points`,o.barPoints),r.outOfRange.setStyle({fill:s.barColor}).setShape(`points`,s.barPoints),this._updateHandle(a,o)},t.prototype._createBarVisual=function(e,t,n,r){var i={forceState:r,convertOpacityToAlpha:!0},a=this._makeColorGradient(e,i),o=[this.getControllerVisual(e[0],`symbolSize`,i),this.getControllerVisual(e[1],`symbolSize`,i)],s=this._createBarPoints(n,o);return{barColor:new wn(0,0,0,1,a),barPoints:s,handlesColor:[a[0].color,a[a.length-1].color]}},t.prototype._makeColorGradient=function(e,t){var n=100,r=[],i=(e[1]-e[0])/n;r.push({color:this.getControllerVisual(e[0],`color`,t),offset:0});for(var a=1;a<n;a++){var o=e[0]+i*a;if(o>e[1])break;r.push({color:this.getControllerVisual(o,`color`,t),offset:a/n})}return r.push({color:this.getControllerVisual(e[1],`color`,t),offset:1}),r},t.prototype._createBarPoints=function(e,t){var n=this.visualMapModel.itemSize;return[[n[0]-t[0],e[0]],[n[0],e[0]],[n[0],e[1]],[n[0]-t[1],e[1]]]},t.prototype._createBarGroup=function(e){var t=this._orient,n=this.visualMapModel.get(`inverse`);return new W(t===`horizontal`&&!n?{scaleX:e===`bottom`?1:-1,rotation:Math.PI/2}:t===`horizontal`&&n?{scaleX:e===`bottom`?-1:1,rotation:-Math.PI/2}:t===`vertical`&&!n?{scaleX:e===`left`?1:-1,scaleY:-1}:{scaleX:e===`left`?1:-1})},t.prototype._updateHandle=function(e,t){if(this._useHandle){var n=this._shapes,r=this.visualMapModel,i=n.handleThumbs,a=n.handleLabels,o=r.itemSize,s=r.getExtent(),c=this._applyTransform(`left`,n.mainGroup);WE([0,1],function(l){var u=i[l];u.setStyle(`fill`,t.handlesColor[l]),u.y=e[l];var d=UE(e[l],[0,o[1]],s,!0),f=this.getControllerVisual(d,`symbolSize`);u.scaleX=u.scaleY=f/o[0],u.x=o[0]-f/2;var p=ee(n.handleLabelPoints[l],Qe(u,this.group));if(this._orient===`horizontal`){var m=c===`left`||c===`top`?(o[0]-f)/2:(o[0]-f)/-2;p[1]+=m}a[l].setStyle({x:p[0],y:p[1],text:r.formatValueText(this._dataInterval[l]),verticalAlign:`middle`,align:this._orient===`vertical`?this._applyTransform(`left`,n.mainGroup):`center`})},this)}},t.prototype._showIndicator=function(e,t,n,r){var i=this.visualMapModel,a=i.getExtent(),o=i.itemSize,s=[0,o[1]],c=this._shapes,l=c.indicator;if(l){l.attr(`invisible`,!1);var u=this.getControllerVisual(e,`color`,{convertOpacityToAlpha:!0}),d=this.getControllerVisual(e,`symbolSize`),f=UE(e,a,s,!0),p=o[0]-d/2,m={x:l.x,y:l.y};l.y=f,l.x=p;var h=ee(c.indicatorLabelPoint,Qe(l,this.group)),g=c.indicatorLabel;g.attr(`invisible`,!1);var _=this._applyTransform(`left`,c.mainGroup),v=this._orient===`horizontal`;g.setStyle({text:(n||``)+i.formatValueText(t),verticalAlign:v?_:`middle`,align:v?`center`:_});var y={x:p,y:f,style:{fill:u}},b={style:{x:h[0],y:h[1]}};if(i.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var x={duration:100,easing:`cubicInOut`,additive:!0};l.x=m.x,l.y=m.y,l.animateTo(y,x),g.animateTo(b,x)}else l.attr(y),g.attr(b);this._firstShowIndicator=!1;var S=this._shapes.handleLabels;if(S)for(var C=0;C<S.length;C++)this.api.enterBlur(S[C])}},t.prototype._enableHoverLinkToSeries=function(){var e=this;this._shapes.mainGroup.on(`mousemove`,function(t){if(e._hovering=!0,!e._dragging){var n=e.visualMapModel.itemSize,r=e._applyTransform([t.offsetX,t.offsetY],e._shapes.mainGroup,!0,!0);r[1]=GE(KE(0,r[1]),n[1]),e._doHoverLinkToSeries(r[1],0<=r[0]&&r[0]<=n[0])}}).on(`mouseout`,function(){e._hovering=!1,!e._dragging&&e._clearHoverLinkToSeries()})},t.prototype._enableHoverLinkFromSeries=function(){var e=this.api.getZr();this.visualMapModel.option.hoverLink?(e.on(`mouseover`,this._hoverLinkFromSeriesMouseOver,this),e.on(`mouseout`,this._hideIndicator,this)):this._clearHoverLinkFromSeries()},t.prototype._doHoverLinkToSeries=function(e,t){var n=this.visualMapModel,r=n.itemSize;if(n.option.hoverLink){var i=[0,r[1]],a=n.getExtent();e=GE(KE(i[0],e),i[1]);var o=ZE(n,a,i),s=[e-o,e+o],c=UE(e,i,a,!0),l=[UE(s[0],i,a,!0),UE(s[1],i,a,!0)];s[0]<i[0]&&(l[0]=-1/0),s[1]>i[1]&&(l[1]=1/0),t&&(l[0]===-1/0?this._showIndicator(c,l[1],`< `,o):l[1]===1/0?this._showIndicator(c,l[0],`> `,o):this._showIndicator(c,c,`≈ `,o));var u=this._hoverLinkDataIndices,d=[];(t||QE(n))&&(d=this._hoverLinkDataIndices=n.findTargetDataIndices(l));var f=cn(u,d);this._dispatchHighDown(`downplay`,HE(f[0],n)),this._dispatchHighDown(`highlight`,HE(f[1],n))}},t.prototype._hoverLinkFromSeriesMouseOver=function(e){var t;if(o(e.target,function(e){var n=H(e);if(n.dataIndex!=null)return t=n,!0},!0),t){var n=this.ecModel.getSeriesByIndex(t.seriesIndex),r=this.visualMapModel;if(r.isTargetSeries(n)){var i=n.getData(t.dataType),a=i.getStore().get(r.getDataDimensionIndex(i),t.dataIndex);isNaN(a)||this._showIndicator(a,a)}}},t.prototype._hideIndicator=function(){var e=this._shapes;e.indicator&&e.indicator.attr(`invisible`,!0),e.indicatorLabel&&e.indicatorLabel.attr(`invisible`,!0);var t=this._shapes.handleLabels;if(t)for(var n=0;n<t.length;n++)this.api.leaveBlur(t[n])},t.prototype._clearHoverLinkToSeries=function(){this._hideIndicator();var e=this._hoverLinkDataIndices;this._dispatchHighDown(`downplay`,HE(e,this.visualMapModel)),e.length=0},t.prototype._clearHoverLinkFromSeries=function(){this._hideIndicator();var e=this.api.getZr();e.off(`mouseover`,this._hoverLinkFromSeriesMouseOver),e.off(`mouseout`,this._hideIndicator)},t.prototype._applyTransform=function(e,t,n,r){var i=Qe(t,r?null:this.group);return B(e)?ee(e,i,n):Qt(e,i,n)},t.prototype._dispatchHighDown=function(e,t){t&&t.length&&this.api.dispatchAction({type:e,batch:t})},t.prototype.dispose=function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},t.type=`visualMap.continuous`,t}(zE);function XE(e,t,n,r){return new fi({shape:{points:e},draggable:!!n,cursor:t,drift:n,onmousemove:function(e){Cn(e.event)},ondragend:r})}function ZE(e,t,n){var r=qE/2,i=e.get(`hoverLinkDataSize`);return i&&(r=UE(i,t,n,!0)/2),r}function QE(e){return!!(e.get(`hoverLinkOnHandle`)??e.get(`realtime`))}function $E(e){return e===`vertical`?`ns-resize`:`ew-resize`}var eD={type:`selectDataRange`,event:`dataRangeSelected`,update:`update`},tD=function(e,t){t.eachComponent({mainType:`visualMap`,query:e},function(t){t.setSelected(e.selected)})},nD=[{createOnAllSeries:!0,reset:function(e,t){var n=[];return t.eachComponent(`visualMap`,function(t){var r=e.pipelineContext;!t.isTargetSeries(e)||r&&r.large||n.push(jw(t.stateList,t.targetVisuals,X(t.getValueState,t),t.getDataDimensionIndex(e.getData())))}),n}},{createOnAllSeries:!0,reset:function(e,t){var n=e.getData(),r=[];t.eachComponent(`visualMap`,function(t){if(t.isTargetSeries(e)){var i=t.getVisualMeta(X(rD,null,e,t))||{stops:[],outerColors:[]},a=t.getDataDimensionIndex(n);a>=0&&(i.dimension=a,r.push(i))}}),e.getData().setVisual(`visualMeta`,r)}}];function rD(e,t,n,r){for(var i=t.targetVisuals[r],a=Y_.prepareVisualTypes(i),o={color:nt(e.getData(),`color`)},s=0,c=a.length;s<c;s++){var l=a[s],u=i[l===`opacity`?`__alphaForOpacity`:l];u&&u.applyVisual(n,d,f)}return o.color;function d(e){return o[e]}function f(e,t){o[e]=t}}var iD=J;function aD(e){var t=e&&e.visualMap;B(t)||(t=t?[t]:[]),iD(t,function(e){if(e){oD(e,`splitList`)&&!oD(e,`pieces`)&&(e.pieces=e.splitList,delete e.splitList);var t=e.pieces;t&&B(t)&&iD(t,function(e){A(e)&&(oD(e,`start`)&&!oD(e,`min`)&&(e.min=e.start),oD(e,`end`)&&!oD(e,`max`)&&(e.max=e.end))})}})}function oD(e,t){return e&&e.hasOwnProperty&&e.hasOwnProperty(t)}var sD=!1;function cD(e){sD||(sD=!0,e.registerSubTypeDefaulter(`visualMap`,function(e){return!e.categories&&(!(e.pieces?e.pieces.length>0:e.splitNumber>0)||e.calculable)?`continuous`:`piecewise`}),e.registerAction(eD,tD),J(nD,function(t){e.registerVisual(e.PRIORITY.VISUAL.COMPONENT,t)}),e.registerPreprocessor(aD))}function lD(e){e.registerComponentModel(LE),e.registerComponentView(YE),cD(e)}var uD=function(e){L(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n._pieceList=[],n}return t.prototype.optionUpdated=function(t,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var r=this._mode=this._determineMode();this._pieceList=[],dD[this._mode].call(this,this._pieceList),this._resetSelected(t,n);var i=this.option.categories;this.resetVisual(function(e,t){r===`categories`?(e.mappingMethod=`category`,e.categories=ta(i)):(e.dataExtent=this.getExtent(),e.mappingMethod=`piecewise`,e.pieceList=u(this._pieceList,function(e){return e=ta(e),t!==`inRange`&&(e.visual=null),e}))})},t.prototype.completeVisualOption=function(){var t=this.option,n={},r=Y_.listVisualTypes(),i=this.isCategory();J(t.pieces,function(e){J(r,function(t){e.hasOwnProperty(t)&&(n[t]=1)})}),J(n,function(e,n){var r=!1;J(this.stateList,function(e){r=r||a(t,e,n)||a(t.target,e,n)},this),!r&&J(this.stateList,function(e){(t[e]||(t[e]={}))[n]=DE.get(n,e===`inRange`?`active`:`inactive`,i)})},this);function a(e,t,n){return e&&e[t]&&e[t].hasOwnProperty(n)}e.prototype.completeVisualOption.apply(this,arguments)},t.prototype._resetSelected=function(e,t){var n=this.option,r=this._pieceList,i=(t?n:e).selected||{};if(n.selected=i,J(r,function(e,t){var n=this.getSelectedMapKey(e);i.hasOwnProperty(n)||(i[n]=!0)},this),n.selectedMode===`single`){var a=!1;J(r,function(e,t){var n=this.getSelectedMapKey(e);i[n]&&(a?i[n]=!1:a=!0)},this)}},t.prototype.getItemSymbol=function(){return this.get(`itemSymbol`)},t.prototype.getSelectedMapKey=function(e){return this._mode===`categories`?e.value+``:e.index+``},t.prototype.getPieceList=function(){return this._pieceList},t.prototype._determineMode=function(){var e=this.option;return e.pieces&&e.pieces.length>0?`pieces`:this.option.categories?`categories`:`splitNumber`},t.prototype.setSelected=function(e){this.option.selected=ta(e)},t.prototype.getValueState=function(e){var t=Y_.findPieceIndex(e,this._pieceList);return t==null?`outOfRange`:this.option.selected[this.getSelectedMapKey(this._pieceList[t])]?`inRange`:`outOfRange`},t.prototype.findTargetDataIndices=function(e){var t=[],n=this._pieceList;return this.eachTargetSeries(function(r){var i=[],a=r.getData();a.each(this.getDataDimensionIndex(a),function(t,r){Y_.findPieceIndex(t,n)===e&&i.push(r)},this),t.push({seriesId:r.id,dataIndex:i})},this),t},t.prototype.getRepresentValue=function(e){var t;if(this.isCategory())t=e.value;else if(e.value!=null)t=e.value;else{var n=e.interval||[];t=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return t},t.prototype.getVisualMeta=function(e){if(this.isCategory())return;var t=[],n=[``,``],r=this;function i(i,a){var o=r.getRepresentValue({interval:i});a||=r.getValueState(o);var s=e(o,a);i[0]===-1/0?n[0]=s:i[1]===1/0?n[1]=s:t.push({value:i[0],color:s},{value:i[1],color:s})}var a=this._pieceList.slice();if(!a.length)a.push({interval:[-1/0,1/0]});else{var o=a[0].interval[0];o!==-1/0&&a.unshift({interval:[-1/0,o]}),o=a[a.length-1].interval[1],o!==1/0&&a.push({interval:[o,1/0]})}var s=-1/0;return J(a,function(e){var t=e.interval;t&&(t[0]>s&&i([s,t[0]],`outOfRange`),i(t.slice()),s=t[1])},this),{stops:t,outerColors:n}},t.type=`visualMap.piecewise`,t.defaultOption=wi(FE.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:`auto`,itemWidth:20,itemHeight:14,itemSymbol:`roundRect`,pieces:null,categories:null,splitNumber:5,selectedMode:`multiple`,itemGap:10,hoverLink:!0}),t}(FE),dD={splitNumber:function(e){var t=this.option,n=Math.min(t.precision,20),r=this.getExtent(),i=t.splitNumber;i=Math.max(parseInt(i,10),1),t.splitNumber=i;for(var a=(r[1]-r[0])/i;+a.toFixed(n)!==a&&n<5;)n++;t.precision=n,a=+a.toFixed(n),t.minOpen&&e.push({interval:[-1/0,r[0]],close:[0,0]});for(var o=0,s=r[0];o<i;s+=a,o++){var c=o===i-1?r[1]:s+a;e.push({interval:[s,c],close:[1,1]})}t.maxOpen&&e.push({interval:[r[1],1/0],close:[0,0]}),Re(e),J(e,function(e,t){e.index=t,e.text=this.formatValueText(e.interval)},this)},categories:function(e){var t=this.option;J(t.categories,function(t){e.push({text:this.formatValueText(t,!0),value:t})},this),fD(t,e)},pieces:function(e){var t=this.option;J(t.pieces,function(t,n){A(t)||(t={value:t});var r={text:``,index:n};if(t.label!=null&&(r.text=t.label),t.hasOwnProperty(`value`)){var i=r.value=t.value;r.interval=[i,i],r.close=[1,1]}else{for(var a=r.interval=[],o=r.close=[0,0],s=[1,0,1],c=[-1/0,1/0],l=[],u=0;u<2;u++){for(var d=[[`gte`,`gt`,`min`],[`lte`,`lt`,`max`]][u],f=0;f<3&&a[u]==null;f++)a[u]=t[d[f]],o[u]=s[f],l[u]=f===2;a[u]??(a[u]=c[u])}l[0]&&a[1]===1/0&&(o[0]=0),l[1]&&a[0]===-1/0&&(o[1]=0),a[0]===a[1]&&o[0]&&o[1]&&(r.value=a[0])}r.visual=Y_.retrieveVisuals(t),e.push(r)},this),fD(t,e),Re(e),J(e,function(e){var t=e.close,n=[[`<`,`≤`][t[1]],[`>`,`≥`][t[0]]];e.text=e.text||this.formatValueText(e.value==null?e.interval:e.value,!1,n)},this)}};function fD(e,t){var n=e.inverse;(e.orient===`vertical`?!n:n)&&t.reverse()}var pD=function(e){L(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.doRender=function(){var e=this.group;e.removeAll();var t=this.visualMapModel,n=t.get(`textGap`),r=t.textStyleModel,i=this._getItemAlign(),a=t.itemSize,o=this._getViewData(),s=o.endsText,c=Ke(t.get(`showLabel`,!0),!s),l=!t.get(`selectedMode`);s&&this._renderEndsText(e,s[0],a,c,i),J(o.viewPieceList,function(o){var s=o.piece,u=new W;u.onclick=X(this._onItemClick,this,s),this._enableHoverLink(u,o.indexInModelPieceList);var d=t.getRepresentValue(s);if(this._createItemSymbol(u,d,[0,0,a[0],a[1]],l),c){var f=this.visualMapModel.getValueState(d),p=r.get(`align`)||i;u.add(new j({style:sa(r,{x:p===`right`?-n:a[0]+n,y:a[1]/2,text:s.text,verticalAlign:r.get(`verticalAlign`)||`middle`,align:p,opacity:z(r.get(`opacity`),f===`outOfRange`?.5:1)}),silent:l}))}e.add(u)},this),s&&this._renderEndsText(e,s[1],a,c,i),ir(t.get(`orient`),e,t.get(`itemGap`)),this.renderBackground(e),this.positionGroup(e)},t.prototype._enableHoverLink=function(e,t){var n=this;e.on(`mouseover`,function(){return r(`highlight`)}).on(`mouseout`,function(){return r(`downplay`)});var r=function(e){var r=n.visualMapModel;r.option.hoverLink&&n.api.dispatchAction({type:e,batch:HE(r.findTargetDataIndices(t),r)})}},t.prototype._getItemAlign=function(){var e=this.visualMapModel,t=e.option;if(t.orient===`vertical`)return VE(e,this.api,e.itemSize);var n=t.align;return(!n||n===`auto`)&&(n=`left`),n},t.prototype._renderEndsText=function(e,t,n,r,i){if(t){var a=new W,o=this.visualMapModel.textStyleModel;a.add(new j({style:sa(o,{x:r?i===`right`?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:`middle`,align:r?i:`center`,text:t})})),e.add(a)}},t.prototype._getViewData=function(){var e=this.visualMapModel,t=u(e.getPieceList(),function(e,t){return{piece:e,indexInModelPieceList:t}}),n=e.get(`text`),r=e.get(`orient`),i=e.get(`inverse`);return(r===`horizontal`?i:!i)?t.reverse():n&&=n.slice().reverse(),{viewPieceList:t,endsText:n}},t.prototype._createItemSymbol=function(e,t,n,r){var i=va(this.getControllerVisual(t,`symbol`),n[0],n[1],n[2],n[3],this.getControllerVisual(t,`color`));i.silent=r,e.add(i)},t.prototype._onItemClick=function(e){var t=this.visualMapModel,n=t.option,r=n.selectedMode;if(r){var i=ta(n.selected),a=t.getSelectedMapKey(e);r===`single`||r===!0?(i[a]=!0,J(i,function(e,t){i[t]=t===a})):i[a]=!i[a],this.api.dispatchAction({type:`selectDataRange`,from:this.uid,visualMapId:this.visualMapModel.id,selected:i})}},t.type=`visualMap.piecewise`,t}(zE);function mD(e){e.registerComponentModel(uD),e.registerComponentView(pD),cD(e)}function hD(e){Yc(lD),Yc(mD)}Yc([Nd,ih,Fm,ty,Lx,Vf,yy,cy,Jy,Vy,pb,ug,bv,Pw,Ew,XT,NS,DC,dE,EE,hD,pT,wT,rT,bC]);var gD=!1;function _D(e){let t=document.createElement(`span`);t.style.color=`var(${e})`,document.body.appendChild(t);let n=getComputedStyle(t).color;return t.remove(),n}var vD=[`light`,`dark`],yD=[0,72,144,216,288,36,108,180,252,324];function bD(e,t,n){let r=n*Math.PI/180,i=t*Math.cos(r),a=t*Math.sin(r),o=e+.3963377774*i+.2158037573*a,s=e-.1055613458*i-.0638541728*a,c=e-.0894841775*i-1.291485548*a,l=o**3,u=s**3,d=c**3,f=4.0767416621*l-3.3077115913*u+.2309699292*d,p=-1.2684380046*l+2.6097574011*u-.3413193965*d,m=-.0041960863*l-.7034186147*u+1.707614701*d,h=e=>{let t=Math.max(0,Math.min(1,e));return t<=.0031308?t*12.92:1.055*t**(1/2.4)-.055};return`#`+[f,p,m].map(e=>Math.round(h(e)*255).toString(16).padStart(2,`0`)).join(``)}function xD(e,t,n=1,r=1){let i=Va(t),a=Ua[i],o=e===`dark`,s=(o?a[2]:a[0])*r,c=(o?a[3]:a[1])*n,l=Ha[i];return yD.map(e=>bD(s,c,l+e))}function SD(e,t){let n=Ua[e],r=t?n[2]:n[0],i=t?n[3]:n[1],a=Ha[e],o=yD.map(e=>bD(r,i,a+e)),s=t?`rgba(255,255,255,0.10)`:`rgba(0,0,0,0.12)`,c={axisLine:{show:!0,lineStyle:{color:s}},axisTick:{show:!1},axisLabel:{show:!0,color:t?`#9CA3AF`:`#6B7280`},splitLine:{show:!0,lineStyle:{color:[s]}},splitArea:{show:!1}};return{color:o,backgroundColor:`transparent`,legend:{textStyle:{color:t?`#F3F4F6`:`#111827`}},tooltip:{backgroundColor:t?`#1F2937`:`#FFFFFF`,borderColor:s,textStyle:{color:t?`#F9FAFB`:`#111827`}},categoryAxis:c,valueAxis:c,logAxis:c,timeAxis:c}}function CD(e=`dark`,t=Ba){return`bookorbit-${e}-${Va(t)}`}function wD(){if(!gD){for(let e of vD)for(let t of za)ti(CD(e,t),SD(t,e===`dark`));gD=!0}}export{_D as i,xD as n,wD as r,CD as t};