C_){var G=Y_(m,L),U=Y_(y,L),X=P_(O,A,I,Y,i,G,h),Z=P_(T,D,C,j,i,U,h);t.moveTo(c+X.cx+X.x0,d+X.cy+X.y0),L0&&t.arc(c+X.cx,d+X.cy,G,D_(X.y0,X.x0),D_(X.y1,X.x1),!h),t.arc(c,d,i,D_(X.cy+X.y1,X.cx+X.x1),D_(Z.cy+Z.y1,Z.cx+Z.x1),!h),U>0&&t.arc(c+Z.cx,d+Z.cy,U,D_(Z.y1,Z.x1),D_(Z.y0,Z.x0),!h))}else t.moveTo(c+I,d+Y),t.arc(c,d,i,l,u,!h);else t.moveTo(c+I,d+Y);if(r>C_&&P)if(k>C_){G=Y_(_,k),U=Y_(g,k),X=P_(C,j,T,D,r,-U,h),Z=P_(I,Y,O,A,r,-G,h);t.lineTo(c+X.cx+X.x0,d+X.cy+X.y0),k0&&t.arc(c+X.cx,d+X.cy,U,D_(X.y0,X.x0),D_(X.y1,X.x1),!h),t.arc(c,d,r,D_(X.cy+X.y1,X.cx+X.x1),D_(Z.cy+Z.y1,Z.cx+Z.x1),h),G>0&&t.arc(c+Z.cx,d+Z.cy,G,D_(Z.y1,Z.x1),D_(Z.y0,Z.x0),!h))}else t.lineTo(c+C,d+j),t.arc(c,d,r,u,l,h);else t.lineTo(c+C,d+j)}else t.moveTo(c,d);t.closePath()}}}var N_=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}(),H_=function(t){function e(e){return t.call(this,e)||this}return f(e,t),e.prototype.getDefaultShape=function(){return new N_},e.prototype.buildPath=function(t,e){R_(t,e)},e.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},e}(ss);H_.prototype.type="sector";var z_=H_,B_=function(){function t(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return t}(),F_=function(t){function e(e){return t.call(this,e)||this}return f(e,t),e.prototype.getDefaultShape=function(){return new B_},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}(ss);F_.prototype.type="ring";var V_=F_;function W_(t,e,n,i){var r,a,o,s,l=[],u=[],c=[],d=[];if(i){o=[1/0,1/0],s=[-1/0,-1/0];for(var h=0,p=t.length;h=2){if(i){var a=W_(r,i,n,e.smoothConstraint);t.moveTo(r[0][0],r[0][1]);for(var o=r.length,s=0;s<(n?o:o-1);s++){var l=a[2*s],u=a[2*s+1],c=r[(s+1)%o];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 d=r.length;svg[1]){if(o=!1,r)return o;var u=Math.abs(vg[0]-yg[1]),c=Math.abs(yg[0]-vg[1]);Math.min(u,c)>i.len()&&(uMath.abs(a[1])?a[0]>0?"right":"left":a[1]>0?"bottom":"top"}function Ug(t){return!t.isGroup}function Xg(t){return null!=t.shape}function Zg(t,e,n){if(t&&e){var i=r(t);e.traverse((function(t){if(Ug(t)&&t.anid){var e=i[t.anid];if(e){var r=a(t);t.attr(a(e)),lu(t,r,n,Vs(t).dataIndex)}}}))}function r(t){var e={};return t.traverse((function(t){Ug(t)&&t.anid&&(e[t.anid]=t)})),e}function a(t){var e={x:t.x,y:t.y,rotation:t.rotation};return Xg(t)&&(e.shape=Object(g["extend"])({},t.shape)),e}}function qg(t,e){return Object(g["map"])(t,(function(t){var n=t[0];n=Tg(n,e.x),n=Dg(n,e.x+e.width);var i=t[1];return i=Tg(i,e.y),i=Dg(i,e.y+e.height),[n,i]}))}function Kg(t,e){var n=Tg(t.x,e.x),i=Dg(t.x+t.width,e.x+e.width),r=Tg(t.y,e.y),a=Dg(t.y+t.height,e.y+e.height);if(i>=n&&a>=r)return{x:n,y:r,width:i-n,height:a-r}}function Jg(t,e,n){var i=Object(g["extend"])({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),Object(g["defaults"])(r,n),new _s(i)):Pg(t.replace("path://",""),i,n,"center")}function $g(t,e,n,i,r){for(var a=0,o=r[r.length-1];a1)return!1;var g=tm(p,f,c,d)/h;return!(g<0||g>1)}function tm(t,e,n,i){return t*i-n*e}function em(t){return t<=1e-6&&t>=-1e-6}function nm(t){var e=t.itemTooltipOption,n=t.componentModel,i=t.itemName,r=Object(g["isString"])(e)?{formatter:e}:e,a=n.mainType,o=n.componentIndex,s={componentType:a,name:i,$vars:["name"]};s[a+"Index"]=o;var l=t.formatterParamsExtra;l&&Object(g["each"])(Object(g["keys"])(l),(function(t){Object(g["hasOwn"])(s,t)||(s[t]=l[t],s.$vars.push(t))}));var u=Vs(t.el);u.componentMainType=a,u.componentIndex=o,u.tooltipConfig={name:i,option:Object(g["defaults"])({content:i,formatterParams:s},r)}}function im(t,e){var n;t.isGroup&&(n=e(t)),n||t.traverse(e)}function rm(t,e){if(t)if(Object(g["isArray"])(t))for(var n=0;n=0?d():c=setTimeout(d,-r),l=i};return h.clear=function(){c&&(clearTimeout(c),c=null)},h.debounceNextCall=function(t){s=t},h}function ym(t,e,n,i){var r=t[e];if(r){var a=r[fm]||r,o=r[gm],s=r[_m];if(s!==n||o!==i){if(null==n||!i)return t[e]=a;r=t[e]=mm(a,n,"debounce"===i),r[fm]=a,r[gm]=i,r[_m]=n}return r}}function vm(t,e){var n=t[e];n&&n[fm]&&(n.clear&&n.clear(),t[e]=n[fm])}var bm=Zr(),xm={itemStyle:ba(Bu,!0),lineStyle:ba(Nu,!0)},wm={lineStyle:"stroke",itemStyle:"fill"};function Mm(t,e){var n=t.visualStyleMapper||xm[e];return n||(console.warn("Unkown style type '"+e+"'."),xm.itemStyle)}function Sm(t,e){var n=t.visualDrawType||wm[e];return n||(console.warn("Unkown style type '"+e+"'."),"fill")}var Lm={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var n=t.getData(),i=t.visualStyleAccessPath||"itemStyle",r=t.getModel(i),a=Mm(t,i),o=a(r),s=r.getShallow("decal");s&&(n.setVisual("decal",s),s.dirty=!0);var l=Sm(t,i),u=o[l],c=Object(g["isFunction"])(u)?u:null,d="auto"===o.fill||"auto"===o.stroke;if(!o[l]||c||d){var h=t.getColorFromPalette(t.name,null,e.getSeriesCount());o[l]||(o[l]=h,n.setVisual("colorFromPalette",!0)),o.fill="auto"===o.fill||Object(g["isFunction"])(o.fill)?h:o.fill,o.stroke="auto"===o.stroke||Object(g["isFunction"])(o.stroke)?h:o.stroke}if(n.setVisual("style",o),n.setVisual("drawType",l),!e.isSeriesFiltered(t)&&c)return n.setVisual("colorFromPalette",!1),{dataEach:function(e,n){var i=t.getDataParams(n),r=Object(g["extend"])({},o);r[l]=c(i),e.setItemVisual(n,"style",r)}}}},km=new Gu,Tm={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){if(!t.ignoreStyleOnData&&!e.isSeriesFiltered(t)){var n=t.getData(),i=t.visualStyleAccessPath||"itemStyle",r=Mm(t,i),a=n.getVisual("drawType");return{dataEach:n.hasItemOption?function(t,e){var n=t.getRawDataItem(e);if(n&&n[i]){km.option=n[i];var o=r(km),s=t.ensureUniqueItemVisual(e,"style");Object(g["extend"])(s,o),km.option.decal&&(t.setItemVisual(e,"decal",km.option.decal),km.option.decal.dirty=!0),a in o&&t.setItemVisual(e,"colorFromPalette",!1)}}:null}}}},Dm={performRawSeries:!0,overallReset:function(t){var e=Object(g["createHashMap"])();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)),bm(t).scope=r}})),t.eachSeries((function(e){if(!e.isColorBySeries()&&!t.isSeriesFiltered(e)){var n=e.getRawData(),i={},r=e.getData(),a=bm(e).scope,o=e.visualStyleAccessPath||"itemStyle",s=Sm(e,o);r.each((function(t){var e=r.getRawIndex(t);i[e]=t})),n.each((function(t){var o=i[t],l=r.getItemVisual(o,"colorFromPalette");if(l){var u=r.ensureUniqueItemVisual(o,"style"),c=n.getName(t)||t+"",d=n.count();u[s]=e.getColorFromPalette(c,a,d)}}))}}))}},Om=Math.PI;function Am(t,e){e=e||{},g["defaults"](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 Ri,i=new Ss({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});n.add(i);var r,a=new Fs({style:{text:e.text,fill:e.textColor,fontSize:e.fontSize,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontFamily:e.fontFamily},zlevel:e.zlevel,z:10001}),o=new Ss({style:{fill:"none"},textContent:a,textConfig:{position:"right",distance:10},zlevel:e.zlevel,z:10001});return n.add(o),e.showSpinner&&(r=new ug({shape:{startAngle:-Om/2,endAngle:-Om/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*Om/2}).start("circularInOut"),r.animateShape(!0).when(1e3,{startAngle:3*Om/2}).delay(300).start("circularInOut"),n.add(r)),n.resize=function(){var n=a.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}),o.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 Im=function(){function t(t,e,n,i){this._stageTaskMap=Object(g["createHashMap"])(),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,a=r?n.step:null,o=i&&i.modDataCount,s=null!=o?Math.ceil(o/a):null;return{step:a,modBy:s,modDataCount:o}}},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(),a=n.progressiveEnabled&&e.incrementalPrepareRender&&r>=n.threshold,o=t.get("large")&&r>=t.get("largeThreshold"),s="mod"===t.get("progressiveChunkMode")?r:null;t.pipelineContext=n.context={progressiveRender:a,modDataCount:s,large:o}},t.prototype.restorePipelines=function(t){var e=this,n=e._pipelineMap=Object(g["createHashMap"])();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;Object(g["each"])(this._allHandlers,(function(i){var r=t.get(i.uid)||t.set(i.uid,{}),a="";Object(g["assert"])(!(i.reset&&i.overallReset),a),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,a=r.context;a.model=e,a.ecModel=n,a.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,a=this;function o(t,e){return t.setDirty&&(!t.dirtyMap||t.dirtyMap.get(e.__pipeline.id))}Object(g["each"])(t,(function(t,s){if(!i.visualType||i.visualType===t.visualType){var l=a._stageTaskMap.get(t.uid),u=l.seriesTaskMap,c=l.overallTask;if(c){var d,h=c.agentStubMap;h.each((function(t){o(i,t)&&(t.dirty(),d=!0)})),d&&c.dirty(),a.updatePayload(c,n);var p=a.getPerformArgs(c,i.block);h.each((function(t){t.perform(p)})),c.perform(p)&&(r=!0)}else u&&u.each((function(s,l){o(i,s)&&s.dirty();var u=a.getPerformArgs(s,i.block);u.skip=!t.performRawSeries&&e.isSeriesFiltered(s.context.model),a.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,a=e.seriesTaskMap,o=e.seriesTaskMap=Object(g["createHashMap"])(),s=t.seriesType,l=t.getTargetSeries;function u(e){var s=e.uid,l=o.set(s,a&&a.get(s)||Sp({plan:Em,reset:Rm,count:zm}));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,a=e.overallTask=e.overallTask||Sp({reset:Ym});a.context={ecModel:n,api:i,overallReset:t.overallReset,scheduler:r};var o=a.agentStubMap,s=a.agentStubMap=Object(g["createHashMap"])(),l=t.seriesType,u=t.getTargetSeries,c=!0,d=!1,h="";function p(t){var e=t.uid,n=s.set(e,o&&o.get(e)||(d=!0,Sp({reset:Cm,onDirty:Pm})));n.context={model:t,overallProgress:c},n.agent=a,n.__block=c,r._pipe(t,n)}Object(g["assert"])(!t.createOnAllSeries,h),l?n.eachRawSeriesByType(l,p):u?u(n,i).each(p):(c=!1,Object(g["each"])(n.getSeries(),p)),d&&a.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 Object(g["isFunction"])(t)&&(t={overallReset:t,seriesType:Bm(t)}),t.uid=Xu("stageHandler"),e&&(t.visualType=e),t},t}();function Ym(t){t.overallReset(t.ecModel,t.api,t.payload)}function Cm(t){return t.overallProgress&&jm}function jm(){this.agent.dirty(),this.getDownstream().dirty()}function Pm(){this.agent&&this.agent.dirty()}function Em(t){return t.plan?t.plan(t.model,t.ecModel,t.api,t.payload):null}function Rm(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=kr(t.reset(t.model,t.ecModel,t.api,t.payload));return e.length>1?Object(g["map"])(e,(function(t,e){return Hm(e)})):Nm}var Nm=Hm(0);function Hm(t){return function(e,n){var i=n.data,r=n.resetDefines[t];if(r&&r.dataEach)for(var a=e.start;a0&&c===r.length-u.length){var d=r.slice(0,c);"data"!==d&&(e.mainType=d,e[u.toLowerCase()]=t,s=!0)}}o.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,a=n.model,o=n.view;if(!a||!o)return!0;var s=e.cptQuery,l=e.dataQuery;return u(s,a,"mainType")&&u(s,a,"subType")&&u(s,a,"index","componentIndex")&&u(s,a,"name")&&u(s,a,"id")&&u(l,r,"name")&&u(l,r,"dataIndex")&&u(l,r,"dataType")&&(!o.filterForExposedEvent||o.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}(),ny=["symbol","symbolSize","symbolRotate","symbolOffset"],iy=ny.concat(["symbolKeepAspect"]),ry={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={},a=!1,o=0;o=0&&Oy(l)?l:.5;var u=t.createRadialGradient(o,s,0,o,s,l);return u}function Yy(t,e,n){for(var i="radial"===e.type?Iy(t,e,n):Ay(t,e,n),r=e.colorStops,a=0;a0?"dashed"===t?[4*e,2*e]:"dotted"===t?[e]:Object(g["isNumber"])(t)?[t]:Object(g["isArray"])(t)?t:null:null}function Ry(t){var e=t.style,n=e.lineDash&&e.lineWidth>0&&Ey(e.lineDash,e.lineWidth),i=e.lineDashOffset;if(n){var r=e.strokeNoScale&&t.getLineScale?t.getLineScale():1;r&&1!==r&&(n=Object(g["map"])(n,(function(t){return t/r})),i/=r)}return[n,i]}var Ny=new Po(!0);function Hy(t){var e=t.stroke;return!(null==e||"none"===e||!(t.lineWidth>0))}function zy(t){return"string"===typeof t&&"none"!==t}function By(t){var e=t.fill;return null!=e&&"none"!==e}function Fy(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 Vy(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 Wy(t,e,n){var i=ka(e.image,e.__image,n);if(Da(i)){var r=t.createPattern(i,e.repeat||"repeat");if("function"===typeof DOMMatrix&&r&&r.setTransform){var a=new DOMMatrix;a.translateSelf(e.x||0,e.y||0),a.rotateSelf(0,0,(e.rotation||0)*g["RADIAN_TO_DEGREE"]),a.scaleSelf(e.scaleX||1,e.scaleY||1),r.setTransform(a)}return r}}function Gy(t,e,n,i){var r,a=Hy(n),o=By(n),s=n.strokePercent,l=s<1,u=!e.path;e.silent&&!l||!u||e.createPathProxy();var c=e.path||Ny,d=e.__dirty;if(!i){var h=n.fill,p=n.stroke,f=o&&!!h.colorStops,_=a&&!!p.colorStops,g=o&&!!h.image,m=a&&!!p.image,y=void 0,v=void 0,b=void 0,x=void 0,w=void 0;(f||_)&&(w=e.getBoundingRect()),f&&(y=d?Yy(t,h,w):e.__canvasFillGradient,e.__canvasFillGradient=y),_&&(v=d?Yy(t,p,w):e.__canvasStrokeGradient,e.__canvasStrokeGradient=v),g&&(b=d||!e.__canvasFillPattern?Wy(t,h,e):e.__canvasFillPattern,e.__canvasFillPattern=b),m&&(x=d||!e.__canvasStrokePattern?Wy(t,p,e):e.__canvasStrokePattern,e.__canvasStrokePattern=b),f?t.fillStyle=y:g&&(b?t.fillStyle=b:o=!1),_?t.strokeStyle=v:m&&(x?t.strokeStyle=x:a=!1)}var M,S,L=e.getGlobalScale();c.setScale(L[0],L[1],e.segmentIgnoreThreshold),t.setLineDash&&n.lineDash&&(r=Ry(e),M=r[0],S=r[1]);var k=!0;(u||d&pe)&&(c.setDPR(t.dpr),l?c.setContext(null):(c.setContext(t),k=!1),c.reset(),e.buildPath(c,e.shape,i),c.toStatic(),e.pathUpdated()),k&&c.rebuildPath(t,l?s:1),M&&(t.setLineDash(M),t.lineDashOffset=S),i||(n.strokeFirst?(a&&Vy(t,n),o&&Fy(t,n)):(o&&Fy(t,n),a&&Vy(t,n))),M&&t.setLineDash([])}function Uy(t,e,n){var i=e.__image=ka(n.image,e.__image,e,e.onload);if(i&&Da(i)){var r=n.x||0,a=n.y||0,o=e.getWidth(),s=e.getHeight(),l=i.width/i.height;if(null==o&&null!=s?o=s*l:null==s&&null!=o?s=o/l:null==o&&null==s&&(o=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,a,o,s)}else if(n.sx&&n.sy){u=n.sx,c=n.sy;var d=o-u,h=s-c;t.drawImage(i,u,c,d,h,r,a,o,s)}else t.drawImage(i,r,a,o,s)}}function Xy(t,e,n){var i,r=n.text;if(null!=r&&(r+=""),r){t.font=n.font||hi["a"],t.textAlign=n.textAlign,t.textBaseline=n.textBaseline;var a=void 0,o=void 0;t.setLineDash&&n.lineDash&&(i=Ry(e),a=i[0],o=i[1]),a&&(t.setLineDash(a),t.lineDashOffset=o),n.strokeFirst?(Hy(n)&&t.strokeText(r,n.x,n.y),By(n)&&t.fillText(r,n.x,n.y)):(By(n)&&t.fillText(r,n.x,n.y),Hy(n)&&t.strokeText(r,n.x,n.y)),a&&t.setLineDash([])}}var Zy=["shadowBlur","shadowOffsetX","shadowOffsetY"],qy=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function Ky(t,e,n,i,r){var a=!1;if(!i&&(n=n||{},e===n))return!1;if(i||e.opacity!==n.opacity){sv(t,r),a=!0;var o=Math.max(Math.min(e.opacity,1),0);t.globalAlpha=isNaN(o)?Ga.opacity:o}(i||e.blend!==n.blend)&&(a||(sv(t,r),a=!0),t.globalCompositeOperation=e.blend||Ga.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[Xv])if(this._disposed)Tb(this.id);else{var i,r,a;if(Object(g["isObject"])(e)&&(n=e.lazyUpdate,i=e.silent,r=e.replaceMerge,a=e.transition,e=e.notMerge),this[Xv]=!0,!this._model||e){var o=new bh(this._api),s=this._theme,l=this._model=new sh;l.scheduler=this._scheduler,l.ssr=this._ssr,l.init(null,null,null,s,this._locale,o)}this._model.setOption(t,{replaceMerge:r},Ib);var u={seriesTransition:a,optionChanged:!0};if(n)this[Zv]={silent:i,updateParams:u},this[Xv]=!1,this.getZr().wakeUp();else{try{rb(this),sb.update.call(this,null,u)}catch(c){throw this[Zv]=null,this[Xv]=!1,c}this._ssr||this._zr.flush(),this[Zv]=null,this[Xv]=!1,db.call(this,i),hb.call(this,i)}}},e.prototype.setTheme=function(){Jd("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||Tv&&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(_["a"].svgSupported){var t=this._zr,e=t.storage.getDisplayList();return Object(g["each"])(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;Object(g["each"])(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 a="svg"===this._zr.painter.getType()?this.getSvgDataURL():this.renderToCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return Object(g["each"])(i,(function(t){t.group.ignore=!1})),a}Tb(this.id)},e.prototype.getConnectedDataURL=function(t){if(!this._disposed){var e="svg"===t.type,n=this.group,i=Math.min,r=Math.max,a=1/0;if(Eb[n]){var o=a,s=a,l=-a,u=-a,c=[],d=t&&t.pixelRatio||this.getDevicePixelRatio();Object(g["each"])(Pb,(function(a,d){if(a.group===n){var h=e?a.getZr().painter.getSvgDom().innerHTML:a.renderToCanvas(Object(g["clone"])(t)),p=a.getDom().getBoundingClientRect();o=i(p.left,o),s=i(p.top,s),l=r(p.right,l),u=r(p.bottom,u),c.push({dom:h,left:p.left,top:p.top})}})),o*=d,s*=d,l*=d,u*=d;var h=l-o,p=u-s,f=hi["d"].createCanvas(),_=Vi(f,{renderer:e?"svg":"canvas"});if(_.resize({width:h,height:p}),e){var m="";return Object(g["each"])(c,(function(t){var e=t.left-o,n=t.top-s;m+=''+t.dom+""})),_.painter.getSvgRoot().innerHTML=m,t.connectedBackgroundColor&&_.painter.setBackgroundColor(t.connectedBackgroundColor),_.refreshImmediately(),_.painter.toDataURL()}return t.connectedBackgroundColor&&_.add(new Ss({shape:{x:0,y:0,width:h,height:p},style:{fill:t.connectedBackgroundColor}})),Object(g["each"])(c,(function(t){var e=new _s({style:{x:t.left*d-o,y:t.top*d-s,image:t.dom}});_.add(e)})),_.refreshImmediately(),f.toDataURL("image/"+(t&&t.type||"png"))}return this.getDataURL(t)}Tb(this.id)},e.prototype.convertToPixel=function(t,e){return lb(this,"convertToPixel",t,e)},e.prototype.convertFromPixel=function(t,e){return lb(this,"convertFromPixel",t,e)},e.prototype.containPixel=function(t,e){if(!this._disposed){var n,i=this._model,r=Kr(i,t);return Object(g["each"])(r,(function(t,i){i.indexOf("Models")>=0&&Object(g["each"])(t,(function(t){var r=t.coordinateSystem;if(r&&r.containPoint)n=n||!!r.containPoint(e);else if("seriesModels"===i){var a=this._chartsMap[t.__viewId];a&&a.containPoint&&(n=n||a.containPoint(e,t))}else 0}),this)}),this),!!n}Tb(this.id)},e.prototype.getVisual=function(t,e){var n=this._model,i=Kr(n,t,{defaultMainType:"series"}),r=i.seriesModel;var a=r.getData(),o=i.hasOwnProperty("dataIndexInside")?i.dataIndexInside:i.hasOwnProperty("dataIndex")?a.indexOfRawIndex(i.dataIndex):null;return null!=o?oy(a,o,e):sy(a,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;Object(g["each"])(kb,(function(e){var n=function(n){var i,r=t.getModel(),a=n.target,o="globalout"===e;if(o?i={}:a&&hy(a,(function(t){var e=Vs(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=Object(g["extend"])({},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:a,packedEvent:i,model:u,view:c},t.trigger(e,i)}};n.zrEventfulCallAtLast=!0,t._zr.on(e,n,t)})),Object(g["each"])(Ob,(function(e,n){t._messageCenter.on(n,(function(t){this.trigger(n,t)}),t)})),Object(g["each"])(["selectchanged"],(function(e){t._messageCenter.on(e,(function(t){this.trigger(e,t)}),t)})),dy(this._messageCenter,this,this._api)},e.prototype.isDisposed=function(){return this._disposed},e.prototype.clear=function(){this._disposed?Tb(this.id):this.setOption({series:[]},!0)},e.prototype.dispose=function(){if(this._disposed)Tb(this.id);else{this._disposed=!0;var t=this.getDom();t&&ea(this.getDom(),Hb,"");var e=this,n=e._api,i=e._model;Object(g["each"])(e._componentsViews,(function(t){t.dispose(i,n)})),Object(g["each"])(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 Pb[e.id]}},e.prototype.resize=function(t){if(!this[Xv])if(this._disposed)Tb(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[Zv]&&(null==i&&(i=this[Zv].silent),n=!0,this[Zv]=null),this[Xv]=!0;try{n&&rb(this),sb.update.call(this,{type:"resize",animation:Object(g["extend"])({duration:0},t&&t.animation)})}catch(r){throw this[Xv]=!1,r}this[Xv]=!1,db.call(this,i),hb.call(this,i)}}},e.prototype.showLoading=function(t,e){if(this._disposed)Tb(this.id);else if(Object(g["isObject"])(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),jb[t]){var n=jb[t](this._api,e),i=this._zr;this._loadingFX=n,i.add(n)}},e.prototype.hideLoading=function(){this._disposed?Tb(this.id):(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},e.prototype.makeActionFromEvent=function(t){var e=Object(g["extend"])({},t);return e.type=Ob[t.type],e},e.prototype.dispatchAction=function(t,e){if(this._disposed)Tb(this.id);else if(Object(g["isObject"])(e)||(e={silent:!!e}),Db[t.type]&&this._model)if(this[Xv])this._pendingActions.push(t);else{var n=e.silent;cb.call(this,t,n);var i=e.flush;i?this._zr.flush():!1!==i&&_["a"].browser.weChat&&this._throttledZrFlush(),db.call(this,n),hb.call(this,n)}},e.prototype.updateLabelLayout=function(){Mv.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},e.prototype.appendData=function(t){if(this._disposed)Tb(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 a=r.get("zlevel")||0,o=r.get("z")||0,s=r.getZLevelKey();i=i||!!s,("series"===t?n:e).push({zlevel:a,z:o,idx:r.componentIndex,type:t,key:s})})),i){var r,a,o=e.concat(n);ce(o,(function(t,e){return t.zlevel===e.zlevel?t.z-e.z:t.zlevel-e.zlevel})),Object(g["each"])(o,(function(e){var n=t.getComponent(e.type,e.idx),i=e.zlevel,o=e.key;null!=r&&(i=Math.max(r,i)),o?(i===r&&o!==a&&i++,a=o):a&&(i===r&&i++,a=""),r=i,n.setZLevel(i)}))}}function n(t){for(var e=[],n=t.currentStates,i=0;ie.get("hoverLayerThreshold")&&!_["a"].node&&!_["a"].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 o(t,n,i,-1/0),!0}))}}function o(t,e,n,i){var r=t.getTextContent(),a=t.getTextGuideLine(),s=t.isGroup;if(s)for(var l=t.childrenRef(),u=0;u0?{duration:a,delay:i.get("delay"),easing:i.get("easing")}:null;e.eachRendered((function(t){if(t.states&&t.states.emphasis){if(cu(t))return;if(t instanceof ss&&ru(t),t.__dirty){var e=t.prevStates;e&&t.useStates(e)}if(r){t.stateTransition=o;var i=t.getTextContent(),a=t.getTextGuideLine();i&&(i.stateTransition=o),a&&(a.stateTransition=o)}t.__dirty&&n(t)}}))}rb=function(t){var e=t._scheduler;e.restorePipelines(t._model),e.prepareStageTasks(),ab(t,!0),ab(t,!1),e.plan()},ab=function(t,e){for(var n=t._model,i=t._scheduler,r=e?t._componentsViews:t._chartsViews,a=e?t._componentsMap:t._chartsMap,o=t._zr,s=t._api,l=0;l=0)){rx.push(n);var a=Um.wrapStageHandler(n,r);a.__prio=e,a.__raw=n,t.push(a)}}function ox(t,e){jb[t]=e}function sx(t){Object(hi["e"])({createCanvas:t})}function lx(t,e,n){var i=kv("registerMap");i&&i(t,e,n)}function ux(t){var e=kv("getMap");return e&&e(t)}var cx=Fp;ix(Nv,Lm),ix(Bv,Tm),ix(Bv,Dm),ix(Nv,ry),ix(Bv,ay),ix(Gv,xv),Zb(Wh),qb(Yv,Gh),ox("default",Am),Qb({type:nl,event:nl,update:nl},g["noop"]),Qb({type:il,event:il,update:il},g["noop"]),Qb({type:rl,event:rl,update:rl},g["noop"]),Qb({type:al,event:al,update:al},g["noop"]),Qb({type:ol,event:ol,update:ol},g["noop"]),Xb("light",Zm),Xb("dark",ty);var dx={},hx=[],px={registerPreprocessor:Zb,registerProcessor:qb,registerPostInit:Kb,registerPostUpdate:Jb,registerUpdateLifecycle:$b,registerAction:Qb,registerCoordinateSystem:tx,registerLayout:nx,registerVisual:ix,registerTransform:cx,registerLoading:ox,registerMap:lx,registerImpl:Lv,PRIORITY:Uv,ComponentModel:gd,ComponentView:Uf,SeriesModel:Wf,ChartView:pm,registerComponentModel:function(t){gd.registerClass(t)},registerComponentView:function(t){Uf.registerClass(t)},registerSeriesModel:function(t){Wf.registerClass(t)},registerChartView:function(t){pm.registerClass(t)},registerSubTypeDefaulter:function(t,e){gd.registerSubTypeDefaulter(t,e)},registerPainter:function(t,e){Xi(t,e)}};function fx(t){Object(g["isArray"])(t)?Object(g["each"])(t,(function(t){fx(t)})):Object(g["indexOf"])(hx,t)>=0||(hx.push(t),Object(g["isFunction"])(t)&&(t={install:t}),t.install(px))}function _x(t){return null==t?0:t.length||1}function gx(t){return t}var mx=function(){function t(t,e,n,i,r,a){this._old=t,this._new=e,this._oldKeyGetter=n||gx,this._newKeyGetter=i||gx,this.context=r,this._diffModeMultiple="multiple"===a}return t.prototype.add=function(t){return this._add=t,this},t.prototype.update=function(t){return this._update=t,this},t.prototype.updateManyToOne=function(t){return this._updateManyToOne=t,this},t.prototype.updateOneToMany=function(t){return this._updateOneToMany=t,this},t.prototype.updateManyToMany=function(t){return this._updateManyToMany=t,this},t.prototype.remove=function(t){return this._remove=t,this},t.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},t.prototype._executeOneToOne=function(){var t=this._old,e=this._new,n={},i=new Array(t.length),r=new Array(e.length);this._initIndexMap(t,null,i,"_oldKeyGetter"),this._initIndexMap(e,n,r,"_newKeyGetter");for(var a=0;a1){var u=s.shift();1===s.length&&(n[o]=s[0]),this._update&&this._update(u,a)}else 1===l?(n[o]=null,this._update&&this._update(s,a)):this._remove&&this._remove(a)}this._performRestAdd(r,n)},t.prototype._executeMultiple=function(){var t=this._old,e=this._new,n={},i={},r=[],a=[];this._initIndexMap(t,n,r,"_oldKeyGetter"),this._initIndexMap(e,i,a,"_newKeyGetter");for(var o=0;o1&&1===d)this._updateManyToOne&&this._updateManyToOne(u,l),i[s]=null;else if(1===c&&d>1)this._updateOneToMany&&this._updateOneToMany(u,l),i[s]=null;else if(1===c&&1===d)this._update&&this._update(u,l),i[s]=null;else if(c>1&&d>1)this._updateManyToMany&&this._updateManyToMany(u,l),i[s]=null;else if(c>1)for(var h=0;h1)for(var o=0;o30}var Cx,jx,Px,Ex,Rx,Nx,Hx,zx=g["isObject"],Bx=g["map"],Fx="undefined"===typeof Int32Array?Array:Int32Array,Vx="e\0\0",Wx=-1,Gx=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],Ux=["_approximateExtent"],Xx=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;Ox(t)?(n=t.dimensions,this._dimOmitted=t.isDimensionOmitted(),this._schema=t):(i=!0,n=t),n=n||["x","y"];for(var r={},a=[],o={},s=!1,l={},u=0;u=e)){var n=this._store,i=n.getProvider();this._updateOrdinalMeta();var r=this._nameList,a=this._idList,o=i.getSource().sourceFormat,s=o===xd;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),g["isArray"](r)?r=r.slice():zx(r)&&(r=g["extend"]({},r)),i[e]=r),r},t.prototype.setItemVisual=function(t,e,n){var i=this._itemVisuals[t]||{};this._itemVisuals[t]=i,zx(e)?g["extend"](i,e):i[e]=n},t.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},t.prototype.setLayout=function(t,e){zx(t)?g["extend"](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?g["extend"](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;Ws(n,this.dataType,t,e),this._graphicEls[t]=e},t.prototype.getItemGraphicEl=function(t){return this._graphicEls[t]},t.prototype.eachItemGraphicEl=function(t,e){g["each"](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:Bx(this.dimensions,this._getDimInfo,this),this.hostModel)),Rx(e,this),e._store=this._store,e},t.prototype.wrapMethod=function(t,e){var n=this[t];g["isFunction"](n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var t=n.apply(this,arguments);return e.apply(this,[t].concat(g["slice"](arguments)))})},t.internalField=function(){Cx=function(t){var e=t._invertedIndicesMap;g["each"](e,(function(n,i){var r=t._dimInfos[i],a=r.ordinalMeta,o=t._store;if(a){n=e[i]=new Fx(a.categories.length);for(var s=0;s1&&(s+="__ec__"+u),i[e]=s}}}(),t}(),Zx=Xx;function qx(t,e){return Kx(t,e).dimensions}function Kx(t,e){Qh(t)||(t=ep(t)),e=e||{};var n=e.coordDimensions||[],i=e.dimensionsDefine||t.dimensionsDefine||[],r=Object(g["createHashMap"])(),a=[],o=$x(t,n,i,e.dimensionsCount),s=e.canOmitUnusedDimensions&&Yx(o),l=i===t.dimensionsDefine,u=l?Ix(t):Ax(i),c=e.encodeDefine;!c&&e.encodeDefaulter&&(c=e.encodeDefaulter(t,o));for(var d=Object(g["createHashMap"])(c),h=new Kp(o),p=0;p0&&(i.name=r+(a-1)),a++,e.set(r,a)}}function $x(t,e,n,i){var r=Math.max(t.dimensionsDetectedCount||1,e.length,n.length,i||0);return Object(g["each"])(e,(function(t){var e;Object(g["isObject"])(t)&&(e=t.dimsDef)&&(r=Math.max(r,e.length))})),r}function Qx(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 tw=function(){function t(t){this.coordSysDims=[],this.axisMap=Object(g["createHashMap"])(),this.categoryAxisMap=Object(g["createHashMap"])(),this.coordSysName=t}return t}();function ew(t){var e=t.get("coordinateSystem"),n=new tw(e),i=nw[e];if(i)return i(t,n,n.axisMap,n.categoryAxisMap),n}var nw={cartesian2d:function(t,e,n,i){var r=t.getReferringComponents("xAxis",$r).models[0],a=t.getReferringComponents("yAxis",$r).models[0];e.coordSysDims=["x","y"],n.set("x",r),n.set("y",a),iw(r)&&(i.set("x",r),e.firstCategoryDimIndex=0),iw(a)&&(i.set("y",a),null==e.firstCategoryDimIndex&&(e.firstCategoryDimIndex=1))},singleAxis:function(t,e,n,i){var r=t.getReferringComponents("singleAxis",$r).models[0];e.coordSysDims=["single"],n.set("single",r),iw(r)&&(i.set("single",r),e.firstCategoryDimIndex=0)},polar:function(t,e,n,i){var r=t.getReferringComponents("polar",$r).models[0],a=r.findAxisModel("radiusAxis"),o=r.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],n.set("radius",a),n.set("angle",o),iw(a)&&(i.set("radius",a),e.firstCategoryDimIndex=0),iw(o)&&(i.set("angle",o),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,a=r.getComponent("parallel",t.get("parallelIndex")),o=e.coordSysDims=a.dimensions.slice();Object(g["each"])(a.parallelAxisIndex,(function(t,a){var s=r.getComponent("parallelAxis",t),l=o[a];n.set(l,s),iw(s)&&(i.set(l,s),null==e.firstCategoryDimIndex&&(e.firstCategoryDimIndex=a))}))}};function iw(t){return"category"===t.get("type")}function rw(t,e,n){n=n||{};var i,r,a,o=n.byIndex,s=n.stackedCoordDimension;aw(e)?i=e:(r=e.schema,i=r.dimensions,a=e.store);var l,u,c,d,h=!(!t||!t.get("stack"));if(Object(g["each"])(i,(function(t,e){Object(g["isString"])(t)&&(i[e]=t={name:t}),h&&!t.isExtraCoord&&(o||l||!t.ordinalMeta||(l=t),u||"ordinal"===t.type||"time"===t.type||s&&s!==t.coordDim||(u=t))})),!u||o||l||(o=!0),u){c="__\0ecstackresult_"+t.id,d="__\0ecstackedover_"+t.id,l&&(l.createInvertedIndices=!0);var p=u.coordDim,f=u.type,_=0;Object(g["each"])(i,(function(t){t.coordDim===p&&_++}));var m={name:c,coordDim:p,coordDimIndex:_,type:f,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length},y={name:d,coordDim:d,coordDimIndex:_+1,type:f,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length+1};r?(a&&(m.storeDimIndex=a.ensureCalculationDimension(d,f),y.storeDimIndex=a.ensureCalculationDimension(c,f)),r.appendCalculationDimension(m),r.appendCalculationDimension(y)):(i.push(m),i.push(y))}return{stackedDimension:u&&u.name,stackedByDimension:l&&l.name,isStackedByIndex:o,stackedOverDimension:d,stackResultDimension:c}}function aw(t){return!Ox(t.schema)}function ow(t,e){return!!e&&e===t.getCalculationInfo("stackedDimension")}function sw(t,e){return ow(t,e)?t.getCalculationInfo("stackResultDimension"):e}function lw(t,e){var n,i=t.get("coordinateSystem"),r=ph.get(i);return e&&e.coordSysDims&&(n=g["map"](e.coordSysDims,(function(t){var n={name:t},i=e.axisMap.get(t);if(i){var r=i.get("type");n.type=wx(r)}return n}))),n||(n=r&&(r.getDimensionsInfo?r.getDimensionsInfo():r.dimensions.slice())||["x","y"]),n}function uw(t,e,n){var i,r;return n&&g["each"](t,(function(t,a){var o=t.coordDim,s=n.categoryAxisMap.get(o);s&&(null==i&&(i=a),t.ordinalMeta=s.getOrdinalMeta(),e&&(t.createInvertedIndices=!0)),null!=t.otherDims.itemName&&(r=!0)})),r||null==i||(t[i].otherDims.itemName=0),i}function cw(t,e,n){n=n||{};var i,r=e.getSourceManager(),a=!1;t?(a=!0,i=ep(t)):(i=r.getSource(),a=i.sourceFormat===xd);var o=ew(e),s=lw(e,o),l=n.useEncodeDefaulter,u=g["isFunction"](l)?l:l?g["curry"](Yd,s,e):null,c={coordDimensions:s,generateCoord:n.generateCoord,encodeDefine:e.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!a},d=Kx(i,c),h=uw(d.dimensions,n.createInvertedIndices,o),p=a?null:r.getSharedDataStore(d),f=rw(e,{schema:d,store:p}),_=new Zx(d,e);_.setCalculationInfo(f);var m=null!=h&&dw(i)?function(t,e,n,i){return i===h?n:this.defaultDimValueGetter(t,e,n,i)}:null;return _.hasItemOption=!1,_.initData(a?i:p,null,m),_}function dw(t){if(t.sourceFormat===xd){var e=hw(t.data||[]);return!g["isArray"](Or(e))}}function hw(t){var e=0;while(ee[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}();va(fw);var _w=fw,gw=0,mw=function(){function t(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this.uid=++gw}return t.createByAxisModel=function(e){var n=e.option,i=n.data,r=i&&Object(g["map"])(i,yw);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(!Object(g["isString"])(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=Object(g["createHashMap"])(this.categories))},t}();function yw(t){return Object(g["isObject"])(t)&&null!=t.value?t.value:t+""}var vw=mw;function bw(t){return"interval"===t.type||"log"===t.type}function xw(t,e,n,i){var r={},a=t[1]-t[0],o=r.interval=_r(a/e,!0);null!=n&&oi&&(o=r.interval=i);var s=r.intervalPrecision=Mw(o),l=r.niceTickExtent=[tr(Math.ceil(t[0]/o)*o,s),tr(Math.floor(t[1]/o)*o,s)];return Lw(l,t),r}function ww(t){var e=Math.pow(10,fr(t)),n=t/e;return n?2===n?n=3:3===n?n=5:n*=2:n=1,tr(n*e)}function Mw(t){return nr(t)+2}function Sw(t,e,n){t[e]=Math.max(Math.min(t[e],n[1]),n[0])}function Lw(t,e){!isFinite(t[0])&&(t[0]=e[0]),!isFinite(t[1])&&(t[1]=e[1]),Sw(t,0,e),Sw(t,1,e),t[0]>t[1]&&(t[0]=t[1])}function kw(t,e){return t>=e[0]&&t<=e[1]}function Tw(t,e){return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])}function Dw(t,e){return t*(e[1]-e[0])+e[0]}var Ow=function(t){function e(e){var n=t.call(this,e)||this;n.type="ordinal";var i=n.getSetting("ordinalMeta");return i||(i=new vw({})),Object(g["isArray"])(i)&&(i=new vw({categories:Object(g["map"])(i,(function(t){return Object(g["isObject"])(t)?t.value:t}))})),n._ordinalMeta=i,n._extent=n.getSetting("extent")||[0,i.categories.length-1],n}return f(e,t),e.prototype.parse=function(t){return null==t?NaN:Object(g["isString"])(t)?this._ordinalMeta.getOrdinal(t):Math.round(t)},e.prototype.contain=function(t){return t=this.parse(t),kw(t,this._extent)&&null!=this._ordinalMeta.categories[t]},e.prototype.normalize=function(t){return t=this._getTickNumber(this.parse(t)),Tw(t,this._extent)},e.prototype.scale=function(t){return t=Math.round(Dw(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,a=this._ordinalMeta.categories.length,o=Math.min(a,e.length);r=0&&t=0&&t=t},e.prototype.getOrdinalMeta=function(){return this._ordinalMeta},e.prototype.calcNiceTicks=function(){},e.prototype.calcNiceExtent=function(){},e.type="ordinal",e}(_w);_w.registerClass(Ow);var Aw=Ow,Iw=tr,Yw=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="interval",e._interval=0,e._intervalPrecision=2,e}return f(e,t),e.prototype.parse=function(t){return t},e.prototype.contain=function(t){return kw(t,this._extent)},e.prototype.normalize=function(t){return Tw(t,this._extent)},e.prototype.scale=function(t){return Dw(t,this._extent)},e.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=parseFloat(t)),isNaN(e)||(n[1]=parseFloat(e))},e.prototype.unionExtent=function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1]),this.setExtent(e[0],e[1])},e.prototype.getInterval=function(){return this._interval},e.prototype.setInterval=function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=Mw(t)},e.prototype.getTicks=function(t){var e=this._interval,n=this._extent,i=this._niceExtent,r=this._intervalPrecision,a=[];if(!e)return a;var o=1e4;n[0]o)return[]}var l=a.length?a[a.length-1].value:i[1];return n[1]>l&&(t?a.push({value:Iw(l+e,r)}):a.push({value:n[1]})),a},e.prototype.getMinorTicks=function(t){for(var e=this.getTicks(!0),n=[],i=this.getExtent(),r=1;ri[0]&&d0&&(a=null===a?s:Math.min(a,s))}n[i]=a}}return n}function Vw(t){var e=Fw(t),n=[];return Object(g["each"])(t,(function(t){var i,r=t.coordinateSystem,a=r.getBaseAxis(),o=a.getExtent();if("category"===a.type)i=a.getBandWidth();else if("value"===a.type||"time"===a.type){var s=a.dim+"_"+a.index,l=e[s],u=Math.abs(o[1]-o[0]),c=a.scale.getExtent(),d=Math.abs(c[1]-c[0]);i=l?u/d*l:u}else{var h=t.getData();i=Math.abs(o[1]-o[0])/h.count()}var p=Qi(t.get("barWidth"),i),f=Qi(t.get("barMaxWidth"),i),_=Qi(t.get("barMinWidth")||(qw(t)?.5:1),i),g=t.get("barGap"),m=t.get("barCategoryGap");n.push({bandWidth:i,barWidth:p,barMaxWidth:f,barMinWidth:_,barGap:g,barCategoryGap:m,axisKey:Hw(a),stackId:Nw(t)})})),Ww(n)}function Ww(t){var e={};Object(g["each"])(t,(function(t,n){var i=t.axisKey,r=t.bandWidth,a=e[i]||{bandWidth:r,remainedWidth:r,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},o=a.stacks;e[i]=a;var s=t.stackId;o[s]||a.autoWidthCount++,o[s]=o[s]||{width:0,maxWidth:0};var l=t.barWidth;l&&!o[s].width&&(o[s].width=l,l=Math.min(a.remainedWidth,l),a.remainedWidth-=l);var u=t.barMaxWidth;u&&(o[s].maxWidth=u);var c=t.barMinWidth;c&&(o[s].minWidth=c);var d=t.barGap;null!=d&&(a.gap=d);var h=t.barCategoryGap;null!=h&&(a.categoryGap=h)}));var n={};return Object(g["each"])(e,(function(t,e){n[e]={};var i=t.stacks,r=t.bandWidth,a=t.categoryGap;if(null==a){var o=Object(g["keys"])(i).length;a=Math.max(35-4*o,15)+"%"}var s=Qi(a,r),l=Qi(t.gap,1),u=t.remainedWidth,c=t.autoWidthCount,d=(u-s)/(c+(c-1)*l);d=Math.max(d,0),Object(g["each"])(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=d;e&&ei&&(i=n),i!==d&&(t.width=i,u-=i+l*i,c--)}})),d=(u-s)/(c+(c-1)*l),d=Math.max(d,0);var h,p=0;Object(g["each"])(i,(function(t,e){t.width||(t.width=d),h=t,p+=t.width*(1+l)})),h&&(p-=h.width*l);var f=-p/2;Object(g["each"])(i,(function(t,i){n[e][i]=n[e][i]||{bandWidth:r,offset:f,width:t.width},f+=t.width*(1+l)}))})),n}function Gw(t,e,n){if(t&&e){var i=t[Hw(e)];return null!=i&&null!=n?i[Nw(n)]:i}}function Uw(t,e){var n=Bw(t,e),i=Vw(n);Object(g["each"])(n,(function(t){var e=t.getData(),n=t.coordinateSystem,r=n.getBaseAxis(),a=Nw(t),o=i[Hw(r)][a],s=o.offset,l=o.width;e.setLayout({bandWidth:o.bandWidth,offset:s,size:l})}))}function Xw(t){return{seriesType:t,plan:Xf(),reset:function(t){if(Zw(t)){var e=t.getData(),n=t.coordinateSystem,i=n.getBaseAxis(),r=n.getOtherAxis(i),a=e.getDimensionIndex(e.mapDimension(r.dim)),o=e.getDimensionIndex(e.mapDimension(i.dim)),s=t.get("showBackground",!0),l=e.mapDimension(r.dim),u=e.getCalculationInfo("stackResultDimension"),c=ow(e,l)&&!!e.getCalculationInfo("stackedOnSeries"),d=r.isHorizontal(),h=Kw(i,r),p=qw(t),f=t.get("barMinHeight")||0,_=u&&e.getDimensionIndex(u),g=e.getLayout("size"),m=e.getLayout("offset");return{progress:function(t,e){var i,r=t.count,l=p&&Ew(3*r),u=p&&s&&Ew(3*r),y=p&&Ew(r),v=n.master.getRect(),b=d?v.width:v.height,x=e.getStore(),w=0;while(null!=(i=t.next())){var M=x.get(c?_:a,i),S=x.get(o,i),L=h,k=void 0;c&&(k=+M-x.get(a,i));var T=void 0,D=void 0,O=void 0,A=void 0;if(d){var I=n.dataToPoint([M,S]);if(c){var Y=n.dataToPoint([k,S]);L=Y[0]}T=L,D=I[1]+m,O=I[0]-L,A=g,Math.abs(O)>>1;t[r][1]n&&(this._approxInterval=n);var a=Qw.length,o=Math.min(Jw(Qw,this._approxInterval,0,a),a-1);this._interval=Qw[o][1],this._minLevelUnit=Qw[Math.max(o-1,0)][0]},e.prototype.parse=function(t){return Object(g["isNumber"])(t)?t:+hr(t)},e.prototype.contain=function(t){return kw(this.parse(t),this._extent)},e.prototype.normalize=function(t){return Tw(this.parse(t),this._extent)},e.prototype.scale=function(t){return Dw(t,this._extent)},e.type="time",e}(Cw),Qw=[["second",uc],["minute",cc],["hour",dc],["quarter-day",6*dc],["half-day",12*dc],["day",1.2*hc],["half-week",3.5*hc],["week",7*hc],["month",31*hc],["quarter",95*hc],["half-year",pc/2],["year",pc]];function tM(t,e,n,i){var r=hr(e),a=hr(n),o=function(t){return kc(r,t,i)===kc(a,t,i)},s=function(){return o("year")},l=function(){return s()&&o("month")},u=function(){return l()&&o("day")},c=function(){return u()&&o("hour")},d=function(){return c()&&o("minute")},h=function(){return d()&&o("second")},p=function(){return h()&&o("millisecond")};switch(t){case"year":return s();case"month":return l();case"day":return u();case"hour":return c();case"minute":return d();case"second":return h();case"millisecond":return p()}}function eM(t,e){return t/=hc,t>16?16:t>7.5?7:t>3.5?4:t>1.5?2:1}function nM(t){var e=30*hc;return t/=e,t>6?6:t>3?3:t>2?2:1}function iM(t){return t/=dc,t>12?12:t>6?6:t>3.5?4:t>2?2:1}function rM(t,e){return t/=e?cc:uc,t>30?30:t>20?20:t>15?15:t>10?10:t>5?5:t>2?2:1}function aM(t){return _r(t,!0)}function oM(t,e,n){var i=new Date(t);switch(bc(e)){case"year":case"month":i[Pc(n)](0);case"day":i[Ec(n)](1);case"hour":i[Rc(n)](0);case"minute":i[Nc(n)](0);case"second":i[Hc(n)](0),i[zc(n)](0)}return i.getTime()}function sM(t,e,n,i){var r=1e4,a=yc,o=0;function s(t,e,n,r,a,o,s){var l=new Date(e),u=e,c=l[r]();while(u1&&0===u&&a.unshift({value:a[0].value-h})}}for(u=0;u=i[0]&&v<=i[1]&&d++)}var b=(i[1]-i[0])/e;if(d>1.5*b&&h>b/1.5)break;if(u.push(m),d>b||t===a[p])break}c=[]}}}var x=Object(g["filter"])(Object(g["map"])(u,(function(t){return Object(g["filter"])(t,(function(t){return t.value>=i[0]&&t.value<=i[1]&&!t.notAdd}))})),(function(t){return t.length>0})),w=[],M=x.length-1;for(p=0;p0)i*=10;var a=[tr(pM(e[0]/i)*i),tr(hM(e[1]/i)*i)];this._interval=i,this._niceExtent=a}},e.prototype.calcNiceExtent=function(t){cM.calcNiceExtent.call(this,t),this._fixMin=t.fixMin,this._fixMax=t.fixMax},e.prototype.parse=function(t){return t},e.prototype.contain=function(t){return t=_M(t)/_M(this.base),kw(t,this._extent)},e.prototype.normalize=function(t){return t=_M(t)/_M(this.base),Tw(t,this._extent)},e.prototype.scale=function(t){return t=Dw(t,this._extent),fM(this.base,t)},e.type="log",e}(_w),mM=gM.prototype;function yM(t,e){return dM(t,nr(e))}mM.getMinorTicks=cM.getMinorTicks,mM.getLabel=cM.getLabel,_w.registerClass(gM);var vM=gM,bM=function(){function t(t,e,n){this._prepareParams(t,e,n)}return t.prototype._prepareParams=function(t,e,n){n[1]0&&s>0&&!l&&(o=0),o<0&&s<0&&!u&&(s=0));var d=this._determinedMin,h=this._determinedMax;return null!=d&&(o=d,l=!0),null!=h&&(s=h,u=!0),{min:o,max:s,minFixed:l,maxFixed:u,isBlank:c}},t.prototype.modifyDataMinMax=function(t,e){this[wM[t]]=e},t.prototype.setDeterminedMinMax=function(t,e){var n=xM[t];this[n]=e},t.prototype.freeze=function(){this.frozen=!0},t}(),xM={min:"_determinedMin",max:"_determinedMax"},wM={min:"_dataMin",max:"_dataMax"};function MM(t,e,n){var i=t.rawExtentInfo;return i||(i=new bM(t,e,n),t.rawExtentInfo=i,i)}function SM(t,e){return null==e?null:Object(g["eqNaN"])(e)?NaN:t.parse(e)}function LM(t,e){var n=t.type,i=MM(t,e,t.getExtent()).calculate();t.setBlank(i.isBlank);var r=i.min,a=i.max,o=e.ecModel;if(o&&"time"===n){var s=Bw("bar",o),l=!1;if(g["each"](s,(function(t){l=l||t.getBaseAxis()===e.axis})),l){var u=Vw(s),c=kM(r,a,e,u);r=c.min,a=c.max}}return{extent:[r,a],fixMin:i.minFixed,fixMax:i.maxFixed}}function kM(t,e,n,i){var r=n.axis.getExtent(),a=r[1]-r[0],o=Gw(i,n.axis);if(void 0===o)return{min:t,max:e};var s=1/0;g["each"](o,(function(t){s=Math.min(t.offset,s)}));var l=-1/0;g["each"](o,(function(t){l=Math.max(t.offset+t.width,l)})),s=Math.abs(s),l=Math.abs(l);var u=s+l,c=e-t,d=1-(s+l)/a,h=c/d-c;return e+=h*(l/u),t-=h*(s/u),{min:t,max:e}}function TM(t,e){var n=e,i=LM(t,n),r=i.extent,a=n.get("splitNumber");t instanceof vM&&(t.base=n.get("logBase"));var o=t.type,s=n.get("interval"),l="interval"===o||"time"===o;t.setExtent(r[0],r[1]),t.calcNiceExtent({splitNumber:a,fixMin:i.fixMin,fixMax:i.fixMax,minInterval:l?n.get("minInterval"):null,maxInterval:l?n.get("maxInterval"):null}),null!=s&&t.setInterval&&t.setInterval(s)}function DM(t,e){if(e=e||t.get("type"),e)switch(e){case"category":return new Aw({ordinalMeta:t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),extent:[1/0,-1/0]});case"time":return new lM({locale:t.ecModel.getLocaleModel(),useUTC:t.ecModel.get("useUTC")});default:return new(_w.getClass(e)||Cw)}}function OM(t){var e=t.scale.getExtent(),n=e[0],i=e[1];return!(n>0&&i>0||n<0&&i<0)}function AM(t){var e=t.getLabelModel().get("formatter"),n="category"===t.type?t.scale.getExtent()[0]:null;return"time"===t.scale.type?function(e){return function(n,i){return t.scale.getFormattedLabel(n,i,e)}}(e):g["isString"](e)?function(e){return function(n){var i=t.scale.getLabel(n),r=e.replace("{value}",null!=i?i:"");return r}}(e):g["isFunction"](e)?function(e){return function(i,r){return null!=n&&(r=i.value-n),e(IM(t,i),r,null!=i.level?{level:i.level}:null)}}(e):function(e){return t.scale.getLabel(e)}}function IM(t,e){return"category"===t.type?t.scale.getLabel(e):e.value}function YM(t){var e=t.model,n=t.scale;if(e.get(["axisLabel","show"])&&!n.isBlank()){var i,r,a=n.getExtent();n instanceof Aw?r=n.count():(i=n.getTicks(),r=i.length);var o,s=t.getLabelModel(),l=AM(t),u=1;r>40&&(u=Math.ceil(r/40));for(var c=0;ct[1]&&(t[1]=i[1])}))}var NM=function(){function t(){}return t.prototype.getNeedCrossZero=function(){var t=this.option;return!t.scale},t.prototype.getCoordSysModel=function(){},t}();function HM(t){return pw(null,t)}var zM={isDimensionStacked:ow,enableDataStack:rw,getStackedDimension:sw};function BM(t,e){var n=e;e instanceof Gu||(n=new Gu(e));var i=DM(n);return i.setExtent(t[0],t[1]),TM(i,n),i}function FM(t){g["mixin"](t,NM)}function VM(t,e){return e=e||{},xu(t,null,null,"normal"!==e.state)}var WM=1e-8;function GM(t,e){return Math.abs(t-e)n&&(t=r,n=o)}if(t)return KM(t.exterior);var s=this.getBoundingRect();return[s.x+s.width/2,s.y+s.height/2]},e.prototype.getBoundingRect=function(t){var e=this._rect;if(e&&!t)return e;var n=[1/0,1/0],i=[-1/0,-1/0],r=this.geometries;return Object(g["each"])(r,(function(e){"polygon"===e.type?qM(e.exterior,n,i,t):Object(g["each"])(e.points,(function(e){qM(e,n,i,t)}))})),isFinite(n[0])&&isFinite(n[1])&&isFinite(i[0])&&isFinite(i[1])||(n[0]=n[1]=i[0]=i[1]=0),e=new Ft(n[0],n[1],i[0]-n[0],i[1]-n[1]),t||(this._rect=e),e},e.prototype.contain=function(t){var e=this.getBoundingRect(),n=this.geometries;if(!e.contain(t[0],t[1]))return!1;t:for(var i=0,r=n.length;i>1^-(1&s),l=l>>1^-(1&l),s+=r,l+=a,r=s,a=l,i.push([s/n,l/n])}return i}function aS(t,e){return t=nS(t),g["map"](g["filter"](t.features,(function(t){return t.geometry&&t.properties&&t.geometry.coordinates.length>0})),(function(t){var n=t.properties,i=t.geometry,r=[];switch(i.type){case"Polygon":var a=i.coordinates;r.push(new $M(a[0],a.slice(1)));break;case"MultiPolygon":g["each"](i.coordinates,(function(t){t[0]&&r.push(new $M(t[0],t.slice(1)))}));break;case"LineString":r.push(new QM([i.coordinates]));break;case"MultiLineString":r.push(new QM(i.coordinates))}var o=new tS(n[e||"name"],r,n.cp);return o.properties=n,o}))}function oS(t,e,n,i,r,a,o,s){var l=new Fs({style:{text:t,font:e,align:n,verticalAlign:i,padding:r,rich:a,overflow:o?"truncate":null,lineHeight:s}});return l.getBoundingRect()}var sS=Zr();function lS(t){return"category"===t.type?cS(t):pS(t)}function uS(t,e){return"category"===t.type?hS(t,e):{ticks:g["map"](t.scale.getTicks(),(function(t){return t.value}))}}function cS(t){var e=t.getLabelModel(),n=dS(t,e);return!e.get("show")||t.scale.isBlank()?{labels:[],labelCategoryInterval:n.labelCategoryInterval}:n}function dS(t,e){var n,i,r=fS(t,"labels"),a=jM(e),o=_S(r,a);return o||(g["isFunction"](a)?n=xS(t,a):(i="auto"===a?mS(t):a,n=bS(t,i)),gS(r,a,{labels:n,labelCategoryInterval:i}))}function hS(t,e){var n,i,r=fS(t,"ticks"),a=jM(e),o=_S(r,a);if(o)return o;if(e.get("show")&&!t.scale.isBlank()||(n=[]),g["isFunction"](a))n=xS(t,a,!0);else if("auto"===a){var s=dS(t,t.getLabelModel());i=s.labelCategoryInterval,n=g["map"](s.labels,(function(t){return t.tickValue}))}else i=a,n=bS(t,i,!0);return gS(r,a,{ticks:n,tickCategoryInterval:i})}function pS(t){var e=t.scale.getTicks(),n=AM(t);return{labels:g["map"](e,(function(e,i){return{level:e.level,formattedLabel:n(e,i),rawLabel:t.scale.getLabel(e),tickValue:e.value}}))}}function fS(t,e){return sS(t)[e]||(sS(t)[e]=[])}function _S(t,e){for(var n=0;n40&&(s=Math.max(1,Math.floor(o/40)));for(var l=a[0],u=t.dataToCoord(l+1)-t.dataToCoord(l),c=Math.abs(u*Math.cos(i)),d=Math.abs(u*Math.sin(i)),h=0,p=0;l<=a[1];l+=s){var f=0,_=0,g=gi(n({value:l}),e.font,"center","top");f=1.3*g.width,_=1.3*g.height,h=Math.max(h,f,7),p=Math.max(p,_,7)}var m=h/c,y=p/d;isNaN(m)&&(m=1/0),isNaN(y)&&(y=1/0);var v=Math.max(0,Math.floor(Math.min(m,y))),b=sS(t.model),x=t.getExtent(),w=b.lastAutoInterval,M=b.lastTickCount;return null!=w&&null!=M&&Math.abs(w-v)<=1&&Math.abs(M-o)<=1&&w>v&&b.axisExtent0===x[0]&&b.axisExtent1===x[1]?v=w:(b.lastTickCount=o,b.lastAutoInterval=v,b.axisExtent0=x[0],b.axisExtent1=x[1]),v}function vS(t){var e=t.getLabelModel();return{axisRotate:t.getRotate?t.getRotate():t.isHorizontal&&!t.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}function bS(t,e,n){var i=AM(t),r=t.scale,a=r.getExtent(),o=t.getLabelModel(),s=[],l=Math.max((e||0)+1,1),u=a[0],c=r.count();0!==u&&l>1&&c/l>2&&(u=Math.round(Math.ceil(u/l)*l));var d=PM(t),h=o.get("showMinLabel")||d,p=o.get("showMaxLabel")||d;h&&u!==a[0]&&_(a[0]);for(var f=u;f<=a[1];f+=l)_(f);function _(t){var e={value:t};s.push(n?t:{formattedLabel:i(e),rawLabel:r.getLabel(e),tickValue:t})}return p&&f-l!==a[1]&&_(a[1]),s}function xS(t,e,n){var i=t.scale,r=AM(t),a=[];return g["each"](i.getTicks(),(function(t){var o=i.getLabel(t),s=t.value;e(t.value,o)&&a.push(n?s:{formattedLabel:r(t),rawLabel:o,tickValue:s})})),a}var wS=[0,1],MS=function(){function t(t,e,n){this.onBand=!1,this.inverse=!1,this.dim=t,this.scale=e,this._extent=n||[0,0]}return t.prototype.contain=function(t){var e=this._extent,n=Math.min(e[0],e[1]),i=Math.max(e[0],e[1]);return t>=n&&t<=i},t.prototype.containData=function(t){return this.scale.contain(t)},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.getPixelPrecision=function(t){return rr(t||this.scale.getExtent(),this._extent)},t.prototype.setExtent=function(t,e){var n=this._extent;n[0]=t,n[1]=e},t.prototype.dataToCoord=function(t,e){var n=this._extent,i=this.scale;return t=i.normalize(t),this.onBand&&"ordinal"===i.type&&(n=n.slice(),SS(n,i.count())),$i(t,wS,n,e)},t.prototype.coordToData=function(t,e){var n=this._extent,i=this.scale;this.onBand&&"ordinal"===i.type&&(n=n.slice(),SS(n,i.count()));var r=$i(t,n,wS,e);return this.scale.scale(r)},t.prototype.pointToData=function(t,e){},t.prototype.getTicksCoords=function(t){t=t||{};var e=t.tickModel||this.getTickModel(),n=uS(this,e),i=n.ticks,r=Object(g["map"])(i,(function(t){return{coord:this.dataToCoord("ordinal"===this.scale.type?this.scale.getRawOrdinalNumber(t):t),tickValue:t}}),this),a=e.get("alignWithLabel");return LS(this,r,a,t.clamp),r},t.prototype.getMinorTicksCoords=function(){if("ordinal"===this.scale.type)return[];var t=this.model.getModel("minorTick"),e=t.get("splitNumber");e>0&&e<100||(e=5);var n=this.scale.getMinorTicks(e),i=Object(g["map"])(n,(function(t){return Object(g["map"])(t,(function(t){return{coord:this.dataToCoord(t),tickValue:t}}),this)}),this);return i},t.prototype.getViewLabels=function(){return lS(this).labels},t.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},t.prototype.getTickModel=function(){return this.model.getModel("axisTick")},t.prototype.getBandWidth=function(){var t=this._extent,e=this.scale.getExtent(),n=e[1]-e[0]+(this.onBand?1:0);0===n&&(n=1);var i=Math.abs(t[1]-t[0]);return Math.abs(i)/n},t.prototype.calculateCategoryInterval=function(){return yS(this)},t}();function SS(t,e){var n=t[1]-t[0],i=e,r=n/i/2;t[0]+=r,t[1]-=r}function LS(t,e,n,i){var r=e.length;if(t.onBand&&!n&&r){var a,o,s=t.getExtent();if(1===r)e[0].coord=s[0],a=e[1]={coord:s[0]};else{var l=e[r-1].tickValue-e[0].tickValue,u=(e[r-1].coord-e[0].coord)/l;Object(g["each"])(e,(function(t){t.coord-=u/2}));var c=t.scale.getExtent();o=1+c[1]-e[r-1].tickValue,a={coord:e[r-1].coord+u*o},e.push(a)}var d=s[0]>s[1];h(e[0].coord,s[0])&&(i?e[0].coord=s[0]:e.shift()),i&&h(s[0],e[0].coord)&&e.unshift({coord:s[0]}),h(s[1],a.coord)&&(i?a.coord=s[1]:e.pop()),i&&h(a.coord,s[1])&&e.push({coord:s[1]})}function h(t,e){return t=tr(t),e=tr(e),d?t>e:tr&&(r+=IS);var p=Math.atan2(s,o);if(p<0&&(p+=IS),p>=i&&p<=r||p+IS>=i&&p+IS<=r)return l[0]=c,l[1]=d,u-n;var f=n*Math.cos(i)+t,_=n*Math.sin(i)+e,g=n*Math.cos(r)+t,m=n*Math.sin(r)+e,y=(f-o)*(f-o)+(_-s)*(_-s),v=(g-o)*(g-o)+(m-s)*(m-s);return y0){e=e/180*Math.PI,BS.fromArray(t[0]),FS.fromArray(t[1]),VS.fromArray(t[2]),Yt.sub(WS,BS,FS),Yt.sub(GS,VS,FS);var n=WS.len(),i=GS.len();if(!(n<.001||i<.001)){WS.scale(1/n),GS.scale(1/i);var r=WS.dot(GS),a=Math.cos(e);if(a1&&Yt.copy(ZS,VS),ZS.toArray(t[1])}}}}function KS(t,e,n){if(n<=180&&n>0){n=n/180*Math.PI,BS.fromArray(t[0]),FS.fromArray(t[1]),VS.fromArray(t[2]),Yt.sub(WS,FS,BS),Yt.sub(GS,VS,FS);var i=WS.len(),r=GS.len();if(!(i<.001||r<.001)){WS.scale(1/i),GS.scale(1/r);var a=WS.dot(e),o=Math.cos(n);if(a=l)Yt.copy(ZS,VS);else{ZS.scaleAndAdd(GS,s/Math.tan(Math.PI/2-c));var d=VS.x!==FS.x?(ZS.x-FS.x)/(VS.x-FS.x):(ZS.y-FS.y)/(VS.y-FS.y);if(isNaN(d))return;d<0?Yt.copy(ZS,FS):d>1&&Yt.copy(ZS,VS)}ZS.toArray(t[1])}}}}function JS(t,e,n,i){var r="normal"===n,a=r?t:t.ensureState(n);a.ignore=e;var o=i.get("smooth");o&&!0===o&&(o=.3),a.shape=a.shape||{},o>0&&(a.shape.smooth=o);var s=i.getModel("lineStyle").getLineStyle();r?t.useStyle(s):a.style=s}function $S(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=j(i[0],i[1]),a=j(i[1],i[2]);if(!r||!a)return t.lineTo(i[1][0],i[1][1]),void t.lineTo(i[2][0],i[2][1]);var o=Math.min(r,a)*n,s=N([],i[1],i[0],o/r),l=N([],i[1],i[2],o/a),u=N([],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&&a&&w(-d/o,0,o);var g,m,y=t[0],v=t[o-1];return b(),g<0&&M(-g,.8),m<0&&M(m,.8),b(),x(g,m,1),x(m,g,-1),b(),g<0&&S(-g),m<0&&S(m),u}function b(){g=y.rect[e]-i,m=r-v.rect[e]-v.rect[n]}function x(t,e,n){if(t<0){var i=Math.min(e,-t);if(i>0){w(i*n,0,o);var r=i+t;r<0&&M(-r*n,1)}else M(-t*n,1)}}function w(n,i,r){0!==n&&(u=!0);for(var a=i;a0)for(l=0;l0;l--){h=a[l-1]*d;w(-h,l,o)}}}function S(t){var e=t<0?-1:1;t=Math.abs(t);for(var n=Math.ceil(t/(o-1)),i=0;i0?w(n,0,i+1):w(-n,o-i-1,o),t-=n,t<=0)return}}function iL(t,e,n,i){return nL(t,"x","width",e,n,i)}function rL(t,e,n,i){return nL(t,"y","height",e,n,i)}function aL(t){var e=[];t.sort((function(t,e){return e.priority-t.priority}));var n=new Ft(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),Object(g["indexOf"])(c,"emphasis")>=0&&n.attr(r.oldLayoutEmphasis)),lu(n,l,e,s)}else if(n.attr(l),!Au(n).valueAnimation){var d=Object(g["retrieve2"])(n.style.opacity,1);n.style.opacity=0,uu(n,{style:{opacity:d}},e,s)}if(r.oldLayout=l,n.states.select){var h=r.oldLayoutSelect={};hL(h,l,pL),hL(h,n.states.select,pL)}if(n.states.emphasis){var p=r.oldLayoutEmphasis={};hL(p,l,pL),hL(p,n.states.emphasis,pL)}Yu(n,s,u,e,e)}if(i&&!i.ignore&&!i.invisible){r=dL(i),a=r.oldLayout;var f={points:i.shape.points};a?(i.attr({shape:a}),lu(i,{shape:f},e)):(i.setShape(f),i.style.strokePercent=0,uu(i,{style:{strokePercent:1}},e)),r.oldLayout=f}},t}(),_L=fL,gL=Zr();function mL(t){t.registerUpdateLifecycle("series:beforeupdate",(function(t,e,n){var i=gL(e).labelManager;i||(i=gL(e).labelManager=new _L),i.clearLabels()})),t.registerUpdateLifecycle("series:layoutlabels",(function(t,e,n){var i=gL(e).labelManager;n.updatedSeries.forEach((function(t){i.addLabelsOfSeries(e.getViewOfSeriesModel(t))})),i.updateLayoutConfig(e),i.layout(e),i.processLabelsOverall()}))}function yL(t,e,n){var i=hi["d"].createCanvas(),r=e.getWidth(),a=e.getHeight(),o=i.style;return o&&(o.position="absolute",o.left="0",o.top="0",o.width=r+"px",o.height=a+"px",i.setAttribute("data-zr-dom-id",t)),i.width=r*n,i.height=a*n,i}fx(mL);var vL=function(t){function e(e,n,i){var r,a=t.call(this)||this;a.motionBlur=!1,a.lastFrameAlpha=.7,a.dpr=1,a.virtual=!1,a.config={},a.incremental=!1,a.zlevel=0,a.maxRepaintRectCount=5,a.__dirty=!0,a.__firstTimePaint=!0,a.__used=!1,a.__drawIndex=0,a.__startIndex=0,a.__endIndex=0,a.__prevStartIndex=null,a.__prevEndIndex=null,i=i||qn,"string"===typeof e?r=yL(e,n,i):g["isObject"](e)&&(r=e,e=r.id),a.id=e,a.dom=r;var o=r.style;return o&&(g["disableUserSelect"](r),r.onselectstart=function(){return!1},o.padding="0",o.margin="0",o.borderWidth="0"),a.painter=n,a.dpr=i,a}return f(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=yL("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,a=[],o=this.maxRepaintRectCount,s=!1,l=new Ft(0,0,0,0);function u(t){if(t.isFinite()&&!t.isZero())if(0===a.length){var e=new Ft(0,0,0,0);e.copy(t),a.push(e)}else{for(var n=!1,i=1/0,r=0,u=0;u=o)}}for(var c=this.__startIndex;c15)break}}n.prevElClipPaths&&d.restore()};if(p)if(0===p.length)s=l.__endIndex;else for(var b=h.dpr,x=0;x0&&t>i[0]){for(s=0;st)break;o=n[i[s]]}if(i.splice(s+1,0,t),n[t]=e,!e.virtual)if(o){var l=o.dom;l.nextSibling?a.insertBefore(e.dom,l.nextSibling):a.appendChild(e.dom)}else a.firstChild?a.insertBefore(e.dom,a.firstChild):a.appendChild(e.dom);e.__painter=this}},t.prototype.eachLayer=function(t,e){for(var n=this._zlevelList,i=0;i0?ML:0),this._needsManuallyCompositing),u.__builtin__||g["logError"]("ZLevel "+l+" has been used by unkown layer "+u.id),u!==o&&(u.__used=!0,u.__startIndex!==a&&(u.__dirty=!0),u.__startIndex=a,u.incremental?u.__drawIndex=-1:u.__drawIndex=a,e(a),o=u),i.__dirty&de&&!i.__inHover&&(u.__dirty=!0,u.incremental&&u.__drawIndex<0&&(u.__drawIndex=a))}e(a),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,g["each"](this._layers,(function(t){t.setUnpainted()}))},t.prototype.configLayer=function(t,e){if(e){var n=this._layerConfig;n[t]?g["merge"](n[t],e,!0):n[t]=e;for(var i=0;i=CL:-l>=CL),h=l>0?l%CL:l%CL+CL,p=!1;p=!!d||!Object(Qe["j"])(c)&&h>=YL===!!u;var f=t+n*IL(a),_=e+i*AL(a);this._start&&this._add("M",f,_);var g=Math.round(r*jL);if(d){var m=1/this._p,y=(u?1:-1)*(CL-m);this._add("A",n,i,g,1,+u,t+n*IL(a+y),e+i*AL(a+y)),m>.01&&this._add("A",n,i,g,0,+u,f,_)}else{var v=t+n*IL(o),b=e+i*AL(o);this._add("A",n,i,g,+p,+u,v,b)}},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,a,o,s,l){for(var u=[],c=this._p,d=1;d"}function JL(t){return""+t+">"}function $L(t,e){e=e||{};var n=e.newline?"\n":"";function i(t){var e=t.children,r=t.tag,a=t.attrs;return KL(r,a)+at(t.text)+(e?""+n+Object(g["map"])(e,(function(t){return i(t)})).join(n)+n:"")+JL(r)}return i(t)}function QL(t,e,n){n=n||{};var i=n.newline?"\n":"",r=" {"+i,a=i+"}",o=Object(g["map"])(Object(g["keys"])(t),(function(e){return e+r+Object(g["map"])(Object(g["keys"])(t[e]),(function(n){return n+":"+t[e][n]+";"})).join(i)+a})).join(i),s=Object(g["map"])(Object(g["keys"])(e),(function(t){return"@keyframes "+t+r+Object(g["map"])(Object(g["keys"])(e[t]),(function(n){return n+r+Object(g["map"])(Object(g["keys"])(e[t][n]),(function(i){var r=e[t][n][i];return"d"===i&&(r='path("'+r+'")'),i+":"+r+";"})).join(i)+a})).join(i)+a})).join(i);return o||s?[""].join(i):""}function tk(t){return{zrId:t,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssClassIdx:0,cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function ek(t,e,n,i){return qL("svg","root",{width:t,height:e,xmlns:WL,"xmlns:xlink":GL,version:"1.1",baseProfile:"full",viewBox:!!i&&"0 0 "+t+" "+e},n)}var nk={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"},ik="transform-origin";function rk(t,e,n){var i=Object(g["extend"])({},t.shape);Object(g["extend"])(i,e),t.buildPath(n,i);var r=new EL;return r.reset(Object(Qe["f"])(t)),n.rebuildPath(r,1),r.generateStr(),r.getStr()}function ak(t,e){var n=e.originX,i=e.originY;(n||i)&&(t[ik]=n+"px "+i+"px")}var ok={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function sk(t,e){var n=e.zrId+"-ani-"+e.cssAnimIdx++;return e.cssAnims[n]=t,n}function lk(t,e,n){var i,r,a=t.shape.paths,o={};if(Object(g["each"])(a,(function(t){var e=tk(n.zrId);e.animation=!0,ck(t,{},e,!0);var a=e.cssAnims,s=e.cssNodes,l=Object(g["keys"])(a),u=l.length;if(u){r=l[u-1];var c=a[r];for(var d in c){var h=c[d];o[d]=o[d]||{d:""},o[d].d+=h.d||""}for(var p in s){var f=s[p].animation;f.indexOf(r)>=0&&(i=f)}}})),i){e.d=!1;var s=sk(o,n);return i.replace(r,s)}}function uk(t){return Object(g["isString"])(t)?nk[t]?"cubic-bezier("+nk[t]+")":qe(t)?t:"":""}function ck(t,e,n,i){var r=t.animators,a=r.length,o=[];if(t instanceof dg){var s=lk(t,e,n);if(s)o.push(s);else if(!a)return}else if(!a)return;for(var l={},u=0;u0})).length){var A=sk(c,n);return A+" "+r[0]+" both"}}for(var m in l){s=_(l[m]);s&&o.push(s)}if(o.length){var y=n.zrId+"-cls-"+n.cssClassIdx++;n.cssNodes["."+y]={animation:o.join(",")},e["class"]=y}}var dk=Math.round;function hk(t){return t&&Object(g["isString"])(t.src)}function pk(t){return t&&Object(g["isFunction"])(t.toDataURL)}function fk(t,e,n,i){VL((function(r,a){var o="fill"===r||"stroke"===r;o&&Object(Qe["k"])(a)?Dk(e,t,r,i):o&&Object(Qe["n"])(a)?Ok(n,t,r,i):t[r]=a}),e,n,!1),Tk(n,t,i)}function _k(t){return Object(Qe["j"])(t[0]-1)&&Object(Qe["j"])(t[1])&&Object(Qe["j"])(t[2])&&Object(Qe["j"])(t[3]-1)}function gk(t){return Object(Qe["j"])(t[4])&&Object(Qe["j"])(t[5])}function mk(t,e,n){if(e&&(!gk(e)||!_k(e))){var i=n?10:1e4;t.transform=_k(e)?"translate("+dk(e[4]*i)/i+" "+dk(e[5]*i)/i+")":Object(Qe["e"])(e)}}function yk(t,e,n){for(var i=t.points,r=[],a=0;au?(o=null==n[h+1]?null:n[h+1].elm,Uk(t,o,n,l,h)):Xk(t,e,s,u))}function Kk(t,e){var n=e.elm=t.elm,i=t.children,r=e.children;t!==e&&(Zk(t,e),Bk(e.text)?Fk(i)&&Fk(r)?i!==r&&qk(n,i,r):Fk(r)?(Fk(t.text)&&Rk(n,""),Uk(n,null,r,0,r.length-1)):Fk(i)?Xk(n,i,0,i.length-1):Fk(t.text)&&Rk(n,""):t.text!==e.text&&(Fk(i)&&Xk(n,i,0,i.length-1),Rk(n,e.text)))}function Jk(t,e){if(Wk(t,e))Kk(t,e);else{var n=t.elm,i=Pk(n);Gk(e),null!==i&&(Yk(i,e.elm,Ek(n)),Xk(i,[t],0,0))}return e}var $k=0,Qk=function(){function t(t,e,n){if(this.type="svg",this.refreshHover=tT("refreshHover"),this.configLayer=tT("configLayer"),this.storage=e,this._opts=n=Object(g["extend"])({},n),this.root=t,this._id="zr"+$k++,this._oldVNode=ek(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=ZL("svg");Zk(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",Jk(this._oldVNode,t),this._oldVNode=t}},t.prototype.renderOneToVNode=function(t){return kk(t,tk(this._id))},t.prototype.renderToVNode=function(t){t=t||{};var e=this.storage.getDisplayList(!0),n=this._backgroundColor,i=this._width,r=this._height,a=tk(this._id);a.animation=t.animation,a.willUpdate=t.willUpdate,a.compress=t.compress;var o=[];if(n&&"none"!==n){var s=Object(Qe["p"])(n),l=s.color,u=s.opacity;this._bgVNode=qL("rect","bg",{width:i,height:r,x:"0",y:"0",id:"0",fill:l,"fill-opacity":u}),o.push(this._bgVNode)}else this._bgVNode=null;var c=t.compress?null:this._mainVNode=qL("g","main",{},[]);this._paintList(e,a,c?c.children:o),c&&o.push(c);var d=Object(g["map"])(Object(g["keys"])(a.defs),(function(t){return a.defs[t]}));if(d.length&&o.push(qL("defs","defs",{},d)),t.animation){var h=QL(a.cssNodes,a.cssAnims,{newline:!0});if(h){var p=qL("style","stl",{},[],h);o.push(p)}}return ek(i,r,o,t.useViewBox)},t.prototype.renderToString=function(t){return t=t||{},$L(this.renderToVNode({animation:Object(g["retrieve2"])(t.cssAnimation,!0),willUpdate:!1,compress:!0,useViewBox:Object(g["retrieve2"])(t.useViewBox,!0)}),{newline:!0})},t.prototype.setBackgroundColor=function(t){this._backgroundColor=t;var e=this._bgVNode;if(e&&e.elm){var n=Object(Qe["p"])(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,a=t.length,o=[],s=0,l=0,u=0;u=0;f--)if(d&&r&&d[f]===r[f])break;for(var _=p-1;_>f;_--)s--,i=o[s-1];for(var g=f+1;g-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}(Wf),rT=iT;function aT(t,e){var n=t.mapDimensionsAll("defaultedLabel"),i=n.length;if(1===i){var r=bp(t,e,n[0]);return null!=r?r+"":null}if(i){for(var a=[],o=0;o=0&&i.push(e[a])}return i.join(" ")}var sT=function(t){function e(e,n,i,r){var a=t.call(this)||this;return a.updateData(e,n,i,r),a}return f(e,t),e.prototype._createSymbol=function(t,e,n,i,r){this.removeAll();var a=ky(t,-1,-1,2,2,null,r);a.attr({z2:100,culling:!0,scaleX:i[0]/2,scaleY:i[1]/2}),a.drift=lT,this._symbolType=t,this.add(a)},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(){Dl(this.childAt(0))},e.prototype.downplay=function(){Ol(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 a=t.getItemVisual(n,"symbol")||"circle",o=t.hostModel,s=e.getSymbolSize(t,n),l=a!==this._symbolType,u=r&&r.disableAnimation;if(l){var c=t.getItemVisual(n,"symbolKeepAspect");this._createSymbol(a,t,n,s,c)}else{var d=this.childAt(0);d.silent=!1;var h={scaleX:s[0]/2,scaleY:s[1]/2};u?d.attr(h):lu(d,h,o,n),fu(d)}if(this._updateCommon(t,n,s,i,r),l){d=this.childAt(0);if(!u){h={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:d.style.opacity}};d.scaleX=d.scaleY=0,d.style.opacity=0,uu(d,h,o,n)}}u&&this.childAt(0).stopAnimation("leave")},e.prototype._updateCommon=function(t,e,n,i,r){var a,o,s,l,u,c,d,h,p,f=this.childAt(0),_=t.hostModel;if(i&&(a=i.emphasisItemStyle,o=i.blurItemStyle,s=i.selectItemStyle,l=i.focus,u=i.blurScope,d=i.labelStatesModels,h=i.hoverScale,p=i.cursorStyle,c=i.emphasisDisabled),!i||t.hasItemOption){var m=i&&i.itemModel?i.itemModel:t.getItemModel(e),y=m.getModel("emphasis");a=y.getModel("itemStyle").getItemStyle(),s=m.getModel(["select","itemStyle"]).getItemStyle(),o=m.getModel(["blur","itemStyle"]).getItemStyle(),l=y.get("focus"),u=y.get("blurScope"),c=y.get("disabled"),d=bu(m),h=y.getShallow("scale"),p=m.getShallow("cursor")}var v=t.getItemVisual(e,"symbolRotate");f.attr("rotation",(v||0)*Math.PI/180||0);var b=Dy(t.getItemVisual(e,"symbolOffset"),n);b&&(f.x=b[0],f.y=b[1]),p&&f.attr("cursor",p);var x=t.getItemVisual(e,"style"),w=x.fill;if(f instanceof _s){var M=f.style;f.useStyle(Object(g["extend"])({image:M.image,x:M.x,y:M.y,width:M.width,height:M.height},x))}else f.__isEmptyBrush?f.useStyle(Object(g["extend"])({},x)):f.useStyle(x),f.style.decal=null,f.setColor(w,r&&r.symbolInnerColor),f.style.strokeNoScale=!0;var S=t.getItemVisual(e,"liftZ"),L=this._z2;null!=S?null==L&&(this._z2=f.z2,f.z2+=S):null!=L&&(f.z2=L,this._z2=null);var k=r&&r.useNameLabel;function T(e){return k?t.getName(e):aT(t,e)}vu(f,d,{labelFetcher:_,labelDataIndex:e,defaultText:T,inheritColor:w,defaultOpacity:x.opacity}),this._sizeX=n[0]/2,this._sizeY=n[1]/2;var D=f.ensureState("emphasis");D.style=a,f.ensureState("select").style=s,f.ensureState("blur").style=o;var O=null==h||!0===h?Math.max(1.1,3/this._sizeY):isFinite(h)&&h>0?+h:1;D.scaleX=this._sizeX*O,D.scaleY=this._sizeY*O,this.setSymbolScale(1),Xl(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=Vs(this).dataIndex,a=n&&n.animation;if(this.silent=i.silent=!0,n&&n.fadeLabel){var o=i.getTextContent();o&&du(o,{style:{opacity:0}},e,{dataIndex:r,removeOpt:a,cb:function(){i.removeTextContent()}})}else i.removeTextContent();du(i,{style:{opacity:0},scaleX:0,scaleY:0},e,{dataIndex:r,cb:t,removeOpt:a})},e.getSymbolSize=function(t,e){return Ty(t.getItemVisual(e,"symbolSize"))},e}(Ri);function lT(t,e){this.parent.drift(t,e)}var uT=sT;function cT(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 dT(t){return null==t||Object(g["isObject"])(t)||(t={isIgnore:t}),t||{}}function hT(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:bu(e),cursorStyle:e.get("cursor")}}var pT=function(){function t(t){this.group=new Ri,this._SymbolCtor=t||uT}return t.prototype.updateData=function(t,e){this._progressiveEls=null,e=dT(e);var n=this.group,i=t.hostModel,r=this._data,a=this._SymbolCtor,o=e.disableAnimation,s=hT(t),l={disableAnimation:o},u=e.getSymbolPoint||function(e){return t.getItemLayout(e)};r||n.removeAll(),t.diff(r).add((function(i){var r=u(i);if(cT(t,r,i,e)){var o=new a(t,i,s,l);o.setPosition(r),t.setItemGraphicEl(i,o),n.add(o)}})).update((function(c,d){var h=r.getItemGraphicEl(d),p=u(c);if(cT(t,p,c,e)){var f=t.getItemVisual(c,"symbol")||"circle",_=h&&h.getSymbolType&&h.getSymbolType();if(!h||_&&_!==f)n.remove(h),h=new a(t,c,s,l),h.setPosition(p);else{h.updateData(t,c,s,l);var g={x:p[0],y:p[1]};o?h.attr(g):lu(h,g,i)}n.add(h),t.setItemGraphicEl(c,h)}else n.remove(h)})).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=hT(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=dT(n);for(var r=t.start;r0?n=i[0]:i[1]<0&&(n=i[1]),n}function mT(t,e,n,i){var r=NaN;t.stacked&&(r=n.get(n.getCalculationInfo("stackedOverDimension"),i)),isNaN(r)&&(r=t.valueStart);var a=t.baseDataOffset,o=[];return o[a]=n.get(t.baseDim,i),o[1-a]=r,e.dataToPoint(o)}function yT(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 vT(t,e,n,i,r,a,o,s){for(var l=yT(t,e),u=[],c=[],d=[],h=[],p=[],f=[],_=[],g=_T(r,e,o),m=t.getLayout("points")||[],y=e.getLayout("points")||[],v=0;v=r||_<0)break;if(wT(m,y)){if(l){_+=a;continue}break}if(_===n)t[a>0?"moveTo":"lineTo"](m,y),d=m,h=y;else{var v=m-u,b=y-c;if(v*v+b*b<.5){_+=a;continue}if(o>0){var x=_+a,w=e[2*x],M=e[2*x+1];while(w===m&&M===y&&g=i||wT(w,M))p=m,f=y;else{k=w-u,T=M-c;var A=m-u,I=w-m,Y=y-c,C=M-y,j=void 0,P=void 0;if("x"===s){j=Math.abs(A),P=Math.abs(I);var E=k>0?1:-1;p=m-E*j*o,f=y,D=m+E*P*o,O=y}else if("y"===s){j=Math.abs(Y),P=Math.abs(C);var R=T>0?1:-1;p=m,f=y-R*j*o,D=m,O=y+R*P*o}else j=Math.sqrt(A*A+Y*Y),P=Math.sqrt(I*I+C*C),L=P/(P+j),p=m-k*o*(1-L),f=y-T*o*(1-L),D=m+k*o*L,O=y+T*o*L,D=bT(D,xT(w,m)),O=bT(O,xT(M,y)),D=xT(D,bT(w,m)),O=xT(O,bT(M,y)),k=D-m,T=O-y,p=m-k*j/P,f=y-T*j/P,p=bT(p,xT(u,m)),f=bT(f,xT(c,y)),p=xT(p,bT(u,m)),f=xT(f,bT(c,y)),k=m-p,T=y-f,D=m+k*P/j,O=y+T*P/j}t.bezierCurveTo(d,h,p,f,m,y),d=D,h=O}else t.lineTo(m,y)}u=m,c=y,_+=a}return g}var ST=function(){function t(){this.smooth=0,this.smoothConstraint=!0}return t}(),LT=function(t){function e(e){var n=t.call(this,e)||this;return n.type="ec-polyline",n}return f(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new ST},e.prototype.buildPath=function(t,e){var n=e.points,i=0,r=n.length/2;if(e.connectNulls){for(;r>0;r--)if(!wT(n[2*r-2],n[2*r-1]))break;for(;i=0){var y=s?(h-i)*m+i:(d-n)*m+n;return s?[t,y]:[y,t]}n=d,i=h;break;case o.C:d=a[u++],h=a[u++],p=a[u++],f=a[u++],_=a[u++],g=a[u++];var v=s?Ee(n,d,p,_,t,l):Ee(i,h,f,g,t,l);if(v>0)for(var b=0;b=0){y=s?je(i,h,f,g,x):je(n,d,p,_,x);return s?[t,y]:[y,t]}}n=_,i=g;break}}},e}(ss),kT=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return f(e,t),e}(ST),TT=function(t){function e(e){var n=t.call(this,e)||this;return n.type="ec-polygon",n}return f(e,t),e.prototype.getDefaultShape=function(){return new kT},e.prototype.buildPath=function(t,e){var n=e.points,i=e.stackedOnPoints,r=0,a=n.length/2,o=e.smoothMonotone;if(e.connectNulls){for(;a>0;a--)if(!wT(n[2*a-2],n[2*a-1]))break;for(;re){i?r.push(o(i,l,e)):n&&r.push(o(n,l,0),o(n,l,e));break}n&&(r.push(o(n,l,0)),n=null),r.push(l),i=l}}return r}function HT(t,e,n){var i=t.getVisual("visualMeta");if(i&&i.length&&t.count()&&"cartesian2d"===e.type){for(var r,a,o=i.length-1;o>=0;o--){var s=t.getDimensionInfo(i[o].dimension);if(r=s&&s.coordDim,"x"===r||"y"===r){a=i[o];break}}if(a){var l=e.getAxis(r),u=g["map"](a.stops,(function(t){return{coord:l.toGlobalCoord(l.dataToCoord(t.value)),color:t.color}})),c=u.length,d=a.outerColors.slice();c&&u[0].coord>u[c-1].coord&&(u.reverse(),d.reverse());var h=NT(u,"x"===r?n.getWidth():n.getHeight()),p=h.length;if(!p&&c)return u[0].coord<0?d[1]?d[1]:u[c-1].color:d[0]?d[0]:u[0].color;var f=10,_=h[0].coord-f,m=h[p-1].coord+f,y=m-_;if(y<.001)return"transparent";g["each"](h,(function(t){t.offset=(t.coord-_)/y})),h.push({offset:p?h[p-1].offset:.5,color:d[1]||"transparent"}),h.unshift({offset:p?h[0].offset:.5,color:d[0]||"transparent"});var v=new _g(0,0,0,0,h,!0);return v[r]=_,v[r+"2"]=m,v}}}function zT(t,e,n){var i=t.get("showAllSymbol"),r="auto"===i;if(!i||r){var a=n.getAxesByScale("ordinal")[0];if(a&&(!r||!BT(a,e))){var o=e.mapDimension(a.dim),s={};return g["each"](a.getViewLabels(),(function(t){var e=a.scale.getRawOrdinalNumber(t.tickValue);s[e]=1})),function(t){return!s.hasOwnProperty(e.get(o,t))}}}}function BT(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(),a=Math.max(1,Math.round(r/5)),o=0;oi)return!1;return!0}function FT(t,e){return isNaN(t)||isNaN(e)}function VT(t){for(var e=t.length/2;e>0;e--)if(!FT(t[2*e-2],t[2*e-1]))break;return e-1}function WT(t,e){return[t[2*e],t[2*e+1]]}function GT(t,e,n){for(var i,r,a=t.length/2,o="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 UT(t){if(t.get(["endLabel","show"]))return!0;for(var e=0;e<$s.length;e++)if(t.get([$s[e],"endLabel","show"]))return!0;return!1}function XT(t,e,n,i){if(IT(e,"cartesian2d")){var r=i.getModel("endLabel"),a=r.get("valueAnimation"),o=i.getData(),s={lastFrameIndex:0},l=UT(i)?function(n,i){t._endLabelOnDuring(n,i,o,s,a,r,e)}:null,u=e.getBaseAxis().isHorizontal(),c=DT(e,n,i,(function(){var e=t._endLabel;e&&n&&null!=s.originalX&&e.attr({x:s.originalX,y:s.originalY})}),l);if(!i.get("clip",!0)){var d=c.shape,h=Math.max(d.width,d.height);u?(d.y-=h,d.height+=2*h):(d.x-=h,d.width+=2*h)}return l&&l(1,c),c}return OT(e,n,i)}function ZT(t,e){var n=e.getBaseAxis(),i=n.isHorizontal(),r=n.inverse,a=i?r?"right":"left":"center",o=i?"middle":r?"top":"bottom";return{normal:{align:t.get("align")||a,verticalAlign:t.get("verticalAlign")||o}}}var qT=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return f(e,t),e.prototype.init=function(){var t=new Ri,e=new fT;this.group.add(e.group),this._symbolDraw=e,this._lineGroup=t},e.prototype.render=function(t,e,n){var i=this,r=t.coordinateSystem,a=this.group,o=t.getData(),s=t.getModel("lineStyle"),l=t.getModel("areaStyle"),u=o.getLayout("points")||[],c="polar"===r.type,d=this._coordSys,h=this._symbolDraw,p=this._polyline,f=this._polygon,_=this._lineGroup,m=t.get("animation"),y=!l.isEmpty(),v=l.get("origin"),b=_T(r,o,v),x=y&&ET(r,o,b),w=t.get("showSymbol"),M=t.get("connectNulls"),S=w&&!c&&zT(t,o,r),L=this._data;L&&L.eachItemGraphicEl((function(t,e){t.__temp&&(a.remove(t),L.setItemGraphicEl(e,null))})),w||h.remove(),a.add(_);var k,T=!c&&t.get("step");r&&r.getArea&&t.get("clip",!0)&&(k=r.getArea(),null!=k.width?(k.x-=.1,k.y-=.1,k.width+=.2,k.height+=.2):k.r0&&(k.r0-=.5,k.r+=.5)),this._clipShapeForSymbol=k;var D=HT(o,r,n)||o.getVisual("style")[o.getVisual("drawType")];if(p&&d.type===r.type&&T===this._step){y&&!f?f=this._newPolygon(u,x):f&&!y&&(_.remove(f),f=this._polygon=null),c||this._initOrUpdateEndLabel(t,r,$c(D));var O=_.getClipPath();if(O){var A=XT(this,r,!1,t);uu(O,{shape:A.shape},t)}else _.setClipPath(XT(this,r,!0,t));w&&h.updateData(o,{isIgnore:S,clipShape:k,disableAnimation:!0,getSymbolPoint:function(t){return[u[2*t],u[2*t+1]]}}),YT(this._stackedOnPoints,x)&&YT(this._points,u)||(m?this._doUpdateAnimation(o,x,r,n,T,v,M):(T&&(u=RT(u,r,T,M),x&&(x=RT(x,r,T,M))),p.setShape({points:u}),f&&f.setShape({points:u,stackedOnPoints:x})))}else w&&h.updateData(o,{isIgnore:S,clipShape:k,disableAnimation:!0,getSymbolPoint:function(t){return[u[2*t],u[2*t+1]]}}),m&&this._initSymbolLabelAnimation(o,r,k),T&&(u=RT(u,r,T,M),x&&(x=RT(x,r,T,M))),p=this._newPolyline(u),y?f=this._newPolygon(u,x):f&&(_.remove(f),f=this._polygon=null),c||this._initOrUpdateEndLabel(t,r,$c(D)),_.setClipPath(XT(this,r,!0,t));var I=t.getModel("emphasis"),Y=I.get("focus"),C=I.get("blurScope"),j=I.get("disabled");if(p.useStyle(g["defaults"](s.getLineStyle(),{fill:"none",stroke:D,lineJoin:"bevel"})),Jl(p,t,"lineStyle"),p.style.lineWidth>0&&"bolder"===t.get(["emphasis","lineStyle","width"])){var P=p.getState("emphasis").style;P.lineWidth=+p.style.lineWidth+1}Vs(p).seriesIndex=t.seriesIndex,Xl(p,Y,C,j);var E=PT(t.get("smooth")),R=t.get("smoothMonotone");if(p.setShape({smooth:E,smoothMonotone:R,connectNulls:M}),f){var N=o.getCalculationInfo("stackedOnSeries"),H=0;f.useStyle(g["defaults"](l.getAreaStyle(),{fill:D,opacity:.7,lineJoin:"bevel",decal:o.getVisual("style").decal})),N&&(H=PT(N.get("smooth"))),f.setShape({smooth:E,stackedOnSmooth:H,smoothMonotone:R,connectNulls:M}),Jl(f,t,"areaStyle"),Vs(f).seriesIndex=t.seriesIndex,Xl(f,Y,C,j)}var z=function(t){i._changePolyState(t)};o.eachItemGraphicEl((function(t){t&&(t.onHoverStateChange=z)})),this._polyline.onHoverStateChange=z,this._data=o,this._coordSys=r,this._stackedOnPoints=x,this._points=u,this._step=T,this._valueOrigin=v,t.get("triggerLineEvent")&&(this.packEventData(t,p),f&&this.packEventData(t,f))},e.prototype.packEventData=function(t,e){Vs(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(),a=Xr(r,i);if(this._changePolyState("emphasis"),!(a instanceof Array)&&null!=a&&a>=0){var o=r.getLayout("points"),s=r.getItemGraphicEl(a);if(!s){var l=o[2*a],u=o[2*a+1];if(isNaN(l)||isNaN(u))return;if(this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(l,u))return;var c=t.get("zlevel")||0,d=t.get("z")||0;s=new uT(r,a),s.x=l,s.y=u,s.setZ(c,d);var h=s.getSymbolPath().getTextContent();h&&(h.zlevel=c,h.z=d,h.z2=this._polyline.z2+1),s.__temp=!0,r.setItemGraphicEl(a,s),s.stopSymbolAnimation(!0),this.group.add(s)}s.highlight()}else pm.prototype.highlight.call(this,t,e,n,i)},e.prototype.downplay=function(t,e,n,i){var r=t.getData(),a=Xr(r,i);if(this._changePolyState("normal"),null!=a&&a>=0){var o=r.getItemGraphicEl(a);o&&(o.__temp?(r.setItemGraphicEl(a,null),this.group.remove(o)):o.downplay())}else pm.prototype.downplay.call(this,t,e,n,i)},e.prototype._changePolyState=function(t){var e=this._polygon;vl(this._polyline,t),e&&vl(e,t)},e.prototype._newPolyline=function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new LT({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 TT({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,a=e.getBaseAxis(),o=a.inverse;"cartesian2d"===e.type?(i=a.isHorizontal(),r=!1):"polar"===e.type&&(i="angle"===a.dim,r=!0);var s=t.hostModel,l=s.get("animationDuration");g["isFunction"](l)&&(l=l(null));var u=s.get("animationDelay")||0,c=g["isFunction"](u)?u(null):u;t.eachItemGraphicEl((function(t,a){var s=t;if(s){var d=[t.x,t.y],h=void 0,p=void 0,f=void 0;if(n)if(r){var _=n,m=e.pointToCoord(d);i?(h=_.startAngle,p=_.endAngle,f=-m[1]/180*Math.PI):(h=_.r0,p=_.r,f=m[0])}else{var y=n;i?(h=y.x,p=y.x+y.width,f=t.x):(h=y.y+y.height,p=y.y,f=t.y)}var v=p===h?0:(f-h)/(p-h);o&&(v=1-v);var b=g["isFunction"](u)?u(a):l*v+c,x=s.getSymbolPath(),w=x.getTextContent();s.attr({scaleX:0,scaleY:0}),s.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:b}),w&&w.animateFrom({style:{opacity:0}},{duration:300,delay:b}),x.disableLabelAnimation=!0}}))},e.prototype._initOrUpdateEndLabel=function(t,e,n){var i=t.getModel("endLabel");if(UT(t)){var r=t.getData(),a=this._polyline,o=r.getLayout("points");if(!o)return a.removeTextContent(),void(this._endLabel=null);var s=this._endLabel;s||(s=this._endLabel=new Fs({z2:200}),s.ignoreClip=!0,a.setTextContent(this._endLabel),a.disableLabelAnimation=!0);var l=VT(o);l>=0&&(vu(a,bu(t,"endLabel"),{inheritColor:n,labelFetcher:t,labelDataIndex:l,defaultText:function(t,e,n){return null!=n?oT(r,n):aT(r,t)},enableTextSetter:!0},ZT(i,e)),a.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},e.prototype._endLabelOnDuring=function(t,e,n,i,r,a,o){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,d=c.get("connectNulls"),h=a.get("precision"),p=a.get("distance")||0,f=o.getBaseAxis(),_=f.isHorizontal(),g=f.inverse,m=e.shape,y=g?_?m.x:m.y+m.height:_?m.x+m.width:m.y,v=(_?p:0)*(g?-1:1),b=(_?0:-p)*(g?-1:1),x=_?"x":"y",w=GT(u,y,x),M=w.range,S=M[1]-M[0],L=void 0;if(S>=1){if(S>1&&!d){var k=WT(u,M[0]);s.attr({x:k[0]+v,y:k[1]+b}),r&&(L=c.getRawValue(M[0]))}else{k=l.getPointOn(y,x);k&&s.attr({x:k[0]+v,y:k[1]+b});var T=c.getRawValue(M[0]),D=c.getRawValue(M[1]);r&&(L=aa(n,h,T,D,w.t))}i.lastFrameIndex=M[0]}else{var O=1===t||i.lastFrameIndex>0?M[0]:0;k=WT(u,O);r&&(L=c.getRawValue(O)),s.attr({x:k[0]+v,y:k[1]+b})}r&&Au(s).setLabelText(L)}},e.prototype._doUpdateAnimation=function(t,e,n,i,r,a,o){var s=this._polyline,l=this._polygon,u=t.hostModel,c=vT(this._data,t,this._stackedOnPoints,e,this._coordSys,n,this._valueOrigin,a),d=c.current,h=c.stackedOnCurrent,p=c.next,f=c.stackedOnNext;if(r&&(d=RT(c.current,n,r,o),h=RT(c.stackedOnCurrent,n,r,o),p=RT(c.next,n,r,o),f=RT(c.stackedOnNext,n,r,o)),jT(d,p)>3e3||l&&jT(h,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=d;var _={shape:{points:p}};c.current!==d&&(_.shape.__points=c.next),s.stopAnimation(),lu(s,_,u),l&&(l.setShape({points:d,stackedOnPoints:h}),l.stopAnimation(),lu(l,{shape:{stackedOnPoints:f}},u),s.shape.points!==l.shape.points&&(l.shape.points=s.shape.points));for(var g=[],m=c.status,y=0;ye&&(e=t[n]);return isFinite(e)?e:NaN},min:function(t){for(var e=1/0,n=0;n10&&"cartesian2d"===a.type&&r){var s=a.getBaseAxis(),l=a.getOtherAxis(s),u=s.getExtent(),c=n.getDevicePixelRatio(),d=Math.abs(u[1]-u[0])*(c||1),h=Math.round(o/d);if(isFinite(h)&&h>1){"lttb"===r&&t.setData(i.lttbDownSample(i.mapDimension(l.dim),1/h));var p=void 0;Object(g["isString"])(r)?p=$T[r]:Object(g["isFunction"])(r)&&(p=r),p&&t.setData(i.downSample(i.mapDimension(l.dim),1/h,p,QT))}}}}}function eD(t){t.registerChartView(KT),t.registerSeriesModel(rT),t.registerLayout(JT("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,tD("line"))}var nD=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return f(e,t),e.prototype.getInitialData=function(t,e){return pw(null,this,{useEncodeDefaulter:!0})},e.prototype.getMarkerPosition=function(t){var e=this.coordinateSystem;if(e&&e.clampData){var n=e.dataToPoint(e.clampData(t)),i=this.getData(),r=i.getLayout("offset"),a=i.getLayout("size"),o=e.getBaseAxis().isHorizontal()?0:1;return n[o]+=r+a/2,n}return[NaN,NaN]},e.type="series.__base_bar__",e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},e}(Wf);Wf.registerClass(nD);var iD=nD,rD=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return f(e,t),e.prototype.getInitialData=function(){return pw(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},e.prototype.getProgressive=function(){return!!this.get("large")&&this.get("progressive")},e.prototype.getProgressiveThreshold=function(){var t=this.get("progressiveThreshold"),e=this.get("largeThreshold");return e>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=Ku(iD.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}(iD),aD=rD,oD=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}(),sD=function(t){function e(e){var n=t.call(this,e)||this;return n.type="sausage",n}return f(e,t),e.prototype.getDefaultShape=function(){return new oD},e.prototype.buildPath=function(t,e){var n=e.cx,i=e.cy,r=Math.max(e.r0||0,0),a=Math.max(e.r,0),o=.5*(a-r),s=r+o,l=e.startAngle,u=e.endAngle,c=e.clockwise,d=2*Math.PI,h=c?u-lMath.PI/2&&c<1.5*Math.PI&&(c-=Math.PI),t.setTextConfig({rotation:c})}}function dD(t,e,n){return e*Math.sin(t)*(n?-1:1)}function hD(t,e,n){return e*Math.cos(t)*(n?1:-1)}var pD=Math.max,fD=Math.min;function _D(t,e){var n=t.getArea&&t.getArea();if(IT(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 gD=function(t){function e(){var n=t.call(this)||this;return n.type=e.type,n._isFirstFrame=!0,n}return f(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){rm(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,a=this.group,o=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,d=vD(t,l);d&&this._enableRealtimeSort(d,o,n);var h=t.get("clip",!0)||d,p=_D(l,o);a.removeClipPath();var f=t.get("roundCap",!0),_=t.get("showBackground",!0),g=t.getModel("backgroundStyle"),m=g.get("borderRadius")||0,y=[],v=this._backgroundEls,b=i&&i.isInitSort,x=i&&"changeAxisOrder"===i.type;function w(t){var e=LD[l.type](o,t),n=ED(l,r,e);return n.useStyle(g.getItemStyle()),"cartesian2d"===l.type&&n.setShape("r",m),y[t]=n,n}o.diff(s).add((function(e){var n=o.getItemModel(e),i=LD[l.type](o,e,n);if(_&&w(e),o.hasValue(e)&&SD[l.type](i)){var s=!1;h&&(s=mD[l.type](p,i));var g=yD[l.type](t,o,e,i,r,c,u.model,!1,f);d&&(g.forceLabelAnimation=!0),DD(g,o,e,n,i,t,r,"polar"===l.type),b?g.attr({shape:i}):d?bD(d,c,g,i,e,r,!1,!1):uu(g,{shape:i},t,e),o.setItemGraphicEl(e,g),a.add(g),g.ignore=s}})).update((function(e,n){var i=o.getItemModel(e),M=LD[l.type](o,e,i);if(_){var S=void 0;0===v.length?S=w(n):(S=v[n],S.useStyle(g.getItemStyle()),"cartesian2d"===l.type&&S.setShape("r",m),y[e]=S);var L=LD[l.type](o,e),k=PD(r,L,l);lu(S,{shape:k},c,e)}var T=s.getItemGraphicEl(n);if(o.hasValue(e)&&SD[l.type](M)){var D=!1;if(h&&(D=mD[l.type](p,M),D&&a.remove(T)),T?fu(T):T=yD[l.type](t,o,e,M,r,c,u.model,!!T,f),d&&(T.forceLabelAnimation=!0),x){var O=T.getTextContent();if(O){var A=Au(O);null!=A.prevValue&&(A.prevValue=A.value)}}else DD(T,o,e,i,M,t,r,"polar"===l.type);b?T.attr({shape:M}):d?bD(d,c,T,M,e,r,!0,x):lu(T,{shape:M},t,e,null),o.setItemGraphicEl(e,T),T.ignore=D,a.add(T)}else a.remove(T)})).remove((function(e){var n=s.getItemGraphicEl(e);n&&pu(n,t,e)})).execute();var M=this._backgroundGroup||(this._backgroundGroup=new Ri);M.removeAll();for(var S=0;Sa)return!0;a=u}return!1},e.prototype._isOrderDifferentInView=function(t,e){for(var n=e.scale,i=n.getExtent(),r=Math.max(0,i[0]),a=Math.min(i[1],n.getOrdinalMeta().categories.length-1);r<=a;++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){pu(e,t,Vs(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}(pm),mD={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,a=t.y+t.height,o=pD(e.x,t.x),s=fD(e.x+e.width,r),l=pD(e.y,t.y),u=fD(e.y+e.height,a),c=sr?s:o,e.y=d&&l>a?u:l,e.width=c?0:s-o,e.height=d?0:u-l,n<0&&(e.x+=e.width,e.width=-e.width),i<0&&(e.y+=e.height,e.height=-e.height),c||d},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=fD(e.r,t.r),a=pD(e.r0,t.r0);e.r=r,e.r0=a;var o=r-a<0;if(n<0){i=e.r;e.r=e.r0,e.r0=i}return o}},yD={cartesian2d:function(t,e,n,i,r,a,o,s,l){var u=new Ss({shape:Object(g["extend"])({},i),z2:1});if(u.__dataIndex=n,u.name="item",a){var c=u.shape,d=r?"height":"width";c[d]=0}return u},polar:function(t,e,n,i,r,a,o,s,l){var u=!r&&l?lD:z_,c=new u({shape:i,z2:1});c.name="item";var d=TD(r);if(c.calculateTextPosition=uD(d,{isRoundCap:u===lD}),a){var h=c.shape,p=r?"r":"endAngle",f={};h[p]=r?0:i.startAngle,f[p]=i[p],(s?lu:uu)(c,{shape:f},a)}return c}};function vD(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 bD(t,e,n,i,r,a,o,s){var l,u;a?(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||(o?lu:uu)(n,{shape:l},e,r,null);var c=e?t.baseAxis.model:null;(o?lu:uu)(n,{shape:u},c,r)}function xD(t,e){for(var n=0;n0?1:-1,o=i.height>0?1:-1;return{x:i.x+a*r/2,y:i.y+o*r/2,width:i.width-a*r,height:i.height-o*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 kD(t){return null!=t.startAngle&&null!=t.endAngle&&t.startAngle===t.endAngle}function TD(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 DD(t,e,n,i,r,a,o,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?o?r.r>=r.r0?"endArc":"startArc":r.endAngle>=r.startAngle?"endAngle":"startAngle":o?r.height>=0?"bottom":"top":r.width>=0?"right":"left",d=bu(i);vu(t,d,{labelFetcher:a,labelDataIndex:n,defaultText:aT(a.getData(),n),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:c});var h=t.getTextContent();if(s&&h){var p=i.get(["label","position"]);t.textConfig.inside="middle"===p||null,cD(t,"outside"===p?c:p,TD(o),i.get(["label","rotate"]))}Iu(h,d,a.getRawValue(n),(function(t){return oT(e,t)}));var f=i.getModel(["emphasis"]);Xl(t,f.get("focus"),f.get("blurScope"),f.get("disabled")),Jl(t,i),kD(r)&&(t.style.fill="none",t.style.stroke="none",Object(g["each"])(t.states,(function(t){t.style&&(t.style.fill=t.style.stroke="none")})))}function OD(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),a=isNaN(e.height)?Number.MAX_VALUE:Math.abs(e.height);return Math.min(i,r,a)}var AD=function(){function t(){}return t}(),ID=function(t){function e(e){var n=t.call(this,e)||this;return n.type="largeBar",n}return f(e,t),e.prototype.getDefaultShape=function(){return new AD},e.prototype.buildPath=function(t,e){for(var n=e.points,i=this.baseDimIdx,r=1-this.baseDimIdx,a=[],o=[],s=this.barWidth,l=0;l=0?n:null}),30,!1);function jD(t,e,n){for(var i=t.baseDimIdx,r=1-i,a=t.shape.points,o=t.largeDataIndices,s=[],l=[],u=t.barWidth,c=0,d=a.length/3;c=s[0]&&e<=s[0]+l[0]&&n>=s[1]&&n<=s[1]+l[1])return o[c]}return-1}function PD(t,e,n){if(IT(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 a=e;return{cx:r.cx,cy:r.cy,r0:t?r.r0:a.r0,r:t?r.r:a.r,startAngle:t?a.startAngle:0,endAngle:t?a.endAngle:2*Math.PI}}function ED(t,e,n){var i="polar"===t.type?z_:Ss;return new i({shape:PD(e,n,t),silent:!0,z2:0})}var RD=gD;function ND(t){t.registerChartView(RD),t.registerSeriesModel(aD),t.registerLayout(t.PRIORITY.VISUAL.LAYOUT,g["curry"](Uw,"bar")),t.registerLayout(t.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,Xw("bar")),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,tD("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 HD=2*Math.PI,zD=Math.PI/180;function BD(t,e){return od(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function FD(t,e){var n=BD(t,e),i=t.get("center"),r=t.get("radius");g["isArray"](r)||(r=[0,r]),g["isArray"](i)||(i=[i,i]);var a,o,s=Qi(n.width,e.getWidth()),l=Qi(n.height,e.getHeight()),u=Math.min(s,l),c=Qi(r[0],u/2),d=Qi(r[1],u/2),h=t.coordinateSystem;if(h){var p=h.dataToPoint(i);a=p[0]||0,o=p[1]||0}else a=Qi(i[0],s)+n.x,o=Qi(i[1],l)+n.y;return{cx:a,cy:o,r0:c,r:d}}function VD(t,e,n){e.eachSeriesByType(t,(function(t){var e=t.getData(),i=e.mapDimension("value"),r=BD(t,n),a=FD(t,n),o=a.cx,s=a.cy,l=a.r,u=a.r0,c=-t.get("startAngle")*zD,d=t.get("minAngle")*zD,h=0;e.each(i,(function(t){!isNaN(t)&&h++}));var p=e.getSum(i),f=Math.PI/(p||h)*2,_=t.get("clockwise"),g=t.get("roseType"),m=t.get("stillShowZeroSum"),y=e.getDataExtent(i);y[0]=0;var v=HD,b=0,x=c,w=_?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:_,cx:o,cy:s,r0:u,r:g?NaN:l});else{i="area"!==g?0===p&&m?f:t*f:HD/h,in?o:a,c=Math.abs(l.label.y-n);if(c>=u.maxY){var d=l.label.x-e-l.len2*r,h=i+l.len,f=Math.abs(d)t.unconstrainedWidth?null:p:null;i.setStyle("width",f)}var _=i.getBoundingRect();a.width=_.width;var g=(i.style.margin||0)+2.1;a.height=_.height+g,a.y-=(a.height-d)/2}}}function qD(t){return"center"===t.position}function KD(t){var e,n,i=t.getData(),r=[],a=!1,o=(t.get("minShowLabelAngle")||0)*GD,s=i.getLayout("viewRect"),l=i.getLayout("r"),u=s.width,c=s.x,d=s.y,h=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),d=s.shape,h=s.getTextContent(),_=s.getTextGuideLine(),m=i.getItemModel(t),y=m.getModel("label"),v=y.get("position")||m.get(["emphasis","label","position"]),b=y.get("distanceToLabelLine"),x=y.get("alignTo"),w=Qi(y.get("edgeDistance"),u),M=y.get("bleedMargin"),S=m.getModel("labelLine"),L=S.get("length");L=Qi(L,u);var k=S.get("length2");if(k=Qi(k,u),Math.abs(d.endAngle-d.startAngle)0?"right":"left":Y>0?"left":"right"}var B=Math.PI,F=0,V=y.get("rotate");if(Object(g["isNumber"])(V))F=V*(B/180);else if("center"===v)F=0;else if("radial"===V||!0===V){var W=Y<0?-I+B:-I;F=W}else if("tangential"===V&&"outside"!==v&&"outer"!==v){var G=Math.atan2(Y,C);G<0&&(G=2*B+G);var U=C>0;U&&(G=B+G),F=G-B}if(a=!!F,h.x=T,h.y=D,h.rotation=F,h.setStyle({verticalAlign:"middle"}),j){h.setStyle({align:A});var X=h.states.select;X&&(X.x+=h.x,X.y+=h.y)}else{var Z=h.getBoundingRect().clone();Z.applyTransform(h.getComputedTransform());var q=(h.style.margin||0)+2.1;Z.y-=q/2,Z.height+=q,r.push({label:h,labelLine:_,position:v,len:L,len2:k,minTurnAngle:S.get("minTurnAngle"),maxSurfaceAngle:S.get("maxSurfaceAngle"),surfaceNormal:new Yt(Y,C),linePoints:O,textAlign:A,labelDistance:b,labelAlignTo:x,edgeDistance:w,bleedMargin:M,rect:Z,unconstrainedWidth:Z.width,labelStyleWidth:h.style.width})}s.setTextConfig({inside:j})}})),!a&&t.get("avoidLabelOverlap")&&XD(r,e,n,l,u,h,c,d);for(var _=0;_0){for(var l=a.getItemLayout(0),u=1;isNaN(l&&l.startAngle)&&u=i.r0}},e.type="pie",e}(pm),tO=QD;function eO(t,e,n){e=Object(g["isArray"])(e)&&{coordDimensions:e}||Object(g["extend"])({encodeDefine:t.getEncode()},e);var i=t.getSource(),r=Kx(i,e).dimensions,a=new Zx(r,t);return a.initData(i,n),a}var nO=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}(),iO=nO,rO=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return f(e,t),e.prototype.init=function(e){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new iO(g["bind"](this.getData,this),g["bind"](this.getRawData,this)),this._defaultLabelLine(e)},e.prototype.mergeOption=function(){t.prototype.mergeOption.apply(this,arguments)},e.prototype.getInitialData=function(){var t=eO(this,{coordDimensions:["value"],encodeDefaulter:g["curry"](Cd,this)}),e=[];return t.each(t.mapDimension("value"),(function(t){e.push(t)})),this.seats=or(e,t.hostModel.get("percentPrecision")),t},e.prototype.getDataParams=function(e){var n=t.prototype.getDataParams.call(this,e);return n.percent=this.seats[e],n.$vars.push("percent"),n},e.prototype._defaultLabelLine=function(t){Tr(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}(Wf),aO=rO;function oO(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!(Object(g["isNumber"])(i)&&!isNaN(i)&&i<0)}))}}}function sO(t){t.registerChartView(tO),t.registerSeriesModel(aO),uy("pie",t.registerAction),t.registerLayout(Object(g["curry"])(VD,"pie")),t.registerProcessor(WD("pie")),t.registerProcessor(oO("pie"))}var lO=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.hasSymbolVisual=!0,n}return f(e,t),e.prototype.getInitialData=function(t,e){return pw(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}(Wf),uO=lO,cO=4,dO=function(){function t(){}return t}(),hO=function(t){function e(e){var n=t.call(this,e)||this;return n._off=0,n.hoverDataIdx=-1,n}return f(e,t),e.prototype.getDefaultShape=function(){return new dO},e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.buildPath=function(t,e){var n,i=e.points,r=e.size,a=this.symbolProxy,o=a.shape,s=t.getContext?t.getContext():t,l=s&&r[0]=0;s--){var l=2*s,u=i[l]-a/2,c=i[l+1]-o/2;if(t>=u&&e>=c&&t<=u+a&&e<=c+o)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],a=i[1],o=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}(),fO=pO,_O=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return f(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=JT("").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 fO:new fT,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}(pm),gO=_O,mO=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return f(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}(gd),yO=mO,vO=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return f(e,t),e.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",$r).models[0]},e.type="cartesian2dAxis",e}(gd);g["mixin"](vO,NM);var bO={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)"]}}},xO=g["merge"]({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},bO),wO=g["merge"]({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}}},bO),MO=g["merge"]({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},wO),SO=g["defaults"]({logBase:10},wO),LO={category:xO,value:wO,time:MO,log:SO},kO={value:1,category:1,time:1,log:1};function TO(t,e,n,i){Object(g["each"])(kO,(function(r,a){var o=Object(g["merge"])(Object(g["merge"])({},LO[a],!0),i,!0),s=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e+"Axis."+a,n}return f(n,t),n.prototype.mergeDefaultAndTheme=function(t,e){var n=ud(this),i=n?dd(t):{},r=e.getTheme();Object(g["merge"])(t,r.get(a+"Axis")),Object(g["merge"])(t,this.getDefaultOption()),t.type=DO(t),n&&cd(t,i,n)},n.prototype.optionUpdated=function(){var t=this.option;"category"===t.type&&(this.__ordinalMeta=vw.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=o,n}(n);t.registerComponentModel(s)})),t.registerSubTypeDefaulter(e+"Axis",DO)}function DO(t){return t.type||(t.data?"category":"value")}var OO=function(){function t(t){this.type="cartesian",this._dimList=[],this._axes={},this.name=t||""}return t.prototype.getAxis=function(t){return this._axes[t]},t.prototype.getAxes=function(){return g["map"](this._dimList,(function(t){return this._axes[t]}),this)},t.prototype.getAxesByScale=function(t){return t=t.toLowerCase(),g["filter"](this.getAxes(),(function(e){return e.scale.type===t}))},t.prototype.addAxis=function(t){var e=t.dim;this._axes[e]=t,this._dimList.push(e)},t}(),AO=OO,IO=["x","y"];function YO(t){return"interval"===t.type||"time"===t.type}var CO=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="cartesian2d",e.dimensions=IO,e}return f(e,t),e.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var t=this.getAxis("x").scale,e=this.getAxis("y").scale;if(YO(t)&&YO(e)){var n=t.getExtent(),i=e.getExtent(),r=this.dataToPoint([n[0],i[0]]),a=this.dataToPoint([n[1],i[1]]),o=n[1]-n[0],s=i[1]-i[0];if(o&&s){var l=(a[0]-r[0])/o,u=(a[1]-r[1])/s,c=r[0]-n[0]*l,d=r[1]-i[0]*u,h=this._transform=[l,0,0,u,c,d];this._invTransform=Ot([],h)}}},e.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},e.prototype.containPoint=function(t){var e=this.getAxis("x"),n=this.getAxis("y");return e.contain(e.toLocalCoord(t[0]))&&n.contain(n.toLocalCoord(t[1]))},e.prototype.containData=function(t){return this.getAxis("x").containData(t[0])&&this.getAxis("y").containData(t[1])},e.prototype.containZone=function(t,e){var n=this.dataToPoint(t),i=this.dataToPoint(e),r=this.getArea(),a=new Ft(n[0],n[1],i[0]-n[0],i[1]-n[1]);return r.intersect(a)},e.prototype.dataToPoint=function(t,e,n){n=n||[];var i=t[0],r=t[1];if(this._transform&&null!=i&&isFinite(i)&&null!=r&&isFinite(r))return H(n,t,this._transform);var a=this.getAxis("x"),o=this.getAxis("y");return n[0]=a.toGlobalCoord(a.dataToCoord(i,e)),n[1]=o.toGlobalCoord(o.dataToCoord(r,e)),n},e.prototype.clampData=function(t,e){var n=this.getAxis("x").scale,i=this.getAxis("y").scale,r=n.getExtent(),a=i.getExtent(),o=n.parse(t[0]),s=i.parse(t[1]);return e=e||[],e[0]=Math.min(Math.max(Math.min(r[0],r[1]),o),Math.max(r[0],r[1])),e[1]=Math.min(Math.max(Math.min(a[0],a[1]),s),Math.max(a[0],a[1])),e},e.prototype.pointToData=function(t,e){var n=[];if(this._invTransform)return H(n,t,this._invTransform);var i=this.getAxis("x"),r=this.getAxis("y");return n[0]=i.coordToData(i.toLocalCoord(t[0]),e),n[1]=r.coordToData(r.toLocalCoord(t[1]),e),n},e.prototype.getOtherAxis=function(t){return this.getAxis("x"===t.dim?"y":"x")},e.prototype.getArea=function(){var t=this.getAxis("x").getGlobalExtent(),e=this.getAxis("y").getGlobalExtent(),n=Math.min(t[0],t[1]),i=Math.min(e[0],e[1]),r=Math.max(t[0],t[1])-n,a=Math.max(e[0],e[1])-i;return new Ft(n,i,r,a)},e}(AO),jO=CO,PO=function(t){function e(e,n,i,r,a){var o=t.call(this,e,n,i)||this;return o.index=0,o.type=r||"value",o.position=a||"bottom",o}return f(e,t),e.prototype.isHorizontal=function(){var t=this.position;return"top"===t||"bottom"===t},e.prototype.getGlobalExtent=function(t){var e=this.getExtent();return e[0]=this.toGlobalCoord(e[0]),e[1]=this.toGlobalCoord(e[1]),t&&e[0]>e[1]&&e.reverse(),e},e.prototype.pointToData=function(t,e){return this.coordToData(this.toLocalCoord(t["x"===this.dim?0:1]),e)},e.prototype.setCategorySortInfo=function(t){if("category"!==this.type)return!1;this.model.option.categorySortInfo=t,this.scale.setSortInfo(t)},e}(kS),EO=PO;function RO(t,e,n){n=n||{};var i=t.coordinateSystem,r=e.axis,a={},o=r.getAxesOnZeroOf()[0],s=r.position,l=o?"onZero":s,u=r.dim,c=i.getRect(),d=[c.x,c.x+c.width,c.y,c.y+c.height],h={left:0,right:1,top:0,bottom:1,onZero:2},p=e.get("offset")||0,f="x"===u?[d[2]-p,d[3]+p]:[d[0]-p,d[1]+p];if(o){var _=o.toGlobalCoord(o.dataToCoord(0));f[h.onZero]=Math.max(Math.min(_,f[1]),f[0])}a.position=["y"===u?f[h[l]]:d[0],"x"===u?f[h[l]]:d[3]],a.rotation=Math.PI/2*("x"===u?0:1);var m={top:-1,bottom:1,left:-1,right:1};a.labelDirection=a.tickDirection=a.nameDirection=m[s],a.labelOffset=o?f[h[s]]-f[h.onZero]:0,e.get(["axisTick","inside"])&&(a.tickDirection=-a.tickDirection),g["retrieve"](n.labelInside,e.get(["axisLabel","inside"]))&&(a.labelDirection=-a.labelDirection);var y=e.get(["axisLabel","rotate"]);return a.labelRotate="top"===l?-y:y,a.z2=1,a}function NO(t){return"cartesian2d"===t.get("coordinateSystem")}function HO(t){var e={xAxisModel:null,yAxisModel:null};return g["each"](e,(function(n,i){var r=i.replace(/Model$/,""),a=t.getReferringComponents(r,$r).models[0];e[i]=a})),e}var zO=Math.log;function BO(t,e,n){var i=Cw.prototype,r=i.getTicks.call(n),a=i.getTicks.call(n,!0),o=r.length-1,s=i.getInterval.call(n),l=LM(t,e),u=l.extent,c=l.fixMin,d=l.fixMax;if("log"===t.type){var h=zO(t.base);u=[zO(u[0])/h,zO(u[1])/h]}t.setExtent(u[0],u[1]),t.calcNiceExtent({splitNumber:o,fixMin:c,fixMax:d});var p=i.getExtent.call(t);c&&(u[0]=p[0]),d&&(u[1]=p[1]);var f=i.getInterval.call(t),_=u[0],g=u[1];if(c&&d)f=(g-_)/o;else if(c){g=u[0]+f*o;while(gu[0]&&isFinite(_)&&isFinite(u[0]))f=ww(f),_=u[1]-f*o}else{var m=t.getTicks().length-1;m>o&&(f=ww(f));var y=f*o;g=Math.ceil(u[1]/f)*f,_=tr(g-y),_<0&&u[0]>=0?(_=0,g=tr(y)):g>0&&u[1]<=0&&(g=0,_=-tr(y))}var v=(r[0].value-a[0].value)/s,b=(r[o].value-a[o].value)/s;i.setExtent.call(t,_+f*v,g+f*b),i.setInterval.call(t,f),(v||b)&&i.setNiceExtent.call(t,_+f,g-f)}var FO=function(){function t(t,e,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=IO,this._initCartesian(t,e,n),this.model=t}return t.prototype.getRect=function(){return this._rect},t.prototype.update=function(t,e){var n=this._axesMap;function i(t){var e,n=Object(g["keys"])(t),i=n.length;if(i){for(var r=[],a=i-1;a>=0;a--){var o=+n[a],s=t[o],l=s.model,u=s.scale;bw(u)&&l.get("alignTicks")&&null==l.get("interval")?r.push(s):(TM(u,l),bw(u)&&(e=s))}r.length&&(e||(e=r.pop(),TM(e.scale,e.model)),Object(g["each"])(r,(function(t){BO(t.scale,t.model,e.scale)})))}}this._updateScale(t,this.model),i(n.x),i(n.y);var r={};Object(g["each"])(n.x,(function(t){WO(n,"y",t,r)})),Object(g["each"])(n.y,(function(t){WO(n,"x",t,r)})),this.resize(this.model,e)},t.prototype.resize=function(t,e,n){var i=t.getBoxLayoutParams(),r=!n&&t.get("containLabel"),a=od(i,{width:e.getWidth(),height:e.getHeight()});this._rect=a;var o=this._axesList;function s(){Object(g["each"])(o,(function(t){var e=t.isHorizontal(),n=e?[0,a.width]:[0,a.height],i=t.inverse?1:0;t.setExtent(n[i],n[1-i]),UO(t,e?a.x:a.y)}))}s(),r&&(Object(g["each"])(o,(function(t){if(!t.model.get(["axisLabel","inside"])){var e=YM(t);if(e){var n=t.isHorizontal()?"height":"width",i=t.model.get(["axisLabel","margin"]);a[n]-=e[n]+i,"top"===t.position?a.y+=e.height+i:"left"===t.position&&(a.x+=e.width+i)}}})),s()),Object(g["each"])(this._coordsList,(function(t){t.calcAffineTransform()}))},t.prototype.getAxis=function(t,e){var n=this._axesMap[t];if(null!=n)return n[e||0]},t.prototype.getAxes=function(){return this._axesList.slice()},t.prototype.getCartesian=function(t,e){if(null!=t&&null!=e){var n="x"+t+"y"+e;return this._coordsMap[n]}Object(g["isObject"])(t)&&(e=t.yAxisIndex,t=t.xAxisIndex);for(var i=0,r=this._coordsList;i0?"top":"bottom",i="center"):cr(a-ZO)?(r=n>0?"bottom":"top",i="center"):(r="middle",i=a>0&&a0?"right":"left":n>0?"left":"right"),{rotation:a,textAlign:i,textVerticalAlign:r}},t.makeAxisEventDataBase=function(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e},t.isLabelSilent=function(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)},t}(),KO={axisLine:function(t,e,n,i){var r=e.get(["axisLine","show"]);if("auto"===r&&t.handleAutoShown&&(r=t.handleAutoShown("axisLine")),r){var a=e.axis.getExtent(),o=i.transform,s=[a[0],0],l=[a[1],0],u=s[0]>l[0];o&&(H(s,s,o),H(l,l,o));var c=Object(g["extend"])({lineCap:"round"},e.getModel(["axisLine","lineStyle"]).getLineStyle()),d=new eg({shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:c,strokeContainThreshold:t.strokeContainThreshold||5,silent:!0,z2:1});zg(d.shape,d.style.lineWidth),d.anid="line",n.add(d);var h=e.get(["axisLine","symbol"]);if(null!=h){var p=e.get(["axisLine","symbolSize"]);Object(g["isString"])(h)&&(h=[h,h]),(Object(g["isString"])(p)||Object(g["isNumber"])(p))&&(p=[p,p]);var f=Dy(e.get(["axisLine","symbolOffset"])||0,p),_=p[0],m=p[1];Object(g["each"])([{rotate:t.rotation+Math.PI/2,offset:f[0],r:0},{rotate:t.rotation-Math.PI/2,offset:f[1],r:Math.sqrt((s[0]-l[0])*(s[0]-l[0])+(s[1]-l[1])*(s[1]-l[1]))}],(function(e,i){if("none"!==h[i]&&null!=h[i]){var r=ky(h[i],-_/2,-m/2,_,m,c.stroke,!0),a=e.r+e.offset,o=u?l:s;r.attr({rotation:e.rotate,x:o[0]+a*Math.cos(t.rotation),y:o[1]-a*Math.sin(t.rotation),silent:!0,z2:11}),n.add(r)}}))}}},axisTickLabel:function(t,e,n,i){var r=iA(n,i,e,t),a=aA(n,i,e,t);if($O(e,a,r),rA(n,i,e,t.tickDirection),e.get(["axisLabel","hideOverlap"])){var o=eL(Object(g["map"])(a,(function(t){return{label:t,priority:t.z2,defaultAttr:{ignore:t.ignore}}})));aL(o)}},axisName:function(t,e,n,i){var r=Object(g["retrieve"])(t.axisName,e.get("name"));if(r){var a,o,s=e.get("nameLocation"),l=t.nameDirection,u=e.getModel("nameTextStyle"),c=e.get("nameGap")||0,d=e.axis.getExtent(),h=d[0]>d[1]?-1:1,p=["start"===s?d[0]-h*c:"end"===s?d[1]+h*c:(d[0]+d[1])/2,eA(s)?t.labelOffset+l*c:0],f=e.get("nameRotate");null!=f&&(f=f*ZO/180),eA(s)?a=qO.innerTextLayout(t.rotation,null!=f?f:t.rotation,l):(a=JO(t.rotation,s,f||0,d),o=t.axisNameAvailableWidth,null!=o&&(o=Math.abs(o/Math.sin(a.rotation)),!isFinite(o)&&(o=null)));var _=u.getFont(),m=e.get("nameTruncate",!0)||{},y=m.ellipsis,v=Object(g["retrieve"])(t.nameTruncateMaxWidth,m.maxWidth,o),b=new Fs({x:p[0],y:p[1],rotation:a.rotation,silent:qO.isLabelSilent(e),style:xu(u,{text:r,font:_,overflow:"truncate",width:v,ellipsis:y,fill:u.getTextColor()||e.get(["axisLine","lineStyle","color"]),align:u.get("align")||a.textAlign,verticalAlign:u.get("verticalAlign")||a.textVerticalAlign}),z2:1});if(nm({el:b,componentModel:e,itemName:r}),b.__fullText=r,b.anid="name",e.get("triggerEvent")){var x=qO.makeAxisEventDataBase(e);x.targetType="axisName",x.name=r,Vs(b).eventData=x}i.add(b),b.updateTransform(),n.add(b),b.decomposeTransform()}}};function JO(t,e,n,i){var r,a,o=ur(n-t),s=i[0]>i[1],l="start"===e&&!s||"start"!==e&&s;return cr(o-ZO/2)?(a=l?"bottom":"top",r="center"):cr(o-1.5*ZO)?(a=l?"top":"bottom",r="center"):(a="middle",r=o<1.5*ZO&&o>ZO/2?l?"left":"right":l?"right":"left"),{rotation:o,textAlign:r,textVerticalAlign:a}}function $O(t,e,n){if(!PM(t.axis)){var i=t.get(["axisLabel","showMinLabel"]),r=t.get(["axisLabel","showMaxLabel"]);e=e||[],n=n||[];var a=e[0],o=e[1],s=e[e.length-1],l=e[e.length-2],u=n[0],c=n[1],d=n[n.length-1],h=n[n.length-2];!1===i?(QO(a),QO(u)):tA(a,o)&&(i?(QO(o),QO(c)):(QO(a),QO(u))),!1===r?(QO(s),QO(d)):tA(l,s)&&(r?(QO(l),QO(h)):(QO(s),QO(d)))}}function QO(t){t&&(t.ignore=!0)}function tA(t,e){var n=t&&t.getBoundingRect().clone(),i=e&&e.getBoundingRect().clone();if(n&&i){var r=Mt([]);return Tt(r,r,-t.rotation),n.applyTransform(Lt([],r,t.getLocalTransform())),i.applyTransform(Lt([],r,e.getLocalTransform())),n.intersect(i)}}function eA(t){return"middle"===t||"center"===t}function nA(t,e,n,i,r){for(var a=[],o=[],s=[],l=0;l=0||t===e}function pA(t){var e=fA(t);if(e){var n=e.axisPointerModel,i=e.axis.scale,r=n.option,a=n.get("status"),o=n.get("value");null!=o&&(o=i.parse(o));var s=gA(n);null==a&&(r.status=s?"show":"hide");var l=i.getExtent().slice();l[0]>l[1]&&l.reverse(),(null==o||o>l[1])&&(o=l[1]),o0&&!d.min?d.min=0:null!=d.min&&d.min<0&&!d.max&&(d.max=0);var h=o;null!=d.color&&(h=g["defaults"]({color:d.color},o));var p=g["merge"](g["clone"](d),{boundaryGap:t,splitNumber:e,scale:n,axisLine:i,axisTick:r,axisLabel:a,name:d.text,showName:s,nameLocation:"end",nameGap:u,nameTextStyle:h,triggerEvent:c},!1);if(g["isString"](l)){var f=p.name;p.name=l.replace("{value}",null!=f?f:"")}else g["isFunction"](l)&&(p.name=l(p.name,p));var _=new Gu(p,null,this.ecModel);return g["mixin"](_,NM.prototype),_.mainType="radar",_.componentIndex=this.componentIndex,_}),this);this._indicatorModels=d},e.prototype.getIndicatorModels=function(){return this._indicatorModels},e.type="radar",e.defaultOption={z:0,center:["50%","50%"],radius:"75%",startAngle:90,axisName:{show:!0},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:g["merge"]({lineStyle:{color:"#bbb"}},FA.axisLine),axisLabel:VA(FA.axisLabel,!1),axisTick:VA(FA.axisTick,!1),splitLine:VA(FA.splitLine,!0),splitArea:VA(FA.splitArea,!0),indicator:[]},e}(gd),GA=WA,UA=["axisLine","axisTickLabel","axisName"],XA=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return f(e,t),e.prototype.render=function(t,e,n){var i=this.group;i.removeAll(),this._buildAxes(t),this._buildSplitLineAndArea(t)},e.prototype._buildAxes=function(t){var e=t.coordinateSystem,n=e.getIndicatorAxes(),i=g["map"](n,(function(t){var n=t.model.get("showName")?t.name:"",i=new oA(t.model,{axisName:n,position:[e.cx,e.cy],rotation:t.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return i}));g["each"](i,(function(t){g["each"](UA,t.add,t),this.group.add(t.getGroup())}),this)},e.prototype._buildSplitLineAndArea=function(t){var e=t.coordinateSystem,n=e.getIndicatorAxes();if(n.length){var i=t.get("shape"),r=t.getModel("splitLine"),a=t.getModel("splitArea"),o=r.getModel("lineStyle"),s=a.getModel("areaStyle"),l=r.get("show"),u=a.get("show"),c=o.get("color"),d=s.get("color"),h=g["isArray"](c)?c:[c],p=g["isArray"](d)?d:[d],f=[],_=[];if("circle"===i)for(var m=n[0].getTicksCoords(),y=e.cx,v=e.cy,b=0;b3?1.4:r>1?1.2:1.1,l=i>0?s:1/s;sI(this,"zoom","zoomOnMouseWheel",t,{scale:l,originX:a,originY:o,isAvailableBehavior:null})}if(n){var u=Math.abs(i),c=(i>0?1:-1)*(u>3?.4:u>1?.15:.05);sI(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:c,originX:a,originY:o,isAvailableBehavior:null})}}},e.prototype._pinchHandler=function(t){if(!rI(this._zr,"globalPan")){var e=t.pinchScale>1?1.1:1/1.1;sI(this,"zoom",null,t,{scale:e,originX:t.pinchX,originY:t.pinchY,isAvailableBehavior:null})}},e}(U);function sI(t,e,n,i,r){t.pointerChecker&&t.pointerChecker(i,r.originX,r.originY)&&(gt(i.event),lI(t,e,n,i,r))}function lI(t,e,n,i,r){r.isAvailableBehavior=Object(g["bind"])(uI,null,n,i),t.trigger(e,r)}function uI(t,e,n){var i=n[t];return!t||i&&(!Object(g["isString"])(i)||e.event[i+"Key"])}var cI=oI;function dI(t,e,n){var i=t.target;i.x+=e,i.y+=n,i.dirty()}function hI(t,e,n,i){var r=t.target,a=t.zoomLimit,o=t.zoom=t.zoom||1;if(o*=e,a){var s=a.min||0,l=a.max||1/0;o=Math.max(Math.min(l,o),s)}var u=o/t.zoom;t.zoom=o,r.x-=(n-r.x)*(u-1),r.y-=(i-r.y)*(u-1),r.scaleX*=u,r.scaleY*=u,r.dirty()}var pI,fI={axisPointer:1,tooltip:1,brush:1};function _I(t,e,n){var i=e.getComponentByElement(t.topTarget),r=i&&i.coordinateSystem;return i&&i!==n&&!fI.hasOwnProperty(i.mainType)&&r&&r.model!==n}function gI(t){if(Object(g["isString"])(t)){var e=new DOMParser;t=e.parseFromString(t,"text/xml")}var n=t;9===n.nodeType&&(n=n.firstChild);while("svg"!==n.nodeName.toLowerCase()||1!==n.nodeType)n=n.nextSibling;return n}var mI={fill:"fill",stroke:"stroke","stroke-width":"lineWidth",opacity:"opacity","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-miterlimit":"miterLimit","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","text-anchor":"textAlign",visibility:"visibility",display:"display"},yI=Object(g["keys"])(mI),vI={"alignment-baseline":"textBaseline","stop-color":"stopColor"},bI=Object(g["keys"])(vI),xI=function(){function t(){this._defs={},this._root=null}return t.prototype.parse=function(t,e){e=e||{};var n=gI(t);this._defsUsePending=[];var i=new Ri;this._root=i;var r=[],a=n.getAttribute("viewBox")||"",o=parseFloat(n.getAttribute("width")||e.width),s=parseFloat(n.getAttribute("height")||e.height);isNaN(o)&&(o=null),isNaN(s)&&(s=null),TI(n,i,null,!0,!1);var l,u,c=n.firstChild;while(c)this._parseNode(c,i,r,null,!1,!1),c=c.nextSibling;if(II(this._defs,this._defsUsePending),this._defsUsePending=[],a){var d=CI(a);d.length>=4&&(l={x:parseFloat(d[0]||0),y:parseFloat(d[1]||0),width:parseFloat(d[2]),height:parseFloat(d[3])})}if(l&&null!=o&&null!=s&&(u=zI(l,{x:0,y:0,width:o,height:s}),!e.ignoreViewBox)){var h=i;i=new Ri,i.add(h),h.scaleX=h.scaleY=u.scale,h.x=u.x,h.y=u.y}return e.ignoreRootClip||null==o||null==s||i.setClipPath(new Ss({shape:{x:0,y:0,width:o,height:s}})),{root:i,width:o,height:s,viewBoxRect:l,viewBoxTransform:u,named:r}},t.prototype._parseNode=function(t,e,n,i,r,a){var o,s=t.nodeName.toLowerCase(),l=i;if("defs"===s&&(r=!0),"text"===s&&(a=!0),"defs"===s||"switch"===s)o=e;else{if(!r){var u=pI[s];if(u&&Object(g["hasOwn"])(pI,s)){o=u.call(this,t,e);var c=t.getAttribute("name");if(c){var d={name:c,namedFrom:null,svgNodeTagLower:s,el:o};n.push(d),"g"===s&&(l=d)}else i&&n.push({name:i.name,namedFrom:i,svgNodeTagLower:s,el:o});e.add(o)}}var h=wI[s];if(h&&Object(g["hasOwn"])(wI,s)){var p=h.call(this,t),f=t.getAttribute("id");f&&(this._defs[f]=p)}}if(o&&o.isGroup){var _=t.firstChild;while(_)1===_.nodeType?this._parseNode(_,o,n,l,r,a):3===_.nodeType&&a&&this._parseText(_,o),_=_.nextSibling}},t.prototype._parseText=function(t,e){var n=new cs({style:{text:t.textContent},silent:!0,x:this._textX||0,y:this._textY||0});LI(e,n),TI(t,n,this._defsUsePending,!1,!1),DI(n,e);var i=n.style,r=i.fontSize;r&&r<9&&(i.fontSize=9,n.scaleX*=r/9,n.scaleY*=r/9);var a=(i.fontSize||i.fontFamily)&&[i.fontStyle,i.fontWeight,(i.fontSize||12)+"px",i.fontFamily||"sans-serif"].join(" ");i.font=a;var o=n.getBoundingRect();return this._textX+=o.width,e.add(n),n},t.internalField=function(){pI={g:function(t,e){var n=new Ri;return LI(e,n),TI(t,n,this._defsUsePending,!1,!1),n},rect:function(t,e){var n=new Ss;return LI(e,n),TI(t,n,this._defsUsePending,!1,!1),n.setShape({x:parseFloat(t.getAttribute("x")||"0"),y:parseFloat(t.getAttribute("y")||"0"),width:parseFloat(t.getAttribute("width")||"0"),height:parseFloat(t.getAttribute("height")||"0")}),n.silent=!0,n},circle:function(t,e){var n=new v_;return LI(e,n),TI(t,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(t.getAttribute("cx")||"0"),cy:parseFloat(t.getAttribute("cy")||"0"),r:parseFloat(t.getAttribute("r")||"0")}),n.silent=!0,n},line:function(t,e){var n=new eg;return LI(e,n),TI(t,n,this._defsUsePending,!1,!1),n.setShape({x1:parseFloat(t.getAttribute("x1")||"0"),y1:parseFloat(t.getAttribute("y1")||"0"),x2:parseFloat(t.getAttribute("x2")||"0"),y2:parseFloat(t.getAttribute("y2")||"0")}),n.silent=!0,n},ellipse:function(t,e){var n=new w_;return LI(e,n),TI(t,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(t.getAttribute("cx")||"0"),cy:parseFloat(t.getAttribute("cy")||"0"),rx:parseFloat(t.getAttribute("rx")||"0"),ry:parseFloat(t.getAttribute("ry")||"0")}),n.silent=!0,n},polygon:function(t,e){var n,i=t.getAttribute("points");i&&(n=kI(i));var r=new Z_({shape:{points:n||[]},silent:!0});return LI(e,r),TI(t,r,this._defsUsePending,!1,!1),r},polyline:function(t,e){var n,i=t.getAttribute("points");i&&(n=kI(i));var r=new J_({shape:{points:n||[]},silent:!0});return LI(e,r),TI(t,r,this._defsUsePending,!1,!1),r},image:function(t,e){var n=new _s;return LI(e,n),TI(t,n,this._defsUsePending,!1,!1),n.setStyle({image:t.getAttribute("xlink:href")||t.getAttribute("href"),x:+t.getAttribute("x"),y:+t.getAttribute("y"),width:+t.getAttribute("width"),height:+t.getAttribute("height")}),n.silent=!0,n},text:function(t,e){var n=t.getAttribute("x")||"0",i=t.getAttribute("y")||"0",r=t.getAttribute("dx")||"0",a=t.getAttribute("dy")||"0";this._textX=parseFloat(n)+parseFloat(r),this._textY=parseFloat(i)+parseFloat(a);var o=new Ri;return LI(e,o),TI(t,o,this._defsUsePending,!1,!0),o},tspan:function(t,e){var n=t.getAttribute("x"),i=t.getAttribute("y");null!=n&&(this._textX=parseFloat(n)),null!=i&&(this._textY=parseFloat(i));var r=t.getAttribute("dx")||"0",a=t.getAttribute("dy")||"0",o=new Ri;return LI(e,o),TI(t,o,this._defsUsePending,!1,!0),this._textX+=parseFloat(r),this._textY+=parseFloat(a),o},path:function(t,e){var n=t.getAttribute("d")||"",i=p_(n);return LI(e,i),TI(t,i,this._defsUsePending,!1,!1),i.silent=!0,i}}}(),t}(),wI={lineargradient:function(t){var e=parseInt(t.getAttribute("x1")||"0",10),n=parseInt(t.getAttribute("y1")||"0",10),i=parseInt(t.getAttribute("x2")||"10",10),r=parseInt(t.getAttribute("y2")||"0",10),a=new _g(e,n,i,r);return MI(t,a),SI(t,a),a},radialgradient:function(t){var e=parseInt(t.getAttribute("cx")||"0",10),n=parseInt(t.getAttribute("cy")||"0",10),i=parseInt(t.getAttribute("r")||"0",10),r=new mg(e,n,i);return MI(t,r),SI(t,r),r}};function MI(t,e){var n=t.getAttribute("gradientUnits");"userSpaceOnUse"===n&&(e.global=!0)}function SI(t,e){var n=t.firstChild;while(n){if(1===n.nodeType&&"stop"===n.nodeName.toLocaleLowerCase()){var i=n.getAttribute("offset"),r=void 0;r=i&&i.indexOf("%")>0?parseInt(i,10)/100:i?parseFloat(i):0;var a={};NI(n,a,a);var o=a.stopColor||n.getAttribute("stop-color")||"#000000";e.colorStops.push({offset:r,color:o})}n=n.nextSibling}}function LI(t,e){t&&t.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),Object(g["defaults"])(e.__inheritedStyle,t.__inheritedStyle))}function kI(t){for(var e=CI(t),n=[],i=0;i0;a-=2){var o=i[a],s=i[a-1],l=CI(o);switch(r=r||wt(),s){case"translate":kt(r,r,[parseFloat(l[0]),parseFloat(l[1]||"0")]);break;case"scale":Dt(r,r,[parseFloat(l[0]),parseFloat(l[1]||l[0])]);break;case"rotate":Tt(r,r,-parseFloat(l[0])*PI);break;case"skewX":var u=Math.tan(parseFloat(l[0])*PI);Lt(r,[1,0,u,1,0,0],r);break;case"skewY":var c=Math.tan(parseFloat(l[0])*PI);Lt(r,[1,c,0,1,0,0],r);break;case"matrix":r[0]=parseFloat(l[0]),r[1]=parseFloat(l[1]),r[2]=parseFloat(l[2]),r[3]=parseFloat(l[3]),r[4]=parseFloat(l[4]),r[5]=parseFloat(l[5]);break}}e.setLocalTransform(r)}}var RI=/([^\s:;]+)\s*:\s*([^:;]+)/g;function NI(t,e,n){var i=t.getAttribute("style");if(i){var r;RI.lastIndex=0;while(null!=(r=RI.exec(i))){var a=r[1],o=Object(g["hasOwn"])(mI,a)?mI[a]:null;o&&(e[o]=r[2]);var s=Object(g["hasOwn"])(vI,a)?vI[a]:null;s&&(n[s]=r[2])}}}function HI(t,e,n){for(var i=0;i0,_={api:n,geo:s,mapOrGeoModel:t,data:o,isVisualEncodedByVisualMap:f,isGeo:a,transformInfoRaw:d};"geoJSON"===s.resourceType?this._buildGeoJSON(_):"geoSVG"===s.resourceType&&this._buildSVG(_),this._updateController(t,e,n),this._updateMapSelectHandler(t,l,n,i)},t.prototype._buildGeoJSON=function(t){var e=this._regionsGroupByName=g["createHashMap"](),n=g["createHashMap"](),i=this._regionsGroup,r=t.transformInfoRaw,a=t.mapOrGeoModel,o=t.data,s=t.geo.projection,l=s&&s.stream;function u(t,e){return e&&(t=e(t)),t&&[t[0]*r.scaleX+r.x,t[1]*r.scaleY+r.y]}function c(t){for(var e=[],n=!l&&s&&s.project,i=0;i=0)&&(h=r);var p=o?{normal:{align:"center",verticalAlign:"middle"}}:null;vu(e,bu(i),{labelFetcher:h,labelDataIndex:d,defaultText:n},p);var f=e.getTextContent();if(f&&(hY(f).ignore=f.ignore,e.textConfig&&o)){var _=e.getBoundingRect().clone();e.textConfig.layoutRect=_,e.textConfig.position=[(o[0]-_.x)/_.width*100+"%",(o[1]-_.y)/_.height*100+"%"]}e.disableLabelAnimation=!0}else e.removeTextContent(),e.removeTextConfig(),e.disableLabelAnimation=null}function yY(t,e,n,i,r,a){t.data?t.data.setItemGraphicEl(a,e):Vs(e).eventData={componentType:"geo",componentIndex:r.componentIndex,geoIndex:r.componentIndex,name:n,region:i&&i.option||{}}}function vY(t,e,n,i,r){t.data||nm({el:e,componentModel:r,itemName:n,itemTooltipOption:i.get("tooltip")})}function bY(t,e,n,i,r){e.highDownSilentOnTouch=!!r.get("selectedMode");var a=i.getModel("emphasis"),o=a.get("focus");return Xl(e,o,a.get("blurScope"),a.get("disabled")),t.isGeo&&tu(e,r,n),o}function xY(t,e,n){var i,r=[];function a(){i=[]}function o(){i.length&&(r.push(i),i=[])}var s=e({polygonStart:a,polygonEnd:o,lineStart:a,lineEnd:o,point:function(t,e){isFinite(t)&&isFinite(e)&&i.push([t,e])},sphere:function(){}});return!n&&s.polygonStart(),g["each"](t,(function(t){s.lineStart();for(var e=0;e-1&&(n.style.stroke=n.style.fill,n.style.fill="#fff",n.style.lineWidth=2),n},e.type="series.map",e.dependencies=["geo"],e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:null,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{areaColor:"rgba(255,215,0,0.8)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},nameProperty:"name"},e}(Wf),kY=LY;function TY(t,e){var n={};return g["each"](t,(function(t){t.each(t.mapDimension("value"),(function(e,i){var r="ec-"+t.getName(i);n[r]=n[r]||[],isNaN(e)||n[r].push(e)}))})),t[0].map(t[0].mapDimension("value"),(function(i,r){for(var a,o="ec-"+t[0].getName(r),s=0,l=1/0,u=-1/0,c=n[o].length,d=0;d1?(p.width=h,p.height=h/v):(p.height=h,p.width=h*v),p.y=d[1]-p.height/2,p.x=d[0]-p.width/2;else{var x=t.getBoxLayoutParams();x.aspect=v,p=od(x,{width:m,height:y})}this.setViewRect(p.x,p.y,p.width,p.height),this.setCenter(t.get("center"),e),this.setZoom(t.get("zoom"))}function zY(t,e){g["each"](e.get("geoCoord"),(function(e,n){t.addGeoCoord(n,e)}))}var BY=function(){function t(){this.dimensions=PY}return t.prototype.create=function(t,e){var n=[];function i(t){return{nameProperty:t.get("nameProperty"),aspectScale:t.get("aspectScale"),projection:t.get("projection")}}t.eachComponent("geo",(function(t,r){var a=t.get("map"),o=new NY(a+r,a,g["extend"]({nameMap:t.get("nameMap")},i(t)));o.zoomLimit=t.get("scaleLimit"),n.push(o),t.coordinateSystem=o,o.model=t,o.resize=HY,o.resize(t,e)})),t.eachSeries((function(t){var e=t.get("coordinateSystem");if("geo"===e){var i=t.get("geoIndex")||0;t.coordinateSystem=n[i]}}));var r={};return t.eachSeriesByType("map",(function(t){if(!t.getHostGeoModel()){var e=t.getMapType();r[e]=r[e]||[],r[e].push(t)}})),g["each"](r,(function(t,r){var a=g["map"](t,(function(t){return t.get("nameMap")})),o=new NY(r,r,g["extend"]({nameMap:g["mergeAll"](a)},i(t[0])));o.zoomLimit=g["retrieve"].apply(null,g["map"](t,(function(t){return t.get("scaleLimit")}))),n.push(o),o.resize=HY,o.resize(t[0],e),g["each"](t,(function(t){t.coordinateSystem=o,zY(o,t)}))})),n},t.prototype.getFilledRegions=function(t,e,n,i){for(var r=(t||[]).slice(),a=g["createHashMap"](),o=0;o=0;o--){var s=i[o];s.hierNode={defaultAncestor:null,ancestor:s,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},r.push(s)}}function tC(t,e){var n=t.isExpand?t.children:[],i=t.parentNode.children,r=t.hierNode.i?i[t.hierNode.i-1]:null;if(n.length){aC(t);var a=(n[0].hierNode.prelim+n[n.length-1].hierNode.prelim)/2;r?(t.hierNode.prelim=r.hierNode.prelim+e(t,r),t.hierNode.modifier=t.hierNode.prelim-a):t.hierNode.prelim=a}else r&&(t.hierNode.prelim=r.hierNode.prelim+e(t,r));t.parentNode.hierNode.defaultAncestor=oC(t,r,t.parentNode.hierNode.defaultAncestor||i[0],e)}function eC(t){var e=t.hierNode.prelim+t.parentNode.hierNode.modifier;t.setLayout({x:e},!0),t.hierNode.modifier+=t.parentNode.hierNode.modifier}function nC(t){return arguments.length?t:dC}function iC(t,e){return t-=Math.PI/2,{x:e*Math.cos(t),y:e*Math.sin(t)}}function rC(t,e){return od(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function aC(t){var e=t.children,n=e.length,i=0,r=0;while(--n>=0){var a=e[n];a.hierNode.prelim+=i,a.hierNode.modifier+=i,r+=a.hierNode.change,i+=a.hierNode.shift+r}}function oC(t,e,n,i){if(e){var r=t,a=t,o=a.parentNode.children[0],s=e,l=r.hierNode.modifier,u=a.hierNode.modifier,c=o.hierNode.modifier,d=s.hierNode.modifier;while(s=sC(s),a=lC(a),s&&a){r=sC(r),o=lC(o),r.hierNode.ancestor=t;var h=s.hierNode.prelim+d-a.hierNode.prelim-u+i(s,a);h>0&&(cC(uC(s,t,n),t,h),u+=h,l+=h),d+=s.hierNode.modifier,u+=a.hierNode.modifier,l+=r.hierNode.modifier,c+=o.hierNode.modifier}s&&!sC(r)&&(r.hierNode.thread=s,r.hierNode.modifier+=d-l),a&&!lC(o)&&(o.hierNode.thread=a,o.hierNode.modifier+=u-c,n=t)}return n}function sC(t){var e=t.children;return e.length&&t.isExpand?e[e.length-1]:t.hierNode.thread}function lC(t){var e=t.children;return e.length&&t.isExpand?e[0]:t.hierNode.thread}function uC(t,e,n){return t.hierNode.ancestor.parentNode===e.parentNode?t.hierNode.ancestor:n}function cC(t,e,n){var i=n/(e.hierNode.i-t.hierNode.i);e.hierNode.change-=i,e.hierNode.shift+=n,e.hierNode.modifier+=n,e.hierNode.prelim+=n,t.hierNode.change+=i}function dC(t,e){return t.parentNode===e.parentNode?1:2}var hC=function(){function t(){this.parentPoint=[],this.childPoints=[]}return t}(),pC=function(t){function e(e){return t.call(this,e)||this}return f(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new hC},e.prototype.buildPath=function(t,e){var n=e.childPoints,i=n.length,r=e.parentPoint,a=n[0],o=n[i-1];if(1===i)return t.moveTo(r[0],r[1]),void t.lineTo(a[0],a[1]);var s=e.orient,l="TB"===s||"BT"===s?0:1,u=1-l,c=Qi(e.forkPosition,1),d=[];d[l]=r[l],d[u]=r[u]+(o[u]-r[u])*c,t.moveTo(r[0],r[1]),t.lineTo(d[0],d[1]),t.moveTo(a[0],a[1]),d[l]=a[l],t.lineTo(d[0],d[1]),d[l]=o[l],t.lineTo(d[0],d[1]),t.lineTo(o[0],o[1]);for(var h=1;hv.x,w||(x-=Math.PI));var S=w?"left":"right",L=s.getModel("label"),k=L.get("rotate"),T=k*(Math.PI/180),D=m.getTextContent();D&&(m.setTextConfig({position:L.get("position")||S,rotation:null==k?-x:T,origin:"center"}),D.setStyle("verticalAlign","middle"))}var O=s.get(["emphasis","focus"]),A="relative"===O?g["concatArray"](o.getAncestorsIndices(),o.getDescendantIndices()):"ancestor"===O?o.getAncestorsIndices():"descendant"===O?o.getDescendantIndices():null;A&&(Vs(n).focus=A),mC(r,o,c,n,f,p,_,i),n.__edge&&(n.onHoverStateChange=function(e){if("blur"!==e){var i=o.parentNode&&t.getItemGraphicEl(o.parentNode.dataIndex);i&&i.hoverState===Ks||vl(n.__edge,e)}})}function mC(t,e,n,i,r,a,o,s){var l=e.getModel(),u=t.get("edgeShape"),c=t.get("layout"),d=t.getOrient(),h=t.get(["lineStyle","curveness"]),p=t.get("edgeForkPosition"),f=l.getModel("lineStyle").getLineStyle(),_=i.__edge;if("curve"===u)e.parentNode&&e.parentNode!==n&&(_||(_=i.__edge=new og({shape:xC(c,d,h,r,r)})),lu(_,{shape:xC(c,d,h,a,o)},t));else if("polyline"===u)if("orthogonal"===c){if(e!==n&&e.children&&0!==e.children.length&&!0===e.isExpand){for(var m=e.children,y=[],v=0;ve&&(e=i.height)}this.height=e+1},t.prototype.getNodeById=function(t){if(this.getId()===t)return this;for(var e=0,n=this.children,i=n.length;e=0&&this.hostTree.data.setItemLayout(this.dataIndex,t,e)},t.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},t.prototype.getModel=function(t){if(!(this.dataIndex<0)){var e=this.hostTree,n=e.data.getItemModel(this.dataIndex);return n.getModel(t)}},t.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},t.prototype.setVisual=function(t,e){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,t,e)},t.prototype.getVisual=function(t){return this.hostTree.data.getItemVisual(this.dataIndex,t)},t.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},t.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},t.prototype.getChildIndex=function(){if(this.parentNode){for(var t=this.parentNode.children,e=0;e=0){var i=n.getData().tree.root,r=t.targetNode;if(g["isString"](r)&&(r=i.getNodeById(r)),r&&i.contains(r))return{node:r};var a=t.targetNodeId;if(null!=a&&(r=i.getNodeById(a)))return{node:r}}}function HC(t){var e=[];while(t)t=t.parentNode,t&&e.push(t);return e.reverse()}function zC(t,e){var n=HC(t);return g["indexOf"](n,e)>=0}function BC(t,e){var n=[];while(t){var i=t.dataIndex;n.push({name:t.name,dataIndex:i,value:e.getRawValue(i)}),t=t.parentNode}return n.reverse(),n}var FC=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.hasSymbolVisual=!0,e.ignoreStyleOnData=!0,e}return f(e,t),e.prototype.getInitialData=function(t){var e={name:t.name,children:t.data},n=t.leaves||{},i=new Gu(n,this,this.ecModel),r=RC.createTree(e,this,a);function a(t){t.wrapMethod("getItemModel",(function(t,e){var n=r.getNodeByDataIndex(e);return n&&n.children.length&&n.isExpand||(t.parentModel=i),t}))}var o=0;r.eachNode("preorder",(function(t){t.depth>o&&(o=t.depth)}));var s=t.expandAndCollapse,l=s&&t.initialTreeDepth>=0?t.initialTreeDepth:o;return r.root.eachNode("preorder",(function(t){var e=t.hostTree.data.getRawDataItem(t.dataIndex);t.isExpand=e&&null!=e.collapsed?!e.collapsed:t.depth<=l})),r.data},e.prototype.getOrient=function(){var t=this.get("orient");return"horizontal"===t?t="LR":"vertical"===t&&(t="TB"),t},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.formatTooltip=function(t,e,n){var i=this.getData().tree,r=i.root.children[0],a=i.getNodeByDataIndex(t),o=a.getValue(),s=a.name;while(a&&a!==r)s=a.parentNode.name+"."+s,a=a.parentNode;return ff("nameValue",{name:s,value:o,noValue:isNaN(o)||null==o})},e.prototype.getDataParams=function(e){var n=t.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(e);return n.treeAncestors=BC(i,this),n.collapsed=!i.isExpand,n},e.type="series.tree",e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},e}(Wf),VC=FC;function WC(t,e,n){var i,r=[t],a=[];while(i=r.pop())if(a.push(i),i.isExpand){var o=i.children;if(o.length)for(var s=0;s