/* 2020-9-22 15:23:28 | 版权所有 军懋国兴 */ function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}!function(t,e){"object"==("undefined"==typeof exports?"undefined":_typeof(exports))&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.echarts={})}(this,function(t){"use strict";function e(t,e){"createCanvas"===t&&(pf=null),df[t]=e}function D(t){if(null==t||"object"!=_typeof(t))return t;var e=t,n=af.call(t);if("[object Array]"===n){if(!u(t)){e=[];for(var i=0,o=t.length;i>4|(3840&u)>>8,240&u|(240&u)>>4,15&u|(15&u)<<4,1),kt(t,e),e):void Ct(e,0,0,0,1);if(7===i.length){var u=parseInt(i.substr(1),16);return 0<=u&&u<=16777215?(Ct(e,(16711680&u)>>16,(65280&u)>>8,255&u,1),kt(t,e),e):void Ct(e,0,0,0,1)}}}}function Nt(t,e){var n=(parseFloat(t[0])%360+360)%360/360,i=Tt(t[1]),o=Tt(t[2]),a=o<=.5?o*(i+1):o+i-o*i,r=2*o-a;return Ct(e=e||[],St(255*At(r,a,n+1/3)),St(255*At(r,a,n)),St(255*At(r,a,n-1/3)),1),4===t.length&&(e[3]=t[3]),e}function Ot(t,e){var n=Pt(t);if(n){for(var i=0;i<3;i++)n[i]=e<0?n[i]*(1-e)|0:(255-n[i])*e+n[i]|0,255e);n++);n=Math.min(n-1,c-2)}P=e;var i,o=v[(k=n)+1]-v[n];if(0!=o)if(I=(e-v[n])/o,h)if(A=y[n],T=y[0===n?n:n-1],D=y[c-2>>1])<0?l=a:s=1+a;var u=i-s;switch(u){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;0>>1);0>>1);a(t,e[n+h])<0?l=h:r=h+1}return l}function oe(g,f){function e(t){var e=s[t],n=l[t],i=s[t+1],o=l[t+1];l[t]=n+o,t===r-3&&(s[t+1]=s[t+2],l[t+1]=l[t+2]),r--;var a=ie(g[i],g,e,n,0,f);e+=a,0!=(n-=a)&&0!==(o=ne(g[e+n-1],g,i,o,o-1,f))&&(n<=o?function(t,e,n,i){var o=0;for(o=0;ol[t+1])break;e(t)}},this.forceMergeRuns=function(){for(;1>=1;return t+e}(o);do{(a=te(t,n,i,e))=e.maxIterations){t+=e.ellipsis;break}var r=0===a?function(t,e,n,i){for(var o=0,a=0,r=t.length;ap)return{lines:[],width:0,height:0};C.textWidth=de(C.text,_);var b,S,M,I,T=y.textWidth,A=null==T||"auto"===T;"string"==typeof T&&"%"===T.charAt(T.length-1)?(C.percentWidth=T,u.push(C),T=0):(A&&(T=C.textWidth,(S=(b=y.textBackgroundColor)&&b.image)&&ce(S=function(t){if("string"!=typeof t)return t;var e=wm.get(t);return e&&e.image}(S))&&(T=Math.max(T,S.width*w/S.height))),T+=M=x?x[1]+x[3]:0,null!=(I=null!=d?d-m:null)&&I=a.length&&a.push({option:t})}}),a}function on(t){var r=C();Km(t,function(t,e){var n=t.exist;n&&r.set(n.id,t)}),Km(t,function(t,e){var n=t.option;d(!n||null==n.id||!r.get(n.id)||r.get(n.id)===t,"id duplicates: "+(n&&n.id)),n&&null!=n.id&&r.set(n.id,t),t.keyInfo||(t.keyInfo={})}),Km(t,function(t,e){var n=t.exist,i=t.option,o=t.keyInfo;if($m(i)){if(o.name=null!=i.name?i.name+"":n?n.name:Qm+e,n)o.id=n.id;else if(null!=i.id)o.id=i.id+"";else for(var a=0;o.id="\0"+o.name+"\0"+a++,r.get(o.id););r.set(o.id,t)}})}function an(t){var e=t.name;return e&&e.indexOf(Qm)}function rn(t){return $m(t)&&t.id&&0===(t.id+"").indexOf("\0_ec_\0")}function sn(e,t){return null!=t.dataIndexInside?t.dataIndexInside:null!=t.dataIndex?N(t.dataIndex)?L(t.dataIndex,function(t){return e.indexOfRawIndex(t)}):e.indexOfRawIndex(t.dataIndex):null!=t.name?N(t.name)?L(t.name,function(t){return e.indexOfName(t)}):e.indexOfName(t.name):void 0}function ln(){var e="__\0ec_inner_"+ev+++"_"+Math.random().toFixed(5);return function(t){return t[e]||(t[e]={})}}function un(s,l,u){var t;A(l)&&((t={})[l+"Index"]=0,l=t);var e=u&&u.defaultMainType;!e||hn(l,e+"Index")||hn(l,e+"Id")||hn(l,e+"Name")||(l[e+"Index"]=0);var h={};return Km(l,function(t,e){var n,i,o,a,r,t=l[e];"dataIndex"!==e&&"dataIndexInside"!==e?(i=(n=e.match(/^(\w+)(Index|Id|Name)$/)||[])[1],o=(n[2]||"").toLowerCase(),!i||!o||null==t||"index"===o&&"none"===t||u&&u.includeMainTypes&&M(u.includeMainTypes,i)<0||(a={mainType:i},"index"===o&&"all"===t||(a[o]=t),r=s.queryComponents(a),h[i+"Models"]=r,h[i+"Model"]=r[0])):h[e]=t}),h}function hn(t,e){return t&&t.hasOwnProperty(e)}function cn(t,e,n){t.setAttribute?t.setAttribute(e,n):t[e]=n}function dn(t){return"auto"===t?ef.domSupported?"html":"richText":t||"html"}function pn(t){var e={main:"",sub:""};return t&&(t=t.split(nv),e.main=t[0]||"",e.sub=t[1]||""),e}function gn(t){(t.$constructor=t).extend=function(t){function e(){t.$constructor?t.$constructor.apply(this,arguments):n.apply(this,arguments)}var n=this;return P(e.prototype,t),e.extend=this.extend,e.superCall=mn,e.superApply=vn,a(e,this),e.superClass=n,e}}function fn(t){var e=["__\0is_clz",ov++,Math.random().toFixed(3)].join("_");t.prototype[e]=!0,t.isInstance=function(t){return!(!t||!t[e])}}function mn(t,e){var n=s(arguments,2);return this.superClass.prototype[e].apply(t,n)}function vn(t,e,n){return this.superClass.prototype[e].apply(t,n)}function yn(n,t){t=t||{};var i,a={};return n.registerClass=function(t,e){return e&&(d(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(o=e),'componentType "'+o+'" illegal'),(e=pn(e)).sub?e.sub!==iv&&((i=a[(n=e).main])&&i[iv]||((i=a[n.main]={})[iv]=!0),i[e.sub]=t):a[e.main]=t),t;var n,i,o},n.getClass=function(t,e,n){var i=a[t];if(i&&i[iv]&&(i=e?i[e]:null),n&&!i)throw new Error(e?"Component "+t+"."+(e||"")+" not exists. Load it first.":t+".type should be specified.");return i},n.getClassesByMainType=function(t){t=pn(t);var n=[],e=a[t.main];return e&&e[iv]?z(e,function(t,e){e!==iv&&n.push(t)}):n.push(e),n},n.hasClass=function(t){return t=pn(t),!!a[t.main]},n.getAllClassMainTypes=function(){var n=[];return z(a,function(t,e){n.push(e)}),n},n.hasSubTypes=function(t){t=pn(t);var e=a[t.main];return e&&e[iv]},n.parseClassType=pn,t.registerWhenExtend&&(i=n.extend)&&(n.extend=function(t){var e=i.call(this,t);return n.registerClass(e,t.type)}),n}function xn(t){return-cvn||s<-n)return 0;l=Math.sqrt(n*n-s*s),Xv[0]=-l,Xv[1]=l;var l,u=Math.abs(i-o);if(u<1e-4)return 0;if(u%Zv<1e-4)return o=Zv,p=a?1:-1,r>=Xv[i=0]+t&&r<=Xv[1]+t?p:0;(o=a?(l=i,i=On(o),On(l)):(i=On(i),On(o)))Math.PI/2&&d<1.5*Math.PI&&(p=-p),h+=p))}return h}(g,f,v,y,y+x,_,S,o);l=Math.cos(y+x)*m+g,u=Math.sin(y+x)*v+f;break;case Hv.R:h=l=t[d++],c=u=t[d++];w=h+t[d++],b=c+t[d++];if(n){if(kn(h,c,w,c,e,i,o)||kn(w,c,w,b,e,i,o)||kn(w,b,h,b,e,i,o)||kn(h,b,h,c,e,i,o))return!0}else s+=Rn(w,c,w,b,i,o),s+=Rn(h,b,h,c,i,o);break;case Hv.Z:if(n){if(kn(l,u,h,c,e,i,o))return!0}else s+=Rn(l,u,h,c,i,o);l=h,u=c}}return n||(a=u,r=c,Math.abs(a-r)n-2?n-1:c+1],u=t[c>n-3?n-1:c+2]);var g=d*d,f=d*g;i.push([Hn(s[0],p[0],l[0],u[0],d,g,f),Hn(s[1],p[1],l[1],u[1],d,g,f)])}return i}(i,n)),t.moveTo(i[0][0],i[0][1]);for(var s=1,c=i.length;sMath.abs(a[1])?0=e[1])return n[1]}else{if(t>=e[0])return n[0];if(t<=e[1])return n[1]}else{if(t===e[0])return n[0];if(t===e[1])return n[1]}return(t-e[0])/o*a+n[0]}function Ei(t,e){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%"}return"string"==typeof t?t.replace(/^\s+/,"").replace(/\s+$/,"").match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?NaN:+t}function zi(t,e,n){return null==e&&(e=10),e=Math.min(Math.max(0,e),20),t=(+t).toFixed(e),n?t:+t}function Bi(t){return t.sort(function(t,e){return t-e}),t}function Vi(t){if(t=+t,isNaN(t))return 0;for(var e=1,n=0;Math.round(t*e)/e!==t;)e*=10,n++;return n}function Gi(t){var e=t.toString(),n=e.indexOf("e");if(0h&&(h=u[d],c=d);++s[c],u[c]=0,++l}return s[e]/o}function Hi(t){var e=2*Math.PI;return(t%e+e)%e}function Zi(t){return-jy':'':{renderMode:o,content:"{marker"+a+"|} ",style:{color:n}}:""}function io(t,e){return"0000".substr(0,e-(t+="").length)+t}function oo(t,e,n){"week"!==t&&"month"!==t&&"quarter"!==t&&"half-year"!==t&&"year"!==t||(t="MM-dd\nyyyy");var i=Ui(e),o=n?"UTC":"",a=i["get"+o+"FullYear"](),r=i["get"+o+"Month"]()+1,s=i["get"+o+"Date"](),l=i["get"+o+"Hours"](),u=i["get"+o+"Minutes"](),h=i["get"+o+"Seconds"](),c=i["get"+o+"Milliseconds"]();return t.replace("MM",io(r,2)).replace("M",r).replace("yyyy",a).replace("yy",a%100).replace("dd",io(s,2)).replace("d",s).replace("hh",io(l,2)).replace("h",l).replace("mm",io(u,2)).replace("m",u).replace("ss",io(h,2)).replace("s",h).replace("SSS",io(c,3))}function ao(t){return t?t.charAt(0).toUpperCase()+t.substr(1):t}function ro(h,c,d,p,g){var f=0,m=0;null==p&&(p=1/0),null==g&&(g=1/0);var v=0;c.eachChild(function(t,e){var n,i,o,a,r=t.position,s=t.getBoundingRect(),l=c.childAt(e+1),u=l&&l.getBoundingRect();v="horizontal"===h?(o=s.width+(u?-u.x+s.x:0),(n=f+o)>p||t.newline?(f=0,n=o,m+=v+d,s.height):Math.max(v,s.height)):(a=s.height+(u?-u.y+s.y:0),(i=m+a)>g||t.newline?(f+=v+d,m=0,i=a,s.width):Math.max(v,s.width)),t.newline||(r[0]=f,r[1]=m,"horizontal"===h?f=n+d:m=i+d)})}function so(t,e,n){n=$y(n||0);var i=e.width,o=e.height,a=Ei(t.left,i),r=Ei(t.top,o),s=Ei(t.right,i),l=Ei(t.bottom,o),u=Ei(t.width,i),h=Ei(t.height,o),c=n[2]+n[0],d=n[1]+n[3],p=t.aspect;switch(isNaN(u)&&(u=i-s-d-a),isNaN(h)&&(h=o-l-c-r),null!=p&&(isNaN(u)&&isNaN(h)&&(i/oe.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function Jo(e,n){z(e.CHANGABLE_METHODS,function(t){e.wrapMethod(t,E(Qo,n))})}function Qo(t){var e=ta(t);e&&e.setOutputEnd(this.count())}function ta(t){var e=(t.ecModel||{}).scheduler,n=e&&e.getPipeline(t.uid);if(n){var i,o=n.currentTask;return!o||(i=o.agentStubMap)&&(o=i.get(t.uid)),o}}function ea(){this.group=new rm,this.uid=Oi("viewChart"),this.renderTask=Uo({plan:oa,reset:aa}),this.renderTask.context={view:this}}function na(t,e){if(t&&(t.trigger(e),"group"===t.type))for(var n=0;ni.get("hoverLayerThreshold")&&!ef.node&&o.traverse(function(t){t.isGroup||(t.useHoverLayer=!0)}),x_(a._zr.dom,t)}function Wa(e,n){H_(ow,function(t){t(e,n)})}function Ha(t,e){var n=t.get("z"),i=t.get("zlevel");e.group.traverse(function(t){"group"!==t.type&&(null!=n&&(t.z=n),null!=i&&(t.zlevel=i))})}function Za(){this.eventInfo}function Ua(t){uw[t]=!1}function Xa(t){return lw[n=dw,(e=t).getAttribute?e.getAttribute(n):e[n]];var e,n}function ja(t,e){rw[t]=e}function Ya(t){iw.push(t)}function qa(t,e){tr(nw,t,e,1e3)}function Ka(t,e,n){"function"==typeof e&&(n=e,e="");var i=U_(t)?t.type:[t,t={event:e}][0];t.event=(t.event||i).toLowerCase(),e=t.event,W_(K_.test(i)&&K_.test(e)),tw[i]||(tw[i]={action:n,actionInfo:t}),ew[e]=i}function $a(t,e){Mo.register(t,e)}function Ja(t,e){tr(aw,t,e,1e3,"layout")}function Qa(t,e){tr(aw,t,e,3e3,"visual")}function tr(t,e,n,i,o){(Z_(e)||U_(e))&&(n=e,e=i);var a=ua.wrapStageHandler(n,o);return a.__prio=e,a.__raw=n,t.push(a),a}function er(t,e){sw[t]=e}function nr(t){return ux.extend(t)}function ir(t){return s_.extend(t)}function or(t){return r_.extend(t)}function ar(t){return ea.extend(t)}function rr(t){return t}function sr(t,e,n,i,o){this._old=t,this._new=e,this._oldKeyGetter=n||rr,this._newKeyGetter=i||rr,this.context=o}function lr(t,e,n,i,o){for(var a=0;at[1]&&(t[0]=t[1])}function Pr(t){return t.get("stack")||kw+t.seriesIndex}function Nr(t){return t.dim+t.index}function Or(t,e){var n=[];return e.eachSeriesByType(t,function(t){Vr(t)&&!Gr(t)&&n.push(t)}),n}function Rr(t){var u=[];return z(t,function(t){var e=t.getData(),n=t.coordinateSystem.getBaseAxis(),i=n.getExtent(),o="category"===n.type?n.getBandWidth():Math.abs(i[1]-i[0])/e.count(),a=Ei(t.get("barWidth"),o),r=Ei(t.get("barMaxWidth"),o),s=t.get("barGap"),l=t.get("barCategoryGap");u.push({bandWidth:o,barWidth:a,barMaxWidth:r,barGap:s,barCategoryGap:l,axisKey:Nr(n),stackId:Pr(t)})}),Er(u)}function Er(t){var c={};z(t,function(t,e){var n=t.axisKey,i=t.bandWidth,o=c[n]||{bandWidth:i,remainedWidth:i,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},a=o.stacks;c[n]=o;var r=t.stackId;a[r]||o.autoWidthCount++,a[r]=a[r]||{width:0,maxWidth:0};var s=t.barWidth;s&&!a[r].width&&(a[r].width=s,s=Math.min(o.remainedWidth,s),o.remainedWidth-=s);var l=t.barMaxWidth;l&&(a[r].maxWidth=l);var u=t.barGap;null!=u&&(o.gap=u);var h=t.barCategoryGap;null!=h&&(o.categoryGap=h)});var d={};return z(c,function(t,n){d[n]={};var e=t.stacks,i=t.bandWidth,o=Ei(t.categoryGap,i),a=Ei(t.gap,1),r=t.remainedWidth,s=t.autoWidthCount,l=(r-o)/(s+(s-1)*a),l=Math.max(l,0);z(e,function(t,e){var n=t.maxWidth;n&&ni[1]?(n=i[1],i[0]):(n=i[0],i[1]),a=e.toGlobalCoord(e.dataToCoord(0));return a>1^-(1&s),l=(l=t.charCodeAt(r+1)-64)>>1^-(1&l),o=s+=o,a=l+=a;i.push([s/n,l/n])}return i}function es(t){return"category"===t.type?(a=(o=t).getLabelModel(),r=is(o,a),!a.get("show")||o.scale.isBlank()?{labels:[],labelCategoryInterval:r.labelCategoryInterval}:r):(e=(n=t).scale.getTicks(),i=Xr(n),{labels:L(e,function(t,e){return{formattedLabel:i(t,e),rawLabel:n.scale.getLabel(t),tickValue:t}})});var n,e,i,o,a,r}function ns(t,e){return"category"===t.type?function(t,e){var n,i,o=os(t,"ticks"),a=us(e),r=as(o,a);if(r)return r;{var s;e.get("show")&&!t.scale.isBlank()||(n=[]),n=f(a)?ls(t,a,!0):"auto"===a?(s=is(t,t.getLabelModel()),i=s.labelCategoryInterval,L(s.labels,function(t){return t.tickValue})):ss(t,i=a,!0)}return rs(o,a,{ticks:n,tickCategoryInterval:i})}(t,e):{ticks:t.scale.getTicks()}}function is(t,e){var n,i,o,a=os(t,"labels"),r=us(e),s=as(a,r);return s||rs(a,r,{labels:f(r)?ls(t,r):ss(t,n="auto"===r?null!=(o=rb(i=t).autoInterval)?o:rb(i).autoInterval=i.calculateCategoryInterval():r),labelCategoryInterval:n})}function os(t,e){return rb(t)[e]||(rb(t)[e]=[])}function as(t,e){for(var n=0;ni[0]&&(i[0]=a[0]),a[1]>i[1]&&(i[1]=a[1])}return{min:e?n:i,max:e?i:n}}function Ds(t,e){if(t.length===e.length){for(var n=0;ni[0]?1:-1,i[0]+=n*e,i[1]-=n*e),i}function ks(t,e,n,i){return("polar"===t.type?function(t,e,n,i){var o=t.getAngleAxis(),a=t.getRadiusAxis().getExtent().slice();a[0]>a[1]&&a.reverse();var r=o.getExtent(),s=Math.PI/180;n&&(a[0]-=.5,a[1]+=.5);var l=new my({shape:{cx:zi(t.cx,1),cy:zi(t.cy,1),r0:zi(a[0],1),r:zi(a[1],1),startAngle:-r[0]*s,endAngle:-r[1]*s,clockwise:o.inverse}});return e&&(l.shape.endAngle=-r[0]*s,Mi(l,{shape:{endAngle:-r[1]*s}},i)),l}:function(t,e,n,i){var o,a,r=Ls(t.getAxis("x")),s=Ls(t.getAxis("y")),l=t.getBaseAxis().isHorizontal(),u=Math.min(r[0],r[1]),h=Math.min(s[0],s[1]),c=Math.max(r[0],r[1])-u,d=Math.max(s[0],s[1])-h;n?(u-=.5,c+=.5,h-=.5,d+=.5):(o=i.get("lineStyle.width")||2,a=i.get("clipOverflow")?o/2:Math.max(c,d),l?(h-=a,d+=2*a):(u-=a,c+=2*a));var p=new _y({shape:{x:u,y:h,width:c,height:d}});return e&&(p.shape[l?"width":"height"]=0,Mi(p,{shape:{width:c,height:d}},i)),p})(t,e,n,i)}function Ps(t,e,n){for(var i=e.getBaseAxis(),o="x"===i.dim||"radius"===i.dim?0:1,a=[],r=0;ri)return!1;return!0}(a,e))){var r=e.mapDimension(a.dim),s={};return z(a.getViewLabels(),function(t){s[t.tickValue]=1}),function(t){return!s.hasOwnProperty(e.get(r,t))}}}}function Os(t){return this._axes[t]}function Rs(t){kb.call(this,t)}function Es(t,e){return e.type||(e.data?"category":"value")}function zs(t,e){return t.getCoordSysModel()===e}function Bs(t,e,n){this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this._initCartesian(t,e,n),this.model=t}function Vs(t,e,n,i){function o(t){return t.dim+"_"+t.index}n.getAxesOnZeroOf=function(){return a?[a]:[]};var a,r=t[e],s=n.model,l=s.get("axisLine.onZero"),u=s.get("axisLine.onZeroAxisIndex");if(l){if(null!=u)Gs(r[u])&&(a=r[u]);else for(var h in r)if(r.hasOwnProperty(h)&&Gs(r[h])&&!i[o(r[h])]){a=r[h];break}a&&(i[o(a)]=!0)}}function Gs(t){return t&&"category"!==t.type&&"time"!==t.type&&(e=t.scale.getExtent(),n=e[0],i=e[1],!(0o[n-1].y+o[n-1].height));n--);}function l(t,e,n,i,o,a){for(var r,s,l,u,h=e?Number.MAX_VALUE:0,c=0,d=t.length;co[i].y+o[i].height)return s(i,n/2);s(e-1,n/2)}(g,c,-u),h=o[g].y+o[g].height;for(r-h<0&&s(c-1,h-r),g=0;g=e?p.push(o[g]):d.push(o[g]);l(d,!1,t,e,n,i),l(p,!0,t,e,n,i)}function dl(){this.group=new rm}function pl(t,e,n){lb.call(this,t,e,n),this.type="value",this.angle=0,this.name="",this.model}function gl(t,e,n){this._model=t,this.dimensions=[],this._indicatorAxes=L(t.getIndicatorModels(),function(t,e){var n="indicator_"+e,i=new pl(n,new Lw);return i.name=t.get("name"),(i.model=t).axis=i,this.dimensions.push(n),i},this),this.resize(t,n),this.cx,this.cy,this.r,this.r0,this.startAngle}function fl(t,e){return O({show:e},t)}function ml(){kf.call(this)}function vl(t){this.name=t,this.zoomLimit,kf.call(this),this._roamTransformable=new ml,this._rawTransformable=new ml,this._center,this._zoom}function yl(t,e,n,i){var o=n.seriesModel,a=o?o.coordinateSystem:null;return a===this?a[t](i):null}function xl(t,e){var n,i,o,a,r=t.svgXML;try{d(null!=(i=(n=r&&(o=r,a={ignoreViewBox:!0,ignoreRootClip:!0},(new ba).parse(o,a))||{}).root))}catch(t){throw new Error("Invalid svg format\n"+t.message)}var s,l,u=n.width,h=n.height,c=n.viewBoxRect;return e||(e=null==u||null==h?i.getBoundingRect():new Qt(0,0,0,0),null!=u&&(e.width=u),null!=h&&(e.height=h)),c&&(s=Aa(c,e.width,e.height),l=i,(i=new rm).add(l),l.scale=s.scale,l.position=s.position),i.setClipPath(new _y({shape:e.plain()})),{root:i,boundingRect:e}}function _l(a){return function(n,i){var o=[];return z(wl(n),function(t){var e=kS[t.type][a];e&&o.push(e(n,t,i))}),o}}function wl(t){return G_.retrieveMap(t)||[]}function bl(t,e,n,i){vl.call(this,t),this.map=e;var o=PS.load(e,n);this._nameCoordMap=o.nameCoordMap,this._regionsMap=o.nameCoordMap,this._invertLongitute=null==i||i,this.regions=o.regions,this._rect=o.boundingRect}function Sl(t,e,n,i){var o=n.geoModel,a=n.seriesModel,r=o?o.coordinateSystem:a?a.coordinateSystem||(a.getReferringComponents("geo")[0]||{}).coordinateSystem:null;return r===this?r[t](i):null}function Ml(t,e){var n,i,o=t.get("boundingCoords");null!=o&&(n=o[0],i=o[1],isNaN(n[0])||isNaN(n[1])||isNaN(i[0])||isNaN(i[1])||this.setBoundingRect(n[0],n[1],i[0]-n[0],i[1]-n[1]));var a,r,s=this.getBoundingRect(),l=t.get("layoutCenter"),u=t.get("layoutSize"),h=e.getWidth(),c=e.getHeight(),d=s.width/s.height*this.aspectScale,p=!1;l&&u&&(l=[Ei(l[0],h),Ei(l[1],c)],u=Ei(u,Math.min(h,c)),isNaN(l[0])||isNaN(l[1])||isNaN(u)||(p=!0)),p?(r={},1v.x)||(g-=Math.PI)),_=f?"left":"right",b.setStyle({textPosition:_,textRotation:-g,textOrigin:"center",verticalAlign:"middle"})),s.parentNode&&s.parentNode!==l&&(Si(w=(w=n.__edge)||(n.__edge=new Sy({shape:uu(a,d,d),style:O({opacity:0,strokeNoScale:!0},a.lineStyle)})),{shape:uu(a,c,p),style:{opacity:1}},o),i.add(w))}function lu(t,e,n,i,o,a){for(var r,s=t.tree.getNodeByDataIndex(e),l=t.tree.root,a=ru(s,s.getModel(),a),u=s.parentNode!==l&&s.parentNode||s;null==(r=u.getLayout());)u=u.parentNode!==l&&u.parentNode||u;Si(n,{position:[r.x+1,r.y+1]},o,function(){i.remove(n),t.setItemGraphicEl(e,null)}),n.fadeOut(null,{keepLabel:!0});var h=n.__edge;h&&Si(h,{shape:uu(a,r,r),style:{opacity:0}},o,function(){i.remove(h)})}function uu(t,e,n){var i,o,a,r,s,l,u,h,c=t.orient;if("radial"!==t.layout)return s=e.x,u=e.y,l=n.x,h=n.y,"LR"!==c&&"RL"!==c||(i=s+(l-s)*t.curvature,o=u,a=l+(s-l)*t.curvature,r=h),"TB"!==c&&"BT"!==c||(i=s,o=u+(h-u)*t.curvature,a=l,r=h+(u-h)*t.curvature),{x1:s,y1:u,x2:l,y2:h,cpx1:i,cpy1:o,cpx2:a,cpy2:r};s=e.rawX,u=e.rawY,l=n.rawX,h=n.rawY;var d=eu(s,u),p=eu(s,u+(h-u)*t.curvature),g=eu(l,h+(u-h)*t.curvature),f=eu(l,h);return{x1:d.x,y1:d.y,x2:f.x,y2:f.y,cpx1:p.x,cpy1:p.y,cpx2:g.x,cpy2:g.y}}function hu(t,e){for(var n,i=[t];n=i.pop();)if(e(n),n.isExpand){var o=n.children;if(o.length)for(var a=o.length-1;0<=a;a--)i.push(o[a])}}function cu(t,e){var n,i=(n=e,so(t.getBoxLayoutParams(),{width:n.getWidth(),height:n.getHeight()}));t.layoutInfo=i;var o,a,r,s,l,u,h,c,d,p,g=t.get("layout"),f=0,m=0,v=null,v="radial"===g?(f=2*Math.PI,m=Math.min(i.height,i.width)/2,tu(function(t,e){return(t.parentNode===e.parentNode?1:2)/t.depth})):(f=i.width,m=i.height,tu()),y=t.getData().tree.root,x=y.children[0];x&&(function(t){t.hierNode={defaultAncestor:null,ancestor:t,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var e,n,i=[t];e=i.pop();)if(n=e.children,e.isExpand&&n.length)for(var o=n.length-1;0<=o;o--){var a=n[o];a.hierNode={defaultAncestor:null,ancestor:a,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},i.push(a)}}(y),function(t,e,n){for(var i,o=[t],a=[];i=o.pop();)if(a.push(i),i.isExpand){var r=i.children;if(r.length)for(var s=0;sa.getLayout().x&&(a=t),t.depth>r.depth&&(r=t)}),s=o===a?1:v(o,a)/2,l=s-o.getLayout().x,d=c=h=u=0,"radial"===g?(u=f/(a.getLayout().x+s+l),h=m/(r.depth-1||1),hu(x,function(t){c=(t.getLayout().x+l)*u,d=(t.depth-1)*h;var e=eu(c,d);t.setLayout({x:e.x,y:e.y,rawX:c,rawY:d},!0)})):"RL"===(p=t.getOrient())||"LR"===p?(h=m/(a.getLayout().x+s+l),u=f/(r.depth-1||1),hu(x,function(t){d=(t.getLayout().x+l)*h,c="LR"===p?(t.depth-1)*u:f-(t.depth-1)*u,t.setLayout({x:c,y:d},!0)})):"TB"!==p&&"BT"!==p||(u=f/(a.getLayout().x+s+l),h=m/(r.depth-1||1),hu(x,function(t){c=(t.getLayout().x+l)*u,d="TB"===p?(t.depth-1)*h:m-(t.depth-1)*h,t.setLayout({x:c,y:d},!0)})))}function du(t,e,n){if(t&&0<=M(e,t.type)){var i=n.getData().tree.root,o=t.targetNode;if("string"==typeof o&&(o=i.getNodeById(o)),o&&i.contains(o))return{node:o};var a=t.targetNodeId;if(null!=a&&(o=i.getNodeById(a)))return{node:o}}}function pu(t){for(var e=[];t;)(t=t.parentNode)&&e.push(t);return e.reverse()}function gu(t,e){return 0<=M(pu(t),e)}function fu(t,e){for(var n=[];t;){var i=t.dataIndex;n.push({name:t.name,dataIndex:i,value:e.getRawValue(i)}),t=t.parentNode}return n.reverse(),n}function mu(t){this.group=new rm,t.add(this.group)}function vu(d,u,h,c,p,n,g,t,e,i){function s(t,e){x?t.invisible||n.push(t):(e(),t.__tmWillVisible||(t.invisible=!1))}function l(t,e,n,i,o,a){var r,s=g.getModel(),l=V(d.getFormattedLabel(g.dataIndex,"normal",null,null,a?"upperLabel":"label"),s.get("name"));!a&&f.isLeafRoot&&(l=(r=d.get("drillDownIcon",!0))?r+" "+l:l);var u=s.getModel(a?qS:jS),h=s.getModel(a?KS:YS),c=u.getShallow("show");gi(t,e,u,h,{defaultText:c?l:null,autoColor:n,isRectText:!0}),a&&(t.textRect=D(a)),t.truncate=c&&u.get("ellipsis")?{outerWidth:i,outerHeight:o,minChar:2}:null}function o(t,e,n,i){var o,a,r,s=null!=w&&h[t][w],l=p[t];return s?(h[t][w]=null,a=s,r=t,(l[_]={}).old="nodeGroup"===r?a.position.slice():P({},a.shape)):x||((s=new e({z:((o=n*$S+i)-1)/o})).__tmDepth=n,function(t,e){var n=t[_]={},i=g.parentNode;{var o,a,r;!i||c&&"drillDown"!==c.direction||(a=o=0,r=p.background[i.getRawIndex()],!c&&r&&r.old&&(o=r.old.width,a=r.old.height),n.old="nodeGroup"===e?[0,a]:{x:o,y:a,width:0,height:0})}n.fadein="nodeGroup"!==e}(l,s.__tmStorageName=t)),u[t][_]=s}if(g){var f=g.getLayout();if(f&&f.isInView){var m=f.width,v=f.height,y=f.borderWidth,x=f.invisible,_=g.getRawIndex(),w=t&&t.getRawIndex(),a=g.viewChildren,b=f.upperHeight,r=a&&a.length,S=g.getModel("itemStyle"),M=g.getModel("emphasis.itemStyle"),I=o("nodeGroup",ZS);if(I){if(e.add(I),I.attr("position",[f.x||0,f.y||0]),I.__tmNodeWidth=m,I.__tmNodeHeight=v,f.isAboveViewRoot)return I;var T,A=o("background",US,i,1);return A&&function(t,i,o){i.dataIndex=g.dataIndex,i.seriesIndex=d.seriesIndex,i.setShape({x:0,y:0,width:m,height:v});var a=g.getVisual("borderColor",!0),r=M.get("borderColor");s(i,function(){var t=WS(S);t.fill=a;var e,n=JS(M);n.fill=r,o?l(t,n,a,e=m-2*y,b,{x:y,y:0,width:e,height:b}):t.text=n.text=null,i.setStyle(t),di(i,n)}),t.add(i)}(I,A,r&&f.upperHeight),r||(T=o("content",US,i,2))&&function(t,n){n.dataIndex=g.dataIndex,n.seriesIndex=d.seriesIndex;var i=Math.max(m-2*y,0),o=Math.max(v-2*y,0);n.culling=!0,n.setShape({x:y,y:y,width:i,height:o});var a=g.getVisual("color",!0);s(n,function(){var t=WS(S);t.fill=a;var e=JS(M);l(t,e,a,i,o),n.setStyle(t),di(n,e)}),t.add(n)}(I,T),I}}}}function yu(t,e){var n=t.visual,i=[];B(n)?eM(n,function(t){i.push(t)}):null!=n&&i.push(n);e||1!==i.length||{color:1,symbol:1}.hasOwnProperty(t.type)||(i[1]=i[0]),Tu(t,i)}function xu(i){return{applyVisual:function(t,e,n){t=this.mapValueToVisual(t),n("color",i(e("color"),t))},_doMap:Mu([0,1])}}function _u(t){var e=this.option.visual;return e[Math.round(Ri(t,[0,1],[0,e.length-1],!0))]||{}}function wu(i){return function(t,e,n){n(i,this.mapValueToVisual(t))}}function bu(t){var e=this.option.visual;return e[this.option.loop&&t!==iM?t%e.length:t]}function Su(){return this.option.visual[0]}function Mu(i){return{linear:function(t){return Ri(t,i,this.option.visual,!0)},category:bu,piecewise:function(t,e){var n=Iu.call(this,e);return null==n&&(n=Ri(t,i,this.option.visual,!0)),n},fixed:Su}}function Iu(t){var e=this.option,n=e.pieceList;if(e.hasSpecialVisual){var i=n[oM.findPieceIndex(t,n)];if(i&&i.visual)return i.visual[this.type]}}function Tu(t,e){return t.visual=e,"color"===t.type&&(t.parsedVisual=L(e,function(t){return Pt(t)})),e}function Au(t,e,n){return t?e<=n:es[1]&&(s[1]=r);var l=t.get("colorMappingBy"),u={type:o.name,dataExtent:s,visual:o.range};"color"!==u.type||"index"!==l&&"id"!==l?u.mappingMethod="linear":(u.mappingMethod="category",u.loop=!0);var h=new oM(u);return h.__drColorMappingBy=l,h}}}(_,w,l,c),z(c,function(t,e){(t.depth>=o.length||t===o[t.depth])&&Du(t,function(t,e,n,i,o,a){var r=P({},e);{var s,l,u;o&&(s=o.type,l="color"===s&&o.__drColorMappingBy,u="index"===l?i:"id"===l?a.mapIdToIndex(n.getId()):n.getValue(t.get("visualDimension")),r[s]=o.mapValueToVisual(u))}return r}(_,l,t,e,d,a),n,i,o,a)})):(r=Cu(l),t.setVisual("color",r)))}function Cu(t){var e=Lu(t,"color");if(e){var n=Lu(t,"colorAlpha"),i=Lu(t,"colorSaturation");return i&&(e=Bt(e,null,null,i)),n&&(e=Vt(e,n)),e}}function Lu(t,e){var n=t[e];if(null!=n&&"none"!==n)return n}function ku(t,e){var n=t.get(e);return sM(n)&&n.length?{name:e,range:n}:null}function Pu(t,e,n,i){if(!t.isRemoved()){var o=t.getLayout(),a=o.width,r=o.height,s=(p=t.getModel()).get(gM),l=p.get(fM)/2,u=Ou(p),h=Math.max(s,u),c=s-l,d=h-l,p=t.getModel();t.setLayout({borderWidth:s,upperHeight:h,upperLabelHeight:u},!0);var g=(a=hM(a-2*c,0))*(r=hM(r-c-d,0)),f=function(t,e,n,i,o,a){var r=t.children||[],s=i.sort;"asc"!==s&&"desc"!==s&&(s=null);var l=null!=i.leafDepth&&i.leafDepth<=a;if(o&&!l)return t.viewChildren=[];!function(t,i){i&&t.sort(function(t,e){var n="asc"===i?t.getValue()-e.getValue():e.getValue()-t.getValue();return 0==n?"asc"===i?t.dataIndex-e.dataIndex:e.dataIndex-t.dataIndex:n})}(r=I(r,function(t){return!t.isRemoved()}),s);var u=function(t,e,n){for(var i=0,o=0,a=e.length;os[1]&&(s[1]=e)})):s=[NaN,NaN]}return{sum:i,dataExtent:s}}(e,r,s);if(0===u.sum)return t.viewChildren=[];if(u.sum=function(t,e,n,i,o){if(!i)return n;for(var a=t.get("visibleMin"),r=o.length,s=r,l=r-1;0<=l;l--){var u=o["asc"===i?r-l-1:l].getValue();u/n*en[l[r]])&&(h=n[l[r]]);for(var c=0,d=t.length;clI}}(t)||s?(l&&!s&&("single"===u.brushMode&&yh(t),(a=D(u)).brushType=Oh(a.brushType,l),a.panelId=!0===l?null:l.panelId,s=t._creatingCover=hh(t,a),t._covers.push(s)),s&&(r=mI[Oh(t._brushType,l)],s.__brushOption.range=r.getCreatingRange(Lh(t,s,t._track)),i&&(ch(t,s),r.updateCommon(t,s)),dh(t,s),o={isEnd:i})):i&&"single"===u.brushMode&&u.removeOnClick&&mh(t,e,n)&&yh(t)&&(o={isEnd:i,removeOnClick:!0}),o}function Oh(t,e){return"auto"===t?e.defaultBrushType:t}function Rh(t){var e;this._dragging&&(kh(t),e=Nh(this,t,this.group.transformCoordToLocal(t.offsetX,t.offsetY),!0),this._dragging=!1,this._track=[],this._creatingCover=null,e&&xh(this,e))}function Eh(s){return{createCover:function(t,e){return wh(eI(Ah,function(t){var e=[t,[0,100]];return s&&e.reverse(),e},function(t){return t[s]}),t,e,[["w","e"],["n","s"]][s])},getCreatingRange:function(t){var e=_h(t);return[oI(e[0][s],e[1][s]),aI(e[0][s],e[1][s])]},updateCoverShape:function(t,e,n,i){var o,a=vh(t,e),r=[n,!0!==a&&a.getLinearBrushOtherExtent?a.getLinearBrushOtherExtent(s,t._transform):[0,[(o=t._zr).getWidth(),o.getHeight()][1-s]]];s&&r.reverse(),bh(t,e,r,i)},updateCommon:Sh,contain:Ph}}function zh(n){return n=Gh(n),function(t,e){return Ci(t,n)}}function Bh(o,a){return o=Gh(o),function(t){var e=null!=a?a:t,n=e?o.width:o.height,i=e?o.x:o.y;return[i,i+(n||0)]}}function Vh(i,o,a){return i=Gh(i),function(t,e,n){return i.contain(e[0],e[1])&&!Vl(t,o,a)}}function Gh(t){return Qt.create(t)}function Fh(t,e){var n=t._model;return n.get("axisExpandable")&&n.get("axisExpandTriggerOn")===e}function Wh(t,e,n,i){for(var o,a=[],r=0;r=h.length)return t;var o=[],a=e[i++];return z(t,function(t,e){o.push({key:e,values:n(t,i)})}),a?o.sort(function(t,e){return a(t.key,e.key)}):o}(function n(t,i){if(i>=h.length)return t;for(var e=-1,o=t.length,a=h[i++],r={},s={};++ee[0]&&(e=e.slice().reverse());var i=t.coordToPoint([e[0],n]),o=t.coordToPoint([e[1],n]);return{x1:i[0],y1:i[1],x2:o[0],y2:o[1]}}function $d(t){return t.getRadiusAxis().inverse?0:1}function Jd(t){var e=t[0],n=t[t.length-1];e&&n&&Math.abs(Math.abs(e.coord-n.coord)-360)<1e-4&&t.pop()}function Qd(i,t){t.update="updateView",Ka(t,function(t,e){var n={};return e.eachComponent({mainType:"geo",query:t},function(e){e[i](t.name),z(e.coordinateSystem.regions,function(t){n[t.name]=e.isSelected(t.name)||!1})}),{selected:n,name:t.name}})}function tp(t){if(t)for(var e in t)if(t.hasOwnProperty(e))return 1}function ep(e,t,a){var n={};return fA(t,function(i){var o=n[i]=(t.prototype.__hidden=t.prototype,new t);function t(){}fA(e[i],function(t,e){var n;oM.isValidType(e)&&(n={type:e,visual:t},a&&a(n,i),o[e]=new oM(n),"opacity"===e&&((n=D(n)).type="colorAlpha",o.__hidden.__alphaForOpacity=new oM(n)))})}),n}function np(e,n,t){var i;z(t,function(t){n.hasOwnProperty(t)&&tp(n[t])&&(i=!0)}),i&&z(t,function(t){n.hasOwnProperty(t)&&tp(n[t])?e[t]=D(n[t]):delete e[t]})}function ip(a){var r=["x","y"],s=["width","height"];return{point:function(t,e,n){if(t){var i=n.range;return op(t[a],i)}},rect:function(t,e,n){if(t){var i=n.range,o=[t[r[a]],t[r[a]]+t[s[a]]];return o[1]t[1]&&t.reverse(),t}function up(t,e){return un(t,e,{includeMainTypes:wA})}function hp(t,e,n,i){var o=n.getAxis(["x","y"][t]),a=lp(L([0,1],function(t){return e?o.coordToData(o.toLocalCoord(i[t])):o.toGlobalCoord(o.dataToCoord(i[t]))})),r=[];return r[t]=a,r[1-t]=[NaN,NaN],{values:a,xyMinMax:r}}function cp(t,e,n,i){return[e[0]-i[t]*n[0],e[1]-i[t]*n[1]]}function dp(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[NaN,NaN]}function pp(t,e){var n;t.isDisposed()||((n=t.getZr())[LA]=!0,t.dispatchAction({type:"brushSelect",batch:e}),n[LA]=!1)}function gp(t,e,n,i){for(var o=0,a=e.length;oi[1]&&(i[1]=e[1])})}),i[1]=this._maxSize&&0=this.x&&t<=this.x+this.width&&e>=this.y&&e<=this.y+this.height},clone:function(){return new Qt(this.x,this.y,this.width,this.height)},copy:function(t){this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height},plain:function(){return{x:this.x,y:this.y,width:this.width,height:this.height}}},Qt.create=function(t){return new Qt(t.x,t.y,t.width,t.height)};var rm=function(t){for(var e in t=t||{},Jf.call(this,t),t)t.hasOwnProperty(e)&&(this[e]=t[e]);this._children=[],this.__storage=null,this.__dirty=!0};rm.prototype={constructor:rm,isGroup:!0,type:"group",silent:!1,children:function(){return this._children.slice()},childAt:function(t){return this._children[t]},childOfName:function(t){for(var e=this._children,n=0;na[0]){for(l=0;lt);l++);s=o[a[l]]}a.splice(l+1,0,t),(o[t]=e).virtual||(s?(n=s.dom).nextSibling?u.insertBefore(e.dom,n.nextSibling):u.appendChild(e.dom):u.firstChild?u.insertBefore(e.dom,u.firstChild):u.appendChild(e.dom))}else $f("Layer of zlevel "+t+" is not valid")},eachLayer:function(t,e){for(var n,i=this._zlevelList,o=0;othis._ux||Bv(e-this._yi)>this._uy||this._len<5;return this.addData(Dv.L,t,e),this._ctx&&n&&(this._needsDash()?this._dashedLineTo(t,e):this._ctx.lineTo(t,e)),n&&(this._xi=t,this._yi=e),this},bezierCurveTo:function(t,e,n,i,o,a){return this.addData(Dv.C,t,e,n,i,o,a),this._ctx&&(this._needsDash()?this._dashedBezierTo(t,e,n,i,o,a):this._ctx.bezierCurveTo(t,e,n,i,o,a)),this._xi=o,this._yi=a,this},quadraticCurveTo:function(t,e,n,i){return this.addData(Dv.Q,t,e,n,i),this._ctx&&(this._needsDash()?this._dashedQuadraticTo(t,e,n,i):this._ctx.quadraticCurveTo(t,e,n,i)),this._xi=n,this._yi=i,this},arc:function(t,e,n,i,o,a){return this.addData(Dv.A,t,e,n,n,i,o-i,0,a?0:1),this._ctx&&this._ctx.arc(t,e,n,i,o,a),this._xi=Rv(o)*n+t,this._yi=Ev(o)*n+e,this},arcTo:function(t,e,n,i,o){return this._ctx&&this._ctx.arcTo(t,e,n,i,o),this},rect:function(t,e,n,i){return this._ctx&&this._ctx.rect(t,e,n,i),this.addData(Dv.R,t,e,n,i),this},closePath:function(){this.addData(Dv.Z);var t=this._ctx,e=this._x0,n=this._y0;return t&&(this._needsDash()&&this._dashedLineTo(e,n),t.closePath()),this._xi=e,this._yi=n,this},fill:function(t){t&&t.fill(),this.toStatic()},stroke:function(t){t&&t.stroke(),this.toStatic()},setLineDash:function(t){if(t instanceof Array){this._lineDash=t;for(var e=this._dashIdx=0,n=0;ne.length&&(this._expandData(),e=this.data);for(var n=0;nd);x++);for(r=(w-d)/y;r<=1;)u=v(f,t,n,o,r),h=v(m,e,i,a,r),x%2?g.moveTo(u,h):g.lineTo(u,h),r+=p[x]/y,x=(x+1)%_;x%2!=0&&g.lineTo(o,a),s=o-u,l=a-h,this._dashOffset=-zv(s*s+l*l)},_dashedQuadraticTo:function(t,e,n,i){var o=n,a=i;n=(n+2*t)/3,i=(i+2*e)/3,t=(this._xi+2*t)/3,e=(this._yi+2*e)/3,this._dashedBezierTo(t,e,n,i,o,a)},toStatic:function(){var t=this.data;t instanceof Array&&(t.length=this._len,Vv&&(this.data=new Float32Array(t)))},getBoundingRect:function(){Cv[0]=Cv[1]=kv[0]=kv[1]=Number.MAX_VALUE,Lv[0]=Lv[1]=Pv[0]=Pv[1]=-Number.MAX_VALUE;for(var t,e,n,i,o,a,r,s,l,u,h,c,d,p,g=this.data,f=0,m=0,v=0,y=0,x=0;xl||Bv(r-o)>u||c===h-1)&&(t.lineTo(a,r),i=a,o=r);break;case Dv.C:t.bezierCurveTo(s[c++],s[c++],s[c++],s[c++],s[c++],s[c++]),i=s[c-2],o=s[c-1];break;case Dv.Q:t.quadraticCurveTo(s[c++],s[c++],s[c++],s[c++]),i=s[c-2],o=s[c-1];break;case Dv.A:var p=s[c++],g=s[c++],f=s[c++],m=s[c++],v=s[c++],y=s[c++],x=s[c++],_=s[c++],w=m"'])/g,Qy={"&":"&","<":"<",">":">",'"':""","'":"'"},tx=["a","b","c","d","e","f","g"],ex=ve,nx=(Object.freeze||Object)({addCommas:$i,toCamelCase:Ji,normalizeCssArray:$y,encodeHTML:Qi,formatTpl:to,formatTplSimple:eo,getTooltipMarker:no,formatTime:oo,capitalFirst:ao,truncateText:ex,getTextRect:pe}),ix=z,ox=["left","right","top","bottom","width","height"],ax=[["width","left","right"],["height","top","bottom"]],rx=ro,sx=(E(ro,"vertical"),E(ro,"horizontal"),{getBoxLayoutParams:function(){return{left:this.get("left"),top:this.get("top"),right:this.get("right"),bottom:this.get("bottom"),width:this.get("width"),height:this.get("height")}}}),lx=ln(),ux=ki.extend({type:"component",id:"",name:"",mainType:"",subType:"",componentIndex:0,defaultOption:null,ecModel:null,dependentModels:[],uid:null,layoutMode:null,$constructor:function(t,e,n,i){ki.call(this,t,e,n,i),this.uid=Oi("ec_cpt_model")},init:function(t,e,n){this.mergeDefaultAndTheme(t,n)},mergeDefaultAndTheme:function(t,e){var n=this.layoutMode,i=n?ho(t):{};v(t,e.getTheme().get(this.mainType)),v(t,this.getDefaultOption()),n&&uo(t,i,n)},mergeOption:function(t){v(this.option,t,!0);var e=this.layoutMode;e&&uo(this.option,t,e)},optionUpdated:function(){},getDefaultOption:function(){var t=lx(this);if(!t.defaultOption){for(var e=[],n=this.constructor;n;){var i=n.prototype.defaultOption;i&&e.push(i),n=n.superClass}for(var o={},a=e.length-1;0<=a;a--)o=v(o,e[a],!0);t.defaultOption=o}return t.defaultOption},getReferringComponents:function(t){return this.ecModel.queryComponents({mainType:t,index:this.get(t+"Index",!0),id:this.get(t+"Id",!0)})}});function hx(l){var u={},h=[];return z(l,function(n){var t,e,i,o,a,r=cx(u,n),s=(t=r.originalDeps=(o=n,a=[],z(ux.getClassesByMainType(o),function(t){a=a.concat(t.prototype.dependencies||[])}),a=L(a,function(t){return pn(t).main}),"dataset"!==o&&M(a,"dataset")<=0&&a.unshift("dataset"),a),e=l,i=[],z(t,function(t){0<=M(e,t)&&i.push(t)}),i);r.entryCount=s.length,0===r.entryCount&&h.push(n),z(s,function(t){M(r.predecessor,t)<0&&r.predecessor.push(t);var e=cx(u,t);M(e.successor,t)<0&&e.successor.push(n)})}),{graph:u,noEntryList:h}}function cx(t,e){return t[e]||(t[e]={predecessor:[],successor:[]}),t[e]}yn(ux,{registerWhenExtend:!0}),Uy={},(Zy=ux).registerSubTypeDefaulter=function(t,e){t=pn(t),Uy[t.main]=e},Zy.determineSubType=function(t,e){var n,i=e.type;return i||(n=pn(t).main,Zy.hasSubTypes(t)&&Uy[n]&&(i=Uy[n](e))),i},ux.topologicalTravel=function(t,e,n,i){function o(t){r[t].entryCount--,0===r[t].entryCount&&s.push(t)}if(t.length){var a=hx(e),r=a.graph,s=a.noEntryList,l={};for(z(t,function(t){l[t]=!0});s.length;){var u=s.pop(),h=r[u],c=!!l[u];c&&(n.call(i,u,h.originalDeps.slice()),delete l[u]),z(h.successor,c?function(t){l[t]=!0,o(t)}:o)}z(l,function(){throw new Error("Circle dependency may exists")})}},o(ux,sx);var dx="";"undefined"!=typeof navigator&&(dx=navigator.platform||"");var px={color:["#c23531","#2f4554","#61a0a8","#d48265","#91c7ae","#749f83","#ca8622","#bda29a","#6e7074","#546570","#c4ccd3"],gradientColor:["#f6efa6","#d88273","#bf444c"],textStyle:{fontFamily:dx.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,animation:"auto",animationDuration:1e3,animationDurationUpdate:300,animationEasing:"exponentialOut",animationEasingUpdate:"cubicOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1},gx=ln(),fx={clearColorPalette:function(){gx(this).colorIdx=0,gx(this).colorNameMap={}},getColorFromPalette:function(t,e,n){var i=gx(e=e||this),o=i.colorIdx||0,a=i.colorNameMap=i.colorNameMap||{};if(a.hasOwnProperty(t))return a[t];var r=Qe(this.get("color",!0)),s=this.get("colorLayer",!0),l=null!=n&&s?function(t,e){for(var n=t.length,i=0;ie)return t[i];return t[n-1]}(s,n):r;if((l=l||r)&&l.length){var u=l[o];return t&&(a[t]=u),i.colorIdx=(o+1)%l.length,u}}},mx={cartesian2d:function(t,e,n,i){var o=t.getReferringComponents("xAxis")[0],a=t.getReferringComponents("yAxis")[0];e.coordSysDims=["x","y"],n.set("x",o),n.set("y",a),go(o)&&(i.set("x",o),e.firstCategoryDimIndex=0),go(a)&&(i.set("y",a),e.firstCategoryDimIndex=1)},singleAxis:function(t,e,n,i){var o=t.getReferringComponents("singleAxis")[0];e.coordSysDims=["single"],n.set("single",o),go(o)&&(i.set("single",o),e.firstCategoryDimIndex=0)},polar:function(t,e,n,i){var o=t.getReferringComponents("polar")[0],a=o.findAxisModel("radiusAxis"),r=o.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],n.set("radius",a),n.set("angle",r),go(a)&&(i.set("radius",a),e.firstCategoryDimIndex=0),go(r)&&(i.set("angle",r),e.firstCategoryDimIndex=1)},geo:function(t,e){e.coordSysDims=["lng","lat"]},parallel:function(t,o,a,r){var s=t.ecModel,e=s.getComponent("parallel",t.get("parallelIndex")),l=o.coordSysDims=e.dimensions.slice();z(e.parallelAxisIndex,function(t,e){var n=s.getComponent("parallelAxis",t),i=l[e];a.set(i,n),go(n)&&null==o.firstCategoryDimIndex&&(r.set(i,n),o.firstCategoryDimIndex=e)})}},vx="original",yx="arrayRows",xx="objectRows",_x="keyedColumns",bx="unknown",Sx="typedArray",Mx="column",Ix="row";fo.seriesDataToSource=function(t){return new fo({data:t,sourceFormat:g(t)?Sx:vx,fromDataset:!1})},fn(fo);var Tx=ln(),Ax="\0_ec_inner",Dx=ki.extend({init:function(t,e,n,i){n=n||{},this.option=null,this._theme=new ki(n),this._optionManager=i},setOption:function(t,e){d(!(Ax in t),"please use chart.getOption()"),this._optionManager.setOption(t,e),this.resetOption(null)},resetOption:function(t){var e,n,i,o=!1,a=this._optionManager;return t&&"recreate"!==t||(e=a.mountOption("recreate"===t),this.option&&"recreate"!==t?(this.restoreData(),this.mergeOption(e)):_o.call(this,e),o=!0),"timeline"!==t&&"media"!==t||this.restoreData(),t&&"recreate"!==t&&"timeline"!==t||(n=a.getTimelineOption(this))&&(this.mergeOption(n),o=!0),t&&"recreate"!==t&&"media"!==t||(i=a.getMediaOption(this,this._api)).length&&z(i,function(t){this.mergeOption(t,o=!0)},this),o},mergeOption:function(i){var l=this.option,u=this._componentsMap,n=[];Tx(this).datasetMap=C(),z(i,function(t,e){null!=t&&(ux.hasClass(e)?e&&n.push(e):l[e]=null==l[e]?D(t):v(l[e],t,!0))}),ux.topologicalTravel(n,ux.getAllClassMainTypes(),function(r,t){var e=Qe(i[r]),n=nn(u.get(r),e);on(n),z(n,function(t,e){var n,i,o,a=t.option;B(a)&&(t.keyInfo.mainType=r,t.keyInfo.subType=(n=r,i=a,o=t.exist,i.type?i.type:o?o.subType:ux.determineSubType(n,i)))});var s=function(e,t){N(t)||(t=t?[t]:[]);var n={};return z(t,function(t){n[t]=(e.get(t)||[]).slice()}),n}(u,t);l[r]=[],u.set(r,[]),z(n,function(t,e){var n,i,o=t.exist,a=t.option;d(B(a)||o,"Empty component definition"),a?(n=ux.getClass(r,t.keyInfo.subType,!0),o&&o instanceof n?(o.name=t.keyInfo.name,o.mergeOption(a,this),o.optionUpdated(a,!1)):(i=P({dependentModels:s,componentIndex:e},t.keyInfo),P(o=new n(a,this,this,i),i),o.init(a,this,this,i),o.optionUpdated(null,!0))):(o.mergeOption({},this),o.optionUpdated({},!1)),u.get(r)[e]=o,l[r][e]=o.option},this),"series"===r&&wo(this,u.get("series"))},this),this._seriesIndicesMap=C(this._seriesIndices=this._seriesIndices||[])},getOption:function(){var i=D(this.option);return z(i,function(t,e){if(ux.hasClass(e)){for(var n=(t=Qe(t)).length-1;0<=n;n--)rn(t[n])&&t.splice(n,1);i[e]=t}}),delete i[Ax],i},getTheme:function(){return this._theme},getComponent:function(t,e){var n=this._componentsMap.get(t);if(n)return n[e||0]},queryComponents:function(t){var e=t.mainType;if(!e)return[];var n,i,o=t.index,a=t.id,r=t.name,s=this._componentsMap.get(e);return s&&s.length?bo(null!=o?(N(o)||(o=[o]),I(L(o,function(t){return s[t]}),function(t){return!!t})):null!=a?(n=N(a),I(s,function(t){return n&&0<=M(a,t.id)||!n&&t.id===a})):null!=r?(i=N(r),I(s,function(t){return i&&0<=M(r,t.name)||!i&&t.name===r})):s.slice(),t):[]},findComponents:function(t){var e,n,i,o,a=t.query,r=t.mainType,s=(e=r+"Index",n=r+"Id",i=r+"Name",!a||null==a[e]&&null==a[n]&&null==a[i]?null:{mainType:r,index:a[e],id:a[n],name:a[i]});return o=bo(s?this.queryComponents(s):this._componentsMap.get(r),t),t.filter?I(o,t.filter):o},eachComponent:function(t,i,o){var e=this._componentsMap;"function"==typeof t?(o=i,i=t,e.each(function(t,n){z(t,function(t,e){i.call(o,n,t,e)})})):A(t)?z(e.get(t),i,o):B(t)&&z(this.findComponents(t),i,o)},getSeriesByName:function(e){return I(this._componentsMap.get("series"),function(t){return t.name===e})},getSeriesByIndex:function(t){return this._componentsMap.get("series")[t]},getSeriesByType:function(e){return I(this._componentsMap.get("series"),function(t){return t.subType===e})},getSeries:function(){return this._componentsMap.get("series").slice()},getSeriesCount:function(){return this._componentsMap.get("series").length},eachSeries:function(n,i){z(this._seriesIndices,function(t){var e=this._componentsMap.get("series")[t];n.call(i,e,t)},this)},eachRawSeries:function(t,e){z(this._componentsMap.get("series"),t,e)},eachSeriesByType:function(n,i,o){z(this._seriesIndices,function(t){var e=this._componentsMap.get("series")[t];e.subType===n&&i.call(o,e,t)},this)},eachRawSeriesByType:function(t,e,n){return z(this.getSeriesByType(t),e,n)},isSeriesFiltered:function(t){return null==this._seriesIndicesMap.get(t.componentIndex)},getCurrentSeriesIndices:function(){return(this._seriesIndices||[]).slice()},filterSeries:function(t,e){wo(this,I(this._componentsMap.get("series"),t,e))},restoreData:function(n){var i=this._componentsMap;wo(this,i.get("series"));var o=[];i.each(function(t,e){o.push(e)}),ux.topologicalTravel(o,ux.getAllClassMainTypes(),function(e,t){z(i.get(e),function(t){"series"===e&&function(t,e){if(e){var n=e.seiresIndex,i=e.seriesId,o=e.seriesName;return null!=n&&t.componentIndex!==n||null!=i&&t.id!==i||null!=o&&t.name!==o}}(t,n)||t.restoreData()})})}});o(Dx,fx);var Cx=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isDisposed","on","off","getDataURL","getConnectedDataURL","getModel","getOption","getViewOfComponentModel","getViewOfSeriesModel"],Lx={};Mo.prototype={constructor:Mo,create:function(i,o){var a=[];z(Lx,function(t,e){var n=t.create(i,o);a=a.concat(n||[])}),this._coordinateSystems=a},update:function(e,n){z(this._coordinateSystems,function(t){t.update&&t.update(e,n)})},getCoordinateSystems:function(){return this._coordinateSystems.slice()}},Mo.register=function(t,e){Lx[t]=e},Mo.get=function(t){return Lx[t]};var kx=z,Px=D,Nx=L,Ox=v,Rx=/^(min|max)?(.+)$/;Io.prototype={constructor:Io,setOption:function(t,e){t&&z(Qe(t.series),function(t){t&&t.data&&g(t.data)&&c(t.data)}),t=Px(t,!0);var o,n,i=this._optionBackup,a=function(t,n,i){var e,o,a,r=[],s=[],l=t.timeline;return t.baseOption&&(o=t.baseOption),(l||t.options)&&(o=o||{},r=(t.options||[]).slice()),t.media&&(o=o||{},a=t.media,kx(a,function(t){t&&t.option&&(t.query?s.push(t):e=e||t)})),(o=o||t).timeline||(o.timeline=l),kx([o].concat(r).concat(L(s,function(t){return t.option})),function(e){kx(n,function(t){t(e,i)})}),{baseOption:o,timelineOptions:r,mediaDefault:e,mediaList:s}}.call(this,t,e,!i);this._newBaseOption=a.baseOption,i?(o=i.baseOption,n=a.baseOption,kx(n=n||{},function(t,e){var n,i;null!=t&&(n=o[e],ux.hasClass(e)?(t=Qe(t),i=nn(n=Qe(n),t),o[e]=Nx(i,function(t){return t.option&&t.exist?Ox(t.exist,t.option,!0):t.exist||t.option})):o[e]=Ox(n,t,!0))}),a.timelineOptions.length&&(i.timelineOptions=a.timelineOptions),a.mediaList.length&&(i.mediaList=a.mediaList),a.mediaDefault&&(i.mediaDefault=a.mediaDefault)):this._optionBackup=a},mountOption:function(t){var e=this._optionBackup;return this._timelineOptions=Nx(e.timelineOptions,Px),this._mediaList=Nx(e.mediaList,Px),this._mediaDefault=Px(e.mediaDefault),this._currentMediaIndices=[],Px(t?e.baseOption:this._newBaseOption)},getTimelineOption:function(t){var e,n,i=this._timelineOptions;return!i.length||(n=t.getComponent("timeline"))&&(e=Px(i[n.getCurrentIndex()],!0)),e},getMediaOption:function(){var t=this._api.getWidth(),e=this._api.getHeight(),n=this._mediaList,i=this._mediaDefault,o=[],a=[];if(!n.length&&!i)return a;for(var r,s,l=0,u=n.length;l":"\n",p="richText"===c,g={},f=0,m=this.getData(),a=m.mapDimension("defaultedTooltip",!0),n=a.length,i=this.getRawValue(o),r=N(i),v=m.getItemVisual(o,"color");B(v)&&v.colorStops&&(v=(v.colorStops[0]||{}).color),v=v||"transparent";var s,l=(1":"",i=n+u.join(n||", ");return{renderMode:c,content:i,style:g}}(i):(s=n?Ho(m,o,a[0]):r?i[0]:i,{renderMode:c,content:Qi($i(s)),style:g})).content,u=d.seriesIndex+"at"+f,y=no({color:v,type:"item",renderMode:c,markerId:u});g[u]=v,++f;var x=m.getName(o),_=this.name;an(this)||(_=""),_=_?Qi(_)+(h?": ":e):"";var w="string"==typeof y?y:y.content;return{html:h?w+_+l:_+w+(x?Qi(x)+": "+l:l),markers:g}},isAnimationEnabled:function(){if(ef.node)return!1;var t=this.getShallow("animation");return t&&this.getData().count()>this.getShallow("animationThreshold")&&(t=!1),t},restoreData:function(){this.dataTask.dirty()},getColorFromPalette:function(t,e,n){var i=this.ecModel;return fx.getColorFromPalette.call(this,t,e,n)||i.getColorFromPalette(t,e,n)},coordDimToDataDim:function(t){return this.getRawData().mapDimension(t,!0)},getProgressive:function(){return this.get("progressive")},getProgressiveThreshold:function(){return this.get("progressiveThreshold")},getAxisTooltipData:null,getTooltipPosition:null,pipeTask:null,preventIncremental:null,pipelineContext:null});o(r_,Yx),o(r_,fx);var s_=function(){this.group=new rm,this.uid=Oi("viewComponent")};s_.prototype={constructor:s_,init:function(){},render:function(){},dispose:function(){},filterForExposedEvent:null};var l_=s_.prototype;l_.updateView=l_.updateLayout=l_.updateVisual=function(t,e,n,i){},gn(s_),yn(s_,{registerWhenExtend:!0});function u_(){var s=ln();return function(t){var e=s(t),n=t.pipelineContext,i=e.large,o=e.progressiveRender,a=e.large=n.large,r=e.progressiveRender=n.progressiveRender;return!!(i^a||o^r)&&"reset"}}var h_=ln(),c_=u_(),d_=ea.prototype={type:"chart",init:function(){},render:function(){},highlight:function(t,e,n,i){ia(t.getData(),i,"emphasis")},downplay:function(t,e,n,i){ia(t.getData(),i,"normal")},remove:function(){this.group.removeAll()},dispose:function(){},incrementalPrepareRender:null,incrementalRender:null,updateTransform:null,filterForExposedEvent:null};d_.updateView=d_.updateLayout=d_.updateVisual=function(t,e,n,i){this.render(t,e,n,i)},gn(ea),yn(ea,{registerWhenExtend:!0}),ea.markUpdateMethod=function(t,e){h_(t).updateMethod=e};var p_={incrementalPrepareRender:{progress:function(t,e){e.view.incrementalRender(t,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(t,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}},g_="\0__throttleOriginMethod",f_="\0__throttleRate",m_="\0__throttleType",v_={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData(),i=(e.visualColorAccessPath||"itemStyle.color").split("."),o=e.get(i)||e.getColorFromPalette(e.name,null,t.getSeriesCount());if(n.setVisual("color",o),!t.isSeriesFiltered(e))return"function"!=typeof o||o instanceof py||n.each(function(t){n.setItemVisual(t,"color",o(e.getDataParams(t)))}),{dataEach:n.hasItemOption?function(t,e){var n=t.getItemModel(e).get(i,!0);null!=n&&t.setItemVisual(e,"color",n)}:null}}},y_={toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType},",withoutName:"第{seriesId}个系列是一个{seriesType},",separator:{middle:";",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:",",end:""}}}},x_=function(t,e){function c(t,e){if("string"!=typeof t)return t;var n=t;return z(e,function(t,e){n=n.replace(new RegExp("\\{\\s*"+e+"\\s*\\}","g"),t)}),n}function d(t){var e=r.get(t);if(null!=e)return e;for(var n=t.split("."),i=y_.aria,o=0;og?o+=c(d("data.partialData"),{displayCnt:g}):o+=d("data.allData");for(var r,s,l=[],u=0;un.blockIndex?n.step:null,a=i&&i.modDataCount;return{step:o,modBy:null!=a?Math.ceil(a/o):null,modDataCount:a}}},w_.getPipeline=function(t){return this._pipelineMap.get(t)},w_.updateStreamModes=function(t,e){var n=this._pipelineMap.get(t.uid),i=t.getData().count(),o=n.progressiveEnabled&&e.incrementalPrepareRender&&i>=n.threshold,a=t.get("large")&&i>=t.get("largeThreshold"),r="mod"===t.get("progressiveChunkMode")?i:null;t.pipelineContext=n.context={progressiveRender:o,modDataCount:r,large:a}},w_.restorePipelines=function(t){var i=this,o=i._pipelineMap=C();t.eachSeries(function(t){var e=t.getProgressive(),n=t.uid;o.set(n,{id:n,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:e&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(e||700),count:0}),xa(i,t,t.dataTask)})},w_.prepareStageTasks=function(){var n=this._stageTaskMap,i=this.ecInstance.getModel(),o=this.api;z(this._allHandlers,function(t){var e=n.get(t.uid)||n.set(t.uid,[]);t.reset&&function(i,o,t,a,r){function e(t){var e=t.uid,n=s.get(e)||s.set(e,Uo({plan:fa,reset:ma,count:ya}));n.context={model:t,ecModel:a,api:r,useClearVisual:o.isVisual&&!o.isLayout,plan:o.plan,reset:o.reset,scheduler:i},xa(i,t,n)}var s=t.seriesTaskMap||(t.seriesTaskMap=C()),n=o.seriesType,l=o.getTargetSeries;o.createOnAllSeries?a.eachRawSeries(e):n?a.eachRawSeriesByType(n,e):l&&l(a,r).each(e);var u=i._pipelineMap;s.each(function(t,e){u.get(e)||(t.dispose(),s.removeKey(e))})}(this,t,e,i,o),t.overallReset&&function(i,t,e,n,o){function a(t){var e=t.uid,n=s.get(e);n||(n=s.set(e,Uo({reset:da,onDirty:ga})),r.dirty()),n.context={model:t,overallProgress:h,modifyOutputEnd:c},n.agent=r,n.__block=h,xa(i,t,n)}var r=e.overallTask=e.overallTask||Uo({reset:ca});r.context={ecModel:n,api:o,overallReset:t.overallReset,scheduler:i};var s=r.agentStubMap=r.agentStubMap||C(),l=t.seriesType,u=t.getTargetSeries,h=!0,c=t.modifyOutputEnd;l?n.eachRawSeriesByType(l,a):u?u(n,o).each(a):(h=!1,z(n.getSeries(),a));var d=i._pipelineMap;s.each(function(t,e){d.get(e)||(t.dispose(),r.dirty(),s.removeKey(e))})}(this,t,e,i,o)},this)},w_.prepareView=function(t,e,n,i){var o=t.renderTask,a=o.context;a.model=e,a.ecModel=n,a.api=i,o.__block=!t.incrementalPrepareRender,xa(this,e,o)},w_.performDataProcessorTasks=function(t,e){ha(this,this._dataProcessorHandlers,t,e,{block:!0})},w_.performVisualTasks=function(t,e,n){ha(this,this._visualHandlers,t,e,n)},w_.performSeriesTasks=function(t){var e;t.eachSeries(function(t){e|=t.dataTask.perform()}),this.unfinished|=e},w_.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)})};var b_=w_.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)},S_=va(0);ua.wrapStageHandler=function(t,e){return f(t)&&(t={overallReset:t,seriesType:function(t){M_=null;try{t(I_,T_)}catch(t){}return M_}(t)}),t.uid=Oi("stageHandler"),e&&(t.visualType=e),t};var M_,I_={},T_={};_a(I_,Dx),_a(T_,So),I_.eachSeriesByType=I_.eachRawSeriesByType=function(t){M_=t},I_.eachComponent=function(t){"series"===t.mainType&&t.subType&&(M_=t.subType)};var A_=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"],D_={color:A_,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],A_]},C_=["#dd6b66","#759aa0","#e69d87","#8dc1a9","#ea7e53","#eedd78","#73a373","#73b9bc","#7289ab","#91ca8c","#f49f42"],L_={color:C_,backgroundColor:"#333",tooltip:{axisPointer:{lineStyle:{color:"#eee"},crossStyle:{color:"#eee"}}},legend:{textStyle:{color:"#eee"}},textStyle:{color:"#eee"},title:{textStyle:{color:"#eee"}},toolbox:{iconStyle:{normal:{borderColor:"#eee"}}},dataZoom:{textStyle:{color:"#eee"}},visualMap:{textStyle:{color:"#eee"}},timeline:{lineStyle:{color:"#eee"},itemStyle:{normal:{color:C_[1]}},label:{normal:{textStyle:{color:"#eee"}}},controlStyle:{normal:{color:"#eee",borderColor:"#eee"}}},timeAxis:{axisLine:{lineStyle:{color:"#eee"}},axisTick:{lineStyle:{color:"#eee"}},axisLabel:{textStyle:{color:"#eee"}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:"#eee"}}},logAxis:{axisLine:{lineStyle:{color:"#eee"}},axisTick:{lineStyle:{color:"#eee"}},axisLabel:{textStyle:{color:"#eee"}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:"#eee"}}},valueAxis:{axisLine:{lineStyle:{color:"#eee"}},axisTick:{lineStyle:{color:"#eee"}},axisLabel:{textStyle:{color:"#eee"}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:"#eee"}}},categoryAxis:{axisLine:{lineStyle:{color:"#eee"}},axisTick:{lineStyle:{color:"#eee"}},axisLabel:{textStyle:{color:"#eee"}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:"#eee"}}},line:{symbol:"circle"},graph:{color:C_},gauge:{title:{textStyle:{color:"#eee"}}},candlestick:{itemStyle:{normal:{color:"#FD1050",color0:"#0CF49B",borderColor:"#FD1050",borderColor0:"#0CF49B"}}}};L_.categoryAxis.splitLine.show=!1,ux.extend({type:"dataset",defaultOption:{seriesLayoutBy:Mx,sourceHeader:null,dimensions:null,source:null},optionUpdated:function(){!function(t){var e=t.option.source,n=bx;if(g(e))n=Sx;else if(N(e)){0===e.length&&(n=yx);for(var i=0,o=e.length;iO[1]&&(O[1]=N)}o.pure||(S=u[b],w&&null==S&&(null!=w.name?u[b]=S=w.name:null==n||(I=a[M=r[n]][D])&&(S=I[C],(T=l[M].ordinalMeta)&&T.categories.length&&(S=T.categories[S]))),null==(A=null==w?null:w.id)&&null!=S&&(d[S]=d[S]||0,0=this._rawCount||t<0)return-1;var e=this._indices,n=e[t];if(null!=n&&nt))return a;o=a-1}}return-1},bw.indicesOfNearest=function(t,e,n){var i=[];if(!this._storage[t])return i;null==n&&(n=1/0);for(var o=Number.MAX_VALUE,a=-1,r=0,s=this.count();r=l&&w<=u||isNaN(w))&&(a[r++]=c),c++;h=!0}else if(2===i){for(var d=this._storage[s],v=this._storage[n[1]],y=t[n[1]][0],x=t[n[1]][1],p=0;p=l&&w<=u||isNaN(w))&&(a[r++]=M);else for(m=0;mt[I][1])&&(S=!1)}S&&(a[r++]=this.getRawIndex(m))}return rw[1]&&(w[1]=_)}}}return o},bw.downSample=function(t,e,n,i){for(var o=yr(this,[t]),a=o._storage,r=[],s=Math.floor(1/e),l=a[t],u=this.count(),h=this._chunkSize,c=o._rawExtent[t],d=new(cr(this))(u),p=0,g=0;gc[1]&&(c[1]=x),d[p++]=_}return o._count=p,o._indices=d,o.getRawIndex=fr,o},bw.getItemModel=function(t){var e=this.hostModel;return new ki(this.getRawDataItem(t),e,e&&e.ecModel)},bw.diff=function(e){var n=this;return new sr(e?e.getIndices():[],this.getIndices(),function(t){return mr(e,t)},function(t){return mr(n,t)})},bw.getVisual=function(t){var e=this._visual;return e&&e[t]},bw.setVisual=function(t,e){if(mw(t))for(var n in t)t.hasOwnProperty(n)&&this.setVisual(n,t[n]);else this._visual=this._visual||{},this._visual[t]=e},bw.setLayout=function(t,e){if(mw(t))for(var n in t)t.hasOwnProperty(n)&&this.setLayout(n,t[n]);else this._layout[t]=e},bw.getLayout=function(t){return this._layout[t]},bw.getItemLayout=function(t){return this._itemLayouts[t]},bw.setItemLayout=function(t,e,n){this._itemLayouts[t]=n?P(this._itemLayouts[t]||{},e):e},bw.clearItemLayouts=function(){this._itemLayouts.length=0},bw.getItemVisual=function(t,e,n){var i=this._itemVisuals[t],o=i&&i[e];return null!=o||n?o:this.getVisual(e)},bw.setItemVisual=function(t,e,n){var i=this._itemVisuals[t]||{},o=this.hasItemVisual;if(this._itemVisuals[t]=i,mw(e))for(var a in e)e.hasOwnProperty(a)&&(i[a]=e[a],o[a]=!0);else i[e]=n,o[e]=!0},bw.clearAllVisual=function(){this._visual={},this._itemVisuals=[],this.hasItemVisual={}};function Sw(t){t.seriesIndex=this.seriesIndex,t.dataIndex=this.dataIndex,t.dataType=this.dataType}bw.setItemGraphicEl=function(t,e){var n=this.hostModel;e&&(e.dataIndex=t,e.dataType=this.dataType,e.seriesIndex=n&&n.seriesIndex,"group"===e.type&&e.traverse(Sw,e)),this._graphicEls[t]=e},bw.getItemGraphicEl=function(t){return this._graphicEls[t]},bw.eachItemGraphicEl=function(n,i){z(this._graphicEls,function(t,e){t&&n&&n.call(i,t,e)})},bw.cloneShallow=function(t){var e,n;return t||(e=L(this.dimensions,this.getDimensionInfo,this),t=new gw(e,this.hostModel)),t._storage=this._storage,dr(t,this),this._indices?(n=this._indices.constructor,t._indices=new n(this._indices)):t._indices=null,t.getRawIndex=t._indices?fr:gr,t},bw.wrapMethod=function(t,e){var n=this[t];"function"==typeof n&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var t=n.apply(this,arguments);return e.apply(this,[t].concat(s(arguments)))})},bw.TRANSFERABLE_METHODS=["cloneShallow","downSample","map"],bw.CHANGABLE_METHODS=["filterSelf","selectRange"];function Mw(t,e){return xr((e=e||{}).coordDimensions||[],t,{dimsDef:e.dimensionsDefine||t.dimensionsDefine,encodeDef:e.encodeDefine||t.encodeDefine,dimCount:e.dimensionsCount,generateCoord:e.generateCoord,generateCoordCount:e.generateCoordCount})}Ir.prototype.parse=function(t){return t},Ir.prototype.getSetting=function(t){return this._setting[t]},Ir.prototype.contain=function(t){var e=this._extent;return t>=e[0]&&t<=e[1]},Ir.prototype.normalize=function(t){var e=this._extent;return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])},Ir.prototype.scale=function(t){var e=this._extent;return t*(e[1]-e[0])+e[0]},Ir.prototype.unionExtent=function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1])},Ir.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},Ir.prototype.getExtent=function(){return this._extent.slice()},Ir.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=t),isNaN(e)||(n[1]=e)},Ir.prototype.isBlank=function(){return this._isBlank},Ir.prototype.setBlank=function(t){this._isBlank=t},Ir.prototype.getLabel=null,gn(Ir),yn(Ir,{registerWhenExtend:!0}),Tr.createByAxisModel=function(t){var e=t.option,n=e.data,i=n&&L(n,Dr);return new Tr({categories:i,needCollect:!i,deduplication:!1!==e.dedplication})};var Iw=Tr.prototype;Iw.getOrdinal=function(t){return Ar(this).get(t)},Iw.parseAndCollect=function(t){var e,n=this._needCollect;if("string"!=typeof t&&!n)return t;if(n&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,e;var i=Ar(this);return null==(e=i.get(t))&&(n?(e=this.categories.length,this.categories[e]=t,i.set(t,e)):e=NaN),e};var Tw=Ir.prototype,Aw=Ir.extend({type:"ordinal",init:function(t,e){t&&!N(t)||(t=new Tr({categories:t})),this._ordinalMeta=t,this._extent=e||[0,t.categories.length-1]},parse:function(t){return"string"==typeof t?this._ordinalMeta.getOrdinal(t):Math.round(t)},contain:function(t){return t=this.parse(t),Tw.contain.call(this,t)&&null!=this._ordinalMeta.categories[t]},normalize:function(t){return Tw.normalize.call(this,this.parse(t))},scale:function(t){return Math.round(Tw.scale.call(this,t))},getTicks:function(){for(var t=[],e=this._extent,n=e[0];n<=e[1];)t.push(n),n++;return t},getLabel:function(t){if(!this.isBlank())return this._ordinalMeta.categories[t]},count:function(){return this._extent[1]-this._extent[0]+1},unionExtentFromData:function(t,e){this.unionExtent(t.getApproximateExtent(e))},getOrdinalMeta:function(){return this._ordinalMeta},niceTicks:x,niceExtent:x});Aw.create=function(){return new Aw};var Dw=zi,Cw=zi,Lw=Ir.extend({type:"interval",_interval:0,_intervalPrecision:2,setExtent:function(t,e){var n=this._extent;isNaN(t)||(n[0]=parseFloat(t)),isNaN(e)||(n[1]=parseFloat(e))},unionExtent:function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1]),Lw.prototype.setExtent.call(this,e[0],e[1])},getInterval:function(){return this._interval},setInterval:function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=Cr(t)},getTicks:function(){return function(t,e,n,i){var o=[];if(!t)return o;e[0](o.length?o[o.length-1]:n[1])&&o.push(e[1]),o}(this._interval,this._extent,this._niceExtent,this._intervalPrecision)},getLabel:function(t,e){if(null==t)return"";var n=e&&e.precision;return null==n?n=Gi(t)||0:"auto"===n&&(n=this._intervalPrecision),$i(t=Cw(t,n,!0))},niceTicks:function(t,e,n){t=t||5;var i,o=this._extent,a=o[1]-o[0];isFinite(a)&&(a<0&&(a=-a,o.reverse()),i=function(t,e,n,i){var o={},a=t[1]-t[0],r=o.interval=Yi(a/e,!0);null!=n&&r>>1;t[o][1]r[1],g(n[0].coord,r[0])&&(o?n[0].coord=r[0]:n.shift()),o&&g(r[0],n[0].coord)&&n.unshift({coord:r[0]}),g(r[1],a.coord)&&(o?a.coord=r[1]:n.pop()),o&&g(a.coord,r[1])&&n.push({coord:r[1]})),d;function g(t,e){return l?eh[c-1].coord&&(h.reverse(),d.reverse());var p=h[0].coord-10,g=h[c-1].coord+10,f=g-p;if(f<.001)return"transparent";z(h,function(t){t.offset=(t.coord-p)/f}),h.push({offset:c?h[c-1].offset:.5,color:d[1]||"transparent"}),h.unshift({offset:c?h[0].offset:.5,color:d[0]||"transparent"});var m=new Ty(0,0,0,0,h,!0);return m[i]=p,m[i+"2"]=g,m}}}(a,i)||a.getVisual("color");d.useStyle(O(r.getLineStyle(),{fill:"none",stroke:S,lineJoin:"bevel"}));var M,I,T=t.get("smooth"),T=Cs(t.get("smooth"));d.setShape({smooth:T,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")}),p&&(M=a.getCalculationInfo("stackedOnSeries"),I=0,p.useStyle(O(s.getAreaStyle(),{fill:S,opacity:.7,lineJoin:"bevel"})),M&&(I=Cs(M.get("smooth"))),p.setShape({smooth:T,stackedOnSmooth:I,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")})),this._data=a,this._coordSys=i,this._stackedOnPoints=y,this._points=l,this._step=b,this._valueOrigin=v},dispose:function(){},highlight:function(t,e,n,i){var o=t.getData(),a=sn(o,i);if(!(a instanceof Array)&&null!=a&&0<=a){var r=o.getItemGraphicEl(a);if(!r){var s=o.getItemLayout(a);if(!s)return;(r=new ds(o,a)).position=s,r.setZ(t.get("zlevel"),t.get("z")),r.ignore=isNaN(s[0])||isNaN(s[1]),r.__temp=!0,o.setItemGraphicEl(a,r),r.stopSymbolAnimation(!0),this.group.add(r)}r.highlight()}else ea.prototype.highlight.call(this,t,e,n,i)},downplay:function(t,e,n,i){var o,a=t.getData(),r=sn(a,i);null!=r&&0<=r?(o=a.getItemGraphicEl(r))&&(o.__temp?(a.setItemGraphicEl(r,null),this.group.remove(o)):o.downplay()):ea.prototype.downplay.call(this,t,e,n,i)},_newPolyline:function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new Tb({shape:{points:t},silent:!0,z2:10}),this._lineGroup.add(e),this._polyline=e},_newPolygon:function(t,e){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new Ab({shape:{points:t,stackedOnPoints:e},silent:!0}),this._lineGroup.add(n),this._polygon=n},_updateAnimation:function(t,e,n,i,o,a){var r=this._polyline,s=this._polygon,l=t.hostModel,u=function(t,e,n,i,o,a,r,s){for(var l,u,h=(l=t,u=[],e.diff(l).add(function(t){u.push({cmd:"+",idx:t})}).update(function(t,e){u.push({cmd:"=",idx:e,idx1:t})}).remove(function(t){u.push({cmd:"-",idx:t})}).execute(),u),c=[],d=[],p=[],g=[],f=[],m=[],v=[],y=Ss(o,e,r),x=Ss(a,t,s),_=0;_e&&(e=t[n]);return isFinite(e)?e:NaN},min:function(t){for(var e=1/0,n=0;ne[1]&&e.reverse(),e},getOtherAxis:function(){this.grid.getOtherAxis()},pointToData:function(t,e){return this.coordToData(this.toLocalCoord(t["x"===this.dim?0:1]),e)},toLocalCoord:null,toGlobalCoord:null},a(Nb,lb);var Ob={show:!0,zlevel: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:"#333",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:["#ccc"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.3)","rgba(200,200,200,0.3)"]}}},Rb={};Rb.categoryAxis=v({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},Ob),Rb.valueAxis=v({boundaryGap:[0,0],splitNumber:5},Ob),Rb.timeAxis=O({scale:!0,min:"dataMin",max:"dataMax"},Rb.valueAxis),Rb.logAxis=O({scale:!0,logBase:10},Rb.valueAxis);function Eb(a,t,r,e){z(zb,function(o){t.extend({type:a+"Axis."+o,mergeDefaultAndTheme:function(t,e){var n=this.layoutMode,i=n?ho(t):{};v(t,e.getTheme().get(o+"Axis")),v(t,this.getDefaultOption()),t.type=r(a,t),n&&uo(t,i,n)},optionUpdated:function(){"category"===this.option.type&&(this.__ordinalMeta=Tr.createByAxisModel(this))},getCategories:function(t){var e=this.option;if("category"===e.type)return t?e.data:this.__ordinalMeta.categories},getOrdinalMeta:function(){return this.__ordinalMeta},defaultOption:h([{},Rb[o+"Axis"],e],!0)})}),ux.registerSubTypeDefaulter(a+"Axis",E(r,a))}var zb=["value","category","time","log"],Bb=ux.extend({type:"cartesian2dAxis",axis:null,init:function(){Bb.superApply(this,"init",arguments),this.resetRange()},mergeOption:function(){Bb.superApply(this,"mergeOption",arguments),this.resetRange()},restoreData:function(){Bb.superApply(this,"restoreData",arguments),this.resetRange()},getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"grid",index:this.option.gridIndex,id:this.option.gridId})[0]}});v(Bb.prototype,Yw);var Vb={offset:0};Eb("x",Bb,Es,Vb),Eb("y",Bb,Es,Vb),ux.extend({type:"grid",dependencies:["xAxis","yAxis"],layoutMode:"box",coordinateSystem:null,defaultOption:{show:!1,zlevel:0,z:0,left:"10%",top:60,right:"10%",bottom:60,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"}});var Gb=Bs.prototype;Gb.type="grid",Gb.axisPointerEnabled=!0,Gb.getRect=function(){return this._rect},Gb.update=function(t,e){var n=this._axesMap;this._updateScale(t,this.model),z(n.x,function(t){Zr(t.scale,t.model)}),z(n.y,function(t){Zr(t.scale,t.model)});var i={};z(n.x,function(t){Vs(n,"y",t,i)}),z(n.y,function(t){Vs(n,"x",t,i)}),this.resize(this.model,e)},Gb.resize=function(t,e,n){function i(){z(o,function(t){var e,n,i,o,a=t.isHorizontal(),r=a?[0,l.width]:[0,l.height],s=t.inverse?1:0;t.setExtent(r[s],r[1-s]),e=t,n=a?l.x:l.y,i=e.getExtent(),o=i[0]+i[1],e.toGlobalCoord="x"===e.dim?function(t){return t+n}:function(t){return o-t+n},e.toLocalCoord="x"===e.dim?function(t){return t-n}:function(t){return o-t+n}})}var l=so(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()});this._rect=l;var o=this._axesList;i(),!n&&t.get("containLabel")&&(z(o,function(t){var e,n,i;t.model.get("axisLabel.inside")||(e=Yr(t))&&(n=t.isHorizontal()?"height":"width",i=t.model.get("axisLabel.margin"),l[n]-=e[n]+i,"top"===t.position?l.y+=e.height+i:"left"===t.position&&(l.x+=e.width+i))}),i())},Gb.getAxis=function(t,e){var n=this._axesMap[t];if(null!=n){if(null==e)for(var i in n)if(n.hasOwnProperty(i))return n[i];return n[e]}},Gb.getAxes=function(){return this._axesList.slice()},Gb.getCartesian=function(t,e){if(null!=t&&null!=e){var n="x"+t+"y"+e;return this._coordsMap[n]}B(t)&&(e=t.yAxisIndex,t=t.xAxisIndex);for(var i=0,o=this._coordsList;ia[1]?-1:1,s=["start"===e?a[0]-r*o:"end"===e?a[1]+r*o:(a[0]+a[1])/2,js(e)?T.labelOffset+n*o:0],null!=(l=A.get("nameRotate"))&&(l=l*Hb/180),js(e)?t=Ub(T.rotation,null!=l?l:T.rotation,n):(x=e,_=a,b=Hi((l||0)-T.rotation),S=_[0]>_[1],M="start"===x&&!S||"start"!==x&&S,I=Zi(b-Hb/2)?(w=M?"bottom":"top","center"):Zi(b-1.5*Hb)?(w=M?"top":"bottom","center"):(w="middle",b<1.5*Hb&&Hb/2h[1]&&h.reverse(),(null==l||l>h[1])&&(l=h[1]),l=n.r0}}});function uS(n,t){z(t,function(a){a.update="updateView",Ka(a,function(t,e){var o={};return e.eachComponent({mainType:"series",subType:n,query:t},function(n){n[a.method]&&n[a.method](t.name,t.dataIndex);var i=n.getData();i.each(function(t){var e=i.getName(t);o[e]=n.isSelected(e)||!1})}),{name:t.name,selected:o}})})}function hS(i){return{getTargetSeries:function(t){var e={},n=C();return t.eachSeriesByType(i,function(t){t.__paletteScope=e,n.set(t.uid,t)}),n},reset:function(o){var a=o.getRawData(),r={},s=o.getData();s.each(function(t){var e=s.getRawIndex(t);r[e]=t}),a.each(function(t){var e,n=r[t],i=null!=n&&s.getItemVisual(n,"color",!0);i?a.setItemVisual(t,"color",i):(e=a.getItemModel(t).get("itemStyle.color")||o.getColorFromPalette(a.getName(t)||t+"",o.__paletteScope,a.count()),a.setItemVisual(t,"color",e),null!=n&&s.setItemVisual(n,"color",e))})}}}function cS(M,I,t,e){var T,A,D=M.getData(),C=[],L=!1;D.each(function(t){var e=D.getItemLayout(t),n=D.getItemModel(t),i=n.getModel("label"),o=i.get("position")||n.get("emphasis.label.position"),a=n.getModel("labelLine"),r=a.get("length"),s=a.get("length2"),l=(e.startAngle+e.endAngle)/2,u=Math.cos(l),h=Math.sin(l);T=e.cx,A=e.cy;var c,d,p,g,f,m,v,y,x="inside"===o||"inner"===o,_="center"===o?(m=e.cx,v=e.cy,"center"):(m=(c=(x?(e.r+e.r0)/2*u:e.r*u)+T)+3*u,v=(d=(x?(e.r+e.r0)/2*h:e.r*h)+A)+3*h,x||(m=(f=(p=c+u*(r+I-e.r))+(u<0?-1:1)*s)+(u<0?-5:5),y=[[c,d],[p,v=g=d+h*(r+I-e.r)],[f,g]]),x?"center":0n[0]&&isFinite(o)&&isFinite(n[0]););else{r.getTicks().length-1>p&&(u=d(u));var h=Math.round((n[0]+n[1])/2/u)*u,c=Math.round(p/2);r.setExtent(zi(h-c*u),zi(h+(p-c)*u)),r.setInterval(u)}})},gl.dimensions=[],gl.create=function(t,n){var i=[];return t.eachComponent("radar",function(t){var e=new gl(t,0,n);i.push(e),t.coordinateSystem=e}),t.eachSeriesByType("radar",function(t){"radar"===t.get("coordinateSystem")&&(t.coordinateSystem=i[t.get("radarIndex")||0])}),i},Mo.register("radar",gl);var vS=Rb.valueAxis,yS=(nr({type:"radar",optionUpdated:function(){var o=this.get("boundaryGap"),a=this.get("splitNumber"),r=this.get("scale"),s=this.get("axisLine"),l=this.get("axisTick"),u=this.get("axisLabel"),h=this.get("name"),c=this.get("name.show"),d=this.get("name.formatter"),p=this.get("nameGap"),g=this.get("triggerEvent"),t=L(this.get("indicator")||[],function(t){null!=t.max&&0"+L(t,function(t,e){var n=o.get(o.mapDimension(t.dim),i);return Qi(t.name+" : "+n)}).join("
")},defaultOption:{zlevel:0,z:2,coordinateSystem:"radar",legendHoverLink:!0,radarIndex:0,lineStyle:{width:2,type:"solid"},label:{position:"top"},symbol:"emptyCircle",symbolSize:4}});ar({type:"radar",render:function(l){function u(t,e){var n,i=t.getItemVisual(e,"symbol")||"circle",o=t.getItemVisual(e,"color");if("none"!==i){var a=(N(n=t.getItemVisual(e,"symbolSize"))||(n=[+n,+n]),n),r=Kr(i,-1,-1,2,2,o);return r.attr({style:{strokeNoScale:!0},z2:100,scale:[a[0]/2,a[1]/2]}),r}}function s(t,e,n,i,o,a){n.removeAll();for(var r=0;r"+Qi(i+" : "+n)},getTooltipPosition:function(t){if(null!=t){var e=this.getData().getName(t),n=this.coordinateSystem,i=n.getRegion(e);return i&&n.dataToPoint(i.center)}},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},defaultOption:{zlevel:0,z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:.75,showLegendSymbol:!0,dataRangeHoverLink:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,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)"}}}});o(OS,rS);var RS="\0_ec_interaction_mutex";Ka({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},function(){}),o(Dl,wf);var ES={axisPointer:1,tooltip:1,brush:1};Wl.prototype={constructor:Wl,draw:function(x,t,e,n,i){var _="geo"===x.mainType,w=x.getData&&x.getData();_&&t.eachComponent({mainType:"series",subType:"map"},function(t){w||t.getHostGeoModel()!==x||(w=t.getData())});var o=x.coordinateSystem;this._updateBackground(o);var b=this._regionsGroup,a=this.group,S=o.scale,r={position:o.position,scale:S};!b.childAt(0)||i?a.attr(r):Si(a,r,x),b.removeAll();var s,l,u,h,c,M=["itemStyle"],I=["emphasis","itemStyle"],T=["label"],A=["emphasis","label"],D=C();z(o.regions,function(t){var e=D.get(t.name)||D.set(t.name,new rm),n=new Iy({shape:{paths:[]}});e.add(n);var i,o,a=(g=x.getRegionModel(t.name)||x).getModel(M),r=g.getModel(I),s=Gl(a),l=Gl(r),u=g.getModel(T),h=g.getModel(A);w&&(i=w.indexOfName(t.name),(o=w.getItemVisual(i,"color",!0))&&(s.fill=o)),z(t.geometries,function(t){if("polygon"===t.type){n.shape.paths.push(new yy({shape:{points:t.exterior}}));for(var e=0;e<(t.interiors?t.interiors.length:0);e++)n.shape.paths.push(new yy({shape:{points:t.interiors[e]}}))}}),n.setStyle(s),n.style.strokeNoScale=!0,n.culling=!0;var c,d,p,g,f=u.get("show"),m=h.get("show"),v=w&&isNaN(w.get(w.mapDimension("value"),i)),y=w&&w.getItemLayout(i);(_||v&&(f||m)||y&&y.showLabel)&&(d=_?t.name:i,(!w||0<=i)&&(c=x),gi((p=new cy({position:t.center.slice(),scale:[1/S[0],1/S[1]],z2:10,silent:!0})).style,p.hoverStyle={},u,h,{labelFetcher:c,labelDataIndex:d,defaultText:t.name,useInsideStyle:!1},{textAlign:"center",textVerticalAlign:"middle"}),e.add(p)),w?w.setItemGraphicEl(i,e):(g=x.getRegionModel(t.name),n.eventData={componentType:"geo",componentIndex:x.componentIndex,geoIndex:x.componentIndex,name:t.name,region:g&&g.option||{}}),(e.__regions||(e.__regions=[])).push(t),di(e,l,{hoverSilentOnTouch:!!x.get("selectedMode")}),b.add(e)}),this._updateController(x,t,e),s=this,l=x,h=e,c=n,(u=b).off("click"),u.off("mousedown"),l.get("selectedMode")&&(u.on("mousedown",function(){s._mouseDownFlag=!0}),u.on("click",function(t){if(s._mouseDownFlag){s._mouseDownFlag=!1;for(var e,n=t.target;!n.__regions;)n=n.parent;n&&((e={type:("geo"===l.mainType?"geo":"map")+"ToggleSelect",batch:L(n.__regions,function(t){return{name:t.name,from:c.uid}})})[l.mainType+"Id"]=l.id,h.dispatchAction(e),Fl(l,u))}})),Fl(x,b)},remove:function(){this._regionsGroup.removeAll(),this._backgroundGroup.removeAll(),this._controller.dispose(),this._mapName&&PS.removeGraphic(this._mapName,this.uid),this._mapName=null,this._controllerHost={}},_updateBackground:function(t){var e=t.map;this._mapName!==e&&z(PS.makeGraphic(e,this.uid),function(t){this._backgroundGroup.add(t)},this),this._mapName=e},_updateController:function(i,t,o){function n(){var t={type:"geoRoam",componentType:s};return t[s+"Id"]=i.id,t}var a=i.coordinateSystem,e=this._controller,r=this._controllerHost;r.zoomLimit=i.get("scaleLimit"),r.zoom=a.getZoom(),e.enable(i.get("roam")||!1);var s=i.mainType;e.off("pan").on("pan",function(t){this._mouseDownFlag=!1,zl(r,t.dx,t.dy),o.dispatchAction(P(n(),{dx:t.dx,dy:t.dy}))},this),e.off("zoom").on("zoom",function(t){var e;this._mouseDownFlag=!1,Bl(r,t.scale,t.originX,t.originY),o.dispatchAction(P(n(),{zoom:t.scale,originX:t.originX,originY:t.originY})),this._updateGroup&&(e=this.group.scale,this._regionsGroup.traverse(function(t){"text"===t.type&&t.attr("scale",[1/e[0],1/e[1]])}))},this),e.setPointerChecker(function(t,e,n){return a.getViewRectAfterRoam().contain(e,n)&&!Vl(t,o,i)})}},ar({type:"map",render:function(t,e,n,i){var o,a;i&&"mapToggleSelect"===i.type&&i.from===this.uid||((o=this.group).removeAll(),t.getHostGeoModel()||(i&&"geoRoam"===i.type&&"series"===i.componentType&&i.seriesId===t.id?(a=this._mapDraw)&&o.add(a.group):t.needsDrawMap?(a=this._mapDraw||new Wl(n,!0),o.add(a.group),a.draw(t,e,n,this,i),this._mapDraw=a):(this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null),t.get("showLegendSymbol")&&e.getComponent("legend")&&this._renderSymbols(t,e,n)))},remove:function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null,this.group.removeAll()},dispose:function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null},_renderSymbols:function(v){var y=v.originalData,x=this.group;y.each(y.mapDimension("value"),function(t,e){var n,i,o,a,r,s,l,u,h,c,d,p,g,f,m;isNaN(t)||(n=y.getItemLayout(e))&&n.point&&(i=n.point,o=n.offset,a=new gy({style:{fill:v.getData().getVisual("color")},shape:{cx:i[0]+9*o,cy:i[1],r:3},silent:!0,z2:o?8:10}),o||(r=v.mainSeries.getData(),s=y.getName(e),l=r.indexOfName(s),u=y.getItemModel(e),h=u.getModel("label"),c=u.getModel("emphasis.label"),d=r.getItemGraphicEl(l),p=G(v.getFormattedLabel(e,"normal"),s),g=G(v.getFormattedLabel(e,"emphasis"),p),f=function(){var t=fi({},c,{text:c.get("show")?g:null},{isRectText:!0,useInsideStyle:!1},!0);a.style.extendFrom(t),a.__mapOriginalZ2=a.z2,a.z2+=1},m=function(){fi(a.style,h,{text:h.get("show")?p:null,textPosition:h.getShallow("position")||"bottom"},{isRectText:!0,useInsideStyle:!1}),null!=a.__mapOriginalZ2&&(a.z2=a.__mapOriginalZ2,a.__mapOriginalZ2=null)},d.on("mouseover",f).on("mouseout",m).on("emphasis",f).on("normal",m),m()),x.add(a))})}}),Ka({type:"geoRoam",event:"geoRoam",update:"updateTransform"},function(i,t){var o=i.componentType||"series";t.eachComponent({mainType:o,query:i},function(t){var e,n=t.coordinateSystem;"geo"===n.type&&(e=Hl(n,i,t.get("scaleLimit")),t.setCenter&&t.setCenter(e.center),t.setZoom&&t.setZoom(e.zoom),"series"===o&&z(t.seriesGroup,function(t){t.setCenter(e.center),t.setZoom(e.zoom)}))})}),Ja(function(n){var o={};n.eachSeriesByType("map",function(t){var l,i,e=t.getMapType();t.getHostGeoModel()||o[e]||(l={},z(t.seriesGroup,function(t){var r=t.coordinateSystem,s=t.originalData;t.get("showLegendSymbol")&&n.getComponent("legend")&&s.each(s.mapDimension("value"),function(t,e){var n,i,o=s.getName(e),a=r.getRegion(o);a&&!isNaN(t)&&(n=l[o]||0,i=r.dataToPoint(a.center),l[o]=n+1,s.setItemLayout(e,{point:i,offset:n}))})}),(i=t.getData()).each(function(t){var e=i.getName(t),n=i.getItemLayout(t)||{};n.showLabel=!l[e],i.setItemLayout(t,n)}),o[e]=!0)})}),Qa(function(t){t.eachSeriesByType("map",function(t){var e=t.get("color"),n=t.getModel("itemStyle"),i=n.get("areaColor"),o=n.get("color")||e[t.seriesIndex%e.length];t.getData().setVisual({areaColor:i,color:o})})}),qa(j_.PROCESSOR.STATISTIC,function(t){var i={};t.eachSeriesByType("map",function(t){var e=t.getHostGeoModel(),n=e?"o"+e.id:"i"+t.getMapType();(i[n]=i[n]||[]).push(t)}),z(i,function(t,e){for(var l,u,h,n=(l=L(t,function(t){return t.getData()}),u=t[0].get("mapValueCalculation"),h={},z(l,function(i){i.each(i.mapDimension("value"),function(t,e){var n="ec-"+i.getName(e);h[n]=h[n]||[],isNaN(t)||h[n].push(t)})}),l[0].map(l[0].mapDimension("value"),function(t,e){for(var n="ec-"+l[0].getName(e),i=0,o=1/0,a=-1/0,r=h[n].length,s=0;se&&(e=i.height)}this.height=e+1},getNodeById:function(t){if(this.getId()===t)return this;for(var e=0,n=this.children,i=n.length;ea&&(a=t.depth)});var r=t.expandAndCollapse&&0<=t.initialTreeDepth?t.initialTreeDepth:a;return o.root.eachNode("preorder",function(t){var e=t.hostTree.data.getRawDataItem(t.dataIndex);t.isExpand=e&&null!=e.collapsed?!e.collapsed:t.depth<=r}),o.data},getOrient:function(){var t=this.get("orient");return"horizontal"===t?t="LR":"vertical"===t&&(t="TB"),t},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},formatTooltip:function(t){for(var e=this.getData().tree,n=e.root.children[0],i=e.getNodeByDataIndex(t),o=i.getValue(),a=i.name;i&&i!==n;)a=i.parentNode.name+"."+a,i=i.parentNode;return Qi(a+(isNaN(o)||null==o?"":" : "+o))},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",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",borderColor:"#c23531",borderWidth:1.5},label:{show:!0,color:"#555"},leaves:{label:{show:!0}},animationEasing:"linear",animationDuration:700,animationDurationUpdate:1e3}}),ar({type:"tree",init:function(t,e){this._oldTree,this._mainGroup=new rm,this._controller=new Dl(e.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},render:function(i,t,n){var o=i.getData(),e=i.layoutInfo,a=this._mainGroup,r=i.get("layout");"radial"===r?a.attr("position",[e.x+e.width/2,e.y+e.height/2]):a.attr("position",[e.x,e.y]),this._updateViewCoordSys(i),this._updateController(i,t,n);var s=this._data,l={expandAndCollapse:i.get("expandAndCollapse"),layout:r,orient:i.getOrient(),curvature:i.get("lineStyle.curveness"),symbolRotate:i.get("symbolRotate"),symbolOffset:i.get("symbolOffset"),hoverAnimation:i.get("hoverAnimation"),useNameLabel:!0,fadeIn:!0};o.diff(s).add(function(t){au(o,t)&&su(o,t,null,a,i,l)}).update(function(t,e){var n=s.getItemGraphicEl(e);au(o,t)?su(o,t,n,a,i,l):n&&lu(s,e,n,a,i,l)}).remove(function(t){var e=s.getItemGraphicEl(t);e&&lu(s,t,e,a,i,l)}).execute(),this._nodeScaleRatio=i.get("nodeScaleRatio"),this._updateNodeAndLinkScale(i),!0===l.expandAndCollapse&&o.eachItemGraphicEl(function(t,e){t.off("click").on("click",function(){n.dispatchAction({type:"treeExpandAndCollapse",seriesId:i.id,dataIndex:e})})}),this._data=o},_updateViewCoordSys:function(t){var n=t.getData(),i=[];n.each(function(t){var e=n.getItemLayout(t);!e||isNaN(e.x)||isNaN(e.y)||i.push([+e.x,+e.y])});var e=[],o=[];Cn(i,e,o),o[0]-e[0]==0&&(o[0]+=1,--e[0]),o[1]-e[1]==0&&(o[1]+=1,--e[1]);var a=t.coordinateSystem=new vl;a.zoomLimit=t.get("scaleLimit"),a.setBoundingRect(e[0],e[1],o[0]-e[0],o[1]-e[1]),a.setCenter(t.get("center")),a.setZoom(t.get("zoom")),this.group.attr({position:a.position,scale:a.scale}),this._viewCoordSys=a},_updateController:function(o,t,a){var e=this._controller,n=this._controllerHost,r=this.group;e.setPointerChecker(function(t,e,n){var i=r.getBoundingRect();return i.applyTransform(r.transform),i.contain(e,n)&&!Vl(t,a,o)}),e.enable(o.get("roam")),n.zoomLimit=o.get("scaleLimit"),n.zoom=o.coordinateSystem.getZoom(),e.off("pan").off("zoom").on("pan",function(t){zl(n,t.dx,t.dy),a.dispatchAction({seriesId:o.id,type:"treeRoam",dx:t.dx,dy:t.dy})},this).on("zoom",function(t){Bl(n,t.scale,t.originX,t.originY),a.dispatchAction({seriesId:o.id,type:"treeRoam",zoom:t.scale,originX:t.originX,originY:t.originY}),this._updateNodeAndLinkScale(o)},this)},_updateNodeAndLinkScale:function(t){var e=t.getData(),n=this._getNodeGlobalScale(t),i=[n,n];e.eachItemGraphicEl(function(t,e){t.attr("scale",i)})},_getNodeGlobalScale:function(t){var e=t.coordinateSystem;if("view"!==e.type)return 1;var n=this._nodeScaleRatio,i=e.scale,o=i&&i[0]||1;return((e.getZoom()-1)*n+1)/o},dispose:function(){this._controller&&this._controller.dispose(),this._controllerHost={}},remove:function(){this._mainGroup.removeAll(),this._data=null}}),Ka({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(i,t){t.eachComponent({mainType:"series",subType:"tree",query:i},function(t){var e=i.dataIndex,n=t.getData().tree.getNodeByDataIndex(e);n.isExpand=!n.isExpand})}),Ka({type:"treeRoam",event:"treeRoam",update:"none"},function(n,t){t.eachComponent({mainType:"series",subType:"tree",query:n},function(t){var e=Hl(t.coordinateSystem,n);t.setCenter&&t.setCenter(e.center),t.setZoom&&t.setZoom(e.zoom)})}),Qa(Db("tree","circle")),Ja(function(t,e){t.eachSeriesByType("tree",function(t){cu(t,e)})}),r_.extend({type:"series.treemap",layoutMode:"box",dependencies:["grid","polar"],_viewRoot:null,defaultOption:{progressive:0,hoverLayerThreshold:1/0,left:"center",top:"middle",right:null,bottom:null,width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.1024,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",borderColor:"rgba(255,255,255,0.7)",borderWidth:1,shadowColor:"rgba(150,150,150,1)",shadowBlur:3,shadowOffsetX:0,shadowOffsetY:0,textStyle:{color:"#fff"}},emphasis:{textStyle:{}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",ellipsis:!0},upperLabel:{show:!1,position:[0,"50%"],height:20,color:"#fff",ellipsis:!0,verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],color:"#fff",ellipsis:!0,verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},getInitialData:function(t,e){var n={name:t.name,children:t.data};!function n(t){var i=0;z(t.children,function(t){n(t);var e=t.value;N(e)&&(e=e[0]),i+=e});var e=t.value;N(e)&&(e=e[0]),null!=e&&!isNaN(e)||(e=i),e<0&&(e=0),N(t.value)?t.value[0]=e:t.value=e}(n);var i=t.levels||[],i=t.levels=function(t,e){var i,n=e.get("color");if(n)return z(t=t||[],function(t){var e=new ki(t),n=e.get("color");(e.get("itemStyle.color")||n&&"none"!==n)&&(i=!0)}),i||((t[0]||(t[0]={})).color=n.slice()),t}(i,e),o={};return o.levels=i,$l.createTree(n,this,o).data},optionUpdated:function(){this.resetViewRoot()},formatTooltip:function(t){var e=this.getData(),n=this.getRawValue(t),i=$i(N(n)?n[0]:n);return Qi(e.getName(t)+": "+i)},getDataParams:function(t){var e=r_.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(t);return e.treePathInfo=fu(n,this),e},setLayoutInfo:function(t){this.layoutInfo=this.layoutInfo||{},P(this.layoutInfo,t)},mapIdToIndex:function(t){var e=this._idIndexMap;e||(e=this._idIndexMap=C(),this._idIndexMapCount=0);var n=e.get(t);return null==n&&e.set(t,n=this._idIndexMapCount++),n},getViewRoot:function(){return this._viewRoot},resetViewRoot:function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getRawData().tree.root;t&&(t===e||e.contains(t))||(this._viewRoot=e)}});var FS=5;mu.prototype={constructor:mu,render:function(t,e,n,i){var o,a,r,s=t.getModel("breadcrumb"),l=this.group;l.removeAll(),s.get("show")&&n&&(a=(o=s.getModel("itemStyle")).getModel("textStyle"),r={pos:{left:s.get("left"),right:s.get("right"),top:s.get("top"),bottom:s.get("bottom")},box:{width:e.getWidth(),height:e.getHeight()},emptyItemWidth:s.get("emptyItemWidth"),totalWidth:0,renderList:[]},this._prepare(n,r,a),this._renderContent(t,r,o,a,i),lo(l,r.pos,r.box))},_prepare:function(t,e,n){for(var i=t;i;i=i.parentNode){var o=i.getModel().get("name"),a=n.getTextRect(o),r=Math.max(a.width+16,e.emptyItemWidth);e.totalWidth+=r+8,e.renderList.push({node:i,text:o,width:r})}},_renderContent:function(t,e,n,i,o){for(var a,r,s,l,u,h,c,d,p,g,f,m,v,y,x,_,w,b=0,S=e.emptyItemWidth,M=t.get("breadcrumb.height"),I=(p=e.pos,g=e.box,m=g.width,v=g.height,y=Ei(p.x,m),x=Ei(p.y,v),_=Ei(p.x2,m),w=Ei(p.y2,v),(isNaN(y)||isNaN(parseFloat(p.x)))&&(y=0),(isNaN(_)||isNaN(parseFloat(p.x2)))&&(_=m),(isNaN(x)||isNaN(parseFloat(p.y)))&&(x=0),(isNaN(w)||isNaN(parseFloat(p.y2)))&&(w=v),f=$y(f||0),{width:Math.max(_-y-f[1]-f[3],0),height:Math.max(w-x-f[0]-f[2],0)}),T=e.totalWidth,A=e.renderList,D=A.length-1;0<=D;D--){var C=A[D],L=C.node,k=C.width,P=C.text;I.widthYy&&(u=Yy),a=s}u "+d)),u++)}var p,g,f,m,v=n.get("coordinateSystem");"cartesian2d"===v||"polar"===v?p=Mr(t,n):(M(f=(g=Mo.get(v))&&"view"!==g.type&&g.dimensions||[],"value")<0&&f.concat(["value"]),m=Mw(t,{coordDimensions:f}),(p=new gw(m,n)).initData(t));var y=new gw(["value"],n);return y.initData(l,s),o&&o(p,y),Zl({mainData:p,struct:a,structAttr:"graph",datas:{node:p,edge:y},datasAttr:{node:"data",edge:"edgeData"}}),a.update(),a}var SM=or({type:"series.graph",init:function(t){SM.superApply(this,"init",arguments),this.legendDataProvider=function(){return this._categoriesData},this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},mergeOption:function(t){SM.superApply(this,"mergeOption",arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},mergeDefaultAndTheme:function(t){SM.superApply(this,"mergeDefaultAndTheme",arguments),tn(t,["edgeLabel"],["show"])},getInitialData:function(t,s){var e=t.edges||t.links||[],n=t.data||t.nodes||[],l=this;if(n&&e)return bM(n,e,this,!0,function(t,e){function n(t){return(t=this.parsePath(t))&&"label"===t[0]?o:t&&"emphasis"===t[0]&&"label"===t[1]?r:this.parentModel}t.wrapMethod("getItemModel",function(t){var e=l._categoriesModels[t.getShallow("category")];return e&&(e.parentModel=t.parentModel,t.parentModel=e),t});var i=l.getModel("edgeLabel"),o=new ki({label:i.option},i.parentModel,s),a=l.getModel("emphasis.edgeLabel"),r=new ki({emphasis:{label:a.option}},a.parentModel,s);e.wrapMethod("getItemModel",function(t){return t.customizeGetParent(n),t})}).data},getGraph:function(){return this.getData().graph},getEdgeData:function(){return this.getGraph().edgeData},getCategoriesData:function(){return this._categoriesData},formatTooltip:function(t,e,n){if("edge"!==n)return SM.superApply(this,"formatTooltip",arguments);var i=this.getData(),o=this.getDataParams(t,n),a=i.graph.getEdgeByIndex(t),r=i.getName(a.node1.dataIndex),s=i.getName(a.node2.dataIndex),l=[];return null!=r&&l.push(r),null!=s&&l.push(s),l=Qi(l.join(" > ")),o.value&&(l+=" : "+Qi(o.value)),l},_updateCategoriesData:function(){var t=L(this.option.categories||[],function(t){return null!=t.value?t:P({value:0},t)}),e=new gw(["value"],this);e.initData(t),this._categoriesData=e,this._categoriesModels=e.mapArray(function(t){return e.getItemModel(t,!0)})},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},isAnimationEnabled:function(){return SM.superCall(this,"isAnimationEnabled")&&!("force"===this.get("layout")&&this.get("force.layoutAnimation"))},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",legendHoverLink:!0,hoverAnimation:!0,layout:null,focusNodeAdjacency:!1,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle"},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,curveness:0,opacity:.5},emphasis:{label:{show:!0}}}}),MM=wy.prototype,IM=Sy.prototype,TM=jn({type:"ec-line",style:{stroke:"#000",fill:null},shape:{x1:0,y1:0,x2:0,y2:0,percent:1,cpx1:null,cpy1:null},buildPath:function(t,e){(Bu(e)?MM:IM).buildPath(t,e)},pointAt:function(t){return Bu(this.shape)?MM.pointAt.call(this,t):IM.pointAt.call(this,t)},tangentAt:function(t){var e=this.shape,n=Bu(e)?[e.x2-e.x1,e.y2-e.y1]:IM.tangentAt.call(this,t);return q(n,n)}}),AM=["fromSymbol","toSymbol"],DM=Wu.prototype;DM.beforeUpdate=function(){var t=this.childOfName("fromSymbol"),e=this.childOfName("toSymbol"),n=this.childOfName("label");if(t||e||!n.ignore){for(var i=1,o=this.parent;o;)o.scale&&(i/=o.scale[0]),o=o.parent;var a,r,s,l,u,h,c,d,p,g,f,m,v,y=this.childOfName("line");(this.__dirty||y.__dirty)&&(a=y.shape.percent,r=y.pointAt(0),q(l=U([],s=y.pointAt(a),r),l),t&&(t.attr("position",r),u=y.tangentAt(0),t.attr("rotation",Math.PI/2-Math.atan2(u[1],u[0])),t.attr("scale",[i*a,i*a])),e&&(e.attr("position",s),u=y.tangentAt(1),e.attr("rotation",-Math.PI/2-Math.atan2(u[1],u[0])),e.attr("scale",[i*a,i*a])),n.ignore||(n.attr("position",s),p=5*i,"end"===n.__position?(h=[l[0]*p+s[0],l[1]*p+s[1]],c=.8=t&&(0===e?0:i[e-1][0])a&&(e[1-i]=e[i]+h.sign*a),e}var jM=z,YM=Math.min,qM=Math.max,KM=Math.floor,$M=Math.ceil,JM=zi,QM=Math.PI;ah.prototype={type:"parallel",constructor:ah,_init:function(t,r){var e=t.dimensions,s=t.parallelAxisIndex;jM(e,function(t,e){var n=s[e],i=r.getComponent("parallelAxis",n),o=this._axesMap.set(t,new UM(t,Ur(i),[0,0],i.get("type"),n)),a="category"===o.type;o.onBand=a&&i.get("boundaryGap"),o.inverse=i.get("inverse"),(i.axis=o).model=i,o.coordinateSystem=i.coordinateSystem=this},this)},update:function(t){this._updateAxesFromSeries(this._model,t)},containPoint:function(t){var e=this._makeLayoutInfo(),n=e.axisBase,i=e.layoutBase,o=e.pixelDimIndex,a=t[1-o],r=t[o];return n<=a&&a<=n+e.axisLength&&i<=r&&r<=i+e.layoutLength},getModel:function(){return this._model},_updateAxesFromSeries:function(e,i){i.eachSeries(function(t){var n;e.contains(t,i)&&(n=t.getData(),jM(this.dimensions,function(t){var e=this._axesMap.get(t);e.scale.unionExtentFromData(n,n.mapDimension(t)),Zr(e.scale,e.model)},this))},this)},resize:function(t,e){this._rect=so(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()}),this._layoutAxes()},getRect:function(){return this._rect},_makeLayoutInfo:function(){var t,e=this._model,n=this._rect,i=["x","y"],o=["width","height"],a=e.get("layout"),r="horizontal"===a?0:1,s=n[o[r]],l=[0,s],u=this.dimensions.length,h=rh(e.get("axisExpandWidth"),l),c=rh(e.get("axisExpandCount")||0,[0,u]),d=e.get("axisExpandable")&&3o*(1-h[0])?(l="jump",r=s-o*(1-h[2])):0<=(r=s-o*h[1])&&(r=s-o*(1-h[1]))<=0&&(r=0),(r*=e.axisExpandWidth/u)?XM(r,i,a,"all"):l="none"):(o=i[1]-i[0],(i=[qM(0,a[1]*s/o-o/2)])[1]=YM(a[1],i[0]+o),i[0]=i[1]-o),{axisExpandWindow:i,behavior:l}}},Mo.register("parallel",{create:function(i,o){var a=[];return i.eachComponent("parallel",function(t,e){var n=new ah(t,i,o);n.name="parallel_"+e,n.resize(t,o),(t.coordinateSystem=n).model=t,a.push(n)}),i.eachSeries(function(t){var e;"parallel"===t.get("coordinateSystem")&&(e=i.queryComponents({mainType:"parallel",index:t.get("parallelIndex"),id:t.get("parallelId")})[0],t.coordinateSystem=e.coordinateSystem)}),a}});var tI=ux.extend({type:"baseParallelAxis",axis:null,activeIntervals:[],getAreaSelectStyle:function(){return Ym([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},setActiveIntervals:function(t){var e=this.activeIntervals=D(t);if(e)for(var n=e.length-1;0<=n;n--)Bi(e[n])},getActiveState:function(t){var e=this.activeIntervals;if(!e.length)return"normal";if(null==t||isNaN(t))return"inactive";if(1===e.length){var n=e[0];if(n[0]<=t&&t<=n[1])return"active"}else for(var i=0,o=e.length;i "))},preventIncremental:function(){return!!this.get("effect.show")},getProgressive:function(){var t=this.option.progressive;return null==t?this.option.large?1e4:this.get("progressive"):t},getProgressiveThreshold:function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?2e4:this.get("progressiveThreshold"):t},defaultOption:{coordinateSystem:"geo",zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,label:{show:!1,position:"end"},lineStyle:{opacity:.5}}}),jI=pc.prototype;jI.createLine=function(t,e,n){return new Wu(t,e,n)},jI._updateEffectSymbol=function(t,e){var n=t.getItemModel(e).getModel("effect"),i=n.get("symbolSize"),o=n.get("symbol");N(i)||(i=[i,i]);var a=n.get("color")||t.getItemVisual(e,"color"),r=this.childAt(1);this._symbolType!==o&&(this.remove(r),(r=Kr(o,-.5,-.5,1,1,a)).z2=100,r.culling=!0,this.add(r)),r&&(r.setStyle("shadowColor",a),r.setStyle(n.getItemStyle(["color"])),r.attr("scale",i),r.setColor(a),r.attr("scale",i),this._symbolType=o,this._updateEffectAnimation(t,n,e))},jI._updateEffectAnimation=function(e,t,n){var i,o,a,r,s,l,u,h,c,d=this.childAt(1);d&&(i=this,o=e.getItemLayout(n),a=1e3*t.get("period"),r=t.get("loop"),s=t.get("constantSpeed"),u="function"==typeof(l=V(t.get("delay"),function(t){return t/e.count()*a/3})),d.ignore=!0,this.updateAnimationPoints(d,o),0e);r++);r=Math.min(r-1,o-2)}J(t.position,n[r],n[r+1],(e-i[r])/(i[r+1]-i[r]));var s=n[r+1][0]-n[r][0],l=n[r+1][1]-n[r][1];t.rotation=-Math.atan2(l,s)-Math.PI/2,this._lastFrame=r,this._lastFramePercent=e,t.ignore=!1}},a(fc,pc);var KI=jn({shape:{polyline:!1,curveness:0,segs:[]},buildPath:function(t,e){var n=e.segs,i=e.curveness;if(e.polyline)for(r=0;r=v[0]&&t<=v[1]}):(h=A,c=e.getPieceList(),d=e.option.selected,p=h[1]-h[0],g=(c=L(c,function(t){return{interval:[(t.interval[0]-h[0])/p,(t.interval[1]-h[0])/p]}})).length,f=0,function(t){for(e=f;e=e.y&&t[1]<=e.y+e.height:n.contain(n.toLocalCoord(t[1]))&&t[0]>=e.y&&t[0]<=e.y+e.height},pointToData:function(t){var e=this.getAxis();return[e.coordToData(e.toLocalCoord(t["horizontal"===e.orient?0:1]))]},dataToPoint:function(t){var e=this.getAxis(),n=this.getRect(),i=[],o="horizontal"===e.orient?0:1;return t instanceof Array&&(t=t[0]),i[o]=e.toGlobalCoord(e.dataToCoord(+t)),i[1-o]=0==o?n.y+n.height/2:n.x+n.width/2,i}}).dimensions});var rT=["axisLine","axisTickLabel","axisName"],sT=Yb.extend({type:"singleAxis",axisPointerClass:"SingleAxisPointer",render:function(t,e,n,i){var o=this.group;o.removeAll();var a=Bc(t),r=new Wb(t,a);z(rT,r.add,r),o.add(r.getGroup()),t.get("splitLine.show")&&this._splitLine(t),sT.superCall(this,"render",t,e,n,i)},_splitLine:function(t){var e=t.axis;if(!e.scale.isBlank()){for(var n=t.getModel("splitLine"),i=n.getModel("lineStyle"),o=i.get("width"),a=(a=i.get("color"))instanceof Array?a:[a],r=t.coordinateSystem.getRect(),s=e.isHorizontal(),l=[],u=0,h=e.getTicksCoords({tickModel:n}),c=[],d=[],p=0;pr)return!0;if(a){var s=Ks(t).seriesDataCount,l=i.getExtent();return Math.abs(l[0]-l[1])/s>r}return!1},makeElOption:function(){},createPointerEl:function(t,e){var n,i=e.pointer;i&&(n=mT(t).pointerEl=new Ey[i.type](vT(e.pointer)),t.add(n))},createLabelEl:function(t,e,n,i){var o;e.label&&(o=mT(t).labelEl=new _y(vT(e.label)),t.add(o),Kc(o,i))},updatePointerEl:function(t,e,n){var i=mT(t).pointerEl;i&&(i.setStyle(e.pointer.style),n(i,{shape:e.pointer.shape}))},updateLabelEl:function(t,e,n,i){var o=mT(t).labelEl;o&&(o.setStyle(e.label.style),n(o,{shape:e.label.shape,position:e.label.position}),Kc(o,i))},_renderHandle:function(t){if(!this._dragging&&this.updateHandleTransform){var e,n=this._axisPointerModel,i=this._api.getZr(),o=this._handle,a=n.getModel("handle"),r=n.get("status");if(!a.get("show")||!r||"hide"===r)return o&&i.remove(o),void(this._handle=null);this._handle||(e=!0,o=this._handle=Li(a.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){Mf(t.event)},onmousedown:yT(this._onHandleDragMove,this,0,0),drift:yT(this._onHandleDragMove,this),ondragend:yT(this._onHandleDragEnd,this)}),i.add(o)),Jc(o,n,!1);o.setStyle(a.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var s=a.get("size");N(s)||(s=[s,s]),o.attr("scale",[s[0]/2,s[1]/2]),sa(this,"_doDispatchAxisPointer",a.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,e)}},_moveHandleToValue:function(t,e){qc(this._axisPointerModel,!e&&this._moveAnimation,this._handle,$c(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},_onHandleDragMove:function(t,e){var n,i=this._handle;i&&(this._dragging=!0,n=this.updateHandleTransform($c(i),[t,e],this._axisModel,this._axisPointerModel),this._payloadInfo=n,i.stopAnimation(),i.attr($c(n)),mT(i).lastProp=null,this._doDispatchAxisPointer())},_doDispatchAxisPointer:function(){var t,e;this._handle&&(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}]}))},_onHandleDragEnd:function(){var t;this._dragging=!1,this._handle&&(t=this._axisPointerModel.get("value"),this._moveHandleToValue(t),this._api.dispatchAction({type:"hideTip"}))},getHandleTransform:null,updateHandleTransform:null,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)},doClear:function(){},buildLabel:function(t,e,n){return{x:t[n=n||0],y:t[1-n],width:e[n],height:e[1-n]}}}).constructor=Yc);var xT=Yc.extend({makeElOption:function(t,e,n,i,o){var a,r,s=n.axis,l=s.grid,u=i.get("type"),h=sd(l,s).getOtherAxis(s).getGlobalExtent(),c=s.toGlobalCoord(s.dataToCoord(e,!0));u&&"none"!==u&&(a=Qc(i),(r=_T[u](s,c,h,a)).style=a,t.graphicKey=r.type,t.pointer=r),id(e,t,el(l.model,n),n,i,o)},getHandleTransform:function(t,e,n){var i=el(e.axis.grid.model,e,{labelInside:!1});return i.labelMargin=n.get("handle.margin"),{position:nd(e.axis,t,i),rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(t,e,n){var i=n.axis,o=i.grid,a=i.getGlobalExtent(!0),r=sd(o,i).getOtherAxis(i).getGlobalExtent(),s="x"===i.dim?0:1,l=t.position;l[s]+=e[s],l[s]=Math.min(a[1],l[s]),l[s]=Math.max(a[0],l[s]);var u=(r[1]+r[0])/2,h=[u,u];h[s]=l[s];return{position:l,rotation:t.rotation,cursorPoint:h,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][s]}}}),_T={line:function(t,e,n,i){var o=od([e,n[0]],[e,n[1]],ld(t));return Jn({shape:o,style:i}),{type:"Line",shape:o}},shadow:function(t,e,n){var i=Math.max(1,t.getBandWidth()),o=n[1]-n[0];return{type:"Rect",shape:ad([e-i/2,n[0]],[i,o],ld(t))}}};Yb.registerAxisPointerClass("CartesianAxisPointer",xT),Ya(function(t){var e;t&&(t.axisPointer&&0!==t.axisPointer.length||(t.axisPointer={}),(e=t.axisPointer.link)&&!N(e)&&(t.axisPointer.link=[e]))}),qa(j_.PROCESSOR.STATISTIC,function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=Ys(t,e)}),Ka({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},function(t,e,n){var i,o,a,r,s,l,u,h,c=t.currTrigger,d=[t.x,t.y],p=t,g=t.dispatchAction||k(n.dispatchAction,n),f=e.getComponent("axisPointer").coordSysAxesInfo;if(f){Hc(d)&&(d=uT({seriesIndex:p.seriesIndex,dataIndex:p.dataIndex},e).point);var m=Hc(d),v=p.axesInfo,y=f.axesInfo,x="leave"===c||Hc(d),_={},w={},b={list:[],map:{}},S={showPointer:cT(Gc,w),showTooltip:cT(Fc,b)};hT(f.coordSysMap,function(t,e){var a=m||t.containPoint(d);hT(f.coordSysAxesInfo[e],function(t,e){var n,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}}(v,t);x||!a||v&&!o||(null!=(n=o&&o.value)||m||(n=i.pointToData(d)),null!=n&&Vc(t,n,S,!1,_))})});var M={};return hT(y,function(o,t){var a=o.linkGroup;a&&!w[t]&&hT(a.axesInfo,function(t,e){var n,i=w[e];t!==o&&i&&(n=i.value,a.mapper&&(n=o.axis.scale.parse(a.mapper(n,Wc(t),Wc(o)))),M[o.key]=n)})}),hT(M,function(t,e){Vc(y[e],t,S,!0,_)}),l=w,u=y,h=_.axesInfo=[],hT(u,function(t,e){var n=t.axisPointerModel.option,i=l[e];i?(t.useHandle||(n.status="show"),n.value=i.value,n.seriesDataIndices=(i.payloadBatch||[]).slice()):t.useHandle||(n.status="hide"),"show"===n.status&&h.push({axisDim:t.axis.dim,axisIndex:t.axis.model.componentIndex,value:n.value})}),i=b,a=t,r=g,!Hc(o=d)&&i.list.length?(s=((i.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{},r({type:"showTip",escapeConnect:!0,x:o[0],y:o[1],tooltipOption:a.tooltipOption,position:a.position,dataIndexInside:s.dataIndexInside,dataIndex:s.dataIndex,seriesIndex:s.seriesIndex,dataByCoordSys:i.list})):r({type:"hideTip"}),function(t,e){var n=e.getZr(),i=dT(n).axisPointerLastHighlights||{},o=dT(n).axisPointerLastHighlights={};hT(t,function(t,e){var n=t.axisPointerModel.option;"show"===n.status&&hT(n.seriesDataIndices,function(t){var e=t.seriesIndex+" | "+t.dataIndex;o[e]=t})});var a=[],r=[];z(i,function(t,e){o[e]||r.push(t)}),z(o,function(t,e){i[e]||a.push(t)}),r.length&&e.dispatchAction({type:"downplay",escapeConnect:!0,batch:r}),a.length&&e.dispatchAction({type:"highlight",escapeConnect:!0,batch:a})}(y,n),_}});var wT=["x","y"],bT=["width","height"],ST=Yc.extend({makeElOption:function(t,e,n,i,o){var a,r,s=n.axis,l=s.coordinateSystem,u=hd(l,1-ud(s)),h=l.dataToPoint(e)[0],c=i.get("type");c&&"none"!==c&&(a=Qc(i),(r=MT[c](s,h,u,a)).style=a,t.graphicKey=r.type,t.pointer=r),id(e,t,Bc(n),n,i,o)},getHandleTransform:function(t,e,n){var i=Bc(e,{labelInside:!1});return i.labelMargin=n.get("handle.margin"),{position:nd(e.axis,t,i),rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(t,e,n){var i=n.axis,o=i.coordinateSystem,a=ud(i),r=hd(o,a),s=t.position;s[a]+=e[a],s[a]=Math.min(r[1],s[a]),s[a]=Math.max(r[0],s[a]);var l=hd(o,1-a),u=(l[1]+l[0])/2,h=[u,u];return h[a]=s[a],{position:s,rotation:t.rotation,cursorPoint:h,tooltipOption:{verticalAlign:"middle"}}}}),MT={line:function(t,e,n,i){var o=od([e,n[0]],[e,n[1]],ud(t));return Jn({shape:o,style:i}),{type:"Line",shape:o}},shadow:function(t,e,n){var i=t.getBandWidth(),o=n[1]-n[0];return{type:"Rect",shape:ad([e-i/2,n[0]],[i,o],ud(t))}}};Yb.registerAxisPointerClass("SingleAxisPointer",ST),ir({type:"single"});var IT=r_.extend({type:"series.themeRiver",dependencies:["singleAxis"],nameMap:null,init:function(t){IT.superApply(this,"init",arguments),this.legendDataProvider=function(){return this.getRawData()}},fixData:function(t){for(var e=t.length,n=L(qh().key(function(t){return t[2]}).entries(t),function(t){return{name:t.key,dataList:t.values}}),i=n.length,o=-1,a=-1,r=0;rMath.PI/2?"right":"left"):x&&"center"!==x?"left"===x?(p=u.r0+y,g>Math.PI/2&&(x="right")):"right"===x&&(p=u.r-y,g>Math.PI/2&&(x="left")):(p=(u.r+u.r0)/2,x="center"),d.attr("style",{text:l,textAlign:x,textVerticalAlign:i("verticalAlign")||"middle",opacity:i("opacity")});var _=p*f+u.cx,w=p*m+u.cy;d.attr("position",[_,w]);var b=i("rotate"),S=0;"radial"===b?(S=-g)<-Math.PI/2&&(S+=Math.PI):"tangential"===b?(S=Math.PI/2-g)>Math.PI/2?S-=Math.PI:S<-Math.PI/2&&(S+=Math.PI):"number"==typeof b&&(S=b*Math.PI/180),d.attr("rotation",S)},kT._initEvents=function(t,e,n,i){t.off("mouseover").off("mouseout").off("emphasis").off("normal");function o(){r.onEmphasis(i)}function a(){r.onNormal()}var r=this;n.isAnimationEnabled()&&t.on("mouseover",o).on("mouseout",a).on("emphasis",o).on("normal",a).on("downplay",function(){r.onDownplay()}).on("highlight",function(){r.onHighlight()})},a(dd,rm),ea.extend({type:"sunburst",init:function(){},render:function(o,a,t,e){function n(t,e){var n,i;h||!t||t.getValue()||(t=null),t!==s&&e!==s&&(e&&e.piece?t?(e.piece.updateData(!1,t,"normal",o,a),r.setItemGraphicEl(t.dataIndex,e.piece)):(i=e)&&i.piece&&(u.remove(i.piece),i.piece=null):t&&(n=new dd(t,o,a),u.add(n),r.setItemGraphicEl(t.dataIndex,n)))}var i=this;this.seriesModel=o,this.api=t,this.ecModel=a;var r=o.getData(),s=r.tree.root,l=o.getViewRoot(),u=this.group,h=o.get("renderLabelForZeroData"),c=[];l.eachNode(function(t){c.push(t)});var d,p,g,f,m,v,y,x=this._oldChildren||[];function _(t){return t.getId()}function w(t,e){n(null==t?null:v[t],null==e?null:y[e])}y=x,0===(v=c).length&&0===y.length||new sr(y,v,_,_).add(w).update(w).remove(E(w,null)).execute(),g=s,0<(f=l).depth?(i.virtualPiece?i.virtualPiece.updateData(!1,g,"normal",o,a):(i.virtualPiece=new dd(g,o,a),u.add(i.virtualPiece)),f.piece._onclickEvent&&f.piece.off("click",f.piece._onclickEvent),m=function(){i._rootToNode(f.parentNode)},f.piece._onclickEvent=m,i.virtualPiece.on("click",m)):i.virtualPiece&&(u.remove(i.virtualPiece),i.virtualPiece=null),e&&e.highlight&&e.highlight.piece?(d=o.getShallow("highlightPolicy"),e.highlight.piece.onEmphasis(d)):e&&e.unhighlight&&(!(p=this.virtualPiece)&&s.children.length&&(p=s.children[0].piece),p&&p.onNormal()),this._initEvents(),this._oldChildren=c},dispose:function(){},_initEvents:function(){function t(a){var r=!1;s.seriesModel.getViewRoot().eachNode(function(t){var e,n,i,o;!r&&t.piece&&t.piece.childAt(0)===a.target&&("rootToNode"===(e=t.getModel().get("nodeClick"))?s._rootToNode(t):"link"!==e||(i=(n=t.getModel()).get("link"))&&(o=n.get("target",!0)||"_blank",window.open(i,o)),r=!0)})}var s=this;this.group._onclickEvent&&this.group.off("click",this.group._onclickEvent),this.group.on("click",t),this.group._onclickEvent=t},_rootToNode:function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:"sunburstRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},containPoint:function(t,e){var n=e.getData().getItemLayout(0);if(n){var i=t[0]-n.cx,o=t[1]-n.cy,a=Math.sqrt(i*i+o*o);return a<=n.r&&a>=n.r0}}});var PT="sunburstRootToNode";Ka({type:PT,update:"updateView"},function(o,t){t.eachComponent({mainType:"series",subType:"sunburst",query:o},function(t,e){var n,i=du(o,[PT],t);i&&((n=t.getViewRoot())&&(o.direction=gu(n,i.node)?"rollUp":"drillDown"),t.resetViewRoot(i.node))})});var NT="sunburstHighlight";Ka({type:NT,update:"updateView"},function(i,t){t.eachComponent({mainType:"series",subType:"sunburst",query:i},function(t,e){var n=du(i,[NT],t);n&&(i.highlight=n.node)})}),Ka({type:"sunburstUnhighlight",update:"updateView"},function(n,t){t.eachComponent({mainType:"series",subType:"sunburst",query:n},function(t,e){n.unhighlight=!0})});var OT=Math.PI/180;Qa(E(hS,"sunburst")),Ja(E(function(t,e,A,n){e.eachSeriesByType(t,function(t){var e=t.get("center"),n=t.get("radius");N(n)||(n=[0,n]),N(e)||(e=[e,e]);var i=A.getWidth(),o=A.getHeight(),c=Math.min(i,o),d=Ei(e[0],i),p=Ei(e[1],o),g=Ei(n[0],c/2),a=Ei(n[1],c/2),r=-t.get("startAngle")*OT,f=t.get("minAngle")*OT,m=t.getData().tree.root,s=t.getViewRoot(),v=s.depth,l=t.get("sort");null!=l&&gd(s,l);var u=0;z(s.children,function(t){isNaN(t.getValue())||u++});var h,y,x=s.getValue(),_=Math.PI/(x||u)*2,w=0t[1]&&t.reverse(),{coordSys:{type:"polar",cx:o.cx,cy:o.cy,r:t[1],r0:t[0]},api:{coord:k(function(t){var e=a.dataToRadius(t[0]),n=r.dataToAngle(t[1]),i=o.coordToPoint([e,n]);return i.push(e,n*Math.PI/180),i}),size:k(yd,o)}}},calendar:function(n){var t=n.getRect(),e=n.getRangeInfo();return{coordSys:{type:"calendar",x:t.x,y:t.y,width:t.width,height:t.height,cellWidth:n.getCellWidth(),cellHeight:n.getCellHeight(),rangeInfo:{start:e.start,end:e.end,weeks:e.weeks,dayCount:e.allDay}},api:{coord:function(t,e){return n.dataToPoint(t,e)}}}}};r_.extend({type:"series.custom",dependencies:["grid","polar","geo","singleAxis","calendar"],defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,useTransform:!0},getInitialData:function(){return Mr(this.getSource(),this)},getDataParams:function(t,e,n){var i=r_.prototype.getDataParams.apply(this,arguments);return n&&(i.info=n.info),i}}),ea.extend({type:"custom",_data:null,render:function(n,t,e,i){var o=this._data,a=n.getData(),r=this.group,s=_d(n,a,t,e);a.diff(o).add(function(t){wd(null,t,s(t,i),n,r,a)}).update(function(t,e){wd(o.getItemGraphicEl(e),t,s(t,i),n,r,a)}).remove(function(t){var e=o.getItemGraphicEl(t);e&&r.remove(e)}).execute(),this._data=a},incrementalPrepareRender:function(){this.group.removeAll(),this._data=null},incrementalRender:function(t,e,n,i,o){for(var a=e.getData(),r=_d(e,a,n,i),s=t.start;sn[s],p=[-h.x,-h.y];p[r]=i.position[r];var g=[0,0],f=[-c.x,-c.y],m=G(t.get("pageButtonGap",!0),t.get("itemGap",!0));d&&("end"===t.get("pageButtonPosition",!0)?f[r]+=n[s]-c[s]:g[r]+=c[s]+m),f[1-r]+=h[l]/2-c[l]/2,i.attr("position",p),o.attr("position",g),a.attr("position",f);var v,y=this.group.getBoundingRect();(y={x:0,y:0})[s]=d?n[s]:h[s],y[l]=Math.max(h[l],c[l]),y[u]=Math.min(0,c[u]+f[1-r]),o.__rectSize=n[s],d?((v={x:0,y:0})[s]=Math.max(n[s]-c[s]-m,0),v[l]=y[l],o.setClipPath(new _y({shape:v})),o.__rectSize=v[s]):a.eachChild(function(t){t.attr({invisible:!0,silent:!0})});var x=this._getPageInfo(t);return null!=x.pageIndex&&Si(i,{position:x.contentPosition},!!d&&t),this._updatePageInfoView(t,x),y},_pageGo:function(t,e,n){var i=this._getPageInfo(e)[t];null!=i&&n.dispatchAction({type:"legendScroll",scrollDataIndex:i,legendId:e.id})},_updatePageInfoView:function(i,o){var a=this._controllerGroup;z(["pagePrev","pageNext"],function(t){var e=null!=o[t+"DataIndex"],n=a.childOfName(t);n&&(n.setStyle("fill",e?i.get("pageIconColor",!0):i.get("pageIconInactiveColor",!0)),n.cursor=e?"pointer":"default")});var t=a.childOfName("pageText"),e=i.get("pageFormatter"),n=o.pageIndex,r=null!=n?n+1:0,s=o.pageCount;t&&e&&t.setStyle("text",A(e)?e.replace("{current}",r).replace("{total}",s):e({current:r,total:s}))},_getPageInfo:function(t){function i(t){var e=t.getBoundingRect().clone();return e[p]+=t.position[h],e}var e,n,o,a,r=t.get("scrollDataIndex",!0),s=this.getContentGroup(),l=s.getBoundingRect(),u=this._containerGroup.__rectSize,h=t.getOrient().index,c=qT[h],d=qT[1-h],p=KT[h],g=s.position.slice();this._showController?s.eachChild(function(t){t.__legendDataIndex===r&&(a=t)}):a=s.childAt(0);var f=u?Math.ceil(l[c]/u):0;if(a){var m=a.getBoundingRect(),v=a.position[h]+m[p];g[h]=-v-l[p],e=Math.floor(f*(v+m[p]+u/2)/l[c]),e=l[c]&&f?Math.max(0,Math.min(f-1,e)):-1;var y={x:0,y:0};y[c]=u,y[d]=l[d],y[p]=-g[h]-l[p];var x,_=s.children();if(s.eachChild(function(t,e){var n=i(t);n.intersect(y)&&(null==x&&(x=e),o=t.__legendDataIndex),e===_.length-1&&n[p]+n[c]<=y[p]+y[c]&&(o=null)}),null!=x){var w=i(_[x]);if(y[p]=w[p]+w[c]-y[c],x<=0&&w[p]>=y[p])n=null;else{for(;0r?"left":"right",u=Math.abs(a[1]-s)/o<.3?"middle":a[1]>s?"top":"bottom";g&&g[i]&&g[i].textStyle&&(n=new ki(g[i].textStyle,f,f.ecModel));var h=new cy({silent:!0});this.group.add(h),fi(h.style,n,{x:a[0],y:a[1],textFill:n.getTextColor()||c.get("axisLine.lineStyle.color"),text:t.formattedLabel,textAlign:l,textVerticalAlign:u})},this)},_splitLine:function(t,e,n,i){for(var o=t.getModel("splitLine").getModel("lineStyle"),a=0,r=(r=o.get("color"))instanceof Array?r:[r],s=[],l=0;lx?"left":"right",Math.abs(y[1]-_)/v<.3?"middle":y[1]>_?"top":"bottom"),{position:y,align:f,verticalAlign:m}))}}),pA={line:function(t,e,n,i){return"angle"===t.dim?{type:"Line",shape:od(e.coordToPoint([i[0],n]),e.coordToPoint([i[1],n]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r:n}}},shadow:function(t,e,n,i){var o=Math.max(1,t.getBandWidth()),a=Math.PI/180;return"angle"===t.dim?{type:"Sector",shape:rd(e.cx,e.cy,i[0],i[1],(-n-o/2)*a,(o/2-n)*a)}:{type:"Sector",shape:rd(e.cx,e.cy,n-o/2,n+o/2,0,2*Math.PI)}}};Yb.registerAxisPointerClass("PolarAxisPointer",dA),Ja(E(function(t,e,n){n.getWidth(),n.getHeight();var k={},P=function(t){var p={};z(t,function(t,e){var n=t.getData(),i=t.coordinateSystem.getBaseAxis(),o=i.getExtent(),a="category"===i.type?i.getBandWidth():Math.abs(o[1]-o[0])/n.count(),r=p[Zd(i)]||{bandWidth:a,remainedWidth:a,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},s=r.stacks;p[Zd(i)]=r;var l=Hd(t);s[l]||r.autoWidthCount++,s[l]=s[l]||{width:0,maxWidth:0};var u=Ei(t.get("barWidth"),a),h=Ei(t.get("barMaxWidth"),a),c=t.get("barGap"),d=t.get("barCategoryGap");u&&!s[l].width&&(u=Math.min(r.remainedWidth,u),s[l].width=u,r.remainedWidth-=u),h&&(s[l].maxWidth=h),null!=c&&(r.gap=c),null!=d&&(r.categoryGap=d)});var d={};return z(p,function(t,n){d[n]={};var e=t.stacks,i=t.bandWidth,o=Ei(t.categoryGap,i),a=Ei(t.gap,1),r=t.remainedWidth,s=t.autoWidthCount,l=(r-o)/(s+(s-1)*a),l=Math.max(l,0);z(e,function(t,e){var n=t.maxWidth;n&&ne[0][1]&&(e[0][1]=a[0]),a[1]e[1][1]&&(e[1][1]=a[1])}return e&&mp(e)}},NA=["#ddd"];nr({type:"brush",dependencies:["geo","grid","xAxis","yAxis","parallel","series"],defaultOption:{toolbox:null,brushLink:null,seriesIndex:"all",geoIndex:null,xAxisIndex:null,yAxisIndex:null,brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(120,140,180,0.3)",borderColor:"rgba(120,140,180,0.8)"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},areas:[],brushType:null,brushOption:{},coordInfoList:[],optionUpdated:function(t,e){var n=this.option;e||np(n,t,["inBrush","outOfBrush"]);var i=n.inBrush=n.inBrush||{};n.outOfBrush=n.outOfBrush||{color:NA},i.hasOwnProperty("liftZ")||(i.liftZ=5)},setAreas:function(t){t&&(this.areas=L(t,function(t){return vp(this.option,t)},this))},setBrushOption:function(t){this.brushOption=vp(this.option,t),this.brushType=this.brushOption.brushType}}),ir({type:"brush",init:function(t,e){this.ecModel=t,this.api=e,this.model,(this._brushController=new sh(e.getZr())).on("brush",k(this._onBrush,this)).mount()},render:function(t){return this.model=t,yp.apply(this,arguments)},updateTransform:yp,updateView:yp,dispose:function(){this._brushController.dispose()},_onBrush:function(t,e){var n=this.model.id;this.model.brushTargetManager.setOutputRanges(t,this.ecModel),e.isEnd&&!e.removeOnClick||this.api.dispatchAction({type:"brush",brushId:n,areas:D(t),$from:n})}}),Ka({type:"brush",event:"brush"},function(e,t){t.eachComponent({mainType:"brush",query:e},function(t){t.setAreas(e.areas)})}),Ka({type:"brushSelect",event:"brushSelected",update:"none"},function(){});var OA={},RA=y_.toolbox.brush;wp.defaultOption={show:!0,type:["rect","polygon","lineX","lineY","keep","clear"],icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:D(RA.title)};var EA=wp.prototype;EA.render=EA.updateView=function(e,t,n){var i,o,a;t.eachComponent({mainType:"brush"},function(t){i=t.brushType,o=t.brushOption.brushMode||"single",a|=t.areas.length}),this._brushType=i,this._brushMode=o,z(e.get("type",!0),function(t){e.setIconStatus(t,("keep"===t?"multiple"===o:"clear"===t?a:t===i)?"emphasis":"normal")})},EA.getIcons=function(){var t=this.model,e=t.get("icon",!0),n={};return z(t.get("type",!0),function(t){e[t]&&(n[t]=e[t])}),n},EA.onclick=function(t,e,n){var i=this._brushType,o=this._brushMode;"clear"===n?(e.dispatchAction({type:"axisAreaSelect",intervals:[]}),e.dispatchAction({type:"brush",command:"clear",areas:[]})):e.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"keep"===n?i:i!==n&&n,brushMode:"keep"===n?"multiple"===o?"single":"multiple":o}})},xp("brush",wp),Ya(function(t,e){var n,i,o,a,r,s,l,u=t&&t.brush;N(u)||(u=u?[u]:[]),u.length&&(n=[],z(u,function(t){var e=t.hasOwnProperty("toolbox")?t.toolbox:[];e instanceof Array&&(n=n.concat(e))}),N(i=t&&t.toolbox)&&(i=i[0]),i||(i={feature:{}},t.toolbox=[i]),(r=(a=(o=i.feature||(i.feature={})).brush||(o.brush={})).type||(a.type=[])).push.apply(r,n),l={},z(s=r,function(t){l[t]=1}),s.length=0,z(l,function(t,e){s.push(e)}),e&&!r.length&&r.push.apply(r,gA))}),bp.prototype={constructor:bp,type:"calendar",dimensions:["time","value"],getDimensionsInfo:function(){return[{name:"time",type:"time"},"value"]},getRangeInfo:function(){return this._rangeInfo},getModel:function(){return this._model},getRect:function(){return this._rect},getCellWidth:function(){return this._sw},getCellHeight:function(){return this._sh},getOrient:function(){return this._orient},getFirstDayOfWeek:function(){return this._firstDayOfWeek},getDateInfo:function(t){var e=(t=Ui(t)).getFullYear(),n=(n=t.getMonth()+1)<10?"0"+n:n,i=(i=t.getDate())<10?"0"+i:i,o=t.getDay();return{y:e,m:n,d:i,day:o=Math.abs((o+7-this.getFirstDayOfWeek())%7),time:t.getTime(),formatedDate:e+"-"+n+"-"+i,date:t}},getNextNDay:function(t,e){return 0===(e=e||0)||(t=new Date(this.getDateInfo(t).time)).setDate(t.getDate()+e),this.getDateInfo(t)},update:function(t,e){function n(t,e){return null!=t[e]&&"auto"!==t[e]}this._firstDayOfWeek=+this._model.getModel("dayLabel").get("firstDay"),this._orient=this._model.get("orient"),this._lineWidth=this._model.getModel("itemStyle").getItemStyle().lineWidth||0,this._rangeInfo=this._getRangeInfo(this._initRangeOption());var i=this._rangeInfo.weeks||1,o=["width","height"],a=this._model.get("cellSize").slice(),r=this._model.getBoxLayoutParams(),s="horizontal"===this._orient?[i,7]:[7,i];z([0,1],function(t){n(a,t)&&(r[o[t]]=a[t]*s[t])});var l={width:e.getWidth(),height:e.getHeight()},u=this._rect=so(r,l);z([0,1],function(t){n(a,t)||(a[t]=u[o[t]]/s[t])}),this._sw=a[0],this._sh=a[1]},dataToPoint:function(t,e){N(t)&&(t=t[0]),null==e&&(e=!0);var n=this.getDateInfo(t),i=this._rangeInfo,o=n.formatedDate;if(e&&!(n.time>=i.start.time&&n.timea.end.time&&i.reverse(),i},_getRangeInfo:function(t){var e;(t=[this.getDateInfo(t[0]),this.getDateInfo(t[1])])[0].time>t[1].time&&(e=!0,t.reverse());var n=Math.floor(t[1].time/864e5)-Math.floor(t[0].time/864e5)+1,i=new Date(t[0].time),o=i.getDate(),a=t[1].date.getDate();if(i.setDate(o+n-1),i.getDate()!==a)for(var r=0i.weeks||0===t&&ei.lweek)return!1;var o=7*(t-1)-i.fweek+e,a=new Date(i.start.time);return a.setDate(i.start.d+o),this.getDateInfo(a)}},bp.dimensions=bp.prototype.dimensions,bp.getDimensionsInfo=bp.prototype.getDimensionsInfo,bp.create=function(t,e){var n=[];return t.eachComponent("calendar",function(t){var e=new bp(t);n.push(e),t.coordinateSystem=e}),t.eachSeries(function(t){"calendar"===t.get("coordinateSystem")&&(t.coordinateSystem=n[t.get("calendarIndex")||0])}),n},Mo.register("calendar",bp);var zA=ux.extend({type:"calendar",coordinateSystem:null,defaultOption:{zlevel:0,z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{color:"#fff",borderWidth:1,borderColor:"#ccc"},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",nameMap:"en",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",nameMap:"en",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},init:function(t,e,n,i){var o=ho(t);zA.superApply(this,"init",arguments),Mp(t,o)},mergeOption:function(t,e){zA.superApply(this,"mergeOption",arguments),Mp(this.option,t)}}),BA={EN:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],CN:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},VA={EN:["S","M","T","W","T","F","S"],CN:["日","一","二","三","四","五","六"]};ir({type:"calendar",_tlpoints:null,_blpoints:null,_firstDayOfMonth:null,_firstDayPoints:null,render:function(t){var e=this.group;e.removeAll();var n=t.coordinateSystem,i=n.getRangeInfo(),o=n.getOrient();this._renderDayRect(t,i,e),this._renderLines(t,i,o,e),this._renderYearText(t,i,o,e),this._renderMonthText(t,o,e),this._renderWeekText(t,i,o,e)},_renderDayRect:function(t,e,n){for(var i=t.coordinateSystem,o=t.getModel("itemStyle").getItemStyle(),a=i.getCellWidth(),r=i.getCellHeight(),s=e.start.time;s<=e.end.time;s=i.getNextNDay(s,1).time){var l=i.dataToRect([s],!1).tl,u=new _y({shape:{x:l[0],y:l[1],width:a,height:r},cursor:"default",style:o});n.add(u)}},_renderLines:function(n,t,i,o){function e(t){a._firstDayOfMonth.push(r.getDateInfo(t)),a._firstDayPoints.push(r.dataToRect([t],!1).tl);var e=a._getLinePointsOfOneWeek(n,t,i);a._tlpoints.push(e[0]),a._blpoints.push(e[e.length-1]),l&&a._drawSplitline(e,s,o)}var a=this,r=n.coordinateSystem,s=n.getModel("splitLine.lineStyle").getLineStyle(),l=n.get("splitLine.show"),u=s.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var h=t.start,c=0;h.time<=t.end.time;c++){e(h.formatedDate),0===c&&(h=r.getDateInfo(t.start.y+"-"+t.start.m));var d=h.date;d.setMonth(d.getMonth()+1),h=r.getDateInfo(d)}e(r.getNextNDay(t.end.time,1).formatedDate),l&&this._drawSplitline(a._getEdgesPoints(a._tlpoints,u,i),s,o),l&&this._drawSplitline(a._getEdgesPoints(a._blpoints,u,i),s,o)},_getEdgesPoints:function(t,e,n){var i=[t[0].slice(),t[t.length-1].slice()],o="horizontal"===n?0:1;return i[0][o]=i[0][o]-e/2,i[1][o]=i[1][o]+e/2,i},_drawSplitline:function(t,e,n){var i=new xy({z2:20,shape:{points:t},style:e});n.add(i)},_getLinePointsOfOneWeek:function(t,e,n){var i=t.coordinateSystem;e=i.getDateInfo(e);for(var o=[],a=0;a<7;a++){var r=i.getNextNDay(e.time,a),s=i.dataToRect([r.time],!1);o[2*r.day]=s.tl,o[2*r.day+1]=s["horizontal"===n?"bl":"tr"]}return o},_formatterLabel:function(t,e){return"string"==typeof t&&t?eo(t,e):"function"==typeof t?t(e):e.nameMap},_yearTextPositionControl:function(t,e,n,i,o){e=e.slice();var a=["center","bottom"];"bottom"===i?(e[1]+=o,a=["center","top"]):"left"===i?e[0]-=o:"right"===i?(e[0]+=o,a=["center","top"]):e[1]-=o;var r=0;return"left"!==i&&"right"!==i||(r=Math.PI/2),{rotation:r,position:e,style:{textAlign:a[0],textVerticalAlign:a[1]}}},_renderYearText:function(t,e,n,i){var o,a,r,s,l,u,h,c,d,p,g,f,m=t.getModel("yearLabel");m.get("show")&&(o=m.get("margin"),a=(a=m.get("position"))||("horizontal"!==n?"top":"left"),s=((r=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]])[0][0]+r[1][0])/2,l=(r[0][1]+r[1][1])/2,h={top:[s,r[u="horizontal"===n?0:1][1]],bottom:[s,r[1-u][1]],left:[r[1-u][0],l],right:[r[u][0],l]},c=e.start.y,+e.end.y>+e.start.y&&(c=c+"-"+e.end.y),d=m.get("formatter"),p={start:e.start.y,end:e.end.y,nameMap:c},g=this._formatterLabel(d,p),fi((f=new cy({z2:30})).style,m,{text:g}),f.attr(this._yearTextPositionControl(f,h[a],n,a,o)),i.add(f))},_monthTextPositionControl:function(t,e,n,i,o){var a="left",r="top",s=t[0],l=t[1];return"horizontal"===n?(l+=o,e&&(a="center"),"start"===i&&(r="bottom")):(s+=o,e&&(r="middle"),"start"===i&&(a="right")),{x:s,y:l,textAlign:a,textVerticalAlign:r}},_renderMonthText:function(t,e,n){var i=t.getModel("monthLabel");if(i.get("show")){var o=i.get("nameMap"),a=i.get("margin"),r=i.get("position"),s=i.get("align"),l=[this._tlpoints,this._blpoints];A(o)&&(o=BA[o.toUpperCase()]||[]);for(var u="start"===r?0:1,h="horizontal"===e?0:1,a="start"===r?-a:a,c="center"===s,d=0;dc[1];if(r&&!s&&!l)return!0;r&&(i=!0),s&&(e=!0),l&&(n=!0)}return i&&e&&n}):jA(h,function(t){var e;"empty"===i?n.setData(u.map(t,function(t){return(e=t)>=c[0]&&e<=c[1]?t:NaN;var e})):((e={})[t]=c,u.selectRange(e))}),jA(h,function(t){u.setApproximateExtent(c,t)}))}))}};var qA=z,KA=XA,$A=nr({type:"dataZoom",dependencies:["xAxis","yAxis","zAxis","radiusAxis","angleAxis","singleAxis","series"],defaultOption:{zlevel:0,z:4,orient:null,xAxisIndex:null,yAxisIndex:null,filterMode:"filter",throttle:null,start:0,end:100,startValue:null,endValue:null,minSpan:null,maxSpan:null,minValueSpan:null,maxValueSpan:null,rangeMode:null},init:function(t,e,n){this._dataIntervalByAxis={},this._dataInfo={},this._axisProxies={},this.textStyleModel,this._autoThrottle=!0,this._rangePropMode=["percent","percent"];var i=Dp(t);this.mergeDefaultAndTheme(t,n),this.doInit(i)},mergeOption:function(t){var e=Dp(t);v(this.option,t,!0),this.doInit(e)},doInit:function(t){var n=this.option;ef.canvasSupported||(n.realtime=!1),this._setDefaultThrottle(t),Cp(this,t),qA([["start","startValue"],["end","endValue"]],function(t,e){"value"===this._rangePropMode[e]&&(n[t[0]]=null)},this),this.textStyleModel=this.getModel("textStyle"),this._resetTarget(),this._giveAxisProxies()},_giveAxisProxies:function(){var r=this._axisProxies;this.eachTargetAxis(function(t,e,n,i){var o=this.dependentModels[t.axis][e],a=o.__dzAxisProxy||(o.__dzAxisProxy=new GA(t.name,e,this,i));r[t.name+"_"+e]=a},this)},_resetTarget:function(){var n=this.option,t=this._judgeAutoMode();KA(function(t){var e=t.axisIndex;n[e]=Qe(n[e])},this),"axisIndex"===t?this._autoSetAxisIndex():"orient"===t&&this._autoSetOrient()},_judgeAutoMode:function(){var e=this.option,n=!1;KA(function(t){null!=e[t.axisIndex]&&(n=!0)},this);var t=e.orient;return null==t&&n?"orient":n?void 0:(null==t&&(e.orient="horizontal"),"axisIndex")},_autoSetAxisIndex:function(){var t,a=!0,e=this.get("orient",!0),r=this.option,n=this.dependentModels;a&&(n[(t="vertical"===e?"y":"x")+"Axis"].length?(r[t+"AxisIndex"]=[0],a=!1):qA(n.singleAxis,function(t){a&&t.get("orient",!0)===e&&(r.singleAxisIndex=[t.componentIndex],a=!1)})),a&&KA(function(t){if(a){var e=[],n=this.dependentModels[t.axis];if(n.length&&!e.length)for(var i=0,o=n.length;io[0]||a[1]<0||a[1]>o[1]||(n=((e=this._handleEnds)[0]+e[1])/2,i=this._updateInterval("all",a[0]-n),this._updateView(),i&&this._dispatchZoomAction())},_dispatchZoomAction:function(){var t=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,start:t[0],end:t[1]})},_findCoordRect:function(){var t,e,n;return iD(this.getTargetCoordInfo(),function(t){var e;!n&&t.length&&(e=t[0].model.coordinateSystem,n=e.getRect&&e.getRect())}),n||(t=this.api.getWidth(),e=this.api.getHeight(),n={x:.2*t,y:.2*e,width:.6*t,height:.6*e}),n}});$A.extend({type:"dataZoom.inside",defaultOption:{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}});var sD="\0_ec_dataZoom_roams",lD=k,uD=JA.extend({type:"dataZoom.inside",init:function(){this._range},render:function(r,t,s,e){uD.superApply(this,"render",arguments),this._range=r.getPercentRange(),z(this.getTargetCoordInfo(),function(t,o){var a=L(t,function(t){return Pp(t.model)});z(t,function(e){var i=e.model,n={};z(["pan","zoom","scrollMove"],function(t){n[t]=lD(hD[t],this,e,o)},this),kp(s,{coordId:Pp(i),allCoordIds:a,containsPoint:function(t,e,n){return i.coordinateSystem.containPoint([e,n])},dataZoomId:r.id,dataZoomModel:r,getRange:n})},this)},this)},dispose:function(){var t,n,e;t=this.api,n=this.dataZoomModel.id,z(e=Np(t),function(t){t.controller.dispose();var e=t.dataZoomInfos;e[n]&&(delete e[n],t.count--)}),Op(e),uD.superApply(this,"dispose",arguments),this._range=null}}),hD={zoom:function(t,e,n,i){var o=this._range,a=o.slice(),r=t.axisModels[0];if(r){var s=cD[e](null,[i.originX,i.originY],r,n,t),l=(0"],N(t)&&(t=t.slice(),o=!0),a=e?t:o?[i(t[0]),i(t[1])]:i(t),A(u)?u.replace("{value}",o?a[0]:a).replace("{value2}",o?a[1]:a):f(u)?o?u(t[0],t[1]):u(t):o?t[0]===l[0]?n[0]+" "+a[1]:t[1]===l[1]?n[1]+" "+a[0]:a[0]+" - "+a[1]:a},resetExtent:function(){var t=this.option,e=wD([t.min,t.max]);this._dataExtent=e},getDataDimension:function(t){var e=this.option.dimension,n=t.dimensions;if(null!=e||n.length){if(null!=e)return t.getDimension(e);for(var i=t.dimensions,o=i.length-1;0<=o;o--){var a=i[o];if(!t.getDimensionInfo(a).isCalculationCoord)return a}}},getExtent:function(){return this._dataExtent.slice()},completeVisualOption:function(){function t(i){xD(n.color)&&!i.inRange&&(i.inRange={color:n.color.slice().reverse()}),i.inRange=i.inRange||{color:e.get("gradientColor")},_D(this.stateList,function(t){var e,n=i[t];A(n)&&((e=fD(n,"active",u))?(i[t]={},i[t][n]=e):delete i[t])},this)}var e=this.ecModel,n=this.option,i={inRange:n.inRange,outOfRange:n.outOfRange},o=n.target||(n.target={}),a=n.controller||(n.controller={});v(o,i),v(a,i);var u=this.isCategory();t.call(this,o),t.call(this,a),function(t,e,n){var i=t[e],o=t[n];i&&!o&&(o=t[n]={},_D(i,function(t,e){var n;!oM.isValidType(e)||null!=(n=fD(e,"inactive",u))&&(o[e]=n,"color"!==e||o.hasOwnProperty("opacity")||o.hasOwnProperty("colorAlpha")||(o.opacity=[0,0]))}))}.call(this,o,"inRange","outOfRange"),function(a){var r=(a.inRange||{}).symbol||(a.outOfRange||{}).symbol,s=(a.inRange||{}).symbolSize||(a.outOfRange||{}).symbolSize,l=this.get("inactiveColor");_D(this.stateList,function(t){var e=this.itemSize,n=a[t];null==(n=n||(a[t]={color:u?l:[l]})).symbol&&(n.symbol=r&&D(r)||(u?"roundRect":["roundRect"])),null==n.symbolSize&&(n.symbolSize=s&&D(s)||(u?e[0]:[e[0],e[0]])),n.symbol=vD(n.symbol,function(t){return"none"===t||"square"===t?"roundRect":t});var i,o=n.symbolSize;null!=o&&(i=-1/0,yD(o,function(t){ie[1]&&e.reverse(),e[0]=Math.max(e[0],t[0]),e[1]=Math.min(e[1],t[1]))},completeVisualOption:function(){SD.prototype.completeVisualOption.apply(this,arguments),z(this.stateList,function(t){var e=this.option.controller[t].symbolSize;e&&e[0]!==e[1]&&(e[0]=0)},this)},setSelected:function(t){this.option.range=t.slice(),this._resetRange()},getSelected:function(){var t=this.getExtent(),e=Bi((this.get("range")||[]).slice());return e[0]>t[1]&&(e[0]=t[1]),e[1]>t[1]&&(e[1]=t[1]),e[0]=n[1]||t<=e[1])?"inRange":"outOfRange"},findTargetDataIndices:function(i){var o=[];return this.eachTargetSeries(function(t){var n=[],e=t.getData();e.each(this.getDataDimension(e),function(t,e){i[0]<=t&&t<=i[1]&&n.push(e)},this),o.push({seriesId:t.id,dataIndex:n})},this),o},getVisualMeta:function(n){function t(t,e){o.push({value:t,color:n(t,e)})}for(var e=Vp(0,0,this.getExtent()),i=Vp(0,0,this.option.range.slice()),o=[],a=0,r=0,s=i.length,l=e.length;rt[1])break;n.push({color:this.getControllerVisual(a,"color",e),offset:o/100})}return n.push({color:this.getControllerVisual(t[1],"color",e),offset:1}),n},_createBarPoints:function(t,e){var n=this.visualMapModel.itemSize;return[[n[0]-e[0],t[0]],[n[0],t[0]],[n[0],t[1]],[n[0]-e[1],t[1]]]},_createBarGroup:function(t){var e=this._orient,n=this.visualMapModel.get("inverse");return new rm("horizontal"!==e||n?"horizontal"===e&&n?{scale:"bottom"===t?[-1,1]:[1,1],rotation:-Math.PI/2}:"vertical"!==e||n?{scale:"left"===t?[1,1]:[-1,1]}:{scale:"left"===t?[1,-1]:[-1,-1]}:{scale:"bottom"===t?[1,1]:[-1,1],rotation:Math.PI/2})},_updateHandle:function(i,o){var a,r,s,l;this._useHandle&&(a=this._shapes,r=this.visualMapModel,s=a.handleThumbs,l=a.handleLabels,DD([0,1],function(t){var e=s[t];e.setStyle("fill",o.handlesColor[t]),e.position[1]=i[t];var n=Ti(a.handleLabelPoints[t],Ii(e,this.group));l[t].setStyle({x:n[0],y:n[1],text:r.formatValueText(this._dataInterval[t]),textVerticalAlign:"middle",textAlign:this._applyTransform("horizontal"===this._orient?0===t?"bottom":"top":"left",a.barGroup)})},this))},_showIndicator:function(t,e,n,i){var o,a,r,s,l,u,h,c,d,p=this.visualMapModel,g=p.getExtent(),f=p.itemSize,m=[0,f[1]],v=AD(t,g,m,!0),y=this._shapes,x=y.indicator;x&&(x.position[1]=v,x.attr("invisible",!1),x.setShape("points",(u=!!n,h=i,c=v,d=f[1],u?[[0,-CD(h,LD(c,0))],[6,0],[0,CD(h,LD(d-c,0))]]:[[0,0],[5,-5],[5,5]])),o=this.getControllerVisual(t,"color",{convertOpacityToAlpha:!0}),x.setStyle("fill",o),a=Ti(y.indicatorLabelPoint,Ii(x,this.group)),(r=y.indicatorLabel).attr("invisible",!1),s=this._applyTransform("left",y.barGroup),l=this._orient,r.setStyle({text:(n||"")+p.formatValueText(e),textVerticalAlign:"horizontal"===l?s:"middle",textAlign:"horizontal"===l?"center":s,x:a[0],y:a[1]}))},_enableHoverLinkToSeries:function(){var i=this;this._shapes.barGroup.on("mousemove",function(t){var e,n;i._hovering=!0,i._dragging||(e=i.visualMapModel.itemSize,(n=i._applyTransform([t.offsetX,t.offsetY],i._shapes.barGroup,!0,!0))[1]=CD(LD(0,n[1]),e[1]),i._doHoverLinkToSeries(n[1],0<=n[0]&&n[0]<=e[0]))}).on("mouseout",function(){i._hovering=!1,i._dragging||i._clearHoverLinkToSeries()})},_enableHoverLinkFromSeries:function(){var t=this.api.getZr();this.visualMapModel.option.hoverLink?(t.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),t.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},_doHoverLinkToSeries:function(t,e){var n,i,o,a,r,s,l,u,h,c,d,p,g,f,m,v,y=this.visualMapModel,x=y.itemSize;function _(t,e,n){for(var i=0,o=t.length;i ",o):this._showIndicator(r,r,"≈ ",o)),l=this._hoverLinkDataIndices,u=[],(e||Hp(y))&&(u=this._hoverLinkDataIndices=y.findTargetDataIndices(s)),c=u,p={},_(l||[],d={}),_(c||[],p,d),h=[w(d),w(p)],this._dispatchHighDown("downplay",Fp(h[0])),this._dispatchHighDown("highlight",Fp(h[1])))},_hoverLinkFromSeriesMouseOver:function(t){var e,n,i,o=t.target,a=this.visualMapModel;o&&null!=o.dataIndex&&(e=this.ecModel.getSeriesByIndex(o.seriesIndex),a.isTargetSeries(e)&&(i=(n=e.getData(o.dataType)).get(a.getDataDimension(n),o.dataIndex,!0),isNaN(i)||this._showIndicator(i,i)))},_hideIndicator:function(){var t=this._shapes;t.indicator&&t.indicator.attr("invisible",!0),t.indicatorLabel&&t.indicatorLabel.attr("invisible",!0)},_clearHoverLinkToSeries:function(){this._hideIndicator();var t=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",Fp(t)),t.length=0},_clearHoverLinkFromSeries:function(){this._hideIndicator();var t=this.api.getZr();t.off("mouseover",this._hoverLinkFromSeriesMouseOver),t.off("mouseout",this._hideIndicator)},_applyTransform:function(t,e,n,i){var o=Ii(e,i?null:this.group);return Ey[N(t)?"applyTransform":"transformDirection"](t,o,n)},_dispatchHighDown:function(t,e){e&&e.length&&this.api.dispatchAction({type:t,batch:e})},dispose:function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},remove:function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()}});Ka({type:"selectDataRange",event:"dataRangeSelected",update:"update"},function(e,t){t.eachComponent({mainType:"visualMap",query:e},function(t){t.setSelected(e.selected)})}),Ya(dD);var PD=SD.extend({type:"visualMap.piecewise",defaultOption:{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieceList:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0,showLabel:null},optionUpdated:function(t,e){PD.superApply(this,"optionUpdated",arguments),this._pieceList=[],this.resetExtent();var n=this._mode=this._determineMode();ND[this._mode].call(this),this._resetSelected(t,e);var i=this.option.categories;this.resetVisual(function(t,e){"categories"===n?(t.mappingMethod="category",t.categories=D(i)):(t.dataExtent=this.getExtent(),t.mappingMethod="piecewise",t.pieceList=L(this._pieceList,function(t){t=D(t);return"inRange"!==e&&(t.visual=null),t}))})},completeVisualOption:function(){function i(t,e,n){return t&&t[e]&&(B(t[e])?t[e].hasOwnProperty(n):t[e]===n)}var o=this.option,n={},t=oM.listVisualTypes(),a=this.isCategory();z(o.pieces,function(e){z(t,function(t){e.hasOwnProperty(t)&&(n[t]=1)})}),z(n,function(t,e){var n=0;z(this.stateList,function(t){n|=i(o,t,e)||i(o.target,t,e)},this),n||z(this.stateList,function(t){(o[t]||(o[t]={}))[e]=fD(e,"inRange"===t?"active":"inactive",a)})},this),SD.prototype.completeVisualOption.apply(this,arguments)},_resetSelected:function(t,e){var i,n=this.option,o=this._pieceList,a=(e?n:t).selected||{};n.selected=a,z(o,function(t,e){var n=this.getSelectedMapKey(t);a.hasOwnProperty(n)||(a[n]=!0)},this),"single"===n.selectedMode&&(i=!1,z(o,function(t,e){var n=this.getSelectedMapKey(t);a[n]&&(i?a[n]=!1:i=!0)},this))},getSelectedMapKey:function(t){return"categories"===this._mode?t.value+"":t.index+""},getPieceList:function(){return this._pieceList},_determineMode:function(){var t=this.option;return t.pieces&&0i&&n([i,e[0]],"outOfRange"),n(e.slice()),i=e[1])},this),{stops:a,outerColors:r}}}}),ND={splitNumber:function(){var t=this.option,e=this._pieceList,n=Math.min(t.precision,20),i=this.getExtent(),o=t.splitNumber,o=Math.max(parseInt(o,10),1);t.splitNumber=o;for(var a=(i[1]-i[0])/o;+a.toFixed(n)!==a&&n<5;)n++;t.precision=n,a=+a.toFixed(n);var r=0;t.minOpen&&e.push({index:r++,interval:[-1/0,i[0]],close:[0,0]});for(var s=i[0],l=r+o;r","≥"][e[0]]];t.text=t.text||this.formatValueText(null!=t.value?t.value:t.interval,!1,n)},this)}};TD.extend({type:"visualMap.piecewise",doRender:function(){var a=this.group;a.removeAll();var r=this.visualMapModel,s=r.get("textGap"),t=r.textStyleModel,l=t.getFont(),u=t.getTextColor(),h=this._getItemAlign(),c=r.itemSize,e=this._getViewData(),n=e.endsText,d=V(r.get("showLabel",!0),!n);n&&this._renderEndsText(a,n[0],c,d,h),z(e.viewPieceList,function(t){var e=t.piece,n=new rm;n.onclick=k(this._onItemClick,this,e),this._enableHoverLink(n,t.indexInModelPieceList);var i,o=r.getRepresentValue(e);this._createItemSymbol(n,o,[0,0,c[0],c[1]]),d&&(i=this.visualMapModel.getValueState(o),n.add(new cy({style:{x:"right"===h?-s:c[0]+s,y:c[1]/2,text:e.text,textVerticalAlign:"middle",textAlign:h,textFont:l,textFill:u,opacity:"outOfRange"===i?.5:1}}))),a.add(n)},this),n&&this._renderEndsText(a,n[1],c,d,h),rx(r.get("orient"),a,r.get("itemGap")),this.renderBackground(a),this.positionGroup(a)},_enableHoverLink:function(t,n){function e(t){var e=this.visualMapModel;e.option.hoverLink&&this.api.dispatchAction({type:t,batch:Fp(e.findTargetDataIndices(n))})}t.on("mouseover",k(e,this,"highlight")).on("mouseout",k(e,this,"downplay"))},_getItemAlign:function(){var t=this.visualMapModel,e=t.option;if("vertical"===e.orient)return Gp(t,this.api,t.itemSize);var n=e.align;return n&&"auto"!==n||(n="left"),n},_renderEndsText:function(t,e,n,i,o){var a,r;e&&(a=new rm,r=this.visualMapModel.textStyleModel,a.add(new cy({style:{x:i?"right"===o?n[0]:0:n[0]/2,y:n[1]/2,textVerticalAlign:"middle",textAlign:i?o:"center",text:e,textFont:r.getFont(),textFill:r.getTextColor()}})),t.add(a))},_getViewData:function(){var t=this.visualMapModel,e=L(t.getPieceList(),function(t,e){return{piece:t,indexInModelPieceList:e}}),n=t.get("text"),i=t.get("orient"),o=t.get("inverse");return("horizontal"===i?o:!o)?e.reverse():n=n&&n.slice().reverse(),{viewPieceList:e,endsText:n}},_createItemSymbol:function(t,e,n){t.add(Kr(this.getControllerVisual(e,"symbol"),n[0],n[1],n[2],n[3],this.getControllerVisual(e,"color")))},_onItemClick:function(t){var e=this.visualMapModel,n=e.option,i=D(n.selected),o=e.getSelectedMapKey(t);"single"===n.selectedMode?(i[o]=!0,z(i,function(t,e){i[e]=e===o})):i[o]=!i[o],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:i})}}),Ya(dD);var OD=$i,RD=Qi,ED=nr({type:"marker",dependencies:["series","grid","polar","geo"],init:function(t,e,n,i){this.mergeDefaultAndTheme(t,n),this.mergeOption(t,n,i.createdBySelf,!0)},isAnimationEnabled:function(){if(ef.node)return!1;var t=this.__hostSeries;return this.getShallow("animation")&&t&&t.isAnimationEnabled()},mergeOption:function(t,i,e,o){var a=this.constructor,r=this.mainType+"Model";e||i.eachSeries(function(t){var e=t.get(this.mainType,!0),n=t[r];e&&e.data?(n?n.mergeOption(e,i,!0):(o&&Xp(e),z(e.data,function(t){t instanceof Array?(Xp(t[0]),Xp(t[1])):Xp(t)}),P(n=new a(e,this,i),{mainType:this.mainType,seriesIndex:t.seriesIndex,name:t.name,createdBySelf:!0}),n.__hostSeries=t),t[r]=n):t[r]=null},this)},formatTooltip:function(t){var e=this.getData(),n=this.getRawValue(t),i=N(n)?L(n,OD).join(", "):OD(n),o=e.getName(t),a=RD(this.name);return null==n&&!o||(a+="
"),o&&(a+=RD(o),null!=n&&(a+=" : ")),null!=n&&(a+=RD(i)),a},getData:function(){return this._data},setData:function(t){this._data=t}});o(ED,Yx),ED.extend({type:"markPoint",defaultOption:{zlevel:0,z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}}});var zD=M,BD=E,VD={min:BD(jp,"min"),max:BD(jp,"max"),average:BD(jp,"average")},GD=ir({type:"marker",init:function(){this.markerGroupMap=C()},render:function(t,n,i){var e=this.markerGroupMap;e.each(function(t){t.__keep=!1});var o=this.type+"Model";n.eachSeries(function(t){var e=t[o];e&&this.renderSeries(t,e,n,i)},this),e.each(function(t){t.__keep||this.group.remove(t.group)},this)},renderSeries:function(){}});GD.extend({type:"markPoint",updateTransform:function(t,e,n){e.eachSeries(function(t){var e=t.markPointModel;e&&(Qp(e.getData(),t,n),this.markerGroupMap.get(t.id).updateLayout(e))},this)},renderSeries:function(t,i,e,n){var o,a,r,s,l,u,h=t.coordinateSystem,c=t.id,d=t.getData(),p=this.markerGroupMap,g=p.get(c)||p.set(c,new xs),f=(a=t,r=i,s=(o=h)?L(o&&o.dimensions,function(t){return O({name:t},a.getData().getDimensionInfo(a.getData().mapDimension(t))||{})}):[{name:"value",type:"float"}],l=new gw(s,r),u=L(r.get("data"),E(Yp,a)),o&&(u=I(u,E(Kp,o))),l.initData(u,null,o?$p:function(t){return t.value}),l);i.setData(f),Qp(i.getData(),t,n),f.each(function(t){var e=f.getItemModel(t),n=e.getShallow("symbolSize");"function"==typeof n&&(n=n(i.getRawValue(t),i.getDataParams(t))),f.setItemVisual(t,{symbolSize:n,color:e.get("itemStyle.color")||d.getVisual("color"),symbol:e.getShallow("symbol")})}),g.updateData(f),this.group.add(g.group),f.eachItemGraphicEl(function(t){t.traverse(function(t){t.dataModel=i})}),g.__keep=!0,g.group.silent=i.get("silent")||t.get("silent")}}),Ya(function(t){t.markPoint=t.markPoint||{}}),ED.extend({type:"markLine",defaultOption:{zlevel:0,z:5,symbol:["circle","arrow"],symbolSize:[8,16],precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end"},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"}});function FD(t,e,n,i){var o,a,r,s,l,u,h,c,d=t.getData(),p=i.type;return N(i)||"min"!==p&&"max"!==p&&"average"!==p&&"median"!==p&&null==i.xAxis&&null==i.yAxis||(r=null!=i.yAxis||null!=i.xAxis?(a=null!=i.yAxis?"y":"x",e.getAxis(a),V(i.yAxis,i.xAxis)):(a=(o=qp(i,d,e,t)).valueDataDim,o.valueAxis,Jp(d,a,p)),l=1-(s="x"===a?0:1),h={},(u=D(i)).type=null,u.coord=[],h.coord=[],u.coord[l]=-1/0,h.coord[l]=1/0,0<=(c=n.get("precision"))&&"number"==typeof r&&(r=+r.toFixed(Math.min(c,20))),u.coord[s]=h.coord[s]=r,i=[u,h,{type:p,valueIndex:i.valueIndex,value:r}]),(i=[Yp(t,i[0]),Yp(t,i[1]),P({},i[2])])[2].type=i[2].type||"",v(i[2],i[0]),v(i[2],i[1]),i}GD.extend({type:"markLine",updateTransform:function(t,e,a){e.eachSeries(function(e){var n,i,o,t=e.markLineModel;t&&(n=t.getData(),i=t.__from,o=t.__to,i.each(function(t){ig(i,t,!0,e,a),ig(o,t,!1,e,a)}),n.each(function(t){n.setItemLayout(t,[i.getItemLayout(t),o.getItemLayout(t)])}),this.markerGroupMap.get(e.id).updateLayout())},this)},renderSeries:function(o,n,t,a){function e(t,e,n){var i=t.getItemModel(e);ig(t,e,n,o,a),t.setItemVisual(e,{symbolSize:i.get("symbolSize")||f[n?0:1],symbol:i.get("symbol",!0)||g[n?0:1],color:i.get("itemStyle.color")||s.getVisual("color")})}var i=o.coordinateSystem,r=o.id,s=o.getData(),l=this.markerGroupMap,u=l.get(r)||l.set(r,new Hu);this.group.add(u.group);var h=function(t,e,n){var i=t?L(t&&t.dimensions,function(t){return O({name:t},e.getData().getDimensionInfo(e.getData().mapDimension(t))||{})}):[{name:"value",type:"float"}],o=new gw(i,n),a=new gw(i,n),r=new gw([],n),s=L(n.get("data"),E(FD,e,t,n));t&&(s=I(s,E(ng,t)));var l=t?$p:function(t){return t.value};return o.initData(L(s,function(t){return t[0]}),null,l),a.initData(L(s,function(t){return t[1]}),null,l),r.initData(L(s,function(t){return t[2]})),r.hasItemOption=!0,{from:o,to:a,line:r}}(i,o,n),c=h.from,d=h.to,p=h.line;n.__from=c,n.__to=d,n.setData(p);var g=n.get("symbol"),f=n.get("symbolSize");N(g)||(g=[g,g]),"number"==typeof f&&(f=[f,f]),h.from.each(function(t){e(c,t,!0),e(d,t,!1)}),p.each(function(t){var e=p.getItemModel(t).get("lineStyle.color");p.setItemVisual(t,{color:e||c.getItemVisual(t,"color")}),p.setItemLayout(t,[c.getItemLayout(t),d.getItemLayout(t)]),p.setItemVisual(t,{fromSymbolSize:c.getItemVisual(t,"symbolSize"),fromSymbol:c.getItemVisual(t,"symbol"),toSymbolSize:d.getItemVisual(t,"symbolSize"),toSymbol:d.getItemVisual(t,"symbol")})}),u.updateData(p),h.line.eachItemGraphicEl(function(t,e){t.traverse(function(t){t.dataModel=n})}),u.__keep=!0,u.group.silent=n.get("silent")||o.get("silent")}}),Ya(function(t){t.markLine=t.markLine||{}}),ED.extend({type:"markArea",defaultOption:{zlevel:0,z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}}});function WD(t,e,n,i){var o=Yp(t,i[0]),a=Yp(t,i[1]),r=V,s=o.coord,l=a.coord;s[0]=r(s[0],-1/0),s[1]=r(s[1],-1/0),l[0]=r(l[0],1/0),l[1]=r(l[1],1/0);var u=h([{},o,a]);return u.coord=[o.coord,a.coord],u.x0=o.x,u.y0=o.y,u.x1=a.x,u.y1=a.y,u}var HD=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]];GD.extend({type:"markArea",updateTransform:function(t,e,o){e.eachSeries(function(n){var i,t=n.markAreaModel;t&&(i=t.getData()).each(function(e){var t=L(HD,function(t){return sg(i,e,t,n,o)});i.setItemLayout(e,t),i.getItemGraphicEl(e).setShape("points",t)})},this)},renderSeries:function(n,r,t,i){var e=n.coordinateSystem,o=n.id,a=n.getData(),s=this.markerGroupMap,l=s.get(o)||s.set(o,{group:new rm});this.group.add(l.group),l.__keep=!0;var u=function(t,n,e){var i,o=t?(i=L(t&&t.dimensions,function(t){var e=n.getData();return O({name:t},e.getDimensionInfo(e.mapDimension(t))||{})}),new gw(L(["x0","y0","x1","y1"],function(t,e){return{name:t,type:i[e%2].type}}),e)):new gw(i=[{name:"value",type:"float"}],e),a=L(e.get("data"),E(WD,n,t,e));t&&(a=I(a,E(rg,t)));var r=t?function(t,e,n,i){return t.coord[Math.floor(i/2)][i%2]}:function(t){return t.value};return o.initData(a,null,r),o.hasItemOption=!0,o}(e,n,r);r.setData(u),u.each(function(e){u.setItemLayout(e,L(HD,function(t){return sg(u,e,t,n,i)})),u.setItemVisual(e,{color:a.getVisual("color")})}),u.diff(l.__data).add(function(t){var e=new yy({shape:{points:u.getItemLayout(t)}});u.setItemGraphicEl(t,e),l.group.add(e)}).update(function(t,e){var n=l.__data.getItemGraphicEl(e);Si(n,{shape:{points:u.getItemLayout(t)}},r,t),l.group.add(n),u.setItemGraphicEl(t,n)}).remove(function(t){var e=l.__data.getItemGraphicEl(t);l.group.remove(e)}).execute(),u.eachItemGraphicEl(function(t,e){var n=u.getItemModel(e),i=n.getModel("label"),o=n.getModel("emphasis.label"),a=u.getItemVisual(e,"color");t.useStyle(O(n.getModel("itemStyle").getItemStyle(),{fill:Vt(a,.4),stroke:a})),t.hoverStyle=n.getModel("emphasis.itemStyle").getItemStyle(),gi(t.style,t.hoverStyle,i,o,{labelFetcher:r,labelDataIndex:e,defaultText:u.getName(e)||"",isRectText:!0,autoColor:a}),di(t,{}),t.dataModel=r}),l.__data=u,l.group.silent=r.get("silent")||n.get("silent")}}),Ya(function(t){t.markArea=t.markArea||{}}),ux.registerSubTypeDefaulter("timeline",function(){return"slider"}),Ka({type:"timelineChange",event:"timelineChanged",update:"prepareAndUpdate"},function(t,e){var n=e.getComponent("timeline");return n&&null!=t.currentIndex&&(n.setCurrentIndex(t.currentIndex),!n.get("loop",!0)&&n.isIndexMax()&&n.setPlayState(!1)),e.resetOption("timeline"),O({currentIndex:n.option.currentIndex},t)}),Ka({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},function(t,e){var n=e.getComponent("timeline");n&&null!=t.playState&&n.setPlayState(t.playState)});var ZD=ux.extend({type:"timeline",layoutMode:"box",defaultOption:{zlevel:0,z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},init:function(t,e,n){this._data,this._names,this.mergeDefaultAndTheme(t,n),this._initData()},mergeOption:function(t){ZD.superApply(this,"mergeOption",arguments),this._initData()},setCurrentIndex:function(t){null==t&&(t=this.option.currentIndex);var e=this._data.count();this.option.loop?t=(t%e+e)%e:(e<=t&&(t=e-1),t<0&&(t=0)),this.option.currentIndex=t},getCurrentIndex:function(){return this.option.currentIndex},isIndexMax:function(){return this.getCurrentIndex()>=this._data.count()-1},setPlayState:function(t){this.option.autoPlay=!!t},getPlayState:function(){return!!this.option.autoPlay},_initData:function(){var o,t=this.option,e=t.data||[],n=t.axisType,a=this._names=[];"category"===n&&(o=[],z(e,function(t,e){var n,i=en(t);B(t)?(n=D(t)).value=e:n=e,o.push(n),A(i)||null!=i&&!isNaN(i)||(i=""),a.push(i+"")}),e=o);var i={category:"ordinal",time:"time"}[n]||"number";(this._data=new gw([{name:"value",type:i}],this)).initData(e,a)},getData:function(){return this._data},getCategories:function(){if("category"===this.get("axisType"))return this._names.slice()}});o(ZD.extend({type:"timeline.slider",defaultOption:{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"emptyCircle",symbolSize:10,lineStyle:{show:!0,width:2,color:"#304654"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#304654"},itemStyle:{color:"#304654",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:13,color:"#c23531",borderWidth:5,borderColor:"rgba(194,53,49, 0.5)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:22,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"path://M18.6,50.8l22.5-22.5c0.2-0.2,0.3-0.4,0.3-0.7c0-0.3-0.1-0.5-0.3-0.7L18.7,4.4c-0.1-0.1-0.2-0.3-0.2-0.5 c0-0.4,0.3-0.8,0.8-0.8c0.2,0,0.5,0.1,0.6,0.3l23.5,23.5l0,0c0.2,0.2,0.3,0.4,0.3,0.7c0,0.3-0.1,0.5-0.3,0.7l-0.1,0.1L19.7,52 c-0.1,0.1-0.3,0.2-0.5,0.2c-0.4,0-0.8-0.3-0.8-0.8C18.4,51.2,18.5,51,18.6,50.8z",prevIcon:"path://M43,52.8L20.4,30.3c-0.2-0.2-0.3-0.4-0.3-0.7c0-0.3,0.1-0.5,0.3-0.7L42.9,6.4c0.1-0.1,0.2-0.3,0.2-0.5 c0-0.4-0.3-0.8-0.8-0.8c-0.2,0-0.5,0.1-0.6,0.3L18.3,28.8l0,0c-0.2,0.2-0.3,0.4-0.3,0.7c0,0.3,0.1,0.5,0.3,0.7l0.1,0.1L41.9,54 c0.1,0.1,0.3,0.2,0.5,0.2c0.4,0,0.8-0.3,0.8-0.8C43.2,53.2,43.1,53,43,52.8z",color:"#304654",borderColor:"#304654",borderWidth:1},emphasis:{label:{show:!0,color:"#c23531"},itemStyle:{color:"#c23531"},controlStyle:{color:"#c23531",borderColor:"#c23531",borderWidth:2}},data:[]}}),Yx);function UD(t,e,n,i){lb.call(this,t,e,n),this.type=i||"value",this.model=null}var XD=s_.extend({type:"timeline"});UD.prototype={constructor:UD,getLabelModel:function(){return this.model.getModel("label")},isHorizontal:function(){return"horizontal"===this.model.get("orient")}},a(UD,lb);var jD=k,YD=z,qD=Math.PI;XD.extend({type:"timeline.slider",init:function(t,e){this.api=e,this._axis,this._viewRect,this._timer,this._currentPointer,this._mainGroup,this._labelGroup},render:function(e,t,n){var i,o,a,r;this.model=e,this.api=n,this.ecModel=t,this.group.removeAll(),e.get("show",!0)&&(i=this._layout(e,n),o=this._createGroup("mainGroup"),a=this._createGroup("labelGroup"),r=this._axis=this._createAxis(i,e),e.formatTooltip=function(t){return Qi(r.scale.getLabel(t))},YD(["AxisLine","AxisTick","Control","CurrentPointer"],function(t){this["_render"+t](i,o,r,e)},this),this._renderAxisLabel(i,a,r,e),this._position(i,e)),this._doPlayStop()},remove:function(){this._clearTimer(),this.group.removeAll()},dispose:function(){this._clearTimer()},_layout:function(t,e){var n,i,o=t.get("label.position"),a=t.get("orient"),r=(i=e,so((n=t).getBoxLayoutParams(),{width:i.getWidth(),height:i.getHeight()},n.get("padding")));null==o||"auto"===o?o="horizontal"===a?r.y+r.height/2i[1]&&(n=i[1]),nd.getHeight()&&(r.textPosition="top",i=!0),o=i?-5-e.height:p+8,n+e.width/2>d.getWidth()?(r.textPosition=["100%",o],r.textAlign="right"):n-e.width/2<0&&(r.textPosition=[0,o],r.textAlign="left"))}))},updateView:function(t,e,n,i){z(this._features,function(t){t.updateView&&t.updateView(t.model,e,n,i)})},remove:function(e,n){z(this._features,function(t){t.remove&&t.remove(e,n)}),this.group.removeAll()},dispose:function(e,n){z(this._features,function(t){t.dispose&&t.dispose(e,n)})}});var $D=y_.toolbox.saveAsImage;dg.defaultOption={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:$D.title,type:"png",name:"",excludeComponents:["toolbox"],pixelRatio:1,lang:$D.lang.slice()},dg.prototype.unusable=!ef.canvasSupported,dg.prototype.onclick=function(t,e){var n=this.model,i=n.get("name")||t.get("title.0.text")||"echarts",o=document.createElement("a"),a=n.get("type",!0)||"png";o.download=i+"."+a,o.target="_blank";var r=e.getConnectedDataURL({type:a,backgroundColor:n.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",excludeComponents:n.get("excludeComponents"),pixelRatio:n.get("pixelRatio")});if(o.href=r,"function"!=typeof MouseEvent||ef.browser.ie||ef.browser.edge)if(window.navigator.msSaveOrOpenBlob){for(var s=atob(r.split(",")[1]),l=s.length,u=new Uint8Array(l);l--;)u[l]=s.charCodeAt(l);var h=new Blob([u]);window.navigator.msSaveOrOpenBlob(h,i+"."+a)}else{var c=n.get("lang"),d='';window.open().document.write(d)}else{var p=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!1});o.dispatchEvent(p)}},xp("saveAsImage",dg);var JD=y_.toolbox.magicType;pg.defaultOption={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",tiled:"M2.3,2.2h22.8V25H2.3V2.2z M35,2.2h22.8V25H35V2.2zM2.3,35h22.8v22.8H2.3V35z M35,35h22.8v22.8H35V35z"},title:D(JD.title),option:{},seriesIndex:{}};var QD=pg.prototype;QD.getIcons=function(){var t=this.model,e=t.get("icon"),n={};return z(t.get("type"),function(t){e[t]&&(n[t]=e[t])}),n};var tC={line:function(t,e,n,i){if("bar"===t)return v({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 v({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){if("line"===t||"bar"===t)return v({id:e,stack:"__ec_magicType_stack__"},i.get("option.stack")||{},!0)},tiled:function(t,e,n,i){if("line"===t||"bar"===t)return v({id:e,stack:""},i.get("option.tiled")||{},!0)}},eC=[["line","bar"],["stack","tiled"]];QD.onclick=function(u,t,h){var c,d=this.model,e=d.get("seriesIndex."+h);tC[h]&&(c={series:[]},z(eC,function(t){0<=M(t,h)&&z(t,function(t){d.setIconStatus(t,"normal")})}),d.setIconStatus(h,"emphasis"),u.eachComponent({mainType:"series",query:null==e?null:{seriesIndex:e}},function(t){var e=t.subType,n=t.id,i=tC[h](e,n,t,d);i&&(O(i,t.option),c.series.push(i));var o=t.coordinateSystem;if(o&&"cartesian2d"===o.type&&("line"===h||"bar"===h)){var a=o.getAxesByScale("ordinal")[0];if(a){var r=a.dim+"Axis",s=u.queryComponents({mainType:r,index:t.get(name+"Index"),id:t.get(name+"Id")})[0].componentIndex;c[r]=c[r]||[];for(var l=0;l<=s;l++)c[r][s]=c[r][s]||{};c[r][s].boundaryGap="bar"===h}}}),t.dispatchAction({type:"changeMagicType",currentType:h,newOption:c}))},Ka({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(t,e){e.mergeOption(t.newOption)}),xp("magicType",pg);var nC=y_.toolbox.dataView,iC=new Array(60).join("-"),oC="\t",aC=new RegExp("["+oC+"]+","g");vg.defaultOption={show:!0,readOnly:!1,optionToContent:null,contentToOption:null,icon:"M17.5,17.3H33 M17.5,17.3H33 M45.4,29.5h-28 M11.5,2v56H51V14.8L38.4,2H11.5z M38.4,2.2v12.7H51 M45.4,41.7h-28",title:D(nC.title),lang:D(nC.lang),backgroundColor:"#fff",textColor:"#000",textareaColor:"#fff",textareaBorderColor:"#333",buttonColor:"#c23531",buttonTextColor:"#fff"},vg.prototype.onclick=function(t,e){function n(){i.removeChild(a),x._dom=null}var i=e.getDom(),o=this.model;this._dom&&i.removeChild(this._dom);var a=document.createElement("div");a.style.cssText="position:absolute;left:5px;top:5px;bottom:5px;right:5px;",a.style.backgroundColor=o.get("backgroundColor")||"#fff";var r=document.createElement("h4"),s=o.get("lang")||[];r.innerHTML=s[0]||o.get("title"),r.style.cssText="margin: 10px 20px;",r.style.color=o.get("textColor");var l=document.createElement("div"),u=document.createElement("textarea");l.style.cssText="display:block;width:100%;overflow:auto;";var h,c=o.get("optionToContent"),d=o.get("contentToOption"),p=gg(t);"function"==typeof c?"string"==typeof(h=c(e.getOption()))?l.innerHTML=h:_(h)&&l.appendChild(h):(l.appendChild(u),u.readOnly=o.get("readOnly"),u.style.cssText="width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;",u.style.color=o.get("textColor"),u.style.borderColor=o.get("textareaBorderColor"),u.style.backgroundColor=o.get("textareaColor"),u.value=p.value);var g=p.meta,f=document.createElement("div");f.style.cssText="position:absolute;bottom:0;left:0;right:0;";var m="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",v=document.createElement("div"),y=document.createElement("div");m+=";background-color:"+o.get("buttonColor"),m+=";color:"+o.get("buttonTextColor");var x=this;lt(v,"click",n),lt(y,"click",function(){var t;try{t="function"==typeof d?d(l,e.getOption()):mg(u.value,g)}catch(t){throw n(),new Error("Data view format error "+t)}t&&e.dispatchAction({type:"changeDataView",newOption:t}),n()}),v.innerHTML=s[1],y.innerHTML=s[2],y.style.cssText=m,v.style.cssText=m,o.get("readOnly")||f.appendChild(y),f.appendChild(v),lt(u,"keydown",function(t){var e,n,i;9===(t.keyCode||t.which)&&(e=this.value,n=this.selectionStart,i=this.selectionEnd,this.value=e.substring(0,n)+oC+e.substring(i),this.selectionStart=this.selectionEnd=n+1,Mf(t))}),a.appendChild(r),a.appendChild(l),a.appendChild(f),l.style.height=i.clientHeight-80+"px",i.appendChild(a),this._dom=a},vg.prototype.remove=function(t,e){this._dom&&e.getDom().removeChild(this._dom)},vg.prototype.dispose=function(t,e){this.remove(t,e)},xp("dataView",vg),Ka({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},function(t,a){var r=[];z(t.newOption.series,function(t){var e,n,i,o=a.getSeriesByName(t.name)[0];o?(e=o.get("data"),r.push({name:t.name,data:(n=t.data,i=e,L(n,function(t,e){var n=i&&i[e];return B(n)&&!N(n)?(B(t)&&!N(t)&&(t=t.value),O({value:t},n)):t}))})):r.push(P({type:"scatter"},t))}),a.mergeOption(O({series:r},t.newOption))});var rC=z,sC="\0_ec_hist_store";$A.extend({type:"dataZoom.select"}),JA.extend({type:"dataZoom.select"});var lC=y_.toolbox.dataZoom,uC=z;xg.defaultOption={show:!0,icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:D(lC.title)};var hC=xg.prototype;hC.render=function(t,e,n,i){this.model=t,this.ecModel=e,this.api=n,function(t,e,n,i,o){var a=n._isZoomActive;i&&"takeGlobalCursor"===i.type&&(a="dataZoomSelect"===i.key&&i.dataZoomSelectActive),n._isZoomActive=a,t.setIconStatus("zoom",a?"emphasis":"normal");var r=new sp(_g(t.option),e,{include:["grid"]});n._brushController.setPanels(r.makePanelOpts(o,function(t){return t.xAxisDeclared&&!t.yAxisDeclared?"lineX":!t.xAxisDeclared&&t.yAxisDeclared?"lineY":"rect"})).enableBrush(!!a&&{brushType:"auto",brushStyle:{lineWidth:0,fill:"rgba(0,0,0,0.2)"}})}(t,e,this,i,n),wg(t,e)},hC.onclick=function(t,e,n){cC[n].call(this)},hC.remove=function(t,e){this._brushController.unmount()},hC.dispose=function(t,e){this._brushController.dispose()};var cC={zoom:function(){var t=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:t})},back:function(){this._dispatchZoomAction(function(t){var i=yg(t),e=i[i.length-1];1')}}catch(t){pC=function(t){return vC.createElement("<"+t+' xmlns="'+gC+'" class="zrvml">')}}var yC=Gv.CMD,xC=Math.round,_C=Math.sqrt,wC=Math.abs,bC=Math.cos,SC=Math.sin,MC=Math.max;if(!ef.canvasSupported){var IC=21600,TC=IC/2,AC=function(t){t.style.cssText="position:absolute;left:0;top:0;width:1px;height:1px;",t.coordsize=IC+","+IC,t.coordorigin="0,0"},DC=function(t,e,n){return"rgb("+[t,e,n].join(",")+")"},CC=function(t,e){e&&t&&e.parentNode!==t&&t.appendChild(e)},LC=function(t,e){e&&t&&e.parentNode===t&&t.removeChild(e)},kC=function(t,e,n){return 1e5*(parseFloat(t)||0)+1e3*(parseFloat(e)||0)+n},PC=function(t,e){return"string"==typeof t?0<=t.lastIndexOf("%")?parseFloat(t)/100*e:parseFloat(t):t},NC=function(t,e,n){var i=Pt(e);n=+n,isNaN(n)&&(n=1),i&&(t.color=DC(i[0],i[1],i[2]),t.opacity=n*i[3])},OC=function(t,e,n){var i,o,a=e.fill;if(null!=a)if(a instanceof py){var r,s,l,u,h,c,d,p,g,f,m=0,v=[0,0],y=0,x=1,_=n.getBoundingRect(),w=_.width,b=_.height;"linear"===a.type?(r="gradient",c=n.transform,h=[a.x*w,a.y*b],s=[a.x2*w,a.y2*b],c&&(Q(h,h,c),Q(s,s,c)),l=s[0]-h[0],u=s[1]-h[1],(m=180*Math.atan2(l,u)/Math.PI)<0&&(m+=360),m<1e-6&&(m=0)):(r="gradientradial",h=[a.x*w,a.y*b],c=n.transform,d=n.scale,p=w,g=b,v=[(h[0]-_.x)/p,(h[1]-_.y)/g],c&&Q(h,h,c),p/=d[0]*IC,g/=d[1]*IC,y=0/(f=MC(p,g)),x=2*a.r/f-y);var S=a.colorStops.slice();S.sort(function(t,e){return t.offset-e.offset});for(var M,I,T,A,D=S.length,C=[],L=[],k=0;k=c&&d<=n+1){for(var i=[],o=0;o=c&&d<=a+1)return function(t){for(var e=0,n=t.length,i=0,o=0;e