/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ (function(T,Ma){"object"===typeof exports&&"undefined"!==typeof module?Ma(exports):"function"===typeof define&&define.amd?define(["exports"],Ma):(T="undefined"!==typeof globalThis?globalThis:T||self,Ma(T.echarts={}))})(this,function(T){var Ma,Nh,Oh;function x(b,a){function c(){this.constructor=b}qk(b,a);b.prototype=null===a?Object.create(a):(c.prototype=a.prototype,new c)}function Pp(){for(var b=0,a=0,c=arguments.length;ag;g++)for(var h=0;8>h;h++)null==f[h]&&(f[h]=0),f[h]+=((g+h)%2?-1:1)*xk(c,7,0===g?1:0,1<l;l++){var m=document.createElement("div"),n=l%2,p=(l>>1)%2;m.style.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",h[n]+":0",k[p]+":0",h[1-n]+":auto",k[1-p]+":auto",""].join("!important;");a.appendChild(m);g.push(m)}a=g;g=e?"invTrans":"trans";h=f[g];k=f.srcCoords;l=[];m=[];n=!0;for(p=0;4>p;p++){var q=a[p].getBoundingClientRect(),t=2*p,u=q.left,q=q.top;l.push(u,q);n=n&&k&&u===k[t]&&q===k[t+1];m.push(a[p].offsetLeft,a[p].offsetTop)}if(e=n&&h?h:(f.srcCoords=l,f[g]=e?Yp(m,l):Yp(l,m)))return e(b,c,d),!0}return!1}function zk(b,a,c,d){c=c||{};d||!X.canvasSupported?Zp(b,a,c):X.browser.firefox&&null!=a.layerX&&a.layerX!==a.offsetX?(c.zrX=a.layerX,c.zrY=a.layerY):null!=a.offsetX?(c.zrX=a.offsetX,c.zrY=a.offsetY):Zp(b,a,c);return c}function Zp(b,a,c){if(X.domSupported&&b.getBoundingClientRect){var d=a.clientX;a=a.clientY;if("CANVAS"===b.nodeName.toUpperCase()){b=b.getBoundingClientRect();c.zrX=d-b.left;c.zrY=a-b.top;return}if(yk(Ak,b,d,a)){c.zrX=Ak[0];c.zrY=Ak[1];return}}c.zrX=c.zrY=0}function Ab(b,a,c){a=a||window.event;if(null!=a.zrX)return a;var d=a.type;d&&0<=d.indexOf("touch")?(d="touchend"!==d?a.targetTouches[0]:a.changedTouches[0])&&zk(b,d,a,c):(zk(b,a,a,c),b=a.wheelDelta,b||(c=a.deltaX,d=a.deltaY,b=null==c||null==d?b:3*(0!==d?Math.abs(d):Math.abs(c))*(0d?1:0a||a>b.getWidth()||0>c||c>b.getHeight()}function nb(){return[1,0,0,1,0,0]}function Sc(b){b[0]=1;b[1]=0;b[2]=0;b[3]=1;b[4]=0;b[5]=0;return b}function Je(b,a){b[0]=a[0];b[1]=a[1];b[2]=a[2];b[3]=a[3];b[4]=a[4];b[5]=a[5];return b}function Fd(b,a,c){var d=a[1]*c[0]+a[3]*c[1],e=a[0]*c[2]+a[2]*c[3],f=a[1]*c[2]+a[3]*c[3],g=a[0]*c[4]+a[2]*c[5]+a[4],h=a[1]*c[4]+a[3]*c[5]+a[5];b[0]=a[0]*c[0]+a[2]*c[1];b[1]=d;b[2]=e;b[3]=f;b[4]=g;b[5]=h;return b}function Rb(b,a,c){b[0]=a[0];b[1]=a[1];b[2]=a[2];b[3]=a[3];b[4]=a[4]+c[0];b[5]=a[5]+c[1];return b}function Tc(b,a,c){var d=a[0],e=a[2],f=a[4],g=a[1],h=a[3];a=a[5];var k=Math.sin(c);c=Math.cos(c);b[0]=d*c+g*k;b[1]=-d*k+g*c;b[2]=e*c+h*k;b[3]=-e*k+c*h;b[4]=c*f+k*a;b[5]=c*a-k*f;return b}function Vh(b,a,c){var d=c[0];c=c[1];b[0]=a[0]*d;b[1]=a[1]*c;b[2]=a[2]*d;b[3]=a[3]*c;b[4]=a[4]*d;b[5]=a[5]*c;return b}function Ke(b,a){var c=a[0],d=a[2],e=a[4],f=a[1],g=a[3],h=a[5],k=c*g-f*d;if(!k)return null;k=1/k;b[0]=g*k;b[1]=-f*k;b[2]=-d*k;b[3]=c*k;b[4]=(d*h-g*e)*k;b[5]=(f*e-c*h)*k;return b}function bq(b){var a=nb();Je(a,b);return a}function Gd(b){return 5E-5b}function Sb(b){b=Math.round(b);return 0>b?0:255b?0:1c?c+=1:16*c?b+(a-b)*c*6:1>2*c?a:2>3*c?b+(a-b)*(2/3-c)*6:b}function Uc(b,a,c){return b+(a-b)*c}function Bb(b,a,c,d,e){b[0]=a;b[1]=c;b[2]=d;b[3]=e;return b}function Fk(b,a){b[0]=a[0];b[1]=a[1];b[2]=a[2];b[3]=a[3];return b}function Me(b,a){Wh&&Fk(Wh,a);Wh=cq.put(b,Wh||a.slice())}function eb(b,a){if(b){a=a||[];var c=cq.get(b);if(c)return Fk(a,c);b+="";c=b.replace(/ /g,"").toLowerCase();if(c in dq)return Fk(a,dq[c]),Me(b,a),a;var d=c.length;if("#"===c.charAt(0)){if(4===d||5===d){var e=parseInt(c.slice(1,4),16);if(!(0<=e&&4095>=e)){Bb(a,0,0,0,1);return}Bb(a,(e&3840)>>4|(e&3840)>>8,e&240|(e&240)>>4,e&15|(e&15)<<4,5===d?parseInt(c.slice(4),16)/15:1);Me(b,a);return a}if(7===d||9===d){e=parseInt(c.slice(1,7),16);if(0<=e&&16777215>=e)return Bb(a,(e&16711680)>>16,(e&65280)>>8,e&255,9===d?parseInt(c.slice(7),16)/255:1),Me(b,a),a;Bb(a,0,0,0,1)}}else{var e=c.indexOf("("),f=c.indexOf(")");if(-1!==e&&f+1===d)switch(d=c.substr(0,e),c=c.substr(e+1,f-(e+1)).split(","),e=1,d){case "rgba":if(4!==c.length)return 3===c.length?Bb(a,+c[0],+c[1],+c[2],1):Bb(a,0,0,0,1);e=Le(c.pop());case "rgb":if(3!==c.length){Bb(a,0,0,0,1);return}Bb(a,Dk(c[0]),Dk(c[1]),Dk(c[2]),e);Me(b,a);return a;case "hsla":if(4!==c.length){Bb(a,0,0,0,1);return}c[3]=Le(c[3]);Gk(c,a);Me(b,a);return a;case "hsl":if(3!==c.length){Bb(a,0,0,0,1);return}Gk(c,a);Me(b,a);return a;default:return}Bb(a,0,0,0,1)}}}function Gk(b,a){var c=(parseFloat(b[0])%360+360)%360/360,d=Le(b[1]),e=Le(b[2]),d=.5>=e?e*(d+1):e+d-e*d,e=2*e-d;a=a||[];Bb(a,Sb(255*Ek(e,d,c+1/3)),Sb(255*Ek(e,d,c)),Sb(255*Ek(e,d,c-1/3)),1);4===b.length&&(a[3]=b[3]);return a}function Hk(b,a){var c=eb(b);if(c){for(var d=0;3>d;d++)c[d]=0>a?c[d]*(1-a)|0:(255-c[d])*a+c[d]|0,255c[d]&&(c[d]=0);return Tb(c,4===c.length?"rgba":"rgb")}}function Ik(b){if(b=eb(b))return(16777216+(b[0]<<16)+(b[1]<<8)+ +b[2]).toString(16).slice(1)}function Tf(b,a,c){if(a&&a.length&&0<=b&&1>=b){c=c||[];var d=b*(a.length-1),e=Math.floor(d);b=a[e];a=a[Math.ceil(d)];d-=e;c[0]=Sb(Uc(b[0],a[0],d));c[1]=Sb(Uc(b[1],a[1],d));c[2]=Sb(Uc(b[2],a[2],d));c[3]=Sf(Uc(b[3],a[3],d));return c}}function eq(b,a,c){if(a&&a.length&&0<=b&&1>=b){b*=a.length-1;var d=Math.floor(b),e=Math.ceil(b),f=eb(a[d]);a=eb(a[e]);var g=b-d,f=Tb([Sb(Uc(f[0],a[0],g)),Sb(Uc(f[1],a[1],g)),Sb(Uc(f[2],a[2],g)),Sf(Uc(f[3],a[3],g))],"rgba");return c?{color:f,leftIndex:d,rightIndex:e,value:b}:f}}function Ne(b,a,c,d){var e=eb(b);if(b){if(e){b=e[0]/255;var f=e[1]/255,g=e[2]/255,h=Math.min(b,f,g),k=Math.max(b,f,g),l=k-h,m=(k+h)/2,n;if(0===l)h=n=0;else{var h=.5>m?l/(k+h):l/(2-k-h),p=((k-b)/6+l/2)/l,q=((k-f)/6+l/2)/l,l=((k-g)/6+l/2)/l;b===k?n=l-q:f===k?n=1/3+p-l:g===k&&(n=2/3+q-p);0>n&&(n+=1);1a?0:360e)b.length=e;else for(;d=g&&(h?k&&k():l&&l())};a=function(){g--;0>=g&&(h?k&&k():l&&l())};g||k&&k();0d(b[e++],b[a])){for(;ed(b[e],b[e-1]);)e++;c=a;d=e;for(d--;c>>1,0>e(f,b[k])?h=k:g=k+1;h=d-g;switch(h){case 3:b[g+3]=b[g+2];case 2:b[g+2]=b[g+1];case 1:b[g+1]=b[g];break;default:for(;0=h&&(h=d);h>d&&(h=d);g+=e;h+=e}else{for(d=e+1;h=f(b,a[c+e-h]);)g=h,h=(h<<1)+1,0>=h&&(h=d);h>d&&(h=d);d=g;g=e-h;h=e-d}for(g++;g>>1),0f(b,a[c+e])){for(d=e+1;hf(b,a[c+e-h]);)g=h,h=(h<<1)+1,0>=h&&(h=d);h>d&&(h=d);d=g;g=e-h;h=e-d}else{for(d-=e;h=h&&(h=d);h>d&&(h=d);g+=e;h+=e}for(g++;g>>1),0>f(b,a[c+e])?h=e:g=e+1;return h}function mA(b,a){function c(c){var k=e[c],m=f[c],n=e[c+1],p=f[c+1];f[c]=m+p;c===g-3&&(e[c+1]=e[c+2],f[c+1]=f[c+2]);g--;c=Ok(b[n],b,k,m,0,a);k+=c;m-=c;if(0!==m&&(p=Nk(b[k+m-1],b,n,p,p-1,a),0!==p))if(m<=p){for(var q=k,k=m,m=p,p=0;pa(b[n],h[c])){if(b[q++]=b[n++],w++,u=0,0===--m){v=!0;break}}else if(b[q++]=h[c++],u++,w=0,1===--k){v=!0;break}while((u|w)=k){v=!0;break}}b[q++]=b[n++];if(0===--m){v=!0;break}w=Nk(h[c],b,n,m,0,a);if(0!==w){for(p=0;pt&&(t=0);t+=2}d=t;1>d&&(d=1);if(1===k){for(p=0;pa(h[t],b[q])){if(b[n--]=b[q--],z++,B=0,0===--m){y=!0;break}}else if(b[n--]=h[t--],B++,z=0,1===--p){y=!0;break}while((z|B)=p){y=!0;break}}b[n--]=b[q--];if(0===--m){y=!0;break}v--}while(7<=z||7<=B);if(y)break;0>v&&(v=0);v+=2}d=v;1>d&&(d=1);if(1===p){n-=m;w=n+1;u=q-m+1;for(c=m-1;0<=c;c--)b[w+c]=b[u+c];b[n]=h[t]}else{if(0===p)throw Error();u=n-(p-1);for(c=0;cf[a+1])break;c(a)}},forceMergeRuns:function(){for(;1e)){var f;if(32>e)f=mq(b,c,d,a),nq(b,c,d,c+f,a);else{var g=mA(b,a),h;f=e;for(h=0;32<=f;)h|=f&1,f>>=1;h=f+h;do{f=mq(b,c,d,a);if(fh&&(k=h);nq(b,c,c+k,c+f,a);f=k}g.pushRun(c,f);g.mergeRuns();e-=f;c+=f}while(0!==e);g.forceMergeRuns()}}}function Qk(){oq||(oq=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function pq(b,a){return b.zlevel===a.zlevel?b.z===a.z?b.z2-a.z2:b.z-a.z:b.zlevel-a.zlevel}function Rk(b){b=b.pointerType;return"pen"===b||"touch"===b}function nA(b){b.touching=!0;null!=b.touchTimer&&(clearTimeout(b.touchTimer),b.touchTimer=null);b.touchTimer=setTimeout(function(){b.touching=!1;b.touchTimer=null},700)}function qq(b,a){for(var c=a,d=!1;c&&9!==c.nodeType&&!(d=c.domBelongToZr||c!==a&&c===b.painterRoot);)c=c.parentNode;return d}function oA(b,a){var c=a.domHandlers;X.pointerEventsSupported?r(Sk.pointer,function(d){$h(a,d,function(a){c[d].call(b,a)})}):(X.touchEventsSupported&&r(Sk.touch,function(d){$h(a,d,function(e){c[d].call(b,e);nA(a)})}),r(Sk.mouse,function(d){$h(a,d,function(e){e=e||window.event;a.touching||c[d].call(b,e)})}))}function pA(b,a){function c(c){$h(a,c,function(d){d=d||window.event;qq(b,d.target)||(d=Ab(b.dom,new qA(b,d),!0),a.domHandlers[c].call(b,d))},{capture:!0})}X.pointerEventsSupported?r(rq.pointer,c):X.touchEventsSupported||r(rq.mouse,c)}function $h(b,a,c,d){b.mounted[a]=c;b.listenerOpts[a]=d;Bk(b.domTarget,a,c,d)}function Tk(b){var a=b.mounted,c;for(c in a)if(a.hasOwnProperty(c)){var d=b.domTarget,e=c,f=a[c];Ck?d.removeEventListener(e,f,b.listenerOpts[c]):d.detachEvent("on"+e,f)}b.mounted={}}function rA(b){if(!b)return!1;if("string"===typeof b)return.4>Vf(b,1);if(b.colorStops){b=b.colorStops;for(var a=0,c=b.length,d=0;da/c}return!1}function Uk(b,a){var c=new sA(Vk++,b,a);return Hd[c.id]=c}function ga(b,a,c,d){var e=a[1]-a[0],f=c[1]-c[0];if(0===e)return 0===f?c[0]:(c[0]+c[1])/2;if(d)if(0=a[1])return c[1]}else{if(b>=a[0])return c[0];if(b<=a[1])return c[1]}else{if(b===a[0])return c[0];if(b===a[1])return c[1]}return(b-a[0])/e*f+c[0]}function H(b,a){switch(b){case "center":case "middle":b="50%";break;case "left":case "top":b="0%";break;case "right":case "bottom":b="100%"}return"string"===typeof b?b.replace(/^\s+|\s+$/g,"").match(/%$/)?parseFloat(b)/100*a:parseFloat(b):null==b?NaN:+b}function sa(b,a,c){null==a&&(a=10);a=Math.min(Math.max(0,a),20);b=(+b).toFixed(a);return c?b:+b}function Cb(b){b.sort(function(a,c){return a-c});return b}function sq(b){b=+b;if(isNaN(b))return 0;for(var a=1,c=0;Math.round(b*a)/a!==b;)a*=10,c++;return c}function Db(b){b=b.toString();var a=b.indexOf("e");if(0b?-b:0;a=b.indexOf(".");return 0>a?0:b.length-1-a}function Wk(b,a){var c=Math.log,d=Math.LN10,e=Math.floor(c(b[1]-b[0])/d),c=Math.round(c(Math.abs(a[1]-a[0]))/d),e=Math.min(Math.max(-e+c,0),20);return isFinite(e)?e:20}function tq(b,a,c){if(!b[a])return 0;var d=Ed(b,function(c,a){return c+(isNaN(a)?0:a)},0);if(0===d)return 0;var e=Math.pow(10,c),f=C(b,function(c){return(isNaN(c)?0:c)/d*e*100});b=100*e;var g=C(f,function(c){return Math.floor(c)});c=Ed(g,function(c,a){return c+a},0);for(f=C(f,function(c,a){return c-g[a]});ch&&(h=f[l],k=l);++g[k];f[k]=0;++c}return g[a]/e}function Xk(b){var a=2*Math.PI;return(b%a+a)%a}function ag(b){return-1E-4b}function qb(b){if(b instanceof Date)return b;if("string"===typeof b){b=tA.exec(b);if(!b)return new Date(NaN);if(b[8]){var a=+b[4]||0;"Z"!==b[8].toUpperCase()&&(a-=+b[8].slice(0,3));return new Date(Date.UTC(+b[1],+(b[2]||1)-1,+b[3]||1,a,+(b[5]||0),+b[6]||0,+b[7]||0))}return new Date(+b[1],+(b[2]||1)-1,+b[3]||1,+b[4]||0,+(b[5]||0),+b[6]||0,+b[7]||0)}return null==b?new Date(NaN):new Date(Math.round(b))}function uq(b){return Math.pow(10,Yk(b))}function Yk(b){if(0===b)return 0;var a=Math.floor(Math.log(b)/Math.LN10);10<=b/Math.pow(10,a)&&a++;return a}function Zk(b,a){var c=Yk(b),d=Math.pow(10,c),e=b/d;b=(a?1.5>e?1:2.5>e?2:4>e?3:7>e?5:10:1>e?1:2>e?2:3>e?3:5>e?5:10)*d;return-20<=c?+b.toFixed(0>c?-c:0):b}function ai(b,a){var c=(b.length-1)*a+1,d=Math.floor(c),e=+b[d-1];return(c-=d)?e+c*(b[d]-e):e}function $k(b){function a(c,d,b){return c.interval[b]h;h++)f[h]<=c&&(f[h]=c,g[h]=h?1:1-d),c=f[h],d=g[h];f[0]===f[1]&&1!==g[0]*g[1]?b.splice(e,1):e++}return b}function jc(b){var a=parseFloat(b);return a==b&&(0!==a||"string"!==typeof b||0>=b.indexOf("x"))?a:NaN}function bi(b){return!isNaN(jc(b))}function vq(b,a){return 0===a?b:vq(a,b%a)}function wq(b,a){return null==b?a:null==a?b:b*a/vq(b,a)}function Pe(b){ci&&console.warn("[ECharts] "+b)}function Vb(b){!xq[b]&&ci&&(xq[b]=!0,console.warn("[ECharts] DEPRECATED: "+b))}function Sa(b,a,c){Vb((c?"["+c+"]":"")+(b+" is deprecated, use "+a+" instead."))}function uA(){for(var b=[],a=0;aba(c.includeMainTypes,h)||(g=g||!!h,(e.get(h)||e.set(h,{}))[b]=a)}});var h=c?c.defaultMainType:null;!g&&h&&e.set(h,{});e.each(function(a,d){var e=di(b,d,a,{useDefault:h===d,enableAll:c&&null!=c.enableAll?c.enableAll:!0,enableNone:c&&null!=c.enableNone?c.enableNone:!0});f[d+"Models"]=e.models;f[d+"Model"]=e.models[0]});return f}function di(b,a,c,d){d=d||Da;var e=c.index,f=c.id,g=c.name;c={models:null,specified:null!=e||null!=f||null!=g};if(!c.specified)return e=void 0,c.models=d.useDefault&&(e=b.getComponent(a))?[e]:[],c;if("none"===e||!1===e)return O(d.enableNone,'`"none"` or `false` is not a valid value on index option.'),c.models=[],c;"all"===e&&(O(d.enableAll,'`"all"` is not a valid value on index option.'),e=f=g=null);c.models=b.queryComponents({mainType:a,index:e,id:f,name:g});return c}function Cq(b,a,c){b.setAttribute?b.setAttribute(a,c):b[a]=c}function bl(b,a){var c=R(),d=[];r(b,function(b){var e=a(b);(c.get(e)||(d.push(e),c.set(e,[]))).push(b)});return{keys:d,buckets:c}}function Dq(b,a,c,d,e){var f=null==a||"auto"===a;if(null==d)return d;if("number"===typeof d){var g=Xh(c||0,d,e);return sa(g,f?Math.max(Db(c||0),Db(d)):a)}if("string"===typeof d)return 1>e?c:d;for(var h=[],k=Math.max(c?c.length:0,d.length),l=0;le&&c?c:d)[l];else{var m=c&&c[l]?c[l]:0,n=d[l],g=(n-m)*e+m;h[l]=sa(g,f?Math.max(Db(m),Db(n)):a)}return h}function kc(b){var a={main:"",sub:""};b&&(b=b.split("."),a.main=b[0]||"",a.sub=b[1]||"");return a}function cl(b,a){b.$constructor=b;b.extend=function(c){function d(){for(var a=[],e=0;eba(f,k)||(k=c.getShallow(k,a),null!=k&&(d[b[h][0]]=k))}return d}}function dl(b,a,c,d,e){if(b){if("string"===typeof b){if(a&&a.__zrImageSrc===b||!c)return a;var f=el.get(b);c={hostEl:c,cb:d,cbPayload:e};f?(a=f.image)&&a.width&&a.height||f.pending.push(c):(a=new Image,a.onload=a.onerror=GA,el.put(b,a.__cachedImgObj={image:a,pending:[c]}),a.src=a.__zrImageSrc=b);return a}return b}return a}function GA(){var b=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var a=0;a=g;h++)d-=g;a=Ya(c,a);a>d&&(c="",a=0);e.ellipsis=c;e.ellipsisWidth=a;e.contentWidth=b-a;e.containerWidth=b;return e}function Gq(b,a){var c=a.containerWidth,d=a.font,e=a.contentWidth;if(!c)return"";var f=Ya(b,d);if(f<=c)return b;for(c=0;;c++){if(f<=e||c>=a.maxIterations){b+=a.ellipsis;break}if(0===c){for(var f=b,g=e,h=a.ascCharWidth,k=a.cnCharWidth,l=0,m=0,n=f.length;m=p?h:k);f=m}else f=0d.width&&(k=a.split("\n"),h=!0);d.accumWidth=m}else k=Hq(a,c,d.width,d.breakAll,d.accumWidth),d.accumWidth=k.accumWidth+m,l=k.linesWidths,k=k.lines}else k=a.split("\n");for(d=0;d=u?IA[t]?!0:!1:!0;t=!t}if(f.length?m+q>c:e+m+q>c)if(!m)t?(f.push(k),g.push(l),k=p,l=q):(f.push(p),g.push(q));else{if(h||k)t?(h||(h=k,k="",m=l=0),f.push(h),g.push(m-l),k+=p,l+=q,h="",m=l):(k&&(h+=k,m+=l,k="",l=0),f.push(h),g.push(m),h=p,m=q)}else m+=q,t?(k+=p,l+=q):(k&&(h+=k,k="",l=0),h+=p)}}f.length||h||(h=b,k="");k&&(h+=k);h&&(f.push(h),g.push(m));1===f.length&&(m+=e);return{accumWidth:m,lines:f,linesWidths:g}}function Oa(b,a,c,d,e){var f=1-e;return f*f*(f*b+3*e*a)+e*e*(e*d+3*f*c)}function Jq(b,a,c,d,e){var f=1-e;return 3*(((a-b)*f+2*(c-a)*e)*f+(d-c)*e*e)}function gl(b,a,c,d,e,f){d=d+3*(a-c)-b;c=3*(c-2*a+b);var g=3*(a-b),h=b-e;e=c*c-3*d*g;a=c*g-9*d*h;b=0;if(-1E-8e&&-1E-8a)-1E-8c?f[0]=0:(e=-g/c,0<=e&&1>=e&&(f[b++]=e));else if(g=a*a-4*e*(g*g-3*c*h),-1E-8g)a/=e,e=-c/d+a,a=-a/2,0<=e&&1>=e&&(f[b++]=e),0<=a&&1>=a&&(f[b++]=a);else if(0g?-fi(-g,gi):fi(g,gi),e=0>e?-fi(-e,gi):fi(e,gi),e=(-c-(g+e))/(3*d),0<=e&&1>=e&&(f[b++]=e);else{a=(2*e*c-3*d*a)/(2*Wc(e*e*e));var g=Math.acos(a)/3,h=Wc(e),k=Math.cos(g);e=(-c-2*h*k)/(3*d);a=(-c+h*(k+Kq*Math.sin(g)))/(3*d);d=(-c+h*(k-Kq*Math.sin(g)))/(3*d);0<=e&&1>=e&&(f[b++]=e);0<=a&&1>=a&&(f[b++]=a);0<=d&&1>=d&&(f[b++]=d)}return b}function Lq(b,a,c,d,e){var f=6*c-12*a+6*b;c=9*a+3*d-3*b-9*c;a=3*a-3*b;b=0;if(-1E-8c){if(1E-8f)a=-a/f,0<=a&&1>=a&&(e[b++]=a)}else a=f*f-4*c*a,-1E-8a?e[0]=-f/(2*c):0=a&&(e[b++]=a),0<=f&&1>=f&&(e[b++]=f));return b}function Re(b,a,c,d,e,f){var g=(a-b)*e+b,h=(c-a)*e+a;c=(d-c)*e+c;a=(h-g)*e+g;h=(c-h)*e+h;e=(h-a)*e+a;f[0]=b;f[1]=g;f[2]=a;f[3]=e;f[4]=e;f[5]=h;f[6]=c;f[7]=d}function Mq(b,a,c,d,e,f,g,h,k,l,m){var n,p=.005,q=Infinity,t;lc[0]=k;lc[1]=l;for(k=0;1>k;k+=.05)Eb[0]=Oa(b,c,e,g,k),Eb[1]=Oa(a,d,f,h,k),l=Xc(lc,Eb),lu&&!(1E-4>p);u++)t=n-p,k=n+p,Eb[0]=Oa(b,c,e,g,t),Eb[1]=Oa(a,d,f,h,t),l=Xc(Eb,lc),0<=t&&l=k&&lh;h+=.05)Eb[0]=Za(b,c,e,h),Eb[1]=Za(a,d,f,h),g=Xc(lc,Eb),gh&&!(1E-4>m);h++){var p=l-m,q=l+m;Eb[0]=Za(b,c,e,p);Eb[1]=Za(a,d,f,p);g=Xc(Eb,lc);0<=p&&g=q&&gc&&(c+=Zc);var d=b[1],d=d+(c-b[0]);!a&&d-c>=Zc?d=c+Zc:a&&c-d>=Zc?d=c-Zc:!a&&c>d?d=c+(Zc-Math.round((c-d)/Ld*1E8)/1E8%2*Ld):a&&ca+e&&g>d+e||gb+e&&f>c+e||fa+g&&k>d+g&&k>f+g||kb+g&&h>c+g&&h>e+g||hb&&(b+=Rq);return b}function Cc(b,a,c,d,e,f){if(f>a&&f>d||fe?f:0}function Sq(b,a,c,d,e){for(var f=b.data,g=b.len(),h=0,k=0,l=0,m=0,n=0,p,q,t=0;tl+E&&e>B+E&&e>L+E&&e>r+E||ek+E&&d>z+E&&d>y+E&&d>D+E||dA&&e>C&&e>I&&e>J||eN){N=Lq(A,C,I,J,Fb);if(Fb[1]V&&e>Y&&e>Z||eja){if(1E-8fa){var ia=-la/fa;0<=ia&&1>=ia&&(ea[ka++]=ia)}}else{var ma=fa*fa-4*ja*la;if(-1E-8ma)ia=-fa/(2*ja),0<=ia&&1>=ia&&(ea[ka++]=ia);else if(0=ia&&(ea[ka++]=ia);0<=ra&&1>=ra&&(ea[ka++]=ra)}}ha=ka;if(0===ha)W=0;else{var pa=Nq(V,Y,Z);if(0<=pa&&1>=pa){for(var sa=0,va=Za(V,Y,Z,pa),qa=0;qaua||Qa+PaMath.abs(Aa-ya)%dg)Da=!0;else{if(Ja)var Sa=Aa,Aa=ad(ya),ya=ad(Sa);else Aa=ad(Aa),ya=ad(ya);Aa>ya&&(ya+=dg);var Ha=Math.atan2(Ga,Ea);0>Ha&&(Ha+=dg);Da=Ha>=Aa&&Ha<=ya||Ha+dg>=Aa&&Ha+dg<=ya}}if(Da)return!0}else{var Ua=h,La;var Ra=ta,Fa=wa,Ma=wa+Ca,Xa=Ja,Va=Ka,Na=e,Na=Na-za;if(Na>ua||Na<-ua)La=0;else{var Ya=Math.sqrt(ua*ua-Na*Na);hb[0]=-Ya;hb[1]=Ya;var $a=Math.abs(Fa-Ma);if(1E-4>$a)La=0;else if($a>=Te-1E-4){var Ta;La=Va>=hb[0]+Ra&&Va<=hb[1]+Ra?Xa?1:-1:0}else{if(Fa>Ma)var cb=Fa,Fa=Ma,Ma=cb;0>Fa&&(Fa+=Te,Ma+=Te);for(var ab=0,Wa=0;2>Wa;Wa++){var bb=hb[Wa];if(bb+Ra>Va){var Ia=Math.atan2(Na,bb);Ta=Xa?1:-1;0>Ia&&(Ia=Te+Ia);if(Ia>=Fa&&Ia<=Ma||Ia+Te>=Fa&&Ia+Te<=Ma)Ia>Math.PI/2&&Ia<1.5*Math.PI&&(Ta=-Ta),ab+=Ta}}La=ab}}h=Ua+La}k=Math.cos(wa+Ca)*Ba+ta;l=Math.sin(wa+Ca)*ua+za;break;case bd.R:var m=k=f[t++],n=l=f[t++],db=f[t++],eb=f[t++];p=m+db;q=n+eb;if(c){if($c(m,n,p,n,a,d,e)||$c(p,n,p,q,a,d,e)||$c(p,q,m,q,a,d,e)||$c(m,q,m,n,a,d,e))return!0}else h+=Cc(p,n,p,q,d,e),h+=Cc(m,q,m,n,d,e);break;case bd.Z:if(c){if($c(k,l,m,n,a,d,e))return!0}else h+=Cc(k,l,m,n,d,e);k=m;l=n}}c||1E-4>Math.abs(l-n)||(h+=Cc(k,l,m,n,d,e)||0);return 0!==h}function Tq(b,a,c){if(a){var d=a.x1,e=a.x2,f=a.y1;a=a.y2;b.x1=d;b.x2=e;b.y1=f;b.y2=a;c=c&&c.lineWidth;if(!c)return b;Ue(2*d)===Ue(2*e)&&(b.x1=b.x2=Md(d,c,!0));Ue(2*f)===Ue(2*a)&&(b.y1=b.y2=Md(f,c,!0));return b}}function Uq(b,a,c){if(a){var d=a.x,e=a.y,f=a.width;a=a.height;b.x=d;b.y=e;b.width=f;b.height=a;c=c&&c.lineWidth;if(!c)return b;b.x=Md(d,c,!0);b.y=Md(e,c,!0);b.width=Math.max(Md(d+f,c,!1)-b.x,0===f?0:1);b.height=Math.max(Md(e+a,c,!1)-b.y,0===a?0:1);return b}}function Md(b,a,c){if(!a)return b;b=Ue(2*b);return 0===(b+Ue(a))%2?b/2:(b+(c?1:-1))/2}function Vq(b){if(b){b.font=ha.makeFont(b);var a=b.align;"middle"===a&&(a="center");b.align=null==a||JA[a]?a:"left";a=b.verticalAlign;"center"===a&&(a="middle");b.verticalAlign=null==a||KA[a]?a:"top";b.padding&&(b.padding=Sh(b.padding))}}function il(b,a){return null==b||0>=a||"transparent"===b||"none"===b?null:b.image||b.colorStops?"#000":b}function Wq(b,a,c){return"right"===a?b-c[1]:"center"===a?b+c[3]/2-c[1]/2:b+c[3]}function Xq(b){b=b.text;null!=b&&(b+="");return b}function jl(b){return!!(b.backgroundColor||b.borderWidth&&b.borderColor)}function Ve(b){return null!=b&&"none"!==b}function Yq(b){if("string"!==typeof b)return b;var a=Zq.get(b);a||(a=Hk(b,-.1),Zq.put(b,a));return a}function ii(b,a,c){if(b.onHoverStateChange&&(b.hoverState||0)!==c)b.onHoverStateChange(a);b.hoverState=c}function $q(b){ii(b,"emphasis",2)}function ar(b){2===b.hoverState&&ii(b,"normal",0)}function kl(b){ii(b,"blur",1)}function ll(b){1===b.hoverState&&ii(b,"normal",0)}function br(b){b.selected=!0}function cr(b){b.selected=!1}function rb(b,a,c){a(b,c);b.isGroup&&b.traverse(function(d){a(d,c)})}function ml(b,a){switch(a){case "emphasis":b.hoverState=2;break;case "normal":b.hoverState=0;break;case "blur":b.hoverState=1;break;case "select":b.selected=!0}}function nl(b,a){var c=this.states[b];if(this.style){if("emphasis"===b){var d=a&&0<=ba(a,"select"),e=!1;if(this instanceof Y){var f=dr(this),g=d?f.selectFill||f.normalFill:f.normalFill,d=d?f.selectStroke||f.normalStroke:f.normalStroke;if(Ve(g)||Ve(d))c=c||{},f=c.style||{},!Ve(f.fill)&&Ve(g)?(e=!0,c=F({},c),f=F({},f),f.fill=Yq(g)):!Ve(f.stroke)&&Ve(d)&&(e||(c=F({},c),f=F({},f)),f.stroke=Yq(d)),c.style=f}c&&null==c.z2&&(e||(c=F({},c)),e=this.z2EmphasisLift,c.z2=this.z2+(null!=e?e:10));return c}if("blur"===b){e=0<=ba(this.currentStates,b);g=this.style.opacity;if(e)d=null;else{for(var d=["opacity"],h={opacity:1},k=this.style,f={},l=0;lh.__fromStateTransition.indexOf(b)&&"style"===h.targetName&&h.saveFinalToTarget(f,d);d=f}c=c||{};f=c.style||{};null==f.opacity&&(c=F({},c),f=F({opacity:e?g:.1*d.opacity},f),c.style=f);return c}"select"===b&&c&&null==c.z2&&(c=F({},c),e=this.z2SelectLift,c.z2=this.z2+(null!=e?e:9))}return c}function eg(b){b.stateProxy=nl;var a=b.getTextContent();b=b.getTextGuideLine();a&&(a.stateProxy=nl);b&&(b.stateProxy=nl)}function nc(b,a){b.__highByOuter|=1<<(a||0);rb(b,$q)}function oc(b,a){!(b.__highByOuter&=~(1<<(a||0)))&&rb(b,ar)}function LA(b){b.getModel().eachComponent(function(a,c){("series"===a?b.getViewOfSeriesModel(c):b.getViewOfComponentModel(c)).group.traverse(function(c){ll(c)})})}function ji(b,a,c,d,e){function f(c,a){for(var d=0;d=hr&&(a=gr[b]=hr++);return a}function pl(b){b=b.type;return"select"===b||"unselect"===b||"toggleSelect"===b}function ql(b){b=b.type;return"highlight"===b||"downplay"===b}function rl(b,a){return(b[0]*a[0]+b[1]*a[1])/(Math.sqrt(b[0]*b[0]+b[1]*b[1])*Math.sqrt(a[0]*a[0]+a[1]*a[1]))}function ir(b,a){return(b[0]*a[1]=rl(c,n)&&(p=fg);1<=rl(c,n)&&(p=0);0>p&&(p=2*fg+Math.round(p/fg*1E6)/1E6%2*fg);m.addData(l,b,a,g,h,d,p,k,f)}function PA(b){var a=new pc;if(!b)return a;var c=0,d=0,e=c,f=d,g,h=pc.CMD;b=b.match(QA);if(!b)return a;for(var k=0;kb?-1:1)*gg(ul(0,f*f*g-p*p)),l=(p*b-a*q)/g,m=(-p*a-b*q)/g,n=(p*b+a*q)/g;a=(-p*a+b*q)/g;b=l-c;g=m-d;c=n-c;d=a-d;b*b+g*g>c*c+d*d&&(l=n,m=a);return{cx:l,cy:m,x01:-k,y01:-h,x11:l*(e/f-1),y11:m*(e/f-1)}}function lr(b,a,c,d,e,f,g){b=.5*(c-b);d=.5*(d-a);return(2*(a-c)+b+d)*g+(-3*(a-c)-2*b-d)*f+b*e+a}function mr(b,a,c){var d=a.smooth,e=a.points;if(e&&2<=e.length){if(d&&"spline"!==d){var f=e,g=a.smoothConstraint;a=[];var h=[],k=[],l=[],m,n,p,q;if(g){p=[Infinity,Infinity];q=[-Infinity,-Infinity];for(var t=0,u=f.length;ta-2?a-1:l+1],l=e[l>a-3?a-1:l+2]),t=q*q,u=q*t,d.push([lr(g[0],h[0],k[0],l[0],q,t,u),lr(g[1],h[1],k[1],l[1],q,t,u)]);e=d}b.moveTo(e[0][0],e[0][1]);d=1;for(a=e.length;dMath.abs(b[1])?0=c&&f>=e)return{x:c,y:e,width:d-c,height:f-e}}function Ze(b,a,c){a=F({rectHover:!0},a);var d=a.style={strokeNoScale:!0};c=c||{x:-1,y:-1,width:2,height:2};if(b)return 0===b.indexOf("image://")?(d.image=b.slice(8),K(d,c),new Ga(a)):hg(b.replace("path://",""),a,c,"center")}function kg(b,a,c,d,e){for(var f=0,g=e[e.length-1];f=k&&-1E-6<=k)return!1;b-=e;a-=f;f=(b*d-c*a)/k;if(0>f||1a||1d||k.newline?(f=0,p=n,g+=h+c,h=m.height):h=Math.max(h,m.height)):(n=m.height+(n?-n.y+m.y:0),q=g+n,q>e||k.newline?(f+=h+c,g=0,q=n,h=m.width):h=Math.max(h,m.width));k.newline||(k.x=f,k.y=g,k.markRedraw(),"horizontal"===b?f=p+c:g=q+c)})}function Aa(b,a,c){c=Od(c||0);var d=a.width;a=a.height;var e=H(b.left,d),f=H(b.top,a),g=H(b.right,d),h=H(b.bottom,a),k=H(b.width,d),l=H(b.height,a),m=c[2]+c[0],n=c[1]+c[3],p=b.aspect;isNaN(k)&&(k=d-g-n-e);isNaN(l)&&(l=a-h-m-f);null!=p&&(isNaN(k)&&isNaN(l)&&(p>d/a?k=.8*d:l=.8*a),isNaN(k)&&(k=p*l),isNaN(l)&&(l=k/p));isNaN(e)&&(e=d-g-k-n);isNaN(f)&&(f=a-h-l-m);switch(b.left||b.right){case "center":e=d/2-k/2-c[3];break;case "right":e=d-k-n}switch(b.top||b.bottom){case "middle":case "center":f=a/2-l/2-c[0];break;case "bottom":f=a-l-m}e=e||0;f=f||0;isNaN(k)&&(k=d-n-e-(g||0));isNaN(l)&&(l=a-m-f-(h||0));b=new aa(e+c[3],f+c[0],k,l);b.margin=c;return b}function Bi(b,a,c,d,e){var f=!e||!e.hv||e.hv[0],g=!e||!e.hv||e.hv[1];e=e&&e.boundingMode||"all";if(f||g){var h;if("raw"===e)h="group"===b.type?new aa(0,0,+a.width||0,+a.height||0):b.getBoundingRect();else if(h=b.getBoundingRect(),b.needLocalTransform()){var k=b.getLocalTransform();h=h.clone();h.applyTransform(k)}a=Aa(K({width:h.width,height:h.height},a),c,d);f=f?a.x-h.x:0;g=g?a.y-h.y:0;"raw"===e?(b.x=f,b.y=g):(b.x+=f,b.y+=g);b.markRedraw()}}function pg(b){b=b.layoutMode||b.constructor.layoutMode;return N(b)?b:b?{type:b}:null}function gd(b,a,c){function d(c,d){var f={},h=0,k={},l=0;Ci(c,function(c){k[c]=b[c]});Ci(c,function(c){a.hasOwnProperty(c)&&(f[c]=k[c]=a[c]);e(f,c)&&h++;e(k,c)&&l++});if(g[d])return e(a,c[1])?k[c[2]]=null:e(a,c[2])&&(k[c[1]]=null),k;if(2!==l&&h){if(!(2<=h))for(var t=0;ta;a++){if(null!=(h=g(b[e+a])))return h}else for(a=0;aa;a++){if((k=b[e+a])&&null!=(h=g(k[f])))return h}else if("objectRows"===a){if(!k)return ib.Not;for(a=0;aa;a++)if((e=b[a])&&null!=(h=g(e[k])))return h}else if("keyedColumns"===a){if(!k)return ib.Not;b=b[k];if(!b||db(b))return ib.Not;for(a=0;aa;a++)if(null!=(h=g(b[a])))return h}else if("original"===a)for(a=0;aa;a++){e=b[a];h=bg(e);if(!A(h))break;if(null!=(h=g(h[f])))return h}return ib.Not}function bB(b,a,c){a=Jl.get(a);if(!a)return c;b=a(b);if(!b)return c;for(a=0;ag){d=d[k];break a}d=d[h-1]}else d=c;if((c=d||c)&&c.length)return d=c[a],e&&(f[e]=d),b.paletteIdx=(a+1)%c.length,d}function dB(b,a){var c=b.color&&!b.colorLayer;r(a,function(a,e){"colorLayer"===e&&c||W.hasClass(e)||("object"===typeof a?b[e]=b[e]?U(b[e],a,!1):J(a):null==b[e]&&(b[e]=a))})}function Or(b,a,c){if(A(a)){var d=R();r(a,function(c){null!=c&&null!=Ea(c,null)&&d.set(c,!0)});return ta(c,function(c){return c&&d.get(c[b])})}var e=Ea(a,null);return ta(c,function(c){return c&&null!=e&&c[b]===e})}function Pr(b,a){return a.hasOwnProperty("subType")?ta(b,function(c){return c&&c.subType===a.subType}):b}function Qr(b){var a=R();b&&r(xa(b.replaceMerge),function(c){O(W.hasClass(c),'"'+c+'" is not valid component main type in "replaceMerge"');a.set(c,!0)});return{replaceMergeMainTypeMap:a}}function eB(b,a,c){function d(d){r(a,function(a){a(d,c)})}var e=[],f,g=b.baseOption,h=b.timeline,k=b.options,l=b.media,m=!!b.media,n=!!(k||h||g&&g.timeline);if(g)b=g,b.timeline||(b.timeline=h);else if(n||m)b.options=b.media=null;m&&(A(l)?r(l,function(c){c&&!c.option&&N(c.query)&&N(c.query.option)&&ci&&console.error("[ECharts] Illegal media option. Must be like { media: [ { query: {}, option: {} } ] }");c&&c.option&&(c.query?e.push(c):f||(f=c))}):ci&&console.error("[ECharts] Illegal media option. Must be an array. Like { media: [ {...}, {...} ] }"));d(b);r(k,function(c){return d(c)});r(e,function(c){return d(c.option)});return{baseOption:b,timelineOptions:k||[],mediaDefault:f,mediaList:e}}function fB(b,a,c){var d={width:a,height:c,aspectratio:a/c},e=!0;r(b,function(c,a){var b=a.match(gB);if(b&&b[1]&&b[2]){var f=b[1],b=b[2].toLowerCase();b=d[b];("min"===f?b>=c:"max"===f?b<=c:b===c)||(e=!1)}});return e}function hB(b,a){return b.join(",")===a.join(",")}function Ll(b){var a=b&&b.itemStyle;if(a)for(var c=0,d=Rr.length;c=h&&0>q)){h+=q;m=q;break}}d[0]=h;d[1]=m;return d});f.hostModel.setData(h);a.data=h})}function Nl(b,a,c,d){c=c||Zr(b);var e=a.seriesLayoutBy,f=nB(b,c,e,a.sourceHeader,a.dimensions);return new Rd({data:b,sourceFormat:c,seriesLayoutBy:e,dimensionsDefine:f.dimensionsDefine,startIndex:f.startIndex,dimensionsDetectedCount:f.dimensionsDetectedCount,encodeDefine:d?R(d):null,metaRawOption:J(a)})}function Ol(b){return new Rd({data:b,sourceFormat:db(b)?"typedArray":"original"})}function oB(b){var a=b.data,c=b.sourceFormat,d=b.seriesLayoutBy,e=J(b.dimensionsDefine),f=b.startIndex,g=b.dimensionsDetectedCount;b=(b=b.encodeDefine)?R(b):null;return new Rd({data:a,sourceFormat:c,seriesLayoutBy:d,dimensionsDefine:e,startIndex:f,dimensionsDetectedCount:g,encodeDefine:b})}function Zr(b){var a="unknown";if(db(b))a="typedArray";else if(A(b)){0===b.length&&(a="arrayRows");for(var c=0,d=b.length;ca.outputData.count()&&a.model.getRawData().cloneShallow(a.outputData)}function ps(b,a){r(Pp(b.CHANGABLE_METHODS,b.DOWNSAMPLE_METHODS),function(c){b.wrapMethod(c,P(LB,a))})}function LB(b,a){var c=Rl(b);c&&c.setOutputEnd((a||this).count());return a}function Rl(b){var a=(b.ecModel||{}).scheduler;if(a=a&&a.getPipeline(b.uid)){if(a=a.currentTask){var c=a.agentStubMap;c&&(a=c.get(b.uid))}return a}}function cf(){var b=ma();return function(a){var c=b(a),d=a.pipelineContext;a=!!c.large;var e=!!c.progressiveRender,f=c.large=!(!d||!d.large),c=c.progressiveRender=!(!d||!d.progressiveRender);return!(a===f&&e===c)&&"reset"}}function qs(b,a,c){var d=Jd(b,a),e=a&&null!=a.highlightKey?OA(a.highlightKey):null;null!=d?r(xa(d),function(a){(a=b.getItemGraphicEl(a))&&("emphasis"===c?nc:oc)(a,e)}):b.eachItemGraphicEl(function(a){a&&("emphasis"===c?nc:oc)(a,e)})}function MB(b){return NB(b.model)}function OB(b){var a=b.model,c=b.ecModel,d=b.api,e=b.payload,f=a.pipelineContext.progressiveRender;b=b.view;var g=e&&rs(e).updateMethod,f=f?"incrementalPrepareRender":g&&b[g]?g:"render";if("render"!==f)b[f](a,c,d,e);return PB[f]}function Fi(b,a,c){function d(){g=(new Date).getTime();h=null;b.apply(l,m||[])}var e,f=0,g=0,h=null,k,l,m,n;a=a||0;var p=function(){for(var b=[],p=0;pc&&(b+=c,c=-c);0>d&&(a+=d,d=-d);b=g[0]=Math.min(Math.max(e,b),b+c);a=g[1]=Math.min(Math.max(f,a),a+d);return Math.sqrt((b-e)*(b-e)+(a-f)*(a-f))}function As(b,a){if(b){var c=b.getTextGuideLine(),d=b.getTextContent();if(d&&c){var e=b.textGuideLineConfig||{},f=[[0,0],[0,0],[0,0]],g=e.candidates||ZB,h=d.getBoundingRect().clone();h.applyTransform(d.getComputedTransform());var d=Infinity,e=e.anchor,k=b.getComputedTransform(),l=k&&Ke([],k),m=a.get("length2")||0;e&&Ka.copy(e);for(var n=0;n=r&&(q=B,t=y);var C=v,F=z,H=E,I=mc,J=mc+A,K=G;B=(L-v)*E/x+v;y=D;G=Zb;B-=C;y-=F;var fb=Math.sqrt(B*B+y*y);B/=fb;y/=fb;var M=B*H+C,N=y*H+F;1E-4>Math.abs(I-J)%vg?(G[0]=M,G[1]=N,G=fb-H):(K?(K=I,I=ad(J),J=ad(K)):(I=ad(I),J=ad(J)),I>J&&(J+=vg),K=Math.atan2(y,B),0>K&&(K+=vg),K>=I&&K<=J||K+vg>=I&&K+vg<=J?(G[0]=M,G[1]=N,G=fb-H):(fb=H*Math.cos(I)+C,I=H*Math.sin(I)+F,C=H*Math.cos(J)+C,F=H*Math.sin(J)+F,H=(fb-B)*(fb-B)+(I-y)*(I-y),B=(C-B)*(C-B)+(F-y)*(F-y),H=a&&0c||.001>d||(qc.scale(1/c),rc.scale(1/d),c=qc.dot(rc),Math.cos(a)c?V.copy(jb,pa):1=c&&0d||.001>e)&&(qc.scale(1/d),rc.scale(1/e),qc.dot(a)=e)V.copy(jb,Ka);else{jb.scaleAndAdd(rc,d/Math.tan(Math.PI/2-c));c=Ka.x!==pa.x?(jb.x-pa.x)/(Ka.x-pa.x):(jb.y-pa.y)/(Ka.y-pa.y);if(isNaN(c))return;0>c?V.copy(jb,pa):1f[1]&&1E-5>f[2],k=e.style.margin||0,l=g.clone();l.applyTransform(f);l.x-=k/2;l.y-=k/2;l.width+=k;l.height+=k;k=h?new Ii(g,f):null;a.push({label:e,labelLine:d.labelLine,rect:l,localRect:g,obb:k,priority:d.priority,defaultAttr:d.defaultAttr,layoutOption:d.computedLayoutOption,axisAligned:h,transform:f})}}return a}function Vl(b,a,c,d,e,f){function g(){y=z.rect[a]-d;r=e-B.rect[a]-B.rect[c]}function h(c,a,b){0>c&&(a=Math.min(a,-c),0c&&l(-c*b,1)):l(-c*b,1))}function k(c,d,e){for(0!==c&&(q=!0);dc?-1:1;c=Math.abs(c);for(var b=Math.ceil(c/(n-1)),d=0;d=c);d++);}var n=b.length;if(!(2>n)){b.sort(function(c,b){return c.rect[a]-b.rect[a]});for(var p=0,q=!1,t=0,u=0;up&&(v[a]-=p,w.label[a]-=p,q=!0);t+=Math.max(-p,0);p=v[a]+v[c]}0y&&l(-y,.8);0>r&&l(r,.8);g();h(y,r,1);h(r,y,-1);g();0>y&&m(-y);0>r&&m(r);return q}}function cC(b){function a(c){if(!c.ignore){var a=c.ensureState("emphasis");null==a.ignore&&(a.ignore=!1)}c.ignore=!0}var c=[];b.sort(function(c,a){return a.priority-c.priority});for(var d=new aa(0,0,0,0),e=0;eg,k=!a.path;a.silent&&!h||!k||a.createPathProxy();var l=a.path||iC;if(!d){var m=c.fill,n=c.stroke,p=f&&!!m.colorStops,q=e&&!!n.colorStops,t=f&&!!m.image,u=e&&!!n.image,w=void 0,v=void 0,z=void 0,B=void 0,y=void 0;if(p||q)y=a.getBoundingRect();p&&(w=a.__dirty?Wl(b,m,y):a.__canvasFillGradient,a.__canvasFillGradient=w);q&&(v=a.__dirty?Wl(b,n,y):a.__canvasStrokeGradient,a.__canvasStrokeGradient=v);t&&(z=a.__dirty||!a.__canvasFillPattern?Yl(b,m,a):a.__canvasFillPattern,a.__canvasFillPattern=z);u&&(B=a.__dirty||!a.__canvasStrokePattern?Yl(b,n,a):a.__canvasStrokePattern,a.__canvasStrokePattern=z);p?b.fillStyle=w:t&&(z?b.fillStyle=z:f=!1);q?b.strokeStyle=v:u&&(B?b.strokeStyle=B:e=!1)}m=c.lineDash&&0f.strokePercent||1>f.strokeOpacity||1>f.fillOpacity);h||(h=g.transform,h=e&&h?e[0]!==h[0]||e[1]!==h[1]||e[2]!==h[2]||e[3]!==h[3]||e[4]!==h[4]||e[5]!==h[5]:e||h?!0:!1);h?(ob(b,c),Ls(b,a)):f||ob(b,c);e=wg(a,c.inHover);if(a instanceof Y)1!==c.lastDrawType&&(k=!0,c.lastDrawType=1),Js(b,a,g,k,c),f&&(c.batchFill||c.batchStroke)||b.beginPath(),hC(b,a,e,f),f&&(c.batchFill=e.fill||"",c.batchStroke=e.stroke||"");else if(a instanceof Vd)3!==c.lastDrawType&&(k=!0,c.lastDrawType=3),Js(b,a,g,k,c),jC(b,a,e);else if(a instanceof Ga){if(2!==c.lastDrawType&&(k=!0,c.lastDrawType=2),Hs(b,wg(a,c.inHover),g&&wg(g,c.inHover),k,c),(k=a.__image=dl(e.image,a.__image,a,a.onload))&&k&&k.width&&k.height){var g=e.x||0,h=e.y||0,l=a.getWidth(),m=a.getHeight(),n=k.width/k.height;null==l&&null!=m?l=m*n:null==m&&null!=l?m=l/n:null==l&&null==m&&(l=k.width,m=k.height);if(e.sWidth&&e.sHeight){var n=e.sx||0,p=e.sy||0;b.drawImage(k,n,p,e.sWidth,e.sHeight,g,h,l,m)}else e.sx&&e.sy?(n=e.sx,p=e.sy,b.drawImage(k,n,p,l-n,m-p,g,h,l,m)):b.drawImage(k,g,h,l,m)}}else if(a instanceof xg){4!==c.lastDrawType&&(c.lastDrawType=4);h=a.getDisplayables();k=a.getTemporalDisplayables();b.save();e={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:c.viewWidth,viewHeight:c.viewHeight,inHover:c.inHover};l=a.getCursor();for(m=h.length;lg.maxTileWidth&&b("maxTileWidth");a>g.maxTileHeight&&b("maxTileHeight");return{width:Math.max(1,Math.min(c,g.maxTileWidth)),height:Math.max(1,Math.min(a,g.maxTileHeight))}}(),D;B&&(B.width=r.width*c,B.height=r.height*c,D=B.getContext("2d"));(function(){D&&(D.clearRect(0,0,B.width,B.height),g.backgroundColor&&(D.fillStyle=g.backgroundColor,D.fillRect(0,0,B.width,B.height)));for(var a=0,b=0;b=a))for(var a=-z,f=0,h=0,k=0;a=q)break;0===n%2&&(b=.5*(1-g.symbolSize),q=e?1:c,b=Pa(w[l][p/2%w[l].length],(m+t[k][n]*b)*q,(a+u[f]*b)*q,t[k][n]*g.symbolSize*q,u[f]*g.symbolSize*q,g.color,g.symbolKeepAspect),e?y.appendChild(d.painter.paintOne(b)):Zl(D,b));m+=t[k][n];++p;++n;n===t[k].length&&(n=0)}++k;k===t.length&&(k=0)}a+=u[f];++h;++f;f===u.length&&(f=0)}})();f&&Ns.put(q,B||y);a.image=B;a.svgElement=y;a.svgWidth=r.width;a.svgHeight=r.height})(f);f.rotation=g.rotation;f.scaleX=f.scaleY=e?1:1/c;$l.set(b,f);b.dirty=!1;return f}function Ps(b){if(!b||0===b.length)return[["rect"]];if("string"===typeof b)return[[b]];for(var a=!0,c=0;cNi(dm,b)&&dm.push(b)}function em(b,a){fm(gm,b,a,2E3)}function Vs(b){0>Ni(hm,b)&&b&&hm.push(b)}function Ws(b){0>Ni(im,b)&&b&&im.push(b)}function ac(b,a,c){"function"===typeof a&&(c=a,a="");var d=zg(b)?b.type:[b,b={event:a}][0];b.event=(b.event||d).toLowerCase();a=b.event;Ag[a]||(ff(Xs.test(d)&&Xs.test(a)),Oi[d]||(Oi[d]={action:c,actionInfo:b}),Ag[a]=d)}function Ys(b,a){Yd.register(b,a)}function Zs(b,a){fm(Pi,b,a,1E3,"layout")}function id(b,a){fm(Pi,b,a,3E3,"visual")}function fm(b,a,c,d,e){if(mC(a)||zg(a))c=a,a=d;if(isNaN(a)||null==a)throw Error("Illegal priority");Ca(b,function(a){ff(a.__raw!==c)});0<=Ni($s,c)||($s.push(c),d=at.wrapStageHandler(c,e),d.__prio=a,d.__raw=c,b.push(d))}function bt(b,a){Qi[b]=a}function ct(b,a,c){Ri.registerMap(b,a,c)}function ca(b){A(b)?r(b,function(a){ca(a)}):0<=ba(dt,b)||(dt.push(b),fa(b)&&(b={install:b}),b.install(nC))}function Bg(b){return null==b?0:b.length||1}function et(b){return b}function oC(b){var a={},c=a.encode={},d=R(),e=[],f=[],g=a.userOutput={dimensionNames:b.dimensions.slice(),encode:{}};r(b.dimensions,function(a){var h=b.getDimensionInfo(a),k=h.coordDim;if(k){O(null==jm.get(k));var l=h.coordDimIndex;km(c,k)[l]=a;h.isExtraCoord||(d.set(k,1),pC(h.type)&&(e[0]=a),km(g.encode,k)[l]=h.index);h.defaultTooltip&&f.push(a)}jm.each(function(a,b){var d=km(c,b),e=h.otherDims[b];null!=e&&!1!==e&&(d[e]=h.name)})});var h=[],k={};d.each(function(a,b){var d=c[b];k[b]=d[0];h=h.concat(d)});a.dataDimsOnCoord=h;a.encodeFirstDimNotExtra=k;var l=c.label;l&&l.length&&(e=l.slice());(l=c.tooltip)&&l.length?f=l.slice():f.length||(f=e.slice());c.defaultedLabel=e;c.defaultedTooltip=f;return a}function km(b,a){b.hasOwnProperty(a)||(b[a]=[]);return b[a]}function Si(b){return"category"===b?"ordinal":"time"===b?"time":"float"}function pC(b){return!("ordinal"===b||"time"===b)}function qC(b,a,c){function d(c,a,b){null!=jm.get(a)?c.otherDims[a]=b:(c.coordDim=a,c.coordDimIndex=b,g.set(a,!0))}a instanceof Rd||(a=Ol(a));c=c||{};b=(b||[]).slice();for(var e=(c.dimsDef||[]).slice(),f=R(),g=R(),h=[],k=rC(a,b,e,c.dimCount),l=0;lb[0])q.set(a,!1);else{var e=q.set(a,[]);r(b,function(c,b){var g=da(c)?f.get(c):c;null!=g&&g=c)m.isExtraCoord=!0;c--}null==m.name&&(m.name=ft(m.coordDim,f,!1));null!=m.type||Mr(a.data,a.sourceFormat,a.seriesLayoutBy,a.dimensionsDefine,a.startIndex,n)!==ib.Must&&(!m.isExtraCoord||null==m.otherDims.itemName&&null==m.otherDims.seriesName)||(m.type="ordinal")}return h}function rC(b,a,c,d){var e=Math.max(b.dimensionsDetectedCount||1,a.length,c.length,d||0);r(a,function(c){var a;N(c)&&(a=c.dimsDef)&&(e=Math.max(e,a.length))});return e}function ft(b,a,c){if(c||null!=a.get(b)){for(c=0;null!=a.get(b+c);)c++;b+=c}a.set(b,!0);return b}function gf(b,a){a=a||{};return qC(a.coordDimensions||[],b,{dimsDef:a.dimensionsDefine||b.dimensionsDefine,encodeDef:a.encodeDefine||b.encodeDefine,dimCount:a.dimensionsCount,encodeDefaulter:a.encodeDefaulter,generateCoord:a.generateCoord,generateCoordCount:a.generateCoordCount})}function sC(b){var a=b.get("coordinateSystem"),c=new tC(a);if(a=uC[a])return a(b,c,c.axisMap,c.categoryAxisMap),c}function hf(b){return"category"===b.get("type")}function gt(b,a,c){c=c||{};var d=c.byIndex,e=c.stackedCoordDimension,f=!(!b||!b.get("stack")),g,h,k,l;r(a,function(c,b){da(c)&&(a[b]=c={name:c});f&&!c.isExtraCoord&&(d||g||!c.ordinalMeta||(g=c),h||"ordinal"===c.type||"time"===c.type||e&&e!==c.coordDim||(h=c))});!h||d||g||(d=!0);if(h){k="__\x00ecstackresult";l="__\x00ecstackedover";g&&(g.createInvertedIndices=!0);var m=h.coordDim;b=h.type;var n=0;r(a,function(c){c.coordDim===m&&n++});a.push({name:k,coordDim:m,coordDimIndex:n,type:b,isExtraCoord:!0,isCalculationCoord:!0});n++;a.push({name:l,coordDim:l,coordDimIndex:n,type:b,isExtraCoord:!0,isCalculationCoord:!0})}return{stackedDimension:h&&h.name,stackedByDimension:g&&g.name,isStackedByIndex:d,stackedOverDimension:l,stackResultDimension:k}}function Gc(b,a){return!!a&&a===b.getCalculationInfo("stackedDimension")}function lm(b,a){return Gc(b,a)?b.getCalculationInfo("stackResultDimension"):a}function sc(b,a,c){c=c||{};b instanceof Rd||(b=Ol(b));var d=a.get("coordinateSystem"),d=Yd.get(d),e=sC(a),f;e&&e.coordSysDims&&(f=C(e.coordSysDims,function(c){var a={name:c};if(c=e.axisMap.get(c))c=c.get("type"),a.type=Si(c);return a}));f||(f=d&&(d.getDimensionsInfo?d.getDimensionsInfo():d.dimensions.slice())||["x","y"]);var d=c.useEncodeDefaulter,d=gf(b,{coordDimensions:f,generateCoord:c.generateCoord,encodeDefaulter:fa(d)?d:d?P(Kr,f,a):null}),g,h;e&&r(d,function(a,b){var d=e.categoryAxisMap.get(a.coordDim);d&&(null==g&&(g=b),a.ordinalMeta=d.getOrdinalMeta(),c.createInvertedIndices&&(a.createInvertedIndices=!0));null!=a.otherDims.itemName&&(h=!0)});h||null==g||(d[g].otherDims.itemName=0);f=gt(a,d);a=new Wa(d,a);a.setCalculationInfo(f);f=null!=g&&vC(b)?function(c,a,b,d){return d===g?b:this.defaultDimValueGetter(c,a,b,d)}:null;a.hasItemOption=!1;a.initData(b,null,f);return a}function vC(b){if("original"===b.sourceFormat){b=b.data||[];for(var a=0;a=a[0]&&b<=a[1]}function Ui(b,a){return a[1]===a[0]?.5:(b-a[0])/(a[1]-a[0])}function Vi(b,a){return b*(a[1]-a[0])+a[0]}function mm(b){return b.get("stack")||"__ec_stack_"+b.seriesIndex}function ht(b,a){var c=[];a.eachSeriesByType(b,function(a){!a.coordinateSystem||"cartesian2d"!==a.coordinateSystem.type||a.pipelineContext&&a.pipelineContext.large||c.push(a)});return c}function xC(b){var a={};r(b,function(c){var b=c.coordinateSystem.getBaseAxis();if("time"===b.type||"value"===b.type){c=c.getData();for(var d=b.dim+"_"+b.index,b=c.mapDimension(b.dim),e=0,f=c.count();ed&&(d=b);d!==n&&(c.width=d,l-=d+k*d,m--)}});var n=(l-h)/(m+(m-1)*k),n=Math.max(n,0),p=0,q;r(d,function(c,a){c.width||(c.width=n);q=c;p+=c.width*(1+k)});q&&(p-=q.width*k);var t=-p/2;r(d,function(a,d){c[b][d]=c[b][d]||{bandWidth:e,offset:t,width:a.width};t+=a.width*(1+k)})});return c}function jt(b,a,c){if(b&&a)return b=b[a.dim+a.index],null!=b&&null!=c?b[mm(c)]:b}function kt(b,a){var c=ht(b,a),d=nm(c),e={};r(c,function(c){var a=c.getData(),b=c.coordinateSystem,f=b.getBaseAxis(),l=mm(c),m=d[f.dim+f.index][l],n=m.offset,p=m.width,q=b.getOtherAxis(f);c=c.get("barMinHeight")||0;e[l]=e[l]||[];a.setLayout({bandWidth:m.bandWidth,offset:n,size:p});for(var m=a.mapDimension(q.dim),f=a.mapDimension(f.dim),t=Gc(a,m),u=q.isHorizontal(),q=q.toGlobalCoord(q.dataToCoord("log"===q.type?1:0)),w=0,v=a.count();wD?-1:1)*c),isNaN(D)||t&&(e[l][B][y]+=D)):(Q=b.dataToPoint([B,z]),z=Q[0]+n,D=p,Q=Q[1]-q,Math.abs(Q)=Q?-1:1)*c),isNaN(Q)||t&&(e[l][B][y]+=Q));a.setItemLayout(w,{x:z,y:r,width:D,height:Q})}})}function yC(b,a,c,d){var e=qb(a),f=qb(c),g=function(c){return Fr(e,c,d)===Fr(f,c,d)},h=function(){return g("year")&&g("month")};a=function(){return h()&&g("day")&&g("hour")&&g("minute")};switch(b){case "year":return g("year");case "month":return h();case "day":return h()&&g("day");case "hour":return h()&&g("day")&&g("hour");case "minute":return a();case "second":return a()&&g("second");case "millisecond":return a()&&g("second")&&g("millisecond")}}function lt(b,a){b/=a?6E4:1E3;return 30g++;++n)if(m=af(f[n]),XA(f[n])){e(f[n],h[h.length-1]||[],k);var p=f[n+1]?af(f[n+1]):null;if(m!==p){if(k.length){m=l;k.sort(function(c,a){return c.value-a.value});for(var p=[],q=0;q=d[0]&&t<=d[1]&&l++}k=(d[1]-d[0])/a;if(l>1.5*k&&m>k/1.5)break;h.push(p);if(l>k||b===f[n])break}k=[]}}1E4<=g&&Pe("Exceed safe limit.");f=ta(C(h,function(c){return ta(c,function(c){return c.value>=d[0]&&c.value<=d[1]&&!c.notAdd})}),function(c){return 0b[1]&&(b[1]=c[1])})}function $d(b,a,c){var d=0,e=b[0];if(!e)return!1;for(var f=1;fMath.abs(e[0]-b[0])&&1E-8>Math.abs(e[1]-b[1])||(d+=Cc(e[0],e[1],b[0],b[1],a,c));return 0!==d}function DC(b){if(!b.UTF8Encoding)return b;var a=b.UTF8Scale;null==a&&(a=1024);for(var c=b.features,d=0;d>1^-(g&1),h=h>>1^-(h&1),g=g+e,h=h+a,e=g;a=h;d.push([g/c,h/c])}return d}function sm(b,a){b=DC(b);return C(ta(b.features,function(c){return c.geometry&&c.properties&&0a:cc[1];e(a[0].coord,c[0])&&(d?a[0].coord=c[0]:a.shift());d&&e(c[0],a[0].coord)&&a.unshift({coord:c[0]});e(c[1],f.coord)&&(d?f.coord=c[1]:a.pop());d&&e(f.coord,c[1])&&a.push({coord:c[1]})}}function uc(b){return document.createElementNS("http://www.w3.org/2000/svg",b)}function IC(b,a,c){function d(){for(var d=-1*g;d<=g;d+=2){var h;h=k[d-1];var l=k[d+1],q=(l?l.newPos:0)-d;h&&(k[d-1]=void 0);var t=h&&h.newPos+1=e&&q+1>=f){d=h.components;h=0;l=d.length;for(t=q=0;h=e&&l+1>=f){h=[];for(l=0;ld[1]&&(c=d[1]);return c}function ym(b,a,c,d){var e=NaN;b.stacked&&(e=c.get(c.getCalculationInfo("stackedOverDimension"),d));isNaN(e)&&(e=b.valueStart);var f=b.baseDataOffset,g=[];g[f]=c.get(b.baseDim,d);g[1-f]=e;return a.dataToPoint(g)}function lf(b){return A(b)?Mt?new Float32Array(b):b:new OC(b)}function PC(b,a){var c=[];a.diff(b).add(function(a){c.push({cmd:"+",idx:a})}).update(function(a,b){c.push({cmd:"\x3d",idx:b,idx1:a})}).remove(function(a){c.push({cmd:"-",idx:a})}).execute();return c}function QC(b,a,c,d,e,f,g,h){var k=PC(b,a),l=[],m=[],n=[],p=[],q=[],t=[],u=[];g=xm(e,a,g);var w=xm(f,b,h),v=b.getLayout("points")||[],z=a.getLayout("points")||[];for(h=0;h=e||0>u)break;if(be(v,z)){if(k){u+=f;continue}break}if(u===c)b[0q*q+t*t){u+=f;continue}if(0=d||be(q,t))q=v,t=z;else{B=q-l;D=t-m;var y=v-l,Q=q-v,E=z-m;r=t-z;"x"===h?(y=Math.abs(y),q=v-y*g,t=z,B=v+y*g,D=z):"y"===h?(y=Math.abs(E),q=v,t=z-y*g,B=v,D=z+y*g):(y=Math.sqrt(y*y+E*E),Q=Math.sqrt(Q*Q+r*r),r=Q/(Q+y),B=v+B*g*r,D=z+D*g*r,B=kd(B,ld(q,v)),D=kd(D,ld(t,z)),B=ld(B,kd(q,v)),D=ld(D,kd(t,z)),B-=v,D-=z,q=v-B*y/Q,t=z-D*y/Q,q=kd(q,ld(l,v)),t=kd(t,ld(m,z)),q=ld(q,kd(l,v)),t=ld(t,kd(m,z)),B=v-q,D=z-t,B=v+B*Q/y,D=z+D*Q/y)}b.bezierCurveTo(n,p,q,t,v,z);n=B;p=D}else b.lineTo(v,z)}l=v;m=z;u+=f}return w}function Nt(b,a,c,d,e){var f=b.getArea(),g=f.x,h=f.y,k=f.width,f=f.height,l=c.get(["lineStyle","width"])||2,h=h-l/2,f=f+l,g=Math.floor(g-l/2),k=Math.round(k+l),m=new Z({shape:{x:g,y:h,width:k,height:f}});a&&(a=b.getBaseAxis(),b=a.isHorizontal(),a=a.inverse,b?(a&&(m.shape.x+=k),m.shape.width=0):(a||(m.shape.y+=f),m.shape.height=0),za(m,{shape:{width:k,height:f,x:g,y:h}},c,null,d,"function"===typeof e?function(c){e(c,m)}:null));return m}function Ot(b,a,c){var d=b.getArea(),e=sa(d.r0,1),f=sa(d.r,1),g=new lb({shape:{cx:sa(b.cx,1),cy:sa(b.cy,1),r0:e,r:f,startAngle:d.startAngle,endAngle:d.endAngle,clockwise:d.clockwise}});a&&("angle"===b.getBaseAxis().dim?g.shape.endAngle=d.startAngle:g.shape.r=e,za(g,{shape:{endAngle:d.endAngle,r:f}},c));return g}function Zi(b,a,c,d,e){if(b){if("polar"===b.type)return Ot(b,a,c);if("cartesian2d"===b.type)return Nt(b,a,c,d,e)}return null}function Pt(b,a){if(b.length===a.length){for(var c=0;cc[f-1].coord&&(c.reverse(),h.reverse());var k=c[0].coord-10;e=c[f-1].coord+10;var l=e-k;if(.001>l)return"transparent";r(c,function(c){c.offset=(c.coord-k)/l});c.push({offset:f?c[f-1].offset:.5,color:h[1]||"transparent"});c.unshift({offset:f?c[0].offset:.5,color:h[0]||"transparent"});c=new mf(0,0,0,0,c,!0);c[d]=k;c[d+"2"]=e;return c}console.warn("Visual map on line style only support x or y dimension.")}}function TC(b,a,c){b=b.get("showAllSymbol");var d="auto"===b;if(!b||d){var e=c.getAxesByScale("ordinal")[0];if(e&&(!d||!UC(e,a))){var f=a.mapDimension(e.dim),g={};r(e.getViewLabels(),function(c){c=e.scale.getRawOrdinalNumber(c.tickValue);g[c]=1});return function(c){return!g.hasOwnProperty(a.get(f,c))}}}}function UC(b,a){var c=b.getExtent(),c=Math.abs(c[1]-c[0])/b.scale.count();isNaN(c)&&(c=0);for(var d=a.count(),e=Math.max(1,Math.round(d/5)),f=0;fc)return!1;return!0}function VC(b){for(var a=b.length/2;0=G){var I=$i/z;b.each(d,function(c,a){if(!isNaN(c)){var d=b.getItemLayout(a);d.angle=I;d.startAngle=w+F*a*I;d.endAngle=w+F*(a+1)*I}})}else y=G/x,C=w,b.each(d,function(c,a){if(!isNaN(c)){var d=b.getItemLayout(a),e=d.angle===v?v:c*y;d.startAngle=C;d.endAngle=C+F*e;C+=F*e}})})}function Jg(b){return{seriesType:b,reset:function(a,c){var b=c.findComponents({mainType:"legend"});if(b&&b.length){var e=a.getData();e.filterSelf(function(c){c=e.getName(c);for(var a=0;ac?g:f,n=Math.abs(k.label.y-c);if(n>l.maxY){var p=k.label.x-a-k.len2*e,y=d+k.len;l.rB=pb.length)){f=b.length;for(h=0;hJ?-1:1)*F;M="edge"===E?0>J?n+G:n+m-G:R+(0>J?-Q:Q);N=p;fb=[[O,P],[fb,p],[R,p]]}p=A?"center":"edge"===E?0J?-I+Math.PI:-I:0;g=!!w;q.x=M;q.y=N;q.rotation=w;q.setStyle({verticalAlign:"middle"});if(A){if(q.setStyle({align:p}),t=q.states.select)t.x+=q.x,t.y+=q.y}else w=q.getBoundingRect().clone(),w.applyTransform(q.getComputedTransform()),M=(q.style.margin||0)+2.1,w.y-=M/2,w.height+=M,d.push({label:q,labelLine:t,position:b,len:C,len2:F,minTurnAngle:u.get("minTurnAngle"),maxSurfaceAngle:u.get("maxSurfaceAngle"),surfaceNormal:new V(J,K),linePoints:fb,textAlign:p,labelDistance:Q,labelAlignTo:E,edgeDistance:G,bleedMargin:x,rect:w});k.setTextConfig({inside:A})}}});!g&&b.get("avoidLabelOverlap")&&dD(d,e,f,l,m,k,n,p);for(b=0;bb&&0>a);return a}function hD(b,a){var c=b.getExtent(),d=c[0]+c[1];b.toGlobalCoord="x"===b.dim?function(c){return c+a}:function(c){return d-c+a};b.toLocalCoord="x"===b.dim?function(c){return c-a}:function(c){return d-c+a}}function iD(b,a,c,d){b=Xk(c-b);d=d[0]>d[1];d="start"===a&&!d||"start"!==a&&d;ag(b-nd/2)?(a=d?"bottom":"top",d="center"):ag(b-1.5*nd)?(a=d?"top":"bottom",d="center"):(a="middle",d=b<1.5*nd&&b>nd/2?d?"left":"right":d?"right":"left");return{rotation:b,textAlign:d,textVerticalAlign:a}}function Ib(b){b&&(b.ignore=!0)}function iu(b,a){var c=b&&b.getBoundingRect().clone(),d=a&&a.getBoundingRect().clone();if(c&&d){var e=Sc([]);Tc(e,e,-b.rotation);c.applyTransform(Fd([],e,b.getLocalTransform()));d.applyTransform(Fd([],e,a.getLocalTransform()));return c.intersect(d)}}function ju(b,a,c,d,e){for(var f=[],g=[],h=[],k=0;kf&&(f=2*Math.PI+f),(u=uf&&(f=2*Math.PI+f),0===g.children.length||0!==g.children.length&&!1===g.isExpand?(u=p.xl.x)||(f-=Math.PI));var l=u?"left":"right",q=h.getModel("label"),t=q.get("rotate"),u=Math.PI/180*t,w=a.getTextContent();w&&(a.setTextConfig({position:q.get("position")||l,rotation:null==t?-f:u,origin:"center"}),w.setStyle("verticalAlign","middle"))}h=h.get(["emphasis","focus"]);if(h="ancestor"===h?g.getAncestorsIndices():"descendant"===h?g.getDescendantIndices():null)S(c).focus=h;PD(e,g,k,c,n,m,p,d);c.__edge&&(c.onHoverStateChange=function(a){if("blur"!==a){var d=g.parentNode&&b.getItemGraphicEl(g.parentNode.dataIndex);d&&1===d.hoverState||ml(c.__edge,a)}})}function PD(b,a,c,d,e,f,g,h){var k=a.getModel(),l=b.get("edgeShape"),m=b.get("layout"),n=b.getOrient(),p=b.get(["lineStyle","curveness"]),q=b.get("edgeForkPosition"),t=k.getModel("lineStyle").getLineStyle(),u=d.__edge;if("curve"===l)a.parentNode&&a.parentNode!==c&&(u||(u=d.__edge=new rf({shape:Om(m,n,p,e,e)})),ea(u,{shape:Om(m,n,p,f,g)},b));else if("polyline"===l)if("orthogonal"===m){if(a!==c&&a.children&&0!==a.children.length&&!0===a.isExpand){a=a.children;c=[];for(e=0;el.getLayout().x&&(l=c);c.depth>m.depth&&(m=c)});var g=k===l?1:g(k,l)/2,n=g-k.getLayout().x,p=0,q=0,t=0,u=0;if("radial"===d)p=e/(l.getLayout().x+g+n),q=f/(m.depth-1||1),Ng(c,function(c){t=(c.getLayout().x+n)*p;u=(c.depth-1)*q;var a=Mg(t,u);c.setLayout({x:a.x,y:a.y,rawX:t,rawY:u},!0)});else{var w=b.getOrient();if("RL"===w||"LR"===w)q=f/(l.getLayout().x+g+n),p=e/(m.depth-1||1),Ng(c,function(c){u=(c.getLayout().x+n)*q;t="LR"===w?(c.depth-1)*p:e-(c.depth-1)*p;c.setLayout({x:t,y:u},!0)});else if("TB"===w||"BT"===w)p=e/(l.getLayout().x+g+n),q=f/(m.depth-1||1),Ng(c,function(c){t=(c.getLayout().x+n)*p;u="TB"===w?(c.depth-1)*q:f-(c.depth-1)*q;c.setLayout({x:t,y:u},!0)})}}}function ZD(b){b.eachSeriesByType("tree",function(a){var c=a.getData();c.tree.eachNode(function(a){var b=a.getModel().getModel("itemStyle").getItemStyle();a=c.ensureUniqueItemVisual(a.dataIndex,"style");F(a,b)})})}function Qm(b,a,c){var d=b.getZoom(),e=b.getCenter(),f=a.zoom,e=b.dataToPoint(e);null!=a.dx&&null!=a.dy&&(e[0]-=a.dx,e[1]-=a.dy,b.setCenter(b.pointToData(e)));null!=f&&(c&&(f=Math.max(Math.min(d*f,c.max||Infinity),c.min||0)/d),b.scaleX*=f,b.scaleY*=f,c=(a.originY-b.y)*(f-1),b.x-=(a.originX-b.x)*(f-1),b.y-=c,b.updateTransform(),b.setCenter(b.pointToData(e)),b.setZoom(f*d));return{center:b.getCenter(),zoom:b.getZoom()}}function $D(b){b.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(a,c){c.eachComponent({mainType:"series",subType:"tree",query:a},function(c){var b=a.dataIndex;c=c.getData().tree.getNodeByDataIndex(b);c.isExpand=!c.isExpand})});b.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},function(a,c){c.eachComponent({mainType:"series",subType:"tree",query:a},function(c){var b=Qm(c.coordinateSystem,a);c.setCenter&&c.setCenter(b.center);c.setZoom&&c.setZoom(b.zoom)})})}function Og(b,a,c){if(b&&0<=ba(a,b.type)){a=c.getData().tree.root;c=b.targetNode;"string"===typeof c&&(c=a.getNodeById(c));if(c&&a.contains(c))return{node:c};b=b.targetNodeId;if(null!=b&&(c=a.getNodeById(b)))return{node:c}}}function Bu(b){for(var a=[];b;)(b=b.parentNode)&&a.push(b);return a.reverse()}function Rm(b,a){var c=Bu(b);return 0<=ba(c,a)}function Sm(b,a){for(var c=[];b;){var d=b.dataIndex;c.push({name:b.name,dataIndex:d,value:a.getRawValue(d)});b=b.parentNode}c.reverse();return c}function aE(b){for(var a=0;ac&&(c=0);A(b.value)?b.value[0]=c:b.value=c}function cE(b,a){var c=xa(a.get("color")),d=xa(a.get(["aria","decal","decals"]));if(c){b=b||[];var e,f;r(b,function(c){c=new la(c);var a=c.get("color"),b=c.get("decal");if(c.get(["itemStyle","color"])||a&&"none"!==a)e=!0;if(c.get(["itemStyle","decal"])||b&&"none"!==b)f=!0});var g=b[0]||(b[0]={});e||(g.color=c.slice());!f&&d&&(g.decal=d.slice());return b}}function Pg(){return{nodeGroup:[],background:[],content:[]}}function dE(b,a,c,d,e,f,g,h,k,l){function m(c,a,d){var e=S(a);e.dataIndex=g.dataIndex;e.seriesIndex=b.seriesIndex;a.setShape({x:0,y:0,width:z,height:B,r:I});if(r)!a.invisible&&f.push(a);else{a.invisible=!1;var e=g.getVisual("style"),h=e.stroke,k=Fu(x);k.fill=h;var l=ce(A);l.fill=A.get("borderColor");var m=ce(C);m.fill=C.get("borderColor");var n=ce(H);n.fill=H.get("borderColor");d?(d=z-2*y,p(a,h,d,E,e.opacity,{x:y,y:0,width:d,height:E})):a.removeTextContent();a.setStyle(k);a.ensureState("emphasis").style=l;a.ensureState("blur").style=m;a.ensureState("select").style=n;eg(a)}c.add(a)}function n(c,a){var d=S(a);d.dataIndex=g.dataIndex;d.seriesIndex=b.seriesIndex;var d=Math.max(z-2*y,0),e=Math.max(B-2*y,0);a.culling=!0;a.setShape({x:y,y:y,width:d,height:e,r:I});if(r)!a.invisible&&f.push(a);else{a.invisible=!1;var e=g.getVisual("style"),h=e.fill,k=Fu(x);k.fill=h;k.decal=e.decal;var l=ce(A),m=ce(C),n=ce(H);p(a,h,d,e.opacity);a.setStyle(k);a.ensureState("emphasis").style=l;a.ensureState("blur").style=m;a.ensureState("select").style=n;eg(a)}c.add(a)}function p(c,a,d,e,f,h){f=v.getModel(h?"upperLabel":"label");e=Ba(b.getFormattedLabel(g.dataIndex,"normal",null,null,f.get("formatter")),Ea(v.get("name"),null));if(!h&&u.isLeafRoot){var k=b.get("drillDownIcon",!0);e=k?k+" "+e:e}f=f.getShallow("show");cb(c,Ra(v,h?"upperLabel":"label"),{defaultText:f?e:null,inheritColor:a,defaultOpacity:d,labelFetcher:b,labelDataIndex:g.dataIndex});var l=c.getTextContent(),m=l.style,n=Sh(m.padding||0);h&&(c.setTextConfig({layoutRect:h}),l.disableLabelLayout=!0);l.beforeUpdate=function(){var a=Math.max((h?h.width:c.shape.width)-n[1]-n[3],0),b=Math.max((h?h.height:c.shape.height)-n[0]-n[2],0);m.width===a&&m.height===b||l.setStyle({width:a,height:b})};m.truncateMinChar=2;m.lineOverflow="truncate";q(m,h,u);a=l.getState("emphasis");q(a?a.style:null,h,u)}function q(c,a,d){var e=c?c.text:null;!a&&d.isLeafRoot&&null!=e&&(a=b.get("drillDownIcon",!0),c.text=a?a+" "+e:e)}function t(b,f,h,k){var l=null!=Q&&c[b][Q],m=e[b];if(l)c[b][Q]=null,f=l,m=m[D]={},f instanceof Tm?(m.oldX=f.x,m.oldY=f.y):m.oldShape=F({},f.shape);else if(!r){l=new f;l instanceof de&&(f=10*h+k,l.z=(f-1)/f);var m=m[D]={},n=g.parentNode;f=l instanceof M;!n||d&&"drillDown"!==d.direction||(k=h=0,n=e.background[n.getRawIndex()],!d&&n&&n.oldShape&&(h=n.oldShape.width,k=n.oldShape.height),f?(m.oldX=0,m.oldY=k):m.oldShape={x:h,y:k,width:0,height:0});m.fadein=!f}return a[b][D]=l}if(g){var u=g.getLayout(),w=b.getData(),v=g.getModel();w.setItemGraphicEl(g.dataIndex,null);if(u&&u.isInView){var z=u.width,B=u.height,y=u.borderWidth,r=u.invisible,D=g.getRawIndex(),Q=h&&h.getRawIndex();h=g.viewChildren;var E=u.upperHeight,G=h&&h.length,x=v.getModel("itemStyle"),A=v.getModel(["emphasis","itemStyle"]),C=v.getModel(["blur","itemStyle"]),H=v.getModel(["select","itemStyle"]),I=x.get("borderRadius")||0;if(h=t("nodeGroup",Tm)){k.add(h);h.x=u.x||0;h.y=u.y||0;h.markRedraw();ej(h).nodeWidth=z;ej(h).nodeHeight=B;if(u.isAboveViewRoot)return h;(k=t("background",Gu,l,1))&&m(h,k,G&&u.upperLabelHeight);var J=v.get(["emphasis","focus"]),K=v.get(["emphasis","blurScope"]),N="ancestor"===J?g.getAncestorsIndices():"descendant"===J?g.getDescendantIndices():null;G?(ki(h)&&We(h,!1),k&&(We(k,!0),w.setItemGraphicEl(g.dataIndex,k),ol(k,N||J,K))):((l=t("content",Gu,l,2))&&n(h,l),k&&ki(k)&&We(k,!1),We(h,!0),w.setItemGraphicEl(g.dataIndex,h),ol(h,N||J,K));return h}}}}function eE(b){var a=b.pieceList;b.hasSpecialVisual=!1;r(a,function(c,a){c.originIndex=a;null!=c.visual&&(b.hasSpecialVisual=!0)})}function fE(b){var a=b.categories,c=b.categoryMap={},d=b.visual;Qg(a,function(a,b){c[a]=b});if(!A(d)){var e=[];N(d)?Qg(d,function(a,b){var d=c[b];e[null!=d?d:-1]=a}):e[-1]=d;d=Hu(b,e)}for(b=a.length-1;0<=b;b--)null==d[b]&&(delete c[a[b]],a.pop())}function Um(b,a){var c=b.visual,d=[];N(c)?Qg(c,function(c){d.push(c)}):null!=c&&d.push(c);c={color:1,symbol:1};a||1!==d.length||c.hasOwnProperty(b.type)||(d[1]=d[0]);Hu(b,d)}function fj(b){return{applyVisual:function(a,c,d){a=this.mapValueToVisual(a);d("color",b(c("color"),a))},_normalizedToVisual:Vm([0,1])}}function Iu(b){var a=this.option.visual;return a[Math.round(ga(b,[0,1],[0,a.length-1],!0))]||{}}function Rg(b){return function(a,c,d){d(b,this.mapValueToVisual(a))}}function Sg(b){var a=this.option.visual;return a[this.option.loop&&-1!==b?b%a.length:b]}function ee(){return this.option.visual[0]}function Vm(b){return{linear:function(a){return ga(a,b,this.option.visual,!0)},category:Sg,piecewise:function(a,c){var d=Wm.call(this,c);null==d&&(d=ga(a,b,this.option.visual,!0));return d},fixed:ee}}function Wm(b){var a=this.option,c=a.pieceList;if(a.hasSpecialVisual&&(b=La.findPieceIndex(b,c),(c=c[b])&&c.visual))return c.visual[this.type]}function Hu(b,a){b.visual=a;"color"===b.type&&(b.parsedVisual=C(a,function(c){return eb(c)}));return a}function gj(b,a,c){return b?a<=c:a=c.length||a===c[a.depth]){var f=F({},k);if(m){var g=m.type,h="color"===g&&Lu(m).drColorMappingBy,h="index"===h?b:"id"===h?d.mapIdToIndex(a.getId()):a.getValue(e.get("visualDimension"));f[g]=m.mapValueToVisual(h)}Ju(a,f,c,d)}})}else l=Ku(k),a.fill=l}}function gE(b,a,c){var d=F({},a),e=c.designatedVisualItemStyle;r(["color","colorAlpha","colorSaturation"],function(c){e[c]=a[c];var f=b.get(c);e[c]=null;null!=f&&(d[c]=f)});return d}function Ku(b){var a=Xm(b,"color");if(a){var c=Xm(b,"colorAlpha");(b=Xm(b,"colorSaturation"))&&(a=Ne(a,null,null,b));c&&(a=Uf(a,c));return a}}function Xm(b,a){var c=b[a];if(null!=c&&"none"!==c)return c}function hE(b,a,c,d,e,f){if(f&&f.length&&(b=Ym(a,"color")||null!=e.color&&"none"!==e.color&&(Ym(a,"colorAlpha")||Ym(a,"colorSaturation"))))return d=a.get("visualMin"),e=a.get("visualMax"),c=c.dataExtent.slice(),null!=d&&dc[1]&&(c[1]=e),a=a.get("colorMappingBy"),c={type:b.name,dataExtent:c,visual:b.range},"color"!==c.type||"index"!==a&&"id"!==a?c.mappingMethod="linear":(c.mappingMethod="category",c.loop=!0),c=new La(c),Lu(c).drColorMappingBy=a,c}function Ym(b,a){var c=b.get(a);return A(c)&&c.length?{name:a,range:c}:null}function Mu(b,a,c,d){var e,f;if(!b.isRemoved()){var g=b.getLayout();e=g.width;f=g.height;var g=b.getModel(),h=g.get(Nu),k=g.get(iE)/2,l=Ou(g),m=Math.max(h,l),n=h-k,p=m-k;b.setLayout({borderWidth:h,upperHeight:m,upperLabelHeight:l},!0);e=Tg(e-2*n,0);f=Tg(f-n-p,0);h=e*f;b=jE(b,g,h,a,c,d);if(b.length){n={x:n,y:p,width:e,height:f};e=hj(e,f);f=Infinity;p=[];l=p.area=0;for(m=b.length;lq&&(q=B);t=t.area*t.area;u=u*u*w;q=t?Tg(u*q/t,t/(u*v)):Infinity;q<=f?(l++,f=q):(p.area-=p.pop().getLayout().area,Pu(p,e,n,k,!1),e=hj(n.width,n.height),p.length=p.area=0,f=Infinity)}p.length&&Pu(p,e,n,k,!0);c||(g=g.get("childrenVisibleMin"),null!=g&&hh[1]&&(h[1]=c)})):h=[NaN,NaN];return{sum:d,dataExtent:h}}function Pu(b,a,c,d,e){var f=a===c.width?0:1,g=1-f,h=["x","y"],k=["width","height"],l=c[h[f]];a=a?b.area/a:0;if(e||a>c[k[g]])a=c[k[g]];e=0;for(var m=b.length;em;p&&p(b,a,e);c&&c(e)}}}function yE(b){b.eachSeriesByType("graph",function(a){var c=a.coordinateSystem;if(!c||"view"===c.type)if("force"===a.get("layout")){var b=a.preservedPoints||{},e=a.getGraph(),f=e.data,g=e.edgeData,h=a.getModel("force"),k=h.get("initLayout");a.preservedPoints?f.each(function(c){var a=f.getId(c);f.setItemLayout(c,b[a]||[NaN,NaN])}):k&&"none"!==k?"circular"===k&&Vu(a,"value"):Tu(a);var l=f.getDataExtent("value"),m=g.getDataExtent("value"),k=h.get("repulsion"),n=h.get("edgeLength"),p=A(k)?k:[k,k],q=A(n)?n:[n,n],q=[q[1],q[0]],t=f.mapArray("value",function(c,a){var b=f.getItemLayout(a),d=ga(c,l,p);isNaN(d)&&(d=(p[0]+p[1])/2);return{w:d,rep:d,fixed:f.getItemModel(a).get("fixed"),p:!b||isNaN(b[0])||isNaN(b[1])?null:b}}),g=g.mapArray("value",function(c,b){var d=e.getEdgeByIndex(b),f=ga(c,m,q);isNaN(f)&&(f=(q[0]+q[1])/2);var g=d.getModel(),h=zb(d.getModel().get(["lineStyle","curveness"]),-$m(d,a,b,!0),0);return{n1:t[d.node1.dataIndex],n2:t[d.node2.dataIndex],d:f,curveness:h,ignoreForceLayout:g.get("ignoreForceLayout")}}),c=c.getBoundingRect(),h=xE(t,g,{rect:c,gravity:h.get("gravity"),friction:h.get("friction")});h.beforeStep(function(c,a){for(var b=0,d=c.length;b=k;k+=.1){en[0]=uf(d[0],e[0],b[0],k);en[1]=uf(d[1],e[1],b[1],k);var l=$u(fn(en,a)-c);lf;f++){l=g+h;gn[0]=uf(d[0],e[0],b[0],g);gn[1]=uf(d[1],e[1],b[1],g);hn[0]=uf(d[0],e[0],b[0],l);hn[1]=uf(d[1],e[1],b[1],l);l=fn(gn,a)-c;if(.01>$u(l))break;k=fn(hn,a)-c;h/=2;g=0>l?0<=k?g+h:g-h:0<=k?g-h:g+h}return g}function jn(b,a){var c=[],d=[[],[],[]],e=[[],[]],f=[];a/=2;b.eachEdge(function(b,h){var g=b.getLayout(),l=b.getVisual("fromSymbol"),m=b.getVisual("toSymbol");g.__original||(g.__original=[ic(g[0]),ic(g[1])],g[2]&&g.__original.push(ic(g[2])));var n=g.__original;null!=g[2]?(Na(d[0],n[0]),Na(d[1],n[2]),Na(d[2],n[1]),l&&"none"!==l&&(l=Wg(b.node1),l=Zu(d,n[0],l*a),Yc(d[0][0],d[1][0],d[2][0],l,c),d[0][0]=c[3],d[1][0]=c[4],Yc(d[0][1],d[1][1],d[2][1],l,c),d[0][1]=c[3],d[1][1]=c[4]),m&&"none"!==m&&(l=Wg(b.node2),l=Zu(d,n[1],l*a),Yc(d[0][0],d[1][0],d[2][0],l,c),d[1][0]=c[1],d[2][0]=c[2],Yc(d[0][1],d[1][1],d[2][1],l,c),d[1][1]=c[1],d[2][1]=c[2]),Na(g[0],d[0]),Na(g[1],d[2]),Na(g[2],d[1])):(Na(e[0],n[0]),Na(e[1],n[1]),Pc(f,e[1],e[0]),Ie(f,f),l&&"none"!==l&&(l=Wg(b.node1),Th(e[0],e[0],f,l*a)),m&&"none"!==m&&(l=Wg(b.node2),Th(e[1],e[1],f,-l*a)),Na(g[0],e[0]),Na(g[1],e[1]))})}function av(b,a){return{getValue:function(c){var d=this[b][a];return d.get(d.getDimension(c||"value"),this.dataIndex)},setVisual:function(c,d){0<=this.dataIndex&&this[b][a].setItemVisual(this.dataIndex,c,d)},getVisual:function(c){return this[b][a].getItemVisual(this.dataIndex,c)},setLayout:function(c,d){0<=this.dataIndex&&this[b][a].setItemLayout(this.dataIndex,c,d)},getLayout:function(){return this[b][a].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[b][a].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[b][a].getRawIndex(this.dataIndex)}}}function bv(b,a,c,d,e){d=new DE(d);for(var f=0;fba(a,"value")&&a.concat(["value"]),a=gf(b,{coordDimensions:a}),a=new Wa(a,c),a.initData(b));b=new Wa(["value"],c);b.initData(h,g);e&&e(a,b);zu({mainData:a,struct:d,structAttr:"graph",datas:{node:a,edge:b},datasAttr:{node:"data",edge:"edgeData"}});d.update();return d}function kj(b,a){var c=null==b?"":b+"";a&&("string"===typeof a?c=a.replace("{value}",c):"function"===typeof a&&(c=a(b)));return c}function EE(b,a){return Aa(b.getBoxLayoutParams(),{width:a.getWidth(),height:a.getHeight()})}function FE(b,a){for(var c=b.mapDimension("value"),d=b.mapArray(c,function(c){return c}),c=[],e="ascending"===a,f=0,g=b.count();fg.sign?c[0]+=b:c[1]-=b;a[d]=vf(a[d],c);c=mn(a,d);null!=e&&(c.sign!==g.sign||c.spanf&&(a[1-d]=a[d]+c.sign*f);return a}function mn(b,a){var c=b[a]-b[1-a];return{span:Math.abs(c),sign:0c?1:a?-1:1}}function vf(b,a){return Math.min(null!=a[1]?a[1]:Infinity,Math.max(null!=a[0]?a[0]:-Infinity,b))}function lj(b,a){return fv(gv(b,a[0]),a[1])}function NE(b,a){var c=a.layoutLength/(a.axisCount-1);return{position:c*b,axisNameAvailableWidth:c,axisLabelShow:!0}}function OE(b,a){var c=a.layoutLength,d=a.axisExpandWidth,e=a.axisCount,f=a.axisCollapseWidth,g=a.winInnerIndices,h=f,k=!1,l;ba&&(a=0);return[b[0],b[a]]}function mv(b,a,c,d){var e=new M;e.add(new Z({name:"main",style:qn(c),silent:!0,draggable:!0,cursor:"move",drift:P(nv,b,a,e,["n","s","w","e"]),ondragend:P(he,a,{isEnd:!0})}));r(d,function(c){e.add(new Z({name:c.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:P(nv,b,a,e,c),ondragend:P(he,a,{isEnd:!0})}))});return e}function ov(b,a,c,d){var e=d.brushStyle.lineWidth||0,f=wf(e,6),g=c[0][0],h=c[1][0],k=g-e/2,l=h-e/2,m=c[0][1],n=c[1][1];c=m-f+e/2;var p=n-f+e/2,m=m-g,n=n-h,q=m+e,e=n+e;Ic(b,a,"main",g,h,m,n);d.transformable&&(Ic(b,a,"w",k,l,f,e),Ic(b,a,"e",c,l,f,e),Ic(b,a,"n",k,l,q,f),Ic(b,a,"s",k,p,q,f),Ic(b,a,"nw",k,l,f,f),Ic(b,a,"ne",c,l,f,f),Ic(b,a,"sw",k,p,f,f),Ic(b,a,"se",c,p,f,f))}function rn(b,a){var c=a.__brushOption,d=c.transformable,e=a.childAt(0);e.useStyle(qn(c));e.attr({silent:!d,cursor:d?"move":"default"});r([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],function(c){var e=a.childOfName(c.join(""));1===c.length?c=sn(b,c[0]):(c=[sn(b,c[0]),sn(b,c[1])],"e"!==c[0]&&"w"!==c[0]||c.reverse(),c=c.join(""));e&&e.attr({silent:!d,invisible:!d,cursor:d?PE[c]+"-resize":null})})}function Ic(b,a,c,d,e,f,g){(c=a.childOfName(c))&&c.setShape(QE(tn(b,a,[[d,e],[d+f,e+g]])))}function qn(b){return K({strokeNoScale:!0},b.brushStyle)}function pv(b,a,c,d){var e=[Xg(b,c),Xg(a,d)];b=[wf(b,c),wf(a,d)];return[[e[0],b[0]],[e[1],b[1]]]}function sn(b,a){return{left:"w",right:"e",top:"n",bottom:"s"}[pi({w:"left",e:"right",n:"top",s:"bottom"}[a],dd(b.group))]}function nv(b,a,c,d,e,f){var g=c.__brushOption,h=b.toRectRange(g.range),k=qv(a,e,f);r(d,function(c){c=RE[c];h[c[0]][c[1]]+=k[c[0]]});g.range=b.fromRectRange(pv(h[0][0],h[1][0],h[0][1],h[1][1]));nn(a,c);he(a,{isEnd:!1})}function SE(b,a,c,d){var e=a.__brushOption.range,f=qv(b,c,d);r(e,function(c){c[0]+=f[0];c[1]+=f[1]});nn(b,a);he(b,{isEnd:!1})}function qv(b,a,c){b=b.group;a=b.transformCoordToLocal(a,c);c=b.transformCoordToLocal(0,0);return[a[0]-c[0],a[1]-c[1]]}function tn(b,a,c){return(a=kv(b,a))&&!0!==a?a.clipPath(c,b._transform):J(c)}function QE(b){var a=Xg(b[0][0],b[1][0]),c=Xg(b[0][1],b[1][1]),d=wf(b[0][0],b[1][0]);b=wf(b[0][1],b[1][1]);return{x:a,y:c,width:d-a,height:b-c}}function un(b){b=b.event;b.preventDefault&&b.preventDefault()}function vn(b,a,c){return b.childOfName("main").contain(a,c)}function rv(b,a,c,d){var e=b._creatingCover,f=b._creatingPanel,g=b._brushOption,h;b._track.push(c.slice());var k;var l=b._track;if(l.length){k=l[l.length-1];var m=l[0],l=k[0]-m[0];k=k[1]-m[1];k=6u&&(u=v.depth);w.setLayout({depth:z?v.depth:q},!0);"vertical"===h?w.setLayout({dy:c},!0):w.setLayout({dx:c},!0);for(v=0;vp.indexOf(z)&&p.push(z)}}++q;n=p;p=[]}for(t=0;tq-1?u:q-1;k&&"left"!==k&&gF(b,k,h,l);hF(b,"vertical"===h?(f-c)/l:(e-c)/l,h);c=g;g=iF(b,h);jF(g,a,f,e,d,h);xn(g,d,f,e,h);for(a=1;0a.indexOf(k.node1)&&a.push(k.node1)}}c=a;a=[];++e}r(b,function(c){zv(c)||c.setLayout({depth:Math.max(0,d-c.getLayout().skNodeHeight)},!0)})}else"justify"===a&&nF(b,d)}function nF(b,a){r(b,function(c){zv(c)||c.outEdges.length||c.setLayout({depth:a},!0)})}function hF(b,a,c){r(b,function(b){var d=b.getLayout().depth*a;"vertical"===c?b.setLayout({y:d},!0):b.setLayout({x:d},!0)})}function iF(b,a){var c=[],d="vertical"===a?"y":"x",e=bl(b,function(c){return c.getLayout()[d]});e.keys.sort(function(c,a){return c-a});r(e.keys,function(a){c.push(e.buckets.get(a))});return c}function jF(b,a,c,d,e,f){var g=Infinity;r(b,function(a){var b=a.length,h=0;r(a,function(c){h+=c.getLayout().value});a="vertical"===f?(d-(b-1)*e)/h:(c-(b-1)*e)/h;ae&&(e=c)});r(c,function(c){var d=(new La({type:"color",mappingMethod:"linear",dataExtent:[b,e],visual:a.get("color")})).mapValueToVisual(c.getLayout().value),f=c.getModel().get(["itemStyle","color"]);null!=f?(c.setVisual("color",f),c.setVisual("style",{fill:f})):(c.setVisual("color",d),c.setVisual("style",{fill:d}))})}})}function Av(b,a,c,d,e){var f=b.ends;d=new tF({shape:{points:e?uF(f,d,b):f}});Bv(b,d,a,c,e);return d}function Bv(b,a,c,d,e){(0,Yg[e?"initProps":"updateProps"])(a,{shape:{points:b.ends}},c.hostModel,d);a.useStyle(c.getItemVisual(d,"style"));a.style.strokeNoScale=!0;a.z2=100;b=c.getItemModel(d);Fa(a,b);va(a,b.get(["emphasis","focus"]),b.get(["emphasis","blurScope"]))}function uF(b,a,c){return C(b,function(b){b=b.slice();b[a]=c.initBaseline;return b})}function vF(b,a){b.eachRawSeriesByType("boxplot",function(c){c.getData().setVisual("legendSymbol","roundRect")})}function wF(b){b=xF(b);Zg(b,function(a){var c=a.seriesModels;c.length&&(yF(a),Zg(c,function(c,b){zF(c,a.boxOffsetList[b],a.boxWidthList[b])}))})}function xF(b){var a=[],c=[];b.eachSeriesByType("boxplot",function(b){var d=b.getBaseAxis(),f=ba(c,d);0>f&&(f=c.length,c[f]=d,a[f]={axis:d,seriesModels:[]});a[f].seriesModels.push(b)});return a}function yF(b){var a=b.axis,c=b.seriesModels,d=c.length,e=b.boxWidthList=[],f=b.boxOffsetList=[],g=[],h;if("category"===a.type)h=a.getBandWidth();else{var k=0;Zg(c,function(c){k=Math.max(k,c.getData().count())});b=a.getExtent();Math.abs(b[1]-b[0])/k}Zg(c,function(c){c=c.get("boxWidth");A(c)||(c=[c,c]);g.push([H(c[0],h)||0,H(c[1],h)||0])});b=.8*h-2;var l=b/d*.3,m=(b-l*(d-1))/d,n=m/2-b/2;Zg(c,function(c,a){f.push(n);n+=l+m;e.push(Math.min(Math.max(m,g[a][0]),g[a][1]))})}function zF(b,a,c){function d(c,b,d){b=h.get(b,d);d=[];d[l]=c;d[m]=b;isNaN(c)||isNaN(b)?c=[NaN,NaN]:(c=g.dataToPoint(d),c[l]+=a);return c}function e(c,a,b){var d=a.slice();a=a.slice();d[l]+=k;a[l]-=k;b?c.push(d,a):c.push(a,d)}function f(c,a){var b=a.slice(),d=a.slice();b[l]-=k;d[l]+=k;c.push(b,d)}var g=b.coordinateSystem,h=b.getData(),k=c/2,l="horizontal"===b.get("layout")?0:1,m=1-l;c=["x","y"];b=h.mapDimension(c[l]);c=h.mapDimensionsAll(c[m]);if(!(null==b||5>c.length))for(var n=0;nd?-1:c=a[0]&&c<=a[1]}}function Jv(b){b=b.dimensions;return"lng"===b[0]&&"lat"===b[1]}function Kv(b,a,c,d){var e=b.getItemLayout(a),f=c.get("symbolRepeat"),g=c.get("symbolClip"),h=c.get("symbolPosition")||"start",k=(c.get("symbolRotate")||0)*Math.PI/180||0,l=c.get("symbolPatternSize")||2,m=c.isAnimationEnabled(),g={dataIndex:a,layout:e,itemModel:c,symbolType:b.getItemVisual(a,"symbol")||"circle",style:b.getItemVisual(a,"style"),symbolClip:g,symbolRepeat:f,symbolRepeatDirection:c.get("symbolRepeatDirection"),symbolPatternSize:l,rotation:k,animationModel:m?c:null,hoverScale:m&&c.get(["emphasis","scale"]),z2:c.getShallow("z",!0)||0},m=d.valueDim,n=c.get("symbolBoundingData"),p=d.coordSys.getOtherAxis(d.coordSys.getBaseAxis()),q=p.toGlobalCoord(p.dataToCoord(0)),t=1-+(0>=e[m.wh]);A(n)?(n=[p.toGlobalCoord(p.dataToCoord(p.scale.parse(n[0])))-q,p.toGlobalCoord(p.dataToCoord(p.scale.parse(n[1])))-q],n[1]t?-1:0;m=g.boundingLength;t=g.pxSign;n=d.valueDim;p=d.categoryDim;q=Math.abs(e[p.wh]);b=b.getItemVisual(a,"symbolSize");b=A(b)?b.slice():null==b?["100%","100%"]:[b,b];b[p.index]=H(b[p.index],q);b[n.index]=H(b[n.index],f?q:Math.abs(m));g.symbolSize=b;(g.symbolScale=[b[0]/l,b[1]/l])[n.index]*=(d.isHorizontal?-1:1)*t;l=g.symbolScale;if(b=c.get(IF)||0)An.attr({scaleX:l[0],scaleY:l[1],rotation:k}),An.updateTransform(),b/=An.getLineScale(),b*=l[d.valueDim.index];g.valueLineWidth=b;q=g.symbolSize;k=c.get("symbolOffset");A(k)&&(k=[H(k[0],q[0]),H(k[1],q[1])]);a=k;m=g.boundingLength;t=g.repeatCutLength;k=d.categoryDim;l=d.valueDim;b=g.pxSign;p=n=Math.max(q[l.index]+g.valueLineWidth,0);if(f){var p=Math.abs(m),u=Ba(c.get("symbolMargin"),"15%")+"";c=!1;u.lastIndexOf("!")===u.length-1&&(c=!0,u=u.slice(0,u.length-1));var q=H(u,q[l.index]),w=Math.max(n+2*q,0),v=c?0:2*q,z=bi(f),u=z?f:Lv((p+v)/w),q=(p-u*n)/2/(c?u:u-1),w=n+2*q,v=c?0:2*q;z||"fixed"===f||(u=t?Lv((Math.abs(t)+v)/w):0);p=u*w-v;g.repeatTimes=u;g.symbolMargin=q}f=p/2*b;c=g.pathPosition=[];c[k.index]=e[k.wh]/2;c[l.index]="start"===h?f:"end"===h?m-f:m/2;a&&(c[0]+=a[0],c[1]+=a[1]);h=g.bundlePosition=[];h[k.index]=e[k.xy];h[l.index]=e[l.xy];h=g.barRectShape=F({},e);h[l.wh]=b*Math.max(Math.abs(e[l.wh]),Math.abs(c[l.index]+f));h[k.wh]=e[k.wh];h=g.clipShape={};h[k.xy]=-e[k.xy];h[k.wh]=d.ecSize[k.wh];h[l.xy]=0;h[l.wh]=e[l.wh];return g}function Mv(b){var a=b.symbolPatternSize;b=Pa(b.symbolType,-a/2,-a/2,a,a);b.attr({culling:!0});"image"!==b.type&&b.setStyle({strokeNoScale:!0});return b}function Nv(b,a,c,d){function e(a){var b=g.slice(),d=c.pxSign,e=a;if("start"===c.symbolRepeatDirection?0d)e=k-1-a;b[h.index]=m*(e-k/2+.5)+g[h.index];return{x:b[0],y:b[1],scaleX:c.symbolScale[0],scaleY:c.symbolScale[1],rotation:c.rotation}}var f=b.__pictorialBundle,g=c.pathPosition,h=a.valueDim,k=c.repeatTimes||0,l=0,m=c.symbolSize[a.valueDim.index]+c.valueLineWidth+2*c.symbolMargin;for(Bn(b,function(a){a.__pictorialAnimationIndex=l;a.__pictorialRepeatTimes=k;lMath.abs(b-a)?a:Math.ceil(b)}function LF(b,a,c){var d=new Z({shape:{x:b.x-10,y:b.y-10,width:0,height:b.height+20}});za(d,{shape:{x:b.x-50,width:b.width+100,height:b.height+20}},a,c);return d}function MF(b,a){b.eachSeriesByType("themeRiver",function(c){var a=c.getData(),b=c.coordinateSystem,f={},g=b.getRect();f.rect=g;var h=c.get("boundaryGap"),b=b.getAxis();f.boundaryGap=h;"horizontal"===b.orient?(h[0]=H(h[0],g.height),h[1]=H(h[1],g.height),Wv(a,c,g.height-h[0]-h[1])):(h[0]=H(h[0],g.width),h[1]=H(h[1],g.width),Wv(a,c,g.width-h[0]-h[1]));a.setLayout("layoutInfo",f)})}function Wv(b,a,c){if(b.count()){var d=a.coordinateSystem;a=a.getLayerSeries();var e=b.mapDimension("single"),f=b.mapDimension("value"),g=C(a,function(c){return C(c.indices,function(c){var a=d.dataToPoint(b.get(e,c));a[1]=b.get(f,c);return a})}),h=NF(g),k=h.y0;c/=h.max;for(var h=a.length,l=a[0].indices.length,m,n=0;nf&&(f=h);d.push(h)}for(b=0;bf&&(f=a);return{y0:e,max:f}}function OF(b){b.registerAction({type:"sunburstRootToNode",update:"updateView"},function(a,c){c.eachComponent({mainType:"series",subType:"sunburst",query:a},function(c,b){var d=Og(a,["sunburstRootToNode"],c);if(d){var e=c.getViewRoot();e&&(a.direction=Rm(e,d.node)?"rollUp":"drillDown");c.resetViewRoot(d.node)}})});b.registerAction({type:"sunburstHighlight",update:"none"},function(a,c,b){a=F({},a);c.eachComponent({mainType:"series",subType:"sunburst",query:a},function(c){if(c=Og(a,["sunburstHighlight"],c))a.dataIndex=c.node.dataIndex});Sa("highlight","sunburstHighlight");b.dispatchAction(F(a,{type:"highlight"}))});b.registerAction({type:"sunburstUnhighlight",update:"updateView"},function(a,c,b){a=F({},a);Sa("downplay","sunburstUnhighlight");b.dispatchAction(F(a,{type:"downplay"}))})}function Xv(b){var a=0;r(b.children,function(c){Xv(c);c=c.value;A(c)&&(c=c[0]);a+=c});var c=b.value;A(c)&&(c=c[0]);if(null==c||isNaN(c))c=a;0>c&&(c=0);A(b.value)?b.value[0]=c:b.value=c}function PF(b,a,c){a.eachSeriesByType(b,function(a){var b=a.get("center"),d=a.get("radius");A(d)||(d=[0,d]);A(b)||(b=[b,b]);var g=c.getWidth(),h=c.getHeight(),k=Math.min(g,h),l=H(b[0],g),m=H(b[1],h),n=H(d[0],k/2),g=H(d[1],k/2),b=-a.get("startAngle")*Yv,p=a.get("minAngle")*Yv,q=a.getData().tree.root,d=a.getViewRoot(),t=d.depth,h=a.get("sort");null!=h&&Zv(d,h);var u=0;r(d.children,function(c){!isNaN(c.getValue())&&u++});var w=d.getValue(),v=Math.PI/(w||u)*2,z=0Math.abs(c-b)&&1E-5>Math.abs(a-d)||g.push(c,a,b,d,b,d)}function d(c,a,b,d,e,f){var h=4*Math.tan(Math.abs(a-c)/4)/3,k=ay:p=n)m.push(v,z,r,y,L,D);else{for(var Q=Math.min(n,l-1)+1,E=1;E<=Q;E++){var G=E/Q;Re(u,v,r,L,G,p);Re(w,z,y,D,G,q);u=p[3];w=q[3];m.push(p[1],q[1],p[2],q[2],u,w);v=p[5];z=q[5];r=p[6];y=q[6]}n-=Q-1}}c=k===c?[m,d]:[c,m]}h=c[0];k=c[1];c=h;d=k}else k=hw(d||h,h);else h=hw(c||k,k);e.push(h);f.push(k)}return[e,f]}function iw(b){for(var a=0,c=0,d=0,e=b.length,f=0,g=e-2;fl[2]!==0>m[2]);var n=[],p=[],q=0,t=Infinity,u=[],w=h.length;if(f){for(var v=[],z=h.length,r=0;r=a)return c;if(1===a)return Gn(b,a);if(b instanceof Z)for(var d=b.shape,e=d.height>d.width?1:0,f=eG[e],g=fG[e],h=d[f]/a,k=d[g],e=0;e=a)return c;for(var d=b.constructor,e=0;e=d;b--)qj(l.childAt(b),e,l)}0<=g?f.replaceAt(a,g):f.add(a);return a}function rw(b,a){var c=Lb(b),d=a.type,e=a.shape,f=a.style,g;if(!(g=null!=d&&d!==c.customGraphicType)){if(g="path"===d)g=e&&(e.hasOwnProperty("pathData")||e.hasOwnProperty("d"));g=g&&(e&&(e.pathData||e.d))!==c.customPathData}return g||"image"===d&&f.hasOwnProperty("image")&&f.image!==c.customImagePath}function sw(b,a,c){var d=a?a?b?b[a]:null:b:b,e=a?Sn(b,d,"emphasis"):b.style,f=b.type,d=d?d.textConfig:null;b=(b=b.textContent)?a?a?b?b[a]:null:b:b:null;e&&(c.isLegacy||$v(e,f,!!d,!!b))&&(c.isLegacy=!0,e=aw(e,f,!a),!d&&e.textConfig&&(d=e.textConfig),!b&&e.textContent&&(b=e.textContent));!a&&b&&(e=b,!e.type&&(e.type="text"),"text"!==e.type&&O("text"===e.type,'textContent.type must be "text"'));a=a?c[a]:c.normal;a.cfg=d;a.conOpt=b}function Sn(b,a,c){a=a&&a.style;null==a&&"emphasis"===c&&b&&(a=b.styleEmphasis);return a}function tw(b,a){var c=b&&b.name;return null!=c?c:"e\x00\x00"+a}function uw(b,a){var c=this.context;Rn(c.api,null!=a?c.oldChildren[a]:null,c.dataIndex,null!=b?c.newChildren[b]:null,c.seriesModel,c.group,!1,c.morphPreparation)}function lG(b){var a=this.context;qj(a.oldChildren[b],a.seriesModel,a.group)}function qj(b,a,c){if(b){var d=Lb(b).leaveToProps;d?ea(b,d,a,{cb:function(){c.remove(b)}}):c.remove(b)}}function rj(b,a,c){a.style=c?J(b.style):b.style;a.zlevel=b.zlevel;a.z=b.z;a.z2=b.z2}function vw(b,a,c,d){ww(ke(c).lastProp,d)||(ke(c).lastProp=d,a?ea(c,d,b):(c.stopAnimation(),c.attr(d)))}function ww(b,a){if(N(b)&&N(a)){var c=!0;r(a,function(a,e){c=c&&ww(b[e],a)});return!!c}return b===a}function xw(b,a){b[a.get(["label","show"])?"show":"hide"]()}function Tn(b){return{x:b.x||0,y:b.y||0,rotation:b.rotation||0}}function yw(b,a,c){var d=a.get("z"),e=a.get("zlevel");b&&b.traverse(function(a){"group"!==a.type&&(null!=d&&(a.z=d),null!=e&&(a.zlevel=e),a.silent=c)})}function Un(b){var a=b.get("type");b=b.getModel(a+"Style");var c;"line"===a?(c=b.getLineStyle(),c.fill=null):"shadow"===a&&(c=b.getAreaStyle(),c.stroke=null);return c}function zw(b,a,c,d,e){var f=c.get("value"),f=Aw(f,a.axis,a.ecModel,c.get("seriesDataIndices"),{precision:c.get(["label","precision"]),formatter:c.get(["label","formatter"])});c=c.getModel("label");var g=Od(c.get("padding")||0),h=c.getFont(),k=$f(f,h),l=e.position,m=k.width+g[1]+g[3],k=k.height+g[0]+g[2],n=e.align;"right"===n&&(l[0]-=m);"center"===n&&(l[0]-=m/2);e=e.verticalAlign;"bottom"===e&&(l[1]-=k);"middle"===e&&(l[1]-=k/2);e=d.getWidth();d=d.getHeight();l[0]=Math.min(l[0]+m,e)-m;l[1]=Math.min(l[1]+k,d)-k;l[0]=Math.max(l[0],0);l[1]=Math.max(l[1],0);(d=c.get("backgroundColor"))&&"auto"!==d||(d=a.get(["axisLine","lineStyle","color"]));b.label={x:l[0],y:l[1],style:Ja(c,{text:f,font:h,fill:c.getTextColor(),padding:g,backgroundColor:d}),z2:10}}function Aw(b,a,c,d,e){b=a.scale.parse(b);var f=a.scale.getLabel({value:b},{precision:e.precision});if(e=e.formatter){var g={value:qm(a,{value:b}),axisDimension:a.dim,axisIndex:a.index,seriesData:[]};r(d,function(a){var b=c.getSeriesByIndex(a.seriesIndex);a=a.dataIndexInside;(b=b&&b.getDataParams(a))&&g.seriesData.push(b)});da(e)?f=e.replace("{value}",f):fa(e)&&(f=e(g))}return f}function Vn(b,a,c){var d=nb();Tc(d,d,c.rotation);Rb(d,d,c.position);return Wb([b.dataToCoord(a),(c.labelOffset||0)+(c.labelDirection||1)*(c.labelMargin||0)],d)}function Bw(b,a,c,d,e,f){var g=mb.innerTextLayout(c.rotation,0,c.labelDirection);c.labelMargin=e.get(["label","margin"]);zw(a,d,e,f,{position:Vn(d.axis,b,c),align:g.textAlign,verticalAlign:g.textVerticalAlign})}function Wn(b,a,c){c=c||0;return{x1:b[c],y1:b[1-c],x2:a[c],y2:a[1-c]}}function Cw(b,a,c){c=c||0;return{x:b[c],y:b[1-c],width:a[c],height:a[1-c]}}function Dw(b,a){var c={};c[a.dim+"AxisIndex"]=a.index;return b.getCartesian(c)}function Ew(b,a,c){if(!X.node){var d=a.getZr();Kc(d).records||(Kc(d).records={});mG(d,a);(Kc(d).records[b]||(Kc(d).records[b]={})).handler=c}}function mG(b,a){function c(c,e){b.on(c,function(c){var d=nG(a);oG(Kc(b).records,function(a){a&&e(a,c,d.dispatchAction)});pG(d.pendings,a)})}Kc(b).initialized||(Kc(b).initialized=!0,c("click",P(Fw,"click")),c("mousemove",P(Fw,"mousemove")),c("globalout",qG))}function pG(b,a){var c=b.showTip.length,d=b.hideTip.length,e;c?e=b.showTip[c-1]:d&&(e=b.hideTip[d-1]);e&&(e.dispatchAction=null,a.dispatchAction(e))}function qG(b,a,c){b.handler("leave",null,c)}function Fw(b,a,c,d){a.handler(b,c,d)}function nG(b){var a={showTip:[],hideTip:[]},c=function(d){var e=a[d.type];e?e.push(d):(d.dispatchAction=c,b.dispatchAction(d))};return{dispatchAction:c,pendings:a}}function Xn(b,a){if(!X.node){var c=a.getZr();(Kc(c).records||{})[b]&&(Kc(c).records[b]=null)}}function Gw(b,a){var c=[],d=b.seriesIndex,e;if(null==d||!(e=a.getSeriesByIndex(d)))return{point:[]};var f=e.getData(),g=Jd(f,b);if(null==g||0>g||A(g))return{point:[]};var d=f.getItemGraphicEl(g),h=e.coordinateSystem;if(e.getTooltipPosition)c=e.getTooltipPosition(g)||[];else if(h&&h.dataToPoint)if(b.isStacked){e=h.getBaseAxis();c=h.getOtherAxis(e).dim;c="x"===c||"radius"===c?1:0;e=f.mapDimension(e.dim);var k=[];k[c]=f.get(e,g);k[1-c]=f.get(f.getCalculationInfo("stackResultDimension"),g);c=h.dataToPoint(k)||[]}else c=h.dataToPoint(f.getValues(C(h.dimensions,function(c){return f.mapDimension(c)}),g))||[];else d&&(g=d.getBoundingRect().clone(),g.applyTransform(d.transform),c=[g.x+g.width/2,g.y+g.height/2]);return{point:c,el:d}}function rG(b,a,c){var d=b.currTrigger,e=[b.x,b.y],f=b.dispatchAction||I(c.dispatchAction,c),g=a.getComponent("axisPointer").coordSysAxesInfo;if(g){sj(e)&&(e=Gw({seriesIndex:b.seriesIndex,dataIndex:b.dataIndex},a).point);var h=sj(e),k=b.axesInfo,l=g.axesInfo,m="leave"===d||sj(e),n={},p={};a={list:[],map:{}};var q={showPointer:P(sG,p),showTooltip:P(tG,a)};r(g.coordSysMap,function(c,a){var b=h||c.containPoint(e);r(g.coordSysAxesInfo[a],function(c,a){var d=c.axis,f;a:{for(f=0;f<(k||[]).length;f++){var g=k[f];if(c.axis.dim===g.axisDim&&c.axis.model.componentIndex===g.axisIndex){f=g;break a}}f=void 0}m||!b||k&&!f||(f=f&&f.value,null!=f||h||(f=d.pointToData(e)),null!=f&&Hw(c,f,q,!1,n))})});var t={};r(l,function(c,a){var b=c.linkGroup;b&&!p[a]&&r(b.axesInfo,function(a,d){var e=p[d];a!==c&&e&&(e=e.value,b.mapper&&(e=c.axis.scale.parse(b.mapper(e,Iw(a),Iw(c)))),t[c.key]=e)})});r(t,function(c,a){Hw(l[a],c,q,!0,n)});uG(p,l,n);vG(a,e,b,f);wG(l,f,c);return n}}function Hw(b,a,c,d,e){var f=b.axis;if(!f.scale.isBlank()&&f.containData(a))if(b.involveSeries){var g=xG(a,b),h=g.payloadBatch,k=g.snapToValue;h[0]&&null==e.seriesIndex&&F(e,h[0]);!d&&b.snap&&f.containData(k)&&null!=k&&(a=k);c.showPointer(b,a,h);c.showTooltip(b,g,k)}else c.showPointer(b,a)}function xG(b,a){var c=a.axis,d=c.dim,e=b,f=[],g=Number.MAX_VALUE,h=-1;r(a.seriesModels,function(a,l){var k=a.getData().mapDimensionsAll(d),n;if(a.getAxisTooltipData)k=a.getAxisTooltipData(k,b,c),n=k.dataIndices,k=k.nestestValue;else{n=a.getData().indicesOfNearest(k[0],b,"category"===c.type?.5:null);if(!n.length)return;k=a.getData().get(k[0],n[0])}if(null!=k&&isFinite(k)){var p=b-k,q=Math.abs(p);if(q<=g){if(qh)g=q,h=p,e=k,f.length=0;r(n,function(c){f.push({seriesIndex:a.seriesIndex,dataIndexInside:c,dataIndex:a.getData().getRawIndex(c)})})}}});return{payloadBatch:f,snapToValue:e}}function sG(b,a,c,d){b[a.key]={value:c,payloadBatch:d}}function tG(b,a,c,d){c=c.payloadBatch;var e=a.axis,f=e.model,g=a.axisPointerModel;if(a.triggerTooltip&&c.length){a=a.coordSys.model;var h=Kg(a),k=b.map[h];k||(k=b.map[h]={coordSysId:a.id,coordSysIndex:a.componentIndex,coordSysType:a.type,coordSysMainType:a.mainType,dataByAxis:[]},b.list.push(k));k.dataByAxis.push({axisDim:e.dim,axisIndex:f.componentIndex,axisType:f.type,axisId:f.id,value:d,valueLabelOpt:{precision:g.get(["label","precision"]),formatter:g.get(["label","formatter"])},seriesDataIndices:c.slice()})}}function uG(b,a,c){var d=c.axesInfo=[];r(a,function(c,a){var e=c.axisPointerModel.option,f=b[a];f?(!c.useHandle&&(e.status="show"),e.value=f.value,e.seriesDataIndices=(f.payloadBatch||[]).slice()):!c.useHandle&&(e.status="hide");"show"===e.status&&d.push({axisDim:c.axis.dim,axisIndex:c.axis.model.componentIndex,value:e.value})})}function vG(b,a,c,d){if(sj(a)||!b.list.length)d({type:"hideTip"});else{var e=((b.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};d({type:"showTip",escapeConnect:!0,x:a[0],y:a[1],tooltipOption:c.tooltipOption,position:c.position,dataIndexInside:e.dataIndexInside,dataIndex:e.dataIndex,seriesIndex:e.seriesIndex,dataByCoordSys:b.list})}}function wG(b,a,c){a=c.getZr();var d=Jw(a).axisPointerLastHighlights||{},e=Jw(a).axisPointerLastHighlights={};r(b,function(c,a){var b=c.axisPointerModel.option;"show"===b.status&&r(b.seriesDataIndices,function(c){e[c.seriesIndex+" | "+c.dataIndex]=c})});var f=[],g=[];r(d,function(c,a){!e[a]&&g.push(c)});r(e,function(c,a){!d[a]&&f.push(c)});g.length&&c.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:g});f.length&&c.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:f})}function Iw(b){var a=b.axis.model,c={};b=c.axisDim=b.axis.dim;c.axisIndex=c[b+"AxisIndex"]=a.componentIndex;c.axisName=c[b+"AxisName"]=a.name;c.axisId=c[b+"AxisId"]=a.id;return c}function sj(b){return!b||null==b[0]||isNaN(b[0])||null==b[1]||isNaN(b[1])}function ah(b){le.registerAxisPointerClass("CartesianAxisPointer",yG);b.registerComponentModel(zG);b.registerComponentView(AG);b.registerPreprocessor(function(a){if(a){a.axisPointer&&0!==a.axisPointer.length||(a.axisPointer={});var c=a.axisPointer.link;c&&!A(c)&&(a.axisPointer.link=[c])}});b.registerProcessor(b.PRIORITY.PROCESSOR.STATISTIC,function(a,c){var b=a.getComponent("axisPointer"),e={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};kD(e,a,c);e.seriesInvolved&&mD(e,a);b.coordSysAxesInfo=e});b.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},rG)}function Kw(b){var a=b.seriesModel;return(b=b.polarModel)&&b.coordinateSystem||a&&a.coordinateSystem}function BG(b,a){var c=this,d=c.getAngleAxis(),e=c.getRadiusAxis();d.scale.setExtent(Infinity,-Infinity);e.scale.setExtent(Infinity,-Infinity);b.eachSeries(function(a){if(a.coordinateSystem===c){var b=a.getData();r(Xi(b,"radius"),function(c){e.scale.unionExtentFromData(b,c)});r(Xi(b,"angle"),function(c){d.scale.unionExtentFromData(b,c)})}});jd(d.scale,d.model);jd(e.scale,e.model);if("category"===d.type&&!d.onBand){var f=d.getExtent(),g=360/d.scale.count();d.inverse?f[1]+=g:f[1]-=g;d.setExtent(f[0],f[1])}}function Lw(b,a){b.type=a.get("type");b.scale=Dg(a);b.onBand=a.get("boundaryGap")&&"category"===b.type;b.inverse=a.get("inverse");if("angleAxis"===a.mainType){b.inverse=b.inverse!==a.get("clockwise");var c=a.get("startAngle");b.setExtent(c,c+(b.inverse?-360:360))}a.axis=b;b.model=a}function tj(b,a,c){a[1]>a[0]&&(a=a.slice().reverse());var d=b.coordToPoint([a[0],c]);b=b.coordToPoint([a[1],c]);return{x1:d[0],y1:d[1],x2:b[0],y2:b[1]}}function Mw(b){var a=b[0],c=b[b.length-1];a&&c&&1E-4>Math.abs(Math.abs(a.coord-c.coord)-360)&&b.pop()}function Nw(b){return b.get("stack")||"__ec_stack_"+b.seriesIndex}function CG(b,a,c){var d={},e=DG(ta(a.getSeriesByType(b),function(c){return!a.isSeriesFiltered(c)&&c.coordinateSystem&&"polar"===c.coordinateSystem.type}));a.eachSeriesByType(b,function(c){if("polar"===c.coordinateSystem.type){var a=c.getData(),b=c.coordinateSystem,f=b.getBaseAxis(),l=f.dim+b.model.componentIndex,m=Nw(c),n=e[l][m],l=n.offset,n=n.width,b=b.getOtherAxis(f),p=c.coordinateSystem.cx,q=c.coordinateSystem.cy,t=c.get("barMinHeight")||0,u=c.get("barMinAngle")||0;d[m]=d[m]||[];var w=a.mapDimension(b.dim),v=a.mapDimension(f.dim),z=Gc(a,w);c="radius"!==f.dim||!c.get("roundCap",!0);for(var r=b.dataToCoord(0),y=0,L=a.count();yA?-1:1)*t),D=G,A=G+A,C-=l,G=C-n,z&&(d[m][x][E]=A);else{var F=b.dataToCoord(D,c)-r,D=f.dataToCoord(x);Math.abs(F)F?-1:1)*u);D+=l;A=D+n;C=G;G+=F;z&&(d[m][x][E]=G)}a.setItemLayout(y,{cx:p,cy:q,r0:D,r:A,startAngle:-C*Math.PI/180,endAngle:-G*Math.PI/180})}}})}function DG(b){var a={};r(b,function(c,b){var d=c.getData(),e=c.coordinateSystem,h=e.getBaseAxis(),e=h.dim+e.model.componentIndex,k=h.getExtent(),l="category"===h.type?h.getBandWidth():Math.abs(k[1]-k[0])/d.count(),d=a[e]||{bandWidth:l,remainedWidth:l,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},h=d.stacks;a[e]=d;e=Nw(c);h[e]||d.autoWidthCount++;h[e]=h[e]||{width:0,maxWidth:0};var k=H(c.get("barWidth"),l),l=H(c.get("barMaxWidth"),l),m=c.get("barGap"),n=c.get("barCategoryGap");k&&!h[e].width&&(k=Math.min(d.remainedWidth,k),h[e].width=k,d.remainedWidth-=k);l&&(h[e].maxWidth=l);null!=m&&(d.gap=m);null!=n&&(d.categoryGap=n)});var c={};r(a,function(a,b){c[b]={};var d=a.stacks,e=H(a.categoryGap,a.bandWidth),h=H(a.gap,1),k=a.remainedWidth,l=a.autoWidthCount,m=(k-e)/(l+(l-1)*h),m=Math.max(m,0);r(d,function(c,a){var b=c.maxWidth;b&&bd&&(d=b.queryComponents({mainType:"dataZoom",subType:"select",id:e})[0])&&(d=d.getPercentRange(),c[0][e]={dataZoomId:e,start:d[0],end:d[1]})});c.push(a)}function XG(b){var a=bo(b);b=a[a.length-1];1b[1]&&b.reverse();return b}function cx(b,a,c,d){O("cartesian2d"===c.type,"lineX/lineY brush is available only in cartesian2d.");var e=c.getAxis(["x","y"][b]);c=co(C([0,1],function(c){return a?e.coordToData(e.toLocalCoord(d[c])):e.toGlobalCoord(e.dataToCoord(d[c]))}));var f=[];f[b]=c;f[1-b]=[NaN,NaN];return{values:c,xyMinMax:f}}function dx(b,a,c,d){return[a[0]-d[b]*c[0],a[1]-d[b]*c[1]]}function YG(b,a){var c=ex(b),d=ex(a),c=[c[0]/d[0],c[1]/d[1]];isNaN(c[0])&&(c[0]=1);isNaN(c[1])&&(c[1]=1);return c}function ex(b){return b?[b[0][1]-b[0][0],b[1][1]-b[1][0]]:[NaN,NaN]}function eo(b){b={xAxisIndex:b.get("xAxisIndex",!0),yAxisIndex:b.get("yAxisIndex",!0),xAxisId:b.get("xAxisId",!0),yAxisId:b.get("yAxisId",!0)};null==b.xAxisIndex&&null==b.xAxisId&&(b.xAxisIndex="all");null==b.yAxisIndex&&null==b.yAxisId&&(b.yAxisIndex="all");return b}function ZG(b,a,c,d,e){var f=c.isZoomActive;d&&"takeGlobalCursor"===d.type&&(f="dataZoomSelect"===d.key?d.dataZoomSelectActive:!1);c.isZoomActive=f;b.setIconStatus("zoom",f?"emphasis":"normal");a=(new fo(eo(b),a,{include:["grid"]})).makePanelOpts(e,function(c){return c.xAxisDeclared&&!c.yAxisDeclared?"lineX":!c.xAxisDeclared&&c.yAxisDeclared?"lineY":"rect"});c.brushController.setPanels(a).enableBrush(f&&a.length?{brushType:"auto",brushStyle:b.getModel("brushStyle").getItemStyle()}:!1)}function fx(b){var a=b.get("confine");return null!=a?!!a:"richText"===b.get("renderMode")}function $G(b,a,c){if(!da(c)||"inside"===c)return"";a=og(a);c="left"===c?"right":"right"===c?"left":"top"===c?"bottom":"top";var d="",e="";-1ba(c,a):a!==c)}function sx(b){return new aa(b[0][0],b[1][0],b[0][1]-b[0][0],b[1][1]-b[1][0])}function tx(b,a){return U({brushType:b.brushType,brushMode:b.brushMode,transformable:b.transformable,brushStyle:(new la(b.brushStyle)).getItemStyle(),removeOnClick:b.removeOnClick,z:b.z},a,!0)}function oH(b,a){if(a=a||b.get("type"))switch(a){case "category":return new Wi({ordinalMeta:b.getCategories(),extent:[Infinity,-Infinity]});case "time":return new pm({locale:b.ecModel.getLocaleModel(),useUTC:b.ecModel.get("useUTC")});default:return new Zd}}function ux(b,a,c,d,e,f){var g=a.get("color");e?(e.setColor(g),c.add(e),f&&f.onUpdate(e)):(e=b.get("symbol"),e=Pa(e,-1,-1,2,2,g),e.setStyle("strokeNoScale",!0),c.add(e),f&&f.onCreate(e));a=a.getItemStyle(["color"]);e.setStyle(a);d=U({rectHover:!0,z2:100},d,!0);a=b.get("symbolSize");a=a instanceof Array?a.slice():[+a,+a];d.scaleX=a[0]/2;d.scaleY=a[1]/2;if(c=b.get("symbolOffset"))d.x=d.x||0,d.y=d.y||0,d.x+=H(c[0],a[0]),d.y+=H(c[1],a[1]);b=b.get("symbolRotate");d.rotation=(b||0)*Math.PI/180||0;e.attr(d);e.updateTransform();return e}function vx(b,a,c,d,e,f){if(!b.dragging){var g=e.getModel("checkpointStyle");c=d.dataToCoord(e.getData().get("value",c));f||!g.get("animation",!0)?(b.attr({x:c,y:0}),a&&a.attr({shape:{x2:c}})):(f={duration:g.get("animationDuration",!0),easing:g.get("animationEasing",!0)},b.stopAnimation(null,!0),b.animateTo({x:c,y:0},f),a&&a.animateTo({shape:{x2:c}},f))}}function pH(b){b.registerAction({type:"timelineChange",event:"timelineChanged",update:"prepareAndUpdate"},function(a,c){var b=c.getComponent("timeline");b&&null!=a.currentIndex&&(b.setCurrentIndex(a.currentIndex),!b.get("loop",!0)&&b.isIndexMax()&&b.setPlayState(!1));c.resetOption("timeline",{replaceMerge:b.get("replaceMerge",!0)});return K({currentIndex:b.option.currentIndex},a)});b.registerAction({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},function(a,c){var b=c.getComponent("timeline");b&&null!=a.playState&&b.setPlayState(a.playState)})}function qH(b){b=b&&b.timeline;A(b)||(b=b?[b]:[]);r(b,function(a){a&&rH(a)})}function rH(b){var a=b.type,c={number:"value",time:"time"};c[a]&&(b.axisType=c[a],delete b.type);xx(b);b.hasOwnProperty("controlPosition")&&(a=b.controlStyle||(b.controlStyle={}),a.hasOwnProperty("position")||(a.position=b.controlPosition),"none"!==a.position||a.hasOwnProperty("show")||(a.show=!1,delete a.position),delete b.controlPosition);r(b.data||[],function(c){N(c)&&!A(c)&&(!c.hasOwnProperty("value")&&c.hasOwnProperty("name")&&(c.value=c.name),xx(c))})}function xx(b){var a=b.itemStyle||(b.itemStyle={}),a=a.emphasis||(a.emphasis={});b=b.label||b.label||{};var c=b.normal||(b.normal={}),d={normal:1,emphasis:1};r(b,function(a,b){d[b]||c.hasOwnProperty(b)||(c[b]=a)});a.label&&!b.hasOwnProperty("emphasis")&&(b.emphasis=a.label,delete a.label)}function xj(b){Id(b,"label",["show"])}function yj(b,a,c,d,e,f){var g=[],h=Gc(a,d)?a.getCalculationInfo("stackResultDimension"):d;b=jo(a,h,b);b=a.indicesOfNearest(h,b)[0];g[e]=a.get(c,b);g[f]=a.get(h,b);c=a.get(d,b);a=sq(a.get(d,b));a=Math.min(a,20);0<=a&&(g[f]=+g[f].toFixed(a));return[g,c]}function ch(b,a){var c=b.getData(),d=b.coordinateSystem,e;if(e=a)e=a,e=!(!isNaN(parseFloat(e.x))&&!isNaN(parseFloat(e.y)));if(e&&!A(a.coord)&&d)if(e=d.dimensions,d=yx(a,c,d,b),a=J(a),a.type&&ko[a.type]&&d.baseAxis&&d.valueAxis){var f=ba(e,d.baseAxis.dim);e=ba(e,d.valueAxis.dim);c=ko[a.type](c,d.baseDataDim,d.valueDataDim,f,e);a.coord=c[0];a.value=c[1]}else{d=[null!=a.xAxis?a.xAxis:a.radiusAxis,null!=a.yAxis?a.yAxis:a.angleAxis];for(f=0;2>f;f++)ko[d[f]]&&(d[f]=jo(c,c.mapDimension(e[f]),d[f]));a.coord=d}return a}function yx(b,a,c,d){var e={};null!=b.valueIndex||null!=b.valueDim?(e.valueDataDim=null!=b.valueIndex?a.getDimension(b.valueIndex):b.valueDim,e.valueAxis=c.getAxis(sH(d,e.valueDataDim)),e.baseAxis=c.getOtherAxis(e.valueAxis),e.baseDataDim=a.mapDimension(e.baseAxis.dim)):(e.baseAxis=d.getBaseAxis(),e.valueAxis=c.getOtherAxis(e.baseAxis),e.baseDataDim=a.mapDimension(e.baseAxis.dim),e.valueDataDim=a.mapDimension(e.valueAxis.dim));return e}function sH(b,a){var c=b.getData(),d=c.dimensions;a=c.getDimension(a);for(var e=0;ed?b.coord&&b.coord[d]:b.value}function jo(b,a,c){if("average"===c){var d=0,e=0;b.each(a,function(c,a){isNaN(c)||(d+=c,e++)});return d/e}return"median"===c?b.getMedian(a):b.getDataExtent(a)["max"===c?1:0]}function Ax(b,a,c){var d=a.coordinateSystem;b.each(function(e){var f=b.getItemModel(e),g,h=H(f.get("x"),c.getWidth()),f=H(f.get("y"),c.getHeight());if(!isNaN(h)&&!isNaN(f))g=[h,f];else if(a.getMarkerPosition)g=a.getMarkerPosition(b.getValues(b.dimensions,e));else if(d){g=b.get(d.dimensions[0],e);var k=b.get(d.dimensions[1],e);g=d.dataToPoint([g,k])}isNaN(h)||(g[0]=h);isNaN(f)||(g[1]=f);b.setItemLayout(e,g)})}function tH(b,a,c){var d;d=b?C(b&&b.dimensions,function(c){var b=a.getData().getDimensionInfo(a.getData().mapDimension(c))||{};return K({name:c},b)}):[{name:"value",type:"float"}];d=new Wa(d,c);c=C(c.get("data"),P(ch,a));b&&(c=ta(c,P(dh,b)));d.initData(c,null,b?zx:function(c){return c.value});return d}function zj(b){return!isNaN(b)&&!isFinite(b)}function Bx(b,a,c,d){var e=1-b,f=d.dimensions[b];return zj(a[e])&&zj(c[e])&&a[b]===c[b]&&d.getAxis(f).containData(a[b])}function uH(b,a){if("cartesian2d"===b.type){var c=a[0].coord,d=a[1].coord;if(c&&d&&(Bx(1,c,d,b)||Bx(0,c,d,b)))return!0}return dh(b,a[0])&&dh(b,a[1])}function lo(b,a,c,d,e){var f=d.coordinateSystem,g=b.getItemModel(a),h=H(g.get("x"),e.getWidth());e=H(g.get("y"),e.getHeight());if(isNaN(h)||isNaN(e)){d.getMarkerPosition?g=d.getMarkerPosition(b.getValues(b.dimensions,a)):(d=f.dimensions,g=b.get(d[0],a),d=b.get(d[1],a),g=f.dataToPoint([g,d]));if("cartesian2d"===f.type){var k=f.getAxis("x"),l=f.getAxis("y");d=f.dimensions;zj(b.get(d[0],a))?g[0]=k.toGlobalCoord(k.getExtent()[c?0:1]):zj(b.get(d[1],a))&&(g[1]=l.toGlobalCoord(l.getExtent()[c?0:1]))}isNaN(h)||(g[0]=h);isNaN(e)||(g[1]=e)}else g=[h,e];b.setItemLayout(a,g)}function vH(b,a,c){var d;d=b?C(b&&b.dimensions,function(c){var b=a.getData().getDimensionInfo(a.getData().mapDimension(c))||{};return K({name:c},b)}):[{name:"value",type:"float"}];var e=new Wa(d,c);d=new Wa(d,c);var f=new Wa([],c);c=C(c.get("data"),P(wH,a,b,c));b&&(c=ta(c,P(uH,b)));b=b?zx:function(c){return c.value};e.initData(C(c,function(c){return c[0]}),null,b);d.initData(C(c,function(c){return c[1]}),null,b);f.initData(C(c,function(c){return c[2]}));f.hasItemOption=!0;return{from:e,to:d,line:f}}function vd(b){return!isNaN(b)&&!isFinite(b)}function xH(b,a){var c=a.coord[0],d=a.coord[1];if("cartesian2d"===b.type){var e;if(e=c&&d)(e=vd(c[0])&&vd(d[0]))||(e=vd(c[1])&&vd(d[1]));if(e)return!0}return dh(b,{coord:c,x:a.x0,y:a.y0})||dh(b,{coord:d,x:a.x1,y:a.y1})}function Cx(b,a,c,d,e){var f=d.coordinateSystem,g=b.getItemModel(a),h=H(g.get(c[0]),e.getWidth());e=H(g.get(c[1]),e.getHeight());if(isNaN(h)||isNaN(e)){if(d.getMarkerPosition)d=d.getMarkerPosition(b.getValues(c,a));else{var g=b.get(c[0],a),k=b.get(c[1],a);d=[g,k];f.clampData&&f.clampData(d,d);d=f.dataToPoint(d,!0)}if("cartesian2d"===f.type){var l=f.getAxis("x"),f=f.getAxis("y"),g=b.get(c[0],a),k=b.get(c[1],a);vd(g)?d[0]=l.toGlobalCoord(l.getExtent()["x0"===c[0]?0:1]):vd(k)&&(d[1]=f.toGlobalCoord(f.getExtent()["y0"===c[1]?0:1]))}isNaN(h)||(d[0]=h);isNaN(e)||(d[1]=e)}else d=[h,e];return d}function yH(b,a,c){var d,e;e=["x0","y0","x1","y1"];b?(d=C(b&&b.dimensions,function(c){var b=a.getData(),b=b.getDimensionInfo(b.mapDimension(c))||{};return K({name:c},b)}),e=new Wa(C(e,function(c,a){return{name:c,type:d[a%2].type}}),c)):(d=[{name:"value",type:"float"}],e=new Wa(d,c));c=C(c.get("data"),P(zH,a,b,c));b&&(c=ta(c,P(xH,b)));e.initData(c,null,b?function(c,a,b,d){return c.coord[Math.floor(d/2)][d%2]}:function(c){return c.value});e.hasItemOption=!0;return e}function Dx(b,a,c,d,e,f,g){"line"!==a&&0>a.indexOf("empty")?(a=c.getItemStyle(),b.style.stroke=d,b.style.decal=f,g||(a.stroke=e)):a=c.getItemStyle(["borderWidth","borderColor"]);b.setStyle(a);return b}function Ex(b,a,c,d){mo(b,a,c,d);c.dispatchAction({type:"legendToggleSelect",name:null!=b?b:a});no(b,a,c,d)}function Fx(b){b=b.getZr().storage.getDisplayList();for(var a,c=0,d=b.length;cc["type_"+a]&&(a=e);d=d&&b.get("preventDefaultMouseMove",!0)});return{controlType:a,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!d}}}function LH(b){b.registerProcessor(b.PRIORITY.PROCESSOR.FILTER,function(a,c){var b=po(c),e=b.coordSysRecordMap||(b.coordSysRecordMap=R());e.each(function(c){c.dataZoomInfoMap=null});a.eachComponent({mainType:"dataZoom",subType:"inside"},function(a){var b=Xw(a);r(b.infoList,function(b){var d=b.model.uid,d=e.get(d)||e.set(d,HH(c,b.model));(d.dataZoomInfoMap||(d.dataZoomInfoMap=R())).set(a.uid,{dzReferCoordSysInfo:b,model:a,getRange:null})})});e.each(function(c){var a=c.controller,b,d=c.dataZoomInfoMap;if(d){var f=d.keys()[0];null!=f&&(b=d.get(f))}b?(d=KH(d),a.enable(d.controlType,d.opt),a.setPointerChecker(c.containsPoint),tg(c,"dispatchAction",b.model.get("throttle",!0),"fixRate")):Jx(e,c)})})}function Kx(b){return function(a,c,d,e){var f=this.range,g=f.slice(),h=a.axisModels[0];if(h&&(a=b(g,h,a,c,d,e),fe(a,g,[0,100],"all"),this.range=g,f[0]!==g[0]||f[1]!==g[1]))return g}}function Lx(b){$n(b);b.registerComponentModel(MH);b.registerComponentView(NH);LH(b)}function Mx(b){return"vertical"===b?"ns-resize":"ew-resize"}function Nx(b){b.registerComponentModel(OH);b.registerComponentView(PH);$n(b)}function Ox(b,a,c){if(c[0]===c[1])return c.slice();b=(c[1]-c[0])/200;a=c[0];for(var d=[],e=0;200>=e&&ah;h++)g[Qx[1-e][h]]=f[h],g[d[h]]=2===h?c[0]:b[d[h]];c=[["x","width",3],["y","height",0]][e];b=Aa(g,a,b.padding);return d[(b.margin[c[2]]||0)+b[c[0]]+.5*b[c[1]]<.5*a[c[1]]?0:1]}function Aj(b,a){r(b||[],function(c){null!=c.dataIndex&&(c.dataIndexInside=c.dataIndex,c.dataIndex=null);c.highlightKey="visualMap"+(a?a.componentIndex:"")});return b}function Rx(b,a,c,d){return new bb({shape:{points:b},draggable:!!c,cursor:a,drift:c,onmousemove:function(c){Bc(c.event)},ondragend:d})}function Sx(b){var a=b.get("hoverLinkOnHandle");return!(null==a?!b.get("realtime"):!a)}function Tx(b){return"vertical"===b?"ns-resize":"ew-resize"}function QH(b,a,c,d){function e(c){return g[c]}function f(c,a){g[c]=a}a=a.targetVisuals[d];d=La.prepareVisualTypes(a);var g={color:ug(b.getData(),"color")};b=0;for(var h=d.length;bk)){if(m=d())var p=h.get(["general","withTitle"]),m=c(p,{title:m});else m=h.get(["general","withoutTitle"]);var q=[],p=1l?(f=h.get(["data","partialData"]),e+=c(f,{displayCnt:l})):e+=h.get(["data","allData"]);f=[];for(m=0;mne[0]?-1:1,e=0>ne[1]?-1:1,b=((ne[0]-b)*c+b)/ne[0]||0,c=((ne[1]-e)*c+e)/ne[1]||0;a[0]*=b;a[1]*=b;a[2]*=c;a[3]*=c}this.invTransform=this.invTransform||nb();Ke(this.invTransform,a)};b.prototype.getLocalTransform=function(a){return b.getLocalTransform(this,a)};b.prototype.getComputedTransform=function(){for(var a=this,c=[];a;)c.push(a),a=a.parent;for(;a=c.pop();)a.updateTransform();return this.transform};b.prototype.setLocalTransform=function(a){if(a){var c=a[0]*a[0]+a[1]*a[1],b=a[2]*a[2]+a[3]*a[3];Gd(c-1)&&(c=Math.sqrt(c));Gd(b-1)&&(b=Math.sqrt(b));0>a[0]&&(c=-c);0>a[3]&&(b=-b);this.rotation=Math.atan2(-a[1]/b,a[0]/c);0>c&&0>b&&(this.rotation+=Math.PI,c=-c,b=-b);this.x=a[4];this.y=a[5];this.scaleX=c;this.scaleY=b}};b.prototype.decomposeTransform=function(){if(this.transform){var a=this.parent,c=this.transform;a&&a.transform&&(Fd(wd,a.invTransform,c),c=wd);var a=this.originX,b=this.originY;if(a||b)to[4]=a,to[5]=b,Fd(wd,c,to),wd[4]-=a,wd[5]-=b,c=wd;this.setLocalTransform(c)}};b.prototype.getGlobalScale=function(a){var c=this.transform;a=a||[];if(!c)return a[0]=1,a[1]=1,a;a[0]=Math.sqrt(c[0]*c[0]+c[1]*c[1]);a[1]=Math.sqrt(c[2]*c[2]+c[3]*c[3]);0>c[0]&&(a[0]=-a[0]);0>c[3]&&(a[1]=-a[1]);return a};b.prototype.transformCoordToLocal=function(a,c){var b=[a,c],e=this.invTransform;e&&Qa(b,b,e);return b};b.prototype.transformCoordToGlobal=function(a,c){var b=[a,c],e=this.transform;e&&Qa(b,b,e);return b};b.prototype.getLineScale=function(){var a=this.transform;return a&&1E-10(b*=2)?.5*b*b:-.5*(--b*(b-2)-1)},cubicIn:function(b){return b*b*b},cubicOut:function(b){return--b*b*b+1},cubicInOut:function(b){return 1>(b*=2)?.5*b*b*b:.5*((b-=2)*b*b+2)},quarticIn:function(b){return b*b*b*b},quarticOut:function(b){return 1- --b*b*b*b},quarticInOut:function(b){return 1>(b*=2)?.5*b*b*b*b:-.5*((b-=2)*b*b*b-2)},quinticIn:function(b){return b*b*b*b*b},quinticOut:function(b){return--b*b*b*b*b+1},quinticInOut:function(b){return 1>(b*=2)?.5*b*b*b*b*b:.5*((b-=2)*b*b*b*b+2)},sinusoidalIn:function(b){return 1-Math.cos(b*Math.PI/2)},sinusoidalOut:function(b){return Math.sin(b*Math.PI/2)},sinusoidalInOut:function(b){return.5*(1-Math.cos(Math.PI*b))},exponentialIn:function(b){return 0===b?0:Math.pow(1024,b-1)},exponentialOut:function(b){return 1===b?1:1-Math.pow(2,-10*b)},exponentialInOut:function(b){return 0===b?0:1===b?1:1>(b*=2)?.5*Math.pow(1024,b-1):.5*(-Math.pow(2,-10*(b-1))+2)},circularIn:function(b){return 1-Math.sqrt(1-b*b)},circularOut:function(b){return Math.sqrt(1- --b*b)},circularInOut:function(b){return 1>(b*=2)?-.5*(Math.sqrt(1-b*b)-1):.5*(Math.sqrt(1-(b-=2)*b)+1)},elasticIn:function(b){var a,c=.1;if(0===b)return 0;if(1===b)return 1;!c||1>c?(c=1,a=.1):a=.4*Math.asin(1/c)/(2*Math.PI);return-(c*Math.pow(2,10*--b)*Math.sin(2*(b-a)*Math.PI/.4))},elasticOut:function(b){var a,c=.1;if(0===b)return 0;if(1===b)return 1;!c||1>c?(c=1,a=.1):a=.4*Math.asin(1/c)/(2*Math.PI);return c*Math.pow(2,-10*b)*Math.sin(2*(b-a)*Math.PI/.4)+1},elasticInOut:function(b){var a,c=.1;if(0===b)return 0;if(1===b)return 1;!c||1>c?(c=1,a=.1):a=.4*Math.asin(1/c)/(2*Math.PI);return 1>(b*=2)?-.5*c*Math.pow(2,10*--b)*Math.sin(2*(b-a)*Math.PI/.4):c*Math.pow(2,-10*--b)*Math.sin(2*(b-a)*Math.PI/.4)*.5+1},backIn:function(b){return b*b*(2.70158*b-1.70158)},backOut:function(b){return--b*b*(2.70158*b+1.70158)+1},backInOut:function(b){return 1>(b*=2)?.5*b*b*(3.5949095*b-2.5949095):.5*((b-=2)*b*(3.5949095*b+2.5949095)+2)},bounceIn:function(b){return 1-Ej.bounceOut(1-b)},bounceOut:function(b){return b<1/2.75?7.5625*b*b:b<2/2.75?7.5625*(b-=1.5/2.75)*b+.75:b<2.5/2.75?7.5625*(b-=2.25/2.75)*b+.9375:7.5625*(b-=2.625/2.75)*b+.984375},bounceInOut:function(b){return.5>b?.5*Ej.bounceIn(2*b):.5*Ej.bounceOut(2*b-1)+.5}},uI=function(){function b(a){this._initialized=!1;this._pausedTime=this._startTime=0;this._paused=!1;this._life=a.life||1E3;this._delay=a.delay||0;this.loop=null==a.loop?!1:a.loop;this.gap=a.gap||0;this.easing=a.easing||"linear";this.onframe=a.onframe;this.ondestroy=a.ondestroy;this.onrestart=a.onrestart}b.prototype.step=function(a,c){this._initialized||(this._startTime=a+this._delay,this._initialized=!0);if(this._paused)this._pausedTime+=c;else{var b=(a-this._startTime-this._pausedTime)/this._life;0>b&&(b=0);var b=Math.min(b,1),e=this.easing,e="string"===typeof e?Ej[e]:e,e="function"===typeof e?e(b):b;this.onframe&&this.onframe(e);if(1===b)if(this.loop)this._restart(a),this.onrestart&&this.onrestart();else return!0;return!1}};b.prototype._restart=function(a){this._startTime=a-(a-this._startTime-this._pausedTime)%this._life+this.gap;this._pausedTime=0};b.prototype.pause=function(){this._paused=!0};b.prototype.resume=function(){this._paused=!1};return b}(),hy=function(){return function(b){this.value=b}}(),vI=function(){function b(){this._len=0}b.prototype.insert=function(a){a=new hy(a);this.insertEntry(a);return a};b.prototype.insertEntry=function(a){this.head?(this.tail.next=a,a.prev=this.tail,a.next=null,this.tail=a):this.head=this.tail=a;this._len++};b.prototype.remove=function(a){var c=a.prev,b=a.next;c?c.next=b:this.head=b;b?b.prev=c:this.tail=c;a.next=a.prev=null;this._len--};b.prototype.len=function(){return this._len};b.prototype.clear=function(){this.head=this.tail=null;this._len=0};return b}(),Yf=function(){function b(a){this._list=new vI;this._maxSize=10;this._map={};this._maxSize=a}b.prototype.put=function(a,c){var b=this._list,e=this._map,f=null;if(null==e[a]){var g=b.len(),h=this._lastRemovedEntry;g>=this._maxSize&&0=this.maxTime?this.maxTime=a:this._needsSort=!0;var b=this.keyframes,e=b.length;if(this.interpolable)if(Xa(c)){var f=Xa(c&&c[0])?2:1;if(0c)m=0;else if(cc);m++);m=Math.min(m-1,g-2)}var n=f[m+1],p=f[m];if(p&&n){this._lastFrame=m;this._lastFramePercent=c;var q=n.percent-p.percent;if(0!==q){var q=(c-p.percent)/q,t=b?this._additiveValue:l?hh:a[h];(0g-2?g-1:m+1][e],e=f[m>g-3?g-1:m+2][e];if(0b&&isFinite(b)&&(a+=b,b=-b);0>e&&isFinite(e)&&(c+=e,e=-e);this.x=a;this.y=c;this.width=b;this.height=e}b.prototype.union=function(a){var c=Fj(a.x,this.x),b=Fj(a.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=Gj(a.x+a.width,this.x+this.width)-c:this.width=a.width;isFinite(this.y)&&isFinite(this.height)?this.height=Gj(a.y+a.height,this.y+this.height)-b:this.height=a.height;this.x=c;this.y=b};b.prototype.applyTransform=function(a){b.applyTransform(this,this,a)};b.prototype.calculateTransform=function(a){var c=a.width/this.width,b=a.height/this.height,e=nb();Rb(e,e,[-this.x,-this.y]);Vh(e,e,[c,b]);Rb(e,e,[a.x,a.y]);return e};b.prototype.intersect=function(a,c){if(!a)return!1;a instanceof b||(a=b.create(a));var d=this.x,e=this.x+this.width,f=this.y,g=this.y+this.height,h=a.x,k=a.x+a.width,l=a.y,m=a.y+a.height,n=!(eq&&(q=z,tq&&(w=this.x&&a<=this.x+this.width&&c>=this.y&&c<=this.y+this.height};b.prototype.clone=function(){return new b(this.x,this.y,this.width,this.height)};b.prototype.copy=function(a){b.copy(this,a)};b.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}};b.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)};b.prototype.isZero=function(){return 0===this.width||0===this.height};b.create=function(a){return new b(a.x,a.y,a.width,a.height)};b.copy=function(a,c){a.x=c.x;a.y=c.y;a.width=c.width;a.height=c.height};b.applyTransform=function(a,c,d){if(d)if(1E-5>d[1]&&-1E-5d[2]&&-1E-5a.width&&(a.x+=a.width,a.width=-a.width);0>a.height&&(a.y+=a.height,a.height=-a.height)}else oe.x=qe.x=c.x,oe.y=re.y=c.y,pe.x=re.x=c.x+c.width,pe.y=qe.y=c.y+c.height,oe.transform(d),re.transform(d),pe.transform(d),qe.transform(d),a.x=Fj(oe.x,pe.x,qe.x,re.x),a.y=Fj(oe.y,pe.y,qe.y,re.y),c=Gj(oe.x,pe.x,qe.x,re.x),d=Gj(oe.y,pe.y,qe.y,re.y),a.width=c-a.x,a.height=d-a.y;else a!==c&&b.copy(a,c)};return b}(),iq={},Hj,iy,lA={measureText:function(b,a){Hj||(Hj=Wd().getContext("2d"));iy!==a&&(iy=Hj.font=a||"12px sans-serif");return Hj.measureText(b)}},jy=1;"undefined"!==typeof window&&(jy=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var Ij=jy,vo="x y scaleX scaleY originX originY rotation ignore".split(" "),yI={x:!0,y:!0,scaleX:!0,scaleY:!0,originX:!0,originY:!0,rotation:!0,ignore:!1},Ef={},cc=new aa(0,0,0,0),Hb=function(){function b(a){this.id=Vk++;this.animators=[];this.currentStates=[];this.states={};this._init(a)}b.prototype._init=function(a){this.attr(a)};b.prototype.drift=function(a,c,b){switch(this.draggable){case "horizontal":c=0;break;case "vertical":a=0}b=this.transform;b||(b=this.transform=[1,0,0,1,0,0]);b[4]+=a;b[5]+=c;this.decomposeTransform();this.markRedraw()};b.prototype.beforeUpdate=function(){};b.prototype.afterUpdate=function(){};b.prototype.update=function(){this.updateTransform();this.__dirty&&this.updateInnerText()};b.prototype.updateInnerText=function(a){var c=this._textContent;if(c&&(!c.ignore||a)){this.textConfig||(this.textConfig={});var b=this.textConfig,e=b.local,f=c.attachedTransform,g=a=void 0,h=!1;f.parent=e?this:null;var k=!1;f.x=c.x;f.y=c.y;f.originX=c.originX;f.originY=c.originY;f.rotation=c.rotation;f.scaleX=c.scaleX;f.scaleY=c.scaleY;if(null!=b.position){b.layoutRect?cc.copy(b.layoutRect):cc.copy(this.getBoundingRect());e||cc.applyTransform(this.transform);this.calculateTextPosition?this.calculateTextPosition(Ef,b,cc):kq(Ef,b,cc);f.x=Ef.x;f.y=Ef.y;a=Ef.align;var g=Ef.verticalAlign,l=b.origin;if(l&&null!=b.rotation){var m;"center"===l?(m=.5*cc.width,l=.5*cc.height):(m=Ub(l[0],cc.width),l=Ub(l[1],cc.height));k=!0;f.originX=-f.x+m+(e?0:cc.x);f.originY=-f.y+l+(e?0:cc.y)}}null!=b.rotation&&(f.rotation=b.rotation);if(e=b.offset)f.x+=e[0],f.y+=e[1],k||(f.originX=-e[0],f.originY=-e[1]);e=null==b.inside?"string"===typeof b.position&&0<=b.position.indexOf("inside"):b.inside;f=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={});k=void 0;if(e&&this.canBeInsideText()){e=b.insideFill;b=b.insideStroke;if(null==e||"auto"===e)e=this.getInsideTextFill();if(null==b||"auto"===b)b=this.getInsideTextStroke(e),k=!0}else{e=b.outsideFill;b=b.outsideStroke;if(null==e||"auto"===e)e=this.getOutsideFill();if(null==b||"auto"===b)b=this.getOutsideStroke(e),k=!0}e=e||"#000";if(e!==f.fill||b!==f.stroke||k!==f.autoStroke||a!==f.align||g!==f.verticalAlign)h=!0,f.fill=e,f.stroke=b,f.autoStroke=k,f.align=a,f.verticalAlign=g,c.setDefaultTextStyle(f);h&&c.dirtyStyle();c.markRedraw()}};b.prototype.canBeInsideText=function(){return!0};b.prototype.getInsideTextFill=function(){return"#fff"};b.prototype.getInsideTextStroke=function(a){return"#000"};b.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?"#ccc":"#333"};b.prototype.getOutsideStroke=function(a){a=this.__zr&&this.__zr.getBackgroundColor();(a="string"===typeof a&&eb(a))||(a=[255,255,255,1]);for(var c=a[3],b=this.__zr.isDarkMode(),e=0;3>e;e++)a[e]=a[e]*c+(b?0:255)*(1-c);a[3]=1;return Tb(a,"rgba")};b.prototype.traverse=function(a,c){};b.prototype.attrKV=function(a,c){"textConfig"===a?this.setTextConfig(c):"textContent"===a?this.setTextContent(c):"clipPath"===a?this.setClipPath(c):"extra"===a?(this.extra=this.extra||{},F(this.extra,c)):this[a]=c};b.prototype.hide=function(){this.ignore=!0;this.markRedraw()};b.prototype.show=function(){this.ignore=!1;this.markRedraw()};b.prototype.attr=function(a,c){if("string"===typeof a)this.attrKV(a,c);else if(N(a))for(var b=ia(a),e=0;e+new Date-+this.__lastTouchMoment&&dc.click.call(this,b)},pointerdown:function(b){dc.mousedown.call(this,b)},pointermove:function(b){Rk(b)||dc.mousemove.call(this,b)},pointerup:function(b){dc.mouseup.call(this,b)},pointerout:function(b){Rk(b)||dc.mouseout.call(this,b)}};r(["click","dblclick","contextmenu"],function(b){dc[b]=function(a){a=Ab(this.dom,a);this.trigger(b,a)}});var yo={pointermove:function(b){Rk(b)||yo.mousemove.call(this,b)},pointerup:function(b){yo.mouseup.call(this,b)},mousemove:function(b){this.trigger("mousemove",b)},mouseup:function(b){var a=this.__pointerCapturing;this.__togglePointerCapture(!1);this.trigger("mouseup",b);a&&(b.zrEventControl="only_globalout",this.trigger("mouseout",b))}},ly=function(){return function(b,a){this.mounted={};this.listenerOpts={};this.touching=!1;this.domTarget=b;this.domHandlers=a}}(),BI=function(b){function a(c,a){var d=b.call(this)||this;d.__pointerCapturing=!1;d.dom=c;d.painterRoot=a;d._localHandlerScope=new ly(c,dc);xo&&(d._globalHandlerScope=new ly(document,yo));oA(d,d._localHandlerScope);return d}x(a,b);a.prototype.dispose=function(){Tk(this._localHandlerScope);xo&&Tk(this._globalHandlerScope)};a.prototype.setCursor=function(c){this.dom.style&&(this.dom.style.cursor=c||"default")};a.prototype.__togglePointerCapture=function(c){this.__mayPointerCapture=null;if(xo&&+this.__pointerCapturing^+c){this.__pointerCapturing=c;var a=this._globalHandlerScope;c?pA(this,a):Tk(a)}};return a}($b),M=function(b){function a(c){var a=b.call(this)||this;a.isGroup=!0;a._children=[];a.attr(c);return a}x(a,b);a.prototype.childrenRef=function(){return this._children};a.prototype.children=function(){return this._children.slice()};a.prototype.childAt=function(c){return this._children[c]};a.prototype.childOfName=function(c){for(var a=this._children,b=0;bf)return this;b.splice(f,1);c.parent=null;a&&c.removeSelfFromZr(a);a&&a.refresh();return this};a.prototype.removeAll=function(){for(var c=this._children,a=this.__zr,b=0;bthis._sleepAfterStill&&this.animation.stop())};b.prototype.setSleepAfterStill=function(a){this._sleepAfterStill=a};b.prototype.wakeUp=function(){this.animation.start();this._stillFrameAccum=0};b.prototype.addHover=function(a){};b.prototype.removeHover=function(a){};b.prototype.clearHover=function(){};b.prototype.refreshHover=function(){this._needsRefreshHover=!0};b.prototype.refreshHoverImmediately=function(){this._needsRefreshHover=!1;this.painter.refreshHover&&"canvas"===this.painter.getType()&&this.painter.refreshHover()};b.prototype.resize=function(a){a=a||{};this.painter.resize(a.width,a.height);this.handler.resize()};b.prototype.clearAnimation=function(){this.animation.clear()};b.prototype.getWidth=function(){return this.painter.getWidth()};b.prototype.getHeight=function(){return this.painter.getHeight()};b.prototype.pathToImage=function(a,c){if(this.painter.pathToImage)return this.painter.pathToImage(a,c)};b.prototype.setCursorStyle=function(a){this.handler.setCursorStyle(a)};b.prototype.findHover=function(a,c){return this.handler.findHover(a,c)};b.prototype.on=function(a,c,b){this.handler.on(a,c,b);return this};b.prototype.off=function(a,c){this.handler.off(a,c)};b.prototype.trigger=function(a,c){this.handler.trigger(a,c)};b.prototype.clear=function(){for(var a=this.storage.getRoots(),c=0;cthis._ux||Lc(c-this._yi)>this._uy||5>this._len;this.addData(qa.L,a,c);this._ctx&&b&&(this._needsDash?this._dashedLineTo(a,c):this._ctx.lineTo(a,c));b&&(this._xi=a,this._yi=c);return this};b.prototype.bezierCurveTo=function(a,c,b,e,f,g){this.addData(qa.C,a,c,b,e,f,g);this._ctx&&(this._needsDash?this._dashedBezierTo(a,c,b,e,f,g):this._ctx.bezierCurveTo(a,c,b,e,f,g));this._xi=f;this._yi=g;return this};b.prototype.quadraticCurveTo=function(a,c,b,e){this.addData(qa.Q,a,c,b,e);this._ctx&&(this._needsDash?this._dashedQuadraticTo(a,c,b,e):this._ctx.quadraticCurveTo(a,c,b,e));this._xi=b;this._yi=e;return this};b.prototype.arc=function(a,c,b,e,f,g){mh[0]=e;mh[1]=f;Pq(mh,g);e=mh[0];f=mh[1];this.addData(qa.A,a,c,b,b,e,f-e,0,g?0:1);this._ctx&&this._ctx.arc(a,c,b,e,f,g);this._xi=ve(f)*b+a;this._yi=we(f)*b+c;return this};b.prototype.arcTo=function(a,c,b,e,f){this._ctx&&this._ctx.arcTo(a,c,b,e,f);return this};b.prototype.rect=function(a,c,b,e){this._ctx&&this._ctx.rect(a,c,b,e);this.addData(qa.R,a,c,b,e);return this};b.prototype.closePath=function(){this.addData(qa.Z);var a=this._ctx,c=this._x0,b=this._y0;a&&(this._needsDash&&this._dashedLineTo(c,b),a.closePath());this._xi=c;this._yi=b;return this};b.prototype.fill=function(a){a&&a.fill();this.toStatic()};b.prototype.stroke=function(a){a&&a.stroke();this.toStatic()};b.prototype.setLineDash=function(a){if(a instanceof Array){this._lineDash=a;for(var c=this._dashIdx=0,b=0;bd.length&&(this._expandData(),d=this.data);for(var n=0;ng&&(g=b+g);g%=b;b=h-g*l;for(g=k-g*m;0l&&b>=a||0===l&&(0m&&g>=c);)if(q=this._dashIdx,n=e[q],b+=l*n,g+=m*n,this._dashIdx=(q+1)%p,!(0l&&b>h||0m&&g>k))f[q%2?"moveTo":"lineTo"](0<=l?kh(b,a):lh(b,a),0<=m?kh(g,c):lh(g,c));l=b-a;m=g-c;this._dashOffset=-Nj(l*l+m*m)};b.prototype._dashedBezierTo=function(a,c,b,e,f,g){var d=this._ctx,k=this._dashSum,l=this._dashOffset,m=this._lineDash,n=this._xi,p=this._yi,q=0,t=this._dashIdx,u=m.length,w,v,z,r,y=0;0>l&&(l=k+l);l%=k;for(k=0;1>k;k+=.1)w=Oa(n,a,b,f,k+.1)-Oa(n,a,b,f,k),v=Oa(p,c,e,g,k+.1)-Oa(p,c,e,g,k),q+=Nj(w*w+v*v);for(;tl);t++);for(k=(y-l)/q;1>=k;)z=Oa(n,a,b,f,k),r=Oa(p,c,e,g,k),t%2?d.moveTo(z,r):d.lineTo(z,r),k+=m[t]/q,t=(t+1)%u;0!==t%2&&d.lineTo(f,g);w=f-z;v=g-r;this._dashOffset=-Nj(w*w+v*v)};b.prototype._dashedQuadraticTo=function(a,c,b,e){var d=b,g=e;b=(b+2*a)/3;e=(e+2*c)/3;a=(this._xi+2*a)/3;c=(this._yi+2*c)/3;this._dashedBezierTo(a,c,b,e,d,g)};b.prototype.toStatic=function(){if(this._saveData){var a=this.data;a instanceof Array&&(a.length=this._len,Go&&11L%se&&1E-4v&&(v+=se),z%=se,0>z&&(z+=se),v>z&&!y?z+=se:vv&&(Mj[0]=Fo(y)*t+k,Mj[1]=Eo(y)*w+q,u(n,Mj,n),r(p,Mj,p));c=ve(l)*m+c;b=we(l)*b+h;break;case qa.R:e=c=a[g++];f=b=a[g++];m=a[g++];k=a[g++];h=e;l=f;m=e+m;k=f+k;q=yc;t=zc;q[0]=$a(h,m);q[1]=$a(l,k);t[0]=Ta(h,m);t[1]=Ta(l,k);break;case qa.Z:c=e,b=f}Qc(xc,xc,yc);Rc(xd,xd,zc)}0===g&&(xc[0]=xc[1]=xd[0]=xd[1]=0);return new aa(xc[0],xc[1],xd[0]-xc[0],xd[1]-xc[1])};b.prototype._calculateLength=function(){var a=this.data,c=this._len,b=this._ux,e=this._uy,f=0,g=0,h=0,k=0;this._pathSegLen||(this._pathSegLen=[]);for(var l=this._pathSegLen,m=0,n=0,p=0;pb||Lc(v)>e||p===c-1)u=Math.sqrt(w*w+v*v),f=q,g=t;break;case qa.C:for(var u=a[p++],z=a[p++],q=a[p++],t=a[p++],w=a[p++],v=a[p++],r=w,y=v,L=f,D=g,x=0,E=1;10>=E;E++)var G=.1*E,A=Oa(f,u,q,r,G),G=Oa(g,z,t,y,G),L=A-L,D=G-D,x=x+Math.sqrt(L*L+D*D),L=A,D=G;u=x;f=w;g=v;break;case qa.Q:u=a[p++];z=a[p++];q=a[p++];t=a[p++];w=f;v=g;f=u;g=z;u=q;z=t;D=w;E=v;r=0;for(y=1;10>=y;y++)A=.1*y,x=Za(w,f,u,A),A=Za(v,g,z,A),D=x-D,E=A-E,r+=Math.sqrt(D*D+E*E),D=x,E=A;u=r;f=q;g=t;break;case qa.A:f=a[p++];q=a[p++];g=a[p++];w=a[p++];u=a[p++];z=a[p++];v=z+u;p+=1;p++;t&&(h=ve(u)*g+f,k=we(u)*w+q);u=lh(g,w)*kh(Zc,Math.abs(z));f=ve(v)*g+f;g=we(v)*w+q;break;case qa.R:h=f=a[p++];k=g=a[p++];t=a[p++];q=a[p++];u=2*t+2*q;break;case qa.Z:w=h-f,v=k-g,u=Math.sqrt(w*w+v*v),f=h,g=k}0<=u&&(l[n++]=u,m+=u)}return this._pathLen=m};b.prototype.rebuildPath=function(a,c){var b=this.data,e=this._ux,f=this._uy,g=this._len,h,k,l,m,n,p,q=1>c,t,u,w=0,v=0;if(q&&(this._pathSegLen||this._calculateLength(),t=this._pathSegLen,u=this._pathLen,u*=c,!u))return;var z=0;a:for(;ze||Lc(p-m)>f||z===g-1){if(q){r=t[v++];if(w+r>u){b=(u-w)/r;a.lineTo(l*(1-b)+n*b,m*(1-b)+p*b);break a}w+=r}a.lineTo(n,p);l=n;m=p}break;case qa.C:n=b[z++];p=b[z++];var y=b[z++],L=b[z++],D=b[z++],x=b[z++];if(q){r=t[v++];if(w+r>u){b=(u-w)/r;Re(l,n,y,D,b,te);Re(m,p,L,x,b,ue);a.bezierCurveTo(te[1],ue[1],te[2],ue[2],te[3],ue[3]);break a}w+=r}a.bezierCurveTo(n,p,y,L,D,x);l=D;m=x;break;case qa.Q:n=b[z++];p=b[z++];y=b[z++];L=b[z++];if(q){r=t[v++];if(w+r>u){b=(u-w)/r;Yc(l,n,y,b,te);Yc(m,p,L,b,ue);a.quadraticCurveTo(te[1],ue[1],te[2],ue[2]);break a}w+=r}a.quadraticCurveTo(n,p,y,L);l=y;m=L;break;case qa.A:l=b[z++];m=b[z++];L=b[z++];p=b[z++];var D=b[z++],x=b[z++],E=b[z++],G=!b[z++],A=L>p?L:p,C=.001u&&(y=D+x*(u-w)/r,F=!0),w+=r);C&&a.ellipse?a.ellipse(l,m,L,p,E,D,y,G):a.arc(l,m,A,D,y,G);if(F)break a;n&&(h=ve(D)*L+l,k=we(D)*p+m);l=ve(y)*L+l;m=we(y)*p+m;break;case qa.R:h=l=b[z];k=m=b[z+1];n=b[z++];p=b[z++];y=b[z++];L=b[z++];if(q){r=t[v++];if(w+r>u){h=u-w;a.moveTo(n,p);a.lineTo(n+kh(h,y),p);h-=y;0u){b=(u-w)/r;a.lineTo(l*(1-b)+h*b,m*(1-b)+k*b);break a}w+=r}a.closePath();l=h;m=k}}};b.CMD=qa;b.initDefaultProps=function(){var a=b.prototype;a._saveData=!0;a._needsDash=!1;a._dashOffset=0;a._dashIdx=0;a._dashSum=0;a._ux=0;a._uy=0}();return b}(),Rq=2*Math.PI,dg=2*Math.PI,bd=pc.CMD,Te=2*Math.PI,hb=[-1,-1,-1],Fb=[-1,-1],oy=K({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},Ud),JI={style:K({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},Jj.style)},Ho="x y rotation scaleX scaleY originX originY invisible culling z z2 zlevel parent".split(" "),Y=function(b){function a(c){return b.call(this,c)||this}x(a,b);a.prototype.update=function(){var c=this;b.prototype.update.call(this);var d=this.style;if(d.decal){var e=this._decalEl=this._decalEl||new a;e.buildPath===a.prototype.buildPath&&(e.buildPath=function(a){c.buildPath(a,c.shape)});e.silent=!0;var f=e.style,g;for(g in d)f[g]!==d[g]&&(f[g]=d[g]);f.fill=d.fill?d.decal:null;f.decal=null;f.shadowColor=null;d.strokeFirst&&(f.stroke=null);for(d=0;dVf(c,0);if(b===c)return a}};a.prototype.buildPath=function(c,a,b){};a.prototype.pathUpdated=function(){this.__dirty&=~a.SHAPE_CHANGED_BIT};a.prototype.createPathProxy=function(){this.path=new pc(!1)};a.prototype.hasStroke=function(){var c=this.style,a=c.stroke;return!(null==a||"none"===a||!(0g&&(b+=g,g=-g);0>h&&(d+=h,h=-h);"number"===typeof l?k=m=n=p=l:l instanceof Array?1===l.length?k=m=n=p=l[0]:2===l.length?(k=n=l[0],m=p=l[1]):3===l.length?(k=l[0],m=p=l[1],n=l[2]):(k=l[0],m=l[1],n=l[2],p=l[3]):k=m=n=p=0;k+m>g&&(l=k+m,k*=g/l,m*=g/l);n+p>g&&(l=n+p,n*=g/l,p*=g/l);m+n>h&&(l=m+n,m*=h/l,n*=h/l);k+p>h&&(l=k+p,k*=h/l,p*=h/l);c.moveTo(b+k,d);c.lineTo(b+g-m,d);0!==m&&c.arc(b+g-m,d+m,m,-Math.PI/2,0);c.lineTo(b+g,d+h-n);0!==n&&c.arc(b+g-n,d+h-n,n,0,Math.PI/2);c.lineTo(b+p,d+h);0!==p&&c.arc(b+p,d+h-p,p,Math.PI/2,Math.PI);c.lineTo(b,d+k);0!==k&&c.arc(b+k,d+k,k,Math.PI,1.5*Math.PI)}else c.rect(b,d,g,h)};a.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height};return a}(Y);Z.prototype.type="rect";var py={fill:"#000"},PI={style:K({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},Jj.style)},ha=function(b){function a(c){var a=b.call(this)||this;a.type="text";a._children=[];a._defaultStyle=py;a.attr(c);return a}x(a,b);a.prototype.childrenRef=function(){return this._children};a.prototype.update=function(){this.styleChanged()&&this._updateSubTexts();for(var c=0;cw&&q&&(l=l.slice(0,Math.floor(w/p)));q=w;w=t;a&&(q+=a[0]+a[2],null!=w&&(w+=a[1]+a[3]));if(k&&m&&null!=w)for(a=Fq(t,c,f.ellipsis,{minChar:f.truncateMinChar,placeholder:f.placeholder}),k=0;kl&&fl(b,a.substring(l,n),c,k);fl(b,m[2],c,k,m[1]);l=zo.lastIndex}lg){0b&&(g=b,b=d,d=g);var g=!!a.clockwise,h=a.startAngle,k=a.endAngle,l=[h,k];Pq(l,!g);var l=ry(l[0]-l[1]),m=a.cx,n=a.cy,p=a.cornerRadius||0,q=a.innerCornerRadius||0;if(1E-4SI-1E-4)c.moveTo(m+b*Gf(h),n+b*xe(h)),c.arc(m,n,b,h,k,!g),1E-4F*F?E=void 0:(F=(A*(v-L)-C*(t-y))/F,E=[t+F*E,v+F*G]);E&&(u=t-E[0],w=v-E[1],G=y-E[0],A=L-E[1],w=1/xe(TI((u*G+w*A)/(gg(u*u+w*w)*gg(G*G+A*A)))/2),E=gg(E[0]*E[0]+E[1]*E[1]),u=Oj(q,(d-E)/(w-1)),w=Oj(p,(b-E)/(w+1)))}1E-4k&&(g=b*(1-k)+g*k,h=d*(1-k)+h*k),c.lineTo(g,h))};a.prototype.pointAt=function(c){var a=this.shape;return[a.x1*(1-c)+a.x2*c,a.y1*(1-c)+a.y2*c]};return a}(Y);Ua.prototype.type="line";var pb=[],$I=function(){return function(){this.cpy1=this.cpx1=this.y2=this.x2=this.y1=this.x1=0;this.percent=1}}(),rf=function(b){function a(c){return b.call(this,c)||this}x(a,b);a.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}};a.prototype.getDefaultShape=function(){return new $I};a.prototype.buildPath=function(c,a){var b=a.x1,d=a.y1,g=a.x2,h=a.y2,k=a.cpx1,l=a.cpy1,m=a.cpx2,n=a.cpy2,p=a.percent;0!==p&&(c.moveTo(b,d),null==m||null==n?(1>p&&(Yc(b,k,g,p,pb),k=pb[1],g=pb[2],Yc(d,l,h,p,pb),l=pb[1],h=pb[2]),c.quadraticCurveTo(k,l,g,h)):(1>p&&(Re(b,k,m,g,p,pb),k=pb[1],m=pb[2],g=pb[3],Re(d,l,n,h,p,pb),l=pb[1],n=pb[2],h=pb[3]),c.bezierCurveTo(k,l,m,n,g,h)))};a.prototype.pointAt=function(c){return nr(this.shape,c,!1)};a.prototype.tangentAt=function(c){c=nr(this.shape,c,!0);return Ie(c,c)};return a}(Y);rf.prototype.type="bezier-curve";var aJ=function(){return function(){this.startAngle=this.r=this.cy=this.cx=0;this.endAngle=2*Math.PI;this.clockwise=!0}}(),oh=function(b){function a(c){return b.call(this,c)||this}x(a,b);a.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}};a.prototype.getDefaultShape=function(){return new aJ};a.prototype.buildPath=function(c,a){var b=a.cx,d=a.cy,g=Math.max(a.r,0),h=a.startAngle,k=a.endAngle,l=a.clockwise;c.moveTo(Math.cos(h)*g+b,Math.sin(h)*g+d);c.arc(b,d,g,h,k,!l)};return a}(Y);oh.prototype.type="arc";var Io=function(b){function a(){var c=null!==b&&b.apply(this,arguments)||this;c.type="compound";return c}x(a,b);a.prototype._updatePathDirty=function(){for(var c=this.shape.paths,a=this.shapeChanged(),b=0;bb;b++)this._corners[b]=new V;for(b=0;2>b;b++)this._axes[b]=new V;a&&this.fromBoundingRect(a,c)}b.prototype.fromBoundingRect=function(a,c){var b=this._corners,e=this._axes,f=a.x,g=a.y,h=f+a.width,k=g+a.height;b[0].set(f,g);b[1].set(h,g);b[2].set(h,k);b[3].set(f,k);if(c)for(f=0;4>f;f++)b[f].transform(c);V.sub(e[0],b[1],b[0]);V.sub(e[1],b[3],b[0]);e[0].normalize();e[1].normalize();for(f=0;2>f;f++)this._origin[f]=e[f].dot(b[0])};b.prototype.intersect=function(a,c){var b=!0,e=!c;Pj.set(Infinity,Infinity);Qj.set(0,0);if(!this._intersectCheckOneSide(this,a,Pj,Qj,e,1)&&(b=!1,e)||!this._intersectCheckOneSide(a,this,Pj,Qj,e,-1)&&(b=!1,e))return b;e||V.copy(c,b?Pj:Qj);return b};b.prototype._intersectCheckOneSide=function(a,c,b,e,f,g){for(var d=!0,k=0;2>k;k++){var l=this._axes[k];this._getProjMinMaxOnAxis(k,a._corners,ye);this._getProjMinMaxOnAxis(k,c._corners,ze);if(ye[1]ze[1]){d=!1;if(f)break;var m=Math.abs(ze[0]-ye[1]),n=Math.abs(ye[0]-ze[1]);Math.min(m,n)>e.len()&&(m"'])/g,ZA={"\x26":"\x26amp;","\x3c":"\x26lt;","\x3e":"\x26gt;",'"':"\x26quot;","'":"\x26#39;"},Hr="abcdefg".split(""),Ci=r,Jr="left right top bottom width height".split(" "),Pd=[["width","left","right"],["height","top","bottom"]],me=Gl;P(Gl,"vertical");P(Gl,"horizontal");var iJ=ma(),W=function(b){function a(c,a,e){c=b.call(this,c,a,e)||this;c.uid=$e("ec_cpt_model");return c}x(a,b);a.prototype.init=function(c,a,b){this.mergeDefaultAndTheme(c,b)};a.prototype.mergeDefaultAndTheme=function(c,a){var b=pg(this),d=b?Qd({},c):{},g=a.getTheme();U(c,g.get(this.mainType));U(c,this.getDefaultOption());b&&gd(c,d,b)};a.prototype.mergeOption=function(c,a){U(this.option,c,!0);var b=pg(this);b&&gd(this.option,c,b)};a.prototype.optionUpdated=function(c,a){};a.prototype.getDefaultOption=function(){var c=this.constructor;if(!c||!c.___EC__EXTENDED_CLASS___)return c.defaultOption;var a=iJ(this);if(!a.defaultOption){for(var b=[];c;){var f=c.prototype.defaultOption;f&&b.push(f);c=c.superClass}c={};for(f=b.length-1;0<=f;f--)c=U(c,b[f],!0);a.defaultOption=c}return a.defaultOption};a.prototype.getReferringComponents=function(c,a){var b=c+"Id";return di(this.ecModel,c,{index:this.get(c+"Index",!0),id:this.get(b,!0)},a)};a.prototype.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")}};a.protoInitialize=function(){var c=a.prototype;c.type="component";c.id="";c.name="";c.mainType="";c.subType="";c.componentIndex=0}();return a}(la);W.extend=la.extend;ei(W);(function(b){var a={};b.registerSubTypeDefaulter=function(c,b){var d=kc(c);a[d.main]=b};b.determineSubType=function(c,d){var e=d.type;if(!e){var f=kc(c).main;b.hasSubTypes(c)&&a[f]&&(e=a[f](d))}return e}})(W);(function(b,a){function c(c){var b={},f=[];r(c,function(g){var h=d(b,g),k=h.originalDeps=a(g),k=e(k,c);h.entryCount=k.length;0===h.entryCount&&f.push(g);r(k,function(c){0>ba(h.predecessor,c)&&h.predecessor.push(c);var a=d(b,c);0>ba(a.successor,c)&&a.successor.push(g)})});return{graph:b,noEntryList:f}}function d(c,a){c[a]||(c[a]={predecessor:[],successor:[]});return c[a]}function e(c,a){var b=[];r(c,function(c){0<=ba(a,c)&&b.push(c)});return b}b.topologicalTravel=function(a,b,d,e){function f(c){k[c].entryCount--;0===k[c].entryCount&&q.push(c)}function g(c){t[c]=!0;f(c)}if(a.length){var h=c(b),k=h.graph,q=h.noEntryList,t={};for(r(a,function(c){t[c]=!0});q.length;){var h=q.pop(),u=k[h],w=!!t[h];w&&(d.call(e,h,u.originalDeps.slice()),delete t[h]);r(u.successor,w?g:f)}r(t,function(){var c;c=gb("Circle dependency may exists: ",t,a,b);throw Error(c);})}}})(W,function(b){var a=[];r(W.getClassesByMainType(b),function(c){a=a.concat(c.dependencies||c.prototype.dependencies||[])});a=C(a,function(c){return kc(c).main});"dataset"!==b&&0>=ba(a,"dataset")&&a.unshift("dataset");return a});var xy="";"undefined"!==typeof navigator&&(xy=navigator.platform||"");var jJ={darkMode:"auto",color:"#5470c6 #91cc75 #fac858 #ee6666 #73c0de #3ba272 #fc8452 #9a60b4 #ea7ccc".split(" "),gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:"rgba(0, 0, 0, 0.2)",dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:"rgba(0, 0, 0, 0.2)",symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:"rgba(0, 0, 0, 0.2)",dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:"rgba(0, 0, 0, 0.2)",dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:"rgba(0, 0, 0, 0.2)",dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:"rgba(0, 0, 0, 0.2)",symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:xy.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,stateAnimation:{duration:300,easing:"cubicOut"},animation:"auto",animationDuration:1E3,animationDurationUpdate:500,animationEasing:"cubicInOut",animationEasingUpdate:"cubicInOut",animationThreshold:2E3,progressiveThreshold:3E3,progressive:400,hoverLayerThreshold:3E3,useUTC:!1},jm=R(["tooltip","label","itemName","itemId","seriesName"]),ib={Must:1,Might:2,Not:3},Lr=ma(),Jl=R(),Lo=ma(),cB=ma(),Mo=function(){function b(){}b.prototype.getColorFromPalette=function(a,c,b){var d=xa(this.get("color",!0)),f=this.get("colorLayer",!0);return Nr(this,Lo,d,f,a,c,b)};b.prototype.clearColorPalette=function(){Lo(this).paletteIdx=0;Lo(this).paletteNameMap={}};return b}(),Sj,qh,yy,No=function(b){function a(){return null!==b&&b.apply(this,arguments)||this}x(a,b);a.prototype.init=function(c,a,b,f,g,h){f=f||{};this.option=null;this._theme=new la(f);this._locale=new la(g);this._optionManager=h};a.prototype.setOption=function(c,a,b){O(null!=c,"option is null/undefined");O(1!==c["\x00_ec_inner"],"please use chart.getOption()");a=Qr(a);this._optionManager.setOption(c,b,a);this._resetOption(null,a)};a.prototype.resetOption=function(c,a){return this._resetOption(c,Qr(a))};a.prototype._resetOption=function(c,a){var b=!1,d=this._optionManager;if(!c||"recreate"===c){var g=d.mountOption("recreate"===c);this.option&&"recreate"!==c?(this.restoreData(),this._mergeOption(g,a)):yy(this,g);b=!0}"timeline"!==c&&"media"!==c||this.restoreData();if(!c||"recreate"===c||"timeline"===c)if(g=d.getTimelineOption(this))b=!0,this._mergeOption(g,a);c&&"recreate"!==c&&"media"!==c||(d=d.getMediaOption(this),d.length&&r(d,function(c){b=!0;this._mergeOption(c,a)},this));return b};a.prototype.mergeOption=function(c){this._mergeOption(c,null)};a.prototype._mergeOption=function(c,a){var b=this.option,d=this._componentsMap,g=this._componentsCount,h=[],k=R(),l=a&&a.replaceMergeMainTypeMap;Lr(this).datasetMap=R();r(c,function(c,a){null!=c&&(W.hasClass(a)?a&&(h.push(a),k.set(a,!0)):b[a]=null==b[a]?J(c):U(b[a],c,!0))});l&&l.each(function(c,a){W.hasClass(a)&&!k.get(a)&&(h.push(a),k.set(a,!0))});W.topologicalTravel(h,W.getAllClassMainTypes(),function(a){var e=bB(this,a,xa(c[a])),f=d.get(a),h=f?l&&l.get(a)?"replaceMerge":"normalMerge":"replaceAll",e=yq(f,e,h);BA(e,a,W);b[a]=null;d.set(a,null);g.set(a,0);var k=[],m=[],w=0;r(e,function(c,b){var d=c.existing,e=c.newOption;if(e){var f=W.getClass(a,c.keyInfo.subType,!0);if(d&&d.constructor===f)d.name=c.keyInfo.name,d.mergeOption(e,this),d.optionUpdated(e,!1);else{var g=F({componentIndex:b},c.keyInfo),d=new f(e,this,this,g);F(d,g);c.brandNew&&(d.__requireNewView=!0);d.init(e,this,this);d.optionUpdated(null,!0)}}else d&&(d.mergeOption({},this),d.optionUpdated({},!1));d?(k.push(d.option),m.push(d),w++):(k.push(void 0),m.push(void 0))},this);b[a]=k;d.set(a,m);g.set(a,w);"series"===a&&Sj(this)},this);this._seriesIndices||Sj(this)};a.prototype.getOption=function(){var c=J(this.option);r(c,function(a,b){if(W.hasClass(b)){for(var d=xa(a),e=d.length,h=!1,k=e-1;0<=k;k--)d[k]&&!Qe(d[k])?h=!0:(d[k]=null,!h&&e--);d.length=e;c[b]=d}});delete c["\x00_ec_inner"];return c};a.prototype.getTheme=function(){return this._theme};a.prototype.getLocaleModel=function(){return this._locale};a.prototype.getLocale=function(c){return this.getLocaleModel().get(c)};a.prototype.setUpdatePayload=function(c){this._payload=c};a.prototype.getUpdatePayload=function(){return this._payload};a.prototype.getComponent=function(c,a){var b=this._componentsMap.get(c);if(b){var d=b[a||0];if(d)return d;if(null==a)for(d=0;dl&&(l=B)}h[0]=k;h[1]=l}},f=function(){return this._data?this._data.length/this._dimSize:0};Ay=(c={},c.arrayRows_column={pure:!0,appendData:a},c.arrayRows_row={pure:!0,appendData:function(){throw Error('Do not support appendData when set seriesLayoutBy: "row".');}},c.objectRows={pure:!0,appendData:a},c.keyedColumns={pure:!0,appendData:function(c){var a=this._data;r(c,function(c,b){for(var d=a[b]||(a[b]=[]),e=0;e<(c||[]).length;e++)d.push(c[e])})}},c.original={appendData:a},c.typedArray={persistent:!1,pure:!0,appendData:function(c){O(db(c),"Added data must be TypedArray if data in initialization is TypedArray");this._data=c},clean:function(){this._offset+=this.count();this._data=null}},c)}();return b}(),Cy=function(b,a,c,d){return b[d]},qB=(Ae={},Ae.arrayRows_column=function(b,a,c,d){return b[d+a]},Ae.arrayRows_row=function(b,a,c,d){d+=a;a=[];for(c=0;c=this._outputDueEnd);this._outputDueEnd=f}else this._dueIndex=this._outputDueEnd=null!=this._settedOutputEnd?this._settedOutputEnd:this._dueEnd;return this.unfinished()};b.prototype.dirty=function(){this._dirty=!0;this._onDirty&&this._onDirty(this.context)};b.prototype._doProgress=function(a,c,b,e,f){Ey.reset(c,b,e,f);this._callingProgress=a;this._callingProgress({start:c,end:b,count:b-c,next:Ey.next},this.context)};b.prototype._doReset=function(a){this._dueIndex=this._outputDueEnd=this._dueEnd=0;this._settedOutputEnd=null;var c,b;!a&&this._reset&&((c=this._reset(this.context))&&c.progress&&(b=c.forceFirstProgress,c=c.progress),A(c)&&!c.length&&(c=null));this._progress=c;this._modBy=this._modDataCount=null;(a=this._downstream)&&a.dirty();return b};b.prototype.unfinished=function(){return this._progress&&this._dueIndex=c?null:aa},gte:function(b,a){return b>=a}},fI=function(){function b(a,c){"number"!==typeof c&&ja('rvalue of "\x3c", "\x3e", "\x3c\x3d", "\x3e\x3d" can only be number in filter.');this._opFn=ey[a];this._rvalFloat=jc(c)}b.prototype.evaluate=function(a){return"number"===typeof a?this._opFn(a,this._rvalFloat):this._opFn(jc(a),this._rvalFloat)};return b}(),is=function(){function b(a,c){var b="desc"===a;this._resultLT=b?1:-1;null==c&&(c=b?"min":"max");this._incomparable="min"===c?-Infinity:Infinity}b.prototype.evaluate=function(a,c){var b=typeof a,e=typeof c,f="number"===b?a:jc(a),g="number"===e?c:jc(c),h=isNaN(f),k=isNaN(g);h&&(f=this._incomparable);k&&(g=this._incomparable);h&&k&&(b="string"===b,e="string"===e,b&&(f=e?a:0),e&&(g=b?c:0));return fg?-this._resultLT:0};return b}(),eI=function(){function b(a,c){this._rval=c;this._isEQ=a;this._rvalTypeof=typeof c;this._rvalFloat=jc(c)}b.prototype.evaluate=function(a){var c=a===this._rval;if(!c){var b=typeof a;b===this._rvalTypeof||"number"!==b&&"number"!==this._rvalTypeof||(c=jc(a)===this._rvalFloat)}return this._isEQ?c:!c};return b}(),uB=function(){function b(){}b.prototype.getRawData=function(){throw Error("not supported");};b.prototype.getRawDataItem=function(a){throw Error("not supported");};b.prototype.cloneRawData=function(){};b.prototype.getDimensionInfo=function(a){};b.prototype.cloneAllDimensionInfo=function(){};b.prototype.count=function(){};b.prototype.retrieveValue=function(a,c){};b.prototype.retrieveValueFromItem=function(a,c){};b.prototype.convertValue=function(a,c){return Di(a,c)};return b}(),fs=R(),Fy=function(){function b(a){this._sourceList=[];this._upstreamSignList=[];this._versionSignBase=0;this._sourceHost=a}b.prototype.dirty=function(){this._setLocalSource([],[])};b.prototype._setLocalSource=function(a,c){this._sourceList=a;this._upstreamSignList=c;this._versionSignBase++;9E10=d&&(d=b+(!c||b&&("section"!==a.type||a.noHeader)?0:1))});b.__gapLevelBetweenSubBlocks=d},build:function(b,a,c,d){var e=a.noHeader,f=js(a),g=BB(b,a,e?c:f.html,d);if(e)return g;a=zi(a.header,"ordinal",b.useUTC);d=gs(d,b.renderMode).nameStyle;return"richText"===b.renderMode?b.markupStyleCreator.wrapRichTextStyle(a,d)+f.richText+g:Ql('\x3cdiv style\x3d"'+d+';line-height:1;"\x3e'+fd(a)+"\x3c/div\x3e"+g,c)}},nameValue:{planLayout:function(b){b.__gapLevelBetweenSubBlocks=0},build:function(b,a,c,d){var e=b.renderMode,f=a.noName,g=a.noValue,h=!a.markerType,k=a.name,l=a.value,m=b.useUTC;if(!f||!g){var n=h?"":b.markupStyleCreator.makeTooltipMarker(a.markerType,a.markerColor||"#333",e),k=f?"":zi(k,"ordinal",m),p=a.valueType;a=g?[]:A(l)?C(l,function(c,a){return zi(c,A(p)?p[a]:p,m)}):[zi(l,A(p)?p[0]:p,m)];var l=!h||!f,q=!h&&f,t=gs(d,e);d=t.nameStyle;t=t.valueStyle;return"richText"===e?(h?"":n)+(f?"":b.markupStyleCreator.wrapRichTextStyle(k,d))+(g?"":FB(b,a,l,q,t)):Ql((h?"":n)+(f?"":'\x3cspan style\x3d"'+d+";"+(h?"":"margin-left:2px")+'"\x3e'+fd(k)+"\x3c/span\x3e")+(g?"":EB(a,l,q,t)),c)}}}},Ro=function(){function b(){this.richTextStyles={};this._nextStyleNameId=Math.round(9*Math.random())}b.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++};b.prototype.makeTooltipMarker=function(a,c,b){var d="richText"===b?this._generateStyleName():null;a=Ir({color:c,type:a,renderMode:b,markerId:d});if(da(a))return a;O(d);this.richTextStyles[d]=a.style;return a.content};b.prototype.wrapRichTextStyle=function(a,c){var b={};A(c)?r(c,function(c){return F(b,c)}):F(b,c);var e=this._generateStyleName();this.richTextStyles[e]=b;return"{"+e+"|"+a+"}"};return b}(),yd=ma(),ra=function(b){function a(){var c=null!==b&&b.apply(this,arguments)||this;c._selectedDataIndicesMap={};return c}x(a,b);a.prototype.init=function(c,a,b){this.seriesIndex=this.componentIndex;this.dataTask=new rh({count:IB,reset:JB});this.dataTask.context={model:this};this.mergeDefaultAndTheme(c,b);(yd(this).sourceManager=new Fy(this)).prepareSource();c=this.getInitialData(c,b);ps(c,this);this.dataTask.context.data=c;O(c,"getInitialData returned invalid data.");yd(this).dataBeforeProcessed=c;os(this);this._initSelectedMapFromData(c)};a.prototype.mergeDefaultAndTheme=function(c,a){var b=pg(this),d=b?Qd({},c):{};W.hasClass(this.subType);U(c,a.getTheme().get(this.subType));U(c,this.getDefaultOption());Id(c,"label",["show"]);this.fillDataTextStyle(c.data);b&&gd(c,d,b)};a.prototype.mergeOption=function(c,a){c=U(this.option,c,!0);this.fillDataTextStyle(c.data);var b=pg(this);b&&gd(this.option,c,b);b=yd(this).sourceManager;b.dirty();b.prepareSource();b=this.getInitialData(c,a);ps(b,this);this.dataTask.dirty();this.dataTask.context.data=b;yd(this).dataBeforeProcessed=b;os(this);this._initSelectedMapFromData(b)};a.prototype.fillDataTextStyle=function(c){if(c&&!db(c))for(var a=["show"],b=0;bthis.getShallow("animationThreshold")&&(c=!1);return!!c};a.prototype.restoreData=function(){this.dataTask.dirty()};a.prototype.getColorFromPalette=function(c,a,b){var d=this.ecModel,e=Mo.prototype.getColorFromPalette.call(this,c,a,b);e||(e=d.getColorFromPalette(c,a,b));return e};a.prototype.coordDimToDataDim=function(c){return this.getRawData().mapDimensionsAll(c)};a.prototype.getProgressive=function(){return this.get("progressive")};a.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")};a.prototype.select=function(c,a){this._innerSelect(this.getData(a),c)};a.prototype.unselect=function(c,a){var b=this.option.selectedMap;if(b)for(var d=this.getData(a),g=0;gb.blockIndex?b.step:null,e=e&&e.modDataCount;return{step:b,modBy:null!=e?Math.ceil(e/b):null,modDataCount:e}}};b.prototype.getPipeline=function(a){return this._pipelineMap.get(a)};b.prototype.updateStreamModes=function(a,c){var b=this._pipelineMap.get(a.uid),e=a.getData().count(),f=b.progressiveEnabled&&c.incrementalPrepareRender&&e>=b.threshold,g=a.get("large")&&e>=a.get("largeThreshold"),e="mod"===a.get("progressiveChunkMode")?e:null;a.pipelineContext=b.context={progressiveRender:f,modDataCount:e,large:g}};b.prototype.restorePipelines=function(a){var c=this,b=c._pipelineMap=R();a.eachSeries(function(a){var d=a.getProgressive(),e=a.uid;b.set(e,{id:e,head:null,tail:null,threshold:a.getProgressiveThreshold(),progressiveEnabled:d&&!(a.preventIncremental&&a.preventIncremental()),blockIndex:-1,step:Math.round(d||700),count:0});c._pipe(a,a.dataTask)})};b.prototype.prepareStageTasks=function(){var a=this._stageTaskMap,c=this.api.getModel(),b=this.api;r(this._allHandlers,function(d){var e=a.get(d.uid)||a.set(d.uid,{});O(!(d.reset&&d.overallReset),'"reset" and "overallReset" must not be both specified.');d.reset&&this._createSeriesStageTask(d,e,c,b);d.overallReset&&this._createOverallStageTask(d,e,c,b)},this)};b.prototype.prepareView=function(a,c,b,e){var d=a.renderTask,g=d.context;g.model=c;g.ecModel=b;g.api=e;d.__block=!a.incrementalPrepareRender;this._pipe(c,d)};b.prototype.performDataProcessorTasks=function(a,c){this._performStageTasks(this._dataProcessorHandlers,a,c,{block:!0})};b.prototype.performVisualTasks=function(a,c,b){this._performStageTasks(this._visualHandlers,a,c,b)};b.prototype._performStageTasks=function(a,c,b,e){e=e||{};var d=!1,g=this;r(a,function(a,f){if(!e.visualType||e.visualType===a.visualType){var h=g._stageTaskMap.get(a.uid),k=h.seriesTaskMap;if(h=h.overallTask){var n,k=h.agentStubMap;k.each(function(c){!e.setDirty||e.dirtyMap&&!e.dirtyMap.get(c.__pipeline.id)||(c.dirty(),n=!0)});n&&h.dirty();g.updatePayload(h,b);var p=g.getPerformArgs(h,e.block);k.each(function(c){c.perform(p)});h.perform(p)&&(d=!0)}else k&&k.each(function(f,h){!e.setDirty||e.dirtyMap&&!e.dirtyMap.get(f.__pipeline.id)||f.dirty();var k=g.getPerformArgs(f,e.block);k.skip=!a.performRawSeries&&c.isSeriesFiltered(f.context.model);g.updatePayload(f,b);f.perform(k)&&(d=!0)})}});this.unfinished=d||this.unfinished};b.prototype.performSeriesTasks=function(a){var c;a.eachSeries(function(a){c=a.dataTask.perform()||c});this.unfinished=c||this.unfinished};b.prototype.plan=function(){this._pipelineMap.each(function(a){var c=a.tail;do{if(c.__block){a.blockIndex=c.__idxInPipeline;break}c=c.getUpstream()}while(c)})};b.prototype.updatePayload=function(a,c){"remain"!==c&&(a.context.payload=c)};b.prototype._createSeriesStageTask=function(a,c,b,e){function d(c){var d=c.uid,d=k.set(d,h&&h.get(d)||new rh({plan:VB,reset:WB,count:YB}));d.context={model:c,ecModel:b,api:e,useClearVisual:a.isVisual&&!a.isLayout,plan:a.plan,reset:a.reset,scheduler:g};g._pipe(c,d)}var g=this,h=c.seriesTaskMap,k=c.seriesTaskMap=R();c=a.seriesType;var l=a.getTargetSeries;a.createOnAllSeries?b.eachRawSeries(d):c?b.eachRawSeriesByType(c,d):l&&l(b,e).each(d)};b.prototype._createOverallStageTask=function(a,c,b,e){function d(c){var a=c.uid,a=l.set(a,k&&k.get(a)||(p=!0,new rh({reset:SB,onDirty:UB})));a.context={model:c,overallProgress:n};a.agent=h;a.__block=n;g._pipe(c,a)}var g=this,h=c.overallTask=c.overallTask||new rh({reset:RB});h.context={ecModel:b,api:e,overallReset:a.overallReset,scheduler:g};var k=h.agentStubMap,l=h.agentStubMap=R();c=a.seriesType;var m=a.getTargetSeries,n=!0,p=!1;O(!a.createOnAllSeries,'"createOnAllSeries" do not supported for "overallReset", becuase it will block all streams.');c?b.eachRawSeriesByType(c,d):m?m(b,e).each(d):(n=!1,r(b.getSeries(),d));p&&h.dirty()};b.prototype._pipe=function(a,c){var b=this._pipelineMap.get(a.uid);!b.head&&(b.head=c);b.tail&&b.tail.pipe(c);b.tail=c;c.__idxInPipeline=b.count++;c.__pipeline=b};b.wrapStageHandler=function(a,c){if(fa(a)){var b=a;Uj=null;try{a(th,Hy)}catch(e){}a={overallReset:b,seriesType:Uj}}a.uid=$e("stageHandler");c&&(a.visualType=c);return a};return b}(),XB=vs(0),th={},Hy={},Uj;ws(th,No);ws(Hy,zy);th.eachSeriesByType=th.eachRawSeriesByType=function(b){Uj=b};th.eachComponent=function(b){"series"===b.mainType&&b.subType&&(Uj=b.subType)};var Iy="#37A2DA #32C5E9 #67E0E3 #9FE6B8 #FFDB5C #ff9f7f #fb7293 #E062AE #E690D1 #e7bcf3 #9d96f5 #8378EA #96BFFF".split(" "),oJ={color:Iy,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],"#37A2DA #67E0E3 #FFDB5C #ff9f7f #E062AE #9d96f5".split(" "),"#37A2DA #32C5E9 #9FE6B8 #FFDB5C #ff9f7f #fb7293 #e7bcf3 #8378EA #96BFFF".split(" "),Iy]},Vj=function(){return{axisLine:{lineStyle:{color:"#B9B8CE"}},splitLine:{lineStyle:{color:"#484753"}},splitArea:{areaStyle:{color:["rgba(255,255,255,0.02)","rgba(255,255,255,0.05)"]}},minorSplitLine:{lineStyle:{color:"#20203B"}}}},Jy="#4992ff #7cffb2 #fddd60 #ff6e76 #58d9f9 #05c091 #ff8a45 #8d48e3 #dd79ff".split(" "),Ky={darkMode:!0,color:Jy,backgroundColor:"#100C2A",axisPointer:{lineStyle:{color:"#817f91"},crossStyle:{color:"#817f91"},label:{color:"#fff"}},legend:{textStyle:{color:"#B9B8CE"}},textStyle:{color:"#B9B8CE"},title:{textStyle:{color:"#EEF1FA"},subtextStyle:{color:"#B9B8CE"}},toolbox:{iconStyle:{borderColor:"#B9B8CE"}},dataZoom:{borderColor:"#71708A",textStyle:{color:"#B9B8CE"},brushStyle:{color:"rgba(135,163,206,0.3)"},handleStyle:{color:"#353450",borderColor:"#C5CBE3"},moveHandleStyle:{color:"#B0B6C3",opacity:.3},fillerColor:"rgba(135,163,206,0.2)",emphasis:{handleStyle:{borderColor:"#91B7F2",color:"#4D587D"},moveHandleStyle:{color:"#636D9A",opacity:.7}},dataBackground:{lineStyle:{color:"#71708A",width:1},areaStyle:{color:"#71708A"}},selectedDataBackground:{lineStyle:{color:"#87A3CE"},areaStyle:{color:"#87A3CE"}}},visualMap:{textStyle:{color:"#B9B8CE"}},timeline:{lineStyle:{color:"#B9B8CE"},label:{color:"#B9B8CE"},controlStyle:{color:"#B9B8CE",borderColor:"#B9B8CE"}},calendar:{itemStyle:{color:"#100C2A"},dayLabel:{color:"#B9B8CE"},monthLabel:{color:"#B9B8CE"},yearLabel:{color:"#B9B8CE"}},timeAxis:Vj(),logAxis:Vj(),valueAxis:Vj(),categoryAxis:Vj(),line:{symbol:"circle"},graph:{color:Jy},gauge:{title:{color:"#B9B8CE"},axisLine:{lineStyle:{color:[[1,"rgba(207,212,219,0.2)"]]}},axisLabel:{color:"#B9B8CE"},detail:{color:"#EEF1FA"}},candlestick:{itemStyle:{color:"#f64e56",color0:"#54ea92",borderColor:"#f64e56",borderColor0:"#54ea92"}}};Ky.categoryAxis.splitLine.show=!1;var Ly=R(),Ri={registerMap:function(b,a,c){if(!A(a))if(a.svg)a=[{type:"svg",source:a.svg,specialAreas:a.specialAreas}];else{var d=a.geoJson||a.geoJSON;d&&!a.features&&(c=a.specialAreas,a=d);a=[{type:"geoJSON",source:a,specialAreas:c}]}r(a,function(c){var a=c.type;"geoJson"===a&&(a=c.type="geoJSON");var b=pJ[a];O(b,"Illegal map type: "+a);b(c)});return Ly.set(b,a)},retrieveMap:function(b){return Ly.get(b)}},pJ={geoJSON:function(b){var a=b.source;b.geoJSON=da(a)?"undefined"!==typeof JSON&&JSON.parse?JSON.parse(a):(new Function("return ("+a+");"))():a},svg:function(b){b.svgXML=xs(b.source)}},qJ=function(){function b(){}b.prototype.normalizeQuery=function(a){var c={},b={},e={};if(da(a))a=kc(a),c.mainType=a.main||null,c.subType=a.sub||null;else{var f=["Index","Name","Id"],g={name:1,dataIndex:1,dataType:1};r(a,function(a,d){for(var h=!1,k=0;ka.get("hoverLayerThreshold")&&!X.node&&!X.worker&&a.eachSeries(function(a){a.preventUsingHoverLayer||(a=c._chartsMap[a.__viewId],a.__alive&&a.group.traverse(function(c){c.states.emphasis&&(c.states.emphasis.hoverLayer=!0)}))})}function b(c,a){var b=c.get("blendMode")||null;!X.canvasSupported&&b&&"source-over"!==b&&console.warn("Only canvas support blendMode");a.group.traverse(function(c){c.isGroup||(c.style.blend=b);c.eachPendingDisplayable&&c.eachPendingDisplayable(function(c){c.style.blend=b})})}function f(c,a){if(!c.preventAutoZ){var b=c.get("z"),d=c.get("zlevel");a.group.traverse(function(c){if(!c.isGroup){null!=b&&(c.z=b);null!=d&&(c.zlevel=d);var a=c.getTextContent(),e=c.getTextGuideLine();a&&(a.z=c.z,a.zlevel=c.zlevel,a.z2=c.z2+2);e&&(a=c.textGuideLineConfig&&c.textGuideLineConfig.showAbove,e.z=c.z,e.zlevel=c.zlevel,e.z2=c.z2+(a?1:-1))}})}}function g(c,a){a.group.traverse(function(c){if(!Ye(c)){var a=c.getTextContent(),b=c.getTextGuideLine();c.stateTransition&&(c.stateTransition=null);a&&a.stateTransition&&(a.stateTransition=null);b&&b.stateTransition&&(b.stateTransition=null);c.hasState()?(c.prevStates=c.currentStates,c.clearStates()):c.prevStates&&(c.prevStates=null)}})}function h(a,b){var d=a.getModel("stateAnimation"),e=a.isAnimationEnabled(),f=d.get("duration"),g=0w[1]&&(w[1]=m)}c&&(this._nameList[q]=c[t],this._dontMakeIdFromName||cp(this,q))}this._rawCount=this._count=k;this._extent={};ap(this)};b.prototype._initDataFromProvider=function(a,c,b){if(!(a>=c)){for(var d=this._rawData,f=this._storage,g=this.dimensions,h=g.length,k=this._dimensionInfos,l=this._nameList,m=this._idList,n=this._rawExtent,p="original"===d.getSource().sourceFormat,q=0;qw[1]&&(w[1]=t)}p&&!d.pure&&q&&(t=q.name,null==l[a]&&null!=t&&(l[a]=Ea(t,null)),t=q.id,null==m[a]&&null!=t&&(m[a]=Ea(t,null)));this._dontMakeIdFromName||cp(this,a)}!d.persistent&&d.clean&&d.clean();this._rawCount=this._count=c;this._extent={};ap(this)}};b.prototype.count=function(){return this._count};b.prototype.getIndices=function(){var a,c=this._indices;if(c){a=c.constructor;var b=this._count;if(a===Array){a=new a(b);for(var e=0;ef&&(f=h)}f=[b,f];return this._extent[a]=f};b.prototype.getApproximateExtent=function(a){a=this.getDimension(a);return this._approximateExtent[a]||this.getDataExtent(a)};b.prototype.setApproximateExtent=function(a,c){c=this.getDimension(c);this._approximateExtent[c]=a.slice()};b.prototype.getCalculationInfo=function(a){return this._calculationInfo[a]};b.prototype.setCalculationInfo=function(a,c){yh(a)?F(this._calculationInfo,a):this._calculationInfo[a]=c};b.prototype.getSum=function(a){var c=0;if(this._storage[a])for(var b=0,e=this.count();b=this._rawCount||0>a)return-1;if(!this._indices)return a;var c=this._indices,b=c[a];if(null!=b&&ba)e=f-1;else return f}return-1};b.prototype.indicesOfNearest=function(a,c,b){a=this._storage[a];var d=[];if(!a)return d;null==b&&(b=Infinity);for(var f=Infinity,g=-1,h=0,k=0,l=this.count();kg)f=n,g=m,h=0;m===g&&(d[h++]=k)}}d.length=h;return d};b.prototype.getRawDataItem=function(a){if(this._rawData.persistent)return this._rawData.getItem(this.getRawIndex(a));for(var c=[],b=0;b=n&&w<=p||isNaN(w))h[k++]=t;t++}q=!0}else if(2===f){for(var u=l[m[0]],v=l[m[1]],r=a[e[1]][0],B=a[e[1]][1],q=0;q=n&&w<=p||isNaN(w))&&(y>=r&&y<=B||isNaN(y))&&(h[k++]=t);t++}q=!0}}if(!q)if(1===f)for(q=0;q=n&&w<=p||isNaN(w))h[k++]=b}else for(q=0;qa[t][1])n=!1;n&&(h[k++]=this.getRawIndex(q))}kv[1]&&(v[1]=w)}}}return e};b.prototype.downSample=function(a,c,b,e){var d=dk(this,[a]),g=d._storage,h=[];c=$y(1/c);var g=g[a],k=this.count();a=d._rawExtent[a];for(var l=new (Jf(this))(k),m=0,n=0;nk-n&&(c=k-n,h.length=c);for(var p=0;pa[1]&&(a[1]=p);l[m++]=q}d._count=m;d._indices=l;d.getRawIndex=De;return d};b.prototype.lttbDownSample=function(a,c){var b=dk(this,[]),e=b._storage[a],f=this.count(),g=new (Jf(this))(f),h=0,k=$y(1/c),l=this.getRawIndex(0),m,n;g[h++]=l;for(var p=1;pl&&(l=m,n=r));l=g[h++]=n}g[h++]=this.getRawIndex(f-1);b._count=h;b._indices=g;b.getRawIndex=De;return b};b.prototype.getItemModel=function(a){var c=this.hostModel;a=this.getRawDataItem(a);return new la(a,c,c&&c.ecModel)};b.prototype.diff=function(a){var c=this;return new sd(a?a.getIndices():[],this.getIndices(),function(c){return bk(a,c)},function(a){return bk(c,a)})};b.prototype.getVisual=function(a){var c=this._visual;return c&&c[a]};b.prototype.setVisual=function(a,c){this._visual=this._visual||{};yh(a)?F(this._visual,a):this._visual[a]=c};b.prototype.getItemVisual=function(a,c){var b=this._itemVisuals[a],b=b&&b[c];return null==b?this.getVisual(c):b};b.prototype.hasItemVisual=function(){return 0c[1]&&(c[1]=a[1])};b.prototype.unionExtentFromData=function(a,c){this.unionExtent(a.getApproximateExtent(c))};b.prototype.getExtent=function(){return this._extent.slice()};b.prototype.setExtent=function(a,c){var b=this._extent;isNaN(a)||(b[0]=a);isNaN(c)||(b[1]=c)};b.prototype.isInExtentRange=function(a){return this._extent[0]<=a&&this._extent[1]>=a};b.prototype.isBlank=function(){return this._isBlank};b.prototype.setBlank=function(a){this._isBlank=a};return b}();ei(tc);var Am=function(){function b(a){this.categories=a.categories||[];this._needCollect=a.needCollect;this._deduplication=a.deduplication}b.createByAxisModel=function(a){a=a.option;var c=a.data,c=c&&C(c,wC);return new b({categories:c,needCollect:!c,deduplication:!1!==a.dedplication})};b.prototype.getOrdinal=function(a){return this._getOrCreateMap().get(a)};b.prototype.parseAndCollect=function(a){var c,b=this._needCollect;if("string"!==typeof a&&!b)return a;if(b&&!this._deduplication)return c=this.categories.length,this.categories[c]=a,c;var e=this._getOrCreateMap();c=e.get(a);null==c&&(b?(c=this.categories.length,this.categories[c]=a,e.set(a,c)):c=NaN);return c};b.prototype._getOrCreateMap=function(){return this._map||(this._map=R(this.categories))};return b}(),Wi=function(b){function a(c){c=b.call(this,c)||this;c.type="ordinal";var a=c.getSetting("ordinalMeta");a||(a=new Am({}));A(a)&&(a=new Am({categories:C(a,function(c){return N(c)?c.value:c})}));c._ordinalMeta=a;c._extent=c.getSetting("extent")||[0,a.categories.length-1];return c}x(a,b);a.prototype.parse=function(c){return"string"===typeof c?this._ordinalMeta.getOrdinal(c):Math.round(c)};a.prototype.contain=function(c){c=this.parse(c);return Ti(c,this._extent)&&null!=this._ordinalMeta.categories[c]};a.prototype.normalize=function(c){c=this._getTickNumber(this.parse(c));return Ui(c,this._extent)};a.prototype.scale=function(c){c=Math.round(Vi(c,this._extent));return this.getRawOrdinalNumber(c)};a.prototype.getTicks=function(){for(var c=[],a=this._extent,b=a[0];b<=a[1];)c.push({value:b}),b++;return c};a.prototype.getMinorTicks=function(c){};a.prototype.setSortInfo=function(c){if(null==c)this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;else{var a=c.ordinalNumbers;c=this._ordinalNumbersByTick=[];for(var b=this._ticksByOrdinalNumber=[],f=0,g=this._ordinalMeta.categories.length,h=Math.min(g,a.length);f=c};a.prototype.getOrdinalMeta=function(){return this._ordinalMeta};a.prototype.niceTicks=function(){};a.prototype.niceExtent=function(){};a.type="ordinal";return a}(tc);tc.registerClass(Wi);var Zd=function(b){function a(){var c=null!==b&&b.apply(this,arguments)||this;c.type="interval";c._interval=0;c._intervalPrecision=2;return c}x(a,b);a.prototype.parse=function(c){return c};a.prototype.contain=function(c){return Ti(c,this._extent)};a.prototype.normalize=function(c){return Ui(c,this._extent)};a.prototype.scale=function(c){return Vi(c,this._extent)};a.prototype.setExtent=function(c,a){var b=this._extent;isNaN(c)||(b[0]=parseFloat(c));isNaN(a)||(b[1]=parseFloat(a))};a.prototype.unionExtent=function(c){var a=this._extent;c[0]a[1]&&(a[1]=c[1]);this.setExtent(a[0],a[1])};a.prototype.getInterval=function(){return this._interval};a.prototype.setInterval=function(c){this._interval=c;this._niceExtent=this._extent.slice();this._intervalPrecision=Db(c)+2};a.prototype.getTicks=function(c){var a=this._interval,b=this._extent,f=this._niceExtent,g=this._intervalPrecision,h=[];if(!a)return h;b[0]f&&(c?h.push({value:sa(f+a,g)}):h.push({value:b[1]}));return h};a.prototype.getMinorTicks=function(c){for(var a=this.getTicks(!0),b=[],f=this.getExtent(),g=1;gf[0]&&ne&&d.reverse(),e=c=Zk((d[1]-d[0])/c,!0),null!= a&&eb&&(e=c=b),b=a=Db(e)+2,e=b=[sa(Math.ceil(d[0]/e)*e,b),sa(Math.floor(d[1]/e)*e,b)],!isFinite(e[0])&&(e[0]=d[0]),!isFinite(e[1])&&(e[1]=d[1]),e[0]=Math.max(Math.min(e[0],d[1]),d[0]),e[1]=Math.max(Math.min(e[1],d[1]),d[0]),e[0]>e[1]&&(e[0]=e[1]),this._intervalPrecision=a,this._interval=c,this._niceExtent=b)};a.prototype.niceExtent=function(c){var a=this._extent;if(a[0]===a[1])if(0!==a[0]){var b=a[0];c.fixMax||(a[1]+=b/2);a[0]-=b/2}else a[1]=1;isFinite(a[1]-a[0])||(a[0]=0,a[1]=1);this.niceTicks(c.splitNumber,c.minInterval,c.maxInterval);b=this._interval;c.fixMin||(a[0]=sa(Math.floor(a[0]/b)*b));c.fixMax||(a[1]=sa(Math.ceil(a[1]/b)*b))};a.type="interval";return a}(tc);tc.registerClass(Zd);var ep="undefined"!==typeof Float32Array?Float32Array:Array,IJ={seriesType:"bar",plan:cf(),reset:function(b){if(b.coordinateSystem&&"cartesian2d"===b.coordinateSystem.type&&b.pipelineContext&&b.pipelineContext.large){var a=b.getData(),c=b.coordinateSystem,d=c.master.getRect(),e=c.getBaseAxis(),f=c.getOtherAxis(e),g=a.mapDimension(f.dim),h=a.mapDimension(e.dim),k=f.isHorizontal(),l=k?0:1,m=jt(nm([b]),e,b).width;.5>>1;b[e][1]b&&(this._approxInterval=b);c=ek.length;c=Math.min(JJ(ek,this._approxInterval,0,c),c-1);this._interval=ek[c][1];this._minLevelUnit=ek[Math.max(c-1,0)][0]};a.prototype.parse=function(c){return"number"===typeof c?c:+qb(c)};a.prototype.contain=function(c){return Ti(this.parse(c),this._extent)};a.prototype.normalize=function(c){return Ui(this.parse(c),this._extent)};a.prototype.scale=function(c){return Vi(c,this._extent)};a.type="time";return a}(Zd),ek=[["second",1E3],["minute",6E4],["hour",36E5],["quarter-day",216E5],["half-day",432E5],["day",10368E4],["half-week",3024E5],["week",6048E5],["month",26784E5],["quarter",8208E6],["half-year",15768E6],["year",31536E6]];tc.registerClass(pm);var bz=tc.prototype,Ch=Zd.prototype,KJ=Math.floor,LJ=Math.ceil,fk=Math.pow,Ob=Math.log,om=function(b){function a(){var c=null!==b&&b.apply(this,arguments)||this;c.type="log";c.base=10;c._originalScale=new Zd;c._interval=0;return c}x(a,b);a.prototype.getTicks=function(c){var a=this._extent,b=this._originalScale.getExtent();c=Ch.getTicks.call(this,c);return C(c,function(c){c=c.value;var d=sa(fk(this.base,c)),d=c===a[0]&&this._fixMin?sa(d,Db(b[0])):d,d=c===a[1]&&this._fixMax?sa(d,Db(b[1])):d;return{value:d}},this)};a.prototype.setExtent=function(c,a){var b=this.base;c=Ob(c)/Ob(b);a=Ob(a)/Ob(b);Ch.setExtent.call(this,c,a)};a.prototype.getExtent=function(){var c=this.base,a=bz.getExtent.call(this);a[0]=fk(c,a[0]);a[1]=fk(c,a[1]);c=this._originalScale.getExtent();this._fixMin&&(a[0]=sa(a[0],Db(c[0])));this._fixMax&&(a[1]=sa(a[1],Db(c[1])));return a};a.prototype.unionExtent=function(c){this._originalScale.unionExtent(c);var a=this.base;c[0]=Ob(c[0])/Ob(a);c[1]=Ob(c[1])/Ob(a);bz.unionExtent.call(this,c)};a.prototype.unionExtentFromData=function(c,a){this.unionExtent(c.getApproximateExtent(a))};a.prototype.niceTicks=function(c){c=c||10;var a=this._extent,b=a[1]-a[0];if(!(Infinity===b||0>=b)){var f=uq(b);for(.5>=c/b*f&&(f*=10);!isNaN(f)&&1>Math.abs(f)&&0k&&(k=h=NaN);a=Nc(h)||Nc(k)||a&&!e;this._needCrossZero&&(0h&&0>k&&!m&&(k=0));c=this._determinedMin;b=this._determinedMax;null!=c&&(h=c,l=!0);null!=b&&(k=b,m=!0);return{min:h,max:k,minFixed:l,maxFixed:m,isBlank:a}};b.prototype.modifyDataMinMax=function(a,c){O(!this.frozen);this[MJ[a]]=c};b.prototype.setDeterminedMinMax=function(a,c){var b=NJ[a];O(!this.frozen&&null==this[b]);this[b]=c};b.prototype.freeze=function(){this.frozen=!0};return b}(),NJ={min:"_determinedMin",max:"_determinedMax"},MJ={min:"_dataMin",max:"_dataMax"},Lf=function(){function b(){}b.prototype.getNeedCrossZero=function(){return!this.option.scale};b.prototype.getCoordSysModel=function(){};return b}(),OJ=Object.freeze({__proto__:null,createList:function(b){return sc(b.getSource(),b)},getLayoutRect:Aa,dataStack:{isDimensionStacked:Gc,enableDataStack:gt,getStackedDimension:lm},createScale:function(b,a){var c=a;a instanceof la||(c=new la(a));var d=Dg(c);d.setExtent(b[0],b[1]);jd(d,c);return d},mixinAxisModelCommonMethods:function(b){wa(b,Lf)},getECData:S,createTextStyle:function(b,a){a=a||{};return Ja(b,null,null,"normal"!==a.state)},createDimensions:gf,createSymbol:Pa,enableHoverEmphasis:va}),rt=function(){function b(a,c,b){this.name=a;this.geometries=c;b?b=[b[0],b[1]]:(a=this.getBoundingRect(),b=[a.x+a.width/2,a.y+a.height/2]);this.center=b}b.prototype.getBoundingRect=function(){var a=this._rect;if(a)return a;for(var c=Number.MAX_VALUE,a=[c,c],c=[-c,-c],b=[],e=[],f=this.geometries,g=0;g=Math.min(c[0],c[1])&&a<=b};b.prototype.containData=function(a){return this.scale.contain(a)};b.prototype.getExtent=function(){return this._extent.slice()};b.prototype.getPixelPrecision=function(a){return Wk(a||this.scale.getExtent(),this._extent)};b.prototype.setExtent=function(a,c){var b=this._extent;b[0]=a;b[1]=c};b.prototype.dataToCoord=function(a,c){var b=this._extent,e=this.scale;a=e.normalize(a);this.onBand&&"ordinal"===e.type&&(b=b.slice(),yt(b,e.count()));return ga(a,dz,b,c)};b.prototype.coordToData=function(a,c){var b=this._extent,e=this.scale;this.onBand&&"ordinal"===e.type&&(b=b.slice(),yt(b,e.count()));b=ga(a,b,dz,c);return this.scale.scale(b)};b.prototype.pointToData=function(a,c){};b.prototype.getTicksCoords=function(a){a=a||{};var c=a.tickModel||this.getTickModel(),b=EC(this,c).ticks,b=C(b,function(c){return{coord:this.dataToCoord("ordinal"===this.scale.type?this.scale.getRawOrdinalNumber(c):c),tickValue:c}},this),c=c.get("alignWithLabel");HC(this,b,c,a.clamp);return b};b.prototype.getMinorTicksCoords=function(){if("ordinal"===this.scale.type)return[];var a=this.model.getModel("minorTick").get("splitNumber");0a||(a=5);a=this.scale.getMinorTicks(a);return C(a,function(c){return C(c,function(c){return{coord:this.dataToCoord(c),tickValue:c}},this)},this)};b.prototype.getViewLabels=function(){var a;if("category"===this.type){a=this.getLabelModel();var c=st(this,a);a=!a.get("show")||this.scale.isBlank()?{labels:[],labelCategoryInterval:c.labelCategoryInterval}:c}else a=GC(this);return a.labels};b.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")};b.prototype.getTickModel=function(){return this.model.getModel("axisTick")};b.prototype.getBandWidth=function(){var a=this._extent,c=this.scale.getExtent(),c=c[1]-c[0]+(this.onBand?1:0);0===c&&(c=1);return Math.abs(Math.abs(a[1]-a[0]))/c};b.prototype.calculateCategoryInterval=function(){var a,c,b;b=this.getLabelModel();a=this.getRotate?this.getRotate():this.isHorizontal&&!this.isHorizontal()?90:0;c=b.get("rotate")||0;b=b.getFont();var e=Eg(this),f=(a-c)/180*Math.PI;a=this.scale;c=a.getExtent();a=a.count();if(1>c[1]-c[0])a=0;else{var g=1;40=Math.abs(g-b)&&1>=Math.abs(h-a)&&g>b&&e.axisExtent0===c[0]&&e.axisExtent1===c[1]?b=g:(e.lastTickCount=a,e.lastAutoInterval=b,e.axisExtent0=c[0],e.axisExtent1=c[1]);a=b}return a};return b}(),ae=Math.round,ez=Math.sin,fz=Math.cos,gz=Math.PI,Ad=2*Math.PI,hz=180/gz,UJ=function(){function b(){}b.prototype.reset=function(){this._d=[];this._str=""};b.prototype.moveTo=function(a,c){this._add("M",a,c)};b.prototype.lineTo=function(a,c){this._add("L",a,c)};b.prototype.bezierCurveTo=function(a,c,b,e,f,g){this._add("C",a,c,b,e,f,g)};b.prototype.quadraticCurveTo=function(a,c,b,e){this._add("Q",a,c,b,e)};b.prototype.arc=function(a,c,b,e,f,g){this.ellipse(a,c,b,b,0,e,f,g)};b.prototype.ellipse=function(a,c,b,e,f,g,h,k){var d=0===this._d.length;h-=g;k=!k;var m=Math.abs(h),n=m-Ad,n=1E-4>n&&-1E-4=Ad:-h>=Ad),p=0m&&-1E-4=gz===!!k,p=Hc(a+b*fz(g)),q=Hc(c+e*ez(g));n&&(h=k?Ad-1E-4:-Ad+1E-4,m=!0,d&&this._d.push("M",p,q));a=Hc(a+b*fz(g+h));c=Hc(c+e*ez(g+h));if(isNaN(p)||isNaN(q)||isNaN(b)||isNaN(e)||isNaN(f)||isNaN(hz)||isNaN(a)||isNaN(c))return"";this._d.push("A",Hc(b),Hc(e),ae(f*hz),+m,+k,a,c)};b.prototype.rect=function(a,c,b,e){this._add("M",a,c);this._add("L",a+b,c);this._add("L",a+b,c+e);this._add("L",a,c+e);this._add("L",a,c)};b.prototype.closePath=function(){0b.style.strokePercent)f||(f=b.__svgPathBuilder=new UJ),f.reset(),d.rebuildPath(f,b.style.strokePercent),f.generateStr(),b.__svgPathVersion=e;ua(c,"d",f.getStr());um(c,a,b);tm(c,b.transform)}},Et={brush:function(b){var a=b.style,c=a.image;c instanceof HTMLImageElement?c=c.src:c instanceof HTMLCanvasElement&&(c=c.toDataURL());if(c){var d=a.x||0,e=a.y||0,f=a.width,g=a.height,h=b.__svgEl;h||(h=uc("image"),b.__svgEl=h);c!==b.__imageSrc&&(h.setAttributeNS("http://www.w3.org/1999/xlink","href",c),b.__imageSrc=c);ua(h,"width",f+"");ua(h,"height",g+"");ua(h,"x",d+"");ua(h,"y",e+"");um(h,a,b);tm(h,b.transform)}}},VJ={left:"start",right:"end",center:"middle",middle:"middle"},Ft={brush:function(b){var a=b.style,c=a.text;null!=c&&(c+="");if(c&&!isNaN(a.x)&&!isNaN(a.y)){var d=b.__svgEl;d||(d=uc("text"),d.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),b.__svgEl=d);var e=a.font||"12px sans-serif";d.style.font=e;d.textContent=c;um(d,a,b);tm(d,b.transform);b=a.x||0;var c=a.y||0,e=Ya("\u56fd",e),f=a.textBaseline;"top"===f?c+=e/2:"bottom"===f&&(c-=e/2);e=c;a=VJ[a.textAlign]||a.textAlign;ua(d,"dominant-baseline","central");ua(d,"text-anchor",a);ua(d,"x",b+"");ua(d,"y",e+"")}}},gk=function(){function b(a,c,b,e,f){this.nextId=0;this._domName="_dom";this.createElement=uc;this._zrId=a;this._svgRoot=c;this._tagNames="string"===typeof b?[b]:b;this._markLabel=e;f&&(this._domName=f)}b.prototype.getDefs=function(a){var c=this._svgRoot,b=this._svgRoot.getElementsByTagName("defs");if(0===b.length){if(a){var e=c.insertBefore(this.createElement("defs"),c.firstChild);e.contains||(e.contains=function(c){var a=e.children;if(!a)return!1;for(var b=a.length-1;0<=b;--b)if(a[b]===c)return!0;return!1});return e}return null}return b[0]};b.prototype.doUpdate=function(a,c){if(a){var b=this.getDefs(!1);a[this._domName]&&b.contains(a[this._domName])?"function"===typeof c&&c(a):(b=this.add(a))&&(a[this._domName]=b)}};b.prototype.add=function(a){return null};b.prototype.addDom=function(a){var c=this.getDefs(!0);a.parentNode!==c&&c.appendChild(a)};b.prototype.removeDom=function(a){var c=this.getDefs(!1);c&&a[this._domName]&&(c.removeChild(a[this._domName]),a[this._domName]=null)};b.prototype.getDoms=function(){var a=this.getDefs(!1);if(!a)return[];var c=[];r(this._tagNames,function(b){b=a.getElementsByTagName(b);for(var d=0;d=k)}}if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;for(var e=[],k=this.maxRepaintRectCount,l=!1,m=new aa(0,0,0,0),n=this.__startIndex;ne[0]){for(k=0;ka);k++);h=b[e[k]]}e.splice(k+1,0,a);b[a]=c;c.virtual||(h?(b=h.dom,b.nextSibling?g.insertBefore(c.dom,b.nextSibling):g.appendChild(c.dom)):g.firstChild?g.insertBefore(c.dom,g.firstChild):g.appendChild(c.dom));c.__painter=this}else yb("Layer of zlevel "+a+" is not valid")};b.prototype.eachLayer=function(a,c){for(var b=this._zlevelList,e=0;el.__drawIndex&&(l.__drawIndex=h))}c(h);this.eachBuiltinLayer(function(c,a){!c.__used&&0c.__drawIndex&&(c.__drawIndex=c.__startIndex)})};b.prototype.clear=function(){this.eachBuiltinLayer(this._clearLayer);return this};b.prototype._clearLayer=function(a){a.clear()};b.prototype.setBackgroundColor=function(a){this._backgroundColor=a;r(this._layers,function(c){c.setUnpainted()})};b.prototype.configLayer=function(a,c){if(c){var b=this._layerConfig;b[a]?U(b[a],c,!0):b[a]=c;for(var e=0;e=q&&0<=q)return b=k?(p-h)*q+h:(n-g)*q+g,k?[c,b]:[b,c];g=n;h=p;break;case d.C:n=b[m++];p=b[m++];q=b[m++];t=b[m++];u=b[m++];w=b[m++];var v=k?gl(g,n,q,u,c,l):gl(h,p,t,w,c,l);if(0=B&&0<=B)return b=k?Oa(h,p,t,w,B):Oa(g,n,q,u,B),k?[c,b]:[b,c]}g=u;h=w}}};return a}(Y),dK=function(b){function a(){return null!==b&&b.apply(this,arguments)||this}x(a,b);return a}(iz),jz=function(b){function a(c){c=b.call(this,c)||this;c.type="ec-polygon";return c}x(a,b);a.prototype.getDefaultShape=function(){return new dK};a.prototype.buildPath=function(c,a){var b=a.points,d=a.stackedOnPoints,g=0,h=b.length/2,k=a.smoothMonotone;if(a.connectNulls){for(;0c&&null==f.originalX&&(f.originalX=n.x,f.originalY=n.y);var q=b.getLayout("points"),t=b.hostModel,u=t.get("connectNulls"),w=h.get("precision");h=h.get("distance")||0;k=k.getBaseAxis();var v=k.isHorizontal();d=k.inverse;a=a.shape;k=d?v?a.x:a.y+a.height:v?a.x+a.width:a.y;a=(v?h:0)*(d?-1:1);h=(v?0:-h)*(d?-1:1);v=v?"x":"y";d=q.length/2;for(var r="x"===v?0:1,B,y=0,x=-1,D=0;D=k||B>=k&&e<=k){x=D;break}y=D}B=e}d=[y,x];e=(k-B)/(e-B);r=d[1]-d[0];B=void 0;1<=r?(1a&&(a=b[c]);return isFinite(a)?a:NaN},min:function(b){for(var a=Infinity,c=0;cc&&(c=a);return c};a.prototype.brushSelector=function(c,a,b){return b.rect(a.getItemLayout(c))};a.type="series.bar";a.dependencies=["grid","polar"];a.defaultOption=ed(Fh.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:"#212121"}},realtimeSort:!1});return a}(Fh),gK=function(){return function(){this.startAngle=this.r=this.r0=this.cy=this.cx=0;this.endAngle=2*Math.PI;this.clockwise=!0}}(),gp=function(b){function a(c){c=b.call(this,c)||this;c.type="sausage";return c}x(a,b);a.prototype.getDefaultShape=function(){return new gK};a.prototype.buildPath=function(c,a){var b=a.cx,d=a.cy,g=Math.max(a.r0||0,0),h=Math.max(a.r,0),k=.5*(h-g),l=g+k,m=a.startAngle,n=a.endAngle,p=a.clockwise,q=Math.cos(m),t=Math.sin(m),u=Math.cos(n),w=Math.sin(n);if(p?n-m<2*Math.PI:m-n<2*Math.PI)c.moveTo(q*g+b,t*g+d),c.arc(q*l+b,t*l+d,k,-Math.PI+m,m,!p);c.arc(b,d,h,m,n,!p);c.moveTo(u*h+b,w*h+d);c.arc(u*l+b,w*l+d,k,n-2*Math.PI,n-Math.PI,!p);0!==g&&(c.arc(b,d,g,n,m,p),c.moveTo(q*g+b,w*g+d));c.closePath()};return a}(Y),hK=["itemStyle","borderWidth"],aD=["itemStyle","borderRadius"],hk=[0,0],hp=Math.max,ip=Math.min,iK=function(b){function a(){var c=b.call(this)||this;c.type=a.type;c._isFirstFrame=!0;return c}x(a,b);a.prototype.render=function(c,a,b,f){this._model=c;this._removeOnRenderedListener(b);this._updateDrawMode(c);var d=c.get("coordinateSystem");"cartesian2d"===d||"polar"===d?this._isLargeDraw?this._renderLarge(c,a,b):this._renderNormal(c,a,b,f):Pe("Only cartesian2d and polar supported for bar.")};a.prototype.incrementalPrepareRender=function(c){this._clear();this._updateDrawMode(c);this._updateLargeClip(c)};a.prototype.incrementalRender=function(c,a){this._incrementalRenderLarge(c,a)};a.prototype._updateDrawMode=function(c){c=c.pipelineContext.large;if(null==this._isLargeDraw||c!==this._isLargeDraw)this._isLargeDraw=c,this._clear()};a.prototype._renderNormal=function(c,a,b,f){function d(c){var a=ik[m.type](k,c),a=new ("polar"===m.type?lb:Z)({shape:$t(p,a,m),silent:!0,z2:0});a.useStyle(B.getItemStyle());"cartesian2d"===m.type&&a.setShape("r",y);return x[c]=a}var e=this.group,k=c.getData(),l=this._data,m=c.coordinateSystem,n=m.getBaseAxis(),p;"cartesian2d"===m.type?p=n.isHorizontal():"polar"===m.type&&(p="angle"===n.dim);var q=c.isAnimationEnabled()?c:null,t=$C(c,m);t&&this._enableRealtimeSort(t,k,b);var u=c.get("clip",!0)||t,w=ZC(m,k);e.removeClipPath();var v=c.get("roundCap",!0),r=c.get("showBackground",!0),B=c.getModel("backgroundStyle"),y=B.get("borderRadius")||0,x=[],D=this._backgroundEls,A=f&&f.isInitSort,E=f&&"changeAxisOrder"===f.type;k.diff(l).add(function(a){var b=k.getItemModel(a),f=ik[m.type](k,a,b);r&&d(a);if(k.hasValue(a)){var g=!1;u&&(g=kz[m.type](w,f));var h=lz[m.type](c,k,a,f,p,q,n.model,!1,v);Wt(h,k,a,b,f,c,p,"polar"===m.type);A?h.attr({shape:f}):t?Vt(t,q,h,f,a,p,!1,!1):za(h,{shape:f},c,a);k.setItemGraphicEl(a,h);e.add(h);h.ignore=g}}).update(function(a,b){var f=k.getItemModel(a),g=ik[m.type](k,a,f);if(r){var h;0===D.length?h=d(b):(h=D[b],h.useStyle(B.getItemStyle()),"cartesian2d"===m.type&&h.setShape("r",y),x[a]=h);var z=ik[m.type](k,a),z=$t(p,z,m);ea(h,{shape:z},q,a)}h=l.getItemGraphicEl(b);k.hasValue(a)?(z=!1,u&&(z=kz[m.type](w,g))&&e.remove(h),h||(h=lz[m.type](c,k,a,g,p,q,n.model,!!h,v)),E||Wt(h,k,a,f,g,c,p,"polar"===m.type),A?h.attr({shape:g}):t?Vt(t,q,h,g,a,p,!0,E):ea(h,{shape:g},c,a,null),k.setItemGraphicEl(a,h),h.ignore=z,e.add(h)):e.remove(h)}).remove(function(a){var b=l.getItemGraphicEl(a);b&&ig(b,c,a)}).execute();a=this._backgroundGroup||(this._backgroundGroup=new M);a.removeAll();for(b=0;bl?Number.MIN_VALUE:a(c.indexOfRawIndex(l));if(l>e)return!0;e=l}return!1};a.prototype._isOrderDifferentInView=function(c,a){for(var b=a.scale,d=b.getExtent(),g=Math.max(0,d[0]),d=Math.min(d[1],b.getOrdinalMeta().categories.length-1);g<=d;++g)if(c.ordinalNumbers[g]!==b.getRawOrdinalNumber(g))return!0};a.prototype._updateSortWithinSameData=function(c,a,b,f){this._isOrderChangedWithinSameData(c,a,b)&&(c=this._dataSort(c,b,a),this._isOrderDifferentInView(c,b)&&(this._removeOnRenderedListener(f),f.dispatchAction({type:"changeAxisOrder",componentType:b.dim+"Axis",axisId:b.index,sortInfo:c})))};a.prototype._dispatchInitSort=function(c,a,b){var d=a.baseAxis,e=this._dataSort(c,d,function(b){return c.get(c.mapDimension(a.otherAxis.dim),b)});b.dispatchAction({type:"changeAxisOrder",componentType:d.dim+"Axis",isInitSort:!0,axisId:d.index,sortInfo:e,animation:{duration:0}})};a.prototype.remove=function(c,a){this._clear(this._model);this._removeOnRenderedListener(a)};a.prototype.dispose=function(c,a){this._removeOnRenderedListener(a)};a.prototype._removeOnRenderedListener=function(c){this._onRendered&&(c.getZr().off("rendered",this._onRendered),this._onRendered=null)};a.prototype._clear=function(c){var a=this.group,b=this._data;c&&c.isAnimationEnabled()&&b&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],b.eachItemGraphicEl(function(a){ig(a,c,S(a).dataIndex)})):a.removeAll();this._data=null;this._isFirstFrame=!0};a.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup);this._backgroundGroup=null};a.type="bar";return a}(oa),kz={cartesian2d:function(b,a){var c=0>a.width?-1:1,d=0>a.height?-1:1;0>c&&(a.x+=a.width,a.width=-a.width);0>d&&(a.y+=a.height,a.height=-a.height);var e=b.x+b.width,f=b.y+b.height,g=hp(a.x,b.x),h=ip(a.x+a.width,e),k=hp(a.y,b.y),l=ip(a.y+a.height,f),m=he?h:g;a.y=n&&k>f?l:k;a.width=m?0:h-g;a.height=n?0:l-k;0>c&&(a.x+=a.width,a.width=-a.width);0>d&&(a.y+=a.height,a.height=-a.height);return m||n},polar:function(b,a){var c=a.r0<=a.r?1:-1;if(0>c){var d=a.r;a.r=a.r0;a.r0=d}var e=ip(a.r,b.r),f=hp(a.r0,b.r0);a.r=e;a.r0=f;0>c&&(d=a.r,a.r=a.r0,a.r0=d);return 0>e-f}},lz={cartesian2d:function(b,a,c,d,e,f,g,h,k){b=new Z({shape:F({},d),z2:1});b.__dataIndex=c;b.name="item";f&&(b.shape[e?"height":"width"]=0);return b},polar:function(b,a,c,d,e,f,g,h,k){b=new (!e&&k?gp:lb)({shape:K({clockwise:d.startAngle=c&&n<=g&&(h<=m?b>=h&&b<=m:b>=m&&b<=h)){a=f[k];break a}}a=-1}S(this).dataIndex=0<=a?a:null},30,!1),$i=2*Math.PI,au=Math.PI/180,fD=Math.PI/180,kK=function(b){function a(c,a,e){var d=b.call(this)||this;d.z2=2;var g=new kb,h=new ha;d.setTextGuideLine(g);d.setTextContent(h);d.updateData(c,a,e,!0);return d}x(a,b);a.prototype.updateData=function(c,a,b,f){var d=c.hostModel,e=c.getItemModel(a),k=e.getModel("emphasis"),l=c.getItemLayout(a),m=F(nf(e.getModel("itemStyle"),l)||{},l);f?(this.setShape(m),"scale"===d.getShallow("animationType")?(this.shape.r=l.r0,za(this,{shape:{r:l.r}},d,a)):null!=b?(this.setShape({startAngle:b,endAngle:b}),za(this,{shape:{startAngle:l.startAngle,endAngle:l.endAngle}},d,a)):(this.shape.endAngle=l.startAngle,ea(this,{shape:{endAngle:l.endAngle}},d,a))):ea(this,{shape:m},d,a);this.useStyle(c.getItemVisual(a,"style"));Fa(this,e);f=(l.startAngle+l.endAngle)/2;m=d.get("selectedOffset");b=Math.cos(f)*m;f=Math.sin(f)*m;(m=e.getShallow("cursor"))&&this.attr("cursor",m);this._updateLabel(d,c,a);this.ensureState("emphasis").shape=ro({r:l.r+(k.get("scale")?k.get("scaleSize")||0:0)},nf(k.getModel("itemStyle"),l));F(this.ensureState("select"),{x:b,y:f,shape:nf(e.getModel(["select","itemStyle"]),l)});F(this.ensureState("blur"),{shape:nf(e.getModel(["blur","itemStyle"]),l)});c=this.getTextGuideLine();a=this.getTextContent();F(c.ensureState("select"),{x:b,y:f});F(a.ensureState("select"),{x:b,y:f});va(this,k.get("focus"),k.get("blurScope"))};a.prototype._updateLabel=function(c,a,b){var d=a.getItemModel(b),e=d.getModel("labelLine"),h=a.getItemVisual(b,"style"),k=h&&h.fill,h=h&&h.opacity;cb(this,Ra(d),{labelFetcher:a.hostModel,labelDataIndex:b,inheritColor:k,defaultOpacity:h,defaultText:c.getFormattedLabel(b,"normal")||a.getName(b)});c=this.getTextContent();this.setTextConfig({position:null,rotation:null});c.attr({z2:10});Tl(this,Ul(d),{stroke:k,opacity:zb(e.get(["lineStyle","opacity"]),h,1)})};return a}(lb),lK=function(b){function a(){var c=null!==b&&b.apply(this,arguments)||this;c.ignoreLabelLineUpdate=!0;return c}x(a,b);a.prototype.init=function(){this._sectorGroup=new M};a.prototype.render=function(c,a,b,f){var d=c.getData(),e=this._data,k=this.group,l;if(!e&&0=b.r0}};a.type="pie";return a}(oa),Gh=function(){function b(a,c){this._getDataWithEncodedVisual=a;this._getRawData=c}b.prototype.getAllNames=function(){var a=this._getRawData();return a.mapArray(a.getName)};b.prototype.containName=function(a){return 0<=this._getRawData().indexOfName(a)};b.prototype.indexOfName=function(a){return this._getDataWithEncodedVisual().indexOfName(a)};b.prototype.getItemVisual=function(a,c){return this._getDataWithEncodedVisual().getItemVisual(a,c)};return b}(),mK=function(b){function a(){var c=null!==b&&b.apply(this,arguments)||this;c.useColorPaletteOnData=!0;return c}x(a,b);a.prototype.init=function(c){b.prototype.init.apply(this,arguments);this.legendVisualProvider=new Gh(I(this.getData,this),I(this.getRawData,this));this._defaultLabelLine(c)};a.prototype.mergeOption=function(){b.prototype.mergeOption.apply(this,arguments)};a.prototype.getInitialData=function(){return of(this,{coordDimensions:["value"],encodeDefaulter:P(Il,this)})};a.prototype.getDataParams=function(c){var a=this.getData(),e=b.prototype.getDataParams.call(this,c),f=[];a.each(a.mapDimension("value"),function(c){f.push(c)});e.percent=tq(f,c,a.hostModel.get("percentPrecision"));e.$vars.push("percent");return e};a.prototype._defaultLabelLine=function(c){Id(c,"labelLine",["show"]);var a=c.labelLine,b=c.emphasis.labelLine;a.show=a.show&&c.label.show;b.show=b.show&&c.emphasis.label.show};a.type="series.pie";a.defaultOption={zlevel:0,z:2,legendHoverLink:!0,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1E3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"};return a}(ra),nK=function(b){function a(){var c=null!==b&&b.apply(this,arguments)||this;c.type=a.type;c.hasSymbolVisual=!0;return c}x(a,b);a.prototype.getInitialData=function(c,a){return sc(this.getSource(),this,{useEncodeDefaulter:!0})};a.prototype.getProgressive=function(){var c=this.option.progressive;return null==c?this.option.large?5E3:this.get("progressive"):c};a.prototype.getProgressiveThreshold=function(){var c=this.option.progressiveThreshold;return null==c?this.option.large?1E4:this.get("progressiveThreshold"):c};a.prototype.brushSelector=function(c,a,b){return b.point(a.getItemLayout(c))};a.type="series.scatter";a.dependencies=["grid","polar","geo","singleAxis","calendar"];a.defaultOption={coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2E3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:"#212121"}}};return a}(ra),oK=function(){return function(){}}(),jp=function(b){function a(c){return b.call(this,c)||this}x(a,b);a.prototype.getDefaultShape=function(){return new oK};a.prototype.buildPath=function(c,a){var b=a.points,d=a.size,g=this.symbolProxy,h=g.shape,k=c.getContext?c.getContext():c;if(k&&4>d[0])this._ctx=k;else for(this._ctx=null,k=0;k=l&&a>=k&&c<=l+b&&a<=k+g)return h}return-1};return a}(Y),pK=function(){function b(){this.group=new M}b.prototype.isPersistent=function(){return!this._incremental};b.prototype.updateData=function(a,c){this.group.removeAll();var b=new jp({rectHover:!0,cursor:"default"});b.setShape({points:a.getLayout("points")});this._setCommon(b,a,!1,c);this.group.add(b);this._incremental=null};b.prototype.updateLayout=function(a){if(!this._incremental){var c=a.getLayout("points");this.group.eachChild(function(a){null!=a.startIndex&&(c=new Float32Array(c.buffer,8*a.startIndex,2*(a.endIndex-a.startIndex)));a.setShape("points",c)})}};b.prototype.incrementalPrepareUpdate=function(a){this.group.removeAll();this._clearIncremental();2E6a.shape.size[0];a.useStyle(d.getModel("itemStyle").getItemStyle(e?["color","shadowBlur","shadowColor"]:["color"]));(c=(c=c.getVisual("style"))&&c.fill)&&a.setColor(c);if(!b){var h=S(a);h.seriesIndex=d.seriesIndex;a.on("mousemove",function(c){h.dataIndex=null;c=a.findDataIndex(c.offsetX,c.offsetY);0<=c&&(h.dataIndex=c+(a.startIndex||0))})}};b.prototype.remove=function(){this._clearIncremental();this._incremental=null;this.group.removeAll()};b.prototype._clearIncremental=function(){var a=this._incremental;a&&a.clearDisplaybles()};return b}(),qK=function(b){function a(){var c=null!==b&&b.apply(this,arguments)||this;c.type=a.type;return c}x(a,b);a.prototype.render=function(c,a,b){a=c.getData();this._updateSymbolDraw(a,c).updateData(a,{clipShape:this._getClipShape(c)});this._finished=!0};a.prototype.incrementalPrepareRender=function(c,a,b){a=c.getData();this._updateSymbolDraw(a,c).incrementalPrepareUpdate(a);this._finished=!1};a.prototype.incrementalRender=function(c,a,b){this._symbolDraw.incrementalUpdate(c,a.getData(),{clipShape:this._getClipShape(a)});this._finished=c.end===a.getData().count()};a.prototype.updateTransform=function(c,a,b){var d=c.getData();this.group.dirty();if(!this._finished||1E4a[1]&&a.reverse();return a};a.prototype.pointToData=function(c,a){return this.coordToData(this.toLocalCoord(c["x"===this.dim?0:1]),a)};a.prototype.setCategorySortInfo=function(c){if("category"!==this.type)return!1;this.model.option.categorySortInfo=c;this.scale.setSortInfo(c)};return a}(Pb),pD=function(){function b(a,c,b){this.type="grid";this._coordsMap={};this._coordsList=[];this._axesMap={};this._axesList=[];this.axisPointerEnabled=!0;this.dimensions=lp;this._initCartesian(a,c,b);this.model=a}b.prototype.getRect=function(){return this._rect};b.prototype.update=function(a,c){var b=this._axesMap;this._updateScale(a,this.model);r(b.x,function(c){jd(c.scale,c.model)});r(b.y,function(c){jd(c.scale,c.model)});var e={};r(b.x,function(c){gu(b,"y",c,e)});r(b.y,function(c){gu(b,"x",c,e)});this.resize(this.model,c)};b.prototype.resize=function(a,c,b){function d(){r(h,function(c){var a=c.isHorizontal(),b=a?[0,g.width]:[0,g.height],d=c.inverse?1:0;c.setExtent(b[d],b[1-d]);hD(c,a?g.x:g.y)})}var f=a.getBoxLayoutParams();a=!b&&a.get("containLabel");var g=Aa(f,{width:c.getWidth(),height:c.getHeight()});this._rect=g;var h=this._axesList;d();a&&(r(h,function(c){if(!c.model.get(["axisLabel","inside"])){var a;var b=c.scale;if(!c.model.get(["axisLabel","show"])||b.isBlank())a=void 0;else{var d=b.getExtent();b instanceof Wi?b=b.count():(a=b.getTicks(),b=a.length);var e=c.getLabelModel(),f=Eg(c),h,k=1;40ba(f,g)&&(g=null)):b&&e?g=this.getCartesian(b.componentIndex,e.componentIndex):b?h=this.getAxis("x",b.componentIndex):e?h=this.getAxis("y",e.componentIndex):a&&a.coordinateSystem===this&&(g=this._coordsList[0]);return{cartesian:g,axis:h}};b.prototype.containPoint=function(a){var c=this._coordsList[0];if(c)return c.containPoint(a)};b.prototype._initCartesian=function(a,c,b){function d(c){return function(b,d){if(Cm(b,a)){var e=b.get("position");"x"===c?"top"!==e&&"bottom"!==e&&(e=h.bottom?"top":"bottom"):"left"!==e&&"right"!==e&&(e=h.left?"right":"left");h[e]=!0;e=new vK(c,Dg(b),[0,0],b.get("type"),e);e.onBand="category"===e.type&&b.get("boundaryGap");e.inverse=b.get("inverse");b.axis=e;e.model=b;e.grid=g;e.index=d;g._axesList.push(e);k[c][d]=e;l[c]++}}}var f=this,g=this,h={left:!1,right:!1,top:!1,bottom:!1},k={x:{},y:{}},l={x:0,y:0};c.eachComponent("xAxis",d("x"),this);c.eachComponent("yAxis",d("y"),this);l.x&&l.y?(this._axesMap=k,r(k.x,function(c,b){r(k.y,function(d,e){var g="x"+b+"y"+e,h=new uK(g);h.master=f;h.model=a;f._coordsMap[g]=h;f._coordsList.push(h);h.addAxis(c);h.addAxis(d)})})):(this._axesMap={},this._axesList=[])};b.prototype._updateScale=function(a,c){function b(c,a){r(Xi(c,a.dim),function(b){a.scale.unionExtentFromData(c,b)})}r(this._axesList,function(c){c.scale.setExtent(Infinity,-Infinity);if("category"===c.type){var a=c.model.get("categorySortInfo");c.scale.setSortInfo(a)}});a.eachSeries(function(a){if(eu(a)){var d=fu(a),e=d.xAxisModel,d=d.yAxisModel;Cm(e,c)&&Cm(d,c)&&(e=this.getCartesian(e.componentIndex,d.componentIndex),a=a.getData(),d=e.getAxis("x"),e=e.getAxis("y"),"list"===a.type&&(b(a,d),b(a,e)))}},this)};b.prototype.getTooltipAxes=function(a){var c=[],b=[];r(this.getCartesians(),function(d){var e=null!=a&&"auto"!==a?d.getAxis(a):d.getBaseAxis();d=d.getOtherAxis(e);0>ba(c,e)&&c.push(e);0>ba(b,d)&&b.push(d)});return{baseAxes:c,otherAxes:b}};b.create=function(a,c){var d=[];a.eachComponent("grid",function(e,f){var g=new b(e,a,c);g.name="grid_"+f;g.resize(e,c,!0);e.coordinateSystem=g;d.push(g)});a.eachSeries(function(c){if(eu(c)){var a=fu(c),b=a.xAxisModel,a=a.yAxisModel,d=b.getCoordSysModel();if(!d)throw Error('Grid "'+zb(b.get("gridIndex"),b.get("gridId"),0)+'" not found');if(b.getCoordSysModel()!==a.getCoordSysModel())throw Error("xAxis and yAxis must use the same grid");c.coordinateSystem=d.coordinateSystem.getCartesian(b.componentIndex,a.componentIndex)}});return d};b.dimensions=lp;return b}(),nd=Math.PI,mb=function(){function b(a,c){this.group=new M;this.opt=c;this.axisModel=a;K(c,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0,handleAutoShown:function(){return!0}});var b=new M({x:c.position[0],y:c.position[1],rotation:c.rotation});b.updateTransform();this._transformGroup=b}b.prototype.hasBuilder=function(a){return!!nz[a]};b.prototype.add=function(a){nz[a](this.opt,this.axisModel,this.group,this._transformGroup)};b.prototype.getGroup=function(){return this.group};b.innerTextLayout=function(a,c,b){a=Xk(c-a);ag(a)?(c=0l[1]?-1:1,k=["start"===f?l[0]-m*k:"end"===f?l[1]+m*k:(l[0]+l[1])/2,"middle"===f||"center"===f?b.labelOffset+g*k:0],m=a.get("nameRotate");null!=m&&(m=m*nd/180);var n;"middle"===f||"center"===f?f=mb.innerTextLayout(b.rotation,null!=m?m:b.rotation,g):(f=iD(b.rotation,f,m||0,l),n=b.axisNameAvailableWidth,null!=n&&(n=Math.abs(n/Math.sin(f.rotation)),!isFinite(n)&&(n=null)));g=h.getFont();m=a.get("nameTruncate",!0)||{};l=m.ellipsis;m=Ba(b.nameTruncateMaxWidth,m.maxWidth,n);b=a.get("tooltip",!0);var p=a.mainType;n={componentType:p,name:e,$vars:["name"]};n[p+"Index"]=a.componentIndex;h=new ha({x:k[0],y:k[1],rotation:f.rotation,silent:mb.isLabelSilent(a),style:Ja(h,{text:e,font:g,overflow:"truncate",width:m,ellipsis:l,fill:h.getTextColor()||a.get(["axisLine","lineStyle","color"]),align:h.get("align")||f.textAlign,verticalAlign:h.get("verticalAlign")||f.textVerticalAlign}),z2:1});h.tooltip=b&&b.show?F({content:e,formatter:function(){return e},formatterParams:n},b):null;h.__fullText=e;h.anid="name";a.get("triggerEvent")&&(a=mb.makeAxisEventDataBase(a),a.targetType="axisName",a.name=e,S(h).eventData=a);d.add(h);h.updateTransform();c.add(h);h.decomposeTransform()}}},mp={},le=function(b){function a(){var c=null!==b&&b.apply(this,arguments)||this;c.type=a.type;return c}x(a,b);a.prototype.render=function(c,a,e,f){if(this.axisPointerClass){var d=Fm(c);if(d){var h=d.axisPointerModel,k=d.axis.scale,l=h.option,m=h.get("status"),n=h.get("value");null!=n&&(n=k.parse(n));h=Dm(h);null==m&&(l.status=h?"show":"hide");k=k.getExtent().slice();k[0]>k[1]&&k.reverse();if(null==n||n>k[1])n=k[1];nd.min&&!d.max&&(d.max=0);var e=k;null!=d.color&&(e=K({color:d.color},k));d=U(J(d),{boundaryGap:c,splitNumber:a,scale:b,axisLine:f,axisTick:g,axisLabel:h,name:d.text,nameLocation:"end",nameGap:n,nameTextStyle:e,triggerEvent:p},!1);l||(d.name="");"string"===typeof m?(e=d.name,d.name=m.replace("{value}",null!=e?e:"")):"function"===typeof m&&(d.name=m(d.name,d));d=new la(d,null,this.ecModel);wa(d,Lf.prototype);d.mainType="radar";d.componentIndex=this.componentIndex;return d},this)};a.prototype.getIndicatorModels=function(){return this._indicatorModels};a.type="radar";a.defaultOption={zlevel:0,z:0,center:["50%","50%"],radius:"75%",startAngle:90,axisName:{show:!0},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:U({lineStyle:{color:"#bbb"}},Hh.axisLine),axisLabel:K({show:!1},Hh.axisLabel),axisTick:K({show:!1},Hh.axisTick),splitLine:K({show:!0},Hh.splitLine),splitArea:K({show:!0},Hh.splitArea),indicator:[]};return a}(W),BK=["axisLine","axisTickLabel","axisName"],wD=function(b){function a(){var c=null!==b&&b.apply(this,arguments)||this;c.type=a.type;return c}x(a,b);a.prototype.render=function(c,a,b){this.group.removeAll();this._buildAxes(c);this._buildSplitLineAndArea(c)};a.prototype._buildAxes=function(c){var a=c.coordinateSystem;c=a.getIndicatorAxes();c=C(c,function(c){return new mb(c.model,{position:[a.cx,a.cy],rotation:c.angle,labelDirection:-1,tickDirection:-1,nameDirection:1})});r(c,function(c){r(BK,c.add,c);this.group.add(c.getGroup())},this)};a.prototype._buildSplitLineAndArea=function(c){function a(c,a,b){a=b%a.length;c[a]=c[a]||[];return a}var b=c.coordinateSystem,f=b.getIndicatorAxes();if(f.length){var g=c.get("shape"),h=c.getModel("splitLine"),k=c.getModel("splitArea");c=h.getModel("lineStyle");var l=k.getModel("areaStyle"),h=h.get("show"),k=k.get("show"),m=c.get("color"),n=l.get("color"),p=A(m)?m:[m],q=A(n)?n:[n],m=[],n=[];if("circle"===g)for(var f=f[0].getTicksCoords(),t=b.cx,u=b.cy,g=0;gd[0]&&isFinite(h)&&isFinite(d[0]))}else f.getTicks().length-1>g&&(e=b(e)),k=Math.ceil(d[1]/e)*e,h=sa(k-e*g),f.setExtent(h,k),f.setInterval(e)})};b.prototype.convertToPixel=function(a,c,b){console.warn("Not implemented.");return null};b.prototype.convertFromPixel=function(a,c,b){console.warn("Not implemented.");return null};b.prototype.containPoint=function(a){console.warn("Not implemented.");return!1};b.create=function(a,c){var d=[];a.eachComponent("radar",function(e){var f=new b(e,a,c);d.push(f);e.coordinateSystem=f});a.eachSeriesByType("radar",function(c){"radar"===c.get("coordinateSystem")&&(c.coordinateSystem=d[c.get("radarIndex")||0])});return d};b.dimensions=[];return b}();ac({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},function(){});for(var fh=function(b){function a(c){var a=b.call(this)||this;a._zr=c;var e=I(a._mousedownHandler,a),f=I(a._mousemoveHandler,a),g=I(a._mouseupHandler,a),h=I(a._mousewheelHandler,a),k=I(a._pinchHandler,a);a.enable=function(a,b){this.disable();this._opt=K(J(b)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0});null==a&&(a=!0);if(!0===a||"move"===a||"pan"===a)c.on("mousedown",e),c.on("mousemove",f),c.on("mouseup",g);if(!0===a||"scale"===a||"zoom"===a)c.on("mousewheel",h),c.on("pinch",k)};a.disable=function(){c.off("mousedown",e);c.off("mousemove",f);c.off("mouseup",g);c.off("mousewheel",h);c.off("pinch",k)};return a}x(a,b);a.prototype.isDragging=function(){return this._dragging};a.prototype.isPinching=function(){return this._pinching};a.prototype.setPointerChecker=function(c){this.pointerChecker=c};a.prototype.dispose=function(){this.disable()};a.prototype._mousedownHandler=function(c){if(!(2===c.which||3===c.which||c.target&&c.target.draggable)){var a=c.offsetX,b=c.offsetY;this.pointerChecker&&this.pointerChecker(c,a,b)&&(this._x=a,this._y=b,this._dragging=!0)}};a.prototype._mousemoveHandler=function(c){if(this._dragging&&Lg("moveOnMouseMove",c,this._opt)&&"pinch"!==c.gestureEvent&&!bj(this._zr).globalPan){var a=c.offsetX,b=c.offsetY,f=this._x,g=this._y,h=a-f,k=b-g;this._x=a;this._y=b;this._opt.preventDefaultMouseMove&&Bc(c.event);a={dx:h,dy:k,oldX:f,oldY:g,newX:a,newY:b,isAvailableBehavior:null};a.isAvailableBehavior=I(Lg,null,"moveOnMouseMove",c);this.trigger("pan",a)}};a.prototype._mouseupHandler=function(c){2!==c.which&&3!==c.which&&(this._dragging=!1)};a.prototype._mousewheelHandler=function(c){var a=Lg("zoomOnMouseWheel",c,this._opt),b=Lg("moveOnMouseWheel",c,this._opt),f=c.wheelDelta,g=Math.abs(f),h=c.offsetX,k=c.offsetY;0!==f&&(a||b)&&(a&&(a=3f&&(e.fontSize=9,b.scaleX*=f/9,b.scaleY*=f/9);f=(e.fontSize||e.fontFamily)&&[e.fontStyle,e.fontWeight,(e.fontSize||12)+"px",e.fontFamily||"sans-serif"].join(" ");e.font=f;e=b.getBoundingRect();this._textX+=e.width;c.add(b);return b};b.internalField=function(){qz={g:function(a,c){var b=new M;Jb(c,b);wb(a,b,this._defs);return b},rect:function(a,c){var b=new Z;Jb(c,b);wb(a,b,this._defs);b.setShape({x:parseFloat(a.getAttribute("x")||"0"),y:parseFloat(a.getAttribute("y")||"0"),width:parseFloat(a.getAttribute("width")||"0"),height:parseFloat(a.getAttribute("height")||"0")});return b},circle:function(a,c){var b=new Nb;Jb(c,b);wb(a,b,this._defs);b.setShape({cx:parseFloat(a.getAttribute("cx")||"0"),cy:parseFloat(a.getAttribute("cy")||"0"),r:parseFloat(a.getAttribute("r")||"0")});return b},line:function(a,c){var b=new Ua;Jb(c,b);wb(a,b,this._defs);b.setShape({x1:parseFloat(a.getAttribute("x1")||"0"),y1:parseFloat(a.getAttribute("y1")||"0"),x2:parseFloat(a.getAttribute("x2")||"0"),y2:parseFloat(a.getAttribute("y2")||"0")});return b},ellipse:function(a,c){var b=new nh;Jb(c,b);wb(a,b,this._defs);b.setShape({cx:parseFloat(a.getAttribute("cx")||"0"),cy:parseFloat(a.getAttribute("cy")||"0"),rx:parseFloat(a.getAttribute("rx")||"0"),ry:parseFloat(a.getAttribute("ry")||"0")});return b},polygon:function(a,c){var b=a.getAttribute("points"),e;b&&(e=pu(b));b=new bb({shape:{points:e||[]}});Jb(c,b);wb(a,b,this._defs);return b},polyline:function(a,c){var b=new Y;Jb(c,b);wb(a,b,this._defs);var b=a.getAttribute("points"),e;b&&(e=pu(b));return new kb({shape:{points:e||[]}})},image:function(a,c){var b=new Ga;Jb(c,b);wb(a,b,this._defs);b.setStyle({image:a.getAttribute("xlink:href"),x:+a.getAttribute("x"),y:+a.getAttribute("y"),width:+a.getAttribute("width"),height:+a.getAttribute("height")});return b},text:function(a,c){var b=a.getAttribute("x")||"0",e=a.getAttribute("y")||"0",f=a.getAttribute("dx")||"0",g=a.getAttribute("dy")||"0";this._textX=parseFloat(b)+parseFloat(f);this._textY=parseFloat(e)+parseFloat(g);b=new M;Jb(c,b);wb(a,b,this._defs);return b},tspan:function(a,c){var b=a.getAttribute("x"),e=a.getAttribute("y");null!=b&&(this._textX=parseFloat(b));null!=e&&(this._textY=parseFloat(e));var b=a.getAttribute("dx")||0,e=a.getAttribute("dy")||0,f=new M;Jb(c,f);wb(a,f,this._defs);this._textX+=b;this._textY+=e;return f},path:function(a,c){var b=a.getAttribute("d")||"",b=new vl(tl(b,void 0));Jb(c,b);wb(a,b,this._defs);return b}}}();return b}(),GK={lineargradient:function(b){var a=parseInt(b.getAttribute("x1")||"0",10),c=parseInt(b.getAttribute("y1")||"0",10),d=parseInt(b.getAttribute("x2")||"10",10),e=parseInt(b.getAttribute("y2")||"0",10),a=new mf(a,c,d,e);for(b=b.firstChild;b;)1===b.nodeType&&(c=b.getAttribute("offset"),c=0this.dataIndex};b.prototype.eachNode=function(a,c,b){"function"===typeof a&&(b=c,c=a,a=null);a=a||{};da(a)&&(a={order:a});var d=a.order||"preorder",f=this[a.attr||"children"],g;"preorder"===d&&(g=c.call(b,this));for(var h=0;!g&&hc&&(c=e.height)}this.height=c+1};b.prototype.getNodeById=function(a){if(this.getId()===a)return this;for(var c=0,b=this.children,e=b.length;cthis.dataIndex))return this.hostTree.data.getItemModel(this.dataIndex).getModel(a)};b.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]};b.prototype.setVisual=function(a,c){0<=this.dataIndex&&this.hostTree.data.setItemVisual(this.dataIndex,a,c)};b.prototype.getVisual=function(a){return this.hostTree.data.getItemVisual(this.dataIndex,a)};b.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)};b.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)};b.prototype.isAncestorOf=function(a){for(a=a.parentNode;a;){if(a===this)return!0;a=a.parentNode}return!1};b.prototype.isDescendantOf=function(a){return a!==this&&a.isAncestorOf(this)};return b}(),op=function(){function b(a){this.type="tree";this._nodes=[];this.hostModel=a}b.prototype.eachNode=function(a,c,b){this.root.eachNode(a,c,b)};b.prototype.getNodeByDataIndex=function(a){a=this.data.getRawIndex(a);return this._nodes[a]};b.prototype.getNodeById=function(a){return this.root.getNodeById(a)};b.prototype.update=function(){for(var a=this.data,c=this._nodes,b=0,e=c.length;bg&&(g=c.depth)});var h=c.expandAndCollapse&&0<=c.initialTreeDepth?c.initialTreeDepth:g;f.root.eachNode("preorder",function(c){var a=c.hostTree.data.getRawDataItem(c.dataIndex);c.isExpand=a&&null!=a.collapsed?!a.collapsed:c.depth<=h});return f.data};a.prototype.getOrient=function(){var c=this.get("orient");"horizontal"===c?c="LR":"vertical"===c&&(c="TB");return c};a.prototype.setZoom=function(c){this.option.zoom=c};a.prototype.setCenter=function(c){this.option.center=c};a.prototype.formatTooltip=function(c,a,b){b=this.getData().tree;a=b.root.children[0];c=b.getNodeByDataIndex(c);b=c.getValue();for(var d=c.name;c&&c!==a;)d=c.parentNode.name+"."+d,c=c.parentNode;return Ha("nameValue",{name:d,value:b,noValue:isNaN(b)||null==b})};a.type="series.tree";a.layoutMode="box";a.defaultOption={zlevel:0,z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderColor:"#c23531",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500};return a}(ra),bE=function(){},Cu=["treemapZoomToNode","treemapRender","treemapMove"],NK=function(b){function a(){var c=null!==b&&b.apply(this,arguments)||this;c.type=a.type;c.preventUsingHoverLayer=!0;return c}x(a,b);a.prototype.getInitialData=function(c,a){var b={name:c.name,children:c.data};Eu(b);var d=c.levels||[],g=this.designatedVisualItemStyle={},h=new la({itemStyle:g},this,a),d=c.levels=cE(d,a),k=C(d||[],function(c){return new la(c,h,a)},this),l=op.createTree(b,this,function(c){c.wrapMethod("getItemModel",function(c,a){var b=l.getNodeByDataIndex(a);c.parentModel=k[b.depth]||h;return c})});return l.data};a.prototype.optionUpdated=function(){this.resetViewRoot()};a.prototype.formatTooltip=function(c,a,b){b=this.getData();a=this.getRawValue(c);c=b.getName(c);return Ha("nameValue",{name:c,value:a})};a.prototype.getDataParams=function(c){var a=b.prototype.getDataParams.apply(this,arguments),e=this.getData().tree.getNodeByDataIndex(c);a.treePathInfo=Sm(e,this);return a};a.prototype.setLayoutInfo=function(c){this.layoutInfo=this.layoutInfo||{};F(this.layoutInfo,c)};a.prototype.mapIdToIndex=function(c){var a=this._idIndexMap;a||(a=this._idIndexMap=R(),this._idIndexMapCount=0);var b=a.get(c);null==b&&a.set(c,b=this._idIndexMapCount++);return b};a.prototype.getViewRoot=function(){return this._viewRoot};a.prototype.resetViewRoot=function(c){c?this._viewRoot=c:c=this._viewRoot;var a=this.getRawData().tree.root;if(!c||c!==a&&!a.contains(c))this._viewRoot=a};a.prototype.enableAriaDecal=function(){Du(this)};a.type="series.treemap";a.layoutMode="box";a.defaultOption={progressive:0,left:"center",top:"middle",width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"\u25b6",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)",textStyle:{color:"#fff"}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",overflow:"truncate"},upperLabel:{show:!1,position:[0,"50%"],height:20,overflow:"truncate",verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],ellipsis:!0,verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]};return a}(ra),OK=function(){function b(a){this.group=new M;a.add(this.group)}b.prototype.render=function(a,c,b,e){var d=a.getModel("breadcrumb"),g=this.group;g.removeAll();if(d.get("show")&&b){var h=d.getModel("itemStyle"),k=h.getModel("textStyle");c={pos:{left:d.get("left"),right:d.get("right"),top:d.get("top"),bottom:d.get("bottom")},box:{width:c.getWidth(),height:c.getHeight()},emptyItemWidth:d.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(b,c,k);this._renderContent(a,c,h,k,e);Bi(g,c.pos,c.box)}};b.prototype._prepare=function(a,c,b){for(;a;a=a.parentNode){var d=Ea(a.getModel().get("name"),""),f=b.getTextRect(d),f=Math.max(f.width+16,c.emptyItemWidth);c.totalWidth+=f+8;c.renderList.push({node:a,text:d,width:f})}};b.prototype._renderContent=function(a,c,b,e,f){var d,h=0,k=c.emptyItemWidth,l=a.get(["breadcrumb","height"]);d=c.pos;var m=c.box,n=void 0,p=m.width,q=m.height,m=H(d.left,p),t=H(d.top,q),u=H(d.right,p),q=H(d.bottom,q);(isNaN(m)||isNaN(parseFloat(d.left)))&&(m=0);(isNaN(u)||isNaN(parseFloat(d.right)))&&(u=p);isNaN(t)||isNaN(parseFloat(d.top));isNaN(q)||isNaN(parseFloat(d.bottom));n=Od(n||0);d=Math.max(u-m-n[1]-n[3],0);n=c.totalWidth;c=c.renderList;for(p=c.length-1;0<=p;p--){u=c[p];t=u.node;m=u.width;u=u.text;n>d&&(n-=m-k,m=k,u=null);var q=h,w=l,r=p===c.length-1,z=[[r?q:q-5,0],[q+m,0],[q+m,0+w],[r?q:q-5,0+w]];0!==p&&z.splice(2,0,[q+m+5,0+w/2]);!r&&z.push([q,0+w/2]);u=new bb({shape:{points:z},style:K(b.getItemStyle(),{lineJoin:"bevel"}),textContent:new ha({style:{text:u,fill:e.getTextColor(),font:e.getFont()}}),textConfig:{position:"inside"},z:10,onclick:P(f,t)});u.disableLabelAnimation=!0;this.group.add(u);q=a;S(u).eventData={componentType:"series",componentSubType:"treemap",componentIndex:q.componentIndex,seriesIndex:q.componentIndex,seriesName:q.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:t&&t.dataIndex,name:t&&t.name},treePathInfo:t&&Sm(t,q)};h+=m+8}};b.prototype.remove=function(){this.group.removeAll()};return b}(),PK=function(){function b(){this._storage=[];this._elExistsMap={}}b.prototype.add=function(a,c,b,e,f){if(this._elExistsMap[a.id])return!1;this._elExistsMap[a.id]=!0;this._storage.push({el:a,target:c,duration:b,delay:e,easing:f});return!0};b.prototype.finished=function(a){this._finishedCallback=a;return this};b.prototype.start=function(){for(var a=this,c=this._storage.length,b=function(){c--;0>=c&&(a._storage.length=0,a._elExistsMap={},a._finishedCallback&&a._finishedCallback())},e=0,f=this._storage.length;eba(d,c))){this.seriesModel=c;this.api=b;this.ecModel=a;a=Og(f,["treemapZoomToNode","treemapRootToNode"],c);var d=f&&f.type,e=c.layoutInfo,k=!this._oldTree,l=this._storage;f="treemapRootToNode"===d&&a&&l?{rootNodeGroup:l.nodeGroup[a.node.getRawIndex()],direction:f.direction}:null;e=this._giveContainerGroup(e);l=this._doRender(e,c,f);k||d&&"treemapZoomToNode"!==d&&"treemapRootToNode"!==d?l.renderFinally():this._doAnimation(e,l,c,f);this._resetController(b);this._renderBreadcrumb(c,b,a)}};a.prototype._giveContainerGroup=function(c){var a=this._containerGroup;a||(a=this._containerGroup=new Tm,this._initEvents(a),this.group.add(a));a.x=c.x;a.y=c.y;return a};a.prototype._doRender=function(c,a,b){function d(c,e,f,g,h){function p(c){return c.getId()}function q(p,q){var t=null!=p?c[p]:null,u=null!=q?e[q]:null,w=dE(a,l,m,b,k,n,t,u,f,h);w&&d(t&&t.viewChildren||[],u&&u.viewChildren||[],w,g,h+1)}g?(e=c,r(c,function(c,a){!c.isRemoved()&&q(a,a)})):(new sd(e,c,p,p)).add(q).update(q).remove(P(q,null)).execute()}var e=a.getData().tree,h=this._oldTree,k=Pg(),l=Pg(),m=this._storage,n=[];d(e.root?[e.root]:[],h&&h.root?[h.root]:[],c,e===h||!h,0);var p=function(c){var a=Pg();c&&r(c,function(c,b){var d=a[b];r(c,function(c){c&&(d.push(c),ej(c).willDelete=!0)})});return a}(m);this._oldTree=e;this._storage=l;return{lastsForAnimation:k,willDeleteEls:p,renderFinally:function(){r(p,function(c){r(c,function(c){c.parent&&c.parent.remove(c)})});r(n,function(c){c.invisible=!0;c.dirty()})}}};a.prototype._doAnimation=function(c,a,b,f){if(b.get("animation")){c=b.get("animationDurationUpdate");b=b.get("animationEasing");var d=(fa(c)?0:c)||0,e=(fa(b)?null:b)||"cubicOut",k=new PK;r(a.willDeleteEls,function(c,a){r(c,function(c,b){if(!c.invisible){var g=c.parent,h;h=ej(g);if(f&&"drillDown"===f.direction)h=g===f.rootNodeGroup?{shape:{x:0,y:0,width:h.nodeWidth,height:h.nodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var l=g=0;h.willDelete||(g=h.nodeWidth/2,l=h.nodeHeight/2);h="nodeGroup"===a?{x:g,y:l,style:{opacity:0}}:{shape:{x:g,y:l,width:0,height:0},style:{opacity:0}}}h&&k.add(c,h,d,0,e)}})});r(this._storage,function(c,b){r(c,function(c,f){var g=a.lastsForAnimation[b][f],h={};g&&(c instanceof M?null!=g.oldX&&(h.x=c.x,h.y=c.y,c.x=g.oldX,c.y=g.oldY):(g.oldShape&&(h.shape=F({},c.shape),c.setShape(g.oldShape)),g.fadein?(c.setStyle("opacity",0),h.style={opacity:1}):1!==c.style.opacity&&(h.style={opacity:1})),k.add(c,h,d,0,e))})},this);this._state="animating";k.finished(I(function(){this._state="ready";a.renderFinally()},this)).start()}};a.prototype._resetController=function(c){var a=this._controller;a||(a=this._controller=new fh(c.getZr()),a.enable(this.seriesModel.get("roam")),a.on("pan",I(this._onPan,this)),a.on("zoom",I(this._onZoom,this)));var b=new aa(0,0,c.getWidth(),c.getHeight());a.setPointerChecker(function(c,a,d){return b.contain(a,d)})};a.prototype._clearController=function(){var c=this._controller;c&&c.dispose()};a.prototype._onPan=function(c){if("animating"!==this._state&&(3d&&(d=a);for(var d=d%2?d+2:d+3,c=[],e=0;ea&&(a=0);a*=k;a=Math.asin(a/2/d);isNaN(a)&&(a=sz/2);pp[c.dataIndex]=a;h+=2*a});var l=(2*sz-h)/g/2,m=0;a.eachNode(function(c){var a=l+pp[c.dataIndex];m+=a;c.setLayout([d*Math.cos(m)+e,d*Math.sin(m)+f]);m+=a})}},sf=Th,tz=Ua.prototype,qp=rf.prototype,uz=function(){return function(){this.y2=this.x2=this.y1=this.x1=0;this.percent=1}}();(function(b){function a(){return null!==b&&b.apply(this,arguments)||this}x(a,b);return a})(uz);var CE=function(b){function a(c){c=b.call(this,c)||this;c.type="ec-line";return c}x(a,b);a.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}};a.prototype.getDefaultShape=function(){return new uz};a.prototype.buildPath=function(c,a){bn(a)?tz.buildPath.call(this,c,a):qp.buildPath.call(this,c,a)};a.prototype.pointAt=function(c){return bn(this.shape)?tz.pointAt.call(this,c):qp.pointAt.call(this,c)};a.prototype.tangentAt=function(c){var a=this.shape;c=bn(a)?[a.x2-a.x1,a.y2-a.y1]:qp.tangentAt.call(this,c);return Ie(c,c)};return a}(Y),rp=["fromSymbol","toSymbol"],sp=function(b){function a(c,a,e){var d=b.call(this)||this;d._createLine(c,a,e);return d}x(a,b);a.prototype._createLine=function(c,a,b){var d=c.hostModel,e=c.getItemLayout(a),e=BE(e);e.shape.percent=0;za(e,{shape:{percent:1}},d,a);this.add(e);r(rp,function(b){var d=Wu(b,c,a);this.add(d);this["_"+b+"Type"]=c.getItemVisual(a,b)},this);this._updateCommonStl(c,a,b)};a.prototype.updateData=function(c,a,b){var d=c.hostModel,e=this.childOfName("line"),h=c.getItemLayout(a),k={shape:{}};cn(k.shape,h);ea(e,k,d,a);r(rp,function(b){var d=c.getItemVisual(a,b),e="_"+b+"Type";this[e]!==d&&(this.remove(this.childOfName(b)),b=Wu(b,c,a),this.add(b));this[e]=d},this);this._updateCommonStl(c,a,b)};a.prototype.getLinePath=function(){return this.childAt(0)};a.prototype._updateCommonStl=function(c,a,b){var d=c.hostModel,e=this.childOfName("line"),h=b&&b.emphasisLineStyle,k=b&&b.blurLineStyle,l=b&&b.selectLineStyle,m=b&&b.labelStatesModels;if(!b||c.hasItemOption)m=c.getItemModel(a),h=m.getModel(["emphasis","lineStyle"]).getLineStyle(),k=m.getModel(["blur","lineStyle"]).getLineStyle(),l=m.getModel(["select","lineStyle"]).getLineStyle(),m=Ra(m);var n=c.getItemVisual(a,"style"),p=n.stroke;e.useStyle(n);e.style.fill=null;e.style.strokeNoScale=!0;e.ensureState("emphasis").style=h;e.ensureState("blur").style=k;e.ensureState("select").style=l;r(rp,function(c){if(c=this.childOfName(c)){c.setColor(p);c.style.opacity=n.opacity;for(var a=0;al[0]?-1:1;"start"!==f.__position&&"end"!==f.__position&&(p=-Math.atan2(l[1],l[0]),m[0]n[0]?"right":"center";p=.8n[1]?"bottom":"middle";break;case "start":f.x=-n[0]*b+h[0];f.y=-n[1]*q+h[1];a=.8n[0]?"left":"center";p=.8n[1]?"top":"middle";break;case "insideStartTop":case "insideStart":case "insideStartBottom":f.x=b*u+h[0];f.y=h[1]+w;a=0>l[0]?"right":"left";f.originX=-b*u;f.originY=-w;break;case "insideMiddleTop":case "insideMiddle":case "insideMiddleBottom":case "middle":f.x=t[0];f.y=t[1]+w;a="center";f.originY=-w;break;case "insideEndTop":case "insideEnd":case "insideEndBottom":f.x=-b*u+m[0],f.y=m[1]+w,a=0<=l[0]?"right":"left",f.originX=b*u,f.originY=-w}f.scaleX=f.scaleY=g;f.setStyle({verticalAlign:f.__verticalAlign||p,align:f.__align||a})}}}};return a}(M),tp=function(){function b(a){this.group=new M;this._LineCtor=a||sp}b.prototype.isPersistent=function(){return!0};b.prototype.updateData=function(a){var c=this,b=this.group,e=this._lineData;this._lineData=a;e||b.removeAll();var f=Xu(a);a.diff(e).add(function(b){c._doAdd(a,b,f)}).update(function(b,d){c._doUpdate(e,a,d,b,f)}).remove(function(c){b.remove(e.getItemGraphicEl(c))}).execute()};b.prototype.updateLayout=function(){var a=this._lineData;a&&a.eachItemGraphicEl(function(c,b){c.updateLayout(a,b)},this)};b.prototype.incrementalPrepareUpdate=function(a){this._seriesScope=Xu(a);this._lineData=null;this.group.removeAll()};b.prototype.incrementalUpdate=function(a,c){function b(c){c.isGroup||c.animators&&0b&&(b=2*Math.PI+b);(e=e[0]this.dataIndex))return this.hostGraph.data.getItemModel(this.dataIndex).getModel(a)};b.prototype.getAdjacentDataIndices=function(){for(var a={edge:[],node:[]},c=0;cb.dataIndex||(a.edge.push(b.dataIndex),a.node.push(b.node1.dataIndex,b.node2.dataIndex))}return a};return b}(),vz=function(){function b(a,c,b){this.dataIndex=-1;this.node1=a;this.node2=c;this.dataIndex=null==b?-1:b}b.prototype.getModel=function(a){if(!(0>this.dataIndex))return this.hostGraph.edgeData.getItemModel(this.dataIndex).getModel(a)};b.prototype.getAdjacentDataIndices=function(){return{edge:[this.dataIndex],node:[this.node1.dataIndex,this.node2.dataIndex]}};return b}();wa(Ee,av("hostGraph","data"));wa(vz,av("hostGraph","edgeData"));var WK=function(b){function a(){var c=null!==b&&b.apply(this,arguments)||this;c.type=a.type;c.hasSymbolVisual=!0;return c}x(a,b);a.prototype.init=function(c){function a(){return e._categoriesData}b.prototype.init.apply(this,arguments);var e=this;this.legendVisualProvider=new Gh(a,a);this.fillDataTextStyle(c.edges||c.links);this._updateCategoriesData()};a.prototype.mergeOption=function(c){b.prototype.mergeOption.apply(this,arguments);this.fillDataTextStyle(c.edges||c.links);this._updateCategoriesData()};a.prototype.mergeDefaultAndTheme=function(c){b.prototype.mergeDefaultAndTheme.apply(this,arguments);Id(c,"edgeLabel",["show"])};a.prototype.getInitialData=function(c,a){function b(c,a){function b(c,a){var b=e.call(this,c,a);b.resolveParentPath=d;return b}function d(c){if(c&&("label"===c[0]||"label"===c[1])){var a=c.slice();"label"===c[0]?a[0]="edgeLabel":"label"===c[1]&&(a[1]="edgeLabel");return a}return c}c.wrapMethod("getItemModel",function(c){var a=h._categoriesModels,b=c.getShallow("category");if(a=a[b])a.parentModel=c.parentModel,c.parentModel=a;return c});var e=la.prototype.getModel;a.wrapMethod("getItemModel",function(c){c.resolveParentPath=d;c.getModel=b;return c})}var d=c.edges||c.links||[],g=c.data||c.nodes||[],h=this;if(g&&d)return jj(this)&&(this.__curvenessList=[],this.__edgeMap={},Ru(this)),d=bv(g,d,this,!0,b),r(d.edges,function(c){var a=c.node1,b=c.node2;c=c.dataIndex;if(jj(this)){var a=Ug(a,b,this),b=this.__edgeMap,d=b[Su(a)];b[a]&&!d?b[a].isForward=!0:d&&b[a]&&(d.isForward=!0,b[a].isForward=!1);b[a]=b[a]||[];b[a].push(c)}},this),d.data};a.prototype.getGraph=function(){return this.getData().graph};a.prototype.getEdgeData=function(){return this.getGraph().edgeData};a.prototype.getCategoriesData=function(){return this._categoriesData};a.prototype.formatTooltip=function(c,a,b){if("edge"===b){a=this.getData();b=this.getDataParams(c,b);var d=a.graph.getEdgeByIndex(c);c=a.getName(d.node1.dataIndex);a=a.getName(d.node2.dataIndex);d=[];null!=c&&d.push(c);null!=a&&d.push(a);return Ha("nameValue",{name:d.join(" \x3e "),value:b.value,noValue:null==b.value})}return ns({series:this,dataIndex:c,multipleSeries:a})};a.prototype._updateCategoriesData=function(){var c=C(this.option.categories||[],function(c){return null!=c.value?c:F({value:0},c)}),a=new Wa(["value"],this);a.initData(c);this._categoriesData=a;this._categoriesModels=a.mapArray(function(c){return a.getItemModel(c)})};a.prototype.setZoom=function(c){this.option.zoom=c};a.prototype.setCenter=function(c){this.option.center=c};a.prototype.isAnimationEnabled=function(){return b.prototype.isAnimationEnabled.call(this)&&!("force"===this.get("layout")&&this.get(["force","layoutAnimation"]))};a.type="series.graph";a.dependencies=["grid","polar","geo","singleAxis","calendar"];a.defaultOption={zlevel:0,z:2,coordinateSystem:"view",legendHoverLink:!0,layout:null,focusNodeAdjacency:!1,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}};return a}(ra),XK={type:"graphRoam",event:"graphRoam",update:"none"},YK=function(){return function(){this.angle=0;this.r=this.width=10;this.y=this.x=0}}(),ZK=function(b){function a(c){c=b.call(this,c)||this;c.type="pointer";return c}x(a,b);a.prototype.getDefaultShape=function(){return new YK};a.prototype.buildPath=function(c,a){var b=Math.cos,d=Math.sin,g=a.r,h=a.width,k=a.angle,l=a.x-b(k)*h*(h>=g/3?1:2),m=a.y-d(k)*h*(h>=g/3?1:2),k=a.angle-Math.PI/2;c.moveTo(l,m);c.lineTo(a.x+b(k)*h,a.y+d(k)*h);c.lineTo(a.x+b(a.angle)*g,a.y+d(a.angle)*g);c.lineTo(a.x-b(k)*h,a.y-d(k)*h);c.lineTo(l,m)};return a}(Y),up=2*Math.PI,$K=function(b){function a(){var c=null!==b&&b.apply(this,arguments)||this;c.type=a.type;return c}x(a,b);a.prototype.render=function(c,a,b){this.group.removeAll();var d=c.get(["axisLine","lineStyle","color"]),e=c.get("center"),h=b.getWidth(),k=b.getHeight(),k=Math.min(h,k),h=H(e[0],b.getWidth()),e=H(e[1],b.getHeight()),k=H(c.get("radius"),k/2);this._renderMain(c,a,b,d,{cx:h,cy:e,r:k});this._data=c.getData()};a.prototype.dispose=function(){};a.prototype._renderMain=function(c,a,b,f,g){for(var d=this.group,e=c.get("clockwise"),l=-c.get("startAngle")/180*Math.PI,m=-c.get("endAngle")/180*Math.PI,n=c.getModel("axisLine"),p=n.get("roundCap")?gp:lb,q=n.get("show"),t=n.getModel("lineStyle"),n=t.get("width"),u=(m-l)%up||m===l?(m-l)%up:up,r=l,v=0;q&&v=c)return f[0][1];var a;for(a=0;a=c&&(0===a?0:f[a-1][0])E?"top":.8A?"left":.4=b&&g<=b+c.axisLength&&a>=e&&a<=e+c.layoutLength};b.prototype.getModel=function(){return this._model};b.prototype._updateAxesFromSeries=function(a,c){c.eachSeries(function(b){if(a.contains(b,c)){var d=b.getData();r(this.dimensions,function(a){var c=this._axesMap.get(a);c.scale.unionExtentFromData(d,d.mapDimension(a));jd(c.scale,c.model)},this)}},this)};b.prototype.resize=function(a,c){this._rect=Aa(a.getBoxLayoutParams(),{width:c.getWidth(),height:c.getHeight()});this._layoutAxes()};b.prototype.getRect=function(){return this._rect};b.prototype._makeLayoutInfo=function(){var a=this._model,c=this._rect,b=["x","y"],e=["width","height"],f=a.get("layout"),g="horizontal"===f?0:1,h=c[e[g]],k=[0,h],l=this.dimensions.length,m=lj(a.get("axisExpandWidth"),k),n=lj(a.get("axisExpandCount")||0,[0,l]),p=a.get("axisExpandable")&&3n&&1n&&(n=0);a=[wz(sa(q[0]/m,1))+1,lL(sa(q[1]/m,1))-1];return{layout:f,pixelDimIndex:g,layoutBase:c[b[g]],layoutLength:h,axisBase:c[b[1-g]],axisLength:c[e[1-g]],axisExpandable:p,axisExpandWidth:m,axisCollapseWidth:n,axisExpandWindow:q,axisCount:l,winInnerIndices:a,axisExpandWindow0Pos:n/m*q[0]}};b.prototype._layoutAxes=function(){var a=this._rect,c=this._axesMap,b=this.dimensions,e=this._makeLayoutInfo(),f=e.layout;c.each(function(a){var c=[0,e.axisLength],b=a.inverse?1:0;a.setExtent(c[b],c[1-b])});r(b,function(c,b){var d=(e.axisExpandable?OE:NE)(b,e),g={horizontal:{x:d.position,y:e.axisLength},vertical:{x:0,y:d.position}},g=[g[f].x+a.x,g[f].y+a.y],h={horizontal:mL/2,vertical:0}[f],n=nb();Tc(n,n,h);Rb(n,n,g);this._axesLayout[c]={position:g,rotation:h,transform:n,axisNameAvailableWidth:d.axisNameAvailableWidth,axisLabelShow:d.axisLabelShow,nameTruncateMaxWidth:d.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)};b.prototype.getAxis=function(a){return this._axesMap.get(a)};b.prototype.dataToPoint=function(a,c){return this.axisCoordToPoint(this._axesMap.get(c).dataToCoord(a),c)};b.prototype.eachActiveState=function(a,c,b,e){null==b&&(b=0);null==e&&(e=a.count());var d=this._axesMap,g=this.dimensions,h=[],k=[];r(g,function(c){h.push(a.mapDimension(c));k.push(d.get(c).model)});for(var l=this.hasAxisBrushed();bf*(1-l[0])?(b="jump",h=a-f*(1-l[2])):0<=(h=a-f*l[1])&&0>=(h=a-f*(1-l[1]))&&(h=0),(h*=c.axisExpandWidth/k)?fe(h,e,g,"all"):b="none"):(c=e[1]-e[0],e=[gv(0,g[1]*a/c-c/2)],e[1]=fv(g[1],e[0]+c),e[0]=e[1]-c);return{axisExpandWindow:e,behavior:b}};return b}(),ZE={create:function(b,a){var c=[];b.eachComponent("parallel",function(d,e){var f=new nL(d,b,a);f.name="parallel_"+e;f.resize(d,a);d.coordinateSystem=f;f.model=d;c.push(f)});b.eachSeries(function(a){if("parallel"===a.get("coordinateSystem")){var c=a.getReferringComponents("parallel",Da).models[0];a.coordinateSystem=c.coordinateSystem}});return c}},wn=function(b){function a(){var c=null!==b&&b.apply(this,arguments)||this;c.type=a.type;c.activeIntervals=[];return c}x(a,b);a.prototype.getAreaSelectStyle=function(){return Kd([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))};a.prototype.setActiveIntervals=function(a){if(a=this.activeIntervals=J(a))for(var c=a.length-1;0<=c;c--)Cb(a[c])};a.prototype.getActiveState=function(a){var c=this.activeIntervals;if(!c.length)return"normal";if(null==a||isNaN(+a))return"inactive";if(1===c.length){if(c=c[0],c[0]<=a&&a<=c[1])return"active"}else for(var b=0,f=c.length;bc||c>e.getWidth()||0>d||d>e.getHeight())}if(c){c=this._zr;d=this._covers;e=on(this,b,a);if(!this._dragging)for(var f=0;fd;d++)a.lineTo(c[d][0],c[d][1]);for(a.closePath();dp)&&d.push([q,l])}return[{dimensions:"ItemName Low Q1 Q2 Q3 High".split(" "),data:c},{data:d}]}},CF=["color","borderColor"],yL=function(b){function a(){var c=null!==b&&b.apply(this,arguments)||this;c.type=a.type;return c}x(a,b);a.prototype.render=function(a,b,e){this.group.removeClipPath();this._updateDrawMode(a);this._isLargeDraw?this._renderLarge(a):this._renderNormal(a)};a.prototype.incrementalPrepareRender=function(a,b,e){this._clear();this._updateDrawMode(a)};a.prototype.incrementalRender=function(a,b,e,f){this._isLargeDraw?this._incrementalRenderLarge(a,b):this._incrementalRenderNormal(a,b)};a.prototype._updateDrawMode=function(a){a=a.pipelineContext.large;if(null==this._isLargeDraw||a!==this._isLargeDraw)this._isLargeDraw=a,this._clear()};a.prototype._renderNormal=function(a){var c=a.getData(),b=this._data,f=this.group,g=c.getLayout("isSimpleBox"),h=a.get("clip",!0),k=a.coordinateSystem,l=k.getArea&&k.getArea();this._data||f.removeAll();c.diff(b).add(function(b){if(c.hasValue(b)){var d=c.getItemLayout(b);if(!h||!Cv(l,d)){var e=yn(d,b,!0);za(e,{shape:{points:d.ends}},a,b);zn(e,c,b,g);f.add(e);c.setItemGraphicEl(b,e)}}}).update(function(d,e){var k=b.getItemGraphicEl(e);if(c.hasValue(d)){var m=c.getItemLayout(d);h&&Cv(l,m)?f.remove(k):(k?ea(k,{shape:{points:m.ends}},a,d):k=yn(m),zn(k,c,d,g),f.add(k),c.setItemGraphicEl(d,k))}else f.remove(k)}).remove(function(a){(a=b.getItemGraphicEl(a))&&f.remove(a)}).execute();this._data=c};a.prototype._renderLarge=function(a){this._clear();Dv(a,this.group);(a=a.get("clip",!0)?Zi(a.coordinateSystem,!1,a):null)?this.group.setClipPath(a):this.group.removeClipPath()};a.prototype._incrementalRenderNormal=function(a,b){for(var c=b.getData(),d=c.getLayout("isSimpleBox"),g;null!=(g=a.next());){var h=c.getItemLayout(g),h=yn(h);zn(h,c,g,d);h.incremental=!0;this.group.add(h)}};a.prototype._incrementalRenderLarge=function(a,b){Dv(b,this.group,!0)};a.prototype.remove=function(a){this._clear()};a.prototype._clear=function(){this.group.removeAll();this._data=null};a.type="candlestick";return a}(oa),zL=function(){return function(){}}(),AF=function(b){function a(a){a=b.call(this,a)||this;a.type="normalCandlestickBox";return a}x(a,b);a.prototype.getDefaultShape=function(){return new zL};a.prototype.buildPath=function(a,b){var c=b.points;this.__simpleBox?(a.moveTo(c[4][0],c[4][1]),a.lineTo(c[6][0],c[6][1])):(a.moveTo(c[0][0],c[0][1]),a.lineTo(c[1][0],c[1][1]),a.lineTo(c[2][0],c[2][1]),a.lineTo(c[3][0],c[3][1]),a.closePath(),a.moveTo(c[4][0],c[4][1]),a.lineTo(c[5][0],c[5][1]),a.moveTo(c[6][0],c[6][1]),a.lineTo(c[7][0],c[7][1]))};return a}(Y),AL=function(){return function(){}}(),Ev=function(b){function a(a){a=b.call(this,a)||this;a.type="largeCandlestickBox";return a}x(a,b);a.prototype.getDefaultShape=function(){return new AL};a.prototype.buildPath=function(a,b){for(var c=b.points,d=0;dx?E[1]:F[1],ends:J,brushRect:g(A,C,r)})}}function c(a,c){for(var b=new GL(4*a.count),e=0,f,g=[],p=[];null!=(f=a.next());){var q=c.get(h,f),r=c.get(k,f),x=c.get(l,f),A=c.get(m,f),C=c.get(n,f);isNaN(q)||isNaN(A)||isNaN(C)?(b[e++]=NaN,e+=3):(b[e++]=Gv(c,f,r,x,l),g[0]=q,g[1]=A,f=d.dataToPoint(g,null,p),b[e++]=f?f[0]:NaN,b[e++]=f?f[1]:NaN,g[1]=C,f=d.dataToPoint(g,null,p),b[e++]=f?f[1]:NaN)}c.setLayout("largePoints",b)}var d=b.coordinateSystem,e=b.getData(),f=EF(b,e),g=["x","y"],h=e.mapDimension(g[0]),g=e.mapDimensionsAll(g[1]),k=g[0],l=g[1],m=g[2],n=g[3];e.setLayout({candleWidth:f,isSimpleBox:1.3>=f});if(!(null==h||4>g.length))return{progress:b.pipelineContext.large?c:a}}},Bz=function(b){function a(a,d){var c=b.call(this)||this,f=new Hg(a,d),g=new M;c.add(f);c.add(g);c.updateData(a,d);return c}x(a,b);a.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()};a.prototype.startEffectAnimation=function(a){for(var c=a.symbolType,b=a.color,f=this.childAt(1),g=0;3>g;g++){var h=Pa(c,-1,-1,2,2,b);h.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scaleX:.5,scaleY:.5});var k=-g/3*a.period+a.effectOffset;h.animate("",!0).when(a.period,{scale:[a.rippleScale/2,a.rippleScale/2]}).delay(k).start();h.animateStyle(!0).when(a.period,{opacity:0}).delay(k).start();f.add(h)}Hv(f,a)};a.prototype.updateEffectAnimation=function(a){for(var c=this._effectCfg,b=this.childAt(1),f=["symbolType","period","rippleScale"],g=0;gc);h++);h=Math.min(h-1,g-2)}f=(c-f[h])/(f[h+1]-f[h]);g=b[h];b=b[h+1];a.x=g[0]*(1-f)+f*b[0];a.y=g[1]*(1-f)+f*b[1];a.rotation=-Math.atan2(b[1]-g[1],b[0]-g[0])-Math.PI/2;this._lastFrame=h;this._lastFramePercent=c;a.ignore=!1}};return a}(Cz),LL=function(){return function(){this.polyline=!1;this.curveness=0;this.segs=[]}}(),Ez=function(b){function a(a){return b.call(this,a)||this}x(a,b);a.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}};a.prototype.getDefaultShape=function(){return new LL};a.prototype.buildPath=function(a,b){var c=b.segs,d=b.curveness;if(b.polyline)for(var g=0;gb)throw Error("Invalid data format.");}}return{flatCoordsOffset:new Uint32Array(f.buffer,0,k),flatCoords:g,count:l}}return{flatCoordsOffset:null,flatCoords:null,count:a.length}};a.prototype.getInitialData=function(a,b){if(!Yd.get(a.coordinateSystem))throw Error("Unkown coordinate system "+a.coordinateSystem);var c=new Wa(["value"],this);c.hasItemOption=!1;c.initData(a.data,[],function(a,b,d,e){if(a instanceof Array)return NaN;c.hasItemOption=!0;a=a.value;if(null!=a)return a instanceof Array?a[e]:a});return c};a.prototype.formatTooltip=function(a,b,e){b=this.getData().getItemModel(a);if(a=b.get("name"))return a;a=b.get("fromName");b=b.get("toName");e=[];null!=a&&e.push(a);null!=b&&e.push(b);return Ha("nameValue",{name:e.join(" \x3e ")})};a.prototype.preventIncremental=function(){return!!this.get(["effect","show"])};a.prototype.getProgressive=function(){var a=this.option.progressive;return null==a?this.option.large?1E4:this.get("progressive"):a};a.prototype.getProgressiveThreshold=function(){var a=this.option.progressiveThreshold;return null==a?this.option.large?2E4:this.get("progressiveThreshold"):a};a.type="series.lines";a.dependencies=["grid","polar","geo","calendar"];a.defaultOption={coordinateSystem:"geo",zlevel:0,z:2,legendHoverLink:!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,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}};return a}(ra),RL={seriesType:"lines",reset:function(b){function a(a,c){var b=a.getItemModel(c),d=nj(b.getShallow("symbol",!0)),b=nj(b.getShallow("symbolSize",!0));d[0]&&a.setItemVisual(c,"fromSymbol",d[0]);d[1]&&a.setItemVisual(c,"toSymbol",d[1]);b[0]&&a.setItemVisual(c,"fromSymbolSize",b[0]);b[1]&&a.setItemVisual(c,"toSymbolSize",b[1])}var c=nj(b.get("symbol")),d=nj(b.get("symbolSize"));b=b.getData();b.setVisual("fromSymbol",c&&c[0]);b.setVisual("toSymbol",c&&c[1]);b.setVisual("fromSymbolSize",d&&d[0]);b.setVisual("toSymbolSize",d&&d[1]);return{dataEach:b.hasItemOption?a:null}}},SL=function(){function b(){this.blurSize=30;this.pointSize=20;this.maxOpacity=1;this.minOpacity=0;this._gradientPixels={inRange:null,outOfRange:null};this.canvas=Wd()}b.prototype.update=function(a,c,b,e,f,g){var d=this._getBrush(),k=this._getGradient(f,"inRange");f=this._getGradient(f,"outOfRange");var l=this.pointSize+this.blurSize,m=this.canvas,n=m.getContext("2d"),p=a.length;m.width=c;m.height=b;for(b=0;bg;g++)a[c](g/255,!0,e),b[f++]=e[0],b[f++]=e[1],b[f++]=e[2],b[f++]=e[3];return b};return b}(),TL=function(b){function a(){var c=null!==b&&b.apply(this,arguments)||this;c.type=a.type;return c}x(a,b);a.prototype.render=function(a,b,e){var c;b.eachComponent("visualMap",function(b){b.eachTargetSeries(function(d){d===a&&(c=b)})});if(!c)throw Error("Heatmap must use with visualMap");this.group.removeAll();this._incrementalDisplayable=null;b=a.coordinateSystem;"cartesian2d"===b.type||"calendar"===b.type?this._renderOnCartesianAndCalendar(a,e,0,a.getData().count()):Jv(b)&&this._renderOnGeo(b,a,c,e)};a.prototype.incrementalPrepareRender=function(a,b,e){this.group.removeAll()};a.prototype.incrementalRender=function(a,b,e,f){var c=b.coordinateSystem;c&&(Jv(c)?this.render(b,e,f):this._renderOnCartesianAndCalendar(b,f,a.start,a.end,!0))};a.prototype._renderOnCartesianAndCalendar=function(a,b,e,f,g){b=a.coordinateSystem;var c,d,l,m;if("cartesian2d"===b.type){l=b.getAxis("x");m=b.getAxis("y");if("category"!==l.type||"category"!==m.type)throw Error("Heatmap on cartesian must have two category axes");if(!l.onBand||!m.onBand)throw Error("Heatmap on cartesian must have two axes with boundaryGap true");c=l.getBandWidth();d=m.getBandWidth();l=l.scale.getExtent();m=m.scale.getExtent()}for(var n=this.group,p=a.getData(),q=a.getModel(["emphasis","itemStyle"]).getItemStyle(),t=a.getModel(["blur","itemStyle"]).getItemStyle(),u=a.getModel(["select","itemStyle"]).getItemStyle(),r=Ra(a),v=a.get(["emphasis","focus"]),z=a.get(["emphasis","blurScope"]),x="cartesian2d"===b.type?[p.mapDimension("x"),p.mapDimension("y"),p.mapDimension("value")]:[p.mapDimension("time"),p.mapDimension("value")];el[1]||Dm[1])continue;y=b.dataToPoint([y,D]);y=new Z({shape:{x:Math.floor(Math.round(y[0])-c/2),y:Math.floor(Math.round(y[1])-d/2),width:Math.ceil(c),height:Math.ceil(d)},style:A})}else{if(isNaN(p.get(x[1],e)))continue;y=new Z({z2:1,shape:b.dataToRect([p.get(x[0],e)]).contentShape,style:A})}D=p.getItemModel(e);p.hasItemOption&&(r=D.getModel("emphasis"),q=r.getModel("itemStyle").getItemStyle(),t=D.getModel(["blur","itemStyle"]).getItemStyle(),u=D.getModel(["select","itemStyle"]).getItemStyle(),v=r.get("focus"),z=r.get("blurScope"),r=Ra(D));var D=a.getRawValue(e),C="-";D&&null!=D[2]&&(C=D[2]+"");cb(y,r,{labelFetcher:a,labelDataIndex:e,defaultOpacity:A.opacity,defaultText:C});y.ensureState("emphasis").style=q;y.ensureState("blur").style=t;y.ensureState("select").style=u;va(y,v,z);if(y.incremental=g)y.states.emphasis.hoverLayer=!0;n.add(y);p.setItemGraphicEl(e,y)}};a.prototype._renderOnGeo=function(a,b,e,f){var c=e.targetVisuals.inRange,d=e.targetVisuals.outOfRange,k=b.getData(),l=this._hmLayer||this._hmLayer||new SL;l.blurSize=b.get("blurSize");l.pointSize=b.get("pointSize");l.minOpacity=b.get("minOpacity");l.maxOpacity=b.get("maxOpacity");b=a.getViewRect().clone();var m=a.getRoamTransform();b.applyTransform(m);var n=Math.max(b.x,0),p=Math.max(b.y,0),m=Math.min(b.width+b.x,f.getWidth());b=Math.min(b.height+b.y,f.getHeight());f=m-n;b-=p;m=[k.mapDimension("lng"),k.mapDimension("lat"),k.mapDimension("value")];k=k.mapArray(m,function(c,b,d){c=a.dataToPoint([c,b]);c[0]-=n;c[1]-=p;c.push(d);return c});m=e.getExtent();e="visualMap.continuous"===e.type?HF(m,e.option.range):GF(m,e.getPieceList(),e.option.selected);l.update(k,f,b,c.color.getNormalizer(),{inRange:c.color.getColorMapper(),outOfRange:d.color.getColorMapper()},e);c=new Ga({style:{width:f,height:b,x:n,y:p,image:l.canvas},silent:!0});this.group.add(c)};a.type="heatmap";return a}(oa),UL=function(b){function a(){var c=null!==b&&b.apply(this,arguments)||this;c.type=a.type;return c}x(a,b);a.prototype.getInitialData=function(a,b){return sc(this.getSource(),this,{generateCoord:"value"})};a.prototype.preventIncremental=function(){var a=Yd.get(this.get("coordinateSystem"));if(a&&a.dimensions)return"lng"===a.dimensions[0]&&"lat"===a.dimensions[1]};a.type="series.heatmap";a.dependencies=["grid","geo","calendar"];a.defaultOption={coordinateSystem:"cartesian2d",zlevel:0,z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:"#212121"}}};return a}(ra),IF=["itemStyle","borderWidth"],Gz=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],An=new Nb,VL=function(b){function a(){var c=null!==b&&b.apply(this,arguments)||this;c.type=a.type;return c}x(a,b);a.prototype.render=function(a,b,e){var c=this.group,d=a.getData(),h=this._data;b=a.coordinateSystem;var k=b.getBaseAxis().isHorizontal(),l=b.master.getRect(),m={ecSize:{width:e.getWidth(),height:e.getHeight()},seriesModel:a,coordSys:b,coordSysExtent:[[l.x,l.x+l.width],[l.y,l.y+l.height]],isHorizontal:k,valueDim:Gz[+k],categoryDim:Gz[1-+k]};d.diff(h).add(function(a){if(d.hasValue(a)){var b=Rv(d,a),b=Kv(d,a,b,m),e=Sv(d,m,b);d.setItemGraphicEl(a,e);c.add(e);Vv(e,m,b)}}).update(function(a,b){var e=h.getItemGraphicEl(b);if(d.hasValue(a)){var f=Rv(d,a),f=Kv(d,a,f,m),g=Tv(d,f);e&&g!==e.__pictorialShapeStr&&(c.remove(e),d.setItemGraphicEl(a,null),e=null);e?(g=e,ea(g.__pictorialBundle,{x:f.bundlePosition[0],y:f.bundlePosition[1]},f.animationModel,f.dataIndex),f.symbolRepeat?Nv(g,m,f,!0):Ov(g,m,f,!0),Pv(g,f,!0),Qv(g,m,f,!0)):e=Sv(d,m,f,!0);d.setItemGraphicEl(a,e);e.__pictorialSymbolMeta=f;c.add(e);Vv(e,m,f)}else c.remove(e)}).remove(function(a){var c=h.getItemGraphicEl(a);c&&Uv(h,a,c.__pictorialSymbolMeta.animationModel,c)}).execute();this._data=d;return this.group};a.prototype.remove=function(a,b){var c=this.group,d=this._data;a.get("animation")?d&&d.eachItemGraphicEl(function(c){Uv(d,S(c).dataIndex,a,c)}):c.removeAll()};a.type="pictorialBar";return a}(oa),WL=function(b){function a(){var c=null!==b&&b.apply(this,arguments)||this;c.type=a.type;c.hasSymbolVisual=!0;c.defaultSymbol="roundRect";return c}x(a,b);a.prototype.getInitialData=function(a){a.stack=null;return b.prototype.getInitialData.apply(this,arguments)};a.type="series.pictorialBar";a.dependencies=["grid"];a.defaultOption=ed(Fh.defaultOption,{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:"#212121"}}});return a}(Fh),XL=function(b){function a(){var c=null!==b&&b.apply(this,arguments)||this;c.type=a.type;c._layers=[];return c}x(a,b);a.prototype.render=function(a,b,e){function c(a){return a.name}function d(c,b,d){var e=k._layers;if("remove"===c)l.remove(e[b]);else{for(var f=[],g=[],p,q=m[b].indices,t=0;tMath.PI/2?"right":"left"):g&&"center"!==g?"left"===g?(r=h.r0+d,l>Math.PI/2&&(g="right")):"right"===g&&(r=h.r-d,l>Math.PI/2&&(g="left")):(r=(h.r+h.r0)/2,g="center");k.style.align=g;k.style.verticalAlign=c(e,"verticalAlign")||"middle";k.x=r*m+h.cx;k.y=r*n+h.cy;e=c(e,"rotate");r=0;"radial"===e?(r=-l,r<-Math.PI/2&&(r+=Math.PI)):"tangential"===e?(r=Math.PI/2-l,r>Math.PI/2?r-=Math.PI:r<-Math.PI/2&&(r+=Math.PI)):"number"===typeof e&&(r=e*Math.PI/180);k.rotation=r});q.dirtyStyle()};return a}(lb),ZL=function(b){function a(){var c=null!==b&&b.apply(this,arguments)||this;c.type=a.type;return c}x(a,b);a.prototype.render=function(a,b,e,f){var c=this;this.seriesModel=a;this.api=e;this.ecModel=b;var d=a.getData(),k=d.tree.root;f=a.getViewRoot();var l=this.group,m=a.get("renderLabelForZeroData"),n=[];f.eachNode(function(a){n.push(a)});(function(c,f){function g(a){return a.getId()}function h(g,h){var n=null==g?null:c[g],p=null==h?null:f[h];m||!n||n.getValue()||(n=null);n!==k&&p!==k&&(p&&p.piece?n?(p.piece.updateData(!1,n,a,b,e),d.setItemGraphicEl(n.dataIndex,p.piece)):p&&p.piece&&(l.remove(p.piece),p.piece=null):n&&(p=new Hz(n,a,b,e),l.add(p),d.setItemGraphicEl(n.dataIndex,p)))}0===c.length&&0===f.length||(new sd(f,c,g,g)).add(h).update(h).remove(P(h,null)).execute()})(n,this._oldChildren||[]);(function(d,f){0=c.r0}};a.type="sunburst";return a}(oa),$L=function(b){function a(){var c=null!==b&&b.apply(this,arguments)||this;c.type=a.type;c.ignoreStyleOnData=!0;return c}x(a,b);a.prototype.getInitialData=function(a,b){var c={name:a.name,children:a.data};Xv(c);var d=C(a.levels||[],function(a){return new la(a,this,b)},this),g=op.createTree(c,this,function(a){a.wrapMethod("getItemModel",function(a,c){var b=g.getNodeByDataIndex(c);(b=d[b.depth])&&(a.parentModel=b);return a})});return g.data};a.prototype.optionUpdated=function(){this.resetViewRoot()};a.prototype.getDataParams=function(a){var c=b.prototype.getDataParams.apply(this,arguments),e=this.getData().tree.getNodeByDataIndex(a);c.treePathInfo=Sm(e,this);return c};a.prototype.getViewRoot=function(){return this._viewRoot};a.prototype.resetViewRoot=function(a){a?this._viewRoot=a:a=this._viewRoot;var c=this.getRawData().tree.root;if(!a||a!==c&&!c.contains(a))this._viewRoot=c};a.prototype.enableAriaDecal=function(){Du(this)};a.type="series.sunburst";a.defaultOption={zlevel:0,z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,stillShowZeroSum:!0,nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},emphasis:{focus:"descendant"},blur:{itemStyle:{opacity:.2},label:{opacity:.1}},animationType:"expansion",animationDuration:1E3,animationDurationUpdate:500,data:[],levels:[],sort:"desc"};return a}(ra),Yv=Math.PI/180,fw={},vc=pc.CMD,kw=2*Math.PI,fG=["x","y"],eG=["width","height"],wc=[],Lb=ma(),Jh={x:1,y:1,scaleX:1,scaleY:1,originX:1,originY:1,rotation:1},Iz=ia(Jh).join(", "),qw={color:"fill",borderColor:"stroke"},jG={symbol:1,symbolSize:1,symbolKeepAspect:1,legendSymbol:1,visualMeta:1,liftZ:1,decal:1},rd=["normal","emphasis","blur","select"],Pn={normal:["itemStyle"],emphasis:["emphasis","itemStyle"],blur:["blur","itemStyle"],select:["select","itemStyle"]},Qn={normal:["label"],emphasis:["emphasis","label"],blur:["blur","label"],select:["select","label"]},Mb={normal:{},emphasis:{},blur:{},select:{}},iG={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},je=new Dc,pw={cartesian2d:function(b){var a=b.master.getRect();return{coordSys:{type:"cartesian2d",x:a.x,y:a.y,width:a.width,height:a.height},api:{coord:function(a){return b.dataToPoint(a)},size:I(SF,b)}}},geo:function(b){var a=b.getBoundingRect();return{coordSys:{type:"geo",x:a.x,y:a.y,width:a.width,height:a.height,zoom:b.getZoom()},api:{coord:function(a){return b.dataToPoint(a)},size:I(TF,b)}}},singleAxis:function(b){var a=b.getRect();return{coordSys:{type:"singleAxis",x:a.x,y:a.y,width:a.width,height:a.height},api:{coord:function(a){return b.dataToPoint(a)},size:I(UF,b)}}},polar:function(b){var a=b.getRadiusAxis(),c=b.getAngleAxis(),d=a.getExtent();d[0]>d[1]&&d.reverse();return{coordSys:{type:"polar",cx:b.cx,cy:b.cy,r:d[1],r0:d[0]},api:{coord:function(d){var e=a.dataToRadius(d[0]);d=c.dataToAngle(d[1]);var g=b.coordToPoint([e,d]);g.push(e,d*Math.PI/180);return g},size:I(VF,b)}}},calendar:function(b){var a=b.getRect(),c=b.getRangeInfo();return{coordSys:{type:"calendar",x:a.x,y:a.y,width:a.width,height:a.height,cellWidth:b.getCellWidth(),cellHeight:b.getCellHeight(),rangeInfo:{start:c.start,end:c.end,weeks:c.weeks,dayCount:c.allDay}},api:{coord:function(a,c){return b.dataToPoint(a,c)}}}}},aM=function(b){function a(){var c=null!==b&&b.apply(this,arguments)||this;c.type=a.type;return c}x(a,b);a.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0);this.currentZ=this.get("z",!0)};a.prototype.getInitialData=function(a,b){return sc(this.getSource(),this)};a.prototype.getDataParams=function(a,d,e){a=b.prototype.getDataParams.call(this,a,d);e&&(a.info=Lb(e).info);return a};a.type="series.custom";a.dependencies=["grid","polar","geo","singleAxis","calendar"];a.defaultOption={coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,clip:!1};return a}(ra),cM=function(b){function a(){var c=null!==b&&b.apply(this,arguments)||this;c.type=a.type;return c}x(a,b);a.prototype.render=function(a,b,e,f){var c=this._data,d=a.getData(),k=this.group,l=ow(a,d,b,e);b=a.__transientTransitionOpt;if(!b||null!=b.from&&null!=b.to){var m=new bM(a,b),n=b?"multiple":"oneToOne";(new sd(c?c.getIndices():[],d.getIndices(),lw(c,n,b&&b.from),lw(d,n,b&&b.to),null,n)).add(function(c){zf(e,null,c,l(c,f),a,k,d,null)}).remove(function(b){qj(c.getItemGraphicEl(b),a,k)}).update(function(b,g){m.reset("oneToOne");var h=c.getItemGraphicEl(g);m.findAndAddFrom(h);m.hasFrom()&&(h&&k.remove(h),h=null);zf(e,h,b,l(b,f),a,k,d,m);m.applyMorphing()}).updateManyToOne(function(b,g){m.reset("manyToOne");for(var h=0;h=b?null:f,a+1>=c?b-f:e);else if("oneToMany"===a)for(a=Math.max(1,Math.floor(c/b)),f=e=0;e=c?c-e:a,f>=b?null:f)};b.prototype._oneToOneForSingleTo=function(a,c){var b=this._toList[a],e=this._toElOptionList[a],f=this._toDataIndices[a],g=this._allPropsFinalList[a],h=this._fromList[c],k=this._getOrCreateMorphConfig(f),l=k.duration;if(h&&h.__combiningSubList)$g(b,g,e.style),l&&(b=jw([h],b,k,rj),this._processResultIndividuals(b,a,null));else{if(l=l&&h)(l=h!==b)||(l=null!=h.__oldBuildPath||!!h.__combiningSubList);h=l?h:null;l={};oj("shape",b,h,e,l,!1);oj("extra",b,h,e,l,!1);Jn(b,h,e,l,!1);Ln(b,h,e,e.style,l,!1);$g(b,g,e.style);h&&Cn(h,b,k);Mn(b,f,e,this._seriesModel,l,!1)}};b.prototype._manyToOneForSingleTo=function(a,c,b){var d=this._toList[a];$g(d,this._allPropsFinalList[a],this._toElOptionList[a].style);var f=this._getOrCreateMorphConfig(this._toDataIndices[a]);if(f.duration&&null!=c){for(var g=[];cb?!0:g?(f=Fm(a).seriesDataCount,e=e.getExtent(),Math.abs(e[0]-e[1])/f>b):!1):!0===b:!1};b.prototype.makeElOption=function(a,c,b,e,f){};b.prototype.createPointerEl=function(a,c,b,e){if(b=c.pointer)c=ke(a).pointerEl=new Yg[b.type](J(c.pointer)),a.add(c)};b.prototype.createLabelEl=function(a,c,b,e){c.label&&(c=ke(a).labelEl=new ha(J(c.label)),a.add(c),xw(c,e))};b.prototype.updatePointerEl=function(a,c,b){(a=ke(a).pointerEl)&&c.pointer&&(a.setStyle(c.pointer.style),b(a,{shape:c.pointer.shape}))};b.prototype.updateLabelEl=function(a,c,b,e){if(a=ke(a).labelEl)a.setStyle(c.label.style),b(a,{x:c.label.x,y:c.label.y}),xw(a,e)};b.prototype._renderHandle=function(a){if(!this._dragging&&this.updateHandleTransform){var c=this._axisPointerModel,b=this._api.getZr(),e=this._handle,f=c.getModel("handle"),g=c.get("status");if(f.get("show")&&g&&"hide"!==g){var h;this._handle||(h=!0,e=this._handle=Ze(f.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(a){Bc(a.event)},onmousedown:wp(this._onHandleDragMove,this,0,0),drift:wp(this._onHandleDragMove,this),ondragend:wp(this._onHandleDragEnd,this)}),b.add(e));yw(e,c,!1);e.setStyle(f.getItemStyle(null,"color borderColor borderWidth opacity shadowColor shadowBlur shadowOffsetX shadowOffsetY".split(" ")));c=f.get("size");A(c)||(c=[c,c]);e.scaleX=c[0]/2;e.scaleY=c[1]/2;tg(this,"_doDispatchAxisPointer",f.get("throttle")||0,"fixRate");this._moveHandleToValue(a,h)}else e&&b.remove(e),this._handle=null}};b.prototype._moveHandleToValue=function(a,c){vw(this._axisPointerModel,!c&&this._moveAnimation,this._handle,Tn(this.getHandleTransform(a,this._axisModel,this._axisPointerModel)))};b.prototype._onHandleDragMove=function(a,c){var b=this._handle;if(b){this._dragging=!0;var e=this.updateHandleTransform(Tn(b),[a,c],this._axisModel,this._axisPointerModel);this._payloadInfo=e;b.stopAnimation();b.attr(Tn(e));ke(b).lastProp=null;this._doDispatchAxisPointer()}};b.prototype._doDispatchAxisPointer=function(){if(this._handle){var a=this._payloadInfo,c=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:a.cursorPoint[0],y:a.cursorPoint[1],tooltipOption:a.tooltipOption,axesInfo:[{axisDim:c.axis.dim,axisIndex:c.componentIndex}]})}};b.prototype._onHandleDragEnd=function(){this._dragging=!1;if(this._handle){var a=this._axisPointerModel.get("value");this._moveHandleToValue(a);this._api.dispatchAction({type:"hideTip"})}};b.prototype.clear=function(a){this._lastStatus=this._lastValue=null;a=a.getZr();var c=this._group,b=this._handle;a&&c&&(this._lastGraphicKey=null,c&&a.remove(c),b&&a.remove(b),this._payloadInfo=this._handle=this._group=null)};b.prototype.doClear=function(){};b.prototype.buildLabel=function(a,c,b){b=b||0;return{x:a[b],y:a[1-b],width:c[b],height:c[1-b]}};return b}(),yG=function(b){function a(){return null!==b&&b.apply(this,arguments)||this}x(a,b);a.prototype.makeElOption=function(a,b,e,f,g){var c=e.axis,d=c.grid,l=f.get("type"),m=Dw(d,c).getOtherAxis(c).getGlobalExtent(),n=c.toGlobalCoord(c.dataToCoord(b,!0));if(l&&"none"!==l){var p=Un(f),c=dM[l](c,n,m);c.style=p;a.graphicKey=c.type;a.pointer=c}d=Bm(d.model,e);Bw(b,a,d,e,f,g)};a.prototype.getHandleTransform=function(a,b,e){var c=Bm(b.axis.grid.model,b,{labelInside:!1});c.labelMargin=e.get(["handle","margin"]);a=Vn(b.axis,a,c);return{x:a[0],y:a[1],rotation:c.rotation+(0>c.labelDirection?Math.PI:0)}};a.prototype.updateHandleTransform=function(a,b,e,f){f=e.axis;var c=f.grid;e=f.getGlobalExtent(!0);var d=Dw(c,f).getOtherAxis(f).getGlobalExtent();f="x"===f.dim?0:1;c=[a.x,a.y];c[f]+=b[f];c[f]=Math.min(e[1],c[f]);c[f]=Math.max(e[0],c[f]);b=(d[1]+d[0])/2;b=[b,b];b[f]=c[f];return{x:c[0],y:c[1],rotation:a.rotation,cursorPoint:b,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][f]}};return a}(xp),dM={line:function(b,a,c){return{type:"Line",subPixelOptimize:!0,shape:Wn([a,c[0]],[a,c[1]],"x"===b.dim?0:1)}},shadow:function(b,a,c){var d=Math.max(1,b.getBandWidth());return{type:"Rect",shape:Cw([a-d/2,c[0]],[d,c[1]-c[0]],"x"===b.dim?0:1)}}},zG=function(b){function a(){var c=null!==b&&b.apply(this,arguments)||this;c.type=a.type;return c}x(a,b);a.type="axisPointer";a.defaultOption={show:"auto",zlevel:0,z:50,type:"line",snap:!1,triggerTooltip:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#B9BEC9",width:1,type:"dashed"},shadowStyle:{color:"rgba(210,219,238,0.2)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}};return a}(W),Kc=ma(),oG=r,AG=function(b){function a(){var c=null!==b&&b.apply(this,arguments)||this;c.type=a.type;return c}x(a,b);a.prototype.render=function(a,b,e){b=b.getComponent("tooltip");var c=a.get("triggerOn")||b&&b.get("triggerOn")||"mousemove|click";Ew("axisPointer",e,function(a,b,d){"none"!==c&&("leave"===a||0<=c.indexOf(a))&&d({type:"updateAxisPointer",currTrigger:a,x:b&&b.offsetX,y:b&&b.offsetY})})};a.prototype.remove=function(a,b){Xn("axisPointer",b)};a.prototype.dispose=function(a,b){Xn("axisPointer",b)};a.type="axisPointer";return a}(na),Jw=ma(),fM=function(b){function a(){return null!==b&&b.apply(this,arguments)||this}x(a,b);a.prototype.makeElOption=function(a,b,e,f,g){var c=e.axis;"angle"===c.dim&&(this.animationThreshold=Math.PI/18);var d=c.polar,l=d.getOtherAxis(c).getExtent(),m=c.dataToCoord(b),n=f.get("type");if(n&&"none"!==n){var p=Un(f),c=eM[n](c,d,m,l);c.style=p;a.graphicKey=c.type;a.pointer=c}p=f.get(["label","margin"]);l=e.axis;b=l.dataToCoord(b);c=d.getAngleAxis().getExtent()[0];c=c/180*Math.PI;m=d.getRadiusAxis().getExtent();"radius"===l.dim?(l=nb(),Tc(l,l,c),Rb(l,l,[d.cx,d.cy]),b=Wb([b,-p],l),d=e.getModel("axisLabel").get("rotate")||0,p=mb.innerTextLayout(c,d*Math.PI/180,-1),d=p.textAlign,p=p.textVerticalAlign):(c=m[1],b=d.coordToPoint([c+p,b]),p=d.cx,l=d.cy,d=.3>Math.abs(b[0]-p)/c?"center":b[0]>p?"left":"right",p=.3>Math.abs(b[1]-l)/c?"middle":b[1]>l?"top":"bottom");zw(a,e,f,g,{position:b,align:d,verticalAlign:p})};return a}(xp),eM={line:function(b,a,c,d){return"angle"===b.dim?{type:"Line",shape:Wn(a.coordToPoint([d[0],c]),a.coordToPoint([d[1],c]))}:{type:"Circle",shape:{cx:a.cx,cy:a.cy,r:c}}},shadow:function(b,a,c,d){var e=Math.max(1,b.getBandWidth()),f=Math.PI/180;return"angle"===b.dim?{type:"Sector",shape:{cx:a.cx,cy:a.cy,r0:d[0],r:d[1],startAngle:(-c-e/2)*f,endAngle:(-c+e/2)*f,clockwise:!0}}:{type:"Sector",shape:{cx:a.cx,cy:a.cy,r0:c-e/2,r:c+e/2,startAngle:0,endAngle:2*Math.PI,clockwise:!0}}}},gM=function(b){function a(){var c=null!==b&&b.apply(this,arguments)||this;c.type=a.type;return c}x(a,b);a.prototype.findAxisModel=function(a){var c;this.ecModel.eachComponent(a,function(a){a.getCoordSysModel()===this&&(c=a)},this);return c};a.type="polar";a.dependencies=["radiusAxis","angleAxis"];a.defaultOption={zlevel:0,z:0,center:["50%","50%"],radius:"80%"};return a}(W),yp=function(b){function a(){return null!==b&&b.apply(this,arguments)||this}x(a,b);a.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",Da).models[0]};a.type="polarAxis";return a}(W);wa(yp,Lf);var hM=function(b){function a(){var c=null!==b&&b.apply(this,arguments)||this;c.type=a.type;return c}x(a,b);a.type="angleAxis";return a}(yp),iM=function(b){function a(){var c=null!==b&&b.apply(this,arguments)||this;c.type=a.type;return c}x(a,b);a.type="radiusAxis";return a}(yp),zp=function(b){function a(a,d){return b.call(this,"radius",a,d)||this}x(a,b);a.prototype.pointToData=function(a,b){return this.polar.pointToData(a,b)["radius"===this.dim?0:1]};return a}(Pb);zp.prototype.dataToRadius=Pb.prototype.dataToCoord;zp.prototype.radiusToData=Pb.prototype.coordToData;var jM=ma(),Ap=function(b){function a(a,d){return b.call(this,"angle",a,d||[0,360])||this}x(a,b);a.prototype.pointToData=function(a,b){return this.polar.pointToData(a,b)["radius"===this.dim?0:1]};a.prototype.calculateCategoryInterval=function(){var a=this.getLabelModel(),b=this.scale,e=b.getExtent(),b=b.count();if(1>e[1]-e[0])return 0;var e=e[0],f=this.dataToCoord(e+1)-this.dataToCoord(e),f=Math.abs(f),a=$f(null==e?"":e+"",a.getFont(),"center","top"),a=Math.max(a.height,7)/f;isNaN(a)&&(a=Infinity);var a=Math.max(0,Math.floor(a)),e=jM(this.model),f=e.lastAutoInterval,g=e.lastTickCount;null!=f&&null!=g&&1>=Math.abs(f-a)&&1>=Math.abs(g-b)&&f>a?a=f:(e.lastTickCount=b,e.lastAutoInterval=a);return a};return a}(Pb);Ap.prototype.dataToAngle=Pb.prototype.dataToCoord;Ap.prototype.angleToData=Pb.prototype.coordToData;var Jz=function(){function b(a){this.dimensions=["radius","angle"];this.type="polar";this.cy=this.cx=0;this._radiusAxis=new zp;this._angleAxis=new Ap;this.axisPointerEnabled=!0;this.name=a||"";this._radiusAxis.polar=this._angleAxis.polar=this}b.prototype.containPoint=function(a){a=this.pointToCoord(a);return this._radiusAxis.contain(a[0])&&this._angleAxis.contain(a[1])};b.prototype.containData=function(a){return this._radiusAxis.containData(a[0])&&this._angleAxis.containData(a[1])};b.prototype.getAxis=function(a){return this["_"+a+"Axis"]};b.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]};b.prototype.getAxesByScale=function(a){var c=[],b=this._angleAxis,e=this._radiusAxis;b.scale.type===a&&c.push(b);e.scale.type===a&&c.push(e);return c};b.prototype.getAngleAxis=function(){return this._angleAxis};b.prototype.getRadiusAxis=function(){return this._radiusAxis};b.prototype.getOtherAxis=function(a){var c=this._angleAxis;return a===c?this._radiusAxis:c};b.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()};b.prototype.getTooltipAxes=function(a){a=null!=a&&"auto"!==a?this.getAxis(a):this.getBaseAxis();return{baseAxes:[a],otherAxes:[this.getOtherAxis(a)]}};b.prototype.dataToPoint=function(a,c){return this.coordToPoint([this._radiusAxis.dataToRadius(a[0],c),this._angleAxis.dataToAngle(a[1],c)])};b.prototype.pointToData=function(a,c){var b=this.pointToCoord(a);return[this._radiusAxis.radiusToData(b[0],c),this._angleAxis.angleToData(b[1],c)]};b.prototype.pointToCoord=function(a){var c=a[0]-this.cx,b=a[1]-this.cy,e=this.getAngleAxis(),f=e.getExtent();a=Math.min(f[0],f[1]);f=Math.max(f[0],f[1]);e.inverse?a=f-360:f=a+360;e=Math.sqrt(c*c+b*b);c=Math.atan2(-(b/e),c/e)/Math.PI*180;for(b=cf;)c+=360*b;return[e,c]};b.prototype.coordToPoint=function(a){var c=a[0];a=a[1]/180*Math.PI;return[Math.cos(a)*c+this.cx,-Math.sin(a)*c+this.cy]};b.prototype.getArea=function(){var a=this.getAngleAxis(),c=this.getRadiusAxis().getExtent().slice();c[0]>c[1]&&c.reverse();var b=a.getExtent(),e=Math.PI/180;return{cx:this.cx,cy:this.cy,r0:c[0],r:c[1],startAngle:-b[0]*e,endAngle:-b[1]*e,clockwise:a.inverse,contain:function(a,c){var b=a-this.cx,d=c-this.cy,b=b*b+d*d,d=this.r,e=this.r0;return b<=d*d&&b>=e*e}}};b.prototype.convertToPixel=function(a,c,b){return Kw(c)===this?this.dataToPoint(b):null};b.prototype.convertFromPixel=function(a,c,b){return Kw(c)===this?this.pointToData(b):null};return b}(),kM={dimensions:Jz.prototype.dimensions,create:function(b,a){var c=[];b.eachComponent("polar",function(b,e){var d=new Jz(e+"");d.update=BG;var g=d.getRadiusAxis(),h=d.getAngleAxis(),k=b.findAxisModel("radiusAxis"),l=b.findAxisModel("angleAxis");Lw(g,k);Lw(h,l);g=b.get("center");h=a.getWidth();k=a.getHeight();d.cx=H(g[0],h);d.cy=H(g[1],k);g=d.getRadiusAxis();h=Math.min(h,k)/2;k=b.get("radius");null==k?k=[0,"100%"]:A(k)||(k=[0,k]);h=[H(k[0],h),H(k[1],h)];g.inverse?g.setExtent(h[1],h[0]):g.setExtent(h[0],h[1]);c.push(d);b.coordinateSystem=d;d.model=b});b.eachSeries(function(a){if("polar"===a.get("coordinateSystem")){var c=a.getReferringComponents("polar",Da).models[0];if(!c)throw Error('Polar "'+Ba(a.get("polarIndex"),a.get("polarId"),0)+'" not found');a.coordinateSystem=c.coordinateSystem}});return c}},lM="axisLine axisLabel axisTick minorTick splitLine minorSplitLine splitArea".split(" "),nM=function(b){function a(){var c=null!==b&&b.apply(this,arguments)||this;c.type=a.type;c.axisPointerClass="PolarAxisPointer";return c}x(a,b);a.prototype.render=function(a,b){this.group.removeAll();if(a.get("show")){var c=a.axis,d=c.polar,g=d.getRadiusAxis().getExtent(),h=c.getTicksCoords(),k=c.getMinorTicksCoords(),l=C(c.getViewLabels(),function(a){a=J(a);var b=c.scale,b="ordinal"===b.type?b.getRawOrdinalNumber(a.tickValue):a.tickValue;a.coord=c.dataToCoord(b);return a});Mw(l);Mw(h);r(lM,function(b){if(a.get([b,"show"])&&(!c.scale.isBlank()||"axisLine"===b))mM[b](this.group,a,d,h,k,g,l)},this)}};a.type="angleAxis";return a}(le),mM={axisLine:function(b,a,c,d,e,f){a=a.getModel(["axisLine","lineStyle"]);e=(d=c.getRadiusAxis().inverse?0:1)?0:1;c=0===f[e]?new Nb({shape:{cx:c.cx,cy:c.cy,r:f[d]},style:a.getLineStyle(),z2:1,silent:!0}):new Hf({shape:{cx:c.cx,cy:c.cy,r:f[d],r0:f[e]},style:a.getLineStyle(),z2:1,silent:!0});c.style.fill=null;b.add(c)},axisTick:function(b,a,c,d,e,f){e=a.getModel("axisTick");var g=(e.get("inside")?-1:1)*e.get("length"),h=f[c.getRadiusAxis().inverse?0:1];d=C(d,function(a){return new Ua({shape:tj(c,[h,h+g],a.coord)})});b.add(xb(d,{style:K(e.getModel("lineStyle").getLineStyle(),{stroke:a.get(["axisLine","lineStyle","color"])})}))},minorTick:function(b,a,c,d,e,f){if(e.length){d=a.getModel("axisTick");var g=a.getModel("minorTick"),h=(d.get("inside")?-1:1)*g.get("length");f=f[c.getRadiusAxis().inverse?0:1];for(var k=[],l=0;lMath.abs(r[0]-v)/p?"center":r[0]>v?"left":"right",p=.3>Math.abs(r[1]-z)/p?"middle":r[1]>z?"top":"bottom";h&&h[n]&&(n=h[n],N(n)&&n.textStyle&&(g=new la(n.textStyle,k,k.ecModel)));g=new ha({silent:mb.isLabelSilent(a),style:Ja(g,{x:r[0],y:r[1],fill:g.getTextColor()||a.get(["axisLine","lineStyle","color"]),text:d.formattedLabel,align:v,verticalAlign:p})});b.add(g);m&&(r=mb.makeAxisEventDataBase(a),r.targetType="axisLabel",r.value=d.rawLabel,S(g).eventData=r)},this)},splitLine:function(b,a,c,d,e,f){e=a.getModel("splitLine").getModel("lineStyle");for(var g=e.get("color"),h=0,g=g instanceof Array?g:[g],k=[],l=0;l=b.y&&a[1]<=b.y+b.height:d.contain(d.toLocalCoord(a[1]))&&a[0]>=b.y&&a[0]<=b.y+b.height};b.prototype.pointToData=function(a){var b=this.getAxis();return[b.coordToData(b.toLocalCoord(a["horizontal"===b.orient?0:1]))]};b.prototype.dataToPoint=function(a){var b=this.getAxis(),d=this.getRect(),e=[],f="horizontal"===b.orient?0:1;a instanceof Array&&(a=a[0]);e[f]=b.toGlobalCoord(b.dataToCoord(+a));e[1-f]=0===f?d.y+d.height/2:d.x+d.width/2;return e};b.prototype.convertToPixel=function(a,b,d){return Qw(b)===this?this.dataToPoint(d):null};b.prototype.convertFromPixel=function(a,b,d){return Qw(b)===this?this.pointToData(d):null};return b}(),CM={create:function(b,a){var c=[];b.eachComponent("singleAxis",function(d,e){var f=new Lz(d,b,a);f.name="single_"+e;f.resize(d,a);d.coordinateSystem=f;c.push(f)});b.eachSeries(function(a){if("singleAxis"===a.get("coordinateSystem")){var b=a.getReferringComponents("singleAxis",Da).models[0];a.coordinateSystem=b&&b.coordinateSystem}});return c},dimensions:Lz.prototype.dimensions},Rw=["x","y"],FG=["width","height"],EM=function(b){function a(){return null!==b&&b.apply(this,arguments)||this}x(a,b);a.prototype.makeElOption=function(a,b,e,f,g){var c=e.axis,d=c.coordinateSystem,l=Zn(d,1-(c.isHorizontal()?0:1)),m=d.dataToPoint(b)[0],n=f.get("type");n&&"none"!==n&&(d=Un(f),c=DM[n](c,m,l),c.style=d,a.graphicKey=c.type,a.pointer=c);c=Yn(e);Bw(b,a,c,e,f,g)};a.prototype.getHandleTransform=function(a,b,e){var c=Yn(b,{labelInside:!1});c.labelMargin=e.get(["handle","margin"]);a=Vn(b.axis,a,c);return{x:a[0],y:a[1],rotation:c.rotation+(0>c.labelDirection?Math.PI:0)}};a.prototype.updateHandleTransform=function(a,b,e,f){e=e.axis;var c=e.coordinateSystem;e=e.isHorizontal()?0:1;var d=Zn(c,e);f=[a.x,a.y];f[e]+=b[e];f[e]=Math.min(d[1],f[e]);f[e]=Math.max(d[0],f[e]);b=Zn(c,1-e);b=(b[1]+b[0])/2;b=[b,b];b[e]=f[e];return{x:f[0],y:f[1],rotation:a.rotation,cursorPoint:b,tooltipOption:{verticalAlign:"middle"}}};return a}(xp),DM={line:function(b,a,c){return{type:"Line",subPixelOptimize:!0,shape:Wn([a,c[0]],[a,c[1]],b.isHorizontal()?0:1)}},shadow:function(b,a,c){var d=b.getBandWidth();return{type:"Rect",shape:Cw([a-d/2,c[0]],[d,c[1]-c[0]],b.isHorizontal()?0:1)}}},FM=function(b){function a(){var c=null!==b&&b.apply(this,arguments)||this;c.type=a.type;return c}x(a,b);a.type="single";return a}(na),GM=function(b){function a(){var c=null!==b&&b.apply(this,arguments)||this;c.type=a.type;return c}x(a,b);a.prototype.init=function(a,d,e){var c=Qd({},a);b.prototype.init.apply(this,arguments);Sw(a,c)};a.prototype.mergeOption=function(a){b.prototype.mergeOption.apply(this,arguments);Sw(this.option,a)};a.prototype.getCellSize=function(){return this.option.cellSize};a.type="calendar";a.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}};return a}(W),HM={EN:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),CN:"\u4e00\u6708 \u4e8c\u6708 \u4e09\u6708 \u56db\u6708 \u4e94\u6708 \u516d\u6708 \u4e03\u6708 \u516b\u6708 \u4e5d\u6708 \u5341\u6708 \u5341\u4e00\u6708 \u5341\u4e8c\u6708".split(" ")},IM={EN:"SMTWTFS".split(""),CN:"\u65e5\u4e00\u4e8c\u4e09\u56db\u4e94\u516d".split("")},JM=function(b){function a(){var c=null!==b&&b.apply(this,arguments)||this;c.type=a.type;return c}x(a,b);a.prototype.render=function(a,b,e){b=this.group;b.removeAll();var c=a.coordinateSystem;e=c.getRangeInfo();c=c.getOrient();this._renderDayRect(a,e,b);this._renderLines(a,e,c,b);this._renderYearText(a,e,c,b);this._renderMonthText(a,c,b);this._renderWeekText(a,e,c,b)};a.prototype._renderDayRect=function(a,b,e){var c=a.coordinateSystem;a=a.getModel("itemStyle").getItemStyle();for(var d=c.getCellWidth(),h=c.getCellHeight(),k=b.start.time;k<=b.end.time;k=c.getNextNDay(k,1).time){var l=c.dataToRect([k],!1).tl,l=new Z({shape:{x:l[0],y:l[1],width:d,height:h},cursor:"default",style:a});e.add(l)}};a.prototype._renderLines=function(a,b,e,f){function c(b){d._firstDayOfMonth.push(k.getDateInfo(b));d._firstDayPoints.push(k.dataToRect([b],!1).tl);b=d._getLinePointsOfOneWeek(a,b,e);d._tlpoints.push(b[0]);d._blpoints.push(b[b.length-1]);m&&d._drawSplitline(b,l,f)}var d=this,k=a.coordinateSystem,l=a.getModel(["splitLine","lineStyle"]).getLineStyle(),m=a.get(["splitLine","show"]),n=l.lineWidth;this._tlpoints=[];this._blpoints=[];this._firstDayOfMonth=[];this._firstDayPoints=[];for(var p=b.start,q=0;p.time<=b.end.time;q++)c(p.formatedDate),0===q&&(p=k.getDateInfo(b.start.y+"-"+b.start.m)),p=p.date,p.setMonth(p.getMonth()+1),p=k.getDateInfo(p);c(k.getNextNDay(b.end.time,1).formatedDate);m&&this._drawSplitline(d._getEdgesPoints(d._tlpoints,n,e),l,f);m&&this._drawSplitline(d._getEdgesPoints(d._blpoints,n,e),l,f)};a.prototype._getEdgesPoints=function(a,b,e){a=[a[0].slice(),a[a.length-1].slice()];e="horizontal"===e?0:1;a[0][e]-=b/2;a[1][e]+=b/2;return a};a.prototype._drawSplitline=function(a,b,e){a=new kb({z2:20,shape:{points:a},style:b});e.add(a)};a.prototype._getLinePointsOfOneWeek=function(a,b,e){a=a.coordinateSystem;b=a.getDateInfo(b);for(var c=[],d=0;7>d;d++){var h=a.getNextNDay(b.time,d),k=a.dataToRect([h.time],!1);c[2*h.day]=k.tl;c[2*h.day+1]=k["horizontal"===e?"bl":"tr"]}return c};a.prototype._formatterLabel=function(a,b){return"string"===typeof a&&a?$A(a,b):"function"===typeof a?a(b):b.nameMap};a.prototype._yearTextPositionControl=function(a,b,e,f,g){a=b[0];b=b[1];e=["center","bottom"];"bottom"===f?(b+=g,e=["center","top"]):"left"===f?a-=g:"right"===f?(a+=g,e=["center","top"]):b-=g;g=0;if("left"===f||"right"===f)g=Math.PI/2;return{rotation:g,x:a,y:b,style:{align:e[0],verticalAlign:e[1]}}};a.prototype._renderYearText=function(a,b,e,f){var c=a.getModel("yearLabel");if(c.get("show")){a=c.get("margin");var d=c.get("position");d||(d="horizontal"!==e?"top":"left");var k=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],l=(k[0][0]+k[1][0])/2,m=(k[0][1]+k[1][1])/2,n="horizontal"===e?0:1,k={top:[l,k[n][1]],bottom:[l,k[1-n][1]],left:[k[1-n][0],m],right:[k[n][0],m]},l=b.start.y;+b.end.y>+b.start.y&&(l=l+"-"+b.end.y);m=c.get("formatter");b=this._formatterLabel(m,{start:b.start.y,end:b.end.y,nameMap:l});b=new ha({z2:30,style:Ja(c,{text:b})});b.attr(this._yearTextPositionControl(b,k[d],e,d,a));f.add(b)}};a.prototype._monthTextPositionControl=function(a,b,e,f,g){var c="left",d="top",l=a[0];a=a[1];"horizontal"===e?(a+=g,b&&(c="center"),"start"===f&&(d="bottom")):(l+=g,b&&(d="middle"),"start"===f&&(c="right"));return{x:l,y:a,align:c,verticalAlign:d}};a.prototype._renderMonthText=function(a,b,e){a=a.getModel("monthLabel");if(a.get("show")){var c=a.get("nameMap"),d=a.get("margin"),h=a.get("position"),k=a.get("align"),l=[this._tlpoints,this._blpoints];da(c)&&(c=HM[c.toUpperCase()]||[]);for(var m="start"===h?0:1,n="horizontal"===b?0:1,d="start"===h?-d:d,k="center"===k,p=0;pb;b++){var q=a.getNextNDay(n,b),q=a.dataToRect([q.time],!1).center,q=new ha({z2:30,style:F(Ja(c,{text:k[Math.abs((b+m)%7)]}),this._weekTextPositionControl(q,e,d,l,p))});f.add(q)}}};a.type="calendar";return a}(na),KM=function(){function b(a,c,d){this.type="calendar";this.dimensions=b.dimensions;this.getDimensionsInfo=b.getDimensionsInfo;this._model=a}b.getDimensionsInfo=function(){return[{name:"time",type:"time"},"value"]};b.prototype.getRangeInfo=function(){return this._rangeInfo};b.prototype.getModel=function(){return this._model};b.prototype.getRect=function(){return this._rect};b.prototype.getCellWidth=function(){return this._sw};b.prototype.getCellHeight=function(){return this._sh};b.prototype.getOrient=function(){return this._orient};b.prototype.getFirstDayOfWeek=function(){return this._firstDayOfWeek};b.prototype.getDateInfo=function(a){a=qb(a);var b=a.getFullYear(),d=a.getMonth()+1,d=10>d?"0"+d:""+d,e=a.getDate(),e=10>e?"0"+e:""+e,f=a.getDay(),f=Math.abs((f+7-this.getFirstDayOfWeek())%7);return{y:b+"",m:d,d:e,day:f,time:a.getTime(),formatedDate:b+"-"+d+"-"+e,date:a}};b.prototype.getNextNDay=function(a,b){b=b||0;if(0===b)return this.getDateInfo(a);a=new Date(this.getDateInfo(a).time);a.setDate(a.getDate()+b);return this.getDateInfo(a)};b.prototype.update=function(a,b){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 c=this._rangeInfo.weeks||1,e=["width","height"],f=this._model.getCellSize().slice(),g=this._model.getBoxLayoutParams(),h="horizontal"===this._orient?[c,7]:[7,c];r([0,1],function(a){null!=f[a]&&"auto"!==f[a]&&(g[e[a]]=f[a]*h[a])});var c={width:b.getWidth(),height:b.getHeight()},k=this._rect=Aa(g,c);r([0,1],function(a){if(null==f[a]||"auto"===f[a])f[a]=k[e[a]]/h[a]});this._sw=f[0];this._sh=f[1]};b.prototype.dataToPoint=function(a,b){A(a)&&(a=a[0]);null==b&&(b=!0);var c=this.getDateInfo(a),e=this._rangeInfo;if(b&&!(c.time>=e.start.time&&c.timea.end.time&&b.reverse();return b};b.prototype._getRangeInfo=function(a){a=[this.getDateInfo(a[0]),this.getDateInfo(a[1])];var b;a[0].time>a[1].time&&(b=!0,a.reverse());var d=Math.floor(a[1].time/864E5)-Math.floor(a[0].time/864E5)+1,e=new Date(a[0].time),f=e.getDate(),g=a[1].date.getDate();e.setDate(f+d-1);f=e.getDate();if(f!==g)for(var h=0d.weeks||0===a&&bd.lweek)return null;var c=new Date(d.start.time);c.setDate(+d.start.d+(7*(a-1)-d.fweek+b));return this.getDateInfo(c)};b.create=function(a,c){var d=[];a.eachComponent("calendar",function(e){var f=new b(e,a,c);d.push(f);e.coordinateSystem=f});a.eachSeries(function(a){"calendar"===a.get("coordinateSystem")&&(a.coordinateSystem=d[a.get("calendarIndex")||0])});return d};b.dimensions=["time","value"];return b}(),Af=ma(),Vw={path:null,compoundPath:null,group:M,image:Ga,text:ha},LM=function(b){var a=b.graphic;A(a)?b.graphic=a[0]&&a[0].elements?[b.graphic[0]]:[{elements:a}]:a&&!a.elements&&(b.graphic=[{elements:[a]}])},MM=function(b){function a(){var c=null!==b&&b.apply(this,arguments)||this;c.type=a.type;return c}x(a,b);a.prototype.mergeOption=function(a,d){var c=this.option.elements;this.option.elements=null;b.prototype.mergeOption.call(this,a,d);this.option.elements=c};a.prototype.optionUpdated=function(a,b){var c=this.option,d=(b?c:a).elements,g=c.elements=b?[]:c.elements,c=[];this._flatten(d,c,null);var d=yq(g,c,"normalMerge"),h=this._elOptionsToUpdate=[];r(d,function(a,b){var c=a.newOption;O(N(c)||a.existing,"Empty graphic option definition");if(c){h.push(c);var d=a.existing;c.id=a.keyInfo.id;!c.type&&d&&(c.type=d.type);if(null==c.parentId){var e=c.parentOption;e?c.parentId=e.id:d&&(c.parentId=d.parentId)}c.parentOption=null;var d=F({},c),e=g[b],f=c.$action||"merge";"merge"===f?e?(f=c.type,O(!f||e.type===f,'Please set $action: "replace" to change `type`'),U(e,d,!0),gd(e,d,{ignoreSize:!0}),Qd(c,e)):g[b]=d:"replace"===f?g[b]=d:"remove"===f&&e&&(g[b]=null);if(d=g[b])d.hv=c.hv=[Ww(c,["left","right"]),Ww(c,["top","bottom"])],"group"===d.type&&(null==d.width&&(d.width=c.width=0),null==d.height&&(d.height=c.height=0))}},this);for(d=g.length-1;0<=d;d--)null==g[d]?g.splice(d,1):delete g[d].$action};a.prototype._flatten=function(a,b,e){r(a,function(a){if(a){e&&(a.parentOption=e);b.push(a);var c=a.children;"group"===a.type&&c&&this._flatten(c,b,a);delete a.children}},this)};a.prototype.useElOptionsToUpdate=function(){var a=this._elOptionsToUpdate;this._elOptionsToUpdate=null;return a};a.type="graphic";a.defaultOption={elements:[]};return a}(W),NM=function(b){function a(){var c=null!==b&&b.apply(this,arguments)||this;c.type=a.type;return c}x(a,b);a.prototype.init=function(){this._elMap=R()};a.prototype.render=function(a,b,e){a!==this._lastGraphicModel&&this._clear();this._lastGraphicModel=a;this._updateElements(a);this._relocate(a,e)};a.prototype._updateElements=function(a){var b=a.useElOptionsToUpdate();if(b){var c=this._elMap,f=this.group;r(b,function(b){var d=Ea(b.id,null),e=null!=d?c.get(d):null,g=Ea(b.parentId,null),m=null!=g?c.get(g):f,n=b.type,p=b.style;"text"===n&&p&&b.hv&&b.hv[1]&&(p.textVerticalAlign=p.textBaseline=p.verticalAlign=p.align=null);var g=b.textContent,q=b.textConfig;p&&$v(p,n,!!q,!!g)&&(n=aw(p,n,!0),!q&&n.textConfig&&(b.textConfig=n.textConfig),!g&&n.textContent&&(g=n.textContent));n=GG(b);e&&O(m===e.parent,"Changing parent is not supported.");q=b.$action||"merge";"merge"===q?e?e.attr(n):Uw(d,m,n,c):"replace"===q?(uj(e,c),Uw(d,m,n,c)):"remove"===q&&uj(e,c);(d=c.get(d))&&g&&("merge"===q?(e=d.getTextContent())?e.attr(g):d.setTextContent(new ha(g)):"replace"===q&&d.setTextContent(new ha(g)));d&&(g=Af(d),g.__ecGraphicWidthOption=b.width,g.__ecGraphicHeightOption=b.height,g=S(d).eventData,d.silent||d.ignore||g||(g=S(d).eventData={componentType:"graphic",componentIndex:a.componentIndex,name:d.name}),g&&(g.info=b.info))})}};a.prototype._relocate=function(a,b){for(var c=a.option.elements,d=this.group,g=this._elMap,h=b.getWidth(),k=b.getHeight(),l=0;lg;g++)b[g]=ga(a[g],c,d,!0),f&&(b[g]=e.parse(b[g]))}var d=this._dataExtent,e=this.getAxisModel().axis.scale,f=this._dataZoomModel.getRangePropMode(),g=[0,100],h=[],k=[],l;Bf(["start","end"],function(b,c){var m=a[b],n=a[b+"Value"];"percent"===f[c]?(null==m&&(m=g[c]),n=e.parse(ga(m,g,d))):(l=!0,n=null==n?d[c]:e.parse(n),m=ga(n,d,g));k[c]=n;h[c]=m});Cb(k);Cb(h);var m=this._minMaxSpan;l?b(k,h,d,g,!1):b(h,k,g,d,!0);return{valueWindow:k,percentWindow:h}};b.prototype.reset=function(a){if(a===this._dataZoomModel){var b=this.getTargetSeriesModels();this._dataExtent=IG(this,this._dimName,b);this._updateMinMaxSpan();a=this.calculateDataWindow(a.settledOption);this._valueWindow=a.valueWindow;this._percentWindow=a.percentWindow;this._setAxisModel()}};b.prototype.filterData=function(a,b){if(a===this._dataZoomModel){var c=this._dimName,e=this.getTargetSeriesModels(),f=a.get("filterMode"),g=this._valueWindow;"none"!==f&&Bf(e,function(a){var b=a.getData(),d=b.mapDimensionsAll(c);d.length&&("weakFilter"===f?b.filterSelf(function(a){for(var c,e,f,h=0;hg[1];if(l&&!m&&!k)return!0;l&&(f=!0);m&&(c=!0);k&&(e=!0)}return f&&c&&e}):Bf(d,function(c){if("empty"===f)a.setData(b=b.map(c,function(a){return a>=g[0]&&a<=g[1]?a:NaN}));else{var d={};d[c]=g;b.selectRange(d)}}),Bf(d,function(a){b.setApproximateExtent(g,a)}))})}};b.prototype._updateMinMaxSpan=function(){var a=this._minMaxSpan={},b=this._dataZoomModel,d=this._dataExtent;Bf(["min","max"],function(c){var e=b.get(c+"Span"),g=b.get(c+"ValueSpan");null!=g&&(g=this.getAxisModel().axis.scale.parse(g));null!=g?e=ga(d[0]+g,d,[0,100],!0):null!=e&&(g=ga(e,[0,100],d,!0)-d[0]);a[c+"Span"]=e;a[c+"ValueSpan"]=g},this)};b.prototype._setAxisModel=function(){var a=this.getAxisModel(),b=this._percentWindow,d=this._valueWindow;if(b){var e=Wk(d,[0,500]),e=Math.min(e,20),a=a.axis.scale.rawExtentInfo;0!==b[0]&&a.setDeterminedMinMax("min",+d[0].toFixed(e));100!==b[1]&&a.setDeterminedMinMax("max",+d[1].toFixed(e));a.freeze()}};return b}(),KG={getTargetSeries:function(b){function a(a){b.eachComponent("dataZoom",function(c){c.eachTargetAxis(function(d,e){var f=b.getComponent(td(d),e);a(d,e,f,c)})})}a(function(a,b,c,d){c.__dzAxisProxy=null});var c=[];a(function(a,d,g,h){g.__dzAxisProxy||(g.__dzAxisProxy=new PM(a,d,h,b),c.push(g.__dzAxisProxy))});var d=R();r(c,function(a){r(a.getTargetSeriesModels(),function(a){d.set(a.uid,a)})});return d},overallReset:function(b,a){b.eachComponent("dataZoom",function(b){b.eachTargetAxis(function(a,c){b.getAxisProxy(a,c).reset(b)});b.eachTargetAxis(function(c,e){b.getAxisProxy(c,e).filterData(b,a)})});b.eachComponent("dataZoom",function(a){var b=a.findRepresentativeAxisProxy();if(b){var c=b.getDataPercentWindow(),b=b.getDataValueWindow();a.setCalculatedRange({start:c[0],end:c[1],startValue:b[0],endValue:b[1]})}})}},Zw=!1,Qb=function(){return function(){}}(),Bd={},QM=function(b){function a(){var c=null!==b&&b.apply(this,arguments)||this;c.type=a.type;return c}x(a,b);a.prototype.optionUpdated=function(){b.prototype.optionUpdated.apply(this,arguments);var a=this.ecModel;r(this.option.feature,function(b,c){var d=Bd[c];d&&(d.getDefaultOption&&(d.defaultOption=d.getDefaultOption(a)),U(b,d.defaultOption))})};a.type="toolbox";a.layoutMode={type:"box",ignoreSize:!0};a.defaultOption={show:!0,z:6,zlevel:0,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}},tooltip:{show:!1}};return a}(W),RM=function(b){function a(){return null!==b&&b.apply(this,arguments)||this}x(a,b);a.prototype.render=function(a,b,e,f){function c(c,g){var h=p[c],k=p[g],l=m[h],q=new la(l,a,a.ecModel);f&&null!=f.newTitle&&f.featureName===h&&(l.title=f.newTitle);if(h&&!k){if(0===h.indexOf("my"))l={onclick:q.option.onclick,featureName:h};else{l=Bd[h];if(!l)return;l=new l}n[h]=l}else if(l=n[k],!l)return;l.uid=$e("toolbox-feature");l.model=q;l.ecModel=b;l.api=e;if(l instanceof Qb){if(!h&&k){l.dispose&&l.dispose(b,e);return}if(!q.get("show")||l.unusable){l.remove&&l.remove(b,e);return}}d(q,l,h);q.setIconStatus=function(a,b){var c=this.option,d=this.iconPaths;c.iconStatus=c.iconStatus||{};c.iconStatus[a]=b;d[a]&&("emphasis"===b?nc:oc)(d[a])};l instanceof Qb&&l.render&&l.render(q,b,e,f)}function d(c,d,f){var g=c.getModel("iconStyle"),h=c.getModel(["emphasis","iconStyle"]),m=d instanceof Qb&&d.getIcons?d.getIcons():c.get("icon"),n=c.get("title")||{},p,q;"string"===typeof m?(p={},p[f]=m):p=m;"string"===typeof n?(q={},q[f]=n):q=n;var t=c.iconPaths={};r(p,function(f,m){var n=Ze(f,{},{x:-l/2,y:-l/2,width:l,height:l});n.setStyle(g.getItemStyle());n.ensureState("emphasis").style=h.getItemStyle();var p=new ha({style:{text:q[m],align:h.get("textAlign"),borderRadius:h.get("textBorderRadius"),padding:h.get("textPadding"),fill:null},ignore:!0});n.setTextContent(p);var r=a.getModel("tooltip");r&&r.get("show")&&(n.tooltip=F({content:q[m],formatter:r.get("formatter",!0)||function(){return q[m]},formatterParams:{componentType:"toolbox",name:m,title:q[m],$vars:["name","title"]},position:r.get("position",!0)||"bottom"},r.option));n.__title=q[m];n.on("mouseover",function(){var b=h.getItemStyle(),c="vertical"===a.get("orient")?null==a.get("right")?"right":"left":null==a.get("bottom")?"bottom":"top";p.setStyle({fill:h.get("textFill")||b.fill||b.stroke||"#000",backgroundColor:h.get("textBackgroundColor")});n.setTextConfig({position:h.get("textPosition")||c});p.ignore=!a.get("showTitle");nc(this)}).on("mouseout",function(){"emphasis"!==c.get(["iconStatus",m])&&oc(this);p.hide()});("emphasis"===c.get(["iconStatus",m])?nc:oc)(n);k.add(n);n.on("click",I(d.onclick,d,b,e,m));t[m]=n})}var k=this.group;k.removeAll();if(a.get("show")){var l=+a.get("itemSize"),m=a.get("feature")||{},n=this._features||(this._features={}),p=[];r(m,function(a,b){p.push(b)});(new sd(this._featureNames||[],p)).add(c).update(c).remove(P(c,null)).execute();this._featureNames=p;OG(k,a,e);k.add($w(k.getBoundingRect(),a));k.eachChild(function(a){var b=a.__title,c=a.ensureState("emphasis"),c=c.textConfig||(c.textConfig={}),d=a.getTextContent();if((d=d&&d.states.emphasis)&&!fa(d)&&b){var d=d.style||(d.style={}),b=$f(b,ha.makeFont(d)),f=a.x+k.x,g=!1;a.y+k.y+l+b.height>e.getHeight()&&(c.position="top",g=!0);a=g?-5-b.height:l+8;f+b.width/2>e.getWidth()?(c.position=["100%",a],d.align="right"):0>f-b.width/2&&(c.position=[0,a],d.align="left")}})}};a.prototype.updateView=function(a,b,e,f){r(this._features,function(a){a instanceof Qb&&a.updateView&&a.updateView(a.model,b,e,f)})};a.prototype.remove=function(a,b){r(this._features,function(c){c instanceof Qb&&c.remove&&c.remove(a,b)});this.group.removeAll()};a.prototype.dispose=function(a,b){r(this._features,function(c){c instanceof Qb&&c.dispose&&c.dispose(a,b)})};a.type="toolbox";return a}(na),Nz=function(b){function a(){return null!==b&&b.apply(this,arguments)||this}x(a,b);a.prototype.onclick=function(a,b){var c=this.model,d=c.get("name")||a.get("title.0.text")||"echarts",g="svg"===b.getZr().painter.getType(),h=g?"svg":c.get("type",!0)||"png",k=b.getConnectedDataURL({type:h,backgroundColor:c.get("backgroundColor",!0)||a.get("backgroundColor")||"#fff",connectedBackgroundColor:c.get("connectedBackgroundColor"),excludeComponents:c.get("excludeComponents"),pixelRatio:c.get("pixelRatio")});if("function"!==typeof MouseEvent||!X.browser.newEdge&&(X.browser.ie||X.browser.edge))if(window.navigator.msSaveOrOpenBlob||g)if(c=k.split(","),k=-1c?b-(h+e):b+e),null!=f&&(t=t+k+f>d?t-(k+f):t+f),b=[b,t];e=b[0];f=b[1]}p&&(e-="center"===p||"middle"===p?n[0]/2:"right"===p?n[0]:0);q&&(f-="center"===q||"middle"===q?n[1]/2:"bottom"===q?n[1]:0);fx(a)&&(a=e,n=f,q=g.getOuterSize(),p=q.width,q=q.height,a=Math.min(a+p,c)-p,n=Math.min(n+q,d)-q,a=Math.max(a,0),n=Math.max(n,0),b=[a,n],e=b[0],f=b[1]);g.moveTo(e,f)};a.prototype._updateContentNotChangedOnAxis=function(a){var b=this._lastDataByCoordSys,c=!!b&&b.length===a.length;c&&r(b,function(b,d){var e=b.dataByAxis||[],f=(a[d]||{}).dataByAxis||[];(c=c&&e.length===f.length)&&r(e,function(a,b){var d=f[b]||{},e=a.seriesDataIndices||[],g=d.seriesDataIndices||[];(c=c&&a.value===d.value&&a.axisType===d.axisType&&a.axisId===d.axisId&&e.length===g.length)&&r(e,function(a,b){var d=g[b];c=c&&a.seriesIndex===d.seriesIndex&&a.dataIndex===d.dataIndex})})});this._lastDataByCoordSys=a;return!!c};a.prototype._hide=function(a){this._lastDataByCoordSys=null;a({type:"hideTip",from:this.uid})};a.prototype.dispose=function(a,b){X.node||(this._tooltipContent.dispose(),Xn("itemTooltip",b))};a.type="tooltip";return a}(na),fH=["rect","polygon","keep","clear"],lx=r,nx={lineX:ox(0),lineY:ox(1),rect:{point:function(b,a,c){return b&&c.boundingRect.contain(b[0],b[1])},rect:function(b,a,c){return b&&c.boundingRect.intersect(b)}},polygon:{point:function(b,a,c){return b&&c.boundingRect.contain(b[0],b[1])&&$d(c.range,b[0],b[1])},rect:function(b,a,c){a=c.range;if(!b||1>=a.length)return!1;c=b.x;var d=b.y,e=b.width,f=b.height,g=a[0];if($d(a,c,d)||$d(a,c+e,d)||$d(a,c,d+f)||$d(a,c+e,d+f)||aa.create(b).contain(g[0],g[1])||kg(c,d,c+e,d,a)||kg(c,d,c,d+f,a)||kg(c+e,d,c+e,d+f,a)||kg(c,d+f,c+e,d+f,a))return!0}}},rx=["inBrush","outOfBrush"],lH={rect:function(b){return sx(b.range)},polygon:function(b){var a;b=b.range;for(var c=0,d=b.length;ca[0][1]&&(a[0][1]=e[0]);e[1]a[1][1]&&(a[1][1]=e[1])}return a&&sx(a)}},cN=function(b){function a(){var c=null!==b&&b.apply(this,arguments)||this;c.type=a.type;return c}x(a,b);a.prototype.init=function(a,b){this.ecModel=a;this.api=b;this.model;(this._brushController=new vp(b.getZr())).on("brush",I(this._onBrush,this)).mount()};a.prototype.render=function(a,b,e,f){this.model=a;this._updateController(a,b,e,f)};a.prototype.updateTransform=function(a,b,e,f){px(b);this._updateController(a,b,e,f)};a.prototype.updateVisual=function(a,b,e,f){this.updateTransform(a,b,e,f)};a.prototype.updateView=function(a,b,e,f){this._updateController(a,b,e,f)};a.prototype._updateController=function(a,b,e,f){f&&f.$from===a.id||this._brushController.setPanels(a.brushTargetManager.makePanelOpts(e)).enableBrush(a.brushOption).updateCovers(a.areas.slice())};a.prototype.dispose=function(){this._brushController.dispose()};a.prototype._onBrush=function(a){var b=this.model.id,c=this.model.brushTargetManager.setOutputRanges(a.areas,this.ecModel);a.isEnd&&!a.removeOnClick||this.api.dispatchAction({type:"brush",brushId:b,areas:J(c),$from:b});a.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:b,areas:J(c),$from:b})};a.type="brush";return a}(na),dN=function(b){function a(){var c=null!==b&&b.apply(this,arguments)||this;c.type=a.type;c.areas=[];c.brushOption={};return c}x(a,b);a.prototype.optionUpdated=function(a,b){var c=this.option;!b&&mx(c,a,["inBrush","outOfBrush"]);var d=c.inBrush=c.inBrush||{};c.outOfBrush=c.outOfBrush||{color:"#ddd"};d.hasOwnProperty("liftZ")||(d.liftZ=5)};a.prototype.setAreas=function(a){O(A(a));r(a,function(a){O(a.brushType,"Illegal areas")});a&&(this.areas=C(a,function(a){return tx(this.option,a)},this))};a.prototype.setBrushOption=function(a){this.brushOption=tx(this.option,a);this.brushType=this.brushOption.brushType};a.type="brush";a.dependencies="geo grid xAxis yAxis parallel series".split(" ");a.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(210,219,238,0.3)",borderColor:"#D2DBEE"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1E4};return a}(W),eN="rect polygon lineX lineY keep clear".split(" "),fN=function(b){function a(){return null!==b&&b.apply(this,arguments)||this}x(a,b);a.prototype.render=function(a,b,e){var c,d,h;b.eachComponent({mainType:"brush"},function(a){c=a.brushType;d=a.brushOption.brushMode||"single";h=h||!!a.areas.length});this._brushType=c;this._brushMode=d;r(a.get("type",!0),function(b){a.setIconStatus(b,("keep"===b?"multiple"===d:"clear"===b?h:b===c)?"emphasis":"normal")})};a.prototype.updateView=function(a,b,e){this.render(a,b,e)};a.prototype.getIcons=function(){var a=this.model,b=a.get("icon",!0),e={};r(a.get("type",!0),function(a){b[a]&&(e[a]=b[a])});return e};a.prototype.onclick=function(a,b,e){a=this._brushType;var c=this._brushMode;"clear"===e?(b.dispatchAction({type:"axisAreaSelect",intervals:[]}),b.dispatchAction({type:"brush",command:"clear",areas:[]})):b.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"keep"===e?a:a===e?!1:e,brushMode:"keep"===e?"multiple"===c?"single":"multiple":c}})};a.getDefaultOption=function(a){return{show:!0,type:eN.slice(),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:a.getLocale(["toolbox","brush","title"])}};return a}(Qb),gN=function(b){function a(){var c=null!==b&&b.apply(this,arguments)||this;c.type=a.type;c.layoutMode={type:"box",ignoreSize:!0};return c}x(a,b);a.type="title";a.defaultOption={zlevel:0,z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:"#464646"},subtextStyle:{fontSize:12,color:"#6E7079"}};return a}(W),hN=function(b){function a(){var c=null!==b&&b.apply(this,arguments)||this;c.type=a.type;return c}x(a,b);a.prototype.render=function(a,b,e){this.group.removeAll();if(a.get("show")){b=this.group;var c=a.getModel("textStyle"),d=a.getModel("subtextStyle"),h=a.get("textAlign"),k=ka(a.get("textBaseline"),a.get("textVerticalAlign")),c=new ha({style:Ja(c,{text:a.get("text"),fill:c.getTextColor()},{disableBox:!0}),z2:10}),l=c.getBoundingRect(),m=a.get("subtext"),d=new ha({style:Ja(d,{text:m,fill:d.getTextColor(),y:l.height+a.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),n=a.get("link"),p=a.get("sublink"),l=a.get("triggerEvent",!0);c.silent=!n&&!l;d.silent=!p&&!l;if(n)c.on("click",function(){Ai(n,"_"+a.get("target"))});if(p)d.on("click",function(){Ai(p,"_"+a.get("subtarget"))});S(c).eventData=S(d).eventData=l?{componentType:"title",componentIndex:a.componentIndex}:null;b.add(c);m&&b.add(d);m=b.getBoundingRect();l=a.getBoxLayoutParams();l.width=m.width;l.height=m.height;e=Aa(l,{width:e.getWidth(),height:e.getHeight()},a.get("padding"));h||(h=a.get("left")||a.get("right"),"middle"===h&&(h="center"),"right"===h?e.x+=e.width:"center"===h&&(e.x+=e.width/2));k||(k=a.get("top")||a.get("bottom"),"center"===k&&(k="middle"),"bottom"===k?e.y+=e.height:"middle"===k&&(e.y+=e.height/2),k=k||"top");b.x=e.x;b.y=e.y;b.markRedraw();h={align:h,verticalAlign:k};c.setStyle(h);d.setStyle(h);m=b.getBoundingRect();e=e.margin;h=a.getItemStyle(["color","opacity"]);h.fill=a.get("backgroundColor");e=new Z({shape:{x:m.x-e[3],y:m.y-e[0],width:m.width+e[1]+e[3],height:m.height+e[0]+e[2],r:a.get("borderRadius")},style:h,subPixelOptimize:!0,silent:!0});b.add(e)}};a.type="title";return a}(na),Uz=function(b){function a(){var c=null!==b&&b.apply(this,arguments)||this;c.type=a.type;c.layoutMode="box";return c}x(a,b);a.prototype.init=function(a,b,e){this.mergeDefaultAndTheme(a,e);this._initData()};a.prototype.mergeOption=function(a){b.prototype.mergeOption.apply(this,arguments);this._initData()};a.prototype.setCurrentIndex=function(a){null==a&&(a=this.option.currentIndex);var b=this._data.count();this.option.loop?a=(a%b+b)%b:(a>=b&&(a=b-1),0>a&&(a=0));this.option.currentIndex=a};a.prototype.getCurrentIndex=function(){return this.option.currentIndex};a.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1};a.prototype.setPlayState=function(a){this.option.autoPlay=!!a};a.prototype.getPlayState=function(){return!!this.option.autoPlay};a.prototype._initData=function(){var a=this.option,b=a.data||[],a=a.axisType,e=this._names=[],f;"category"===a?(f=[],r(b,function(a,b){var c=Ea(bg(a),""),d;N(a)?(d=J(a),d.value=b):d=b;f.push(d);e.push(c)})):f=b;(this._data=new Wa([{name:"value",type:{category:"ordinal",time:"time",value:"number"}[a]||"number"}],this)).initData(f,e)};a.prototype.getData=function(){return this._data};a.prototype.getCategories=function(){if("category"===this.get("axisType"))return this._names.slice()};a.type="timeline";a.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:[]};return a}(W),Vz=function(b){function a(){var c=null!==b&&b.apply(this,arguments)||this;c.type=a.type;return c}x(a,b);a.type="timeline.slider";a.defaultOption=ed(Uz.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:"#DAE1F5"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#A4B1D7"},itemStyle:{color:"#A4B1D7",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:15,color:"#316bf3",borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0, 0, 0, 0.3)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,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:"M2,18.5A1.52,1.52,0,0,1,.92,18a1.49,1.49,0,0,1,0-2.12L7.81,9.36,1,3.11A1.5,1.5,0,1,1,3,.89l8,7.34a1.48,1.48,0,0,1,.49,1.09,1.51,1.51,0,0,1-.46,1.1L3,18.08A1.5,1.5,0,0,1,2,18.5Z",prevIcon:"M10,.5A1.52,1.52,0,0,1,11.08,1a1.49,1.49,0,0,1,0,2.12L4.19,9.64,11,15.89a1.5,1.5,0,1,1-2,2.22L1,10.77A1.48,1.48,0,0,1,.5,9.68,1.51,1.51,0,0,1,1,8.58L9,.92A1.5,1.5,0,0,1,10,.5Z",prevBtnSize:18,nextBtnSize:18,color:"#A4B1D7",borderColor:"#A4B1D7",borderWidth:1},emphasis:{label:{show:!0,color:"#6f778d"},itemStyle:{color:"#316BF3"},controlStyle:{color:"#316BF3",borderColor:"#316BF3",borderWidth:2}},progress:{lineStyle:{color:"#316BF3"},itemStyle:{color:"#316BF3"},label:{color:"#6f778d"}},data:[]});return a}(Uz);wa(Vz,Qo.prototype);var iN=function(b){function a(){var c=null!==b&&b.apply(this,arguments)||this;c.type=a.type;return c}x(a,b);a.type="timeline";return a}(na),jN=function(b){function a(a,d,e,f){a=b.call(this,a,d,e)||this;a.type=f||"value";return a}x(a,b);a.prototype.getLabelModel=function(){return this.model.getModel("label")};a.prototype.isHorizontal=function(){return"horizontal"===this.model.get("orient")};return a}(Pb),Fp=Math.PI,Wz=ma(),kN=function(b){function a(){var c=null!==b&&b.apply(this,arguments)||this;c.type=a.type;return c}x(a,b);a.prototype.init=function(a,b){this.api=b};a.prototype.render=function(a,b,e){this.model=a;this.api=e;this.ecModel=b;this.group.removeAll();if(a.get("show",!0)){var c=this._layout(a,e),d=this._createGroup("_mainGroup");b=this._createGroup("_labelGroup");var h=this._axis=this._createAxis(c,a);a.formatTooltip=function(a){a=h.scale.getLabel({value:a});return Ha("nameValue",{noName:!0,value:a})};r(["AxisLine","AxisTick","Control","CurrentPointer"],function(b){this["_render"+b](c,d,h,a)},this);this._renderAxisLabel(c,b,h,a);this._position(c,a)}this._doPlayStop();this._updateTicksStatus()};a.prototype.remove=function(){this._clearTimer();this.group.removeAll()};a.prototype.dispose=function(){this._clearTimer()};a.prototype._layout=function(a,b){var c=a.get(["label","position"]),d=a.get("orient"),g;g=Aa(a.getBoxLayoutParams(),{width:b.getWidth(),height:b.getHeight()},a.get("padding"));var c=null==c||"auto"===c?"horizontal"===d?g.y+g.height/2d[1]&&(c=d[1]);ce[g],w=[-q.x,-q.y];b||(w[f]=c[l]);var v=[0,0];l=[-t.x,-t.y];b=ka(a.get("pageButtonGap",!0),a.get("itemGap",!0));r&&("end"===a.get("pageButtonPosition",!0)?l[f]+=e[g]-t[g]:v[f]+=t[g]+b);l[1-f]+=q[h]/2-t[h]/2;c.setPosition(w);d.setPosition(v);p.setPosition(l);w={x:0,y:0};w[g]=r?e[g]:q[g];w[h]=Math.max(q[h],t[h]);w[k]=Math.min(0,t[k]+l[1-f]);d.__rectSize=e[g];r?(f={x:0,y:0},f[g]=Math.max(e[g]-t[g]-b,0),f[h]=w[h],d.setClipPath(new Z({shape:f})),d.__rectSize=f[g]):p.eachChild(function(a){a.attr({invisible:!0,silent:!0})});e=this._getPageInfo(a);null!=e.pageIndex&&ea(c,{x:e.contentPosition[0],y:e.contentPosition[1]},r?a:null);this._updatePageInfoView(a,e);return w};a.prototype._pageGo=function(a,b,e){a=this._getPageInfo(b)[a];null!=a&&e.dispatchAction({type:"legendScroll",scrollDataIndex:a,legendId:b.id})};a.prototype._updatePageInfoView=function(a,b){var c=this._controllerGroup;r(["pagePrev","pageNext"],function(d){var e=null!=b[d+"DataIndex"];if(d=c.childOfName(d))d.setStyle("fill",e?a.get("pageIconColor",!0):a.get("pageIconInactiveColor",!0)),d.cursor=e?"pointer":"default"});var d=c.childOfName("pageText"),g=a.get("pageFormatter"),h=b.pageIndex,h=null!=h?h+1:0,k=b.pageCount;d&&g&&d.setStyle("text",da(g)?g.replace("{current}",null==h?"":h+"").replace("{total}",null==k?"":k+""):g({current:h,total:k}))};a.prototype._getPageInfo=function(a){function b(a){if(a){var b=a.getBoundingRect(),c=b[m]+a[m];return{s:c,e:c+b[l],i:a.__legendDataIndex}}}function c(a,b){return a.e>=b&&a.s<=b+h}var f=a.get("scrollDataIndex",!0),g=this.getContentGroup(),h=this._containerGroup.__rectSize,k=a.getOrient().index,l=Jp[k],m=Kp[k],f=this._findTargetItemIndex(f);a=g.children();var n=a[f],p=a.length,q=p?1:0,g={contentPosition:[g.x,g.y],pageCount:q,pageIndex:q-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!n)return g;n=b(n);g.contentPosition[k]=-n.s;for(var k=f+1,t=q=n,r=null;k<=p;++k){r=b(a[k]);if(!r&&t.e>q.s+h||r&&!c(r,q.s))if(q=t.i>q.i?t:r)null==g.pageNextDataIndex&&(g.pageNextDataIndex=q.i),++g.pageCount;t=r}k=f-1;t=q=n;for(r=null;-1<=k;--k)r=b(a[k]),r&&c(t,r.s)||!(q.ie;e++)g=a(1===e),this._displayables.sliderGroup.add(g),this._displayables.dataShadowSegs.push(g)}}};a.prototype._prepareDataShadowInfo=function(){var a=this.dataZoomModel,b=a.get("showDataShadow");if(!1!==b){var e,f=this.ecModel;a.eachTargetAxis(function(c,d){var g=a.getAxisProxy(c,d).getTargetSeriesModels();r(g,function(a){if(!(e||!0!==b&&0>ba(rN,a.get("type")))){var g=f.getComponent(td(c),d).axis,h;h={x:"y",y:"x",radius:"angle",angle:"radius"}[c];var k,l=a.coordinateSystem;null!=h&&l.getOtherAxis&&(k=l.getOtherAxis(g).inverse);h=a.getData().mapDimension(h);e={thisAxis:g,series:a,thisDim:c,otherDim:h,otherAxisInverse:k}}},this)},this);return e}};a.prototype._renderHandle=function(){var a=this.group,b=this._displayables,e=b.handles=[null,null],f=b.handleLabels=[null,null],g=this._displayables.sliderGroup,h=this._size,k=this.dataZoomModel,l=this.api,m=k.get("borderRadius")||0,n=k.get("brushSelect"),p=b.filler=new Mh({silent:n,style:{fill:k.get("fillerColor")},textConfig:{position:"inside"}});g.add(p);g.add(new Mh({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:h[0],height:h[1],r:m},style:{stroke:k.get("dataBackgroundColor")||k.get("borderColor"),lineWidth:1,fill:"rgba(0,0,0,0)"}}));r([0,1],function(b){var c=k.get("handleIcon");!Xj[c]&&0>c.indexOf("path://")&&(c="path://"+c,Vb("handleIcon now needs 'path://' prefix when using a path string"));c=Pa(c,-1,0,2,2,null,!0);c.attr({cursor:Mx(this._orient),draggable:!0,drift:I(this._onDragMove,this,b),ondragend:I(this._onDragEnd,this),onmouseover:I(this._showDataInfo,this,!0),onmouseout:I(this._showDataInfo,this,!1),z2:5});var d=c.getBoundingRect(),h=k.get("handleSize");this._handleHeight=H(h,this._size[1]);this._handleWidth=d.width/d.height*this._handleHeight;c.setStyle(k.getModel("handleStyle").getItemStyle());c.style.strokeNoScale=!0;c.rectHover=!0;c.ensureState("emphasis").style=k.getModel(["emphasis","handleStyle"]).getItemStyle();va(c);d=k.get("handleColor");null!=d&&(c.style.fill=d);g.add(e[b]=c);c=k.getModel("textStyle");a.add(f[b]=new ha({silent:!0,invisible:!0,style:{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:c.getTextColor(),font:c.getFont()},z2:10}))},this);if(n){var n=H(k.get("moveHandleSize"),h[1]),q=b.moveHandle=new Z({style:k.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:h[1]-.5,height:n}}),m=.8*n,m=b.moveHandleIcon=Pa(k.get("moveHandleIcon"),-m/2,-m/2,m,m,"#fff",!0);m.silent=!0;m.y=h[1]+n/2-.5;q.ensureState("emphasis").style=k.getModel(["emphasis","moveHandleStyle"]).getItemStyle();p=Math.min(h[1]/2,Math.max(n,10));p=b.moveZone=new Z({invisible:!0,shape:{y:h[1]-p,height:n+p}});p.on("mouseover",function(){l.enterEmphasis(q)}).on("mouseout",function(){l.leaveEmphasis(q)});g.add(q);g.add(m);g.add(p)}p.attr({draggable:!0,cursor:Mx(this._orient),drift:I(this._onDragMove,this,"all"),ondragstart:I(this._showDataInfo,this,!0),ondragend:I(this._onDragEnd,this),onmouseover:I(this._showDataInfo,this,!0),onmouseout:I(this._showDataInfo,this,!1)})};a.prototype._resetInterval=function(){var a=this._range=this.dataZoomModel.getPercentRange(),b=this._getViewExtent();this._handleEnds=[ga(a[0],[0,100],b,!0),ga(a[1],[0,100],b,!0)]};a.prototype._updateInterval=function(a,b){var c=this.dataZoomModel,d=this._handleEnds,g=this._getViewExtent(),h=c.findRepresentativeAxisProxy().getMinMaxSpan(),k=[0,100];fe(b,d,g,c.get("zoomLock")?"all":a,null!=h.minSpan?ga(h.minSpan,k,g,!0):null,null!=h.maxSpan?ga(h.maxSpan,k,g,!0):null);c=this._range;d=this._range=Cb([ga(d[0],g,k,!0),ga(d[1],g,k,!0)]);return!c||c[0]!==d[0]||c[1]!==d[1]};a.prototype._updateView=function(a){var b=this._displayables,c=this._handleEnds,f=Cb(c.slice()),g=this._size;r([0,1],function(a){var d=this._handleHeight;b.handles[a].attr({scaleX:d/2,scaleY:d/2,x:c[a]+(a?-1:1),y:g[1]/2-d/2})},this);b.filler.setShape({x:f[0],y:0,width:f[1]-f[0],height:g[1]});var h={x:f[0],width:f[1]-f[0]};b.moveHandle&&(b.moveHandle.setShape(h),b.moveZone.setShape(h),b.moveZone.getBoundingRect(),b.moveHandleIcon&&b.moveHandleIcon.attr("x",h.x+h.width/2));for(var h=b.dataShadowSegs,f=[0,f[0],f[1],g[0]],k=0;ka[0]||a[0]>b[0]||0>a[1]||a[1]>b[1]||(b=this._handleEnds,b=this._updateInterval("all",a[0]-(b[0]+b[1])/2),this._updateView(),b&&this._dispatchZoomAction(!1))};a.prototype._onBrushStart=function(a){this._brushStart=new V(a.offsetX,a.offsetY);this._brushing=!0;this._brushStartTime=+new Date};a.prototype._onBrushEnd=function(a){if(this._brushing&&(a=this._displayables.brushRect,this._brushing=!1,a&&(a.attr("ignore",!0),a=a.shape,!(200>+new Date-this._brushStartTime&&5>Math.abs(a.width))))){var b=this._getViewExtent(),c=[0,100];this._range=Cb([ga(a.x,b,c,!0),ga(a.x+a.width,b,c,!0)]);this._handleEnds=[a.x,a.x+a.width];this._updateView();this._dispatchZoomAction(!1)}};a.prototype._onBrush=function(a){this._brushing&&(Bc(a.event),this._updateBrushRect(a.offsetX,a.offsetY))};a.prototype._updateBrushRect=function(a,b){var c=this._displayables,d=this.dataZoomModel,g=c.brushRect;g||(g=c.brushRect=new Mh({silent:!0,style:d.getModel("brushStyle").getItemStyle()}),c.sliderGroup.add(g));g.attr("ignore",!1);var d=this._brushStart,h=this._displayables.sliderGroup,c=h.transformCoordToLocal(a,b),d=h.transformCoordToLocal(d.x,d.y),h=this._size;c[0]=Math.max(Math.min(h[0],c[0]),0);g.setShape({x:d[0],y:0,width:c[0]-d[0],height:h[1]})};a.prototype._dispatchZoomAction=function(a){var b=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:a?sN:null,start:b[0],end:b[1]})};a.prototype._findCoordRect=function(){var a,b=Xw(this.dataZoomModel).infoList;!a&&b.length&&(a=b[0].model.coordinateSystem,a=a.getRect&&a.getRect());a||(a=this.api.getWidth(),b=this.api.getHeight(),a={x:.2*a,y:.2*b,width:.6*a,height:.6*b});return a};a.type="dataZoom.slider";return a}(Cp),Yz={get:function(b,a,c){b=J((tN[b]||{})[a]);return c?A(b)?b[b.length-1]:b:b}},tN={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}},Zz=La.mapVisual,uN=La.eachVisual,vN=A,pk=function(b){function a(){var c=null!==b&&b.apply(this,arguments)||this;c.type=a.type;c.stateList=["inRange","outOfRange"];c.replacableOptionKeys=["inRange","outOfRange","target","controller","color"];c.layoutMode={type:"box",ignoreSize:!0};c.dataBound=[-Infinity,Infinity];c.targetVisuals={};c.controllerVisuals={};return c}x(a,b);a.prototype.init=function(a,b,e){this.mergeDefaultAndTheme(a,e)};a.prototype.optionUpdated=function(a,b){var c=this.option;X.canvasSupported||(c.realtime=!1);!b&&mx(c,a,this.replacableOptionKeys);this.textStyleModel=this.getModel("textStyle");this.resetItemSize();this.completeVisualOption()};a.prototype.resetVisual=function(a){var b=this.stateList;a=I(a,this);this.controllerVisuals=io(this.option.controller,b,a);this.targetVisuals=io(this.option.target,b,a)};a.prototype.getTargetSeriesIndices=function(){var a=this.option.seriesIndex,b=[];null==a||"all"===a?this.ecModel.eachSeries(function(a,c){b.push(c)}):b=xa(a);return b};a.prototype.eachTargetSeries=function(a,b){r(this.getTargetSeriesIndices(),function(c){(c=this.ecModel.getSeriesByIndex(c))&&a.call(b,c)},this)};a.prototype.isTargetSeries=function(a){var b=!1;this.eachTargetSeries(function(c){c===a&&(b=!0)});return b};a.prototype.formatValueText=function(a,b,e){function c(a){return a===k[0]?"min":a===k[1]?"max":(+a).toFixed(Math.min(h,20))}var d=this.option,h=d.precision,k=this.dataBound,d=d.formatter,l;e=e||["\x3c","\x3e"];A(a)&&(a=a.slice(),l=!0);b=b?a:l?[c(a[0]),c(a[1])]:c(a);return da(d)?d.replace("{value}",l?b[0]:b).replace("{value2}",l?b[1]:b):fa(d)?l?d(a[0],a[1]):d(a):l?a[0]===k[0]?e[0]+" "+b[1]:a[1]===k[1]?e[1]+" "+b[0]:b[0]+" - "+b[1]:b};a.prototype.resetExtent=function(){var a=this.option;this._dataExtent=Cb([a.min,a.max])};a.prototype.getDataDimension=function(a){var b=this.option.dimension,c=a.dimensions;if(null!=b||c.length){if(null!=b)return a.getDimension(b);b=a.dimensions;for(c=b.length-1;0<=c;c--){var f=b[c];if(!a.getDimensionInfo(f).isCalculationCoord)return f}}};a.prototype.getExtent=function(){return this._dataExtent.slice()};a.prototype.completeVisualOption=function(){function a(a){vN(e.color)&&!a.inRange&&(a.inRange={color:e.color.slice().reverse()});a.inRange=a.inRange||{color:b.get("gradientColor")}}var b=this.ecModel,e=this.option,f={inRange:e.inRange,outOfRange:e.outOfRange},g=e.target||(e.target={}),h=e.controller||(e.controller={});U(g,f);U(h,f);var k=this.isCategory();a.call(this,g);a.call(this,h);(function(a,b,c){b=a[b];var d=a[c];b&&!d&&(d=a[c]={},r(b,function(a,b){if(La.isValidType(b)){var c=Yz.get(b,"inactive",k);null!=c&&(d[b]=c,"color"!==b||d.hasOwnProperty("opacity")||d.hasOwnProperty("colorAlpha")||(d.opacity=[0,0]))}}))}).call(this,g,"inRange","outOfRange");(function(a){var b=(a.inRange||{}).symbol||(a.outOfRange||{}).symbol,c=(a.inRange||{}).symbolSize||(a.outOfRange||{}).symbolSize,d=this.get("inactiveColor");r(this.stateList,function(e){var f=this.itemSize,g=a[e];g||(g=a[e]={color:k?d:[d]});null==g.symbol&&(g.symbol=b&&J(b)||(k?"roundRect":["roundRect"]));null==g.symbolSize&&(g.symbolSize=c&&J(c)||(k?f[0]:[f[0],f[0]]));g.symbol=Zz(g.symbol,function(a){return"none"===a||"square"===a?"roundRect":a});e=g.symbolSize;if(null!=e){var h=-Infinity;uN(e,function(a){a>h&&(h=a)});g.symbolSize=Zz(e,function(a){return ga(a,[0,h],[0,f[0]],!0)})}},this)}).call(this,h)};a.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]};a.prototype.isCategory=function(){return!!this.option.categories};a.prototype.setSelected=function(a){};a.prototype.getSelected=function(){return null};a.prototype.getValueState=function(a){return null};a.prototype.getVisualMeta=function(a){return null};a.type="visualMap";a.dependencies=["series"];a.defaultOption={show:!0,zlevel:0,z:4,seriesIndex:"all",min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,textStyle:{color:"#333"}};return a}(W),$z=[20,140],VH=function(b){function a(){var c=null!==b&&b.apply(this,arguments)||this;c.type=a.type;return c}x(a,b);a.prototype.optionUpdated=function(a,d){b.prototype.optionUpdated.apply(this,arguments);this.resetExtent();this.resetVisual(function(a){a.mappingMethod="linear";a.dataExtent=this.getExtent()});this._resetRange()};a.prototype.resetItemSize=function(){b.prototype.resetItemSize.apply(this,arguments);var a=this.itemSize;(null==a[0]||isNaN(a[0]))&&(a[0]=$z[0]);(null==a[1]||isNaN(a[1]))&&(a[1]=$z[1])};a.prototype._resetRange=function(){var a=this.getExtent(),b=this.option.range;!b||b.auto?(a.auto=1,this.option.range=a):A(b)&&(b[0]>b[1]&&b.reverse(),b[0]=Math.max(b[0],a[0]),b[1]=Math.min(b[1],a[1]))};a.prototype.completeVisualOption=function(){b.prototype.completeVisualOption.apply(this,arguments);r(this.stateList,function(a){(a=this.option.controller[a].symbolSize)&&a[0]!==a[1]&&(a[0]=a[1]/3)},this)};a.prototype.setSelected=function(a){this.option.range=a.slice();this._resetRange()};a.prototype.getSelected=function(){var a=this.getExtent(),b=Cb((this.get("range")||[]).slice());b[0]>a[1]&&(b[0]=a[1]);b[1]>a[1]&&(b[1]=a[1]);b[0]=c[1]||a<=b[1])?"inRange":"outOfRange"};a.prototype.findTargetDataIndices=function(a){var b=[];this.eachTargetSeries(function(c){var d=[],e=c.getData();e.each(this.getDataDimension(e),function(b,c){a[0]<=b&&b<=a[1]&&d.push(c)},this);b.push({seriesId:c.id,dataIndex:d})},this);return b};a.prototype.getVisualMeta=function(a){function b(b,c){g.push({value:b,color:a(b,c)})}for(var c=Ox(this,"outOfRange",this.getExtent()),f=Ox(this,"inRange",this.option.range.slice()),g=[],h=0,k=0,l=f.length,m=c.length;kg;g++){var h=a[0]+d*g;if(h>a[1])break;c.push({color:this.getControllerVisual(h,"color",b),offset:g/100})}c.push({color:this.getControllerVisual(a[1],"color",b),offset:1});return c};a.prototype._createBarPoints=function(a,b){var c=this.visualMapModel.itemSize;return[[c[0]-b[0],a[0]],[c[0],a[0]],[c[0],a[1]],[c[0]-b[1],a[1]]]};a.prototype._createBarGroup=function(a){var b=this._orient,c=this.visualMapModel.get("inverse");return new M("horizontal"!==b||c?"horizontal"===b&&c?{scaleX:"bottom"===a?-1:1,rotation:-Math.PI/2}:"vertical"!==b||c?{scaleX:"left"===a?1:-1}:{scaleX:"left"===a?1:-1,scaleY:-1}:{scaleX:"bottom"===a?1:-1,rotation:Math.PI/2})};a.prototype._updateHandle=function(a,b){if(this._useHandle){var c=this._shapes,d=this.visualMapModel,g=c.handleThumbs,h=c.handleLabels,k=d.itemSize,l=d.getExtent();r([0,1],function(e){var f=g[e];f.setStyle("fill",b.handlesColor[e]);f.y=a[e];var m=ga(a[e],[0,k[1]],l,!0),m=this.getControllerVisual(m,"symbolSize");f.scaleX=f.scaleY=m/k[0];f.x=k[0]-m/2;f=Wb(c.handleLabelPoints[e],dd(f,this.group));h[e].setStyle({x:f[0],y:f[1],text:d.formatValueText(this._dataInterval[e]),verticalAlign:"middle",align:"vertical"===this._orient?this._applyTransform("left",c.mainGroup):"center"})},this)}};a.prototype._showIndicator=function(a,b,e,f){var c=this.visualMapModel,d=c.getExtent(),k=c.itemSize,l=[0,k[1]],m=this._shapes;if(f=m.indicator){f.attr("invisible",!1);var n=this.getControllerVisual(a,"color",{convertOpacityToAlpha:!0}),p=this.getControllerVisual(a,"symbolSize"),d=ga(a,d,l,!0),q=k[0]-p/2;a=f.x;k=f.y;f.y=d;f.x=q;l=Wb(m.indicatorLabelPoint,dd(f,this.group));p=m.indicatorLabel;p.attr("invisible",!1);var m=this._applyTransform("left",m.mainGroup),r="horizontal"===this._orient;p.setStyle({text:(e?e:"")+c.formatValueText(b),verticalAlign:r?m:"middle",align:r?"center":m});b={x:q,y:d,style:{fill:n}};e={style:{x:l[0],y:l[1]}};c.ecModel.isAnimationEnabled()&&!this._firstShowIndicator?(c={duration:100,easing:"cubicInOut",additive:!0},f.x=a,f.y=k,f.animateTo(b,c),p.animateTo(e,c)):(f.attr(b),p.attr(e));this._firstShowIndicator=!1;if(f=this._shapes.handleLabels)for(c=0;cd[1]&&(g[1]=Infinity);b&&(-Infinity===g[0]?this._showIndicator(l,g[1],"\x3c ",h):Infinity===g[1]?this._showIndicator(l,g[0],"\x3e ",h):this._showIndicator(l,l,"\u2248 ",h));d=this._hoverLinkDataIndices;h=[];if(b||Sx(c))h=this._hoverLinkDataIndices=c.findTargetDataIndices(g);d=CA(d,h);this._dispatchHighDown("downplay",Aj(d[0],c));this._dispatchHighDown("highlight",Aj(d[1],c))}};a.prototype._hoverLinkFromSeriesMouseOver=function(a){var b=a.target;a=this.visualMapModel;if(b&&null!=S(b).dataIndex){var b=S(b),c=this.ecModel.getSeriesByIndex(b.seriesIndex);a.isTargetSeries(c)&&(c=c.getData(b.dataType),a=c.get(a.getDataDimension(c),b.dataIndex),isNaN(a)||this._showIndicator(a,a))}};a.prototype._hideIndicator=function(){var a=this._shapes;a.indicator&&a.indicator.attr("invisible",!0);a.indicatorLabel&&a.indicatorLabel.attr("invisible",!0);if(a=this._shapes.handleLabels)for(var b=0;bl&&b([l,a[0]],"outOfRange"),b(a.slice()),l=a[1]},this);return{stops:c,outerColors:f}}};a.type="visualMap.piecewise";a.defaultOption=ed(pk.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0});return a}(pk),wN={splitNumber:function(b){var a=this.option,c=Math.min(a.precision,20),d=this.getExtent(),e=a.splitNumber,e=Math.max(parseInt(e,10),1);a.splitNumber=e;for(var f=(d[1]-d[0])/e;+f.toFixed(c)!==f&&5>c;)c++;a.precision=c;f=+f.toFixed(c);a.minOpen&&b.push({interval:[-Infinity,d[0]],close:[0,0]});for(var c=0,g=d[0];cm;m++){for(var n=[["gte","gt","min"],["lte","lt","max"]][m],p=0;3>p&&null==f[m];p++)f[m]=a[n[p]],g[m]=h[p],l[m]=2===p;null==f[m]&&(f[m]=k[m])}l[0]&&Infinity===f[1]&&(g[0]=0);l[1]&&-Infinity===f[0]&&(g[1]=0);f[0]>f[1]&&console.warn("Piece "+d+"is illegal: "+f+" lower bound should not greater then uppper bound.");f[0]===f[1]&&g[0]&&g[1]&&(c.value=f[0])}c.visual=La.retrieveVisuals(a);b.push(c)},this);Yx(a,b);$k(b);r(b,function(a){var b=a.close,b=[["\x3c","\u2264"][b[1]],["\x3e","\u2265"][b[0]]];a.text=a.text||this.formatValueText(null!=a.value?a.value:a.interval,!1,b)},this)}},YH=function(b){function a(){var c=null!==b&&b.apply(this,arguments)||this;c.type=a.type;return c}x(a,b);a.prototype.doRender=function(){var a=this.group;a.removeAll();var b=this.visualMapModel,e=b.get("textGap"),f=b.textStyleModel,g=f.getFont(),h=f.getTextColor(),k=this._getItemAlign(),l=b.itemSize,f=this._getViewData(),m=f.endsText,n=Ba(b.get("showLabel",!0),!m);m&&this._renderEndsText(a,m[0],l,n,k);r(f.viewPieceList,function(c){var d=c.piece,f=new M;f.onclick=I(this._onItemClick,this,d);this._enableHoverLink(f,c.indexInModelPieceList);c=b.getRepresentValue(d);this._createItemSymbol(f,c,[0,0,l[0],l[1]]);n&&(c=this.visualMapModel.getValueState(c),f.add(new ha({style:{x:"right"===k?-e:l[0]+e,y:l[1]/2,text:d.text,verticalAlign:"middle",align:k,font:g,fill:h,opacity:"outOfRange"===c?.5:1}})));a.add(f)},this);m&&this._renderEndsText(a,m[1],l,n,k);me(b.get("orient"),a,b.get("itemGap"));this.renderBackground(a);this.positionGroup(a)};a.prototype._enableHoverLink=function(a,b){var c=this;a.on("mouseover",function(){return d("highlight")}).on("mouseout",function(){return d("downplay")});var d=function(a){var d=c.visualMapModel;d.option.hoverLink&&c.api.dispatchAction({type:a,batch:Aj(d.findTargetDataIndices(b),d)})}};a.prototype._getItemAlign=function(){var a=this.visualMapModel,b=a.option;if("vertical"===b.orient)return Px(a,this.api,a.itemSize);(a=b.align)&&"auto"!==a||(a="left");return a};a.prototype._renderEndsText=function(a,b,e,f,g){if(b){var c=new M,d=this.visualMapModel.textStyleModel;c.add(new ha({style:{x:f?"right"===g?e[0]:0:e[0]/2,y:e[1]/2,verticalAlign:"middle",align:f?g:"center",text:b,font:d.getFont(),fill:d.getTextColor()}}));a.add(c)}};a.prototype._getViewData=function(){var a=this.visualMapModel,b=C(a.getPieceList(),function(a,b){return{piece:a,indexInModelPieceList:b}}),e=a.get("text"),f=a.get("orient"),a=a.get("inverse");("horizontal"===f?a:!a)?b.reverse():e&&(e=e.slice().reverse());return{viewPieceList:b,endsText:e}};a.prototype._createItemSymbol=function(a,b,e){a.add(Pa(this.getControllerVisual(b,"symbol"),e[0],e[1],e[2],e[3],this.getControllerVisual(b,"color")))};a.prototype._onItemClick=function(a){var b=this.visualMapModel,c=b.option,f=J(c.selected),g=b.getSelectedMapKey(a);"single"===c.selectedMode?(f[g]=!0,r(f,function(a,b){f[b]=b===g})):f[g]=!f[g];this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:f})};a.type="visualMap.piecewise";return a}(aA),$H={label:{enabled:!0},decal:{show:!1}},$x=ma(),aI={},dy={value:"eq","\x3c":"lt","\x3c\x3d":"lte","\x3e":"gt","\x3e\x3d":"gte","\x3d":"eq","!\x3d":"ne","\x3c\x3e":"ne"},gI=function(){function b(a){null==(this._condVal=da(a)?new RegExp(a):tk(a)?a:null)&&(a=gb("Illegal regexp",a,"in"),ja(a))}b.prototype.evaluate=function(a){var b=typeof a;return"string"===b?this._condVal.test(a):"number"===b?this._condVal.test(a+""):!1};return b}(),cI=function(){function b(){}b.prototype.evaluate=function(){return this.value};return b}(),iI=function(){function b(){}b.prototype.evaluate=function(){for(var a=this.children,b=0;b