s&&(p=s-f);for(var g=0;gd&&(d=m,v=f+g)}var _=this.getRawIndex(c),S=this.getRawIndex(v);cf-d&&(l=f-d,s.length=l);for(var p=0;pc[1]&&(c[1]=y),h[v++]=m}return a._count=v,a._indices=h,a._updateGetRawIdx(),a},r.prototype.each=function(t,e){if(this._count)for(var n=t.length,i=this._chunks,a=0,o=this.count();al&&(l=c)}return o=[s,l],this._extent[t]=o,o},r.prototype.getRawDataItem=function(t){var e=this.getRawIndex(t);if(this._provider.persistent)return this._provider.getItem(e);for(var n=[],i=this._chunks,a=0;a=0?this._indices[t]:-1},r.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},r.internalField=function(){function t(e,n,i,a){return ea(e[a],this._dimensions[a])}Ep={arrayRows:t,objectRows:function(e,n,i,a){return ea(e[n],this._dimensions[a])},keyedColumns:t,original:function(e,n,i,a){var o=e&&(e.value==null?e:e.value);return ea(o instanceof Array?o[a]:o,this._dimensions[a])},typedArray:function(e,n,i,a){return e[a]}}}(),r}(),h2=function(){function r(t){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=t}return r.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},r.prototype._setLocalSource=function(t,e){this._sourceList=t,this._upstreamSignList=e,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},r.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},r.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},r.prototype._createSource=function(){this._setLocalSource([],[]);var t=this._sourceHost,e=this._getUpstreamSourceManagers(),n=!!e.length,i,a;if(sc(t)){var o=t,s=void 0,l=void 0,u=void 0;if(n){var f=e[0];f.prepareSource(),u=f.getSource(),s=u.data,l=u.sourceFormat,a=[f._getVersionSign()]}else s=o.get("data",!0),l=pr(s)?ta:Xr,a=[];var c=this._getSourceMetaRawOption()||{},h=u&&u.metaRawOption||{},v=xt(c.seriesLayoutBy,h.seriesLayoutBy)||null,d=xt(c.sourceHeader,h.sourceHeader),p=xt(c.dimensions,h.dimensions),g=v!==h.seriesLayoutBy||!!d!=!!h.sourceHeader||p;i=g?[vm(s,{seriesLayoutBy:v,sourceHeader:d,dimensions:p},l)]:[]}else{var y=t;if(n){var m=this._applyTransform(e);i=m.sourceList,a=m.upstreamSignList}else{var _=y.get("source",!0);i=[vm(_,this._getSourceMetaRawOption(),null)],a=[]}}this._setLocalSource(i,a)},r.prototype._applyTransform=function(t){var e=this._sourceHost,n=e.get("transform",!0),i=e.get("fromTransformResult",!0);if(i!=null){var a="";t.length!==1&&qb(a)}var o,s=[],l=[];return M(t,function(u){u.prepareSource();var f=u.getSource(i||0),c="";i!=null&&!f&&qb(c),s.push(f),l.push(u._getVersionSign())}),n?o=y4(n,s,{datasetIndex:e.componentIndex}):i!=null&&(o=[JH(s[0])]),{sourceList:o,upstreamSignList:l}},r.prototype._isDirty=function(){if(this._dirty)return!0;for(var t=this._getUpstreamSourceManagers(),e=0;e1||e>0&&!r.noHeader;return M(r.blocks,function(i){var a=g2(i);a>=t&&(t=a+ +(n&&(!a||pm(i)&&!i.noHeader)))}),t}return 0}function A4(r,t,e,n){var i=t.noHeader,a=M4(g2(t)),o=[],s=t.blocks||[];or(!s||Y(s)),s=s||[];var l=r.orderMode;if(t.sortBlocks&&l){s=s.slice();var u={valueAsc:"asc",valueDesc:"desc"};if(st(u,l)){var f=new l2(u[l],null);s.sort(function(p,g){return f.evaluate(p.sortParam,g.sortParam)})}else l==="seriesDesc"&&s.reverse()}M(s,function(p,g){var y=t.valueFormatter,m=p2(p)(y?F(F({},r),{valueFormatter:y}):r,p,g>0?a.html:0,n);m!=null&&o.push(m)});var c=r.renderMode==="richText"?o.join(a.richText):gm(n,o.join(""),i?e:a.html);if(i)return c;var h=fm(t.header,"ordinal",r.useUTC),v=d2(n,r.renderMode).nameStyle,d=v2(n);return r.renderMode==="richText"?y2(r,h,v)+a.richText+c:gm(n,''+Xe(h)+"
"+c,e)}function C4(r,t,e,n){var i=r.renderMode,a=t.noName,o=t.noValue,s=!t.markerType,l=t.name,u=r.useUTC,f=t.valueFormatter||r.valueFormatter||function(S){return S=Y(S)?S:[S],Z(S,function(x,b){return fm(x,Y(v)?v[b]:v,u)})};if(!(a&&o)){var c=s?"":r.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||"#333",i),h=a?"":fm(l,"ordinal",u),v=t.valueType,d=o?[]:f(t.value,t.dataIndex),p=!s||!a,g=!s&&a,y=d2(n,i),m=y.nameStyle,_=y.valueStyle;return i==="richText"?(s?"":c)+(a?"":y2(r,h,m))+(o?"":L4(r,d,p,g,_)):gm(n,(s?"":c)+(a?"":D4(h,!s,m))+(o?"":I4(d,p,g,_)),e)}}function Kb(r,t,e,n,i,a){if(r){var o=p2(r),s={useUTC:i,renderMode:e,orderMode:n,markupStyleCreator:t,valueFormatter:r.valueFormatter};return o(s,r,0,a)}}function M4(r){return{html:w4[r],richText:T4[r]}}function gm(r,t,e){var n='',i="margin: "+e+"px 0 0",a=v2(r);return''+t+n+"
"}function D4(r,t,e){var n=t?"margin-left:2px":"";return''+Xe(r)+""}function I4(r,t,e,n){var i=e?"10px":"20px",a=t?"float:right;margin-left:"+i:"";return r=Y(r)?r:[r],''+Z(r,function(o){return Xe(o)}).join(" ")+""}function y2(r,t,e){return r.markupStyleCreator.wrapRichTextStyle(t,e)}function L4(r,t,e,n,i){var a=[i],o=n?10:20;return e&&a.push({padding:[0,0,0,o],align:"right"}),r.markupStyleCreator.wrapRichTextStyle(Y(t)?t.join(" "):t,a)}function m2(r,t){var e=r.getData().getItemVisual(t,"style"),n=e[r.visualDrawType];return Io(n)}function _2(r,t){var e=r.get("padding");return e!=null?e:t==="richText"?[8,10]:10}var kp=function(){function r(){this.richTextStyles={},this._nextStyleNameId=_L()}return r.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},r.prototype.makeTooltipMarker=function(t,e,n){var i=n==="richText"?this._generateStyleName():null,a=yH({color:e,type:t,renderMode:n,markerId:i});return nt(a)?a:(this.richTextStyles[i]=a.style,a.content)},r.prototype.wrapRichTextStyle=function(t,e){var n={};Y(e)?M(e,function(a){return F(n,a)}):F(n,e);var i=this._generateStyleName();return this.richTextStyles[i]=n,"{"+i+"|"+t+"}"},r}();function S2(r){var t=r.series,e=r.dataIndex,n=r.multipleSeries,i=t.getData(),a=i.mapDimensionsAll("defaultedTooltip"),o=a.length,s=t.getRawValue(e),l=Y(s),u=m2(t,e),f,c,h,v;if(o>1||l&&!o){var d=P4(s,t,e,a,u);f=d.inlineValues,c=d.inlineValueTypes,h=d.blocks,v=d.inlineValues[0]}else if(o){var p=i.getDimensionInfo(a[0]);v=f=Fs(i,e,a[0]),c=p.type}else v=f=l?s[0]:s;var g=Q0(t),y=g&&t.name||"",m=i.getName(e),_=n?y:m;return Ie("section",{header:y,noHeader:n||!g,sortParam:v,blocks:[Ie("nameValue",{markerType:"item",markerColor:u,name:_,noName:!an(_),value:f,valueType:c,dataIndex:e})].concat(h||[])})}function P4(r,t,e,n,i){var a=t.getData(),o=Fn(r,function(c,h,v){var d=a.getDimensionInfo(v);return c=c||d&&d.tooltip!==!1&&d.displayName!=null},!1),s=[],l=[],u=[];n.length?M(n,function(c){f(Fs(a,e,c),c)}):M(r,f);function f(c,h){var v=a.getDimensionInfo(h);!v||v.otherDims.tooltip===!1||(o?u.push(Ie("nameValue",{markerType:"subItem",markerColor:i,name:v.displayName,value:c,valueType:v.type})):(s.push(c),l.push(v.type)))}return{inlineValues:s,inlineValueTypes:l,blocks:u}}var Pi=Nt();function lc(r,t){return r.getName(t)||r.getId(t)}var fh="__universalTransitionEnabled",vd=function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e._selectedDataIndicesMap={},e}return t.prototype.init=function(e,n,i){this.seriesIndex=this.componentIndex,this.dataTask=wu({count:E4,reset:k4}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,i);var a=Pi(this).sourceManager=new h2(this);a.prepareSource();var o=this.getInitialData(e,i);Jb(o,this),this.dataTask.context.data=o,Pi(this).dataBeforeProcessed=o,jb(this),this._initSelectedMapFromData(o)},t.prototype.mergeDefaultAndTheme=function(e,n){var i=Xu(this),a=i?il(e):{},o=this.subType;Bt.hasClass(o)&&(o+="Series"),Tt(e,n.getTheme().get(this.subType)),Tt(e,this.getDefaultOption()),Ao(e,"label",["show"]),this.fillDataTextStyle(e.data),i&&sa(e,a,i)},t.prototype.mergeOption=function(e,n){e=Tt(this.option,e,!0),this.fillDataTextStyle(e.data);var i=Xu(this);i&&sa(this.option,e,i);var a=Pi(this).sourceManager;a.dirty(),a.prepareSource();var o=this.getInitialData(e,n);Jb(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,Pi(this).dataBeforeProcessed=o,jb(this),this._initSelectedMapFromData(o)},t.prototype.fillDataTextStyle=function(e){if(e&&!pr(e))for(var n=["show"],i=0;ithis.getShallow("animationThreshold")&&(n=!1),!!n},t.prototype.restoreData=function(){this.dataTask.dirty()},t.prototype.getColorFromPalette=function(e,n,i){var a=this.ecModel,o=T_.prototype.getColorFromPalette.call(this,e,n,i);return o||(o=a.getColorFromPalette(e,n,i)),o},t.prototype.coordDimToDataDim=function(e){return this.getRawData().mapDimensionsAll(e)},t.prototype.getProgressive=function(){return this.get("progressive")},t.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},t.prototype.select=function(e,n){this._innerSelect(this.getData(n),e)},t.prototype.unselect=function(e,n){var i=this.option.selectedMap;if(i){var a=this.option.selectedMode,o=this.getData(n);if(a==="series"||i==="all"){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var s=0;s=0&&i.push(o)}return i},t.prototype.isSelected=function(e,n){var i=this.option.selectedMap;if(!i)return!1;var a=this.getData(n);return(i==="all"||i[lc(a,e)])&&!a.getItemModel(e).get(["select","disabled"])},t.prototype.isUniversalTransitionEnabled=function(){if(this[fh])return!0;var e=this.option.universalTransition;return e?e===!0?!0:e&&e.enabled:!1},t.prototype._innerSelect=function(e,n){var i,a,o=this.option,s=o.selectedMode,l=n.length;if(!(!s||!l)){if(s==="series")o.selectedMap="all";else if(s==="multiple"){yt(o.selectedMap)||(o.selectedMap={});for(var u=o.selectedMap,f=0;f0&&this._innerSelect(e,n)}},t.registerClass=function(e){return Bt.registerClass(e)},t.protoInitialize=function(){var e=t.prototype;e.type="series.__base__",e.seriesIndex=0,e.ignoreStyleOnData=!1,e.hasSymbolVisual=!1,e.defaultSymbol="circle",e.visualStyleAccessPath="itemStyle",e.visualDrawType="fill"}(),t}(Bt);me(vd,cd);me(vd,T_);DL(vd,Bt);function jb(r){var t=r.name;Q0(r)||(r.name=R4(r)||t)}function R4(r){var t=r.getRawData(),e=t.mapDimensionsAll("seriesName"),n=[];return M(e,function(i){var a=t.getDimensionInfo(i);a.displayName&&n.push(a.displayName)}),n.join(" ")}function E4(r){return r.model.getRawData().count()}function k4(r){var t=r.model;return t.setData(t.getRawData().cloneShallow()),O4}function O4(r,t){t.outputData&&r.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function Jb(r,t){M(Vu(r.CHANGABLE_METHODS,r.DOWNSAMPLE_METHODS),function(e){r.wrapMethod(e,bt(N4,t))})}function N4(r,t){var e=ym(r);return e&&e.setOutputEnd((t||this).count()),t}function ym(r){var t=(r.ecModel||{}).scheduler,e=t&&t.getPipeline(r.uid);if(e){var n=e.currentTask;if(n){var i=n.agentStubMap;i&&(n=i.get(r.uid))}return n}}const le=vd;var I_=function(){function r(){this.group=new _t,this.uid=rl("viewComponent")}return r.prototype.init=function(t,e){},r.prototype.render=function(t,e,n,i){},r.prototype.dispose=function(t,e){},r.prototype.updateView=function(t,e,n,i){},r.prototype.updateLayout=function(t,e,n,i){},r.prototype.updateVisual=function(t,e,n,i){},r.prototype.toggleBlurSeries=function(t,e,n){},r.prototype.eachRendered=function(t){var e=this.group;e&&e.traverse(t)},r}();e_(I_);Zv(I_);const fe=I_;function sl(){var r=Nt();return function(t){var e=r(t),n=t.pipelineContext,i=!!e.large,a=!!e.progressiveRender,o=e.large=!!(n&&n.large),s=e.progressiveRender=!!(n&&n.progressiveRender);return(i!==o||a!==s)&&"reset"}}var x2=Nt(),V4=sl(),L_=function(){function r(){this.group=new _t,this.uid=rl("viewChart"),this.renderTask=wu({plan:B4,reset:z4}),this.renderTask.context={view:this}}return r.prototype.init=function(t,e){},r.prototype.render=function(t,e,n,i){},r.prototype.highlight=function(t,e,n,i){var a=t.getData(i&&i.dataType);a&&tw(a,i,"emphasis")},r.prototype.downplay=function(t,e,n,i){var a=t.getData(i&&i.dataType);a&&tw(a,i,"normal")},r.prototype.remove=function(t,e){this.group.removeAll()},r.prototype.dispose=function(t,e){},r.prototype.updateView=function(t,e,n,i){this.render(t,e,n,i)},r.prototype.updateLayout=function(t,e,n,i){this.render(t,e,n,i)},r.prototype.updateVisual=function(t,e,n,i){this.render(t,e,n,i)},r.prototype.eachRendered=function(t){pa(this.group,t)},r.markUpdateMethod=function(t,e){x2(t).updateMethod=e},r.protoInitialize=function(){var t=r.prototype;t.type="chart"}(),r}();function Qb(r,t,e){r&&Uu(r)&&(t==="emphasis"?mi:_i)(r,e)}function tw(r,t,e){var n=Co(r,t),i=t&&t.highlightKey!=null?f3(t.highlightKey):null;n!=null?M(Zt(n),function(a){Qb(r.getItemGraphicEl(a),e,i)}):r.eachItemGraphicEl(function(a){Qb(a,e,i)})}e_(L_);Zv(L_);function B4(r){return V4(r.model)}function z4(r){var t=r.model,e=r.ecModel,n=r.api,i=r.payload,a=t.pipelineContext.progressiveRender,o=r.view,s=i&&x2(i).updateMethod,l=a?"incrementalPrepareRender":s&&o[s]?s:"render";return l!=="render"&&o[l](t,e,n,i),G4[l]}var G4={incrementalPrepareRender:{progress:function(r,t){t.view.incrementalRender(r,t.model,t.ecModel,t.api,t.payload)}},render:{forceFirstProgress:!0,progress:function(r,t){t.view.render(t.model,t.ecModel,t.api,t.payload)}}};const ee=L_;var Yh="\0__throttleOriginMethod",ew="\0__throttleRate",rw="\0__throttleType";function P_(r,t,e){var n,i=0,a=0,o=null,s,l,u,f;t=t||0;function c(){a=new Date().getTime(),o=null,r.apply(l,u||[])}var h=function(){for(var v=[],d=0;d=0?c():o=setTimeout(c,-s),i=n};return h.clear=function(){o&&(clearTimeout(o),o=null)},h.debounceNextCall=function(v){f=v},h}function ll(r,t,e,n){var i=r[t];if(i){var a=i[Yh]||i,o=i[rw],s=i[ew];if(s!==e||o!==n){if(e==null||!n)return r[t]=a;i=r[t]=P_(a,e,n==="debounce"),i[Yh]=a,i[rw]=n,i[ew]=e}return i}}function Ku(r,t){var e=r[t];e&&e[Yh]&&(e.clear&&e.clear(),r[t]=e[Yh])}var nw=Nt(),iw={itemStyle:Mo(AP,!0),lineStyle:Mo(TP,!0)},F4={lineStyle:"stroke",itemStyle:"fill"};function b2(r,t){var e=r.visualStyleMapper||iw[t];return e||(console.warn("Unknown style type '"+t+"'."),iw.itemStyle)}function w2(r,t){var e=r.visualDrawType||F4[t];return e||(console.warn("Unknown style type '"+t+"'."),"fill")}var H4={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,t){var e=r.getData(),n=r.visualStyleAccessPath||"itemStyle",i=r.getModel(n),a=b2(r,n),o=a(i),s=i.getShallow("decal");s&&(e.setVisual("decal",s),s.dirty=!0);var l=w2(r,n),u=o[l],f=vt(u)?u:null,c=o.fill==="auto"||o.stroke==="auto";if(!o[l]||f||c){var h=r.getColorFromPalette(r.name,null,t.getSeriesCount());o[l]||(o[l]=h,e.setVisual("colorFromPalette",!0)),o.fill=o.fill==="auto"||vt(o.fill)?h:o.fill,o.stroke=o.stroke==="auto"||vt(o.stroke)?h:o.stroke}if(e.setVisual("style",o),e.setVisual("drawType",l),!t.isSeriesFiltered(r)&&f)return e.setVisual("colorFromPalette",!1),{dataEach:function(v,d){var p=r.getDataParams(d),g=F({},o);g[l]=f(p),v.setItemVisual(d,"style",g)}}}},Dl=new te,W4={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,t){if(!(r.ignoreStyleOnData||t.isSeriesFiltered(r))){var e=r.getData(),n=r.visualStyleAccessPath||"itemStyle",i=b2(r,n),a=e.getVisual("drawType");return{dataEach:e.hasItemOption?function(o,s){var l=o.getRawDataItem(s);if(l&&l[n]){Dl.option=l[n];var u=i(Dl),f=o.ensureUniqueItemVisual(s,"style");F(f,u),Dl.option.decal&&(o.setItemVisual(s,"decal",Dl.option.decal),Dl.option.decal.dirty=!0),a in u&&o.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},$4={performRawSeries:!0,overallReset:function(r){var t=ft();r.eachSeries(function(e){var n=e.getColorBy();if(!e.isColorBySeries()){var i=e.type+"-"+n,a=t.get(i);a||(a={},t.set(i,a)),nw(e).scope=a}}),r.eachSeries(function(e){if(!(e.isColorBySeries()||r.isSeriesFiltered(e))){var n=e.getRawData(),i={},a=e.getData(),o=nw(e).scope,s=e.visualStyleAccessPath||"itemStyle",l=w2(e,s);a.each(function(u){var f=a.getRawIndex(u);i[f]=u}),n.each(function(u){var f=i[u],c=a.getItemVisual(f,"colorFromPalette");if(c){var h=a.ensureUniqueItemVisual(f,"style"),v=n.getName(u)||u+"",d=n.count();h[l]=e.getColorFromPalette(v,o,d)}})}})}},uc=Math.PI;function U4(r,t){t=t||{},pt(t,{text:"loading",textColor:"#000",fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#5470c6",spinnerRadius:10,lineWidth:5,zlevel:0});var e=new _t,n=new Vt({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});e.add(n);var i=new Gt({style:{text:t.text,fill:t.textColor,fontSize:t.fontSize,fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontFamily:t.fontFamily},zlevel:t.zlevel,z:10001}),a=new Vt({style:{fill:"none"},textContent:i,textConfig:{position:"right",distance:10},zlevel:t.zlevel,z:10001});e.add(a);var o;return t.showSpinner&&(o=new c_({shape:{startAngle:-uc/2,endAngle:-uc/2+.1,r:t.spinnerRadius},style:{stroke:t.color,lineCap:"round",lineWidth:t.lineWidth},zlevel:t.zlevel,z:10001}),o.animateShape(!0).when(1e3,{endAngle:uc*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:uc*3/2}).delay(300).start("circularInOut"),e.add(o)),e.resize=function(){var s=i.getBoundingRect().width,l=t.showSpinner?t.spinnerRadius:0,u=(r.getWidth()-l*2-(t.showSpinner&&s?10:0)-s)/2-(t.showSpinner&&s?0:5+s/2)+(t.showSpinner?0:s/2)+(s?0:l),f=r.getHeight()/2;t.showSpinner&&o.setShape({cx:u,cy:f}),a.setShape({x:u-l,y:f-l,width:l*2,height:l*2}),n.setShape({x:0,y:0,width:r.getWidth(),height:r.getHeight()})},e.resize(),e}var Y4=function(){function r(t,e,n,i){this._stageTaskMap=ft(),this.ecInstance=t,this.api=e,n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice(),this._allHandlers=n.concat(i)}return r.prototype.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each(function(n){var i=n.overallTask;i&&i.dirty()})},r.prototype.getPerformArgs=function(t,e){if(t.__pipeline){var n=this._pipelineMap.get(t.__pipeline.id),i=n.context,a=!e&&n.progressiveEnabled&&(!i||i.progressiveRender)&&t.__idxInPipeline>n.blockIndex,o=a?n.step:null,s=i&&i.modDataCount,l=s!=null?Math.ceil(s/o):null;return{step:o,modBy:l,modDataCount:s}}},r.prototype.getPipeline=function(t){return this._pipelineMap.get(t)},r.prototype.updateStreamModes=function(t,e){var n=this._pipelineMap.get(t.uid),i=t.getData(),a=i.count(),o=n.progressiveEnabled&&e.incrementalPrepareRender&&a>=n.threshold,s=t.get("large")&&a>=t.get("largeThreshold"),l=t.get("progressiveChunkMode")==="mod"?a:null;t.pipelineContext=n.context={progressiveRender:o,modDataCount:l,large:s}},r.prototype.restorePipelines=function(t){var e=this,n=e._pipelineMap=ft();t.eachSeries(function(i){var a=i.getProgressive(),o=i.uid;n.set(o,{id:o,head:null,tail:null,threshold:i.getProgressiveThreshold(),progressiveEnabled:a&&!(i.preventIncremental&&i.preventIncremental()),blockIndex:-1,step:Math.round(a||700),count:0}),e._pipe(i,i.dataTask)})},r.prototype.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.api.getModel(),n=this.api;M(this._allHandlers,function(i){var a=t.get(i.uid)||t.set(i.uid,{}),o="";or(!(i.reset&&i.overallReset),o),i.reset&&this._createSeriesStageTask(i,a,e,n),i.overallReset&&this._createOverallStageTask(i,a,e,n)},this)},r.prototype.prepareView=function(t,e,n,i){var a=t.renderTask,o=a.context;o.model=e,o.ecModel=n,o.api=i,a.__block=!t.incrementalPrepareRender,this._pipe(e,a)},r.prototype.performDataProcessorTasks=function(t,e){this._performStageTasks(this._dataProcessorHandlers,t,e,{block:!0})},r.prototype.performVisualTasks=function(t,e,n){this._performStageTasks(this._visualHandlers,t,e,n)},r.prototype._performStageTasks=function(t,e,n,i){i=i||{};var a=!1,o=this;M(t,function(l,u){if(!(i.visualType&&i.visualType!==l.visualType)){var f=o._stageTaskMap.get(l.uid),c=f.seriesTaskMap,h=f.overallTask;if(h){var v,d=h.agentStubMap;d.each(function(g){s(i,g)&&(g.dirty(),v=!0)}),v&&h.dirty(),o.updatePayload(h,n);var p=o.getPerformArgs(h,i.block);d.each(function(g){g.perform(p)}),h.perform(p)&&(a=!0)}else c&&c.each(function(g,y){s(i,g)&&g.dirty();var m=o.getPerformArgs(g,i.block);m.skip=!l.performRawSeries&&e.isSeriesFiltered(g.context.model),o.updatePayload(g,n),g.perform(m)&&(a=!0)})}});function s(l,u){return l.setDirty&&(!l.dirtyMap||l.dirtyMap.get(u.__pipeline.id))}this.unfinished=a||this.unfinished},r.prototype.performSeriesTasks=function(t){var e;t.eachSeries(function(n){e=n.dataTask.perform()||e}),this.unfinished=e||this.unfinished},r.prototype.plan=function(){this._pipelineMap.each(function(t){var e=t.tail;do{if(e.__block){t.blockIndex=e.__idxInPipeline;break}e=e.getUpstream()}while(e)})},r.prototype.updatePayload=function(t,e){e!=="remain"&&(t.context.payload=e)},r.prototype._createSeriesStageTask=function(t,e,n,i){var a=this,o=e.seriesTaskMap,s=e.seriesTaskMap=ft(),l=t.seriesType,u=t.getTargetSeries;t.createOnAllSeries?n.eachRawSeries(f):l?n.eachRawSeriesByType(l,f):u&&u(n,i).each(f);function f(c){var h=c.uid,v=s.set(h,o&&o.get(h)||wu({plan:j4,reset:J4,count:tW}));v.context={model:c,ecModel:n,api:i,useClearVisual:t.isVisual&&!t.isLayout,plan:t.plan,reset:t.reset,scheduler:a},a._pipe(c,v)}},r.prototype._createOverallStageTask=function(t,e,n,i){var a=this,o=e.overallTask=e.overallTask||wu({reset:Z4});o.context={ecModel:n,api:i,overallReset:t.overallReset,scheduler:a};var s=o.agentStubMap,l=o.agentStubMap=ft(),u=t.seriesType,f=t.getTargetSeries,c=!0,h=!1,v="";or(!t.createOnAllSeries,v),u?n.eachRawSeriesByType(u,d):f?f(n,i).each(d):(c=!1,M(n.getSeries(),d));function d(p){var g=p.uid,y=l.set(g,s&&s.get(g)||(h=!0,wu({reset:X4,onDirty:K4})));y.context={model:p,overallProgress:c},y.agent=o,y.__block=c,a._pipe(p,y)}h&&o.dirty()},r.prototype._pipe=function(t,e){var n=t.uid,i=this._pipelineMap.get(n);!i.head&&(i.head=e),i.tail&&i.tail.pipe(e),i.tail=e,e.__idxInPipeline=i.count++,e.__pipeline=i},r.wrapStageHandler=function(t,e){return vt(t)&&(t={overallReset:t,seriesType:eW(t)}),t.uid=rl("stageHandler"),e&&(t.visualType=e),t},r}();function Z4(r){r.overallReset(r.ecModel,r.api,r.payload)}function X4(r){return r.overallProgress&&q4}function q4(){this.agent.dirty(),this.getDownstream().dirty()}function K4(){this.agent&&this.agent.dirty()}function j4(r){return r.plan?r.plan(r.model,r.ecModel,r.api,r.payload):null}function J4(r){r.useClearVisual&&r.data.clearAllVisual();var t=r.resetDefines=Zt(r.reset(r.model,r.ecModel,r.api,r.payload));return t.length>1?Z(t,function(e,n){return T2(n)}):Q4}var Q4=T2(0);function T2(r){return function(t,e){var n=e.data,i=e.resetDefines[r];if(i&&i.dataEach)for(var a=t.start;a0&&v===u.length-h.length){var d=u.slice(0,v);d!=="data"&&(e.mainType=d,e[h.toLowerCase()]=l,f=!0)}}s.hasOwnProperty(u)&&(n[u]=l,f=!0),f||(i[u]=l)})}return{cptQuery:e,dataQuery:n,otherQuery:i}},r.prototype.filter=function(t,e){var n=this.eventInfo;if(!n)return!0;var i=n.targetEl,a=n.packedEvent,o=n.model,s=n.view;if(!o||!s)return!0;var l=e.cptQuery,u=e.dataQuery;return f(l,o,"mainType")&&f(l,o,"subType")&&f(l,o,"index","componentIndex")&&f(l,o,"name")&&f(l,o,"id")&&f(u,a,"name")&&f(u,a,"dataIndex")&&f(u,a,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(t,e.otherQuery,i,a));function f(c,h,v,d){return c[v]==null||h[d||v]===c[v]}},r.prototype.afterTrigger=function(){this.eventInfo=null},r}(),mm=["symbol","symbolSize","symbolRotate","symbolOffset"],lw=mm.concat(["symbolKeepAspect"]),aW={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,t){var e=r.getData();if(r.legendIcon&&e.setVisual("legendIcon",r.legendIcon),!r.hasSymbolVisual)return;for(var n={},i={},a=!1,o=0;o=0&&lo(l)?l:.5;var u=r.createRadialGradient(o,s,0,o,s,l);return u}function _m(r,t,e){for(var n=t.type==="radial"?xW(r,t,e):SW(r,t,e),i=t.colorStops,a=0;a0)?null:r==="dashed"?[4*t,2*t]:r==="dotted"?[t]:Ft(r)?[r]:Y(r)?r:null}function E_(r){var t=r.style,e=t.lineDash&&t.lineWidth>0&&wW(t.lineDash,t.lineWidth),n=t.lineDashOffset;if(e){var i=t.strokeNoScale&&r.getLineScale?r.getLineScale():1;i&&i!==1&&(e=Z(e,function(a){return a/i}),n/=i)}return[e,n]}var TW=new Un(!0);function qh(r){var t=r.stroke;return!(t==null||t==="none"||!(r.lineWidth>0))}function uw(r){return typeof r=="string"&&r!=="none"}function Kh(r){var t=r.fill;return t!=null&&t!=="none"}function fw(r,t){if(t.fillOpacity!=null&&t.fillOpacity!==1){var e=r.globalAlpha;r.globalAlpha=t.fillOpacity*t.opacity,r.fill(),r.globalAlpha=e}else r.fill()}function cw(r,t){if(t.strokeOpacity!=null&&t.strokeOpacity!==1){var e=r.globalAlpha;r.globalAlpha=t.strokeOpacity*t.opacity,r.stroke(),r.globalAlpha=e}else r.stroke()}function Sm(r,t,e){var n=r_(t.image,t.__image,e);if(Xv(n)){var i=r.createPattern(n,t.repeat||"repeat");if(typeof DOMMatrix=="function"&&i&&i.setTransform){var a=new DOMMatrix;a.translateSelf(t.x||0,t.y||0),a.rotateSelf(0,0,(t.rotation||0)*Kc),a.scaleSelf(t.scaleX||1,t.scaleY||1),i.setTransform(a)}return i}}function AW(r,t,e,n){var i,a=qh(e),o=Kh(e),s=e.strokePercent,l=s<1,u=!t.path;(!t.silent||l)&&u&&t.createPathProxy();var f=t.path||TW,c=t.__dirty;if(!n){var h=e.fill,v=e.stroke,d=o&&!!h.colorStops,p=a&&!!v.colorStops,g=o&&!!h.image,y=a&&!!v.image,m=void 0,_=void 0,S=void 0,x=void 0,b=void 0;(d||p)&&(b=t.getBoundingRect()),d&&(m=c?_m(r,h,b):t.__canvasFillGradient,t.__canvasFillGradient=m),p&&(_=c?_m(r,v,b):t.__canvasStrokeGradient,t.__canvasStrokeGradient=_),g&&(S=c||!t.__canvasFillPattern?Sm(r,h,t):t.__canvasFillPattern,t.__canvasFillPattern=S),y&&(x=c||!t.__canvasStrokePattern?Sm(r,v,t):t.__canvasStrokePattern,t.__canvasStrokePattern=S),d?r.fillStyle=m:g&&(S?r.fillStyle=S:o=!1),p?r.strokeStyle=_:y&&(x?r.strokeStyle=x:a=!1)}var w=t.getGlobalScale();f.setScale(w[0],w[1],t.segmentIgnoreThreshold);var T,A;r.setLineDash&&e.lineDash&&(i=E_(t),T=i[0],A=i[1]);var C=!0;(u||c&vs)&&(f.setDPR(r.dpr),l?f.setContext(null):(f.setContext(r),C=!1),f.reset(),t.buildPath(f,t.shape,n),f.toStatic(),t.pathUpdated()),C&&f.rebuildPath(r,l?s:1),T&&(r.setLineDash(T),r.lineDashOffset=A),n||(e.strokeFirst?(a&&cw(r,e),o&&fw(r,e)):(o&&fw(r,e),a&&cw(r,e))),T&&r.setLineDash([])}function CW(r,t,e){var n=t.__image=r_(e.image,t.__image,t,t.onload);if(!(!n||!Xv(n))){var i=e.x||0,a=e.y||0,o=t.getWidth(),s=t.getHeight(),l=n.width/n.height;if(o==null&&s!=null?o=s*l:s==null&&o!=null?s=o/l:o==null&&s==null&&(o=n.width,s=n.height),e.sWidth&&e.sHeight){var u=e.sx||0,f=e.sy||0;r.drawImage(n,u,f,e.sWidth,e.sHeight,i,a,o,s)}else if(e.sx&&e.sy){var u=e.sx,f=e.sy,c=o-u,h=s-f;r.drawImage(n,u,f,c,h,i,a,o,s)}else r.drawImage(n,i,a,o,s)}}function MW(r,t,e){var n,i=e.text;if(i!=null&&(i+=""),i){r.font=e.font||na,r.textAlign=e.textAlign,r.textBaseline=e.textBaseline;var a=void 0,o=void 0;r.setLineDash&&e.lineDash&&(n=E_(t),a=n[0],o=n[1]),a&&(r.setLineDash(a),r.lineDashOffset=o),e.strokeFirst?(qh(e)&&r.strokeText(i,e.x,e.y),Kh(e)&&r.fillText(i,e.x,e.y)):(Kh(e)&&r.fillText(i,e.x,e.y),qh(e)&&r.strokeText(i,e.x,e.y)),a&&r.setLineDash([])}}var hw=["shadowBlur","shadowOffsetX","shadowOffsetY"],vw=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function P2(r,t,e,n,i){var a=!1;if(!n&&(e=e||{},t===e))return!1;if(n||t.opacity!==e.opacity){dr(r,i),a=!0;var o=Math.max(Math.min(t.opacity,1),0);r.globalAlpha=isNaN(o)?yo.opacity:o}(n||t.blend!==e.blend)&&(a||(dr(r,i),a=!0),r.globalCompositeOperation=t.blend||yo.blend);for(var s=0;s0&&e.unfinished);e.unfinished||this._zr.flush()}}},t.prototype.getDom=function(){return this._dom},t.prototype.getId=function(){return this.id},t.prototype.getZr=function(){return this._zr},t.prototype.isSSR=function(){return this._ssr},t.prototype.setOption=function(e,n,i){if(!this[$e]){if(this._disposed){this.id;return}var a,o,s;if(yt(n)&&(i=n.lazyUpdate,a=n.silent,o=n.replaceMerge,s=n.transition,n=n.notMerge),this[$e]=!0,!this._model||n){var l=new HH(this._api),u=this._theme,f=this._model=new KP;f.scheduler=this._scheduler,f.ssr=this._ssr,f.init(null,null,null,u,this._locale,l)}this._model.setOption(e,{replaceMerge:o},bm);var c={seriesTransition:s,optionChanged:!0};if(i)this[ur]={silent:a,updateParams:c},this[$e]=!1,this.getZr().wakeUp();else{try{ts(this),Ri.update.call(this,null,c)}catch(h){throw this[ur]=null,this[$e]=!1,h}this._ssr||this._zr.flush(),this[ur]=null,this[$e]=!1,Il.call(this,a),Ll.call(this,a)}}},t.prototype.setTheme=function(){},t.prototype.getModel=function(){return this._model},t.prototype.getOption=function(){return this._model&&this._model.getOption()},t.prototype.getWidth=function(){return this._zr.getWidth()},t.prototype.getHeight=function(){return this._zr.getHeight()},t.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||zt.hasGlobalWindow&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(e){return this.renderToCanvas(e)},t.prototype.renderToCanvas=function(e){e=e||{};var n=this._zr.painter;return n.getRenderedCanvas({backgroundColor:e.backgroundColor||this._model.get("backgroundColor"),pixelRatio:e.pixelRatio||this.getDevicePixelRatio()})},t.prototype.renderToSVGString=function(e){e=e||{};var n=this._zr.painter;return n.renderToString({useViewBox:e.useViewBox})},t.prototype.getSvgDataURL=function(){if(zt.svgSupported){var e=this._zr,n=e.storage.getDisplayList();return M(n,function(i){i.stopAnimation(null,!0)}),e.painter.toDataURL()}},t.prototype.getDataURL=function(e){if(this._disposed){this.id;return}e=e||{};var n=e.excludeComponents,i=this._model,a=[],o=this;M(n,function(l){i.eachComponent({mainType:l},function(u){var f=o._componentsMap[u.__viewId];f.group.ignore||(a.push(f),f.group.ignore=!0)})});var s=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(e).toDataURL("image/"+(e&&e.type||"png"));return M(a,function(l){l.group.ignore=!1}),s},t.prototype.getConnectedDataURL=function(e){if(this._disposed){this.id;return}var n=e.type==="svg",i=this.group,a=Math.min,o=Math.max,s=1/0;if(Dw[i]){var l=s,u=s,f=-s,c=-s,h=[],v=e&&e.pixelRatio||this.getDevicePixelRatio();M(Au,function(_,S){if(_.group===i){var x=n?_.getZr().painter.getSvgDom().innerHTML:_.renderToCanvas(mt(e)),b=_.getDom().getBoundingClientRect();l=a(b.left,l),u=a(b.top,u),f=o(b.right,f),c=o(b.bottom,c),h.push({dom:x,left:b.left,top:b.top})}}),l*=v,u*=v,f*=v,c*=v;var d=f-l,p=c-u,g=ia.createCanvas(),y=Ex(g,{renderer:n?"svg":"canvas"});if(y.resize({width:d,height:p}),n){var m="";return M(h,function(_){var S=_.left-l,x=_.top-u;m+=''+_.dom+""}),y.painter.getSvgRoot().innerHTML=m,e.connectedBackgroundColor&&y.painter.setBackgroundColor(e.connectedBackgroundColor),y.refreshImmediately(),y.painter.toDataURL()}else return e.connectedBackgroundColor&&y.add(new Vt({shape:{x:0,y:0,width:d,height:p},style:{fill:e.connectedBackgroundColor}})),M(h,function(_){var S=new He({style:{x:_.left*v-l,y:_.top*v-u,image:_.dom}});y.add(S)}),y.refreshImmediately(),g.toDataURL("image/"+(e&&e.type||"png"))}else return this.getDataURL(e)},t.prototype.convertToPixel=function(e,n){return zp(this,"convertToPixel",e,n)},t.prototype.convertFromPixel=function(e,n){return zp(this,"convertFromPixel",e,n)},t.prototype.containPixel=function(e,n){if(this._disposed){this.id;return}var i=this._model,a,o=mu(i,e);return M(o,function(s,l){l.indexOf("Models")>=0&&M(s,function(u){var f=u.coordinateSystem;if(f&&f.containPoint)a=a||!!f.containPoint(n);else if(l==="seriesModels"){var c=this._chartsMap[u.__viewId];c&&c.containPoint&&(a=a||c.containPoint(n,u))}},this)},this),!!a},t.prototype.getVisual=function(e,n){var i=this._model,a=mu(i,e,{defaultMainType:"series"}),o=a.seriesModel,s=o.getData(),l=a.hasOwnProperty("dataIndexInside")?a.dataIndexInside:a.hasOwnProperty("dataIndex")?s.indexOfRawIndex(a.dataIndex):null;return l!=null?R_(s,l,n):Af(s,n)},t.prototype.getViewOfComponentModel=function(e){return this._componentsMap[e.__viewId]},t.prototype.getViewOfSeriesModel=function(e){return this._chartsMap[e.__viewId]},t.prototype._initEvents=function(){var e=this;M(QW,function(n){var i=function(a){var o=e.getModel(),s=a.target,l,u=n==="globalout";if(u?l={}:s&&so(s,function(d){var p=St(d);if(p&&p.dataIndex!=null){var g=p.dataModel||o.getSeriesByIndex(p.seriesIndex);return l=g&&g.getDataParams(p.dataIndex,p.dataType,s)||{},!0}else if(p.eventData)return l=F({},p.eventData),!0},!0),l){var f=l.componentType,c=l.componentIndex;(f==="markLine"||f==="markPoint"||f==="markArea")&&(f="series",c=l.seriesIndex);var h=f&&c!=null&&o.getComponent(f,c),v=h&&e[h.mainType==="series"?"_chartsMap":"_componentsMap"][h.__viewId];l.event=a,l.type=n,e._$eventProcessor.eventInfo={targetEl:s,packedEvent:l,model:h,view:v},e.trigger(n,l)}};i.zrEventfulCallAtLast=!0,e._zr.on(n,i,e)}),M(Tu,function(n,i){e._messageCenter.on(i,function(a){this.trigger(i,a)},e)}),M(["selectchanged"],function(n){e._messageCenter.on(n,function(i){this.trigger(n,i)},e)}),sW(this._messageCenter,this,this._api)},t.prototype.isDisposed=function(){return this._disposed},t.prototype.clear=function(){if(this._disposed){this.id;return}this.setOption({series:[]},!0)},t.prototype.dispose=function(){if(this._disposed){this.id;return}this._disposed=!0;var e=this.getDom();e&&AL(this.getDom(),N_,"");var n=this,i=n._api,a=n._model;M(n._componentsViews,function(o){o.dispose(a,i)}),M(n._chartsViews,function(o){o.dispose(a,i)}),n._zr.dispose(),n._dom=n._model=n._chartsMap=n._componentsMap=n._chartsViews=n._componentsViews=n._scheduler=n._api=n._zr=n._throttledZrFlush=n._theme=n._coordSysMgr=n._messageCenter=null,delete Au[n.id]},t.prototype.resize=function(e){if(!this[$e]){if(this._disposed){this.id;return}this._zr.resize(e);var n=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!n){var i=n.resetOption("media"),a=e&&e.silent;this[ur]&&(a==null&&(a=this[ur].silent),i=!0,this[ur]=null),this[$e]=!0;try{i&&ts(this),Ri.update.call(this,{type:"resize",animation:F({duration:0},e&&e.animation)})}catch(o){throw this[$e]=!1,o}this[$e]=!1,Il.call(this,a),Ll.call(this,a)}}},t.prototype.showLoading=function(e,n){if(this._disposed){this.id;return}if(yt(e)&&(n=e,e=""),e=e||"default",this.hideLoading(),!!wm[e]){var i=wm[e](this._api,n),a=this._zr;this._loadingFX=i,a.add(i)}},t.prototype.hideLoading=function(){if(this._disposed){this.id;return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},t.prototype.makeActionFromEvent=function(e){var n=F({},e);return n.type=Tu[e.type],n},t.prototype.dispatchAction=function(e,n){if(this._disposed){this.id;return}if(yt(n)||(n={silent:!!n}),!!jh[e.type]&&this._model){if(this[$e]){this._pendingActions.push(e);return}var i=n.silent;Fp.call(this,e,i);var a=n.flush;a?this._zr.flush():a!==!1&&zt.browser.weChat&&this._throttledZrFlush(),Il.call(this,i),Ll.call(this,i)}},t.prototype.updateLabelLayout=function(){en.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(e){if(this._disposed){this.id;return}var n=e.seriesIndex,i=this.getModel(),a=i.getSeriesByIndex(n);a.appendData(e),this._scheduler.unfinished=!0,this.getZr().wakeUp()},t.internalField=function(){ts=function(c){var h=c._scheduler;h.restorePipelines(c._model),h.prepareStageTasks(),Bp(c,!0),Bp(c,!1),h.plan()},Bp=function(c,h){for(var v=c._model,d=c._scheduler,p=h?c._componentsViews:c._chartsViews,g=h?c._componentsMap:c._chartsMap,y=c._zr,m=c._api,_=0;_h.get("hoverLayerThreshold")&&!zt.node&&!zt.worker&&h.eachSeries(function(g){if(!g.preventUsingHoverLayer){var y=c._chartsMap[g.__viewId];y.__alive&&y.eachRendered(function(m){m.states.emphasis&&(m.states.emphasis.hoverLayer=!0)})}})}function o(c,h){var v=c.get("blendMode")||null;h.eachRendered(function(d){d.isGroup||(d.style.blend=v)})}function s(c,h){if(!c.preventAutoZ){var v=c.get("z")||0,d=c.get("zlevel")||0;h.eachRendered(function(p){return l(p,v,d,-1/0),!0})}}function l(c,h,v,d){var p=c.getTextContent(),g=c.getTextGuideLine(),y=c.isGroup;if(y)for(var m=c.childrenRef(),_=0;_0?{duration:p,delay:v.get("delay"),easing:v.get("easing")}:null;h.eachRendered(function(y){if(y.states&&y.states.emphasis){if(Is(y))return;if(y instanceof Pt&&c3(y),y.__dirty){var m=y.prevStates;m&&y.useStates(m)}if(d){y.stateTransition=g;var _=y.getTextContent(),S=y.getTextGuideLine();_&&(_.stateTransition=g),S&&(S.stateTransition=g)}y.__dirty&&i(y)}})}Cw=function(c){return new(function(h){B(v,h);function v(){return h!==null&&h.apply(this,arguments)||this}return v.prototype.getCoordinateSystems=function(){return c._coordSysMgr.getCoordinateSystems()},v.prototype.getComponentByElement=function(d){for(;d;){var p=d.__ecComponentInfo;if(p!=null)return c._model.getComponent(p.mainType,p.index);d=d.parent}},v.prototype.enterEmphasis=function(d,p){mi(d,p),Lr(c)},v.prototype.leaveEmphasis=function(d,p){_i(d,p),Lr(c)},v.prototype.enterBlur=function(d){YL(d),Lr(c)},v.prototype.leaveBlur=function(d){s_(d),Lr(c)},v.prototype.enterSelect=function(d){ZL(d),Lr(c)},v.prototype.leaveSelect=function(d){XL(d),Lr(c)},v.prototype.getModel=function(){return c.getModel()},v.prototype.getViewOfComponentModel=function(d){return c.getViewOfComponentModel(d)},v.prototype.getViewOfSeriesModel=function(d){return c.getViewOfSeriesModel(d)},v}(jP))(c)},Y2=function(c){function h(v,d){for(var p=0;p=0)){Iw.push(e);var a=M2.wrapStageHandler(e,i);a.__prio=t,a.__raw=e,r.push(a)}}function j2(r,t){wm[r]=t}function o$(r,t,e){var n=BW("registerMap");n&&n(r,t,e)}var s$=g4;Bo(k_,H4);Bo(dd,W4);Bo(dd,$4);Bo(k_,aW);Bo(dd,oW);Bo(G2,OW);V_(QP);K2(FW,KH);j2("default",U4);Zn({type:mo,event:mo,update:mo},de);Zn({type:ah,event:ah,update:ah},de);Zn({type:_u,event:_u,update:_u},de);Zn({type:oh,event:oh,update:oh},de);Zn({type:Su,event:Su,update:Su},de);q2("light",rW);q2("dark",nW);var Lw=[],l$={registerPreprocessor:V_,registerProcessor:K2,registerPostInit:r$,registerPostUpdate:n$,registerUpdateLifecycle:B_,registerAction:Zn,registerCoordinateSystem:i$,registerLayout:a$,registerVisual:Bo,registerTransform:s$,registerLoading:j2,registerMap:o$,registerImpl:VW,PRIORITY:KW,ComponentModel:Bt,ComponentView:fe,SeriesModel:le,ChartView:ee,registerComponentModel:function(r){Bt.registerClass(r)},registerComponentView:function(r){fe.registerClass(r)},registerSeriesModel:function(r){le.registerClass(r)},registerChartView:function(r){ee.registerClass(r)},registerSubTypeDefaulter:function(r,t){Bt.registerSubTypeDefaulter(r,t)},registerPainter:function(r,t){IG(r,t)}};function Lt(r){if(Y(r)){M(r,function(t){Lt(t)});return}Dt(Lw,r)>=0||(Lw.push(r),vt(r)&&(r={install:r}),r.install(l$))}function Pl(r){return r==null?0:r.length||1}function Pw(r){return r}var u$=function(){function r(t,e,n,i,a,o){this._old=t,this._new=e,this._oldKeyGetter=n||Pw,this._newKeyGetter=i||Pw,this.context=a,this._diffModeMultiple=o==="multiple"}return r.prototype.add=function(t){return this._add=t,this},r.prototype.update=function(t){return this._update=t,this},r.prototype.updateManyToOne=function(t){return this._updateManyToOne=t,this},r.prototype.updateOneToMany=function(t){return this._updateOneToMany=t,this},r.prototype.updateManyToMany=function(t){return this._updateManyToMany=t,this},r.prototype.remove=function(t){return this._remove=t,this},r.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},r.prototype._executeOneToOne=function(){var t=this._old,e=this._new,n={},i=new Array(t.length),a=new Array(e.length);this._initIndexMap(t,null,i,"_oldKeyGetter"),this._initIndexMap(e,n,a,"_newKeyGetter");for(var o=0;o1){var f=l.shift();l.length===1&&(n[s]=l[0]),this._update&&this._update(f,o)}else u===1?(n[s]=null,this._update&&this._update(l,o)):this._remove&&this._remove(o)}this._performRestAdd(a,n)},r.prototype._executeMultiple=function(){var t=this._old,e=this._new,n={},i={},a=[],o=[];this._initIndexMap(t,n,a,"_oldKeyGetter"),this._initIndexMap(e,i,o,"_newKeyGetter");for(var s=0;s1&&h===1)this._updateManyToOne&&this._updateManyToOne(f,u),i[l]=null;else if(c===1&&h>1)this._updateOneToMany&&this._updateOneToMany(f,u),i[l]=null;else if(c===1&&h===1)this._update&&this._update(f,u),i[l]=null;else if(c>1&&h>1)this._updateManyToMany&&this._updateManyToMany(f,u),i[l]=null;else if(c>1)for(var v=0;v1)for(var s=0;s30}var Rl=yt,Ei=Z,g$=typeof Int32Array=="undefined"?Array:Int32Array,y$="e\0\0",Rw=-1,m$=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],_$=["_approximateExtent"],Ew,dc,El,kl,$p,Ol,Up,S$=function(){function r(t,e){this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","minmaxDownSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","minmaxDownSample","lttbDownSample"];var n,i=!1;Q2(t)?(n=t.dimensions,this._dimOmitted=t.isDimensionOmitted(),this._schema=t):(i=!0,n=t),n=n||["x","y"];for(var a={},o=[],s={},l=!1,u={},f=0;f=e)){var n=this._store,i=n.getProvider();this._updateOrdinalMeta();var a=this._nameList,o=this._idList,s=i.getSource().sourceFormat,l=s===Xr;if(l&&!i.pure)for(var u=[],f=t;f0},r.prototype.ensureUniqueItemVisual=function(t,e){var n=this._itemVisuals,i=n[t];i||(i=n[t]={});var a=i[e];return a==null&&(a=this.getVisual(e),Y(a)?a=a.slice():Rl(a)&&(a=F({},a)),i[e]=a),a},r.prototype.setItemVisual=function(t,e,n){var i=this._itemVisuals[t]||{};this._itemVisuals[t]=i,Rl(e)?F(i,e):i[e]=n},r.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},r.prototype.setLayout=function(t,e){Rl(t)?F(this._layout,t):this._layout[t]=e},r.prototype.getLayout=function(t){return this._layout[t]},r.prototype.getItemLayout=function(t){return this._itemLayouts[t]},r.prototype.setItemLayout=function(t,e,n){this._itemLayouts[t]=n?F(this._itemLayouts[t]||{},e):e},r.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},r.prototype.setItemGraphicEl=function(t,e){var n=this.hostModel&&this.hostModel.seriesIndex;em(n,this.dataType,t,e),this._graphicEls[t]=e},r.prototype.getItemGraphicEl=function(t){return this._graphicEls[t]},r.prototype.eachItemGraphicEl=function(t,e){M(this._graphicEls,function(n,i){n&&t&&t.call(e,n,i)})},r.prototype.cloneShallow=function(t){return t||(t=new r(this._schema?this._schema:Ei(this.dimensions,this._getDimInfo,this),this.hostModel)),$p(t,this),t._store=this._store,t},r.prototype.wrapMethod=function(t,e){var n=this[t];vt(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var i=n.apply(this,arguments);return e.apply(this,[i].concat(W0(arguments)))})},r.internalField=function(){Ew=function(t){var e=t._invertedIndicesMap;M(e,function(n,i){var a=t._dimInfos[i],o=a.ordinalMeta,s=t._store;if(o){n=e[i]=new g$(o.categories.length);for(var l=0;l1&&(l+="__ec__"+f),i[e]=l}}}(),r}();const ar=S$;function Cf(r,t){A_(r)||(r=C_(r)),t=t||{};var e=t.coordDimensions||[],n=t.dimensionsDefine||r.dimensionsDefine||[],i=ft(),a=[],o=b$(r,e,n,t.dimensionsCount),s=t.canOmitUnusedDimensions&&rR(o),l=n===r.dimensionsDefine,u=l?eR(r):tR(n),f=t.encodeDefine;!f&&t.encodeDefaulter&&(f=t.encodeDefaulter(r,o));for(var c=ft(f),h=new f2(o),v=0;v0&&(n.name=i+(a-1)),a++,t.set(i,a)}}function b$(r,t,e,n){var i=Math.max(r.dimensionsDetectedCount||1,t.length,e.length,n||0);return M(t,function(a){var o;yt(a)&&(o=a.dimsDef)&&(i=Math.max(i,o.length))}),i}function w$(r,t,e){if(e||t.hasKey(r)){for(var n=0;t.hasKey(r+n);)n++;r+=n}return t.set(r,!0),r}var T$=function(){function r(t){this.coordSysDims=[],this.axisMap=ft(),this.categoryAxisMap=ft(),this.coordSysName=t}return r}();function A$(r){var t=r.get("coordinateSystem"),e=new T$(t),n=C$[t];if(n)return n(r,e,e.axisMap,e.categoryAxisMap),e}var C$={cartesian2d:function(r,t,e,n){var i=r.getReferringComponents("xAxis",ge).models[0],a=r.getReferringComponents("yAxis",ge).models[0];t.coordSysDims=["x","y"],e.set("x",i),e.set("y",a),es(i)&&(n.set("x",i),t.firstCategoryDimIndex=0),es(a)&&(n.set("y",a),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},singleAxis:function(r,t,e,n){var i=r.getReferringComponents("singleAxis",ge).models[0];t.coordSysDims=["single"],e.set("single",i),es(i)&&(n.set("single",i),t.firstCategoryDimIndex=0)},polar:function(r,t,e,n){var i=r.getReferringComponents("polar",ge).models[0],a=i.findAxisModel("radiusAxis"),o=i.findAxisModel("angleAxis");t.coordSysDims=["radius","angle"],e.set("radius",a),e.set("angle",o),es(a)&&(n.set("radius",a),t.firstCategoryDimIndex=0),es(o)&&(n.set("angle",o),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},geo:function(r,t,e,n){t.coordSysDims=["lng","lat"]},parallel:function(r,t,e,n){var i=r.ecModel,a=i.getComponent("parallel",r.get("parallelIndex")),o=t.coordSysDims=a.dimensions.slice();M(a.parallelAxisIndex,function(s,l){var u=i.getComponent("parallelAxis",s),f=o[l];e.set(f,u),es(u)&&(n.set(f,u),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=l))})}};function es(r){return r.get("type")==="category"}function M$(r,t,e){e=e||{};var n=e.byIndex,i=e.stackedCoordDimension,a,o,s;D$(t)?a=t:(o=t.schema,a=o.dimensions,s=t.store);var l=!!(r&&r.get("stack")),u,f,c,h;if(M(a,function(m,_){nt(m)&&(a[_]=m={name:m}),l&&!m.isExtraCoord&&(!n&&!u&&m.ordinalMeta&&(u=m),!f&&m.type!=="ordinal"&&m.type!=="time"&&(!i||i===m.coordDim)&&(f=m))}),f&&!n&&!u&&(n=!0),f){c="__\0ecstackresult_"+r.id,h="__\0ecstackedover_"+r.id,u&&(u.createInvertedIndices=!0);var v=f.coordDim,d=f.type,p=0;M(a,function(m){m.coordDim===v&&p++});var g={name:c,coordDim:v,coordDimIndex:p,type:d,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length},y={name:h,coordDim:h,coordDimIndex:p+1,type:d,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length+1};o?(s&&(g.storeDimIndex=s.ensureCalculationDimension(h,d),y.storeDimIndex=s.ensureCalculationDimension(c,d)),o.appendCalculationDimension(g),o.appendCalculationDimension(y)):(a.push(g),a.push(y))}return{stackedDimension:f&&f.name,stackedByDimension:u&&u.name,isStackedByIndex:n,stackedOverDimension:h,stackResultDimension:c}}function D$(r){return!Q2(r.schema)}function la(r,t){return!!t&&t===r.getCalculationInfo("stackedDimension")}function nR(r,t){return la(r,t)?r.getCalculationInfo("stackResultDimension"):t}function I$(r,t){var e=r.get("coordinateSystem"),n=Tf.get(e),i;return t&&t.coordSysDims&&(i=Z(t.coordSysDims,function(a){var o={name:a},s=t.axisMap.get(a);if(s){var l=s.get("type");o.type=Qh(l)}return o})),i||(i=n&&(n.getDimensionsInfo?n.getDimensionsInfo():n.dimensions.slice())||["x","y"]),i}function L$(r,t,e){var n,i;return e&&M(r,function(a,o){var s=a.coordDim,l=e.categoryAxisMap.get(s);l&&(n==null&&(n=o),a.ordinalMeta=l.getOrdinalMeta(),t&&(a.createInvertedIndices=!0)),a.otherDims.itemName!=null&&(i=!0)}),!i&&n!=null&&(r[n].otherDims.itemName=0),n}function Ai(r,t,e){e=e||{};var n=t.getSourceManager(),i,a=!1;r?(a=!0,i=C_(r)):(i=n.getSource(),a=i.sourceFormat===Xr);var o=A$(t),s=I$(t,o),l=e.useEncodeDefaulter,u=vt(l)?l:l?bt(UP,s,t):null,f={coordDimensions:s,generateCoord:e.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!a},c=Cf(i,f),h=L$(c.dimensions,e.createInvertedIndices,o),v=a?null:n.getSharedDataStore(c),d=M$(t,{schema:c,store:v}),p=new ar(c,t);p.setCalculationInfo(d);var g=h!=null&&P$(i)?function(y,m,_,S){return S===h?_:this.defaultDimValueGetter(y,m,_,S)}:null;return p.hasItemOption=!1,p.initData(a?i:v,null,g),p}function P$(r){if(r.sourceFormat===Xr){var t=R$(r.data||[]);return!Y(Js(t))}}function R$(r){for(var t=0;te[1]&&(e[1]=t[1])},r.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=t),isNaN(e)||(n[1]=e)},r.prototype.isInExtentRange=function(t){return this._extent[0]<=t&&this._extent[1]>=t},r.prototype.isBlank=function(){return this._isBlank},r.prototype.setBlank=function(t){this._isBlank=t},r}();Zv(iR);const Ci=iR;var E$=0,k$=function(){function r(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this.uid=++E$}return r.createByAxisModel=function(t){var e=t.option,n=e.data,i=n&&Z(n,O$);return new r({categories:i,needCollect:!i,deduplication:e.dedplication!==!1})},r.prototype.getOrdinal=function(t){return this._getOrCreateMap().get(t)},r.prototype.parseAndCollect=function(t){var e,n=this._needCollect;if(!nt(t)&&!n)return t;if(n&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,e;var i=this._getOrCreateMap();return e=i.get(t),e==null&&(n?(e=this.categories.length,this.categories[e]=t,i.set(t,e)):e=NaN),e},r.prototype._getOrCreateMap=function(){return this._map||(this._map=ft(this.categories))},r}();function O$(r){return yt(r)&&r.value!=null?r.value:r+""}const Tm=k$;function Am(r){return r.type==="interval"||r.type==="log"}function N$(r,t,e,n){var i={},a=r[1]-r[0],o=i.interval=yL(a/t,!0);e!=null&&on&&(o=i.interval=n);var s=i.intervalPrecision=aR(o),l=i.niceTickExtent=[ce(Math.ceil(r[0]/o)*o,s),ce(Math.floor(r[1]/o)*o,s)];return V$(l,r),i}function Yp(r){var t=Math.pow(10,J0(r)),e=r/t;return e?e===2?e=3:e===3?e=5:e*=2:e=1,ce(e*t)}function aR(r){return kn(r)+2}function kw(r,t,e){r[t]=Math.max(Math.min(r[t],e[1]),e[0])}function V$(r,t){!isFinite(r[0])&&(r[0]=t[0]),!isFinite(r[1])&&(r[1]=t[1]),kw(r,0,t),kw(r,1,t),r[0]>r[1]&&(r[0]=r[1])}function pd(r,t){return r>=t[0]&&r<=t[1]}function gd(r,t){return t[1]===t[0]?.5:(r-t[0])/(t[1]-t[0])}function yd(r,t){return r*(t[1]-t[0])+t[0]}var oR=function(r){B(t,r);function t(e){var n=r.call(this,e)||this;n.type="ordinal";var i=n.getSetting("ordinalMeta");return i||(i=new Tm({})),Y(i)&&(i=new Tm({categories:Z(i,function(a){return yt(a)?a.value:a})})),n._ordinalMeta=i,n._extent=n.getSetting("extent")||[0,i.categories.length-1],n}return t.prototype.parse=function(e){return e==null?NaN:nt(e)?this._ordinalMeta.getOrdinal(e):Math.round(e)},t.prototype.contain=function(e){return e=this.parse(e),pd(e,this._extent)&&this._ordinalMeta.categories[e]!=null},t.prototype.normalize=function(e){return e=this._getTickNumber(this.parse(e)),gd(e,this._extent)},t.prototype.scale=function(e){return e=Math.round(yd(e,this._extent)),this.getRawOrdinalNumber(e)},t.prototype.getTicks=function(){for(var e=[],n=this._extent,i=n[0];i<=n[1];)e.push({value:i}),i++;return e},t.prototype.getMinorTicks=function(e){},t.prototype.setSortInfo=function(e){if(e==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var n=e.ordinalNumbers,i=this._ordinalNumbersByTick=[],a=this._ticksByOrdinalNumber=[],o=0,s=this._ordinalMeta.categories.length,l=Math.min(s,n.length);o=0&&e=0&&e=e},t.prototype.getOrdinalMeta=function(){return this._ordinalMeta},t.prototype.calcNiceTicks=function(){},t.prototype.calcNiceExtent=function(){},t.type="ordinal",t}(Ci);Ci.registerClass(oR);const G_=oR;var Ba=ce,sR=function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="interval",e._interval=0,e._intervalPrecision=2,e}return t.prototype.parse=function(e){return e},t.prototype.contain=function(e){return pd(e,this._extent)},t.prototype.normalize=function(e){return gd(e,this._extent)},t.prototype.scale=function(e){return yd(e,this._extent)},t.prototype.setExtent=function(e,n){var i=this._extent;isNaN(e)||(i[0]=parseFloat(e)),isNaN(n)||(i[1]=parseFloat(n))},t.prototype.unionExtent=function(e){var n=this._extent;e[0]n[1]&&(n[1]=e[1]),this.setExtent(n[0],n[1])},t.prototype.getInterval=function(){return this._interval},t.prototype.setInterval=function(e){this._interval=e,this._niceExtent=this._extent.slice(),this._intervalPrecision=aR(e)},t.prototype.getTicks=function(e){var n=this._interval,i=this._extent,a=this._niceExtent,o=this._intervalPrecision,s=[];if(!n)return s;var l=1e4;i[0]l)return[];var f=s.length?s[s.length-1].value:a[1];return i[1]>f&&(e?s.push({value:Ba(f+n,o)}):s.push({value:i[1]})),s},t.prototype.getMinorTicks=function(e){for(var n=this.getTicks(!0),i=[],a=this.getExtent(),o=1;oa[0]&&v0&&(a=a===null?s:Math.min(a,s))}e[n]=a}}return e}function fR(r){var t=G$(r),e=[];return M(r,function(n){var i=n.coordinateSystem,a=i.getBaseAxis(),o=a.getExtent(),s;if(a.type==="category")s=a.getBandWidth();else if(a.type==="value"||a.type==="time"){var l=a.dim+"_"+a.index,u=t[l],f=Math.abs(o[1]-o[0]),c=a.scale.getExtent(),h=Math.abs(c[1]-c[0]);s=u?f/h*u:f}else{var v=n.getData();s=Math.abs(o[1]-o[0])/v.count()}var d=et(n.get("barWidth"),s),p=et(n.get("barMaxWidth"),s),g=et(n.get("barMinWidth")||(pR(n)?.5:1),s),y=n.get("barGap"),m=n.get("barCategoryGap");e.push({bandWidth:s,barWidth:d,barMaxWidth:p,barMinWidth:g,barGap:y,barCategoryGap:m,axisKey:H_(a),stackId:F_(n)})}),cR(e)}function cR(r){var t={};M(r,function(n,i){var a=n.axisKey,o=n.bandWidth,s=t[a]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},l=s.stacks;t[a]=s;var u=n.stackId;l[u]||s.autoWidthCount++,l[u]=l[u]||{width:0,maxWidth:0};var f=n.barWidth;f&&!l[u].width&&(l[u].width=f,f=Math.min(s.remainedWidth,f),s.remainedWidth-=f);var c=n.barMaxWidth;c&&(l[u].maxWidth=c);var h=n.barMinWidth;h&&(l[u].minWidth=h);var v=n.barGap;v!=null&&(s.gap=v);var d=n.barCategoryGap;d!=null&&(s.categoryGap=d)});var e={};return M(t,function(n,i){e[i]={};var a=n.stacks,o=n.bandWidth,s=n.categoryGap;if(s==null){var l=kt(a).length;s=Math.max(35-l*4,15)+"%"}var u=et(s,o),f=et(n.gap,1),c=n.remainedWidth,h=n.autoWidthCount,v=(c-u)/(h+(h-1)*f);v=Math.max(v,0),M(a,function(y){var m=y.maxWidth,_=y.minWidth;if(y.width){var S=y.width;m&&(S=Math.min(S,m)),_&&(S=Math.max(S,_)),y.width=S,c-=S+f*S,h--}else{var S=v;m&&mS&&(S=_),S!==v&&(y.width=S,c-=S+f*S,h--)}}),v=(c-u)/(h+(h-1)*f),v=Math.max(v,0);var d=0,p;M(a,function(y,m){y.width||(y.width=v),p=y,d+=y.width*(1+f)}),p&&(d-=p.width*f);var g=-d/2;M(a,function(y,m){e[i][m]=e[i][m]||{bandWidth:o,offset:g,width:y.width},g+=y.width*(1+f)})}),e}function F$(r,t,e){if(r&&t){var n=r[H_(t)];return n!=null&&e!=null?n[F_(e)]:n}}function hR(r,t){var e=uR(r,t),n=fR(e);M(e,function(i){var a=i.getData(),o=i.coordinateSystem,s=o.getBaseAxis(),l=F_(i),u=n[H_(s)][l],f=u.offset,c=u.width;a.setLayout({bandWidth:u.bandWidth,offset:f,size:c})})}function vR(r){return{seriesType:r,plan:sl(),reset:function(t){if(dR(t)){var e=t.getData(),n=t.coordinateSystem,i=n.getBaseAxis(),a=n.getOtherAxis(i),o=e.getDimensionIndex(e.mapDimension(a.dim)),s=e.getDimensionIndex(e.mapDimension(i.dim)),l=t.get("showBackground",!0),u=e.mapDimension(a.dim),f=e.getCalculationInfo("stackResultDimension"),c=la(e,u)&&!!e.getCalculationInfo("stackedOnSeries"),h=a.isHorizontal(),v=H$(i,a),d=pR(t),p=t.get("barMinHeight")||0,g=f&&e.getDimensionIndex(f),y=e.getLayout("size"),m=e.getLayout("offset");return{progress:function(_,S){for(var x=_.count,b=d&&Nn(x*3),w=d&&l&&Nn(x*3),T=d&&Nn(x),A=n.master.getRect(),C=h?A.width:A.height,D,I=S.getStore(),L=0;(D=_.next())!=null;){var P=I.get(c?g:o,D),E=I.get(s,D),O=v,V=void 0;c&&(V=+P-I.get(o,D));var N=void 0,z=void 0,$=void 0,q=void 0;if(h){var Q=n.dataToPoint([P,E]);if(c){var ct=n.dataToPoint([V,E]);O=ct[0]}N=O,z=Q[1]+m,$=Q[0]-O,q=y,Math.abs($)0?e:1:e))}var W$=function(r,t,e,n){for(;e>>1;r[i][1]i&&(this._approxInterval=i);var s=pc.length,l=Math.min(W$(pc,this._approxInterval,0,s),s-1);this._interval=pc[l][1],this._minLevelUnit=pc[Math.max(l-1,0)][0]},t.prototype.parse=function(e){return Ft(e)?e:+$n(e)},t.prototype.contain=function(e){return pd(this.parse(e),this._extent)},t.prototype.normalize=function(e){return gd(this.parse(e),this._extent)},t.prototype.scale=function(e){return yd(e,this._extent)},t.type="time",t}(ua),pc=[["second",m_],["minute",__],["hour",bu],["quarter-day",bu*6],["half-day",bu*12],["day",Wr*1.2],["half-week",Wr*3.5],["week",Wr*7],["month",Wr*31],["quarter",Wr*95],["half-year",wb/2],["year",wb]];function $$(r,t,e,n){var i=$n(t),a=$n(e),o=function(d){return Ab(i,d,n)===Ab(a,d,n)},s=function(){return o("year")},l=function(){return s()&&o("month")},u=function(){return l()&&o("day")},f=function(){return u()&&o("hour")},c=function(){return f()&&o("minute")},h=function(){return c()&&o("second")},v=function(){return h()&&o("millisecond")};switch(r){case"year":return s();case"month":return l();case"day":return u();case"hour":return f();case"minute":return c();case"second":return h();case"millisecond":return v()}}function U$(r,t){return r/=Wr,r>16?16:r>7.5?7:r>3.5?4:r>1.5?2:1}function Y$(r){var t=30*Wr;return r/=t,r>6?6:r>3?3:r>2?2:1}function Z$(r){return r/=bu,r>12?12:r>6?6:r>3.5?4:r>2?2:1}function Ow(r,t){return r/=t?__:m_,r>30?30:r>20?20:r>15?15:r>10?10:r>5?5:r>2?2:1}function X$(r){return yL(r,!0)}function q$(r,t,e){var n=new Date(r);switch(Ps(t)){case"year":case"month":n[LP(e)](0);case"day":n[PP(e)](1);case"hour":n[RP(e)](0);case"minute":n[EP(e)](0);case"second":n[kP(e)](0),n[OP(e)](0)}return n.getTime()}function K$(r,t,e,n){var i=1e4,a=DP,o=0;function s(C,D,I,L,P,E,O){for(var V=new Date(D),N=D,z=V[L]();N1&&E===0&&I.unshift({value:I[0].value-N})}}for(var E=0;E=n[0]&&m<=n[1]&&c++)}var _=(n[1]-n[0])/t;if(c>_*1.5&&h>_/1.5||(u.push(g),c>_||r===a[v]))break}f=[]}}}for(var S=$t(Z(u,function(C){return $t(C,function(D){return D.value>=n[0]&&D.value<=n[1]&&!D.notAdd})}),function(C){return C.length>0}),x=[],b=S.length-1,v=0;v0;)a*=10;var s=[ce(Q$(n[0]/a)*a),ce(J$(n[1]/a)*a)];this._interval=a,this._niceExtent=s}},t.prototype.calcNiceExtent=function(e){Cu.calcNiceExtent.call(this,e),this._fixMin=e.fixMin,this._fixMax=e.fixMax},t.prototype.parse=function(e){return e},t.prototype.contain=function(e){return e=Jr(e)/Jr(this.base),pd(e,this._extent)},t.prototype.normalize=function(e){return e=Jr(e)/Jr(this.base),gd(e,this._extent)},t.prototype.scale=function(e){return e=yd(e,this._extent),gc(this.base,e)},t.type="log",t}(Ci),mR=W_.prototype;mR.getMinorTicks=Cu.getMinorTicks;mR.getLabel=Cu.getLabel;function yc(r,t){return j$(r,kn(t))}Ci.registerClass(W_);const tU=W_;var eU=function(){function r(t,e,n){this._prepareParams(t,e,n)}return r.prototype._prepareParams=function(t,e,n){n[1]0&&l>0&&!u&&(s=0),s<0&&l<0&&!f&&(l=0));var h=this._determinedMin,v=this._determinedMax;return h!=null&&(s=h,u=!0),v!=null&&(l=v,f=!0),{min:s,max:l,minFixed:u,maxFixed:f,isBlank:c}},r.prototype.modifyDataMinMax=function(t,e){this[nU[t]]=e},r.prototype.setDeterminedMinMax=function(t,e){var n=rU[t];this[n]=e},r.prototype.freeze=function(){this.frozen=!0},r}(),rU={min:"_determinedMin",max:"_determinedMax"},nU={min:"_dataMin",max:"_dataMax"};function _R(r,t,e){var n=r.rawExtentInfo;return n||(n=new eU(r,t,e),r.rawExtentInfo=n,n)}function mc(r,t){return t==null?null:Nu(t)?NaN:r.parse(t)}function SR(r,t){var e=r.type,n=_R(r,t,r.getExtent()).calculate();r.setBlank(n.isBlank);var i=n.min,a=n.max,o=t.ecModel;if(o&&e==="time"){var s=uR("bar",o),l=!1;if(M(s,function(c){l=l||c.getBaseAxis()===t.axis}),l){var u=fR(s),f=iU(i,a,t,u);i=f.min,a=f.max}}return{extent:[i,a],fixMin:n.minFixed,fixMax:n.maxFixed}}function iU(r,t,e,n){var i=e.axis.getExtent(),a=Math.abs(i[1]-i[0]),o=F$(n,e.axis);if(o===void 0)return{min:r,max:t};var s=1/0;M(o,function(v){s=Math.min(v.offset,s)});var l=-1/0;M(o,function(v){l=Math.max(v.offset+v.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,f=t-r,c=1-(s+l)/a,h=f/c-f;return t+=h*(l/u),r-=h*(s/u),{min:r,max:t}}function Ws(r,t){var e=t,n=SR(r,e),i=n.extent,a=e.get("splitNumber");r instanceof tU&&(r.base=e.get("logBase"));var o=r.type,s=e.get("interval"),l=o==="interval"||o==="time";r.setExtent(i[0],i[1]),r.calcNiceExtent({splitNumber:a,fixMin:n.fixMin,fixMax:n.fixMax,minInterval:l?e.get("minInterval"):null,maxInterval:l?e.get("maxInterval"):null}),s!=null&&r.setInterval&&r.setInterval(s)}function md(r,t){if(t=t||r.get("type"),t)switch(t){case"category":return new G_({ordinalMeta:r.getOrdinalMeta?r.getOrdinalMeta():r.getCategories(),extent:[1/0,-1/0]});case"time":return new yR({locale:r.ecModel.getLocaleModel(),useUTC:r.ecModel.get("useUTC")});default:return new(Ci.getClass(t)||ua)}}function aU(r){var t=r.scale.getExtent(),e=t[0],n=t[1];return!(e>0&&n>0||e<0&&n<0)}function fl(r){var t=r.getLabelModel().get("formatter"),e=r.type==="category"?r.scale.getExtent()[0]:null;return r.scale.type==="time"?function(n){return function(i,a){return r.scale.getFormattedLabel(i,a,n)}}(t):nt(t)?function(n){return function(i){var a=r.scale.getLabel(i),o=n.replace("{value}",a!=null?a:"");return o}}(t):vt(t)?function(n){return function(i,a){return e!=null&&(a=i.value-e),n($_(r,i),a,i.level!=null?{level:i.level}:null)}}(t):function(n){return r.scale.getLabel(n)}}function $_(r,t){return r.type==="category"?r.scale.getLabel(t):t.value}function oU(r){var t=r.model,e=r.scale;if(!(!t.get(["axisLabel","show"])||e.isBlank())){var n,i,a=e.getExtent();e instanceof G_?i=e.count():(n=e.getTicks(),i=n.length);var o=r.getLabelModel(),s=fl(r),l,u=1;i>40&&(u=Math.ceil(i/40));for(var f=0;fr[1]&&(r[1]=i[1])})}var Mf=function(){function r(){}return r.prototype.getNeedCrossZero=function(){var t=this.option;return!t.scale},r.prototype.getCoordSysModel=function(){},r}(),uU=1e-8;function Vw(r,t){return Math.abs(r-t)i&&(n=o,i=l)}if(n)return cU(n.exterior);var u=this.getBoundingRect();return[u.x+u.width/2,u.y+u.height/2]},t.prototype.getBoundingRect=function(e){var n=this._rect;if(n&&!e)return n;var i=[1/0,1/0],a=[-1/0,-1/0],o=this.geometries;return M(o,function(s){s.type==="polygon"?Bw(s.exterior,i,a,e):M(s.points,function(l){Bw(l,i,a,e)})}),isFinite(i[0])&&isFinite(i[1])&&isFinite(a[0])&&isFinite(a[1])||(i[0]=i[1]=a[0]=a[1]=0),n=new Mt(i[0],i[1],a[0]-i[0],a[1]-i[1]),e||(this._rect=n),n},t.prototype.contain=function(e){var n=this.getBoundingRect(),i=this.geometries;if(!n.contain(e[0],e[1]))return!1;t:for(var a=0,o=i.length;a>1^-(s&1),l=l>>1^-(l&1),s+=i,l+=a,i=s,a=l,n.push([s/e,l/e])}return n}function dU(r,t){return r=vU(r),Z($t(r.features,function(e){return e.geometry&&e.properties&&e.geometry.coordinates.length>0}),function(e){var n=e.properties,i=e.geometry,a=[];switch(i.type){case"Polygon":var o=i.coordinates;a.push(new zw(o[0],o.slice(1)));break;case"MultiPolygon":M(i.coordinates,function(l){l[0]&&a.push(new zw(l[0],l.slice(1)))});break;case"LineString":a.push(new Gw([i.coordinates]));break;case"MultiLineString":a.push(new Gw(i.coordinates))}var s=new wR(n[t||"name"],a,n.cp);return s.properties=n,s})}var Qu=Nt();function AR(r,t){var e=Z(t,function(n){return r.scale.parse(n)});return r.type==="time"&&e.length>0&&(e.sort(),e.unshift(e[0]),e.push(e[e.length-1])),e}function pU(r){var t=r.getLabelModel().get("customValues");if(t){var e=fl(r),n=r.scale.getExtent(),i=AR(r,t),a=$t(i,function(o){return o>=n[0]&&o<=n[1]});return{labels:Z(a,function(o){var s={value:o};return{formattedLabel:e(s),rawLabel:r.scale.getLabel(s),tickValue:o}})}}return r.type==="category"?yU(r):_U(r)}function gU(r,t){var e=r.getTickModel().get("customValues");if(e){var n=r.scale.getExtent(),i=AR(r,e);return{ticks:$t(i,function(a){return a>=n[0]&&a<=n[1]})}}return r.type==="category"?mU(r,t):{ticks:Z(r.scale.getTicks(),function(a){return a.value})}}function yU(r){var t=r.getLabelModel(),e=CR(r,t);return!t.get("show")||r.scale.isBlank()?{labels:[],labelCategoryInterval:e.labelCategoryInterval}:e}function CR(r,t){var e=MR(r,"labels"),n=U_(t),i=DR(e,n);if(i)return i;var a,o;return vt(n)?a=PR(r,n):(o=n==="auto"?SU(r):n,a=LR(r,o)),IR(e,n,{labels:a,labelCategoryInterval:o})}function mU(r,t){var e=MR(r,"ticks"),n=U_(t),i=DR(e,n);if(i)return i;var a,o;if((!t.get("show")||r.scale.isBlank())&&(a=[]),vt(n))a=PR(r,n,!0);else if(n==="auto"){var s=CR(r,r.getLabelModel());o=s.labelCategoryInterval,a=Z(s.labels,function(l){return l.tickValue})}else o=n,a=LR(r,o,!0);return IR(e,n,{ticks:a,tickCategoryInterval:o})}function _U(r){var t=r.scale.getTicks(),e=fl(r);return{labels:Z(t,function(n,i){return{level:n.level,formattedLabel:e(n,i),rawLabel:r.scale.getLabel(n),tickValue:n.value}})}}function MR(r,t){return Qu(r)[t]||(Qu(r)[t]=[])}function DR(r,t){for(var e=0;e40&&(s=Math.max(1,Math.floor(o/40)));for(var l=a[0],u=r.dataToCoord(l+1)-r.dataToCoord(l),f=Math.abs(u*Math.cos(n)),c=Math.abs(u*Math.sin(n)),h=0,v=0;l<=a[1];l+=s){var d=0,p=0,g=mf(e({value:l}),t.font,"center","top");d=g.width*1.3,p=g.height*1.3,h=Math.max(h,d,7),v=Math.max(v,p,7)}var y=h/f,m=v/c;isNaN(y)&&(y=1/0),isNaN(m)&&(m=1/0);var _=Math.max(0,Math.floor(Math.min(y,m))),S=Qu(r.model),x=r.getExtent(),b=S.lastAutoInterval,w=S.lastTickCount;return b!=null&&w!=null&&Math.abs(b-_)<=1&&Math.abs(w-o)<=1&&b>_&&S.axisExtent0===x[0]&&S.axisExtent1===x[1]?_=b:(S.lastTickCount=o,S.lastAutoInterval=_,S.axisExtent0=x[0],S.axisExtent1=x[1]),_}function bU(r){var t=r.getLabelModel();return{axisRotate:r.getRotate?r.getRotate():r.isHorizontal&&!r.isHorizontal()?90:0,labelRotate:t.get("rotate")||0,font:t.getFont()}}function LR(r,t,e){var n=fl(r),i=r.scale,a=i.getExtent(),o=r.getLabelModel(),s=[],l=Math.max((t||0)+1,1),u=a[0],f=i.count();u!==0&&l>1&&f/l>2&&(u=Math.round(Math.ceil(u/l)*l));var c=xR(r),h=o.get("showMinLabel")||c,v=o.get("showMaxLabel")||c;h&&u!==a[0]&&p(a[0]);for(var d=u;d<=a[1];d+=l)p(d);v&&d-l!==a[1]&&p(a[1]);function p(g){var y={value:g};s.push(e?g:{formattedLabel:n(y),rawLabel:i.getLabel(y),tickValue:g})}return s}function PR(r,t,e){var n=r.scale,i=fl(r),a=[];return M(n.getTicks(),function(o){var s=n.getLabel(o),l=o.value;t(o.value,s)&&a.push(e?l:{formattedLabel:i(o),rawLabel:s,tickValue:l})}),a}var Fw=[0,1],wU=function(){function r(t,e,n){this.onBand=!1,this.inverse=!1,this.dim=t,this.scale=e,this._extent=n||[0,0]}return r.prototype.contain=function(t){var e=this._extent,n=Math.min(e[0],e[1]),i=Math.max(e[0],e[1]);return t>=n&&t<=i},r.prototype.containData=function(t){return this.scale.contain(t)},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.getPixelPrecision=function(t){return pL(t||this.scale.getExtent(),this._extent)},r.prototype.setExtent=function(t,e){var n=this._extent;n[0]=t,n[1]=e},r.prototype.dataToCoord=function(t,e){var n=this._extent,i=this.scale;return t=i.normalize(t),this.onBand&&i.type==="ordinal"&&(n=n.slice(),Hw(n,i.count())),Ut(t,Fw,n,e)},r.prototype.coordToData=function(t,e){var n=this._extent,i=this.scale;this.onBand&&i.type==="ordinal"&&(n=n.slice(),Hw(n,i.count()));var a=Ut(t,n,Fw,e);return this.scale.scale(a)},r.prototype.pointToData=function(t,e){},r.prototype.getTicksCoords=function(t){t=t||{};var e=t.tickModel||this.getTickModel(),n=gU(this,e),i=n.ticks,a=Z(i,function(s){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(s):s),tickValue:s}},this),o=e.get("alignWithLabel");return TU(this,a,o,t.clamp),a},r.prototype.getMinorTicksCoords=function(){if(this.scale.type==="ordinal")return[];var t=this.model.getModel("minorTick"),e=t.get("splitNumber");e>0&&e<100||(e=5);var n=this.scale.getMinorTicks(e),i=Z(n,function(a){return Z(a,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return i},r.prototype.getViewLabels=function(){return pU(this).labels},r.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},r.prototype.getTickModel=function(){return this.model.getModel("axisTick")},r.prototype.getBandWidth=function(){var t=this._extent,e=this.scale.getExtent(),n=e[1]-e[0]+(this.onBand?1:0);n===0&&(n=1);var i=Math.abs(t[1]-t[0]);return Math.abs(i)/n},r.prototype.calculateCategoryInterval=function(){return xU(this)},r}();function Hw(r,t){var e=r[1]-r[0],n=t,i=e/n/2;r[0]+=i,r[1]-=i}function TU(r,t,e,n){var i=t.length;if(!r.onBand||e||!i)return;var a=r.getExtent(),o,s;if(i===1)t[0].coord=a[0],o=t[1]={coord:a[1],tickValue:t[0].tickValue};else{var l=t[i-1].tickValue-t[0].tickValue,u=(t[i-1].coord-t[0].coord)/l;M(t,function(v){v.coord-=u/2});var f=r.scale.getExtent();s=1+f[1]-t[i-1].tickValue,o={coord:t[i-1].coord+u*s,tickValue:f[1]+1},t.push(o)}var c=a[0]>a[1];h(t[0].coord,a[0])&&(n?t[0].coord=a[0]:t.shift()),n&&h(a[0],t[0].coord)&&t.unshift({coord:a[0]}),h(a[1],o.coord)&&(n?o.coord=a[1]:t.pop()),n&&h(o.coord,a[1])&&t.push({coord:a[1]});function h(v,d){return v=ce(v),d=ce(d),c?v>d:vi&&(i+=Nl);var v=Math.atan2(s,o);if(v<0&&(v+=Nl),v>=n&&v<=i||v+Nl>=n&&v+Nl<=i)return l[0]=f,l[1]=c,u-e;var d=e*Math.cos(n)+r,p=e*Math.sin(n)+t,g=e*Math.cos(i)+r,y=e*Math.sin(i)+t,m=(d-o)*(d-o)+(p-s)*(p-s),_=(g-o)*(g-o)+(y-s)*(y-s);return m<_?(l[0]=d,l[1]=p,Math.sqrt(m)):(l[0]=g,l[1]=y,Math.sqrt(_))}function ev(r,t,e,n,i,a,o,s){var l=i-r,u=a-t,f=e-r,c=n-t,h=Math.sqrt(f*f+c*c);f/=h,c/=h;var v=l*f+u*c,d=v/h;s&&(d=Math.min(Math.max(d,0),1)),d*=h;var p=o[0]=r+d*f,g=o[1]=t+d*c;return Math.sqrt((p-i)*(p-i)+(g-a)*(g-a))}function RR(r,t,e,n,i,a,o){e<0&&(r=r+e,e=-e),n<0&&(t=t+n,n=-n);var s=r+e,l=t+n,u=o[0]=Math.min(Math.max(i,r),s),f=o[1]=Math.min(Math.max(a,t),l);return Math.sqrt((u-i)*(u-i)+(f-a)*(f-a))}var rn=[];function DU(r,t,e){var n=RR(t.x,t.y,t.width,t.height,r.x,r.y,rn);return e.set(rn[0],rn[1]),n}function IU(r,t,e){for(var n=0,i=0,a=0,o=0,s,l,u=1/0,f=t.data,c=r.x,h=r.y,v=0;v