0&&t.arc(c+Z.cx,h+Z.cy,U,yy(Z.y0,Z.x0),yy(Z.y1,Z.x1),!d),t.arc(c,h,i,yy(Z.cy+Z.y1,Z.cx+Z.x1),yy(Y.cy+Y.y1,Y.cx+Y.x1),!d),j>0&&t.arc(c+Y.cx,h+Y.cy,j,yy(Y.y1,Y.x1),yy(Y.y0,Y.x0),!d))}else t.moveTo(c+L,h+P),t.arc(c,h,i,l,u,!d);else t.moveTo(c+L,h+P);if(r>wy&&E)if(T>wy){U=by(g,T),j=by(v,T),Z=My(O,R,C,A,r,-j,d),Y=My(L,P,k,D,r,-U,d);t.lineTo(c+Z.cx+Z.x0,h+Z.cy+Z.y0),T0&&t.arc(c+Z.cx,h+Z.cy,j,yy(Z.y0,Z.x0),yy(Z.y1,Z.x1),!d),t.arc(c,h,r,yy(Z.cy+Z.y1,Z.cx+Z.x1),yy(Y.cy+Y.y1,Y.cx+Y.x1),d),U>0&&t.arc(c+Y.cx,h+Y.cy,U,yy(Y.y1,Y.x1),yy(Y.y0,Y.x0),!d))}else t.lineTo(c+O,h+R),t.arc(c,h,r,u,l,d);else t.lineTo(c+O,h+R)}else t.moveTo(c,h);t.closePath()}}}var Cy=function(){function t(){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 t}(),Ay=function(t){function e(e){return t.call(this,e)||this}return Dt(e,t),e.prototype.getDefaultShape=function(){return new Cy},e.prototype.buildPath=function(t,e){Ty(t,e)},e.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},e}(Xl);Ay.prototype.type="sector";const ky=Ay;var Dy=function(){function t(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return t}(),Ly=function(t){function e(e){return t.call(this,e)||this}return Dt(e,t),e.prototype.getDefaultShape=function(){return new Dy},e.prototype.buildPath=function(t,e){var n=e.cx,i=e.cy,r=2*Math.PI;t.moveTo(n+e.r,i),t.arc(n,i,e.r,0,r,!1),t.moveTo(n+e.r0,i),t.arc(n,i,e.r0,0,r,!0)},e}(Xl);Ly.prototype.type="ring";const Py=Ly;function Oy(t,e,n,i){var r,o,a,s,l=[],u=[],c=[],h=[];if(i){a=[1/0,1/0],s=[-1/0,-1/0];for(var d=0,p=t.length;d=2){if(i){var o=Oy(r,i,n,e.smoothConstraint);t.moveTo(r[0][0],r[0][1]);for(var a=r.length,s=0;s<(n?a:a-1);s++){var l=o[2*s],u=o[2*s+1],c=r[(s+1)%a];t.bezierCurveTo(l[0],l[1],u[0],u[1],c[0],c[1])}}else{t.moveTo(r[0][0],r[0][1]);s=1;for(var h=r.length;slm[1]){if(a=!1,r)return a;var u=Math.abs(lm[0]-sm[1]),c=Math.abs(sm[0]-lm[1]);Math.min(u,c)>i.len()&&(uMath.abs(o[1])?o[0]>0?"right":"left":o[1]>0?"bottom":"top"}function Em(t){return!t.isGroup}function Nm(t){return null!=t.shape}function zm(t,e,n){if(t&&e){var i=r(t);e.traverse((function(t){if(Em(t)&&t.anid){var e=i[t.anid];if(e){var r=o(t);t.attr(o(e)),$c(t,r,n,Lu(t).dataIndex)}}}))}function r(t){var e={};return t.traverse((function(t){Em(t)&&t.anid&&(e[t.anid]=t)})),e}function o(t){var e={x:t.x,y:t.y,rotation:t.rotation};return Nm(t)&&(e.shape=z({},t.shape)),e}}function Bm(t,e){return q(t,(function(t){var n=t[0];n=vm(n,e.x),n=ym(n,e.x+e.width);var i=t[1];return i=vm(i,e.y),i=ym(i,e.y+e.height),[n,i]}))}function Vm(t,e){var n=vm(t.x,e.x),i=ym(t.x+t.width,e.x+e.width),r=vm(t.y,e.y),o=ym(t.y+t.height,e.y+e.height);if(i>=n&&o>=r)return{x:n,y:r,width:i-n,height:o-r}}function Fm(t,e,n){var i=z({rectHover:!0},e),r=i.style={strokeNoScale:!0};if(n=n||{x:-1,y:-1,width:2,height:2},t)return 0===t.indexOf("image://")?(r.image=t.slice(8),B(r,n),new iu(i)):Mm(t.replace("path://",""),i,n,"center")}function Hm(t,e,n,i,r){for(var o=0,a=r[r.length-1];o1)return!1;var v=Wm(p,f,c,h)/d;return!(v<0||v>1)}function Wm(t,e,n,i){return t*i-n*e}function qm(t){return t<=1e-6&&t>=-1e-6}function Um(t){var e=t.itemTooltipOption,n=t.componentModel,i=t.itemName,r=tt(e)?{formatter:e}:e,o=n.mainType,a=n.componentIndex,s={componentType:o,name:i,$vars:["name"]};s[o+"Index"]=a;var l=t.formatterParamsExtra;l&&W(Y(l),(function(t){Tt(s,t)||(s[t]=l[t],s.$vars.push(t))}));var u=Lu(t.el);u.componentMainType=o,u.componentIndex=a,u.tooltipConfig={name:i,option:B({content:i,formatterParams:s},r)}}function jm(t,e){var n;t.isGroup&&(n=e(t)),n||t.traverse(e)}function Zm(t,e){if(t)if(J(t))for(var n=0;n=0?h():c=setTimeout(h,-r),l=i};return d.clear=function(){c&&(clearTimeout(c),c=null)},d.debounceNextCall=function(t){s=t},d}function sx(t,e,n,i){var r=t[e];if(r){var o=r[ix]||r,a=r[ox],s=r[rx];if(s!==n||a!==i){if(null==n||!i)return t[e]=o;r=t[e]=ax(o,n,"debounce"===i),r[ix]=o,r[ox]=i,r[rx]=n}return r}}function lx(t,e){var n=t[e];n&&n[ix]&&(n.clear&&n.clear(),t[e]=n[ix])}var ux=za(),cx={itemStyle:us(kh,!0),lineStyle:us(Th,!0)},hx={lineStyle:"stroke",itemStyle:"fill"};function dx(t,e){var n=t.visualStyleMapper||cx[e];return n||(console.warn("Unkown style type '"+e+"'."),cx.itemStyle)}function px(t,e){var n=t.visualDrawType||hx[e];return n||(console.warn("Unkown style type '"+e+"'."),"fill")}var fx={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var n=t.getData(),i=t.visualStyleAccessPath||"itemStyle",r=t.getModel(i),o=dx(t,i),a=o(r),s=r.getShallow("decal");s&&(n.setVisual("decal",s),s.dirty=!0);var l=px(t,i),u=a[l],c=Q(u)?u:null,h="auto"===a.fill||"auto"===a.stroke;if(!a[l]||c||h){var d=t.getColorFromPalette(t.name,null,e.getSeriesCount());a[l]||(a[l]=d,n.setVisual("colorFromPalette",!0)),a.fill="auto"===a.fill||Q(a.fill)?d:a.fill,a.stroke="auto"===a.stroke||Q(a.stroke)?d:a.stroke}if(n.setVisual("style",a),n.setVisual("drawType",l),!e.isSeriesFiltered(t)&&c)return n.setVisual("colorFromPalette",!1),{dataEach:function(e,n){var i=t.getDataParams(n),r=z({},a);r[l]=c(i),e.setItemVisual(n,"style",r)}}}},gx=new Oh,vx={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){if(!t.ignoreStyleOnData&&!e.isSeriesFiltered(t)){var n=t.getData(),i=t.visualStyleAccessPath||"itemStyle",r=dx(t,i),o=n.getVisual("drawType");return{dataEach:n.hasItemOption?function(t,e){var n=t.getRawDataItem(e);if(n&&n[i]){gx.option=n[i];var a=r(gx),s=t.ensureUniqueItemVisual(e,"style");z(s,a),gx.option.decal&&(t.setItemVisual(e,"decal",gx.option.decal),gx.option.decal.dirty=!0),o in a&&t.setItemVisual(e,"colorFromPalette",!1)}}:null}}}},yx={performRawSeries:!0,overallReset:function(t){var e=wt();t.eachSeries((function(t){var n=t.getColorBy();if(!t.isColorBySeries()){var i=t.type+"-"+n,r=e.get(i);r||(r={},e.set(i,r)),ux(t).scope=r}})),t.eachSeries((function(e){if(!e.isColorBySeries()&&!t.isSeriesFiltered(e)){var n=e.getRawData(),i={},r=e.getData(),o=ux(e).scope,a=e.visualStyleAccessPath||"itemStyle",s=px(e,a);r.each((function(t){var e=r.getRawIndex(t);i[e]=t})),n.each((function(t){var a=i[t],l=r.getItemVisual(a,"colorFromPalette");if(l){var u=r.ensureUniqueItemVisual(a,"style"),c=n.getName(t)||t+"",h=n.count();u[s]=e.getColorFromPalette(c,o,h)}}))}}))}},mx=Math.PI;function xx(t,e){e=e||{},B(e,{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 Lo,i=new du({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});n.add(i);var r,o=new Du({style:{text:e.text,fill:e.textColor,fontSize:e.fontSize,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontFamily:e.fontFamily},zlevel:e.zlevel,z:10001}),a=new du({style:{fill:"none"},textContent:o,textConfig:{position:"right",distance:10},zlevel:e.zlevel,z:10001});return n.add(a),e.showSpinner&&(r=new Jy({shape:{startAngle:-mx/2,endAngle:-mx/2+.1,r:e.spinnerRadius},style:{stroke:e.color,lineCap:"round",lineWidth:e.lineWidth},zlevel:e.zlevel,z:10001}),r.animateShape(!0).when(1e3,{endAngle:3*mx/2}).start("circularInOut"),r.animateShape(!0).when(1e3,{startAngle:3*mx/2}).delay(300).start("circularInOut"),n.add(r)),n.resize=function(){var n=o.getBoundingRect().width,s=e.showSpinner?e.spinnerRadius:0,l=(t.getWidth()-2*s-(e.showSpinner&&n?10:0)-n)/2-(e.showSpinner&&n?0:5+n/2)+(e.showSpinner?0:n/2)+(n?0:s),u=t.getHeight()/2;e.showSpinner&&r.setShape({cx:l,cy:u}),a.setShape({x:l-s,y:u-s,width:2*s,height:2*s}),i.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},n.resize(),n}var _x=function(){function t(t,e,n,i){this._stageTaskMap=wt(),this.ecInstance=t,this.api=e,n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice(),this._allHandlers=n.concat(i)}return t.prototype.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each((function(t){var e=t.overallTask;e&&e.dirty()}))},t.prototype.getPerformArgs=function(t,e){if(t.__pipeline){var n=this._pipelineMap.get(t.__pipeline.id),i=n.context,r=!e&&n.progressiveEnabled&&(!i||i.progressiveRender)&&t.__idxInPipeline>n.blockIndex,o=r?n.step:null,a=i&&i.modDataCount,s=null!=a?Math.ceil(a/o):null;return{step:o,modBy:s,modDataCount:a}}},t.prototype.getPipeline=function(t){return this._pipelineMap.get(t)},t.prototype.updateStreamModes=function(t,e){var n=this._pipelineMap.get(t.uid),i=t.getData(),r=i.count(),o=n.progressiveEnabled&&e.incrementalPrepareRender&&r>=n.threshold,a=t.get("large")&&r>=t.get("largeThreshold"),s="mod"===t.get("progressiveChunkMode")?r:null;t.pipelineContext=n.context={progressiveRender:o,modDataCount:s,large:a}},t.prototype.restorePipelines=function(t){var e=this,n=e._pipelineMap=wt();t.eachSeries((function(t){var i=t.getProgressive(),r=t.uid;n.set(r,{id:r,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:i&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),e._pipe(t,t.dataTask)}))},t.prototype.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.api.getModel(),n=this.api;W(this._allHandlers,(function(i){var r=t.get(i.uid)||t.set(i.uid,{}),o="";vt(!(i.reset&&i.overallReset),o),i.reset&&this._createSeriesStageTask(i,r,e,n),i.overallReset&&this._createOverallStageTask(i,r,e,n)}),this)},t.prototype.prepareView=function(t,e,n,i){var r=t.renderTask,o=r.context;o.model=e,o.ecModel=n,o.api=i,r.__block=!t.incrementalPrepareRender,this._pipe(e,r)},t.prototype.performDataProcessorTasks=function(t,e){this._performStageTasks(this._dataProcessorHandlers,t,e,{block:!0})},t.prototype.performVisualTasks=function(t,e,n){this._performStageTasks(this._visualHandlers,t,e,n)},t.prototype._performStageTasks=function(t,e,n,i){i=i||{};var r=!1,o=this;function a(t,e){return t.setDirty&&(!t.dirtyMap||t.dirtyMap.get(e.__pipeline.id))}W(t,(function(t,s){if(!i.visualType||i.visualType===t.visualType){var l=o._stageTaskMap.get(t.uid),u=l.seriesTaskMap,c=l.overallTask;if(c){var h,d=c.agentStubMap;d.each((function(t){a(i,t)&&(t.dirty(),h=!0)})),h&&c.dirty(),o.updatePayload(c,n);var p=o.getPerformArgs(c,i.block);d.each((function(t){t.perform(p)})),c.perform(p)&&(r=!0)}else u&&u.each((function(s,l){a(i,s)&&s.dirty();var u=o.getPerformArgs(s,i.block);u.skip=!t.performRawSeries&&e.isSeriesFiltered(s.context.model),o.updatePayload(s,n),s.perform(u)&&(r=!0)}))}})),this.unfinished=r||this.unfinished},t.prototype.performSeriesTasks=function(t){var e;t.eachSeries((function(t){e=t.dataTask.perform()||e})),this.unfinished=e||this.unfinished},t.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)}))},t.prototype.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)},t.prototype._createSeriesStageTask=function(t,e,n,i){var r=this,o=e.seriesTaskMap,a=e.seriesTaskMap=wt(),s=t.seriesType,l=t.getTargetSeries;function u(e){var s=e.uid,l=a.set(s,o&&o.get(s)||dg({plan:Tx,reset:Cx,count:Dx}));l.context={model:e,ecModel:n,api:i,useClearVisual:t.isVisual&&!t.isLayout,plan:t.plan,reset:t.reset,scheduler:r},r._pipe(e,l)}t.createOnAllSeries?n.eachRawSeries(u):s?n.eachRawSeriesByType(s,u):l&&l(n,i).each(u)},t.prototype._createOverallStageTask=function(t,e,n,i){var r=this,o=e.overallTask=e.overallTask||dg({reset:bx});o.context={ecModel:n,api:i,overallReset:t.overallReset,scheduler:r};var a=o.agentStubMap,s=o.agentStubMap=wt(),l=t.seriesType,u=t.getTargetSeries,c=!0,h=!1,d="";function p(t){var e=t.uid,n=s.set(e,a&&a.get(e)||(h=!0,dg({reset:Sx,onDirty:Ix})));n.context={model:t,overallProgress:c},n.agent=o,n.__block=c,r._pipe(t,n)}vt(!t.createOnAllSeries,d),l?n.eachRawSeriesByType(l,p):u?u(n,i).each(p):(c=!1,W(n.getSeries(),p)),h&&o.dirty()},t.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},t.wrapStageHandler=function(t,e){return Q(t)&&(t={overallReset:t,seriesType:Lx(t)}),t.uid=Eh("stageHandler"),e&&(t.visualType=e),t},t}();function bx(t){t.overallReset(t.ecModel,t.api,t.payload)}function Sx(t){return t.overallProgress&&Mx}function Mx(){this.agent.dirty(),this.getDownstream().dirty()}function Ix(){this.agent&&this.agent.dirty()}function Tx(t){return t.plan?t.plan(t.model,t.ecModel,t.api,t.payload):null}function Cx(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=ga(t.reset(t.model,t.ecModel,t.api,t.payload));return e.length>1?q(e,(function(t,e){return kx(e)})):Ax}var Ax=kx(0);function kx(t){return function(e,n){var i=n.data,r=n.resetDefines[t];if(r&&r.dataEach)for(var o=e.start;o0&&c===r.length-u.length){var h=r.slice(0,c);"data"!==h&&(e.mainType=h,e[u.toLowerCase()]=t,s=!0)}}a.hasOwnProperty(r)&&(n[r]=t,s=!0),s||(i[r]=t)}))}return{cptQuery:e,dataQuery:n,otherQuery:i}},t.prototype.filter=function(t,e){var n=this.eventInfo;if(!n)return!0;var i=n.targetEl,r=n.packedEvent,o=n.model,a=n.view;if(!o||!a)return!0;var s=e.cptQuery,l=e.dataQuery;return u(s,o,"mainType")&&u(s,o,"subType")&&u(s,o,"index","componentIndex")&&u(s,o,"name")&&u(s,o,"id")&&u(l,r,"name")&&u(l,r,"dataIndex")&&u(l,r,"dataType")&&(!a.filterForExposedEvent||a.filterForExposedEvent(t,e.otherQuery,i,r));function u(t,e,n,i){return null==t[n]||e[i||n]===t[n]}},t.prototype.afterTrigger=function(){this.eventInfo=null},t}(),jx=["symbol","symbolSize","symbolRotate","symbolOffset"],Zx=jx.concat(["symbolKeepAspect"]),Yx={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var n=t.getData();if(t.legendIcon&&n.setVisual("legendIcon",t.legendIcon),t.hasSymbolVisual){for(var i={},r={},o=!1,a=0;a=0&&x_(l)?l:.5;var u=t.createRadialGradient(a,s,0,a,s,l);return u}function w_(t,e,n){for(var i="radial"===e.type?b_(t,e,n):__(t,e,n),r=e.colorStops,o=0;o0?"dashed"===t?[4*e,2*e]:"dotted"===t?[e]:nt(t)?[t]:J(t)?t:null:null}function C_(t){var e=t.style,n=e.lineDash&&e.lineWidth>0&&T_(e.lineDash,e.lineWidth),i=e.lineDashOffset;if(n){var r=e.strokeNoScale&&t.getLineScale?t.getLineScale():1;r&&1!==r&&(n=q(n,(function(t){return t/r})),i/=r)}return[n,i]}var A_=new Sl(!0);function k_(t){var e=t.stroke;return!(null==e||"none"===e||!(t.lineWidth>0))}function D_(t){return"string"===typeof t&&"none"!==t}function L_(t){var e=t.fill;return null!=e&&"none"!==e}function P_(t,e){if(null!=e.fillOpacity&&1!==e.fillOpacity){var n=t.globalAlpha;t.globalAlpha=e.fillOpacity*e.opacity,t.fill(),t.globalAlpha=n}else t.fill()}function O_(t,e){if(null!=e.strokeOpacity&&1!==e.strokeOpacity){var n=t.globalAlpha;t.globalAlpha=e.strokeOpacity*e.opacity,t.stroke(),t.globalAlpha=n}else t.stroke()}function R_(t,e,n){var i=gs(e.image,e.__image,n);if(ys(i)){var r=t.createPattern(i,e.repeat||"repeat");if("function"===typeof DOMMatrix&&r&&r.setTransform){var o=new DOMMatrix;o.translateSelf(e.x||0,e.y||0),o.rotateSelf(0,0,(e.rotation||0)*At),o.scaleSelf(e.scaleX||1,e.scaleY||1),r.setTransform(o)}return r}}function E_(t,e,n,i){var r,o=k_(n),a=L_(n),s=n.strokePercent,l=s<1,u=!e.path;e.silent&&!l||!u||e.createPathProxy();var c=e.path||A_,h=e.__dirty;if(!i){var d=n.fill,p=n.stroke,f=a&&!!d.colorStops,g=o&&!!p.colorStops,v=a&&!!d.image,y=o&&!!p.image,m=void 0,x=void 0,_=void 0,b=void 0,w=void 0;(f||g)&&(w=e.getBoundingRect()),f&&(m=h?w_(t,d,w):e.__canvasFillGradient,e.__canvasFillGradient=m),g&&(x=h?w_(t,p,w):e.__canvasStrokeGradient,e.__canvasStrokeGradient=x),v&&(_=h||!e.__canvasFillPattern?R_(t,d,e):e.__canvasFillPattern,e.__canvasFillPattern=_),y&&(b=h||!e.__canvasStrokePattern?R_(t,p,e):e.__canvasStrokePattern,e.__canvasStrokePattern=_),f?t.fillStyle=m:v&&(_?t.fillStyle=_:a=!1),g?t.strokeStyle=x:y&&(b?t.strokeStyle=b:o=!1)}var S,M,I=e.getGlobalScale();c.setScale(I[0],I[1],e.segmentIgnoreThreshold),t.setLineDash&&n.lineDash&&(r=C_(e),S=r[0],M=r[1]);var T=!0;(u||h&Xe)&&(c.setDPR(t.dpr),l?c.setContext(null):(c.setContext(t),T=!1),c.reset(),e.buildPath(c,e.shape,i),c.toStatic(),e.pathUpdated()),T&&c.rebuildPath(t,l?s:1),S&&(t.setLineDash(S),t.lineDashOffset=M),i||(n.strokeFirst?(o&&O_(t,n),a&&P_(t,n)):(a&&P_(t,n),o&&O_(t,n))),S&&t.setLineDash([])}function N_(t,e,n){var i=e.__image=gs(n.image,e.__image,e,e.onload);if(i&&ys(i)){var r=n.x||0,o=n.y||0,a=e.getWidth(),s=e.getHeight(),l=i.width/i.height;if(null==a&&null!=s?a=s*l:null==s&&null!=a?s=a/l:null==a&&null==s&&(a=i.width,s=i.height),n.sWidth&&n.sHeight){var u=n.sx||0,c=n.sy||0;t.drawImage(i,u,c,n.sWidth,n.sHeight,r,o,a,s)}else if(n.sx&&n.sy){u=n.sx,c=n.sy;var h=a-u,d=s-c;t.drawImage(i,u,c,h,d,r,o,a,s)}else t.drawImage(i,r,o,a,s)}}function z_(t,e,n){var i,r=n.text;if(null!=r&&(r+=""),r){t.font=n.font||p,t.textAlign=n.textAlign,t.textBaseline=n.textBaseline;var o=void 0,a=void 0;t.setLineDash&&n.lineDash&&(i=C_(e),o=i[0],a=i[1]),o&&(t.setLineDash(o),t.lineDashOffset=a),n.strokeFirst?(k_(n)&&t.strokeText(r,n.x,n.y),L_(n)&&t.fillText(r,n.x,n.y)):(L_(n)&&t.fillText(r,n.x,n.y),k_(n)&&t.strokeText(r,n.x,n.y)),o&&t.setLineDash([])}}var B_=["shadowBlur","shadowOffsetX","shadowOffsetY"],V_=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function F_(t,e,n,i,r){var o=!1;if(!i&&(n=n||{},e===n))return!1;if(i||e.opacity!==n.opacity){K_(t,r),o=!0;var a=Math.max(Math.min(e.opacity,1),0);t.globalAlpha=isNaN(a)?Rs.opacity:a}(i||e.blend!==n.blend)&&(o||(K_(t,r),o=!0),t.globalCompositeOperation=e.blend||Rs.blend);for(var s=0;s0&&t.unfinished);t.unfinished||this._zr.flush()}}},e.prototype.getDom=function(){return this._dom},e.prototype.getId=function(){return this.id},e.prototype.getZr=function(){return this._zr},e.prototype.isSSR=function(){return this._ssr},e.prototype.setOption=function(t,e,n){if(!this[Eb])if(this._disposed)gw(this.id);else{var i,r,o;if(it(e)&&(n=e.lazyUpdate,i=e.silent,r=e.replaceMerge,o=e.transition,e=e.notMerge),this[Eb]=!0,!this._model||e){var a=new lf(this._api),s=this._theme,l=this._model=new Yp;l.scheduler=this._scheduler,l.ssr=this._ssr,l.init(null,null,null,s,this._locale,a)}this._model.setOption(t,{replaceMerge:r},xw);var u={seriesTransition:o,optionChanged:!0};if(n)this[Nb]={silent:i,updateParams:u},this[Eb]=!1,this.getZr().wakeUp();else{try{jb(this),Xb.update.call(this,null,u)}catch(wy){throw this[Nb]=null,this[Eb]=!1,wy}this._ssr||this._zr.flush(),this[Nb]=null,this[Eb]=!1,Qb.call(this,i),tw.call(this,i)}}},e.prototype.setTheme=function(){gg("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},e.prototype.getModel=function(){return this._model},e.prototype.getOption=function(){return this._model&&this._model.getOption()},e.prototype.getWidth=function(){return this._zr.getWidth()},e.prototype.getHeight=function(){return this._zr.getHeight()},e.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||yb&&window.devicePixelRatio||1},e.prototype.getRenderedCanvas=function(t){return this.renderToCanvas(t)},e.prototype.renderToCanvas=function(t){t=t||{};var e=this._zr.painter;return e.getRenderedCanvas({backgroundColor:t.backgroundColor||this._model.get("backgroundColor"),pixelRatio:t.pixelRatio||this.getDevicePixelRatio()})},e.prototype.renderToSVGString=function(t){t=t||{};var e=this._zr.painter;return e.renderToString({useViewBox:t.useViewBox})},e.prototype.getSvgDataURL=function(){if(c.svgSupported){var t=this._zr,e=t.storage.getDisplayList();return W(e,(function(t){t.stopAnimation(null,!0)})),t.painter.toDataURL()}},e.prototype.getDataURL=function(t){if(!this._disposed){t=t||{};var e=t.excludeComponents,n=this._model,i=[],r=this;W(e,(function(t){n.eachComponent({mainType:t},(function(t){var e=r._componentsMap[t.__viewId];e.group.ignore||(i.push(e),e.group.ignore=!0)}))}));var o="svg"===this._zr.painter.getType()?this.getSvgDataURL():this.renderToCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return W(i,(function(t){t.group.ignore=!1})),o}gw(this.id)},e.prototype.getConnectedDataURL=function(t){if(!this._disposed){var e="svg"===t.type,n=this.group,i=Math.min,r=Math.max,o=1/0;if(Mw[n]){var a=o,s=o,l=-o,u=-o,c=[],h=t&&t.pixelRatio||this.getDevicePixelRatio();W(Sw,(function(o,h){if(o.group===n){var d=e?o.getZr().painter.getSvgDom().innerHTML:o.renderToCanvas(R(t)),p=o.getDom().getBoundingClientRect();a=i(p.left,a),s=i(p.top,s),l=r(p.right,l),u=r(p.bottom,u),c.push({dom:d,left:p.left,top:p.top})}})),a*=h,s*=h,l*=h,u*=h;var d=l-a,p=u-s,f=x.createCanvas(),g=zo(f,{renderer:e?"svg":"canvas"});if(g.resize({width:d,height:p}),e){var v="";return W(c,(function(t){var e=t.left-a,n=t.top-s;v+=''+t.dom+""})),g.painter.getSvgRoot().innerHTML=v,t.connectedBackgroundColor&&g.painter.setBackgroundColor(t.connectedBackgroundColor),g.refreshImmediately(),g.painter.toDataURL()}return t.connectedBackgroundColor&&g.add(new du({shape:{x:0,y:0,width:d,height:p},style:{fill:t.connectedBackgroundColor}})),W(c,(function(t){var e=new iu({style:{x:t.left*h-a,y:t.top*h-s,image:t.dom}});g.add(e)})),g.refreshImmediately(),f.toDataURL("image/"+(t&&t.type||"png"))}return this.getDataURL(t)}gw(this.id)},e.prototype.convertToPixel=function(t,e){return $b(this,"convertToPixel",t,e)},e.prototype.convertFromPixel=function(t,e){return $b(this,"convertFromPixel",t,e)},e.prototype.containPixel=function(t,e){if(!this._disposed){var n,i=this._model,r=Va(i,t);return W(r,(function(t,i){i.indexOf("Models")>=0&&W(t,(function(t){var r=t.coordinateSystem;if(r&&r.containPoint)n=n||!!r.containPoint(e);else if("seriesModels"===i){var o=this._chartsMap[t.__viewId];o&&o.containPoint&&(n=n||o.containPoint(e,t))}else 0}),this)}),this),!!n}gw(this.id)},e.prototype.getVisual=function(t,e){var n=this._model,i=Va(n,t,{defaultMainType:"series"}),r=i.seriesModel;var o=r.getData(),a=i.hasOwnProperty("dataIndexInside")?i.dataIndexInside:i.hasOwnProperty("dataIndex")?o.indexOfRawIndex(i.dataIndex):null;return null!=a?$x(o,a,e):Kx(o,e)},e.prototype.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},e.prototype.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]},e.prototype._initEvents=function(){var t=this;W(fw,(function(e){var n=function(n){var i,r=t.getModel(),o=n.target,a="globalout"===e;if(a?i={}:o&&n_(o,(function(t){var e=Lu(t);if(e&&null!=e.dataIndex){var n=e.dataModel||r.getSeriesByIndex(e.seriesIndex);return i=n&&n.getDataParams(e.dataIndex,e.dataType)||{},!0}if(e.eventData)return i=z({},e.eventData),!0}),!0),i){var s=i.componentType,l=i.componentIndex;"markLine"!==s&&"markPoint"!==s&&"markArea"!==s||(s="series",l=i.seriesIndex);var u=s&&null!=l&&r.getComponent(s,l),c=u&&t["series"===u.mainType?"_chartsMap":"_componentsMap"][u.__viewId];0,i.event=n,i.type=e,t._$eventProcessor.eventInfo={targetEl:o,packedEvent:i,model:u,view:c},t.trigger(e,i)}};n.zrEventfulCallAtLast=!0,t._zr.on(e,n,t)})),W(yw,(function(e,n){t._messageCenter.on(n,(function(t){this.trigger(n,t)}),t)})),W(["selectchanged"],(function(e){t._messageCenter.on(e,(function(t){this.trigger(e,t)}),t)})),e_(this._messageCenter,this,this._api)},e.prototype.isDisposed=function(){return this._disposed},e.prototype.clear=function(){this._disposed?gw(this.id):this.setOption({series:[]},!0)},e.prototype.dispose=function(){if(this._disposed)gw(this.id);else{this._disposed=!0;var t=this.getDom();t&&qa(this.getDom(),Tw,"");var e=this,n=e._api,i=e._model;W(e._componentsViews,(function(t){t.dispose(i,n)})),W(e._chartsViews,(function(t){t.dispose(i,n)})),e._zr.dispose(),e._dom=e._model=e._chartsMap=e._componentsMap=e._chartsViews=e._componentsViews=e._scheduler=e._api=e._zr=e._throttledZrFlush=e._theme=e._coordSysMgr=e._messageCenter=null,delete Sw[e.id]}},e.prototype.resize=function(t){if(!this[Eb])if(this._disposed)gw(this.id);else{this._zr.resize(t);var e=this._model;if(this._loadingFX&&this._loadingFX.resize(),e){var n=e.resetOption("media"),i=t&&t.silent;this[Nb]&&(null==i&&(i=this[Nb].silent),n=!0,this[Nb]=null),this[Eb]=!0;try{n&&jb(this),Xb.update.call(this,{type:"resize",animation:z({duration:0},t&&t.animation)})}catch(wy){throw this[Eb]=!1,wy}this[Eb]=!1,Qb.call(this,i),tw.call(this,i)}}},e.prototype.showLoading=function(t,e){if(this._disposed)gw(this.id);else if(it(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),ww[t]){var n=ww[t](this._api,e),i=this._zr;this._loadingFX=n,i.add(n)}},e.prototype.hideLoading=function(){this._disposed?gw(this.id):(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},e.prototype.makeActionFromEvent=function(t){var e=z({},t);return e.type=yw[t.type],e},e.prototype.dispatchAction=function(t,e){if(this._disposed)gw(this.id);else if(it(e)||(e={silent:!!e}),vw[t.type]&&this._model)if(this[Eb])this._pendingActions.push(t);else{var n=e.silent;Jb.call(this,t,n);var i=e.flush;i?this._zr.flush():!1!==i&&c.browser.weChat&&this._throttledZrFlush(),Qb.call(this,n),tw.call(this,n)}},e.prototype.updateLabelLayout=function(){pb.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},e.prototype.appendData=function(t){if(this._disposed)gw(this.id);else{var e=t.seriesIndex,n=this.getModel(),i=n.getSeriesByIndex(e);0,i.appendData(t),this._scheduler.unfinished=!0,this.getZr().wakeUp()}},e.internalField=function(){function t(t){t.clearColorPalette(),t.eachSeries((function(t){t.clearColorPalette()}))}function e(t){var e=[],n=[],i=!1;if(t.eachComponent((function(t,r){var o=r.get("zlevel")||0,a=r.get("z")||0,s=r.getZLevelKey();i=i||!!s,("series"===t?n:e).push({zlevel:o,z:a,idx:r.componentIndex,type:t,key:s})})),i){var r,o,a=e.concat(n);je(a,(function(t,e){return t.zlevel===e.zlevel?t.z-e.z:t.zlevel-e.zlevel})),W(a,(function(e){var n=t.getComponent(e.type,e.idx),i=e.zlevel,a=e.key;null!=r&&(i=Math.max(r,i)),a?(i===r&&a!==o&&i++,o=a):o&&(i===r&&i++,o=""),r=i,n.setZLevel(i)}))}}function n(t){for(var e=[],n=t.currentStates,i=0;ie.get("hoverLayerThreshold")&&!c.node&&!c.worker&&e.eachSeries((function(e){if(!e.preventUsingHoverLayer){var n=t._chartsMap[e.__viewId];n.__alive&&n.eachRendered((function(t){t.states.emphasis&&(t.states.emphasis.hoverLayer=!0)}))}}))}function r(t,e){var n=t.get("blendMode")||null;e.eachRendered((function(t){t.isGroup||(t.style.blend=n)}))}function a(t,e){if(!t.preventAutoZ){var n=t.get("z")||0,i=t.get("zlevel")||0;e.eachRendered((function(t){return s(t,n,i,-1/0),!0}))}}function s(t,e,n,i){var r=t.getTextContent(),o=t.getTextGuideLine(),a=t.isGroup;if(a)for(var l=t.childrenRef(),u=0;u0?{duration:o,delay:i.get("delay"),easing:i.get("easing")}:null;e.eachRendered((function(t){if(t.states&&t.states.emphasis){if(Jc(t))return;if(t instanceof Xl&&jc(t),t.__dirty){var e=t.prevStates;e&&t.useStates(e)}if(r){t.stateTransition=a;var i=t.getTextContent(),o=t.getTextGuideLine();i&&(i.stateTransition=a),o&&(o.stateTransition=a)}t.__dirty&&n(t)}}))}jb=function(t){var e=t._scheduler;e.restorePipelines(t._model),e.prepareStageTasks(),Zb(t,!0),Zb(t,!1),e.plan()},Zb=function(t,e){for(var n=t._model,i=t._scheduler,r=e?t._componentsViews:t._chartsViews,o=e?t._componentsMap:t._chartsMap,a=t._zr,s=t._api,l=0;l=0)){Vw.push(n);var o=Nx.wrapStageHandler(n,r);o.__prio=e,o.__raw=n,t.push(o)}}function Hw(t,e){ww[t]=e}function Gw(t,e,n){var i=vb("registerMap");i&&i(t,e,n)}var Ww=Pg;Bw(Tb,fx),Bw(kb,vx),Bw(kb,yx),Bw(Tb,Yx),Bw(kb,Xx),Bw(Ob,hb),Dw(Pf),Lw(_b,Of),Hw("default",xx),Ew({type:qu,event:qu,update:qu},Ct),Ew({type:Uu,event:Uu,update:Uu},Ct),Ew({type:ju,event:ju,update:ju},Ct),Ew({type:Zu,event:Zu,update:Zu},Ct),Ew({type:Yu,event:Yu,update:Yu},Ct),kw("light",Bx),kw("dark",qx);var qw=[],Uw={registerPreprocessor:Dw,registerProcessor:Lw,registerPostInit:Pw,registerPostUpdate:Ow,registerUpdateLifecycle:Rw,registerAction:Ew,registerCoordinateSystem:Nw,registerLayout:zw,registerVisual:Bw,registerTransform:Ww,registerLoading:Hw,registerMap:Gw,registerImpl:gb,PRIORITY:Rb,ComponentModel:op,ComponentView:Ev,SeriesModel:Ov,ChartView:nx,registerComponentModel:function(t){op.registerClass(t)},registerComponentView:function(t){Ev.registerClass(t)},registerSeriesModel:function(t){Ov.registerClass(t)},registerChartView:function(t){nx.registerClass(t)},registerSubTypeDefaulter:function(t,e){op.registerSubTypeDefaulter(t,e)},registerPainter:function(t,e){Bo(t,e)}};function jw(t){J(t)?W(t,(function(t){jw(t)})):V(qw,t)>=0||(qw.push(t),Q(t)&&(t={install:t}),t.install(Uw))}var Zw=2*Math.PI,Yw=Sl.CMD,Xw=["top","right","bottom","left"];function $w(t,e,n,i,r){var o=n.width,a=n.height;switch(t){case"top":i.set(n.x+o/2,n.y-e),r.set(0,-1);break;case"bottom":i.set(n.x+o/2,n.y+a+e),r.set(0,1);break;case"left":i.set(n.x-e,n.y+a/2),r.set(-1,0);break;case"right":i.set(n.x+o+e,n.y+a/2),r.set(1,0);break}}function Kw(t,e,n,i,r,o,a,s,l){a-=t,s-=e;var u=Math.sqrt(a*a+s*s);a/=u,s/=u;var c=a*n+t,h=s*n+e;if(Math.abs(i-r)%Zw<1e-4)return l[0]=c,l[1]=h,u-n;if(o){var d=i;i=Al(r),r=Al(d)}else i=Al(i),r=Al(r);i>r&&(r+=Zw);var p=Math.atan2(s,a);if(p<0&&(p+=Zw),p>=i&&p<=r||p+Zw>=i&&p+Zw<=r)return l[0]=c,l[1]=h,u-n;var f=n*Math.cos(i)+t,g=n*Math.sin(i)+e,v=n*Math.cos(r)+t,y=n*Math.sin(r)+e,m=(f-a)*(f-a)+(g-s)*(g-s),x=(v-a)*(v-a)+(y-s)*(y-s);return m0){e=e/180*Math.PI,iS.fromArray(t[0]),rS.fromArray(t[1]),oS.fromArray(t[2]),Xr.sub(aS,iS,rS),Xr.sub(sS,oS,rS);var n=aS.len(),i=sS.len();if(!(n<.001||i<.001)){aS.scale(1/n),sS.scale(1/i);var r=aS.dot(sS),o=Math.cos(e);if(o1&&Xr.copy(cS,oS),cS.toArray(t[1])}}}}function dS(t,e,n){if(n<=180&&n>0){n=n/180*Math.PI,iS.fromArray(t[0]),rS.fromArray(t[1]),oS.fromArray(t[2]),Xr.sub(aS,rS,iS),Xr.sub(sS,oS,rS);var i=aS.len(),r=sS.len();if(!(i<.001||r<.001)){aS.scale(1/i),sS.scale(1/r);var o=aS.dot(e),a=Math.cos(n);if(o=l)Xr.copy(cS,oS);else{cS.scaleAndAdd(sS,s/Math.tan(Math.PI/2-c));var h=oS.x!==rS.x?(cS.x-rS.x)/(oS.x-rS.x):(cS.y-rS.y)/(oS.y-rS.y);if(isNaN(h))return;h<0?Xr.copy(cS,rS):h>1&&Xr.copy(cS,oS)}cS.toArray(t[1])}}}}function pS(t,e,n,i){var r="normal"===n,o=r?t:t.ensureState(n);o.ignore=e;var a=i.get("smooth");a&&!0===a&&(a=.3),o.shape=o.shape||{},a>0&&(o.shape.smooth=a);var s=i.getModel("lineStyle").getLineStyle();r?t.useStyle(s):o.style=s}function fS(t,e){var n=e.smooth,i=e.points;if(i)if(t.moveTo(i[0][0],i[0][1]),n>0&&i.length>=3){var r=Wt(i[0],i[1]),o=Wt(i[1],i[2]);if(!r||!o)return t.lineTo(i[1][0],i[1][1]),void t.lineTo(i[2][0],i[2][1]);var a=Math.min(r,o)*n,s=jt([],i[1],i[0],a/r),l=jt([],i[1],i[2],a/o),u=jt([],s,l,.5);t.bezierCurveTo(s[0],s[1],s[0],s[1],u[0],u[1]),t.bezierCurveTo(l[0],l[1],l[0],l[1],i[2][0],i[2][1])}else for(var c=1;c0&&o&&w(-h/a,0,a);var v,y,m=t[0],x=t[a-1];return _(),v<0&&S(-v,.8),y<0&&S(y,.8),_(),b(v,y,1),b(y,v,-1),_(),v<0&&M(-v),y<0&&M(y),u}function _(){v=m.rect[e]-i,y=r-x.rect[e]-x.rect[n]}function b(t,e,n){if(t<0){var i=Math.min(e,-t);if(i>0){w(i*n,0,a);var r=i+t;r<0&&S(-r*n,1)}else S(-t*n,1)}}function w(n,i,r){0!==n&&(u=!0);for(var o=i;o0)for(l=0;l0;l--){d=o[l-1]*h;w(-d,l,a)}}}function M(t){var e=t<0?-1:1;t=Math.abs(t);for(var n=Math.ceil(t/(a-1)),i=0;i0?w(n,0,i+1):w(-n,a-i-1,a),t-=n,t<=0)return}}function xS(t,e,n,i){return mS(t,"x","width",e,n,i)}function _S(t,e,n,i){return mS(t,"y","height",e,n,i)}function bS(t){var e=[];t.sort((function(t,e){return e.priority-t.priority}));var n=new oo(0,0,0,0);function i(t){if(!t.ignore){var e=t.ensureState("emphasis");null==e.ignore&&(e.ignore=!1)}t.ignore=!0}for(var r=0;r=0&&n.attr(r.oldLayoutSelect),V(c,"emphasis")>=0&&n.attr(r.oldLayoutEmphasis)),$c(n,l,e,s)}else if(n.attr(l),!mh(n).valueAnimation){var h=dt(n.style.opacity,1);n.style.opacity=0,Kc(n,{style:{opacity:h}},e,s)}if(r.oldLayout=l,n.states.select){var d=r.oldLayoutSelect={};AS(d,l,kS),AS(d,n.states.select,kS)}if(n.states.emphasis){var p=r.oldLayoutEmphasis={};AS(p,l,kS),AS(p,n.states.emphasis,kS)}_h(n,s,u,e,e)}if(i&&!i.ignore&&!i.invisible){r=CS(i),o=r.oldLayout;var f={points:i.shape.points};o?(i.attr({shape:o}),$c(i,{shape:f},e)):(i.setShape(f),i.style.strokePercent=0,Kc(i,{style:{strokePercent:1}},e)),r.oldLayout=f}},t}();const LS=DS;var PS=za();function OS(t){t.registerUpdateLifecycle("series:beforeupdate",(function(t,e,n){var i=PS(e).labelManager;i||(i=PS(e).labelManager=new LS),i.clearLabels()})),t.registerUpdateLifecycle("series:layoutlabels",(function(t,e,n){var i=PS(e).labelManager;n.updatedSeries.forEach((function(t){i.addLabelsOfSeries(e.getViewOfSeriesModel(t))})),i.updateLayoutConfig(e),i.layout(e),i.processLabelsOverall()}))}function RS(t,e,n){var i=x.createCanvas(),r=e.getWidth(),o=e.getHeight(),a=i.style;return a&&(a.position="absolute",a.left="0",a.top="0",a.width=r+"px",a.height=o+"px",i.setAttribute("data-zr-dom-id",t)),i.width=r*n,i.height=o*n,i}jw(OS);var ES=function(t){function e(e,n,i){var r,o=t.call(this)||this;o.motionBlur=!1,o.lastFrameAlpha=.7,o.dpr=1,o.virtual=!1,o.config={},o.incremental=!1,o.zlevel=0,o.maxRepaintRectCount=5,o.__dirty=!0,o.__firstTimePaint=!0,o.__used=!1,o.__drawIndex=0,o.__startIndex=0,o.__endIndex=0,o.__prevStartIndex=null,o.__prevEndIndex=null,i=i||Sr,"string"===typeof e?r=RS(e,n,i):it(e)&&(r=e,e=r.id),o.id=e,o.dom=r;var a=r.style;return a&&(It(r),r.onselectstart=function(){return!1},a.padding="0",a.margin="0",a.borderWidth="0"),o.painter=n,o.dpr=i,o}return Dt(e,t),e.prototype.getElementCount=function(){return this.__endIndex-this.__startIndex},e.prototype.afterBrush=function(){this.__prevStartIndex=this.__startIndex,this.__prevEndIndex=this.__endIndex},e.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},e.prototype.setUnpainted=function(){this.__firstTimePaint=!0},e.prototype.createBackBuffer=function(){var t=this.dpr;this.domBack=RS("back-"+this.id,this.painter,t),this.ctxBack=this.domBack.getContext("2d"),1!==t&&this.ctxBack.scale(t,t)},e.prototype.createRepaintRects=function(t,e,n,i){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var r,o=[],a=this.maxRepaintRectCount,s=!1,l=new oo(0,0,0,0);function u(t){if(t.isFinite()&&!t.isZero())if(0===o.length){var e=new oo(0,0,0,0);e.copy(t),o.push(e)}else{for(var n=!1,i=1/0,r=0,u=0;u=a)}}for(var c=this.__startIndex;c15)break}}n.prevElClipPaths&&c.restore()};if(d)if(0===d.length)s=l.__endIndex;else for(var _=p.dpr,b=0;b0&&t>i[0]){for(s=0;st)break;a=n[i[s]]}if(i.splice(s+1,0,t),n[t]=e,!e.virtual)if(a){var l=a.dom;l.nextSibling?o.insertBefore(e.dom,l.nextSibling):o.appendChild(e.dom)}else o.firstChild?o.insertBefore(e.dom,o.firstChild):o.appendChild(e.dom);e.__painter=this}},t.prototype.eachLayer=function(t,e){for(var n=this._zlevelList,i=0;i0?VS:0),this._needsManuallyCompositing),u.__builtin__||O("ZLevel "+l+" has been used by unkown layer "+u.id),u!==a&&(u.__used=!0,u.__startIndex!==o&&(u.__dirty=!0),u.__startIndex=o,u.incremental?u.__drawIndex=-1:u.__drawIndex=o,e(o),a=u),i.__dirty&Ze&&!i.__inHover&&(u.__dirty=!0,u.incremental&&u.__drawIndex<0&&(u.__drawIndex=o))}e(o),this.eachBuiltinLayer((function(t,e){!t.__used&&t.getElementCount()>0&&(t.__dirty=!0,t.__startIndex=t.__endIndex=t.__drawIndex=0),t.__dirty&&t.__drawIndex<0&&(t.__drawIndex=t.__startIndex)}))},t.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},t.prototype._clearLayer=function(t){t.clear()},t.prototype.setBackgroundColor=function(t){this._backgroundColor=t,W(this._layers,(function(t){t.setUnpainted()}))},t.prototype.configLayer=function(t,e){if(e){var n=this._layerConfig;n[t]?E(n[t],e,!0):n[t]=e;for(var i=0;i=XS:-l>=XS),d=l>0?l%XS:l%XS+XS,p=!1;p=!!h||!hi(c)&&d>=YS===!!u;var f=t+n*ZS(o),g=e+i*jS(o);this._start&&this._add("M",f,g);var v=Math.round(r*$S);if(h){var y=1/this._p,m=(u?1:-1)*(XS-y);this._add("A",n,i,v,1,+u,t+n*ZS(o+m),e+i*jS(o+m)),y>.01&&this._add("A",n,i,v,0,+u,f,g)}else{var x=t+n*ZS(a),_=e+i*jS(a);this._add("A",n,i,v,+p,+u,x,_)}},t.prototype.rect=function(t,e,n,i){this._add("M",t,e),this._add("l",n,0),this._add("l",0,i),this._add("l",-n,0),this._add("Z")},t.prototype.closePath=function(){this._d.length>0&&this._add("Z")},t.prototype._add=function(t,e,n,i,r,o,a,s,l){for(var u=[],c=this._p,h=1;h"}function pM(t){return""+t+">"}function fM(t,e){e=e||{};var n=e.newline?"\n":"";function i(t){var e=t.children,r=t.tag,o=t.attrs;return dM(r,o)+(t.text||"")+(e?""+n+q(e,(function(t){return i(t)})).join(n)+n:"")+pM(r)}return i(t)}function gM(t,e,n){n=n||{};var i=n.newline?"\n":"",r=" {"+i,o=i+"}",a=q(Y(t),(function(e){return e+r+q(Y(t[e]),(function(n){return n+":"+t[e][n]+";"})).join(i)+o})).join(i),s=q(Y(e),(function(t){return"@keyframes "+t+r+q(Y(e[t]),(function(n){return n+r+q(Y(e[t][n]),(function(i){var r=e[t][n][i];return"d"===i&&(r='path("'+r+'")'),i+":"+r+";"})).join(i)+o})).join(i)+o})).join(i);return a||s?[""].join(i):""}function vM(t){return{zrId:t,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssClassIdx:0,cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function yM(t,e,n,i){return hM("svg","root",{width:t,height:e,xmlns:aM,"xmlns:xlink":sM,version:"1.1",baseProfile:"full",viewBox:!!i&&"0 0 "+t+" "+e},n)}var mM={cubicIn:"0.32,0,0.67,0",cubicOut:"0.33,1,0.68,1",cubicInOut:"0.65,0,0.35,1",quadraticIn:"0.11,0,0.5,0",quadraticOut:"0.5,1,0.89,1",quadraticInOut:"0.45,0,0.55,1",quarticIn:"0.5,0,0.75,0",quarticOut:"0.25,1,0.5,1",quarticInOut:"0.76,0,0.24,1",quinticIn:"0.64,0,0.78,0",quinticOut:"0.22,1,0.36,1",quinticInOut:"0.83,0,0.17,1",sinusoidalIn:"0.12,0,0.39,0",sinusoidalOut:"0.61,1,0.88,1",sinusoidalInOut:"0.37,0,0.63,1",exponentialIn:"0.7,0,0.84,0",exponentialOut:"0.16,1,0.3,1",exponentialInOut:"0.87,0,0.13,1",circularIn:"0.55,0,1,0.45",circularOut:"0,0.55,0.45,1",circularInOut:"0.85,0,0.15,1"},xM="transform-origin";function _M(t,e,n){var i=z({},t.shape);z(i,e),t.buildPath(n,i);var r=new JS;return r.reset(Ti(t)),n.rebuildPath(r,1),r.generateStr(),r.getStr()}function bM(t,e){var n=e.originX,i=e.originY;(n||i)&&(t[xM]=n+"px "+i+"px")}var wM={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function SM(t,e){var n=e.zrId+"-ani-"+e.cssAnimIdx++;return e.cssAnims[n]=t,n}function MM(t,e,n){var i,r,o=t.shape.paths,a={};if(W(o,(function(t){var e=vM(n.zrId);e.animation=!0,TM(t,{},e,!0);var o=e.cssAnims,s=e.cssNodes,l=Y(o),u=l.length;if(u){r=l[u-1];var c=o[r];for(var h in c){var d=c[h];a[h]=a[h]||{d:""},a[h].d+=d.d||""}for(var p in s){var f=s[p].animation;f.indexOf(r)>=0&&(i=f)}}})),i){e.d=!1;var s=SM(a,n);return i.replace(r,s)}}function IM(t){return tt(t)?mM[t]?"cubic-bezier("+mM[t]+")":Pn(t)?t:"":""}function TM(t,e,n,i){var r=t.animators,o=r.length,a=[];if(t instanceof tm){var s=MM(t,e,n);if(s)a.push(s);else if(!o)return}else if(!o)return;for(var l={},u=0;u0})).length){var k=SM(c,n);return k+" "+r[0]+" both"}}for(var v in l){s=g(l[v]);s&&a.push(s)}if(a.length){var y=n.zrId+"-cls-"+n.cssClassIdx++;n.cssNodes["."+y]={animation:a.join(",")},e["class"]=y}}var CM=Math.round;function AM(t){return t&&tt(t.src)}function kM(t){return t&&Q(t.toDataURL)}function DM(t,e,n,i){oM((function(r,o){var a="fill"===r||"stroke"===r;a&&Mi(o)?qM(e,t,r,i):a&&bi(o)?UM(n,t,r,i):t[r]=o}),e,n,!1),WM(n,t,i)}function LM(t){return hi(t[0]-1)&&hi(t[1])&&hi(t[2])&&hi(t[3]-1)}function PM(t){return hi(t[4])&&hi(t[5])}function OM(t,e,n){if(e&&(!PM(e)||!LM(e))){var i=n?10:1e4;t.transform=LM(e)?"translate("+CM(e[4]*i)/i+" "+CM(e[5]*i)/i+")":fi(e)}}function RM(t,e,n){for(var i=t.points,r=[],o=0;ou?(a=null==n[d+1]?null:n[d+1].elm,lI(t,a,n,l,d)):uI(t,e,s,u))}function dI(t,e){var n=e.elm=t.elm,i=t.children,r=e.children;t!==e&&(cI(t,e),iI(e.text)?rI(i)&&rI(r)?i!==r&&hI(n,i,r):rI(r)?(rI(t.text)&&QM(n,""),lI(n,null,r,0,r.length-1)):rI(i)?uI(n,i,0,i.length-1):rI(t.text)&&QM(n,""):t.text!==e.text&&(rI(i)&&uI(n,i,0,i.length-1),QM(n,e.text)))}function pI(t,e){if(aI(t,e))dI(t,e);else{var n=t.elm,i=KM(n);sI(e),null!==i&&(YM(i,e.elm,JM(n)),uI(i,[t],0,0))}return e}var fI=0,gI=function(){function t(t,e,n){if(this.type="svg",this.refreshHover=vI("refreshHover"),this.configLayer=vI("configLayer"),this.storage=e,this._opts=n=z({},n),this.root=t,this._id="zr"+fI++,this._oldVNode=yM(n.width,n.height),t&&!n.ssr){var i=this._viewport=document.createElement("div");i.style.cssText="position:relative;overflow:hidden";var r=this._svgDom=this._oldVNode.elm=cM("svg");cI(null,this._oldVNode),i.appendChild(r),t.appendChild(i)}this.resize(n.width,n.height)}return t.prototype.getType=function(){return this.type},t.prototype.getViewportRoot=function(){return this._viewport},t.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},t.prototype.getSvgDom=function(){return this._svgDom},t.prototype.refresh=function(){if(this.root){var t=this.renderToVNode({willUpdate:!0});t.attrs.style="position:absolute;left:0;top:0;user-select:none",pI(this._oldVNode,t),this._oldVNode=t}},t.prototype.renderOneToVNode=function(t){return GM(t,vM(this._id))},t.prototype.renderToVNode=function(t){t=t||{};var e=this.storage.getDisplayList(!0),n=this._backgroundColor,i=this._width,r=this._height,o=vM(this._id);o.animation=t.animation,o.willUpdate=t.willUpdate,o.compress=t.compress;var a=[];if(n&&"none"!==n){var s=ui(n),l=s.color,u=s.opacity;this._bgVNode=hM("rect","bg",{width:i,height:r,x:"0",y:"0",id:"0",fill:l,"fill-opacity":u}),a.push(this._bgVNode)}else this._bgVNode=null;var c=t.compress?null:this._mainVNode=hM("g","main",{},[]);this._paintList(e,o,c?c.children:a),c&&a.push(c);var h=q(Y(o.defs),(function(t){return o.defs[t]}));if(h.length&&a.push(hM("defs","defs",{},h)),t.animation){var d=gM(o.cssNodes,o.cssAnims,{newline:!0});if(d){var p=hM("style","stl",{},[],d);a.push(p)}}return yM(i,r,a,t.useViewBox)},t.prototype.renderToString=function(t){return t=t||{},fM(this.renderToVNode({animation:dt(t.cssAnimation,!0),willUpdate:!1,compress:!0,useViewBox:dt(t.useViewBox,!0)}),{newline:!0})},t.prototype.setBackgroundColor=function(t){this._backgroundColor=t;var e=this._bgVNode;if(e&&e.elm){var n=ui(t),i=n.color,r=n.opacity;e.elm.setAttribute("fill",i),r<1&&e.elm.setAttribute("fill-opacity",r)}},t.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},t.prototype._paintList=function(t,e,n){for(var i,r,o=t.length,a=[],s=0,l=0,u=0;u=0;f--)if(h&&r&&h[f]===r[f])break;for(var g=p-1;g>f;g--)s--,i=a[s-1];for(var v=f+1;v1){var u=s.shift();1===s.length&&(n[a]=s[0]),this._update&&this._update(u,o)}else 1===l?(n[a]=null,this._update&&this._update(s,o)):this._remove&&this._remove(o)}this._performRestAdd(r,n)},t.prototype._executeMultiple=function(){var t=this._old,e=this._new,n={},i={},r=[],o=[];this._initIndexMap(t,n,r,"_oldKeyGetter"),this._initIndexMap(e,i,o,"_newKeyGetter");for(var a=0;a1&&1===h)this._updateManyToOne&&this._updateManyToOne(u,l),i[s]=null;else if(1===c&&h>1)this._updateOneToMany&&this._updateOneToMany(u,l),i[s]=null;else if(1===c&&1===h)this._update&&this._update(u,l),i[s]=null;else if(c>1&&h>1)this._updateManyToMany&&this._updateManyToMany(u,l),i[s]=null;else if(c>1)for(var d=0;d1)for(var a=0;a30}var zI,BI,VI,FI,HI,GI,WI,qI=it,UI=q,jI="undefined"===typeof Int32Array?Array:Int32Array,ZI="e\0\0",YI=-1,XI=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],$I=["_approximateExtent"],KI=function(){function t(t,e){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 i=!1;OI(t)?(n=t.dimensions,this._dimOmitted=t.isDimensionOmitted(),this._schema=t):(i=!0,n=t),n=n||["x","y"];for(var r={},o=[],a={},s=!1,l={},u=0;u=e)){var n=this._store,i=n.getProvider();this._updateOrdinalMeta();var r=this._nameList,o=this._idList,a=i.getSource().sourceFormat,s=a===cp;if(s&&!i.pure)for(var l=[],u=t;u0},t.prototype.ensureUniqueItemVisual=function(t,e){var n=this._itemVisuals,i=n[t];i||(i=n[t]={});var r=i[e];return null==r&&(r=this.getVisual(e),J(r)?r=r.slice():qI(r)&&(r=z({},r)),i[e]=r),r},t.prototype.setItemVisual=function(t,e,n){var i=this._itemVisuals[t]||{};this._itemVisuals[t]=i,qI(e)?z(i,e):i[e]=n},t.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},t.prototype.setLayout=function(t,e){qI(t)?z(this._layout,t):this._layout[t]=e},t.prototype.getLayout=function(t){return this._layout[t]},t.prototype.getItemLayout=function(t){return this._itemLayouts[t]},t.prototype.setItemLayout=function(t,e,n){this._itemLayouts[t]=n?z(this._itemLayouts[t]||{},e):e},t.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},t.prototype.setItemGraphicEl=function(t,e){var n=this.hostModel&&this.hostModel.seriesIndex;Pu(n,this.dataType,t,e),this._graphicEls[t]=e},t.prototype.getItemGraphicEl=function(t){return this._graphicEls[t]},t.prototype.eachItemGraphicEl=function(t,e){W(this._graphicEls,(function(n,i){n&&t&&t.call(e,n,i)}))},t.prototype.cloneShallow=function(e){return e||(e=new t(this._schema?this._schema:UI(this.dimensions,this._getDimInfo,this),this.hostModel)),HI(e,this),e._store=this._store,e},t.prototype.wrapMethod=function(t,e){var n=this[t];Q(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var t=n.apply(this,arguments);return e.apply(this,[t].concat(ft(arguments)))})},t.internalField=function(){zI=function(t){var e=t._invertedIndicesMap;W(e,(function(n,i){var r=t._dimInfos[i],o=r.ordinalMeta,a=t._store;if(o){n=e[i]=new jI(o.categories.length);for(var s=0;s1&&(s+="__ec__"+u),i[e]=s}}}(),t}();const JI=KI;function QI(t,e){Hf(t)||(t=Wf(t)),e=e||{};var n=e.coordDimensions||[],i=e.dimensionsDefine||t.dimensionsDefine||[],r=wt(),o=[],a=eT(t,n,i,e.dimensionsCount),s=e.canOmitUnusedDimensions&&NI(a),l=i===t.dimensionsDefine,u=l?EI(t):RI(i),c=e.encodeDefine;!c&&e.encodeDefaulter&&(c=e.encodeDefaulter(t,a));for(var h=wt(c),d=new Fg(a),p=0;p0&&(i.name=r+(o-1)),o++,e.set(r,o)}}function eT(t,e,n,i){var r=Math.max(t.dimensionsDetectedCount||1,e.length,n.length,i||0);return W(e,(function(t){var e;it(t)&&(e=t.dimsDef)&&(r=Math.max(r,e.length))})),r}function nT(t,e,n){var i=e.data;if(n||i.hasOwnProperty(t)){var r=0;while(i.hasOwnProperty(t+r))r++;t+=r}return e.set(t,!0),t}var iT=function(){function t(t){this.coordSysDims=[],this.axisMap=wt(),this.categoryAxisMap=wt(),this.coordSysName=t}return t}();function rT(t){var e=t.get("coordinateSystem"),n=new iT(e),i=oT[e];if(i)return i(t,n,n.axisMap,n.categoryAxisMap),n}var oT={cartesian2d:function(t,e,n,i){var r=t.getReferringComponents("xAxis",Ha).models[0],o=t.getReferringComponents("yAxis",Ha).models[0];e.coordSysDims=["x","y"],n.set("x",r),n.set("y",o),aT(r)&&(i.set("x",r),e.firstCategoryDimIndex=0),aT(o)&&(i.set("y",o),null==e.firstCategoryDimIndex&&(e.firstCategoryDimIndex=1))},singleAxis:function(t,e,n,i){var r=t.getReferringComponents("singleAxis",Ha).models[0];e.coordSysDims=["single"],n.set("single",r),aT(r)&&(i.set("single",r),e.firstCategoryDimIndex=0)},polar:function(t,e,n,i){var r=t.getReferringComponents("polar",Ha).models[0],o=r.findAxisModel("radiusAxis"),a=r.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],n.set("radius",o),n.set("angle",a),aT(o)&&(i.set("radius",o),e.firstCategoryDimIndex=0),aT(a)&&(i.set("angle",a),null==e.firstCategoryDimIndex&&(e.firstCategoryDimIndex=1))},geo:function(t,e,n,i){e.coordSysDims=["lng","lat"]},parallel:function(t,e,n,i){var r=t.ecModel,o=r.getComponent("parallel",t.get("parallelIndex")),a=e.coordSysDims=o.dimensions.slice();W(o.parallelAxisIndex,(function(t,o){var s=r.getComponent("parallelAxis",t),l=a[o];n.set(l,s),aT(s)&&(i.set(l,s),null==e.firstCategoryDimIndex&&(e.firstCategoryDimIndex=o))}))}};function aT(t){return"category"===t.get("type")}function sT(t,e,n){n=n||{};var i,r,o,a=n.byIndex,s=n.stackedCoordDimension;lT(e)?i=e:(r=e.schema,i=r.dimensions,o=e.store);var l,u,c,h,d=!(!t||!t.get("stack"));if(W(i,(function(t,e){tt(t)&&(i[e]=t={name:t}),d&&!t.isExtraCoord&&(a||l||!t.ordinalMeta||(l=t),u||"ordinal"===t.type||"time"===t.type||s&&s!==t.coordDim||(u=t))})),!u||a||l||(a=!0),u){c="__\0ecstackresult_"+t.id,h="__\0ecstackedover_"+t.id,l&&(l.createInvertedIndices=!0);var p=u.coordDim,f=u.type,g=0;W(i,(function(t){t.coordDim===p&&g++}));var v={name:c,coordDim:p,coordDimIndex:g,type:f,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length},y={name:h,coordDim:h,coordDimIndex:g+1,type:f,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length+1};r?(o&&(v.storeDimIndex=o.ensureCalculationDimension(h,f),y.storeDimIndex=o.ensureCalculationDimension(c,f)),r.appendCalculationDimension(v),r.appendCalculationDimension(y)):(i.push(v),i.push(y))}return{stackedDimension:u&&u.name,stackedByDimension:l&&l.name,isStackedByIndex:a,stackedOverDimension:h,stackResultDimension:c}}function lT(t){return!OI(t.schema)}function uT(t,e){return!!e&&e===t.getCalculationInfo("stackedDimension")}function cT(t,e){return uT(t,e)?t.getCalculationInfo("stackResultDimension"):e}function hT(t,e){var n,i=t.get("coordinateSystem"),r=tf.get(i);return e&&e.coordSysDims&&(n=q(e.coordSysDims,(function(t){var n={name:t},i=e.axisMap.get(t);if(i){var r=i.get("type");n.type=TI(r)}return n}))),n||(n=r&&(r.getDimensionsInfo?r.getDimensionsInfo():r.dimensions.slice())||["x","y"]),n}function dT(t,e,n){var i,r;return n&&W(t,(function(t,o){var a=t.coordDim,s=n.categoryAxisMap.get(a);s&&(null==i&&(i=o),t.ordinalMeta=s.getOrdinalMeta(),e&&(t.createInvertedIndices=!0)),null!=t.otherDims.itemName&&(r=!0)})),r||null==i||(t[i].otherDims.itemName=0),i}function pT(t,e,n){n=n||{};var i,r=e.getSourceManager(),o=!1;t?(o=!0,i=Wf(t)):(i=r.getSource(),o=i.sourceFormat===cp);var a=rT(e),s=hT(e,a),l=n.useEncodeDefaulter,u=Q(l)?l:l?K(bp,s,e):null,c={coordDimensions:s,generateCoord:n.generateCoord,encodeDefine:e.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!o},h=QI(i,c),d=dT(h.dimensions,n.createInvertedIndices,a),p=o?null:r.getSharedDataStore(h),f=sT(e,{schema:h,store:p}),g=new JI(h,e);g.setCalculationInfo(f);var v=null!=d&&fT(i)?function(t,e,n,i){return i===d?n:this.defaultDimValueGetter(t,e,n,i)}:null;return g.hasItemOption=!1,g.initData(o?i:p,null,v),g}function fT(t){if(t.sourceFormat===cp){var e=gT(t.data||[]);return!J(ma(e))}}function gT(t){var e=0;while(e-1&&(s.style.stroke=s.style.fill,s.style.fill="#fff",s.style.lineWidth=2),e},e.type="series.line",e.dependencies=["grid","polar"],e.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},e}(Ov);const mT=yT;function xT(t,e){var n=t.mapDimensionsAll("defaultedLabel"),i=n.length;if(1===i){var r=lg(t,e,n[0]);return null!=r?r+"":null}if(i){for(var o=[],a=0;a=0&&i.push(e[o])}return i.join(" ")}var bT=function(t){function e(e,n,i,r){var o=t.call(this)||this;return o.updateData(e,n,i,r),o}return o(e,t),e.prototype._createSymbol=function(t,e,n,i,r){this.removeAll();var o=v_(t,-1,-1,2,2,null,r);o.attr({z2:100,culling:!0,scaleX:i[0]/2,scaleY:i[1]/2}),o.drift=wT,this._symbolType=t,this.add(o)},e.prototype.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(null,t)},e.prototype.getSymbolType=function(){return this._symbolType},e.prototype.getSymbolPath=function(){return this.childAt(0)},e.prototype.highlight=function(){vc(this.childAt(0))},e.prototype.downplay=function(){yc(this.childAt(0))},e.prototype.setZ=function(t,e){var n=this.childAt(0);n.zlevel=t,n.z=e},e.prototype.setDraggable=function(t,e){var n=this.childAt(0);n.draggable=t,n.cursor=!e&&t?"move":n.cursor},e.prototype.updateData=function(t,n,i,r){this.silent=!1;var o=t.getItemVisual(n,"symbol")||"circle",a=t.hostModel,s=e.getSymbolSize(t,n),l=o!==this._symbolType,u=r&&r.disableAnimation;if(l){var c=t.getItemVisual(n,"symbolKeepAspect");this._createSymbol(o,t,n,s,c)}else{var h=this.childAt(0);h.silent=!1;var d={scaleX:s[0]/2,scaleY:s[1]/2};u?h.attr(d):$c(h,d,a,n),nh(h)}if(this._updateCommon(t,n,s,i,r),l){h=this.childAt(0);if(!u){d={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:h.style.opacity}};h.scaleX=h.scaleY=0,h.style.opacity=0,Kc(h,d,a,n)}}u&&this.childAt(0).stopAnimation("leave")},e.prototype._updateCommon=function(t,e,n,i,r){var o,a,s,l,u,c,h,d,p,f=this.childAt(0),g=t.hostModel;if(i&&(o=i.emphasisItemStyle,a=i.blurItemStyle,s=i.selectItemStyle,l=i.focus,u=i.blurScope,h=i.labelStatesModels,d=i.hoverScale,p=i.cursorStyle,c=i.emphasisDisabled),!i||t.hasItemOption){var v=i&&i.itemModel?i.itemModel:t.getItemModel(e),y=v.getModel("emphasis");o=y.getModel("itemStyle").getItemStyle(),s=v.getModel(["select","itemStyle"]).getItemStyle(),a=v.getModel(["blur","itemStyle"]).getItemStyle(),l=y.get("focus"),u=y.get("blurScope"),c=y.get("disabled"),h=lh(v),d=y.getShallow("scale"),p=v.getShallow("cursor")}var m=t.getItemVisual(e,"symbolRotate");f.attr("rotation",(m||0)*Math.PI/180||0);var x=m_(t.getItemVisual(e,"symbolOffset"),n);x&&(f.x=x[0],f.y=x[1]),p&&f.attr("cursor",p);var _=t.getItemVisual(e,"style"),b=_.fill;if(f instanceof iu){var w=f.style;f.useStyle(z({image:w.image,x:w.x,y:w.y,width:w.width,height:w.height},_))}else f.__isEmptyBrush?f.useStyle(z({},_)):f.useStyle(_),f.style.decal=null,f.setColor(b,r&&r.symbolInnerColor),f.style.strokeNoScale=!0;var S=t.getItemVisual(e,"liftZ"),M=this._z2;null!=S?null==M&&(this._z2=f.z2,f.z2+=S):null!=M&&(f.z2=M,this._z2=null);var I=r&&r.useNameLabel;function T(e){return I?t.getName(e):xT(t,e)}sh(f,h,{labelFetcher:g,labelDataIndex:e,defaultText:T,inheritColor:b,defaultOpacity:_.opacity}),this._sizeX=n[0]/2,this._sizeY=n[1]/2;var C=f.ensureState("emphasis");if(C.style=o,f.ensureState("select").style=s,f.ensureState("blur").style=a,d){var A=Math.max(nt(d)?d:1.1,3/this._sizeY);C.scaleX=this._sizeX*A,C.scaleY=this._sizeY*A}this.setSymbolScale(1),Ec(this,l,u,c)},e.prototype.setSymbolScale=function(t){this.scaleX=this.scaleY=t},e.prototype.fadeOut=function(t,e,n){var i=this.childAt(0),r=Lu(this).dataIndex,o=n&&n.animation;if(this.silent=i.silent=!0,n&&n.fadeLabel){var a=i.getTextContent();a&&Qc(a,{style:{opacity:0}},e,{dataIndex:r,removeOpt:o,cb:function(){i.removeTextContent()}})}else i.removeTextContent();Qc(i,{style:{opacity:0},scaleX:0,scaleY:0},e,{dataIndex:r,cb:t,removeOpt:o})},e.getSymbolSize=function(t,e){return y_(t.getItemVisual(e,"symbolSize"))},e}(Lo);function wT(t,e){this.parent.drift(t,e)}const ST=bT;function MT(t,e,n,i){return e&&!isNaN(e[0])&&!isNaN(e[1])&&!(i.isIgnore&&i.isIgnore(n))&&!(i.clipShape&&!i.clipShape.contain(e[0],e[1]))&&"none"!==t.getItemVisual(n,"symbol")}function IT(t){return null==t||it(t)||(t={isIgnore:t}),t||{}}function TT(t){var e=t.hostModel,n=e.getModel("emphasis");return{emphasisItemStyle:n.getModel("itemStyle").getItemStyle(),blurItemStyle:e.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:e.getModel(["select","itemStyle"]).getItemStyle(),focus:n.get("focus"),blurScope:n.get("blurScope"),emphasisDisabled:n.get("disabled"),hoverScale:n.get("scale"),labelStatesModels:lh(e),cursorStyle:e.get("cursor")}}var CT=function(){function t(t){this.group=new Lo,this._SymbolCtor=t||ST}return t.prototype.updateData=function(t,e){this._progressiveEls=null,e=IT(e);var n=this.group,i=t.hostModel,r=this._data,o=this._SymbolCtor,a=e.disableAnimation,s=TT(t),l={disableAnimation:a},u=e.getSymbolPoint||function(e){return t.getItemLayout(e)};r||n.removeAll(),t.diff(r).add((function(i){var r=u(i);if(MT(t,r,i,e)){var a=new o(t,i,s,l);a.setPosition(r),t.setItemGraphicEl(i,a),n.add(a)}})).update((function(c,h){var d=r.getItemGraphicEl(h),p=u(c);if(MT(t,p,c,e)){var f=t.getItemVisual(c,"symbol")||"circle",g=d&&d.getSymbolType&&d.getSymbolType();if(!d||g&&g!==f)n.remove(d),d=new o(t,c,s,l),d.setPosition(p);else{d.updateData(t,c,s,l);var v={x:p[0],y:p[1]};a?d.attr(v):$c(d,v,i)}n.add(d),t.setItemGraphicEl(c,d)}else n.remove(d)})).remove((function(t){var e=r.getItemGraphicEl(t);e&&e.fadeOut((function(){n.remove(e)}),i)})).execute(),this._getSymbolPoint=u,this._data=t},t.prototype.updateLayout=function(){var t=this,e=this._data;e&&e.eachItemGraphicEl((function(e,n){var i=t._getSymbolPoint(n);e.setPosition(i),e.markRedraw()}))},t.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=TT(t),this._data=null,this.group.removeAll()},t.prototype.incrementalUpdate=function(t,e,n){function i(t){t.isGroup||(t.incremental=!0,t.ensureState("emphasis").hoverLayer=!0)}this._progressiveEls=[],n=IT(n);for(var r=t.start;r0?n=i[0]:i[1]<0&&(n=i[1]),n}function LT(t,e,n,i){var r=NaN;t.stacked&&(r=n.get(n.getCalculationInfo("stackedOverDimension"),i)),isNaN(r)&&(r=t.valueStart);var o=t.baseDataOffset,a=[];return a[o]=n.get(t.baseDim,i),a[1-o]=r,e.dataToPoint(a)}var PT="undefined"!==typeof Float32Array,OT=PT?Float32Array:Array;function RT(t){return J(t)?PT?new Float32Array(t):t:new OT(t)}function ET(t,e){var n=[];return e.diff(t).add((function(t){n.push({cmd:"+",idx:t})})).update((function(t,e){n.push({cmd:"=",idx:e,idx1:t})})).remove((function(t){n.push({cmd:"-",idx:t})})).execute(),n}function NT(t,e,n,i,r,o,a,s){for(var l=ET(t,e),u=[],c=[],h=[],d=[],p=[],f=[],g=[],v=kT(r,e,a),y=t.getLayout("points")||[],m=e.getLayout("points")||[],x=0;x=r||g<0)break;if(VT(y,m)){if(l){g+=o;continue}break}if(g===n)t[o>0?"moveTo":"lineTo"](y,m),h=y,d=m;else{var x=y-u,_=m-c;if(x*x+_*_<.5){g+=o;continue}if(a>0){var b=g+o,w=e[2*b],S=e[2*b+1];while(w===y&&S===m&&v=i||VT(w,S))p=y,f=m;else{T=w-u,C=S-c;var D=y-u,L=w-y,P=m-c,O=S-m,R=void 0,E=void 0;if("x"===s){R=Math.abs(D),E=Math.abs(L);var N=T>0?1:-1;p=y-N*R*a,f=m,A=y+N*E*a,k=m}else if("y"===s){R=Math.abs(P),E=Math.abs(O);var z=C>0?1:-1;p=y,f=m-z*R*a,A=y,k=m+z*E*a}else R=Math.sqrt(D*D+P*P),E=Math.sqrt(L*L+O*O),I=E/(E+R),p=y-T*a*(1-I),f=m-C*a*(1-I),A=y+T*a*I,k=m+C*a*I,A=zT(A,BT(w,y)),k=zT(k,BT(S,m)),A=BT(A,zT(w,y)),k=BT(k,zT(S,m)),T=A-y,C=k-m,p=y-T*R/E,f=m-C*R/E,p=zT(p,BT(u,y)),f=zT(f,BT(c,m)),p=BT(p,zT(u,y)),f=BT(f,zT(c,m)),T=y-p,C=m-f,A=y+T*E/R,k=m+C*E/R}t.bezierCurveTo(h,d,p,f,y,m),h=A,d=k}else t.lineTo(y,m)}u=y,c=m,g+=o}return v}var HT=function(){function t(){this.smooth=0,this.smoothConstraint=!0}return t}(),GT=function(t){function e(e){var n=t.call(this,e)||this;return n.type="ec-polyline",n}return o(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new HT},e.prototype.buildPath=function(t,e){var n=e.points,i=0,r=n.length/2;if(e.connectNulls){for(;r>0;r--)if(!VT(n[2*r-2],n[2*r-1]))break;for(;i=0){var m=s?(d-i)*y+i:(h-n)*y+n;return s?[t,m]:[m,t]}n=h,i=d;break;case a.C:h=o[u++],d=o[u++],p=o[u++],f=o[u++],g=o[u++],v=o[u++];var x=s?xn(n,h,p,g,t,l):xn(i,d,f,v,t,l);if(x>0)for(var _=0;_=0){m=s?yn(i,d,f,v,b):yn(n,h,p,g,b);return s?[t,m]:[m,t]}}n=g,i=v;break}}},e}(Xl),WT=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e}(HT),qT=function(t){function e(e){var n=t.call(this,e)||this;return n.type="ec-polygon",n}return o(e,t),e.prototype.getDefaultShape=function(){return new WT},e.prototype.buildPath=function(t,e){var n=e.points,i=e.stackedOnPoints,r=0,o=n.length/2,a=e.smoothMonotone;if(e.connectNulls){for(;o>0;o--)if(!VT(n[2*o-2],n[2*o-1]))break;for(;re){i?r.push(a(i,l,e)):n&&r.push(a(n,l,0),a(n,l,e));break}n&&(r.push(a(n,l,0)),n=null),r.push(l),i=l}}return r}function nC(t,e,n){var i=t.getVisual("visualMeta");if(i&&i.length&&t.count()&&"cartesian2d"===e.type){for(var r,o,a=i.length-1;a>=0;a--){var s=t.getDimensionInfo(i[a].dimension);if(r=s&&s.coordDim,"x"===r||"y"===r){o=i[a];break}}if(o){var l=e.getAxis(r),u=q(o.stops,(function(t){return{coord:l.toGlobalCoord(l.dataToCoord(t.value)),color:t.color}})),c=u.length,h=o.outerColors.slice();c&&u[0].coord>u[c-1].coord&&(u.reverse(),h.reverse());var d=eC(u,"x"===r?n.getWidth():n.getHeight()),p=d.length;if(!p&&c)return u[0].coord<0?h[1]?h[1]:u[c-1].color:h[0]?h[0]:u[0].color;var f=10,g=d[0].coord-f,v=d[p-1].coord+f,y=v-g;if(y<.001)return"transparent";W(d,(function(t){t.offset=(t.coord-g)/y})),d.push({offset:p?d[p-1].offset:.5,color:h[1]||"transparent"}),d.unshift({offset:p?d[0].offset:.5,color:h[0]||"transparent"});var m=new rm(0,0,0,0,d,!0);return m[r]=g,m[r+"2"]=v,m}}}function iC(t,e,n){var i=t.get("showAllSymbol"),r="auto"===i;if(!i||r){var o=n.getAxesByScale("ordinal")[0];if(o&&(!r||!rC(o,e))){var a=e.mapDimension(o.dim),s={};return W(o.getViewLabels(),(function(t){var e=o.scale.getRawOrdinalNumber(t.tickValue);s[e]=1})),function(t){return!s.hasOwnProperty(e.get(a,t))}}}}function rC(t,e){var n=t.getExtent(),i=Math.abs(n[1]-n[0])/t.scale.count();isNaN(i)&&(i=0);for(var r=e.count(),o=Math.max(1,Math.round(r/5)),a=0;ai)return!1;return!0}function oC(t,e){return isNaN(t)||isNaN(e)}function aC(t){for(var e=t.length/2;e>0;e--)if(!oC(t[2*e-2],t[2*e-1]))break;return e-1}function sC(t,e){return[t[2*e],t[2*e+1]]}function lC(t,e,n){for(var i,r,o=t.length/2,a="x"===n?0:1,s=0,l=-1,u=0;u=e||i>=e&&r<=e){l=u;break}s=u,i=r}else i=r;return{range:[s,l],t:(e-i)/(r-i)}}function uC(t){if(t.get(["endLabel","show"]))return!0;for(var e=0;e0&&"bolder"===t.get(["emphasis","lineStyle","width"])){var R=p.getState("emphasis").style;R.lineWidth=+p.style.lineWidth+1}Lu(p).seriesIndex=t.seriesIndex,Ec(p,L,P,O);var E=JT(t.get("smooth")),N=t.get("smoothMonotone");if(p.setShape({smooth:E,smoothMonotone:N,connectNulls:w}),f){var z=a.getCalculationInfo("stackedOnSeries"),V=0;f.useStyle(B(l.getAreaStyle(),{fill:C,opacity:.7,lineJoin:"bevel",decal:a.getVisual("style").decal})),z&&(V=JT(z.get("smooth"))),f.setShape({smooth:E,stackedOnSmooth:V,smoothMonotone:N,connectNulls:w}),Vc(f,t,"areaStyle"),Lu(f).seriesIndex=t.seriesIndex,Ec(f,L,P,O)}var F=function(t){i._changePolyState(t)};a.eachItemGraphicEl((function(t){t&&(t.onHoverStateChange=F)})),this._polyline.onHoverStateChange=F,this._data=a,this._coordSys=r,this._stackedOnPoints=_,this._points=u,this._step=T,this._valueOrigin=m,t.get("triggerLineEvent")&&(this.packEventData(t,p),f&&this.packEventData(t,f))},e.prototype.packEventData=function(t,e){Lu(e).eventData={componentType:"series",componentSubType:"line",componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:"line"}},e.prototype.highlight=function(t,e,n,i){var r=t.getData(),o=Na(r,i);if(this._changePolyState("emphasis"),!(o instanceof Array)&&null!=o&&o>=0){var a=r.getLayout("points"),s=r.getItemGraphicEl(o);if(!s){var l=a[2*o],u=a[2*o+1];if(isNaN(l)||isNaN(u))return;if(this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(l,u))return;var c=t.get("zlevel"),h=t.get("z");s=new ST(r,o),s.x=l,s.y=u,s.setZ(c,h);var d=s.getSymbolPath().getTextContent();d&&(d.zlevel=c,d.z=h,d.z2=this._polyline.z2+1),s.__temp=!0,r.setItemGraphicEl(o,s),s.stopSymbolAnimation(!0),this.group.add(s)}s.highlight()}else nx.prototype.highlight.call(this,t,e,n,i)},e.prototype.downplay=function(t,e,n,i){var r=t.getData(),o=Na(r,i);if(this._changePolyState("normal"),null!=o&&o>=0){var a=r.getItemGraphicEl(o);a&&(a.__temp?(r.setItemGraphicEl(o,null),this.group.remove(a)):a.downplay())}else nx.prototype.downplay.call(this,t,e,n,i)},e.prototype._changePolyState=function(t){var e=this._polygon;sc(this._polyline,t),e&&sc(e,t)},e.prototype._newPolyline=function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new GT({shape:{points:t},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(e),this._polyline=e,e},e.prototype._newPolygon=function(t,e){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new qT({shape:{points:t,stackedOnPoints:e},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},e.prototype._initSymbolLabelAnimation=function(t,e,n){var i,r,o=e.getBaseAxis(),a=o.inverse;"cartesian2d"===e.type?(i=o.isHorizontal(),r=!1):"polar"===e.type&&(i="angle"===o.dim,r=!0);var s=t.hostModel,l=s.get("animationDuration");Q(l)&&(l=l(null));var u=s.get("animationDelay")||0,c=Q(u)?u(null):u;t.eachItemGraphicEl((function(t,o){var s=t;if(s){var h=[t.x,t.y],d=void 0,p=void 0,f=void 0;if(n)if(r){var g=n,v=e.pointToCoord(h);i?(d=g.startAngle,p=g.endAngle,f=-v[1]/180*Math.PI):(d=g.r0,p=g.r,f=v[0])}else{var y=n;i?(d=y.x,p=y.x+y.width,f=t.x):(d=y.y+y.height,p=y.y,f=t.y)}var m=p===d?0:(f-d)/(p-d);a&&(m=1-m);var x=Q(u)?u(o):l*m+c,_=s.getSymbolPath(),b=_.getTextContent();s.attr({scaleX:0,scaleY:0}),s.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:x}),b&&b.animateFrom({style:{opacity:0}},{duration:300,delay:x}),_.disableLabelAnimation=!0}}))},e.prototype._initOrUpdateEndLabel=function(t,e,n){var i=t.getModel("endLabel");if(uC(t)){var r=t.getData(),o=this._polyline,a=r.getLayout("points");if(!a)return o.removeTextContent(),void(this._endLabel=null);var s=this._endLabel;s||(s=this._endLabel=new Du({z2:200}),s.ignoreClip=!0,o.setTextContent(this._endLabel),o.disableLabelAnimation=!0);var l=aC(a);l>=0&&(sh(o,lh(t,"endLabel"),{inheritColor:n,labelFetcher:t,labelDataIndex:l,defaultText:function(t,e,n){return null!=n?_T(r,n):xT(r,t)},enableTextSetter:!0},hC(i,e)),o.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},e.prototype._endLabelOnDuring=function(t,e,n,i,r,o,a){var s=this._endLabel,l=this._polyline;if(s){t<1&&null==i.originalX&&(i.originalX=s.x,i.originalY=s.y);var u=n.getLayout("points"),c=n.hostModel,h=c.get("connectNulls"),d=o.get("precision"),p=o.get("distance")||0,f=a.getBaseAxis(),g=f.isHorizontal(),v=f.inverse,y=e.shape,m=v?g?y.x:y.y+y.height:g?y.x+y.width:y.y,x=(g?p:0)*(v?-1:1),_=(g?0:-p)*(v?-1:1),b=g?"x":"y",w=lC(u,m,b),S=w.range,M=S[1]-S[0],I=void 0;if(M>=1){if(M>1&&!h){var T=sC(u,S[0]);s.attr({x:T[0]+x,y:T[1]+_}),r&&(I=c.getRawValue(S[0]))}else{T=l.getPointOn(m,b);T&&s.attr({x:T[0]+x,y:T[1]+_});var C=c.getRawValue(S[0]),A=c.getRawValue(S[1]);r&&(I=Ya(n,d,C,A,w.t))}i.lastFrameIndex=S[0]}else{var k=1===t||i.lastFrameIndex>0?S[0]:0;T=sC(u,k);r&&(I=c.getRawValue(k)),s.attr({x:T[0]+x,y:T[1]+_})}r&&mh(s).setLabelText(I)}},e.prototype._doUpdateAnimation=function(t,e,n,i,r,o,a){var s=this._polyline,l=this._polygon,u=t.hostModel,c=NT(this._data,t,this._stackedOnPoints,e,this._coordSys,n,this._valueOrigin,o),h=c.current,d=c.stackedOnCurrent,p=c.next,f=c.stackedOnNext;if(r&&(h=tC(c.current,n,r,a),d=tC(c.stackedOnCurrent,n,r,a),p=tC(c.next,n,r,a),f=tC(c.stackedOnNext,n,r,a)),KT(h,p)>3e3||l&&KT(d,f)>3e3)return s.stopAnimation(),s.setShape({points:p}),void(l&&(l.stopAnimation(),l.setShape({points:p,stackedOnPoints:f})));s.shape.__points=c.current,s.shape.points=h;var g={shape:{points:p}};c.current!==h&&(g.shape.__points=c.next),s.stopAnimation(),$c(s,g,u),l&&(l.setShape({points:h,stackedOnPoints:d}),l.stopAnimation(),$c(l,{shape:{stackedOnPoints:f}},u),s.shape.points!==l.shape.points&&(l.shape.points=s.shape.points));for(var v=[],y=c.status,m=0;me&&(e=t[n]);return isFinite(e)?e:NaN},min:function(t){for(var e=1/0,n=0;n10&&"cartesian2d"===o.type&&r){var s=o.getBaseAxis(),l=o.getOtherAxis(s),u=s.getExtent(),c=n.getDevicePixelRatio(),h=Math.abs(u[1]-u[0])*(c||1),d=Math.round(a/h);if(isFinite(d)&&d>1){"lttb"===r&&t.setData(i.lttbDownSample(i.mapDimension(l.dim),1/d));var p=void 0;tt(r)?p=gC[r]:Q(r)&&(p=r),p&&t.setData(i.downSample(i.mapDimension(l.dim),1/d,p,vC))}}}}}function mC(t){t.registerChartView(pC),t.registerSeriesModel(mT),t.registerLayout(fC("line",!0)),t.registerVisual({seriesType:"line",reset:function(t){var e=t.getData(),n=t.getModel("lineStyle").getLineStyle();n&&!n.stroke&&(n.stroke=e.getVisual("style").fill),e.setVisual("legendLineStyle",n)}}),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,yC("line"))}var xC="__ec_stack_";function _C(t){return t.get("stack")||xC+t.seriesIndex}function bC(t){return t.dim+t.index}function wC(t){var e=[],n=t.axis,i="axis0";if("category"===n.type){for(var r=n.getBandWidth(),o=0;o0&&(o=null===o?s:Math.min(o,s))}n[i]=o}}return n}function IC(t){var e=MC(t),n=[];return W(t,(function(t){var i,r=t.coordinateSystem,o=r.getBaseAxis(),a=o.getExtent();if("category"===o.type)i=o.getBandWidth();else if("value"===o.type||"time"===o.type){var s=o.dim+"_"+o.index,l=e[s],u=Math.abs(a[1]-a[0]),c=o.scale.getExtent(),h=Math.abs(c[1]-c[0]);i=l?u/h*l:u}else{var d=t.getData();i=Math.abs(a[1]-a[0])/d.count()}var p=Wo(t.get("barWidth"),i),f=Wo(t.get("barMaxWidth"),i),g=Wo(t.get("barMinWidth")||(LC(t)?.5:1),i),v=t.get("barGap"),y=t.get("barCategoryGap");n.push({bandWidth:i,barWidth:p,barMaxWidth:f,barMinWidth:g,barGap:v,barCategoryGap:y,axisKey:bC(o),stackId:_C(t)})})),TC(n)}function TC(t){var e={};W(t,(function(t,n){var i=t.axisKey,r=t.bandWidth,o=e[i]||{bandWidth:r,remainedWidth:r,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},a=o.stacks;e[i]=o;var s=t.stackId;a[s]||o.autoWidthCount++,a[s]=a[s]||{width:0,maxWidth:0};var l=t.barWidth;l&&!a[s].width&&(a[s].width=l,l=Math.min(o.remainedWidth,l),o.remainedWidth-=l);var u=t.barMaxWidth;u&&(a[s].maxWidth=u);var c=t.barMinWidth;c&&(a[s].minWidth=c);var h=t.barGap;null!=h&&(o.gap=h);var d=t.barCategoryGap;null!=d&&(o.categoryGap=d)}));var n={};return W(e,(function(t,e){n[e]={};var i=t.stacks,r=t.bandWidth,o=t.categoryGap;if(null==o){var a=Y(i).length;o=Math.max(35-4*a,15)+"%"}var s=Wo(o,r),l=Wo(t.gap,1),u=t.remainedWidth,c=t.autoWidthCount,h=(u-s)/(c+(c-1)*l);h=Math.max(h,0),W(i,(function(t){var e=t.maxWidth,n=t.minWidth;if(t.width){i=t.width;e&&(i=Math.min(i,e)),n&&(i=Math.max(i,n)),t.width=i,u-=i+l*i,c--}else{var i=h;e&&ei&&(i=n),i!==h&&(t.width=i,u-=i+l*i,c--)}})),h=(u-s)/(c+(c-1)*l),h=Math.max(h,0);var d,p=0;W(i,(function(t,e){t.width||(t.width=h),d=t,p+=t.width*(1+l)})),d&&(p-=d.width*l);var f=-p/2;W(i,(function(t,i){n[e][i]=n[e][i]||{bandWidth:r,offset:f,width:t.width},f+=t.width*(1+l)}))})),n}function CC(t,e,n){if(t&&e){var i=t[bC(e)];return null!=i&&null!=n?i[_C(n)]:i}}function AC(t,e){var n=SC(t,e),i=IC(n);W(n,(function(t){var e=t.getData(),n=t.coordinateSystem,r=n.getBaseAxis(),o=_C(t),a=i[bC(r)][o],s=a.offset,l=a.width;e.setLayout({bandWidth:a.bandWidth,offset:s,size:l})}))}function kC(t){return{seriesType:t,plan:Nv(),reset:function(t){if(DC(t)){var e=t.getData(),n=t.coordinateSystem,i=n.getBaseAxis(),r=n.getOtherAxis(i),o=e.getDimensionIndex(e.mapDimension(r.dim)),a=e.getDimensionIndex(e.mapDimension(i.dim)),s=t.get("showBackground",!0),l=e.mapDimension(r.dim),u=e.getCalculationInfo("stackResultDimension"),c=uT(e,l)&&!!e.getCalculationInfo("stackedOnSeries"),h=r.isHorizontal(),d=PC(i,r),p=LC(t),f=t.get("barMinHeight")||0,g=u&&e.getDimensionIndex(u),v=e.getLayout("size"),y=e.getLayout("offset");return{progress:function(t,e){var i,r=t.count,l=p&&RT(3*r),u=p&&s&&RT(3*r),m=p&&RT(r),x=n.master.getRect(),_=h?x.width:x.height,b=e.getStore(),w=0;while(null!=(i=t.next())){var S=b.get(c?g:o,i),M=b.get(a,i),I=d,T=void 0;c&&(T=+S-b.get(o,i));var C=void 0,A=void 0,k=void 0,D=void 0;if(h){var L=n.dataToPoint([S,M]);if(c){var P=n.dataToPoint([T,M]);I=P[0]}C=I,A=L[1]+y,k=L[0]-I,D=v,Math.abs(k)t&&(t=e),t},e.prototype.brushSelector=function(t,e,n){return n.rect(e.getItemLayout(t))},e.type="series.bar",e.dependencies=["grid","polar"],e.defaultOption=Bh(RC.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:"#212121"}},realtimeSort:!1}),e}(RC);const NC=EC;var zC=function(){function t(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0}return t}(),BC=function(t){function e(e){var n=t.call(this,e)||this;return n.type="sausage",n}return o(e,t),e.prototype.getDefaultShape=function(){return new zC},e.prototype.buildPath=function(t,e){var n=e.cx,i=e.cy,r=Math.max(e.r0||0,0),o=Math.max(e.r,0),a=.5*(o-r),s=r+a,l=e.startAngle,u=e.endAngle,c=e.clockwise,h=2*Math.PI,d=c?u-lMath.PI/2&&c<1.5*Math.PI&&(c-=Math.PI),t.setTextConfig({rotation:c})}}function GC(t,e,n){return e*Math.sin(t)*(n?-1:1)}function WC(t,e,n){return e*Math.cos(t)*(n?1:-1)}var qC=Math.max,UC=Math.min;function jC(t,e){var n=t.getArea&&t.getArea();if(YT(t,"cartesian2d")){var i=t.getBaseAxis();if("category"!==i.type||!i.onBand){var r=e.getLayout("bandWidth");i.isHorizontal()?(n.x-=r,n.width+=2*r):(n.y-=r,n.height+=2*r)}}return n}var ZC=function(t){function e(){var n=t.call(this)||this;return n.type=e.type,n._isFirstFrame=!0,n}return o(e,t),e.prototype.render=function(t,e,n,i){this._model=t,this._removeOnRenderedListener(n),this._updateDrawMode(t);var r=t.get("coordinateSystem");("cartesian2d"===r||"polar"===r)&&(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(t,e,n):this._renderNormal(t,e,n,i))},e.prototype.incrementalPrepareRender=function(t){this._clear(),this._updateDrawMode(t),this._updateLargeClip(t)},e.prototype.incrementalRender=function(t,e){this._progressiveEls=[],this._incrementalRenderLarge(t,e)},e.prototype.eachRendered=function(t){Zm(this._progressiveEls||this.group,t)},e.prototype._updateDrawMode=function(t){var e=t.pipelineContext.large;null!=this._isLargeDraw&&e===this._isLargeDraw||(this._isLargeDraw=e,this._clear())},e.prototype._renderNormal=function(t,e,n,i){var r,o=this.group,a=t.getData(),s=this._data,l=t.coordinateSystem,u=l.getBaseAxis();"cartesian2d"===l.type?r=u.isHorizontal():"polar"===l.type&&(r="angle"===u.dim);var c=t.isAnimationEnabled()?t:null,h=$C(t,l);h&&this._enableRealtimeSort(h,a,n);var d=t.get("clip",!0)||h,p=jC(l,a);o.removeClipPath();var f=t.get("roundCap",!0),g=t.get("showBackground",!0),v=t.getModel("backgroundStyle"),y=v.get("borderRadius")||0,m=[],x=this._backgroundEls,_=i&&i.isInitSort,b=i&&"changeAxisOrder"===i.type;function w(t){var e=nA[l.type](a,t),n=pA(l,r,e);return n.useStyle(v.getItemStyle()),"cartesian2d"===l.type&&n.setShape("r",y),m[t]=n,n}a.diff(s).add((function(e){var n=a.getItemModel(e),i=nA[l.type](a,e,n);if(g&&w(e),a.hasValue(e)&&eA[l.type](i)){var s=!1;d&&(s=YC[l.type](p,i));var v=XC[l.type](t,a,e,i,r,c,u.model,!1,f);h&&(v.forceLabelAnimation=!0),oA(v,a,e,n,i,t,r,"polar"===l.type),_?v.attr({shape:i}):h?KC(h,c,v,i,e,r,!1,!1):Kc(v,{shape:i},t,e),a.setItemGraphicEl(e,v),o.add(v),v.ignore=s}})).update((function(e,n){var i=a.getItemModel(e),S=nA[l.type](a,e,i);if(g){var M=void 0;0===x.length?M=w(n):(M=x[n],M.useStyle(v.getItemStyle()),"cartesian2d"===l.type&&M.setShape("r",y),m[e]=M);var I=nA[l.type](a,e),T=dA(r,I,l);$c(M,{shape:T},c,e)}var C=s.getItemGraphicEl(n);if(a.hasValue(e)&&eA[l.type](S)){var A=!1;if(d&&(A=YC[l.type](p,S),A&&o.remove(C)),C?nh(C):C=XC[l.type](t,a,e,S,r,c,u.model,!!C,f),h&&(C.forceLabelAnimation=!0),b){var k=C.getTextContent();if(k){var D=mh(k);null!=D.prevValue&&(D.prevValue=D.value)}}else oA(C,a,e,i,S,t,r,"polar"===l.type);_?C.attr({shape:S}):h?KC(h,c,C,S,e,r,!0,b):$c(C,{shape:S},t,e,null),a.setItemGraphicEl(e,C),C.ignore=A,o.add(C)}else o.remove(C)})).remove((function(e){var n=s.getItemGraphicEl(e);n&&eh(n,t,e)})).execute();var S=this._backgroundGroup||(this._backgroundGroup=new Lo);S.removeAll();for(var M=0;Mo)return!0;o=u}return!1},e.prototype._isOrderDifferentInView=function(t,e){for(var n=e.scale,i=n.getExtent(),r=Math.max(0,i[0]),o=Math.min(i[1],n.getOrdinalMeta().categories.length-1);r<=o;++r)if(t.ordinalNumbers[r]!==n.getRawOrdinalNumber(r))return!0},e.prototype._updateSortWithinSameData=function(t,e,n,i){if(this._isOrderChangedWithinSameData(t,e,n)){var r=this._dataSort(t,n,e);this._isOrderDifferentInView(r,n)&&(this._removeOnRenderedListener(i),i.dispatchAction({type:"changeAxisOrder",componentType:n.dim+"Axis",axisId:n.index,sortInfo:r}))}},e.prototype._dispatchInitSort=function(t,e,n){var i=e.baseAxis,r=this._dataSort(t,i,(function(n){return t.get(t.mapDimension(e.otherAxis.dim),n)}));n.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",isInitSort:!0,axisId:i.index,sortInfo:r})},e.prototype.remove=function(t,e){this._clear(this._model),this._removeOnRenderedListener(e)},e.prototype.dispose=function(t,e){this._removeOnRenderedListener(e)},e.prototype._removeOnRenderedListener=function(t){this._onRendered&&(t.getZr().off("rendered",this._onRendered),this._onRendered=null)},e.prototype._clear=function(t){var e=this.group,n=this._data;t&&t.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl((function(e){eh(e,t,Lu(e).dataIndex)}))):e.removeAll(),this._data=null,this._isFirstFrame=!0},e.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},e.type="bar",e}(nx),YC={cartesian2d:function(t,e){var n=e.width<0?-1:1,i=e.height<0?-1:1;n<0&&(e.x+=e.width,e.width=-e.width),i<0&&(e.y+=e.height,e.height=-e.height);var r=t.x+t.width,o=t.y+t.height,a=qC(e.x,t.x),s=UC(e.x+e.width,r),l=qC(e.y,t.y),u=UC(e.y+e.height,o),c=sr?s:a,e.y=h&&l>o?u:l,e.width=c?0:s-a,e.height=h?0:u-l,n<0&&(e.x+=e.width,e.width=-e.width),i<0&&(e.y+=e.height,e.height=-e.height),c||h},polar:function(t,e){var n=e.r0<=e.r?1:-1;if(n<0){var i=e.r;e.r=e.r0,e.r0=i}var r=UC(e.r,t.r),o=qC(e.r0,t.r0);e.r=r,e.r0=o;var a=r-o<0;if(n<0){i=e.r;e.r=e.r0,e.r0=i}return a}},XC={cartesian2d:function(t,e,n,i,r,o,a,s,l){var u=new du({shape:z({},i),z2:1});if(u.__dataIndex=n,u.name="item",o){var c=u.shape,h=r?"height":"width";c[h]=0}return u},polar:function(t,e,n,i,r,o,a,s,l){var u=!r&&l?VC:ky,c=new u({shape:i,z2:1});c.name="item";var h=rA(r);if(c.calculateTextPosition=FC(h,{isRoundCap:u===VC}),o){var d=c.shape,p=r?"r":"endAngle",f={};d[p]=r?0:i.startAngle,f[p]=i[p],(s?$c:Kc)(c,{shape:f},o)}return c}};function $C(t,e){var n=t.get("realtimeSort",!0),i=e.getBaseAxis();if(n&&"category"===i.type&&"cartesian2d"===e.type)return{baseAxis:i,otherAxis:e.getOtherAxis(i)}}function KC(t,e,n,i,r,o,a,s){var l,u;o?(u={x:i.x,width:i.width},l={y:i.y,height:i.height}):(u={y:i.y,height:i.height},l={x:i.x,width:i.width}),s||(a?$c:Kc)(n,{shape:l},e,r,null);var c=e?t.baseAxis.model:null;(a?$c:Kc)(n,{shape:u},c,r)}function JC(t,e){for(var n=0;n0?1:-1,a=i.height>0?1:-1;return{x:i.x+o*r/2,y:i.y+a*r/2,width:i.width-o*r,height:i.height-a*r}},polar:function(t,e,n){var i=t.getItemLayout(e);return{cx:i.cx,cy:i.cy,r0:i.r0,r:i.r,startAngle:i.startAngle,endAngle:i.endAngle,clockwise:i.clockwise}}};function iA(t){return null!=t.startAngle&&null!=t.endAngle&&t.startAngle===t.endAngle}function rA(t){return function(t){var e=t?"Arc":"Angle";return function(t){switch(t){case"start":case"insideStart":case"end":case"insideEnd":return t+e;default:return t}}}(t)}function oA(t,e,n,i,r,o,a,s){var l=e.getItemVisual(n,"style");s||t.setShape("r",i.get(["itemStyle","borderRadius"])||0),t.useStyle(l);var u=i.getShallow("cursor");u&&t.attr("cursor",u);var c=s?a?r.r>=r.r0?"endArc":"startArc":r.endAngle>=r.startAngle?"endAngle":"startAngle":a?r.height>=0?"bottom":"top":r.width>=0?"right":"left",h=lh(i);sh(t,h,{labelFetcher:o,labelDataIndex:n,defaultText:xT(o.getData(),n),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:c});var d=t.getTextContent();if(s&&d){var p=i.get(["label","position"]);t.textConfig.inside="middle"===p||null,HC(t,"outside"===p?c:p,rA(a),i.get(["label","rotate"]))}xh(d,h,o.getRawValue(n),(function(t){return _T(e,t)}));var f=i.getModel(["emphasis"]);Ec(t,f.get("focus"),f.get("blurScope"),f.get("disabled")),Vc(t,i),iA(r)&&(t.style.fill="none",t.style.stroke="none",W(t.states,(function(t){t.style&&(t.style.fill=t.style.stroke="none")})))}function aA(t,e){var n=t.get(["itemStyle","borderColor"]);if(!n||"none"===n)return 0;var i=t.get(["itemStyle","borderWidth"])||0,r=isNaN(e.width)?Number.MAX_VALUE:Math.abs(e.width),o=isNaN(e.height)?Number.MAX_VALUE:Math.abs(e.height);return Math.min(i,r,o)}var sA=function(){function t(){}return t}(),lA=function(t){function e(e){var n=t.call(this,e)||this;return n.type="largeBar",n}return o(e,t),e.prototype.getDefaultShape=function(){return new sA},e.prototype.buildPath=function(t,e){for(var n=e.points,i=this.baseDimIdx,r=1-this.baseDimIdx,o=[],a=[],s=this.barWidth,l=0;l=0?n:null}),30,!1);function hA(t,e,n){for(var i=t.baseDimIdx,r=1-i,o=t.shape.points,a=t.largeDataIndices,s=[],l=[],u=t.barWidth,c=0,h=o.length/3;c=s[0]&&e<=s[0]+l[0]&&n>=s[1]&&n<=s[1]+l[1])return a[c]}return-1}function dA(t,e,n){if(YT(n,"cartesian2d")){var i=e,r=n.getArea();return{x:t?i.x:r.x,y:t?r.y:i.y,width:t?i.width:r.width,height:t?r.height:i.height}}r=n.getArea();var o=e;return{cx:r.cx,cy:r.cy,r0:t?r.r0:o.r0,r:t?r.r:o.r,startAngle:t?o.startAngle:0,endAngle:t?o.endAngle:2*Math.PI}}function pA(t,e,n){var i="polar"===t.type?ky:du;return new i({shape:dA(e,n,t),silent:!0,z2:0})}const fA=ZC;function gA(t){t.registerChartView(fA),t.registerSeriesModel(NC),t.registerLayout(t.PRIORITY.VISUAL.LAYOUT,K(AC,"bar")),t.registerLayout(t.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,kC("bar")),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,yC("bar")),t.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},(function(t,e){var n=t.componentType||"series";e.eachComponent({mainType:n,query:t},(function(e){t.sortInfo&&e.axis.setCategorySortInfo(t.sortInfo)}))}))}var vA=2*Math.PI,yA=Math.PI/180;function mA(t,e){return Xd(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function xA(t,e){var n=mA(t,e),i=t.get("center"),r=t.get("radius");J(r)||(r=[0,r]),J(i)||(i=[i,i]);var o=Wo(n.width,e.getWidth()),a=Wo(n.height,e.getHeight()),s=Math.min(o,a),l=Wo(i[0],o)+n.x,u=Wo(i[1],a)+n.y,c=Wo(r[0],s/2),h=Wo(r[1],s/2);return{cx:l,cy:u,r0:c,r:h}}function _A(t,e,n){e.eachSeriesByType(t,(function(t){var e=t.getData(),i=e.mapDimension("value"),r=mA(t,n),o=xA(t,n),a=o.cx,s=o.cy,l=o.r,u=o.r0,c=-t.get("startAngle")*yA,h=t.get("minAngle")*yA,d=0;e.each(i,(function(t){!isNaN(t)&&d++}));var p=e.getSum(i),f=Math.PI/(p||d)*2,g=t.get("clockwise"),v=t.get("roseType"),y=t.get("stillShowZeroSum"),m=e.getDataExtent(i);m[0]=0;var x=vA,_=0,b=c,w=g?1:-1;if(e.setLayout({viewRect:r,r:l}),e.each(i,(function(t,n){var i;if(isNaN(t))e.setItemLayout(n,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:g,cx:a,cy:s,r0:u,r:v?NaN:l});else{i="area"!==v?0===p&&y?f:t*f:vA/d,in?a:o,c=Math.abs(l.label.y-n);if(c>=u.maxY){var h=l.label.x-e-l.len2*r,d=i+l.len,f=Math.abs(h)t.unconstrainedWidth?null:p:null;i.setStyle("width",f)}var g=i.getBoundingRect();o.width=g.width;var v=(i.style.margin||0)+2.1;o.height=g.height+v,o.y-=(o.height-h)/2}}}function TA(t){return"center"===t.position}function CA(t){var e,n,i=t.getData(),r=[],o=!1,a=(t.get("minShowLabelAngle")||0)*wA,s=i.getLayout("viewRect"),l=i.getLayout("r"),u=s.width,c=s.x,h=s.y,d=s.height;function p(t){t.ignore=!0}function f(t){if(!t.ignore)return!0;for(var e in t.states)if(!1===t.states[e].ignore)return!0;return!1}i.each((function(t){var s=i.getItemGraphicEl(t),h=s.shape,d=s.getTextContent(),g=s.getTextGuideLine(),v=i.getItemModel(t),y=v.getModel("label"),m=y.get("position")||v.get(["emphasis","label","position"]),x=y.get("distanceToLabelLine"),_=y.get("alignTo"),b=Wo(y.get("edgeDistance"),u),w=y.get("bleedMargin"),S=v.getModel("labelLine"),M=S.get("length");M=Wo(M,u);var I=S.get("length2");if(I=Wo(I,u),Math.abs(h.endAngle-h.startAngle)0?"right":"left":L>0?"left":"right"}var F=Math.PI,H=0,G=y.get("rotate");if(nt(G))H=G*(F/180);else if("center"===m)H=0;else if("radial"===G||!0===G){var q=L<0?-D+F:-D;H=q}else if("tangential"===G&&"outside"!==m&&"outer"!==m){var U=Math.atan2(L,P);U<0&&(U=2*F+U);var j=P>0;j&&(U=F+U),H=U-F}if(o=!!H,d.x=T,d.y=C,d.rotation=H,d.setStyle({verticalAlign:"middle"}),O){d.setStyle({align:k});var Z=d.states.select;Z&&(Z.x+=d.x,Z.y+=d.y)}else{var Y=d.getBoundingRect().clone();Y.applyTransform(d.getComputedTransform());var X=(d.style.margin||0)+2.1;Y.y-=X/2,Y.height+=X,r.push({label:d,labelLine:g,position:m,len:M,len2:I,minTurnAngle:S.get("minTurnAngle"),maxSurfaceAngle:S.get("maxSurfaceAngle"),surfaceNormal:new Xr(L,P),linePoints:A,textAlign:k,labelDistance:x,labelAlignTo:_,edgeDistance:b,bleedMargin:w,rect:Y,unconstrainedWidth:Y.width,labelStyleWidth:d.style.width})}s.setTextConfig({inside:O})}})),!o&&t.get("avoidLabelOverlap")&&MA(r,e,n,l,u,d,c,h);for(var g=0;g0){for(var l=o.getItemLayout(0),u=1;isNaN(l&&l.startAngle)&&u=i.r0}},e.type="pie",e}(nx);const LA=DA;function PA(t,e,n){e=J(e)&&{coordDimensions:e}||z({encodeDefine:t.getEncode()},e);var i=t.getSource(),r=QI(i,e).dimensions,o=new JI(r,t);return o.initData(i,n),o}var OA=function(){function t(t,e){this._getDataWithEncodedVisual=t,this._getRawData=e}return t.prototype.getAllNames=function(){var t=this._getRawData();return t.mapArray(t.getName)},t.prototype.containName=function(t){var e=this._getRawData();return e.indexOfName(t)>=0},t.prototype.indexOfName=function(t){var e=this._getDataWithEncodedVisual();return e.indexOfName(t)},t.prototype.getItemVisual=function(t,e){var n=this._getDataWithEncodedVisual();return n.getItemVisual(t,e)},t}();const RA=OA;var EA=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.init=function(e){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new RA($(this.getData,this),$(this.getRawData,this)),this._defaultLabelLine(e)},e.prototype.mergeOption=function(){t.prototype.mergeOption.apply(this,arguments)},e.prototype.getInitialData=function(){return PA(this,{coordDimensions:["value"],encodeDefaulter:K(wp,this)})},e.prototype.getDataParams=function(e){var n=this.getData(),i=t.prototype.getDataParams.call(this,e),r=[];return n.each(n.mapDimension("value"),(function(t){r.push(t)})),i.percent=Xo(r,e,n.hostModel.get("percentPrecision")),i.$vars.push("percent"),i},e.prototype._defaultLabelLine=function(t){va(t,"labelLine",["show"]);var e=t.labelLine,n=t.emphasis.labelLine;e.show=e.show&&t.label.show,n.show=n.show&&t.emphasis.label.show},e.type="series.pie",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},e}(Ov);const NA=EA;function zA(t){return{seriesType:t,reset:function(t,e){var n=t.getData();n.filterSelf((function(t){var e=n.mapDimension("value"),i=n.get(e,t);return!(nt(i)&&!isNaN(i)&&i<0)}))}}}function BA(t){t.registerChartView(LA),t.registerSeriesModel(NA),Qx("pie",t.registerAction),t.registerLayout(K(_A,"pie")),t.registerProcessor(bA("pie")),t.registerProcessor(zA("pie"))}var VA=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.hasSymbolVisual=!0,n}return o(e,t),e.prototype.getInitialData=function(t,e){return vT(null,this,{useEncodeDefaulter:!0})},e.prototype.getProgressive=function(){var t=this.option.progressive;return null==t?this.option.large?5e3:this.get("progressive"):t},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?1e4:this.get("progressiveThreshold"):t},e.prototype.brushSelector=function(t,e,n){return n.point(e.getItemLayout(t))},e.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},e.type="series.scatter",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:"#212121"}},universalTransition:{divideShape:"clone"}},e}(Ov);const FA=VA;var HA=4,GA=function(){function t(){}return t}(),WA=function(t){function e(e){var n=t.call(this,e)||this;return n._off=0,n.hoverDataIdx=-1,n}return o(e,t),e.prototype.getDefaultShape=function(){return new GA},e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.buildPath=function(t,e){var n,i=e.points,r=e.size,o=this.symbolProxy,a=o.shape,s=t.getContext?t.getContext():t,l=s&&r[0]=0;s--){var l=2*s,u=i[l]-o/2,c=i[l+1]-a/2;if(t>=u&&e>=c&&t<=u+o&&e<=c+a)return s}return-1},e.prototype.contain=function(t,e){var n=this.transformCoordToLocal(t,e),i=this.getBoundingRect();if(t=n[0],e=n[1],i.contain(t,e)){var r=this.hoverDataIdx=this.findDataIndex(t,e);return r>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var e=this.shape,n=e.points,i=e.size,r=i[0],o=i[1],a=1/0,s=1/0,l=-1/0,u=-1/0,c=0;c=0&&(l.dataIndex=n+(t.startIndex||0))}))},t.prototype.remove=function(){this._clear()},t.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},t}();const UA=qA;var jA=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return o(e,t),e.prototype.render=function(t,e,n){var i=t.getData(),r=this._updateSymbolDraw(i,t);r.updateData(i,{clipShape:this._getClipShape(t)}),this._finished=!0},e.prototype.incrementalPrepareRender=function(t,e,n){var i=t.getData(),r=this._updateSymbolDraw(i,t);r.incrementalPrepareUpdate(i),this._finished=!1},e.prototype.incrementalRender=function(t,e,n){this._symbolDraw.incrementalUpdate(t,e.getData(),{clipShape:this._getClipShape(e)}),this._finished=t.end===e.getData().count()},e.prototype.updateTransform=function(t,e,n){var i=t.getData();if(this.group.dirty(),!this._finished||i.count()>1e4)return{update:!0};var r=fC("").reset(t,e,n);r.progress&&r.progress({start:0,end:i.count(),count:i.count()},i),this._symbolDraw.updateLayout(i)},e.prototype.eachRendered=function(t){this._symbolDraw&&this._symbolDraw.eachRendered(t)},e.prototype._getClipShape=function(t){var e=t.coordinateSystem,n=e&&e.getArea&&e.getArea();return t.get("clip",!0)?n:null},e.prototype._updateSymbolDraw=function(t,e){var n=this._symbolDraw,i=e.pipelineContext,r=i.large;return n&&r===this._isLargeDraw||(n&&n.remove(),n=this._symbolDraw=r?new UA:new AT,this._isLargeDraw=r,this.group.removeAll()),this.group.add(n.group),n},e.prototype.remove=function(t,e){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},e.prototype.dispose=function(){},e.type="scatter",e}(nx);const ZA=jA;var YA=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.type="grid",e.dependencies=["xAxis","yAxis"],e.layoutMode="box",e.defaultOption={show:!1,z:0,left:"10%",top:60,right:"10%",bottom:70,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"},e}(op);const XA=YA;var $A=function(){function t(){}return t.prototype.getNeedCrossZero=function(){var t=this.option;return!t.scale},t.prototype.getCoordSysModel=function(){},t}(),KA=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",Ha).models[0]},e.type="cartesian2dAxis",e}(op);H(KA,$A);var JA={show:!0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#6E7079",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,lineStyle:{color:["#E0E6F1"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},QA=E({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},JA),tk=E({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#F4F7FD",width:1}}},JA),ek=E({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},tk),nk=B({logBase:10},tk);const ik={category:QA,value:tk,time:ek,log:nk};var rk=0,ok=function(){function t(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this.uid=++rk}return t.createByAxisModel=function(e){var n=e.option,i=n.data,r=i&&q(i,ak);return new t({categories:r,needCollect:!r,deduplication:!1!==n.dedplication})},t.prototype.getOrdinal=function(t){return this._getOrCreateMap().get(t)},t.prototype.parseAndCollect=function(t){var e,n=this._needCollect;if(!tt(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),null==e&&(n?(e=this.categories.length,this.categories[e]=t,i.set(t,e)):e=NaN),e},t.prototype._getOrCreateMap=function(){return this._map||(this._map=wt(this.categories))},t}();function ak(t){return it(t)&&null!=t.value?t.value:t+""}const sk=ok;var lk={value:1,category:1,time:1,log:1};function uk(t,e,n,i){W(lk,(function(r,a){var s=E(E({},ik[a],!0),i,!0),l=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e+"Axis."+a,n}return o(n,t),n.prototype.mergeDefaultAndTheme=function(t,e){var n=Jd(this),i=n?tp(t):{},r=e.getTheme();E(t,r.get(a+"Axis")),E(t,this.getDefaultOption()),t.type=ck(t),n&&Qd(t,i,n)},n.prototype.optionUpdated=function(){var t=this.option;"category"===t.type&&(this.__ordinalMeta=sk.createByAxisModel(this))},n.prototype.getCategories=function(t){var e=this.option;if("category"===e.type)return t?e.data:this.__ordinalMeta.categories},n.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},n.type=e+"Axis."+a,n.defaultOption=s,n}(n);t.registerComponentModel(l)})),t.registerSubTypeDefaulter(e+"Axis",ck)}function ck(t){return t.type||(t.data?"category":"value")}var hk=function(){function t(t){this._setting=t||{},this._extent=[1/0,-1/0]}return t.prototype.getSetting=function(t){return this._setting[t]},t.prototype.unionExtent=function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1])},t.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=t),isNaN(e)||(n[1]=e)},t.prototype.isInExtentRange=function(t){return this._extent[0]<=t&&this._extent[1]>=t},t.prototype.isBlank=function(){return this._isBlank},t.prototype.setBlank=function(t){this._isBlank=t},t}();ls(hk);const dk=hk;function pk(t){return"interval"===t.type||"log"===t.type}function fk(t,e,n,i){var r={},o=t[1]-t[0],a=r.interval=ra(o/e,!0);null!=n&&ai&&(a=r.interval=i);var s=r.intervalPrecision=vk(a),l=r.niceTickExtent=[qo(Math.ceil(t[0]/a)*a,s),qo(Math.floor(t[1]/a)*a,s)];return mk(l,t),r}function gk(t){var e=Math.pow(10,ia(t)),n=t/e;return n?2===n?n=3:3===n?n=5:n*=2:n=1,qo(n*e)}function vk(t){return jo(t)+2}function yk(t,e,n){t[e]=Math.max(Math.min(t[e],n[1]),n[0])}function mk(t,e){!isFinite(t[0])&&(t[0]=e[0]),!isFinite(t[1])&&(t[1]=e[1]),yk(t,0,e),yk(t,1,e),t[0]>t[1]&&(t[0]=t[1])}function xk(t,e){return t>=e[0]&&t<=e[1]}function _k(t,e){return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])}function bk(t,e){return t*(e[1]-e[0])+e[0]}var wk=function(t){function e(e){var n=t.call(this,e)||this;n.type="ordinal";var i=n.getSetting("ordinalMeta");return i||(i=new sk({})),J(i)&&(i=new sk({categories:q(i,(function(t){return it(t)?t.value:t}))})),n._ordinalMeta=i,n._extent=n.getSetting("extent")||[0,i.categories.length-1],n}return o(e,t),e.prototype.parse=function(t){return null==t?NaN:tt(t)?this._ordinalMeta.getOrdinal(t):Math.round(t)},e.prototype.contain=function(t){return t=this.parse(t),xk(t,this._extent)&&null!=this._ordinalMeta.categories[t]},e.prototype.normalize=function(t){return t=this._getTickNumber(this.parse(t)),_k(t,this._extent)},e.prototype.scale=function(t){return t=Math.round(bk(t,this._extent)),this.getRawOrdinalNumber(t)},e.prototype.getTicks=function(){var t=[],e=this._extent,n=e[0];while(n<=e[1])t.push({value:n}),n++;return t},e.prototype.getMinorTicks=function(t){},e.prototype.setSortInfo=function(t){if(null!=t){for(var e=t.ordinalNumbers,n=this._ordinalNumbersByTick=[],i=this._ticksByOrdinalNumber=[],r=0,o=this._ordinalMeta.categories.length,a=Math.min(o,e.length);r=0&&t=0&&t