!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.echarts={})}(this,function(t){"use strict";function e(t){var e={},i={},n=t.match(/Firefox\/([\d.]+)/),r=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),o=t.match(/Edge\/([\d.]+)/),a=/micromessenger/i.test(t);return n&&(i.firefox=!0,i.version=n[1]),r&&(i.ie=!0,i.version=r[1]),o&&(i.edge=!0,i.version=o[1]),a&&(i.weChat=!0),{browser:i,os:e,node:!1,canvasSupported:!!document.createElement("canvas").getContext,svgSupported:"undefined"!=typeof SVGRect,touchEventsSupported:"ontouchstart"in window&&!i.ie&&!i.edge,pointerEventsSupported:"onpointerdown"in window&&(i.edge||i.ie&&i.version>=11)}}function i(t,e){xf[t]=e}function n(t){if(null==t||"object"!=typeof t)return t;var e=t,i=df.call(t);if("[object Array]"===i){e=[];for(var r=0,o=t.length;o>r;r++)e[r]=n(t[r])}else if(cf[i]){var a=t.constructor;if(t.constructor.from)e=a.from(t);else{e=new a(t.length);for(var r=0,o=t.length;o>r;r++)e[r]=n(t[r])}}else if(!uf[i]&&!O(t)&&!S(t)){e={};for(var s in t)t.hasOwnProperty(s)&&(e[s]=n(t[s]))}return e}function r(t,e,i){if(!b(e)||!b(t))return i?n(e):t;for(var o in e)if(e.hasOwnProperty(o)){var a=t[o],s=e[o];!b(s)||!b(a)||x(s)||x(a)||S(s)||S(a)||M(s)||M(a)||O(s)||O(a)?!i&&o in t||(t[o]=n(e[o],!0)):r(a,s,i)}return t}function o(t,e){for(var i=t[0],n=1,o=t.length;o>n;n++)i=r(i,t[n],e);return i}function a(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);return t}function s(t,e,i){for(var n in e)e.hasOwnProperty(n)&&(i?null!=e[n]:null==t[n])&&(t[n]=e[n]);return t}function l(){return wf||(wf=_f().getContext("2d")),wf}function h(t,e){if(t){if(t.indexOf)return t.indexOf(e);for(var i=0,n=t.length;n>i;i++)if(t[i]===e)return i}return-1}function u(t,e){function i(){}var n=t.prototype;i.prototype=e.prototype,t.prototype=new i;for(var r in n)t.prototype[r]=n[r];t.prototype.constructor=t,t.superClass=e}function c(t,e,i){t="prototype"in t?t.prototype:t,e="prototype"in e?e.prototype:e,s(t,e,i)}function d(t){return t?"string"==typeof t?!1:"number"==typeof t.length:void 0}function f(t,e,i){if(t&&e)if(t.forEach&&t.forEach===gf)t.forEach(e,i);else if(t.length===+t.length)for(var n=0,r=t.length;r>n;n++)e.call(i,t[n],n,t);else for(var o in t)t.hasOwnProperty(o)&&e.call(i,t[o],o,t)}function g(t,e,i){if(t&&e){if(t.map&&t.map===mf)return t.map(e,i);for(var n=[],r=0,o=t.length;o>r;r++)n.push(e.call(i,t[r],r,t));return n}}function p(t,e,i,n){if(t&&e){if(t.reduce&&t.reduce===yf)return t.reduce(e,i,n);for(var r=0,o=t.length;o>r;r++)i=e.call(n,i,t[r],r,t);return i}}function v(t,e,i){if(t&&e){if(t.filter&&t.filter===pf)return t.filter(e,i);for(var n=[],r=0,o=t.length;o>r;r++)e.call(i,t[r],r,t)&&n.push(t[r]);return n}}function m(t,e){var i=vf.call(arguments,2);return function(){return t.apply(e,i.concat(vf.call(arguments)))}}function y(t){var e=vf.call(arguments,1);return function(){return t.apply(this,e.concat(vf.call(arguments)))}}function x(t){return"[object Array]"===df.call(t)}function _(t){return"function"==typeof t}function w(t){return"[object String]"===df.call(t)}function b(t){var e=typeof t;return"function"===e||!!t&&"object"==e}function M(t){return!!uf[df.call(t)]}function S(t){return"object"==typeof t&&"number"==typeof t.nodeType&&"object"==typeof t.ownerDocument}function I(t){return t!==t}function T(){for(var t=0,e=arguments.length;e>t;t++)if(null!=arguments[t])return arguments[t]}function D(t,e){return null!=t?t:e}function A(t,e,i){return null!=t?t:null!=e?e:i}function C(){return Function.call.apply(vf,arguments)}function L(t){if("number"==typeof t)return[t,t,t,t];var e=t.length;return 2===e?[t[0],t[1],t[0],t[1]]:3===e?[t[0],t[1],t[2],t[1]]:t}function k(t,e){if(!t)throw new Error(e)}function P(t){t[bf]=!0}function O(t){return t[bf]}function z(t){t&&f(t,function(t,e){this.set(e,t)},this)}function R(t){return new z(t)}function N(){}function E(t,e){var i=new If(2);return null==t&&(t=0),null==e&&(e=0),i[0]=t,i[1]=e,i}function V(t,e){return t[0]=e[0],t[1]=e[1],t}function B(t){var e=new If(2);return e[0]=t[0],e[1]=t[1],e}function W(t,e,i){return t[0]=e[0]+i[0],t[1]=e[1]+i[1],t}function H(t,e,i,n){return t[0]=e[0]+i[0]*n,t[1]=e[1]+i[1]*n,t}function F(t,e,i){return t[0]=e[0]-i[0],t[1]=e[1]-i[1],t}function G(t){return Math.sqrt(Z(t))}function Z(t){return t[0]*t[0]+t[1]*t[1]}function X(t,e,i){return t[0]=e[0]*i,t[1]=e[1]*i,t}function q(t,e){var i=G(e);return 0===i?(t[0]=0,t[1]=0):(t[0]=e[0]/i,t[1]=e[1]/i),t}function Y(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}function U(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])}function j(t,e,i){var n=e[0],r=e[1];return t[0]=i[0]*n+i[2]*r+i[4],t[1]=i[1]*n+i[3]*r+i[5],t}function $(t,e,i){return t[0]=Math.min(e[0],i[0]),t[1]=Math.min(e[1],i[1]),t}function K(t,e,i){return t[0]=Math.max(e[0],i[0]),t[1]=Math.max(e[1],i[1]),t}function Q(){this.on("mousedown",this._dragStart,this),this.on("mousemove",this._drag,this),this.on("mouseup",this._dragEnd,this),this.on("globalout",this._dragEnd,this)}function J(t,e){return{target:t,topTarget:e&&e.topTarget}}function te(t,e,i){return{type:t,event:i,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:i.zrX,offsetY:i.zrY,gestureEvent:i.gestureEvent,pinchX:i.pinchX,pinchY:i.pinchY,pinchScale:i.pinchScale,wheelDelta:i.zrDelta,zrByTouch:i.zrByTouch,which:i.which}}function ee(){}function ie(t,e,i){if(t[t.rectHover?"rectContain":"contain"](e,i)){for(var n,r=t;r;){if(r.clipPath&&!r.clipPath.contain(e,i))return!1;r.silent&&(n=!0),r=r.parent}return n?Lf:!0}return!1}function ne(){var t=new Of(6);return re(t),t}function re(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function oe(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function ae(t,e,i){var n=e[0]*i[0]+e[2]*i[1],r=e[1]*i[0]+e[3]*i[1],o=e[0]*i[2]+e[2]*i[3],a=e[1]*i[2]+e[3]*i[3],s=e[0]*i[4]+e[2]*i[5]+e[4],l=e[1]*i[4]+e[3]*i[5]+e[5];return t[0]=n,t[1]=r,t[2]=o,t[3]=a,t[4]=s,t[5]=l,t}function se(t,e,i){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+i[0],t[5]=e[5]+i[1],t}function le(t,e,i){var n=e[0],r=e[2],o=e[4],a=e[1],s=e[3],l=e[5],h=Math.sin(i),u=Math.cos(i);return t[0]=n*u+a*h,t[1]=-n*h+a*u,t[2]=r*u+s*h,t[3]=-r*h+u*s,t[4]=u*o+h*l,t[5]=u*l-h*o,t}function he(t,e,i){var n=i[0],r=i[1];return t[0]=e[0]*n,t[1]=e[1]*r,t[2]=e[2]*n,t[3]=e[3]*r,t[4]=e[4]*n,t[5]=e[5]*r,t}function ue(t,e){var i=e[0],n=e[2],r=e[4],o=e[1],a=e[3],s=e[5],l=i*a-o*n;return l?(l=1/l,t[0]=a*l,t[1]=-o*l,t[2]=-n*l,t[3]=i*l,t[4]=(n*s-a*r)*l,t[5]=(o*r-i*s)*l,t):null}function ce(t){return t>Rf||-Rf>t}function de(t){this._target=t.target,this._life=t.life||1e3,this._delay=t.delay||0,this._initialized=!1,this.loop=null==t.loop?!1:t.loop,this.gap=t.gap||0,this.easing=t.easing||"Linear",this.onframe=t.onframe,this.ondestroy=t.ondestroy,this.onrestart=t.onrestart,this._pausedTime=0,this._paused=!1}function fe(t){return t=Math.round(t),0>t?0:t>255?255:t}function ge(t){return t=Math.round(t),0>t?0:t>360?360:t}function pe(t){return 0>t?0:t>1?1:t}function ve(t){return fe(t.length&&"%"===t.charAt(t.length-1)?parseFloat(t)/100*255:parseInt(t,10))}function me(t){return pe(t.length&&"%"===t.charAt(t.length-1)?parseFloat(t)/100:parseFloat(t))}function ye(t,e,i){return 0>i?i+=1:i>1&&(i-=1),1>6*i?t+(e-t)*i*6:1>2*i?e:2>3*i?t+(e-t)*(2/3-i)*6:t}function xe(t,e,i){return t+(e-t)*i}function _e(t,e,i,n,r){return t[0]=e,t[1]=i,t[2]=n,t[3]=r,t}function we(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function be(t,e){Yf&&we(Yf,e),Yf=qf.put(t,Yf||e.slice())}function Me(t,e){if(t){e=e||[];var i=qf.get(t);if(i)return we(e,i);t+="";var n=t.replace(/ /g,"").toLowerCase();if(n in Xf)return we(e,Xf[n]),be(t,e),e;if("#"!==n.charAt(0)){var r=n.indexOf("("),o=n.indexOf(")");if(-1!==r&&o+1===n.length){var a=n.substr(0,r),s=n.substr(r+1,o-(r+1)).split(","),l=1;switch(a){case"rgba":if(4!==s.length)return void _e(e,0,0,0,1);l=me(s.pop());case"rgb":return 3!==s.length?void _e(e,0,0,0,1):(_e(e,ve(s[0]),ve(s[1]),ve(s[2]),l),be(t,e),e);case"hsla":return 4!==s.length?void _e(e,0,0,0,1):(s[3]=me(s[3]),Se(s,e),be(t,e),e);case"hsl":return 3!==s.length?void _e(e,0,0,0,1):(Se(s,e),be(t,e),e);default:return}}_e(e,0,0,0,1)}else{if(4===n.length){var h=parseInt(n.substr(1),16);return h>=0&&4095>=h?(_e(e,(3840&h)>>4|(3840&h)>>8,240&h|(240&h)>>4,15&h|(15&h)<<4,1),be(t,e),e):void _e(e,0,0,0,1)}if(7===n.length){var h=parseInt(n.substr(1),16);return h>=0&&16777215>=h?(_e(e,(16711680&h)>>16,(65280&h)>>8,255&h,1),be(t,e),e):void _e(e,0,0,0,1)}}}}function Se(t,e){var i=(parseFloat(t[0])%360+360)%360/360,n=me(t[1]),r=me(t[2]),o=.5>=r?r*(n+1):r+n-r*n,a=2*r-o;return e=e||[],_e(e,fe(255*ye(a,o,i+1/3)),fe(255*ye(a,o,i)),fe(255*ye(a,o,i-1/3)),1),4===t.length&&(e[3]=t[3]),e}function Ie(t){if(t){var e,i,n=t[0]/255,r=t[1]/255,o=t[2]/255,a=Math.min(n,r,o),s=Math.max(n,r,o),l=s-a,h=(s+a)/2;if(0===l)e=0,i=0;else{i=.5>h?l/(s+a):l/(2-s-a);var u=((s-n)/6+l/2)/l,c=((s-r)/6+l/2)/l,d=((s-o)/6+l/2)/l;n===s?e=d-c:r===s?e=1/3+u-d:o===s&&(e=2/3+c-u),0>e&&(e+=1),e>1&&(e-=1)}var f=[360*e,i,h];return null!=t[3]&&f.push(t[3]),f}}function Te(t,e){var i=Me(t);if(i){for(var n=0;3>n;n++)i[n]=0>e?i[n]*(1-e)|0:(255-i[n])*e+i[n]|0;return ke(i,4===i.length?"rgba":"rgb")}}function De(t){var e=Me(t);return e?((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1):void 0}function Ae(t,e,i){if(e&&e.length&&t>=0&&1>=t){i=i||[];var n=t*(e.length-1),r=Math.floor(n),o=Math.ceil(n),a=e[r],s=e[o],l=n-r;return i[0]=fe(xe(a[0],s[0],l)),i[1]=fe(xe(a[1],s[1],l)),i[2]=fe(xe(a[2],s[2],l)),i[3]=pe(xe(a[3],s[3],l)),i}}function Ce(t,e,i,n){return t=Me(t),t?(t=Ie(t),null!=e&&(t[0]=ge(e)),null!=i&&(t[1]=me(i)),null!=n&&(t[2]=me(n)),ke(Se(t),"rgba")):void 0}function Le(t,e){return t=Me(t),t&&null!=e?(t[3]=pe(e),ke(t,"rgba")):void 0}function ke(t,e){if(t&&t.length){var i=t[0]+","+t[1]+","+t[2];return("rgba"===e||"hsva"===e||"hsla"===e)&&(i+=","+t[3]),e+"("+i+")"}}function Pe(t,e){return t[e]}function Oe(t,e,i){t[e]=i}function ze(t,e,i){return(e-t)*i+t}function Re(t,e,i){return i>.5?e:t}function Ne(t,e,i,n,r){var o=t.length;if(1==r)for(var a=0;o>a;a++)n[a]=ze(t[a],e[a],i);else for(var s=o&&t[0].length,a=0;o>a;a++)for(var l=0;s>l;l++)n[a][l]=ze(t[a][l],e[a][l],i)}function Ee(t,e,i){var n=t.length,r=e.length;if(n!==r){var o=n>r;if(o)t.length=r;else for(var a=n;r>a;a++)t.push(1===i?e[a]:Uf.call(e[a]))}for(var s=t[0]&&t[0].length,a=0;al;l++)isNaN(t[a][l])&&(t[a][l]=e[a][l])}function Ve(t,e,i){if(t===e)return!0;var n=t.length;if(n!==e.length)return!1;if(1===i){for(var r=0;n>r;r++)if(t[r]!==e[r])return!1}else for(var o=t[0].length,r=0;n>r;r++)for(var a=0;o>a;a++)if(t[r][a]!==e[r][a])return!1;return!0}function Be(t,e,i,n,r,o,a,s,l){var h=t.length;if(1==l)for(var u=0;h>u;u++)s[u]=We(t[u],e[u],i[u],n[u],r,o,a);else for(var c=t[0].length,u=0;h>u;u++)for(var d=0;c>d;d++)s[u][d]=We(t[u][d],e[u][d],i[u][d],n[u][d],r,o,a)}function We(t,e,i,n,r,o,a){var s=.5*(i-t),l=.5*(n-e);return(2*(e-i)+s+l)*a+(-3*(e-i)-2*s-l)*o+s*r+e}function He(t){if(d(t)){var e=t.length;if(d(t[0])){for(var i=[],n=0;e>n;n++)i.push(Uf.call(t[n]));return i}return Uf.call(t)}return t}function Fe(t){return t[0]=Math.floor(t[0]),t[1]=Math.floor(t[1]),t[2]=Math.floor(t[2]),"rgba("+t.join(",")+")"}function Ge(t){var e=t[t.length-1].value;return d(e&&e[0])?2:1}function Ze(t,e,i,n,r,o){var a=t._getter,s=t._setter,l="spline"===e,h=n.length;if(h){var u,c=n[0].value,f=d(c),g=!1,p=!1,v=f?Ge(n):0;n.sort(function(t,e){return t.time-e.time}),u=n[h-1].time;for(var m=[],y=[],x=n[0].value,_=!0,w=0;h>w;w++){m.push(n[w].time/u);var b=n[w].value;if(f&&Ve(b,x,v)||!f&&b===x||(_=!1),x=b,"string"==typeof b){var M=Me(b);M?(b=M,g=!0):p=!0}y.push(b)}if(o||!_){for(var S=y[h-1],w=0;h-1>w;w++)f?Ee(y[w],S,v):!isNaN(y[w])||isNaN(S)||p||g||(y[w]=S);f&&Ee(a(t._target,r),S,v);var I,T,D,A,C,L,k=0,P=0;if(g)var O=[0,0,0,0];var z=function(t,e){var i;if(0>e)i=0;else if(P>e){for(I=Math.min(k+1,h-1),i=I;i>=0&&!(m[i]<=e);i--);i=Math.min(i,h-2)}else{for(i=k;h>i&&!(m[i]>e);i++);i=Math.min(i-1,h-2)}k=i,P=e;var n=m[i+1]-m[i];if(0!==n)if(T=(e-m[i])/n,l)if(A=y[i],D=y[0===i?i:i-1],C=y[i>h-2?h-1:i+1],L=y[i>h-3?h-1:i+2],f)Be(D,A,C,L,T,T*T,T*T*T,a(t,r),v);else{var o;if(g)o=Be(D,A,C,L,T,T*T,T*T*T,O,1),o=Fe(O);else{if(p)return Re(A,C,T);o=We(D,A,C,L,T,T*T,T*T*T)}s(t,r,o)}else if(f)Ne(y[i],y[i+1],T,a(t,r),v);else{var o;if(g)Ne(y[i],y[i+1],T,O,1),o=Fe(O);else{if(p)return Re(y[i],y[i+1],T);o=ze(y[i],y[i+1],T)}s(t,r,o)}},R=new de({target:t._target,life:u,loop:t._loop,delay:t._delay,onframe:z,ondestroy:i});return e&&"spline"!==e&&(R.easing=e),R}}}function Xe(t,e,i,n){0>i&&(t+=i,i=-i),0>n&&(e+=n,n=-n),this.x=t,this.y=e,this.width=i,this.height=n}function qe(t){for(var e=0;t>=sg;)e|=1&t,t>>=1;return t+e}function Ye(t,e,i,n){var r=e+1;if(r===i)return 1;if(n(t[r++],t[e])<0){for(;i>r&&n(t[r],t[r-1])<0;)r++;Ue(t,e,r)}else for(;i>r&&n(t[r],t[r-1])>=0;)r++;return r-e}function Ue(t,e,i){for(i--;i>e;){var n=t[e];t[e++]=t[i],t[i--]=n}}function je(t,e,i,n,r){for(n===e&&n++;i>n;n++){for(var o,a=t[n],s=e,l=n;l>s;)o=s+l>>>1,r(a,t[o])<0?l=o:s=o+1;var h=n-s;switch(h){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;h>0;)t[s+h]=t[s+h-1],h--}t[s]=a}}function $e(t,e,i,n,r,o){var a=0,s=0,l=1;if(o(t,e[i+r])>0){for(s=n-r;s>l&&o(t,e[i+r+l])>0;)a=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s),a+=r,l+=r}else{for(s=r+1;s>l&&o(t,e[i+r-l])<=0;)a=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s);var h=a;a=r-l,l=r-h}for(a++;l>a;){var u=a+(l-a>>>1);o(t,e[i+u])>0?a=u+1:l=u}return l}function Ke(t,e,i,n,r,o){var a=0,s=0,l=1;if(o(t,e[i+r])<0){for(s=r+1;s>l&&o(t,e[i+r-l])<0;)a=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s);var h=a;a=r-l,l=r-h}else{for(s=n-r;s>l&&o(t,e[i+r+l])>=0;)a=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s),a+=r,l+=r}for(a++;l>a;){var u=a+(l-a>>>1);o(t,e[i+u])<0?l=u:a=u+1}return l}function Qe(t,e){function i(t,e){l[c]=t,h[c]=e,c+=1}function n(){for(;c>1;){var t=c-2;if(t>=1&&h[t-1]<=h[t]+h[t+1]||t>=2&&h[t-2]<=h[t]+h[t-1])h[t-1]h[t+1])break;o(t)}}function r(){for(;c>1;){var t=c-2;t>0&&h[t-1]=r?a(n,r,o,u):s(n,r,o,u)))}function a(i,n,r,o){var a=0;for(a=0;n>a;a++)d[a]=t[i+a];var s=0,l=r,h=i;if(t[h++]=t[l++],0!==--o){if(1===n){for(a=0;o>a;a++)t[h+a]=t[l+a];return void(t[h+o]=d[s])}for(var c,f,g,p=u;;){c=0,f=0,g=!1;do if(e(t[l],d[s])<0){if(t[h++]=t[l++],f++,c=0,0===--o){g=!0;break}}else if(t[h++]=d[s++],c++,f=0,1===--n){g=!0;break}while(p>(c|f));if(g)break;do{if(c=Ke(t[l],d,s,n,0,e),0!==c){for(a=0;c>a;a++)t[h+a]=d[s+a];if(h+=c,s+=c,n-=c,1>=n){g=!0;break}}if(t[h++]=t[l++],0===--o){g=!0;break}if(f=$e(d[s],t,l,o,0,e),0!==f){for(a=0;f>a;a++)t[h+a]=t[l+a];if(h+=f,l+=f,o-=f,0===o){g=!0;break}}if(t[h++]=d[s++],1===--n){g=!0;break}p--}while(c>=lg||f>=lg);if(g)break;0>p&&(p=0),p+=2}if(u=p,1>u&&(u=1),1===n){for(a=0;o>a;a++)t[h+a]=t[l+a];t[h+o]=d[s]}else{if(0===n)throw new Error;for(a=0;n>a;a++)t[h+a]=d[s+a]}}else for(a=0;n>a;a++)t[h+a]=d[s+a]}function s(i,n,r,o){var a=0;for(a=0;o>a;a++)d[a]=t[r+a];var s=i+n-1,l=o-1,h=r+o-1,c=0,f=0;if(t[h--]=t[s--],0!==--n){if(1===o){for(h-=n,s-=n,f=h+1,c=s+1,a=n-1;a>=0;a--)t[f+a]=t[c+a];return void(t[h]=d[l])}for(var g=u;;){var p=0,v=0,m=!1;do if(e(d[l],t[s])<0){if(t[h--]=t[s--],p++,v=0,0===--n){m=!0;break}}else if(t[h--]=d[l--],v++,p=0,1===--o){m=!0;break}while(g>(p|v));if(m)break;do{if(p=n-Ke(d[l],t,i,n,n-1,e),0!==p){for(h-=p,s-=p,n-=p,f=h+1,c=s+1,a=p-1;a>=0;a--)t[f+a]=t[c+a];if(0===n){m=!0;break}}if(t[h--]=d[l--],1===--o){m=!0;break}if(v=o-$e(t[s],d,0,o,o-1,e),0!==v){for(h-=v,l-=v,o-=v,f=h+1,c=l+1,a=0;v>a;a++)t[f+a]=d[c+a];if(1>=o){m=!0;break}}if(t[h--]=t[s--],0===--n){m=!0;break}g--}while(p>=lg||v>=lg);if(m)break;0>g&&(g=0),g+=2}if(u=g,1>u&&(u=1),1===o){for(h-=n,s-=n,f=h+1,c=s+1,a=n-1;a>=0;a--)t[f+a]=t[c+a];t[h]=d[l]}else{if(0===o)throw new Error;for(c=h-(o-1),a=0;o>a;a++)t[c+a]=d[a]}}else for(c=h-(o-1),a=0;o>a;a++)t[c+a]=d[a]}var l,h,u=lg,c=0,d=[];l=[],h=[],this.mergeRuns=n,this.forceMergeRuns=r,this.pushRun=i}function Je(t,e,i,n){i||(i=0),n||(n=t.length);var r=n-i;if(!(2>r)){var o=0;if(sg>r)return o=Ye(t,i,n,e),void je(t,i,n,i+o,e);var a=new Qe(t,e),s=qe(r);do{if(o=Ye(t,i,n,e),s>o){var l=r;l>s&&(l=s),je(t,i,i+l,i+o,e),o=l}a.pushRun(i,o),a.mergeRuns(),r-=o,i+=o}while(0!==r);a.forceMergeRuns()}}function ti(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}function ei(t,e,i){var n=null==e.x?0:e.x,r=null==e.x2?1:e.x2,o=null==e.y?0:e.y,a=null==e.y2?0:e.y2;e.global||(n=n*i.width+i.x,r=r*i.width+i.x,o=o*i.height+i.y,a=a*i.height+i.y);var s=t.createLinearGradient(n,o,r,a);return s}function ii(t,e,i){var n=i.width,r=i.height,o=Math.min(n,r),a=null==e.x?.5:e.x,s=null==e.y?.5:e.y,l=null==e.r?.5:e.r;e.global||(a=a*n+i.x,s=s*r+i.y,l*=o);var h=t.createRadialGradient(a,s,0,a,s,l);return h}function ni(){return!1}function ri(t,e,i){var n=_f(),r=e.getWidth(),o=e.getHeight(),a=n.style;return a.position="absolute",a.left=0,a.top=0,a.width=r+"px",a.height=o+"px",n.width=r*i,n.height=o*i,n.setAttribute("data-zr-dom-id",t),n}function oi(t){if("string"==typeof t){var e=yg.get(t);return e&&e.image}return t}function ai(t,e,i,n,r){if(t){if("string"==typeof t){if(e&&e.__zrImageSrc===t||!i)return e;var o=yg.get(t),a={hostEl:i,cb:n,cbPayload:r};return o?(e=o.image,!li(e)&&o.pending.push(a)):(!e&&(e=new Image),e.onload=si,yg.put(t,e.__cachedImgObj={image:e,pending:[a]}),e.src=e.__zrImageSrc=t),e}return t}return e}function si(){var t=this.__cachedImgObj;this.onload=this.__cachedImgObj=null;for(var e=0;eo;o++)r=Math.max(wi(n[o],e).width,r);return _g>wg&&(_g=0,xg={}),_g++,xg[i]=r,r}function ui(t,e,i,n,r,o,a){return o?di(t,e,i,n,r,o,a):ci(t,e,i,n,r,a)}function ci(t,e,i,n,r,o){var a=bi(t,e,r,o),s=hi(t,e);r&&(s+=r[1]+r[3]);var l=a.outerHeight,h=fi(0,s,i),u=gi(0,l,n),c=new Xe(h,u,s,l);return c.lineHeight=a.lineHeight,c}function di(t,e,i,n,r,o,a){var s=Mi(t,{rich:o,truncate:a,font:e,textAlign:i,textPadding:r}),l=s.outerWidth,h=s.outerHeight,u=fi(0,l,i),c=gi(0,h,n);return new Xe(u,c,l,h)}function fi(t,e,i){return"right"===i?t-=e:"center"===i&&(t-=e/2),t}function gi(t,e,i){return"middle"===i?t-=e/2:"bottom"===i&&(t-=e),t}function pi(t,e,i){var n=e.x,r=e.y,o=e.height,a=e.width,s=o/2,l="left",h="top";switch(t){case"left":n-=i,r+=s,l="right",h="middle";break;case"right":n+=i+a,r+=s,h="middle";break;case"top":n+=a/2,r-=i,l="center",h="bottom";break;case"bottom":n+=a/2,r+=o+i,l="center";break;case"inside":n+=a/2,r+=s,l="center",h="middle";break;case"insideLeft":n+=i,r+=s,h="middle";break;case"insideRight":n+=a-i,r+=s,l="right",h="middle";break;case"insideTop":n+=a/2,r+=i,l="center";break;case"insideBottom":n+=a/2,r+=o-i,l="center",h="bottom";break;case"insideTopLeft":n+=i,r+=i;break;case"insideTopRight":n+=a-i,r+=i,l="right";break;case"insideBottomLeft":n+=i,r+=o-i,h="bottom";break;case"insideBottomRight":n+=a-i,r+=o-i,l="right",h="bottom"}return{x:n,y:r,textAlign:l,textVerticalAlign:h}}function vi(t,e,i,n,r){if(!e)return"";var o=(t+"").split("\n");r=mi(e,i,n,r);for(var a=0,s=o.length;s>a;a++)o[a]=yi(o[a],r);return o.join("\n")}function mi(t,e,i,n){n=a({},n),n.font=e;var i=D(i,"...");n.maxIterations=D(n.maxIterations,2);var r=n.minChar=D(n.minChar,0);n.cnCharWidth=hi("国",e);var o=n.ascCharWidth=hi("a",e);n.placeholder=D(n.placeholder,"");for(var s=t=Math.max(0,t-1),l=0;r>l&&s>=o;l++)s-=o;var h=hi(i);return h>s&&(i="",h=0),s=t-h,n.ellipsis=i,n.ellipsisWidth=h,n.contentWidth=s,n.containerWidth=t,n}function yi(t,e){var i=e.containerWidth,n=e.font,r=e.contentWidth;if(!i)return"";var o=hi(t,n);if(i>=o)return t;for(var a=0;;a++){if(r>=o||a>=e.maxIterations){t+=e.ellipsis;break}var s=0===a?xi(t,r,e.ascCharWidth,e.cnCharWidth):o>0?Math.floor(t.length*r/o):0;t=t.substr(0,s),o=hi(t,n)}return""===t&&(t=e.placeholder),t}function xi(t,e,i,n){for(var r=0,o=0,a=t.length;a>o&&e>r;o++){var s=t.charCodeAt(o);r+=s>=0&&127>=s?i:n}return o}function _i(t){return hi("国",t)}function wi(t,e){return Sg.measureText(t,e)}function bi(t,e,i,n){null!=t&&(t+="");var r=_i(e),o=t?t.split("\n"):[],a=o.length*r,s=a;if(i&&(s+=i[0]+i[2]),t&&n){var l=n.outerHeight,h=n.outerWidth;if(null!=l&&s>l)t="",o=[];else if(null!=h)for(var u=mi(h-(i?i[1]+i[3]:0),e,n.ellipsis,{minChar:n.minChar,placeholder:n.placeholder}),c=0,d=o.length;d>c;c++)o[c]=yi(o[c],u)}return{lines:o,height:a,outerHeight:s,lineHeight:r}}function Mi(t,e){var i={lines:[],width:0,height:0};if(null!=t&&(t+=""),!t)return i;for(var n,r=bg.lastIndex=0;null!=(n=bg.exec(t));){var o=n.index;o>r&&Si(i,t.substring(r,o)),Si(i,n[2],n[1]),r=bg.lastIndex}rf)return{lines:[],width:0,height:0};x.textWidth=hi(x.text,b);var S=_.textWidth,I=null==S||"auto"===S;if("string"==typeof S&&"%"===S.charAt(S.length-1))x.percentWidth=S,h.push(x),S=0;else{if(I){S=x.textWidth;var T=_.textBackgroundColor,C=T&&T.image;C&&(C=oi(C),li(C)&&(S=Math.max(S,C.width*M/C.height)))}var L=w?w[1]+w[3]:0;S+=L;var k=null!=d?d-m:null;null!=k&&S>k&&(!I||L>k?(x.text="",x.textWidth=S=0):(x.text=vi(x.text,k-L,b,c.ellipsis,{minChar:c.minChar}),x.textWidth=hi(x.text,b),S=x.textWidth+L))}m+=x.width=S,_&&(v=Math.max(v,x.lineHeight))}p.width=m,p.lineHeight=v,s+=v,l=Math.max(l,m)}i.outerWidth=i.width=D(e.textWidth,l),i.outerHeight=i.height=D(e.textHeight,s),u&&(i.outerWidth+=u[1]+u[3],i.outerHeight+=u[0]+u[2]);for(var g=0;gl&&(a+=l,l=-l),0>h&&(s+=h,h=-h),"number"==typeof u?i=n=r=o=u:u instanceof Array?1===u.length?i=n=r=o=u[0]:2===u.length?(i=r=u[0],n=o=u[1]):3===u.length?(i=u[0],n=o=u[1],r=u[2]):(i=u[0],n=u[1],r=u[2],o=u[3]):i=n=r=o=0;var c;i+n>l&&(c=i+n,i*=l/c,n*=l/c),r+o>l&&(c=r+o,r*=l/c,o*=l/c),n+r>h&&(c=n+r,n*=h/c,r*=h/c),i+o>h&&(c=i+o,i*=h/c,o*=h/c),t.moveTo(a+i,s),t.lineTo(a+l-n,s),0!==n&&t.quadraticCurveTo(a+l,s,a+l,s+n),t.lineTo(a+l,s+h-r),0!==r&&t.quadraticCurveTo(a+l,s+h,a+l-r,s+h),t.lineTo(a+o,s+h),0!==o&&t.quadraticCurveTo(a,s+h,a,s+h-o),t.lineTo(a,s+i),0!==i&&t.quadraticCurveTo(a,s,a+i,s)}function Di(t){return Ai(t),f(t.rich,Ai),t}function Ai(t){if(t){t.font=Ii(t);var e=t.textAlign;"middle"===e&&(e="center"),t.textAlign=null==e||Ig[e]?e:"left";var i=t.textVerticalAlign||t.textBaseline;"center"===i&&(i="middle"),t.textVerticalAlign=null==i||Tg[i]?i:"top";var n=t.textPadding;n&&(t.textPadding=L(t.textPadding))}}function Ci(t,e,i,n,r){n.rich?ki(t,e,i,n,r):Li(t,e,i,n,r)}function Li(t,e,i,n,r){var o=Bi(e,"font",n.font||Mg),a=n.textPadding,s=t.__textCotentBlock;(!s||t.__dirty)&&(s=t.__textCotentBlock=bi(i,o,a,n.truncate));var l=s.outerHeight,h=s.lines,u=s.lineHeight,c=Vi(l,n,r),d=c.baseX,f=c.baseY,g=c.textAlign,p=c.textVerticalAlign;Oi(e,n,r,d,f);var v=gi(f,l,p),m=d,y=v,x=Ri(n);if(x||a){var _=hi(i,o),w=_;a&&(w+=a[1]+a[3]);var b=fi(d,w,g);x&&Ni(t,e,n,b,v,w,l),a&&(m=Gi(d,g,a),y+=a[0])}Bi(e,"textAlign",g||"left"),Bi(e,"textBaseline","middle"),Bi(e,"shadowBlur",n.textShadowBlur||0),Bi(e,"shadowColor",n.textShadowColor||"transparent"),Bi(e,"shadowOffsetX",n.textShadowOffsetX||0),Bi(e,"shadowOffsetY",n.textShadowOffsetY||0),y+=u/2;var M=n.textStrokeWidth,S=Wi(n.textStroke,M),I=Hi(n.textFill);S&&(Bi(e,"lineWidth",M),Bi(e,"strokeStyle",S)),I&&Bi(e,"fillStyle",I);for(var T=0;TT&&(_=b[T],!_.textAlign||"left"===_.textAlign);)zi(t,e,_,n,S,m,D,"left"),I-=_.width,D+=_.width,T++;for(;C>=0&&(_=b[C],"right"===_.textAlign);)zi(t,e,_,n,S,m,A,"right"),I-=_.width,A-=_.width,C--;for(D+=(o-(D-v)-(y-A)-I)/2;C>=T;)_=b[T],zi(t,e,_,n,S,m,D+_.width/2,"center"),D+=_.width,T++;m+=S}}function Oi(t,e,i,n,r){if(i&&e.textRotation){var o=e.textOrigin;"center"===o?(n=i.width/2+i.x,r=i.height/2+i.y):o&&(n=o[0]+i.x,r=o[1]+i.y),t.translate(n,r),t.rotate(-e.textRotation),t.translate(-n,-r)}}function zi(t,e,i,n,r,o,a,s){var l=n.rich[i.styleName]||{},h=i.textVerticalAlign,u=o+r/2;"top"===h?u=o+i.height/2:"bottom"===h&&(u=o+r-i.height/2),!i.isLineHolder&&Ri(l)&&Ni(t,e,l,"right"===s?a-i.width:"center"===s?a-i.width/2:a,u-i.height/2,i.width,i.height);var c=i.textPadding;c&&(a=Gi(a,s,c),u-=i.height/2-c[2]-i.textHeight/2),Bi(e,"shadowBlur",A(l.textShadowBlur,n.textShadowBlur,0)),Bi(e,"shadowColor",l.textShadowColor||n.textShadowColor||"transparent"),Bi(e,"shadowOffsetX",A(l.textShadowOffsetX,n.textShadowOffsetX,0)),Bi(e,"shadowOffsetY",A(l.textShadowOffsetY,n.textShadowOffsetY,0)),Bi(e,"textAlign",s),Bi(e,"textBaseline","middle"),Bi(e,"font",i.font||Mg);var d=Wi(l.textStroke||n.textStroke,g),f=Hi(l.textFill||n.textFill),g=D(l.textStrokeWidth,n.textStrokeWidth);d&&(Bi(e,"lineWidth",g),Bi(e,"strokeStyle",d),e.strokeText(i.text,a,u)),f&&(Bi(e,"fillStyle",f),e.fillText(i.text,a,u))}function Ri(t){return t.textBackgroundColor||t.textBorderWidth&&t.textBorderColor}function Ni(t,e,i,n,r,o,a){var s=i.textBackgroundColor,l=i.textBorderWidth,h=i.textBorderColor,u=w(s);if(Bi(e,"shadowBlur",i.textBoxShadowBlur||0),Bi(e,"shadowColor",i.textBoxShadowColor||"transparent"),Bi(e,"shadowOffsetX",i.textBoxShadowOffsetX||0),Bi(e,"shadowOffsetY",i.textBoxShadowOffsetY||0),u||l&&h){e.beginPath();var c=i.textBorderRadius;c?Ti(e,{x:n,y:r,width:o,height:a,r:c}):e.rect(n,r,o,a),e.closePath()}if(u)Bi(e,"fillStyle",s),e.fill();else if(b(s)){var d=s.image;d=ai(d,null,t,Ei,s),d&&li(d)&&e.drawImage(d,n,r,o,a)}l&&h&&(Bi(e,"lineWidth",l),Bi(e,"strokeStyle",h),e.stroke())}function Ei(t,e){e.image=t}function Vi(t,e,i){var n=e.x||0,r=e.y||0,o=e.textAlign,a=e.textVerticalAlign;if(i){var s=e.textPosition;if(s instanceof Array)n=i.x+Fi(s[0],i.width),r=i.y+Fi(s[1],i.height);else{var l=pi(s,i,e.textDistance);n=l.x,r=l.y,o=o||l.textAlign,a=a||l.textVerticalAlign}var h=e.textOffset;h&&(n+=h[0],r+=h[1])}return{baseX:n,baseY:r,textAlign:o,textVerticalAlign:a}}function Bi(t,e,i){return t[e]=i,t[e]}function Wi(t,e){return null==t||0>=e||"transparent"===t||"none"===t?null:t.image||t.colorStops?"#000":t}function Hi(t){return null==t||"none"===t?null:t.image||t.colorStops?"#000":t}function Fi(t,e){return"string"==typeof t?t.lastIndexOf("%")>=0?parseFloat(t)/100*e:parseFloat(t):t}function Gi(t,e,i){return"right"===e?t-i[1]:"center"===e?t+i[3]/2-i[1]/2:t+i[3]}function Zi(t,e){return null!=t&&(t||e.textBackgroundColor||e.textBorderWidth&&e.textBorderColor||e.textPadding)}function Xi(t){t=t||{},ig.call(this,t);for(var e in t)t.hasOwnProperty(e)&&"style"!==e&&(this[e]=t[e]);this.style=new cg(t.style,this),this._rect=null,this.__clipPaths=[]}function qi(t){Xi.call(this,t)}function Yi(t){return parseInt(t,10)}function Ui(t){return t?t.__builtin__?!0:"function"!=typeof t.resize||"function"!=typeof t.refresh?!1:!0:!1}function ji(t){t.__unusedCount++}function $i(t){1==t.__unusedCount&&t.clear()}function Ki(t,e,i){return Lg.copy(t.getBoundingRect()),t.transform&&Lg.applyTransform(t.transform),kg.width=e,kg.height=i,!Lg.intersect(kg)}function Qi(t,e){if(t==e)return!1;if(!t||!e||t.length!==e.length)return!0;for(var i=0;i=0;if(r){var o="touchend"!=n?e.targetTouches[0]:e.changedTouches[0];o&&nn(t,o,e,i)}else nn(t,e,e,i),e.zrDelta=e.wheelDelta?e.wheelDelta/120:-(e.detail||0)/3;var a=e.button;return null==e.which&&void 0!==a&&zg.test(e.type)&&(e.which=1&a?1:2&a?3:4&a?2:0),e}function an(t,e,i){Og?t.addEventListener(e,i):t.attachEvent("on"+e,i)}function sn(t,e,i){Og?t.removeEventListener(e,i):t.detachEvent("on"+e,i)}function ln(t){return t.which>1}function hn(t){var e=t[1][0]-t[0][0],i=t[1][1]-t[0][1];return Math.sqrt(e*e+i*i)}function un(t){return[(t[0][0]+t[1][0])/2,(t[0][1]+t[1][1])/2]}function cn(t){return"mousewheel"===t&&hf.browser.firefox?"DOMMouseScroll":t}function dn(t,e,i){var n=t._gestureMgr;"start"===i&&n.clear();var r=n.recognize(e,t.handler.findHover(e.zrX,e.zrY,null).target,t.dom);if("end"===i&&n.clear(),r){var o=r.type;e.gestureEvent=o,t.handler.dispatchToElement({target:r.target},o,r.event)}}function fn(t){t._touching=!0,clearTimeout(t._touchTimer),t._touchTimer=setTimeout(function(){t._touching=!1},700)}function gn(t){var e=t.pointerType;return"pen"===e||"touch"===e}function pn(t){function e(t,e){return function(){return e._touching?void 0:t.apply(e,arguments)}}f(Hg,function(e){t._handlers[e]=m(Zg[e],t)}),f(Gg,function(e){t._handlers[e]=m(Zg[e],t)}),f(Wg,function(i){t._handlers[i]=e(Zg[i],t)})}function vn(t){function e(e,i){f(e,function(e){an(t,cn(e),i._handlers[e])},i)}Cf.call(this),this.dom=t,this._touching=!1,this._touchTimer,this._gestureMgr=new Eg,this._handlers={},pn(this),hf.pointerEventsSupported?e(Gg,this):(hf.touchEventsSupported&&e(Hg,this),e(Wg,this))}function mn(t,e){var i=new Ug(sf(),t,e);return i}function yn(t){return t.replace(/^\s+/,"").replace(/\s+$/,"")}function xn(t,e,i,n){var r=e[1]-e[0],o=i[1]-i[0];if(0===r)return 0===o?i[0]:(i[0]+i[1])/2;if(n)if(r>0){if(t<=e[0])return i[0];if(t>=e[1])return i[1]}else{if(t>=e[0])return i[0];if(t<=e[1])return i[1]}else{if(t===e[0])return i[0];if(t===e[1])return i[1]}return(t-e[0])/r*o+i[0]}function _n(t,e){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%"}return"string"==typeof t?yn(t).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?0/0:+t}function wn(t,e,i){return null==e&&(e=10),e=Math.min(Math.max(0,e),20),t=(+t).toFixed(e),i?t:+t }function bn(t){return t.sort(function(t,e){return t-e}),t}function Mn(t){if(t=+t,isNaN(t))return 0;for(var e=1,i=0;Math.round(t*e)/e!==t;)e*=10,i++;return i}function Sn(t){var e=t.toString(),i=e.indexOf("e");if(i>0){var n=+e.slice(i+1);return 0>n?-n:0}var r=e.indexOf(".");return 0>r?0:e.length-1-r}function In(t,e){var i=Math.log,n=Math.LN10,r=Math.floor(i(t[1]-t[0])/n),o=Math.round(i(Math.abs(e[1]-e[0]))/n),a=Math.min(Math.max(-r+o,0),20);return isFinite(a)?a:20}function Tn(t,e,i){if(!t[e])return 0;var n=p(t,function(t,e){return t+(isNaN(e)?0:e)},0);if(0===n)return 0;for(var r=Math.pow(10,i),o=g(t,function(t){return(isNaN(t)?0:t)/n*r*100}),a=100*r,s=g(o,function(t){return Math.floor(t)}),l=p(s,function(t,e){return t+e},0),h=g(o,function(t,e){return t-s[e]});a>l;){for(var u=Number.NEGATIVE_INFINITY,c=null,d=0,f=h.length;f>d;++d)h[d]>u&&(u=h[d],c=d);++s[c],h[c]=0,++l}return s[e]/r}function Dn(t){var e=2*Math.PI;return(t%e+e)%e}function An(t){return t>-jg&&jg>t}function Cn(t){if(t instanceof Date)return t;if("string"==typeof t){var e=Kg.exec(t);if(!e)return new Date(0/0);if(e[8]){var i=+e[4]||0;return"Z"!==e[8].toUpperCase()&&(i-=e[8].slice(0,3)),new Date(Date.UTC(+e[1],+(e[2]||1)-1,+e[3]||1,i,+(e[5]||0),+e[6]||0,+e[7]||0))}return new Date(+e[1],+(e[2]||1)-1,+e[3]||1,+e[4]||0,+(e[5]||0),+e[6]||0,+e[7]||0)}return new Date(null==t?0/0:Math.round(t))}function Ln(t){return Math.pow(10,kn(t))}function kn(t){return Math.floor(Math.log(t)/Math.LN10)}function Pn(t,e){var i,n=kn(t),r=Math.pow(10,n),o=t/r;return i=e?1.5>o?1:2.5>o?2:4>o?3:7>o?5:10:1>o?1:2>o?2:3>o?3:5>o?5:10,t=i*r,n>=-20?+t.toFixed(0>n?-n:0):t}function On(t){function e(t,i,n){return t.interval[n]s;s++)o[s]<=i&&(o[s]=i,a[s]=s?1:1-n),i=o[s],n=a[s];o[0]===o[1]&&a[0]*a[1]!==1?t.splice(r,1):r++}return t}function zn(t){return isNaN(t)?"-":(t=(t+"").split("."),t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:""))}function Rn(t,e){return t=(t||"").toLowerCase().replace(/-(.)/g,function(t,e){return e.toUpperCase()}),e&&t&&(t=t.charAt(0).toUpperCase()+t.slice(1)),t}function Nn(t){return String(t).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function En(t,e,i){x(e)||(e=[e]);var n=e.length;if(!n)return"";for(var r=e[0].$vars||[],o=0;ol;l++)for(var h=0;h':""}function Wn(t,e,i){("week"===t||"month"===t||"quarter"===t||"half-year"===t||"year"===t)&&(t="MM-dd\nyyyy");var n=Cn(e),r=i?"UTC":"",o=n["get"+r+"FullYear"](),a=n["get"+r+"Month"]()+1,s=n["get"+r+"Date"](),l=n["get"+r+"Hours"](),h=n["get"+r+"Minutes"](),u=n["get"+r+"Seconds"]();return t=t.replace("MM",ep(a)).replace("M",a).replace("yyyy",o).replace("yy",o%100).replace("dd",ep(s)).replace("d",s).replace("hh",ep(l)).replace("h",l).replace("mm",ep(h)).replace("m",h).replace("ss",ep(u)).replace("s",u)}function Hn(t){return t?t.charAt(0).toUpperCase()+t.substr(1):t}function Fn(t,e,i){return t[op+e]=i}function Gn(t,e){return t[op+e]}function Zn(t,e){return t.hasOwnProperty(op+e)}function Xn(t){var e={main:"",sub:""};return t&&(t=t.split(np),e.main=t[0]||"",e.sub=t[1]||""),e}function qn(t){k(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(t),'componentType "'+t+'" illegal')}function Yn(t){t.$constructor=t,t.extend=function(t){var e=this,i=function(){t.$constructor?t.$constructor.apply(this,arguments):e.apply(this,arguments)};return a(i.prototype,t),i.extend=this.extend,i.superCall=Un,i.superApply=jn,u(i,this),i.superClass=e,i}}function Un(t,e){var i=C(arguments,2);return this.superClass.prototype[e].apply(t,i)}function jn(t,e,i){return this.superClass.prototype[e].apply(t,i)}function $n(t,e){function i(t){var e=n[t.main];return e&&e[rp]||(e=n[t.main]={},e[rp]=!0),e}e=e||{};var n={};if(t.registerClass=function(t,e){if(e)if(qn(e),e=Xn(e),e.sub){if(e.sub!==rp){var r=i(e);r[e.sub]=t}}else n[e.main]=t;return t},t.getClass=function(t,e,i){var r=n[t];if(r&&r[rp]&&(r=e?r[e]:null),i&&!r)throw new Error(e?"Component "+t+"."+(e||"")+" not exists. Load it first.":t+".type should be specified.");return r},t.getClassesByMainType=function(t){t=Xn(t);var e=[],i=n[t.main];return i&&i[rp]?f(i,function(t,i){i!==rp&&e.push(t)}):e.push(i),e},t.hasClass=function(t){return t=Xn(t),!!n[t.main]},t.getAllClassMainTypes=function(){var t=[];return f(n,function(e,i){t.push(i)}),t},t.hasSubTypes=function(t){t=Xn(t);var e=n[t.main];return e&&e[rp]},t.parseClassType=Xn,e.registerWhenExtend){var r=t.extend;r&&(t.extend=function(e){var i=r.call(this,e);return t.registerClass(i,e.type)})}return t}function Kn(t){return t>-fp&&fp>t}function Qn(t){return t>fp||-fp>t}function Jn(t,e,i,n,r){var o=1-r;return o*o*(o*t+3*r*e)+r*r*(r*n+3*o*i)}function tr(t,e,i,n,r){var o=1-r;return 3*(((e-t)*o+2*(i-e)*r)*o+(n-i)*r*r)}function er(t,e,i,n,r,o){var a=n+3*(e-i)-t,s=3*(i-2*e+t),l=3*(e-t),h=t-r,u=s*s-3*a*l,c=s*l-9*a*h,d=l*l-3*s*h,f=0;if(Kn(u)&&Kn(c))if(Kn(s))o[0]=0;else{var g=-l/s;g>=0&&1>=g&&(o[f++]=g)}else{var p=c*c-4*u*d;if(Kn(p)){var v=c/u,g=-s/a+v,m=-v/2;g>=0&&1>=g&&(o[f++]=g),m>=0&&1>=m&&(o[f++]=m)}else if(p>0){var y=dp(p),x=u*s+1.5*a*(-c+y),_=u*s+1.5*a*(-c-y);x=0>x?-cp(-x,vp):cp(x,vp),_=0>_?-cp(-_,vp):cp(_,vp);var g=(-s-(x+_))/(3*a);g>=0&&1>=g&&(o[f++]=g)}else{var w=(2*u*s-3*a*c)/(2*dp(u*u*u)),b=Math.acos(w)/3,M=dp(u),S=Math.cos(b),g=(-s-2*M*S)/(3*a),m=(-s+M*(S+pp*Math.sin(b)))/(3*a),I=(-s+M*(S-pp*Math.sin(b)))/(3*a);g>=0&&1>=g&&(o[f++]=g),m>=0&&1>=m&&(o[f++]=m),I>=0&&1>=I&&(o[f++]=I)}}return f}function ir(t,e,i,n,r){var o=6*i-12*e+6*t,a=9*e+3*n-3*t-9*i,s=3*e-3*t,l=0;if(Kn(a)){if(Qn(o)){var h=-s/o;h>=0&&1>=h&&(r[l++]=h)}}else{var u=o*o-4*a*s;if(Kn(u))r[0]=-o/(2*a);else if(u>0){var c=dp(u),h=(-o+c)/(2*a),d=(-o-c)/(2*a);h>=0&&1>=h&&(r[l++]=h),d>=0&&1>=d&&(r[l++]=d)}}return l}function nr(t,e,i,n,r,o){var a=(e-t)*r+t,s=(i-e)*r+e,l=(n-i)*r+i,h=(s-a)*r+a,u=(l-s)*r+s,c=(u-h)*r+h;o[0]=t,o[1]=a,o[2]=h,o[3]=c,o[4]=c,o[5]=u,o[6]=l,o[7]=n}function rr(t,e,i,n,r,o,a,s,l,h,u){var c,d,f,g,p,v=.005,m=1/0;mp[0]=l,mp[1]=h;for(var y=0;1>y;y+=.05)yp[0]=Jn(t,i,r,a,y),yp[1]=Jn(e,n,o,s,y),g=Df(mp,yp),m>g&&(c=y,m=g);m=1/0;for(var x=0;32>x&&!(gp>v);x++)d=c-v,f=c+v,yp[0]=Jn(t,i,r,a,d),yp[1]=Jn(e,n,o,s,d),g=Df(yp,mp),d>=0&&m>g?(c=d,m=g):(xp[0]=Jn(t,i,r,a,f),xp[1]=Jn(e,n,o,s,f),p=Df(xp,mp),1>=f&&m>p?(c=f,m=p):v*=.5);return u&&(u[0]=Jn(t,i,r,a,c),u[1]=Jn(e,n,o,s,c)),dp(m)}function or(t,e,i,n){var r=1-n;return r*(r*t+2*n*e)+n*n*i}function ar(t,e,i,n){return 2*((1-n)*(e-t)+n*(i-e))}function sr(t,e,i,n,r){var o=t-2*e+i,a=2*(e-t),s=t-n,l=0;if(Kn(o)){if(Qn(a)){var h=-s/a;h>=0&&1>=h&&(r[l++]=h)}}else{var u=a*a-4*o*s;if(Kn(u)){var h=-a/(2*o);h>=0&&1>=h&&(r[l++]=h)}else if(u>0){var c=dp(u),h=(-a+c)/(2*o),d=(-a-c)/(2*o);h>=0&&1>=h&&(r[l++]=h),d>=0&&1>=d&&(r[l++]=d)}}return l}function lr(t,e,i){var n=t+i-2*e;return 0===n?.5:(t-e)/n}function hr(t,e,i,n,r){var o=(e-t)*n+t,a=(i-e)*n+e,s=(a-o)*n+o;r[0]=t,r[1]=o,r[2]=s,r[3]=s,r[4]=a,r[5]=i}function ur(t,e,i,n,r,o,a,s,l){var h,u=.005,c=1/0;mp[0]=a,mp[1]=s;for(var d=0;1>d;d+=.05){yp[0]=or(t,i,r,d),yp[1]=or(e,n,o,d);var f=Df(mp,yp);c>f&&(h=d,c=f)}c=1/0;for(var g=0;32>g&&!(gp>u);g++){var p=h-u,v=h+u;yp[0]=or(t,i,r,p),yp[1]=or(e,n,o,p);var f=Df(yp,mp);if(p>=0&&c>f)h=p,c=f;else{xp[0]=or(t,i,r,v),xp[1]=or(e,n,o,v);var m=Df(xp,mp);1>=v&&c>m?(h=v,c=m):u*=.5}}return l&&(l[0]=or(t,i,r,h),l[1]=or(e,n,o,h)),dp(c)}function cr(t,e,i,n,r,o){r[0]=_p(t,i),r[1]=_p(e,n),o[0]=wp(t,i),o[1]=wp(e,n)}function dr(t,e,i,n,r,o,a,s,l,h){var u,c=ir,d=Jn,f=c(t,i,r,a,Ap);for(l[0]=1/0,l[1]=1/0,h[0]=-1/0,h[1]=-1/0,u=0;f>u;u++){var g=d(t,i,r,a,Ap[u]);l[0]=_p(g,l[0]),h[0]=wp(g,h[0])}for(f=c(e,n,o,s,Cp),u=0;f>u;u++){var p=d(e,n,o,s,Cp[u]);l[1]=_p(p,l[1]),h[1]=wp(p,h[1])}l[0]=_p(t,l[0]),h[0]=wp(t,h[0]),l[0]=_p(a,l[0]),h[0]=wp(a,h[0]),l[1]=_p(e,l[1]),h[1]=wp(e,h[1]),l[1]=_p(s,l[1]),h[1]=wp(s,h[1])}function fr(t,e,i,n,r,o,a,s){var l=lr,h=or,u=wp(_p(l(t,i,r),1),0),c=wp(_p(l(e,n,o),1),0),d=h(t,i,r,u),f=h(e,n,o,c);a[0]=_p(t,r,d),a[1]=_p(e,o,f),s[0]=wp(t,r,d),s[1]=wp(e,o,f)}function gr(t,e,i,n,r,o,a,s,l){var h=$,u=K,c=Math.abs(r-o);if(1e-4>c%Sp&&c>1e-4)return s[0]=t-i,s[1]=e-n,l[0]=t+i,void(l[1]=e+n);if(Ip[0]=Mp(r)*i+t,Ip[1]=bp(r)*n+e,Tp[0]=Mp(o)*i+t,Tp[1]=bp(o)*n+e,h(s,Ip,Tp),u(l,Ip,Tp),r%=Sp,0>r&&(r+=Sp),o%=Sp,0>o&&(o+=Sp),r>o&&!a?o+=Sp:o>r&&a&&(r+=Sp),a){var d=o;o=r,r=d}for(var f=0;o>f;f+=Math.PI/2)f>r&&(Dp[0]=Mp(f)*i+t,Dp[1]=bp(f)*n+e,h(s,Dp,s),u(l,Dp,l))}function pr(t,e,i,n,r,o,a){if(0===r)return!1;var s=r,l=0,h=t;if(a>e+s&&a>n+s||e-s>a&&n-s>a||o>t+s&&o>i+s||t-s>o&&i-s>o)return!1;if(t===i)return Math.abs(o-t)<=s/2;l=(e-n)/(t-i),h=(t*n-i*e)/(t-i);var u=l*o-a+h,c=u*u/(l*l+1);return s/2*s/2>=c}function vr(t,e,i,n,r,o,a,s,l,h,u){if(0===l)return!1;var c=l;if(u>e+c&&u>n+c&&u>o+c&&u>s+c||e-c>u&&n-c>u&&o-c>u&&s-c>u||h>t+c&&h>i+c&&h>r+c&&h>a+c||t-c>h&&i-c>h&&r-c>h&&a-c>h)return!1;var d=rr(t,e,i,n,r,o,a,s,h,u,null);return c/2>=d}function mr(t,e,i,n,r,o,a,s,l){if(0===a)return!1;var h=a;if(l>e+h&&l>n+h&&l>o+h||e-h>l&&n-h>l&&o-h>l||s>t+h&&s>i+h&&s>r+h||t-h>s&&i-h>s&&r-h>s)return!1;var u=ur(t,e,i,n,r,o,s,l,null);return h/2>=u}function yr(t){return t%=Gp,0>t&&(t+=Gp),t}function xr(t,e,i,n,r,o,a,s,l){if(0===a)return!1;var h=a;s-=t,l-=e;var u=Math.sqrt(s*s+l*l);if(u-h>i||i>u+h)return!1;if(Math.abs(n-r)%Zp<1e-4)return!0;if(o){var c=n;n=yr(r),r=yr(c)}else n=yr(n),r=yr(r);n>r&&(r+=Zp);var d=Math.atan2(l,s);return 0>d&&(d+=Zp),d>=n&&r>=d||d+Zp>=n&&r>=d+Zp}function _r(t,e,i,n,r,o){if(o>e&&o>n||e>o&&n>o)return 0;if(n===e)return 0;var a=e>n?1:-1,s=(o-e)/(n-e);(1===s||0===s)&&(a=e>n?.5:-.5);var l=s*(i-t)+t;return l>r?a:0}function wr(t,e){return Math.abs(t-e)e&&h>n&&h>o&&h>s||e>h&&n>h&&o>h&&s>h)return 0;var u=er(e,n,o,s,h,Up);if(0===u)return 0;for(var c,d,f=0,g=-1,p=0;u>p;p++){var v=Up[p],m=0===v||1===v?.5:1,y=Jn(t,i,r,a,v);l>y||(0>g&&(g=ir(e,n,o,s,jp),jp[1]1&&br(),c=Jn(e,n,o,s,jp[0]),g>1&&(d=Jn(e,n,o,s,jp[1]))),f+=2==g?vc?m:-m:vd?m:-m:d>s?m:-m:vc?m:-m:c>s?m:-m)}return f}function Sr(t,e,i,n,r,o,a,s){if(s>e&&s>n&&s>o||e>s&&n>s&&o>s)return 0;var l=sr(e,n,o,s,Up);if(0===l)return 0;var h=lr(e,n,o);if(h>=0&&1>=h){for(var u=0,c=or(e,n,o,h),d=0;l>d;d++){var f=0===Up[d]||1===Up[d]?.5:1,g=or(t,i,r,Up[d]);a>g||(u+=Up[d]c?f:-f:c>o?f:-f)}return u}var f=0===Up[0]||1===Up[0]?.5:1,g=or(t,i,r,Up[0]);return a>g?0:e>o?f:-f}function Ir(t,e,i,n,r,o,a,s){if(s-=e,s>i||-i>s)return 0;var l=Math.sqrt(i*i-s*s);Up[0]=-l,Up[1]=l;var h=Math.abs(n-r);if(1e-4>h)return 0;if(1e-4>h%qp){n=0,r=qp;var u=o?1:-1;return a>=Up[0]+t&&a<=Up[1]+t?u:0}if(o){var l=n;n=yr(r),r=yr(l)}else n=yr(n),r=yr(r);n>r&&(r+=qp);for(var c=0,d=0;2>d;d++){var f=Up[d];if(f+t>a){var g=Math.atan2(s,f),u=o?1:-1;0>g&&(g=qp+g),(g>=n&&r>=g||g+qp>=n&&r>=g+qp)&&(g>Math.PI/2&&g<1.5*Math.PI&&(u=-u),c+=u)}}return c}function Tr(t,e,i,n,r){for(var o=0,a=0,s=0,l=0,h=0,u=0;u1&&(i||(o+=_r(a,s,l,h,n,r))),1==u&&(a=t[u],s=t[u+1],l=a,h=s),c){case Xp.M:l=t[u++],h=t[u++],a=l,s=h;break;case Xp.L:if(i){if(pr(a,s,t[u],t[u+1],e,n,r))return!0}else o+=_r(a,s,t[u],t[u+1],n,r)||0;a=t[u++],s=t[u++];break;case Xp.C:if(i){if(vr(a,s,t[u++],t[u++],t[u++],t[u++],t[u],t[u+1],e,n,r))return!0}else o+=Mr(a,s,t[u++],t[u++],t[u++],t[u++],t[u],t[u+1],n,r)||0;a=t[u++],s=t[u++];break;case Xp.Q:if(i){if(mr(a,s,t[u++],t[u++],t[u],t[u+1],e,n,r))return!0}else o+=Sr(a,s,t[u++],t[u++],t[u],t[u+1],n,r)||0;a=t[u++],s=t[u++];break;case Xp.A:var d=t[u++],f=t[u++],g=t[u++],p=t[u++],v=t[u++],m=t[u++],y=(t[u++],1-t[u++]),x=Math.cos(v)*g+d,_=Math.sin(v)*p+f;u>1?o+=_r(a,s,x,_,n,r):(l=x,h=_);var w=(n-d)*p/g+d;if(i){if(xr(d,f,p,v,v+m,y,e,w,r))return!0}else o+=Ir(d,f,p,v,v+m,y,w,r);a=Math.cos(v+m)*g+d,s=Math.sin(v+m)*p+f;break;case Xp.R:l=a=t[u++],h=s=t[u++];var b=t[u++],M=t[u++],x=l+b,_=h+M;if(i){if(pr(l,h,x,h,e,n,r)||pr(x,h,x,_,e,n,r)||pr(x,_,l,_,e,n,r)||pr(l,_,l,h,e,n,r))return!0}else o+=_r(x,h,x,_,n,r),o+=_r(l,_,l,h,n,r);break;case Xp.Z:if(i){if(pr(a,s,l,h,e,n,r))return!0}else o+=_r(a,s,l,h,n,r);a=l,s=h}}return i||wr(s,h)||(o+=_r(a,s,l,h,n,r)||0),0!==o}function Dr(t,e,i){return Tr(t,0,!1,e,i)}function Ar(t,e,i,n){return Tr(t,e,!0,i,n)}function Cr(t){Xi.call(this,t),this.path=null}function Lr(t,e,i,n,r,o,a,s,l,h,u){var c=l*(lv/180),d=sv(c)*(t-i)/2+av(c)*(e-n)/2,f=-1*av(c)*(t-i)/2+sv(c)*(e-n)/2,g=d*d/(a*a)+f*f/(s*s);g>1&&(a*=ov(g),s*=ov(g));var p=(r===o?-1:1)*ov((a*a*s*s-a*a*f*f-s*s*d*d)/(a*a*f*f+s*s*d*d))||0,v=p*a*f/s,m=p*-s*d/a,y=(t+i)/2+sv(c)*v-av(c)*m,x=(e+n)/2+av(c)*v+sv(c)*m,_=cv([1,0],[(d-v)/a,(f-m)/s]),w=[(d-v)/a,(f-m)/s],b=[(-1*d-v)/a,(-1*f-m)/s],M=cv(w,b);uv(w,b)<=-1&&(M=lv),uv(w,b)>=1&&(M=0),0===o&&M>0&&(M-=2*lv),1===o&&0>M&&(M+=2*lv),u.addData(h,y,x,a,s,_,M,c,o)}function kr(t){if(!t)return[];var e,i=t.replace(/-/g," -").replace(/ /g," ").replace(/ /g,",").replace(/,,/g,",");for(e=0;e0&&""===f[0]&&f.shift();for(var g=0;gr;r++){var o=t[r];o.path||o.createPathProxy(),o.__dirtyPath&&o.buildPath(o.path,o.shape,!0),i.push(o.path)}var a=new Cr(e);return a.createPathProxy(),a.buildPath=function(t){t.appendPath(i);var e=t.getContext();e&&t.rebuildPath(e)},a}function Nr(t,e,i,n,r,o,a){var s=.5*(i-t),l=.5*(n-e);return(2*(e-i)+s+l)*a+(-3*(e-i)-2*s-l)*o+s*r+e}function Er(t,e,i){var n=e.points,r=e.smooth;if(n&&n.length>=2){if(r&&"spline"!==r){var o=xv(n,r,i,e.smoothConstraint);t.moveTo(n[0][0],n[0][1]);for(var a=n.length,s=0;(i?a:a-1)>s;s++){var l=o[2*s],h=o[2*s+1],u=n[(s+1)%a];t.bezierCurveTo(l[0],l[1],h[0],h[1],u[0],u[1])}}else{"spline"===r&&(n=yv(n,i)),t.moveTo(n[0][0],n[0][1]);for(var s=1,c=n.length;c>s;s++)t.lineTo(n[s][0],n[s][1])}i&&t.closePath()}}function Vr(t,e,i){var n=t.cpx2,r=t.cpy2;return null===n||null===r?[(i?tr:Jn)(t.x1,t.cpx1,t.cpx2,t.x2,e),(i?tr:Jn)(t.y1,t.cpy1,t.cpy2,t.y2,e)]:[(i?ar:or)(t.x1,t.cpx1,t.x2,e),(i?ar:or)(t.y1,t.cpy1,t.y2,e)]}function Br(t){return Cr.extend(t)}function Wr(t,e){return zr(t,e)}function Hr(t,e,i,n){var r=Or(t,e),o=r.getBoundingRect();return i&&("center"===n&&(i=Gr(i,o)),Zr(r,i)),r}function Fr(t,e,i){var n=new qi({style:{image:t,x:e.x,y:e.y,width:e.width,height:e.height},onload:function(t){if("center"===i){var r={width:t.width,height:t.height};n.setStyle(Gr(e,r))}}});return n}function Gr(t,e){var i,n=e.width/e.height,r=t.height*n;r<=t.width?i=t.height:(r=t.width,i=r/n);var o=t.x+t.width/2,a=t.y+t.height/2;return{x:o-r/2,y:a-i/2,width:r,height:i}}function Zr(t,e){if(t.applyTransform){var i=t.getBoundingRect(),n=i.calculateTransform(e);t.applyTransform(n)}}function Xr(t){var e=t.shape,i=t.style.lineWidth;return kv(2*e.x1)===kv(2*e.x2)&&(e.x1=e.x2=Yr(e.x1,i,!0)),kv(2*e.y1)===kv(2*e.y2)&&(e.y1=e.y2=Yr(e.y1,i,!0)),t}function qr(t){var e=t.shape,i=t.style.lineWidth,n=e.x,r=e.y,o=e.width,a=e.height;return e.x=Yr(e.x,i,!0),e.y=Yr(e.y,i,!0),e.width=Math.max(Yr(n+o,i,!1)-e.x,0===o?0:1),e.height=Math.max(Yr(r+a,i,!1)-e.y,0===a?0:1),t}function Yr(t,e,i){var n=kv(2*t);return(n+kv(e))%2===0?n/2:(n+(i?1:-1))/2}function Ur(t){return null!=t&&"none"!=t}function jr(t){return"string"==typeof t?Te(t,-.1):t}function $r(t){if(t.__hoverStlDirty){var e=t.style.stroke,i=t.style.fill,n=t.__hoverStl;n.fill=n.fill||(Ur(i)?jr(i):null),n.stroke=n.stroke||(Ur(e)?jr(e):null);var r={};for(var o in n)null!=n[o]&&(r[o]=t.style[o]);t.__normalStl=r,t.__hoverStlDirty=!1}}function Kr(t){if(!t.__isHover){if($r(t),t.useHoverLayer)t.__zr&&t.__zr.addHover(t,t.__hoverStl);else{var e=t.style,i=e.insideRollbackOpt;i&&vo(e),e.extendFrom(t.__hoverStl),i&&(po(e,e.insideOriginalTextPosition,i),null==e.textFill&&(e.textFill=i.autoColor)),t.dirty(!1),t.z2+=1}t.__isHover=!0}}function Qr(t){if(t.__isHover){var e=t.__normalStl;t.useHoverLayer?t.__zr&&t.__zr.removeHover(t):(e&&t.setStyle(e),t.z2-=1),t.__isHover=!1}}function Jr(t){"group"===t.type?t.traverse(function(t){"group"!==t.type&&Kr(t)}):Kr(t)}function to(t){"group"===t.type?t.traverse(function(t){"group"!==t.type&&Qr(t)}):Qr(t)}function eo(t,e){t.__hoverStl=t.hoverStyle||e||{},t.__hoverStlDirty=!0,t.__isHover&&$r(t)}function io(t){this.__hoverSilentOnTouch&&t.zrByTouch||!this.__isEmphasis&&Jr(this)}function no(t){this.__hoverSilentOnTouch&&t.zrByTouch||!this.__isEmphasis&&to(this)}function ro(){this.__isEmphasis=!0,Jr(this)}function oo(){this.__isEmphasis=!1,to(this)}function ao(t,e,i){t.__hoverSilentOnTouch=i&&i.hoverSilentOnTouch,"group"===t.type?t.traverse(function(t){"group"!==t.type&&eo(t,e)}):eo(t,e),t.on("mouseover",io).on("mouseout",no),t.on("emphasis",ro).on("normal",oo)}function so(t,e,i,n,r,o,a){r=r||zv;var s=r.labelFetcher,l=r.labelDataIndex,h=r.labelDimIndex,u=i.getShallow("show"),c=n.getShallow("show"),d=u||c?D(s?s.getFormattedLabel(l,"normal",null,h):null,r.defaultText):null,f=u?d:null,g=c?D(s?s.getFormattedLabel(l,"emphasis",null,h):null,d):null;(null!=f||null!=g)&&(lo(t,i,o,r),lo(e,n,a,r,!0)),t.text=f,e.text=g}function lo(t,e,i,n,r){return uo(t,e,n,r),i&&a(t,i),t.host&&t.host.dirty&&t.host.dirty(!1),t}function ho(t,e,i){var n,r={isRectText:!0};i===!1?n=!0:r.autoColor=i,uo(t,e,r,n),t.host&&t.host.dirty&&t.host.dirty(!1)}function uo(t,e,i,n){if(i=i||zv,i.isRectText){var r=e.getShallow("position")||(n?null:"inside");"outside"===r&&(r="top"),t.textPosition=r,t.textOffset=e.getShallow("offset");var o=e.getShallow("rotate");null!=o&&(o*=Math.PI/180),t.textRotation=o,t.textDistance=D(e.getShallow("distance"),n?null:5)}var a,s=e.ecModel,l=s&&s.option.textStyle,h=co(e);if(h){a={};for(var u in h)if(h.hasOwnProperty(u)){var c=e.getModel(["rich",u]);fo(a[u]={},c,l,i,n)}}return t.rich=a,fo(t,e,l,i,n,!0),i.forceRich&&!i.textStyle&&(i.textStyle={}),t}function co(t){for(var e;t&&t!==t.ecModel;){var i=(t.option||zv).rich;if(i){e=e||{};for(var n in i)i.hasOwnProperty(n)&&(e[n]=1)}t=t.parentModel}return e}function fo(t,e,i,n,r,o){if(i=!r&&i||zv,t.textFill=go(e.getShallow("color"),n)||i.color,t.textStroke=go(e.getShallow("textBorderColor"),n)||i.textBorderColor,t.textStrokeWidth=D(e.getShallow("textBorderWidth"),i.textBorderWidth),!r){if(o){var a=t.textPosition;t.insideRollback=po(t,a,n),t.insideOriginalTextPosition=a,t.insideRollbackOpt=n}null==t.textFill&&(t.textFill=n.autoColor)}t.fontStyle=e.getShallow("fontStyle")||i.fontStyle,t.fontWeight=e.getShallow("fontWeight")||i.fontWeight,t.fontSize=e.getShallow("fontSize")||i.fontSize,t.fontFamily=e.getShallow("fontFamily")||i.fontFamily,t.textAlign=e.getShallow("align"),t.textVerticalAlign=e.getShallow("verticalAlign")||e.getShallow("baseline"),t.textLineHeight=e.getShallow("lineHeight"),t.textWidth=e.getShallow("width"),t.textHeight=e.getShallow("height"),t.textTag=e.getShallow("tag"),o&&n.disableBox||(t.textBackgroundColor=go(e.getShallow("backgroundColor"),n),t.textPadding=e.getShallow("padding"),t.textBorderColor=go(e.getShallow("borderColor"),n),t.textBorderWidth=e.getShallow("borderWidth"),t.textBorderRadius=e.getShallow("borderRadius"),t.textBoxShadowColor=e.getShallow("shadowColor"),t.textBoxShadowBlur=e.getShallow("shadowBlur"),t.textBoxShadowOffsetX=e.getShallow("shadowOffsetX"),t.textBoxShadowOffsetY=e.getShallow("shadowOffsetY")),t.textShadowColor=e.getShallow("textShadowColor")||i.textShadowColor,t.textShadowBlur=e.getShallow("textShadowBlur")||i.textShadowBlur,t.textShadowOffsetX=e.getShallow("textShadowOffsetX")||i.textShadowOffsetX,t.textShadowOffsetY=e.getShallow("textShadowOffsetY")||i.textShadowOffsetY}function go(t,e){return"auto"!==t?t:e&&e.autoColor?e.autoColor:null}function po(t,e,i){var n,r=i.useInsideStyle;return null==t.textFill&&r!==!1&&(r===!0||i.isRectText&&e&&"string"==typeof e&&e.indexOf("inside")>=0)&&(n={textFill:null,textStroke:t.textStroke,textStrokeWidth:t.textStrokeWidth},t.textFill="#fff",null==t.textStroke&&(t.textStroke=i.autoColor,null==t.textStrokeWidth&&(t.textStrokeWidth=2))),n}function vo(t){var e=t.insideRollback;e&&(t.textFill=e.textFill,t.textStroke=e.textStroke,t.textStrokeWidth=e.textStrokeWidth)}function mo(t,e){var i=e||e.getModel("textStyle");return[t.fontStyle||i&&i.getShallow("fontStyle")||"",t.fontWeight||i&&i.getShallow("fontWeight")||"",(t.fontSize||i&&i.getShallow("fontSize")||12)+"px",t.fontFamily||i&&i.getShallow("fontFamily")||"sans-serif"].join(" ")}function yo(t,e,i,n,r,o){"function"==typeof r&&(o=r,r=null);var a=n&&n.isAnimationEnabled();if(a){var s=t?"Update":"",l=n.getShallow("animationDuration"+s),h=n.getShallow("animationEasing"+s),u=n.getShallow("animationDelay"+s);"function"==typeof u&&(u=u(r,n.getAnimationDelayParams?n.getAnimationDelayParams(e,r):null)),"function"==typeof l&&(l=l(r)),l>0?e.animateTo(i,l,u||0,h,o,!!o):(e.stopAnimation(),e.attr(i),o&&o())}else e.stopAnimation(),e.attr(i),o&&o()}function xo(t,e,i,n,r){yo(!0,t,e,i,n,r)}function _o(t,e,i,n,r){yo(!1,t,e,i,n,r)}function wo(t,e){for(var i=re([]);t&&t!==e;)ae(i,t.getLocalTransform(),i),t=t.parent;return i}function bo(t,e,i){return e&&!d(e)&&(e=Nf.getLocalTransform(e)),i&&(e=ue([],e)),j([],t,e)}function Mo(t,e,i){var n=0===e[4]||0===e[5]||0===e[0]?1:Math.abs(2*e[4]/e[0]),r=0===e[4]||0===e[5]||0===e[2]?1:Math.abs(2*e[4]/e[2]),o=["left"===t?-n:"right"===t?n:0,"top"===t?-r:"bottom"===t?r:0];return o=bo(o,e,i),Math.abs(o[0])>Math.abs(o[1])?o[0]>0?"right":"left":o[1]>0?"bottom":"top"}function So(t,e,i){function n(t){var e={};return t.traverse(function(t){!t.isGroup&&t.anid&&(e[t.anid]=t)}),e}function r(t){var e={position:B(t.position),rotation:t.rotation};return t.shape&&(e.shape=a({},t.shape)),e}if(t&&e){var o=n(t);e.traverse(function(t){if(!t.isGroup&&t.anid){var e=o[t.anid];if(e){var n=r(t);t.attr(r(e)),xo(t,n,i,t.dataIndex)}}})}}function Io(t,e){return g(t,function(t){var i=t[0];i=Pv(i,e.x),i=Ov(i,e.x+e.width);var n=t[1];return n=Pv(n,e.y),n=Ov(n,e.y+e.height),[i,n]})}function To(t,e){var i=Pv(t.x,e.x),n=Ov(t.x+t.width,e.x+e.width),r=Pv(t.y,e.y),o=Ov(t.y+t.height,e.y+e.height);return n>=i&&o>=r?{x:i,y:r,width:n-i,height:o-r}:void 0}function Do(t,e,i){e=a({rectHover:!0},e);var n=e.style={strokeNoScale:!0};return i=i||{x:-1,y:-1,width:2,height:2},t?0===t.indexOf("image://")?(n.image=t.slice(8),s(n,i),new qi(e)):Hr(t.replace("path://",""),e,i,"center"):void 0}function Ao(t,e,i){this.parentModel=e,this.ecModel=i,this.option=t}function Co(t,e,i){for(var n=0;nr;r++){var a=e[r];!i.hasOwnProperty(a)&&n.hasOwnProperty(a)&&(i[a]=n[a])}}function Oo(t){return t&&(null==t.value?t:t.value)}function zo(t){return Gv(t)&&!(t instanceof Array)}function Ro(t,e){var i=e&&e.type;return"ordinal"===i?t:("time"===i&&"number"!=typeof t&&null!=t&&"-"!==t&&(t=+Cn(t)),null==t||""===t?0/0:+t)}function No(t,e){e=(e||[]).slice();var i=g(t||[],function(t){return{exist:t}});return Fv(e,function(t,n){if(Gv(t)){for(var r=0;r=i.length&&i.push({option:t})}}),i}function Eo(t){var e=R();Fv(t,function(t){var i=t.exist;i&&e.set(i.id,t)}),Fv(t,function(t){var i=t.option;k(!i||null==i.id||!e.get(i.id)||e.get(i.id)===t,"id duplicates: "+(i&&i.id)),i&&null!=i.id&&e.set(i.id,t),!t.keyInfo&&(t.keyInfo={})}),Fv(t,function(t){var i=t.exist,n=t.option,r=t.keyInfo;if(Gv(n)){if(r.name=null!=n.name?n.name+"":i?i.name:"\x00-",i)r.id=i.id;else if(null!=n.id)r.id=n.id+"";else{var o=0;do r.id="\x00"+r.name+"\x00"+o++;while(e.get(r.id))}e.set(r.id,t)}})}function Vo(t){return Gv(t)&&t.id&&0===(t.id+"").indexOf("\x00_ec_\x00")}function Bo(t,e){function i(t,e,i){for(var n=0,r=t.length;r>n;n++)for(var o=t[n].seriesId,a=ko(t[n].dataIndex),s=i&&i[o],l=0,h=a.length;h>l;l++){var u=a[l];s&&s[u]?s[u]=null:(e[o]||(e[o]={}))[u]=1}}function n(t,e){var i=[];for(var r in t)if(t.hasOwnProperty(r)&&null!=t[r])if(e)i.push(+r);else{var o=n(t[r],!0);o.length&&i.push({seriesId:r,dataIndex:o})}return i}var r={},o={};return i(t||[],r),i(e||[],o,r),[n(r),n(o)]}function Wo(t,e){return null!=e.dataIndexInside?e.dataIndexInside:null!=e.dataIndex?x(e.dataIndex)?g(e.dataIndex,function(e){return t.indexOfRawIndex(e)}):t.indexOfRawIndex(e.dataIndex):null!=e.name?x(e.name)?g(e.name,function(e){return t.indexOfName(e)}):t.indexOfName(e.name):void 0}function Ho(t,e,i){if(w(e)){var n={};n[e+"Index"]=0,e=n}var r=i&&i.defaultMainType;!r||Xo(e,r+"Index")||Xo(e,r+"Id")||Xo(e,r+"Name")||(e[r+"Index"]=0);var o={};return Fv(e,function(n,r){var n=e[r];if("dataIndex"===r||"dataIndexInside"===r)return void(o[r]=n);var a=r.match(/^(\w+)(Index|Id|Name)$/)||[],s=a[1],l=(a[2]||"").toLowerCase();if(!(!s||!l||null==n||"index"===l&&"none"===n||i&&i.includeMainTypes&&h(i.includeMainTypes,s)<0)){var u={mainType:s};("index"!==l||"all"!==n)&&(u[l]=n);var c=t.queryComponents(u);o[s+"Models"]=c,o[s+"Model"]=c[0]}}),o}function Fo(t,e){var i=t.dimensions;e=t.getDimension(e);for(var n=0;n=0&&i.push(t)}),i}t.topologicalTravel=function(t,e,n,r){function o(t){l[t].entryCount--,0===l[t].entryCount&&h.push(t)}function a(t){u[t]=!0,o(t)}if(t.length){var s=i(e),l=s.graph,h=s.noEntryList,u={};for(f(t,function(t){u[t]=!0});h.length;){var c=h.pop(),d=l[c],g=!!u[c];g&&(n.call(r,c,d.originalDeps.slice()),delete u[c]),f(d.successor,g?a:o)}f(u,function(){throw new Error("Circle dependency may exists")})}}}function jo(t,e,i,n,r){var o=0,a=0;null==n&&(n=1/0),null==r&&(r=1/0);var s=0;e.eachChild(function(l,h){var u,c,d=l.position,f=l.getBoundingRect(),g=e.childAt(h+1),p=g&&g.getBoundingRect();if("horizontal"===t){var v=f.width+(p?-p.x+f.x:0);u=o+v,u>n||l.newline?(o=0,u=v,a+=s+i,s=f.height):s=Math.max(s,f.height)}else{var m=f.height+(p?-p.y+f.y:0);c=a+m,c>r||l.newline?(o+=s+i,a=0,c=m,s=f.width):s=Math.max(s,f.width)}l.newline||(d[0]=o,d[1]=a,"horizontal"===t?o=u+i:a=c+i)})}function $o(t,e,i){var n=e.width,r=e.height,o=_n(t.x,n),a=_n(t.y,r),s=_n(t.x2,n),l=_n(t.y2,r);return(isNaN(o)||isNaN(parseFloat(t.x)))&&(o=0),(isNaN(s)||isNaN(parseFloat(t.x2)))&&(s=n),(isNaN(a)||isNaN(parseFloat(t.y)))&&(a=0),(isNaN(l)||isNaN(parseFloat(t.y2)))&&(l=r),i=Qg(i||0),{width:Math.max(s-o-i[1]-i[3],0),height:Math.max(l-a-i[0]-i[2],0)}}function Ko(t,e,i){i=Qg(i||0);var n=e.width,r=e.height,o=_n(t.left,n),a=_n(t.top,r),s=_n(t.right,n),l=_n(t.bottom,r),h=_n(t.width,n),u=_n(t.height,r),c=i[2]+i[0],d=i[1]+i[3],f=t.aspect;switch(isNaN(h)&&(h=n-s-d-o),isNaN(u)&&(u=r-l-c-a),null!=f&&(isNaN(h)&&isNaN(u)&&(f>n/r?h=.8*n:u=.8*r),isNaN(h)&&(h=f*u),isNaN(u)&&(u=h/f)),isNaN(o)&&(o=n-s-h-d),isNaN(a)&&(a=r-l-u-c),t.left||t.right){case"center":o=n/2-h/2-i[3];break;case"right":o=n-h-d}switch(t.top||t.bottom){case"middle":case"center":a=r/2-u/2-i[0];break;case"bottom":a=r-u-c}o=o||0,a=a||0,isNaN(h)&&(h=n-d-o-(s||0)),isNaN(u)&&(u=r-c-a-(l||0));var g=new Xe(o+i[3],a+i[0],h,u);return g.margin=i,g}function Qo(t,e,i,n,r){var o=!r||!r.hv||r.hv[0],a=!r||!r.hv||r.hv[1],l=r&&r.boundingMode||"all";if(o||a){var h;if("raw"===l)h="group"===t.type?new Xe(0,0,+e.width||0,+e.height||0):t.getBoundingRect();else if(h=t.getBoundingRect(),t.needLocalTransform()){var u=t.getLocalTransform();h=h.clone(),h.applyTransform(u)}e=Ko(s({width:h.width,height:h.height},e),i,n);var c=t.position,d=o?e.x-h.x:0,f=a?e.y-h.y:0;t.attr("position","raw"===l?[d,f]:[c[0]+d,c[1]+f])}}function Jo(t,e){return null!=t[Kv[e][0]]||null!=t[Kv[e][1]]&&null!=t[Kv[e][2]]}function ta(t,e,i){function n(i,n){var a={},l=0,h={},u=0,c=2;if(jv(i,function(e){h[e]=t[e]}),jv(i,function(t){r(e,t)&&(a[t]=h[t]=e[t]),o(a,t)&&l++,o(h,t)&&u++}),s[n])return o(e,i[1])?h[i[2]]=null:o(e,i[2])&&(h[i[1]]=null),h;if(u!==c&&l){if(l>=c)return a;for(var d=0;d=e:"max"===i?e>=t:t===e}function va(t,e){return t.join(",")===e.join(",")}function ma(t,e){e=e||{},pm(e,function(e,i){if(null!=e){var n=t[i];if(em.hasClass(i)){e=ko(e),n=ko(n);var r=No(n,e);t[i]=mm(r,function(t){return t.option&&t.exist?ym(t.exist,t.option,!0):t.exist||t.option})}else t[i]=ym(n,e,!0)}})}function ya(t){var e=t&&t.itemStyle;if(e)for(var i=0,n=bm.length;n>i;i++){var o=bm[i],a=e.normal,s=e.emphasis;a&&a[o]&&(t[o]=t[o]||{},t[o].normal?r(t[o].normal,a[o]):t[o].normal=a[o],a[o]=null),s&&s[o]&&(t[o]=t[o]||{},t[o].emphasis?r(t[o].emphasis,s[o]):t[o].emphasis=s[o],s[o]=null)}}function xa(t,e){var i=wm(t)&&t[e],n=wm(i)&&i.textStyle;if(n)for(var r=0,o=Zv.length;o>r;r++){var e=Zv[r];n.hasOwnProperty(e)&&(i[e]=n[e])}}function _a(t){wm(t)&&(xa(t,"normal"),xa(t,"emphasis"))}function wa(t){if(wm(t)){ya(t),_a(t.label),_a(t.upperLabel),_a(t.edgeLabel);var e=t.markPoint;ya(e),_a(e&&e.label);var i=t.markLine;ya(t.markLine),_a(i&&i.label);var n=t.markArea;_a(n&&n.label),xa(t,"axisLabel"),xa(t,"title"),xa(t,"detail");var r=t.data;if(r)for(var o=0;o=0?n():c=setTimeout(n,-o),h=r};return d.clear=function(){c&&(clearTimeout(c),c=null)},d.debounceNextCall=function(t){l=t},d}function ka(t,e,i,n){var r=t[e];if(r){var o=r[Pm]||r,a=r[zm],s=r[Om];if(s!==i||a!==n){if(null==i||!n)return t[e]=o;r=t[e]=La(o,i,"debounce"===n),r[Pm]=o,r[zm]=n,r[Om]=i}return r}}function Pa(t,e){var i=t[e];i&&i[Pm]&&(t[e]=i[Pm])}function Oa(t){return function(e,i,n){e=e&&e.toLowerCase(),Cf.prototype[t].call(this,e,i,n)}}function za(){Cf.call(this)}function Ra(t,e,i){function r(t,e){return t.prio-e.prio}i=i||{},"string"==typeof e&&(e=hy[e]),this.id,this.group,this._dom=t;var o="canvas",a=this._zr=mn(t,{renderer:i.renderer||o,devicePixelRatio:i.devicePixelRatio,width:i.width,height:i.height});this._throttledZrFlush=La(m(a.flush,a),17);var e=n(e);e&&Dm(e,!0),this._theme=e,this._chartsViews=[],this._chartsMap={},this._componentsViews=[],this._componentsMap={},this._coordSysMgr=new ca,this._api=Ka(this),Cf.call(this),this._messageCenter=new za,this._initEvents(),this.resize=m(this.resize,this),this._pendingActions=[],Je(ly,r),Je(oy,r),a.animation.on("frame",this._onframe,this),P(this)}function Na(t,e,i){var n,r=this._model,o=this._coordSysMgr.getCoordinateSystems();e=Ho(r,e);for(var a=0;ae.get("hoverLayerThreshold")&&!hf.node&&i.traverse(function(t){t.isGroup||(t.useHoverLayer=!0)})}function ja(t,e){var i=0;e.group.traverse(function(t){"group"===t.type||t.ignore||i++});var n=+t.get("progressive"),r=i>t.get("progressiveThreshold")&&n&&!hf.node;r&&e.group.traverse(function(t){t.isGroup||(t.progressive=r?Math.floor(i++/n):-1,r&&t.stopAnimation(!0))});var o=t.get("blendMode")||null;e.group.traverse(function(t){t.isGroup||t.setStyle("blend",o)})}function $a(t,e){var i=t.get("z"),n=t.get("zlevel");e.group.traverse(function(t){"group"!==t.type&&(null!=i&&(t.z=i),null!=n&&(t.zlevel=n))})}function Ka(t){var e=t._coordSysMgr;return a(new ua(t),{getCoordinateSystems:m(e.getCoordinateSystems,e),getComponentByElement:function(e){for(;e;){var i=e.__ecComponentInfo;if(null!=i)return t._model.getComponent(i.mainType,i.index);e=e.parent}}})}function Qa(t){function e(t,e){for(var i=0;ie&&(e=Math.min(e,s),t.width&&(e=Math.min(e,t.width)),s-=e,t.width=e,l--)}),h=(s-o)/(l+(l-1)*a),h=Math.max(h,0);var u,c=0;f(n,function(t){t.width||(t.width=h),u=t,c+=t.width*(1+a)}),u&&(c-=u.width*a);var d=-c/2;f(n,function(t,n){i[e][n]=i[e][n]||{offset:d,width:t.width},d+=t.width*(1+a)})}),i}function Ds(t,e){var i=Is(v(e.getSeriesByType(t),function(t){return!e.isSeriesFiltered(t)&&t.coordinateSystem&&"cartesian2d"===t.coordinateSystem.type})),n={},r={};e.eachSeriesByType(t,function(t){if("cartesian2d"===t.coordinateSystem.type){var e=t.getData(),o=t.coordinateSystem,a=o.getBaseAxis(),s=bs(t),l=i[Ms(a)][s],h=l.offset,u=l.width,c=o.getOtherAxis(a),d=t.get("barMinHeight")||0,f=a.onZero?c.toGlobalCoord(c.dataToCoord(0)):c.getGlobalExtent()[0],g=[t.coordDimToDataDim("x")[0],t.coordDimToDataDim("y")[0]],p=e.mapArray(g,function(t,e){return o.dataToPoint([t,e])},!0);n[s]=n[s]||[],r[s]=r[s]||[],e.setLayout({offset:h,size:u}),e.each(t.coordDimToDataDim(c.dim)[0],function(t,i){if(!isNaN(t)){n[s][i]||(n[s][i]={p:f,n:f},r[s][i]={p:f,n:f});var o,a,l,g,v=t>=0?"p":"n",m=p[i],y=n[s][i][v],x=r[s][i][v];c.isHorizontal()?(o=y,a=m[1]+h,l=m[0]-x,g=u,r[s][i][v]+=l,Math.abs(l)l?-1:1)*d),n[s][i][v]+=l):(o=m[0]+h,a=y,l=u,g=m[1]-x,r[s][i][v]+=g,Math.abs(g)=g?-1:1)*d),n[s][i][v]+=g),e.setItemLayout(i,{x:o,y:a,width:l,height:g})}},!0)}},this)}function As(t){this._setting=t||{},this._extent=[1/0,-1/0],this._interval=0,this.init&&this.init.apply(this,arguments)}function Cs(t,e,i,n){var r={},o=t[1]-t[0],a=r.interval=Pn(o/e,!0);null!=i&&i>a&&(a=r.interval=i),null!=n&&a>n&&(a=r.interval=n);var s=r.intervalPrecision=Ls(a),l=r.niceTickExtent=[by(Math.ceil(t[0]/a)*a,s),by(Math.floor(t[1]/a)*a,s)];return Ps(l,t),r}function Ls(t){return Sn(t)+2}function ks(t,e,i){t[e]=Math.max(Math.min(t[e],i[1]),i[0])}function Ps(t,e){!isFinite(t[0])&&(t[0]=e[0]),!isFinite(t[1])&&(t[1]=e[1]),ks(t,0,e),ks(t,1,e),t[0]>t[1]&&(t[0]=t[1])}function Os(t,e,i,n){var r=[];if(!t)return r;var o=1e4;e[0]o)return[];return e[1]>(r.length?r[r.length-1]:i[1])&&r.push(e[1]),r}function zs(t,e){return Vy(t,Ey(e))}function Rs(t,e){var i,n,r,o=t.type,a=e.getMin(),s=e.getMax(),l=null!=a,h=null!=s,u=t.getExtent();return"ordinal"===o?i=(e.get("data")||[]).length:(n=e.get("boundaryGap"),x(n)||(n=[n||0,n||0]),"boolean"==typeof n[0]&&(n=[0,0]),n[0]=_n(n[0],1),n[1]=_n(n[1],1),r=u[1]-u[0]||Math.abs(u[0])),null==a&&(a="ordinal"===o?i?0:0/0:u[0]-n[0]*r),null==s&&(s="ordinal"===o?i?i-1:0/0:u[1]+n[1]*r),"dataMin"===a?a=u[0]:"function"==typeof a&&(a=a({min:u[0],max:u[1]})),"dataMax"===s?s=u[1]:"function"==typeof s&&(s=s({min:u[0],max:u[1]})),(null==a||!isFinite(a))&&(a=0/0),(null==s||!isFinite(s))&&(s=0/0),t.setBlank(I(a)||I(s)),e.getNeedCrossZero()&&(a>0&&s>0&&!l&&(a=0),0>a&&0>s&&!h&&(s=0)),[a,s]}function Ns(t,e){var i=Rs(t,e),n=null!=e.getMin(),r=null!=e.getMax(),o=e.get("splitNumber");"log"===t.type&&(t.base=e.get("logBase"));var a=t.type;t.setExtent(i[0],i[1]),t.niceExtent({splitNumber:o,fixMin:n,fixMax:r,minInterval:"interval"===a||"time"===a?e.get("minInterval"):null,maxInterval:"interval"===a||"time"===a?e.get("maxInterval"):null});var s=e.get("interval");null!=s&&t.setInterval&&t.setInterval(s)}function Es(t,e){if(e=e||t.get("type"))switch(e){case"category":return new wy(t.getCategories(),[1/0,-1/0]);case"value":return new Sy;default:return(As.getClass(e)||Sy).create(t)}}function Vs(t){var e=t.scale.getExtent(),i=e[0],n=e[1];return!(i>0&&n>0||0>i&&0>n)}function Bs(t,e,i,n,r){var o,a=0,s=0,l=(n-r)/180*Math.PI,h=1;e.length>40&&(h=Math.floor(e.length/40));for(var u=0;u1?h:(a+1)*h-1}function Ws(t,e){var i=t.scale,n=i.getTicksLabels(),r=i.getTicks();return"string"==typeof e?(e=function(t){return function(e){return t.replace("{value}",null!=e?e:"")}}(e),g(n,e)):"function"==typeof e?g(r,function(i,n){return e(Hs(t,i),n)},this):n}function Hs(t,e){return"category"===t.type?t.scale.getLabel(e):e}function Fs(t){return this._axes[t]}function Gs(t){Zy.call(this,t)}function Zs(t,e){var i=t[1]-t[0],n=e,r=i/n/2;t[0]+=r,t[1]-=r}function Xs(t){return b(t)&&null!=t.value?t.value:t+""}function qs(t,e){return e.type||(e.data?"category":"value")}function Ys(t,e){return t.getCoordSysModel()===e}function Us(t,e){var i=e*Math.PI/180,n=t.plain(),r=n.width,o=n.height,a=r*Math.cos(i)+o*Math.sin(i),s=r*Math.sin(i)+o*Math.cos(i),l=new Xe(n.x,n.y,a,s);return l}function js(t){var e,i=t.model,n=i.getFormattedLabels(),r=i.getModel("axisLabel"),o=1,a=n.length;a>40&&(o=Math.ceil(a/40));for(var s=0;a>s;s+=o)if(!t.isLabelIgnored(s)){var l=r.getTextRect(n[s]),h=Us(l,r.get("rotate")||0);e?e.union(h):e=h}return e}function $s(t,e,i){this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this._initCartesian(t,e,i),this.model=t}function Ks(t,e,i){var n=t[e];if(i.onZero){var r=i.onZeroAxisIndex;if(null!=r){var o=n[r];return void(o&&Qs(o)&&(i.onZero=!1))}for(var a in n)if(n.hasOwnProperty(a)){var o=n[a];if(o&&!Qs(o)){r=+a;break}}null==r&&(i.onZero=!1),i.onZeroAxisIndex=r}}function Qs(t){return"category"===t.type||"time"===t.type||!nx(t)}function Js(t,e){var i=t.getExtent(),n=i[0]+i[1];t.toGlobalCoord="x"===t.dim?function(t){return t+e}:function(t){return n-t+e},t.toLocalCoord="x"===t.dim?function(t){return t-e}:function(t){return n-t+e}}function tl(t){return g(ax,function(e){var i=t.getReferringComponents(e)[0];return i})}function el(t){return"cartesian2d"===t.get("coordinateSystem")}function il(t){return t}function nl(t,e,i,n,r){this._old=t,this._new=e,this._oldKeyGetter=i||il,this._newKeyGetter=n||il,this.context=r}function rl(t,e,i,n,r){for(var o=0;o=0?new l.constructor(o[s].length):o[s]}return n}function hl(t,e,i){function r(t,e,i){yx[e]?t.otherDims[e]=i:(t.coordDim=e,t.coordDimIndex=i,h.set(e,!0))}function o(t,e,i){if(i||null!=e.get(t)){for(var n=0;null!=e.get(t+n);)n++;t+=n}return e.set(t,!0),t}e=e||[],i=i||{},t=(t||[]).slice();var a=(i.dimsDef||[]).slice(),s=R(i.encodeDef),l=R(),h=R(),u=[],c=i.dimCount;if(null==c){var d=ul(e[0]);c=Math.max(x(d)&&d.length||1,t.length,a.length),px(t,function(t){var e=t.dimsDef;e&&(c=Math.max(c,e.length))})}for(var f=0;c>f;f++){var g=vx(a[f])?{name:a[f]}:a[f]||{},p=g.name,v=u[f]={otherDims:{}};null!=p&&null==l.get(p)&&(v.name=v.tooltipName=p,l.set(p,f)),null!=g.type&&(v.type=g.type)}s.each(function(t,e){t=s.set(e,ko(t).slice()),px(t,function(i,n){vx(i)&&(i=l.get(i)),null!=i&&c>i&&(t[n]=i,r(u[i],e,n))})});var m=0;px(t,function(t){var e,t,i,o;vx(t)?(e=t,t={}):(e=t.name,t=n(t),i=t.dimsDef,o=t.otherDims,t.name=t.coordDim=t.coordDimIndex=t.dimsDef=t.otherDims=null);var a=ko(s.get(e));if(!a.length)for(var l=0;l<(i&&i.length||1);l++){for(;m_;_++){var v=u[_]=u[_]||{},w=v.coordDim;null==w&&(v.coordDim=o(y,h,i.extraFromZero),v.coordDimIndex=0,v.isExtraCoord=!0),null==v.name&&(v.name=o(v.coordDim,l)),null==v.type&&xx(e,_)&&(v.type="ordinal")}return u}function ul(t){return x(t)?t:b(t)?t.value:t}function cl(t){for(var e=0;e=0&&dl(t)?function(t,e,i,n){return zo(t)&&(c.hasItemOption=!0),n===u?i:Ro(Oo(t),l[n])}:function(t,e,i,n){var r=Oo(t),o=Ro(r&&r[n],l[n]);zo(t)&&(c.hasItemOption=!0);var a=s&&s.categoryAxesModels;return a&&a[e]&&"string"==typeof o&&(f[e]=f[e]||a[e].getCategories(),o=h(f[e],o),0>o&&!isNaN(o)&&(o=+o)),o};return c.hasItemOption=!1,c.initData(t,d,g),c}function gl(t){return"category"!==t&&"time"!==t}function pl(t){return"category"===t?"ordinal":"time"===t?"time":"float"}function vl(t,e){var i,n=[],r=t&&t.dimensions[t.categoryIndex];if(r&&(i=t.categoryAxesModels[r.name]),i){var o=i.getCategories();if(o){var a=e.length;if(x(e[0])&&e[0].length>1){n=[];for(var s=0;a>s;s++)n[s]=o[e[s][t.categoryIndex||0]]}else n=o.slice(0)}}return n}function ml(t,e,i,n,r,o){var a=i.getModel("label.normal"),s=i.getModel("label.emphasis");so(t,e,a,s,{labelFetcher:r,labelDataIndex:o,defaultText:r.getRawValue(o),isRectText:!0,autoColor:n}),yl(t),yl(e)}function yl(t,e){"outside"===t.textPosition&&(t.textPosition=e)}function xl(t,e,i){i.style.text=null,xo(i,{shape:{width:0}},e,t,function(){i.parent&&i.parent.remove(i)})}function _l(t,e,i){i.style.text=null,xo(i,{shape:{r:i.shape.r0}},e,t,function(){i.parent&&i.parent.remove(i)})}function wl(t,e,i,n,r,o,a,l){var h=e.getItemVisual(i,"color"),u=e.getItemVisual(i,"opacity"),c=n.getModel("itemStyle.normal"),d=n.getModel("itemStyle.emphasis").getBarItemStyle();l||t.setShape("r",c.get("barBorderRadius")||0),t.useStyle(s({fill:h,opacity:u},c.getBarItemStyle()));var f=n.getShallow("cursor");f&&t.attr("cursor",f);var g=a?r.height>0?"bottom":"top":r.width>0?"left":"right";l||ml(t.style,d,n,h,o,i,g),ao(t,d)}function bl(t,e){var i=t.get(Sx)||0;return Math.min(i,Math.abs(e.width),Math.abs(e.height))}function Ml(t,e){if("image"!==this.type){var i=this.style,n=this.shape;n&&"line"===n.symbolType?i.stroke=t:this.__isEmptyBrush?(i.stroke=t,i.fill=e||"#fff"):(i.fill&&(i.fill=t),i.stroke&&(i.stroke=t)),this.dirty(!1)}}function Sl(t,e,i,n,r,o,a){var s=0===t.indexOf("empty");s&&(t=t.substr(5,1).toLowerCase()+t.substr(6));var l;return l=0===t.indexOf("image://")?Fr(t.slice(8),new Xe(e,i,n,r),a?"center":"cover"):0===t.indexOf("path://")?Hr(t.slice(7),{},new Xe(e,i,n,r),a?"center":"cover"):new zx({shape:{symbolType:t,x:e,y:i,width:n,height:r}}),l.__isEmptyBrush=s,l.setColor=Ml,l.setColor(o),l}function Il(t){var e={componentType:t.mainType};return e[t.mainType+"Index"]=t.componentIndex,e}function Tl(t,e,i,n){var r,o,a=Dn(i-t.rotation),s=n[0]>n[1],l="start"===e&&!s||"start"!==e&&s;return An(a-Rx/2)?(o=l?"bottom":"top",r="center"):An(a-1.5*Rx)?(o=l?"top":"bottom",r="center"):(o="middle",r=1.5*Rx>a&&a>Rx/2?l?"left":"right":l?"right":"left"),{rotation:a,textAlign:r,textVerticalAlign:o}}function Dl(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)}function Al(t,e,i){var n=t.get("axisLabel.showMinLabel"),r=t.get("axisLabel.showMaxLabel");e=e||[],i=i||[];var o=e[0],a=e[1],s=e[e.length-1],l=e[e.length-2],h=i[0],u=i[1],c=i[i.length-1],d=i[i.length-2];n===!1?(Cl(o),Cl(h)):Ll(o,a)&&(n?(Cl(a),Cl(u)):(Cl(o),Cl(h))),r===!1?(Cl(s),Cl(c)):Ll(l,s)&&(r?(Cl(l),Cl(d)):(Cl(s),Cl(c)))}function Cl(t){t&&(t.ignore=!0)}function Ll(t,e){var i=t&&t.getBoundingRect().clone(),n=e&&e.getBoundingRect().clone();if(i&&n){var r=re([]);return le(r,r,-t.rotation),i.applyTransform(ae([],r,t.getLocalTransform())),n.applyTransform(ae([],r,e.getLocalTransform())),i.intersect(n)}}function kl(t){return"middle"===t||"center"===t}function Pl(t,e,i){var n=e.axis;if(e.get("axisTick.show")&&!n.scale.isBlank()){for(var r=e.getModel("axisTick"),o=r.getModel("lineStyle"),a=r.get("length"),l=Wx(r,i.labelInterval),h=n.getTicksCoords(r.get("alignWithLabel")),u=n.scale.getTicks(),c=e.get("axisLabel.showMinLabel"),d=e.get("axisLabel.showMaxLabel"),f=[],g=[],p=t._transform,v=[],m=h.length,y=0;m>y;y++)if(!Bx(n,y,l,m,c,d)){var x=h[y];f[0]=x,f[1]=0,g[0]=x,g[1]=i.tickDirection*a,p&&(j(f,f,p),j(g,g,p));var _=new Mv(Xr({anid:"tick_"+u[y],shape:{x1:f[0],y1:f[1],x2:g[0],y2:g[1]},style:s(o.getLineStyle(),{stroke:e.get("axisLine.lineStyle.color")}),z2:2,silent:!0}));t.group.add(_),v.push(_)}return v}}function Ol(t,e,i){var n=e.axis,r=T(i.axisLabelShow,e.get("axisLabel.show"));if(r&&!n.scale.isBlank()){var o=e.getModel("axisLabel"),a=o.get("margin"),s=n.scale.getTicks(),l=e.getFormattedLabels(),h=(T(i.labelRotate,o.get("rotate"))||0)*Rx/180,u=Vx(i.rotation,h,i.labelDirection),c=e.get("data"),d=[],g=Dl(e),p=e.get("triggerEvent"),v=e.get("axisLabel.showMinLabel"),m=e.get("axisLabel.showMaxLabel");return f(s,function(r,h){if(!Bx(n,h,i.labelInterval,s.length,v,m)){var f=o;c&&c[r]&&c[r].textStyle&&(f=new Ao(c[r].textStyle,o,e.ecModel));var y=f.getTextColor()||e.get("axisLine.lineStyle.color"),x=n.dataToCoord(r),_=[x,i.labelOffset+i.labelDirection*a],w=n.scale.getLabel(r),b=new dv({anid:"label_"+r,position:_,rotation:u.rotation,silent:g,z2:10});lo(b.style,f,{text:l[h],textAlign:f.getShallow("align",!0)||u.textAlign,textVerticalAlign:f.getShallow("verticalAlign",!0)||f.getShallow("baseline",!0)||u.textVerticalAlign,textFill:"function"==typeof y?y("category"===n.type?w:"value"===n.type?r+"":r,h):y}),p&&(b.eventData=Il(e),b.eventData.targetType="axisLabel",b.eventData.value=w),t._dumbGroup.add(b),b.updateTransform(),d.push(b),t.group.add(b),b.decomposeTransform()}}),d}}function zl(t,e){var i={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return Rl(i,t,e),i.seriesInvolved&&El(i,t),i}function Rl(t,e,i){var n=e.getComponent("tooltip"),r=e.getComponent("axisPointer"),o=r.get("link",!0)||[],a=[];Hx(i.getCoordinateSystems(),function(i){function s(n,s,l){var u=l.model.getModel("axisPointer",r),d=u.get("show");if(d&&("auto"!==d||n||Gl(u))){null==s&&(s=u.get("triggerTooltip")),u=n?Nl(l,c,r,e,n,s):u;var f=u.get("snap"),g=Zl(l.model),p=s||f||"category"===l.type,v=t.axesInfo[g]={key:g,axis:l,coordSys:i,axisPointerModel:u,triggerTooltip:s,involveSeries:p,snap:f,useHandle:Gl(u),seriesModels:[]};h[g]=v,t.seriesInvolved|=p;var m=Vl(o,l);if(null!=m){var y=a[m]||(a[m]={axesInfo:{}});y.axesInfo[g]=v,y.mapper=o[m].mapper,v.linkGroup=y}}}if(i.axisPointerEnabled){var l=Zl(i.model),h=t.coordSysAxesInfo[l]={};t.coordSysMap[l]=i;var u=i.model,c=u.getModel("tooltip",n);if(Hx(i.getAxes(),Fx(s,!1,null)),i.getTooltipAxes&&n&&c.get("show")){var d="axis"===c.get("trigger"),f="cross"===c.get("axisPointer.type"),g=i.getTooltipAxes(c.get("axisPointer.axis"));(d||f)&&Hx(g.baseAxes,Fx(s,f?"cross":!0,d)),f&&Hx(g.otherAxes,Fx(s,"cross",!1))}}})}function Nl(t,e,i,r,o,a){var l=e.getModel("axisPointer"),h={};Hx(["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],function(t){h[t]=n(l.get(t))}),h.snap="category"!==t.type&&!!a,"cross"===l.get("type")&&(h.type="line");var u=h.label||(h.label={});if(null==u.show&&(u.show=!1),"cross"===o&&(u.show=!0,!a)){var c=h.lineStyle=l.get("crossStyle");c&&s(u,c.textStyle)}return t.model.getModel("axisPointer",new Ao(h,i,r))}function El(t,e){e.eachSeries(function(e){var i=e.coordinateSystem,n=e.get("tooltip.trigger",!0),r=e.get("tooltip.show",!0);i&&"none"!==n&&n!==!1&&"item"!==n&&r!==!1&&e.get("axisPointer.show",!0)!==!1&&Hx(t.coordSysAxesInfo[Zl(i.model)],function(t){var n=t.axis;i.getAxis(n.dim)===n&&(t.seriesModels.push(e),null==t.seriesDataCount&&(t.seriesDataCount=0),t.seriesDataCount+=e.getData().count())})},this)}function Vl(t,e){for(var i=e.model,n=e.dim,r=0;r=0||t===e}function Wl(t){var e=Hl(t);if(e){var i=e.axisPointerModel,n=e.axis.scale,r=i.option,o=i.get("status"),a=i.get("value");null!=a&&(a=n.parse(a));var s=Gl(i);null==o&&(r.status=s?"show":"hide");var l=n.getExtent().slice();l[0]>l[1]&&l.reverse(),(null==a||a>l[1])&&(a=l[1]),a=0?1:-1}function ih(t,e,i){for(var n,r=t.getBaseAxis(),o=t.getOtherAxis(r),a=r.onZero?0:o.scale.getExtent()[0],s=o.dim,l="x"===s||"radius"===s?1:0,h=e.stackedOn,u=e.get(s,i);h&&eh(h.get(s,i))===eh(u);){n=h;break}var c=[];return c[l]=e.get(r.dim,i),c[1-l]=n?n.get(s,i,!0):a,t.dataToPoint(c)}function nh(t,e){var i=[];return e.diff(t).add(function(t){i.push({cmd:"+",idx:t})}).update(function(t,e){i.push({cmd:"=",idx:e,idx1:t})}).remove(function(t){i.push({cmd:"-",idx:t})}).execute(),i}function rh(t){return isNaN(t[0])||isNaN(t[1])}function oh(t,e,i,n,r,o,a,s,l,h,u){for(var c=0,d=i,f=0;n>f;f++){var g=e[d];if(d>=r||0>d)break;if(rh(g)){if(u){d+=o;continue}break}if(d===i)t[o>0?"moveTo":"lineTo"](g[0],g[1]),a_(l_,g); else if(l>0){var p=d+o,v=e[p];if(u)for(;v&&rh(e[p]);)p+=o,v=e[p];var m=.5,y=e[c],v=e[p];if(!v||rh(v))a_(h_,g);else{rh(v)&&!u&&(v=g),F(s_,v,y);var x,_;if("x"===h||"y"===h){var w="x"===h?0:1;x=Math.abs(g[w]-y[w]),_=Math.abs(g[w]-v[w])}else x=Tf(g,y),_=Tf(g,v);m=_/(_+x),o_(h_,g,s_,-l*(1-m))}n_(l_,l_,s),r_(l_,l_,a),n_(h_,h_,s),r_(h_,h_,a),t.bezierCurveTo(l_[0],l_[1],h_[0],h_[1],g[0],g[1]),o_(l_,g,s_,l*m)}else t.lineTo(g[0],g[1]);c=d,d+=o}return f}function ah(t,e){var i=[1/0,1/0],n=[-1/0,-1/0];if(e)for(var r=0;rn[0]&&(n[0]=o[0]),o[1]>n[1]&&(n[1]=o[1])}return{min:e?i:n,max:e?n:i}}function sh(t,e){if(t.length===e.length){for(var i=0;ie[0]?1:-1;e[0]+=n*i,e[1]-=n*i}return e}function uh(t){return t>=0?1:-1}function ch(t,e){var i=t.getBaseAxis(),n=t.getOtherAxis(i),r=0;if(!i.onZero){var o=n.scale.getExtent();o[0]>0?r=o[0]:o[1]<0&&(r=o[1])}var a=n.dim,s="x"===a||"radius"===a?1:0;return e.mapArray([a],function(n,o){for(var l,h=e.stackedOn;h&&uh(h.get(a,o))===uh(n);){l=h;break}var u=[];return u[s]=e.get(i.dim,o),u[1-s]=l?l.get(a,o,!0):r,t.dataToPoint(u)},!0)}function dh(t,e,i){var n=hh(t.getAxis("x")),r=hh(t.getAxis("y")),o=t.getBaseAxis().isHorizontal(),a=Math.min(n[0],n[1]),s=Math.min(r[0],r[1]),l=Math.max(n[0],n[1])-a,h=Math.max(r[0],r[1])-s,u=i.get("lineStyle.normal.width")||2,c=i.get("clipOverflow")?u/2:Math.max(l,h);o?(s-=c,h+=2*c):(a-=c,l+=2*c);var d=new bv({shape:{x:a,y:s,width:l,height:h}});return e&&(d.shape[o?"width":"height"]=0,_o(d,{shape:{width:l,height:h}},i)),d}function fh(t,e,i){var n=t.getAngleAxis(),r=t.getRadiusAxis(),o=r.getExtent(),a=n.getExtent(),s=Math.PI/180,l=new vv({shape:{cx:t.cx,cy:t.cy,r0:o[0],r:o[1],startAngle:-a[0]*s,endAngle:-a[1]*s,clockwise:n.inverse}});return e&&(l.shape.endAngle=-a[0]*s,_o(l,{shape:{endAngle:-a[1]*s}},i)),l}function gh(t,e,i){return"polar"===t.type?fh(t,e,i):dh(t,e,i)}function ph(t,e,i){for(var n=e.getBaseAxis(),r="x"===n.dim||"radius"===n.dim?0:1,o=[],a=0;a=0;r--)if(i[r].dimension<2){n=i[r];break}if(n&&"cartesian2d"===e.type){var o=n.dimension,a=t.dimensions[o],s=e.getAxis(a),l=g(n.stops,function(t){return{coord:s.toGlobalCoord(s.dataToCoord(t.value)),color:t.color}}),h=l.length,u=n.outerColors.slice();h&&l[0].coord>l[h-1].coord&&(l.reverse(),u.reverse());var c=10,d=l[0].coord-c,p=l[h-1].coord+c,v=p-d;if(.001>v)return"transparent";f(l,function(t){t.offset=(t.coord-d)/v}),l.push({offset:h?l[h-1].offset:.5,color:u[1]||"transparent"}),l.unshift({offset:h?l[0].offset:.5,color:u[0]||"transparent"});var m=new Cv(0,0,0,0,l,!0);return m[a]=d,m[a+"2"]=p,m}}}function mh(t,e,i,n){var r=e.getData(),o=this.dataIndex,a=r.getName(o),s=e.get("selectedOffset");n.dispatchAction({type:"pieToggleSelect",from:t,name:a,seriesId:e.id}),r.each(function(t){yh(r.getItemGraphicEl(t),r.getItemLayout(t),e.isSelected(r.getName(t)),s,i)})}function yh(t,e,i,n,r){var o=(e.startAngle+e.endAngle)/2,a=Math.cos(o),s=Math.sin(o),l=i?n:0,h=[a*l,s*l];r?t.animate().when(200,{position:h}).start("bounceOut"):t.attr("position",h)}function xh(t,e){function i(){o.ignore=o.hoverIgnore,a.ignore=a.hoverIgnore}function n(){o.ignore=o.normalIgnore,a.ignore=a.normalIgnore}ag.call(this);var r=new vv({z2:2}),o=new wv,a=new dv;this.add(r),this.add(o),this.add(a),this.updateData(t,e,!0),this.on("emphasis",i).on("normal",n).on("mouseover",i).on("mouseout",n)}function _h(t,e,i,n,r,o,a){function s(e,i,n){for(var r=e;i>r;r++)if(t[r].y+=n,r>e&&i>r+1&&t[r+1].y>t[r].y+t[r].height)return void l(r,n/2);l(i-1,n/2)}function l(e,i){for(var n=e;n>=0&&(t[n].y-=i,!(n>0&&t[n].y>t[n-1].y+t[n-1].height));n--);}function h(t,e,i,n,r,o){for(var a=o>0?e?Number.MAX_VALUE:0:e?Number.MAX_VALUE:0,s=0,l=t.length;l>s;s++)if("center"!==t[s].position){var h=Math.abs(t[s].y-n),u=t[s].len,c=t[s].len2,d=r+u>h?Math.sqrt((r+u+c)*(r+u+c)-h*h):Math.abs(t[s].x-i);e&&d>=a&&(d=a-10),!e&&a>=d&&(d=a+10),t[s].x=i+d*o,a=d}}t.sort(function(t,e){return t.y-e.y});for(var u,c=0,d=t.length,f=[],g=[],p=0;d>p;p++)u=t[p].y-c,0>u&&s(p,d,-u,r),c=t[p].y+t[p].height;0>a-c&&l(d-1,c-a);for(var p=0;d>p;p++)t[p].y>=i?g.push(t[p]):f.push(t[p]);h(f,!1,e,i,n,r),h(g,!0,e,i,n,r)}function wh(t,e,i,n,r,o){for(var a=[],s=[],l=0;ln;n++){var a=e[n].interval;if(a[0]<=t&&t<=a[1]){o=n;break}}if(n===r)for(var n=o-1;n>=0;n--){var a=e[n].interval;if(a[0]<=t&&t<=a[1]){o=n;break}}return n>=0&&r>n&&i[n]}}function Ah(t,e){var i=t[1]-t[0];return e=[(e[0]-t[0])/i,(e[1]-t[0])/i],function(t){return t>=e[0]&&t<=e[1]}}function Ch(t){var e=t.dimensions;return"lng"===e[0]&&"lat"===e[1]}function Lh(t){var e=t.mainData,i=t.datas;i||(i={main:e},t.datasAttr={main:"data"}),t.datas=t.mainData=null,Nh(e,i,t),P_(i,function(i){P_(e.TRANSFERABLE_METHODS,function(e){i.wrapMethod(e,y(kh,t))})}),e.wrapMethod("cloneShallow",y(Oh,t)),P_(e.CHANGABLE_METHODS,function(i){e.wrapMethod(i,y(Ph,t))}),k(i[e.dataType]===e)}function kh(t,e){if(Rh(this)){var i=a({},this[O_]);i[this.dataType]=e,Nh(e,i,t)}else Eh(e,this.dataType,this[z_],t);return e}function Ph(t,e){return t.struct&&t.struct.update(this),e}function Oh(t,e){return P_(e[O_],function(i,n){i!==e&&Eh(i.cloneShallow(),n,e,t)}),e}function zh(t){var e=this[z_];return null==t||null==e?e:e[O_][t]}function Rh(t){return t[z_]===t}function Nh(t,e,i){t[O_]={},P_(e,function(e,n){Eh(e,n,t,i)})}function Eh(t,e,i,n){i[O_][e]=t,t[z_]=i,t.dataType=e,n.struct&&(t[n.structAttr]=n.struct,n.struct[n.datasAttr[e]]=t),t.getLinkedData=zh}function Vh(t,e,i){this.root,this.data,this._nodes=[],this.hostModel=t,this.levelModels=g(e||[],function(e){return new Ao(e,t,t.ecModel)}),this.leavesModel=new Ao(i||{},t,t.ecModel)}function Bh(t,e){var i=e.children;t.parentNode!==e&&(i.push(t),t.parentNode=e)}function Wh(t,e){if(t&&("treemapZoomToNode"===t.type||"treemapRootToNode"===t.type)){var i=e.getData().tree.root,n=t.targetNode;if(n&&i.contains(n))return{node:n};var r=t.targetNodeId;if(null!=r&&(n=i.getNodeById(r)))return{node:n}}}function Hh(t){for(var e=[];t;)t=t.parentNode,t&&e.push(t);return e.reverse()}function Fh(t,e){var i=Hh(t);return h(i,e)>=0}function Gh(t,e){for(var i=[];t;){var n=t.dataIndex;i.push({name:t.name,dataIndex:n,value:e.getRawValue(n)}),t=t.parentNode}return i.reverse(),i}function Zh(t){var e=0;f(t.children,function(t){Zh(t);var i=t.value;x(i)&&(i=i[0]),e+=i});var i=t.value;x(i)&&(i=i[0]),(null==i||isNaN(i))&&(i=e),0>i&&(i=0),x(t.value)?t.value[0]=i:t.value=i}function Xh(t,e){var i=e.get("color");if(i){t=t||[];var n;if(f(t,function(t){var e=new Ao(t),i=e.get("color");(e.get("itemStyle.normal.color")||i&&"none"!==i)&&(n=!0)}),!n){var r=t[0]||(t[0]={});r.color=i.slice()}return t}}function qh(t){this.group=new ag,t.add(this.group)}function Yh(t,e,i,n,r,o){var a=[[r?t:t-V_,e],[t+i,e],[t+i,e+n],[r?t:t-V_,e+n]];return!o&&a.splice(2,0,[t+i+V_,e+n/2]),!r&&a.push([t,e+n/2]),a}function Uh(t,e,i){t.eventData={componentType:"series",componentSubType:"treemap",seriesIndex:e.componentIndex,seriesName:e.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:i&&i.dataIndex,name:i&&i.name},treePathInfo:i&&Gh(i,e)}}function jh(t,e){return!!$h(t)[e]}function $h(t){return t[B_]||(t[B_]={})}function Kh(t){this.pointerChecker,this._zr=t,this._opt={};var e=m,i=e(Qh,this),r=e(Jh,this),o=e(tu,this),a=e(eu,this),l=e(iu,this);Cf.call(this),this.setPointerChecker=function(t){this.pointerChecker=t},this.enable=function(e,h){this.disable(),this._opt=s(n(h)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,preventDefaultMouseMove:!0}),null==e&&(e=!0),(e===!0||"move"===e||"pan"===e)&&(t.on("mousedown",i),t.on("mousemove",r),t.on("mouseup",o)),(e===!0||"scale"===e||"zoom"===e)&&(t.on("mousewheel",a),t.on("pinch",l))},this.disable=function(){t.off("mousedown",i),t.off("mousemove",r),t.off("mouseup",o),t.off("mousewheel",a),t.off("pinch",l)},this.dispose=this.disable,this.isDragging=function(){return this._dragging},this.isPinching=function(){return this._pinching}}function Qh(t){if(!(ln(t)||t.target&&t.target.draggable)){var e=t.offsetX,i=t.offsetY;this.pointerChecker&&this.pointerChecker(t,e,i)&&(this._x=e,this._y=i,this._dragging=!0)}}function Jh(t){if(!ln(t)&&ru(this,"moveOnMouseMove",t)&&this._dragging&&"pinch"!==t.gestureEvent&&!jh(this._zr,"globalPan")){var e=t.offsetX,i=t.offsetY,n=this._x,r=this._y,o=e-n,a=i-r;this._x=e,this._y=i,this._opt.preventDefaultMouseMove&&Rg(t.event),this.trigger("pan",o,a,n,r,e,i)}}function tu(t){ln(t)||(this._dragging=!1)}function eu(t){if(ru(this,"zoomOnMouseWheel",t)&&0!==t.wheelDelta){var e=t.wheelDelta>0?1.1:1/1.1;nu.call(this,t,e,t.offsetX,t.offsetY)}}function iu(t){if(!jh(this._zr,"globalPan")){var e=t.pinchScale>1?1.1:1/1.1;nu.call(this,t,e,t.pinchX,t.pinchY)}}function nu(t,e,i,n){this.pointerChecker&&this.pointerChecker(t,i,n)&&(Rg(t.event),this.trigger("zoom",e,i,n))}function ru(t,e,i){var n=t._opt[e];return n&&(!w(n)||i.event[n+"Key"])}function ou(){var t,e=[],i={};return{add:function(t,n,r,o,a){return w(o)&&(a=o,o=0),i[t.id]?!1:(i[t.id]=1,e.push({el:t,target:n,time:r,delay:o,easing:a}),!0)},done:function(e){return t=e,this},start:function(){function n(){r--,r||(e.length=0,i={},t&&t())}for(var r=e.length,o=0,a=e.length;a>o;o++){var s=e[o];s.el.animateTo(s.target,s.time,s.delay,s.easing,n)}return this}}}function au(){return{nodeGroup:[],background:[],content:[]}}function su(t,e,i,r,o,s,l,h,u,c){function d(e,i,n){i.dataIndex=l.dataIndex,i.seriesIndex=t.seriesIndex,i.setShape({x:0,y:0,width:_,height:w});var r=l.getVisual("borderColor",!0),o=k.get("borderColor");g(i,function(){var t=J_(L);t.fill=r;var e=Q_(k);if(e.fill=o,n){var a=_-2*b;p(t,e,r,a,A,{x:b,y:0,width:a,height:A})}else t.text=e.text=null;i.setStyle(t),ao(i,e)}),e.add(i)}function f(e,i){i.dataIndex=l.dataIndex,i.seriesIndex=t.seriesIndex;var n=Math.max(_-2*b,0),r=Math.max(w-2*b,0);i.culling=!0,i.setShape({x:b,y:b,width:n,height:r});var o=l.getVisual("color",!0);g(i,function(){var t=J_(L);t.fill=o;var e=Q_(k);p(t,e,o,n,r),i.setStyle(t),ao(i,e)}),e.add(i)}function g(t,e){M?!t.invisible&&s.push(t):(e(),t.__tmWillVisible||(t.invisible=!1))}function p(e,i,r,o,a,s){var h=l.getModel(),u=T(t.getFormattedLabel(l.dataIndex,"normal",null,null,s?"upperLabel":"label"),h.get("name"));if(!s&&x.isLeafRoot){var c=t.get("drillDownIcon",!0);u=c?c+" "+u:u}var d=h.getModel(s?Y_:X_),f=h.getModel(s?U_:q_),g=d.getShallow("show");so(e,i,d,f,{defaultText:g?u:null,autoColor:r,isRectText:!0}),s&&(e.textRect=n(s)),e.truncate=g&&d.get("ellipsis")?{outerWidth:o,outerHeight:a,minChar:2}:null}function v(t,n,r,a){var s=null!=I&&i[t][I],l=o[t];return s?(i[t][I]=null,m(l,s,t)):M||(s=new n({z:lu(r,a)}),s.__tmDepth=r,s.__tmStorageName=t,y(l,s,t)),e[t][S]=s}function m(t,e,i){var n=t[S]={};n.old="nodeGroup"===i?e.position.slice():a({},e.shape)}function y(t,e,i){var n=t[S]={},a=l.parentNode;if(a&&(!r||"drillDown"===r.direction)){var s=0,h=0,u=o.background[a.getRawIndex()];!r&&u&&u.old&&(s=u.old.width,h=u.old.height),n.old="nodeGroup"===i?[0,h]:{x:s,y:h,width:0,height:0}}n.fadein="nodeGroup"!==i}if(l){var x=l.getLayout();if(x&&x.isInView){var _=x.width,w=x.height,b=x.borderWidth,M=x.invisible,S=l.getRawIndex(),I=h&&h.getRawIndex(),D=l.viewChildren,A=x.upperHeight,C=D&&D.length,L=l.getModel("itemStyle.normal"),k=l.getModel("itemStyle.emphasis"),P=v("nodeGroup",H_);if(P){if(u.add(P),P.attr("position",[x.x||0,x.y||0]),P.__tmNodeWidth=_,P.__tmNodeHeight=w,x.isAboveViewRoot)return P;var O=v("background",F_,c,$_);if(O&&d(P,O,C&&x.upperHeight),!C){var z=v("content",F_,c,K_);z&&f(P,z)}return P}}}}function lu(t,e){var i=t*j_+e;return(i-1)/i}function hu(t){var e=t.pieceList;t.hasSpecialVisual=!1,f(e,function(e,i){e.originIndex=i,null!=e.visual&&(t.hasSpecialVisual=!0)})}function uu(t){var e=t.categories,i=t.visual,n=t.categoryMap={};if(nw(e,function(t,e){n[t]=e}),!x(i)){var r=[];b(i)?nw(i,function(t,e){var i=n[e];r[null!=i?i:ow]=t}):r[ow]=i,i=xu(t,r)}for(var o=e.length-1;o>=0;o--)null==i[o]&&(delete n[e[o]],e.pop())}function cu(t,e){var i=t.visual,n=[];b(i)?nw(i,function(t){n.push(t)}):null!=i&&n.push(i);var r={color:1,symbol:1};e||1!==n.length||r.hasOwnProperty(t.type)||(n[1]=n[0]),xu(t,n)}function du(t){return{applyVisual:function(e,i,n){e=this.mapValueToVisual(e),n("color",t(i("color"),e))},_doMap:mu([0,1])}}function fu(t){var e=this.option.visual;return e[Math.round(xn(t,[0,1],[0,e.length-1],!0))]||{}}function gu(t){return function(e,i,n){n(t,this.mapValueToVisual(e))}}function pu(t){var e=this.option.visual;return e[this.option.loop&&t!==ow?t%e.length:t]}function vu(){return this.option.visual[0]}function mu(t){return{linear:function(e){return xn(e,t,this.option.visual,!0)},category:pu,piecewise:function(e,i){var n=yu.call(this,i);return null==n&&(n=xn(e,t,this.option.visual,!0)),n},fixed:vu}}function yu(t){var e=this.option,i=e.pieceList;if(e.hasSpecialVisual){var n=aw.findPieceIndex(t,i),r=i[n];if(r&&r.visual)return r.visual[this.type]}}function xu(t,e){return t.visual=e,"color"===t.type&&(t.parsedVisual=g(e,function(t){return Me(t)})),e}function _u(t,e,i){return t?i>=e:i>e}function wu(t,e,i,n,r,o){var a=t.getModel(),s=t.getLayout();if(s&&!s.invisible&&s.isInView){var l,h=t.getModel(uw),u=i[t.depth],c=bu(h,e,u,n),d=h.get("borderColor"),g=h.get("borderColorSaturation");null!=g&&(l=Mu(c,t),d=Su(g,l)),t.setVisual("borderColor",d);var p=t.viewChildren;if(p&&p.length){var v=Tu(t,a,s,h,c,p);f(p,function(t,e){if(t.depth>=r.length||t===r[t.depth]){var s=Au(a,c,t,e,v,o);wu(t,s,i,n,r,o)}})}else l=Mu(c,t),t.setVisual("color",l)}}function bu(t,e,i,n){var r=a({},e);return f(["color","colorAlpha","colorSaturation"],function(o){var a=t.get(o,!0);null==a&&i&&(a=i[o]),null==a&&(a=e[o]),null==a&&(a=n.get(o)),null!=a&&(r[o]=a)}),r}function Mu(t){var e=Iu(t,"color");if(e){var i=Iu(t,"colorAlpha"),n=Iu(t,"colorSaturation");return n&&(e=Ce(e,null,null,n)),i&&(e=Le(e,i)),e}}function Su(t,e){return null!=e?Ce(e,null,null,t):null}function Iu(t,e){var i=t[e];return null!=i&&"none"!==i?i:void 0}function Tu(t,e,i,n,r,o){if(o&&o.length){var a=Du(e,"color")||null!=r.color&&"none"!==r.color&&(Du(e,"colorAlpha")||Du(e,"colorSaturation"));if(a){var s=e.get("visualMin"),l=e.get("visualMax"),h=i.dataExtent.slice();null!=s&&sh[1]&&(h[1]=l);var u=e.get("colorMappingBy"),c={type:a.name,dataExtent:h,visual:a.range};"color"!==c.type||"index"!==u&&"id"!==u?c.mappingMethod="linear":(c.mappingMethod="category",c.loop=!0);var d=new aw(c);return d.__drColorMappingBy=u,d}}}function Du(t,e){var i=t.get(e);return hw(i)&&i.length?{name:e,range:i}:null}function Au(t,e,i,n,r,o){var s=a({},e);if(r){var l=r.type,h="color"===l&&r.__drColorMappingBy,u="index"===h?n:"id"===h?o.mapIdToIndex(i.getId()):i.getValue(t.get("visualDimension"));s[l]=r.mapValueToVisual(u)}return s}function Cu(t,e,i,n){var r,o;if(!t.isRemoved()){var a=t.getLayout();r=a.width,o=a.height;var s=t.getModel(),l=s.get(vw),h=s.get(mw)/2,u=Bu(s),c=Math.max(l,u),d=l-h,f=c-h,s=t.getModel();t.setLayout({borderWidth:l,upperHeight:c,upperLabelHeight:u},!0),r=dw(r-2*d,0),o=dw(o-d-f,0);var g=r*o,p=Lu(t,s,g,e,i,n);if(p.length){var v={x:d,y:f,width:r,height:o},m=fw(r,o),y=1/0,x=[];x.area=0;for(var _=0,w=p.length;w>_;){var b=p[_];x.push(b),x.area+=b.getLayout().area;var M=zu(x,m,e.squareRatio);y>=M?(_++,y=M):(x.area-=x.pop().getLayout().area,Ru(x,m,v,h,!1),m=fw(v.width,v.height),x.length=x.area=0,y=1/0)}if(x.length&&Ru(x,m,v,h,!0),!i){var S=s.get("childrenVisibleMin");null!=S&&S>g&&(i=!0)}for(var _=0,w=p.length;w>_;_++)Cu(p[_],e,i,n+1)}}}function Lu(t,e,i,n,r,o){var a=t.children||[],s=n.sort;"asc"!==s&&"desc"!==s&&(s=null);var l=null!=n.leafDepth&&n.leafDepth<=o;if(r&&!l)return t.viewChildren=[];a=v(a,function(t){return!t.isRemoved()}),Pu(a,s);var h=Ou(e,a,s);if(0===h.sum)return t.viewChildren=[];if(h.sum=ku(e,i,h.sum,s,a),0===h.sum)return t.viewChildren=[];for(var u=0,c=a.length;c>u;u++){var d=a[u].getValue()/h.sum*i;a[u].setLayout({area:d})}return l&&(a.length&&t.setLayout({isLeafRoot:!0},!0),a.length=0),t.viewChildren=a,t.setLayout({dataExtent:h.dataExtent},!0),a}function ku(t,e,i,n,r){if(!n)return i;for(var o=t.get("visibleMin"),a=r.length,s=a,l=a-1;l>=0;l--){var h=r["asc"===n?a-l-1:l].getValue();o>h/i*e&&(s=l,i-=h)}return"asc"===n?r.splice(0,a-s):r.splice(s,a-s),i}function Pu(t,e){return e&&t.sort(function(t,i){var n="asc"===e?t.getValue()-i.getValue():i.getValue()-t.getValue();return 0===n?"asc"===e?t.dataIndex-i.dataIndex:i.dataIndex-t.dataIndex:n}),t}function Ou(t,e,i){for(var n=0,r=0,o=e.length;o>r;r++)n+=e[r].getValue();var a,s=t.get("visualDimension");if(e&&e.length)if("value"===s&&i)a=[e[e.length-1].getValue(),e[0].getValue()],"asc"===i&&a.reverse();else{var a=[1/0,-1/0];pw(e,function(t){var e=t.getValue(s);ea[1]&&(a[1]=e)})}else a=[0/0,0/0];return{sum:n,dataExtent:a}}function zu(t,e,i){for(var n,r=0,o=1/0,a=0,s=t.length;s>a;a++)n=t[a].getLayout().area,n&&(o>n&&(o=n),n>r&&(r=n));var l=t.area*t.area,h=e*e*i;return l?dw(h*r/l,l/(h*o)):1/0}function Ru(t,e,i,n,r){var o=e===i.width?0:1,a=1-o,s=["x","y"],l=["width","height"],h=i[s[o]],u=e?t.area/e:0;(r||u>i[l[a]])&&(u=i[l[a]]);for(var c=0,d=t.length;d>c;c++){var f=t[c],g={},p=u?f.getLayout().area/u:0,v=g[l[a]]=dw(u-2*n,0),m=i[s[o]]+i[l[o]]-h,y=c===d-1||p>m?m:p,x=g[l[o]]=dw(y-2*n,0);g[s[a]]=i[s[a]]+fw(n,v/2),g[s[o]]=h+fw(n,x/2),h+=y,f.setLayout(g,!0)}i[s[a]]+=u,i[l[a]]-=u}function Nu(t,e,i,n,r){var o=(e||{}).node,a=[n,r];if(!o||o===i)return a;for(var s,l=n*r,h=l*t.option.zoomToNodeRatio;s=o.parentNode;){for(var u=0,c=s.children,d=0,f=c.length;f>d;d++)u+=c[d].getValue();var g=o.getValue();if(0===g)return a;h*=u/g;var p=s.getModel(),v=p.get(vw),m=Math.max(v,Bu(p,v));h+=4*v*v+(3*v+m)*Math.pow(h,.5),h>$g&&(h=$g),o=s}l>h&&(h=l);var y=Math.pow(h/l,.5);return[n*y,r*y]}function Eu(t,e,i){if(e)return{x:e.x,y:e.y};var n={x:0,y:0};if(!i)return n;var r=i.node,o=r.getLayout();if(!o)return n;for(var a=[o.width/2,o.height/2],s=r;s;){var l=s.getLayout();a[0]+=l.x,a[1]+=l.y,s=s.parentNode}return{x:t.width/2-a[0],y:t.height/2-a[1]}}function Vu(t,e,i,n,r){var o=t.getLayout(),a=i[r],s=a&&a===t;if(!(a&&!s||r===i.length&&t!==n)){t.setLayout({isInView:!0,invisible:!s&&!e.intersect(o),isAboveViewRoot:s},!0);var l=new Xe(e.x-o.x,e.y-o.y,e.width,e.height);pw(t.viewChildren||[],function(t){Vu(t,l,i,n,r+1)})}}function Bu(t){return t.get(yw)?t.get(xw):0}function Wu(t,e){var i=t.get("center"),n=e.getWidth(),r=e.getHeight(),o=Math.min(n,r),a=_n(i[0],e.getWidth()),s=_n(i[1],e.getHeight()),l=_n(t.get("radius"),o/2);return{cx:a,cy:s,r:l}}function Hu(t,e){return e&&("string"==typeof e?t=e.replace("{value}",null!=t?t:""):"function"==typeof e&&(t=e(t))),t}function Fu(t){this._model=t}function Gu(t,e,i,n){var r=i.calendarModel,o=i.seriesModel,a=r?r.coordinateSystem:o?o.coordinateSystem:null;return a===this?a[t](n):null}function Zu(t,e){var i=t.cellSize;x(i)?1===i.length&&(i[1]=i[0]):i=t.cellSize=[i,i];var n=g([0,1],function(t){return Jo(e,t)&&(i[t]="auto"),null!=i[t]&&"auto"!==i[t]});ta(t,e,{type:"box",ignoreSize:n})}function Xu(t,e,i){var n,r={},o="toggleSelected"===t;return i.eachComponent("legend",function(i){o&&null!=n?i[n?"select":"unSelect"](e.name):(i[t](e.name),n=i.isSelected(e.name));var a=i.getData();f(a,function(t){var e=t.get("name");if("\n"!==e&&""!==e){var n=i.isSelected(e);r[e]=r.hasOwnProperty(e)?r[e]&&n:n}})}),{name:e.name,selected:r}}function qu(t,e){var i=Qg(e.get("padding")),n=e.getItemStyle(["color","opacity"]);n.fill=e.get("backgroundColor");var t=new bv({shape:{x:t.x-i[3],y:t.y-i[0],width:t.width+i[1]+i[3],height:t.height+i[0]+i[2],r:e.get("borderRadius")},style:n,silent:!0,z2:-1});return t}function Yu(t,e){e.dispatchAction({type:"legendToggleSelect",name:t})}function Uu(t,e,i){var n=i.getZr().storage.getDisplayList()[0];n&&n.useHoverLayer||t.get("legendHoverLink")&&i.dispatchAction({type:"highlight",seriesName:t.name,name:e})}function ju(t,e,i){var n=i.getZr().storage.getDisplayList()[0];n&&n.useHoverLayer||t.get("legendHoverLink")&&i.dispatchAction({type:"downplay",seriesName:t.name,name:e})}function $u(t,e,i){var n=t.getOrient(),r=[1,1];r[n.index]=0,ta(e,i,{type:"box",ignoreSize:r})}function Ku(t,e,i,n,r){var o=t.axis;if(!o.scale.isBlank()&&o.containData(e)){if(!t.involveSeries)return void i.showPointer(t,e);var s=Qu(e,t),l=s.payloadBatch,h=s.snapToValue;l[0]&&null==r.seriesIndex&&a(r,l[0]),!n&&t.snap&&o.containData(h)&&null!=h&&(e=h),i.showPointer(t,e,l,r),i.showTooltip(t,s,h)}}function Qu(t,e){var i=e.axis,n=i.dim,r=t,o=[],a=Number.MAX_VALUE,s=-1;return Bw(e.seriesModels,function(e){var l,h,u=e.coordDimToDataDim(n);if(e.getAxisTooltipData){var c=e.getAxisTooltipData(u,t,i);h=c.dataIndices,l=c.nestestValue}else{if(h=e.getData().indicesOfNearest(u[0],t,!1,"category"===i.type?.5:null),!h.length)return;l=e.getData().get(u[0],h[0])}if(null!=l&&isFinite(l)){var d=t-l,f=Math.abs(d);a>=f&&((a>f||d>=0&&0>s)&&(a=f,s=d,r=l,o.length=0),Bw(h,function(t){o.push({seriesIndex:e.seriesIndex,dataIndexInside:t,dataIndex:e.getData().getRawIndex(t)})}))}}),{payloadBatch:o,snapToValue:r}}function Ju(t,e,i,n){t[e.key]={value:i,payloadBatch:n}}function tc(t,e,i,n){var r=i.payloadBatch,o=e.axis,a=o.model,s=e.axisPointerModel;if(e.triggerTooltip&&r.length){var l=e.coordSys.model,h=Zl(l),u=t.map[h];u||(u=t.map[h]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},t.list.push(u)),u.dataByAxis.push({axisDim:o.dim,axisIndex:a.componentIndex,axisType:a.type,axisId:a.id,value:n,valueLabelOpt:{precision:s.get("label.precision"),formatter:s.get("label.formatter")},seriesDataIndices:r.slice()})}}function ec(t,e,i){var n=i.axesInfo=[];Bw(e,function(e,i){var r=e.axisPointerModel.option,o=t[i];o?(!e.useHandle&&(r.status="show"),r.value=o.value,r.seriesDataIndices=(o.payloadBatch||[]).slice()):!e.useHandle&&(r.status="hide"),"show"===r.status&&n.push({axisDim:e.axis.dim,axisIndex:e.axis.model.componentIndex,value:r.value})})}function ic(t,e,i,n){if(ac(e)||!t.list.length)return void n({type:"hideTip"});var r=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};n({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:i.tooltipOption,position:i.position,dataIndexInside:r.dataIndexInside,dataIndex:r.dataIndex,seriesIndex:r.seriesIndex,dataByCoordSys:t.list})}function nc(t,e,i){var n=i.getZr(),r="axisPointerLastHighlights",o=Hw(n)[r]||{},a=Hw(n)[r]={};Bw(t,function(t){var e=t.axisPointerModel.option;"show"===e.status&&Bw(e.seriesDataIndices,function(t){var e=t.seriesIndex+" | "+t.dataIndex;a[e]=t})});var s=[],l=[];f(o,function(t,e){!a[e]&&l.push(t)}),f(a,function(t,e){!o[e]&&s.push(t)}),l.length&&i.dispatchAction({type:"downplay",escapeConnect:!0,batch:l}),s.length&&i.dispatchAction({type:"highlight",escapeConnect:!0,batch:s})}function rc(t,e){for(var i=0;i<(t||[]).length;i++){var n=t[i];if(e.axis.dim===n.axisDim&&e.axis.model.componentIndex===n.axisIndex)return n}}function oc(t){var e=t.axis.model,i={},n=i.axisDim=t.axis.dim;return i.axisIndex=i[n+"AxisIndex"]=e.componentIndex,i.axisName=i[n+"AxisName"]=e.name,i.axisId=i[n+"AxisId"]=e.id,i}function ac(t){return!t||null==t[0]||isNaN(t[0])||null==t[1]||isNaN(t[1])}function sc(t,e,i){if(!hf.node){var n=e.getZr();Gw(n).records||(Gw(n).records={}),lc(n,e);var r=Gw(n).records[t]||(Gw(n).records[t]={});r.handler=i}}function lc(t,e){function i(i,n){t.on(i,function(i){var r=dc(e);Zw(Gw(t).records,function(t){t&&n(t,i,r.dispatchAction)}),hc(r.pendings,e)})}Gw(t).initialized||(Gw(t).initialized=!0,i("click",y(cc,"click")),i("mousemove",y(cc,"mousemove")),i("globalout",uc))}function hc(t,e){var i,n=t.showTip.length,r=t.hideTip.length;n?i=t.showTip[n-1]:r&&(i=t.hideTip[r-1]),i&&(i.dispatchAction=null,e.dispatchAction(i))}function uc(t,e,i){t.handler("leave",null,i)}function cc(t,e,i,n){e.handler(t,i,n)}function dc(t){var e={showTip:[],hideTip:[]},i=function(n){var r=e[n.type];r?r.push(n):(n.dispatchAction=i,t.dispatchAction(n))};return{dispatchAction:i,pendings:e}}function fc(t,e){if(!hf.node){var i=e.getZr(),n=(Gw(i).records||{})[t];n&&(Gw(i).records[t]=null)}}function gc(){}function pc(t,e,i,n){vc(qw(i).lastProp,n)||(qw(i).lastProp=n,e?xo(i,n,t):(i.stopAnimation(),i.attr(n)))}function vc(t,e){if(b(t)&&b(e)){var i=!0;return f(e,function(e,n){i=i&&vc(t[n],e)}),!!i}return t===e}function mc(t,e){t[e.get("label.show")?"show":"hide"]()}function yc(t){return{position:t.position.slice(),rotation:t.rotation||0}}function xc(t,e,i){var n=e.get("z"),r=e.get("zlevel");t&&t.traverse(function(t){"group"!==t.type&&(null!=n&&(t.z=n),null!=r&&(t.zlevel=r),t.silent=i)})}function _c(t){var e,i=t.get("type"),n=t.getModel(i+"Style");return"line"===i?(e=n.getLineStyle(),e.fill=null):"shadow"===i&&(e=n.getAreaStyle(),e.stroke=null),e}function wc(t,e,i,n,r){var o=i.get("value"),a=Mc(o,e.axis,e.ecModel,i.get("seriesDataIndices"),{precision:i.get("label.precision"),formatter:i.get("label.formatter")}),s=i.getModel("label"),l=Qg(s.get("padding")||0),h=s.getFont(),u=ui(a,h),c=r.position,d=u.width+l[1]+l[3],f=u.height+l[0]+l[2],g=r.align;"right"===g&&(c[0]-=d),"center"===g&&(c[0]-=d/2);var p=r.verticalAlign;"bottom"===p&&(c[1]-=f),"middle"===p&&(c[1]-=f/2),bc(c,d,f,n);var v=s.get("backgroundColor");v&&"auto"!==v||(v=e.get("axisLine.lineStyle.color")),t.label={shape:{x:0,y:0,width:d,height:f,r:s.get("borderRadius")},position:c.slice(),style:{text:a,textFont:h,textFill:s.getTextColor(),textPosition:"inside",fill:v,stroke:s.get("borderColor")||"transparent",lineWidth:s.get("borderWidth")||0,shadowBlur:s.get("shadowBlur"),shadowColor:s.get("shadowColor"),shadowOffsetX:s.get("shadowOffsetX"),shadowOffsetY:s.get("shadowOffsetY")},z2:10}}function bc(t,e,i,n){var r=n.getWidth(),o=n.getHeight();t[0]=Math.min(t[0]+e,r)-e,t[1]=Math.min(t[1]+i,o)-i,t[0]=Math.max(t[0],0),t[1]=Math.max(t[1],0)}function Mc(t,e,i,n,r){var o=e.scale.getLabel(t,{precision:r.precision}),a=r.formatter;if(a){var s={value:Hs(e,t),seriesData:[]};f(n,function(t){var e=i.getSeriesByIndex(t.seriesIndex),n=t.dataIndexInside,r=e&&e.getDataParams(n);r&&s.seriesData.push(r)}),w(a)?o=a.replace("{value}",o):_(a)&&(o=a(s))}return o}function Sc(t,e,i){var n=ne();return le(n,n,i.rotation),se(n,n,i.position),bo([t.dataToCoord(e),(i.labelOffset||0)+(i.labelDirection||1)*(i.labelMargin||0)],n)}function Ic(t,e,i,n,r,o){var a=Nx.innerTextLayout(i.rotation,0,i.labelDirection);i.labelMargin=r.get("label.margin"),wc(e,n,r,o,{position:Sc(n.axis,t,i),align:a.textAlign,verticalAlign:a.textVerticalAlign})}function Tc(t,e,i){return i=i||0,{x1:t[i],y1:t[1-i],x2:e[i],y2:e[1-i]}}function Dc(t,e,i){return i=i||0,{x:t[i],y:t[1-i],width:e[i],height:e[1-i]}}function Ac(t,e){var i={};return i[e.dim+"AxisIndex"]=e.index,t.getCartesian(i)}function Cc(t){return"x"===t.dim?0:1}function Lc(t){var e="cubic-bezier(0.23, 1, 0.32, 1)",i="left "+t+"s "+e+",top "+t+"s "+e;return g(Jw,function(t){return t+"transition:"+i}).join(";")}function kc(t){var e=[],i=t.get("fontSize"),n=t.getTextColor();return n&&e.push("color:"+n),e.push("font:"+t.getFont()),i&&e.push("line-height:"+Math.round(3*i/2)+"px"),Kw(["decoration","align"],function(i){var n=t.get(i);n&&e.push("text-"+i+":"+n)}),e.join(";")}function Pc(t){var e=[],i=t.get("transitionDuration"),n=t.get("backgroundColor"),r=t.getModel("textStyle"),o=t.get("padding");return i&&e.push(Lc(i)),n&&(hf.canvasSupported?e.push("background-Color:"+n):(e.push("background-Color:#"+De(n)),e.push("filter:alpha(opacity=70)"))),Kw(["width","color","radius"],function(i){var n="border-"+i,r=Qw(n),o=t.get(r);null!=o&&e.push(n+":"+o+("color"===i?"":"px"))}),e.push(kc(r)),null!=o&&e.push("padding:"+Qg(o).join("px ")+"px"),e.join(";")+";"}function Oc(t,e){var i=document.createElement("div"),n=this._zr=e.getZr();this.el=i,this._x=e.getWidth()/2,this._y=e.getHeight()/2,t.appendChild(i),this._container=t,this._show=!1,this._hideTimeout;var r=this;i.onmouseenter=function(){r._enterable&&(clearTimeout(r._hideTimeout),r._show=!0),r._inContent=!0},i.onmousemove=function(e){if(e=e||window.event,!r._enterable){var i=n.handler;on(t,e,!0),i.dispatch("mousemove",e)}},i.onmouseleave=function(){r._enterable&&r._show&&r.hideLater(r._hideDelay),r._inContent=!1}}function zc(t){for(var e=t.pop();t.length;){var i=t.pop();i&&(i instanceof Ao&&(i=i.get("tooltip",!0)),"string"==typeof i&&(i={formatter:i}),e=new Ao(i,e,e.ecModel))}return e}function Rc(t,e){return t.dispatchAction||m(e.dispatchAction,e)}function Nc(t,e,i,n,r,o,a){var s=Vc(i),l=s.width,h=s.height;return null!=o&&(t+l+o>n?t-=l+o:t+=o),null!=a&&(e+h+a>r?e-=h+a:e+=a),[t,e]}function Ec(t,e,i,n,r){var o=Vc(i),a=o.width,s=o.height;return t=Math.min(t+a,n)-a,e=Math.min(e+s,r)-s,t=Math.max(t,0),e=Math.max(e,0),[t,e]}function Vc(t){var e=t.clientWidth,i=t.clientHeight;if(document.defaultView&&document.defaultView.getComputedStyle){var n=document.defaultView.getComputedStyle(t);n&&(e+=parseInt(n.paddingLeft,10)+parseInt(n.paddingRight,10)+parseInt(n.borderLeftWidth,10)+parseInt(n.borderRightWidth,10),i+=parseInt(n.paddingTop,10)+parseInt(n.paddingBottom,10)+parseInt(n.borderTopWidth,10)+parseInt(n.borderBottomWidth,10))}return{width:e,height:i}}function Bc(t,e,i){var n=i[0],r=i[1],o=5,a=0,s=0,l=e.width,h=e.height;switch(t){case"inside":a=e.x+l/2-n/2,s=e.y+h/2-r/2;break;case"top":a=e.x+l/2-n/2,s=e.y-r-o;break;case"bottom":a=e.x+l/2-n/2,s=e.y+h+o;break;case"left":a=e.x-n-o,s=e.y+h/2-r/2;break;case"right":a=e.x+l+o,s=e.y+h/2-r/2}return[a,s]}function Wc(t){return"center"===t||"middle"===t}function Hc(t){Po(t.label,["show"])}function Fc(t){return!(isNaN(parseFloat(t.x))&&isNaN(parseFloat(t.y)))}function Gc(t){return!isNaN(parseFloat(t.x))&&!isNaN(parseFloat(t.y))}function Zc(t,e,i){var n=-1;do n=Math.max(Mn(t.get(e,i)),n),t=t.stackedOn;while(t);return n}function Xc(t,e,i,n,r,o){var a=[],s=$c(e,n,t),l=e.indicesOfNearest(n,s,!0)[0];a[r]=e.get(i,l,!0),a[o]=e.get(n,l,!0);var h=Zc(e,n,l);return h=Math.min(h,20),h>=0&&(a[o]=+a[o].toFixed(h)),a}function qc(t,e){var i=t.getData(),r=t.coordinateSystem;if(e&&!Gc(e)&&!x(e.coord)&&r){var o=r.dimensions,a=Yc(e,i,r,t);if(e=n(e),e.type&&ub[e.type]&&a.baseAxis&&a.valueAxis){var s=lb(o,a.baseAxis.dim),l=lb(o,a.valueAxis.dim);e.coord=ub[e.type](i,a.baseDataDim,a.valueDataDim,s,l),e.value=e.coord[l]}else{for(var h=[null!=e.xAxis?e.xAxis:e.radiusAxis,null!=e.yAxis?e.yAxis:e.angleAxis],u=0;2>u;u++)if(ub[h[u]]){var c=t.coordDimToDataDim(o[u])[0];h[u]=$c(i,c,h[u])}e.coord=h}}return e}function Yc(t,e,i,n){var r={};return null!=t.valueIndex||null!=t.valueDim?(r.valueDataDim=null!=t.valueIndex?e.getDimension(t.valueIndex):t.valueDim,r.valueAxis=i.getAxis(n.dataDimToCoordDim(r.valueDataDim)),r.baseAxis=i.getOtherAxis(r.valueAxis),r.baseDataDim=n.coordDimToDataDim(r.baseAxis.dim)[0]):(r.baseAxis=n.getBaseAxis(),r.valueAxis=i.getOtherAxis(r.baseAxis),r.baseDataDim=n.coordDimToDataDim(r.baseAxis.dim)[0],r.valueDataDim=n.coordDimToDataDim(r.valueAxis.dim)[0]),r }function Uc(t,e){return t&&t.containData&&e.coord&&!Fc(e)?t.containData(e.coord):!0}function jc(t,e,i,n){return 2>n?t.coord&&t.coord[n]:t.value}function $c(t,e,i){if("average"===i){var n=0,r=0;return t.each(e,function(t){isNaN(t)||(n+=t,r++)},!0),n/r}return t.getDataExtent(e,!0)["max"===i?1:0]}function Kc(t,e,i){var n=e.coordinateSystem;t.each(function(r){var o,a=t.getItemModel(r),s=_n(a.get("x"),i.getWidth()),l=_n(a.get("y"),i.getHeight());if(isNaN(s)||isNaN(l)){if(e.getMarkerPosition)o=e.getMarkerPosition(t.getValues(t.dimensions,r));else if(n){var h=t.get(n.dimensions[0],r),u=t.get(n.dimensions[1],r);o=n.dataToPoint([h,u])}}else o=[s,l];isNaN(s)||(o[0]=s),isNaN(l)||(o[1]=l),t.setItemLayout(r,o)})}function Qc(t,e,i){var n;n=t?g(t&&t.dimensions,function(t){var i=e.getData().getDimensionInfo(e.coordDimToDataDim(t)[0])||{};return i.name=t,i}):[{name:"value",type:"float"}];var r=new dx(n,i),o=g(i.get("data"),y(qc,e));return t&&(o=v(o,y(Uc,t))),r.initData(o,null,t?jc:function(t){return t.value}),r}function Jc(t){return isNaN(+t.cpx1)||isNaN(+t.cpy1)}function td(t){return"_"+t+"Type"}function ed(t,e,i){var n=e.getItemVisual(i,"color"),r=e.getItemVisual(i,t),o=e.getItemVisual(i,t+"Size");if(r&&"none"!==r){x(o)||(o=[o,o]);var a=Sl(r,-o[0]/2,-o[1]/2,o[0],o[1],n);return a.name=t,a}}function id(t){var e=new gb({name:"line"});return nd(e.shape,t),e}function nd(t,e){var i=e[0],n=e[1],r=e[2];t.x1=i[0],t.y1=i[1],t.x2=n[0],t.y2=n[1],t.percent=1,r?(t.cpx1=r[0],t.cpy1=r[1]):(t.cpx1=0/0,t.cpy1=0/0)}function rd(){var t=this,e=t.childOfName("fromSymbol"),i=t.childOfName("toSymbol"),n=t.childOfName("label");if(e||i||!n.ignore){for(var r=1,o=this.parent;o;)o.scale&&(r/=o.scale[0]),o=o.parent;var a=t.childOfName("line");if(this.__dirty||a.__dirty){var s=a.shape.percent,l=a.pointAt(0),h=a.pointAt(s),u=F([],h,l);if(q(u,u),e){e.attr("position",l);var c=a.tangentAt(0);e.attr("rotation",Math.PI/2-Math.atan2(c[1],c[0])),e.attr("scale",[r*s,r*s])}if(i){i.attr("position",h);var c=a.tangentAt(1);i.attr("rotation",-Math.PI/2-Math.atan2(c[1],c[0])),i.attr("scale",[r*s,r*s])}if(!n.ignore){n.attr("position",h);var d,f,g,p=5*r;if("end"===n.__position)d=[u[0]*p+h[0],u[1]*p+h[1]],f=u[0]>.8?"left":u[0]<-.8?"right":"center",g=u[1]>.8?"top":u[1]<-.8?"bottom":"middle";else if("middle"===n.__position){var v=s/2,c=a.tangentAt(v),m=[c[1],-c[0]],y=a.pointAt(v);m[1]>0&&(m[0]=-m[0],m[1]=-m[1]),d=[y[0]+m[0]*p,y[1]+m[1]*p],f="center",g="bottom";var x=-Math.atan2(c[1],c[0]);h[0].8?"right":u[0]<-.8?"left":"center",g=u[1]>.8?"bottom":u[1]<-.8?"top":"middle";n.attr({style:{textVerticalAlign:n.__verticalAlign||g,textAlign:n.__textAlign||f},position:d,scale:[r,r]})}}}}function od(t,e,i){ag.call(this),this._createLine(t,e,i)}function ad(t){return isNaN(t[0])||isNaN(t[1])}function sd(t){return!ad(t[0])&&!ad(t[1])}function ld(t){this._ctor=t||od,this.group=new ag}function hd(t){return!isNaN(t)&&!isFinite(t)}function ud(t,e,i,n){var r=1-t,o=n.dimensions[t];return hd(e[r])&&hd(i[r])&&e[t]===i[t]&&n.getAxis(o).containData(e[t])}function cd(t,e){if("cartesian2d"===t.type){var i=e[0].coord,n=e[1].coord;if(i&&n&&(ud(1,i,n,t)||ud(0,i,n,t)))return!0}return Uc(t,e[0])&&Uc(t,e[1])}function dd(t,e,i,n,r){var o,a=n.coordinateSystem,s=t.getItemModel(e),l=_n(s.get("x"),r.getWidth()),h=_n(s.get("y"),r.getHeight());if(isNaN(l)||isNaN(h)){if(n.getMarkerPosition)o=n.getMarkerPosition(t.getValues(t.dimensions,e));else{var u=a.dimensions,c=t.get(u[0],e),d=t.get(u[1],e);o=a.dataToPoint([c,d])}if("cartesian2d"===a.type){var f=a.getAxis("x"),g=a.getAxis("y"),u=a.dimensions;hd(t.get(u[0],e))?o[0]=f.toGlobalCoord(f.getExtent()[i?0:1]):hd(t.get(u[1],e))&&(o[1]=g.toGlobalCoord(g.getExtent()[i?0:1]))}isNaN(l)||(o[0]=l),isNaN(h)||(o[1]=h)}else o=[l,h];t.setItemLayout(e,o)}function fd(t,e,i){var n;n=t?g(t&&t.dimensions,function(t){var i=e.getData().getDimensionInfo(e.coordDimToDataDim(t)[0])||{};return i.name=t,i}):[{name:"value",type:"float"}];var r=new dx(n,i),o=new dx(n,i),a=new dx([],i),s=g(i.get("data"),y(yb,e,t,i));t&&(s=v(s,y(cd,t)));var l=t?jc:function(t){return t.value};return r.initData(g(s,function(t){return t[0]}),null,l),o.initData(g(s,function(t){return t[1]}),null,l),a.initData(g(s,function(t){return t[2]})),a.hasItemOption=!0,{from:r,to:o,line:a}}function gd(t){return h(_b,t)>=0}function pd(t,e){t=t.slice();var i=g(t,Hn);e=(e||[]).slice();var n=g(e,Hn);return function(r,o){f(t,function(t,a){for(var s={name:t,capital:i[a]},l=0;l=0}function r(t,n){var r=!1;return e(function(e){f(i(t,e)||[],function(t){n.records[e.name][t]&&(r=!0)})}),r}function o(t,n){n.nodes.push(t),e(function(e){f(i(t,e)||[],function(t){n.records[e.name][t]=!0})})}return function(i){function a(t){!n(t,s)&&r(t,s)&&(o(t,s),l=!0)}var s={nodes:[],records:{}};if(e(function(t){s.records[t.name]={}}),!i)return s;o(i,s);var l;do l=!1,t(a);while(l);return s}}function md(t,e,i){var n=[1/0,-1/0];return bb(i,function(t){var i=t.getData();i&&bb(t.coordDimToDataDim(e),function(t){var e=i.getDataExtent(t);e[0]n[1]&&(n[1]=e[1])})}),n[1]0?0:0/0);var a=i.getMax(!0);return null!=a&&"dataMax"!==a&&"function"!=typeof a?e[1]=a:r&&(e[1]=o>0?o-1:0/0),i.get("scale",!0)||(e[0]>0&&(e[0]=0),e[1]<0&&(e[1]=0)),e}function xd(t,e){var i=t.getAxisModel(),n=t._percentWindow,r=t._valueWindow;if(n){var o=In(r,[0,500]);o=Math.min(o,20);var a=e||0===n[0]&&100===n[1];i.setRange(a?null:+r[0].toFixed(o),a?null:+r[1].toFixed(o))}}function _d(t){var e=t._minMaxSpan={},i=t._dataZoomModel;bb(["min","max"],function(n){e[n+"Span"]=i.get(n+"Span");var r=i.get(n+"ValueSpan");if(null!=r&&(e[n+"ValueSpan"]=r,r=t.getAxisModel().axis.scale.parse(r),null!=r)){var o=t._dataExtent;e[n+"Span"]=xn(o[0]+r,o,[0,100],!0)}})}function wd(t){var e={};return Ib(["start","end","startValue","endValue","throttle"],function(i){t.hasOwnProperty(i)&&(e[i]=t[i])}),e}function bd(t,e){var i=t._rangePropMode,n=t.get("rangeMode");Ib([["start","startValue"],["end","endValue"]],function(t,r){var o=null!=e[t[0]],a=null!=e[t[1]];o&&!a?i[r]="percent":!o&&a?i[r]="value":n?i[r]=n[r]:o&&(i[r]="percent")})}function Md(t,e){var i=t[e]-t[1-e];return{span:Math.abs(i),sign:i>0?-1:0>i?1:e?-1:1}}function Sd(t,e){return Math.min(e[1],Math.max(e[0],t))}function Id(t){var e={x:"y",y:"x",radius:"angle",angle:"radius"};return e[t]}function Td(t){return"vertical"===t?"ns-resize":"ew-resize"}function Dd(t,e){var i=kd(t),n=e.dataZoomId,r=e.coordId;f(i,function(t){var i=t.dataZoomInfos;i[n]&&h(e.allCoordIds,r)<0&&(delete i[n],t.count--)}),Od(i);var o=i[r];o||(o=i[r]={coordId:r,dataZoomInfos:{},count:0},o.controller=Pd(t,o),o.dispatchAction=y(Ed,t)),!o.dataZoomInfos[n]&&o.count++,o.dataZoomInfos[n]=e;var a=Vd(o.dataZoomInfos);o.controller.enable(a.controlType,a.opt),o.controller.setPointerChecker(e.containsPoint),ka(o,"dispatchAction",e.throttleRate,"fixRate")}function Ad(t,e){var i=kd(t);f(i,function(t){t.controller.dispose();var i=t.dataZoomInfos;i[e]&&(delete i[e],t.count--)}),Od(i)}function Cd(t,e){if(t&&"dataZoom"===t.type&&t.batch)for(var i=0,n=t.batch.length;n>i;i++)if(t.batch[i].dataZoomId===e)return!1;return!0}function Ld(t){return t.type+"\x00_"+t.id}function kd(t){var e=t.getZr();return e[Zb]||(e[Zb]={})}function Pd(t,e){var i=new Kh(t.getZr());return i.on("pan",Gb(zd,e)),i.on("zoom",Gb(Rd,e)),i}function Od(t){f(t,function(e,i){e.count||(e.controller.dispose(),delete t[i])})}function zd(t,e,i,n,r,o,a){Nd(t,function(s){return s.panGetRange(t.controller,e,i,n,r,o,a)})}function Rd(t,e,i,n){Nd(t,function(r){return r.zoomGetRange(t.controller,e,i,n)})}function Nd(t,e){var i=[];f(t.dataZoomInfos,function(t){var n=e(t);!t.disabled&&n&&i.push({dataZoomId:t.dataZoomId,start:n[0],end:n[1]})}),t.dispatchAction(i)}function Ed(t,e){t.dispatchAction({type:"dataZoom",batch:e})}function Vd(t){var e,i={},n={"true":2,move:1,"false":0,undefined:-1};return f(t,function(t){var r=t.disabled?!1:t.zoomLock?"move":!0;n[r]>n[e]&&(e=r),a(i,t.roamControllerOpt)}),{controlType:e,opt:i}}function Bd(t,e,i){i.getAxisProxy(t.name,e).reset(i)}function Wd(t,e,i){i.getAxisProxy(t.name,e).filterData(i)}function Hd(t,e){return t&&t.hasOwnProperty&&t.hasOwnProperty(e)}function Fd(t){if(t)for(var e in t)if(t.hasOwnProperty(e))return!0}function Gd(t,e,i){function r(){var t=function(){};t.prototype.__hidden=t.prototype;var e=new t;return e}var o={};return $b(e,function(e){var a=o[e]=r();$b(t[e],function(t,r){if(aw.isValidType(r)){var o={type:r,visual:t};i&&i(o,e),a[r]=new aw(o),"opacity"===r&&(o=n(o),o.type="colorAlpha",a.__hidden.__alphaForOpacity=new aw(o))}})}),o}function Zd(t,e,i){var r;f(i,function(t){e.hasOwnProperty(t)&&Fd(e[t])&&(r=!0)}),r&&f(i,function(i){e.hasOwnProperty(i)&&Fd(e[i])?t[i]=n(e[i]):delete t[i]})}function Xd(t,e,i,n,r,o){function a(t){return i.getItemVisual(u,t)}function s(t,e){i.setItemVisual(u,t,e)}function l(t,l){u=null==o?t:l;var c=i.getRawDataItem(u);if(!c||c.visualMap!==!1)for(var d=n.call(r,t),f=e[d],g=h[d],p=0,v=g.length;v>p;p++){var m=g[p];f[m]&&f[m].applyVisual(t,a,s)}}var h={};f(t,function(t){var i=aw.prepareVisualTypes(e[t]);h[t]=i});var u;null==o?i.each(l,!0):i.each([o],l,!0)}function qd(t){t.eachTargetSeries(function(e){var i=e.getData();Xd(t.stateList,t.targetVisuals,i,t.getValueState,t,t.getDataDimension(i))})}function Yd(t){t.eachSeries(function(e){var i=e.getData(),n=[];t.eachComponent("visualMap",function(t){if(t.isTargetSeries(e)){var r=t.getVisualMeta(m(Ud,null,e,t))||{stops:[],outerColors:[]};r.dimension=t.getDataDimension(i),n.push(r)}}),e.getData().setVisual("visualMeta",n)})}function Ud(t,e,i,n){function r(t){return l[t]}function o(t,e){l[t]=e}for(var a=e.targetVisuals[n],s=aw.prepareVisualTypes(a),l={color:t.getData().getVisual("color")},h=0,u=s.length;u>h;h++){var c=s[h],d=a["opacity"===c?"__alphaForOpacity":c];d&&d.applyVisual(i,r,o)}return l.color}function jd(t,e,i){if(i[0]===i[1])return i.slice();for(var n=200,r=(i[1]-i[0])/n,o=i[0],a=[],s=0;n>=s&&oc;c++)u[s[1-a][c]]=h[c],u[l[c]]=2===c?i[0]:n[l[c]];var d=[["x","width",3],["y","height",0]][a],f=Ko(u,o,n.padding);return l[(f.margin[d[2]]||0)+f[d[0]]+.5*f[d[1]]<.5*o[d[1]]?0:1]}function Kd(t){return f(t||[],function(){null!=t.dataIndex&&(t.dataIndexInside=t.dataIndex,t.dataIndex=null)}),t}function Qd(t,e,i,n){return new _v({shape:{points:t},draggable:!!i,cursor:e,drift:i,onmousemove:function(t){Rg(t.event)},ondragend:n})}function Jd(t,e){return 0===t?[[0,0],[e,0],[e,-e]]:[[0,0],[e,0],[e,e]]}function tf(t,e,i,n){return t?[[0,-fM(e,gM(i,0))],[vM,0],[0,fM(e,gM(n-i,0))]]:[[0,0],[5,-5],[5,5]]}function ef(t,e,i){var n=pM/2,r=t.get("hoverLinkDataSize");return r&&(n=cM(r,e,i,!0)/2),n}function nf(t){var e=t.get("hoverLinkOnHandle");return!!(null==e?t.get("realtime"):e)}function rf(t){return"vertical"===t?"ns-resize":"ew-resize"}function of(t,e){var i=t.inverse;("vertical"===t.orient?!i:i)&&e.reverse()}var af=2311,sf=function(){return af++},lf={};lf="undefined"==typeof navigator?{browser:{},os:{},node:!0,canvasSupported:!0,svgSupported:!0}:e(navigator.userAgent);var hf=lf,uf={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1,"[object Canvas]":1},cf={"[object Int8Array]":1,"[object Uint8Array]":1,"[object Uint8ClampedArray]":1,"[object Int16Array]":1,"[object Uint16Array]":1,"[object Int32Array]":1,"[object Uint32Array]":1,"[object Float32Array]":1,"[object Float64Array]":1},df=Object.prototype.toString,ff=Array.prototype,gf=ff.forEach,pf=ff.filter,vf=ff.slice,mf=ff.map,yf=ff.reduce,xf={},_f=function(){return xf.createCanvas()};xf.createCanvas=function(){return document.createElement("canvas")};var wf,bf="__ec_primitive__",Mf="_ec_",Sf=4;z.prototype={constructor:z,get:function(t){return this[Mf+t]},set:function(t,e){return this[Mf+t]=e,e},each:function(t,e){void 0!==e&&(t=m(t,e));for(var i in this)this.hasOwnProperty(i)&&t(this[i],i.slice(Sf))},removeKey:function(t){delete this[Mf+t]}};var If="undefined"==typeof Float32Array?Array:Float32Array,Tf=Y,Df=U;Q.prototype={constructor:Q,_dragStart:function(t){var e=t.target;e&&e.draggable&&(this._draggingTarget=e,e.dragging=!0,this._x=t.offsetX,this._y=t.offsetY,this.dispatchToElement(J(e,t),"dragstart",t.event))},_drag:function(t){var e=this._draggingTarget;if(e){var i=t.offsetX,n=t.offsetY,r=i-this._x,o=n-this._y;this._x=i,this._y=n,e.drift(r,o,t),this.dispatchToElement(J(e,t),"drag",t.event);var a=this.findHover(i,n,e).target,s=this._dropTarget;this._dropTarget=a,e!==a&&(s&&a!==s&&this.dispatchToElement(J(s,t),"dragleave",t.event),a&&a!==s&&this.dispatchToElement(J(a,t),"dragenter",t.event))}},_dragEnd:function(t){var e=this._draggingTarget;e&&(e.dragging=!1),this.dispatchToElement(J(e,t),"dragend",t.event),this._dropTarget&&this.dispatchToElement(J(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null}};var Af=Array.prototype.slice,Cf=function(){this._$handlers={}};Cf.prototype={constructor:Cf,one:function(t,e,i){var n=this._$handlers;if(!e||!t)return this;n[t]||(n[t]=[]);for(var r=0;rr;r++)i[t][r].h!=e&&n.push(i[t][r]);i[t]=n}i[t]&&0===i[t].length&&delete i[t]}else delete i[t];return this},trigger:function(t){if(this._$handlers[t]){var e=arguments,i=e.length;i>3&&(e=Af.call(e,1));for(var n=this._$handlers[t],r=n.length,o=0;r>o;){switch(i){case 1:n[o].h.call(n[o].ctx);break;case 2:n[o].h.call(n[o].ctx,e[1]);break;case 3:n[o].h.call(n[o].ctx,e[1],e[2]);break;default:n[o].h.apply(n[o].ctx,e)}n[o].one?(n.splice(o,1),r--):o++}}return this},triggerWithContext:function(t){if(this._$handlers[t]){var e=arguments,i=e.length;i>4&&(e=Af.call(e,1,e.length-1));for(var n=e[e.length-1],r=this._$handlers[t],o=r.length,a=0;o>a;){switch(i){case 1:r[a].h.call(n);break;case 2:r[a].h.call(n,e[1]);break;case 3:r[a].h.call(n,e[1],e[2]);break;default:r[a].h.apply(n,e)}r[a].one?(r.splice(a,1),o--):a++}}return this}};var Lf="silent";ee.prototype.dispose=function(){};var kf=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],Pf=function(t,e,i,n){Cf.call(this),this.storage=t,this.painter=e,this.painterRoot=n,i=i||new ee,this.proxy=i,i.handler=this,this._hovered={},this._lastTouchMoment,this._lastX,this._lastY,Q.call(this),f(kf,function(t){i.on&&i.on(t,this[t],this)},this)};Pf.prototype={constructor:Pf,mousemove:function(t){var e=t.zrX,i=t.zrY,n=this._hovered,r=n.target;r&&!r.__zr&&(n=this.findHover(n.x,n.y),r=n.target);var o=this._hovered=this.findHover(e,i),a=o.target,s=this.proxy;s.setCursor&&s.setCursor(a?a.cursor:"default"),r&&a!==r&&this.dispatchToElement(n,"mouseout",t),this.dispatchToElement(o,"mousemove",t),a&&a!==r&&this.dispatchToElement(o,"mouseover",t)},mouseout:function(t){this.dispatchToElement(this._hovered,"mouseout",t);var e,i=t.toElement||t.relatedTarget;do i=i&&i.parentNode;while(i&&9!=i.nodeType&&!(e=i===this.painterRoot));!e&&this.trigger("globalout",{event:t})},resize:function(){this._hovered={}},dispatch:function(t,e){var i=this[t];i&&i.call(this,e)},dispose:function(){this.proxy.dispose(),this.storage=this.proxy=this.painter=null},setCursorStyle:function(t){var e=this.proxy;e.setCursor&&e.setCursor(t)},dispatchToElement:function(t,e,i){t=t||{};var n=t.target;if(!n||!n.silent){for(var r="on"+e,o=te(e,t,i);n&&(n[r]&&(o.cancelBubble=n[r].call(n,o)),n.trigger(e,o),n=n.parent,!o.cancelBubble););o.cancelBubble||(this.trigger(e,o),this.painter&&this.painter.eachOtherLayer(function(t){"function"==typeof t[r]&&t[r].call(t,o),t.trigger&&t.trigger(e,o)}))}},findHover:function(t,e,i){for(var n=this.storage.getDisplayList(),r={x:t,y:e},o=n.length-1;o>=0;o--){var a;if(n[o]!==i&&!n[o].ignore&&(a=ie(n[o],t,e))&&(!r.topTarget&&(r.topTarget=n[o]),a!==Lf)){r.target=n[o];break}}return r}},f(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(t){Pf.prototype[t]=function(e){var i=this.findHover(e.zrX,e.zrY),n=i.target;if("mousedown"===t)this._downEl=n,this._downPoint=[e.zrX,e.zrY],this._upEl=n;else if("mosueup"===t)this._upEl=n;else if("click"===t){if(this._downEl!==this._upEl||!this._downPoint||Tf(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(i,t,e)}}),c(Pf,Cf),c(Pf,Q);var Of="undefined"==typeof Float32Array?Array:Float32Array,zf=re,Rf=5e-5,Nf=function(t){t=t||{},t.position||(this.position=[0,0]),null==t.rotation&&(this.rotation=0),t.scale||(this.scale=[1,1]),this.origin=this.origin||null},Ef=Nf.prototype;Ef.transform=null,Ef.needLocalTransform=function(){return ce(this.rotation)||ce(this.position[0])||ce(this.position[1])||ce(this.scale[0]-1)||ce(this.scale[1]-1)},Ef.updateTransform=function(){var t=this.parent,e=t&&t.transform,i=this.needLocalTransform(),n=this.transform;return i||e?(n=n||ne(),i?this.getLocalTransform(n):zf(n),e&&(i?ae(n,t.transform,n):oe(n,t.transform)),this.transform=n,this.invTransform=this.invTransform||ne(),void ue(this.invTransform,n)):void(n&&zf(n))},Ef.getLocalTransform=function(t){return Nf.getLocalTransform(this,t)},Ef.setTransform=function(t){var e=this.transform,i=t.dpr||1;e?t.setTransform(i*e[0],i*e[1],i*e[2],i*e[3],i*e[4],i*e[5]):t.setTransform(i,0,0,i,0,0)},Ef.restoreTransform=function(t){var e=t.dpr||1;t.setTransform(e,0,0,e,0,0)};var Vf=[];Ef.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(ae(Vf,t.invTransform,e),e=Vf);var i=e[0]*e[0]+e[1]*e[1],n=e[2]*e[2]+e[3]*e[3],r=this.position,o=this.scale;ce(i-1)&&(i=Math.sqrt(i)),ce(n-1)&&(n=Math.sqrt(n)),e[0]<0&&(i=-i),e[3]<0&&(n=-n),r[0]=e[4],r[1]=e[5],o[0]=i,o[1]=n,this.rotation=Math.atan2(-e[1]/n,e[0]/i)}},Ef.getGlobalScale=function(){var t=this.transform;if(!t)return[1,1];var e=Math.sqrt(t[0]*t[0]+t[1]*t[1]),i=Math.sqrt(t[2]*t[2]+t[3]*t[3]);return t[0]<0&&(e=-e),t[3]<0&&(i=-i),[e,i]},Ef.transformCoordToLocal=function(t,e){var i=[t,e],n=this.invTransform;return n&&j(i,i,n),i},Ef.transformCoordToGlobal=function(t,e){var i=[t,e],n=this.transform;return n&&j(i,i,n),i},Nf.getLocalTransform=function(t,e){e=e||[],zf(e);var i=t.origin,n=t.scale||[1,1],r=t.rotation||0,o=t.position||[0,0];return i&&(e[4]-=i[0],e[5]-=i[1]),he(e,e,n),r&&le(e,e,r),i&&(e[4]+=i[0],e[5]+=i[1]),e[4]+=o[0],e[5]+=o[1],e};var Bf={linear:function(t){return t},quadraticIn:function(t){return t*t},quadraticOut:function(t){return t*(2-t)},quadraticInOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},quarticIn:function(t){return t*t*t*t},quarticOut:function(t){return 1- --t*t*t*t},quarticInOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},quinticIn:function(t){return t*t*t*t*t},quinticOut:function(t){return--t*t*t*t*t+1},quinticInOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},sinusoidalIn:function(t){return 1-Math.cos(t*Math.PI/2)},sinusoidalOut:function(t){return Math.sin(t*Math.PI/2)},sinusoidalInOut:function(t){return.5*(1-Math.cos(Math.PI*t))},exponentialIn:function(t){return 0===t?0:Math.pow(1024,t-1)},exponentialOut:function(t){return 1===t?1:1-Math.pow(2,-10*t)},exponentialInOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(-Math.pow(2,-10*(t-1))+2)},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var e,i=.1,n=.4;return 0===t?0:1===t?1:(!i||1>i?(i=1,e=n/4):e=n*Math.asin(1/i)/(2*Math.PI),-(i*Math.pow(2,10*(t-=1))*Math.sin(2*(t-e)*Math.PI/n)))},elasticOut:function(t){var e,i=.1,n=.4;return 0===t?0:1===t?1:(!i||1>i?(i=1,e=n/4):e=n*Math.asin(1/i)/(2*Math.PI),i*Math.pow(2,-10*t)*Math.sin(2*(t-e)*Math.PI/n)+1)},elasticInOut:function(t){var e,i=.1,n=.4;return 0===t?0:1===t?1:(!i||1>i?(i=1,e=n/4):e=n*Math.asin(1/i)/(2*Math.PI),(t*=2)<1?-.5*i*Math.pow(2,10*(t-=1))*Math.sin(2*(t-e)*Math.PI/n):i*Math.pow(2,-10*(t-=1))*Math.sin(2*(t-e)*Math.PI/n)*.5+1)},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},backInOut:function(t){var e=2.5949095;return(t*=2)<1?.5*t*t*((e+1)*t-e):.5*((t-=2)*t*((e+1)*t+e)+2)},bounceIn:function(t){return 1-Bf.bounceOut(1-t)},bounceOut:function(t){return 1/2.75>t?7.5625*t*t:2/2.75>t?7.5625*(t-=1.5/2.75)*t+.75:2.5/2.75>t?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bounceInOut:function(t){return.5>t?.5*Bf.bounceIn(2*t):.5*Bf.bounceOut(2*t-1)+.5}};de.prototype={constructor:de,step:function(t,e){if(this._initialized||(this._startTime=t+this._delay,this._initialized=!0),this._paused)return void(this._pausedTime+=e);var i=(t-this._startTime-this._pausedTime)/this._life;if(!(0>i)){i=Math.min(i,1);var n=this.easing,r="string"==typeof n?Bf[n]:n,o="function"==typeof r?r(i):i;return this.fire("frame",o),1==i?this.loop?(this.restart(t),"restart"):(this._needsRemove=!0,"destroy"):null}},restart:function(t){var e=(t-this._startTime-this._pausedTime)%this._life;this._startTime=t-e+this.gap,this._pausedTime=0,this._needsRemove=!1},fire:function(t,e){t="on"+t,this[t]&&this[t](this._target,e)},pause:function(){this._paused=!0},resume:function(){this._paused=!1}};var Wf=function(){this.head=null,this.tail=null,this._len=0},Hf=Wf.prototype;Hf.insert=function(t){var e=new Ff(t);return this.insertEntry(e),e},Hf.insertEntry=function(t){this.head?(this.tail.next=t,t.prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},Hf.remove=function(t){var e=t.prev,i=t.next;e?e.next=i:this.head=i,i?i.prev=e:this.tail=e,t.next=t.prev=null,this._len--},Hf.len=function(){return this._len},Hf.clear=function(){this.head=this.tail=null,this._len=0};var Ff=function(t){this.value=t,this.next,this.prev},Gf=function(t){this._list=new Wf,this._map={},this._maxSize=t||10,this._lastRemovedEntry=null},Zf=Gf.prototype;Zf.put=function(t,e){var i=this._list,n=this._map,r=null;if(null==n[t]){var o=i.len(),a=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var s=i.head;i.remove(s),delete n[s.key],r=s.value,this._lastRemovedEntry=s}a?a.value=e:a=new Ff(e),a.key=t,i.insertEntry(a),n[t]=a}return r},Zf.get=function(t){var e=this._map[t],i=this._list;return null!=e?(e!==i.tail&&(i.remove(e),i.insertEntry(e)),e.value):void 0},Zf.clear=function(){this._list.clear(),this._map={}};var Xf={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]},qf=new Gf(20),Yf=null,Uf=Array.prototype.slice,jf=function(t,e,i,n){this._tracks={},this._target=t,this._loop=e||!1,this._getter=i||Pe,this._setter=n||Oe,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]};jf.prototype={when:function(t,e){var i=this._tracks;for(var n in e)if(e.hasOwnProperty(n)){if(!i[n]){i[n]=[];var r=this._getter(this._target,n);if(null==r)continue;0!==t&&i[n].push({time:0,value:He(r)})}i[n].push({time:t,value:e[n]})}return this},during:function(t){return this._onframeList.push(t),this},pause:function(){for(var t=0;ti;i++)t[i].call(this)},start:function(t,e){var i,n=this,r=0,o=function(){r--,r||n._doneCallback()};for(var a in this._tracks)if(this._tracks.hasOwnProperty(a)){var s=Ze(this,t,o,this._tracks[a],a,e);s&&(this._clipList.push(s),r++,this.animation&&this.animation.addClip(s),i=s)}if(i){var l=i.onframe;i.onframe=function(t,e){l(t,e);for(var i=0;i1&&(Jf=function(){for(var t in arguments)console.log(arguments[t])});var tg=Jf,eg=function(){this.animators=[]};eg.prototype={constructor:eg,animate:function(t,e){var i,n=!1,r=this,o=this.__zr;if(t){var a=t.split("."),s=r;n="shape"===a[0];for(var l=0,u=a.length;u>l;l++)s&&(s=s[a[l]]);s&&(i=s)}else i=r;if(!i)return void tg('Property "'+t+'" is not existed in element '+r.id);var c=r.animators,d=new jf(i,e);return d.during(function(){r.dirty(n)}).done(function(){c.splice(h(c,d),1)}),c.push(d),o&&o.animation.addAnimator(d),d},stopAnimation:function(t){for(var e=this.animators,i=e.length,n=0;i>n;n++)e[n].stop(t);return e.length=0,this},animateTo:function(t,e,i,n,r,o){function a(){l--,l||r&&r()}w(i)?(r=n,n=i,i=0):_(n)?(r=n,n="linear",i=0):_(i)?(r=i,i=0):_(e)?(r=e,e=500):e||(e=500),this.stopAnimation(),this._animateToShallow("",this,t,e,i);var s=this.animators.slice(),l=s.length;l||r&&r();for(var h=0;h0&&this.animate(t,!1).when(null==n?500:n,o).delay(r||0),this}};var ig=function(t){Nf.call(this,t),Cf.call(this,t),eg.call(this,t),this.id=t.id||sf()};ig.prototype={type:"element",name:"",__zr:null,ignore:!1,clipPath:null,drift:function(t,e){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0}var i=this.transform;i||(i=this.transform=[1,0,0,1,0,0]),i[4]+=t,i[5]+=e,this.decomposeTransform(),this.dirty(!1)},beforeUpdate:function(){},afterUpdate:function(){},update:function(){this.updateTransform()},traverse:function(){},attrKV:function(t,e){if("position"===t||"scale"===t||"origin"===t){if(e){var i=this[t];i||(i=this[t]=[]),i[0]=e[0],i[1]=e[1]}}else this[t]=e},hide:function(){this.ignore=!0,this.__zr&&this.__zr.refresh()},show:function(){this.ignore=!1,this.__zr&&this.__zr.refresh()},attr:function(t,e){if("string"==typeof t)this.attrKV(t,e);else if(b(t))for(var i in t)t.hasOwnProperty(i)&&this.attrKV(i,t[i]);return this.dirty(!1),this},setClipPath:function(t){var e=this.__zr;e&&t.addSelfToZr(e),this.clipPath&&this.clipPath!==t&&this.removeClipPath(),this.clipPath=t,t.__zr=e,t.__clipTarget=this,this.dirty(!1)},removeClipPath:function(){var t=this.clipPath;t&&(t.__zr&&t.removeSelfFromZr(t.__zr),t.__zr=null,t.__clipTarget=null,this.clipPath=null,this.dirty(!1))},addSelfToZr:function(t){this.__zr=t;var e=this.animators;if(e)for(var i=0;in||i>s||l>o||r>h)},contain:function(t,e){var i=this;return t>=i.x&&t<=i.x+i.width&&e>=i.y&&e<=i.y+i.height},clone:function(){return new Xe(this.x,this.y,this.width,this.height)},copy:function(t){this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height},plain:function(){return{x:this.x,y:this.y,width:this.width,height:this.height}}},Xe.create=function(t){return new Xe(t.x,t.y,t.width,t.height)};var ag=function(t){t=t||{},ig.call(this,t);for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);this._children=[],this.__storage=null,this.__dirty=!0};ag.prototype={constructor:ag,isGroup:!0,type:"group",silent:!1,children:function(){return this._children.slice()},childAt:function(t){return this._children[t]},childOfName:function(t){for(var e=this._children,i=0;i=0&&(i.splice(n,0,t),this._doAdd(t))}return this},_doAdd:function(t){t.parent&&t.parent.remove(t),t.parent=this;var e=this.__storage,i=this.__zr;e&&e!==t.__storage&&(e.addToStorage(t),t instanceof ag&&t.addChildrenToStorage(e)),i&&i.refresh()},remove:function(t){var e=this.__zr,i=this.__storage,n=this._children,r=h(n,t);return 0>r?this:(n.splice(r,1),t.parent=null,i&&(i.delFromStorage(t),t instanceof ag&&t.delChildrenFromStorage(i)),e&&e.refresh(),this)},removeAll:function(){var t,e,i=this._children,n=this.__storage;for(e=0;en;n++)this._updateAndAddDisplayable(e[n],null,t);i.length=this._displayListLen,hf.canvasSupported&&Je(i,ti)},_updateAndAddDisplayable:function(t,e,i){if(!t.ignore||i){t.beforeUpdate(),t.__dirty&&t.update(),t.afterUpdate();var n=t.clipPath;if(n){e=e?e.slice():[];for(var r=n,o=t;r;)r.parent=o,r.updateTransform(),e.push(r),o=r,r=r.clipPath}if(t.isGroup){for(var a=t._children,s=0;se;e++)this.delRoot(t[e]);else{var r=h(this._roots,t);r>=0&&(this.delFromStorage(t),this._roots.splice(r,1),t instanceof ag&&t.delChildrenFromStorage(this))}},addToStorage:function(t){return t.__storage=this,t.dirty(!1),this},delFromStorage:function(t){return t&&(t.__storage=null),this},dispose:function(){this._renderList=this._roots=null},displayableSortFunc:ti};var ug=[["shadowBlur",0],["shadowOffsetX",0],["shadowOffsetY",0],["shadowColor","#000"],["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]],cg=function(t,e){this.extendFrom(t,!1),this.host=e};cg.prototype={constructor:cg,host:null,fill:"#000",stroke:null,opacity:1,lineDash:null,lineDashOffset:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,lineWidth:1,strokeNoScale:!1,text:null,font:null,textFont:null,fontStyle:null,fontWeight:null,fontSize:null,fontFamily:null,textTag:null,textFill:"#000",textStroke:null,textWidth:null,textHeight:null,textStrokeWidth:0,textLineHeight:null,textPosition:"inside",textRect:null,textOffset:null,textAlign:null,textVerticalAlign:null,textDistance:5,textShadowColor:"transparent",textShadowBlur:0,textShadowOffsetX:0,textShadowOffsetY:0,textBoxShadowColor:"transparent",textBoxShadowBlur:0,textBoxShadowOffsetX:0,textBoxShadowOffsetY:0,transformText:!1,textRotation:0,textOrigin:null,textBackgroundColor:null,textBorderColor:null,textBorderWidth:0,textBorderRadius:0,textPadding:null,rich:null,truncate:null,blend:null,bind:function(t,e,i){for(var n=this,r=i&&i.style,o=!r,a=0;a0},extendFrom:function(t,e){if(t)for(var i in t)!t.hasOwnProperty(i)||e!==!0&&(e===!1?this.hasOwnProperty(i):null==t[i])||(this[i]=t[i])},set:function(t,e){"string"==typeof t?this[t]=e:this.extendFrom(t,!0)},clone:function(){var t=new this.constructor;return t.extendFrom(this,!0),t},getGradient:function(t,e,i){for(var n="radial"===e.type?ii:ei,r=n(t,e,i),o=e.colorStops,a=0;a=0&&i.splice(n,1),t.__hoverMir=null},clearHover:function(){for(var t=this._hoverElements,e=0;er;){var o=t[r],a=o.__from;a&&a.__zr?(r++,a.invisible||(o.transform=a.transform,o.invTransform=a.invTransform,o.__clipPaths=a.__clipPaths,this._doPaintEl(o,i,!0,n))):(t.splice(r,1),a.__hoverMir=null,e--)}i.ctx.restore()}},_startProgessive:function(){function t(){i===e._progressiveToken&&e.storage&&(e._doPaintList(e.storage.getDisplayList()),e._furtherProgressive?(e._progress++,mg(t)):e._progressiveToken=-1)}var e=this;if(e._furtherProgressive){var i=e._progressiveToken=+new Date;e._progress++,mg(t)}},_clearProgressive:function(){this._progressiveToken=-1,this._progress=0,f(this._progressiveLayers,function(t){t.__dirty&&t.clear()})},_paintList:function(t,e){null==e&&(e=!1),this._updateLayerStatus(t),this._clearProgressive(),this.eachBuiltinLayer(ji),this._doPaintList(t,e),this.eachBuiltinLayer($i)},_doPaintList:function(t,e){function i(t){var e=o.dpr||1;o.save(),o.globalAlpha=1,o.shadowBlur=0,n.__dirty=!0,o.setTransform(1,0,0,1,0,0),o.drawImage(t.dom,0,0,u*e,c*e),o.restore()}for(var n,r,o,a,s,l,h=0,u=this._width,c=this._height,d=this._progress,g=0,p=t.length;p>g;g++){var v=t[g],m=this._singleCanvas?0:v.zlevel,y=v.__frame;if(0>y&&s&&(i(s),s=null),r!==m&&(o&&o.restore(),a={},r=m,n=this.getLayer(r),n.__builtin__||tg("ZLevel "+r+" has been used by unkown layer "+n.id),o=n.ctx,o.save(),n.__unusedCount=0,(n.__dirty||e)&&n.clear()),n.__dirty||e){if(y>=0){if(!s){if(s=this._progressiveLayers[Math.min(h++,Cg-1)],s.ctx.save(),s.renderScope={},s&&s.__progress>s.__maxProgress){g=s.__nextIdxNotProg-1;continue}l=s.__progress,s.__dirty||(d=l),s.__progress=d+1}y===d&&this._doPaintEl(v,s,!0,s.renderScope)}else this._doPaintEl(v,n,e,a);v.__dirty=!1}}s&&i(s),o&&o.restore(),this._furtherProgressive=!1,f(this._progressiveLayers,function(t){t.__maxProgress>=t.__progress&&(this._furtherProgressive=!0)},this)},_doPaintEl:function(t,e,i,n){var r=e.ctx,o=t.transform;if(!(!e.__dirty&&!i||t.invisible||0===t.style.opacity||o&&!o[0]&&!o[3]||t.culling&&Ki(t,this._width,this._height))){var a=t.__clipPaths;(n.prevClipLayer!==e||Qi(a,n.prevElClipPaths))&&(n.prevElClipPaths&&(n.prevClipLayer.ctx.restore(),n.prevClipLayer=n.prevElClipPaths=null,n.prevEl=null),a&&(r.save(),Ji(a,r),n.prevClipLayer=e,n.prevElClipPaths=a)),t.beforeBrush&&t.beforeBrush(r),t.brush(r,n.prevEl||null),n.prevEl=t,t.afterBrush&&t.afterBrush(r)}},getLayer:function(t){if(this._singleCanvas)return this._layers[0];var e=this._layers[t];return e||(e=new vg("zr_"+t,this,this.dpr),e.__builtin__=!0,this._layerConfig[t]&&r(e,this._layerConfig[t],!0),this.insertLayer(t,e),e.initContext()),e},insertLayer:function(t,e){var i=this._layers,n=this._zlevelList,r=n.length,o=null,a=-1,s=this._domRoot;if(i[t])return void tg("ZLevel "+t+" has been used already");if(!Ui(e))return void tg("Layer of zlevel "+t+" is not valid");if(r>0&&t>n[0]){for(a=0;r-1>a&&!(n[a]t);a++);o=i[n[a]]}if(n.splice(a+1,0,t),i[t]=e,!e.virtual)if(o){var l=o.dom;l.nextSibling?s.insertBefore(e.dom,l.nextSibling):s.appendChild(e.dom)}else s.firstChild?s.insertBefore(e.dom,s.firstChild):s.appendChild(e.dom)},eachLayer:function(t,e){var i,n,r=this._zlevelList;for(n=0;nh;h++){var c=t[h],d=this._singleCanvas?0:c.zlevel,g=e[d],p=c.progressive;if(g&&(g.elCount++,g.__dirty=g.__dirty||c.__dirty),p>=0){a!==p&&(a=p,l++);var v=c.__frame=l-1;if(!o){var m=Math.min(s,Cg-1);o=i[m],o||(o=i[m]=new vg("progressive",this,this.dpr),o.initContext()),o.__maxProgress=0}o.__dirty=o.__dirty||c.__dirty,o.elCount++,o.__maxProgress=Math.max(o.__maxProgress,v),o.__maxProgress>=o.__progress&&(g.__dirty=!0)}else c.__frame=-1,o&&(o.__nextIdxNotProg=h,s++,o=null)}o&&(s++,o.__nextIdxNotProg=h),this.eachBuiltinLayer(function(t,e){n[e]!==t.elCount&&(t.__dirty=!0)}),i.length=Math.min(s,Cg),f(i,function(t,e){r[e]!==t.elCount&&(c.__dirty=!0),t.__dirty&&(t.__progress=0)})},clear:function(){return this.eachBuiltinLayer(this._clearLayer),this},_clearLayer:function(t){t.clear()},configLayer:function(t,e){if(e){var i=this._layerConfig;i[t]?r(i[t],e,!0):i[t]=e;var n=this._layers[t];n&&r(n,i[t],!0)}},delLayer:function(t){var e=this._layers,i=this._zlevelList,n=e[t];n&&(n.dom.parentNode.removeChild(n.dom),delete e[t],i.splice(h(i,t),1))},resize:function(t,e){var i=this._domRoot;i.style.display="none";var n=this._opts;if(null!=t&&(n.width=t),null!=e&&(n.height=e),t=this._getSize(0),e=this._getSize(1),i.style.display="",this._width!=t||e!=this._height){i.style.width=t+"px",i.style.height=e+"px";for(var r in this._layers)this._layers.hasOwnProperty(r)&&this._layers[r].resize(t,e);f(this._progressiveLayers,function(i){i.resize(t,e)}),this.refresh(!0)}return this._width=t,this._height=e,this},clearLayer:function(t){var e=this._layers[t];e&&e.clear()},dispose:function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},getRenderedCanvas:function(t){function e(t,e){var n=a._zlevelList;null==t&&(t=-1/0);for(var r,o=0;ot&&e>s){r=l;break}}r&&r.renderToCanvas&&(i.ctx.save(),r.renderToCanvas(i.ctx),i.ctx.restore())}if(t=t||{},this._singleCanvas)return this._layers[0].dom;var i=new vg("image",this,t.pixelRatio||this.dpr);i.initContext(),i.clearColor=t.backgroundColor,i.clear();for(var n,r=this.storage.getDisplayList(!0),o={},a=this,s=0;s=0&&this._clips.splice(e,1)},removeAnimator:function(t){for(var e=t.getClips(),i=0;ia;a++){var s=i[a],l=s.step(t,e);l&&(r.push(l),o.push(s))}for(var a=0;n>a;)i[a]._needsRemove?(i[a]=i[n-1],i.pop(),n--):a++;n=r.length;for(var a=0;n>a;a++)o[a].fire(r[a]);this._time=t,this.onframe(e),this.trigger("frame",e),this.stage.update&&this.stage.update()},_startLoop:function(){function t(){e._running&&(mg(t),!e._paused&&e._update())}var e=this;this._running=!0,mg(t)},start:function(){this._time=(new Date).getTime(),this._pausedTime=0,this._startLoop()},stop:function(){this._running=!1},pause:function(){this._paused||(this._pauseStart=(new Date).getTime(),this._paused=!0)},resume:function(){this._paused&&(this._pausedTime+=(new Date).getTime()-this._pauseStart,this._paused=!1)},clear:function(){this._clips=[]},animate:function(t,e){e=e||{};var i=new jf(t,e.loop,e.getter,e.setter);return this.addAnimator(i),i}},c(Ng,Cf);var Eg=function(){this._track=[]};Eg.prototype={constructor:Eg,recognize:function(t,e,i){return this._doTrack(t,e,i),this._recognize(t)},clear:function(){return this._track.length=0,this},_doTrack:function(t,e,i){var n=t.touches;if(n){for(var r={points:[],touches:[],target:e,event:t},o=0,a=n.length;a>o;o++){var s=n[o],l=nn(i,s,{});r.points.push([l.zrX,l.zrY]),r.touches.push(s)}this._track.push(r)}},_recognize:function(t){for(var e in Vg)if(Vg.hasOwnProperty(e)){var i=Vg[e](this._track,t);if(i)return i}}};var Vg={pinch:function(t,e){var i=t.length;if(i){var n=(t[i-1]||{}).points,r=(t[i-2]||{}).points||n;if(r&&r.length>1&&n&&n.length>1){var o=hn(n)/hn(r);!isFinite(o)&&(o=1),e.pinchScale=o;var a=un(n);return e.pinchX=a[0],e.pinchY=a[1],{type:"pinch",target:t[0].target,event:e}}}}},Bg=300,Wg=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],Hg=["touchstart","touchend","touchmove"],Fg={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},Gg=g(Wg,function(t){var e=t.replace("mouse","pointer");return Fg[e]?e:t}),Zg={mousemove:function(t){t=on(this.dom,t),this.trigger("mousemove",t)},mouseout:function(t){t=on(this.dom,t);var e=t.toElement||t.relatedTarget;if(e!=this.dom)for(;e&&9!=e.nodeType;){if(e===this.dom)return;e=e.parentNode}this.trigger("mouseout",t)},touchstart:function(t){t=on(this.dom,t),t.zrByTouch=!0,this._lastTouchMoment=new Date,dn(this,t,"start"),Zg.mousemove.call(this,t),Zg.mousedown.call(this,t),fn(this)},touchmove:function(t){t=on(this.dom,t),t.zrByTouch=!0,dn(this,t,"change"),Zg.mousemove.call(this,t),fn(this)},touchend:function(t){t=on(this.dom,t),t.zrByTouch=!0,dn(this,t,"end"),Zg.mouseup.call(this,t),+new Date-this._lastTouchMomentt?"0"+t:t},ip=vi,np=".",rp="___EC__COMPONENT__CONTAINER___",op="\x00ec_\x00",ap=function(t){for(var e=0;e=0||n&&h(n,a)<0)){var s=e.getShallow(a);null!=s&&(r[t[o][0]]=s)}}return r}},sp=ap([["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),lp={getLineStyle:function(t){var e=sp(this,t),i=this.getLineDash(e.lineWidth);return i&&(e.lineDash=i),e},getLineDash:function(t){null==t&&(t=1);var e=this.get("type"),i=Math.max(t,2),n=4*t;return"solid"===e||null==e?null:"dashed"===e?[n,n]:[i,i]}},hp=ap([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),up={getAreaStyle:function(t,e){return hp(this,t,e)}},cp=Math.pow,dp=Math.sqrt,fp=1e-8,gp=1e-4,pp=dp(3),vp=1/3,mp=E(),yp=E(),xp=E(),_p=Math.min,wp=Math.max,bp=Math.sin,Mp=Math.cos,Sp=2*Math.PI,Ip=E(),Tp=E(),Dp=E(),Ap=[],Cp=[],Lp={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},kp=[],Pp=[],Op=[],zp=[],Rp=Math.min,Np=Math.max,Ep=Math.cos,Vp=Math.sin,Bp=Math.sqrt,Wp=Math.abs,Hp="undefined"!=typeof Float32Array,Fp=function(t){this._saveData=!t,this._saveData&&(this.data=[]),this._ctx=null};Fp.prototype={constructor:Fp,_xi:0,_yi:0,_x0:0,_y0:0,_ux:0,_uy:0,_len:0,_lineDash:null,_dashOffset:0,_dashIdx:0,_dashSum:0,setScale:function(t,e){this._ux=Wp(1/Qf/t)||0,this._uy=Wp(1/Qf/e)||0},getContext:function(){return this._ctx},beginPath:function(t){return this._ctx=t,t&&t.beginPath(),t&&(this.dpr=t.dpr),this._saveData&&(this._len=0),this._lineDash&&(this._lineDash=null,this._dashOffset=0),this},moveTo:function(t,e){return this.addData(Lp.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},lineTo:function(t,e){var i=Wp(t-this._xi)>this._ux||Wp(e-this._yi)>this._uy||this._len<5;return this.addData(Lp.L,t,e),this._ctx&&i&&(this._needsDash()?this._dashedLineTo(t,e):this._ctx.lineTo(t,e)),i&&(this._xi=t,this._yi=e),this},bezierCurveTo:function(t,e,i,n,r,o){return this.addData(Lp.C,t,e,i,n,r,o),this._ctx&&(this._needsDash()?this._dashedBezierTo(t,e,i,n,r,o):this._ctx.bezierCurveTo(t,e,i,n,r,o)),this._xi=r,this._yi=o,this},quadraticCurveTo:function(t,e,i,n){return this.addData(Lp.Q,t,e,i,n),this._ctx&&(this._needsDash()?this._dashedQuadraticTo(t,e,i,n):this._ctx.quadraticCurveTo(t,e,i,n)),this._xi=i,this._yi=n,this},arc:function(t,e,i,n,r,o){return this.addData(Lp.A,t,e,i,i,n,r-n,0,o?0:1),this._ctx&&this._ctx.arc(t,e,i,n,r,o),this._xi=Ep(r)*i+t,this._yi=Vp(r)*i+t,this},arcTo:function(t,e,i,n,r){return this._ctx&&this._ctx.arcTo(t,e,i,n,r),this},rect:function(t,e,i,n){return this._ctx&&this._ctx.rect(t,e,i,n),this.addData(Lp.R,t,e,i,n),this},closePath:function(){this.addData(Lp.Z);var t=this._ctx,e=this._x0,i=this._y0;return t&&(this._needsDash()&&this._dashedLineTo(e,i),t.closePath()),this._xi=e,this._yi=i,this},fill:function(t){t&&t.fill(),this.toStatic()},stroke:function(t){t&&t.stroke(),this.toStatic()},setLineDash:function(t){if(t instanceof Array){this._lineDash=t,this._dashIdx=0;for(var e=0,i=0;ii;i++)this.data[i]=t[i];this._len=e},appendPath:function(t){t instanceof Array||(t=[t]);for(var e=t.length,i=0,n=this._len,r=0;e>r;r++)i+=t[r].len();Hp&&this.data instanceof Float32Array&&(this.data=new Float32Array(n+i));for(var r=0;e>r;r++)for(var o=t[r].data,a=0;ae.length&&(this._expandData(),e=this.data);for(var i=0;io&&(o=r+o),o%=r,f-=o*u,g-=o*c;u>0&&t>=f||0>u&&f>=t||0==u&&(c>0&&e>=g||0>c&&g>=e);)n=this._dashIdx,i=a[n],f+=u*i,g+=c*i,this._dashIdx=(n+1)%p,u>0&&l>f||0>u&&f>l||c>0&&h>g||0>c&&g>h||s[n%2?"moveTo":"lineTo"](u>=0?Rp(f,t):Np(f,t),c>=0?Rp(g,e):Np(g,e)); u=f-t,c=g-e,this._dashOffset=-Bp(u*u+c*c)},_dashedBezierTo:function(t,e,i,n,r,o){var a,s,l,h,u,c=this._dashSum,d=this._dashOffset,f=this._lineDash,g=this._ctx,p=this._xi,v=this._yi,m=Jn,y=0,x=this._dashIdx,_=f.length,w=0;for(0>d&&(d=c+d),d%=c,a=0;1>a;a+=.1)s=m(p,t,i,r,a+.1)-m(p,t,i,r,a),l=m(v,e,n,o,a+.1)-m(v,e,n,o,a),y+=Bp(s*s+l*l);for(;_>x&&(w+=f[x],!(w>d));x++);for(a=(w-d)/y;1>=a;)h=m(p,t,i,r,a),u=m(v,e,n,o,a),x%2?g.moveTo(h,u):g.lineTo(h,u),a+=f[x]/y,x=(x+1)%_;x%2!==0&&g.lineTo(r,o),s=r-h,l=o-u,this._dashOffset=-Bp(s*s+l*l)},_dashedQuadraticTo:function(t,e,i,n){var r=i,o=n;i=(i+2*t)/3,n=(n+2*e)/3,t=(this._xi+2*t)/3,e=(this._yi+2*e)/3,this._dashedBezierTo(t,e,i,n,r,o)},toStatic:function(){var t=this.data;t instanceof Array&&(t.length=this._len,Hp&&(this.data=new Float32Array(t)))},getBoundingRect:function(){kp[0]=kp[1]=Op[0]=Op[1]=Number.MAX_VALUE,Pp[0]=Pp[1]=zp[0]=zp[1]=-Number.MAX_VALUE;for(var t=this.data,e=0,i=0,n=0,r=0,o=0;oc;){var d=s[c++];switch(1==c&&(n=s[c],r=s[c+1],e=n,i=r),d){case Lp.M:e=n=s[c++],i=r=s[c++],t.moveTo(n,r);break;case Lp.L:o=s[c++],a=s[c++],(Wp(o-n)>l||Wp(a-r)>h||c===u-1)&&(t.lineTo(o,a),n=o,r=a);break;case Lp.C:t.bezierCurveTo(s[c++],s[c++],s[c++],s[c++],s[c++],s[c++]),n=s[c-2],r=s[c-1];break;case Lp.Q:t.quadraticCurveTo(s[c++],s[c++],s[c++],s[c++]),n=s[c-2],r=s[c-1];break;case Lp.A:var f=s[c++],g=s[c++],p=s[c++],v=s[c++],m=s[c++],y=s[c++],x=s[c++],_=s[c++],w=p>v?p:v,b=p>v?1:p/v,M=p>v?v/p:1,S=Math.abs(p-v)>.001,I=m+y;S?(t.translate(f,g),t.rotate(x),t.scale(b,M),t.arc(0,0,w,m,I,1-_),t.scale(1/b,1/M),t.rotate(-x),t.translate(-f,-g)):t.arc(f,g,w,m,I,1-_),1==c&&(e=Ep(m)*p+f,i=Vp(m)*v+g),n=Ep(I)*p+f,r=Vp(I)*v+g;break;case Lp.R:e=n=s[c],i=r=s[c+1],t.rect(s[c++],s[c++],s[c++],s[c++]);break;case Lp.Z:t.closePath(),n=e,r=i}}}},Fp.CMD=Lp;var Gp=2*Math.PI,Zp=2*Math.PI,Xp=Fp.CMD,qp=2*Math.PI,Yp=1e-4,Up=[-1,-1,-1],jp=[-1,-1],$p=pg.prototype.getCanvasPattern,Kp=Math.abs,Qp=new Fp(!0);Cr.prototype={constructor:Cr,type:"path",__dirtyPath:!0,strokeContainThreshold:5,brush:function(t,e){var i=this.style,n=this.path||Qp,r=i.hasStroke(),o=i.hasFill(),a=i.fill,s=i.stroke,l=o&&!!a.colorStops,h=r&&!!s.colorStops,u=o&&!!a.image,c=r&&!!s.image;if(i.bind(t,this,e),this.setTransform(t),this.__dirty){var d;l&&(d=d||this.getBoundingRect(),this._fillGradient=i.getGradient(t,a,d)),h&&(d=d||this.getBoundingRect(),this._strokeGradient=i.getGradient(t,s,d))}l?t.fillStyle=this._fillGradient:u&&(t.fillStyle=$p.call(a,t)),h?t.strokeStyle=this._strokeGradient:c&&(t.strokeStyle=$p.call(s,t));var f=i.lineDash,g=i.lineDashOffset,p=!!t.setLineDash,v=this.getGlobalScale();n.setScale(v[0],v[1]),this.__dirtyPath||f&&!p&&r?(n.beginPath(t),f&&!p&&(n.setLineDash(f),n.setLineDashOffset(g)),this.buildPath(n,this.shape,!1),this.path&&(this.__dirtyPath=!1)):(t.beginPath(),this.path.rebuildPath(t)),o&&n.fill(t),f&&p&&(t.setLineDash(f),t.lineDashOffset=g),r&&n.stroke(t),f&&p&&t.setLineDash([]),this.restoreTransform(t),null!=i.text&&this.drawRectText(t,this.getBoundingRect())},buildPath:function(){},createPathProxy:function(){this.path=new Fp},getBoundingRect:function(){var t=this._rect,e=this.style,i=!t;if(i){var n=this.path;n||(n=this.path=new Fp),this.__dirtyPath&&(n.beginPath(),this.buildPath(n,this.shape,!1)),t=n.getBoundingRect()}if(this._rect=t,e.hasStroke()){var r=this._rectWithStroke||(this._rectWithStroke=t.clone());if(this.__dirty||i){r.copy(t);var o=e.lineWidth,a=e.strokeNoScale?this.getLineScale():1;e.hasFill()||(o=Math.max(o,this.strokeContainThreshold||4)),a>1e-10&&(r.width+=o/a,r.height+=o/a,r.x-=o/a/2,r.y-=o/a/2)}return r}return t},contain:function(t,e){var i=this.transformCoordToLocal(t,e),n=this.getBoundingRect(),r=this.style;if(t=i[0],e=i[1],n.contain(t,e)){var o=this.path.data;if(r.hasStroke()){var a=r.lineWidth,s=r.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(r.hasFill()||(a=Math.max(a,this.strokeContainThreshold)),Ar(o,a/s,t,e)))return!0}if(r.hasFill())return Dr(o,t,e)}return!1},dirty:function(t){null==t&&(t=!0),t&&(this.__dirtyPath=t,this._rect=null),this.__dirty=!0,this.__zr&&this.__zr.refresh(),this.__clipTarget&&this.__clipTarget.dirty()},animateShape:function(t){return this.animate("shape",t)},attrKV:function(t,e){"shape"===t?(this.setShape(e),this.__dirtyPath=!0,this._rect=null):Xi.prototype.attrKV.call(this,t,e)},setShape:function(t,e){var i=this.shape;if(i){if(b(t))for(var n in t)t.hasOwnProperty(n)&&(i[n]=t[n]);else i[t]=e;this.dirty(!0)}return this},getLineScale:function(){var t=this.transform;return t&&Kp(t[0]-1)>1e-10&&Kp(t[3]-1)>1e-10?Math.sqrt(Kp(t[0]*t[3]-t[2]*t[1])):1}},Cr.extend=function(t){var e=function(e){Cr.call(this,e),t.style&&this.style.extendFrom(t.style,!1);var i=t.shape;if(i){this.shape=this.shape||{};var n=this.shape;for(var r in i)!n.hasOwnProperty(r)&&i.hasOwnProperty(r)&&(n[r]=i[r])}t.init&&t.init.call(this,e)};u(e,Cr);for(var i in t)"style"!==i&&"shape"!==i&&(e.prototype[i]=t[i]);return e},u(Cr,Xi);var Jp=Fp.CMD,tv=[[],[],[]],ev=Math.sqrt,iv=Math.atan2,nv=function(t,e){var i,n,r,o,a,s,l=t.data,h=Jp.M,u=Jp.C,c=Jp.L,d=Jp.R,f=Jp.A,g=Jp.Q;for(r=0,o=0;ra;a++){var s=tv[a];s[0]=l[r++],s[1]=l[r++],j(s,s,e),l[o++]=s[0],l[o++]=s[1]}}},rv=["m","M","l","L","v","V","h","H","z","Z","c","C","q","Q","t","T","s","S","a","A"],ov=Math.sqrt,av=Math.sin,sv=Math.cos,lv=Math.PI,hv=function(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])},uv=function(t,e){return(t[0]*e[0]+t[1]*e[1])/(hv(t)*hv(e))},cv=function(t,e){return(t[0]*e[1]=11?function(){var e,i=this.__clipPaths,n=this.style;if(i)for(var r=0;ro;o++)r+=Y(t[o-1],t[o]);var a=r/2;a=i>a?i:a;for(var o=0;a>o;o++){var s,l,h,u=o/(a-1)*(e?i:i-1),c=Math.floor(u),d=u-c,f=t[c%i];e?(s=t[(c-1+i)%i],l=t[(c+1)%i],h=t[(c+2)%i]):(s=t[0===c?c:c-1],l=t[c>i-2?i-1:c+1],h=t[c>i-3?i-1:c+2]);var g=d*d,p=d*g;n.push([Nr(s[0],f[0],l[0],h[0],d,g,p),Nr(s[1],f[1],l[1],h[1],d,g,p)])}return n},xv=function(t,e,i,n){var r,o,a,s,l=[],h=[],u=[],c=[];if(n){a=[1/0,1/0],s=[-1/0,-1/0];for(var d=0,f=t.length;f>d;d++)$(a,a,t[d]),K(s,s,t[d]);$(a,a,n[0]),K(s,s,n[1])}for(var d=0,f=t.length;f>d;d++){var g=t[d];if(i)r=t[d?d-1:f-1],o=t[(d+1)%f];else{if(0===d||d===f-1){l.push(B(t[d]));continue}r=t[d-1],o=t[d+1]}F(h,o,r),X(h,h,e);var p=Y(g,r),v=Y(g,o),m=p+v;0!==m&&(p/=m,v/=m),X(u,h,-p),X(c,h,v);var y=W([],g,u),x=W([],g,c);n&&(K(y,y,a),$(y,y,s),K(x,x,a),$(x,x,s)),l.push(y),l.push(x)}return i&&l.push(l.shift()),l},_v=Cr.extend({type:"polygon",shape:{points:null,smooth:!1,smoothConstraint:null},buildPath:function(t,e){Er(t,e,!0)}}),wv=Cr.extend({type:"polyline",shape:{points:null,smooth:!1,smoothConstraint:null},style:{stroke:"#000",fill:null},buildPath:function(t,e){Er(t,e,!1)}}),bv=Cr.extend({type:"rect",shape:{r:0,x:0,y:0,width:0,height:0},buildPath:function(t,e){var i=e.x,n=e.y,r=e.width,o=e.height;e.r?Ti(t,e):t.rect(i,n,r,o),t.closePath()}}),Mv=Cr.extend({type:"line",shape:{x1:0,y1:0,x2:0,y2:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(t,e){var i=e.x1,n=e.y1,r=e.x2,o=e.y2,a=e.percent;0!==a&&(t.moveTo(i,n),1>a&&(r=i*(1-a)+r*a,o=n*(1-a)+o*a),t.lineTo(r,o))},pointAt:function(t){var e=this.shape;return[e.x1*(1-t)+e.x2*t,e.y1*(1-t)+e.y2*t]}}),Sv=[],Iv=Cr.extend({type:"bezier-curve",shape:{x1:0,y1:0,x2:0,y2:0,cpx1:0,cpy1:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(t,e){var i=e.x1,n=e.y1,r=e.x2,o=e.y2,a=e.cpx1,s=e.cpy1,l=e.cpx2,h=e.cpy2,u=e.percent;0!==u&&(t.moveTo(i,n),null==l||null==h?(1>u&&(hr(i,a,r,u,Sv),a=Sv[1],r=Sv[2],hr(n,s,o,u,Sv),s=Sv[1],o=Sv[2]),t.quadraticCurveTo(a,s,r,o)):(1>u&&(nr(i,a,l,r,u,Sv),a=Sv[1],l=Sv[2],r=Sv[3],nr(n,s,h,o,u,Sv),s=Sv[1],h=Sv[2],o=Sv[3]),t.bezierCurveTo(a,s,l,h,r,o)))},pointAt:function(t){return Vr(this.shape,t,!1)},tangentAt:function(t){var e=Vr(this.shape,t,!0);return q(e,e)}}),Tv=Cr.extend({type:"arc",shape:{cx:0,cy:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},style:{stroke:"#000",fill:null},buildPath:function(t,e){var i=e.cx,n=e.cy,r=Math.max(e.r,0),o=e.startAngle,a=e.endAngle,s=e.clockwise,l=Math.cos(o),h=Math.sin(o);t.moveTo(l*r+i,h*r+n),t.arc(i,n,r,o,a,!s)}}),Dv=Cr.extend({type:"compound",shape:{paths:null},_updatePathDirty:function(){for(var t=this.__dirtyPath,e=this.shape.paths,i=0;i=0;o--)n=r(n,t[o],!0);Fn(this,"__defaultOption",n)}return Gn(this,"__defaultOption")},getReferringComponents:function(t){return this.ecModel.queryComponents({mainType:t,index:this.get(t+"Index",!0),id:this.get(t+"Id",!0)})}});$n(em,{registerWhenExtend:!0}),Yo(em),Uo(em,na),c(em,Jv);var im="";"undefined"!=typeof navigator&&(im=navigator.platform||"");var nm={color:["#c23531","#2f4554","#61a0a8","#d48265","#91c7ae","#749f83","#ca8622","#bda29a","#6e7074","#546570","#c4ccd3"],textStyle:{fontFamily:im.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,animation:"auto",animationDuration:1e3,animationDurationUpdate:300,animationEasing:"exponentialOut",animationEasingUpdate:"cubicOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1},rm={clearColorPalette:function(){Fn(this,"colorIdx",0),Fn(this,"colorNameMap",{})},getColorFromPalette:function(t,e){e=e||this;var i=Gn(e,"colorIdx")||0,n=Gn(e,"colorNameMap")||Fn(e,"colorNameMap",{});if(n.hasOwnProperty(t))return n[t];var r=this.get("color",!0)||[];if(r.length){var o=r[i];return t&&(n[t]=o),Fn(e,"colorIdx",(i+1)%r.length),o}}},om=f,am=v,sm=g,lm=x,hm=h,um=b,cm="\x00_ec_inner",dm=Ao.extend({constructor:dm,init:function(t,e,i,n){i=i||{},this.option=null,this._theme=new Ao(i),this._optionManager=n},setOption:function(t,e){k(!(cm in t),"please use chart.getOption()"),this._optionManager.setOption(t,e),this.resetOption(null)},resetOption:function(t){var e=!1,i=this._optionManager;if(!t||"recreate"===t){var n=i.mountOption("recreate"===t);this.option&&"recreate"!==t?(this.restoreData(),this.mergeOption(n)):oa.call(this,n),e=!0}if(("timeline"===t||"media"===t)&&this.restoreData(),!t||"recreate"===t||"timeline"===t){var r=i.getTimelineOption(this);r&&(this.mergeOption(r),e=!0)}if(!t||"recreate"===t||"media"===t){var o=i.getMediaOption(this,this._api);o.length&&om(o,function(t){this.mergeOption(t,e=!0)},this)}return e},mergeOption:function(t){function e(e,n){var r=ko(t[e]),s=No(o.get(e),r);Eo(s),om(s,function(t){var i=t.option;um(i)&&(t.keyInfo.mainType=e,t.keyInfo.subType=sa(e,i,t.exist))});var l=aa(o,n);i[e]=[],o.set(e,[]),om(s,function(t,n){var r=t.exist,s=t.option;if(k(um(s)||r,"Empty component definition"),s){var h=em.getClass(e,t.keyInfo.subType,!0);if(r&&r instanceof h)r.name=t.keyInfo.name,r.mergeOption(s,this),r.optionUpdated(s,!1);else{var u=a({dependentModels:l,componentIndex:n},t.keyInfo);r=new h(s,this,this,u),a(r,u),r.init(s,this,this,u),r.optionUpdated(null,!0)}}else r.mergeOption({},this),r.optionUpdated({},!1);o.get(e)[n]=r,i[e][n]=r.option},this),"series"===e&&(this._seriesIndices=la(o.get("series")))}var i=this.option,o=this._componentsMap,s=[];om(t,function(t,e){null!=t&&(em.hasClass(e)?s.push(e):i[e]=null==i[e]?n(t):r(i[e],t,!0))}),em.topologicalTravel(s,em.getAllClassMainTypes(),e,this),this._seriesIndices=this._seriesIndices||[]},getOption:function(){var t=n(this.option);return om(t,function(e,i){if(em.hasClass(i)){for(var e=ko(e),n=e.length-1;n>=0;n--)Vo(e[n])&&e.splice(n,1);t[i]=e}}),delete t[cm],t},getTheme:function(){return this._theme},getComponent:function(t,e){var i=this._componentsMap.get(t);return i?i[e||0]:void 0},queryComponents:function(t){var e=t.mainType;if(!e)return[];var i=t.index,n=t.id,r=t.name,o=this._componentsMap.get(e);if(!o||!o.length)return[];var a;if(null!=i)lm(i)||(i=[i]),a=am(sm(i,function(t){return o[t]}),function(t){return!!t});else if(null!=n){var s=lm(n);a=am(o,function(t){return s&&hm(n,t.id)>=0||!s&&t.id===n})}else if(null!=r){var l=lm(r);a=am(o,function(t){return l&&hm(r,t.name)>=0||!l&&t.name===r})}else a=o.slice();return ha(a,t)},findComponents:function(t){function e(t){var e=r+"Index",i=r+"Id",n=r+"Name";return!t||null==t[e]&&null==t[i]&&null==t[n]?null:{mainType:r,index:t[e],id:t[i],name:t[n]}}function i(e){return t.filter?am(e,t.filter):e}var n=t.query,r=t.mainType,o=e(n),a=o?this.queryComponents(o):this._componentsMap.get(r);return i(ha(a,t))},eachComponent:function(t,e,i){var n=this._componentsMap;if("function"==typeof t)i=e,e=t,n.each(function(t,n){om(t,function(t,r){e.call(i,n,t,r)})});else if(w(t))om(n.get(t),e,i);else if(um(t)){var r=this.findComponents(t);om(r,e,i)}},getSeriesByName:function(t){var e=this._componentsMap.get("series");return am(e,function(e){return e.name===t})},getSeriesByIndex:function(t){return this._componentsMap.get("series")[t]},getSeriesByType:function(t){var e=this._componentsMap.get("series");return am(e,function(e){return e.subType===t})},getSeries:function(){return this._componentsMap.get("series").slice()},eachSeries:function(t,e){om(this._seriesIndices,function(i){var n=this._componentsMap.get("series")[i];t.call(e,n,i)},this)},eachRawSeries:function(t,e){om(this._componentsMap.get("series"),t,e)},eachSeriesByType:function(t,e,i){om(this._seriesIndices,function(n){var r=this._componentsMap.get("series")[n];r.subType===t&&e.call(i,r,n)},this)},eachRawSeriesByType:function(t,e,i){return om(this.getSeriesByType(t),e,i)},isSeriesFiltered:function(t){return h(this._seriesIndices,t.componentIndex)<0},getCurrentSeriesIndices:function(){return(this._seriesIndices||[]).slice()},filterSeries:function(t,e){var i=am(this._componentsMap.get("series"),t,e);this._seriesIndices=la(i)},restoreData:function(){var t=this._componentsMap;this._seriesIndices=la(t.get("series"));var e=[];t.each(function(t,i){e.push(i)}),em.topologicalTravel(e,em.getAllClassMainTypes(),function(e){om(t.get(e),function(t){t.restoreData()})})}});c(dm,rm);var fm=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isDisposed","on","off","getDataURL","getConnectedDataURL","getModel","getOption","getViewOfComponentModel","getViewOfSeriesModel"],gm={};ca.prototype={constructor:ca,create:function(t,e){var i=[];f(gm,function(n){var r=n.create(t,e);i=i.concat(r||[])}),this._coordinateSystems=i},update:function(t,e){f(this._coordinateSystems,function(i){i.update&&i.update(t,e)})},getCoordinateSystems:function(){return this._coordinateSystems.slice()}},ca.register=function(t,e){gm[t]=e},ca.get=function(t){return gm[t]};var pm=f,vm=n,mm=g,ym=r,xm=/^(min|max)?(.+)$/;da.prototype={constructor:da,setOption:function(t,e){t=vm(t,!0);var i=this._optionBackup,n=fa.call(this,t,e,!i);this._newBaseOption=n.baseOption,i?(ma(i.baseOption,n.baseOption),n.timelineOptions.length&&(i.timelineOptions=n.timelineOptions),n.mediaList.length&&(i.mediaList=n.mediaList),n.mediaDefault&&(i.mediaDefault=n.mediaDefault)):this._optionBackup=n},mountOption:function(t){var e=this._optionBackup;return this._timelineOptions=mm(e.timelineOptions,vm),this._mediaList=mm(e.mediaList,vm),this._mediaDefault=vm(e.mediaDefault),this._currentMediaIndices=[],vm(t?e.baseOption:this._newBaseOption)},getTimelineOption:function(t){var e,i=this._timelineOptions;if(i.length){var n=t.getComponent("timeline");n&&(e=vm(i[n.getCurrentIndex()],!0))}return e},getMediaOption:function(){var t=this._api.getWidth(),e=this._api.getHeight(),i=this._mediaList,n=this._mediaDefault,r=[],o=[];if(!i.length&&!n)return o;for(var a=0,s=i.length;s>a;a++)ga(i[a].query,t,e)&&r.push(a);return!r.length&&n&&(r=[-1]),r.length&&!va(r,this._currentMediaIndices)&&(o=mm(r,function(t){return vm(-1===t?n.option:i[t].option)})),this._currentMediaIndices=r,o}};var _m=f,wm=b,bm=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"],Mm=function(t,e){_m(ba(t.series),function(t){wm(t)&&wa(t)});var i=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];e&&i.push("valueAxis","categoryAxis","logAxis","timeAxis"),_m(i,function(e){_m(ba(t[e]),function(t){t&&(xa(t,"axisLabel"),xa(t.axisPointer,"label"))})}),_m(ba(t.parallel),function(t){var e=t&&t.parallelAxisDefault;xa(e,"axisLabel"),xa(e&&e.axisPointer,"label")}),_m(ba(t.calendar),function(t){xa(t,"dayLabel"),xa(t,"monthLabel"),xa(t,"yearLabel")}),_m(ba(t.radar),function(t){xa(t,"name")}),_m(ba(t.geo),function(t){wm(t)&&(_a(t.label),_m(ba(t.regions),function(t){_a(t.label)}))}),_a(Ma(t.timeline).label),xa(Ma(t.axisPointer),"label"),xa(Ma(t.tooltip).axisPointer,"label")},Sm=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],Im=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],Tm=["bar","boxplot","candlestick","chord","effectScatter","funnel","gauge","lines","graph","heatmap","line","map","parallel","pie","radar","sankey","scatter","treemap"],Dm=function(t,e){Mm(t,e),t.series=ko(t.series),f(t.series,function(t){if(b(t)){var e=t.type;if(("pie"===e||"gauge"===e)&&null!=t.clockWise&&(t.clockwise=t.clockWise),"gauge"===e){var i=Sa(t,"pointer.color");null!=i&&Ia(t,"itemStyle.normal.color",i)}for(var n=0;n":"")+a.join(o?"
":", ")}var n=Gn(this,"data"),r=this.getRawValue(t),o=x(r)?i(r):Nn(zn(r)),a=n.getName(t),s=n.getItemVisual(t,"color");b(s)&&s.colorStops&&(s=(s.colorStops[0]||{}).color),s=s||"transparent";var l=Bn(s),h=this.name;return"\x00-"===h&&(h=""),h=h?Nn(h)+(e?": ":"
"):"",e?l+h+o:h+l+(a?Nn(a)+": "+o:o)},isAnimationEnabled:function(){if(hf.node)return!1;var t=this.getShallow("animation");return t&&this.getData().count()>this.getShallow("animationThreshold")&&(t=!1),t},restoreData:function(){Fn(this,"data",Gn(this,"dataBeforeProcessed").cloneShallow())},getColorFromPalette:function(t,e){var i=this.ecModel,n=rm.getColorFromPalette.call(this,t,e);return n||(n=i.getColorFromPalette(t,e)),n},getAxisTooltipData:null,getTooltipPosition:null});c(Am,Xv),c(Am,rm);var Cm=function(){this.group=new ag,this.uid=qo("viewComponent")};Cm.prototype={constructor:Cm,init:function(){},render:function(){},dispose:function(){}};var Lm=Cm.prototype;Lm.updateView=Lm.updateLayout=Lm.updateVisual=function(){},Yn(Cm),$n(Cm,{registerWhenExtend:!0}),Da.prototype={type:"chart",init:function(){},render:function(){},highlight:function(t,e,i,n){Ca(t.getData(),n,"emphasis")},downplay:function(t,e,i,n){Ca(t.getData(),n,"normal")},remove:function(){this.group.removeAll()},dispose:function(){}};var km=Da.prototype;km.updateView=km.updateLayout=km.updateVisual=function(t,e,i,n){this.render(t,e,i,n)},Yn(Da,["dispose"]),$n(Da,{registerWhenExtend:!0});var Pm="\x00__throttleOriginMethod",Om="\x00__throttleRate",zm="\x00__throttleType",Rm=function(t){function e(e){var i=(e.visualColorAccessPath||"itemStyle.normal.color").split("."),n=e.getData(),r=e.get(i)||e.getColorFromPalette(e.get("name"));n.setVisual("color",r),t.isSeriesFiltered(e)||("function"!=typeof r||r instanceof Av||n.each(function(t){n.setItemVisual(t,"color",r(e.getDataParams(t)))}),n.each(function(t){var e=n.getItemModel(t),r=e.get(i,!0);null!=r&&n.setItemVisual(t,"color",r)}))}t.eachRawSeries(e)},Nm=Math.PI,Em=function(t,e){e=e||{},s(e,{text:"loading",color:"#c23531",textColor:"#000",maskColor:"rgba(255, 255, 255, 0.8)",zlevel:0});var i=new bv({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4}),n=new Tv({shape:{startAngle:-Nm/2,endAngle:-Nm/2+.1,r:10},style:{stroke:e.color,lineCap:"round",lineWidth:5},zlevel:e.zlevel,z:10001}),r=new bv({style:{fill:"none",text:e.text,textPosition:"right",textDistance:10,textFill:e.textColor},zlevel:e.zlevel,z:10001});n.animateShape(!0).when(1e3,{endAngle:3*Nm/2}).start("circularInOut"),n.animateShape(!0).when(1e3,{startAngle:3*Nm/2}).delay(300).start("circularInOut");var o=new ag;return o.add(n),o.add(r),o.add(i),o.resize=function(){var e=t.getWidth()/2,o=t.getHeight()/2;n.setShape({cx:e,cy:o});var a=n.shape.r;r.setShape({x:e-a,y:o-a,width:2*a,height:2*a}),i.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},o.resize(),o},Vm=f,Bm=em.parseClassType,Wm="3.8.4",Hm={zrender:"3.7.3"},Fm=1e3,Gm=5e3,Zm=1e3,Xm=2e3,qm=3e3,Ym=4e3,Um=5e3,jm={PROCESSOR:{FILTER:Fm,STATISTIC:Gm},VISUAL:{LAYOUT:Zm,GLOBAL:Xm,CHART:qm,COMPONENT:Ym,BRUSH:Um}},$m="__flagInMainProcess",Km="__hasGradientOrPatternBg",Qm="__optionUpdated",Jm=/^[a-zA-Z0-9_]+$/;za.prototype.on=Oa("on"),za.prototype.off=Oa("off"),za.prototype.one=Oa("one"),c(za,Cf);var ty=Ra.prototype;ty._onframe=function(){if(this[Qm]){var t=this[Qm].silent;this[$m]=!0,ey.prepareAndUpdate.call(this),this[$m]=!1,this[Qm]=!1,Ba.call(this,t),Wa.call(this,t)}},ty.getDom=function(){return this._dom},ty.getZr=function(){return this._zr},ty.setOption=function(t,e,i){var n;if(b(e)&&(i=e.lazyUpdate,n=e.silent,e=e.notMerge),this[$m]=!0,!this._model||e){var r=new da(this._api),o=this._theme,a=this._model=new dm(null,null,o,r);a.init(null,null,o,r) }this._model.setOption(t,ay),i?(this[Qm]={silent:n},this[$m]=!1):(ey.prepareAndUpdate.call(this),this._zr.flush(),this[Qm]=!1,this[$m]=!1,Ba.call(this,n),Wa.call(this,n))},ty.setTheme=function(){console.log("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},ty.getModel=function(){return this._model},ty.getOption=function(){return this._model&&this._model.getOption()},ty.getWidth=function(){return this._zr.getWidth()},ty.getHeight=function(){return this._zr.getHeight()},ty.getDevicePixelRatio=function(){return this._zr.painter.dpr||window.devicePixelRatio||1},ty.getRenderedCanvas=function(t){if(hf.canvasSupported){t=t||{},t.pixelRatio=t.pixelRatio||1,t.backgroundColor=t.backgroundColor||this._model.get("backgroundColor");var e=this._zr,i=e.storage.getDisplayList();return f(i,function(t){t.stopAnimation(!0)}),e.painter.getRenderedCanvas(t)}},ty.getSvgDataUrl=function(){if(hf.svgSupported){var t=this._zr,e=t.storage.getDisplayList();return f(e,function(t){t.stopAnimation(!0)}),t.painter.pathToSvg()}},ty.getDataURL=function(t){t=t||{};var e=t.excludeComponents,i=this._model,n=[],r=this;Vm(e,function(t){i.eachComponent({mainType:t},function(t){var e=r._componentsMap[t.__viewId];e.group.ignore||(n.push(e),e.group.ignore=!0)})});var o="svg"===this._zr.painter.getType()?this.getSvgDataUrl():this.getRenderedCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return Vm(n,function(t){t.group.ignore=!1}),o},ty.getConnectedDataURL=function(t){if(hf.canvasSupported){var e=this.group,i=Math.min,r=Math.max,o=1/0;if(dy[e]){var a=o,s=o,l=-o,h=-o,u=[],c=t&&t.pixelRatio||1;f(cy,function(o){if(o.group===e){var c=o.getRenderedCanvas(n(t)),d=o.getDom().getBoundingClientRect();a=i(d.left,a),s=i(d.top,s),l=r(d.right,l),h=r(d.bottom,h),u.push({dom:c,left:d.left,top:d.top})}}),a*=c,s*=c,l*=c,h*=c;var d=l-a,g=h-s,p=_f();p.width=d,p.height=g;var v=mn(p);return Vm(u,function(t){var e=new qi({style:{x:t.left*c-a,y:t.top*c-s,image:t.dom}});v.add(e)}),v.refreshImmediately(),p.toDataURL("image/"+(t&&t.type||"png"))}return this.getDataURL(t)}},ty.convertToPixel=y(Na,"convertToPixel"),ty.convertFromPixel=y(Na,"convertFromPixel"),ty.containPixel=function(t,e){var i,n=this._model;return t=Ho(n,t),f(t,function(t,n){n.indexOf("Models")>=0&&f(t,function(t){var r=t.coordinateSystem;if(r&&r.containPoint)i|=!!r.containPoint(e);else if("seriesModels"===n){var o=this._chartsMap[t.__viewId];o&&o.containPoint&&(i|=o.containPoint(e,t))}},this)},this),!!i},ty.getVisual=function(t,e){var i=this._model;t=Ho(i,t,{defaultMainType:"series"});var n=t.seriesModel,r=n.getData(),o=t.hasOwnProperty("dataIndexInside")?t.dataIndexInside:t.hasOwnProperty("dataIndex")?r.indexOfRawIndex(t.dataIndex):null;return null!=o?r.getItemVisual(o,e):r.getVisual(e)},ty.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},ty.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]};var ey={update:function(t){var e=this._model,i=this._api,n=this._coordSysMgr,r=this._zr;if(e){e.restoreData(),n.create(this._model,this._api),Ga.call(this,e,i),Za.call(this,e),n.update(e,i),qa.call(this,e,t),Ya.call(this,e,t);var o=e.get("backgroundColor")||"transparent",a=r.painter;if(a.isSingleCanvas&&a.isSingleCanvas())r.configLayer(0,{clearColor:o});else{if(!hf.canvasSupported){var s=Me(o);o=ke(s,"rgb"),0===s[3]&&(o="transparent")}o.colorStops||o.image?(r.configLayer(0,{clearColor:o}),this[Km]=!0,this._dom.style.background="transparent"):(this[Km]&&r.configLayer(0,{clearColor:null}),this[Km]=!1,this._dom.style.background=o)}Vm(sy,function(t){t(e,i)})}},updateView:function(t){var e=this._model;e&&(e.eachSeries(function(t){t.getData().clearAllVisual()}),qa.call(this,e,t),Ha.call(this,"updateView",e,t))},updateVisual:function(t){var e=this._model;e&&(e.eachSeries(function(t){t.getData().clearAllVisual()}),qa.call(this,e,t,!0),Ha.call(this,"updateVisual",e,t))},updateLayout:function(t){var e=this._model;e&&(Xa.call(this,e,t),Ha.call(this,"updateLayout",e,t))},prepareAndUpdate:function(t){var e=this._model;Fa.call(this,"component",e),Fa.call(this,"chart",e),ey.update.call(this,t)}};ty.resize=function(t){this[$m]=!0,this._zr.resize(t);var e=this._model&&this._model.resetOption("media"),i=e?"prepareAndUpdate":"update";ey[i].call(this),this._loadingFX&&this._loadingFX.resize(),this[$m]=!1;var n=t&&t.silent;Ba.call(this,n),Wa.call(this,n)},ty.showLoading=function(t,e){if(b(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),uy[t]){var i=uy[t](this._api,e),n=this._zr;this._loadingFX=i,n.add(i)}},ty.hideLoading=function(){this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},ty.makeActionFromEvent=function(t){var e=a({},t);return e.type=ry[t.type],e},ty.dispatchAction=function(t,e){if(b(e)||(e={silent:!!e}),ny[t.type]&&this._model){if(this[$m])return void this._pendingActions.push(t);Va.call(this,t,e.silent),e.flush?this._zr.flush(!0):e.flush!==!1&&hf.browser.weChat&&this._throttledZrFlush(),Ba.call(this,e.silent),Wa.call(this,e.silent)}},ty.on=Oa("on"),ty.off=Oa("off"),ty.one=Oa("one");var iy=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];ty._initEvents=function(){Vm(iy,function(t){this._zr.on(t,function(e){var i,n=this.getModel(),r=e.target;if("globalout"===t)i={};else if(r&&null!=r.dataIndex){var o=r.dataModel||n.getSeriesByIndex(r.seriesIndex);i=o&&o.getDataParams(r.dataIndex,r.dataType)||{}}else r&&r.eventData&&(i=a({},r.eventData));i&&(i.event=e,i.type=t,this.trigger(t,i))},this)},this),Vm(ry,function(t,e){this._messageCenter.on(e,function(t){this.trigger(e,t)},this)},this)},ty.isDisposed=function(){return this._disposed},ty.clear=function(){this.setOption({series:[]},!0)},ty.dispose=function(){if(!this._disposed){this._disposed=!0;var t=this._api,e=this._model;Vm(this._componentsViews,function(i){i.dispose(e,t)}),Vm(this._chartsViews,function(i){i.dispose(e,t)}),this._zr.dispose(),delete cy[this.id]}},c(Ra,Cf);var ny={},ry={},oy=[],ay=[],sy=[],ly=[],hy={},uy={},cy={},dy={},fy=new Date-0,gy=new Date-0,py="_echarts_instance_",vy={},my=es;fs(Xm,Rm),as(Dm),gs("default",Em),hs({type:"highlight",event:"highlight",update:"highlight"},N),hs({type:"downplay",event:"downplay",update:"downplay"},N);var yy={},xy="__ec_stack_";Ds.getLayoutOnAxis=Ss,As.prototype.parse=function(t){return t},As.prototype.getSetting=function(t){return this._setting[t]},As.prototype.contain=function(t){var e=this._extent;return t>=e[0]&&t<=e[1]},As.prototype.normalize=function(t){var e=this._extent;return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])},As.prototype.scale=function(t){var e=this._extent;return t*(e[1]-e[0])+e[0]},As.prototype.unionExtent=function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1])},As.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getDataExtent(e,!0))},As.prototype.getExtent=function(){return this._extent.slice()},As.prototype.setExtent=function(t,e){var i=this._extent;isNaN(t)||(i[0]=t),isNaN(e)||(i[1]=e)},As.prototype.getTicksLabels=function(){for(var t=[],e=this.getTicks(),i=0;ie[1]&&(e[1]=t[1]),Sy.prototype.setExtent.call(this,e[0],e[1])},getInterval:function(){return this._interval},setInterval:function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=Ls(t)},getTicks:function(){return Os(this._interval,this._extent,this._niceExtent,this._intervalPrecision)},getTicksLabels:function(){for(var t=[],e=this.getTicks(),i=0;ir&&(r=-r,n.reverse());var o=Cs(n,t,e,i);this._intervalPrecision=o.intervalPrecision,this._interval=o.interval,this._niceExtent=o.niceTickExtent}},niceExtent:function(t){var e=this._extent;if(e[0]===e[1])if(0!==e[0]){var i=e[0];t.fixMax?e[0]-=i/2:(e[1]+=i/2,e[0]-=i/2)}else e[1]=1;var n=e[1]-e[0];isFinite(n)||(e[0]=0,e[1]=1),this.niceTicks(t.splitNumber,t.minInterval,t.maxInterval);var r=this._interval;t.fixMin||(e[0]=My(Math.floor(e[0]/r)*r)),t.fixMax||(e[1]=My(Math.ceil(e[1]/r)*r))}});Sy.create=function(){return new Sy};var Iy=Sy.prototype,Ty=Math.ceil,Dy=Math.floor,Ay=1e3,Cy=60*Ay,Ly=60*Cy,ky=24*Ly,Py=function(t,e,i,n){for(;n>i;){var r=i+n>>>1;t[r][1]o&&(o=e),null!=i&&o>i&&(o=i);var a=zy.length,s=Py(zy,o,0,a),l=zy[Math.min(s,a-1)],h=l[1];if("year"===l[0]){var u=r/h,c=Pn(u/t,!0);h*=c}var d=this.getSetting("useUTC")?0:60*new Date(+n[0]||+n[1]).getTimezoneOffset()*1e3,f=[Math.round(Ty((n[0]-d)/h)*h+d),Math.round(Dy((n[1]-d)/h)*h+d)];Ps(f,n),this._stepLvl=l,this._interval=h,this._niceExtent=f},parse:function(t){return+Cn(t)}});f(["contain","normalize"],function(t){Oy.prototype[t]=function(e){return Iy[t].call(this,this.parse(e))}});var zy=[["hh:mm:ss",Ay],["hh:mm:ss",5*Ay],["hh:mm:ss",10*Ay],["hh:mm:ss",15*Ay],["hh:mm:ss",30*Ay],["hh:mm\nMM-dd",Cy],["hh:mm\nMM-dd",5*Cy],["hh:mm\nMM-dd",10*Cy],["hh:mm\nMM-dd",15*Cy],["hh:mm\nMM-dd",30*Cy],["hh:mm\nMM-dd",Ly],["hh:mm\nMM-dd",2*Ly],["hh:mm\nMM-dd",6*Ly],["hh:mm\nMM-dd",12*Ly],["MM-dd\nyyyy",ky],["MM-dd\nyyyy",2*ky],["MM-dd\nyyyy",3*ky],["MM-dd\nyyyy",4*ky],["MM-dd\nyyyy",5*ky],["MM-dd\nyyyy",6*ky],["week",7*ky],["MM-dd\nyyyy",10*ky],["week",14*ky],["week",21*ky],["month",31*ky],["week",42*ky],["month",62*ky],["week",42*ky],["quarter",380*ky/4],["month",31*ky*4],["month",31*ky*5],["half-year",380*ky/2],["month",31*ky*8],["month",31*ky*10],["year",380*ky]];Oy.create=function(t){return new Oy({useUTC:t.ecModel.get("useUTC")})};var Ry=As.prototype,Ny=Sy.prototype,Ey=Sn,Vy=wn,By=Math.floor,Wy=Math.ceil,Hy=Math.pow,Fy=Math.log,Gy=As.extend({type:"log",base:10,$constructor:function(){As.apply(this,arguments),this._originalScale=new Sy},getTicks:function(){var t=this._originalScale,e=this._extent,i=t.getExtent();return g(Ny.getTicks.call(this),function(n){var r=wn(Hy(this.base,n));return r=n===e[0]&&t.__fixMin?zs(r,i[0]):r,r=n===e[1]&&t.__fixMax?zs(r,i[1]):r},this)},getLabel:Ny.getLabel,scale:function(t){return t=Ry.scale.call(this,t),Hy(this.base,t)},setExtent:function(t,e){var i=this.base;t=Fy(t)/Fy(i),e=Fy(e)/Fy(i),Ny.setExtent.call(this,t,e)},getExtent:function(){var t=this.base,e=Ry.getExtent.call(this);e[0]=Hy(t,e[0]),e[1]=Hy(t,e[1]);var i=this._originalScale,n=i.getExtent();return i.__fixMin&&(e[0]=zs(e[0],n[0])),i.__fixMax&&(e[1]=zs(e[1],n[1])),e},unionExtent:function(t){this._originalScale.unionExtent(t);var e=this.base;t[0]=Fy(t[0])/Fy(e),t[1]=Fy(t[1])/Fy(e),Ry.unionExtent.call(this,t)},unionExtentFromData:function(t,e){this.unionExtent(t.getDataExtent(e,!0,function(t){return t>0}))},niceTicks:function(t){t=t||10;var e=this._extent,i=e[1]-e[0];if(!(1/0===i||0>=i)){var n=Ln(i),r=t/i*n;for(.5>=r&&(n*=10);!isNaN(n)&&Math.abs(n)<1&&Math.abs(n)>0;)n*=10;var o=[wn(Wy(e[0]/n)*n),wn(By(e[1]/n)*n)];this._interval=n,this._niceExtent=o}},niceExtent:function(t){Ny.niceExtent.call(this,t);var e=this._originalScale;e.__fixMin=t.fixMin,e.__fixMax=t.fixMax}});f(["contain","normalize"],function(t){Gy.prototype[t]=function(e){return e=Fy(e)/Fy(this.base),Ry[t].call(this,e)}}),Gy.create=function(){return new Gy};var Zy=function(t){this._axes={},this._dimList=[],this.name=t||""};Zy.prototype={constructor:Zy,type:"cartesian",getAxis:function(t){return this._axes[t]},getAxes:function(){return g(this._dimList,Fs,this)},getAxesByScale:function(t){return t=t.toLowerCase(),v(this.getAxes(),function(e){return e.scale.type===t})},addAxis:function(t){var e=t.dim;this._axes[e]=t,this._dimList.push(e)},dataToCoord:function(t){return this._dataCoordConvert(t,"dataToCoord")},coordToData:function(t){return this._dataCoordConvert(t,"coordToData")},_dataCoordConvert:function(t,e){for(var i=this._dimList,n=t instanceof Array?[]:{},r=0;r=i&&n>=t},containData:function(t){return this.contain(this.dataToCoord(t))},getExtent:function(){return this._extent.slice()},getPixelPrecision:function(t){return In(t||this.scale.getExtent(),this._extent)},setExtent:function(t,e){var i=this._extent;i[0]=t,i[1]=e},dataToCoord:function(t,e){var i=this._extent,n=this.scale;return t=n.normalize(t),this.onBand&&"ordinal"===n.type&&(i=i.slice(),Zs(i,n.count())),Xy(t,qy,i,e)},coordToData:function(t,e){var i=this._extent,n=this.scale;this.onBand&&"ordinal"===n.type&&(i=i.slice(),Zs(i,n.count()));var r=Xy(t,i,qy,e);return this.scale.scale(r)},pointToData:function(){},getTicksCoords:function(t){if(this.onBand&&!t){for(var e=this.getBands(),i=[],n=0;na;a++)e.push([o*a/i+n,o*(a+1)/i+n]);return e},getBandWidth:function(){var t=this._extent,e=this.scale.getExtent(),i=e[1]-e[0]+(this.onBand?1:0);0===i&&(i=1);var n=Math.abs(t[1]-t[0]);return Math.abs(n)/i},isHorizontal:null,getRotate:null,getLabelInterval:function(){var t=this._labelInterval;if(!t){var e=this.model,i=e.getModel("axisLabel");t=i.get("interval"),"category"!==this.type||null!=t&&"auto"!==t||(t=Bs(g(this.scale.getTicks(),this.dataToCoord,this),e.getFormattedLabels(),i.getFont(),this.getRotate?this.getRotate():this.isHorizontal&&!this.isHorizontal()?90:0,i.get("rotate"))),this._labelInterval=t}return t}};var Uy=function(t,e,i,n,r){Yy.call(this,t,e,i),this.type=n||"value",this.position=r||"bottom"};Uy.prototype={constructor:Uy,index:0,onZero:!1,model:null,isHorizontal:function(){var t=this.position;return"top"===t||"bottom"===t},getGlobalExtent:function(t){var e=this.getExtent();return e[0]=this.toGlobalCoord(e[0]),e[1]=this.toGlobalCoord(e[1]),t&&e[0]>e[1]&&e.reverse(),e},getOtherAxis:function(){this.grid.getOtherAxis()},isLabelIgnored:function(t){if("category"===this.type){var e=this.getLabelInterval();return"function"==typeof e&&!e(t,this.scale.getLabel(t))||t%(e+1)}},pointToData:function(t,e){return this.coordToData(this.toLocalCoord(t["x"===this.dim?0:1]),e)},toLocalCoord:null,toGlobalCoord:null},u(Uy,Yy);var jy={show:!0,zlevel:0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#333",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,lineStyle:{color:["#ccc"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.3)","rgba(200,200,200,0.3)"]}}},$y={};$y.categoryAxis=r({boundaryGap:!0,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},jy),$y.valueAxis=r({boundaryGap:[0,0],splitNumber:5},jy),$y.timeAxis=s({scale:!0,min:"dataMin",max:"dataMax"},$y.valueAxis),$y.logAxis=s({scale:!0,logBase:10},$y.valueAxis);var Ky=["value","category","time","log"],Qy=function(t,e,i,n){f(Ky,function(a){e.extend({type:t+"Axis."+a,mergeDefaultAndTheme:function(e,n){var o=this.layoutMode,s=o?ea(e):{},l=n.getTheme();r(e,l.get(a+"Axis")),r(e,this.getDefaultOption()),e.type=i(t,e),o&&ta(e,s,o)},defaultOption:o([{},$y[a+"Axis"],n],!0)})}),em.registerSubTypeDefaulter(t+"Axis",y(i,t))},Jy={getFormattedLabels:function(){return Ws(this.axis,this.get("axisLabel.formatter"))},getCategories:function(){return"category"===this.get("type")&&g(this.get("data"),Xs)},getMin:function(t){var e=this.option,i=t||null==e.rangeStart?e.min:e.rangeStart;return this.axis&&null!=i&&"dataMin"!==i&&"function"!=typeof i&&!I(i)&&(i=this.axis.scale.parse(i)),i},getMax:function(t){var e=this.option,i=t||null==e.rangeEnd?e.max:e.rangeEnd;return this.axis&&null!=i&&"dataMax"!==i&&"function"!=typeof i&&!I(i)&&(i=this.axis.scale.parse(i)),i},getNeedCrossZero:function(){var t=this.option;return null!=t.rangeStart||null!=t.rangeEnd?!1:!t.scale},getCoordSysModel:N,setRange:function(t,e){this.option.rangeStart=t,this.option.rangeEnd=e},resetRange:function(){this.option.rangeStart=this.option.rangeEnd=null}},tx=em.extend({type:"cartesian2dAxis",axis:null,init:function(){tx.superApply(this,"init",arguments),this.resetRange()},mergeOption:function(){tx.superApply(this,"mergeOption",arguments),this.resetRange()},restoreData:function(){tx.superApply(this,"restoreData",arguments),this.resetRange()},getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"grid",index:this.option.gridIndex,id:this.option.gridId})[0]}});r(tx.prototype,Jy);var ex={offset:0};Qy("x",tx,qs,ex),Qy("y",tx,qs,ex),em.extend({type:"grid",dependencies:["xAxis","yAxis"],layoutMode:"box",coordinateSystem:null,defaultOption:{show:!1,zlevel:0,z:0,left:"10%",top:60,right:"10%",bottom:60,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"}});var ix=f,nx=Vs,rx=Ns,ox=$s.prototype;ox.type="grid",ox.axisPointerEnabled=!0,ox.getRect=function(){return this._rect},ox.update=function(t,e){var i=this._axesMap;this._updateScale(t,this.model),ix(i.x,function(t){rx(t.scale,t.model)}),ix(i.y,function(t){rx(t.scale,t.model)}),ix(i.x,function(t){Ks(i,"y",t)}),ix(i.y,function(t){Ks(i,"x",t)}),this.resize(this.model,e)},ox.resize=function(t,e,i){function n(){ix(o,function(t){var e=t.isHorizontal(),i=e?[0,r.width]:[0,r.height],n=t.inverse?1:0;t.setExtent(i[n],i[1-n]),Js(t,e?r.x:r.y)})}var r=Ko(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()});this._rect=r;var o=this._axesList;n(),!i&&t.get("containLabel")&&(ix(o,function(t){if(!t.model.get("axisLabel.inside")){var e=js(t);if(e){var i=t.isHorizontal()?"height":"width",n=t.model.get("axisLabel.margin");r[i]-=e[i]+n,"top"===t.position?r.y+=e.height+n:"left"===t.position&&(r.x+=e.width+n)}}}),n())},ox.getAxis=function(t,e){var i=this._axesMap[t];if(null!=i){if(null==e)for(var n in i)if(i.hasOwnProperty(n))return i[n];return i[e]}},ox.getAxes=function(){return this._axesList.slice()},ox.getCartesian=function(t,e){if(null!=t&&null!=e){var i="x"+t+"y"+e;return this._coordsMap[i]}b(t)&&(e=t.yAxisIndex,t=t.xAxisIndex);for(var n=0,r=this._coordsList;nu;u++)this._add&&this._add(l[u]);else this._add&&this._add(l)}}}};var sx=b,lx="undefined",hx=typeof window===lx?global:window,ux={"float":typeof hx.Float64Array===lx?Array:hx.Float64Array,"int":typeof hx.Int32Array===lx?Array:hx.Int32Array,ordinal:Array,number:Array,time:Array},cx=["stackedOn","hasItemOption","_nameList","_idList","_rawData"];al.prototype.pure=!1,al.prototype.count=function(){return this._array.length},al.prototype.getItem=function(t){return this._array[t]};var dx=function(t,e){t=t||["x","y"];for(var i={},n=[],r=0;rd;d++){for(var v=t.getItem(d),m=0;md;d++){var v=t.getItem(d);!e[d]&&v&&(null!=v.name?e[d]=v.name:null!=r&&(e[d]=o[s[r]][d]));var w=e[d]||"",b=v&&v.id;!b&&w&&(c[w]=c[w]||0,b=w,c[w]>0&&(b+="__ec__"+c[w]),c[w]++),b&&(u[d]=b)}this._nameList=e,this._idList=u},fx.count=function(){return this.indices.length},fx.get=function(t,e,i){var n=this._storage,r=this.indices[e];if(null==r||!n[t])return 0/0;var o=n[t][r];if(i){var a=this._dimensionInfos[t];if(a&&a.stackable)for(var s=this.stackedOn;s;){var l=s.get(t,e);(o>=0&&l>0||0>=o&&0>l)&&(o+=l),s=s.stackedOn}}return o},fx.getValues=function(t,e,i){var n=[];x(t)||(i=e,e=t,t=this.dimensions);for(var r=0,o=t.length;o>r;r++)n.push(this.get(t[r],e,i));return n},fx.hasValue=function(t){for(var e=this.dimensions,i=this._dimensionInfos,n=0,r=e.length;r>n;n++)if("ordinal"!==i[e[n]].type&&isNaN(this.get(e[n],t)))return!1;return!0},fx.getDataExtent=function(t,e,i){t=this.getDimension(t);var n=this._storage[t],r=this.getDimensionInfo(t);e=r&&r.stackable&&e;var o,a=(this._extent||(this._extent={}))[t+!!e];if(a)return a;if(n){for(var s=1/0,l=-1/0,h=0,u=this.count();u>h;h++)o=this.get(t,h,e),(!i||i(o,t,h))&&(s>o&&(s=o),o>l&&(l=o));return this._extent[t+!!e]=[s,l]}return[1/0,-1/0]},fx.getSum=function(t,e){var i=this._storage[t],n=0;if(i)for(var r=0,o=this.count();o>r;r++){var a=this.get(t,r,e);isNaN(a)||(n+=a)}return n},fx.indexOf=function(t,e){var i=this._storage,n=i[t],r=this.indices;if(n)for(var o=0,a=r.length;a>o;o++){var s=r[o];if(n[s]===e)return o}return-1},fx.indexOfName=function(t){for(var e=this.indices,i=this._nameList,n=0,r=e.length;r>n;n++){var o=e[n];if(i[o]===t)return n}return-1},fx.indexOfRawIndex=function(t){var e=this.indices,i=e[t];if(null!=i&&i===t)return t;for(var n=0,r=e.length-1;r>=n;){var o=(n+r)/2|0;if(e[o]t))return o;r=o-1}}return-1},fx.indicesOfNearest=function(t,e,i,n){var r=this._storage,o=r[t],a=[];if(!o)return a;null==n&&(n=1/0);for(var s=Number.MAX_VALUE,l=-1,h=0,u=this.count();u>h;h++){var c=e-this.get(t,h,i),d=Math.abs(c);n>=c&&s>=d&&((s>d||c>=0&&0>l)&&(s=d,l=c,a.length=0),a.push(h))}return a},fx.getRawIndex=function(t){var e=this.indices[t];return null==e?-1:e},fx.getRawDataItem=function(t){return this._rawData.getItem(this.getRawIndex(t))},fx.getName=function(t){return this._nameList[this.indices[t]]||""},fx.getId=function(t){return this._idList[this.indices[t]]||this.getRawIndex(t)+""},fx.each=function(t,e,i,n){"function"==typeof t&&(n=i,i=e,e=t,t=[]),t=g(sl(t),this.getDimension,this);var r=[],o=t.length,a=this.indices;n=n||this;for(var s=0;sl;l++)r[l]=this.get(t[l],s,i);r[l]=s,e.apply(n,r)}},fx.filterSelf=function(t,e,i,n){"function"==typeof t&&(n=i,i=e,e=t,t=[]),t=g(sl(t),this.getDimension,this);var r=[],o=[],a=t.length,s=this.indices;n=n||this;for(var l=0;lu;u++)o[u]=this.get(t[u],l,i);o[u]=l,h=e.apply(n,o)}else h=e.call(n,l);h&&r.push(s[l])}return this.indices=r,this._extent={},this},fx.mapArray=function(t,e,i,n){"function"==typeof t&&(n=i,i=e,e=t,t=[]);var r=[];return this.each(t,function(){r.push(e&&e.apply(this,arguments))},i,n),r},fx.map=function(t,e,i,n){t=g(sl(t),this.getDimension,this);var r=ll(this,t),o=r.indices=this.indices,a=r._storage,s=[];return this.each(t,function(){var i=arguments[arguments.length-1],n=e&&e.apply(this,arguments);if(null!=n){"number"==typeof n&&(s[0]=n,n=s);for(var r=0;rg;g+=c){c>f-g&&(c=f-g,h.length=c);for(var p=0;c>p;p++){var v=s[g+p];h[p]=d[v],u[p]=v}var m=i(h),v=u[n(h,m)||0];d[v]=m,l.push(v)}return r},fx.getItemModel=function(t){var e=this.hostModel;return t=this.indices[t],new Ao(this._rawData.getItem(t),e,e&&e.ecModel)},fx.diff=function(t){var e,i=this._idList,n=t&&t._idList,r="e\x00\x00";return new nl(t?t.indices:[],this.indices,function(t){return null!=(e=n[t])?e:r+t},function(t){return null!=(e=i[t])?e:r+t})},fx.getVisual=function(t){var e=this._visual;return e&&e[t]},fx.setVisual=function(t,e){if(sx(t))for(var i in t)t.hasOwnProperty(i)&&this.setVisual(i,t[i]);else this._visual=this._visual||{},this._visual[t]=e},fx.setLayout=function(t,e){if(sx(t))for(var i in t)t.hasOwnProperty(i)&&this.setLayout(i,t[i]);else this._layout[t]=e},fx.getLayout=function(t){return this._layout[t]},fx.getItemLayout=function(t){return this._itemLayouts[t]},fx.setItemLayout=function(t,e,i){this._itemLayouts[t]=i?a(this._itemLayouts[t]||{},e):e},fx.clearItemLayouts=function(){this._itemLayouts.length=0},fx.getItemVisual=function(t,e,i){var n=this._itemVisuals[t],r=n&&n[e];return null!=r||i?r:this.getVisual(e)},fx.setItemVisual=function(t,e,i){var n=this._itemVisuals[t]||{};if(this._itemVisuals[t]=n,sx(e))for(var r in e)e.hasOwnProperty(r)&&(n[r]=e[r]); else n[e]=i},fx.clearAllVisual=function(){this._visual={},this._itemVisuals=[]};var gx=function(t){t.seriesIndex=this.seriesIndex,t.dataIndex=this.dataIndex,t.dataType=this.dataType};fx.setItemGraphicEl=function(t,e){var i=this.hostModel;e&&(e.dataIndex=t,e.dataType=this.dataType,e.seriesIndex=i&&i.seriesIndex,"group"===e.type&&e.traverse(gx,e)),this._graphicEls[t]=e},fx.getItemGraphicEl=function(t){return this._graphicEls[t]},fx.eachItemGraphicEl=function(t,e){f(this._graphicEls,function(i,n){i&&t&&t.call(e,i,n)})},fx.cloneShallow=function(){var t=g(this.dimensions,this.getDimensionInfo,this),e=new dx(t,this.hostModel);return e._storage=this._storage,ol(e,this),e.indices=this.indices.slice(),this._extent&&(e._extent=a({},this._extent)),e},fx.wrapMethod=function(t,e){var i=this[t];"function"==typeof i&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var t=i.apply(this,arguments);return e.apply(this,[t].concat(C(arguments)))})},fx.TRANSFERABLE_METHODS=["cloneShallow","downSample","map"],fx.CHANGABLE_METHODS=["filterSelf"];var px=f,vx=w,mx=s,yx={tooltip:1,label:1,itemName:1},xx=hl.guessOrdinal=function(t,e){for(var i=0,n=t.length;n>i;i++){var r=ul(t[i]);if(!x(r))return!1;var r=r[e];if(null!=r&&isFinite(r)&&""!==r)return!1;if(vx(r)&&"-"!==r)return!0}return!1},_x={cartesian2d:function(t,e,i,n){var r=g(["xAxis","yAxis"],function(t){return i.queryComponents({mainType:t,index:e.get(t+"Index"),id:e.get(t+"Id")})[0]}),o=r[0],a=r[1],s=o.get("type"),l=a.get("type"),h=[{name:"x",type:pl(s),stackable:gl(s)},{name:"y",type:pl(l),stackable:gl(l)}],u="category"===s,c="category"===l;h=hl(h,t,n);var d={};return u&&(d.x=o),c&&(d.y=a),{dimensions:h,categoryIndex:u?0:c?1:-1,categoryAxesModels:d}},singleAxis:function(t,e,i,n){var r=i.queryComponents({mainType:"singleAxis",index:e.get("singleAxisIndex"),id:e.get("singleAxisId")})[0],o=r.get("type"),a="category"===o,s=[{name:"single",type:pl(o),stackable:gl(o)}];s=hl(s,t,n);var l={};return a&&(l.single=r),{dimensions:s,categoryIndex:a?0:-1,categoryAxesModels:l}},polar:function(t,e,i,n){var r=i.queryComponents({mainType:"polar",index:e.get("polarIndex"),id:e.get("polarId")})[0],o=r.findAxisModel("angleAxis"),a=r.findAxisModel("radiusAxis"),s=a.get("type"),l=o.get("type"),h=[{name:"radius",type:pl(s),stackable:gl(s)},{name:"angle",type:pl(l),stackable:gl(l)}],u="category"===l,c="category"===s;h=hl(h,t,n);var d={};return c&&(d.radius=a),u&&(d.angle=o),{dimensions:h,categoryIndex:u?1:c?0:-1,categoryAxesModels:d}},geo:function(t,e,i,n){return{dimensions:hl([{name:"lng"},{name:"lat"}],t,n)}}},wx=Am.extend({type:"series.__base_bar__",getInitialData:function(t,e){return fl(t.data,this,e)},getMarkerPosition:function(t){var e=this.coordinateSystem;if(e){var i=e.dataToPoint(t,!0),n=this.getData(),r=n.getLayout("offset"),o=n.getLayout("size"),a=e.getBaseAxis().isHorizontal()?0:1;return i[a]+=r+o/2,i}return[0/0,0/0]},defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,itemStyle:{}}});wx.extend({type:"series.bar",dependencies:["grid","polar"],brushSelector:"rect"});var bx=ap([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["stroke","barBorderColor"],["lineWidth","barBorderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),Mx={getBarItemStyle:function(t){var e=bx(this,t);if(this.getBorderLineDash){var i=this.getBorderLineDash();i&&(e.lineDash=i)}return e}},Sx=["itemStyle","normal","barBorderWidth"];a(Ao.prototype,Mx),ys({type:"bar",render:function(t,e,i){var n=t.get("coordinateSystem");return("cartesian2d"===n||"polar"===n)&&this._render(t,e,i),this.group},dispose:N,_render:function(t){var e,i=this.group,n=t.getData(),r=this._data,o=t.coordinateSystem,a=o.getBaseAxis();"cartesian2d"===o.type?e=a.isHorizontal():"polar"===o.type&&(e="angle"===a.dim);var s=t.isAnimationEnabled()?t:null;n.diff(r).add(function(r){if(n.hasValue(r)){var a=n.getItemModel(r),l=Tx[o.type](n,r,a),h=Ix[o.type](n,r,a,l,e,s);n.setItemGraphicEl(r,h),i.add(h),wl(h,n,r,a,l,t,e,"polar"===o.type)}}).update(function(a,l){var h=r.getItemGraphicEl(l);if(!n.hasValue(a))return void i.remove(h);var u=n.getItemModel(a),c=Tx[o.type](n,a,u);h?xo(h,{shape:c},s,a):h=Ix[o.type](n,a,u,c,e,s,!0),n.setItemGraphicEl(a,h),i.add(h),wl(h,n,a,u,c,t,e,"polar"===o.type)}).remove(function(t){var e=r.getItemGraphicEl(t);"cartesian2d"===o.type?e&&xl(t,s,e):e&&_l(t,s,e)}).execute(),this._data=n},remove:function(t){var e=this.group,i=this._data;t.get("animation")?i&&i.eachItemGraphicEl(function(e){"sector"===e.type?_l(e.dataIndex,t,e):xl(e.dataIndex,t,e)}):e.removeAll()}});var Ix={cartesian2d:function(t,e,i,n,r,o,s){var l=new bv({shape:a({},n)});if(o){var h=l.shape,u=r?"height":"width",c={};h[u]=0,c[u]=n[u],Nv[s?"updateProps":"initProps"](l,{shape:c},o,e)}return l},polar:function(t,e,i,n,r,o,s){var l=new vv({shape:a({},n)});if(o){var h=l.shape,u=r?"r":"endAngle",c={};h[u]=r?0:n.startAngle,c[u]=n[u],Nv[s?"updateProps":"initProps"](l,{shape:c},o,e)}return l}},Tx={cartesian2d:function(t,e,i){var n=t.getItemLayout(e),r=bl(i,n),o=n.width>0?1:-1,a=n.height>0?1:-1;return{x:n.x+o*r/2,y:n.y+a*r/2,width:n.width-o*r,height:n.height-a*r}},polar:function(t,e){var i=t.getItemLayout(e);return{cx:i.cx,cy:i.cy,r0:i.r0,r:i.r,startAngle:i.startAngle,endAngle:i.endAngle}}},Dx=Br({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var i=e.cx,n=e.cy,r=e.width/2,o=e.height/2;t.moveTo(i,n-o),t.lineTo(i+r,n+o),t.lineTo(i-r,n+o),t.closePath()}}),Ax=Br({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var i=e.cx,n=e.cy,r=e.width/2,o=e.height/2;t.moveTo(i,n-o),t.lineTo(i+r,n),t.lineTo(i,n+o),t.lineTo(i-r,n),t.closePath()}}),Cx=Br({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var i=e.x,n=e.y,r=e.width/5*3,o=Math.max(r,e.height),a=r/2,s=a*a/(o-a),l=n-o+a+s,h=Math.asin(s/a),u=Math.cos(h)*a,c=Math.sin(h),d=Math.cos(h),f=.6*a,g=.7*a;t.moveTo(i-u,l+s),t.arc(i,l,a,Math.PI-h,2*Math.PI+h),t.bezierCurveTo(i+u-c*f,l+s+d*f,i,n-g,i,n),t.bezierCurveTo(i,n-g,i-u+c*f,l+s+d*f,i-u,l+s),t.closePath()}}),Lx=Br({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var i=e.height,n=e.width,r=e.x,o=e.y,a=n/3*2;t.moveTo(r,o),t.lineTo(r+a,o+i),t.lineTo(r,o+i/4*3),t.lineTo(r-a,o+i),t.lineTo(r,o),t.closePath()}}),kx={line:Mv,rect:bv,roundRect:bv,square:bv,circle:fv,diamond:Ax,pin:Cx,arrow:Lx,triangle:Dx},Px={line:function(t,e,i,n,r){r.x1=t,r.y1=e+n/2,r.x2=t+i,r.y2=e+n/2},rect:function(t,e,i,n,r){r.x=t,r.y=e,r.width=i,r.height=n},roundRect:function(t,e,i,n,r){r.x=t,r.y=e,r.width=i,r.height=n,r.r=Math.min(i,n)/4},square:function(t,e,i,n,r){var o=Math.min(i,n);r.x=t,r.y=e,r.width=o,r.height=o},circle:function(t,e,i,n,r){r.cx=t+i/2,r.cy=e+n/2,r.r=Math.min(i,n)/2},diamond:function(t,e,i,n,r){r.cx=t+i/2,r.cy=e+n/2,r.width=i,r.height=n},pin:function(t,e,i,n,r){r.x=t+i/2,r.y=e+n/2,r.width=i,r.height=n},arrow:function(t,e,i,n,r){r.x=t+i/2,r.y=e+n/2,r.width=i,r.height=n},triangle:function(t,e,i,n,r){r.cx=t+i/2,r.cy=e+n/2,r.width=i,r.height=n}},Ox={};f(kx,function(t,e){Ox[e]=new t});var zx=Br({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},beforeBrush:function(){var t=this.style,e=this.shape;"pin"===e.symbolType&&"inside"===t.textPosition&&(t.textPosition=["50%","40%"],t.textAlign="center",t.textVerticalAlign="middle")},buildPath:function(t,e,i){var n=e.symbolType,r=Ox[n];"none"!==e.symbolType&&(r||(n="rect",r=Ox[n]),Px[n](e.x,e.y,e.width,e.height,r.shape),r.buildPath(t,r.shape,i))}}),Rx=Math.PI,Nx=function(t,e){this.opt=e,this.axisModel=t,s(e,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0}),this.group=new ag;var i=new ag({position:e.position.slice(),rotation:e.rotation});i.updateTransform(),this._transform=i.transform,this._dumbGroup=i};Nx.prototype={constructor:Nx,hasBuilder:function(t){return!!Ex[t]},add:function(t){Ex[t].call(this)},getGroup:function(){return this.group}};var Ex={axisLine:function(){var t=this.opt,e=this.axisModel;if(e.get("axisLine.show")){var i=this.axisModel.axis.getExtent(),n=this._transform,r=[i[0],0],o=[i[1],0];n&&(j(r,r,n),j(o,o,n));var s=a({lineCap:"round"},e.getModel("axisLine.lineStyle").getLineStyle());this.group.add(new Mv(Xr({anid:"line",shape:{x1:r[0],y1:r[1],x2:o[0],y2:o[1]},style:s,strokeContainThreshold:t.strokeContainThreshold||5,silent:!0,z2:1})));var l=e.get("axisLine.symbol"),h=e.get("axisLine.symbolSize");if(null!=l){"string"==typeof l&&(l=[l,l]),("string"==typeof h||"number"==typeof h)&&(h=[h,h]);var u=h[0],c=h[1];f([[t.rotation+Math.PI/2,r],[t.rotation-Math.PI/2,o]],function(t,e){if("none"!==l[e]&&null!=l[e]){var i=Sl(l[e],-u/2,-c/2,u,c,s.stroke,!0);i.attr({rotation:t[0],position:t[1],silent:!0}),this.group.add(i)}},this)}}},axisTickLabel:function(){var t=this.axisModel,e=this.opt,i=Pl(this,t,e),n=Ol(this,t,e);Al(t,n,i)},axisName:function(){var t=this.opt,e=this.axisModel,i=T(t.axisName,e.get("name"));if(i){var n,r=e.get("nameLocation"),o=t.nameDirection,s=e.getModel("nameTextStyle"),l=e.get("nameGap")||0,h=this.axisModel.axis.getExtent(),u=h[0]>h[1]?-1:1,c=["start"===r?h[0]-u*l:"end"===r?h[1]+u*l:(h[0]+h[1])/2,kl(r)?t.labelOffset+o*l:0],d=e.get("nameRotate");null!=d&&(d=d*Rx/180);var f;kl(r)?n=Vx(t.rotation,null!=d?d:t.rotation,o):(n=Tl(t,r,d||0,h),f=t.axisNameAvailableWidth,null!=f&&(f=Math.abs(f/Math.sin(n.rotation)),!isFinite(f)&&(f=null)));var g=s.getFont(),p=e.get("nameTruncate",!0)||{},v=p.ellipsis,m=T(t.nameTruncateMaxWidth,p.maxWidth,f),y=null!=v&&null!=m?ip(i,m,g,v,{minChar:2,placeholder:p.placeholder}):i,x=e.get("tooltip",!0),_=e.mainType,w={componentType:_,name:i,$vars:["name"]};w[_+"Index"]=e.componentIndex;var b=new dv({anid:"name",__fullText:i,__truncatedText:y,position:c,rotation:n.rotation,silent:Dl(e),z2:1,tooltip:x&&x.show?a({content:i,formatter:function(){return i},formatterParams:w},x):null});lo(b.style,s,{text:y,textFont:g,textFill:s.getTextColor()||e.get("axisLine.lineStyle.color"),textAlign:n.textAlign,textVerticalAlign:n.textVerticalAlign}),e.get("triggerEvent")&&(b.eventData=Il(e),b.eventData.targetType="axisName",b.eventData.name=i),this._dumbGroup.add(b),b.updateTransform(),this.group.add(b),b.decomposeTransform()}}},Vx=Nx.innerTextLayout=function(t,e,i){var n,r,o=Dn(e-t);return An(o)?(r=i>0?"top":"bottom",n="center"):An(o-Rx)?(r=i>0?"bottom":"top",n="center"):(r="middle",n=o>0&&Rx>o?i>0?"right":"left":i>0?"left":"right"),{rotation:o,textAlign:n,textVerticalAlign:r}},Bx=Nx.ifIgnoreOnTick=function(t,e,i,n,r,o){if(0===e&&r||e===n-1&&o)return!1;var a,s=t.scale;return"ordinal"===s.type&&("function"==typeof i?(a=s.getTicks()[e],!i(a,s.getLabel(a))):e%(i+1))},Wx=Nx.getInterval=function(t,e){var i=t.get("interval");return(null==i||"auto"==i)&&(i=e),i},Hx=f,Fx=y,Gx=vs({type:"axis",_axisPointer:null,axisPointerClass:null,render:function(t,e,i,n){this.axisPointerClass&&Wl(t),Gx.superApply(this,"render",arguments),Xl(this,t,e,i,n,!0)},updateAxisPointer:function(t,e,i,n){Xl(this,t,e,i,n,!1)},remove:function(t,e){var i=this._axisPointer;i&&i.remove(e),Gx.superApply(this,"remove",arguments)},dispose:function(t,e){ql(this,e),Gx.superApply(this,"dispose",arguments)}}),Zx=[];Gx.registerAxisPointerClass=function(t,e){Zx[t]=e},Gx.getAxisPointerClass=function(t){return t&&Zx[t]};var Xx=Nx.ifIgnoreOnTick,qx=Nx.getInterval,Yx=["axisLine","axisTickLabel","axisName"],Ux=["splitArea","splitLine"],jx=Gx.extend({type:"cartesianAxis",axisPointerClass:"CartesianAxisPointer",render:function(t,e,i,n){this.group.removeAll();var r=this._axisGroup;if(this._axisGroup=new ag,this.group.add(this._axisGroup),t.get("show")){var o=t.getCoordSysModel(),a=Yl(o,t),s=new Nx(t,a);f(Yx,s.add,s),this._axisGroup.add(s.getGroup()),f(Ux,function(e){t.get(e+".show")&&this["_"+e](t,o,a.labelInterval)},this),So(r,this._axisGroup,t),jx.superCall(this,"render",t,e,i,n)}},_splitLine:function(t,e,i){var n=t.axis;if(!n.scale.isBlank()){var r=t.getModel("splitLine"),o=r.getModel("lineStyle"),a=o.get("color"),l=qx(r,i);a=x(a)?a:[a];for(var h=e.coordinateSystem.getRect(),u=n.isHorizontal(),c=0,d=n.getTicksCoords(),f=n.scale.getTicks(),g=t.get("axisLabel.showMinLabel"),p=t.get("axisLabel.showMaxLabel"),v=[],m=[],y=o.getLineStyle(),_=0;_0&&rh(i[r-1]);r--);for(;r>n&&rh(i[n]);n++);}for(;r>n;)n+=oh(t,i,n,r,r,1,o.min,o.max,e.smooth,e.smoothMonotone,e.connectNulls)+1}}),c_=Cr.extend({type:"ec-polygon",shape:{points:[],stackedOnPoints:[],smooth:0,stackedOnSmooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},brush:pv(Cr.prototype.brush),buildPath:function(t,e){var i=e.points,n=e.stackedOnPoints,r=0,o=i.length,a=e.smoothMonotone,s=ah(i,e.smoothConstraint),l=ah(n,e.smoothConstraint);if(e.connectNulls){for(;o>0&&rh(i[o-1]);o--);for(;o>r&&rh(i[r]);r++);}for(;o>r;){var h=oh(t,i,r,o,o,1,s.min,s.max,e.smooth,a,e.connectNulls);oh(t,n,r+h-1,h,o,-1,l.min,l.max,e.stackedOnSmooth,a,e.connectNulls),r+=h+1,t.closePath()}}});Da.extend({type:"line",init:function(){var t=new ag,e=new Jl;this.group.add(e.group),this._symbolDraw=e,this._lineGroup=t},render:function(t,e,i){var n=t.coordinateSystem,r=this.group,o=t.getData(),a=t.getModel("lineStyle.normal"),l=t.getModel("areaStyle.normal"),h=o.mapArray(o.getItemLayout,!0),u="polar"===n.type,c=this._coordSys,d=this._symbolDraw,f=this._polyline,g=this._polygon,p=this._lineGroup,v=t.get("animation"),m=!l.isEmpty(),y=ch(n,o),x=t.get("showSymbol"),_=x&&!u&&!t.get("showAllSymbol")&&this._getSymbolIgnoreFunc(o,n),w=this._data;w&&w.eachItemGraphicEl(function(t,e){t.__temp&&(r.remove(t),w.setItemGraphicEl(e,null))}),x||d.remove(),r.add(p);var b=!u&&t.get("step");f&&c.type===n.type&&b===this._step?(m&&!g?g=this._newPolygon(h,y,n,v):g&&!m&&(p.remove(g),g=this._polygon=null),p.setClipPath(gh(n,!1,t)),x&&d.updateData(o,_),o.eachItemGraphicEl(function(t){t.stopAnimation(!0)}),sh(this._stackedOnPoints,y)&&sh(this._points,h)||(v?this._updateAnimation(o,y,n,i,b):(b&&(h=ph(h,n,b),y=ph(y,n,b)),f.setShape({points:h}),g&&g.setShape({points:h,stackedOnPoints:y})))):(x&&d.updateData(o,_),b&&(h=ph(h,n,b),y=ph(y,n,b)),f=this._newPolyline(h,n,v),m&&(g=this._newPolygon(h,y,n,v)),p.setClipPath(gh(n,!0,t)));var M=vh(o,n)||o.getVisual("color");f.useStyle(s(a.getLineStyle(),{fill:"none",stroke:M,lineJoin:"bevel"}));var S=t.get("smooth");if(S=lh(t.get("smooth")),f.setShape({smooth:S,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")}),g){var I=o.stackedOn,T=0;if(g.useStyle(s(l.getAreaStyle(),{fill:M,opacity:.7,lineJoin:"bevel"})),I){var D=I.hostModel;T=lh(D.get("smooth"))}g.setShape({smooth:S,stackedOnSmooth:T,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")})}this._data=o,this._coordSys=n,this._stackedOnPoints=y,this._points=h,this._step=b},dispose:function(){},highlight:function(t,e,i,n){var r=t.getData(),o=Wo(r,n);if(!(o instanceof Array)&&null!=o&&o>=0){var a=r.getItemGraphicEl(o);if(!a){var s=r.getItemLayout(o);if(!s)return;a=new Kl(r,o),a.position=s,a.setZ(t.get("zlevel"),t.get("z")),a.ignore=isNaN(s[0])||isNaN(s[1]),a.__temp=!0,r.setItemGraphicEl(o,a),a.stopSymbolAnimation(!0),this.group.add(a)}a.highlight()}else Da.prototype.highlight.call(this,t,e,i,n)},downplay:function(t,e,i,n){var r=t.getData(),o=Wo(r,n);if(null!=o&&o>=0){var a=r.getItemGraphicEl(o);a&&(a.__temp?(r.setItemGraphicEl(o,null),this.group.remove(a)):a.downplay())}else Da.prototype.downplay.call(this,t,e,i,n)},_newPolyline:function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new u_({shape:{points:t},silent:!0,z2:10}),this._lineGroup.add(e),this._polyline=e,e},_newPolygon:function(t,e){var i=this._polygon;return i&&this._lineGroup.remove(i),i=new c_({shape:{points:t,stackedOnPoints:e},silent:!0}),this._lineGroup.add(i),this._polygon=i,i},_getSymbolIgnoreFunc:function(t,e){var i=e.getAxesByScale("ordinal")[0];return i&&i.isLabelIgnored?m(i.isLabelIgnored,i):void 0},_updateAnimation:function(t,e,i,n,r){var o=this._polyline,a=this._polygon,s=t.hostModel,l=i_(this._data,t,this._stackedOnPoints,e,this._coordSys,i),h=l.current,u=l.stackedOnCurrent,c=l.next,d=l.stackedOnNext;r&&(h=ph(l.current,i,r),u=ph(l.stackedOnCurrent,i,r),c=ph(l.next,i,r),d=ph(l.stackedOnNext,i,r)),o.shape.__points=l.current,o.shape.points=h,xo(o,{shape:{points:c}},s),a&&(a.setShape({points:h,stackedOnPoints:u}),xo(a,{shape:{points:c,stackedOnPoints:d}},s));for(var f=[],g=l.status,p=0;pe&&(e=t[i]);return e},min:function(t){for(var e=1/0,i=0;i1){var h;"string"==typeof i?h=g_[i]:"function"==typeof i&&(h=i),h&&(e=e.downSample(o.dim,1/l,h,p_),t.setData(e))}}},this)};fs(y(d_,"line","circle","line")),ds(y(f_,"line")),ss(jm.PROCESSOR.STATISTIC,y(v_,"line"));var m_={updateSelectedMap:function(t){this._targetList=t.slice(),this._selectTargetMap=p(t||[],function(t,e){return t.set(e.name,e),t},R())},select:function(t,e){var i=null!=e?this._targetList[e]:this._selectTargetMap.get(t),n=this.get("selectedMode");"single"===n&&this._selectTargetMap.each(function(t){t.selected=!1}),i&&(i.selected=!0)},unSelect:function(t,e){var i=null!=e?this._targetList[e]:this._selectTargetMap.get(t);i&&(i.selected=!1)},toggleSelected:function(t,e){var i=null!=e?this._targetList[e]:this._selectTargetMap.get(t);return null!=i?(this[i.selected?"unSelect":"select"](t,e),i.selected):void 0},isSelected:function(t,e){var i=null!=e?this._targetList[e]:this._selectTargetMap.get(t);return i&&i.selected}},y_=ms({type:"series.pie",init:function(t){y_.superApply(this,"init",arguments),this.legendDataProvider=function(){return this.getRawData()},this.updateSelectedMap(t.data),this._defaultLabelLine(t)},mergeOption:function(t){y_.superCall(this,"mergeOption",t),this.updateSelectedMap(this.option.data)},getInitialData:function(t){var e=hl(["value"],t.data),i=new dx(e,this);return i.initData(t.data),i},getDataParams:function(t){var e=this.getData(),i=y_.superCall(this,"getDataParams",t),n=[];return e.each("value",function(t){n.push(t)}),i.percent=Tn(n,t,e.hostModel.get("percentPrecision")),i.$vars.push("percent"),i},_defaultLabelLine:function(t){Po(t.labelLine,["show"]);var e=t.labelLine.normal,i=t.labelLine.emphasis;e.show=e.show&&t.label.normal.show,i.show=i.show&&t.label.emphasis.show},defaultOption:{zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,selectedOffset:10,hoverOffset:10,avoidLabelOverlap:!0,percentPrecision:2,stillShowZeroSum:!0,label:{normal:{rotate:!1,show:!0,position:"outer"},emphasis:{}},labelLine:{normal:{show:!0,length:15,length2:15,smooth:!1,lineStyle:{width:1,type:"solid"}}},itemStyle:{normal:{borderWidth:1},emphasis:{}},animationType:"expansion",animationEasing:"cubicOut",data:[]}});c(y_,m_);var x_=xh.prototype;x_.updateData=function(t,e,i){function n(){o.stopAnimation(!0),o.animateTo({shape:{r:u.r+l.get("hoverOffset")}},300,"elasticOut")}function r(){o.stopAnimation(!0),o.animateTo({shape:{r:u.r}},300,"elasticOut")}var o=this.childAt(0),l=t.hostModel,h=t.getItemModel(e),u=t.getItemLayout(e),c=a({},u);if(c.label=null,i){o.setShape(c);var d=l.getShallow("animationType");"scale"===d?(o.shape.r=u.r0,_o(o,{shape:{r:u.r}},l,e)):(o.shape.endAngle=u.startAngle,xo(o,{shape:{endAngle:u.endAngle}},l,e))}else xo(o,{shape:c},l,e);var f=h.getModel("itemStyle"),g=t.getItemVisual(e,"color");o.useStyle(s({lineJoin:"bevel",fill:g},f.getModel("normal").getItemStyle())),o.hoverStyle=f.getModel("emphasis").getItemStyle();var p=h.getShallow("cursor");p&&o.attr("cursor",p),yh(this,t.getItemLayout(e),h.get("selected"),l.get("selectedOffset"),l.get("animation")),o.off("mouseover").off("mouseout").off("emphasis").off("normal"),h.get("hoverAnimation")&&l.isAnimationEnabled()&&o.on("mouseover",n).on("mouseout",r).on("emphasis",n).on("normal",r),this._updateLabel(t,e),ao(this)},x_._updateLabel=function(t,e){var i=this.childAt(1),n=this.childAt(2),r=t.hostModel,o=t.getItemModel(e),a=t.getItemLayout(e),s=a.label,l=t.getItemVisual(e,"color");xo(i,{shape:{points:s.linePoints||[[s.x,s.y],[s.x,s.y],[s.x,s.y]]}},r,e),xo(n,{style:{x:s.x,y:s.y}},r,e),n.attr({rotation:s.rotation,origin:[s.x,s.y],z2:10});var h=o.getModel("label.normal"),u=o.getModel("label.emphasis"),c=o.getModel("labelLine.normal"),d=o.getModel("labelLine.emphasis"),l=t.getItemVisual(e,"color");so(n.style,n.hoverStyle={},h,u,{labelFetcher:t.hostModel,labelDataIndex:e,defaultText:t.getName(e),autoColor:l,useInsideStyle:!!s.inside},{textAlign:s.textAlign,textVerticalAlign:s.verticalAlign,opacity:t.getItemVisual(e,"opacity")}),n.ignore=n.normalIgnore=!h.get("show"),n.hoverIgnore=!u.get("show"),i.ignore=i.normalIgnore=!c.get("show"),i.hoverIgnore=!d.get("show"),i.setStyle({stroke:l,opacity:t.getItemVisual(e,"opacity")}),i.setStyle(c.getModel("lineStyle").getLineStyle()),i.hoverStyle=d.getModel("lineStyle").getLineStyle();var f=c.get("smooth");f&&f===!0&&(f=.4),i.setShape({smooth:f})},u(xh,ag);var __=(Da.extend({type:"pie",init:function(){var t=new ag;this._sectorGroup=t},render:function(t,e,i,n){if(!n||n.from!==this.uid){var r=t.getData(),o=this._data,a=this.group,s=e.get("animation"),l=!o,h=t.get("animationType"),u=y(mh,this.uid,t,s,i),c=t.get("selectedMode");if(r.diff(o).add(function(t){var e=new xh(r,t);l&&"scale"!==h&&e.eachChild(function(t){t.stopAnimation(!0)}),c&&e.on("click",u),r.setItemGraphicEl(t,e),a.add(e)}).update(function(t,e){var i=o.getItemGraphicEl(e);i.updateData(r,t),i.off("click"),c&&i.on("click",u),a.add(i),r.setItemGraphicEl(t,i)}).remove(function(t){var e=o.getItemGraphicEl(t);a.remove(e)}).execute(),s&&l&&r.count()>0&&"scale"!==h){var d=r.getItemLayout(0),f=Math.max(i.getWidth(),i.getHeight())/2,g=m(a.removeClipPath,a);a.setClipPath(this._createClipPath(d.cx,d.cy,f,d.startAngle,d.clockwise,g,t))}this._data=r}},dispose:function(){},_createClipPath:function(t,e,i,n,r,o,a){var s=new vv({shape:{cx:t,cy:e,r0:0,r:i,startAngle:n,endAngle:n,clockwise:r}});return _o(s,{shape:{endAngle:n+(r?1:-1)*Math.PI*2}},a,o),s},containPoint:function(t,e){var i=e.getData(),n=i.getItemLayout(0);if(n){var r=t[0]-n.cx,o=t[1]-n.cy,a=Math.sqrt(r*r+o*o);return a<=n.r&&a>=n.r0}}}),function(t,e){f(e,function(e){e.update="updateView",hs(e,function(i,n){var r={};return n.eachComponent({mainType:"series",subType:t,query:i},function(t){t[e.method]&&t[e.method](i.name,i.dataIndex);var n=t.getData();n.each(function(e){var i=n.getName(e);r[i]=t.isSelected(i)||!1})}),{name:i.name,selected:r}})})}),w_=function(t,e){var i={};e.eachRawSeriesByType(t,function(t){var n=t.getRawData(),r={};if(!e.isSeriesFiltered(t)){var o=t.getData();o.each(function(t){var e=o.getRawIndex(t);r[e]=t}),n.each(function(e){var a=r[e],s=null!=a&&o.getItemVisual(a,"color",!0);if(s)n.setItemVisual(e,"color",s); else{var l=n.getItemModel(e),h=l.get("itemStyle.normal.color")||t.getColorFromPalette(n.getName(e),i);n.setItemVisual(e,"color",h),null!=a&&o.setItemVisual(a,"color",h)}})}})},b_=function(t,e,i,n){var r,o,a=t.getData(),s=[],l=!1;a.each(function(i){var n,h,u,c,d=a.getItemLayout(i),f=a.getItemModel(i),g=f.getModel("label.normal"),p=g.get("position")||f.get("label.emphasis.position"),v=f.getModel("labelLine.normal"),m=v.get("length"),y=v.get("length2"),x=(d.startAngle+d.endAngle)/2,_=Math.cos(x),w=Math.sin(x);r=d.cx,o=d.cy;var b="inside"===p||"inner"===p;if("center"===p)n=d.cx,h=d.cy,c="center";else{var M=(b?(d.r+d.r0)/2*_:d.r*_)+r,S=(b?(d.r+d.r0)/2*w:d.r*w)+o;if(n=M+3*_,h=S+3*w,!b){var I=M+_*(m+e-d.r),T=S+w*(m+e-d.r),D=I+(0>_?-1:1)*y,A=T;n=D+(0>_?-5:5),h=A,u=[[M,S],[I,T],[D,A]]}c=b?"center":_>0?"left":"right"}var C=g.getFont(),L=g.get("rotate")?0>_?-x+Math.PI:-x:0,k=t.getFormattedLabel(i,"normal")||a.getName(i),P=ui(k,C,c,"top");l=!!L,d.label={x:n,y:h,position:p,height:P.height,len:m,len2:y,linePoints:u,textAlign:c,verticalAlign:"middle",rotation:L,inside:b},b||s.push(d.label)}),!l&&t.get("avoidLabelOverlap")&&wh(s,r,o,e,i,n)},M_=2*Math.PI,S_=Math.PI/180,I_=function(t,e,i){e.eachSeriesByType(t,function(t){var e=t.get("center"),n=t.get("radius");x(n)||(n=[0,n]),x(e)||(e=[e,e]);var r=i.getWidth(),o=i.getHeight(),a=Math.min(r,o),s=_n(e[0],r),l=_n(e[1],o),h=_n(n[0],a/2),u=_n(n[1],a/2),c=t.getData(),d=-t.get("startAngle")*S_,f=t.get("minAngle")*S_,g=0;c.each("value",function(t){!isNaN(t)&&g++});var p=c.getSum("value"),v=Math.PI/(p||g)*2,m=t.get("clockwise"),y=t.get("roseType"),_=t.get("stillShowZeroSum"),w=c.getDataExtent("value");w[0]=0;var b=M_,M=0,S=d,I=m?1:-1;if(c.each("value",function(t,e){var i;if(isNaN(t))return void c.setItemLayout(e,{angle:0/0,startAngle:0/0,endAngle:0/0,clockwise:m,cx:s,cy:l,r0:h,r:y?0/0:u});i="area"!==y?0===p&&_?v:t*v:M_/g,f>i?(i=f,b-=f):M+=t;var n=S+I*i;c.setItemLayout(e,{angle:i,startAngle:S,endAngle:n,clockwise:m,cx:s,cy:l,r0:h,r:y?xn(t,w,[h,u]):u}),S=n},!0),M_>b&&g)if(.001>=b){var T=M_/g;c.each("value",function(t,e){if(!isNaN(t)){var i=c.getItemLayout(e);i.angle=T,i.startAngle=d+I*e*T,i.endAngle=d+I*(e+1)*T}})}else v=b/M,S=d,c.each("value",function(t,e){if(!isNaN(t)){var i=c.getItemLayout(e),n=i.angle===f?f:t*v;i.startAngle=S,i.endAngle=S+I*n,S+=I*n}});b_(t,u,r,o)})},T_=function(t,e){var i=e.findComponents({mainType:"legend"});i&&i.length&&e.eachSeriesByType(t,function(t){var e=t.getData();e.filterSelf(function(t){for(var n=e.getName(t),r=0;r=0;o--){var a=n[o],s=r[o],l=a[0]-s[0]/2,h=a[1]-s[1]/2;if(t>=l&&e>=h&&t<=l+s[0]&&e<=h+s[1])return o}return-1}}),A_=bh.prototype;A_.updateData=function(t){this.group.removeAll();var e=this._symbolEl,i=t.hostModel;e.setShape({points:t.mapArray(t.getItemLayout),sizes:t.mapArray(function(e){var i=t.getItemVisual(e,"symbolSize");return i instanceof Array||(i=[i,i]),i})}),e.symbolProxy=Sl(t.getVisual("symbol"),0,0,0,0),e.setColor=e.symbolProxy.setColor,e.useStyle(i.getModel("itemStyle.normal").getItemStyle(["color"]));var n=t.getVisual("color");n&&e.setColor(n),e.seriesIndex=i.seriesIndex,e.on("mousemove",function(t){e.dataIndex=null;var i=e.findDataIndex(t.offsetX,t.offsetY);i>=0&&(e.dataIndex=i)}),this.group.add(e)},A_.updateLayout=function(t){var e=t.getData();this._symbolEl.setShape({points:e.mapArray(e.getItemLayout)})},A_.remove=function(){this.group.removeAll()},ys({type:"scatter",init:function(){this._normalSymbolDraw=new Jl,this._largeSymbolDraw=new bh},render:function(t){var e=t.getData(),i=this._largeSymbolDraw,n=this._normalSymbolDraw,r=this.group,o=t.get("large")&&e.count()>t.get("largeThreshold")?i:n;this._symbolDraw=o,o.updateData(e),r.add(o.group),r.remove(o===i?n.group:i.group)},updateLayout:function(t){this._symbolDraw.updateLayout(t)},remove:function(t,e){this._symbolDraw&&this._symbolDraw.remove(e,!0)},dispose:function(){}}),fs(y(d_,"scatter","circle",null)),ds(y(f_,"scatter")),Am.extend({type:"series.effectScatter",dependencies:["grid","polar"],getInitialData:function(t,e){var i=fl(t.data,this,e);return i},brushSelector:"point",defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,effectType:"ripple",progressive:0,showEffectOn:"render",rippleEffect:{period:4,scale:2.5,brushType:"fill"},symbolSize:10}});var C_=3,L_=Ih.prototype;L_.stopEffectAnimation=function(){this.childAt(1).removeAll()},L_.startEffectAnimation=function(t){for(var e=t.symbolType,i=t.color,n=this.childAt(1),r=0;C_>r;r++){var o=Sl(e,-1,-1,2,2,i);o.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scale:[.5,.5]});var a=-r/C_*t.period+t.effectOffset;o.animate("",!0).when(t.period,{scale:[t.rippleScale/2,t.rippleScale/2]}).delay(a).start(),o.animateStyle(!0).when(t.period,{opacity:0}).delay(a).start(),n.add(o)}Sh(n,t)},L_.updateEffectAnimation=function(t){for(var e=this._effectCfg,i=this.childAt(1),n=["symbolType","period","rippleScale"],r=0;rf;++f){var g=t[f],p=g[0],v=g[1],m=g[2],y=n(m);c.globalAlpha=y,c.drawImage(a,p-h,v-h)}if(!u.width||!u.height)return u;for(var x=c.getImageData(0,0,u.width,u.height),_=x.data,w=0,b=_.length,M=this.minOpacity,S=this.maxOpacity,I=S-M;b>w;){var y=_[w+3]/256,T=4*Math.floor(y*(k_-1));if(y>0){var D=o(y)?s:l;y>0&&(y=y*I+M),_[w++]=D[T],_[w++]=D[T+1],_[w++]=D[T+2],_[w++]=D[T+3]*y*256}else w+=4}return c.putImageData(x,0,0),u},_getBrush:function(){var t=this._brushCanvas||(this._brushCanvas=_f()),e=this.pointSize+this.blurSize,i=2*e;t.width=i,t.height=i;var n=t.getContext("2d");return n.clearRect(0,0,i,i),n.shadowOffsetX=i,n.shadowBlur=this.blurSize,n.shadowColor="#000",n.beginPath(),n.arc(-e,e,this.pointSize,0,2*Math.PI,!0),n.closePath(),n.fill(),t},_getGradient:function(t,e,i){for(var n=this._gradientPixels,r=n[i]||(n[i]=new Uint8ClampedArray(1024)),o=[0,0,0,0],a=0,s=0;256>s;s++)e[i](s/255,!0,o),r[a++]=o[0],r[a++]=o[1],r[a++]=o[2],r[a++]=o[3];return r}},ys({type:"heatmap",render:function(t,e,i){var n;e.eachComponent("visualMap",function(e){e.eachTargetSeries(function(i){i===t&&(n=e)})}),this.group.removeAll();var r=t.coordinateSystem;"cartesian2d"===r.type||"calendar"===r.type?this._renderOnCartesianAndCalendar(r,t,i):Ch(r)&&this._renderOnGeo(r,t,n,i)},dispose:function(){},_renderOnCartesianAndCalendar:function(t,e){if("cartesian2d"===t.type)var i=t.getAxis("x"),n=t.getAxis("y"),r=i.getBandWidth(),o=n.getBandWidth();var s=this.group,l=e.getData(),h="itemStyle.normal",u="itemStyle.emphasis",c="label.normal",d="label.emphasis",f=e.getModel(h).getItemStyle(["color"]),g=e.getModel(u).getItemStyle(),p=e.getModel("label.normal"),v=e.getModel("label.emphasis"),m=t.type,y="cartesian2d"===m?[e.coordDimToDataDim("x")[0],e.coordDimToDataDim("y")[0],e.coordDimToDataDim("value")[0]]:[e.coordDimToDataDim("time")[0],e.coordDimToDataDim("value")[0]];l.each(function(i){var n;if("cartesian2d"===m){if(isNaN(l.get(y[2],i)))return;var x=t.dataToPoint([l.get(y[0],i),l.get(y[1],i)]);n=new bv({shape:{x:x[0]-r/2,y:x[1]-o/2,width:r,height:o},style:{fill:l.getItemVisual(i,"color"),opacity:l.getItemVisual(i,"opacity")}})}else{if(isNaN(l.get(y[1],i)))return;n=new bv({z2:1,shape:t.dataToRect([l.get(y[0],i)]).contentShape,style:{fill:l.getItemVisual(i,"color"),opacity:l.getItemVisual(i,"opacity")}})}var _=l.getItemModel(i);l.hasItemOption&&(f=_.getModel(h).getItemStyle(["color"]),g=_.getModel(u).getItemStyle(),p=_.getModel(c),v=_.getModel(d));var w=e.getRawValue(i),b="-";w&&null!=w[2]&&(b=w[2]),so(f,g,p,v,{labelFetcher:e,labelDataIndex:i,defaultText:b,isRectText:!0}),n.setStyle(f),ao(n,l.hasItemOption?g:a({},g)),s.add(n),l.setItemGraphicEl(i,n)})},_renderOnGeo:function(t,e,i,n){var r=i.targetVisuals.inRange,o=i.targetVisuals.outOfRange,a=e.getData(),s=this._hmLayer||this._hmLayer||new Th;s.blurSize=e.get("blurSize"),s.pointSize=e.get("pointSize"),s.minOpacity=e.get("minOpacity"),s.maxOpacity=e.get("maxOpacity");var l=t.getViewRect().clone(),h=t.getRoamTransform().transform;l.applyTransform(h);var u=Math.max(l.x,0),c=Math.max(l.y,0),d=Math.min(l.width+l.x,n.getWidth()),f=Math.min(l.height+l.y,n.getHeight()),g=d-u,p=f-c,v=a.mapArray(["lng","lat","value"],function(e,i,n){var r=t.dataToPoint([e,i]);return r[0]-=u,r[1]-=c,r.push(n),r}),m=i.getExtent(),y="visualMap.continuous"===i.type?Ah(m,i.option.range):Dh(m,i.getPieceList(),i.option.selected);s.update(v,g,p,r.color.getNormalizer(),{inRange:r.color.getColorMapper(),outOfRange:o.color.getColorMapper()},y);var x=new qi({style:{width:g,height:p,x:u,y:c,image:s.canvas},silent:!0});this.group.add(x)}});var P_=f,O_="\x00__link_datas",z_="\x00__link_mainData",R_=function(t,e){this.name=t||"",this.depth=0,this.height=0,this.parentNode=null,this.dataIndex=-1,this.children=[],this.viewChildren=[],this.hostTree=e};R_.prototype={constructor:R_,isRemoved:function(){return this.dataIndex<0},eachNode:function(t,e,i){"function"==typeof t&&(i=e,e=t,t=null),t=t||{},w(t)&&(t={order:t});var n,r=t.order||"preorder",o=this[t.attr||"children"];"preorder"===r&&(n=e.call(i,this));for(var a=0;!n&&ae&&(e=n.height)}this.height=e+1},getNodeById:function(t){if(this.getId()===t)return this;for(var e=0,i=this.children,n=i.length;n>e;e++){var r=i[e].getNodeById(t);if(r)return r}},contains:function(t){if(t===this)return!0;for(var e=0,i=this.children,n=i.length;n>e;e++){var r=i[e].contains(t);if(r)return r}},getAncestors:function(t){for(var e=[],i=t?this:this.parentNode;i;)e.push(i),i=i.parentNode;return e.reverse(),e},getValue:function(t){var e=this.hostTree.data;return e.get(e.getDimension(t||"value"),this.dataIndex)},setLayout:function(t,e){this.dataIndex>=0&&this.hostTree.data.setItemLayout(this.dataIndex,t,e)},getLayout:function(){return this.hostTree.data.getItemLayout(this.dataIndex)},getModel:function(t){if(!(this.dataIndex<0)){var e,i=this.hostTree,n=i.data.getItemModel(this.dataIndex),r=this.getLevelModel();return r||0!==this.children.length&&(0===this.children.length||this.isExpand!==!1)||(e=this.getLeavesModel()),n.getModel(t,(r||e||i.hostModel).getModel(t))}},getLevelModel:function(){return(this.hostTree.levelModels||[])[this.depth]},getLeavesModel:function(){return this.hostTree.leavesModel},setVisual:function(t,e){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,t,e)},getVisual:function(t,e){return this.hostTree.data.getItemVisual(this.dataIndex,t,e)},getRawIndex:function(){return this.hostTree.data.getRawIndex(this.dataIndex)},getId:function(){return this.hostTree.data.getId(this.dataIndex)}},Vh.prototype={constructor:Vh,type:"tree",eachNode:function(t,e,i){this.root.eachNode(t,e,i)},getNodeByDataIndex:function(t){var e=this.data.getRawIndex(t);return this._nodes[e]},getNodeByName:function(t){return this.root.getNodeByName(t)},update:function(){for(var t=this.data,e=this._nodes,i=0,n=e.length;n>i;i++)e[i].dataIndex=-1;for(var i=0,n=t.count();n>i;i++)e[t.getRawIndex(i)].dataIndex=i},clearLayouts:function(){this.data.clearItemLayouts()}},Vh.createTree=function(t,e,i){function n(t,e){var i=t.value;a=Math.max(a,x(i)?i.length:1),o.push(t);var s=new R_(t.name,r);e?Bh(s,e):r.root=s,r._nodes.push(s);var l=t.children;if(l)for(var h=0;h=0;d--){var f=c[d],g=f.node,p=f.width,v=f.text;u>h.width&&(u-=p-a,p=a,v=null);var m=new _v({shape:{points:Yh(o,0,p,l,d===c.length-1,0===d)},style:s(i.getItemStyle(),{lineJoin:"bevel",text:v,textFill:n.getTextColor(),textFont:n.getFont()}),z:10,onclick:y(r,g)});this.group.add(m),Uh(m,t,g),o+=p+E_}},remove:function(){this.group.removeAll()}};var B_="\x00_ec_interaction_mutex";hs({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},function(){}),c(Kh,Cf);var W_=m,H_=ag,F_=bv,G_=f,Z_=3,X_=["label","normal"],q_=["label","emphasis"],Y_=["upperLabel","normal"],U_=["upperLabel","emphasis"],j_=10,$_=1,K_=2,Q_=ap([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),J_=function(t){var e=Q_(t);return e.stroke=e.fill=e.lineWidth=null,e};ys({type:"treemap",init:function(){this._containerGroup,this._storage=au(),this._oldTree,this._breadcrumb,this._controller,this._state="ready"},render:function(t,e,i,n){var r=e.findComponents({mainType:"series",subType:"treemap",query:n});if(!(h(r,t)<0)){this.seriesModel=t,this.api=i,this.ecModel=e;var o=Wh(n,t),a=n&&n.type,s=t.layoutInfo,l=!this._oldTree,u=this._storage,c="treemapRootToNode"===a&&o&&u?{rootNodeGroup:u.nodeGroup[o.node.getRawIndex()],direction:n.direction}:null,d=this._giveContainerGroup(s),f=this._doRender(d,t,c);l||a&&"treemapZoomToNode"!==a&&"treemapRootToNode"!==a?f.renderFinally():this._doAnimation(d,f,t,c),this._resetController(i),this._renderBreadcrumb(t,i,o)}},_giveContainerGroup:function(t){var e=this._containerGroup;return e||(e=this._containerGroup=new H_,this._initEvents(e),this.group.add(e)),e.attr("position",[t.x,t.y]),e},_doRender:function(t,e,i){function n(t,e,i,r,o){function a(t){return t.getId()}function s(a,s){var l=null!=a?t[a]:null,h=null!=s?e[s]:null,u=d(l,h,i,o);u&&n(l&&l.viewChildren||[],h&&h.viewChildren||[],u,r,o+1)}r?(e=t,G_(t,function(t,e){!t.isRemoved()&&s(e,e)})):new nl(e,t,a,a).add(s).update(s).remove(y(s,null)).execute()}function r(t){var e=au();return t&&G_(t,function(t,i){var n=e[i];G_(t,function(t){t&&(n.push(t),t.__tmWillDelete=1)})}),e}function o(){G_(f,function(t){G_(t,function(t){t.parent&&t.parent.remove(t)})}),G_(c,function(t){t.invisible=!0,t.dirty()})}var a=e.getData().tree,s=this._oldTree,l=au(),h=au(),u=this._storage,c=[],d=y(su,e,h,u,i,l,c);n(a.root?[a.root]:[],s&&s.root?[s.root]:[],t,a===s||!s,0);var f=r(u);return this._oldTree=a,this._storage=h,{lastsForAnimation:l,willDeleteEls:f,renderFinally:o}},_doAnimation:function(t,e,i,n){if(i.get("animation")){var r=i.get("animationDurationUpdate"),o=i.get("animationEasing"),s=ou();G_(e.willDeleteEls,function(t,e){G_(t,function(t){if(!t.invisible){var i,a=t.parent;if(n&&"drillDown"===n.direction)i=a===n.rootNodeGroup?{shape:{x:0,y:0,width:a.__tmNodeWidth,height:a.__tmNodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var l=0,h=0;a.__tmWillDelete||(l=a.__tmNodeWidth/2,h=a.__tmNodeHeight/2),i="nodeGroup"===e?{position:[l,h],style:{opacity:0}}:{shape:{x:l,y:h,width:0,height:0},style:{opacity:0}}}i&&s.add(t,i,r,o)}})}),G_(this._storage,function(t,i){G_(t,function(t,n){var l=e.lastsForAnimation[i][n],h={};l&&("nodeGroup"===i?l.old&&(h.position=t.position.slice(),t.attr("position",l.old)):(l.old&&(h.shape=a({},t.shape),t.setShape(l.old)),l.fadein?(t.setStyle("opacity",0),h.style={opacity:1}):1!==t.style.opacity&&(h.style={opacity:1})),s.add(t,h,r,o))})},this),this._state="animating",s.done(W_(function(){this._state="ready",e.renderFinally()},this)).start()}},_resetController:function(t){var e=this._controller;e||(e=this._controller=new Kh(t.getZr()),e.enable(this.seriesModel.get("roam")),e.on("pan",W_(this._onPan,this)),e.on("zoom",W_(this._onZoom,this)));var i=new Xe(0,0,t.getWidth(),t.getHeight());e.setPointerChecker(function(t,e,n){return i.contain(e,n)})},_clearController:function(){var t=this._controller;t&&(t.dispose(),t=null)},_onPan:function(t,e){if("animating"!==this._state&&(Math.abs(t)>Z_||Math.abs(e)>Z_)){var i=this.seriesModel.getData().tree.root;if(!i)return;var n=i.getLayout();if(!n)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:n.x+t,y:n.y+e,width:n.width,height:n.height}})}},_onZoom:function(t,e,i){if("animating"!==this._state){var n=this.seriesModel.getData().tree.root;if(!n)return;var r=n.getLayout();if(!r)return;var o=new Xe(r.x,r.y,r.width,r.height),a=this.seriesModel.layoutInfo;e-=a.x,i-=a.y;var s=ne();se(s,s,[-e,-i]),he(s,s,[t,t]),se(s,s,[e,i]),o.applyTransform(s),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:o.x,y:o.y,width:o.width,height:o.height}})}},_initEvents:function(t){t.on("click",function(t){if("ready"===this._state){var e=this.seriesModel.get("nodeClick",!0);if(e){var i=this.findTarget(t.offsetX,t.offsetY);if(i){var n=i.node;if(n.getLayout().isLeafRoot)this._rootToNode(i);else if("zoomToNode"===e)this._zoomToNode(i);else if("link"===e){var r=n.hostTree.data.getItemModel(n.dataIndex),o=r.get("link",!0),a=r.get("target",!0)||"blank";o&&window.open(o,a)}}}}},this)},_renderBreadcrumb:function(t,e,i){function n(e){"animating"!==this._state&&(Fh(t.getViewRoot(),e)?this._rootToNode({node:e}):this._zoomToNode({node:e}))}i||(i=null!=t.get("leafDepth",!0)?{node:t.getViewRoot()}:this.findTarget(e.getWidth()/2,e.getHeight()/2),i||(i={node:t.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new qh(this.group))).render(t,e,i.node,W_(n,this))},remove:function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=au(),this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},dispose:function(){this._clearController()},_zoomToNode:function(t){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},_rootToNode:function(t){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},findTarget:function(t,e){var i,n=this.seriesModel.getViewRoot();return n.eachNode({attr:"viewChildren",order:"preorder"},function(n){var r=this._storage.background[n.getRawIndex()];if(r){var o=r.transformCoordToLocal(t,e),a=r.shape;if(!(a.x<=o[0]&&o[0]<=a.x+a.width&&a.y<=o[1]&&o[1]<=a.y+a.height))return!1;i={node:n,offsetX:o[0],offsetY:o[1]}}},this),i}});for(var tw=function(){},ew=["treemapZoomToNode","treemapRender","treemapMove"],iw=0;iwn&&(o=n,r=i)}for(var r,o=1/0,a=0,s=e.length;s>a;a++){var l=e[a].value;if(null!=l){if(l===t||"string"==typeof l&&l===t+"")return a;i&&n(l,a)}}for(var a=0,s=e.length;s>a;a++){var h=e[a],u=h.interval,c=h.close;if(u){if(u[0]===-1/0){if(_u(c[1],t,u[1]))return a}else if(1/0===u[1]){if(_u(c[0],u[0],t))return a}else if(_u(c[0],u[0],t)&&_u(c[1],t,u[1]))return a;i&&n(u[0],a),i&&n(u[1],a)}}return i?1/0===t?e.length-1:t===-1/0?0:r:void 0};var hw=x,uw="itemStyle.normal",cw=function(t,e,i){var n={mainType:"series",subType:"treemap",query:i};t.eachComponent(n,function(t){var e=t.getData().tree,i=e.root,n=t.getModel(uw);if(!i.isRemoved()){var r=g(e.levelModels,function(t){return t?t.get(uw):null});wu(i,{},r,n,t.getViewRoot().getAncestors(),t)}})},dw=Math.max,fw=Math.min,gw=T,pw=f,vw=["itemStyle","normal","borderWidth"],mw=["itemStyle","normal","gapWidth"],yw=["upperLabel","normal","show"],xw=["upperLabel","normal","height"],_w=function(t,e,i){var n={mainType:"series",subType:"treemap",query:i};t.eachComponent(n,function(t){var n=e.getWidth(),r=e.getHeight(),o=t.option,s=Ko(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()}),l=o.size||[],h=_n(gw(s.width,l[0]),n),u=_n(gw(s.height,l[1]),r),c=i&&i.type,d=Wh(i,t),f="treemapRender"===c||"treemapMove"===c?i.rootRect:null,g=t.getViewRoot(),p=Hh(g);if("treemapMove"!==c){var v="treemapZoomToNode"===c?Nu(t,d,g,h,u):f?[f.width,f.height]:[h,u],m=o.sort;m&&"asc"!==m&&"desc"!==m&&(m="desc");var y={squareRatio:o.squareRatio,sort:m,leafDepth:o.leafDepth};g.hostTree.clearLayouts();var x={x:0,y:0,width:v[0],height:v[1],area:v[0]*v[1]};g.setLayout(x),Cu(g,y,!1,0);var x=g.getLayout();pw(p,function(t,e){var i=(p[e+1]||g).getValue();t.setLayout(a({dataExtent:[i,i],borderWidth:0,upperHeight:0},x))})}var _=t.getData().tree.root;_.setLayout(Eu(s,f,d),!0),t.setLayoutInfo(s),Vu(_,new Xe(-s.x,-s.y,n,r),p,g,0)})};fs(cw),ds(_w);var ww=(Am.extend({type:"series.gauge",getInitialData:function(t){var e=new dx(["value"],this),i=t.data||[];return x(i)||(i=[i]),e.initData(i),e},defaultOption:{zlevel:0,z:2,center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,lineStyle:{color:[[.2,"#91c7ae"],[.8,"#63869e"],[1,"#c23531"]],width:30}},splitLine:{show:!0,length:30,lineStyle:{color:"#eee",width:2,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:8,lineStyle:{color:"#eee",width:1,type:"solid"}},axisLabel:{show:!0,distance:5,color:"auto"},pointer:{show:!0,length:"80%",width:8},itemStyle:{normal:{color:"auto"}},title:{show:!0,offsetCenter:[0,"-40%"],color:"#333",fontSize:15},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"auto",fontSize:30}}}),Cr.extend({type:"echartsGaugePointer",shape:{angle:0,width:10,r:10,x:0,y:0},buildPath:function(t,e){var i=Math.cos,n=Math.sin,r=e.r,o=e.width,a=e.angle,s=e.x-i(a)*o*(o>=r/3?1:2),l=e.y-n(a)*o*(o>=r/3?1:2);a=e.angle-Math.PI/2,t.moveTo(s,l),t.lineTo(e.x+i(a)*o,e.y+n(a)*o),t.lineTo(e.x+i(e.angle)*r,e.y+n(e.angle)*r),t.lineTo(e.x-i(a)*o,e.y-n(a)*o),t.lineTo(s,l)}})),bw=2*Math.PI,Mw=(Da.extend({type:"gauge",render:function(t,e,i){this.group.removeAll();var n=t.get("axisLine.lineStyle.color"),r=Wu(t,i);this._renderMain(t,e,i,n,r)},dispose:function(){},_renderMain:function(t,e,i,n,r){for(var o=this.group,a=t.getModel("axisLine"),s=a.getModel("lineStyle"),l=t.get("clockwise"),h=-t.get("startAngle")/180*Math.PI,u=-t.get("endAngle")/180*Math.PI,c=(u-h)%bw,d=h,f=s.get("width"),g=0;g=t)return n[0][1];for(var e=0;e=t&&(0===e?0:n[e-1][0])=I;I++){var T=Math.cos(_),D=Math.sin(_); if(f.get("show")){var A=new Mv({shape:{x1:T*u+l,y1:D*u+h,x2:T*(u-y)+l,y2:D*(u-y)+h},style:M,silent:!0});"auto"===M.stroke&&A.setStyle({stroke:n(I/v)}),s.add(A)}if(p.get("show")){var C=Hu(wn(I/v*(d-c)+c),p.get("formatter")),L=p.get("distance"),k=n(I/v);s.add(new dv({style:lo({},p,{text:C,x:T*(u-y-L)+l,y:D*(u-y-L)+h,textVerticalAlign:-.4>D?"top":D>.4?"bottom":"middle",textAlign:-.4>T?"left":T>.4?"right":"center"},{autoColor:k}),silent:!0}))}if(g.get("show")&&I!==v){for(var P=0;m>=P;P++){var T=Math.cos(_),D=Math.sin(_),O=new Mv({shape:{x1:T*u+l,y1:D*u+h,x2:T*(u-x)+l,y2:D*(u-x)+h},silent:!0,style:S});"auto"===S.stroke&&O.setStyle({stroke:n((I+P/m)/v)}),s.add(O),_+=b}_-=b}else _+=w}},_renderPointer:function(t,e,i,n,r,o,a){var s=this.group,l=this._data;if(!t.get("pointer.show"))return void(l&&l.eachItemGraphicEl(function(t){s.remove(t)}));var h=[+t.get("min"),+t.get("max")],u=[o,a],c=t.getData();c.diff(l).add(function(e){var i=new ww({shape:{angle:o}});_o(i,{shape:{angle:xn(c.get("value",e),h,u,!0)}},t),s.add(i),c.setItemGraphicEl(e,i)}).update(function(e,i){var n=l.getItemGraphicEl(i);xo(n,{shape:{angle:xn(c.get("value",e),h,u,!0)}},t),s.add(n),c.setItemGraphicEl(e,n)}).remove(function(t){var e=l.getItemGraphicEl(t);s.remove(e)}).execute(),c.eachItemGraphicEl(function(t,e){var i=c.getItemModel(e),o=i.getModel("pointer");t.setShape({x:r.cx,y:r.cy,width:_n(o.get("width"),r.r),r:_n(o.get("length"),r.r)}),t.useStyle(i.getModel("itemStyle.normal").getItemStyle()),"auto"===t.style.fill&&t.setStyle("fill",n(xn(c.get("value",e),h,[0,1],!0))),ao(t,i.getModel("itemStyle.emphasis").getItemStyle())}),this._data=c},_renderTitle:function(t,e,i,n,r){var o=t.getModel("title");if(o.get("show")){var a=o.get("offsetCenter"),s=r.cx+_n(a[0],r.r),l=r.cy+_n(a[1],r.r),h=+t.get("min"),u=+t.get("max"),c=t.getData().get("value",0),d=n(xn(c,[h,u],[0,1],!0));this.group.add(new dv({silent:!0,style:lo({},o,{x:s,y:l,text:t.getData().getName(0),textAlign:"center",textVerticalAlign:"middle"},{autoColor:d,forceRich:!0})}))}},_renderDetail:function(t,e,i,n,r){var o=t.getModel("detail"),a=+t.get("min"),s=+t.get("max");if(o.get("show")){var l=o.get("offsetCenter"),h=r.cx+_n(l[0],r.r),u=r.cy+_n(l[1],r.r),c=_n(o.get("width"),r.r),d=_n(o.get("height"),r.r),f=t.getData().get("value",0),g=n(xn(f,[a,s],[0,1],!0));this.group.add(new dv({silent:!0,style:lo({},o,{x:h,y:u,text:Hu(f,o.get("formatter")),textWidth:isNaN(c)?null:c,textHeight:isNaN(d)?null:d,textAlign:"center",textVerticalAlign:"middle"},{autoColor:g,forceRich:!0})}))}}}),864e5);Fu.prototype={constructor:Fu,type:"calendar",dimensions:["time","value"],getDimensionsInfo:function(){return[{name:"time",type:"time"}]},getRangeInfo:function(){return this._rangeInfo},getModel:function(){return this._model},getRect:function(){return this._rect},getCellWidth:function(){return this._sw},getCellHeight:function(){return this._sh},getOrient:function(){return this._orient},getFirstDayOfWeek:function(){return this._firstDayOfWeek},getDateInfo:function(t){t=Cn(t);var e=t.getFullYear(),i=t.getMonth()+1;i=10>i?"0"+i:i;var n=t.getDate();n=10>n?"0"+n:n;var r=t.getDay();return r=Math.abs((r+7-this.getFirstDayOfWeek())%7),{y:e,m:i,d:n,day:r,time:t.getTime(),formatedDate:e+"-"+i+"-"+n,date:t}},getNextNDay:function(t,e){return e=e||0,0===e?this.getDateInfo(t):(t=new Date(this.getDateInfo(t).time),t.setDate(t.getDate()+e),this.getDateInfo(t))},update:function(t,e){function i(t,e){return null!=t[e]&&"auto"!==t[e]}this._firstDayOfWeek=+this._model.getModel("dayLabel").get("firstDay"),this._orient=this._model.get("orient"),this._lineWidth=this._model.getModel("itemStyle.normal").getItemStyle().lineWidth||0,this._rangeInfo=this._getRangeInfo(this._initRangeOption());var n=this._rangeInfo.weeks||1,r=["width","height"],o=this._model.get("cellSize").slice(),a=this._model.getBoxLayoutParams(),s="horizontal"===this._orient?[n,7]:[7,n];f([0,1],function(t){i(o,t)&&(a[r[t]]=o[t]*s[t])});var l={width:e.getWidth(),height:e.getHeight()},h=this._rect=Ko(a,l);f([0,1],function(t){i(o,t)||(o[t]=h[r[t]]/s[t])}),this._sw=o[0],this._sh=o[1]},dataToPoint:function(t,e){x(t)&&(t=t[0]),null==e&&(e=!0);var i=this.getDateInfo(t),n=this._rangeInfo,r=i.formatedDate;if(e&&!(i.time>=n.start.time&&i.time<=n.end.time))return[0/0,0/0];var o=i.day,a=this._getRangeInfo([n.start.time,r]).nthWeek;return"vertical"===this._orient?[this._rect.x+o*this._sw+this._sw/2,this._rect.y+a*this._sh+this._sh/2]:[this._rect.x+a*this._sw+this._sw/2,this._rect.y+o*this._sh+this._sh/2]},pointToData:function(t){var e=this.pointToDate(t);return e&&e.time},dataToRect:function(t,e){var i=this.dataToPoint(t,e);return{contentShape:{x:i[0]-(this._sw-this._lineWidth)/2,y:i[1]-(this._sh-this._lineWidth)/2,width:this._sw-this._lineWidth,height:this._sh-this._lineWidth},center:i,tl:[i[0]-this._sw/2,i[1]-this._sh/2],tr:[i[0]+this._sw/2,i[1]-this._sh/2],br:[i[0]+this._sw/2,i[1]+this._sh/2],bl:[i[0]-this._sw/2,i[1]+this._sh/2]}},pointToDate:function(t){var e=Math.floor((t[0]-this._rect.x)/this._sw)+1,i=Math.floor((t[1]-this._rect.y)/this._sh)+1,n=this._rangeInfo.range;return"vertical"===this._orient?this._getDateByWeeksAndDay(i,e-1,n):this._getDateByWeeksAndDay(e,i-1,n)},convertToPixel:y(Gu,"dataToPoint"),convertFromPixel:y(Gu,"pointToData"),_initRangeOption:function(){var t=this._model.get("range"),e=t;if(x(e)&&1===e.length&&(e=e[0]),/^\d{4}$/.test(e)&&(t=[e+"-01-01",e+"-12-31"]),/^\d{4}[\/|-]\d{1,2}$/.test(e)){var i=this.getDateInfo(e),n=i.date;n.setMonth(n.getMonth()+1);var r=this.getNextNDay(n,-1);t=[i.formatedDate,r.formatedDate]}/^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(e)&&(t=[e,e]);var o=this._getRangeInfo(t);return o.start.time>o.end.time&&t.reverse(),t},_getRangeInfo:function(t){t=[this.getDateInfo(t[0]),this.getDateInfo(t[1])];var e;t[0].time>t[1].time&&(e=!0,t.reverse());var i=Math.floor(t[1].time/Mw)-Math.floor(t[0].time/Mw)+1,n=new Date(t[0].time),r=n.getDate(),o=t[1].date.getDate();if(n.setDate(r+i-1),n.getDate()!==o)for(var a=n.getTime()-t[1].time>0?1:-1;n.getDate()!==o&&(n.getTime()-t[1].time)*a>0;)i-=a,n.setDate(r+i-1);var s=Math.floor((i+t[0].day+6)/7),l=e?-s+1:s-1;return e&&t.reverse(),{range:[t[0].formatedDate,t[1].formatedDate],start:t[0],end:t[1],allDay:i,weeks:s,nthWeek:l,fweek:t[0].day,lweek:t[1].day}},_getDateByWeeksAndDay:function(t,e,i){var n=this._getRangeInfo(i);if(t>n.weeks||0===t&&en.lweek)return!1;var r=7*(t-1)-n.fweek+e,o=new Date(n.start.time);return o.setDate(n.start.d+r),this.getDateInfo(o)}},Fu.dimensions=Fu.prototype.dimensions,Fu.getDimensionsInfo=Fu.prototype.getDimensionsInfo,Fu.create=function(t,e){var i=[];return t.eachComponent("calendar",function(n){var r=new Fu(n,t,e);i.push(r),n.coordinateSystem=r}),t.eachSeries(function(t){"calendar"===t.get("coordinateSystem")&&(t.coordinateSystem=i[t.get("calendarIndex")||0])}),i},ca.register("calendar",Fu);var Sw=em.extend({type:"calendar",coordinateSystem:null,defaultOption:{zlevel:0,z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{normal:{color:"#fff",borderWidth:1,borderColor:"#ccc"}},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",nameMap:"en",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",nameMap:"en",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},init:function(t){var e=ea(t);Sw.superApply(this,"init",arguments),Zu(t,e)},mergeOption:function(t){Sw.superApply(this,"mergeOption",arguments),Zu(this.option,t)}}),Iw={EN:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],CN:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},Tw={EN:["S","M","T","W","T","F","S"],CN:["日","一","二","三","四","五","六"]};vs({type:"calendar",_tlpoints:null,_blpoints:null,_firstDayOfMonth:null,_firstDayPoints:null,render:function(t){var e=this.group;e.removeAll();var i=t.coordinateSystem,n=i.getRangeInfo(),r=i.getOrient();this._renderDayRect(t,n,e),this._renderLines(t,n,r,e),this._renderYearText(t,n,r,e),this._renderMonthText(t,r,e),this._renderWeekText(t,n,r,e)},_renderDayRect:function(t,e,i){for(var n=t.coordinateSystem,r=t.getModel("itemStyle.normal").getItemStyle(),o=n.getCellWidth(),a=n.getCellHeight(),s=e.start.time;s<=e.end.time;s=n.getNextNDay(s,1).time){var l=n.dataToRect([s],!1).tl,h=new bv({shape:{x:l[0],y:l[1],width:o,height:a},cursor:"default",style:r});i.add(h)}},_renderLines:function(t,e,i,n){function r(e){o._firstDayOfMonth.push(a.getDateInfo(e)),o._firstDayPoints.push(a.dataToRect([e],!1).tl);var r=o._getLinePointsOfOneWeek(t,e,i);o._tlpoints.push(r[0]),o._blpoints.push(r[r.length-1]),l&&o._drawSplitline(r,s,n)}var o=this,a=t.coordinateSystem,s=t.getModel("splitLine.lineStyle").getLineStyle(),l=t.get("splitLine.show"),h=s.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var u=e.start,c=0;u.time<=e.end.time;c++){r(u.formatedDate),0===c&&(u=a.getDateInfo(e.start.y+"-"+e.start.m));var d=u.date;d.setMonth(d.getMonth()+1),u=a.getDateInfo(d)}r(a.getNextNDay(e.end.time,1).formatedDate),l&&this._drawSplitline(o._getEdgesPoints(o._tlpoints,h,i),s,n),l&&this._drawSplitline(o._getEdgesPoints(o._blpoints,h,i),s,n)},_getEdgesPoints:function(t,e,i){var n=[t[0].slice(),t[t.length-1].slice()],r="horizontal"===i?0:1;return n[0][r]=n[0][r]-e/2,n[1][r]=n[1][r]+e/2,n},_drawSplitline:function(t,e,i){var n=new wv({z2:20,shape:{points:t},style:e});i.add(n)},_getLinePointsOfOneWeek:function(t,e,i){var n=t.coordinateSystem;e=n.getDateInfo(e);for(var r=[],o=0;7>o;o++){var a=n.getNextNDay(e.time,o),s=n.dataToRect([a.time],!1);r[2*a.day]=s.tl,r[2*a.day+1]=s["horizontal"===i?"bl":"tr"]}return r},_formatterLabel:function(t,e){return"string"==typeof t&&t?Vn(t,e):"function"==typeof t?t(e):e.nameMap},_yearTextPositionControl:function(t,e,i,n,r){e=e.slice();var o=["center","bottom"];"bottom"===n?(e[1]+=r,o=["center","top"]):"left"===n?e[0]-=r:"right"===n?(e[0]+=r,o=["center","top"]):e[1]-=r;var a=0;return("left"===n||"right"===n)&&(a=Math.PI/2),{rotation:a,position:e,style:{textAlign:o[0],textVerticalAlign:o[1]}}},_renderYearText:function(t,e,i,n){var r=t.getModel("yearLabel");if(r.get("show")){var o=r.get("margin"),a=r.get("position");a||(a="horizontal"!==i?"top":"left");var s=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],l=(s[0][0]+s[1][0])/2,h=(s[0][1]+s[1][1])/2,u="horizontal"===i?0:1,c={top:[l,s[u][1]],bottom:[l,s[1-u][1]],left:[s[1-u][0],h],right:[s[u][0],h]},d=e.start.y;+e.end.y>+e.start.y&&(d=d+"-"+e.end.y);var f=r.get("formatter"),g={start:e.start.y,end:e.end.y,nameMap:d},p=this._formatterLabel(f,g),v=new dv({z2:30});lo(v.style,r,{text:p}),v.attr(this._yearTextPositionControl(v,c[a],i,a,o)),n.add(v)}},_monthTextPositionControl:function(t,e,i,n,r){var o="left",a="top",s=t[0],l=t[1];return"horizontal"===i?(l+=r,e&&(o="center"),"start"===n&&(a="bottom")):(s+=r,e&&(a="middle"),"start"===n&&(o="right")),{x:s,y:l,textAlign:o,textVerticalAlign:a}},_renderMonthText:function(t,e,i){var n=t.getModel("monthLabel");if(n.get("show")){var r=n.get("nameMap"),o=n.get("margin"),s=n.get("position"),l=n.get("align"),h=[this._tlpoints,this._blpoints];w(r)&&(r=Iw[r.toUpperCase()]||[]);var u="start"===s?0:1,c="horizontal"===e?0:1;o="start"===s?-o:o;for(var d="center"===l,f=0;ff;f++){var g=o.getNextNDay(c,f),p=o.dataToRect([g.time],!1).center,v=f;v=Math.abs((f+u)%7);var m=new dv({z2:30});a(lo(m.style,r,{text:l[v]}),this._weekTextPositionControl(p,i,s,h,d)),n.add(m)}}}}),ps({type:"title",layoutMode:{type:"box",ignoreSize:!0},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:"bolder",color:"#333"},subtextStyle:{color:"#aaa"}}}),vs({type:"title",render:function(t,e,i){if(this.group.removeAll(),t.get("show")){var n=this.group,r=t.getModel("textStyle"),o=t.getModel("subtextStyle"),a=t.get("textAlign"),s=t.get("textBaseline"),l=new dv({style:lo({},r,{text:t.get("text"),textFill:r.getTextColor()},{disableBox:!0}),z2:10}),h=l.getBoundingRect(),u=t.get("subtext"),c=new dv({style:lo({},o,{text:u,textFill:o.getTextColor(),y:h.height+t.get("itemGap"),textVerticalAlign:"top"},{disableBox:!0}),z2:10}),d=t.get("link"),f=t.get("sublink");l.silent=!d,c.silent=!f,d&&l.on("click",function(){window.open(d,"_"+t.get("target"))}),f&&c.on("click",function(){window.open(f,"_"+t.get("subtarget"))}),n.add(l),u&&n.add(c);var g=n.getBoundingRect(),p=t.getBoxLayoutParams();p.width=g.width,p.height=g.height;var v=Ko(p,{width:i.getWidth(),height:i.getHeight()},t.get("padding"));a||(a=t.get("left")||t.get("right"),"middle"===a&&(a="center"),"right"===a?v.x+=v.width:"center"===a&&(v.x+=v.width/2)),s||(s=t.get("top")||t.get("bottom"),"center"===s&&(s="middle"),"bottom"===s?v.y+=v.height:"middle"===s&&(v.y+=v.height/2),s=s||"top"),n.attr("position",[v.x,v.y]);var m={textAlign:a,textVerticalAlign:s};l.setStyle(m),c.setStyle(m),g=n.getBoundingRect();var y=v.margin,x=t.getItemStyle(["color","opacity"]);x.fill=t.get("backgroundColor");var _=new bv({shape:{x:g.x-y[3],y:g.y-y[0],width:g.width+y[1]+y[3],height:g.height+y[0]+y[2],r:t.get("borderRadius")},style:x,silent:!0});qr(_),n.add(_)}}});var Dw=ps({type:"legend.plain",dependencies:["series"],layoutMode:{type:"box",ignoreSize:!0},init:function(t,e,i){this.mergeDefaultAndTheme(t,i),t.selected=t.selected||{}},mergeOption:function(t){Dw.superCall(this,"mergeOption",t)},optionUpdated:function(){this._updateData(this.ecModel);var t=this._data;if(t[0]&&"single"===this.get("selectedMode")){for(var e=!1,i=0;i=0},defaultOption:{zlevel:0,z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,inactiveColor:"#ccc",textStyle:{color:"#333"},selectedMode:!0,tooltip:{show:!1}}});hs("legendToggleSelect","legendselectchanged",y(Xu,"toggleSelected")),hs("legendSelect","legendselected",y(Xu,"select")),hs("legendUnSelect","legendunselected",y(Xu,"unSelect"));var Aw=y,Cw=f,Lw=ag,kw=vs({type:"legend.plain",newlineDisabled:!1,init:function(){this.group.add(this._contentGroup=new Lw),this._backgroundEl},getContentGroup:function(){return this._contentGroup},render:function(t,e,i){if(this.resetInner(),t.get("show",!0)){var n=t.get("align");n&&"auto"!==n||(n="right"===t.get("left")&&"vertical"===t.get("orient")?"right":"left"),this.renderInner(n,t,e,i);var r=t.getBoxLayoutParams(),o={width:i.getWidth(),height:i.getHeight()},a=t.get("padding"),l=Ko(r,o,a),h=this.layoutInner(t,n,l),u=Ko(s({width:h.width,height:h.height},r),o,a);this.group.attr("position",[u.x-h.x,u.y-h.y]),this.group.add(this._backgroundEl=qu(h,t))}},resetInner:function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl)},renderInner:function(t,e,i,n){var r=this.getContentGroup(),o=R(),a=e.get("selectedMode");Cw(e.getData(),function(s,l){var h=s.get("name");if(!this.newlineDisabled&&(""===h||"\n"===h))return void r.add(new Lw({newline:!0}));var u=i.getSeriesByName(h)[0];if(!o.get(h))if(u){var c=u.getData(),d=c.getVisual("color");"function"==typeof d&&(d=d(u.getDataParams(0)));var f=c.getVisual("legendSymbol")||"roundRect",g=c.getVisual("symbol"),p=this._createItem(h,l,s,e,f,g,t,d,a);p.on("click",Aw(Yu,h,n)).on("mouseover",Aw(Uu,u,null,n)).on("mouseout",Aw(ju,u,null,n)),o.set(h,!0)}else i.eachRawSeries(function(i){if(!o.get(h)&&i.legendDataProvider){var r=i.legendDataProvider(),u=r.indexOfName(h);if(0>u)return;var c=r.getItemVisual(u,"color"),d="roundRect",f=this._createItem(h,l,s,e,d,null,t,c,a);f.on("click",Aw(Yu,h,n)).on("mouseover",Aw(Uu,i,h,n)).on("mouseout",Aw(ju,i,h,n)),o.set(h,!0)}},this)},this)},_createItem:function(t,e,i,n,r,o,s,l,h){var u=n.get("itemWidth"),c=n.get("itemHeight"),d=n.get("inactiveColor"),f=n.isSelected(t),g=new Lw,p=i.getModel("textStyle"),v=i.get("icon"),m=i.getModel("tooltip"),y=m.parentModel;if(r=v||r,g.add(Sl(r,0,0,u,c,f?l:d,!0)),!v&&o&&(o!==r||"none"==o)){var x=.8*c;"none"===o&&(o="circle"),g.add(Sl(o,(u-x)/2,(c-x)/2,x,x,f?l:d))}var _="left"===s?u+5:-5,w=s,b=n.get("formatter"),M=t;"string"==typeof b&&b?M=b.replace("{name}",null!=t?t:""):"function"==typeof b&&(M=b(t)),g.add(new dv({style:lo({},p,{text:M,x:_,y:c/2,textFill:f?p.getTextColor():d,textAlign:w,textVerticalAlign:"middle"})}));var S=new bv({shape:g.getBoundingRect(),invisible:!0,tooltip:m.get("show")?a({content:t,formatter:y.get("formatter",!0)||function(){return t},formatterParams:{componentType:"legend",legendIndex:n.componentIndex,name:t,$vars:["name"]}},m.option):null});return g.add(S),g.eachChild(function(t){t.silent=!0}),S.silent=!h,this.getContentGroup().add(g),ao(g),g.__legendDataIndex=e,g},layoutInner:function(t,e,i){var n=this.getContentGroup();Qv(t.get("orient"),n,t.get("itemGap"),i.width,i.height);var r=n.getBoundingRect();return n.attr("position",[-r.x,-r.y]),this.group.getBoundingRect()}}),Pw=function(t){var e=t.findComponents({mainType:"legend"});e&&e.length&&t.filterSeries(function(t){for(var i=0;ii[s],f=[-u.x,-u.y];f[a]=n.position[a];var g=[0,0],p=[-c.x,-c.y],v=D(t.get("pageButtonGap",!0),t.get("itemGap",!0));if(d){var m=t.get("pageButtonPosition",!0);"end"===m?p[a]+=i[s]-c[s]:g[a]+=c[s]+v}p[1-a]+=u[l]/2-c[l]/2,n.attr("position",f),r.attr("position",g),o.attr("position",p);var y=this.group.getBoundingRect(),y={x:0,y:0};if(y[s]=d?i[s]:u[s],y[l]=Math.max(u[l],c[l]),y[h]=Math.min(0,c[h]+p[1-a]),r.__rectSize=i[s],d){var x={x:0,y:0};x[s]=Math.max(i[s]-c[s]-v,0),x[l]=y[l],r.setClipPath(new bv({shape:x})),r.__rectSize=x[s]}else o.eachChild(function(t){t.attr({invisible:!0,silent:!0})});var _=this._getPageInfo(t);return null!=_.pageIndex&&xo(n,{position:_.contentPosition},d?t:!1),this._updatePageInfoView(t,_),y},_pageGo:function(t,e,i){var n=this._getPageInfo(e)[t];null!=n&&i.dispatchAction({type:"legendScroll",scrollDataIndex:n,legendId:e.id})},_updatePageInfoView:function(t,e){var i=this._controllerGroup;f(["pagePrev","pageNext"],function(n){var r=null!=e[n+"DataIndex"],o=i.childOfName(n);o&&(o.setStyle("fill",r?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),o.cursor=r?"pointer":"default")});var n=i.childOfName("pageText"),r=t.get("pageFormatter"),o=e.pageIndex,a=null!=o?o+1:0,s=e.pageCount;n&&r&&n.setStyle("text",w(r)?r.replace("{current}",a).replace("{total}",s):r({current:a,total:s}))},_getPageInfo:function(t){function e(t){var e=t.getBoundingRect().clone();return e[f]+=t.position[u],e}var i,n,r,o,a=t.get("scrollDataIndex",!0),s=this.getContentGroup(),l=s.getBoundingRect(),h=this._containerGroup.__rectSize,u=t.getOrient().index,c=Rw[u],d=Rw[1-u],f=Nw[u],g=s.position.slice();this._showController?s.eachChild(function(t){t.__legendDataIndex===a&&(o=t)}):o=s.childAt(0);var p=h?Math.ceil(l[c]/h):0;if(o){var v=o.getBoundingRect(),m=o.position[u]+v[f];g[u]=-m-l[f],i=Math.floor(p*(m+v[f]+h/2)/l[c]),i=l[c]&&p?Math.max(0,Math.min(p-1,i)):-1;var y={x:0,y:0};y[c]=h,y[d]=l[d],y[f]=-g[u]-l[f];var x,_=s.children();if(s.eachChild(function(t,i){var n=e(t);n.intersect(y)&&(null==x&&(x=i),r=t.__legendDataIndex),i===_.length-1&&n[f]+n[c]<=y[f]+y[c]&&(r=null)}),null!=x){var w=_[x],b=e(w);if(y[f]=b[f]+b[c]-y[c],0>=x&&b[f]>=y[f])n=null;else{for(;x>0&&e(_[x-1]).intersect(y);)x--;n=_[x].__legendDataIndex}}}return{contentPosition:g,pageIndex:i,pageCount:p,pagePrevDataIndex:n,pageNextDataIndex:r}}});hs("legendScroll","legendscroll",function(t,e){var i=t.scrollDataIndex;null!=i&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},function(t){t.setScrollDataIndex(i)})});var Vw=function(t,e){var i,n=[],r=t.seriesIndex;if(null==r||!(i=e.getSeriesByIndex(r)))return{point:[]};var o=i.getData(),a=Wo(o,t);if(null==a||x(a))return{point:[]};var s=o.getItemGraphicEl(a),l=i.coordinateSystem;if(i.getTooltipPosition)n=i.getTooltipPosition(a)||[];else if(l&&l.dataToPoint)n=l.dataToPoint(o.getValues(g(l.dimensions,function(t){return i.coordDimToDataDim(t)[0]}),a,!0))||[];else if(s){var h=s.getBoundingRect().clone();h.applyTransform(s.transform),n=[h.x+h.width/2,h.y+h.height/2]}return{point:n,el:s}},Bw=f,Ww=y,Hw=qv(),Fw=function(t,e,i){var n=t.currTrigger,r=[t.x,t.y],o=t,a=t.dispatchAction||m(i.dispatchAction,i),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){ac(r)&&(r=Vw({seriesIndex:o.seriesIndex,dataIndex:o.dataIndex},e).point);var l=ac(r),h=o.axesInfo,u=s.axesInfo,c="leave"===n||ac(r),d={},f={},g={list:[],map:{}},p={showPointer:Ww(Ju,f),showTooltip:Ww(tc,g)};Bw(s.coordSysMap,function(t,e){var i=l||t.containPoint(r);Bw(s.coordSysAxesInfo[e],function(t){var e=t.axis,n=rc(h,t);if(!c&&i&&(!h||n)){var o=n&&n.value;null!=o||l||(o=e.pointToData(r)),null!=o&&Ku(t,o,p,!1,d)}})});var v={};return Bw(u,function(t,e){var i=t.linkGroup;i&&!f[e]&&Bw(i.axesInfo,function(e,n){var r=f[n];if(e!==t&&r){var o=r.value;i.mapper&&(o=t.axis.scale.parse(i.mapper(o,oc(e),oc(t)))),v[t.key]=o}})}),Bw(v,function(t,e){Ku(u[e],t,p,!0,d)}),ec(f,u,d),ic(g,r,t,a),nc(u,a,i),d}},Gw=(ps({type:"axisPointer",coordSysAxesInfo:null,defaultOption:{show:"auto",triggerOn:null,zlevel:0,z:50,type:"line",snap:!1,triggerTooltip:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#aaa",width:1,type:"solid"},shadowStyle:{color:"rgba(150,150,150,0.3)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,shadowBlur:3,shadowColor:"#aaa"},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}}}),qv()),Zw=f,Xw=vs({type:"axisPointer",render:function(t,e,i){var n=e.getComponent("tooltip"),r=t.get("triggerOn")||n&&n.get("triggerOn")||"mousemove|click";sc("axisPointer",i,function(t,e,i){"none"!==r&&("leave"===t||r.indexOf(t)>=0)&&i({type:"updateAxisPointer",currTrigger:t,x:e&&e.offsetX,y:e&&e.offsetY})})},remove:function(t,e){fc(e.getZr(),"axisPointer"),Xw.superApply(this._model,"remove",arguments)},dispose:function(t,e){fc("axisPointer",e),Xw.superApply(this._model,"dispose",arguments)}}),qw=qv(),Yw=n,Uw=m;gc.prototype={_group:null,_lastGraphicKey:null,_handle:null,_dragging:!1,_lastValue:null,_lastStatus:null,_payloadInfo:null,animationThreshold:15,render:function(t,e,i,n){var r=e.get("value"),o=e.get("status");if(this._axisModel=t,this._axisPointerModel=e,this._api=i,n||this._lastValue!==r||this._lastStatus!==o){this._lastValue=r,this._lastStatus=o;var a=this._group,s=this._handle;if(!o||"hide"===o)return a&&a.hide(),void(s&&s.hide());a&&a.show(),s&&s.show();var l={};this.makeElOption(l,r,t,e,i);var h=l.graphicKey;h!==this._lastGraphicKey&&this.clear(i),this._lastGraphicKey=h;var u=this._moveAnimation=this.determineAnimation(t,e);if(a){var c=y(pc,e,u);this.updatePointerEl(a,l,c,e),this.updateLabelEl(a,l,c,e)}else a=this._group=new ag,this.createPointerEl(a,l,t,e),this.createLabelEl(a,l,t,e),i.getZr().add(a);xc(a,e,!0),this._renderHandle(r)}},remove:function(t){this.clear(t)},dispose:function(t){this.clear(t)},determineAnimation:function(t,e){var i=e.get("animation"),n=t.axis,r="category"===n.type,o=e.get("snap");if(!o&&!r)return!1;if("auto"===i||null==i){var a=this.animationThreshold;if(r&&n.getBandWidth()>a)return!0;if(o){var s=Hl(t).seriesDataCount,l=n.getExtent();return Math.abs(l[0]-l[1])/s>a}return!1}return i===!0},makeElOption:function(){},createPointerEl:function(t,e){var i=e.pointer;if(i){var n=qw(t).pointerEl=new Nv[i.type](Yw(e.pointer));t.add(n)}},createLabelEl:function(t,e,i,n){if(e.label){var r=qw(t).labelEl=new bv(Yw(e.label));t.add(r),mc(r,n)}},updatePointerEl:function(t,e,i){var n=qw(t).pointerEl;n&&(n.setStyle(e.pointer.style),i(n,{shape:e.pointer.shape}))},updateLabelEl:function(t,e,i,n){var r=qw(t).labelEl;r&&(r.setStyle(e.label.style),i(r,{shape:e.label.shape,position:e.label.position}),mc(r,n))},_renderHandle:function(t){if(!this._dragging&&this.updateHandleTransform){var e=this._axisPointerModel,i=this._api.getZr(),n=this._handle,r=e.getModel("handle"),o=e.get("status");if(!r.get("show")||!o||"hide"===o)return n&&i.remove(n),void(this._handle=null);var a;this._handle||(a=!0,n=this._handle=Do(r.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){Rg(t.event)},onmousedown:Uw(this._onHandleDragMove,this,0,0),drift:Uw(this._onHandleDragMove,this),ondragend:Uw(this._onHandleDragEnd,this)}),i.add(n)),xc(n,e,!1);var s=["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];n.setStyle(r.getItemStyle(null,s));var l=r.get("size");x(l)||(l=[l,l]),n.attr("scale",[l[0]/2,l[1]/2]),ka(this,"_doDispatchAxisPointer",r.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,a)}},_moveHandleToValue:function(t,e){pc(this._axisPointerModel,!e&&this._moveAnimation,this._handle,yc(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},_onHandleDragMove:function(t,e){var i=this._handle;if(i){this._dragging=!0;var n=this.updateHandleTransform(yc(i),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=n,i.stopAnimation(),i.attr(yc(n)),qw(i).lastProp=null,this._doDispatchAxisPointer()}},_doDispatchAxisPointer:function(){var t=this._handle;if(t){var e=this._payloadInfo,i=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:i.axis.dim,axisIndex:i.componentIndex}]})}},_onHandleDragEnd:function(){this._dragging=!1;var t=this._handle;if(t){var e=this._axisPointerModel.get("value");this._moveHandleToValue(e),this._api.dispatchAction({type:"hideTip"})}},getHandleTransform:null,updateHandleTransform:null,clear:function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),i=this._group,n=this._handle;e&&i&&(this._lastGraphicKey=null,i&&e.remove(i),n&&e.remove(n),this._group=null,this._handle=null,this._payloadInfo=null)},doClear:function(){},buildLabel:function(t,e,i){return i=i||0,{x:t[i],y:t[1-i],width:e[i],height:e[1-i]}}},gc.prototype.constructor=gc,Yn(gc);var jw=gc.extend({makeElOption:function(t,e,i,n,r){var o=i.axis,a=o.grid,s=n.get("type"),l=Ac(a,o).getOtherAxis(o).getGlobalExtent(),h=o.toGlobalCoord(o.dataToCoord(e,!0));if(s&&"none"!==s){var u=_c(n),c=$w[s](o,h,l,u);c.style=u,t.graphicKey=c.type,t.pointer=c}var d=Yl(a.model,i);Ic(e,t,d,i,n,r)},getHandleTransform:function(t,e,i){var n=Yl(e.axis.grid.model,e,{labelInside:!1});return n.labelMargin=i.get("handle.margin"),{position:Sc(e.axis,t,n),rotation:n.rotation+(n.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(t,e,i){var n=i.axis,r=n.grid,o=n.getGlobalExtent(!0),a=Ac(r,n).getOtherAxis(n).getGlobalExtent(),s="x"===n.dim?0:1,l=t.position;l[s]+=e[s],l[s]=Math.min(o[1],l[s]),l[s]=Math.max(o[0],l[s]);var h=(a[1]+a[0])/2,u=[h,h];u[s]=l[s];var c=[{verticalAlign:"middle"},{align:"center"}];return{position:l,rotation:t.rotation,cursorPoint:u,tooltipOption:c[s]}}}),$w={line:function(t,e,i,n){var r=Tc([e,i[0]],[e,i[1]],Cc(t));return Xr({shape:r,style:n}),{type:"Line",shape:r}},shadow:function(t,e,i){var n=t.getBandWidth(),r=i[1]-i[0];return{type:"Rect",shape:Dc([e-n/2,i[0]],[n,r],Cc(t))}}};Gx.registerAxisPointerClass("CartesianAxisPointer",jw),as(function(t){if(t){(!t.axisPointer||0===t.axisPointer.length)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!x(e)&&(t.axisPointer.link=[e])}}),ss(jm.PROCESSOR.STATISTIC,function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=zl(t,e) }),hs({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},Fw),ps({type:"tooltip",dependencies:["axisPointer"],defaultOption:{zlevel:0,z:8,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",confine:!1,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"rgba(50,50,50,0.7)",borderColor:"#333",borderRadius:4,borderWidth:0,padding:5,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#fff",fontSize:14}}});var Kw=f,Qw=Rn,Jw=["","-webkit-","-moz-","-o-"],tb="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;";Oc.prototype={constructor:Oc,_enterable:!0,update:function(){var t=this._container,e=t.currentStyle||document.defaultView.getComputedStyle(t),i=t.style;"absolute"!==i.position&&"absolute"!==e.position&&(i.position="relative")},show:function(t){clearTimeout(this._hideTimeout);var e=this.el;e.style.cssText=tb+Pc(t)+";left:"+this._x+"px;top:"+this._y+"px;"+(t.get("extraCssText")||""),e.style.display=e.innerHTML?"block":"none",this._show=!0},setContent:function(t){this.el.innerHTML=null==t?"":t},setEnterable:function(t){this._enterable=t},getSize:function(){var t=this.el;return[t.clientWidth,t.clientHeight]},moveTo:function(t,e){var i,n=this._zr;n&&n.painter&&(i=n.painter.getViewportRootOffset())&&(t+=i.offsetLeft,e+=i.offsetTop);var r=this.el.style;r.left=t+"px",r.top=e+"px",this._x=t,this._y=e},hide:function(){this.el.style.display="none",this._show=!1},hideLater:function(t){!this._show||this._inContent&&this._enterable||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(m(this.hide,this),t)):this.hide())},isShow:function(){return this._show}};var eb=m,ib=f,nb=_n,rb=new bv({shape:{x:-1,y:-1,width:2,height:2}});vs({type:"tooltip",init:function(t,e){if(!hf.node){var i=new Oc(e.getDom(),e);this._tooltipContent=i}},render:function(t,e,i){if(!hf.node){this.group.removeAll(),this._tooltipModel=t,this._ecModel=e,this._api=i,this._lastDataByCoordSys=null,this._alwaysShowContent=t.get("alwaysShowContent");var n=this._tooltipContent;n.update(),n.setEnterable(t.get("enterable")),this._initGlobalListener(),this._keepShow()}},_initGlobalListener:function(){var t=this._tooltipModel,e=t.get("triggerOn");sc("itemTooltip",this._api,eb(function(t,i,n){"none"!==e&&(e.indexOf(t)>=0?this._tryShow(i,n):"leave"===t&&this._hide(n))},this))},_keepShow:function(){var t=this._tooltipModel,e=this._ecModel,i=this._api;if(null!=this._lastX&&null!=this._lastY&&"none"!==t.get("triggerOn")){var n=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){n.manuallyShowTip(t,e,i,{x:n._lastX,y:n._lastY})})}},manuallyShowTip:function(t,e,i,n){if(n.from!==this.uid&&!hf.node){var r=Rc(n,i);this._ticket="";var o=n.dataByCoordSys;if(n.tooltip&&null!=n.x&&null!=n.y){var a=rb;a.position=[n.x,n.y],a.update(),a.tooltip=n.tooltip,this._tryShow({offsetX:n.x,offsetY:n.y,target:a},r)}else if(o)this._tryShow({offsetX:n.x,offsetY:n.y,position:n.position,event:{},dataByCoordSys:n.dataByCoordSys,tooltipOption:n.tooltipOption},r);else if(null!=n.seriesIndex){if(this._manuallyAxisShowTip(t,e,i,n))return;var s=Vw(n,e),l=s.point[0],h=s.point[1];null!=l&&null!=h&&this._tryShow({offsetX:l,offsetY:h,position:n.position,target:s.el,event:{}},r)}else null!=n.x&&null!=n.y&&(i.dispatchAction({type:"updateAxisPointer",x:n.x,y:n.y}),this._tryShow({offsetX:n.x,offsetY:n.y,position:n.position,target:i.getZr().findHover(n.x,n.y).target,event:{}},r))}},manuallyHideTip:function(t,e,i,n){var r=this._tooltipContent;this._alwaysShowContent||r.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=null,n.from!==this.uid&&this._hide(Rc(n,i))},_manuallyAxisShowTip:function(t,e,i,n){var r=n.seriesIndex,o=n.dataIndex,a=e.getComponent("axisPointer").coordSysAxesInfo;if(null!=r&&null!=o&&null!=a){var s=e.getSeriesByIndex(r);if(s){var l=s.getData(),t=zc([l.getItemModel(o),s,(s.coordinateSystem||{}).model,t]);if("axis"===t.get("trigger"))return i.dispatchAction({type:"updateAxisPointer",seriesIndex:r,dataIndex:o,position:n.position}),!0}}},_tryShow:function(t,e){var i=t.target,n=this._tooltipModel;if(n){this._lastX=t.offsetX,this._lastY=t.offsetY;var r=t.dataByCoordSys;r&&r.length?this._showAxisTooltip(r,t):i&&null!=i.dataIndex?(this._lastDataByCoordSys=null,this._showSeriesItemTooltip(t,i,e)):i&&i.tooltip?(this._lastDataByCoordSys=null,this._showComponentItemTooltip(t,i,e)):(this._lastDataByCoordSys=null,this._hide(e))}},_showOrMove:function(t,e){var i=t.get("showDelay");e=m(e,this),clearTimeout(this._showTimout),i>0?this._showTimout=setTimeout(e,i):e()},_showAxisTooltip:function(t,e){var i=this._ecModel,n=this._tooltipModel,r=[e.offsetX,e.offsetY],o=[],a=[],s=zc([e.tooltipOption,n]);ib(t,function(t){ib(t.dataByAxis,function(t){var e=i.getComponent(t.axisDim+"Axis",t.axisIndex),n=t.value,r=[];if(e&&null!=n){var s=Mc(n,e.axis,i,t.seriesDataIndices,t.valueLabelOpt);f(t.seriesDataIndices,function(o){var l=i.getSeriesByIndex(o.seriesIndex),h=o.dataIndexInside,u=l&&l.getDataParams(h);u.axisDim=t.axisDim,u.axisIndex=t.axisIndex,u.axisType=t.axisType,u.axisId=t.axisId,u.axisValue=Hs(e.axis,n),u.axisValueLabel=s,u&&(a.push(u),r.push(l.formatTooltip(h,!0)))});var l=s;o.push((l?Nn(l)+"
":"")+r.join("
"))}})},this),o.reverse(),o=o.join("

");var l=e.position;this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(t)?this._updatePosition(s,l,r[0],r[1],this._tooltipContent,a):this._showTooltipContent(s,o,a,Math.random(),r[0],r[1],l)})},_showSeriesItemTooltip:function(t,e,i){var n=this._ecModel,r=e.seriesIndex,o=n.getSeriesByIndex(r),a=e.dataModel||o,s=e.dataIndex,l=e.dataType,h=a.getData(),u=zc([h.getItemModel(s),a,o&&(o.coordinateSystem||{}).model,this._tooltipModel]),c=u.get("trigger");if(null==c||"item"===c){var d=a.getDataParams(s,l),f=a.formatTooltip(s,!1,l),g="item_"+a.name+"_"+s;this._showOrMove(u,function(){this._showTooltipContent(u,f,d,g,t.offsetX,t.offsetY,t.position,t.target)}),i({type:"showTip",dataIndexInside:s,dataIndex:h.getRawIndex(s),seriesIndex:r,from:this.uid})}},_showComponentItemTooltip:function(t,e,i){var n=e.tooltip;if("string"==typeof n){var r=n;n={content:r,formatter:r}}var o=new Ao(n,this._tooltipModel,this._ecModel),a=o.get("content"),s=Math.random();this._showOrMove(o,function(){this._showTooltipContent(o,a,o.get("formatterParams")||{},s,t.offsetX,t.offsetY,t.position,e)}),i({type:"showTip",from:this.uid})},_showTooltipContent:function(t,e,i,n,r,o,a,s){if(this._ticket="",t.get("showContent")&&t.get("show")){var l=this._tooltipContent,h=t.get("formatter");a=a||t.get("position");var u=e;if(h&&"string"==typeof h)u=En(h,i,!0);else if("function"==typeof h){var c=eb(function(e,n){e===this._ticket&&(l.setContent(n),this._updatePosition(t,a,r,o,l,i,s))},this);this._ticket=n,u=h(i,n,c)}l.setContent(u),l.show(t),this._updatePosition(t,a,r,o,l,i,s)}},_updatePosition:function(t,e,i,n,r,o,a){var s=this._api.getWidth(),l=this._api.getHeight();e=e||t.get("position");var h=r.getSize(),u=t.get("align"),c=t.get("verticalAlign"),d=a&&a.getBoundingRect().clone();if(a&&d.applyTransform(a.transform),"function"==typeof e&&(e=e([i,n],o,r.el,d,{viewSize:[s,l],contentSize:h.slice()})),x(e))i=nb(e[0],s),n=nb(e[1],l);else if(b(e)){e.width=h[0],e.height=h[1];var f=Ko(e,{width:s,height:l});i=f.x,n=f.y,u=null,c=null}else if("string"==typeof e&&a){var g=Bc(e,d,h);i=g[0],n=g[1]}else{var g=Nc(i,n,r.el,s,l,u?null:20,c?null:20);i=g[0],n=g[1]}if(u&&(i-=Wc(u)?h[0]/2:"right"===u?h[0]:0),c&&(n-=Wc(c)?h[1]/2:"bottom"===c?h[1]:0),t.get("confine")){var g=Ec(i,n,r.el,s,l);i=g[0],n=g[1]}r.moveTo(i,n)},_updateContentNotChangedOnAxis:function(t){var e=this._lastDataByCoordSys,i=!!e&&e.length===t.length;return i&&ib(e,function(e,n){var r=e.dataByAxis||{},o=t[n]||{},a=o.dataByAxis||[];i&=r.length===a.length,i&&ib(r,function(t,e){var n=a[e]||{},r=t.seriesDataIndices||[],o=n.seriesDataIndices||[];i&=t.value===n.value&&t.axisType===n.axisType&&t.axisId===n.axisId&&r.length===o.length,i&&ib(r,function(t,e){var n=o[e];i&=t.seriesIndex===n.seriesIndex&&t.dataIndex===n.dataIndex})})}),this._lastDataByCoordSys=t,!!i},_hide:function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},dispose:function(t,e){hf.node||(this._tooltipContent.hide(),fc("itemTooltip",e))}}),hs({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},function(){}),hs({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},function(){});var ob=zn,ab=Nn,sb=ps({type:"marker",dependencies:["series","grid","polar","geo"],init:function(t,e,i,n){this.mergeDefaultAndTheme(t,i),this.mergeOption(t,i,n.createdBySelf,!0)},isAnimationEnabled:function(){if(hf.node)return!1;var t=this.__hostSeries;return this.getShallow("animation")&&t&&t.isAnimationEnabled()},mergeOption:function(t,e,i,n){var r=this.constructor,o=this.mainType+"Model";i||e.eachSeries(function(t){var i=t.get(this.mainType),s=t[o];return i&&i.data?(s?s.mergeOption(i,e,!0):(n&&Hc(i),f(i.data,function(t){t instanceof Array?(Hc(t[0]),Hc(t[1])):Hc(t)}),s=new r(i,this,e),a(s,{mainType:this.mainType,seriesIndex:t.seriesIndex,name:t.name,createdBySelf:!0}),s.__hostSeries=t),void(t[o]=s)):void(t[o]=null)},this)},formatTooltip:function(t){var e=this.getData(),i=this.getRawValue(t),n=x(i)?g(i,ob).join(", "):ob(i),r=e.getName(t),o=ab(this.name);return(null!=i||r)&&(o+="
"),r&&(o+=ab(r),null!=i&&(o+=" : ")),null!=i&&(o+=ab(n)),o},getData:function(){return this._data},setData:function(t){this._data=t}});c(sb,Xv),sb.extend({type:"markPoint",defaultOption:{zlevel:0,z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{normal:{show:!0,position:"inside"},emphasis:{show:!0}},itemStyle:{normal:{borderWidth:2}}}});var lb=h,hb=y,ub={min:hb(Xc,"min"),max:hb(Xc,"max"),average:hb(Xc,"average")},cb=vs({type:"marker",init:function(){this.markerGroupMap=R()},render:function(t,e,i){var n=this.markerGroupMap;n.each(function(t){t.__keep=!1});var r=this.type+"Model";e.eachSeries(function(t){var n=t[r];n&&this.renderSeries(t,n,e,i)},this),n.each(function(t){!t.__keep&&this.group.remove(t.group)},this)},renderSeries:function(){}});cb.extend({type:"markPoint",updateLayout:function(t,e,i){e.eachSeries(function(t){var e=t.markPointModel;e&&(Kc(e.getData(),t,i),this.markerGroupMap.get(t.id).updateLayout(e))},this)},renderSeries:function(t,e,i,n){var r=t.coordinateSystem,o=t.id,a=t.getData(),s=this.markerGroupMap,l=s.get(o)||s.set(o,new Jl),h=Qc(r,t,e);e.setData(h),Kc(e.getData(),t,n),h.each(function(t){var i=h.getItemModel(t),n=i.getShallow("symbolSize");"function"==typeof n&&(n=n(e.getRawValue(t),e.getDataParams(t))),h.setItemVisual(t,{symbolSize:n,color:i.get("itemStyle.normal.color")||a.getVisual("color"),symbol:i.getShallow("symbol")})}),l.updateData(h),this.group.add(l.group),h.eachItemGraphicEl(function(t){t.traverse(function(t){t.dataModel=e})}),l.__keep=!0,l.group.silent=e.get("silent")||t.get("silent")}}),as(function(t){t.markPoint=t.markPoint||{}}),sb.extend({type:"markLine",defaultOption:{zlevel:0,z:5,symbol:["circle","arrow"],symbolSize:[8,16],precision:2,tooltip:{trigger:"item"},label:{normal:{show:!0,position:"end"},emphasis:{show:!0}},lineStyle:{normal:{type:"dashed"},emphasis:{width:3}},animationEasing:"linear"}});var db=Mv.prototype,fb=Iv.prototype,gb=Br({type:"ec-line",style:{stroke:"#000",fill:null},shape:{x1:0,y1:0,x2:0,y2:0,percent:1,cpx1:null,cpy1:null},buildPath:function(t,e){(Jc(e)?db:fb).buildPath(t,e)},pointAt:function(t){return Jc(this.shape)?db.pointAt.call(this,t):fb.pointAt.call(this,t)},tangentAt:function(t){var e=this.shape,i=Jc(e)?[e.x2-e.x1,e.y2-e.y1]:fb.tangentAt.call(this,t);return q(i,i)}}),pb=["fromSymbol","toSymbol"],vb=od.prototype;vb.beforeUpdate=rd,vb._createLine=function(t,e,i){var n=t.hostModel,r=t.getItemLayout(e),o=id(r);o.shape.percent=0,_o(o,{shape:{percent:1}},n,e),this.add(o);var a=new dv({name:"label"});this.add(a),f(pb,function(i){var n=ed(i,t,e);this.add(n),this[td(i)]=t.getItemVisual(e,i)},this),this._updateCommonStl(t,e,i)},vb.updateData=function(t,e,i){var n=t.hostModel,r=this.childOfName("line"),o=t.getItemLayout(e),a={shape:{}};nd(a.shape,o),xo(r,a,n,e),f(pb,function(i){var n=t.getItemVisual(e,i),r=td(i);if(this[r]!==n){this.remove(this.childOfName(i));var o=ed(i,t,e);this.add(o)}this[r]=n},this),this._updateCommonStl(t,e,i)},vb._updateCommonStl=function(t,e,i){var n=t.hostModel,r=this.childOfName("line"),o=i&&i.lineStyle,a=i&&i.hoverLineStyle,l=i&&i.labelModel,h=i&&i.hoverLabelModel;if(!i||t.hasItemOption){var u=t.getItemModel(e);o=u.getModel("lineStyle.normal").getLineStyle(),a=u.getModel("lineStyle.emphasis").getLineStyle(),l=u.getModel("label.normal"),h=u.getModel("label.emphasis")}var c=t.getItemVisual(e,"color"),d=A(t.getItemVisual(e,"opacity"),o.opacity,1);r.useStyle(s({strokeNoScale:!0,fill:"none",stroke:c,opacity:d},o)),r.hoverStyle=a,f(pb,function(t){var e=this.childOfName(t);e&&(e.setColor(c),e.setStyle({opacity:d}))},this);var g,p,v,m,y=l.getShallow("show"),x=h.getShallow("show"),_=this.childOfName("label");if(y||x){var w=n.getRawValue(e);p=null==w?p=t.getName(e):isFinite(w)?wn(w):w,g=c||"#000",v=D(n.getFormattedLabel(e,"normal",t.dataType),p),m=D(n.getFormattedLabel(e,"emphasis",t.dataType),v)}if(y){var b=lo(_.style,l,{text:v},{autoColor:g});_.__textAlign=b.textAlign,_.__verticalAlign=b.textVerticalAlign,_.__position=l.get("position")||"middle"}else _.setStyle("text",null);_.hoverStyle=x?{text:m,textFill:h.getTextColor(!0),fontStyle:h.getShallow("fontStyle"),fontWeight:h.getShallow("fontWeight"),fontSize:h.getShallow("fontSize"),fontFamily:h.getShallow("fontFamily")}:{text:null},_.ignore=!y&&!x,ao(this)},vb.highlight=function(){this.trigger("emphasis")},vb.downplay=function(){this.trigger("normal")},vb.updateLayout=function(t,e){this.setLinePoints(t.getItemLayout(e))},vb.setLinePoints=function(t){var e=this.childOfName("line");nd(e.shape,t),e.dirty()},u(od,ag);var mb=ld.prototype;mb.updateData=function(t){var e=this._lineData,i=this.group,n=this._ctor,r=t.hostModel,o={lineStyle:r.getModel("lineStyle.normal").getLineStyle(),hoverLineStyle:r.getModel("lineStyle.emphasis").getLineStyle(),labelModel:r.getModel("label.normal"),hoverLabelModel:r.getModel("label.emphasis")};t.diff(e).add(function(e){if(sd(t.getItemLayout(e))){var r=new n(t,e,o);t.setItemGraphicEl(e,r),i.add(r)}}).update(function(r,a){var s=e.getItemGraphicEl(a);return sd(t.getItemLayout(r))?(s?s.updateData(t,r,o):s=new n(t,r,o),t.setItemGraphicEl(r,s),void i.add(s)):void i.remove(s)}).remove(function(t){i.remove(e.getItemGraphicEl(t))}).execute(),this._lineData=t},mb.updateLayout=function(){var t=this._lineData;t.eachItemGraphicEl(function(e,i){e.updateLayout(t,i)},this)},mb.remove=function(){this.group.removeAll()};var yb=function(t,e,i,o){var s=t.getData(),l=o.type;if(!x(o)&&("min"===l||"max"===l||"average"===l||null!=o.xAxis||null!=o.yAxis)){var h,u,c;if(null!=o.yAxis||null!=o.xAxis)u=null!=o.yAxis?"y":"x",h=e.getAxis(u),c=T(o.yAxis,o.xAxis);else{var d=Yc(o,s,e,t);u=d.valueDataDim,h=d.valueAxis,c=$c(s,u,l)}var f="x"===u?0:1,g=1-f,p=n(o),v={};p.type=null,p.coord=[],v.coord=[],p.coord[g]=-1/0,v.coord[g]=1/0;var m=i.get("precision");m>=0&&"number"==typeof c&&(c=+c.toFixed(Math.min(m,20))),p.coord[f]=v.coord[f]=c,o=[p,v,{type:l,valueIndex:o.valueIndex,value:c}]}return o=[qc(t,o[0]),qc(t,o[1]),a({},o[2])],o[2].type=o[2].type||"",r(o[2],o[0]),r(o[2],o[1]),o};cb.extend({type:"markLine",updateLayout:function(t,e,i){e.eachSeries(function(t){var e=t.markLineModel;if(e){var n=e.getData(),r=e.__from,o=e.__to;r.each(function(e){dd(r,e,!0,t,i),dd(o,e,!1,t,i)}),n.each(function(t){n.setItemLayout(t,[r.getItemLayout(t),o.getItemLayout(t)])}),this.markerGroupMap.get(t.id).updateLayout()}},this)},renderSeries:function(t,e,i,n){function r(e,i,r){var o=e.getItemModel(i);dd(e,i,r,t,n),e.setItemVisual(i,{symbolSize:o.get("symbolSize")||p[r?0:1],symbol:o.get("symbol",!0)||g[r?0:1],color:o.get("itemStyle.normal.color")||s.getVisual("color")})}var o=t.coordinateSystem,a=t.id,s=t.getData(),l=this.markerGroupMap,h=l.get(a)||l.set(a,new ld);this.group.add(h.group);var u=fd(o,t,e),c=u.from,d=u.to,f=u.line;e.__from=c,e.__to=d,e.setData(f);var g=e.get("symbol"),p=e.get("symbolSize");x(g)||(g=[g,g]),"number"==typeof p&&(p=[p,p]),u.from.each(function(t){r(c,t,!0),r(d,t,!1)}),f.each(function(t){var e=f.getItemModel(t).get("lineStyle.normal.color");f.setItemVisual(t,{color:e||c.getItemVisual(t,"color")}),f.setItemLayout(t,[c.getItemLayout(t),d.getItemLayout(t)]),f.setItemVisual(t,{fromSymbolSize:c.getItemVisual(t,"symbolSize"),fromSymbol:c.getItemVisual(t,"symbol"),toSymbolSize:d.getItemVisual(t,"symbolSize"),toSymbol:d.getItemVisual(t,"symbol")})}),h.updateData(f),u.line.eachItemGraphicEl(function(t){t.traverse(function(t){t.dataModel=e})}),h.__keep=!0,h.group.silent=e.get("silent")||t.get("silent")}}),as(function(t){t.markLine=t.markLine||{}}),em.registerSubTypeDefaulter("dataZoom",function(){return"slider"});var xb=["x","y","z","radius","angle","single"],_b=["cartesian2d","polar","singleAxis"],wb=pd(xb,["axisIndex","axis","index","id"]),bb=f,Mb=bn,Sb=function(t,e,i,n){this._dimName=t,this._axisIndex=e,this._valueWindow,this._percentWindow,this._dataExtent,this._minMaxSpan,this.ecModel=n,this._dataZoomModel=i};Sb.prototype={constructor:Sb,hostedBy:function(t){return this._dataZoomModel===t},getDataValueWindow:function(){return this._valueWindow.slice()},getDataPercentWindow:function(){return this._percentWindow.slice()},getTargetSeriesModels:function(){var t=[],e=this.ecModel;return e.eachSeries(function(i){if(gd(i.get("coordinateSystem"))){var n=this._dimName,r=e.queryComponents({mainType:n+"Axis",index:i.get(n+"AxisIndex"),id:i.get(n+"AxisId")})[0];this._axisIndex===(r&&r.componentIndex)&&t.push(i)}},this),t},getAxisModel:function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},getOtherAxisModel:function(){var t,e,i=this._dimName,n=this.ecModel,r=this.getAxisModel(),o="x"===i||"y"===i;o?(e="gridIndex",t="x"===i?"y":"x"):(e="polarIndex",t="angle"===i?"radius":"angle");var a;return n.eachComponent(t+"Axis",function(t){(t.get(e)||0)===(r.get(e)||0)&&(a=t)}),a},getMinMaxSpan:function(){return n(this._minMaxSpan)},calculateDataWindow:function(t){var e=this._dataExtent,i=this.getAxisModel(),n=i.axis.scale,r=this._dataZoomModel.getRangePropMode(),o=[0,100],a=[t.start,t.end],s=[];return bb(["startValue","endValue"],function(e){s.push(null!=t[e]?n.parse(t[e]):null)}),bb([0,1],function(t){var i=s[t],l=a[t];"percent"===r[t]?(null==l&&(l=o[t]),i=n.parse(xn(l,o,e,!0))):l=xn(i,e,o,!0),s[t]=i,a[t]=l}),{valueWindow:Mb(s),percentWindow:Mb(a)}},reset:function(t){if(t===this._dataZoomModel){this._dataExtent=md(this,this._dimName,this.getTargetSeriesModels());var e=this.calculateDataWindow(t.option);this._valueWindow=e.valueWindow,this._percentWindow=e.percentWindow,_d(this),xd(this)}},restore:function(t){t===this._dataZoomModel&&(this._valueWindow=this._percentWindow=null,xd(this,!0))},filterData:function(t){function e(t){return t>=o[0]&&t<=o[1]}if(t===this._dataZoomModel){var i=this._dimName,n=this.getTargetSeriesModels(),r=t.get("filterMode"),o=this._valueWindow;if("none"!==r){var a=this.getOtherAxisModel();t.get("$fromToolbox")&&a&&"category"===a.get("type")&&(r="empty"),bb(n,function(t){var n=t.getData(),a=t.coordDimToDataDim(i);"weakFilter"===r?n&&n.filterSelf(function(t){for(var e,i,r,s=0;so[1];if(h&&!u&&!c)return!0;h&&(r=!0),u&&(e=!0),c&&(i=!0)}return r&&e&&i}):n&&bb(a,function(i){"empty"===r?t.setData(n.map(i,function(t){return e(t)?t:0/0})):n.filterSelf(i,e)})})}}}};var Ib=f,Tb=wb,Db=ps({type:"dataZoom",dependencies:["xAxis","yAxis","zAxis","radiusAxis","angleAxis","singleAxis","series"],defaultOption:{zlevel:0,z:4,orient:null,xAxisIndex:null,yAxisIndex:null,filterMode:"filter",throttle:null,start:0,end:100,startValue:null,endValue:null,minSpan:null,maxSpan:null,minValueSpan:null,maxValueSpan:null,rangeMode:null},init:function(t,e,i){this._dataIntervalByAxis={},this._dataInfo={},this._axisProxies={},this.textStyleModel,this._autoThrottle=!0,this._rangePropMode=["percent","percent"];var n=wd(t);this.mergeDefaultAndTheme(t,i),this.doInit(n)},mergeOption:function(t){var e=wd(t);r(this.option,t,!0),this.doInit(e)},doInit:function(t){var e=this.option;hf.canvasSupported||(e.realtime=!1),this._setDefaultThrottle(t),bd(this,t),Ib([["start","startValue"],["end","endValue"]],function(t,i){"value"===this._rangePropMode[i]&&(e[t[0]]=null)},this),this.textStyleModel=this.getModel("textStyle"),this._resetTarget(),this._giveAxisProxies()},_giveAxisProxies:function(){var t=this._axisProxies;this.eachTargetAxis(function(e,i,n,r){var o=this.dependentModels[e.axis][i],a=o.__dzAxisProxy||(o.__dzAxisProxy=new Sb(e.name,i,this,r));t[e.name+"_"+i]=a},this)},_resetTarget:function(){var t=this.option,e=this._judgeAutoMode();Tb(function(e){var i=e.axisIndex;t[i]=ko(t[i])},this),"axisIndex"===e?this._autoSetAxisIndex():"orient"===e&&this._autoSetOrient()},_judgeAutoMode:function(){var t=this.option,e=!1;Tb(function(i){null!=t[i.axisIndex]&&(e=!0)},this);var i=t.orient;return null==i&&e?"orient":e?void 0:(null==i&&(t.orient="horizontal"),"axisIndex")},_autoSetAxisIndex:function(){var t=!0,e=this.get("orient",!0),i=this.option,n=this.dependentModels;if(t){var r="vertical"===e?"y":"x";n[r+"Axis"].length?(i[r+"AxisIndex"]=[0],t=!1):Ib(n.singleAxis,function(n){t&&n.get("orient",!0)===e&&(i.singleAxisIndex=[n.componentIndex],t=!1)})}t&&Tb(function(e){if(t){var n=[],r=this.dependentModels[e.axis];if(r.length&&!n.length)for(var o=0,a=r.length;a>o;o++)"category"===r[o].get("type")&&n.push(o);i[e.axisIndex]=n,n.length&&(t=!1)}},this),t&&this.ecModel.eachSeries(function(t){this._isSeriesHasAllAxesTypeOf(t,"value")&&Tb(function(e){var n=i[e.axisIndex],r=t.get(e.axisIndex),o=t.get(e.axisId),a=t.ecModel.queryComponents({mainType:e.axis,index:r,id:o})[0];r=a.componentIndex,h(n,r)<0&&n.push(r)})},this)},_autoSetOrient:function(){var t;this.eachTargetAxis(function(e){!t&&(t=e.name)},this),this.option.orient="y"===t?"vertical":"horizontal"},_isSeriesHasAllAxesTypeOf:function(t,e){var i=!0;return Tb(function(n){var r=t.get(n.axisIndex),o=this.dependentModels[n.axis][r];o&&o.get("type")===e||(i=!1)},this),i},_setDefaultThrottle:function(t){if(t.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var e=this.ecModel.option;this.option.throttle=e.animation&&e.animationDurationUpdate>0?100:20}},getFirstTargetAxisModel:function(){var t;return Tb(function(e){if(null==t){var i=this.get(e.axisIndex);i.length&&(t=this.dependentModels[e.axis][i[0]])}},this),t},eachTargetAxis:function(t,e){var i=this.ecModel;Tb(function(n){Ib(this.get(n.axisIndex),function(r){t.call(e,n,r,this,i)},this)},this)},getAxisProxy:function(t,e){return this._axisProxies[t+"_"+e]},getAxisModel:function(t,e){var i=this.getAxisProxy(t,e);return i&&i.getAxisModel()},setRawRange:function(t,e){var i=this.option;Ib([["start","startValue"],["end","endValue"]],function(e){(null!=t[e[0]]||null!=t[e[1]])&&(i[e[0]]=t[e[0]],i[e[1]]=t[e[1]])},this),!e&&bd(this,t)},getPercentRange:function(){var t=this.findRepresentativeAxisProxy();return t?t.getDataPercentWindow():void 0},getValueRange:function(t,e){if(null!=t||null!=e)return this.getAxisProxy(t,e).getDataValueWindow();var i=this.findRepresentativeAxisProxy();return i?i.getDataValueWindow():void 0},findRepresentativeAxisProxy:function(t){if(t)return t.__dzAxisProxy;var e=this._axisProxies;for(var i in e)if(e.hasOwnProperty(i)&&e[i].hostedBy(this))return e[i];for(var i in e)if(e.hasOwnProperty(i)&&!e[i].hostedBy(this))return e[i]},getRangePropMode:function(){return this._rangePropMode.slice()}}),Ab=Cm.extend({type:"dataZoom",render:function(t,e,i){this.dataZoomModel=t,this.ecModel=e,this.api=i},getTargetCoordInfo:function(){function t(t,e,i,n){for(var r,o=0;oo&&(e[1-n]=e[n]+u.sign*o),e}),Lb=bv,kb=xn,Pb=bn,Ob=m,zb=f,Rb=7,Nb=1,Eb=30,Vb="horizontal",Bb="vertical",Wb=5,Hb=["line","bar","candlestick","scatter"],Fb=Ab.extend({type:"dataZoom.slider",init:function(t,e){this._displayables={},this._orient,this._range,this._handleEnds,this._size,this._handleWidth,this._handleHeight,this._location,this._dragging,this._dataShadowInfo,this.api=e},render:function(t,e,i,n){return Fb.superApply(this,"render",arguments),ka(this,"_dispatchZoomAction",this.dataZoomModel.get("throttle"),"fixRate"),this._orient=t.get("orient"),this.dataZoomModel.get("show")===!1?void this.group.removeAll():(n&&"dataZoom"===n.type&&n.from===this.uid||this._buildView(),void this._updateView())},remove:function(){Fb.superApply(this,"remove",arguments),Pa(this,"_dispatchZoomAction")},dispose:function(){Fb.superApply(this,"dispose",arguments),Pa(this,"_dispatchZoomAction")},_buildView:function(){var t=this.group;t.removeAll(),this._resetLocation(),this._resetInterval();var e=this._displayables.barGroup=new ag;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(e),this._positionGroup()},_resetLocation:function(){var t=this.dataZoomModel,e=this.api,i=this._findCoordRect(),n={width:e.getWidth(),height:e.getHeight()},r=this._orient===Vb?{right:n.width-i.x-i.width,top:n.height-Eb-Rb,width:i.width,height:Eb}:{right:Rb,top:i.y,width:Eb,height:i.height},o=ea(t.option);f(["right","top","width","height"],function(t){"ph"===o[t]&&(o[t]=r[t])});var a=Ko(o,n,t.padding);this._location={x:a.x,y:a.y},this._size=[a.width,a.height],this._orient===Bb&&this._size.reverse()},_positionGroup:function(){var t=this.group,e=this._location,i=this._orient,n=this.dataZoomModel.getFirstTargetAxisModel(),r=n&&n.get("inverse"),o=this._displayables.barGroup,a=(this._dataShadowInfo||{}).otherAxisInverse;o.attr(i!==Vb||r?i===Vb&&r?{scale:a?[-1,1]:[-1,-1]}:i!==Bb||r?{scale:a?[-1,-1]:[-1,1],rotation:Math.PI/2}:{scale:a?[1,-1]:[1,1],rotation:Math.PI/2}:{scale:a?[1,1]:[1,-1]});var s=t.getBoundingRect([o]);t.attr("position",[e.x-s.x,e.y-s.y])},_getViewExtent:function(){return[0,this._size[0]]},_renderBackground:function(){var t=this.dataZoomModel,e=this._size,i=this._displayables.barGroup;i.add(new Lb({silent:!0,shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:t.get("backgroundColor")},z2:-40})),i.add(new Lb({shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:"transparent"},z2:0,onclick:m(this._onClickPanelClick,this)}))},_renderDataShadow:function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(t){var e=this._size,i=t.series,n=i.getRawData(),r=i.getShadowDim?i.getShadowDim():t.otherDim;if(null!=r){var o=n.getDataExtent(r),a=.3*(o[1]-o[0]);o=[o[0]-a,o[1]+a];var l,h=[0,e[1]],u=[0,e[0]],c=[[e[0],0],[0,0]],d=[],f=u[1]/(n.count()-1),g=0,p=Math.round(n.count()/e[0]);n.each([r],function(t,e){if(p>0&&e%p)return void(g+=f);var i=null==t||isNaN(t)||""===t,n=i?0:kb(t,o,h,!0);i&&!l&&e?(c.push([c[c.length-1][0],0]),d.push([d[d.length-1][0],0])):!i&&l&&(c.push([g,0]),d.push([g,0])),c.push([g,n]),d.push([g,n]),g+=f,l=i});var v=this.dataZoomModel;this._displayables.barGroup.add(new _v({shape:{points:c},style:s({fill:v.get("dataBackgroundColor")},v.getModel("dataBackground.areaStyle").getAreaStyle()),silent:!0,z2:-20})),this._displayables.barGroup.add(new wv({shape:{points:d},style:v.getModel("dataBackground.lineStyle").getLineStyle(),silent:!0,z2:-19}))}}},_prepareDataShadowInfo:function(){var t=this.dataZoomModel,e=t.get("showDataShadow");if(e!==!1){var i,n=this.ecModel;return t.eachTargetAxis(function(r,o){var a=t.getAxisProxy(r.name,o).getTargetSeriesModels();f(a,function(t){if(!(i||e!==!0&&h(Hb,t.get("type"))<0)){var a,s=n.getComponent(r.axis,o).axis,l=Id(r.name),u=t.coordinateSystem;null!=l&&u.getOtherAxis&&(a=u.getOtherAxis(s).inverse),i={thisAxis:s,series:t,thisDim:r.name,otherDim:l,otherAxisInverse:a}}},this)},this),i}},_renderHandle:function(){var t=this._displayables,e=t.handles=[],i=t.handleLabels=[],n=this._displayables.barGroup,r=this._size,o=this.dataZoomModel;n.add(t.filler=new Lb({draggable:!0,cursor:Td(this._orient),drift:Ob(this._onDragMove,this,"all"),onmousemove:function(t){Rg(t.event)},ondragstart:Ob(this._showDataInfo,this,!0),ondragend:Ob(this._onDragEnd,this),onmouseover:Ob(this._showDataInfo,this,!0),onmouseout:Ob(this._showDataInfo,this,!1),style:{fill:o.get("fillerColor"),textPosition:"inside"}})),n.add(new Lb(qr({silent:!0,shape:{x:0,y:0,width:r[0],height:r[1]},style:{stroke:o.get("dataBackgroundColor")||o.get("borderColor"),lineWidth:Nb,fill:"rgba(0,0,0,0)"}}))),zb([0,1],function(t){var r=Do(o.get("handleIcon"),{cursor:Td(this._orient),draggable:!0,drift:Ob(this._onDragMove,this,t),onmousemove:function(t){Rg(t.event)},ondragend:Ob(this._onDragEnd,this),onmouseover:Ob(this._showDataInfo,this,!0),onmouseout:Ob(this._showDataInfo,this,!1)},{x:-1,y:0,width:2,height:2}),a=r.getBoundingRect();this._handleHeight=_n(o.get("handleSize"),this._size[1]),this._handleWidth=a.width/a.height*this._handleHeight,r.setStyle(o.getModel("handleStyle").getItemStyle());var s=o.get("handleColor");null!=s&&(r.style.fill=s),n.add(e[t]=r);var l=o.textStyleModel;this.group.add(i[t]=new dv({silent:!0,invisible:!0,style:{x:0,y:0,text:"",textVerticalAlign:"middle",textAlign:"center",textFill:l.getTextColor(),textFont:l.getFont()},z2:10}))},this)},_resetInterval:function(){var t=this._range=this.dataZoomModel.getPercentRange(),e=this._getViewExtent();this._handleEnds=[kb(t[0],[0,100],e,!0),kb(t[1],[0,100],e,!0)]},_updateInterval:function(t,e){var i=this.dataZoomModel,n=this._handleEnds,r=this._getViewExtent(),o=i.findRepresentativeAxisProxy().getMinMaxSpan(),a=[0,100];Cb(e,n,r,i.get("zoomLock")?"all":t,null!=o.minSpan?kb(o.minSpan,a,r,!0):null,null!=o.maxSpan?kb(o.maxSpan,a,r,!0):null),this._range=Pb([kb(n[0],r,a,!0),kb(n[1],r,a,!0)])},_updateView:function(t){var e=this._displayables,i=this._handleEnds,n=Pb(i.slice()),r=this._size;zb([0,1],function(t){var n=e.handles[t],o=this._handleHeight;n.attr({scale:[o/2,o/2],position:[i[t],r[1]/2-o/2]})},this),e.filler.setShape({x:n[0],y:0,width:n[1]-n[0],height:r[1]}),this._updateDataInfo(t)},_updateDataInfo:function(t){function e(t){var e=wo(n.handles[t].parent,this.group),i=Mo(0===t?"right":"left",e),s=this._handleWidth/2+Wb,l=bo([c[t]+(0===t?-s:s),this._size[1]/2],e);r[t].setStyle({x:l[0],y:l[1],textVerticalAlign:o===Vb?"middle":i,textAlign:o===Vb?i:"center",text:a[t]})}var i=this.dataZoomModel,n=this._displayables,r=n.handleLabels,o=this._orient,a=["",""];if(i.get("showDetail")){var s=i.findRepresentativeAxisProxy(); if(s){var l=s.getAxisModel().axis,h=this._range,u=t?s.calculateDataWindow({start:h[0],end:h[1]}).valueWindow:s.getDataValueWindow();a=[this._formatLabel(u[0],l),this._formatLabel(u[1],l)]}}var c=Pb(this._handleEnds.slice());e.call(this,0),e.call(this,1)},_formatLabel:function(t,e){var i=this.dataZoomModel,n=i.get("labelFormatter"),r=i.get("labelPrecision");(null==r||"auto"===r)&&(r=e.getPixelPrecision());var o=null==t||isNaN(t)?"":"category"===e.type||"time"===e.type?e.scale.getLabel(Math.round(t)):t.toFixed(Math.min(r,20));return _(n)?n(t,o):w(n)?n.replace("{value}",o):o},_showDataInfo:function(t){t=this._dragging||t;var e=this._displayables.handleLabels;e[0].attr("invisible",!t),e[1].attr("invisible",!t)},_onDragMove:function(t,e,i){this._dragging=!0;var n=this._displayables.barGroup.getLocalTransform(),r=bo([e,i],n,!0);this._updateInterval(t,r[0]);var o=this.dataZoomModel.get("realtime");this._updateView(!o),o&&o&&this._dispatchZoomAction()},_onDragEnd:function(){this._dragging=!1,this._showDataInfo(!1),this._dispatchZoomAction()},_onClickPanelClick:function(t){var e=this._size,i=this._displayables.barGroup.transformCoordToLocal(t.offsetX,t.offsetY);if(!(i[0]<0||i[0]>e[0]||i[1]<0||i[1]>e[1])){var n=this._handleEnds,r=(n[0]+n[1])/2;this._updateInterval("all",i[0]-r),this._updateView(),this._dispatchZoomAction()}},_dispatchZoomAction:function(){var t=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,start:t[0],end:t[1]})},_findCoordRect:function(){var t;if(zb(this.getTargetCoordInfo(),function(e){if(!t&&e.length){var i=e[0].model.coordinateSystem;t=i.getRect&&i.getRect()}}),!t){var e=this.api.getWidth(),i=this.api.getHeight();t={x:.2*e,y:.2*i,width:.6*e,height:.6*i}}return t}});Db.extend({type:"dataZoom.inside",defaultOption:{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,preventDefaultMouseMove:!0}});var Gb=y,Zb="\x00_ec_dataZoom_roams",Xb=m,qb=Ab.extend({type:"dataZoom.inside",init:function(){this._range},render:function(t,e,i,n){qb.superApply(this,"render",arguments),Cd(n,t.id)&&(this._range=t.getPercentRange()),f(this.getTargetCoordInfo(),function(e,n){var r=g(e,function(t){return Ld(t.model)});f(e,function(e){var o=e.model,a=t.option;Dd(i,{coordId:Ld(o),allCoordIds:r,containsPoint:function(t,e,i){return o.coordinateSystem.containPoint([e,i])},dataZoomId:t.id,throttleRate:t.get("throttle",!0),panGetRange:Xb(this._onPan,this,e,n),zoomGetRange:Xb(this._onZoom,this,e,n),zoomLock:a.zoomLock,disabled:a.disabled,roamControllerOpt:{zoomOnMouseWheel:a.zoomOnMouseWheel,moveOnMouseMove:a.moveOnMouseMove,preventDefaultMouseMove:a.preventDefaultMouseMove}})},this)},this)},dispose:function(){Ad(this.api,this.dataZoomModel.id),qb.superApply(this,"dispose",arguments),this._range=null},_onPan:function(t,e,i,n,r,o,a,s,l){var h=this._range.slice(),u=t.axisModels[0];if(u){var c=Yb[e]([o,a],[s,l],u,i,t),d=c.signal*(h[1]-h[0])*c.pixel/c.pixelLength;return Cb(d,h,[0,100],"all"),this._range=h}},_onZoom:function(t,e,i,n,r,o){var a=this._range.slice(),s=t.axisModels[0];if(s){var l=Yb[e](null,[r,o],s,i,t),h=(l.signal>0?l.pixelStart+l.pixelLength-l.pixel:l.pixel-l.pixelStart)/l.pixelLength*(a[1]-a[0])+a[0];n=Math.max(1/n,0),a[0]=(a[0]-h)*n+h,a[1]=(a[1]-h)*n+h;var u=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();return Cb(0,a,[0,100],0,u.minSpan,u.maxSpan),this._range=a}}}),Yb={grid:function(t,e,i,n,r){var o=i.axis,a={},s=r.model.coordinateSystem.getRect();return t=t||[0,0],"x"===o.dim?(a.pixel=e[0]-t[0],a.pixelLength=s.width,a.pixelStart=s.x,a.signal=o.inverse?1:-1):(a.pixel=e[1]-t[1],a.pixelLength=s.height,a.pixelStart=s.y,a.signal=o.inverse?-1:1),a},polar:function(t,e,i,n,r){var o=i.axis,a={},s=r.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),h=s.getAngleAxis().getExtent();return t=t?s.pointToCoord(t):[0,0],e=s.pointToCoord(e),"radiusAxis"===i.mainType?(a.pixel=e[0]-t[0],a.pixelLength=l[1]-l[0],a.pixelStart=l[0],a.signal=o.inverse?1:-1):(a.pixel=e[1]-t[1],a.pixelLength=h[1]-h[0],a.pixelStart=h[0],a.signal=o.inverse?-1:1),a},singleAxis:function(t,e,i,n,r){var o=i.axis,a=r.model.coordinateSystem.getRect(),s={};return t=t||[0,0],"horizontal"===o.orient?(s.pixel=e[0]-t[0],s.pixelLength=a.width,s.pixelStart=a.x,s.signal=o.inverse?1:-1):(s.pixel=e[1]-t[1],s.pixelLength=a.height,s.pixelStart=a.y,s.signal=o.inverse?-1:1),s}};ss(function(t){t.eachComponent("dataZoom",function(t){t.eachTargetAxis(Bd),t.eachTargetAxis(Wd)}),t.eachComponent("dataZoom",function(t){var e=t.findRepresentativeAxisProxy(),i=e.getDataPercentWindow(),n=e.getDataValueWindow();t.setRawRange({start:i[0],end:i[1],startValue:n[0],endValue:n[1]},!0)})}),hs("dataZoom",function(t,e){var i=vd(m(e.eachComponent,e,"dataZoom"),wb,function(t,e){return t.get(e.axisIndex)}),n=[];e.eachComponent({mainType:"dataZoom",query:t},function(t){n.push.apply(n,i(t).nodes)}),f(n,function(e){e.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})})});var Ub=f,jb=function(t){var e=t&&t.visualMap;x(e)||(e=e?[e]:[]),Ub(e,function(t){if(t){Hd(t,"splitList")&&!Hd(t,"pieces")&&(t.pieces=t.splitList,delete t.splitList);var e=t.pieces;e&&x(e)&&Ub(e,function(t){b(t)&&(Hd(t,"start")&&!Hd(t,"min")&&(t.min=t.start),Hd(t,"end")&&!Hd(t,"max")&&(t.max=t.end))})}})};em.registerSubTypeDefaulter("visualMap",function(t){return t.categories||(t.pieces?t.pieces.length>0:t.splitNumber>0)&&!t.calculable?"piecewise":"continuous"});var $b=f;fs(jm.VISUAL.COMPONENT,function(t){t.eachComponent("visualMap",function(e){qd(e,t)}),Yd(t)});var Kb={get:function(t,e,i){var r=n((Qb[t]||{})[e]);return i&&x(r)?r[r.length-1]:r}},Qb={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]}},Jb=aw.mapVisual,tM=aw.eachVisual,eM=x,iM=f,nM=bn,rM=xn,oM=N,aM=["#f6efa6","#d88273","#bf444c"],sM=ps({type:"visualMap",dependencies:["series"],stateList:["inRange","outOfRange"],replacableOptionKeys:["inRange","outOfRange","target","controller","color"],dataBound:[-1/0,1/0],layoutMode:{type:"box",ignoreSize:!0},defaultOption:{show:!0,zlevel:0,z:4,seriesIndex:"all",min:0,max:200,dimension:null,inRange:null,outOfRange:null,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,color:null,formatter:null,text:null,textStyle:{color:"#333"}},init:function(t,e,i){this._dataExtent,this.targetVisuals={},this.controllerVisuals={},this.textStyleModel,this.itemSize,this.mergeDefaultAndTheme(t,i)},optionUpdated:function(t,e){var i=this.option;hf.canvasSupported||(i.realtime=!1),!e&&Zd(i,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},resetVisual:function(t){var e=this.stateList;t=m(t,this),this.controllerVisuals=Gd(this.option.controller,e,t),this.targetVisuals=Gd(this.option.target,e,t)},getTargetSeriesIndices:function(){var t=this.option.seriesIndex,e=[];return null==t||"all"===t?this.ecModel.eachSeries(function(t,i){e.push(i)}):e=ko(t),e},eachTargetSeries:function(t,e){f(this.getTargetSeriesIndices(),function(i){t.call(e,this.ecModel.getSeriesByIndex(i))},this)},isTargetSeries:function(t){var e=!1;return this.eachTargetSeries(function(i){i===t&&(e=!0)}),e},formatValueText:function(t,e,i){function n(t){return t===l[0]?"min":t===l[1]?"max":(+t).toFixed(Math.min(s,20))}var r,o,a=this.option,s=a.precision,l=this.dataBound,h=a.formatter;return i=i||["<",">"],x(t)&&(t=t.slice(),r=!0),o=e?t:r?[n(t[0]),n(t[1])]:n(t),w(h)?h.replace("{value}",r?o[0]:o).replace("{value2}",r?o[1]:o):_(h)?r?h(t[0],t[1]):h(t):r?t[0]===l[0]?i[0]+" "+o[1]:t[1]===l[1]?i[1]+" "+o[0]:o[0]+" - "+o[1]:o},resetExtent:function(){var t=this.option,e=nM([t.min,t.max]);this._dataExtent=e},getDataDimension:function(t){var e=this.option.dimension;return null!=e?e:t.dimensions.length-1},getExtent:function(){return this._dataExtent.slice()},completeVisualOption:function(){function t(t){eM(o.color)&&!t.inRange&&(t.inRange={color:o.color.slice().reverse()}),t.inRange=t.inRange||{color:aM},iM(this.stateList,function(e){var i=t[e];if(w(i)){var n=Kb.get(i,"active",h);n?(t[e]={},t[e][i]=n):delete t[e]}},this)}function e(t,e,i){var n=t[e],r=t[i];n&&!r&&(r=t[i]={},iM(n,function(t,e){if(aw.isValidType(e)){var i=Kb.get(e,"inactive",h);null!=i&&(r[e]=i,"color"!==e||r.hasOwnProperty("opacity")||r.hasOwnProperty("colorAlpha")||(r.opacity=[0,0]))}}))}function i(t){var e=(t.inRange||{}).symbol||(t.outOfRange||{}).symbol,i=(t.inRange||{}).symbolSize||(t.outOfRange||{}).symbolSize,r=this.get("inactiveColor");iM(this.stateList,function(o){var a=this.itemSize,s=t[o];s||(s=t[o]={color:h?r:[r]}),null==s.symbol&&(s.symbol=e&&n(e)||(h?"roundRect":["roundRect"])),null==s.symbolSize&&(s.symbolSize=i&&n(i)||(h?a[0]:[a[0],a[0]])),s.symbol=Jb(s.symbol,function(t){return"none"===t||"square"===t?"roundRect":t});var l=s.symbolSize;if(null!=l){var u=-1/0;tM(l,function(t){t>u&&(u=t)}),s.symbolSize=Jb(l,function(t){return rM(t,[0,u],[0,a[0]],!0)})}},this)}var o=this.option,a={inRange:o.inRange,outOfRange:o.outOfRange},s=o.target||(o.target={}),l=o.controller||(o.controller={});r(s,a),r(l,a);var h=this.isCategory();t.call(this,s),t.call(this,l),e.call(this,s,"inRange","outOfRange"),i.call(this,l)},resetItemSize:function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},isCategory:function(){return!!this.option.categories},setSelected:oM,getValueState:oM,getVisualMeta:oM}),lM=[20,140],hM=sM.extend({type:"visualMap.continuous",defaultOption:{align:"auto",calculable:!1,range:null,realtime:!0,itemHeight:null,itemWidth:null,hoverLink:!0,hoverLinkDataSize:null,hoverLinkOnHandle:null},optionUpdated:function(){hM.superApply(this,"optionUpdated",arguments),this.resetExtent(),this.resetVisual(function(t){t.mappingMethod="linear",t.dataExtent=this.getExtent()}),this._resetRange()},resetItemSize:function(){hM.superApply(this,"resetItemSize",arguments);var t=this.itemSize;"horizontal"===this._orient&&t.reverse(),(null==t[0]||isNaN(t[0]))&&(t[0]=lM[0]),(null==t[1]||isNaN(t[1]))&&(t[1]=lM[1])},_resetRange:function(){var t=this.getExtent(),e=this.option.range;!e||e.auto?(t.auto=1,this.option.range=t):x(e)&&(e[0]>e[1]&&e.reverse(),e[0]=Math.max(e[0],t[0]),e[1]=Math.min(e[1],t[1]))},completeVisualOption:function(){sM.prototype.completeVisualOption.apply(this,arguments),f(this.stateList,function(t){var e=this.option.controller[t].symbolSize;e&&e[0]!==e[1]&&(e[0]=0)},this)},setSelected:function(t){this.option.range=t.slice(),this._resetRange()},getSelected:function(){var t=this.getExtent(),e=bn((this.get("range")||[]).slice());return e[0]>t[1]&&(e[0]=t[1]),e[1]>t[1]&&(e[1]=t[1]),e[0]=i[1]||t<=e[1])?"inRange":"outOfRange"},findTargetDataIndices:function(t){var e=[];return this.eachTargetSeries(function(i){var n=[],r=i.getData();r.each(this.getDataDimension(r),function(e,i){t[0]<=e&&e<=t[1]&&n.push(i)},!0,this),e.push({seriesId:i.id,dataIndex:n})},this),e},getVisualMeta:function(t){function e(e,i){r.push({value:e,color:t(e,i)})}for(var i=jd(this,"outOfRange",this.getExtent()),n=jd(this,"inRange",this.option.range.slice()),r=[],o=0,a=0,s=n.length,l=i.length;l>a&&(!n.length||i[a]<=n[0]);a++)i[a]o;o++,h=0)h&&r.length&&e(n[o],"outOfRange"),e(n[o],"inRange");for(var h=1;l>a;a++)(!n.length||n[n.length-1]o;o++){var a=t[0]+r*o;if(a>t[1])break;n.push({color:this.getControllerVisual(a,"color",e),offset:o/i})}return n.push({color:this.getControllerVisual(t[1],"color",e),offset:1}),n},_createBarPoints:function(t,e){var i=this.visualMapModel.itemSize;return[[i[0]-e[0],t[0]],[i[0],t[0]],[i[0],t[1]],[i[0]-e[1],t[1]]]},_createBarGroup:function(t){var e=this._orient,i=this.visualMapModel.get("inverse");return new ag("horizontal"!==e||i?"horizontal"===e&&i?{scale:"bottom"===t?[-1,1]:[1,1],rotation:-Math.PI/2}:"vertical"!==e||i?{scale:"left"===t?[1,1]:[-1,1]}:{scale:"left"===t?[1,-1]:[-1,-1]}:{scale:"bottom"===t?[1,1]:[-1,1],rotation:Math.PI/2})},_updateHandle:function(t,e){if(this._useHandle){var i=this._shapes,n=this.visualMapModel,r=i.handleThumbs,o=i.handleLabels;dM([0,1],function(a){var s=r[a];s.setStyle("fill",e.handlesColor[a]),s.position[1]=t[a];var l=bo(i.handleLabelPoints[a],wo(s,this.group));o[a].setStyle({x:l[0],y:l[1],text:n.formatValueText(this._dataInterval[a]),textVerticalAlign:"middle",textAlign:this._applyTransform("horizontal"===this._orient?0===a?"bottom":"top":"left",i.barGroup)})},this)}},_showIndicator:function(t,e,i,n){var r=this.visualMapModel,o=r.getExtent(),a=r.itemSize,s=[0,a[1]],l=cM(t,o,s,!0),h=this._shapes,u=h.indicator;if(u){u.position[1]=l,u.attr("invisible",!1),u.setShape("points",tf(!!i,n,l,a[1]));var c={convertOpacityToAlpha:!0},d=this.getControllerVisual(t,"color",c);u.setStyle("fill",d);var f=bo(h.indicatorLabelPoint,wo(u,this.group)),g=h.indicatorLabel;g.attr("invisible",!1);var p=this._applyTransform("left",h.barGroup),v=this._orient;g.setStyle({text:(i?i:"")+r.formatValueText(e),textVerticalAlign:"horizontal"===v?p:"middle",textAlign:"horizontal"===v?"center":p,x:f[0],y:f[1]})}},_enableHoverLinkToSeries:function(){var t=this;this._shapes.barGroup.on("mousemove",function(e){if(t._hovering=!0,!t._dragging){var i=t.visualMapModel.itemSize,n=t._applyTransform([e.offsetX,e.offsetY],t._shapes.barGroup,!0,!0);n[1]=fM(gM(0,n[1]),i[1]),t._doHoverLinkToSeries(n[1],0<=n[0]&&n[0]<=i[0])}}).on("mouseout",function(){t._hovering=!1,!t._dragging&&t._clearHoverLinkToSeries()})},_enableHoverLinkFromSeries:function(){var t=this.api.getZr();this.visualMapModel.option.hoverLink?(t.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),t.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},_doHoverLinkToSeries:function(t,e){var i=this.visualMapModel,n=i.itemSize;if(i.option.hoverLink){var r=[0,n[1]],o=i.getExtent();t=fM(gM(r[0],t),r[1]);var a=ef(i,o,r),s=[t-a,t+a],l=cM(t,r,o,!0),h=[cM(s[0],r,o,!0),cM(s[1],r,o,!0)];s[0]r[1]&&(h[1]=1/0),e&&(h[0]===-1/0?this._showIndicator(l,h[1],"< ",a):1/0===h[1]?this._showIndicator(l,h[0],"> ",a):this._showIndicator(l,l,"≈ ",a));var u=this._hoverLinkDataIndices,c=[];(e||nf(i))&&(c=this._hoverLinkDataIndices=i.findTargetDataIndices(h));var d=Bo(u,c);this._dispatchHighDown("downplay",Kd(d[0])),this._dispatchHighDown("highlight",Kd(d[1]))}},_hoverLinkFromSeriesMouseOver:function(t){var e=t.target,i=this.visualMapModel;if(e&&null!=e.dataIndex){var n=this.ecModel.getSeriesByIndex(e.seriesIndex);if(i.isTargetSeries(n)){var r=n.getData(e.dataType),o=r.getDimension(i.getDataDimension(r)),a=r.get(o,e.dataIndex,!0);isNaN(a)||this._showIndicator(a,a)}}},_hideIndicator:function(){var t=this._shapes;t.indicator&&t.indicator.attr("invisible",!0),t.indicatorLabel&&t.indicatorLabel.attr("invisible",!0)},_clearHoverLinkToSeries:function(){this._hideIndicator();var t=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",Kd(t)),t.length=0},_clearHoverLinkFromSeries:function(){this._hideIndicator();var t=this.api.getZr();t.off("mouseover",this._hoverLinkFromSeriesMouseOver),t.off("mouseout",this._hideIndicator)},_applyTransform:function(t,e,i,n){var r=wo(e,n?null:this.group);return Nv[x(t)?"applyTransform":"transformDirection"](t,r,i)},_dispatchHighDown:function(t,e){e&&e.length&&this.api.dispatchAction({type:t,batch:e})},dispose:function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},remove:function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()}}),yM={type:"selectDataRange",event:"dataRangeSelected",update:"update"};hs(yM,function(t,e){e.eachComponent({mainType:"visualMap",query:t},function(e){e.setSelected(t.selected)})}),as(jb);{var xM=sM.extend({type:"visualMap.piecewise",defaultOption:{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieceList:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0,showLabel:null},optionUpdated:function(t,e){xM.superApply(this,"optionUpdated",arguments),this._pieceList=[],this.resetExtent();var i=this._mode=this._determineMode();_M[this._mode].call(this),this._resetSelected(t,e);var r=this.option.categories;this.resetVisual(function(t,e){"categories"===i?(t.mappingMethod="category",t.categories=n(r)):(t.dataExtent=this.getExtent(),t.mappingMethod="piecewise",t.pieceList=g(this._pieceList,function(t){var t=n(t);return"inRange"!==e&&(t.visual=null),t}))})},completeVisualOption:function(){function t(t,e,i){return t&&t[e]&&(b(t[e])?t[e].hasOwnProperty(i):t[e]===i)}var e=this.option,i={},n=aw.listVisualTypes(),r=this.isCategory();f(e.pieces,function(t){f(n,function(e){t.hasOwnProperty(e)&&(i[e]=1)})}),f(i,function(i,n){var o=0;f(this.stateList,function(i){o|=t(e,i,n)||t(e.target,i,n)},this),!o&&f(this.stateList,function(t){(e[t]||(e[t]={}))[n]=Kb.get(n,"inRange"===t?"active":"inactive",r)})},this),sM.prototype.completeVisualOption.apply(this,arguments)},_resetSelected:function(t,e){var i=this.option,n=this._pieceList,r=(e?i:t).selected||{};if(i.selected=r,f(n,function(t){var e=this.getSelectedMapKey(t);r.hasOwnProperty(e)||(r[e]=!0)},this),"single"===i.selectedMode){var o=!1;f(n,function(t){var e=this.getSelectedMapKey(t);r[e]&&(o?r[e]=!1:o=!0)},this)}},getSelectedMapKey:function(t){return"categories"===this._mode?t.value+"":t.index+""},getPieceList:function(){return this._pieceList},_determineMode:function(){var t=this.option;return t.pieces&&t.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},setSelected:function(t){this.option.selected=n(t)},getValueState:function(t){var e=aw.findPieceIndex(t,this._pieceList);return null!=e&&this.option.selected[this.getSelectedMapKey(this._pieceList[e])]?"inRange":"outOfRange"},findTargetDataIndices:function(t){var e=[];return this.eachTargetSeries(function(i){var n=[],r=i.getData();r.each(this.getDataDimension(r),function(e,i){var r=aw.findPieceIndex(e,this._pieceList);r===t&&n.push(i)},!0,this),e.push({seriesId:i.id,dataIndex:n})},this),e},getRepresentValue:function(t){var e;if(this.isCategory())e=t.value;else if(null!=t.value)e=t.value;else{var i=t.interval||[];e=i[0]===-1/0&&1/0===i[1]?0:(i[0]+i[1])/2}return e},getVisualMeta:function(t){function e(e,o){var a=r.getRepresentValue({interval:e});o||(o=r.getValueState(a));var s=t(a,o);e[0]===-1/0?n[0]=s:1/0===e[1]?n[1]=s:i.push({value:e[0],color:s},{value:e[1],color:s})}if(!this.isCategory()){var i=[],n=[],r=this,o=this._pieceList.slice();if(o.length){var a=o[0].interval[0];a!==-1/0&&o.unshift({interval:[-1/0,a]}),a=o[o.length-1].interval[1],1/0!==a&&o.push({interval:[a,1/0]})}else o.push({interval:[-1/0,1/0]});var s=-1/0;return f(o,function(t){var i=t.interval;i&&(i[0]>s&&e([s,i[0]],"outOfRange"),e(i.slice()),s=i[1])},this),{stops:i,outerColors:n}}}}),_M={splitNumber:function(){var t=this.option,e=this._pieceList,i=Math.min(t.precision,20),n=this.getExtent(),r=t.splitNumber;r=Math.max(parseInt(r,10),1),t.splitNumber=r;for(var o=(n[1]-n[0])/r;+o.toFixed(i)!==o&&5>i;)i++;t.precision=i,o=+o.toFixed(i);var a=0;t.minOpen&&e.push({index:a++,interval:[-1/0,n[0]],close:[0,0]});for(var s=n[0],l=a+r;l>a;s+=o){var h=a===r-1?n[1]:s+o;e.push({index:a++,interval:[s,h],close:[1,1]})}t.maxOpen&&e.push({index:a++,interval:[n[1],1/0],close:[0,0]}),On(e),f(e,function(t){t.text=this.formatValueText(t.interval)},this)},categories:function(){var t=this.option;f(t.categories,function(t){this._pieceList.push({text:this.formatValueText(t,!0),value:t})},this),of(t,this._pieceList)},pieces:function(){var t=this.option,e=this._pieceList;f(t.pieces,function(t,i){b(t)||(t={value:t});var n={text:"",index:i};if(null!=t.label&&(n.text=t.label),t.hasOwnProperty("value")){var r=n.value=t.value;n.interval=[r,r],n.close=[1,1]}else{for(var o=n.interval=[],a=n.close=[0,0],s=[1,0,1],l=[-1/0,1/0],h=[],u=0;2>u;u++){for(var c=[["gte","gt","min"],["lte","lt","max"]][u],d=0;3>d&&null==o[u];d++)o[u]=t[c[d]],a[u]=s[d],h[u]=2===d;null==o[u]&&(o[u]=l[u])}h[0]&&1/0===o[1]&&(a[0]=0),h[1]&&o[0]===-1/0&&(a[1]=0),o[0]===o[1]&&a[0]&&a[1]&&(n.value=o[0])}n.visual=aw.retrieveVisuals(t),e.push(n)},this),of(t,e),On(e),f(e,function(t){var e=t.close,i=[["<","≤"][e[1]],[">","≥"][e[0]]];t.text=t.text||this.formatValueText(null!=t.value?t.value:t.interval,!1,i)},this)}};uM.extend({type:"visualMap.piecewise",doRender:function(){function t(t){var r=t.piece,h=new ag;h.onclick=m(this._onItemClick,this,r),this._enableHoverLink(h,t.indexInModelPieceList);var u=i.getRepresentValue(r);if(this._createItemSymbol(h,u,[0,0,l[0],l[1]]),c){var d=this.visualMapModel.getValueState(u);h.add(new dv({style:{x:"right"===s?-n:l[0]+n,y:l[1]/2,text:r.text,textVerticalAlign:"middle",textAlign:s,textFont:o,textFill:a,opacity:"outOfRange"===d?.5:1}}))}e.add(h)}var e=this.group;e.removeAll();var i=this.visualMapModel,n=i.get("textGap"),r=i.textStyleModel,o=r.getFont(),a=r.getTextColor(),s=this._getItemAlign(),l=i.itemSize,h=this._getViewData(),u=h.endsText,c=T(i.get("showLabel",!0),!u);u&&this._renderEndsText(e,u[0],l,c,s),f(h.viewPieceList,t,this),u&&this._renderEndsText(e,u[1],l,c,s),Qv(i.get("orient"),e,i.get("itemGap")),this.renderBackground(e),this.positionGroup(e)},_enableHoverLink:function(t,e){function i(t){var i=this.visualMapModel;i.option.hoverLink&&this.api.dispatchAction({type:t,batch:Kd(i.findTargetDataIndices(e))})}t.on("mouseover",m(i,this,"highlight")).on("mouseout",m(i,this,"downplay"))},_getItemAlign:function(){var t=this.visualMapModel,e=t.option;if("vertical"===e.orient)return $d(t,this.api,t.itemSize);var i=e.align;return i&&"auto"!==i||(i="left"),i},_renderEndsText:function(t,e,i,n,r){if(e){var o=new ag,a=this.visualMapModel.textStyleModel;o.add(new dv({style:{x:n?"right"===r?i[0]:0:i[0]/2,y:i[1]/2,textVerticalAlign:"middle",textAlign:n?r:"center",text:e,textFont:a.getFont(),textFill:a.getTextColor()}})),t.add(o)}},_getViewData:function(){var t=this.visualMapModel,e=g(t.getPieceList(),function(t,e){return{piece:t,indexInModelPieceList:e}}),i=t.get("text"),n=t.get("orient"),r=t.get("inverse");return("horizontal"===n?r:!r)?e.reverse():i&&(i=i.slice().reverse()),{viewPieceList:e,endsText:i}},_createItemSymbol:function(t,e,i){t.add(Sl(this.getControllerVisual(e,"symbol"),i[0],i[1],i[2],i[3],this.getControllerVisual(e,"color")))},_onItemClick:function(t){var e=this.visualMapModel,i=e.option,r=n(i.selected),o=e.getSelectedMapKey(t);"single"===i.selectedMode?(r[o]=!0,f(r,function(t,e){r[e]=e===o})):r[o]=!r[o],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:r})}})}as(jb),t.version=Wm,t.dependencies=Hm,t.PRIORITY=jm,t.init=Ja,t.connect=ts,t.disConnect=es,t.disconnect=my,t.dispose=is,t.getInstanceByDom=ns,t.getInstanceById=rs,t.registerTheme=os,t.registerPreprocessor=as,t.registerProcessor=ss,t.registerPostUpdate=ls,t.registerAction=hs,t.registerCoordinateSystem=us,t.getCoordinateSystemDimensions=cs,t.registerLayout=ds,t.registerVisual=fs,t.registerLoading=gs,t.extendComponentModel=ps,t.extendComponentView=vs,t.extendSeriesModel=ms,t.extendChartView=ys,t.setCanvasCreator=xs,t.registerMap=_s,t.getMap=ws,t.dataTool=yy});