0?b(n,0,i+1):b(-n,o-i-1,o),(t-=n)<=0)return}return _(),g<0&&w(-g,.8),v<0&&w(v,.8),_(),x(g,v,1),x(v,g,-1),_(),g<0&&S(-g),v<0&&S(v),c})(t,1,l,l+a)&&function(t){for(var o={list:[],maxY:0},a={list:[],maxY:0},s=0;sn?a:o,c=Math.abs(l.label.y-n);if(c>=u.maxY){var h=l.label.x-e-l.len2*r,p=i+l.len,f=Math.abs(h)t.unconstrainedWidth?null:p:null;i.setStyle("width",d)}UC(o,i)}}}function UC(t,e){YC.rect=t,FS(YC,e,ZC)}var ZC={minMarginForce:[null,0,null,0],marginDefault:[1,0,1,0]},YC={};function XC(t){return"center"===t.position}function jC(t){var e,n,i=t.getData(),r=[],o=!1,a=(t.get("minShowLabelAngle")||0)*HC,s=i.getLayout("viewRect"),l=i.getLayout("r"),u=s.width,c=s.x,h=s.y,p=s.height;function d(t){t.ignore=!0}i.each(function(t){var s=i.getItemGraphicEl(t),h=s.shape,f=s.getTextContent(),g=s.getTextGuideLine(),v=i.getItemModel(t),y=v.getModel("label"),m=y.get("position")||v.get(["emphasis","label","position"]),_=y.get("distanceToLabelLine"),x=y.get("alignTo"),b=No(y.get("edgeDistance"),u),w=y.get("bleedMargin");null==w&&(w=Math.min(u,p)>200?10:2);var S=v.getModel("labelLine"),M=S.get("length");M=No(M,u);var T=S.get("length2");if(T=No(T,u),Math.abs(h.endAngle-h.startAngle)0?"right":"left":P>0?"left":"right"}var F=Math.PI,H=0,G=y.get("rotate");if(K(G))H=G*(F/180);else if("center"===m)H=0;else if("radial"===G||!0===G){H=P<0?-A+F:-A}else if("tangential"===G||"tangential-noflip"===G&&"outside"!==m&&"outer"!==m){var W=Math.atan2(P,L);W<0&&(W=2*F+W),L>0&&"tangential-noflip"!==G&&(W=F+W),H=W-F}if(o=!!H,f.x=k,f.y=C,f.rotation=H,f.setStyle({verticalAlign:"middle"}),O){f.setStyle({align:D});var U=f.states.select;U&&(U.x+=f.x,U.y+=f.y)}else{var Z=new Ue(0,0,0,0);UC(Z,f),r.push({label:f,labelLine:g,position:m,len:M,len2:T,minTurnAngle:S.get("minTurnAngle"),maxSurfaceAngle:S.get("maxSurfaceAngle"),surfaceNormal:new Ae(P,L),linePoints:I,textAlign:D,labelDistance:_,labelAlignTo:x,edgeDistance:b,bleedMargin:w,rect:Z,unconstrainedWidth:Z.width,labelStyleWidth:f.style.width})}s.setTextConfig({inside:O})}}),!o&&t.get("avoidLabelOverlap")&&function(t,e,n,i,r,o,a,s){for(var l=[],u=[],c=Number.MAX_VALUE,h=-Number.MAX_VALUE,p=0;pi?c=u=I+b*i/2:(u=I+S,c=r-S),n.setItemLayout(e,{angle:i,startAngle:u,endAngle:c,clockwise:y,cx:o,cy:a,r0:l,r:m?Ro(t,x,[l,s]):s}),I=r}}),k0){for(var l=o.getItemLayout(0),u=1;isNaN(l&&l.startAngle)&&u=n.r0}},e.type=EC,e}(cy);var eI=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.hasSymbolVisual=!0,n}return n(e,t),e.prototype.getInitialData=function(t,e){return eb(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","matrix"],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:Cf.color.primary}},universalTransition:{divideShape:"clone"}},e}(Qv),nI=function(){},iI=function(t){function e(e){var n=t.call(this,e)||this;return n._off=0,n.hoverDataIdx=-1,n}return n(e,t),e.prototype.getDefaultShape=function(){return new nI},e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.beforeBrush=function(t){t&&!t.contentRetained&&this.reset()},e.prototype.buildPath=function(t,e){var n,i=e.points,r=e.size,o=this.symbolProxy,a=o.shape,s=t.getContext?t.getContext():t,l=s&&r[0]<4,u=this.softClipShape;if(l)this._ctx=s;else{for(this._ctx=null,n=this._off;n=0;s--){var l=2*s,u=i[l]-o/2,c=i[l+1]-a/2;if(t>=u&&e>=c&&t<=u+o&&e<=c+a)return s}return-1},e.prototype.contain=function(t,e){var n=this.transformCoordToLocal(t,e),i=this.getBoundingRect();return t=n[0],e=n[1],i.contain(t,e)?(this.hoverDataIdx=this.findDataIndex(t,e))>=0:(this.hoverDataIdx=-1,!1)},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var e=this.shape,n=e.points,i=e.size,r=i[0],o=i[1],a=1/0,s=1/0,l=-1/0,u=-1/0,c=0;c=0&&(l.dataIndex=n+(t.startIndex||0))})},t.prototype.remove=function(){this._clear()},t.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},t}(),oI=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.render=function(t,e,n){var i=t.getData();this._updateSymbolDraw(i,t).updateData(i,aI(t)),this._finished=!0},e.prototype.incrementalPrepareRender=function(t,e,n){var i=t.getData();this._updateSymbolDraw(i,t).incrementalPrepareUpdate(i),this._finished=!1},e.prototype.incrementalRender=function(t,e,n){this._symbolDraw.incrementalUpdate(t,e.getData(),Za(e),aI(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)return{update:!0};var r=lk("").reset(t,e,n);r.progress&&r.progress({start:0,end:i.count(),count:i.count()},i),this._symbolDraw.updateLayout(aI(t))},e.prototype.eachRendered=function(t){this._symbolDraw&&this._symbolDraw.eachRendered(t)},e.prototype._updateSymbolDraw=function(t,e){var n=this._symbolDraw,i=e.pipelineContext.large;return n&&i===this._isLargeDraw||(n&&n.remove(),n=this._symbolDraw=i?new rI:new PT,this._isLargeDraw=i,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}(cy);function aI(t){return{clipShape:jT(t)}}var sI=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",Da).models[0]},e.type="cartesian2dAxis",e}(kf);B(sI,aw);var lI={show:!0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:"auto",onZeroAxisIndex:null,lineStyle:{color:Cf.color.axisLine,width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15],breakLine:!0},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12,color:Cf.color.axisLabel,textMargin:[0,3]},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:Cf.color.axisSplitLine,width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:[Cf.color.backgroundTint,Cf.color.backgroundTransparent]}},breakArea:{show:!0,itemStyle:{color:Cf.color.neutral00,borderColor:Cf.color.border,borderWidth:1,borderType:[3,3],opacity:.6},zigzagAmplitude:4,zigzagMinSpan:4,zigzagMaxSpan:20,zigzagZ:100,expandOnClick:!0},breakLabelLayout:{moveOverlap:"auto"}},uI=I({boundaryGap:!0,deduplication:null,jitter:0,jitterOverlap:!0,jitterMargin:2,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto",show:"auto"},axisLabel:{interval:"auto"}},lI),cI=I({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:Cf.color.axisMinorSplitLine,width:1}}},lI),hI={category:uI,value:cI,time:I({splitNumber:6,axisLabel:{rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},cI),log:L({logBase:10},cI)};function pI(t,e,i,r){E(Ub,function(o,a){var s=I(I({},hI[a],!0),r,!0),l=function(t){function i(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e+"Axis."+a,n}return n(i,t),i.prototype.mergeDefaultAndTheme=function(t,e){var n=bf(this),i=n?Sf(t):{};I(t,e.getTheme().get(a+"Axis")),I(t,this.getDefaultOption()),t.type=dI(t),n&&wf(t,i,n)},i.prototype.optionUpdated=function(){"category"===this.option.type&&(this.__ordinalMeta=rb.createByAxisModel(this))},i.prototype.getCategories=function(t){var e=this.option;if("category"===e.type)return t?e.data:this.__ordinalMeta.categories},i.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},i.prototype.updateAxisBreaks=function(t){var e=fk();return e?e.updateModelAxisBreak(this,t):{breaks:[]}},i.type=e+"Axis."+a,i.defaultOption=s,i}(i);t.registerComponentModel(l)}),t.registerSubTypeDefaulter(e+"Axis",dI)}function dI(t){return t.type||(t.data?"category":"value")}var fI=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 V(this._dimList,function(t){return this._axes[t]},this)},t.prototype.getAxesByScale=function(t){return t=t.toLowerCase(),H(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}(),gI=["x","y"];function vI(t){return("interval"===t.type||"time"===t.type)&&!gd(t)}var yI=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=nC,e.dimensions=gI,e}return n(e,t),e.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var t=this.getAxis("x").scale,e=this.getAxis("y").scale;if(vI(t)&&vI(e)){var n=hb(t,null),i=hb(e,null),r=this.dataToPoint([n[0],i[0]]),o=this.dataToPoint([n[1],i[1]]),a=n[1]-n[0],s=i[1]-i[0];if(a&&s){var l=(o[0]-r[0])/a,u=(o[1]-r[1])/s,c=r[0]-n[0]*l,h=r[1]-i[0]*u,p=this._transform=[l,0,0,u,c,h];this._invTransform=Ie([],p)}}},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(),o=new Ue(n[0],n[1],i[0]-n[0],i[1]-n[1]);return r.intersect(o)},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 Ut(n,t,this._transform);var o=this.getAxis("x"),a=this.getAxis("y");return n[0]=o.toGlobalCoord(o.dataToCoord(i,e)),n[1]=a.toGlobalCoord(a.dataToCoord(r,e)),n},e.prototype.clampData=function(t,e){var n=this.getAxis("x").scale,i=this.getAxis("y").scale,r=n.getExtent(),o=i.getExtent(),a=n.parse(t[0]),s=i.parse(t[1]);return(e=e||[])[0]=Math.min(Math.max(Math.min(r[0],r[1]),a),Math.max(r[0],r[1])),e[1]=Math.min(Math.max(Math.min(o[0],o[1]),s),Math.max(o[0],o[1])),e},e.prototype.pointToData=function(t,e,n){if(n=n||[],this._invTransform)return Ut(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(t){t=t||0;var e=this.getAxis("x").getGlobalExtent(),n=this.getAxis("y").getGlobalExtent(),i=Math.min(e[0],e[1])-t,r=Math.min(n[0],n[1])-t,o=Math.max(e[0],e[1])-i+t,a=Math.max(n[0],n[1])-r+t;return new Ue(i,r,o,a)},e}(fI);var mI=[[3,1],[0,2]],_I=function(){function t(t,e,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=gI,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){for(var e=W(t),n=[],i=e.length-1;i>=0;i--){var r=t[+e[i]];r.__alignTo?n.push(r):Nw(r)}E(n,function(t){var e,n;e=t,n=t.__alignTo,gd(e.scale)||gd(n.scale)||n.scale.getTicks().length<2?Nw(t):function(t,e){var n,i,r,o=t.scale,a=t.model,s=Lw(o,a,a.ecModel,t,null),l=_b(o),u=_b(e)?e.intervalStub:e,c=l?o.intervalStub:o,h=o.base,p=u.getTicks(),d=u.getTicks({expandToNicedExtent:!0}),f=p.length-1;if(1===f)n=i=0,r=1;else if(2===f){var g=To(p[0].value-p[1].value),v=To(p[1].value-p[2].value);n=i=0,g===v?r=2:(r=1,g=D[1])return!0})):k[1]?(_=D[1],A(function(){if(R(),S=zo(w-x*r,b),P(),m<=D[0])return!0})):A(function(){S=zo(Io(D[0]/x)*x,b),w=zo(Co(D[1]/x)*x,b);var t=ko((w-S)/x);if(t<=r){var e=r-t,n=void 0,i=s.incl0||l;if(i&&0===D[0])n=[0,e];else if(i&&0===D[1])n=[e,0];else{var o=Co(e/2);n=e%2==0?[o,o]:m+_=D[1])return!0}})}iw(o,k,I,[m,_],C,{interval:x,intervalCount:r,intervalPrecision:b,niceExtent:[S,w]})}(t,t.__alignTo.scale)})}E(this._axesList,function(t){Dw(t,1);var e=t.scale;xb(e)&&e.setSortInfo(t.model.get("categorySortInfo"))}),i(n.x),i(n.y);var r={};E(n.x,function(t){xI(n,"y",t,r)}),E(n.y,function(t){xI(n,"x",t,r)}),this.resize(this.model,e)},t.prototype.resize=function(t,e,n){var i=_f(t,e),r=this._rect=yf(t.getBoxLayoutParams(),i.refContainer),o=this._axesMap,a=this._coordsList,s=t.get("containLabel");if(SI(o,r),!n){var l=function(t,e,n,i,r){var o=new Ik(CI);return E(n,function(n){return E(n,function(n){if(ew(n.model)){var a=!i;n.axisBuilder=function(t,e,n,i,r,o){for(var a=Yk(t,n),s=!1,l=!1,u=0;ue?jb:Kb:Kb}(e.scale,0,!1),i=e&&"category"!==e.type&&"time"!==e.type&&n!==Kb;return i&&"auto"===t&&function(t){return Zb(t).noOnMyZero}(e)&&(i=!1),i}function wI(t){for(var e,n=W(t),i=[],r=n.length-1;r>=0;r--){var o=t[+n[r]];vb(o.scale)&&null==nw(o.model,o.type,!0)&&(o.model.get("alignTicks")&&null==o.model.get("interval")?i.push(o):e=o)}e||(e=i.pop()),e&&E(i,function(t){t.__alignTo=e})}function SI(t,e){E(t.x,function(t){return MI(t,e.x,e.width)}),E(t.y,function(t){return MI(t,e.y,e.height)})}function MI(t,e,n){var i=[0,n],r=t.inverse?1:0;t.setExtent(i[r],i[1-r]),function(t,e){var n=t.getExtent(),i=n[0]+n[1];t.toGlobalCoord="x"===t.dim?function(t){return t+e}:function(t){return i-t+e},t.toLocalCoord="x"===t.dim?function(t){return t-e}:function(t){return i-t+e}}(t,e)}function TI(t,e,n,i,r,o,a){kI(i,r,oS,e,!1,a);var s=[0,0,0,0];u(0),u(1),c(i,0,NaN),c(i,1,NaN);var l=null==G(s,function(t){return t>0});return fp(i,s,!0,!0,n),SI(r,i),l;function u(t){E(r[Uh[t]],function(e){if(ew(e.model)){var n=o.ensureRecord(e.model),i=n.labelInfoList;if(i)for(var r=0;r0&&!rt(e)&&e>1e-4&&(t/=e),t}}function kI(t,e,n,i,r,o){var a=n===aS;E(e,function(e){return E(e,function(e){ew(e.model)&&(!function(t,e,n){var i=Yk(e,n);t.updateCfg(i)}(e.axisBuilder,t,e.model),e.axisBuilder.build(a?{axisTickLabelDetermine:!0}:{axisTickLabelEstimate:!0},{noPxChange:r}))})});var s={x:0,y:0};function l(e){s[Uh[1-e]]=t[Zh[e]]<=.5*o.refContainer[Zh[e]]?0:1-e==1?2:1}l(0),l(1),E(e,function(t,e){return E(t,function(t){ew(t.model)&&(("all"===i||a)&&t.axisBuilder.build({axisName:!0},{nameMarginLevel:s[e]}),a&&t.axisBuilder.build({axisLine:!0}))})})}var CI=function(t,e,n,i,r,o){var a="x"===n.axis.dim?"y":"x";Pk(t,0,0,i,r,o),tw(t.nameLocation)||E(e.recordMap[a],function(t){t&&t.labelInfoList&&t.dirVec&&Ok(t.labelInfoList,t.dirVec,i,r)})};function II(t,e){var n={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return function(t,e,n){var i=e.getComponent("tooltip"),r=e.getComponent("axisPointer"),o=r.get("link",!0)||[],a=[];E(n.getCoordinateSystems(),function(n){if(n.axisPointerEnabled){var s=LI(n.model),l=t.coordSysAxesInfo[s]={};t.coordSysMap[s]=n;var u=n.model.getModel("tooltip",i);if(E(n.getAxes(),Z(d,!1,null)),n.getTooltipAxes&&i&&u.get("show")){var c="axis"===u.get("trigger"),h="cross"===u.get(["axisPointer","type"]),p=n.getTooltipAxes(u.get(["axisPointer","axis"]));(c||h)&&E(p.baseAxes,Z(d,!h||"cross",c)),h&&E(p.otherAxes,Z(d,"cross",!1))}}function d(i,s,c){var h=c.model.getModel("axisPointer",r),p=h.get("show");if(p&&("auto"!==p||i||PI(h))){null==s&&(s=h.get("triggerTooltip")),h=i?function(t,e,n,i,r,o){var a=e.getModel("axisPointer"),s={};E(["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],function(t){s[t]=C(a.get(t))}),s.snap="category"!==t.type&&!!o,"cross"===a.get("type")&&(s.type="line");var l=s.label||(s.label={});if(null==l.show&&(l.show=!1),"cross"===r){var u=a.get(["label","show"]);if(l.show=null==u||u,!o){var c=s.lineStyle=a.get("crossStyle");c&&L(l,c.textStyle)}}return t.model.getModel("axisPointer",new td(s,n,i))}(c,u,r,e,i,s):h;var d=h.get("snap"),f=h.get("triggerEmphasis"),g=LI(c.model),v=s||d||"category"===c.type,y=t.axesInfo[g]={key:g,axis:c,coordSys:n,axisPointerModel:h,triggerTooltip:s,triggerEmphasis:f,involveSeries:v,snap:d,useHandle:PI(h),seriesModels:[],linkGroup:null};l[g]=y,t.seriesInvolved=t.seriesInvolved||v;var m=function(t,e){for(var n=e.model,i=e.dim,r=0;r=0||t===e}function AI(t){var e=(t.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return e&&e.axesInfo[LI(t)]}function PI(t){return!!t.get(["handle","show"])}function LI(t){return t.type+"||"+t.id}var OI={},RI=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.render=function(e,n,i,r){this.axisPointerClass&&function(t){var e=AI(t);if(e){var n=e.axisPointerModel,i=e.axis.scale,r=n.option,o=n.get("status"),a=n.get("value");null!=a&&(a=i.parse(a));var s=PI(n);null==o&&(r.status=s?"show":"hide");var l=i.getExtent();(null==a||a>l[1])&&(a=l[1]),aa)return!0;if(o){var s=AI(t).seriesDataCount,l=i.getExtent();return Math.abs(l[0]-l[1])/s>a}return!1}return!0===n},t.prototype.makeElOption=function(t,e,n,i,r){},t.prototype.createPointerEl=function(t,e,n,i){var r=e.pointer;if(r){var o=UI(t).pointerEl=new Ip[r.type](ZI(e.pointer));t.add(o)}},t.prototype.createLabelEl=function(t,e,n,i){if(e.label){var r=UI(t).labelEl=new Ql(ZI(e.label));t.add(r),KI(r,i)}},t.prototype.updatePointerEl=function(t,e,n){var i=UI(t).pointerEl;i&&e.pointer&&(i.setStyle(e.pointer.style),n(i,{shape:e.pointer.shape}))},t.prototype.updateLabelEl=function(t,e,n,i){var r=UI(t).labelEl;r&&(r.setStyle(e.label.style),n(r,{x:e.label.x,y:e.label.y}),KI(r,i))},t.prototype._renderHandle=function(t){if(!this._dragging&&this.updateHandleTransform){var e,n=this._axisPointerModel,i=this._api.getZr(),r=this._handle,o=n.getModel("handle"),a=n.get("status");if(!o.get("show")||!a||"hide"===a)return r&&i.remove(r),void(this._handle=null);this._handle||(e=!0,r=this._handle=hp(o.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){ve(t.event)},onmousedown:YI(this._onHandleDragMove,this,0,0),drift:YI(this._onHandleDragMove,this),ondragend:YI(this._onHandleDragEnd,this)}),i.add(r)),QI(r,n,!1),r.setStyle(o.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var s=o.get("size");Y(s)||(s=[s,s]),r.scaleX=s[0]/2,r.scaleY=s[1]/2,xy(this,"_doDispatchAxisPointer",o.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,e)}},t.prototype._moveHandleToValue=function(t,e){jI(this._axisPointerModel,!e&&this._moveAnimation,this._handle,$I(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},t.prototype._onHandleDragMove=function(t,e){var n=this._handle;if(n){this._dragging=!0;var i=this.updateHandleTransform($I(n),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=i,n.stopAnimation(),n.attr($I(i)),UI(n).lastProp=null,this._doDispatchAxisPointer()}},t.prototype._doDispatchAxisPointer=function(){if(this._handle){var t=this._payloadInfo,e=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:e.axis.dim,axisIndex:e.componentIndex}]})}},t.prototype._onHandleDragEnd=function(){if(this._dragging=!1,this._handle){var t=this._axisPointerModel.get("value");this._moveHandleToValue(t),this._api.dispatchAction({type:"hideTip"})}},t.prototype.clear=function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),n=this._group,i=this._handle;e&&n&&(this._lastGraphicKey=null,n&&e.remove(n),i&&e.remove(i),this._group=null,this._handle=null,this._payloadInfo=null),by(this,"_doDispatchAxisPointer")},t.prototype.doClear=function(){},t.prototype.buildLabel=function(t,e,n){return{x:t[n=n||0],y:t[1-n],width:e[n],height:e[1-n]}},t}();function jI(t,e,n,i){qI(UI(n).lastProp,i)||(UI(n).lastProp=i,e?Bh(n,i,t):(n.stopAnimation(),n.attr(i)))}function qI(t,e){if($(t)&&$(e)){var n=!0;return E(e,function(e,i){n=n&&qI(t[i],e)}),!!n}return t===e}function KI(t,e){t[e.get(["label","show"])?"show":"hide"]()}function $I(t){return{x:t.x||0,y:t.y||0,rotation:t.rotation||0}}function QI(t,e,n){var i=e.get("z"),r=e.get("zlevel");t&&t.traverse(function(t){"group"!==t.type&&(null!=i&&(t.z=i),null!=r&&(t.zlevel=r),t.silent=n)})}function JI(t,e,n,i,r){var o=tD(n.get("value"),e.axis,e.ecModel,n.get("seriesDataIndices"),{precision:n.get(["label","precision"]),formatter:n.get(["label","formatter"])}),a=n.getModel("label"),s=Kd(a.get("padding")||0),l=a.getFont(),u=Zr(o,l),c=r.position,h=u.width+s[1]+s[3],p=u.height+s[0]+s[2],d=r.align;"right"===d&&(c[0]-=h),"center"===d&&(c[0]-=h/2);var f=r.verticalAlign;"bottom"===f&&(c[1]-=p),"middle"===f&&(c[1]-=p/2),function(t,e,n,i){var r=i.getWidth(),o=i.getHeight();t[0]=Math.min(t[0]+e,r)-e,t[1]=Math.min(t[1]+n,o)-n,t[0]=Math.max(t[0],0),t[1]=Math.max(t[1],0)}(c,h,p,i);var g=a.get("backgroundColor");g&&"auto"!==g||(g=e.get(["axisLine","lineStyle","color"])),t.label={x:c[0],y:c[1],style:Op(a,{text:o,font:l,fill:a.getTextColor(),padding:s,backgroundColor:g}),z2:10}}function tD(t,e,n,i,r){t=e.scale.parse(t);var o=e.scale.getLabel({value:t},{precision:r.precision}),a=r.formatter;if(a){var s={value:Qb(e,{value:t}),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};E(i,function(t){var e=n.getSeriesByIndex(t.seriesIndex),i=t.dataIndexInside,r=e&&e.getDataParams(i);r&&s.seriesData.push(r)}),j(a)?o=a.replace("{value}",o):X(a)&&(o=a(s))}return o}function eD(t,e,n){var i=[1,0,0,1,0,0];return ke(i,i,n.rotation),Te(i,i,n.position),op([t.dataToCoord(e),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],i)}var nD=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.makeElOption=function(t,e,n,i,r){var o=n.axis,a=o.grid,s=i.get("type"),l=o.getGlobalExtent(),u=iD(a,o).getOtherAxis(o).getGlobalExtent(),c=o.toGlobalCoord(o.dataToCoord(e,!0));if(s&&"none"!==s){var h=function(t){var e,n=t.get("type"),i=t.getModel(n+"Style");return"line"===n?(e=i.getLineStyle()).fill=null:"shadow"===n&&((e=i.getAreaStyle()).stroke=null),e}(i),p=rD[s](o,c,l,u,i.get("seriesDataIndices"),i.ecModel);p.style=h,t.graphicKey=p.type,t.pointer=p}!function(t,e,n,i,r,o){var a=Rk.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=r.get(["label","margin"]),JI(e,i,r,o,{position:eD(i.axis,t,n),align:a.textAlign,verticalAlign:a.textVerticalAlign})}(e,t,Yk(a.getRect(),n),n,i,r)},e.prototype.getHandleTransform=function(t,e,n){var i=Yk(e.axis.grid.getRect(),e,{labelInside:!1});i.labelMargin=n.get(["handle","margin"]);var r=eD(e.axis,t,i);return{x:r[0],y:r[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,e,n,i){var r=n.axis,o=r.grid,a=r.getGlobalExtent(!0),s=iD(o,r).getOtherAxis(r).getGlobalExtent(),l="x"===r.dim?0:1,u=[t.x,t.y];u[l]+=e[l],u[l]=So(a[1],u[l]),u[l]=Mo(a[0],u[l]);var c=(s[1]+s[0])/2,h=[c,c];h[l]=u[l];return{x:u[0],y:u[1],rotation:t.rotation,cursorPoint:h,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][l]}},e}(XI);function iD(t,e){var n={};return n[e.dim+"AxisIndex"]=e.index,t.getCartesian(n)}var rD={line:function(t,e,n,i){var r,o,a;return{type:"Line",subPixelOptimize:!0,shape:(r=[e,i[0]],o=[e,i[1]],a=oD(t),{x1:r[a=a||0],y1:r[1-a],x2:o[a],y2:o[1-a]})}},shadow:function(t,e,n,i,r,o){var a,s,l,u=function(t,e,n){return xS(t,{fromStat:{sers:V(e,function(t){return n.getSeriesByIndex(t.seriesIndex)})},min:1}).w}(t,r,o),c=i[1]-i[0],h=function(t,e,n){return[Mo(So(e[0],e[1]),t-n/2),So(t+n/2,Mo(e[0],e[1]))]}(e,n,u),p=h[0],d=h[1];return{type:"Rect",shape:(a=[p,i[0]],s=[d-p,c],l=oD(t),{x:a[l=l||0],y:a[1-l],width:s[l],height:s[1-l]})}}};function oD(t){return"x"===t.dim?0:1}var aD=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.type="axisPointer",e.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:Cf.color.border,width:1,type:"dashed"},shadowStyle:{color:Cf.color.shadowTint},label:{show:!0,formatter:null,precision:"auto",margin:3,color:Cf.color.neutral00,padding:[5,7,5,7],backgroundColor:Cf.color.accent60,borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:Cf.color.accent40,throttle:40}},e}(kf),sD=Ta(),lD=E;function uD(t,e,n){if(!r.node){var i=e.getZr();sD(i).records||(sD(i).records={}),function(t,e){if(sD(t).initialized)return;function n(n,i){t.on(n,function(n){var r=function(t){var e={showTip:[],hideTip:[]},n=function(i){var r=e[i.type];r?r.push(i):(i.dispatchAction=n,t.dispatchAction(i))};return{dispatchAction:n,pendings:e}}(e);lD(sD(t).records,function(t){t&&i(t,n,r.dispatchAction)}),function(t,e){var n,i=t.showTip.length,r=t.hideTip.length;i?n=t.showTip[i-1]:r&&(n=t.hideTip[r-1]);n&&(n.dispatchAction=null,e.dispatchAction(n))}(r.pendings,e)})}sD(t).initialized=!0,n("click",Z(hD,"click")),n("mousemove",Z(hD,"mousemove")),n("mousewheel",Z(hD,"mousewheel")),n("globalout",cD)}(i,e),(sD(i).records[t]||(sD(i).records[t]={})).handler=n}}function cD(t,e,n){t.handler("leave",null,n)}function hD(t,e,n,i){e.handler(t,n,i)}function pD(t,e){if(!r.node){var n=e.getZr();(sD(n).records||{})[t]&&(sD(n).records[t]=null)}}var dD=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.render=function(t,e,n){var i=e.getComponent("tooltip"),r=t.get("triggerOn")||i&&i.get("triggerOn")||"mousemove|click|mousewheel";uD("axisPointer",n,function(t,e,n){"none"!==r&&("leave"===t||r.indexOf(t)>=0)&&n({type:"updateAxisPointer",currTrigger:t,x:e&&e.offsetX,y:e&&e.offsetY})})},e.prototype.remove=function(t,e){pD("axisPointer",e)},e.prototype.dispose=function(t,e){pD("axisPointer",e)},e.type="axisPointer",e}(ay);function fD(t,e){var n,i=[],r=t.seriesIndex;if(null==r||!(n=e.getSeriesByIndex(r)))return{point:[]};var o=n.getData(),a=Ma(o,t);if(null==a||a<0||Y(a))return{point:[]};var s=o.getItemGraphicEl(a),l=n.coordinateSystem;if(n.getTooltipPosition)i=n.getTooltipPosition(a)||[];else if(l&&l.dataToPoint)if(t.isStacked){var u=l.getBaseAxis(),c=l.getOtherAxis(u).dim,h=u.dim,p="x"===c||"radius"===c?1:0,d=o.mapDimension(h),f=[];f[p]=o.get(d,a),f[1-p]=o.get(o.getCalculationInfo("stackResultDimension"),a),i=l.dataToPoint(f)||[]}else i=l.dataToPoint(o.getValues(V(l.dimensions,function(t){return o.mapDimension(t)}),a))||[];else if(s){var g=s.getBoundingRect().clone();g.applyTransform(s.transform),i=[g.x+g.width/2,g.y+g.height/2]}return{point:i,el:s}}var gD=Ta();function vD(t,e,n){var i=t.currTrigger,r=[t.x,t.y],o=t,a=t.dispatchAction||U(n.dispatchAction,n),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){bD(r)&&(r=fD({seriesIndex:o.seriesIndex,dataIndex:o.dataIndex},e).point);var l=bD(r),u=o.axesInfo,c=s.axesInfo,h="leave"===i||bD(r),p={},d={},f={list:[],map:{}},g={showPointer:Z(mD,d),showTooltip:Z(_D,f)};E(s.coordSysMap,function(t,e){var n=l||t.containPoint(r);E(s.coordSysAxesInfo[e],function(t,e){var i=t.axis,o=function(t,e){for(var n=0;n<(t||[]).length;n++){var i=t[n];if(e.axis.dim===i.axisDim&&e.axis.model.componentIndex===i.axisIndex)return i}}(u,t);if(!h&&n&&(!u||o)){var a=o&&o.value;null!=a||l||(a=i.pointToData(r)),null!=a&&yD(t,a,g,!1,p)}})});var v={};return E(c,function(t,e){var n=t.linkGroup;n&&!d[e]&&E(n.axesInfo,function(e,i){var r=d[i];if(e!==t&&r){var o=r.value;n.mapper&&(o=t.axis.scale.parse(n.mapper(o,xD(e),xD(t)))),v[t.key]=o}})}),E(v,function(t,e){yD(c[e],t,g,!0,p)}),function(t,e,n){var i=n.axesInfo=[];E(e,function(e,n){var r=e.axisPointerModel.option,o=t[n];o?(!e.useHandle&&(r.status="show"),r.value=o.value,r.seriesDataIndices=(o.payloadBatch||[]).slice()):!e.useHandle&&(r.status="hide"),"show"===r.status&&i.push({axisDim:e.axis.dim,axisIndex:e.axis.model.componentIndex,value:r.value})})}(d,c,p),function(t,e,n,i){if(bD(e)||!t.list.length)return void i({type:"hideTip"});var r=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};i({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:r.dataIndexInside,dataIndex:r.dataIndex,seriesIndex:r.seriesIndex,dataByCoordSys:t.list})}(f,r,t,a),function(t,e,n){var i=n.getZr(),r="axisPointerLastHighlights",o=gD(i)[r]||{},a=gD(i)[r]={};E(t,function(t,e){var n=t.axisPointerModel.option;"show"===n.status&&t.triggerEmphasis&&E(n.seriesDataIndices,function(t){a[t.seriesIndex+"|"+t.dataIndex]=t})});var s=[],l=[];function u(t){return{seriesIndex:t.seriesIndex,dataIndex:t.dataIndex}}E(o,function(t,e){!a[e]&&l.push(u(t))}),E(a,function(t,e){!o[e]&&s.push(u(t))}),l.length&&n.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&n.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}(c,0,n),p}}function yD(t,e,n,i,r){var o=t.axis;if(!o.scale.isBlank()&&o.containData(e))if(t.involveSeries){var a=function(t,e){var n=e.axis,i=n.dim,r=t,o=[],a=Number.MAX_VALUE,s=-1;return E(e.seriesModels,function(e,l){var u,c,h=e.getData().mapDimensionsAll(i);if(e.getAxisTooltipData){var p=e.getAxisTooltipData(h,t,n);c=p.dataIndices,u=p.nestestValue}else{if(!(c=e.indicesOfNearest(i,h[0],t,"category"===n.type?.5:null)).length)return;u=e.getData().get(h[0],c[0])}if(ia(u)){var d=t-u,f=Math.abs(d);f<=a&&((f=0&&s<0)&&(a=f,s=d,r=u,o.length=0),E(c,function(t){o.push({seriesIndex:e.seriesIndex,dataIndexInside:t,dataIndex:e.getData().getRawIndex(t)})}))}}),{payloadBatch:o,snapToValue:r}}(e,t),s=a.payloadBatch,l=a.snapToValue;s[0]&&null==r.seriesIndex&&A(r,s[0]),!i&&t.snap&&o.containData(l)&&null!=l&&(e=l),n.showPointer(t,e,s),n.showTooltip(t,a,l)}else n.showPointer(t,e)}function mD(t,e,n,i){t[e.key]={value:n,payloadBatch:i}}function _D(t,e,n,i){var r=n.payloadBatch,o=e.axis,a=o.model,s=e.axisPointerModel;if(e.triggerTooltip&&r.length){var l=e.coordSys.model,u=LI(l),c=t.map[u];c||(c=t.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},t.list.push(c)),c.dataByAxis.push({axisDim:o.dim,axisIndex:a.componentIndex,axisType:a.type,axisId:a.id,value:i,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:r.slice()})}}function xD(t){var e=t.axis.model,n={},i=n.axisDim=t.axis.dim;return n.axisIndex=n[i+"AxisIndex"]=e.componentIndex,n.axisName=n[i+"AxisName"]=e.name,n.axisId=n[i+"AxisId"]=e.id,n}function bD(t){return!t||null==t[0]||isNaN(t[0])||null==t[1]||isNaN(t[1])}function wD(t){RI.registerAxisPointerClass("CartesianAxisPointer",nD),t.registerComponentModel(aD),t.registerComponentView(dD),t.registerPreprocessor(function(t){if(t){(!t.axisPointer||0===t.axisPointer.length)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!Y(e)&&(t.axisPointer.link=[e])}}),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,{overallReset:function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=II(t,e)}}),t.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},vD)}function SD(t,e){var n;return E(e,function(e){null!=t[e]&&"auto"!==t[e]&&(n=!0)}),n}var MD=["transition","enterFrom","leaveTo"],TD=MD.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function kD(t,e,n){if(n&&(!t[n]&&e[n]&&(t[n]={}),t=t[n],e=e[n]),t&&e)for(var i=n?MD:TD,r=0;r0&&(a.during=s?U(ED,{el:e,userDuring:s}):null,a.setToFinal=!0,a.scope=t),A(a,n[o]),a}function OD(t,e,n,i){var r=(i=i||{}).dataIndex,o=i.isInit,a=i.clearStyle,s=n.isAnimationEnabled(),l=PD(t),u=e.style;l.userDuring=e.during;var c={},h={};if(function(t,e,n){for(var i=0;i=0)){var h=t.getAnimationStyleProps(),p=h?h.style:null;if(p){!r&&(r=i.style={});var d=W(n);for(u=0;u0&&t.animateFrom(g,v)}else!function(t,e,n,i,r){if(r){var o=LD("update",t,e,i,n);o.duration>0&&t.animateFrom(r,o)}}(t,e,r||0,n,c);RD(t,e),u?t.dirty():t.markRedraw()}function RD(t,e){for(var n=PD(t).leaveToProps,i=0;i=0){!o&&(o=i[t]={});var p=W(a);for(c=0;c=0;l--){var p,d,f;if(f=null!=(d=ba((p=n[l]).id,null))?r.get(d):null){var g=f.parent,v=(h=YD(g),{}),y=xf(f,p,g===i?{width:o,height:a}:{width:h.width,height:h.height},null,{hv:p.hv,boundingMode:p.bounding},v);if(!YD(f).isNew&&y){for(var m=p.transition,_={},x=0;x=0)?_[b]=w:f[b]=w}Bh(f,_,t,0)}else f.attr(v)}}},e.prototype._clear=function(){var t=this,e=this._elMap;e.each(function(n){KD(n,YD(n).option,e,t._lastGraphicModel)}),this._elMap=mt()},e.prototype.dispose=function(){this._clear()},e.type="graphic",e}(ay);function jD(t){var e=wt(ZD,t)?ZD[t]:Kh(t);var n=new e({});return YD(n).type=t,n}function qD(t,e,n,i){var r=jD(n);return e.add(r),i.set(t,r),YD(r).id=t,YD(r).isNew=!0,r}function KD(t,e,n,i){t&&t.parent&&("group"===t.type&&t.traverse(function(t){KD(t,e,n,i)}),function(t,e,n,i){if(t){var r=t.parent,o=PD(t).leaveToProps;if(o){var a=LD("update",t,e,n,0);a.done=function(){r&&r.remove(t),i&&i()},t.animateTo(o,a)}else r&&r.remove(t),i&&i()}}(t,e,i),n.removeKey(YD(t).id))}function $D(t,e,n,i){t.isGroup||E([["cursor",Rs.prototype.cursor],["zlevel",i||0],["z",n||0],["z2",0]],function(n){var i=n[0];wt(e,i)?t[i]=at(e[i],n[1]):null==t[i]&&(t[i]=n[1])}),E(W(e),function(n){if(0===n.indexOf("on")){var i=e[n];t[n]=X(i)?i:null}}),wt(e,"draggable")&&(t.draggable=e.draggable),null!=e.name&&(t.name=e.name),null!=e.id&&(t.id=e.id)}var QD=["x","y","radius","angle","single"],JD=Ta(),tA=["cartesian2d","polar","singleAxis"];function eA(t){return t+"Axis"}function nA(t,e){var n,i=mt(),r=[],o=mt();t.eachComponent({mainType:"dataZoom",query:e},function(t){o.get(t.uid)||s(t)});do{n=!1,t.eachComponent("dataZoom",a)}while(n);function a(t){!o.get(t.uid)&&function(t){var e=!1;return t.eachTargetAxis(function(t,n){var r=i.get(t);r&&r[n]&&(e=!0)}),e}(t)&&(s(t),n=!0)}function s(t){o.set(t.uid,!0),r.push(t),t.eachTargetAxis(function(t,e){(i.get(t)||i.set(t,[]))[e]=!0})}return r}function iA(t){var e=t.ecModel,n={infoList:[],infoMap:mt()};return t.eachTargetAxis(function(t,i){var r=e.getComponent(eA(t),i);if(r){var o=r.getCoordSysModel();if(o){var a=o.uid,s=n.infoMap.get(a);s||(s={model:o,axisModels:[]},n.infoList.push(s),n.infoMap.set(a,s)),s.axisModels.push(r)}}}),n}function rA(t){var e=JD(hm(t));return e.axisProxyMap||(e.axisProxyMap=mt())}function oA(t){if(t)return rA(t.ecModel).get(t.uid)}function aA(t,e){var n=e.getAxisModel().axis.__alignTo;return n&&t.getAxisProxy(n.dim,n.model.componentIndex)?oA(n.model):null}var sA=function(){function t(){this.indexList=[],this.indexMap=[]}return t.prototype.add=function(t){this.indexMap[t]||(this.indexList.push(t),this.indexMap[t]=!0)},t}(),lA=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._autoThrottle=!0,n._noTarget=!0,n._rangePropMode=["percent","percent"],n}return n(e,t),e.prototype.init=function(t,e,n){var i=uA(t);this.settledOption=i,this.mergeDefaultAndTheme(t,n),this._doInit(i)},e.prototype.mergeOption=function(t){var e=uA(t);I(this.option,t,!0),I(this.settledOption,e,!0),this._doInit(e)},e.prototype._doInit=function(t){var e=this.option;this._setDefaultThrottle(t),this._updateRangeUse(t);var n=this.settledOption;E([["start","startValue"],["end","endValue"]],function(t,i){"value"===this._rangePropMode[i]&&(e[t[0]]=n[t[0]]=null)},this),this._resetTarget()},e.prototype._resetTarget=function(){var t=this.get("orient",!0),e=this._targetAxisInfoMap=mt();this._fillSpecifiedTargetAxis(e)?this._orient=t||this._makeAutoOrientByTargetAxis():(this._orient=t||"horizontal",this._fillAutoTargetAxisByOrient(e,this._orient)),this._noTarget=!0,e.each(function(t){t.indexList.length&&(this._noTarget=!1)},this)},e.prototype._fillSpecifiedTargetAxis=function(t){var e=!1;return E(QD,function(n){var i=this.getReferringComponents(eA(n),Aa);if(i.specified){e=!0;var r=new sA;E(i.models,function(t){r.add(t.componentIndex)}),t.set(n,r)}},this),e},e.prototype._fillAutoTargetAxisByOrient=function(t,e){var n=this.ecModel,i=!0;if(i){var r="vertical"===e?"y":"x";o(n.findComponents({mainType:r+"Axis"}),r)}i&&o(n.findComponents({mainType:"singleAxis",filter:function(t){return t.get("orient",!0)===e}}),"single");function o(e,n){var r=e[0];if(r){var o=new sA;if(o.add(r.componentIndex),t.set(n,o),i=!1,"x"===n||"y"===n){var a=r.getReferringComponents("grid",Da).models[0];a&&E(e,function(t){r.componentIndex!==t.componentIndex&&a===t.getReferringComponents("grid",Da).models[0]&&o.add(t.componentIndex)})}}}i&&E(QD,function(e){if(i){var r=n.findComponents({mainType:eA(e),filter:function(t){return"category"===t.get("type",!0)}});if(r[0]){var o=new sA;o.add(r[0].componentIndex),t.set(e,o),i=!1}}},this)},e.prototype._makeAutoOrientByTargetAxis=function(){var t;return this.eachTargetAxis(function(e){!t&&(t=e)},this),"y"===t?"vertical":"horizontal"},e.prototype._setDefaultThrottle=function(t){if(t.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var e=this.ecModel.option;this.option.throttle=e.animation&&e.animationDurationUpdate>0?100:20}},e.prototype._updateRangeUse=function(t){var e=this._rangePropMode,n=this.get("rangeMode");E([["start","startValue"],["end","endValue"]],function(i,r){var o=null!=t[i[0]],a=null!=t[i[1]];o&&!a?e[r]="percent":!o&&a?e[r]="value":n?e[r]=n[r]:o&&(e[r]="percent")})},e.prototype.noTarget=function(){return this._noTarget},e.prototype.getFirstTargetAxisModel=function(){var t;return this.eachTargetAxis(function(e,n){null==t&&(t=this.ecModel.getComponent(eA(e),n))},this),t},e.prototype.eachTargetAxis=function(t,e){this._targetAxisInfoMap.each(function(n,i){E(n.indexList,function(n){t.call(e,i,n)})})},e.prototype.getAxisProxy=function(t,e){return oA(this.getAxisModel(t,e))},e.prototype.getAxisModel=function(t,e){var n=this._targetAxisInfoMap.get(t);if(n&&n.indexMap[e])return this.ecModel.getComponent(eA(t),e)},e.prototype.setRawRange=function(t){var e=this.option,n=this.settledOption;E([["start","startValue"],["end","endValue"]],function(i){null==t[i[0]]&&null==t[i[1]]||(e[i[0]]=n[i[0]]=t[i[0]],e[i[1]]=n[i[1]]=t[i[1]])},this),this._updateRangeUse(t)},e.prototype.setCalculatedRange=function(t){var e=this.option;E(["start","startValue","end","endValue"],function(n){e[n]=t[n]})},e.prototype.getPercentRange=function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getWindow().percent},e.prototype.getValueRange=function(t,e){if(null!=t||null!=e)return this.getAxisProxy(t,e).getWindow().value;var n=this.findRepresentativeAxisProxy();return n?n.getWindow().value:void 0},e.prototype.findRepresentativeAxisProxy=function(t){if(t)return oA(t);for(var e,n=this._targetAxisInfoMap.keys(),i=0;io&&(e[1-i]=Wo(e[i],u.sign*o)),e}function fA(t,e){var n=t[e]-t[1-e];return{span:Math.abs(n),sign:n>0?-1:n<0?1:e?-1:1}}function gA(t,e){return Math.min(null!=e[1]?e[1]:1/0,Math.max(null!=e[0]?e[0]:-1/0,t))}var vA=function(){function t(t,e,n,i){this._dimName=t,this._axisIndex=e,this.ecModel=i,this._dataZoomModel=n}return t.prototype.hostedBy=function(t){return this._dataZoomModel===t},t.prototype.getWindow=function(){return C(this._window)},t.prototype.getTargetSeriesModels=function(){var t=[];return this.ecModel.eachSeries(function(e){if(function(t){var e=t.get("coordinateSystem");return R(tA,e)>=0}(e)){var n=eA(this._dimName),i=e.getReferringComponents(n,Da).models[0];i&&this._axisIndex===i.componentIndex&&t.push(e)}},this),t},t.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},t.prototype.getMinMaxSpan=function(){return C(this._minMaxSpan)},t.prototype.calculateDataWindow=function(t){var e,n=this._extent,i=this.getAxisModel().axis,r=i.scale,o=this._dataZoomModel.getRangePropMode(),a=[0,100],s=[],l=[],u=[!1,!1];E(["start","end"],function(i,c){var h=t[i],p=t[i+"Value"];"percent"===o[c]?(null==h&&(h=a[c]),p=Ro(h,a,n),u[c]=!0):(e=!0,null==p?p=n[c]:(p=r.parse(p),r.sanitize&&(p=r.sanitize(p,n))),h=Ro(p,n,a)),l[c]=null==p||isNaN(p)?n[c]:p,s[c]=null==h||isNaN(h)?a[c]:h}),Eo(l),Eo(s);var c=this._minMaxSpan;function h(t,e,n,i,r){var o=r?"Span":"ValueSpan";dA(0,t,n,"all",c["min"+o],c["max"+o]);for(var a=0;a<2;a++)e[a]=Ro(t[a],n,i,!0),r&&(e[a]=e[a],u[a]=!0);Va(e)}e?h(l,s,n,a,!1):h(s,l,a,n,!0);var p=xb(r)||mb(r),d=i.getExtent(),f=To(d[1]-d[0]),g=p?0:Ho(l,f,.5);E([[0,Io],[1,Co]],function(t){var e=t[0],i=t[1];u[e]&&isFinite(g)&&(l[e]=zo(l[e],g),l[e]=So(n[1],Mo(n[0],l[e])),s[e]===a[e]&&(l[e]=n[e],p&&(l[e]=i(l[e]))))}),Va(l);var v=[Ro(l[0],n,a,!0),Ro(l[1],n,a,!0)];return Va(v),{value:l,percent:s,percentInverted:v,valuePrecision:g}},t.prototype.reset=function(t,e){if(this.hostedBy(t)){var n=this.getAxisModel().axis;Dw(n,2);var i=n.scale.rawExtentInfo;this._extent=i.makeNoZoom(),this._updateMinMaxSpan();var r=t.settledOption;e&&(r=L({start:e[0],end:e[1]},r));var o=this._window=this.calculateDataWindow(r),a=o.percent,s=o.value;0!==a[0]&&i.setZoomMM(0,s[0]),100!==a[1]&&i.setZoomMM(1,s[1])}},t.prototype.filterData=function(t,e){if(this.hostedBy(t)){var n=this._dimName,i=this.getTargetSeriesModels(),r=t.get("filterMode"),o=this._window.value;"none"!==r&&E(i,function(t){var e=t.getData(),i=e.mapDimensionsAll(n);if(i.length){if("weakFilter"===r){var a=e.getStore(),s=V(i,function(t){return e.getDimensionIndex(t)},e);e.filterSelf(function(t){for(var e,n,r,l=0;lo[1];if(c&&!h&&!p)return!0;c&&(r=!0),h&&(e=!0),p&&(n=!0)}return r&&e&&n})}else E(i,function(n){if("empty"===r)t.setData(e=e.map(n,function(t){return function(t){return t>=o[0]&&t<=o[1]}(t)?t:NaN}));else{var i={};i[n]=o,e.selectRange(i)}});E(i,function(t){e.setApproximateExtent(o,t)})}})}},t.prototype._updateMinMaxSpan=function(){var t=this._minMaxSpan={},e=this._dataZoomModel,n=this._extent;E(["min","max"],function(i){var r=e.get(i+"Span"),o=e.get(i+"ValueSpan");null!=o&&(o=this.getAxisModel().axis.scale.parse(o)),null!=o?r=Ro(n[0]+o,n,[0,100],!0):null!=r&&(o=Ro(r,[0,100],n,!0)-n[0]),t[i+"Span"]=r,t[i+"ValueSpan"]=o},this)},t}(),yA={dirtyOnOverallProgress:!0,getTargetSeries:function(t){var e,n=[];e=function(e,i,r,o){if(!oA(r)){var a=new vA(e,i,o,t);n.push(a),function(t,e){rA(t.ecModel).set(t.uid,e)}(r,a)}},t.eachComponent("dataZoom",function(n){n.eachTargetAxis(function(i,r){var o=t.getComponent(eA(i),r);e(i,r,o,n)})});var i=mt();return E(n,function(t){E(t.getTargetSeriesModels(),function(t){i.set(t.uid,t)})}),i},overallReset:function(t,e){t.eachComponent("dataZoom",function(t){var n=[];t.eachTargetAxis(function(e,i){var r=t.getAxisProxy(e,i),o=aA(t,r);o?n.push([r,o]):r.reset(t,null)}),E(n,function(e){e[0].reset(t,e[1].getWindow().percentInverted)}),t.eachTargetAxis(function(n,i){t.getAxisProxy(n,i).filterData(t,e)})}),t.eachComponent("dataZoom",function(t){var e=t.findRepresentativeAxisProxy();if(e){var n=e.getWindow(),i=n.percent,r=n.value;t.setCalculatedRange({start:i[0],end:i[1],startValue:r[0],endValue:r[1]})}})}};var mA=Fa();function _A(t){mA(t,function(){t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER,yA),function(t){t.registerAction("dataZoom",function(t,e){E(nA(e,t),function(e){e.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})})})}(t),t.registerSubTypeDefaulter("dataZoom",function(){return"slider"})})}function xA(t){t.registerComponentModel(cA),t.registerComponentView(pA),_A(t)}var bA=function(){},wA={};function SA(t,e){wA[t]=e}function MA(t){return wA[t]}var TA=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.init=function(e,n,i){var r=i.getTheme().get("toolbox"),o=r?r.feature:null;o&&(this._themeFeatureOption=A({},o),r.feature={}),t.prototype.init.call(this,e,n,i),o&&(r.feature=o)},e.prototype.optionUpdated=function(){E(this.option.feature,function(t,e){var n=this._themeFeatureOption,i=MA(e);i&&(i.getDefaultOption&&(i.defaultOption=i.getDefaultOption(this.ecModel)),n&&n[e]&&(I(t,n[e]),n[e]=null),I(t,i.defaultOption))},this)},e.type="toolbox",e.layoutMode={type:"box",ignoreSize:!0},e.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:Cf.color.border,borderRadius:0,borderWidth:0,padding:Cf.size.m,itemSize:15,itemGap:Cf.size.s,showTitle:!0,iconStyle:{borderColor:Cf.color.accent50,color:"none"},emphasis:{iconStyle:{borderColor:Cf.color.accent70}},tooltip:{show:!1,position:"bottom"}},e}(kf);function kA(t,e){var n=Kd(e.get("padding")),i=e.getItemStyle(["color","opacity"]);return i.fill=e.get("backgroundColor"),new jl({shape:{x:t.x-n[3],y:t.y-n[0],width:t.width+n[1]+n[3],height:t.height+n[0]+n[2],r:e.get("borderRadius")},style:i,silent:!0,z2:-1})}var CA=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.render=function(t,e,n,i){var r=this.group;if(r.removeAll(),t.get("show")){var o=+t.get("itemSize"),a="vertical"===t.get("orient"),s=t.get("feature")||{},l=this._features||(this._features=mt()),u=[];E(s,function(t,e){u.push(e)}),new Sx(this._featureNames||[],u).add(f).update(f).remove(Z(f,null)).execute(),this._featureNames=H(u,function(t){return l.hasKey(t)});var c=_f(t,n).refContainer,h=t.getBoxLayoutParams(),p=t.get("padding"),d=yf(h,c,p);gf(t.get("orient"),r,t.get("itemGap"),d.width,d.height),xf(r,h,c,p),r.add(kA(r.getBoundingRect(),t)),a||r.eachChild(function(t){var e=t.__title,i=t.ensureState("emphasis"),a=i.textConfig||(i.textConfig={}),s=t.getTextContent(),l=s&&s.ensureState("emphasis");if(l&&!X(l)&&e){var u=l.style||(l.style={}),c=Zr(e,Ql.makeFont(u)),h=t.x+r.x,p=!1;t.y+r.y+o+c.height>n.getHeight()&&(a.position="top",p=!0);var d=p?-5-c.height:o+10;h+c.width/2>n.getWidth()?(a.position=["100%",d],u.align="right"):h-c.width/2<0&&(a.position=[0,d],u.align="left")}})}function f(c,h){var p,d=null!=c&&null==h,f=null!=c&&null!=h,g=null==c,v=d||f?u[c]:u[h],y=s[v],m=d||f?new td(y,t,e):null,_=m&&m.get("show");if(d){if(!_)return;if(function(t){return 0===t.indexOf("my")}(v))p={onclick:m.option.onclick,featureName:v};else{var x=MA(v);if(!x)return;p=new x}l.set(v,p)}else p=l.get(v);if(g||!_)return IA(p)&&p.dispose&&p.dispose(e,n),void l.removeKey(v);i&&null!=i.newTitle&&i.featureName===v&&(y.title=i.newTitle),d&&(p.uid=nd("toolbox-feature")),p.model=m,p.ecModel=e,p.api=n,function(i,s,l){var u,c,h=i.getModel("iconStyle"),p=i.getModel(["emphasis","iconStyle"]),d=s instanceof bA&&s.getIcons?s.getIcons():i.get("icon"),f=i.get("title")||{};j(d)?(u={})[l]=d:u=d;j(f)?(c={})[l]=f:c=f;var g=i.iconPaths={};E(u,function(l,u){var d=hp(l,{},{x:-o/2,y:-o/2,width:o,height:o});d.setStyle(h.getItemStyle()),d.ensureState("emphasis").style=p.getItemStyle();var f=new Ql({style:{text:c[u],align:p.get("textAlign"),borderRadius:p.get("textBorderRadius"),padding:p.get("textPadding"),fill:null,font:Vp({fontStyle:p.get("textFontStyle"),fontFamily:p.get("textFontFamily"),fontSize:p.get("textFontSize"),fontWeight:p.get("textFontWeight")},e)},ignore:!0});d.setTextContent(f),yp({el:d,componentModel:t,itemName:u,formatterParamsExtra:{title:c[u]}}),d.__title=c[u],d.on("mouseover",function(){var e=p.getItemStyle(),i=a?null==t.get("right")&&"right"!==t.get("left")?"right":"left":null==t.get("bottom")&&"bottom"!==t.get("top")?"bottom":"top";f.setStyle({fill:p.get("textFill")||e.fill||e.stroke||Cf.color.neutral99,backgroundColor:p.get("textBackgroundColor")}),d.setTextConfig({position:p.get("textPosition")||i}),f.ignore=!t.get("showTitle"),n.enterEmphasis(this)}).on("mouseout",function(){"emphasis"!==i.get(["iconStatus",u])&&n.leaveEmphasis(this),f.hide()}),("emphasis"===i.get(["iconStatus",u])?Qu:Ju)(d),r.add(d),d.on("click",U(s.onclick,s,e,n,u)),g[u]=d})}(m,p,v),m.setIconStatus=function(t,e){var n=this.option,i=this.iconPaths;n.iconStatus=n.iconStatus||{},n.iconStatus[t]=e,i[t]&&("emphasis"===e?Qu:Ju)(i[t])},IA(p)&&p.render&&p.render(m,e,n,i)}},e.prototype.updateView=function(t,e,n,i){E(this._features,function(t){t&&t instanceof bA&&t.updateView&&t.updateView(t.model,e,n,i)})},e.prototype.dispose=function(t,e){E(this._features,function(n){n&&n instanceof bA&&n.dispose&&n.dispose(t,e)})},e.type="toolbox",e}(ay);function IA(t){return t instanceof bA}var DA=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.onclick=function(t,e){var n=this.model,i=n.get("name")||t.get("title.0.text")||"echarts",o="svg"===e.getZr().painter.getType(),a=o?"svg":n.get("type",!0)||"png",s=e.getConnectedDataURL({type:a,backgroundColor:n.get("backgroundColor",!0)||t.get("backgroundColor")||Cf.color.neutral00,connectedBackgroundColor:n.get("connectedBackgroundColor"),excludeComponents:n.get("excludeComponents"),pixelRatio:n.get("pixelRatio")}),l=r.browser;if("function"!=typeof MouseEvent||!l.newEdge&&(l.ie||l.edge))if(window.navigator.msSaveOrOpenBlob||o){var u=s.split(","),c=u[0].indexOf("base64")>-1,h=o?decodeURIComponent(u[1]):u[1];c&&(h=window.atob(h));var p=i+"."+a;if(window.navigator.msSaveOrOpenBlob){for(var d=h.length,f=new Uint8Array(d);d--;)f[d]=h.charCodeAt(d);var g=new Blob([f]);window.navigator.msSaveOrOpenBlob(g,p)}else{var v=document.createElement("iframe");document.body.appendChild(v);var y=v.contentWindow,m=y.document;m.open("image/svg+xml","replace"),m.write(h),m.close(),y.focus(),m.execCommand("SaveAs",!0,p),document.body.removeChild(v)}}else{var _=n.get("lang"),x='
',b=window.open();b.document.write(x),b.document.title=i}else{var w=document.createElement("a");w.download=i+"."+a,w.target="_blank",w.href=s;var S=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});w.dispatchEvent(S)}},e.getDefaultOption=function(t){return{show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:t.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:Cf.color.neutral00,name:"",excludeComponents:["toolbox"],lang:t.getLocaleModel().get(["toolbox","saveAsImage","lang"])}},e}(bA),AA="__ec_magicType_stack__",PA=[["line","bar"],["stack"]],LA=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.getIcons=function(){var t=this.model,e=t.get("icon"),n={};return E(t.get("type"),function(t){e[t]&&(n[t]=e[t])}),n},e.getDefaultOption=function(t){return{show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:t.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}}},e.prototype.onclick=function(t,e,n){var i=this.model,r=i.get(["seriesIndex",n]);if(OA[n]){var o,a={series:[]};E(PA,function(t){R(t,n)>=0&&E(t,function(t){i.setIconStatus(t,"normal")})}),i.setIconStatus(n,"emphasis"),t.eachComponent({mainType:"series",query:null==r?null:{seriesIndex:r}},function(t){var e=t.subType,r=t.id,o=OA[n](e,r,t,i);o&&(L(o,t.option),a.series.push(o));var s=t.coordinateSystem;if(s&&"cartesian2d"===s.type&&("line"===n||"bar"===n)){var l=s.getAxesByScale("ordinal")[0];if(l){var u=l.dim+"Axis",c=t.getReferringComponents(u,Da).models[0].componentIndex;a[u]=a[u]||[];for(var h=0;h<=c;h++)a[u][c]=a[u][c]||{};a[u][c].boundaryGap="bar"===n}}});var s=n;"stack"===n&&(o=I({stack:i.option.title.tiled,tiled:i.option.title.stack},i.option.title),"emphasis"!==i.get(["iconStatus",n])&&(s="tiled")),e.dispatchAction({type:"changeMagicType",currentType:s,newOption:a,newTitle:o,featureName:"magicType"})}},e}(bA),OA={line:function(t,e,n,i){if("bar"===t)return I({id:e,type:"line",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},i.get(["option","line"])||{},!0)},bar:function(t,e,n,i){if("line"===t)return I({id:e,type:"bar",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},i.get(["option","bar"])||{},!0)},stack:function(t,e,n,i){var r=n.get("stack")===AA;if("line"===t||"bar"===t)return i.setIconStatus("stack",r?"normal":"emphasis"),I({id:e,stack:r?"":AA},i.get(["option","stack"])||{},!0)}};sx({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(t,e){e.mergeOption(t.newOption)});var RA=new Array(60).join("-"),NA="\t";function BA(t){return t.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}var zA=new RegExp("[\t]+","g");function EA(t,e){var n=t.split(new RegExp("\n*"+RA+"\n*","g")),i={series:[]};return E(n,function(t,n){if(function(t){if(t.slice(0,t.indexOf("\n")).indexOf(NA)>=0)return!0}(t)){var r=function(t){for(var e=t.split(/\n+/g),n=[],i=V(BA(e.shift()).split(zA),function(t){return{name:t,data:[]}}),r=0;r6}(t)||o){if(a&&!o){"single"===s.brushMode&&hP(t);var l=C(s);l.brushType=IP(l.brushType,a),l.panelId=a===XA?null:a.panelId,o=t._creatingCover=iP(t,l),t._covers.push(o)}if(o){var u=PP[IP(t._brushType,a)];o.__brushOption.range=u.getCreatingRange(MP(t,o,t._track)),i&&(rP(t,o),u.updateCommon(t,o)),oP(t,o),r={isEnd:i}}}else i&&"single"===s.brushMode&&s.removeOnClick&&uP(t,e,n)&&hP(t)&&(r={isEnd:i,removeOnClick:!0});return r}function IP(t,e){return"auto"===t?e.defaultBrushType:t}var DP={mousedown:function(t){if(this._dragging)AP(this,t);else if(!t.target||!t.target.draggable){TP(t);var e=this.group.transformCoordToLocal(t.offsetX,t.offsetY);this._creatingCover=null,(this._creatingPanel=uP(this,t,e))&&(this._dragging=!0,this._track=[e.slice()])}},mousemove:function(t){var e=t.offsetX,n=t.offsetY,i=this.group.transformCoordToLocal(e,n);if(function(t,e,n){if(t._brushType&&!function(t,e,n){var i=t._zr;return e<0||e>i.getWidth()||n<0||n>i.getHeight()}(t,e.offsetX,e.offsetY)){var i=t._zr,r=t._covers,o=uP(t,e,n);if(!t._dragging)for(var a=0;a