=0&&(s=i.interpolatedValue[l])}return null!=s?s+"":""}))}},e.prototype.getRawValue=function(e,t){return Rp(this.getData(t),e)},e.prototype.formatTooltip=function(e,t,n){},e}();function Hp(e){var t,n;return I["isObject"](e)?e.type&&(n=e):t=e,{text:t,frag:n}}function zp(e){return new Bp(e)}var Bp=function(){function e(e){e=e||{},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0}return e.prototype.perform=function(e){var t,n=this._upstream,r=e&&e.skip;if(this._dirty&&n){var a=this.context;a.data=a.outputData=n.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this),this._plan&&!r&&(t=this._plan(this.context));var i,o=u(this._modBy),s=this._modDataCount||0,l=u(e&&e.modBy),c=e&&e.modDataCount||0;function u(e){return!(e>=1)&&(e=1),e}o===l&&s===c||(t="reset"),(this._dirty||"reset"===t)&&(this._dirty=!1,i=this._doReset(r)),this._modBy=l,this._modDataCount=c;var d=e&&e.step;if(this._dueEnd=n?n._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var f=this._dueIndex,p=Math.min(null!=d?this._dueIndex+d:1/0,this._dueEnd);if(!r&&(i||f1&&r>0?s:o}};return i;function o(){return t=e?null:it},gte:function(e,t){return e>=t}},qp=function(){function e(e,t){if(!Object(I["isNumber"])(t)){var n="";0,mf(n)}this._opFn=Gp[e],this._rvalFloat=Ta(t)}return e.prototype.evaluate=function(e){return Object(I["isNumber"])(e)?this._opFn(e,this._rvalFloat):this._opFn(Ta(e),this._rvalFloat)},e}(),Xp=function(){function e(e,t){var n="desc"===e;this._resultLT=n?1:-1,null==t&&(t=n?"min":"max"),this._incomparable="min"===t?-1/0:1/0}return e.prototype.evaluate=function(e,t){var n=Object(I["isNumber"])(e)?e:Ta(e),r=Object(I["isNumber"])(t)?t:Ta(t),a=isNaN(n),i=isNaN(r);if(a&&(n=this._incomparable),i&&(r=this._incomparable),a&&i){var o=Object(I["isString"])(e),s=Object(I["isString"])(t);o&&(n=s?e:0),s&&(r=o?t:0)}return nr?-this._resultLT:0},e}(),Zp=function(){function e(e,t){this._rval=t,this._isEQ=e,this._rvalTypeof=typeof t,this._rvalFloat=Ta(t)}return e.prototype.evaluate=function(e){var t=e===this._rval;if(!t){var n=typeof e;n===this._rvalTypeof||"number"!==n&&"number"!==this._rvalTypeof||(t=Ta(e)===this._rvalFloat)}return this._isEQ?t:!t},e}();function Jp(e,t){return"eq"===e||"ne"===e?new Zp("eq"===e,t):Object(I["hasOwn"])(Gp,e)?new qp(e,t):null}var $p=function(){function e(){}return e.prototype.getRawData=function(){throw new Error("not supported")},e.prototype.getRawDataItem=function(e){throw new Error("not supported")},e.prototype.cloneRawData=function(){},e.prototype.getDimensionInfo=function(e){},e.prototype.cloneAllDimensionInfo=function(){},e.prototype.count=function(){},e.prototype.retrieveValue=function(e,t){},e.prototype.retrieveValueFromItem=function(e,t){},e.prototype.convertValue=function(e,t){return Vp(e,t)},e}();function Qp(e,t){var n=new $p,r=e.data,a=n.sourceFormat=e.sourceFormat,i=e.startIndex,o="";e.seriesLayoutBy!==Wd&&mf(o);var s=[],l={},c=e.dimensionsDefine;if(c)Object(I["each"])(c,(function(e,t){var n=e.name,r={index:t,name:n,displayName:e.displayName};if(s.push(r),null!=n){var a="";Object(I["hasOwn"])(l,n)&&mf(a),l[n]=r}}));else for(var u=0;u65535?dh:fh}function gh(){return[1/0,-1/0]}function yh(e){var t=e.constructor;return t===Array?e.slice():new t(e)}function bh(e,t,n,r,a){var i=mh[n||"float"];if(a){var o=e[t],s=o&&o.length;if(s!==r){for(var l=new i(r),c=0;cm[1]&&(m[1]=h)}return this._rawCount=this._count=s,{start:o,end:s}},e.prototype._initDataFromProvider=function(e,t,n){for(var r=this._provider,a=this._chunks,i=this._dimensions,o=i.length,s=this._rawExtent,l=Object(I["map"])(i,(function(e){return e.property})),c=0;cv[1]&&(v[1]=m)}}!r.persistent&&r.clean&&r.clean(),this._rawCount=this._count=t,this._extent=[]},e.prototype.count=function(){return this._count},e.prototype.get=function(e,t){if(!(t>=0&&t=0&&t=this._rawCount||e<0)return-1;if(!this._indices)return e;var t=this._indices,n=t[e];if(null!=n&&ne))return i;a=i-1}}return-1},e.prototype.indicesOfNearest=function(e,t,n){var r=this._chunks,a=r[e],i=[];if(!a)return i;null==n&&(n=1/0);for(var o=1/0,s=-1,l=0,c=0,u=this.count();c=0&&s<0)&&(o=p,s=f,l=0),f===s&&(i[l++]=c))}return i.length=l,i},e.prototype.getIndices=function(){var e,t=this._indices;if(t){var n=t.constructor,r=this._count;if(n===Array){e=new n(r);for(var a=0;a=u&&g<=d||isNaN(g))&&(s[l++]=h),h++}p=!0}else if(2===a){m=f[r[0]];var y=f[r[1]],b=e[r[1]][0],_=e[r[1]][1];for(v=0;v=u&&g<=d||isNaN(g))&&(x>=b&&x<=_||isNaN(x))&&(s[l++]=h),h++}p=!0}}if(!p)if(1===a)for(v=0;v=u&&g<=d||isNaN(g))&&(s[l++]=w)}else for(v=0;ve[j][1])&&(O=!1)}O&&(s[l++]=t.getRawIndex(v))}return lv[1]&&(v[1]=m)}}}},e.prototype.lttbDownSample=function(e,t){var n,r,a,i=this.clone([e],!0),o=i._chunks,s=o[e],l=this.count(),c=0,u=Math.floor(1/t),d=this.getRawIndex(0),f=new(vh(this._rawCount))(Math.min(2*(Math.ceil(l/u)+2),l));f[c++]=d;for(var p=1;pn&&(n=r,a=b))}S>0&&Sc-p&&(s=c-p,o.length=s);for(var h=0;hu[1]&&(u[1]=v),d[f++]=g}return a._count=f,a._indices=d,a._updateGetRawIdx(),a},e.prototype.each=function(e,t){if(this._count)for(var n=e.length,r=this._chunks,a=0,i=this.count();as&&(s=u)}return r=[o,s],this._extent[e]=r,r},e.prototype.getRawDataItem=function(e){var t=this.getRawIndex(e);if(this._provider.persistent)return this._provider.getItem(t);for(var n=[],r=this._chunks,a=0;a=0?this._indices[e]:-1},e.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},e.internalField=function(){function e(e,t,n,r){return Vp(e[r],this._dimensions[r])}ch={arrayRows:e,objectRows:function(e,t,n,r){return Vp(e[t],this._dimensions[r])},keyedColumns:e,original:function(e,t,n,r){var a=e&&(null==e.value?e:e.value);return Vp(a instanceof Array?a[r]:a,this._dimensions[r])},typedArray:function(e,t,n,r){return e[r]}}}(),e}(),xh=_h,wh=function(){function e(e){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=e}return e.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},e.prototype._setLocalSource=function(e,t){this._sourceList=e,this._upstreamSignList=t,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},e.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},e.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},e.prototype._createSource=function(){this._setLocalSource([],[]);var e,t,n=this._sourceHost,r=this._getUpstreamSourceManagers(),a=!!r.length;if(Mh(n)){var i=n,o=void 0,s=void 0,l=void 0;if(a){var c=r[0];c.prepareSource(),l=c.getSource(),o=l.data,s=l.sourceFormat,t=[c._getVersionSign()]}else o=i.get("data",!0),s=Object(I["isTypedArray"])(o)?zd:Rd,t=[];var u=this._getSourceMetaRawOption()||{},d=l&&l.metaRawOption||{},f=Object(I["retrieve2"])(u.seriesLayoutBy,d.seriesLayoutBy)||null,p=Object(I["retrieve2"])(u.sourceHeader,d.sourceHeader),h=Object(I["retrieve2"])(u.dimensions,d.dimensions),m=f!==d.seriesLayoutBy||!!p!==!!d.sourceHeader||h;e=m?[gp(o,{seriesLayoutBy:f,sourceHeader:p,dimensions:h},s)]:[]}else{var v=n;if(a){var g=this._applyTransform(r);e=g.sourceList,t=g.upstreamSignList}else{var y=v.get("source",!0);e=[gp(y,this._getSourceMetaRawOption(),null)],t=[]}}this._setLocalSource(e,t)},e.prototype._applyTransform=function(e){var t,n=this._sourceHost,r=n.get("transform",!0),a=n.get("fromTransformResult",!0);if(null!=a){var i="";1!==e.length&&jh(i)}var o=[],s=[];return Object(I["each"])(e,(function(e){e.prepareSource();var t=e.getSource(a||0),n="";null==a||t||jh(n),o.push(t),s.push(e._getVersionSign())})),r?t=oh(r,o,{datasetIndex:n.componentIndex}):null!=a&&(t=[bp(o[0])]),{sourceList:t,upstreamSignList:s}},e.prototype._isDirty=function(){if(this._dirty)return!0;for(var e=this._getUpstreamSourceManagers(),t=0;t1||n>0&&!e.noHeader;return Object(I["each"])(e.blocks,(function(e){var n=Ih(e);n>=t&&(t=n+ +(r&&(!n||Th(e)&&!e.noHeader)))})),t}return 0}function Ph(e,t,n,r){var a=t.noHeader,i=Rh(Ih(t)),o=[],s=t.blocks||[];Object(I["assert"])(!s||Object(I["isArray"])(s)),s=s||[];var l=e.orderMode;if(t.sortBlocks&&l){s=s.slice();var c={valueAsc:"asc",valueDesc:"desc"};if(Object(I["hasOwn"])(c,l)){var u=new Xp(c[l],null);s.sort((function(e,t){return u.evaluate(e.sortParam,t.sortParam)}))}else"seriesDesc"===l&&s.reverse()}Object(I["each"])(s,(function(n,a){var s=t.valueFormatter,l=Dh(n)(s?Object(I["extend"])(Object(I["extend"])({},e),{valueFormatter:s}):e,n,a>0?i.html:0,r);null!=l&&o.push(l)}));var d="richText"===e.renderMode?o.join(i.richText):Yh(o.join(""),a?n:i.html);if(a)return d;var f=od(t.header,"ordinal",e.useUTC),p=kh(r,e.renderMode).nameStyle;return"richText"===e.renderMode?zh(e,f,p)+i.richText+d:Yh(''+id(f)+"
"+d,n)}function Ah(e,t,n,r){var a=e.renderMode,i=t.noName,o=t.noValue,s=!t.markerType,l=t.name,c=e.useUTC,u=t.valueFormatter||e.valueFormatter||function(e){return e=Object(I["isArray"])(e)?e:[e],Object(I["map"])(e,(function(e,t){return od(e,Object(I["isArray"])(p)?p[t]:p,c)}))};if(!i||!o){var d=s?"":e.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||"#333",a),f=i?"":od(l,"ordinal",c),p=t.valueType,h=o?[]:u(t.value),m=!s||!i,v=!s&&i,g=kh(r,a),y=g.nameStyle,b=g.valueStyle;return"richText"===a?(s?"":d)+(i?"":zh(e,f,y))+(o?"":Bh(e,h,m,v,b)):Yh((s?"":d)+(i?"":Fh(f,!s,y))+(o?"":Hh(h,m,v,b)),n)}}function Nh(e,t,n,r,a,i){if(e){var o=Dh(e),s={useUTC:a,renderMode:n,orderMode:r,markupStyleCreator:t,valueFormatter:e.valueFormatter};return o(s,e,0,i)}}function Rh(e){return{html:Eh[e],richText:Ch[e]}}function Yh(e,t){var n='',r="margin: "+t+"px 0 0";return''+e+n+"
"}function Fh(e,t,n){var r=t?"margin-left:2px":"";return''+id(e)+""}function Hh(e,t,n,r){var a=n?"10px":"20px",i=t?"float:right;margin-left:"+a:"";return e=Object(I["isArray"])(e)?e:[e],''+Object(I["map"])(e,(function(e){return id(e)})).join(" ")+""}function zh(e,t,n){return e.markupStyleCreator.wrapRichTextStyle(t,n)}function Bh(e,t,n,r,a){var i=[a],o=r?10:20;return n&&i.push({padding:[0,0,0,o],align:"right"}),e.markupStyleCreator.wrapRichTextStyle(Object(I["isArray"])(t)?t.join(" "):t,i)}function Wh(e,t){var n=e.getData().getItemVisual(t,"style"),r=n[e.visualDrawType];return hd(r)}function Vh(e,t){var n=e.get("padding");return null!=n?n:"richText"===t?[8,10]:10}var Uh=function(){function e(){this.richTextStyles={},this._nextStyleNameId=Ia()}return e.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},e.prototype.makeTooltipMarker=function(e,t,n){var r="richText"===n?this._generateStyleName():null,a=dd({color:t,type:e,renderMode:n,markerId:r});return Object(I["isString"])(a)?a:(this.richTextStyles[r]=a.style,a.content)},e.prototype.wrapRichTextStyle=function(e,t){var n={};Object(I["isArray"])(t)?Object(I["each"])(t,(function(e){return Object(I["extend"])(n,e)})):Object(I["extend"])(n,t);var r=this._generateStyleName();return this.richTextStyles[r]=n,"{"+r+"|"+e+"}"},e}();function Kh(e){var t,n,r,a,i=e.series,o=e.dataIndex,s=e.multipleSeries,l=i.getData(),c=l.mapDimensionsAll("defaultedTooltip"),u=c.length,d=i.getRawValue(o),f=Object(I["isArray"])(d),p=Wh(i,o);if(u>1||f&&!u){var h=Gh(d,i,o,c,p);t=h.inlineValues,n=h.inlineValueTypes,r=h.blocks,a=h.inlineValues[0]}else if(u){var m=l.getDimensionInfo(c[0]);a=t=Rp(l,o,c[0]),n=m.type}else a=t=f?d[0]:d;var v=ei(i),g=v&&i.name||"",y=l.getName(o),b=s?g:y;return Lh("section",{header:g,noHeader:s||!v,sortParam:a,blocks:[Lh("nameValue",{markerType:"item",markerColor:p,name:b,noName:!Object(I["trim"])(b),value:t,valueType:n})].concat(r||[])})}function Gh(e,t,n,r,a){var i=t.getData(),o=Object(I["reduce"])(e,(function(e,t,n){var r=i.getDimensionInfo(n);return e||r&&!1!==r.tooltip&&null!=r.displayName}),!1),s=[],l=[],c=[];function u(e,t){var n=i.getDimensionInfo(t);n&&!1!==n.otherDims.tooltip&&(o?c.push(Lh("nameValue",{markerType:"subItem",markerColor:a,name:n.displayName,value:e,valueType:n.type})):(s.push(e),l.push(n.type)))}return r.length?Object(I["each"])(r,(function(e){u(Rp(i,n,e),e)})):Object(I["each"])(e,u),{inlineValues:s,inlineValueTypes:l,blocks:c}}var qh=si();function Xh(e,t){return e.getName(t)||e.getId(t)}var Zh="__universalTransitionEnabled",Jh=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._selectedDataIndicesMap={},t}return T(t,e),t.prototype.init=function(e,t,n){this.seriesIndex=this.componentIndex,this.dataTask=zp({count:em,reset:tm}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,n);var r=qh(this).sourceManager=new wh(this);r.prepareSource();var a=this.getInitialData(e,n);rm(a,this),this.dataTask.context.data=a,qh(this).dataBeforeProcessed=a,$h(this),this._initSelectedMapFromData(a)},t.prototype.mergeDefaultAndTheme=function(e,t){var n=jd(this),r=n?kd(e):{},a=this.subType;Dd.hasClass(a)&&(a+="Series"),I["merge"](e,t.getTheme().get(this.subType)),I["merge"](e,this.getDefaultOption()),Ha(e,"label",["show"]),this.fillDataTextStyle(e.data),n&&Sd(e,r,n)},t.prototype.mergeOption=function(e,t){e=I["merge"](this.option,e,!0),this.fillDataTextStyle(e.data);var n=jd(this);n&&Sd(this.option,e,n);var r=qh(this).sourceManager;r.dirty(),r.prepareSource();var a=this.getInitialData(e,t);rm(a,this),this.dataTask.dirty(),this.dataTask.context.data=a,qh(this).dataBeforeProcessed=a,$h(this),this._initSelectedMapFromData(a)},t.prototype.fillDataTextStyle=function(e){if(e&&!I["isTypedArray"](e))for(var t=["show"],n=0;nthis.getShallow("animationThreshold")&&(t=!1),!!t},t.prototype.restoreData=function(){this.dataTask.dirty()},t.prototype.getColorFromPalette=function(e,t,n){var r=this.ecModel,a=of.prototype.getColorFromPalette.call(this,e,t,n);return a||(a=r.getColorFromPalette(e,t,n)),a},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,t){this._innerSelect(this.getData(t),e)},t.prototype.unselect=function(e,t){var n=this.option.selectedMap;if(n){var r=this.option.selectedMode,a=this.getData(t);if("series"===r||"all"===n)return this.option.selectedMap={},void(this._selectedDataIndicesMap={});for(var i=0;i=0&&n.push(a)}return n},t.prototype.isSelected=function(e,t){var n=this.option.selectedMap;if(!n)return!1;var r=this.getData(t);return("all"===n||n[Xh(r,e)])&&!r.getItemModel(e).get(["select","disabled"])},t.prototype.isUniversalTransitionEnabled=function(){if(this[Zh])return!0;var e=this.option.universalTransition;return!!e&&(!0===e||e&&e.enabled)},t.prototype._innerSelect=function(e,t){var n,r,a=this.option,i=a.selectedMode,o=t.length;if(i&&o)if("series"===i)a.selectedMap="all";else if("multiple"===i){I["isObject"](a.selectedMap)||(a.selectedMap={});for(var s=a.selectedMap,l=0;l0&&this._innerSelect(e,t)}},t.registerClass=function(e){return Dd.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}(Dd);function $h(e){var t=e.name;ei(e)||(e.name=Qh(e)||t)}function Qh(e){var t=e.getRawData(),n=t.mapDimensionsAll("seriesName"),r=[];return I["each"](n,(function(e){var n=t.getDimensionInfo(e);n.displayName&&r.push(n.displayName)})),r.join(" ")}function em(e){return e.model.getRawData().count()}function tm(e){var t=e.model;return t.setData(t.getRawData().cloneShallow()),nm}function nm(e,t){t.outputData&&e.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function rm(e,t){I["each"](I["concatArray"](e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),(function(n){e.wrapMethod(n,I["curry"](am,t))}))}function am(e,t){var n=im(e);return n&&n.setOutputEnd((t||this).count()),t}function im(e){var t=(e.ecModel||{}).scheduler,n=t&&t.getPipeline(e.uid);if(n){var r=n.currentTask;if(r){var a=r.agentStubMap;a&&(r=a.get(e.uid))}return r}}I["mixin"](Jh,Fp),I["mixin"](Jh,of),ki(Jh,Dd);var om=Jh,sm=function(){function e(){this.group=new Jr,this.uid=ou("viewComponent")}return e.prototype.init=function(e,t){},e.prototype.render=function(e,t,n,r){},e.prototype.dispose=function(e,t){},e.prototype.updateView=function(e,t,n,r){},e.prototype.updateLayout=function(e,t,n,r){},e.prototype.updateVisual=function(e,t,n,r){},e.prototype.toggleBlurSeries=function(e,t,n){},e.prototype.eachRendered=function(e){var t=this.group;t&&t.traverse(e)},e}();ji(sm),Di(sm);var lm=sm;function cm(){var e=si();return function(t){var n=e(t),r=t.pipelineContext,a=!!n.large,i=!!n.progressiveRender,o=n.large=!(!r||!r.large),s=n.progressiveRender=!(!r||!r.progressiveRender);return!(a===o&&i===s)&&"reset"}}var um=qo.CMD,dm=[[],[],[]],fm=Math.sqrt,pm=Math.atan2;function hm(e,t){if(t){var n,r,a,i,o,s,l=e.data,c=e.len(),u=um.M,d=um.C,f=um.L,p=um.R,h=um.A,m=um.Q;for(a=0,i=0;a1&&(o*=mm(h),s*=mm(h));var m=(a===i?-1:1)*mm((o*o*(s*s)-o*o*(p*p)-s*s*(f*f))/(o*o*(p*p)+s*s*(f*f)))||0,v=m*o*p/s,g=m*-s*f/o,y=(e+n)/2+gm(d)*v-vm(d)*g,b=(t+r)/2+vm(d)*v+gm(d)*g,_=xm([1,0],[(f-v)/o,(p-g)/s]),x=[(f-v)/o,(p-g)/s],w=[(-1*f-v)/o,(-1*p-g)/s],O=xm(x,w);if(_m(x,w)<=-1&&(O=ym),_m(x,w)>=1&&(O=0),O<0){var M=Math.round(O/ym*1e6)/1e6;O=2*ym+M%2*ym}u.addData(c,y,b,o,s,_,O,d,i)}var Om=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,Mm=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function jm(e){var t=new qo;if(!e)return t;var n,r=0,a=0,i=r,o=a,s=qo.CMD,l=e.match(Om);if(!l)return t;for(var c=0;cL*L+T*T&&(M=S,j=k),{cx:M,cy:j,x0:-u,y0:-d,x1:M*(a/x-1),y1:j*(a/x-1)}}function $m(e){var t;if(Object(I["isArray"])(e)){var n=e.length;if(!n)return e;t=1===n?[e[0],e[0],0,0]:2===n?[e[0],e[0],e[1],e[1]]:3===n?e.concat(e[2]):e}else t=[e,e,e,e];return t}function Qm(e,t){var n,r=Gm(t.r,0),a=Gm(t.r0||0,0),i=r>0,o=a>0;if(i||o){if(i||(r=a,a=0),a>r){var s=r;r=a,a=s}var l=t.startAngle,c=t.endAngle;if(!isNaN(l)&&!isNaN(c)){var u=t.cx,d=t.cy,f=!!t.clockwise,p=Um(c-l),h=p>Hm&&p%Hm;if(h>Xm&&(p=h),r>Xm)if(p>Hm-Xm)e.moveTo(u+r*Bm(l),d+r*zm(l)),e.arc(u,d,r,l,c,!f),a>Xm&&(e.moveTo(u+a*Bm(c),d+a*zm(c)),e.arc(u,d,a,c,l,f));else{var m=void 0,v=void 0,g=void 0,y=void 0,b=void 0,_=void 0,x=void 0,w=void 0,O=void 0,M=void 0,j=void 0,S=void 0,k=void 0,E=void 0,C=void 0,L=void 0,T=r*Bm(l),D=r*zm(l),I=a*Bm(c),P=a*zm(c),A=p>Xm;if(A){var N=t.cornerRadius;N&&(n=$m(N),m=n[0],v=n[1],g=n[2],y=n[3]);var R=Um(r-a)/2;if(b=qm(R,g),_=qm(R,y),x=qm(R,m),w=qm(R,v),j=O=Gm(b,_),S=M=Gm(x,w),(O>Xm||M>Xm)&&(k=r*Bm(c),E=r*zm(c),C=a*Bm(l),L=a*zm(l),pXm){var U=qm(g,j),K=qm(y,j),G=Jm(C,L,T,D,r,U,f),q=Jm(k,E,I,P,r,K,f);e.moveTo(u+G.cx+G.x0,d+G.cy+G.y0),j0&&e.arc(u+G.cx,d+G.cy,U,Vm(G.y0,G.x0),Vm(G.y1,G.x1),!f),e.arc(u,d,r,Vm(G.cy+G.y1,G.cx+G.x1),Vm(q.cy+q.y1,q.cx+q.x1),!f),K>0&&e.arc(u+q.cx,d+q.cy,K,Vm(q.y1,q.x1),Vm(q.y0,q.x0),!f))}else e.moveTo(u+T,d+D),e.arc(u,d,r,l,c,!f);else e.moveTo(u+T,d+D);if(a>Xm&&A)if(S>Xm){U=qm(m,S),K=qm(v,S),G=Jm(I,P,k,E,a,-K,f),q=Jm(T,D,C,L,a,-U,f);e.lineTo(u+G.cx+G.x0,d+G.cy+G.y0),S0&&e.arc(u+G.cx,d+G.cy,K,Vm(G.y0,G.x0),Vm(G.y1,G.x1),!f),e.arc(u,d,a,Vm(G.cy+G.y1,G.cx+G.x1),Vm(q.cy+q.y1,q.cx+q.x1),f),U>0&&e.arc(u+q.cx,d+q.cy,U,Vm(q.y1,q.x1),Vm(q.y0,q.x0),!f))}else e.lineTo(u+I,d+P),e.arc(u,d,a,c,l,f);else e.lineTo(u+I,d+P)}else e.moveTo(u,d);e.closePath()}}}var ev=function(){function e(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0,this.cornerRadius=0}return e}(),tv=function(e){function t(t){return e.call(this,t)||this}return A(t,e),t.prototype.getDefaultShape=function(){return new ev},t.prototype.buildPath=function(e,t){Qm(e,t)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t}(_s);tv.prototype.type="sector";var nv=tv,rv=function(){function e(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return e}(),av=function(e){function t(t){return e.call(this,t)||this}return A(t,e),t.prototype.getDefaultShape=function(){return new rv},t.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,a=2*Math.PI;e.moveTo(n+t.r,r),e.arc(n,r,t.r,0,a,!1),e.moveTo(n+t.r0,r),e.arc(n,r,t.r0,0,a,!0)},t}(_s);av.prototype.type="ring";var iv=av;function ov(e,t,n,r){var a,i,o,s,l=[],c=[],u=[],d=[];if(r){o=[1/0,1/0],s=[-1/0,-1/0];for(var f=0,p=e.length;f=2){if(r){var i=ov(a,r,n,t.smoothConstraint);e.moveTo(a[0][0],a[0][1]);for(var o=a.length,s=0;s<(n?o:o-1);s++){var l=i[2*s],c=i[2*s+1],u=a[(s+1)%o];e.bezierCurveTo(l[0],l[1],c[0],c[1],u[0],u[1])}}else{e.moveTo(a[0][0],a[0][1]);s=1;for(var d=a.length;sAv[1]){if(o=!1,a)return o;var c=Math.abs(Av[0]-Pv[1]),u=Math.abs(Pv[0]-Av[1]);Math.min(c,u)>r.len()&&(cMath.abs(i[1])?i[0]>0?"right":"left":i[1]>0?"bottom":"top"}function lg(e){return!e.isGroup}function cg(e){return null!=e.shape}function ug(e,t,n){if(e&&t){var r=a(e);t.traverse((function(e){if(lg(e)&&e.anid){var t=r[e.anid];if(t){var a=i(e);e.attr(i(t)),xc(e,a,n,nl(e).dataIndex)}}}))}function a(e){var t={};return e.traverse((function(e){lg(e)&&e.anid&&(t[e.anid]=e)})),t}function i(e){var t={x:e.x,y:e.y,rotation:e.rotation};return cg(e)&&(t.shape=Object(I["extend"])({},e.shape)),t}}function dg(e,t){return Object(I["map"])(e,(function(e){var n=e[0];n=Wv(n,t.x),n=Vv(n,t.x+t.width);var r=e[1];return r=Wv(r,t.y),r=Vv(r,t.y+t.height),[n,r]}))}function fg(e,t){var n=Wv(e.x,t.x),r=Vv(e.x+e.width,t.x+t.width),a=Wv(e.y,t.y),i=Vv(e.y+e.height,t.y+t.height);if(r>=n&&i>=a)return{x:n,y:a,width:r-n,height:i-a}}function pg(e,t,n){var r=Object(I["extend"])({rectHover:!0},t),a=r.style={strokeNoScale:!0};if(n=n||{x:-1,y:-1,width:2,height:2},e)return 0===e.indexOf("image://")?(a.image=e.slice(8),Object(I["defaults"])(a,n),new Es(r)):Jv(e.replace("path://",""),r,n,"center")}function hg(e,t,n,r,a){for(var i=0,o=a[a.length-1];i1)return!1;var v=vg(p,h,u,d)/f;return!(v<0||v>1)}function vg(e,t,n,r){return e*r-n*t}function gg(e){return e<=1e-6&&e>=-1e-6}function yg(e){var t=e.itemTooltipOption,n=e.componentModel,r=e.itemName,a=Object(I["isString"])(t)?{formatter:t}:t,i=n.mainType,o=n.componentIndex,s={componentType:i,name:r,$vars:["name"]};s[i+"Index"]=o;var l=e.formatterParamsExtra;l&&Object(I["each"])(Object(I["keys"])(l),(function(e){Object(I["hasOwn"])(s,e)||(s[e]=l[e],s.$vars.push(e))}));var c=nl(e.el);c.componentMainType=i,c.componentIndex=o,c.tooltipConfig={name:r,option:Object(I["defaults"])({content:r,formatterParams:s},a)}}function bg(e,t){var n;e.isGroup&&(n=t(e)),n||e.traverse(t)}function _g(e,t){if(e)if(Object(I["isArray"])(e))for(var n=0;n=0?d():u=setTimeout(d,-a),l=r};return f.clear=function(){u&&(clearTimeout(u),u=null)},f.debounceNextCall=function(e){s=e},f}function Pg(e,t,n,r){var a=e[t];if(a){var i=a[Lg]||a,o=a[Dg],s=a[Tg];if(s!==n||o!==r){if(null==n||!r)return e[t]=i;a=e[t]=Ig(i,n,"debounce"===r),a[Lg]=i,a[Dg]=r,a[Tg]=n}return a}}function Ag(e,t){var n=e[t];n&&n[Lg]&&(n.clear&&n.clear(),e[t]=n[Lg])}var Ng=si(),Rg={itemStyle:Ii(eu,!0),lineStyle:Ii(Jc,!0)},Yg={lineStyle:"stroke",itemStyle:"fill"};function Fg(e,t){var n=e.visualStyleMapper||Rg[t];return n||(console.warn("Unkown style type '"+t+"'."),Rg.itemStyle)}function Hg(e,t){var n=e.visualDrawType||Yg[t];return n||(console.warn("Unkown style type '"+t+"'."),"fill")}var zg={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData(),r=e.visualStyleAccessPath||"itemStyle",a=e.getModel(r),i=Fg(e,r),o=i(a),s=a.getShallow("decal");s&&(n.setVisual("decal",s),s.dirty=!0);var l=Hg(e,r),c=o[l],u=Object(I["isFunction"])(c)?c:null,d="auto"===o.fill||"auto"===o.stroke;if(!o[l]||u||d){var f=e.getColorFromPalette(e.name,null,t.getSeriesCount());o[l]||(o[l]=f,n.setVisual("colorFromPalette",!0)),o.fill="auto"===o.fill||Object(I["isFunction"])(o.fill)?f:o.fill,o.stroke="auto"===o.stroke||Object(I["isFunction"])(o.stroke)?f:o.stroke}if(n.setVisual("style",o),n.setVisual("drawType",l),!t.isSeriesFiltered(e)&&u)return n.setVisual("colorFromPalette",!1),{dataEach:function(t,n){var r=e.getDataParams(n),a=Object(I["extend"])({},o);a[l]=u(r),t.setItemVisual(n,"style",a)}}}},Bg=new au,Wg={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){if(!e.ignoreStyleOnData&&!t.isSeriesFiltered(e)){var n=e.getData(),r=e.visualStyleAccessPath||"itemStyle",a=Fg(e,r),i=n.getVisual("drawType");return{dataEach:n.hasItemOption?function(e,t){var n=e.getRawDataItem(t);if(n&&n[r]){Bg.option=n[r];var o=a(Bg),s=e.ensureUniqueItemVisual(t,"style");Object(I["extend"])(s,o),Bg.option.decal&&(e.setItemVisual(t,"decal",Bg.option.decal),Bg.option.decal.dirty=!0),i in o&&e.setItemVisual(t,"colorFromPalette",!1)}}:null}}}},Vg={performRawSeries:!0,overallReset:function(e){var t=Object(I["createHashMap"])();e.eachSeries((function(e){var n=e.getColorBy();if(!e.isColorBySeries()){var r=e.type+"-"+n,a=t.get(r);a||(a={},t.set(r,a)),Ng(e).scope=a}})),e.eachSeries((function(t){if(!t.isColorBySeries()&&!e.isSeriesFiltered(t)){var n=t.getRawData(),r={},a=t.getData(),i=Ng(t).scope,o=t.visualStyleAccessPath||"itemStyle",s=Hg(t,o);a.each((function(e){var t=a.getRawIndex(e);r[t]=e})),n.each((function(e){var o=r[e],l=a.getItemVisual(o,"colorFromPalette");if(l){var c=a.ensureUniqueItemVisual(o,"style"),u=n.getName(e)||e+"",d=n.count();c[s]=t.getColorFromPalette(u,i,d)}}))}}))}},Ug=Math.PI;function Kg(e,t){t=t||{},I["defaults"](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 n=new Jr,r=new Rs({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});n.add(r);var a,i=new tl({style:{text:t.text,fill:t.textColor,fontSize:t.fontSize,fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontFamily:t.fontFamily},zlevel:t.zlevel,z:10001}),o=new Rs({style:{fill:"none"},textContent:i,textConfig:{position:"right",distance:10},zlevel:t.zlevel,z:10001});return n.add(o),t.showSpinner&&(a=new jv({shape:{startAngle:-Ug/2,endAngle:-Ug/2+.1,r:t.spinnerRadius},style:{stroke:t.color,lineCap:"round",lineWidth:t.lineWidth},zlevel:t.zlevel,z:10001}),a.animateShape(!0).when(1e3,{endAngle:3*Ug/2}).start("circularInOut"),a.animateShape(!0).when(1e3,{startAngle:3*Ug/2}).delay(300).start("circularInOut"),n.add(a)),n.resize=function(){var n=i.getBoundingRect().width,s=t.showSpinner?t.spinnerRadius:0,l=(e.getWidth()-2*s-(t.showSpinner&&n?10:0)-n)/2-(t.showSpinner&&n?0:5+n/2)+(t.showSpinner?0:n/2)+(n?0:s),c=e.getHeight()/2;t.showSpinner&&a.setShape({cx:l,cy:c}),o.setShape({x:l-s,y:c-s,width:2*s,height:2*s}),r.setShape({x:0,y:0,width:e.getWidth(),height:e.getHeight()})},n.resize(),n}var Gg=function(){function e(e,t,n,r){this._stageTaskMap=Object(I["createHashMap"])(),this.ecInstance=e,this.api=t,n=this._dataProcessorHandlers=n.slice(),r=this._visualHandlers=r.slice(),this._allHandlers=n.concat(r)}return e.prototype.restoreData=function(e,t){e.restoreData(t),this._stageTaskMap.each((function(e){var t=e.overallTask;t&&t.dirty()}))},e.prototype.getPerformArgs=function(e,t){if(e.__pipeline){var n=this._pipelineMap.get(e.__pipeline.id),r=n.context,a=!t&&n.progressiveEnabled&&(!r||r.progressiveRender)&&e.__idxInPipeline>n.blockIndex,i=a?n.step:null,o=r&&r.modDataCount,s=null!=o?Math.ceil(o/i):null;return{step:i,modBy:s,modDataCount:o}}},e.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},e.prototype.updateStreamModes=function(e,t){var n=this._pipelineMap.get(e.uid),r=e.getData(),a=r.count(),i=n.progressiveEnabled&&t.incrementalPrepareRender&&a>=n.threshold,o=e.get("large")&&a>=e.get("largeThreshold"),s="mod"===e.get("progressiveChunkMode")?a:null;e.pipelineContext=n.context={progressiveRender:i,modDataCount:s,large:o}},e.prototype.restorePipelines=function(e){var t=this,n=t._pipelineMap=Object(I["createHashMap"])();e.eachSeries((function(e){var r=e.getProgressive(),a=e.uid;n.set(a,{id:a,head:null,tail:null,threshold:e.getProgressiveThreshold(),progressiveEnabled:r&&!(e.preventIncremental&&e.preventIncremental()),blockIndex:-1,step:Math.round(r||700),count:0}),t._pipe(e,e.dataTask)}))},e.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.api.getModel(),n=this.api;Object(I["each"])(this._allHandlers,(function(r){var a=e.get(r.uid)||e.set(r.uid,{}),i="";Object(I["assert"])(!(r.reset&&r.overallReset),i),r.reset&&this._createSeriesStageTask(r,a,t,n),r.overallReset&&this._createOverallStageTask(r,a,t,n)}),this)},e.prototype.prepareView=function(e,t,n,r){var a=e.renderTask,i=a.context;i.model=t,i.ecModel=n,i.api=r,a.__block=!e.incrementalPrepareRender,this._pipe(t,a)},e.prototype.performDataProcessorTasks=function(e,t){this._performStageTasks(this._dataProcessorHandlers,e,t,{block:!0})},e.prototype.performVisualTasks=function(e,t,n){this._performStageTasks(this._visualHandlers,e,t,n)},e.prototype._performStageTasks=function(e,t,n,r){r=r||{};var a=!1,i=this;function o(e,t){return e.setDirty&&(!e.dirtyMap||e.dirtyMap.get(t.__pipeline.id))}Object(I["each"])(e,(function(e,s){if(!r.visualType||r.visualType===e.visualType){var l=i._stageTaskMap.get(e.uid),c=l.seriesTaskMap,u=l.overallTask;if(u){var d,f=u.agentStubMap;f.each((function(e){o(r,e)&&(e.dirty(),d=!0)})),d&&u.dirty(),i.updatePayload(u,n);var p=i.getPerformArgs(u,r.block);f.each((function(e){e.perform(p)})),u.perform(p)&&(a=!0)}else c&&c.each((function(s,l){o(r,s)&&s.dirty();var c=i.getPerformArgs(s,r.block);c.skip=!e.performRawSeries&&t.isSeriesFiltered(s.context.model),i.updatePayload(s,n),s.perform(c)&&(a=!0)}))}})),this.unfinished=a||this.unfinished},e.prototype.performSeriesTasks=function(e){var t;e.eachSeries((function(e){t=e.dataTask.perform()||t})),this.unfinished=t||this.unfinished},e.prototype.plan=function(){this._pipelineMap.each((function(e){var t=e.tail;do{if(t.__block){e.blockIndex=t.__idxInPipeline;break}t=t.getUpstream()}while(t)}))},e.prototype.updatePayload=function(e,t){"remain"!==t&&(e.context.payload=t)},e.prototype._createSeriesStageTask=function(e,t,n,r){var a=this,i=t.seriesTaskMap,o=t.seriesTaskMap=Object(I["createHashMap"])(),s=e.seriesType,l=e.getTargetSeries;function c(t){var s=t.uid,l=o.set(s,i&&i.get(s)||zp({plan:$g,reset:Qg,count:ny}));l.context={model:t,ecModel:n,api:r,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:a},a._pipe(t,l)}e.createOnAllSeries?n.eachRawSeries(c):s?n.eachRawSeriesByType(s,c):l&&l(n,r).each(c)},e.prototype._createOverallStageTask=function(e,t,n,r){var a=this,i=t.overallTask=t.overallTask||zp({reset:qg});i.context={ecModel:n,api:r,overallReset:e.overallReset,scheduler:a};var o=i.agentStubMap,s=i.agentStubMap=Object(I["createHashMap"])(),l=e.seriesType,c=e.getTargetSeries,u=!0,d=!1,f="";function p(e){var t=e.uid,n=s.set(t,o&&o.get(t)||(d=!0,zp({reset:Xg,onDirty:Jg})));n.context={model:e,overallProgress:u},n.agent=i,n.__block=u,a._pipe(e,n)}Object(I["assert"])(!e.createOnAllSeries,f),l?n.eachRawSeriesByType(l,p):c?c(n,r).each(p):(u=!1,Object(I["each"])(n.getSeries(),p)),d&&i.dirty()},e.prototype._pipe=function(e,t){var n=e.uid,r=this._pipelineMap.get(n);!r.head&&(r.head=t),r.tail&&r.tail.pipe(t),r.tail=t,t.__idxInPipeline=r.count++,t.__pipeline=r},e.wrapStageHandler=function(e,t){return Object(I["isFunction"])(e)&&(e={overallReset:e,seriesType:ry(e)}),e.uid=ou("stageHandler"),t&&(e.visualType=t),e},e}();function qg(e){e.overallReset(e.ecModel,e.api,e.payload)}function Xg(e){return e.overallProgress&&Zg}function Zg(){this.agent.dirty(),this.getDownstream().dirty()}function Jg(){this.agent&&this.agent.dirty()}function $g(e){return e.plan?e.plan(e.model,e.ecModel,e.api,e.payload):null}function Qg(e){e.useClearVisual&&e.data.clearAllVisual();var t=e.resetDefines=Fa(e.reset(e.model,e.ecModel,e.api,e.payload));return t.length>1?Object(I["map"])(t,(function(e,t){return ty(t)})):ey}var ey=ty(0);function ty(e){return function(t,n){var r=n.data,a=n.resetDefines[e];if(a&&a.dataEach)for(var i=t.start;i0&&u===a.length-c.length){var d=a.slice(0,u);"data"!==d&&(t.mainType=d,t[c.toLowerCase()]=e,s=!0)}}o.hasOwnProperty(a)&&(n[a]=e,s=!0),s||(r[a]=e)}))}return{cptQuery:t,dataQuery:n,otherQuery:r}},e.prototype.filter=function(e,t){var n=this.eventInfo;if(!n)return!0;var r=n.targetEl,a=n.packedEvent,i=n.model,o=n.view;if(!i||!o)return!0;var s=t.cptQuery,l=t.dataQuery;return c(s,i,"mainType")&&c(s,i,"subType")&&c(s,i,"index","componentIndex")&&c(s,i,"name")&&c(s,i,"id")&&c(l,a,"name")&&c(l,a,"dataIndex")&&c(l,a,"dataType")&&(!o.filterForExposedEvent||o.filterForExposedEvent(e,t.otherQuery,r,a));function c(e,t,n,r){return null==e[n]||t[r||n]===e[n]}},e.prototype.afterTrigger=function(){this.eventInfo=null},e}(),yy=["symbol","symbolSize","symbolRotate","symbolOffset"],by=yy.concat(["symbolKeepAspect"]),_y={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData();if(e.legendIcon&&n.setVisual("legendIcon",e.legendIcon),e.hasSymbolVisual){for(var r={},a={},i=!1,o=0;o=0&&Uy(l)?l:.5;var c=e.createRadialGradient(o,s,0,o,s,l);return c}function qy(e,t,n){for(var r="radial"===t.type?Gy(e,t,n):Ky(e,t,n),a=t.colorStops,i=0;i0?"dashed"===e?[4*t,2*t]:"dotted"===e?[t]:Object(I["isNumber"])(e)?[e]:Object(I["isArray"])(e)?e:null:null}function Qy(e){var t=e.style,n=t.lineDash&&t.lineWidth>0&&$y(t.lineDash,t.lineWidth),r=t.lineDashOffset;if(n){var a=t.strokeNoScale&&e.getLineScale?e.getLineScale():1;a&&1!==a&&(n=Object(I["map"])(n,(function(e){return e/a})),r/=a)}return[n,r]}var eb=new qo(!0);function tb(e){var t=e.stroke;return!(null==t||"none"===t||!(e.lineWidth>0))}function nb(e){return"string"===typeof e&&"none"!==e}function rb(e){var t=e.fill;return null!=t&&"none"!==t}function ab(e,t){if(null!=t.fillOpacity&&1!==t.fillOpacity){var n=e.globalAlpha;e.globalAlpha=t.fillOpacity*t.opacity,e.fill(),e.globalAlpha=n}else e.fill()}function ib(e,t){if(null!=t.strokeOpacity&&1!==t.strokeOpacity){var n=e.globalAlpha;e.globalAlpha=t.strokeOpacity*t.opacity,e.stroke(),e.globalAlpha=n}else e.stroke()}function ob(e,t,n){var r=Fi(t.image,t.__image,n);if(zi(r)){var a=e.createPattern(r,t.repeat||"repeat");if("function"===typeof DOMMatrix&&a&&a.setTransform){var i=new DOMMatrix;i.translateSelf(t.x||0,t.y||0),i.rotateSelf(0,0,(t.rotation||0)*I["RADIAN_TO_DEGREE"]),i.scaleSelf(t.scaleX||1,t.scaleY||1),a.setTransform(i)}return a}}function sb(e,t,n,r){var a,i=tb(n),o=rb(n),s=n.strokePercent,l=s<1,c=!t.path;t.silent&&!l||!c||t.createPathProxy();var u=t.path||eb,d=t.__dirty;if(!r){var f=n.fill,p=n.stroke,h=o&&!!f.colorStops,m=i&&!!p.colorStops,v=o&&!!f.image,g=i&&!!p.image,y=void 0,b=void 0,_=void 0,x=void 0,w=void 0;(h||m)&&(w=t.getBoundingRect()),h&&(y=d?qy(e,f,w):t.__canvasFillGradient,t.__canvasFillGradient=y),m&&(b=d?qy(e,p,w):t.__canvasStrokeGradient,t.__canvasStrokeGradient=b),v&&(_=d||!t.__canvasFillPattern?ob(e,f,t):t.__canvasFillPattern,t.__canvasFillPattern=_),g&&(x=d||!t.__canvasStrokePattern?ob(e,p,t):t.__canvasStrokePattern,t.__canvasStrokePattern=_),h?e.fillStyle=y:v&&(_?e.fillStyle=_:o=!1),m?e.strokeStyle=b:g&&(x?e.strokeStyle=x:i=!1)}var O,M,j=t.getGlobalScale();u.setScale(j[0],j[1],t.segmentIgnoreThreshold),e.setLineDash&&n.lineDash&&(a=Qy(t),O=a[0],M=a[1]);var S=!0;(c||d&ot)&&(u.setDPR(e.dpr),l?u.setContext(null):(u.setContext(e),S=!1),u.reset(),t.buildPath(u,t.shape,r),u.toStatic(),t.pathUpdated()),S&&u.rebuildPath(e,l?s:1),O&&(e.setLineDash(O),e.lineDashOffset=M),r||(n.strokeFirst?(i&&ib(e,n),o&&ab(e,n)):(o&&ab(e,n),i&&ib(e,n))),O&&e.setLineDash([])}function lb(e,t,n){var r=t.__image=Fi(n.image,t.__image,t,t.onload);if(r&&zi(r)){var a=n.x||0,i=n.y||0,o=t.getWidth(),s=t.getHeight(),l=r.width/r.height;if(null==o&&null!=s?o=s*l:null==s&&null!=o?s=o/l:null==o&&null==s&&(o=r.width,s=r.height),n.sWidth&&n.sHeight){var c=n.sx||0,u=n.sy||0;e.drawImage(r,c,u,n.sWidth,n.sHeight,a,i,o,s)}else if(n.sx&&n.sy){c=n.sx,u=n.sy;var d=o-c,f=s-u;e.drawImage(r,c,u,d,f,a,i,o,s)}else e.drawImage(r,a,i,o,s)}}function cb(e,t,n){var r,a=n.text;if(null!=a&&(a+=""),a){e.font=n.font||Sr["a"],e.textAlign=n.textAlign,e.textBaseline=n.textBaseline;var i=void 0,o=void 0;e.setLineDash&&n.lineDash&&(r=Qy(t),i=r[0],o=r[1]),i&&(e.setLineDash(i),e.lineDashOffset=o),n.strokeFirst?(tb(n)&&e.strokeText(a,n.x,n.y),rb(n)&&e.fillText(a,n.x,n.y)):(rb(n)&&e.fillText(a,n.x,n.y),tb(n)&&e.strokeText(a,n.x,n.y)),i&&e.setLineDash([])}}var ub=["shadowBlur","shadowOffsetX","shadowOffsetY"],db=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function fb(e,t,n,r,a){var i=!1;if(!r&&(n=n||{},t===n))return!1;if(r||t.opacity!==n.opacity){Ob(e,a),i=!0;var o=Math.max(Math.min(t.opacity,1),0);e.globalAlpha=isNaN(o)?ao.opacity:o}(r||t.blend!==n.blend)&&(i||(Ob(e,a),i=!0),e.globalCompositeOperation=t.blend||ao.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,t,n){if(!this[c_])if(this._disposed)W_(this.id);else{var r,a,i;if(Object(I["isObject"])(t)&&(n=t.lazyUpdate,r=t.silent,a=t.replaceMerge,i=t.transition,t=t.notMerge),this[c_]=!0,!this._model||t){var o=new Rf(this._api),s=this._theme,l=this._model=new Mf;l.scheduler=this._scheduler,l.ssr=this._ssr,l.init(null,null,null,s,this._locale,o)}this._model.setOption(e,{replaceMerge:a},G_);var c={seriesTransition:i,optionChanged:!0};if(n)this[u_]={silent:r,updateParams:c},this[c_]=!1,this.getZr().wakeUp();else{try{__(this),O_.update.call(this,null,c)}catch(u){throw this[u_]=null,this[c_]=!1,u}this._ssr||this._zr.flush(),this[u_]=null,this[c_]=!1,k_.call(this,r),E_.call(this,r)}}},t.prototype.setTheme=function(){hf("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},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||Wb&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(e){return this.renderToCanvas(e)},t.prototype.renderToCanvas=function(e){e=e||{};var t=this._zr.painter;return t.getRenderedCanvas({backgroundColor:e.backgroundColor||this._model.get("backgroundColor"),pixelRatio:e.pixelRatio||this.getDevicePixelRatio()})},t.prototype.renderToSVGString=function(e){e=e||{};var t=this._zr.painter;return t.renderToString({useViewBox:e.useViewBox})},t.prototype.getSvgDataURL=function(){if(D["a"].svgSupported){var e=this._zr,t=e.storage.getDisplayList();return Object(I["each"])(t,(function(e){e.stopAnimation(null,!0)})),e.painter.toDataURL()}},t.prototype.getDataURL=function(e){if(!this._disposed){e=e||{};var t=e.excludeComponents,n=this._model,r=[],a=this;Object(I["each"])(t,(function(e){n.eachComponent({mainType:e},(function(e){var t=a._componentsMap[e.__viewId];t.group.ignore||(r.push(t),t.group.ignore=!0)}))}));var i="svg"===this._zr.painter.getType()?this.getSvgDataURL():this.renderToCanvas(e).toDataURL("image/"+(e&&e.type||"png"));return Object(I["each"])(r,(function(e){e.group.ignore=!1})),i}W_(this.id)},t.prototype.getConnectedDataURL=function(e){if(!this._disposed){var t="svg"===e.type,n=this.group,r=Math.min,a=Math.max,i=1/0;if($_[n]){var o=i,s=i,l=-i,c=-i,u=[],d=e&&e.pixelRatio||this.getDevicePixelRatio();Object(I["each"])(J_,(function(i,d){if(i.group===n){var f=t?i.getZr().painter.getSvgDom().innerHTML:i.renderToCanvas(Object(I["clone"])(e)),p=i.getDom().getBoundingClientRect();o=r(p.left,o),s=r(p.top,s),l=a(p.right,l),c=a(p.bottom,c),u.push({dom:f,left:p.left,top:p.top})}})),o*=d,s*=d,l*=d,c*=d;var f=l-o,p=c-s,h=Sr["d"].createCanvas(),m=ra(h,{renderer:t?"svg":"canvas"});if(m.resize({width:f,height:p}),t){var v="";return Object(I["each"])(u,(function(e){var t=e.left-o,n=e.top-s;v+=''+e.dom+""})),m.painter.getSvgRoot().innerHTML=v,e.connectedBackgroundColor&&m.painter.setBackgroundColor(e.connectedBackgroundColor),m.refreshImmediately(),m.painter.toDataURL()}return e.connectedBackgroundColor&&m.add(new Rs({shape:{x:0,y:0,width:f,height:p},style:{fill:e.connectedBackgroundColor}})),Object(I["each"])(u,(function(e){var t=new Es({style:{x:e.left*d-o,y:e.top*d-s,image:e.dom}});m.add(t)})),m.refreshImmediately(),h.toDataURL("image/"+(e&&e.type||"png"))}return this.getDataURL(e)}W_(this.id)},t.prototype.convertToPixel=function(e,t){return M_(this,"convertToPixel",e,t)},t.prototype.convertFromPixel=function(e,t){return M_(this,"convertFromPixel",e,t)},t.prototype.containPixel=function(e,t){if(!this._disposed){var n,r=this._model,a=ci(r,e);return Object(I["each"])(a,(function(e,r){r.indexOf("Models")>=0&&Object(I["each"])(e,(function(e){var a=e.coordinateSystem;if(a&&a.containPoint)n=n||!!a.containPoint(t);else if("seriesModels"===r){var i=this._chartsMap[e.__viewId];i&&i.containPoint&&(n=n||i.containPoint(t,e))}else 0}),this)}),this),!!n}W_(this.id)},t.prototype.getVisual=function(e,t){var n=this._model,r=ci(n,e,{defaultMainType:"series"}),a=r.seriesModel;var i=a.getData(),o=r.hasOwnProperty("dataIndexInside")?r.dataIndexInside:r.hasOwnProperty("dataIndex")?i.indexOfRawIndex(r.dataIndex):null;return null!=o?wy(i,o,t):Oy(i,t)},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;Object(I["each"])(B_,(function(t){var n=function(n){var r,a=e.getModel(),i=n.target,o="globalout"===t;if(o?r={}:i&&Ey(i,(function(e){var t=nl(e);if(t&&null!=t.dataIndex){var n=t.dataModel||a.getSeriesByIndex(t.seriesIndex);return r=n&&n.getDataParams(t.dataIndex,t.dataType)||{},!0}if(t.eventData)return r=Object(I["extend"])({},t.eventData),!0}),!0),r){var s=r.componentType,l=r.componentIndex;"markLine"!==s&&"markPoint"!==s&&"markArea"!==s||(s="series",l=r.seriesIndex);var c=s&&null!=l&&a.getComponent(s,l),u=c&&e["series"===c.mainType?"_chartsMap":"_componentsMap"][c.__viewId];0,r.event=n,r.type=t,e._$eventProcessor.eventInfo={targetEl:i,packedEvent:r,model:c,view:u},e.trigger(t,r)}};n.zrEventfulCallAtLast=!0,e._zr.on(t,n,e)})),Object(I["each"])(U_,(function(t,n){e._messageCenter.on(n,(function(e){this.trigger(n,e)}),e)})),Object(I["each"])(["selectchanged"],(function(t){e._messageCenter.on(t,(function(e){this.trigger(t,e)}),e)})),ky(this._messageCenter,this,this._api)},t.prototype.isDisposed=function(){return this._disposed},t.prototype.clear=function(){this._disposed?W_(this.id):this.setOption({series:[]},!0)},t.prototype.dispose=function(){if(this._disposed)W_(this.id);else{this._disposed=!0;var e=this.getDom();e&&hi(this.getDom(),tx,"");var t=this,n=t._api,r=t._model;Object(I["each"])(t._componentsViews,(function(e){e.dispose(r,n)})),Object(I["each"])(t._chartsViews,(function(e){e.dispose(r,n)})),t._zr.dispose(),t._dom=t._model=t._chartsMap=t._componentsMap=t._chartsViews=t._componentsViews=t._scheduler=t._api=t._zr=t._throttledZrFlush=t._theme=t._coordSysMgr=t._messageCenter=null,delete J_[t.id]}},t.prototype.resize=function(e){if(!this[c_])if(this._disposed)W_(this.id);else{this._zr.resize(e);var t=this._model;if(this._loadingFX&&this._loadingFX.resize(),t){var n=t.resetOption("media"),r=e&&e.silent;this[u_]&&(null==r&&(r=this[u_].silent),n=!0,this[u_]=null),this[c_]=!0;try{n&&__(this),O_.update.call(this,{type:"resize",animation:Object(I["extend"])({duration:0},e&&e.animation)})}catch(a){throw this[c_]=!1,a}this[c_]=!1,k_.call(this,r),E_.call(this,r)}}},t.prototype.showLoading=function(e,t){if(this._disposed)W_(this.id);else if(Object(I["isObject"])(e)&&(t=e,e=""),e=e||"default",this.hideLoading(),Z_[e]){var n=Z_[e](this._api,t),r=this._zr;this._loadingFX=n,r.add(n)}},t.prototype.hideLoading=function(){this._disposed?W_(this.id):(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},t.prototype.makeActionFromEvent=function(e){var t=Object(I["extend"])({},e);return t.type=U_[e.type],t},t.prototype.dispatchAction=function(e,t){if(this._disposed)W_(this.id);else if(Object(I["isObject"])(t)||(t={silent:!!t}),V_[e.type]&&this._model)if(this[c_])this._pendingActions.push(e);else{var n=t.silent;S_.call(this,e,n);var r=t.flush;r?this._zr.flush():!1!==r&&D["a"].browser.weChat&&this._throttledZrFlush(),k_.call(this,n),E_.call(this,n)}},t.prototype.updateLabelLayout=function(){Fb.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(e){if(this._disposed)W_(this.id);else{var t=e.seriesIndex,n=this.getModel(),r=n.getSeriesByIndex(t);0,r.appendData(e),this._scheduler.unfinished=!0,this.getZr().wakeUp()}},t.internalField=function(){function e(e){e.clearColorPalette(),e.eachSeries((function(e){e.clearColorPalette()}))}function t(e){var t=[],n=[],r=!1;if(e.eachComponent((function(e,a){var i=a.get("zlevel")||0,o=a.get("z")||0,s=a.getZLevelKey();r=r||!!s,("series"===e?n:t).push({zlevel:i,z:o,idx:a.componentIndex,type:e,key:s})})),r){var a,i,o=t.concat(n);rt(o,(function(e,t){return e.zlevel===t.zlevel?e.z-t.z:e.zlevel-t.zlevel})),Object(I["each"])(o,(function(t){var n=e.getComponent(t.type,t.idx),r=t.zlevel,o=t.key;null!=a&&(r=Math.max(a,r)),o?(r===a&&o!==i&&r++,i=o):i&&(r===a&&r++,i=""),a=r,n.setZLevel(r)}))}}function n(e){for(var t=[],n=e.currentStates,r=0;rt.get("hoverLayerThreshold")&&!D["a"].node&&!D["a"].worker&&t.eachSeries((function(t){if(!t.preventUsingHoverLayer){var n=e._chartsMap[t.__viewId];n.__alive&&n.eachRendered((function(e){e.states.emphasis&&(e.states.emphasis.hoverLayer=!0)}))}}))}function a(e,t){var n=e.get("blendMode")||null;t.eachRendered((function(e){e.isGroup||(e.style.blend=n)}))}function i(e,t){if(!e.preventAutoZ){var n=e.get("z")||0,r=e.get("zlevel")||0;t.eachRendered((function(e){return o(e,n,r,-1/0),!0}))}}function o(e,t,n,r){var a=e.getTextContent(),i=e.getTextGuideLine(),s=e.isGroup;if(s)for(var l=e.childrenRef(),c=0;c0?{duration:i,delay:r.get("delay"),easing:r.get("easing")}:null;t.eachRendered((function(e){if(e.states&&e.states.emphasis){if(Oc(e))return;if(e instanceof _s&&gc(e),e.__dirty){var t=e.prevStates;t&&e.useStates(t)}if(a){e.stateTransition=o;var r=e.getTextContent(),i=e.getTextGuideLine();r&&(r.stateTransition=o),i&&(i.stateTransition=o)}e.__dirty&&n(e)}}))}__=function(e){var t=e._scheduler;t.restorePipelines(e._model),t.prepareStageTasks(),x_(e,!0),x_(e,!1),t.plan()},x_=function(e,t){for(var n=e._model,r=e._scheduler,a=t?e._componentsViews:e._chartsViews,i=t?e._componentsMap:e._chartsMap,o=e._zr,s=e._api,l=0;l=0)){_x.push(n);var i=ly.wrapStageHandler(n,a);i.__prio=t,i.__raw=n,e.push(i)}}function wx(e,t){Z_[e]=t}function Ox(e){Object(Sr["e"])({createCanvas:e})}function Mx(e,t,n){var r=Bb("registerMap");r&&r(e,t,n)}function jx(e){var t=Bb("getMap");return t&&t(e)}var Sx=ih;bx(e_,zg),bx(r_,Wg),bx(r_,Vg),bx(e_,_y),bx(r_,xy),bx(s_,Rb),ux(sp),dx(qb,lp),wx("default",Kg),mx({type:ml,event:ml,update:ml},I["noop"]),mx({type:vl,event:vl,update:vl},I["noop"]),mx({type:gl,event:gl,update:gl},I["noop"]),mx({type:yl,event:yl,update:yl},I["noop"]),mx({type:bl,event:bl,update:bl},I["noop"]),cx("light",uy),cx("dark",vy);var kx={},Ex=[],Cx={registerPreprocessor:ux,registerProcessor:dx,registerPostInit:fx,registerPostUpdate:px,registerUpdateLifecycle:hx,registerAction:mx,registerCoordinateSystem:vx,registerLayout:yx,registerVisual:bx,registerTransform:Sx,registerLoading:wx,registerMap:Mx,registerImpl:zb,PRIORITY:l_,ComponentModel:Dd,ComponentView:lm,SeriesModel:om,ChartView:Cg,registerComponentModel:function(e){Dd.registerClass(e)},registerComponentView:function(e){lm.registerClass(e)},registerSeriesModel:function(e){om.registerClass(e)},registerChartView:function(e){Cg.registerClass(e)},registerSubTypeDefaulter:function(e,t){Dd.registerSubTypeDefaulter(e,t)},registerPainter:function(e,t){sa(e,t)}};function Lx(e){Object(I["isArray"])(e)?Object(I["each"])(e,(function(e){Lx(e)})):Object(I["indexOf"])(Ex,e)>=0||(Ex.push(e),Object(I["isFunction"])(e)&&(e={install:e}),e.install(Cx))}function Tx(e){return null==e?0:e.length||1}function Dx(e){return e}var Ix=function(){function e(e,t,n,r,a,i){this._old=e,this._new=t,this._oldKeyGetter=n||Dx,this._newKeyGetter=r||Dx,this.context=a,this._diffModeMultiple="multiple"===i}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=new Array(e.length),a=new Array(t.length);this._initIndexMap(e,null,r,"_oldKeyGetter"),this._initIndexMap(t,n,a,"_newKeyGetter");for(var i=0;i1){var c=s.shift();1===s.length&&(n[o]=s[0]),this._update&&this._update(c,i)}else 1===l?(n[o]=null,this._update&&this._update(s,i)):this._remove&&this._remove(i)}this._performRestAdd(a,n)},e.prototype._executeMultiple=function(){var e=this._old,t=this._new,n={},r={},a=[],i=[];this._initIndexMap(e,n,a,"_oldKeyGetter"),this._initIndexMap(t,r,i,"_newKeyGetter");for(var o=0;o1&&1===d)this._updateManyToOne&&this._updateManyToOne(c,l),r[s]=null;else if(1===u&&d>1)this._updateOneToMany&&this._updateOneToMany(c,l),r[s]=null;else if(1===u&&1===d)this._update&&this._update(c,l),r[s]=null;else if(u>1&&d>1)this._updateManyToMany&&this._updateManyToMany(c,l),r[s]=null;else if(u>1)for(var f=0;f1)for(var o=0;o30}var Xx,Zx,Jx,$x,Qx,ew,tw,nw=I["isObject"],rw=I["map"],aw="undefined"===typeof Int32Array?Array:Int32Array,iw="e\0\0",ow=-1,sw=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],lw=["_approximateExtent"],cw=function(){function e(e,t){var n;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","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","lttbDownSample"];var r=!1;Ux(e)?(n=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(r=!0,n=e),n=n||["x","y"];for(var a={},i=[],o={},s=!1,l={},c=0;c=t)){var n=this._store,r=n.getProvider();this._updateOrdinalMeta();var a=this._nameList,i=this._idList,o=r.getSource().sourceFormat,s=o===Rd;if(s&&!r.pure)for(var l=[],c=e;c0},e.prototype.ensureUniqueItemVisual=function(e,t){var n=this._itemVisuals,r=n[e];r||(r=n[e]={});var a=r[t];return null==a&&(a=this.getVisual(t),I["isArray"](a)?a=a.slice():nw(a)&&(a=I["extend"]({},a)),r[t]=a),a},e.prototype.setItemVisual=function(e,t,n){var r=this._itemVisuals[e]||{};this._itemVisuals[e]=r,nw(t)?I["extend"](r,t):r[t]=n},e.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},e.prototype.setLayout=function(e,t){nw(e)?I["extend"](this._layout,e):this._layout[e]=t},e.prototype.getLayout=function(e){return this._layout[e]},e.prototype.getItemLayout=function(e){return this._itemLayouts[e]},e.prototype.setItemLayout=function(e,t,n){this._itemLayouts[e]=n?I["extend"](this._itemLayouts[e]||{},t):t},e.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},e.prototype.setItemGraphicEl=function(e,t){var n=this.hostModel&&this.hostModel.seriesIndex;rl(n,this.dataType,e,t),this._graphicEls[e]=t},e.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},e.prototype.eachItemGraphicEl=function(e,t){I["each"](this._graphicEls,(function(n,r){n&&e&&e.call(t,n,r)}))},e.prototype.cloneShallow=function(t){return t||(t=new e(this._schema?this._schema:rw(this.dimensions,this._getDimInfo,this),this.hostModel)),Qx(t,this),t._store=this._store,t},e.prototype.wrapMethod=function(e,t){var n=this[e];I["isFunction"](n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var e=n.apply(this,arguments);return t.apply(this,[e].concat(I["slice"](arguments)))})},e.internalField=function(){Xx=function(e){var t=e._invertedIndicesMap;I["each"](t,(function(n,r){var a=e._dimInfos[r],i=a.ordinalMeta,o=e._store;if(i){n=t[r]=new aw(i.categories.length);for(var s=0;s1&&(s+="__ec__"+c),r[t]=s}}}(),e}(),uw=cw;function dw(e,t){return fw(e,t).dimensions}function fw(e,t){vp(e)||(e=yp(e)),t=t||{};var n=t.coordDimensions||[],r=t.dimensionsDefine||e.dimensionsDefine||[],a=Object(I["createHashMap"])(),i=[],o=hw(e,n,r,t.dimensionsCount),s=t.canOmitUnusedDimensions&&qx(o),l=r===e.dimensionsDefine,c=l?Gx(e):Kx(r),u=t.encodeDefine;!u&&t.encodeDefaulter&&(u=t.encodeDefaulter(e,o));for(var d=Object(I["createHashMap"])(u),f=new ph(o),p=0;p0&&(r.name=a+(i-1)),i++,t.set(a,i)}}function hw(e,t,n,r){var a=Math.max(e.dimensionsDetectedCount||1,t.length,n.length,r||0);return Object(I["each"])(t,(function(e){var t;Object(I["isObject"])(e)&&(t=e.dimsDef)&&(a=Math.max(a,t.length))})),a}function mw(e,t,n){var r=t.data;if(n||r.hasOwnProperty(e)){var a=0;while(r.hasOwnProperty(e+a))a++;e+=a}return t.set(e,!0),e}var vw=function(){function e(e){this.coordSysDims=[],this.axisMap=Object(I["createHashMap"])(),this.categoryAxisMap=Object(I["createHashMap"])(),this.coordSysName=e}return e}();function gw(e){var t=e.get("coordinateSystem"),n=new vw(t),r=yw[t];if(r)return r(e,n,n.axisMap,n.categoryAxisMap),n}var yw={cartesian2d:function(e,t,n,r){var a=e.getReferringComponents("xAxis",di).models[0],i=e.getReferringComponents("yAxis",di).models[0];t.coordSysDims=["x","y"],n.set("x",a),n.set("y",i),bw(a)&&(r.set("x",a),t.firstCategoryDimIndex=0),bw(i)&&(r.set("y",i),null==t.firstCategoryDimIndex&&(t.firstCategoryDimIndex=1))},singleAxis:function(e,t,n,r){var a=e.getReferringComponents("singleAxis",di).models[0];t.coordSysDims=["single"],n.set("single",a),bw(a)&&(r.set("single",a),t.firstCategoryDimIndex=0)},polar:function(e,t,n,r){var a=e.getReferringComponents("polar",di).models[0],i=a.findAxisModel("radiusAxis"),o=a.findAxisModel("angleAxis");t.coordSysDims=["radius","angle"],n.set("radius",i),n.set("angle",o),bw(i)&&(r.set("radius",i),t.firstCategoryDimIndex=0),bw(o)&&(r.set("angle",o),null==t.firstCategoryDimIndex&&(t.firstCategoryDimIndex=1))},geo:function(e,t,n,r){t.coordSysDims=["lng","lat"]},parallel:function(e,t,n,r){var a=e.ecModel,i=a.getComponent("parallel",e.get("parallelIndex")),o=t.coordSysDims=i.dimensions.slice();Object(I["each"])(i.parallelAxisIndex,(function(e,i){var s=a.getComponent("parallelAxis",e),l=o[i];n.set(l,s),bw(s)&&(r.set(l,s),null==t.firstCategoryDimIndex&&(t.firstCategoryDimIndex=i))}))}};function bw(e){return"category"===e.get("type")}function _w(e,t,n){n=n||{};var r,a,i,o=n.byIndex,s=n.stackedCoordDimension;xw(t)?r=t:(a=t.schema,r=a.dimensions,i=t.store);var l,c,u,d,f=!(!e||!e.get("stack"));if(Object(I["each"])(r,(function(e,t){Object(I["isString"])(e)&&(r[t]=e={name:e}),f&&!e.isExtraCoord&&(o||l||!e.ordinalMeta||(l=e),c||"ordinal"===e.type||"time"===e.type||s&&s!==e.coordDim||(c=e))})),!c||o||l||(o=!0),c){u="__\0ecstackresult_"+e.id,d="__\0ecstackedover_"+e.id,l&&(l.createInvertedIndices=!0);var p=c.coordDim,h=c.type,m=0;Object(I["each"])(r,(function(e){e.coordDim===p&&m++}));var v={name:u,coordDim:p,coordDimIndex:m,type:h,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:r.length},g={name:d,coordDim:d,coordDimIndex:m+1,type:h,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:r.length+1};a?(i&&(v.storeDimIndex=i.ensureCalculationDimension(d,h),g.storeDimIndex=i.ensureCalculationDimension(u,h)),a.appendCalculationDimension(v),a.appendCalculationDimension(g)):(r.push(v),r.push(g))}return{stackedDimension:c&&c.name,stackedByDimension:l&&l.name,isStackedByIndex:o,stackedOverDimension:d,stackResultDimension:u}}function xw(e){return!Ux(e.schema)}function ww(e,t){return!!t&&t===e.getCalculationInfo("stackedDimension")}function Ow(e,t){return ww(e,t)?e.getCalculationInfo("stackResultDimension"):t}function Mw(e,t){var n,r=e.get("coordinateSystem"),a=Lf.get(r);return t&&t.coordSysDims&&(n=I["map"](t.coordSysDims,(function(e){var n={name:e},r=t.axisMap.get(e);if(r){var a=r.get("type");n.type=Yx(a)}return n}))),n||(n=a&&(a.getDimensionsInfo?a.getDimensionsInfo():a.dimensions.slice())||["x","y"]),n}function jw(e,t,n){var r,a;return n&&I["each"](e,(function(e,i){var o=e.coordDim,s=n.categoryAxisMap.get(o);s&&(null==r&&(r=i),e.ordinalMeta=s.getOrdinalMeta(),t&&(e.createInvertedIndices=!0)),null!=e.otherDims.itemName&&(a=!0)})),a||null==r||(e[r].otherDims.itemName=0),r}function Sw(e,t,n){n=n||{};var r,a=t.getSourceManager(),i=!1;e?(i=!0,r=yp(e)):(r=a.getSource(),i=r.sourceFormat===Rd);var o=gw(t),s=Mw(t,o),l=n.useEncodeDefaulter,c=I["isFunction"](l)?l:l?I["curry"](qd,s,t):null,u={coordDimensions:s,generateCoord:n.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:c,canOmitUnusedDimensions:!i},d=fw(r,u),f=jw(d.dimensions,n.createInvertedIndices,o),p=i?null:a.getSharedDataStore(d),h=_w(t,{schema:d,store:p}),m=new uw(d,t);m.setCalculationInfo(h);var v=null!=f&&kw(r)?function(e,t,n,r){return r===f?n:this.defaultDimValueGetter(e,t,n,r)}:null;return m.hasItemOption=!1,m.initData(i?r:p,null,v),m}function kw(e){if(e.sourceFormat===Rd){var t=Ew(e.data||[]);return!I["isArray"](Ba(t))}}function Ew(e){var t=0;while(tt[1]&&(t[1]=e[1])},e.prototype.unionExtentFromData=function(e,t){this.unionExtent(e.getApproximateExtent(t))},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.setExtent=function(e,t){var n=this._extent;isNaN(e)||(n[0]=e),isNaN(t)||(n[1]=t)},e.prototype.isInExtentRange=function(e){return this._extent[0]<=e&&this._extent[1]>=e},e.prototype.isBlank=function(){return this._isBlank},e.prototype.setBlank=function(e){this._isBlank=e},e}();Di(Lw);var Tw=Lw,Dw=0,Iw=function(){function e(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++Dw}return e.createByAxisModel=function(t){var n=t.option,r=n.data,a=r&&Object(I["map"])(r,Pw);return new e({categories:a,needCollect:!a,deduplication:!1!==n.dedplication})},e.prototype.getOrdinal=function(e){return this._getOrCreateMap().get(e)},e.prototype.parseAndCollect=function(e){var t,n=this._needCollect;if(!Object(I["isString"])(e)&&!n)return e;if(n&&!this._deduplication)return t=this.categories.length,this.categories[t]=e,t;var r=this._getOrCreateMap();return t=r.get(e),null==t&&(n?(t=this.categories.length,this.categories[t]=e,r.set(e,t)):t=NaN),t},e.prototype._getOrCreateMap=function(){return this._map||(this._map=Object(I["createHashMap"])(this.categories))},e}();function Pw(e){return Object(I["isObject"])(e)&&null!=e.value?e.value:e+""}var Aw=Iw;function Nw(e){return"interval"===e.type||"log"===e.type}function Rw(e,t,n,r){var a={},i=e[1]-e[0],o=a.interval=Ea(i/t,!0);null!=n&&or&&(o=a.interval=r);var s=a.intervalPrecision=Fw(o),l=a.niceTickExtent=[ha(Math.ceil(e[0]/o)*o,s),ha(Math.floor(e[1]/o)*o,s)];return zw(l,e),a}function Yw(e){var t=Math.pow(10,ka(e)),n=e/t;return n?2===n?n=3:3===n?n=5:n*=2:n=1,ha(n*t)}function Fw(e){return va(e)+2}function Hw(e,t,n){e[t]=Math.max(Math.min(e[t],n[1]),n[0])}function zw(e,t){!isFinite(e[0])&&(e[0]=t[0]),!isFinite(e[1])&&(e[1]=t[1]),Hw(e,0,t),Hw(e,1,t),e[0]>e[1]&&(e[0]=e[1])}function Bw(e,t){return e>=t[0]&&e<=t[1]}function Ww(e,t){return t[1]===t[0]?.5:(e-t[0])/(t[1]-t[0])}function Vw(e,t){return e*(t[1]-t[0])+t[0]}var Uw=function(e){function t(t){var n=e.call(this,t)||this;n.type="ordinal";var r=n.getSetting("ordinalMeta");return r||(r=new Aw({})),Object(I["isArray"])(r)&&(r=new Aw({categories:Object(I["map"])(r,(function(e){return Object(I["isObject"])(e)?e.value:e}))})),n._ordinalMeta=r,n._extent=n.getSetting("extent")||[0,r.categories.length-1],n}return T(t,e),t.prototype.parse=function(e){return null==e?NaN:Object(I["isString"])(e)?this._ordinalMeta.getOrdinal(e):Math.round(e)},t.prototype.contain=function(e){return e=this.parse(e),Bw(e,this._extent)&&null!=this._ordinalMeta.categories[e]},t.prototype.normalize=function(e){return e=this._getTickNumber(this.parse(e)),Ww(e,this._extent)},t.prototype.scale=function(e){return e=Math.round(Vw(e,this._extent)),this.getRawOrdinalNumber(e)},t.prototype.getTicks=function(){var e=[],t=this._extent,n=t[0];while(n<=t[1])e.push({value:n}),n++;return e},t.prototype.getMinorTicks=function(e){},t.prototype.setSortInfo=function(e){if(null!=e){for(var t=e.ordinalNumbers,n=this._ordinalNumbersByTick=[],r=this._ticksByOrdinalNumber=[],a=0,i=this._ordinalMeta.categories.length,o=Math.min(i,t.length);a=0&&e=0&&e=e},t.prototype.getOrdinalMeta=function(){return this._ordinalMeta},t.prototype.calcNiceTicks=function(){},t.prototype.calcNiceExtent=function(){},t.type="ordinal",t}(Tw);Tw.registerClass(Uw);var Kw=Uw,Gw=ha,qw=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="interval",t._interval=0,t._intervalPrecision=2,t}return T(t,e),t.prototype.parse=function(e){return e},t.prototype.contain=function(e){return Bw(e,this._extent)},t.prototype.normalize=function(e){return Ww(e,this._extent)},t.prototype.scale=function(e){return Vw(e,this._extent)},t.prototype.setExtent=function(e,t){var n=this._extent;isNaN(e)||(n[0]=parseFloat(e)),isNaN(t)||(n[1]=parseFloat(t))},t.prototype.unionExtent=function(e){var t=this._extent;e[0]t[1]&&(t[1]=e[1]),this.setExtent(t[0],t[1])},t.prototype.getInterval=function(){return this._interval},t.prototype.setInterval=function(e){this._interval=e,this._niceExtent=this._extent.slice(),this._intervalPrecision=Fw(e)},t.prototype.getTicks=function(e){var t=this._interval,n=this._extent,r=this._niceExtent,a=this._intervalPrecision,i=[];if(!t)return i;var o=1e4;n[0]o)return[]}var l=i.length?i[i.length-1].value:r[1];return n[1]>l&&(e?i.push({value:Gw(l+t,a)}):i.push({value:n[1]})),i},t.prototype.getMinorTicks=function(e){for(var t=this.getTicks(!0),n=[],r=this.getExtent(),a=1;ar[0]&&d0&&(i=null===i?s:Math.min(i,s))}n[r]=i}}return n}function iO(e){var t=aO(e),n=[];return Object(I["each"])(e,(function(e){var r,a=e.coordinateSystem,i=a.getBaseAxis(),o=i.getExtent();if("category"===i.type)r=i.getBandWidth();else if("value"===i.type||"time"===i.type){var s=i.dim+"_"+i.index,l=t[s],c=Math.abs(o[1]-o[0]),u=i.scale.getExtent(),d=Math.abs(u[1]-u[0]);r=l?c/d*l:c}else{var f=e.getData();r=Math.abs(o[1]-o[0])/f.count()}var p=pa(e.get("barWidth"),r),h=pa(e.get("barMaxWidth"),r),m=pa(e.get("barMinWidth")||(dO(e)?.5:1),r),v=e.get("barGap"),g=e.get("barCategoryGap");n.push({bandWidth:r,barWidth:p,barMaxWidth:h,barMinWidth:m,barGap:v,barCategoryGap:g,axisKey:tO(i),stackId:eO(e)})})),oO(n)}function oO(e){var t={};Object(I["each"])(e,(function(e,n){var r=e.axisKey,a=e.bandWidth,i=t[r]||{bandWidth:a,remainedWidth:a,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},o=i.stacks;t[r]=i;var s=e.stackId;o[s]||i.autoWidthCount++,o[s]=o[s]||{width:0,maxWidth:0};var l=e.barWidth;l&&!o[s].width&&(o[s].width=l,l=Math.min(i.remainedWidth,l),i.remainedWidth-=l);var c=e.barMaxWidth;c&&(o[s].maxWidth=c);var u=e.barMinWidth;u&&(o[s].minWidth=u);var d=e.barGap;null!=d&&(i.gap=d);var f=e.barCategoryGap;null!=f&&(i.categoryGap=f)}));var n={};return Object(I["each"])(t,(function(e,t){n[t]={};var r=e.stacks,a=e.bandWidth,i=e.categoryGap;if(null==i){var o=Object(I["keys"])(r).length;i=Math.max(35-4*o,15)+"%"}var s=pa(i,a),l=pa(e.gap,1),c=e.remainedWidth,u=e.autoWidthCount,d=(c-s)/(u+(u-1)*l);d=Math.max(d,0),Object(I["each"])(r,(function(e){var t=e.maxWidth,n=e.minWidth;if(e.width){r=e.width;t&&(r=Math.min(r,t)),n&&(r=Math.max(r,n)),e.width=r,c-=r+l*r,u--}else{var r=d;t&&tr&&(r=n),r!==d&&(e.width=r,c-=r+l*r,u--)}})),d=(c-s)/(u+(u-1)*l),d=Math.max(d,0);var f,p=0;Object(I["each"])(r,(function(e,t){e.width||(e.width=d),f=e,p+=e.width*(1+l)})),f&&(p-=f.width*l);var h=-p/2;Object(I["each"])(r,(function(e,r){n[t][r]=n[t][r]||{bandWidth:a,offset:h,width:e.width},h+=e.width*(1+l)}))})),n}function sO(e,t,n){if(e&&t){var r=e[tO(t)];return null!=r&&null!=n?r[eO(n)]:r}}function lO(e,t){var n=rO(e,t),r=iO(n);Object(I["each"])(n,(function(e){var t=e.getData(),n=e.coordinateSystem,a=n.getBaseAxis(),i=eO(e),o=r[tO(a)][i],s=o.offset,l=o.width;t.setLayout({bandWidth:o.bandWidth,offset:s,size:l})}))}function cO(e){return{seriesType:e,plan:cm(),reset:function(e){if(uO(e)){var t=e.getData(),n=e.coordinateSystem,r=n.getBaseAxis(),a=n.getOtherAxis(r),i=t.getDimensionIndex(t.mapDimension(a.dim)),o=t.getDimensionIndex(t.mapDimension(r.dim)),s=e.get("showBackground",!0),l=t.mapDimension(a.dim),c=t.getCalculationInfo("stackResultDimension"),u=ww(t,l)&&!!t.getCalculationInfo("stackedOnSeries"),d=a.isHorizontal(),f=fO(r,a),p=dO(e),h=e.get("barMinHeight")||0,m=c&&t.getDimensionIndex(c),v=t.getLayout("size"),g=t.getLayout("offset");return{progress:function(e,t){var r,a=e.count,l=p&&$w(3*a),c=p&&s&&$w(3*a),y=p&&$w(a),b=n.master.getRect(),_=d?b.width:b.height,x=t.getStore(),w=0;while(null!=(r=e.next())){var O=x.get(u?m:i,r),M=x.get(o,r),j=f,S=void 0;u&&(S=+O-x.get(i,r));var k=void 0,E=void 0,C=void 0,L=void 0;if(d){var T=n.dataToPoint([O,M]);if(u){var D=n.dataToPoint([S,M]);j=D[0]}k=j,E=T[1]+g,C=T[0]-j,L=v,Math.abs(C)>>1;e[a][1]n&&(this._approxInterval=n);var i=mO.length,o=Math.min(pO(mO,this._approxInterval,0,i),i-1);this._interval=mO[o][1],this._minLevelUnit=mO[Math.max(o-1,0)][0]},t.prototype.parse=function(e){return Object(I["isNumber"])(e)?e:+ja(e)},t.prototype.contain=function(e){return Bw(this.parse(e),this._extent)},t.prototype.normalize=function(e){return Ww(this.parse(e),this._extent)},t.prototype.scale=function(e){return Vw(e,this._extent)},t.type="time",t}(Xw),mO=[["second",wu],["minute",Ou],["hour",Mu],["quarter-day",6*Mu],["half-day",12*Mu],["day",1.2*ju],["half-week",3.5*ju],["week",7*ju],["month",31*ju],["quarter",95*ju],["half-year",Su/2],["year",Su]];function vO(e,t,n,r){var a=ja(t),i=ja(n),o=function(e){return Fu(a,e,r)===Fu(i,e,r)},s=function(){return o("year")},l=function(){return s()&&o("month")},c=function(){return l()&&o("day")},u=function(){return c()&&o("hour")},d=function(){return u()&&o("minute")},f=function(){return d()&&o("second")},p=function(){return f()&&o("millisecond")};switch(e){case"year":return s();case"month":return l();case"day":return c();case"hour":return u();case"minute":return d();case"second":return f();case"millisecond":return p()}}function gO(e,t){return e/=ju,e>16?16:e>7.5?7:e>3.5?4:e>1.5?2:1}function yO(e){var t=30*ju;return e/=t,e>6?6:e>3?3:e>2?2:1}function bO(e){return e/=Mu,e>12?12:e>6?6:e>3.5?4:e>2?2:1}function _O(e,t){return e/=t?Ou:wu,e>30?30:e>20?20:e>15?15:e>10?10:e>5?5:e>2?2:1}function xO(e){return Ea(e,!0)}function wO(e,t,n){var r=new Date(e);switch(Iu(t)){case"year":case"month":r[qu(n)](0);case"day":r[Xu(n)](1);case"hour":r[Zu(n)](0);case"minute":r[Ju(n)](0);case"second":r[$u(n)](0),r[Qu(n)](0)}return r.getTime()}function OO(e,t,n,r){var a=1e4,i=Tu,o=0;function s(e,t,n,a,i,o,s){var l=new Date(t),c=t,u=l[a]();while(c1&&0===c&&i.unshift({value:i[0].value-f})}}for(c=0;c=r[0]&&y<=r[1]&&d++)}var b=(r[1]-r[0])/t;if(d>1.5*b&&f>b/1.5)break;if(c.push(v),d>b||e===i[p])break}u=[]}}}var _=Object(I["filter"])(Object(I["map"])(c,(function(e){return Object(I["filter"])(e,(function(e){return e.value>=r[0]&&e.value<=r[1]&&!e.notAdd}))})),(function(e){return e.length>0})),x=[],w=_.length-1;for(p=0;p<_.length;++p)for(var O=_[p],M=0;M0)r*=10;var i=[ha(CO(t[0]/r)*r),ha(EO(t[1]/r)*r)];this._interval=r,this._niceExtent=i}},t.prototype.calcNiceExtent=function(e){SO.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=TO(e)/TO(this.base),Bw(e,this._extent)},t.prototype.normalize=function(e){return e=TO(e)/TO(this.base),Ww(e,this._extent)},t.prototype.scale=function(e){return e=Vw(e,this._extent),LO(this.base,e)},t.type="log",t}(Tw),IO=DO.prototype;function PO(e,t){return kO(e,va(t))}IO.getMinorTicks=SO.getMinorTicks,IO.getLabel=SO.getLabel,Tw.registerClass(DO);var AO=DO,NO=function(){function e(e,t,n){this._prepareParams(e,t,n)}return e.prototype._prepareParams=function(e,t,n){n[1]0&&s>0&&!l&&(o=0),o<0&&s<0&&!c&&(s=0));var d=this._determinedMin,f=this._determinedMax;return null!=d&&(o=d,l=!0),null!=f&&(s=f,c=!0),{min:o,max:s,minFixed:l,maxFixed:c,isBlank:u}},e.prototype.modifyDataMinMax=function(e,t){this[YO[e]]=t},e.prototype.setDeterminedMinMax=function(e,t){var n=RO[e];this[n]=t},e.prototype.freeze=function(){this.frozen=!0},e}(),RO={min:"_determinedMin",max:"_determinedMax"},YO={min:"_dataMin",max:"_dataMax"};function FO(e,t,n){var r=e.rawExtentInfo;return r||(r=new NO(e,t,n),e.rawExtentInfo=r,r)}function HO(e,t){return null==t?null:Object(I["eqNaN"])(t)?NaN:e.parse(t)}function zO(e,t){var n=e.type,r=FO(e,t,e.getExtent()).calculate();e.setBlank(r.isBlank);var a=r.min,i=r.max,o=t.ecModel;if(o&&"time"===n){var s=rO("bar",o),l=!1;if(I["each"](s,(function(e){l=l||e.getBaseAxis()===t.axis})),l){var c=iO(s),u=BO(a,i,t,c);a=u.min,i=u.max}}return{extent:[a,i],fixMin:r.minFixed,fixMax:r.maxFixed}}function BO(e,t,n,r){var a=n.axis.getExtent(),i=a[1]-a[0],o=sO(r,n.axis);if(void 0===o)return{min:e,max:t};var s=1/0;I["each"](o,(function(e){s=Math.min(e.offset,s)}));var l=-1/0;I["each"](o,(function(e){l=Math.max(e.offset+e.width,l)})),s=Math.abs(s),l=Math.abs(l);var c=s+l,u=t-e,d=1-(s+l)/i,f=u/d-u;return t+=f*(l/c),e-=f*(s/c),{min:e,max:t}}function WO(e,t){var n=t,r=zO(e,n),a=r.extent,i=n.get("splitNumber");e instanceof AO&&(e.base=n.get("logBase"));var o=e.type,s=n.get("interval"),l="interval"===o||"time"===o;e.setExtent(a[0],a[1]),e.calcNiceExtent({splitNumber:i,fixMin:r.fixMin,fixMax:r.fixMax,minInterval:l?n.get("minInterval"):null,maxInterval:l?n.get("maxInterval"):null}),null!=s&&e.setInterval&&e.setInterval(s)}function VO(e,t){if(t=t||e.get("type"),t)switch(t){case"category":return new Kw({ordinalMeta:e.getOrdinalMeta?e.getOrdinalMeta():e.getCategories(),extent:[1/0,-1/0]});case"time":return new MO({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get("useUTC")});default:return new(Tw.getClass(t)||Xw)}}function UO(e){var t=e.scale.getExtent(),n=t[0],r=t[1];return!(n>0&&r>0||n<0&&r<0)}function KO(e){var t=e.getLabelModel().get("formatter"),n="category"===e.type?e.scale.getExtent()[0]:null;return"time"===e.scale.type?function(t){return function(n,r){return e.scale.getFormattedLabel(n,r,t)}}(t):I["isString"](t)?function(t){return function(n){var r=e.scale.getLabel(n),a=t.replace("{value}",null!=r?r:"");return a}}(t):I["isFunction"](t)?function(t){return function(r,a){return null!=n&&(a=r.value-n),t(GO(e,r),a,null!=r.level?{level:r.level}:null)}}(t):function(t){return e.scale.getLabel(t)}}function GO(e,t){return"category"===e.type?e.scale.getLabel(t):t.value}function qO(e){var t=e.model,n=e.scale;if(t.get(["axisLabel","show"])&&!n.isBlank()){var r,a,i=n.getExtent();n instanceof Kw?a=n.count():(r=n.getTicks(),a=r.length);var o,s=e.getLabelModel(),l=KO(e),c=1;a>40&&(c=Math.ceil(a/40));for(var u=0;u