!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.]+)/),o=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),r=t.match(/Edge\/([\d.]+)/),a=/micromessenger/i.test(t);return n&&(i.firefox=!0,i.version=n[1]),o&&(i.ie=!0,i.version=o[1]),r&&(i.edge=!0,i.version=r[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){Tf[t]=e}function n(t){if(null==t||"object"!=typeof t)return t;var e=t,i=xf.call(t);if("[object Array]"===i){e=[];for(var o=0,r=t.length;r>o;o++)e[o]=n(t[o])}else if(yf[i]){var a=t.constructor;if(t.constructor.from)e=a.from(t);else{e=new a(t.length);for(var o=0,r=t.length;r>o;o++)e[o]=n(t[o])}}else if(!mf[i]&&!z(t)&&!I(t)){e={};for(var s in t)t.hasOwnProperty(s)&&(e[s]=n(t[s]))}return e}function o(t,e,i){if(!S(e)||!S(t))return i?n(e):t;for(var r in e)if(e.hasOwnProperty(r)){var a=t[r],s=e[r];!S(s)||!S(a)||_(s)||_(a)||I(s)||I(a)||M(s)||M(a)||z(s)||z(a)?!i&&r in t||(t[r]=n(e[r],!0)):o(a,s,i)}return t}function r(t,e){for(var i=t[0],n=1,r=t.length;r>n;n++)i=o(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 Cf||(Cf=Af().getContext("2d")),Cf}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 o in n)t.prototype[o]=n[o];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===wf)t.forEach(e,i);else if(t.length===+t.length)for(var n=0,o=t.length;o>n;n++)e.call(i,t[n],n,t);else for(var r in t)t.hasOwnProperty(r)&&e.call(i,t[r],r,t)}function p(t,e,i){if(t&&e){if(t.map&&t.map===Mf)return t.map(e,i);for(var n=[],o=0,r=t.length;r>o;o++)n.push(e.call(i,t[o],o,t));return n}}function g(t,e,i,n){if(t&&e){if(t.reduce&&t.reduce===If)return t.reduce(e,i,n);for(var o=0,r=t.length;r>o;o++)i=e.call(n,i,t[o],o,t);return i}}function v(t,e,i){if(t&&e){if(t.filter&&t.filter===bf)return t.filter(e,i);for(var n=[],o=0,r=t.length;r>o;o++)e.call(i,t[o],o,t)&&n.push(t[o]);return n}}function m(t,e,i){if(t&&e)for(var n=0,o=t.length;o>n;n++)if(e.call(i,t[n],n,t))return t[n]}function y(t,e){var i=Sf.call(arguments,2);return function(){return t.apply(e,i.concat(Sf.call(arguments)))}}function x(t){var e=Sf.call(arguments,1);return function(){return t.apply(this,e.concat(Sf.call(arguments)))}}function _(t){return"[object Array]"===xf.call(t)}function w(t){return"function"==typeof t}function b(t){return"[object String]"===xf.call(t)}function S(t){var e=typeof t;return"function"===e||!!t&&"object"==e}function M(t){return!!mf[xf.call(t)]}function I(t){return"object"==typeof t&&"number"==typeof t.nodeType&&"object"==typeof t.ownerDocument}function T(t){return t!==t}function A(){for(var t=0,e=arguments.length;e>t;t++)if(null!=arguments[t])return arguments[t]}function C(t,e){return null!=t?t:e}function D(t,e,i){return null!=t?t:null!=e?e:i}function L(){return Function.call.apply(Sf,arguments)}function P(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 O(t){t[Df]=!0}function z(t){return t[Df]}function R(t){t&&f(t,function(t,e){this.set(e,t)},this)}function E(t){return new R(t)}function B(){}function V(t,e){var i=new Of(2);return null==t&&(t=0),null==e&&(e=0),i[0]=t,i[1]=e,i}function N(t,e){return t[0]=e[0],t[1]=e[1],t}function F(t){var e=new Of(2);return e[0]=t[0],e[1]=t[1],e}function G(t,e,i){return t[0]=e,t[1]=i,t}function H(t,e,i){return t[0]=e[0]+i[0],t[1]=e[1]+i[1],t}function W(t,e,i,n){return t[0]=e[0]+i[0]*n,t[1]=e[1]+i[1]*n,t}function Z(t,e,i){return t[0]=e[0]-i[0],t[1]=e[1]-i[1],t}function U(t){return Math.sqrt(X(t))}function X(t){return t[0]*t[0]+t[1]*t[1]}function q(t,e,i){return t[0]=e[0]*i[0],t[1]=e[1]*i[1],t}function Y(t,e,i){return t[0]=e[0]/i[0],t[1]=e[1]/i[1],t}function j(t,e){return t[0]*e[0]+t[1]*e[1]}function $(t,e,i){return t[0]=e[0]*i,t[1]=e[1]*i,t}function K(t,e){var i=U(e);return 0===i?(t[0]=0,t[1]=0):(t[0]=e[0]/i,t[1]=e[1]/i),t}function J(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}function Q(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])}function te(t,e){return t[0]=-e[0],t[1]=-e[1],t}function ee(t,e,i,n){return t[0]=e[0]+n*(i[0]-e[0]),t[1]=e[1]+n*(i[1]-e[1]),t}function ie(t,e,i){var n=e[0],o=e[1];return t[0]=i[0]*n+i[2]*o+i[4],t[1]=i[1]*n+i[3]*o+i[5],t}function ne(t,e,i){return t[0]=Math.min(e[0],i[0]),t[1]=Math.min(e[1],i[1]),t}function oe(t,e,i){return t[0]=Math.max(e[0],i[0]),t[1]=Math.max(e[1],i[1]),t}function re(){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 ae(t,e){return{target:t,topTarget:e&&e.topTarget}}function se(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 le(){}function he(t,e,i){if(t[t.rectHover?"rectContain":"contain"](e,i)){for(var n,o=t;o;){if(o.clipPath&&!o.clipPath.contain(e,i))return!1;o.silent&&(n=!0),o=o.parent}return n?Gf:!0}return!1}function ue(){var t=new Zf(6);return ce(t),t}function ce(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function de(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 fe(t,e,i){var n=e[0]*i[0]+e[2]*i[1],o=e[1]*i[0]+e[3]*i[1],r=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]=o,t[2]=r,t[3]=a,t[4]=s,t[5]=l,t}function pe(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 ge(t,e,i){var n=e[0],o=e[2],r=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]=o*u+s*h,t[3]=-o*h+u*s,t[4]=u*r+h*l,t[5]=u*l-h*r,t}function ve(t,e,i){var n=i[0],o=i[1];return t[0]=e[0]*n,t[1]=e[1]*o,t[2]=e[2]*n,t[3]=e[3]*o,t[4]=e[4]*n,t[5]=e[5]*o,t}function me(t,e){var i=e[0],n=e[2],o=e[4],r=e[1],a=e[3],s=e[5],l=i*a-r*n;return l?(l=1/l,t[0]=a*l,t[1]=-r*l,t[2]=-n*l,t[3]=i*l,t[4]=(n*s-a*o)*l,t[5]=(r*o-i*s)*l,t):null}function ye(t){return t>qf||-qf>t}function xe(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 _e(t){return t=Math.round(t),0>t?0:t>255?255:t}function we(t){return t=Math.round(t),0>t?0:t>360?360:t}function be(t){return 0>t?0:t>1?1:t}function Se(t){return _e(t.length&&"%"===t.charAt(t.length-1)?parseFloat(t)/100*255:parseInt(t,10))}function Me(t){return be(t.length&&"%"===t.charAt(t.length-1)?parseFloat(t)/100:parseFloat(t))}function Ie(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 Te(t,e,i){return t+(e-t)*i}function Ae(t,e,i,n,o){return t[0]=e,t[1]=i,t[2]=n,t[3]=o,t}function Ce(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function De(t,e){rp&&Ce(rp,e),rp=op.put(t,rp||e.slice())}function Le(t,e){if(t){e=e||[];var i=op.get(t);if(i)return Ce(e,i);t+="";var n=t.replace(/ /g,"").toLowerCase();if(n in np)return Ce(e,np[n]),De(t,e),e;if("#"!==n.charAt(0)){var o=n.indexOf("("),r=n.indexOf(")");if(-1!==o&&r+1===n.length){var a=n.substr(0,o),s=n.substr(o+1,r-(o+1)).split(","),l=1;switch(a){case"rgba":if(4!==s.length)return void Ae(e,0,0,0,1);l=Me(s.pop());case"rgb":return 3!==s.length?void Ae(e,0,0,0,1):(Ae(e,Se(s[0]),Se(s[1]),Se(s[2]),l),De(t,e),e);case"hsla":return 4!==s.length?void Ae(e,0,0,0,1):(s[3]=Me(s[3]),Pe(s,e),De(t,e),e);case"hsl":return 3!==s.length?void Ae(e,0,0,0,1):(Pe(s,e),De(t,e),e);default:return}}Ae(e,0,0,0,1)}else{if(4===n.length){var h=parseInt(n.substr(1),16);return h>=0&&4095>=h?(Ae(e,(3840&h)>>4|(3840&h)>>8,240&h|(240&h)>>4,15&h|(15&h)<<4,1),De(t,e),e):void Ae(e,0,0,0,1)}if(7===n.length){var h=parseInt(n.substr(1),16);return h>=0&&16777215>=h?(Ae(e,(16711680&h)>>16,(65280&h)>>8,255&h,1),De(t,e),e):void Ae(e,0,0,0,1)}}}}function Pe(t,e){var i=(parseFloat(t[0])%360+360)%360/360,n=Me(t[1]),o=Me(t[2]),r=.5>=o?o*(n+1):o+n-o*n,a=2*o-r;return e=e||[],Ae(e,_e(255*Ie(a,r,i+1/3)),_e(255*Ie(a,r,i)),_e(255*Ie(a,r,i-1/3)),1),4===t.length&&(e[3]=t[3]),e}function ke(t){if(t){var e,i,n=t[0]/255,o=t[1]/255,r=t[2]/255,a=Math.min(n,o,r),s=Math.max(n,o,r),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-o)/6+l/2)/l,d=((s-r)/6+l/2)/l;n===s?e=d-c:o===s?e=1/3+u-d:r===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 Oe(t,e){var i=Le(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 Ne(i,4===i.length?"rgba":"rgb")}}function ze(t){var e=Le(t);return e?((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1):void 0}function Re(t,e,i){if(e&&e.length&&t>=0&&1>=t){i=i||[];var n=t*(e.length-1),o=Math.floor(n),r=Math.ceil(n),a=e[o],s=e[r],l=n-o;return i[0]=_e(Te(a[0],s[0],l)),i[1]=_e(Te(a[1],s[1],l)),i[2]=_e(Te(a[2],s[2],l)),i[3]=be(Te(a[3],s[3],l)),i}}function Ee(t,e,i){if(e&&e.length&&t>=0&&1>=t){var n=t*(e.length-1),o=Math.floor(n),r=Math.ceil(n),a=Le(e[o]),s=Le(e[r]),l=n-o,h=Ne([_e(Te(a[0],s[0],l)),_e(Te(a[1],s[1],l)),_e(Te(a[2],s[2],l)),be(Te(a[3],s[3],l))],"rgba");return i?{color:h,leftIndex:o,rightIndex:r,value:n}:h}}function Be(t,e,i,n){return t=Le(t),t?(t=ke(t),null!=e&&(t[0]=we(e)),null!=i&&(t[1]=Me(i)),null!=n&&(t[2]=Me(n)),Ne(Pe(t),"rgba")):void 0}function Ve(t,e){return t=Le(t),t&&null!=e?(t[3]=be(e),Ne(t,"rgba")):void 0}function Ne(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 Fe(t,e){return t[e]}function Ge(t,e,i){t[e]=i}function He(t,e,i){return(e-t)*i+t}function We(t,e,i){return i>.5?e:t}function Ze(t,e,i,n,o){var r=t.length;if(1==o)for(var a=0;r>a;a++)n[a]=He(t[a],e[a],i);else for(var s=r&&t[0].length,a=0;r>a;a++)for(var l=0;s>l;l++)n[a][l]=He(t[a][l],e[a][l],i)}function Ue(t,e,i){var n=t.length,o=e.length;if(n!==o){var r=n>o;if(r)t.length=o;else for(var a=n;o>a;a++)t.push(1===i?e[a]:hp.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 Xe(t,e,i){if(t===e)return!0;var n=t.length;if(n!==e.length)return!1;if(1===i){for(var o=0;n>o;o++)if(t[o]!==e[o])return!1}else for(var r=t[0].length,o=0;n>o;o++)for(var a=0;r>a;a++)if(t[o][a]!==e[o][a])return!1;return!0}function qe(t,e,i,n,o,r,a,s,l){var h=t.length;if(1==l)for(var u=0;h>u;u++)s[u]=Ye(t[u],e[u],i[u],n[u],o,r,a);else for(var c=t[0].length,u=0;h>u;u++)for(var d=0;c>d;d++)s[u][d]=Ye(t[u][d],e[u][d],i[u][d],n[u][d],o,r,a)}function Ye(t,e,i,n,o,r,a){var s=.5*(i-t),l=.5*(n-e);return(2*(e-i)+s+l)*a+(-3*(e-i)-2*s-l)*r+s*o+e}function je(t){if(d(t)){var e=t.length;if(d(t[0])){for(var i=[],n=0;e>n;n++)i.push(hp.call(t[n]));return i}return hp.call(t)}return t}function $e(t){return t[0]=Math.floor(t[0]),t[1]=Math.floor(t[1]),t[2]=Math.floor(t[2]),"rgba("+t.join(",")+")"}function Ke(t){var e=t[t.length-1].value;return d(e&&e[0])?2:1}function Je(t,e,i,n,o,r){var a=t._getter,s=t._setter,l="spline"===e,h=n.length;if(h){var u,c=n[0].value,f=d(c),p=!1,g=!1,v=f?Ke(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&&Xe(b,x,v)||!f&&b===x||(_=!1),x=b,"string"==typeof b){var S=Le(b);S?(b=S,p=!0):g=!0}y.push(b)}if(r||!_){for(var M=y[h-1],w=0;h-1>w;w++)f?Ue(y[w],M,v):!isNaN(y[w])||isNaN(M)||g||p||(y[w]=M);f&&Ue(a(t._target,o),M,v);var I,T,A,C,D,L,P=0,k=0;if(p)var O=[0,0,0,0];var z=function(t,e){var i;if(0>e)i=0;else if(k>e){for(I=Math.min(P+1,h-1),i=I;i>=0&&!(m[i]<=e);i--);i=Math.min(i,h-2)}else{for(i=P;h>i&&!(m[i]>e);i++);i=Math.min(i-1,h-2)}P=i,k=e;var n=m[i+1]-m[i];if(0!==n)if(T=(e-m[i])/n,l)if(C=y[i],A=y[0===i?i:i-1],D=y[i>h-2?h-1:i+1],L=y[i>h-3?h-1:i+2],f)qe(A,C,D,L,T,T*T,T*T*T,a(t,o),v);else{var r;if(p)r=qe(A,C,D,L,T,T*T,T*T*T,O,1),r=$e(O);else{if(g)return We(C,D,T);r=Ye(A,C,D,L,T,T*T,T*T*T)}s(t,o,r)}else if(f)Ze(y[i],y[i+1],T,a(t,o),v);else{var r;if(p)Ze(y[i],y[i+1],T,O,1),r=$e(O);else{if(g)return We(y[i],y[i+1],T);r=He(y[i],y[i+1],T)}s(t,o,r)}},R=new xe({target:t._target,life:u,loop:t._loop,delay:t._delay,onframe:z,ondestroy:i});return e&&"spline"!==e&&(R.easing=e),R}}}function Qe(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 ti(t){for(var e=0;t>=bp;)e|=1&t,t>>=1;return t+e}function ei(t,e,i,n){var o=e+1;if(o===i)return 1;if(n(t[o++],t[e])<0){for(;i>o&&n(t[o],t[o-1])<0;)o++;ii(t,e,o)}else for(;i>o&&n(t[o],t[o-1])>=0;)o++;return o-e}function ii(t,e,i){for(i--;i>e;){var n=t[e];t[e++]=t[i],t[i--]=n}}function ni(t,e,i,n,o){for(n===e&&n++;i>n;n++){for(var r,a=t[n],s=e,l=n;l>s;)r=s+l>>>1,o(a,t[r])<0?l=r:s=r+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 oi(t,e,i,n,o,r){var a=0,s=0,l=1;if(r(t,e[i+o])>0){for(s=n-o;s>l&&r(t,e[i+o+l])>0;)a=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s),a+=o,l+=o}else{for(s=o+1;s>l&&r(t,e[i+o-l])<=0;)a=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s);var h=a;a=o-l,l=o-h}for(a++;l>a;){var u=a+(l-a>>>1);r(t,e[i+u])>0?a=u+1:l=u}return l}function ri(t,e,i,n,o,r){var a=0,s=0,l=1;if(r(t,e[i+o])<0){for(s=o+1;s>l&&r(t,e[i+o-l])<0;)a=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s);var h=a;a=o-l,l=o-h}else{for(s=n-o;s>l&&r(t,e[i+o+l])>=0;)a=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s),a+=o,l+=o}for(a++;l>a;){var u=a+(l-a>>>1);r(t,e[i+u])<0?l=u:a=u+1}return l}function ai(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;r(t)}}function o(){for(;c>1;){var t=c-2;t>0&&h[t-1]=o?a(n,o,r,u):s(n,o,r,u)))}function a(i,n,o,r){var a=0;for(a=0;n>a;a++)d[a]=t[i+a];var s=0,l=o,h=i;if(t[h++]=t[l++],0!==--r){if(1===n){for(a=0;r>a;a++)t[h+a]=t[l+a];return void(t[h+r]=d[s])}for(var c,f,p,g=u;;){c=0,f=0,p=!1;do if(e(t[l],d[s])<0){if(t[h++]=t[l++],f++,c=0,0===--r){p=!0;break}}else if(t[h++]=d[s++],c++,f=0,1===--n){p=!0;break}while(g>(c|f));if(p)break;do{if(c=ri(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){p=!0;break}}if(t[h++]=t[l++],0===--r){p=!0;break}if(f=oi(d[s],t,l,r,0,e),0!==f){for(a=0;f>a;a++)t[h+a]=t[l+a];if(h+=f,l+=f,r-=f,0===r){p=!0;break}}if(t[h++]=d[s++],1===--n){p=!0;break}g--}while(c>=Sp||f>=Sp);if(p)break;0>g&&(g=0),g+=2}if(u=g,1>u&&(u=1),1===n){for(a=0;r>a;a++)t[h+a]=t[l+a];t[h+r]=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,o,r){var a=0;for(a=0;r>a;a++)d[a]=t[o+a];var s=i+n-1,l=r-1,h=o+r-1,c=0,f=0;if(t[h--]=t[s--],0!==--n){if(1===r){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 p=u;;){var g=0,v=0,m=!1;do if(e(d[l],t[s])<0){if(t[h--]=t[s--],g++,v=0,0===--n){m=!0;break}}else if(t[h--]=d[l--],v++,g=0,1===--r){m=!0;break}while(p>(g|v));if(m)break;do{if(g=n-ri(d[l],t,i,n,n-1,e),0!==g){for(h-=g,s-=g,n-=g,f=h+1,c=s+1,a=g-1;a>=0;a--)t[f+a]=t[c+a];if(0===n){m=!0;break}}if(t[h--]=d[l--],1===--r){m=!0;break}if(v=r-oi(t[s],d,0,r,r-1,e),0!==v){for(h-=v,l-=v,r-=v,f=h+1,c=l+1,a=0;v>a;a++)t[f+a]=d[c+a];if(1>=r){m=!0;break}}if(t[h--]=t[s--],0===--n){m=!0;break}p--}while(g>=Sp||v>=Sp);if(m)break;0>p&&(p=0),p+=2}if(u=p,1>u&&(u=1),1===r){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===r)throw new Error;for(c=h-(r-1),a=0;r>a;a++)t[c+a]=d[a]}}else for(c=h-(r-1),a=0;r>a;a++)t[c+a]=d[a]}var l,h,u=Sp,c=0,d=[];l=[],h=[],this.mergeRuns=n,this.forceMergeRuns=o,this.pushRun=i}function si(t,e,i,n){i||(i=0),n||(n=t.length);var o=n-i;if(!(2>o)){var r=0;if(bp>o)return r=ei(t,i,n,e),void ni(t,i,n,i+r,e);var a=new ai(t,e),s=ti(o);do{if(r=ei(t,i,n,e),s>r){var l=o;l>s&&(l=s),ni(t,i,i+l,i+r,e),r=l}a.pushRun(i,r),a.mergeRuns(),o-=r,i+=r}while(0!==o);a.forceMergeRuns()}}function li(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}function hi(t,e,i){var n=null==e.x?0:e.x,o=null==e.x2?1:e.x2,r=null==e.y?0:e.y,a=null==e.y2?0:e.y2;e.global||(n=n*i.width+i.x,o=o*i.width+i.x,r=r*i.height+i.y,a=a*i.height+i.y);var s=t.createLinearGradient(n,r,o,a);return s}function ui(t,e,i){var n=i.width,o=i.height,r=Math.min(n,o),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*o+i.y,l*=r);var h=t.createRadialGradient(a,s,0,a,s,l);return h}function ci(){return!1}function di(t,e,i){var n=Af(),o=e.getWidth(),r=e.getHeight(),a=n.style;return a.position="absolute",a.left=0,a.top=0,a.width=o+"px",a.height=r+"px",n.width=o*i,n.height=r*i,n.setAttribute("data-zr-dom-id",t),n}function fi(t){if("string"==typeof t){var e=Op.get(t);return e&&e.image}return t}function pi(t,e,i,n,o){if(t){if("string"==typeof t){if(e&&e.__zrImageSrc===t||!i)return e;var r=Op.get(t),a={hostEl:i,cb:n,cbPayload:o};return r?(e=r.image,!vi(e)&&r.pending.push(a)):(!e&&(e=new Image),e.onload=gi,Op.put(t,e.__cachedImgObj={image:e,pending:[a]}),e.src=e.__zrImageSrc=t),e}return t}return e}function gi(){var t=this.__cachedImgObj;this.onload=this.__cachedImgObj=null;for(var e=0;er;r++)o=Math.max(Di(n[r],e).width,o);return Rp>Ep&&(Rp=0,zp={}),Rp++,zp[i]=o,o}function yi(t,e,i,n,o,r,a){return r?_i(t,e,i,n,o,r,a):xi(t,e,i,n,o,a)}function xi(t,e,i,n,o,r){var a=Li(t,e,o,r),s=mi(t,e);o&&(s+=o[1]+o[3]);var l=a.outerHeight,h=wi(0,s,i),u=bi(0,l,n),c=new Qe(h,u,s,l);return c.lineHeight=a.lineHeight,c}function _i(t,e,i,n,o,r,a){var s=Pi(t,{rich:r,truncate:a,font:e,textAlign:i,textPadding:o}),l=s.outerWidth,h=s.outerHeight,u=wi(0,l,i),c=bi(0,h,n);return new Qe(u,c,l,h)}function wi(t,e,i){return"right"===i?t-=e:"center"===i&&(t-=e/2),t}function bi(t,e,i){return"middle"===i?t-=e/2:"bottom"===i&&(t-=e),t}function Si(t,e,i){var n=e.x,o=e.y,r=e.height,a=e.width,s=r/2,l="left",h="top";switch(t){case"left":n-=i,o+=s,l="right",h="middle";break;case"right":n+=i+a,o+=s,h="middle";break;case"top":n+=a/2,o-=i,l="center",h="bottom";break;case"bottom":n+=a/2,o+=r+i,l="center";break;case"inside":n+=a/2,o+=s,l="center",h="middle";break;case"insideLeft":n+=i,o+=s,h="middle";break;case"insideRight":n+=a-i,o+=s,l="right",h="middle";break;case"insideTop":n+=a/2,o+=i,l="center";break;case"insideBottom":n+=a/2,o+=r-i,l="center",h="bottom";break;case"insideTopLeft":n+=i,o+=i;break;case"insideTopRight":n+=a-i,o+=i,l="right";break;case"insideBottomLeft":n+=i,o+=r-i,h="bottom";break;case"insideBottomRight":n+=a-i,o+=r-i,l="right",h="bottom"}return{x:n,y:o,textAlign:l,textVerticalAlign:h}}function Mi(t,e,i,n,o){if(!e)return"";var r=(t+"").split("\n");o=Ii(e,i,n,o);for(var a=0,s=r.length;s>a;a++)r[a]=Ti(r[a],o);return r.join("\n")}function Ii(t,e,i,n){n=a({},n),n.font=e;var i=C(i,"...");n.maxIterations=C(n.maxIterations,2);var o=n.minChar=C(n.minChar,0);n.cnCharWidth=mi("国",e);var r=n.ascCharWidth=mi("a",e);n.placeholder=C(n.placeholder,"");for(var s=t=Math.max(0,t-1),l=0;o>l&&s>=r;l++)s-=r;var h=mi(i);return h>s&&(i="",h=0),s=t-h,n.ellipsis=i,n.ellipsisWidth=h,n.contentWidth=s,n.containerWidth=t,n}function Ti(t,e){var i=e.containerWidth,n=e.font,o=e.contentWidth;if(!i)return"";var r=mi(t,n);if(i>=r)return t;for(var a=0;;a++){if(o>=r||a>=e.maxIterations){t+=e.ellipsis;break}var s=0===a?Ai(t,o,e.ascCharWidth,e.cnCharWidth):r>0?Math.floor(t.length*o/r):0;t=t.substr(0,s),r=mi(t,n)}return""===t&&(t=e.placeholder),t}function Ai(t,e,i,n){for(var o=0,r=0,a=t.length;a>r&&e>o;r++){var s=t.charCodeAt(r);o+=s>=0&&127>=s?i:n}return r}function Ci(t){return mi("国",t)}function Di(t,e){return Np.measureText(t,e)}function Li(t,e,i,n){null!=t&&(t+="");var o=Ci(e),r=t?t.split("\n"):[],a=r.length*o,s=a;if(i&&(s+=i[0]+i[2]),t&&n){var l=n.outerHeight,h=n.outerWidth;if(null!=l&&s>l)t="",r=[];else if(null!=h)for(var u=Ii(h-(i?i[1]+i[3]:0),e,n.ellipsis,{minChar:n.minChar,placeholder:n.placeholder}),c=0,d=r.length;d>c;c++)r[c]=Ti(r[c],u)}return{lines:r,height:a,outerHeight:s,lineHeight:o}}function Pi(t,e){var i={lines:[],width:0,height:0};if(null!=t&&(t+=""),!t)return i;for(var n,o=Bp.lastIndex=0;null!=(n=Bp.exec(t));){var r=n.index;r>o&&ki(i,t.substring(o,r)),ki(i,n[2],n[1]),o=Bp.lastIndex}of)return{lines:[],width:0,height:0};x.textWidth=mi(x.text,b);var M=_.textWidth,I=null==M||"auto"===M;if("string"==typeof M&&"%"===M.charAt(M.length-1))x.percentWidth=M,h.push(x),M=0;else{if(I){M=x.textWidth;var T=_.textBackgroundColor,A=T&&T.image;A&&(A=fi(A),vi(A)&&(M=Math.max(M,A.width*S/A.height)))}var L=w?w[1]+w[3]:0;M+=L;var P=null!=d?d-m:null;null!=P&&M>P&&(!I||L>P?(x.text="",x.textWidth=M=0):(x.text=Mi(x.text,P-L,b,c.ellipsis,{minChar:c.minChar}),x.textWidth=mi(x.text,b),M=x.textWidth+L))}m+=x.width=M,_&&(v=Math.max(v,x.lineHeight))}g.width=m,g.lineHeight=v,s+=v,l=Math.max(l,m)}i.outerWidth=i.width=C(e.textWidth,l),i.outerHeight=i.height=C(e.textHeight,s),u&&(i.outerWidth+=u[1]+u[3],i.outerHeight+=u[0]+u[2]);for(var p=0;pl&&(a+=l,l=-l),0>h&&(s+=h,h=-h),"number"==typeof u?i=n=o=r=u:u instanceof Array?1===u.length?i=n=o=r=u[0]:2===u.length?(i=o=u[0],n=r=u[1]):3===u.length?(i=u[0],n=r=u[1],o=u[2]):(i=u[0],n=u[1],o=u[2],r=u[3]):i=n=o=r=0;var c;i+n>l&&(c=i+n,i*=l/c,n*=l/c),o+r>l&&(c=o+r,o*=l/c,r*=l/c),n+o>h&&(c=n+o,n*=h/c,o*=h/c),i+r>h&&(c=i+r,i*=h/c,r*=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-o),0!==o&&t.quadraticCurveTo(a+l,s+h,a+l-o,s+h),t.lineTo(a+r,s+h),0!==r&&t.quadraticCurveTo(a,s+h,a,s+h-r),t.lineTo(a,s+i),0!==i&&t.quadraticCurveTo(a,s,a+i,s)}function Ri(t){return Ei(t),f(t.rich,Ei),t}function Ei(t){if(t){t.font=Oi(t);var e=t.textAlign;"middle"===e&&(e="center"),t.textAlign=null==e||Fp[e]?e:"left";var i=t.textVerticalAlign||t.textBaseline;"center"===i&&(i="middle"),t.textVerticalAlign=null==i||Gp[i]?i:"top";var n=t.textPadding;n&&(t.textPadding=P(t.textPadding))}}function Bi(t,e,i,n,o){n.rich?Ni(t,e,i,n,o):Vi(t,e,i,n,o)}function Vi(t,e,i,n,o){var r=qi(e,"font",n.font||Vp),a=n.textPadding,s=t.__textCotentBlock;(!s||t.__dirty)&&(s=t.__textCotentBlock=Li(i,r,a,n.truncate));var l=s.outerHeight,h=s.lines,u=s.lineHeight,c=Xi(l,n,o),d=c.baseX,f=c.baseY,p=c.textAlign,g=c.textVerticalAlign;Gi(e,n,o,d,f);var v=bi(f,l,g),m=d,y=v,x=Wi(n);if(x||a){var _=mi(i,r),w=_;a&&(w+=a[1]+a[3]);var b=wi(d,w,p);x&&Zi(t,e,n,b,v,w,l),a&&(m=Ki(d,p,a),y+=a[0])}qi(e,"textAlign",p||"left"),qi(e,"textBaseline","middle"),qi(e,"shadowBlur",n.textShadowBlur||0),qi(e,"shadowColor",n.textShadowColor||"transparent"),qi(e,"shadowOffsetX",n.textShadowOffsetX||0),qi(e,"shadowOffsetY",n.textShadowOffsetY||0),y+=u/2;var S=n.textStrokeWidth,M=Yi(n.textStroke,S),I=ji(n.textFill);M&&(qi(e,"lineWidth",S),qi(e,"strokeStyle",M)),I&&qi(e,"fillStyle",I);for(var T=0;TT&&(_=b[T],!_.textAlign||"left"===_.textAlign);)Hi(t,e,_,n,M,m,A,"left"),I-=_.width,A+=_.width,T++;for(;D>=0&&(_=b[D],"right"===_.textAlign);)Hi(t,e,_,n,M,m,C,"right"),I-=_.width,C-=_.width,D--;for(A+=(r-(A-v)-(y-C)-I)/2;D>=T;)_=b[T],Hi(t,e,_,n,M,m,A+_.width/2,"center"),A+=_.width,T++;m+=M}}function Gi(t,e,i,n,o){if(i&&e.textRotation){var r=e.textOrigin;"center"===r?(n=i.width/2+i.x,o=i.height/2+i.y):r&&(n=r[0]+i.x,o=r[1]+i.y),t.translate(n,o),t.rotate(-e.textRotation),t.translate(-n,-o)}}function Hi(t,e,i,n,o,r,a,s){var l=n.rich[i.styleName]||{},h=i.textVerticalAlign,u=r+o/2;"top"===h?u=r+i.height/2:"bottom"===h&&(u=r+o-i.height/2),!i.isLineHolder&&Wi(l)&&Zi(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=Ki(a,s,c),u-=i.height/2-c[2]-i.textHeight/2),qi(e,"shadowBlur",D(l.textShadowBlur,n.textShadowBlur,0)),qi(e,"shadowColor",l.textShadowColor||n.textShadowColor||"transparent"),qi(e,"shadowOffsetX",D(l.textShadowOffsetX,n.textShadowOffsetX,0)),qi(e,"shadowOffsetY",D(l.textShadowOffsetY,n.textShadowOffsetY,0)),qi(e,"textAlign",s),qi(e,"textBaseline","middle"),qi(e,"font",i.font||Vp);var d=Yi(l.textStroke||n.textStroke,p),f=ji(l.textFill||n.textFill),p=C(l.textStrokeWidth,n.textStrokeWidth);d&&(qi(e,"lineWidth",p),qi(e,"strokeStyle",d),e.strokeText(i.text,a,u)),f&&(qi(e,"fillStyle",f),e.fillText(i.text,a,u))}function Wi(t){return t.textBackgroundColor||t.textBorderWidth&&t.textBorderColor}function Zi(t,e,i,n,o,r,a){var s=i.textBackgroundColor,l=i.textBorderWidth,h=i.textBorderColor,u=b(s);if(qi(e,"shadowBlur",i.textBoxShadowBlur||0),qi(e,"shadowColor",i.textBoxShadowColor||"transparent"),qi(e,"shadowOffsetX",i.textBoxShadowOffsetX||0),qi(e,"shadowOffsetY",i.textBoxShadowOffsetY||0),u||l&&h){e.beginPath();var c=i.textBorderRadius;c?zi(e,{x:n,y:o,width:r,height:a,r:c}):e.rect(n,o,r,a),e.closePath()}if(u)qi(e,"fillStyle",s),e.fill();else if(S(s)){var d=s.image;d=pi(d,null,t,Ui,s),d&&vi(d)&&e.drawImage(d,n,o,r,a)}l&&h&&(qi(e,"lineWidth",l),qi(e,"strokeStyle",h),e.stroke())}function Ui(t,e){e.image=t}function Xi(t,e,i){var n=e.x||0,o=e.y||0,r=e.textAlign,a=e.textVerticalAlign;if(i){var s=e.textPosition;if(s instanceof Array)n=i.x+$i(s[0],i.width),o=i.y+$i(s[1],i.height);else{var l=Si(s,i,e.textDistance);n=l.x,o=l.y,r=r||l.textAlign,a=a||l.textVerticalAlign}var h=e.textOffset;h&&(n+=h[0],o+=h[1])}return{baseX:n,baseY:o,textAlign:r,textVerticalAlign:a}}function qi(t,e,i){return t[e]=i,t[e]}function Yi(t,e){return null==t||0>=e||"transparent"===t||"none"===t?null:t.image||t.colorStops?"#000":t}function ji(t){return null==t||"none"===t?null:t.image||t.colorStops?"#000":t}function $i(t,e){return"string"==typeof t?t.lastIndexOf("%")>=0?parseFloat(t)/100*e:parseFloat(t):t}function Ki(t,e,i){return"right"===e?t-i[1]:"center"===e?t+i[3]/2-i[1]/2:t+i[3]}function Ji(t,e){return null!=t&&(t||e.textBackgroundColor||e.textBorderWidth&&e.textBorderColor||e.textPadding)}function Qi(t){t=t||{},mp.call(this,t);for(var e in t)t.hasOwnProperty(e)&&"style"!==e&&(this[e]=t[e]);this.style=new Tp(t.style,this),this._rect=null,this.__clipPaths=[]}function tn(t){Qi.call(this,t)}function en(t){return parseInt(t,10)}function nn(t){return t?t.__builtin__?!0:"function"!=typeof t.resize||"function"!=typeof t.refresh?!1:!0:!1}function on(t){t.__unusedCount++}function rn(t){1==t.__unusedCount&&t.clear()}function an(t,e,i){return Up.copy(t.getBoundingRect()),t.transform&&Up.applyTransform(t.transform),Xp.width=e,Xp.height=i,!Up.intersect(Xp)}function sn(t,e){if(t==e)return!1;if(!t||!e||t.length!==e.length)return!0;for(var i=0;i=0;if(o){var r="touchend"!=n?e.targetTouches[0]:e.changedTouches[0];r&&cn(t,r,e,i)}else cn(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&&jp.test(e.type)&&(e.which=1&a?1:2&a?3:4&a?2:0),e}function pn(t,e,i){Yp?t.addEventListener(e,i):t.attachEvent("on"+e,i)}function gn(t,e,i){Yp?t.removeEventListener(e,i):t.detachEvent("on"+e,i)}function vn(t){return t.which>1}function mn(t){var e=t[1][0]-t[0][0],i=t[1][1]-t[0][1];return Math.sqrt(e*e+i*i)}function yn(t){return[(t[0][0]+t[1][0])/2,(t[0][1]+t[1][1])/2]}function xn(t){return"mousewheel"===t&&vf.browser.firefox?"DOMMouseScroll":t}function _n(t,e,i){var n=t._gestureMgr;"start"===i&&n.clear();var o=n.recognize(e,t.handler.findHover(e.zrX,e.zrY,null).target,t.dom);if("end"===i&&n.clear(),o){var r=o.type;e.gestureEvent=r,t.handler.dispatchToElement({target:o.target},r,o.event)}}function wn(t){t._touching=!0,clearTimeout(t._touchTimer),t._touchTimer=setTimeout(function(){t._touching=!1},700)}function bn(t){var e=t.pointerType;return"pen"===e||"touch"===e}function Sn(t){function e(t,e){return function(){return e._touching?void 0:t.apply(e,arguments)}}f(ig,function(e){t._handlers[e]=y(rg[e],t)}),f(og,function(e){t._handlers[e]=y(rg[e],t)}),f(eg,function(i){t._handlers[i]=e(rg[i],t)})}function Mn(t){function e(e,i){f(e,function(e){pn(t,xn(e),i._handlers[e])},i)}Ff.call(this),this.dom=t,this._touching=!1,this._touchTimer,this._gestureMgr=new Jp,this._handlers={},Sn(this),vf.pointerEventsSupported?e(og,this):(vf.touchEventsSupported&&e(ig,this),e(eg,this)) }function In(t,e){var i=new cg(pf(),t,e);return hg[i.id]=i,i}function Tn(t){if(t)t.dispose();else{for(var e in hg)hg.hasOwnProperty(e)&&hg[e].dispose();hg={}}return this}function An(t){return hg[t]}function Cn(t,e){lg[t]=e}function Dn(t){delete hg[t]}function Ln(t){return t.replace(/^\s+/,"").replace(/\s+$/,"")}function Pn(t,e,i,n){var o=e[1]-e[0],r=i[1]-i[0];if(0===o)return 0===r?i[0]:(i[0]+i[1])/2;if(n)if(o>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])/o*r+i[0]}function kn(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?Ln(t).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?0/0:+t}function On(t,e,i){return null==e&&(e=10),e=Math.min(Math.max(0,e),20),t=(+t).toFixed(e),i?t:+t}function zn(t){return t.sort(function(t,e){return t-e}),t}function Rn(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 En(t){var e=t.toString(),i=e.indexOf("e");if(i>0){var n=+e.slice(i+1);return 0>n?-n:0}var o=e.indexOf(".");return 0>o?0:e.length-1-o}function Bn(t,e){var i=Math.log,n=Math.LN10,o=Math.floor(i(t[1]-t[0])/n),r=Math.round(i(Math.abs(e[1]-e[0]))/n),a=Math.min(Math.max(-o+r,0),20);return isFinite(a)?a:20}function Vn(t,e,i){if(!t[e])return 0;var n=g(t,function(t,e){return t+(isNaN(e)?0:e)},0);if(0===n)return 0;for(var o=Math.pow(10,i),r=p(t,function(t){return(isNaN(t)?0:t)/n*o*100}),a=100*o,s=p(r,function(t){return Math.floor(t)}),l=g(s,function(t,e){return t+e},0),h=p(r,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]/o}function Nn(t){var e=2*Math.PI;return(t%e+e)%e}function Fn(t){return t>-fg&&fg>t}function Gn(t){if(t instanceof Date)return t;if("string"==typeof t){var e=gg.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 Hn(t){return Math.pow(10,Wn(t))}function Wn(t){return Math.floor(Math.log(t)/Math.LN10)}function Zn(t,e){var i,n=Wn(t),o=Math.pow(10,n),r=t/o;return i=e?1.5>r?1:2.5>r?2:4>r?3:7>r?5:10:1>r?1:2>r?2:3>r?3:5>r?5:10,t=i*o,n>=-20?+t.toFixed(0>n?-n:0):t}function Un(t){function e(t,i,n){return t.interval[n]s;s++)r[s]<=i&&(r[s]=i,a[s]=s?1:1-n),i=r[s],n=a[s];r[0]===r[1]&&a[0]*a[1]!==1?t.splice(o,1):o++}return t}function Xn(t){return t-parseFloat(t)>=0}function qn(t){return isNaN(t)?"-":(t=(t+"").split("."),t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:""))}function Yn(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 jn(t){return String(t).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function $n(t,e,i){_(e)||(e=[e]);var n=e.length;if(!n)return"";for(var o=e[0].$vars||[],r=0;rl;l++)for(var h=0;h':""}function Qn(t,e,i){("week"===t||"month"===t||"quarter"===t||"half-year"===t||"year"===t)&&(t="MM-dd\nyyyy");var n=Gn(e),o=i?"UTC":"",r=n["get"+o+"FullYear"](),a=n["get"+o+"Month"]()+1,s=n["get"+o+"Date"](),l=n["get"+o+"Hours"](),h=n["get"+o+"Minutes"](),u=n["get"+o+"Seconds"]();return t=t.replace("MM",_g(a)).replace("M",a).replace("yyyy",r).replace("yy",r%100).replace("dd",_g(s)).replace("d",s).replace("hh",_g(l)).replace("h",l).replace("mm",_g(h)).replace("m",h).replace("ss",_g(u)).replace("s",u)}function to(t){return t?t.charAt(0).toUpperCase()+t.substr(1):t}function eo(t,e,i){return t[Tg+e]=i}function io(t,e){return t[Tg+e]}function no(t,e){return t.hasOwnProperty(Tg+e)}function oo(t){var e={main:"",sub:""};return t&&(t=t.split(Mg),e.main=t[0]||"",e.sub=t[1]||""),e}function ro(t){k(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(t),'componentType "'+t+'" illegal')}function ao(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=so,i.superApply=lo,u(i,this),i.superClass=e,i}}function so(t,e){var i=L(arguments,2);return this.superClass.prototype[e].apply(t,i)}function lo(t,e,i){return this.superClass.prototype[e].apply(t,i)}function ho(t,e){function i(t){var e=n[t.main];return e&&e[Ig]||(e=n[t.main]={},e[Ig]=!0),e}e=e||{};var n={};if(t.registerClass=function(t,e){if(e)if(ro(e),e=oo(e),e.sub){if(e.sub!==Ig){var o=i(e);o[e.sub]=t}}else n[e.main]=t;return t},t.getClass=function(t,e,i){var o=n[t];if(o&&o[Ig]&&(o=e?o[e]:null),i&&!o)throw new Error(e?"Component "+t+"."+(e||"")+" not exists. Load it first.":t+".type should be specified.");return o},t.getClassesByMainType=function(t){t=oo(t);var e=[],i=n[t.main];return i&&i[Ig]?f(i,function(t,i){i!==Ig&&e.push(t)}):e.push(i),e},t.hasClass=function(t){return t=oo(t),!!n[t.main]},t.getAllClassMainTypes=function(){var t=[];return f(n,function(e,i){t.push(i)}),t},t.hasSubTypes=function(t){t=oo(t);var e=n[t.main];return e&&e[Ig]},t.parseClassType=oo,e.registerWhenExtend){var o=t.extend;o&&(t.extend=function(e){var i=o.call(this,e);return t.registerClass(i,e.type)})}return t}function uo(t){return t>-zg&&zg>t}function co(t){return t>zg||-zg>t}function fo(t,e,i,n,o){var r=1-o;return r*r*(r*t+3*o*e)+o*o*(o*n+3*r*i)}function po(t,e,i,n,o){var r=1-o;return 3*(((e-t)*r+2*(i-e)*o)*r+(n-i)*o*o)}function go(t,e,i,n,o,r){var a=n+3*(e-i)-t,s=3*(i-2*e+t),l=3*(e-t),h=t-o,u=s*s-3*a*l,c=s*l-9*a*h,d=l*l-3*s*h,f=0;if(uo(u)&&uo(c))if(uo(s))r[0]=0;else{var p=-l/s;p>=0&&1>=p&&(r[f++]=p)}else{var g=c*c-4*u*d;if(uo(g)){var v=c/u,p=-s/a+v,m=-v/2;p>=0&&1>=p&&(r[f++]=p),m>=0&&1>=m&&(r[f++]=m)}else if(g>0){var y=Og(g),x=u*s+1.5*a*(-c+y),_=u*s+1.5*a*(-c-y);x=0>x?-kg(-x,Bg):kg(x,Bg),_=0>_?-kg(-_,Bg):kg(_,Bg);var p=(-s-(x+_))/(3*a);p>=0&&1>=p&&(r[f++]=p)}else{var w=(2*u*s-3*a*c)/(2*Og(u*u*u)),b=Math.acos(w)/3,S=Og(u),M=Math.cos(b),p=(-s-2*S*M)/(3*a),m=(-s+S*(M+Eg*Math.sin(b)))/(3*a),I=(-s+S*(M-Eg*Math.sin(b)))/(3*a);p>=0&&1>=p&&(r[f++]=p),m>=0&&1>=m&&(r[f++]=m),I>=0&&1>=I&&(r[f++]=I)}}return f}function vo(t,e,i,n,o){var r=6*i-12*e+6*t,a=9*e+3*n-3*t-9*i,s=3*e-3*t,l=0;if(uo(a)){if(co(r)){var h=-s/r;h>=0&&1>=h&&(o[l++]=h)}}else{var u=r*r-4*a*s;if(uo(u))o[0]=-r/(2*a);else if(u>0){var c=Og(u),h=(-r+c)/(2*a),d=(-r-c)/(2*a);h>=0&&1>=h&&(o[l++]=h),d>=0&&1>=d&&(o[l++]=d)}}return l}function mo(t,e,i,n,o,r){var a=(e-t)*o+t,s=(i-e)*o+e,l=(n-i)*o+i,h=(s-a)*o+a,u=(l-s)*o+s,c=(u-h)*o+h;r[0]=t,r[1]=a,r[2]=h,r[3]=c,r[4]=c,r[5]=u,r[6]=l,r[7]=n}function yo(t,e,i,n,o,r,a,s,l,h,u){var c,d,f,p,g,v=.005,m=1/0;Vg[0]=l,Vg[1]=h;for(var y=0;1>y;y+=.05)Ng[0]=fo(t,i,o,a,y),Ng[1]=fo(e,n,r,s,y),p=Bf(Vg,Ng),m>p&&(c=y,m=p);m=1/0;for(var x=0;32>x&&!(Rg>v);x++)d=c-v,f=c+v,Ng[0]=fo(t,i,o,a,d),Ng[1]=fo(e,n,r,s,d),p=Bf(Ng,Vg),d>=0&&m>p?(c=d,m=p):(Fg[0]=fo(t,i,o,a,f),Fg[1]=fo(e,n,r,s,f),g=Bf(Fg,Vg),1>=f&&m>g?(c=f,m=g):v*=.5);return u&&(u[0]=fo(t,i,o,a,c),u[1]=fo(e,n,r,s,c)),Og(m)}function xo(t,e,i,n){var o=1-n;return o*(o*t+2*n*e)+n*n*i}function _o(t,e,i,n){return 2*((1-n)*(e-t)+n*(i-e))}function wo(t,e,i,n,o){var r=t-2*e+i,a=2*(e-t),s=t-n,l=0;if(uo(r)){if(co(a)){var h=-s/a;h>=0&&1>=h&&(o[l++]=h)}}else{var u=a*a-4*r*s;if(uo(u)){var h=-a/(2*r);h>=0&&1>=h&&(o[l++]=h)}else if(u>0){var c=Og(u),h=(-a+c)/(2*r),d=(-a-c)/(2*r);h>=0&&1>=h&&(o[l++]=h),d>=0&&1>=d&&(o[l++]=d)}}return l}function bo(t,e,i){var n=t+i-2*e;return 0===n?.5:(t-e)/n}function So(t,e,i,n,o){var r=(e-t)*n+t,a=(i-e)*n+e,s=(a-r)*n+r;o[0]=t,o[1]=r,o[2]=s,o[3]=s,o[4]=a,o[5]=i}function Mo(t,e,i,n,o,r,a,s,l){var h,u=.005,c=1/0;Vg[0]=a,Vg[1]=s;for(var d=0;1>d;d+=.05){Ng[0]=xo(t,i,o,d),Ng[1]=xo(e,n,r,d);var f=Bf(Vg,Ng);c>f&&(h=d,c=f)}c=1/0;for(var p=0;32>p&&!(Rg>u);p++){var g=h-u,v=h+u;Ng[0]=xo(t,i,o,g),Ng[1]=xo(e,n,r,g);var f=Bf(Ng,Vg);if(g>=0&&c>f)h=g,c=f;else{Fg[0]=xo(t,i,o,v),Fg[1]=xo(e,n,r,v);var m=Bf(Fg,Vg);1>=v&&c>m?(h=v,c=m):u*=.5}}return l&&(l[0]=xo(t,i,o,h),l[1]=xo(e,n,r,h)),Og(c)}function Io(t,e,i){if(0!==t.length){var n,o=t[0],r=o[0],a=o[0],s=o[1],l=o[1];for(n=1;nu;u++){var p=d(t,i,o,a,jg[u]);l[0]=Gg(p,l[0]),h[0]=Hg(p,h[0])}for(f=c(e,n,r,s,$g),u=0;f>u;u++){var g=d(e,n,r,s,$g[u]);l[1]=Gg(g,l[1]),h[1]=Hg(g,h[1])}l[0]=Gg(t,l[0]),h[0]=Hg(t,h[0]),l[0]=Gg(a,l[0]),h[0]=Hg(a,h[0]),l[1]=Gg(e,l[1]),h[1]=Hg(e,h[1]),l[1]=Gg(s,l[1]),h[1]=Hg(s,h[1])}function Co(t,e,i,n,o,r,a,s){var l=bo,h=xo,u=Hg(Gg(l(t,i,o),1),0),c=Hg(Gg(l(e,n,r),1),0),d=h(t,i,o,u),f=h(e,n,r,c);a[0]=Gg(t,o,d),a[1]=Gg(e,r,f),s[0]=Hg(t,o,d),s[1]=Hg(e,r,f)}function Do(t,e,i,n,o,r,a,s,l){var h=ne,u=oe,c=Math.abs(o-r);if(1e-4>c%Ug&&c>1e-4)return s[0]=t-i,s[1]=e-n,l[0]=t+i,void(l[1]=e+n);if(Xg[0]=Zg(o)*i+t,Xg[1]=Wg(o)*n+e,qg[0]=Zg(r)*i+t,qg[1]=Wg(r)*n+e,h(s,Xg,qg),u(l,Xg,qg),o%=Ug,0>o&&(o+=Ug),r%=Ug,0>r&&(r+=Ug),o>r&&!a?r+=Ug:r>o&&a&&(o+=Ug),a){var d=r;r=o,o=d}for(var f=0;r>f;f+=Math.PI/2)f>o&&(Yg[0]=Zg(f)*i+t,Yg[1]=Wg(f)*n+e,h(s,Yg,s),u(l,Yg,l))}function Lo(t,e,i,n,o,r,a){if(0===o)return!1;var s=o,l=0,h=t;if(a>e+s&&a>n+s||e-s>a&&n-s>a||r>t+s&&r>i+s||t-s>r&&i-s>r)return!1;if(t===i)return Math.abs(r-t)<=s/2;l=(e-n)/(t-i),h=(t*n-i*e)/(t-i);var u=l*r-a+h,c=u*u/(l*l+1);return s/2*s/2>=c}function Po(t,e,i,n,o,r,a,s,l,h,u){if(0===l)return!1;var c=l;if(u>e+c&&u>n+c&&u>r+c&&u>s+c||e-c>u&&n-c>u&&r-c>u&&s-c>u||h>t+c&&h>i+c&&h>o+c&&h>a+c||t-c>h&&i-c>h&&o-c>h&&a-c>h)return!1;var d=yo(t,e,i,n,o,r,a,s,h,u,null);return c/2>=d}function ko(t,e,i,n,o,r,a,s,l){if(0===a)return!1;var h=a;if(l>e+h&&l>n+h&&l>r+h||e-h>l&&n-h>l&&r-h>l||s>t+h&&s>i+h&&s>o+h||t-h>s&&i-h>s&&o-h>s)return!1;var u=Mo(t,e,i,n,o,r,s,l,null);return h/2>=u}function Oo(t){return t%=uv,0>t&&(t+=uv),t}function zo(t,e,i,n,o,r,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-o)%cv<1e-4)return!0;if(r){var c=n;n=Oo(o),o=Oo(c)}else n=Oo(n),o=Oo(o);n>o&&(o+=cv);var d=Math.atan2(l,s);return 0>d&&(d+=cv),d>=n&&o>=d||d+cv>=n&&o>=d+cv}function Ro(t,e,i,n,o,r){if(r>e&&r>n||e>r&&n>r)return 0;if(n===e)return 0;var a=e>n?1:-1,s=(r-e)/(n-e);(1===s||0===s)&&(a=e>n?.5:-.5);var l=s*(i-t)+t;return l>o?a:0}function Eo(t,e){return Math.abs(t-e)e&&h>n&&h>r&&h>s||e>h&&n>h&&r>h&&s>h)return 0;var u=go(e,n,r,s,h,gv);if(0===u)return 0;for(var c,d,f=0,p=-1,g=0;u>g;g++){var v=gv[g],m=0===v||1===v?.5:1,y=fo(t,i,o,a,v);l>y||(0>p&&(p=vo(e,n,r,s,vv),vv[1]1&&Bo(),c=fo(e,n,r,s,vv[0]),p>1&&(d=fo(e,n,r,s,vv[1]))),f+=2==p?vc?m:-m:vd?m:-m:d>s?m:-m:vc?m:-m:c>s?m:-m)}return f}function No(t,e,i,n,o,r,a,s){if(s>e&&s>n&&s>r||e>s&&n>s&&r>s)return 0;var l=wo(e,n,r,s,gv);if(0===l)return 0;var h=bo(e,n,r);if(h>=0&&1>=h){for(var u=0,c=xo(e,n,r,h),d=0;l>d;d++){var f=0===gv[d]||1===gv[d]?.5:1,p=xo(t,i,o,gv[d]);a>p||(u+=gv[d]c?f:-f:c>r?f:-f)}return u}var f=0===gv[0]||1===gv[0]?.5:1,p=xo(t,i,o,gv[0]);return a>p?0:e>r?f:-f}function Fo(t,e,i,n,o,r,a,s){if(s-=e,s>i||-i>s)return 0;var l=Math.sqrt(i*i-s*s);gv[0]=-l,gv[1]=l;var h=Math.abs(n-o);if(1e-4>h)return 0;if(1e-4>h%fv){n=0,o=fv;var u=r?1:-1;return a>=gv[0]+t&&a<=gv[1]+t?u:0}if(r){var l=n;n=Oo(o),o=Oo(l)}else n=Oo(n),o=Oo(o);n>o&&(o+=fv);for(var c=0,d=0;2>d;d++){var f=gv[d];if(f+t>a){var p=Math.atan2(s,f),u=r?1:-1;0>p&&(p=fv+p),(p>=n&&o>=p||p+fv>=n&&o>=p+fv)&&(p>Math.PI/2&&p<1.5*Math.PI&&(u=-u),c+=u)}}return c}function Go(t,e,i,n,o){for(var r=0,a=0,s=0,l=0,h=0,u=0;u1&&(i||(r+=Ro(a,s,l,h,n,o))),1==u&&(a=t[u],s=t[u+1],l=a,h=s),c){case dv.M:l=t[u++],h=t[u++],a=l,s=h;break;case dv.L:if(i){if(Lo(a,s,t[u],t[u+1],e,n,o))return!0}else r+=Ro(a,s,t[u],t[u+1],n,o)||0;a=t[u++],s=t[u++];break;case dv.C:if(i){if(Po(a,s,t[u++],t[u++],t[u++],t[u++],t[u],t[u+1],e,n,o))return!0}else r+=Vo(a,s,t[u++],t[u++],t[u++],t[u++],t[u],t[u+1],n,o)||0;a=t[u++],s=t[u++];break;case dv.Q:if(i){if(ko(a,s,t[u++],t[u++],t[u],t[u+1],e,n,o))return!0}else r+=No(a,s,t[u++],t[u++],t[u],t[u+1],n,o)||0;a=t[u++],s=t[u++];break;case dv.A:var d=t[u++],f=t[u++],p=t[u++],g=t[u++],v=t[u++],m=t[u++],y=(t[u++],1-t[u++]),x=Math.cos(v)*p+d,_=Math.sin(v)*g+f;u>1?r+=Ro(a,s,x,_,n,o):(l=x,h=_);var w=(n-d)*g/p+d;if(i){if(zo(d,f,g,v,v+m,y,e,w,o))return!0}else r+=Fo(d,f,g,v,v+m,y,w,o);a=Math.cos(v+m)*p+d,s=Math.sin(v+m)*g+f;break;case dv.R:l=a=t[u++],h=s=t[u++];var b=t[u++],S=t[u++],x=l+b,_=h+S;if(i){if(Lo(l,h,x,h,e,n,o)||Lo(x,h,x,_,e,n,o)||Lo(x,_,l,_,e,n,o)||Lo(l,_,l,h,e,n,o))return!0}else r+=Ro(x,h,x,_,n,o),r+=Ro(l,_,l,h,n,o);break;case dv.Z:if(i){if(Lo(a,s,l,h,e,n,o))return!0}else r+=Ro(a,s,l,h,n,o);a=l,s=h}}return i||Eo(s,h)||(r+=Ro(a,s,l,h,n,o)||0),0!==r}function Ho(t,e,i){return Go(t,0,!1,e,i)}function Wo(t,e,i,n){return Go(t,e,!0,i,n)}function Zo(t){Qi.call(this,t),this.path=null}function Uo(t,e,i,n,o,r,a,s,l,h,u){var c=l*(Dv/180),d=Cv(c)*(t-i)/2+Av(c)*(e-n)/2,f=-1*Av(c)*(t-i)/2+Cv(c)*(e-n)/2,p=d*d/(a*a)+f*f/(s*s);p>1&&(a*=Tv(p),s*=Tv(p));var g=(o===r?-1:1)*Tv((a*a*s*s-a*a*f*f-s*s*d*d)/(a*a*f*f+s*s*d*d))||0,v=g*a*f/s,m=g*-s*d/a,y=(t+i)/2+Cv(c)*v-Av(c)*m,x=(e+n)/2+Av(c)*v+Cv(c)*m,_=kv([1,0],[(d-v)/a,(f-m)/s]),w=[(d-v)/a,(f-m)/s],b=[(-1*d-v)/a,(-1*f-m)/s],S=kv(w,b);Pv(w,b)<=-1&&(S=Dv),Pv(w,b)>=1&&(S=0),0===r&&S>0&&(S-=2*Dv),1===r&&0>S&&(S+=2*Dv),u.addData(h,y,x,a,s,_,S,c,r)}function Xo(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 p=0;po;o++){var r=t[o];r.path||r.createPathProxy(),r.__dirtyPath&&r.buildPath(r.path,r.shape,!0),i.push(r.path)}var a=new Zo(e);return a.createPathProxy(),a.buildPath=function(t){t.appendPath(i);var e=t.getContext();e&&t.rebuildPath(e)},a}function Ko(t,e,i,n,o,r,a){var s=.5*(i-t),l=.5*(n-e);return(2*(e-i)+s+l)*a+(-3*(e-i)-2*s-l)*r+s*o+e}function Jo(t,e,i){var n=e.points,o=e.smooth;if(n&&n.length>=2){if(o&&"spline"!==o){var r=Fv(n,o,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=r[2*s],h=r[2*s+1],u=n[(s+1)%a];t.bezierCurveTo(l[0],l[1],h[0],h[1],u[0],u[1])}}else{"spline"===o&&(n=Nv(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 Qo(t,e,i){var n=t.cpx2,o=t.cpy2;return null===n||null===o?[(i?po:fo)(t.x1,t.cpx1,t.cpx2,t.x2,e),(i?po:fo)(t.y1,t.cpy1,t.cpy2,t.y2,e)]:[(i?_o:xo)(t.x1,t.cpx1,t.x2,e),(i?_o:xo)(t.y1,t.cpy1,t.y2,e)]}function tr(t){return Zo.extend(t)}function er(t,e){return jo(t,e)}function ir(t,e,i,n){var o=Yo(t,e),r=o.getBoundingRect();return i&&("center"===n&&(i=or(i,r)),rr(o,i)),o}function nr(t,e,i){var n=new tn({style:{image:t,x:e.x,y:e.y,width:e.width,height:e.height},onload:function(t){if("center"===i){var o={width:t.width,height:t.height};n.setStyle(or(e,o))}}});return n}function or(t,e){var i,n=e.width/e.height,o=t.height*n;o<=t.width?i=t.height:(o=t.width,i=o/n);var r=t.x+t.width/2,a=t.y+t.height/2;return{x:r-o/2,y:a-i/2,width:o,height:i}}function rr(t,e){if(t.applyTransform){var i=t.getBoundingRect(),n=i.calculateTransform(e);t.applyTransform(n)}}function ar(t){var e=t.shape,i=t.style.lineWidth;return Jv(2*e.x1)===Jv(2*e.x2)&&(e.x1=e.x2=lr(e.x1,i,!0)),Jv(2*e.y1)===Jv(2*e.y2)&&(e.y1=e.y2=lr(e.y1,i,!0)),t}function sr(t){var e=t.shape,i=t.style.lineWidth,n=e.x,o=e.y,r=e.width,a=e.height;return e.x=lr(e.x,i,!0),e.y=lr(e.y,i,!0),e.width=Math.max(lr(n+r,i,!1)-e.x,0===r?0:1),e.height=Math.max(lr(o+a,i,!1)-e.y,0===a?0:1),t}function lr(t,e,i){var n=Jv(2*t);return(n+Jv(e))%2===0?n/2:(n+(i?1:-1))/2}function hr(t){return null!=t&&"none"!=t}function ur(t){return"string"==typeof t?Oe(t,-.1):t}function cr(t){if(t.__hoverStlDirty){var e=t.style.stroke,i=t.style.fill,n=t.__hoverStl;n.fill=n.fill||(hr(i)?ur(i):null),n.stroke=n.stroke||(hr(e)?ur(e):null);var o={};for(var r in n)null!=n[r]&&(o[r]=t.style[r]);t.__normalStl=o,t.__hoverStlDirty=!1}}function dr(t){if(!t.__isHover){if(cr(t),t.useHoverLayer)t.__zr&&t.__zr.addHover(t,t.__hoverStl);else{var e=t.style,i=e.insideRollbackOpt;i&&Lr(e),e.extendFrom(t.__hoverStl),i&&(Dr(e,e.insideOriginalTextPosition,i),null==e.textFill&&(e.textFill=i.autoColor)),t.dirty(!1),t.z2+=1}t.__isHover=!0}}function fr(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 pr(t){"group"===t.type?t.traverse(function(t){"group"!==t.type&&dr(t)}):dr(t)}function gr(t){"group"===t.type?t.traverse(function(t){"group"!==t.type&&fr(t)}):fr(t)}function vr(t,e){t.__hoverStl=t.hoverStyle||e||{},t.__hoverStlDirty=!0,t.__isHover&&cr(t)}function mr(t){this.__hoverSilentOnTouch&&t.zrByTouch||!this.__isEmphasis&&pr(this)}function yr(t){this.__hoverSilentOnTouch&&t.zrByTouch||!this.__isEmphasis&&gr(this)}function xr(){this.__isEmphasis=!0,pr(this)}function _r(){this.__isEmphasis=!1,gr(this)}function wr(t,e,i){t.__hoverSilentOnTouch=i&&i.hoverSilentOnTouch,"group"===t.type?t.traverse(function(t){"group"!==t.type&&vr(t,e)}):vr(t,e),t.on("mouseover",mr).on("mouseout",yr),t.on("emphasis",xr).on("normal",_r)}function br(t,e,i,n,o,r,a){o=o||em;var s=o.labelFetcher,l=o.labelDataIndex,h=o.labelDimIndex,u=i.getShallow("show"),c=n.getShallow("show"),d=u||c?C(s?s.getFormattedLabel(l,"normal",null,h):null,o.defaultText):null,f=u?d:null,p=c?C(s?s.getFormattedLabel(l,"emphasis",null,h):null,d):null;(null!=f||null!=p)&&(Sr(t,i,r,o),Sr(e,n,a,o,!0)),t.text=f,e.text=p}function Sr(t,e,i,n,o){return Ir(t,e,n,o),i&&a(t,i),t.host&&t.host.dirty&&t.host.dirty(!1),t}function Mr(t,e,i){var n,o={isRectText:!0};i===!1?n=!0:o.autoColor=i,Ir(t,e,o,n),t.host&&t.host.dirty&&t.host.dirty(!1)}function Ir(t,e,i,n){if(i=i||em,i.isRectText){var o=e.getShallow("position")||(n?null:"inside");"outside"===o&&(o="top"),t.textPosition=o,t.textOffset=e.getShallow("offset");var r=e.getShallow("rotate");null!=r&&(r*=Math.PI/180),t.textRotation=r,t.textDistance=C(e.getShallow("distance"),n?null:5)}var a,s=e.ecModel,l=s&&s.option.textStyle,h=Tr(e);if(h){a={};for(var u in h)if(h.hasOwnProperty(u)){var c=e.getModel(["rich",u]);Ar(a[u]={},c,l,i,n)}}return t.rich=a,Ar(t,e,l,i,n,!0),i.forceRich&&!i.textStyle&&(i.textStyle={}),t}function Tr(t){for(var e;t&&t!==t.ecModel;){var i=(t.option||em).rich;if(i){e=e||{};for(var n in i)i.hasOwnProperty(n)&&(e[n]=1)}t=t.parentModel}return e}function Ar(t,e,i,n,o,r){if(i=!o&&i||em,t.textFill=Cr(e.getShallow("color"),n)||i.color,t.textStroke=Cr(e.getShallow("textBorderColor"),n)||i.textBorderColor,t.textStrokeWidth=C(e.getShallow("textBorderWidth"),i.textBorderWidth),!o){if(r){var a=t.textPosition;t.insideRollback=Dr(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"),r&&n.disableBox||(t.textBackgroundColor=Cr(e.getShallow("backgroundColor"),n),t.textPadding=e.getShallow("padding"),t.textBorderColor=Cr(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 Cr(t,e){return"auto"!==t?t:e&&e.autoColor?e.autoColor:null}function Dr(t,e,i){var n,o=i.useInsideStyle;return null==t.textFill&&o!==!1&&(o===!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 Lr(t){var e=t.insideRollback;e&&(t.textFill=e.textFill,t.textStroke=e.textStroke,t.textStrokeWidth=e.textStrokeWidth)}function Pr(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 kr(t,e,i,n,o,r){"function"==typeof o&&(r=o,o=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(o,n.getAnimationDelayParams?n.getAnimationDelayParams(e,o):null)),"function"==typeof l&&(l=l(o)),l>0?e.animateTo(i,l,u||0,h,r,!!r):(e.stopAnimation(),e.attr(i),r&&r())}else e.stopAnimation(),e.attr(i),r&&r()}function Or(t,e,i,n,o){kr(!0,t,e,i,n,o)}function zr(t,e,i,n,o){kr(!1,t,e,i,n,o)}function Rr(t,e){for(var i=ce([]);t&&t!==e;)fe(i,t.getLocalTransform(),i),t=t.parent;return i}function Er(t,e,i){return e&&!d(e)&&(e=Yf.getLocalTransform(e)),i&&(e=me([],e)),ie([],t,e)}function Br(t,e,i){var n=0===e[4]||0===e[5]||0===e[0]?1:Math.abs(2*e[4]/e[0]),o=0===e[4]||0===e[5]||0===e[2]?1:Math.abs(2*e[4]/e[2]),r=["left"===t?-n:"right"===t?n:0,"top"===t?-o:"bottom"===t?o:0];return r=Er(r,e,i),Math.abs(r[0])>Math.abs(r[1])?r[0]>0?"right":"left":r[1]>0?"bottom":"top"}function Vr(t,e,i){function n(t){var e={};return t.traverse(function(t){!t.isGroup&&t.anid&&(e[t.anid]=t)}),e}function o(t){var e={position:F(t.position),rotation:t.rotation};return t.shape&&(e.shape=a({},t.shape)),e}if(t&&e){var r=n(t);e.traverse(function(t){if(!t.isGroup&&t.anid){var e=r[t.anid];if(e){var n=o(t);t.attr(o(e)),Or(t,n,i,t.dataIndex)}}})}}function Nr(t,e){return p(t,function(t){var i=t[0];i=Qv(i,e.x),i=tm(i,e.x+e.width);var n=t[1];return n=Qv(n,e.y),n=tm(n,e.y+e.height),[i,n]})}function Fr(t,e){var i=Qv(t.x,e.x),n=tm(t.x+t.width,e.x+e.width),o=Qv(t.y,e.y),r=tm(t.y+t.height,e.y+e.height);return n>=i&&r>=o?{x:i,y:o,width:n-i,height:r-o}:void 0}function Gr(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 tn(e)):ir(t.replace("path://",""),e,i,"center"):void 0}function Hr(t,e,i){this.parentModel=e,this.ecModel=i,this.option=t}function Wr(t,e,i){for(var n=0;no;o++){var a=e[o];!i.hasOwnProperty(a)&&n.hasOwnProperty(a)&&(i[a]=n[a])}}function qr(t){return t&&(null==t.value?t:t.value)}function Yr(t){return um(t)&&!(t instanceof Array)}function jr(t,e){var i=e&&e.type;return"ordinal"===i?t:("time"===i&&"number"!=typeof t&&null!=t&&"-"!==t&&(t=+Gn(t)),null==t||""===t?0/0:+t)}function $r(t,e){e=(e||[]).slice();var i=p(t||[],function(t){return{exist:t}});return hm(e,function(t,n){if(um(t)){for(var o=0;o=i.length&&i.push({option:t})}}),i}function Kr(t){var e=E();hm(t,function(t){var i=t.exist;i&&e.set(i.id,t)}),hm(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={})}),hm(t,function(t){var i=t.exist,n=t.option,o=t.keyInfo;if(um(n)){if(o.name=null!=n.name?n.name+"":i?i.name:"\x00-",i)o.id=i.id;else if(null!=n.id)o.id=n.id+"";else{var r=0;do o.id="\x00"+o.name+"\x00"+r++;while(e.get(o.id))}e.set(o.id,t)}})}function Jr(t){return um(t)&&t.id&&0===(t.id+"").indexOf("\x00_ec_\x00")}function Qr(t,e){function i(t,e,i){for(var n=0,o=t.length;o>n;n++)for(var r=t[n].seriesId,a=Ur(t[n].dataIndex),s=i&&i[r],l=0,h=a.length;h>l;l++){var u=a[l];s&&s[u]?s[u]=null:(e[r]||(e[r]={}))[u]=1}}function n(t,e){var i=[];for(var o in t)if(t.hasOwnProperty(o)&&null!=t[o])if(e)i.push(+o);else{var r=n(t[o],!0);r.length&&i.push({seriesId:o,dataIndex:r})}return i}var o={},r={};return i(t||[],o),i(e||[],r,o),[n(o),n(r)]}function ta(t,e){return null!=e.dataIndexInside?e.dataIndexInside:null!=e.dataIndex?_(e.dataIndex)?p(e.dataIndex,function(e){return t.indexOfRawIndex(e)}):t.indexOfRawIndex(e.dataIndex):null!=e.name?_(e.name)?p(e.name,function(e){return t.indexOfName(e)}):t.indexOfName(e.name):void 0}function ea(t,e,i){if(b(e)){var n={};n[e+"Index"]=0,e=n}var o=i&&i.defaultMainType;!o||ra(e,o+"Index")||ra(e,o+"Id")||ra(e,o+"Name")||(e[o+"Index"]=0);var r={};return hm(e,function(n,o){var n=e[o];if("dataIndex"===o||"dataIndexInside"===o)return void(r[o]=n);var a=o.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);r[s+"Models"]=c,r[s+"Model"]=c[0]}}),r}function ia(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,o){function r(t){l[t].entryCount--,0===l[t].entryCount&&h.push(t)}function a(t){u[t]=!0,r(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],p=!!u[c];p&&(n.call(o,c,d.originalDeps.slice()),delete u[c]),f(d.successor,p?a:r)}f(u,function(){throw new Error("Circle dependency may exists")})}}}function ha(t,e,i,n,o){var r=0,a=0;null==n&&(n=1/0),null==o&&(o=1/0);var s=0;e.eachChild(function(l,h){var u,c,d=l.position,f=l.getBoundingRect(),p=e.childAt(h+1),g=p&&p.getBoundingRect();if("horizontal"===t){var v=f.width+(g?-g.x+f.x:0);u=r+v,u>n||l.newline?(r=0,u=v,a+=s+i,s=f.height):s=Math.max(s,f.height)}else{var m=f.height+(g?-g.y+f.y:0);c=a+m,c>o||l.newline?(r+=s+i,a=0,c=m,s=f.width):s=Math.max(s,f.width)}l.newline||(d[0]=r,d[1]=a,"horizontal"===t?r=u+i:a=c+i)})}function ua(t,e,i){i=mg(i||0);var n=e.width,o=e.height,r=kn(t.left,n),a=kn(t.top,o),s=kn(t.right,n),l=kn(t.bottom,o),h=kn(t.width,n),u=kn(t.height,o),c=i[2]+i[0],d=i[1]+i[3],f=t.aspect;switch(isNaN(h)&&(h=n-s-d-r),isNaN(u)&&(u=o-l-c-a),null!=f&&(isNaN(h)&&isNaN(u)&&(f>n/o?h=.8*n:u=.8*o),isNaN(h)&&(h=f*u),isNaN(u)&&(u=h/f)),isNaN(r)&&(r=n-s-h-d),isNaN(a)&&(a=o-l-u-c),t.left||t.right){case"center":r=n/2-h/2-i[3];break;case"right":r=n-h-d}switch(t.top||t.bottom){case"middle":case"center":a=o/2-u/2-i[0];break;case"bottom":a=o-u-c}r=r||0,a=a||0,isNaN(h)&&(h=n-d-r-(s||0)),isNaN(u)&&(u=o-c-a-(l||0));var p=new Qe(r+i[3],a+i[0],h,u);return p.margin=i,p}function ca(t,e,i,n,o){var r=!o||!o.hv||o.hv[0],a=!o||!o.hv||o.hv[1],l=o&&o.boundingMode||"all";if(r||a){var h;if("raw"===l)h="group"===t.type?new Qe(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=ua(s({width:h.width,height:h.height},e),i,n);var c=t.position,d=r?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 da(t,e,i){function n(i,n){var a={},l=0,h={},u=0,c=2;if(vm(i,function(e){h[e]=t[e]}),vm(i,function(t){o(e,t)&&(a[t]=h[t]=e[t]),r(a,t)&&l++,r(h,t)&&u++}),s[n])return r(e,i[1])?h[i[2]]=null:r(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 Ca(t,e){return t.join(",")===e.join(",")}function Da(t,e){e=e||{},Em(e,function(e,i){if(null!=e){var n=t[i];if(bm.hasClass(i)){e=Ur(e),n=Ur(n);var o=$r(n,e);t[i]=Vm(o,function(t){return t.option&&t.exist?Nm(t.exist,t.option,!0):t.exist||t.option})}else t[i]=Nm(n,e,!0)}})}function La(t){var e=t&&t.itemStyle;if(e)for(var i=0,n=Wm.length;n>i;i++){var r=Wm[i],a=e.normal,s=e.emphasis;a&&a[r]&&(t[r]=t[r]||{},t[r].normal?o(t[r].normal,a[r]):t[r].normal=a[r],a[r]=null),s&&s[r]&&(t[r]=t[r]||{},t[r].emphasis?o(t[r].emphasis,s[r]):t[r].emphasis=s[r],s[r]=null)}}function Pa(t,e){var i=Hm(t)&&t[e],n=Hm(i)&&i.textStyle;if(n)for(var o=0,r=cm.length;r>o;o++){var e=cm[o];n.hasOwnProperty(e)&&(i[e]=n[e])}}function ka(t){Hm(t)&&(Pa(t,"normal"),Pa(t,"emphasis"))}function Oa(t){if(Hm(t)){La(t),ka(t.label),ka(t.upperLabel),ka(t.edgeLabel);var e=t.markPoint;La(e),ka(e&&e.label);var i=t.markLine;La(t.markLine),ka(i&&i.label);var n=t.markArea;ka(n&&n.label),Pa(t,"axisLabel"),Pa(t,"title"),Pa(t,"detail");var o=t.data;if(o)for(var r=0;r=0?n():c=setTimeout(n,-r),h=o};return d.clear=function(){c&&(clearTimeout(c),c=null)},d.debounceNextCall=function(t){l=t},d}function Wa(t,e,i,n){var o=t[e];if(o){var r=o[Qm]||o,a=o[ey],s=o[ty];if(s!==i||a!==n){if(null==i||!n)return t[e]=r;o=t[e]=Ha(r,i,"debounce"===n),o[Qm]=r,o[ey]=n,o[ty]=i}return o}}function Za(t,e){var i=t[e];i&&i[Qm]&&(t[e]=i[Qm])}function Ua(t){return function(e,i,n){e=e&&e.toLowerCase(),Ff.prototype[t].call(this,e,i,n)}}function Xa(){Ff.call(this)}function qa(t,e,i){function o(t,e){return t.prio-e.prio}i=i||{},"string"==typeof e&&(e=Ly[e]),this.id,this.group,this._dom=t;var r="canvas",a=this._zr=In(t,{renderer:i.renderer||r,devicePixelRatio:i.devicePixelRatio,width:i.width,height:i.height});this._throttledZrFlush=Ha(y(a.flush,a),17);var e=n(e);e&&Ym(e,!0),this._theme=e,this._chartsViews=[],this._chartsMap={},this._componentsViews=[],this._componentsMap={},this._coordSysMgr=new Sa,this._api=hs(this),Ff.call(this),this._messageCenter=new Xa,this._initEvents(),this.resize=y(this.resize,this),this._pendingActions=[],si(Dy,o),si(Ty,o),a.animation.on("frame",this._onframe,this),O(this)}function Ya(t,e,i){var n,o=this._model,r=this._coordSysMgr.getCoordinateSystems();e=ea(o,e);for(var a=0;ae.get("hoverLayerThreshold")&&!vf.node&&i.traverse(function(t){t.isGroup||(t.useHoverLayer=!0)})}function ss(t,e){var i=0;e.group.traverse(function(t){"group"===t.type||t.ignore||i++});var n=+t.get("progressive"),o=i>t.get("progressiveThreshold")&&n&&!vf.node;o&&e.group.traverse(function(t){t.isGroup||(t.progressive=o?Math.floor(i++/n):-1,o&&t.stopAnimation(!0))});var r=t.get("blendMode")||null;e.group.traverse(function(t){t.isGroup||t.setStyle("blend",r)})}function ls(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 hs(t){var e=t._coordSysMgr;return a(new ba(t),{getCoordinateSystems:y(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 us(t){function e(t,e){for(var i=0;i=0?new l.constructor(r[s].length):r[s]}return n}function Gs(t,e,i){function o(t,e,i){Ky[e]?t.otherDims[e]=i:(t.coordDim=e,t.coordDimIndex=i,h.set(e,!0))}function r(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=E(i.encodeDef),l=E(),h=E(),u=[],c=i.dimCount;if(null==c){var d=Hs(e[0]);c=Math.max(_(d)&&d.length||1,t.length,a.length),Yy(t,function(t){var e=t.dimsDef;e&&(c=Math.max(c,e.length))})}for(var f=0;c>f;f++){var p=jy(a[f])?{name:a[f]}:a[f]||{},g=p.name,v=u[f]={otherDims:{}};null!=g&&null==l.get(g)&&(v.name=v.tooltipName=g,l.set(g,f)),null!=p.type&&(v.type=p.type)}s.each(function(t,e){t=s.set(e,Ur(t).slice()),Yy(t,function(i,n){jy(i)&&(i=l.get(i)),null!=i&&c>i&&(t[n]=i,o(u[i],e,n))})});var m=0;Yy(t,function(t){var e,t,i,r;jy(t)?(e=t,t={}):(e=t.name,t=n(t),i=t.dimsDef,r=t.otherDims,t.name=t.coordDim=t.coordDimIndex=t.dimsDef=t.otherDims=null);var a=Ur(s.get(e));if(!a.length)for(var l=0;l<(i&&i.length||1);l++){for(;mx;x++){var v=u[x]=u[x]||{},w=v.coordDim;null==w&&(v.coordDim=r(y,h,i.extraFromZero),v.coordDimIndex=0,v.isExtraCoord=!0),null==v.name&&(v.name=r(v.coordDim,l)),null==v.type&&Jy(e,x)&&(v.type="ordinal")}return u}function Hs(t){return _(t)?t:S(t)?t.value:t}function Ws(t){for(var e=0;e=0&&Zs(t)?function(t,e,i,n){return Yr(t)&&(c.hasItemOption=!0),n===u?i:jr(qr(t),l[n])}:function(t,e,i,n){var o=qr(t),r=jr(o&&o[n],l[n]);Yr(t)&&(c.hasItemOption=!0);var a=s&&s.categoryAxesModels;return a&&a[e]&&"string"==typeof r&&(f[e]=f[e]||a[e].getCategories(),r=h(f[e],r),0>r&&!isNaN(r)&&(r=+r)),r};return c.hasItemOption=!1,c.initData(t,d,p),c}function Xs(t){return"category"!==t&&"time"!==t}function qs(t){return"category"===t?"ordinal":"time"===t?"time":"float"}function Ys(t,e){var i,n=[],o=t&&t.dimensions[t.categoryIndex];if(o&&(i=t.categoryAxesModels[o.name]),i){var r=i.getCategories();if(r){var a=e.length;if(_(e[0])&&e[0].length>1){n=[];for(var s=0;a>s;s++)n[s]=r[e[s][t.categoryIndex||0]]}else n=r.slice(0)}}return n}function js(t){this._setting=t||{},this._extent=[1/0,-1/0],this._interval=0,this.init&&this.init.apply(this,arguments)}function $s(t,e,i,n){var o={},r=t[1]-t[0],a=o.interval=Zn(r/e,!0);null!=i&&i>a&&(a=o.interval=i),null!=n&&a>n&&(a=o.interval=n);var s=o.intervalPrecision=Ks(a),l=o.niceTickExtent=[ix(Math.ceil(t[0]/a)*a,s),ix(Math.floor(t[1]/a)*a,s)];return Qs(l,t),o}function Ks(t){return En(t)+2}function Js(t,e,i){t[e]=Math.max(Math.min(t[e],i[1]),i[0])}function Qs(t,e){!isFinite(t[0])&&(t[0]=e[0]),!isFinite(t[1])&&(t[1]=e[1]),Js(t,0,e),Js(t,1,e),t[0]>t[1]&&(t[0]=t[1])}function tl(t,e,i,n){var o=[];if(!t)return o;var r=1e4;e[0]r)return[];return e[1]>(o.length?o[o.length-1]:i[1])&&o.push(e[1]),o}function el(t,e){return yx(t,mx(e))}function il(t,e){var i,n,o,r=t.type,a=e.getMin(),s=e.getMax(),l=null!=a,h=null!=s,u=t.getExtent();return"ordinal"===r?i=(e.get("data")||[]).length:(n=e.get("boundaryGap"),_(n)||(n=[n||0,n||0]),"boolean"==typeof n[0]&&(n=[0,0]),n[0]=kn(n[0],1),n[1]=kn(n[1],1),o=u[1]-u[0]||Math.abs(u[0])),null==a&&(a="ordinal"===r?i?0:0/0:u[0]-n[0]*o),null==s&&(s="ordinal"===r?i?i-1:0/0:u[1]+n[1]*o),"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(T(a)||T(s)),e.getNeedCrossZero()&&(a>0&&s>0&&!l&&(a=0),0>a&&0>s&&!h&&(s=0)),[a,s]}function nl(t,e){var i=il(t,e),n=null!=e.getMin(),o=null!=e.getMax(),r=e.get("splitNumber");"log"===t.type&&(t.base=e.get("logBase"));var a=t.type;t.setExtent(i[0],i[1]),t.niceExtent({splitNumber:r,fixMin:n,fixMax:o,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 ol(t,e){if(e=e||t.get("type"))switch(e){case"category":return new ex(t.getCategories(),[1/0,-1/0]);case"value":return new ox;default:return(js.getClass(e)||ox).create(t)}}function rl(t){var e=t.scale.getExtent(),i=e[0],n=e[1];return!(i>0&&n>0||0>i&&0>n)}function al(t,e,i,n,o){var r,a=0,s=0,l=(n-o)/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 sl(t,e){var i=t.scale,n=i.getTicksLabels(),o=i.getTicks();return"string"==typeof e?(e=function(t){return function(e){return t.replace("{value}",null!=e?e:"")}}(e),p(n,e)):"function"==typeof e?p(o,function(i,n){return e(ll(t,i),n)},this):n}function ll(t,e){return"category"===t.type?t.scale.getLabel(e):e}function hl(t){return S(t)&&null!=t.value?t.value:t+""}function ul(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 cl(t,e,i,n,o,r,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://")?nr(t.slice(8),new Qe(e,i,n,o),a?"center":"cover"):0===t.indexOf("path://")?ir(t.slice(7),{},new Qe(e,i,n,o),a?"center":"cover"):new kx({shape:{symbolType:t,x:e,y:i,width:n,height:o}}),l.__isEmptyBrush=s,l.setColor=ul,l.setColor(r),l}function dl(t){var e=t.get("data");return Us(e,t,t.ecModel)}function fl(t,e){var i=e;e instanceof Hr||(i=new Hr(e),c(i,Mx));var n=ol(i);return n.setExtent(t[0],t[1]),nl(n,i),n}function pl(t){c(t,Mx)}function gl(t,e){var i=t[1]-t[0],n=e,o=i/n/2;t[0]+=o,t[1]-=o}function vl(t,e){return Math.abs(t-e)>1^-(1&s),l=l>>1^-(1&l),s+=o,l+=r,o=s,r=l,n.push([s/i,l/i])}return n}function wl(t){return t.get("stack")||Fx+t.seriesIndex}function bl(t){return t.dim+t.index}function Sl(t,e){var i=[],n=t.axis,o="axis0";if("category"===n.type){for(var r=n.getBandWidth(),a=0;ae&&(e=Math.min(e,s),t.width&&(e=Math.min(e,t.width)),s-=e,t.width=e,l--)}),h=(s-r)/(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 Tl(t,e){var i=Ml(v(e.getSeriesByType(t),function(t){return!e.isSeriesFiltered(t)&&t.coordinateSystem&&"cartesian2d"===t.coordinateSystem.type})),n={},o={};e.eachSeriesByType(t,function(t){if("cartesian2d"===t.coordinateSystem.type){var e=t.getData(),r=t.coordinateSystem,a=r.getBaseAxis(),s=wl(t),l=i[bl(a)][s],h=l.offset,u=l.width,c=r.getOtherAxis(a),d=t.get("barMinHeight")||0,f=a.onZero?c.toGlobalCoord(c.dataToCoord(0)):c.getGlobalExtent()[0],p=[t.coordDimToDataDim("x")[0],t.coordDimToDataDim("y")[0]],g=e.mapArray(p,function(t,e){return r.dataToPoint([t,e])},!0);n[s]=n[s]||[],o[s]=o[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},o[s][i]={p:f,n:f});var r,a,l,p,v=t>=0?"p":"n",m=g[i],y=n[s][i][v],x=o[s][i][v];c.isHorizontal()?(r=y,a=m[1]+h,l=m[0]-x,p=u,o[s][i][v]+=l,Math.abs(l)l?-1:1)*d),n[s][i][v]+=l):(r=m[0]+h,a=y,l=u,p=m[1]-x,o[s][i][v]+=p,Math.abs(p)=p?-1:1)*d),n[s][i][v]+=p),e.setItemLayout(i,{x:r,y:a,width:l,height:p})}},!0)}},this)}function Al(t){return this._axes[t]}function Cl(t){Gx.call(this,t)}function Dl(t,e){return e.type||(e.data?"category":"value")}function Ll(t,e){return t.getCoordSysModel()===e}function Pl(t,e){var i=e*Math.PI/180,n=t.plain(),o=n.width,r=n.height,a=o*Math.cos(i)+r*Math.sin(i),s=o*Math.sin(i)+r*Math.cos(i),l=new Qe(n.x,n.y,a,s);return l}function kl(t){var e,i=t.model,n=i.getFormattedLabels(),o=i.getModel("axisLabel"),r=1,a=n.length;a>40&&(r=Math.ceil(a/40));for(var s=0;a>s;s+=r)if(!t.isLabelIgnored(s)){var l=o.getTextRect(n[s]),h=Pl(l,o.get("rotate")||0);e?e.union(h):e=h}return e}function Ol(t,e,i){this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this._initCartesian(t,e,i),this.model=t}function zl(t,e,i){var n=t[e];if(i.onZero){var o=i.onZeroAxisIndex;if(null!=o){var r=n[o];return void(r&&Rl(r)&&(i.onZero=!1))}for(var a in n)if(n.hasOwnProperty(a)){var r=n[a];if(r&&!Rl(r)){o=+a;break}}null==o&&(i.onZero=!1),i.onZeroAxisIndex=o}}function Rl(t){return"category"===t.type||"time"===t.type||!$x(t)}function El(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 Bl(t){return p(Qx,function(e){var i=t.getReferringComponents(e)[0];return i})}function Vl(t){return"cartesian2d"===t.get("coordinateSystem")}function Nl(t,e,i,n,o,r){var a=i.getModel("label.normal"),s=i.getModel("label.emphasis");br(t,e,a,s,{labelFetcher:o,labelDataIndex:r,defaultText:o.getRawValue(r),isRectText:!0,autoColor:n}),Fl(t),Fl(e)}function Fl(t,e){"outside"===t.textPosition&&(t.textPosition=e)}function Gl(t,e,i){i.style.text=null,Or(i,{shape:{width:0}},e,t,function(){i.parent&&i.parent.remove(i)})}function Hl(t,e,i){i.style.text=null,Or(i,{shape:{r:i.shape.r0}},e,t,function(){i.parent&&i.parent.remove(i)})}function Wl(t,e,i,n,o,r,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 p=a?o.height>0?"bottom":"top":o.width>0?"left":"right";l||Nl(t.style,d,n,h,r,i,p),wr(t,d)}function Zl(t,e){var i=t.get(n_)||0;return Math.min(i,Math.abs(e.width),Math.abs(e.height))}function Ul(t){var e={componentType:t.mainType};return e[t.mainType+"Index"]=t.componentIndex,e}function Xl(t,e,i,n){var o,r,a=Nn(i-t.rotation),s=n[0]>n[1],l="start"===e&&!s||"start"!==e&&s;return Fn(a-a_/2)?(r=l?"bottom":"top",o="center"):Fn(a-1.5*a_)?(r=l?"top":"bottom",o="center"):(r="middle",o=1.5*a_>a&&a>a_/2?l?"left":"right":l?"right":"left"),{rotation:a,textAlign:o,textVerticalAlign:r}}function ql(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)}function Yl(t,e,i){var n=t.get("axisLabel.showMinLabel"),o=t.get("axisLabel.showMaxLabel");e=e||[],i=i||[];var r=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?(jl(r),jl(h)):$l(r,a)&&(n?(jl(a),jl(u)):(jl(r),jl(h))),o===!1?(jl(s),jl(c)):$l(l,s)&&(o?(jl(l),jl(d)):(jl(s),jl(c)))}function jl(t){t&&(t.ignore=!0)}function $l(t,e){var i=t&&t.getBoundingRect().clone(),n=e&&e.getBoundingRect().clone();if(i&&n){var o=ce([]);return ge(o,o,-t.rotation),i.applyTransform(fe([],o,t.getLocalTransform())),n.applyTransform(fe([],o,e.getLocalTransform())),i.intersect(n)}}function Kl(t){return"middle"===t||"center"===t}function Jl(t,e,i){var n=e.axis;if(e.get("axisTick.show")&&!n.scale.isBlank()){for(var o=e.getModel("axisTick"),r=o.getModel("lineStyle"),a=o.get("length"),l=c_(o,i.labelInterval),h=n.getTicksCoords(o.get("alignWithLabel")),u=n.scale.getTicks(),c=e.get("axisLabel.showMinLabel"),d=e.get("axisLabel.showMaxLabel"),f=[],p=[],g=t._transform,v=[],m=h.length,y=0;m>y;y++)if(!u_(n,y,l,m,c,d)){var x=h[y];f[0]=x,f[1]=0,p[0]=x,p[1]=i.tickDirection*a,g&&(ie(f,f,g),ie(p,p,g));var _=new Zv(ar({anid:"tick_"+u[y],shape:{x1:f[0],y1:f[1],x2:p[0],y2:p[1]},style:s(r.getLineStyle(),{stroke:e.get("axisLine.lineStyle.color")}),z2:2,silent:!0}));t.group.add(_),v.push(_)}return v}}function Ql(t,e,i){var n=e.axis,o=A(i.axisLabelShow,e.get("axisLabel.show"));if(o&&!n.scale.isBlank()){var r=e.getModel("axisLabel"),a=r.get("margin"),s=n.scale.getTicks(),l=e.getFormattedLabels(),h=(A(i.labelRotate,r.get("rotate"))||0)*a_/180,u=h_(i.rotation,h,i.labelDirection),c=e.get("data"),d=[],p=ql(e),g=e.get("triggerEvent"),v=e.get("axisLabel.showMinLabel"),m=e.get("axisLabel.showMaxLabel");return f(s,function(o,h){if(!u_(n,h,i.labelInterval,s.length,v,m)){var f=r;c&&c[o]&&c[o].textStyle&&(f=new Hr(c[o].textStyle,r,e.ecModel));var y=f.getTextColor()||e.get("axisLine.lineStyle.color"),x=n.dataToCoord(o),_=[x,i.labelOffset+i.labelDirection*a],w=n.scale.getLabel(o),b=new Ov({anid:"label_"+o,position:_,rotation:u.rotation,silent:p,z2:10});Sr(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?o+"":o,h):y}),g&&(b.eventData=Ul(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 th(t,e){var i={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return eh(i,t,e),i.seriesInvolved&&nh(i,t),i}function eh(t,e,i){var n=e.getComponent("tooltip"),o=e.getComponent("axisPointer"),r=o.get("link",!0)||[],a=[];d_(i.getCoordinateSystems(),function(i){function s(n,s,l){var u=l.model.getModel("axisPointer",o),d=u.get("show");if(d&&("auto"!==d||n||hh(u))){null==s&&(s=u.get("triggerTooltip")),u=n?ih(l,c,o,e,n,s):u;var f=u.get("snap"),p=uh(l.model),g=s||f||"category"===l.type,v=t.axesInfo[p]={key:p,axis:l,coordSys:i,axisPointerModel:u,triggerTooltip:s,involveSeries:g,snap:f,useHandle:hh(u),seriesModels:[]};h[p]=v,t.seriesInvolved|=g;var m=oh(r,l);if(null!=m){var y=a[m]||(a[m]={axesInfo:{}});y.axesInfo[p]=v,y.mapper=r[m].mapper,v.linkGroup=y}}}if(i.axisPointerEnabled){var l=uh(i.model),h=t.coordSysAxesInfo[l]={};t.coordSysMap[l]=i;var u=i.model,c=u.getModel("tooltip",n);if(d_(i.getAxes(),f_(s,!1,null)),i.getTooltipAxes&&n&&c.get("show")){var d="axis"===c.get("trigger"),f="cross"===c.get("axisPointer.type"),p=i.getTooltipAxes(c.get("axisPointer.axis"));(d||f)&&d_(p.baseAxes,f_(s,f?"cross":!0,d)),f&&d_(p.otherAxes,f_(s,"cross",!1))}}})}function ih(t,e,i,o,r,a){var l=e.getModel("axisPointer"),h={};d_(["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"===r&&(u.show=!0,!a)){var c=h.lineStyle=l.get("crossStyle");c&&s(u,c.textStyle)}return t.model.getModel("axisPointer",new Hr(h,i,o))}function nh(t,e){e.eachSeries(function(e){var i=e.coordinateSystem,n=e.get("tooltip.trigger",!0),o=e.get("tooltip.show",!0);i&&"none"!==n&&n!==!1&&"item"!==n&&o!==!1&&e.get("axisPointer.show",!0)!==!1&&d_(t.coordSysAxesInfo[uh(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 oh(t,e){for(var i=e.model,n=e.dim,o=0;o=0||t===e}function ah(t){var e=sh(t);if(e){var i=e.axisPointerModel,n=e.axis.scale,o=i.option,r=i.get("status"),a=i.get("value");null!=a&&(a=n.parse(a));var s=hh(i);null==r&&(o.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 bh(t,e,i){for(var n,o=t.getBaseAxis(),r=t.getOtherAxis(o),a=o.onZero?0:r.scale.getExtent()[0],s=r.dim,l="x"===s||"radius"===s?1:0,h=e.stackedOn,u=e.get(s,i);h&&wh(h.get(s,i))===wh(u);){n=h;break}var c=[];return c[l]=e.get(o.dim,i),c[1-l]=n?n.get(s,i,!0):a,t.dataToPoint(c)}function Sh(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 Mh(t){return isNaN(t[0])||isNaN(t[1])}function Ih(t,e,i,n,o,r,a,s,l,h,u){for(var c=0,d=i,f=0;n>f;f++){var p=e[d];if(d>=o||0>d)break;if(Mh(p)){if(u){d+=r;continue}break}if(d===i)t[r>0?"moveTo":"lineTo"](p[0],p[1]),P_(O_,p);else if(l>0){var g=d+r,v=e[g];if(u)for(;v&&Mh(e[g]);)g+=r,v=e[g];var m=.5,y=e[c],v=e[g];if(!v||Mh(v))P_(z_,p);else{Mh(v)&&!u&&(v=p),Z(k_,v,y);var x,_;if("x"===h||"y"===h){var w="x"===h?0:1;x=Math.abs(p[w]-y[w]),_=Math.abs(p[w]-v[w])}else x=Ef(p,y),_=Ef(p,v);m=_/(_+x),L_(z_,p,k_,-l*(1-m))}C_(O_,O_,s),D_(O_,O_,a),C_(z_,z_,s),D_(z_,z_,a),t.bezierCurveTo(O_[0],O_[1],z_[0],z_[1],p[0],p[1]),L_(O_,p,k_,l*m)}else t.lineTo(p[0],p[1]);c=d,d+=r}return f}function Th(t,e){var i=[1/0,1/0],n=[-1/0,-1/0];if(e)for(var o=0;on[0]&&(n[0]=r[0]),r[1]>n[1]&&(n[1]=r[1])}return{min:e?i:n,max:e?n:i}}function Ah(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 Lh(t){return t>=0?1:-1}function Ph(t,e){var i=t.getBaseAxis(),n=t.getOtherAxis(i),o=0;if(!i.onZero){var r=n.scale.getExtent();r[0]>0?o=r[0]:r[1]<0&&(o=r[1])}var a=n.dim,s="x"===a||"radius"===a?1:0;return e.mapArray([a],function(n,r){for(var l,h=e.stackedOn;h&&Lh(h.get(a,r))===Lh(n);){l=h;break}var u=[];return u[s]=e.get(i.dim,r),u[1-s]=l?l.get(a,r,!0):o,t.dataToPoint(u)},!0)}function kh(t,e,i){var n=Dh(t.getAxis("x")),o=Dh(t.getAxis("y")),r=t.getBaseAxis().isHorizontal(),a=Math.min(n[0],n[1]),s=Math.min(o[0],o[1]),l=Math.max(n[0],n[1])-a,h=Math.max(o[0],o[1])-s,u=i.get("lineStyle.normal.width")||2,c=i.get("clipOverflow")?u/2:Math.max(l,h);r?(s-=c,h+=2*c):(a-=c,l+=2*c);var d=new Wv({shape:{x:a,y:s,width:l,height:h}});return e&&(d.shape[r?"width":"height"]=0,zr(d,{shape:{width:l,height:h}},i)),d}function Oh(t,e,i){var n=t.getAngleAxis(),o=t.getRadiusAxis(),r=o.getExtent(),a=n.getExtent(),s=Math.PI/180,l=new Bv({shape:{cx:t.cx,cy:t.cy,r0:r[0],r:r[1],startAngle:-a[0]*s,endAngle:-a[1]*s,clockwise:n.inverse}});return e&&(l.shape.endAngle=-a[0]*s,zr(l,{shape:{endAngle:-a[1]*s}},i)),l}function zh(t,e,i){return"polar"===t.type?Oh(t,e,i):kh(t,e,i)}function Rh(t,e,i){for(var n=e.getBaseAxis(),o="x"===n.dim||"radius"===n.dim?0:1,r=[],a=0;a=0;o--)if(i[o].dimension<2){n=i[o];break}if(n&&"cartesian2d"===e.type){var r=n.dimension,a=t.dimensions[r],s=e.getAxis(a),l=p(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,g=l[h-1].coord+c,v=g-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 $v(0,0,0,0,l,!0);return m[a]=d,m[a+"2"]=g,m}}}function Bh(t,e,i,n){var o=e.getData(),r=this.dataIndex,a=o.getName(r),s=e.get("selectedOffset");n.dispatchAction({type:"pieToggleSelect",from:t,name:a,seriesId:e.id}),o.each(function(t){Vh(o.getItemGraphicEl(t),o.getItemLayout(t),e.isSelected(o.getName(t)),s,i)})}function Vh(t,e,i,n,o){var r=(e.startAngle+e.endAngle)/2,a=Math.cos(r),s=Math.sin(r),l=i?n:0,h=[a*l,s*l];o?t.animate().when(200,{position:h}).start("bounceOut"):t.attr("position",h)}function Nh(t,e){function i(){r.ignore=r.hoverIgnore,a.ignore=a.hoverIgnore}function n(){r.ignore=r.normalIgnore,a.ignore=a.normalIgnore}wp.call(this);var o=new Bv({z2:2}),r=new Hv,a=new Ov;this.add(o),this.add(r),this.add(a),this.updateData(t,e,!0),this.on("emphasis",i).on("normal",n).on("mouseover",i).on("mouseout",n)}function Fh(t,e,i,n,o,r,a){function s(e,i,n){for(var o=e;i>o;o++)if(t[o].y+=n,o>e&&i>o+1&&t[o+1].y>t[o].y+t[o].height)return void l(o,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,o,r){for(var a=r>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=o+u>h?Math.sqrt((o+u+c)*(o+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*r,a=d}}t.sort(function(t,e){return t.y-e.y});for(var u,c=0,d=t.length,f=[],p=[],g=0;d>g;g++)u=t[g].y-c,0>u&&s(g,d,-u,o),c=t[g].y+t[g].height;0>a-c&&l(d-1,c-a);for(var g=0;d>g;g++)t[g].y>=i?p.push(t[g]):f.push(t[g]);h(f,!1,e,i,n,o),h(p,!0,e,i,n,o)}function Gh(t,e,i,n,o,r){for(var a=[],s=[],l=0;l1?(p.width=l,p.height=l/d):(p.height=l,p.width=l*d),p.y=s[1]-p.height/2,p.x=s[0]-p.width/2}else r=t.getBoxLayoutParams(),r.aspect=d,p=ua(r,{width:h,height:u});this.setViewRect(p.x,p.y,p.width,p.height),this.setCenter(t.get("center")),this.setZoom(t.get("zoom"))}function eu(t,e){f(e.get("geoCoord"),function(e,i){t.addGeoCoord(i,e)})}function iu(t,e){return!!nu(t)[e]}function nu(t){return t[kw]||(t[kw]={})}function ou(t){this.pointerChecker,this._zr=t,this._opt={};var e=y,i=e(ru,this),o=e(au,this),r=e(su,this),a=e(lu,this),l=e(hu,this);Ff.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",o),t.on("mouseup",r)),(e===!0||"scale"===e||"zoom"===e)&&(t.on("mousewheel",a),t.on("pinch",l))},this.disable=function(){t.off("mousedown",i),t.off("mousemove",o),t.off("mouseup",r),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 ru(t){if(!(vn(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 au(t){if(!vn(t)&&cu(this,"moveOnMouseMove",t)&&this._dragging&&"pinch"!==t.gestureEvent&&!iu(this._zr,"globalPan")){var e=t.offsetX,i=t.offsetY,n=this._x,o=this._y,r=e-n,a=i-o;this._x=e,this._y=i,this._opt.preventDefaultMouseMove&&$p(t.event),this.trigger("pan",r,a,n,o,e,i)}}function su(t){vn(t)||(this._dragging=!1)}function lu(t){if(cu(this,"zoomOnMouseWheel",t)&&0!==t.wheelDelta){var e=t.wheelDelta>0?1.1:1/1.1;uu.call(this,t,e,t.offsetX,t.offsetY)}}function hu(t){if(!iu(this._zr,"globalPan")){var e=t.pinchScale>1?1.1:1/1.1;uu.call(this,t,e,t.pinchX,t.pinchY)}}function uu(t,e,i,n){this.pointerChecker&&this.pointerChecker(t,i,n)&&($p(t.event),this.trigger("zoom",e,i,n))}function cu(t,e,i){var n=t._opt[e];return n&&(!b(n)||i.event[n+"Key"])}function du(t,e,i){var n=t.target,o=n.position;o[0]+=e,o[1]+=i,n.dirty()}function fu(t,e,i,n){var o=t.target,r=t.zoomLimit,a=o.position,s=o.scale,l=t.zoom=t.zoom||1;if(l*=e,r){var h=r.min||0,u=r.max||1/0;l=Math.max(Math.min(u,l),h)}var c=l/t.zoom;t.zoom=l,a[0]-=(i-a[0])*(c-1),a[1]-=(n-a[1])*(c-1),s[0]*=c,s[1]*=c,o.dirty()}function pu(t,e,i){var n=e.getComponentByElement(t.topTarget),o=n&&n.coordinateSystem;return n&&n!==i&&!Ow[n.mainType]&&o&&o.model!==i}function gu(t){var e=t.getItemStyle(),i=t.get("areaColor");return null!=i&&(e.fill=i),e}function vu(t,e,i,n,o){i.off("click"),i.off("mousedown"),e.get("selectedMode")&&(i.on("mousedown",function(){t._mouseDownFlag=!0}),i.on("click",function(r){if(t._mouseDownFlag){t._mouseDownFlag=!1;for(var a=r.target;!a.__regions;)a=a.parent;if(a){var s={type:("geo"===e.mainType?"geo":"map")+"ToggleSelect",batch:p(a.__regions,function(t){return{name:t.name,from:o.uid}})};s[e.mainType+"Id"]=e.id,n.dispatchAction(s),mu(e,i)}}}))}function mu(t,e){e.eachChild(function(e){f(e.__regions,function(i){e.trigger(t.isSelected(i.name)?"emphasis":"normal")})})}function yu(t,e){var i=new wp;this._controller=new ou(t.getZr()),this._controllerHost={target:e?i:null},this.group=i,this._updateGroup=e,this._mouseDownFlag}function xu(t,e,i){var n=t.getZoom(),o=t.getCenter(),r=e.zoom,a=t.dataToPoint(o);if(null!=e.dx&&null!=e.dy){a[0]-=e.dx,a[1]-=e.dy;var o=t.pointToData(a);t.setCenter(o)}if(null!=r){if(i){var s=i.min||0,l=i.max||1/0;r=Math.max(Math.min(n*r,l),s)/n}t.scale[0]*=r,t.scale[1]*=r;var h=t.position,u=(e.originX-h[0])*(r-1),c=(e.originY-h[1])*(r-1);h[0]-=u,h[1]-=c,t.updateTransform();var o=t.pointToData(a);t.setCenter(o),t.setZoom(r*n)}return{center:t.getCenter(),zoom:t.getZoom()}}function _u(t,e){var i={},n=["value"];return f(t,function(t){t.each(n,function(e,n){var o="ec-"+t.getName(n);i[o]=i[o]||[],isNaN(e)||i[o].push(e)})}),t[0].map(n,function(n,o){for(var r="ec-"+t[0].getName(o),a=0,s=1/0,l=-1/0,h=i[r].length,u=0;h>u;u++)s=Math.min(s,i[r][u]),l=Math.max(l,i[r][u]),a+=i[r][u];var c;return c="min"===e?s:"max"===e?l:"average"===e?a/h:a,0===h?0/0:c})}function wu(t){var e=t.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(t.data=p(e,function(t){var e=[t[0].coord,t[1].coord],i={coords:e};return t[0].name&&(i.fromName=t[0].name),t[1].name&&(i.toName=t[1].name),r([i,t[0],t[1]])}))}function bu(t){return isNaN(+t.cpx1)||isNaN(+t.cpy1)}function Su(t){return"_"+t+"Type"}function Mu(t,e,i){var n=e.getItemVisual(i,"color"),o=e.getItemVisual(i,t),r=e.getItemVisual(i,t+"Size");if(o&&"none"!==o){_(r)||(r=[r,r]);var a=cl(o,-r[0]/2,-r[1]/2,r[0],r[1],n);return a.name=t,a}}function Iu(t){var e=new Gw({name:"line"});return Tu(e.shape,t),e}function Tu(t,e){var i=e[0],n=e[1],o=e[2];t.x1=i[0],t.y1=i[1],t.x2=n[0],t.y2=n[1],t.percent=1,o?(t.cpx1=o[0],t.cpy1=o[1]):(t.cpx1=0/0,t.cpy1=0/0)}function Au(){var t=this,e=t.childOfName("fromSymbol"),i=t.childOfName("toSymbol"),n=t.childOfName("label");if(e||i||!n.ignore){for(var o=1,r=this.parent;r;)r.scale&&(o/=r.scale[0]),r=r.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=Z([],h,l);if(K(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",[o*s,o*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",[o*s,o*s])}if(!n.ignore){n.attr("position",h);var d,f,p,g=5*o;if("end"===n.__position)d=[u[0]*g+h[0],u[1]*g+h[1]],f=u[0]>.8?"left":u[0]<-.8?"right":"center",p=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]*g,y[1]+m[1]*g],f="center",p="bottom";var x=-Math.atan2(c[1],c[0]);h[0].8?"right":u[0]<-.8?"left":"center",p=u[1]>.8?"bottom":u[1]<-.8?"top":"middle";n.attr({style:{textVerticalAlign:n.__verticalAlign||p,textAlign:n.__textAlign||f},position:d,scale:[o,o]})}}}}function Cu(t,e,i){wp.call(this),this._createLine(t,e,i)}function Du(t){return isNaN(t[0])||isNaN(t[1])}function Lu(t){return!Du(t[0])&&!Du(t[1])}function Pu(t){this._ctor=t||Cu,this.group=new wp}function ku(t,e,i){wp.call(this),this.add(this.createLine(t,e,i)),this._updateEffectSymbol(t,e)}function Ou(t,e,i){wp.call(this),this._createPolyline(t,e,i)}function zu(t,e,i){ku.call(this,t,e,i),this._lastFrame=0,this._lastFramePercent=0}function Ru(){this.group=new wp,this._lineEl=new Yw}function Eu(t){return t instanceof Array||(t=[t,t]),t}function Bu(t,e){e.update="updateView",ws(e,function(e,i){var n={};return i.eachComponent({mainType:"geo",query:e},function(i){i[t](e.name);var o=i.coordinateSystem;f(o.regions,function(t){n[t.name]=i.isSelected(t.name)||!1})}),{selected:n,name:e.name}})}function Vu(t,e,i){var n,o={},r="toggleSelected"===t;return i.eachComponent("legend",function(i){r&&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);o[e]=o.hasOwnProperty(e)?o[e]&&n:n}})}),{name:e.name,selected:o}}function Nu(t,e){var i=mg(e.get("padding")),n=e.getItemStyle(["color","opacity"]);n.fill=e.get("backgroundColor");var t=new Wv({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 Fu(t,e){e.dispatchAction({type:"legendToggleSelect",name:t})}function Gu(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 Hu(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 Wu(t,e,i){var n=t.getOrient(),o=[1,1];o[n.index]=0,da(e,i,{type:"box",ignoreSize:o})}function Zu(t,e,i,n,o){var r=t.axis;if(!r.scale.isBlank()&&r.containData(e)){if(!t.involveSeries)return void i.showPointer(t,e);var s=Uu(e,t),l=s.payloadBatch,h=s.snapToValue;l[0]&&null==o.seriesIndex&&a(o,l[0]),!n&&t.snap&&r.containData(h)&&null!=h&&(e=h),i.showPointer(t,e,l,o),i.showTooltip(t,s,h)}}function Uu(t,e){var i=e.axis,n=i.dim,o=t,r=[],a=Number.MAX_VALUE,s=-1;return cb(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,o=l,r.length=0),cb(h,function(t){r.push({seriesIndex:e.seriesIndex,dataIndexInside:t,dataIndex:e.getData().getRawIndex(t)})}))}}),{payloadBatch:r,snapToValue:o}}function Xu(t,e,i,n){t[e.key]={value:i,payloadBatch:n}}function qu(t,e,i,n){var o=i.payloadBatch,r=e.axis,a=r.model,s=e.axisPointerModel;if(e.triggerTooltip&&o.length){var l=e.coordSys.model,h=uh(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:r.dim,axisIndex:a.componentIndex,axisType:a.type,axisId:a.id,value:n,valueLabelOpt:{precision:s.get("label.precision"),formatter:s.get("label.formatter")},seriesDataIndices:o.slice()})}}function Yu(t,e,i){var n=i.axesInfo=[];cb(e,function(e,i){var o=e.axisPointerModel.option,r=t[i];r?(!e.useHandle&&(o.status="show"),o.value=r.value,o.seriesDataIndices=(r.payloadBatch||[]).slice()):!e.useHandle&&(o.status="hide"),"show"===o.status&&n.push({axisDim:e.axis.dim,axisIndex:e.axis.model.componentIndex,value:o.value})})}function ju(t,e,i,n){if(Qu(e)||!t.list.length)return void n({type:"hideTip"});var o=((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:o.dataIndexInside,dataIndex:o.dataIndex,seriesIndex:o.seriesIndex,dataByCoordSys:t.list})}function $u(t,e,i){var n=i.getZr(),o="axisPointerLastHighlights",r=fb(n)[o]||{},a=fb(n)[o]={};cb(t,function(t){var e=t.axisPointerModel.option;"show"===e.status&&cb(e.seriesDataIndices,function(t){var e=t.seriesIndex+" | "+t.dataIndex;a[e]=t})});var s=[],l=[];f(r,function(t,e){!a[e]&&l.push(t)}),f(a,function(t,e){!r[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 Ku(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 Ju(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 Qu(t){return!t||null==t[0]||isNaN(t[0])||null==t[1]||isNaN(t[1])}function tc(t,e,i){if(!vf.node){var n=e.getZr();gb(n).records||(gb(n).records={}),ec(n,e);var o=gb(n).records[t]||(gb(n).records[t]={});o.handler=i}}function ec(t,e){function i(i,n){t.on(i,function(i){var o=rc(e);vb(gb(t).records,function(t){t&&n(t,i,o.dispatchAction)}),ic(o.pendings,e)})}gb(t).initialized||(gb(t).initialized=!0,i("click",x(oc,"click")),i("mousemove",x(oc,"mousemove")),i("globalout",nc))}function ic(t,e){var i,n=t.showTip.length,o=t.hideTip.length;n?i=t.showTip[n-1]:o&&(i=t.hideTip[o-1]),i&&(i.dispatchAction=null,e.dispatchAction(i))}function nc(t,e,i){t.handler("leave",null,i)}function oc(t,e,i,n){e.handler(t,i,n)}function rc(t){var e={showTip:[],hideTip:[]},i=function(n){var o=e[n.type];o?o.push(n):(n.dispatchAction=i,t.dispatchAction(n))};return{dispatchAction:i,pendings:e}}function ac(t,e){if(!vf.node){var i=e.getZr(),n=(gb(i).records||{})[t];n&&(gb(i).records[t]=null)}}function sc(){}function lc(t,e,i,n){hc(yb(i).lastProp,n)||(yb(i).lastProp=n,e?Or(i,n,t):(i.stopAnimation(),i.attr(n)))}function hc(t,e){if(S(t)&&S(e)){var i=!0;return f(e,function(e,n){i=i&&hc(t[n],e)}),!!i}return t===e}function uc(t,e){t[e.get("label.show")?"show":"hide"]()}function cc(t){return{position:t.position.slice(),rotation:t.rotation||0}}function dc(t,e,i){var n=e.get("z"),o=e.get("zlevel");t&&t.traverse(function(t){"group"!==t.type&&(null!=n&&(t.z=n),null!=o&&(t.zlevel=o),t.silent=i)})}function fc(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 pc(t,e,i,n,o){var r=i.get("value"),a=vc(r,e.axis,e.ecModel,i.get("seriesDataIndices"),{precision:i.get("label.precision"),formatter:i.get("label.formatter")}),s=i.getModel("label"),l=mg(s.get("padding")||0),h=s.getFont(),u=yi(a,h),c=o.position,d=u.width+l[1]+l[3],f=u.height+l[0]+l[2],p=o.align;"right"===p&&(c[0]-=d),"center"===p&&(c[0]-=d/2);var g=o.verticalAlign;"bottom"===g&&(c[1]-=f),"middle"===g&&(c[1]-=f/2),gc(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 gc(t,e,i,n){var o=n.getWidth(),r=n.getHeight();t[0]=Math.min(t[0]+e,o)-e,t[1]=Math.min(t[1]+i,r)-i,t[0]=Math.max(t[0],0),t[1]=Math.max(t[1],0)}function vc(t,e,i,n,o){var r=e.scale.getLabel(t,{precision:o.precision}),a=o.formatter;if(a){var s={value:ll(e,t),seriesData:[]};f(n,function(t){var e=i.getSeriesByIndex(t.seriesIndex),n=t.dataIndexInside,o=e&&e.getDataParams(n);o&&s.seriesData.push(o)}),b(a)?r=a.replace("{value}",r):w(a)&&(r=a(s))}return r}function mc(t,e,i){var n=ue();return ge(n,n,i.rotation),pe(n,n,i.position),Er([t.dataToCoord(e),(i.labelOffset||0)+(i.labelDirection||1)*(i.labelMargin||0)],n)}function yc(t,e,i,n,o,r){var a=s_.innerTextLayout(i.rotation,0,i.labelDirection);i.labelMargin=o.get("label.margin"),pc(e,n,o,r,{position:mc(n.axis,t,i),align:a.textAlign,verticalAlign:a.textVerticalAlign})}function xc(t,e,i){return i=i||0,{x1:t[i],y1:t[1-i],x2:e[i],y2:e[1-i]}}function _c(t,e,i){return i=i||0,{x:t[i],y:t[1-i],width:e[i],height:e[1-i]}}function wc(t,e){var i={};return i[e.dim+"AxisIndex"]=e.index,t.getCartesian(i)}function bc(t){return"x"===t.dim?0:1}function Sc(t){var e="cubic-bezier(0.23, 1, 0.32, 1)",i="left "+t+"s "+e+",top "+t+"s "+e;return p(Ib,function(t){return t+"transition:"+i}).join(";")}function Mc(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"),Sb(["decoration","align"],function(i){var n=t.get(i);n&&e.push("text-"+i+":"+n)}),e.join(";")}function Ic(t){var e=[],i=t.get("transitionDuration"),n=t.get("backgroundColor"),o=t.getModel("textStyle"),r=t.get("padding");return i&&e.push(Sc(i)),n&&(vf.canvasSupported?e.push("background-Color:"+n):(e.push("background-Color:#"+ze(n)),e.push("filter:alpha(opacity=70)"))),Sb(["width","color","radius"],function(i){var n="border-"+i,o=Mb(n),r=t.get(o);null!=r&&e.push(n+":"+r+("color"===i?"":"px"))}),e.push(Mc(o)),null!=r&&e.push("padding:"+mg(r).join("px ")+"px"),e.join(";")+";"}function Tc(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 o=this;i.onmouseenter=function(){o._enterable&&(clearTimeout(o._hideTimeout),o._show=!0),o._inContent=!0},i.onmousemove=function(e){if(e=e||window.event,!o._enterable){var i=n.handler;fn(t,e,!0),i.dispatch("mousemove",e)}},i.onmouseleave=function(){o._enterable&&o._show&&o.hideLater(o._hideDelay),o._inContent=!1}}function Ac(t){for(var e=t.pop();t.length;){var i=t.pop();i&&(i instanceof Hr&&(i=i.get("tooltip",!0)),"string"==typeof i&&(i={formatter:i}),e=new Hr(i,e,e.ecModel))}return e}function Cc(t,e){return t.dispatchAction||y(e.dispatchAction,e)}function Dc(t,e,i,n,o,r,a){var s=Pc(i),l=s.width,h=s.height;return null!=r&&(t+l+r>n?t-=l+r:t+=r),null!=a&&(e+h+a>o?e-=h+a:e+=a),[t,e]}function Lc(t,e,i,n,o){var r=Pc(i),a=r.width,s=r.height;return t=Math.min(t+a,n)-a,e=Math.min(e+s,o)-s,t=Math.max(t,0),e=Math.max(e,0),[t,e]}function Pc(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 kc(t,e,i){var n=i[0],o=i[1],r=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-o/2;break;case"top":a=e.x+l/2-n/2,s=e.y-o-r;break;case"bottom":a=e.x+l/2-n/2,s=e.y+h+r;break;case"left":a=e.x-n-r,s=e.y+h/2-o/2;break;case"right":a=e.x+l+r,s=e.y+h/2-o/2}return[a,s]}function Oc(t){return"center"===t||"middle"===t}function zc(t){Xr(t.label,["show"])}function Rc(t){return!(isNaN(parseFloat(t.x))&&isNaN(parseFloat(t.y)))}function Ec(t){return!isNaN(parseFloat(t.x))&&!isNaN(parseFloat(t.y))}function Bc(t,e,i){var n=-1;do n=Math.max(Rn(t.get(e,i)),n),t=t.stackedOn;while(t);return n}function Vc(t,e,i,n,o,r){var a=[],s=Wc(e,n,t),l=e.indicesOfNearest(n,s,!0)[0];a[o]=e.get(i,l,!0),a[r]=e.get(n,l,!0);var h=Bc(e,n,l);return h=Math.min(h,20),h>=0&&(a[r]=+a[r].toFixed(h)),a}function Nc(t,e){var i=t.getData(),o=t.coordinateSystem;if(e&&!Ec(e)&&!_(e.coord)&&o){var r=o.dimensions,a=Fc(e,i,o,t);if(e=n(e),e.type&&Eb[e.type]&&a.baseAxis&&a.valueAxis){var s=zb(r,a.baseAxis.dim),l=zb(r,a.valueAxis.dim);e.coord=Eb[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(Eb[h[u]]){var c=t.coordDimToDataDim(r[u])[0];h[u]=Wc(i,c,h[u])}e.coord=h}}return e}function Fc(t,e,i,n){var o={};return null!=t.valueIndex||null!=t.valueDim?(o.valueDataDim=null!=t.valueIndex?e.getDimension(t.valueIndex):t.valueDim,o.valueAxis=i.getAxis(n.dataDimToCoordDim(o.valueDataDim)),o.baseAxis=i.getOtherAxis(o.valueAxis),o.baseDataDim=n.coordDimToDataDim(o.baseAxis.dim)[0]):(o.baseAxis=n.getBaseAxis(),o.valueAxis=i.getOtherAxis(o.baseAxis),o.baseDataDim=n.coordDimToDataDim(o.baseAxis.dim)[0],o.valueDataDim=n.coordDimToDataDim(o.valueAxis.dim)[0]),o}function Gc(t,e){return t&&t.containData&&e.coord&&!Rc(e)?t.containData(e.coord):!0}function Hc(t,e,i,n){return 2>n?t.coord&&t.coord[n]:t.value}function Wc(t,e,i){if("average"===i){var n=0,o=0;return t.each(e,function(t){isNaN(t)||(n+=t,o++)},!0),n/o}return t.getDataExtent(e,!0)["max"===i?1:0]}function Zc(t,e,i){var n=e.coordinateSystem;t.each(function(o){var r,a=t.getItemModel(o),s=kn(a.get("x"),i.getWidth()),l=kn(a.get("y"),i.getHeight());if(isNaN(s)||isNaN(l)){if(e.getMarkerPosition)r=e.getMarkerPosition(t.getValues(t.dimensions,o));else if(n){var h=t.get(n.dimensions[0],o),u=t.get(n.dimensions[1],o);r=n.dataToPoint([h,u])}}else r=[s,l];isNaN(s)||(r[0]=s),isNaN(l)||(r[1]=l),t.setItemLayout(o,r)})}function Uc(t,e,i){var n;n=t?p(t&&t.dimensions,function(t){var i=e.getData().getDimensionInfo(e.coordDimToDataDim(t)[0])||{};return i.name=t,i}):[{name:"value",type:"float"}];var o=new Uy(n,i),r=p(i.get("data"),x(Nc,e));return t&&(r=v(r,x(Gc,t))),o.initData(r,null,t?Hc:function(t){return t.value}),o}function Xc(t){return!isNaN(t)&&!isFinite(t)}function qc(t,e,i,n){var o=1-t,r=n.dimensions[t];return Xc(e[o])&&Xc(i[o])&&e[t]===i[t]&&n.getAxis(r).containData(e[t])}function Yc(t,e){if("cartesian2d"===t.type){var i=e[0].coord,n=e[1].coord;if(i&&n&&(qc(1,i,n,t)||qc(0,i,n,t)))return!0}return Gc(t,e[0])&&Gc(t,e[1])}function jc(t,e,i,n,o){var r,a=n.coordinateSystem,s=t.getItemModel(e),l=kn(s.get("x"),o.getWidth()),h=kn(s.get("y"),o.getHeight());if(isNaN(l)||isNaN(h)){if(n.getMarkerPosition)r=n.getMarkerPosition(t.getValues(t.dimensions,e));else{var u=a.dimensions,c=t.get(u[0],e),d=t.get(u[1],e);r=a.dataToPoint([c,d])}if("cartesian2d"===a.type){var f=a.getAxis("x"),p=a.getAxis("y"),u=a.dimensions;Xc(t.get(u[0],e))?r[0]=f.toGlobalCoord(f.getExtent()[i?0:1]):Xc(t.get(u[1],e))&&(r[1]=p.toGlobalCoord(p.getExtent()[i?0:1]))}isNaN(l)||(r[0]=l),isNaN(h)||(r[1]=h)}else r=[l,h];t.setItemLayout(e,r)}function $c(t,e,i){var n;n=t?p(t&&t.dimensions,function(t){var i=e.getData().getDimensionInfo(e.coordDimToDataDim(t)[0])||{};return i.name=t,i}):[{name:"value",type:"float"}];var o=new Uy(n,i),r=new Uy(n,i),a=new Uy([],i),s=p(i.get("data"),x(Vb,e,t,i));t&&(s=v(s,x(Yc,t)));var l=t?Hc:function(t){return t.value};return o.initData(p(s,function(t){return t[0]}),null,l),r.initData(p(s,function(t){return t[1]}),null,l),a.initData(p(s,function(t){return t[2]})),a.hasItemOption=!0,{from:o,to:r,line:a}}function Kc(t){return!isNaN(t)&&!isFinite(t)}function Jc(t,e,i){var n=1-t;return Kc(e[n])&&Kc(i[n])}function Qc(t,e){var i=e.coord[0],n=e.coord[1];return"cartesian2d"===t.type&&i&&n&&(Jc(1,i,n,t)||Jc(0,i,n,t))?!0:Gc(t,{coord:i,x:e.x0,y:e.y0})||Gc(t,{coord:n,x:e.x1,y:e.y1})}function td(t,e,i,n,o){var r,a=n.coordinateSystem,s=t.getItemModel(e),l=kn(s.get(i[0]),o.getWidth()),h=kn(s.get(i[1]),o.getHeight());if(isNaN(l)||isNaN(h)){if(n.getMarkerPosition)r=n.getMarkerPosition(t.getValues(i,e));else{var u=t.get(i[0],e),c=t.get(i[1],e);r=a.dataToPoint([u,c],!0)}if("cartesian2d"===a.type){var d=a.getAxis("x"),f=a.getAxis("y"),u=t.get(i[0],e),c=t.get(i[1],e);Kc(u)?r[0]=d.toGlobalCoord(d.getExtent()["x0"===i[0]?0:1]):Kc(c)&&(r[1]=f.toGlobalCoord(f.getExtent()["y0"===i[1]?0:1]))}isNaN(l)||(r[0]=l),isNaN(h)||(r[1]=h)}else r=[l,h];return r}function ed(t,e,i){var n,o,r=["x0","y0","x1","y1"];t?(n=p(t&&t.dimensions,function(t){var i=e.getData().getDimensionInfo(e.coordDimToDataDim(t)[0])||{};return i.name=t,i}),o=new Uy(p(r,function(t,e){return{name:t,type:n[e%2].type}}),i)):(n=[{name:"value",type:"float"}],o=new Uy(n,i));var a=p(i.get("data"),x(Nb,e,t,i));t&&(a=v(a,x(Qc,t)));var s=t?function(t,e,i,n){return t.coord[Math.floor(n/2)][n%2]}:function(t){return t.value};return o.initData(a,null,s),o.hasItemOption=!0,o}function id(t){return h(Hb,t)>=0}function nd(t,e){t=t.slice();var i=p(t,to);e=(e||[]).slice();var n=p(e,to);return function(o,r){f(t,function(t,a){for(var s={name:t,capital:i[a]},l=0;l=0}function o(t,n){var o=!1;return e(function(e){f(i(t,e)||[],function(t){n.records[e.name][t]&&(o=!0)})}),o}function r(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)&&o(t,s)&&(r(t,s),l=!0)}var s={nodes:[],records:{}};if(e(function(t){s.records[t.name]={}}),!i)return s;r(i,s);var l;do l=!1,t(a);while(l);return s}}function rd(t,e,i){var n=[1/0,-1/0];return Zb(i,function(t){var i=t.getData();i&&Zb(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:o&&(e[1]=r>0?r-1:0/0),i.get("scale",!0)||(e[0]>0&&(e[0]=0),e[1]<0&&(e[1]=0)),e}function sd(t,e){var i=t.getAxisModel(),n=t._percentWindow,o=t._valueWindow;if(n){var r=Bn(o,[0,500]);r=Math.min(r,20);var a=e||0===n[0]&&100===n[1];i.setRange(a?null:+o[0].toFixed(r),a?null:+o[1].toFixed(r))}}function ld(t){var e=t._minMaxSpan={},i=t._dataZoomModel;Zb(["min","max"],function(n){e[n+"Span"]=i.get(n+"Span");var o=i.get(n+"ValueSpan");if(null!=o&&(e[n+"ValueSpan"]=o,o=t.getAxisModel().axis.scale.parse(o),null!=o)){var r=t._dataExtent;e[n+"Span"]=Pn(r[0]+o,r,[0,100],!0)}})}function hd(t){var e={};return qb(["start","end","startValue","endValue","throttle"],function(i){t.hasOwnProperty(i)&&(e[i]=t[i])}),e}function ud(t,e){var i=t._rangePropMode,n=t.get("rangeMode");qb([["start","startValue"],["end","endValue"]],function(t,o){var r=null!=e[t[0]],a=null!=e[t[1]];r&&!a?i[o]="percent":!r&&a?i[o]="value":n?i[o]=n[o]:r&&(i[o]="percent")})}function cd(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 dd(t,e){return Math.min(e[1],Math.max(e[0],t))}function fd(t){var e={x:"y",y:"x",radius:"angle",angle:"radius"};return e[t]}function pd(t){return"vertical"===t?"ns-resize":"ew-resize"}function gd(t,e){var i=xd(t),n=e.dataZoomId,o=e.coordId;f(i,function(t){var i=t.dataZoomInfos;i[n]&&h(e.allCoordIds,o)<0&&(delete i[n],t.count--)}),wd(i);var r=i[o];r||(r=i[o]={coordId:o,dataZoomInfos:{},count:0},r.controller=_d(t,r),r.dispatchAction=x(Id,t)),!r.dataZoomInfos[n]&&r.count++,r.dataZoomInfos[n]=e;var a=Td(r.dataZoomInfos);r.controller.enable(a.controlType,a.opt),r.controller.setPointerChecker(e.containsPoint),Wa(r,"dispatchAction",e.throttleRate,"fixRate")}function vd(t,e){var i=xd(t);f(i,function(t){t.controller.dispose();var i=t.dataZoomInfos;i[e]&&(delete i[e],t.count--)}),wd(i)}function md(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 yd(t){return t.type+"\x00_"+t.id}function xd(t){var e=t.getZr();return e[dS]||(e[dS]={})}function _d(t,e){var i=new ou(t.getZr());return i.on("pan",cS(bd,e)),i.on("zoom",cS(Sd,e)),i}function wd(t){f(t,function(e,i){e.count||(e.controller.dispose(),delete t[i])})}function bd(t,e,i,n,o,r,a){Md(t,function(s){return s.panGetRange(t.controller,e,i,n,o,r,a)})}function Sd(t,e,i,n){Md(t,function(o){return o.zoomGetRange(t.controller,e,i,n)})}function Md(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 Id(t,e){t.dispatchAction({type:"dataZoom",batch:e})}function Td(t){var e,i={},n={"true":2,move:1,"false":0,undefined:-1};return f(t,function(t){var o=t.disabled?!1:t.zoomLock?"move":!0;n[o]>n[e]&&(e=o),a(i,t.roamControllerOpt)}),{controlType:e,opt:i}}function Ad(t,e,i){i.getAxisProxy(t.name,e).reset(i)}function Cd(t,e,i){i.getAxisProxy(t.name,e).filterData(i)}function Dd(t,e){return t&&t.hasOwnProperty&&t.hasOwnProperty(e)}function Ld(t){var e=t.pieceList;t.hasSpecialVisual=!1,f(e,function(e,i){e.originIndex=i,null!=e.visual&&(t.hasSpecialVisual=!0)})}function Pd(t){var e=t.categories,i=t.visual,n=t.categoryMap={};if(yS(e,function(t,e){n[t]=e}),!_(i)){var o=[];S(i)?yS(i,function(t,e){var i=n[e];o[null!=i?i:_S]=t}):o[_S]=i,i=Fd(t,o)}for(var r=e.length-1;r>=0;r--)null==i[r]&&(delete n[e[r]],e.pop())}function kd(t,e){var i=t.visual,n=[];S(i)?yS(i,function(t){n.push(t)}):null!=i&&n.push(i);var o={color:1,symbol:1};e||1!==n.length||o.hasOwnProperty(t.type)||(n[1]=n[0]),Fd(t,n)}function Od(t){return{applyVisual:function(e,i,n){e=this.mapValueToVisual(e),n("color",t(i("color"),e))},_doMap:Vd([0,1])}}function zd(t){var e=this.option.visual;return e[Math.round(Pn(t,[0,1],[0,e.length-1],!0))]||{}}function Rd(t){return function(e,i,n){n(t,this.mapValueToVisual(e))}}function Ed(t){var e=this.option.visual;return e[this.option.loop&&t!==_S?t%e.length:t]}function Bd(){return this.option.visual[0]}function Vd(t){return{linear:function(e){return Pn(e,t,this.option.visual,!0)},category:Ed,piecewise:function(e,i){var n=Nd.call(this,i);return null==n&&(n=Pn(e,t,this.option.visual,!0)),n},fixed:Bd}}function Nd(t){var e=this.option,i=e.pieceList;if(e.hasSpecialVisual){var n=wS.findPieceIndex(t,i),o=i[n];if(o&&o.visual)return o.visual[this.type]}}function Fd(t,e){return t.visual=e,"color"===t.type&&(t.parsedVisual=p(e,function(t){return Le(t)})),e}function Gd(t,e,i){return t?i>=e:i>e}function Hd(t){if(t)for(var e in t)if(t.hasOwnProperty(e))return!0}function Wd(t,e,i){function o(){var t=function(){};t.prototype.__hidden=t.prototype;var e=new t;return e}var r={};return MS(e,function(e){var a=r[e]=o();MS(t[e],function(t,o){if(wS.isValidType(o)){var r={type:o,visual:t};i&&i(r,e),a[o]=new wS(r),"opacity"===o&&(r=n(r),r.type="colorAlpha",a.__hidden.__alphaForOpacity=new wS(r))}})}),r}function Zd(t,e,i){var o;f(i,function(t){e.hasOwnProperty(t)&&Hd(e[t])&&(o=!0)}),o&&f(i,function(i){e.hasOwnProperty(i)&&Hd(e[i])?t[i]=n(e[i]):delete t[i]})}function Ud(t,e,i,n,o,r){function a(t){return i.getItemVisual(u,t)}function s(t,e){i.setItemVisual(u,t,e)}function l(t,l){u=null==r?t:l;var c=i.getRawDataItem(u);if(!c||c.visualMap!==!1)for(var d=n.call(o,t),f=e[d],p=h[d],g=0,v=p.length;v>g;g++){var m=p[g];f[m]&&f[m].applyVisual(t,a,s)}}var h={};f(t,function(t){var i=wS.prepareVisualTypes(e[t]);h[t]=i});var u;null==r?i.each(l,!0):i.each([r],l,!0)}function Xd(t){t.eachTargetSeries(function(e){var i=e.getData();Ud(t.stateList,t.targetVisuals,i,t.getValueState,t,t.getDataDimension(i))})}function qd(t){t.eachSeries(function(e){var i=e.getData(),n=[];t.eachComponent("visualMap",function(t){if(t.isTargetSeries(e)){var o=t.getVisualMeta(y(Yd,null,e,t))||{stops:[],outerColors:[]};o.dimension=t.getDataDimension(i),n.push(o)}}),e.getData().setVisual("visualMeta",n)})}function Yd(t,e,i,n){function o(t){return l[t]}function r(t,e){l[t]=e}for(var a=e.targetVisuals[n],s=wS.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,o,r)}return l.color}function jd(t,e,i){if(i[0]===i[1])return i.slice();for(var n=200,o=(i[1]-i[0])/n,r=i[0],a=[],s=0;n>=s&&rc;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=ua(u,r,n.padding);return l[(f.margin[d[2]]||0)+f[d[0]]+.5*f[d[1]]<.5*r[d[1]]?0:1]}function Kd(t){return f(t||[],function(){null!=t.dataIndex&&(t.dataIndexInside=t.dataIndex,t.dataIndex=null)}),t}function Jd(t,e,i,n){return new Gv({shape:{points:t},draggable:!!i,cursor:e,drift:i,onmousemove:function(t){$p(t.event)},ondragend:n})}function Qd(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,-GS(e,HS(i,0))],[ZS,0],[0,GS(e,HS(n-i,0))]]:[[0,0],[5,-5],[5,5]]}function ef(t,e,i){var n=WS/2,o=t.get("hoverLinkDataSize");return o&&(n=NS(o,e,i,!0)/2),n}function nf(t){var e=t.get("hoverLinkOnHandle");return!!(null==e?t.get("realtime"):e)}function of(t){return"vertical"===t?"ns-resize":"ew-resize"}function rf(t,e){var i=t.inverse;("vertical"===t.orient?!i:i)&&e.reverse()}function af(t,e,i,n){var o=i.type,r=nm[o.charAt(0).toUpperCase()+o.slice(1)],a=new r(i);e.add(a),n.set(t,a),a.__ecGraphicId=t}function sf(t,e){var i=t&&t.parent;i&&("group"===t.type&&t.traverse(function(t){sf(t,e)}),e.removeKey(t.__ecGraphicId),i.remove(t))}function lf(t){return t=a({},t),f(["id","parentId","$action","hv","bounding"].concat(mm),function(e){delete t[e]}),t}function hf(t,e){var i;return f(e,function(e){null!=t[e]&&"auto"!==t[e]&&(i=!0)}),i}function uf(t,e){var i=t.exist;if(e.id=t.keyInfo.id,!e.type&&i&&(e.type=i.type),null==e.parentId){var n=e.parentOption;n?e.parentId=n.id:i&&(e.parentId=i.parentId)}e.parentOption=null}function cf(t,e,i){var n=a({},i),r=t[e],s=i.$action||"merge";"merge"===s?r?(o(r,n,!0),da(r,n,{ignoreSize:!0}),pa(i,r)):t[e]=n:"replace"===s?t[e]=n:"remove"===s&&r&&(t[e]=null)}function df(t,e){t&&(t.hv=e.hv=[hf(e,["left","right"]),hf(e,["top","bottom"])],"group"===t.type&&(null==t.width&&(t.width=e.width=0),null==t.height&&(t.height=e.height=0)))}var ff=2311,pf=function(){return ff++},gf={};gf="undefined"==typeof navigator?{browser:{},os:{},node:!0,canvasSupported:!0,svgSupported:!0}:e(navigator.userAgent);var vf=gf,mf={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1,"[object Canvas]":1},yf={"[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},xf=Object.prototype.toString,_f=Array.prototype,wf=_f.forEach,bf=_f.filter,Sf=_f.slice,Mf=_f.map,If=_f.reduce,Tf={},Af=function(){return Tf.createCanvas()};Tf.createCanvas=function(){return document.createElement("canvas")};var Cf,Df="__ec_primitive__",Lf="_ec_",Pf=4;R.prototype={constructor:R,get:function(t){return this[Lf+t]},set:function(t,e){return this[Lf+t]=e,e},each:function(t,e){void 0!==e&&(t=y(t,e));for(var i in this)this.hasOwnProperty(i)&&t(this[i],i.slice(Pf))},removeKey:function(t){delete this[Lf+t]}};var kf=(Object.freeze||Object)({$override:i,clone:n,merge:o,mergeAll:r,extend:a,defaults:s,createCanvas:Af,getContext:l,indexOf:h,inherits:u,mixin:c,isArrayLike:d,each:f,map:p,reduce:g,filter:v,find:m,bind:y,curry:x,isArray:_,isFunction:w,isString:b,isObject:S,isBuiltInObject:M,isDom:I,eqNaN:T,retrieve:A,retrieve2:C,retrieve3:D,slice:L,normalizeCssArray:P,assert:k,setAsPrimitive:O,isPrimitive:z,createHashMap:E,noop:B}),Of="undefined"==typeof Float32Array?Array:Float32Array,zf=U,Rf=X,Ef=J,Bf=Q,Vf=(Object.freeze||Object)({create:V,copy:N,clone:F,set:G,add:H,scaleAndAdd:W,sub:Z,len:U,length:zf,lenSquare:X,lengthSquare:Rf,mul:q,div:Y,dot:j,scale:$,normalize:K,distance:J,dist:Ef,distanceSquare:Q,distSquare:Bf,negate:te,lerp:ee,applyTransform:ie,min:ne,max:oe});re.prototype={constructor:re,_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(ae(e,t),"dragstart",t.event))},_drag:function(t){var e=this._draggingTarget;if(e){var i=t.offsetX,n=t.offsetY,o=i-this._x,r=n-this._y;this._x=i,this._y=n,e.drift(o,r,t),this.dispatchToElement(ae(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(ae(s,t),"dragleave",t.event),a&&a!==s&&this.dispatchToElement(ae(a,t),"dragenter",t.event))}},_dragEnd:function(t){var e=this._draggingTarget;e&&(e.dragging=!1),this.dispatchToElement(ae(e,t),"dragend",t.event),this._dropTarget&&this.dispatchToElement(ae(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null}};var Nf=Array.prototype.slice,Ff=function(){this._$handlers={}};Ff.prototype={constructor:Ff,one:function(t,e,i){var n=this._$handlers;if(!e||!t)return this;n[t]||(n[t]=[]);for(var o=0;oo;o++)i[t][o].h!=e&&n.push(i[t][o]);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=Nf.call(e,1));for(var n=this._$handlers[t],o=n.length,r=0;o>r;){switch(i){case 1:n[r].h.call(n[r].ctx);break;case 2:n[r].h.call(n[r].ctx,e[1]);break;case 3:n[r].h.call(n[r].ctx,e[1],e[2]);break;default:n[r].h.apply(n[r].ctx,e)}n[r].one?(n.splice(r,1),o--):r++}}return this},triggerWithContext:function(t){if(this._$handlers[t]){var e=arguments,i=e.length;i>4&&(e=Nf.call(e,1,e.length-1));for(var n=e[e.length-1],o=this._$handlers[t],r=o.length,a=0;r>a;){switch(i){case 1:o[a].h.call(n);break;case 2:o[a].h.call(n,e[1]);break;case 3:o[a].h.call(n,e[1],e[2]);break;default:o[a].h.apply(n,e)}o[a].one?(o.splice(a,1),r--):a++}}return this}};var Gf="silent";le.prototype.dispose=function(){};var Hf=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],Wf=function(t,e,i,n){Ff.call(this),this.storage=t,this.painter=e,this.painterRoot=n,i=i||new le,this.proxy=i,i.handler=this,this._hovered={},this._lastTouchMoment,this._lastX,this._lastY,re.call(this),f(Hf,function(t){i.on&&i.on(t,this[t],this)},this)};Wf.prototype={constructor:Wf,mousemove:function(t){var e=t.zrX,i=t.zrY,n=this._hovered,o=n.target;o&&!o.__zr&&(n=this.findHover(n.x,n.y),o=n.target);var r=this._hovered=this.findHover(e,i),a=r.target,s=this.proxy;s.setCursor&&s.setCursor(a?a.cursor:"default"),o&&a!==o&&this.dispatchToElement(n,"mouseout",t),this.dispatchToElement(r,"mousemove",t),a&&a!==o&&this.dispatchToElement(r,"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 o="on"+e,r=se(e,t,i);n&&(n[o]&&(r.cancelBubble=n[o].call(n,r)),n.trigger(e,r),n=n.parent,!r.cancelBubble););r.cancelBubble||(this.trigger(e,r),this.painter&&this.painter.eachOtherLayer(function(t){"function"==typeof t[o]&&t[o].call(t,r),t.trigger&&t.trigger(e,r)}))}},findHover:function(t,e,i){for(var n=this.storage.getDisplayList(),o={x:t,y:e},r=n.length-1;r>=0;r--){var a;if(n[r]!==i&&!n[r].ignore&&(a=he(n[r],t,e))&&(!o.topTarget&&(o.topTarget=n[r]),a!==Gf)){o.target=n[r];break}}return o}},f(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(t){Wf.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||Ef(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(i,t,e)}}),c(Wf,Ff),c(Wf,re);var Zf="undefined"==typeof Float32Array?Array:Float32Array,Uf=(Object.freeze||Object)({create:ue,identity:ce,copy:de,mul:fe,translate:pe,rotate:ge,scale:ve,invert:me}),Xf=ce,qf=5e-5,Yf=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},jf=Yf.prototype;jf.transform=null,jf.needLocalTransform=function(){return ye(this.rotation)||ye(this.position[0])||ye(this.position[1])||ye(this.scale[0]-1)||ye(this.scale[1]-1)},jf.updateTransform=function(){var t=this.parent,e=t&&t.transform,i=this.needLocalTransform(),n=this.transform;return i||e?(n=n||ue(),i?this.getLocalTransform(n):Xf(n),e&&(i?fe(n,t.transform,n):de(n,t.transform)),this.transform=n,this.invTransform=this.invTransform||ue(),void me(this.invTransform,n)):void(n&&Xf(n))},jf.getLocalTransform=function(t){return Yf.getLocalTransform(this,t)},jf.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)},jf.restoreTransform=function(t){var e=t.dpr||1;t.setTransform(e,0,0,e,0,0)};var $f=[];jf.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(fe($f,t.invTransform,e),e=$f);var i=e[0]*e[0]+e[1]*e[1],n=e[2]*e[2]+e[3]*e[3],o=this.position,r=this.scale;ye(i-1)&&(i=Math.sqrt(i)),ye(n-1)&&(n=Math.sqrt(n)),e[0]<0&&(i=-i),e[3]<0&&(n=-n),o[0]=e[4],o[1]=e[5],r[0]=i,r[1]=n,this.rotation=Math.atan2(-e[1]/n,e[0]/i)}},jf.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]},jf.transformCoordToLocal=function(t,e){var i=[t,e],n=this.invTransform;return n&&ie(i,i,n),i},jf.transformCoordToGlobal=function(t,e){var i=[t,e],n=this.transform;return n&&ie(i,i,n),i},Yf.getLocalTransform=function(t,e){e=e||[],Xf(e);var i=t.origin,n=t.scale||[1,1],o=t.rotation||0,r=t.position||[0,0];return i&&(e[4]-=i[0],e[5]-=i[1]),ve(e,e,n),o&&ge(e,e,o),i&&(e[4]+=i[0],e[5]+=i[1]),e[4]+=r[0],e[5]+=r[1],e};var Kf={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-Kf.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*Kf.bounceIn(2*t):.5*Kf.bounceOut(2*t-1)+.5}};xe.prototype={constructor:xe,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,o="string"==typeof n?Kf[n]:n,r="function"==typeof o?o(i):i;return this.fire("frame",r),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 Jf=function(){this.head=null,this.tail=null,this._len=0},Qf=Jf.prototype;Qf.insert=function(t){var e=new tp(t);return this.insertEntry(e),e},Qf.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++},Qf.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--},Qf.len=function(){return this._len},Qf.clear=function(){this.head=this.tail=null,this._len=0};var tp=function(t){this.value=t,this.next,this.prev},ep=function(t){this._list=new Jf,this._map={},this._maxSize=t||10,this._lastRemovedEntry=null},ip=ep.prototype;ip.put=function(t,e){var i=this._list,n=this._map,o=null;if(null==n[t]){var r=i.len(),a=this._lastRemovedEntry;if(r>=this._maxSize&&r>0){var s=i.head;i.remove(s),delete n[s.key],o=s.value,this._lastRemovedEntry=s}a?a.value=e:a=new tp(e),a.key=t,i.insertEntry(a),n[t]=a}return o},ip.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},ip.clear=function(){this._list.clear(),this._map={}};var np={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]},op=new ep(20),rp=null,ap=Re,sp=Ee,lp=(Object.freeze||Object)({parse:Le,lift:Oe,toHex:ze,fastLerp:Re,fastMapToColor:ap,lerp:Ee,mapToColor:sp,modifyHSL:Be,modifyAlpha:Ve,stringify:Ne}),hp=Array.prototype.slice,up=function(t,e,i,n){this._tracks={},this._target=t,this._loop=e||!1,this._getter=i||Fe,this._setter=n||Ge,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]};up.prototype={when:function(t,e){var i=this._tracks;for(var n in e)if(e.hasOwnProperty(n)){if(!i[n]){i[n]=[];var o=this._getter(this._target,n);if(null==o)continue;0!==t&&i[n].push({time:0,value:je(o)})}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,o=0,r=function(){o--,o||n._doneCallback()};for(var a in this._tracks)if(this._tracks.hasOwnProperty(a)){var s=Je(this,t,r,this._tracks[a],a,e);s&&(this._clipList.push(s),o++,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&&(pp=function(){for(var t in arguments)console.log(arguments[t])});var gp=pp,vp=function(){this.animators=[]};vp.prototype={constructor:vp,animate:function(t,e){var i,n=!1,o=this,r=this.__zr;if(t){var a=t.split("."),s=o;n="shape"===a[0];for(var l=0,u=a.length;u>l;l++)s&&(s=s[a[l]]);s&&(i=s)}else i=o;if(!i)return void gp('Property "'+t+'" is not existed in element '+o.id);var c=o.animators,d=new up(i,e);return d.during(function(){o.dirty(n)}).done(function(){c.splice(h(c,d),1)}),c.push(d),r&&r.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,o,r){function a(){l--,l||o&&o()}b(i)?(o=n,n=i,i=0):w(n)?(o=n,n="linear",i=0):w(i)?(o=i,i=0):w(e)?(o=e,e=500):e||(e=500),this.stopAnimation(),this._animateToShallow("",this,t,e,i);var s=this.animators.slice(),l=s.length;l||o&&o();for(var h=0;h0&&this.animate(t,!1).when(null==n?500:n,r).delay(o||0),this}};var mp=function(t){Yf.call(this,t),Ff.call(this,t),vp.call(this,t),this.id=t.id||pf()};mp.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(S(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>r||o>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 Qe(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}}},Qe.create=function(t){return new Qe(t.x,t.y,t.width,t.height)};var wp=function(t){t=t||{},mp.call(this,t);for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);this._children=[],this.__storage=null,this.__dirty=!0};wp.prototype={constructor:wp,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 wp&&t.addChildrenToStorage(e)),i&&i.refresh()},remove:function(t){var e=this.__zr,i=this.__storage,n=this._children,o=h(n,t);return 0>o?this:(n.splice(o,1),t.parent=null,i&&(i.delFromStorage(t),t instanceof wp&&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,vf.canvasSupported&&si(i,li)},_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 o=n,r=t;o;)o.parent=r,o.updateTransform(),e.push(o),r=o,o=o.clipPath}if(t.isGroup){for(var a=t._children,s=0;se;e++)this.delRoot(t[e]);else{var o=h(this._roots,t);o>=0&&(this.delFromStorage(t),this._roots.splice(o,1),t instanceof wp&&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:li};var Ip=[["shadowBlur",0],["shadowOffsetX",0],["shadowOffsetY",0],["shadowColor","#000"],["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]],Tp=function(t,e){this.extendFrom(t,!1),this.host=e};Tp.prototype={constructor:Tp,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,o=i&&i.style,r=!o,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?ui:hi,o=n(t,e,i),r=e.colorStops,a=0;a=0&&i.splice(n,1),t.__hoverMir=null},clearHover:function(){for(var t=this._hoverElements,e=0;eo;){var r=t[o],a=r.__from;a&&a.__zr?(o++,a.invisible||(r.transform=a.transform,r.invTransform=a.invTransform,r.__clipPaths=a.__clipPaths,this._doPaintEl(r,i,!0,n))):(t.splice(o,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++,kp(t)):e._progressiveToken=-1)}var e=this;if(e._furtherProgressive){var i=e._progressiveToken=+new Date;e._progress++,kp(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(on),this._doPaintList(t,e),this.eachBuiltinLayer(rn)},_doPaintList:function(t,e){function i(t){var e=r.dpr||1;r.save(),r.globalAlpha=1,r.shadowBlur=0,n.__dirty=!0,r.setTransform(1,0,0,1,0,0),r.drawImage(t.dom,0,0,u*e,c*e),r.restore()}for(var n,o,r,a,s,l,h=0,u=this._width,c=this._height,d=this._progress,p=0,g=t.length;g>p;p++){var v=t[p],m=this._singleCanvas?0:v.zlevel,y=v.__frame;if(0>y&&s&&(i(s),s=null),o!==m&&(r&&r.restore(),a={},o=m,n=this.getLayer(o),n.__builtin__||gp("ZLevel "+o+" has been used by unkown layer "+n.id),r=n.ctx,r.save(),n.__unusedCount=0,(n.__dirty||e)&&n.clear()),n.__dirty||e){if(y>=0){if(!s){if(s=this._progressiveLayers[Math.min(h++,Zp-1)],s.ctx.save(),s.renderScope={},s&&s.__progress>s.__maxProgress){p=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),r&&r.restore(),this._furtherProgressive=!1,f(this._progressiveLayers,function(t){t.__maxProgress>=t.__progress&&(this._furtherProgressive=!0)},this)},_doPaintEl:function(t,e,i,n){var o=e.ctx,r=t.transform;if(!(!e.__dirty&&!i||t.invisible||0===t.style.opacity||r&&!r[0]&&!r[3]||t.culling&&an(t,this._width,this._height))){var a=t.__clipPaths;(n.prevClipLayer!==e||sn(a,n.prevElClipPaths))&&(n.prevElClipPaths&&(n.prevClipLayer.ctx.restore(),n.prevClipLayer=n.prevElClipPaths=null,n.prevEl=null),a&&(o.save(),ln(a,o),n.prevClipLayer=e,n.prevElClipPaths=a)),t.beforeBrush&&t.beforeBrush(o),t.brush(o,n.prevEl||null),n.prevEl=t,t.afterBrush&&t.afterBrush(o)}},getLayer:function(t){if(this._singleCanvas)return this._layers[0];var e=this._layers[t];return e||(e=new Pp("zr_"+t,this,this.dpr),e.__builtin__=!0,this._layerConfig[t]&&o(e,this._layerConfig[t],!0),this.insertLayer(t,e),e.initContext()),e},insertLayer:function(t,e){var i=this._layers,n=this._zlevelList,o=n.length,r=null,a=-1,s=this._domRoot;if(i[t])return void gp("ZLevel "+t+" has been used already");if(!nn(e))return void gp("Layer of zlevel "+t+" is not valid");if(o>0&&t>n[0]){for(a=0;o-1>a&&!(n[a]t);a++);r=i[n[a]]}if(n.splice(a+1,0,t),i[t]=e,!e.virtual)if(r){var l=r.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,o=this._zlevelList;for(n=0;nh;h++){var c=t[h],d=this._singleCanvas?0:c.zlevel,p=e[d],g=c.progressive;if(p&&(p.elCount++,p.__dirty=p.__dirty||c.__dirty),g>=0){a!==g&&(a=g,l++);var v=c.__frame=l-1;if(!r){var m=Math.min(s,Zp-1);r=i[m],r||(r=i[m]=new Pp("progressive",this,this.dpr),r.initContext()),r.__maxProgress=0}r.__dirty=r.__dirty||c.__dirty,r.elCount++,r.__maxProgress=Math.max(r.__maxProgress,v),r.__maxProgress>=r.__progress&&(p.__dirty=!0)}else c.__frame=-1,r&&(r.__nextIdxNotProg=h,s++,r=null)}r&&(s++,r.__nextIdxNotProg=h),this.eachBuiltinLayer(function(t,e){n[e]!==t.elCount&&(t.__dirty=!0)}),i.length=Math.min(s,Zp),f(i,function(t,e){o[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]?o(i[t],e,!0):i[t]=e;var n=this._layers[t];n&&o(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 o in this._layers)this._layers.hasOwnProperty(o)&&this._layers[o].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 o,r=0;rt&&e>s){o=l;break}}o&&o.renderToCanvas&&(i.ctx.save(),o.renderToCanvas(i.ctx),i.ctx.restore())}if(t=t||{},this._singleCanvas)return this._layers[0].dom;var i=new Pp("image",this,t.pixelRatio||this.dpr);i.initContext(),i.clearColor=t.backgroundColor,i.clear();for(var n,o=this.storage.getDisplayList(!0),r={},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&&(o.push(l),r.push(s))}for(var a=0;n>a;)i[a]._needsRemove?(i[a]=i[n-1],i.pop(),n--):a++;n=o.length;for(var a=0;n>a;a++)r[a].fire(o[a]);this._time=t,this.onframe(e),this.trigger("frame",e),this.stage.update&&this.stage.update()},_startLoop:function(){function t(){e._running&&(kp(t),!e._paused&&e._update())}var e=this;this._running=!0,kp(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 up(t,e.loop,e.getter,e.setter);return this.addAnimator(i),i}},c(Kp,Ff);var Jp=function(){this._track=[]};Jp.prototype={constructor:Jp,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 o={points:[],touches:[],target:e,event:t},r=0,a=n.length;a>r;r++){var s=n[r],l=cn(i,s,{});o.points.push([l.zrX,l.zrY]),o.touches.push(s)}this._track.push(o)}},_recognize:function(t){for(var e in Qp)if(Qp.hasOwnProperty(e)){var i=Qp[e](this._track,t);if(i)return i}}};var Qp={pinch:function(t,e){var i=t.length;if(i){var n=(t[i-1]||{}).points,o=(t[i-2]||{}).points||n;if(o&&o.length>1&&n&&n.length>1){var r=mn(n)/mn(o);!isFinite(r)&&(r=1),e.pinchScale=r;var a=yn(n);return e.pinchX=a[0],e.pinchY=a[1],{type:"pinch",target:t[0].target,event:e}}}}},tg=300,eg=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],ig=["touchstart","touchend","touchmove"],ng={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},og=p(eg,function(t){var e=t.replace("mouse","pointer");return ng[e]?e:t}),rg={mousemove:function(t){t=fn(this.dom,t),this.trigger("mousemove",t)},mouseout:function(t){t=fn(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=fn(this.dom,t),t.zrByTouch=!0,this._lastTouchMoment=new Date,_n(this,t,"start"),rg.mousemove.call(this,t),rg.mousedown.call(this,t),wn(this)},touchmove:function(t){t=fn(this.dom,t),t.zrByTouch=!0,_n(this,t,"change"),rg.mousemove.call(this,t),wn(this)},touchend:function(t){t=fn(this.dom,t),t.zrByTouch=!0,_n(this,t,"end"),rg.mouseup.call(this,t),+new Date-this._lastTouchMomentt?"0"+t:t},wg=Mi,bg=yi,Sg=(Object.freeze||Object)({addCommas:qn,toCamelCase:Yn,normalizeCssArray:mg,encodeHTML:jn,formatTpl:$n,formatTplSimple:Kn,getTooltipMarker:Jn,formatTime:Qn,capitalFirst:to,truncateText:wg,getTextRect:bg}),Mg=".",Ig="___EC__COMPONENT__CONTAINER___",Tg="\x00ec_\x00",Ag=function(t){for(var e=0;e=0||n&&h(n,a)<0)){var s=e.getShallow(a);null!=s&&(o[t[r][0]]=s)}}return o}},Cg=Ag([["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),Dg={getLineStyle:function(t){var e=Cg(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]}},Lg=Ag([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),Pg={getAreaStyle:function(t,e){return Lg(this,t,e)}},kg=Math.pow,Og=Math.sqrt,zg=1e-8,Rg=1e-4,Eg=Og(3),Bg=1/3,Vg=V(),Ng=V(),Fg=V(),Gg=Math.min,Hg=Math.max,Wg=Math.sin,Zg=Math.cos,Ug=2*Math.PI,Xg=V(),qg=V(),Yg=V(),jg=[],$g=[],Kg={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Jg=[],Qg=[],tv=[],ev=[],iv=Math.min,nv=Math.max,ov=Math.cos,rv=Math.sin,av=Math.sqrt,sv=Math.abs,lv="undefined"!=typeof Float32Array,hv=function(t){this._saveData=!t,this._saveData&&(this.data=[]),this._ctx=null};hv.prototype={constructor:hv,_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=sv(1/fp/t)||0,this._uy=sv(1/fp/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(Kg.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=sv(t-this._xi)>this._ux||sv(e-this._yi)>this._uy||this._len<5;return this.addData(Kg.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,o,r){return this.addData(Kg.C,t,e,i,n,o,r),this._ctx&&(this._needsDash()?this._dashedBezierTo(t,e,i,n,o,r):this._ctx.bezierCurveTo(t,e,i,n,o,r)),this._xi=o,this._yi=r,this},quadraticCurveTo:function(t,e,i,n){return this.addData(Kg.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,o,r){return this.addData(Kg.A,t,e,i,i,n,o-n,0,r?0:1),this._ctx&&this._ctx.arc(t,e,i,n,o,r),this._xi=ov(o)*i+t,this._yi=rv(o)*i+t,this},arcTo:function(t,e,i,n,o){return this._ctx&&this._ctx.arcTo(t,e,i,n,o),this},rect:function(t,e,i,n){return this._ctx&&this._ctx.rect(t,e,i,n),this.addData(Kg.R,t,e,i,n),this},closePath:function(){this.addData(Kg.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,o=0;e>o;o++)i+=t[o].len();lv&&this.data instanceof Float32Array&&(this.data=new Float32Array(n+i));for(var o=0;e>o;o++)for(var r=t[o].data,a=0;ae.length&&(this._expandData(),e=this.data);for(var i=0;ir&&(r=o+r),r%=o,f-=r*u,p-=r*c;u>0&&t>=f||0>u&&f>=t||0==u&&(c>0&&e>=p||0>c&&p>=e);)n=this._dashIdx,i=a[n],f+=u*i,p+=c*i,this._dashIdx=(n+1)%g,u>0&&l>f||0>u&&f>l||c>0&&h>p||0>c&&p>h||s[n%2?"moveTo":"lineTo"](u>=0?iv(f,t):nv(f,t),c>=0?iv(p,e):nv(p,e));u=f-t,c=p-e,this._dashOffset=-av(u*u+c*c)},_dashedBezierTo:function(t,e,i,n,o,r){var a,s,l,h,u,c=this._dashSum,d=this._dashOffset,f=this._lineDash,p=this._ctx,g=this._xi,v=this._yi,m=fo,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(g,t,i,o,a+.1)-m(g,t,i,o,a),l=m(v,e,n,r,a+.1)-m(v,e,n,r,a),y+=av(s*s+l*l);for(;_>x&&(w+=f[x],!(w>d));x++);for(a=(w-d)/y;1>=a;)h=m(g,t,i,o,a),u=m(v,e,n,r,a),x%2?p.moveTo(h,u):p.lineTo(h,u),a+=f[x]/y,x=(x+1)%_;x%2!==0&&p.lineTo(o,r),s=o-h,l=r-u,this._dashOffset=-av(s*s+l*l)},_dashedQuadraticTo:function(t,e,i,n){var o=i,r=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,o,r)},toStatic:function(){var t=this.data;t instanceof Array&&(t.length=this._len,lv&&(this.data=new Float32Array(t)))},getBoundingRect:function(){Jg[0]=Jg[1]=tv[0]=tv[1]=Number.MAX_VALUE,Qg[0]=Qg[1]=ev[0]=ev[1]=-Number.MAX_VALUE;for(var t=this.data,e=0,i=0,n=0,o=0,r=0;rc;){var d=s[c++];switch(1==c&&(n=s[c],o=s[c+1],e=n,i=o),d){case Kg.M:e=n=s[c++],i=o=s[c++],t.moveTo(n,o);break;case Kg.L:r=s[c++],a=s[c++],(sv(r-n)>l||sv(a-o)>h||c===u-1)&&(t.lineTo(r,a),n=r,o=a);break;case Kg.C:t.bezierCurveTo(s[c++],s[c++],s[c++],s[c++],s[c++],s[c++]),n=s[c-2],o=s[c-1];break;case Kg.Q:t.quadraticCurveTo(s[c++],s[c++],s[c++],s[c++]),n=s[c-2],o=s[c-1];break;case Kg.A:var f=s[c++],p=s[c++],g=s[c++],v=s[c++],m=s[c++],y=s[c++],x=s[c++],_=s[c++],w=g>v?g:v,b=g>v?1:g/v,S=g>v?v/g:1,M=Math.abs(g-v)>.001,I=m+y;M?(t.translate(f,p),t.rotate(x),t.scale(b,S),t.arc(0,0,w,m,I,1-_),t.scale(1/b,1/S),t.rotate(-x),t.translate(-f,-p)):t.arc(f,p,w,m,I,1-_),1==c&&(e=ov(m)*g+f,i=rv(m)*v+p),n=ov(I)*g+f,o=rv(I)*v+p;break;case Kg.R:e=n=s[c],i=o=s[c+1],t.rect(s[c++],s[c++],s[c++],s[c++]);break;case Kg.Z:t.closePath(),n=e,o=i}}}},hv.CMD=Kg;var uv=2*Math.PI,cv=2*Math.PI,dv=hv.CMD,fv=2*Math.PI,pv=1e-4,gv=[-1,-1,-1],vv=[-1,-1],mv=Lp.prototype.getCanvasPattern,yv=Math.abs,xv=new hv(!0);Zo.prototype={constructor:Zo,type:"path",__dirtyPath:!0,strokeContainThreshold:5,brush:function(t,e){var i=this.style,n=this.path||xv,o=i.hasStroke(),r=i.hasFill(),a=i.fill,s=i.stroke,l=r&&!!a.colorStops,h=o&&!!s.colorStops,u=r&&!!a.image,c=o&&!!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=mv.call(a,t)),h?t.strokeStyle=this._strokeGradient:c&&(t.strokeStyle=mv.call(s,t));var f=i.lineDash,p=i.lineDashOffset,g=!!t.setLineDash,v=this.getGlobalScale();n.setScale(v[0],v[1]),this.__dirtyPath||f&&!g&&o?(n.beginPath(t),f&&!g&&(n.setLineDash(f),n.setLineDashOffset(p)),this.buildPath(n,this.shape,!1),this.path&&(this.__dirtyPath=!1)):(t.beginPath(),this.path.rebuildPath(t)),r&&n.fill(t),f&&g&&(t.setLineDash(f),t.lineDashOffset=p),o&&n.stroke(t),f&&g&&t.setLineDash([]),this.restoreTransform(t),null!=i.text&&this.drawRectText(t,this.getBoundingRect())},buildPath:function(){},createPathProxy:function(){this.path=new hv},getBoundingRect:function(){var t=this._rect,e=this.style,i=!t;if(i){var n=this.path;n||(n=this.path=new hv),this.__dirtyPath&&(n.beginPath(),this.buildPath(n,this.shape,!1)),t=n.getBoundingRect()}if(this._rect=t,e.hasStroke()){var o=this._rectWithStroke||(this._rectWithStroke=t.clone());if(this.__dirty||i){o.copy(t);var r=e.lineWidth,a=e.strokeNoScale?this.getLineScale():1;e.hasFill()||(r=Math.max(r,this.strokeContainThreshold||4)),a>1e-10&&(o.width+=r/a,o.height+=r/a,o.x-=r/a/2,o.y-=r/a/2)}return o}return t},contain:function(t,e){var i=this.transformCoordToLocal(t,e),n=this.getBoundingRect(),o=this.style;if(t=i[0],e=i[1],n.contain(t,e)){var r=this.path.data;if(o.hasStroke()){var a=o.lineWidth,s=o.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(o.hasFill()||(a=Math.max(a,this.strokeContainThreshold)),Wo(r,a/s,t,e)))return!0}if(o.hasFill())return Ho(r,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):Qi.prototype.attrKV.call(this,t,e)},setShape:function(t,e){var i=this.shape;if(i){if(S(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&&yv(t[0]-1)>1e-10&&yv(t[3]-1)>1e-10?Math.sqrt(yv(t[0]*t[3]-t[2]*t[1])):1}},Zo.extend=function(t){var e=function(e){Zo.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 o in i)!n.hasOwnProperty(o)&&i.hasOwnProperty(o)&&(n[o]=i[o])}t.init&&t.init.call(this,e)};u(e,Zo);for(var i in t)"style"!==i&&"shape"!==i&&(e.prototype[i]=t[i]);return e},u(Zo,Qi);var _v=hv.CMD,wv=[[],[],[]],bv=Math.sqrt,Sv=Math.atan2,Mv=function(t,e){var i,n,o,r,a,s,l=t.data,h=_v.M,u=_v.C,c=_v.L,d=_v.R,f=_v.A,p=_v.Q;for(o=0,r=0;oa;a++){var s=wv[a];s[0]=l[o++],s[1]=l[o++],ie(s,s,e),l[r++]=s[0],l[r++]=s[1]}}},Iv=["m","M","l","L","v","V","h","H","z","Z","c","C","q","Q","t","T","s","S","a","A"],Tv=Math.sqrt,Av=Math.sin,Cv=Math.cos,Dv=Math.PI,Lv=function(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])},Pv=function(t,e){return(t[0]*e[0]+t[1]*e[1])/(Lv(t)*Lv(e))},kv=function(t,e){return(t[0]*e[1]=11?function(){var e,i=this.__clipPaths,n=this.style;if(i)for(var o=0;or;r++)o+=J(t[r-1],t[r]);var a=o/2;a=i>a?i:a;for(var r=0;a>r;r++){var s,l,h,u=r/(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 p=d*d,g=d*p;n.push([Ko(s[0],f[0],l[0],h[0],d,p,g),Ko(s[1],f[1],l[1],h[1],d,p,g)])}return n},Fv=function(t,e,i,n){var o,r,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++)ne(a,a,t[d]),oe(s,s,t[d]);ne(a,a,n[0]),oe(s,s,n[1])}for(var d=0,f=t.length;f>d;d++){var p=t[d];if(i)o=t[d?d-1:f-1],r=t[(d+1)%f];else{if(0===d||d===f-1){l.push(F(t[d]));continue}o=t[d-1],r=t[d+1]}Z(h,r,o),$(h,h,e);var g=J(p,o),v=J(p,r),m=g+v;0!==m&&(g/=m,v/=m),$(u,h,-g),$(c,h,v);var y=H([],p,u),x=H([],p,c);n&&(oe(y,y,a),ne(y,y,s),oe(x,x,a),ne(x,x,s)),l.push(y),l.push(x)}return i&&l.push(l.shift()),l},Gv=Zo.extend({type:"polygon",shape:{points:null,smooth:!1,smoothConstraint:null},buildPath:function(t,e){Jo(t,e,!0)}}),Hv=Zo.extend({type:"polyline",shape:{points:null,smooth:!1,smoothConstraint:null},style:{stroke:"#000",fill:null},buildPath:function(t,e){Jo(t,e,!1)}}),Wv=Zo.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,o=e.width,r=e.height;e.r?zi(t,e):t.rect(i,n,o,r),t.closePath()}}),Zv=Zo.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,o=e.x2,r=e.y2,a=e.percent;0!==a&&(t.moveTo(i,n),1>a&&(o=i*(1-a)+o*a,r=n*(1-a)+r*a),t.lineTo(o,r))},pointAt:function(t){var e=this.shape;return[e.x1*(1-t)+e.x2*t,e.y1*(1-t)+e.y2*t]}}),Uv=[],Xv=Zo.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,o=e.x2,r=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&&(So(i,a,o,u,Uv),a=Uv[1],o=Uv[2],So(n,s,r,u,Uv),s=Uv[1],r=Uv[2]),t.quadraticCurveTo(a,s,o,r)):(1>u&&(mo(i,a,l,o,u,Uv),a=Uv[1],l=Uv[2],o=Uv[3],mo(n,s,h,r,u,Uv),s=Uv[1],h=Uv[2],r=Uv[3]),t.bezierCurveTo(a,s,l,h,o,r)))},pointAt:function(t){return Qo(this.shape,t,!1)},tangentAt:function(t){var e=Qo(this.shape,t,!0);return K(e,e)}}),qv=Zo.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,o=Math.max(e.r,0),r=e.startAngle,a=e.endAngle,s=e.clockwise,l=Math.cos(r),h=Math.sin(r);t.moveTo(l*o+i,h*o+n),t.arc(i,n,o,r,a,!s)}}),Yv=Zo.extend({type:"compound",shape:{paths:null},_updatePathDirty:function(){for(var t=this.__dirtyPath,e=this.shape.paths,i=0;i=0;r--)n=o(n,t[r],!0);eo(this,"__defaultOption",n)}return io(this,"__defaultOption")},getReferringComponents:function(t){return this.ecModel.queryComponents({mainType:t,index:this.get(t+"Index",!0),id:this.get(t+"Id",!0)})}});ho(bm,{registerWhenExtend:!0}),sa(bm),la(bm,ga),c(bm,_m);var Sm="";"undefined"!=typeof navigator&&(Sm=navigator.platform||"");var Mm={color:["#c23531","#2f4554","#61a0a8","#d48265","#91c7ae","#749f83","#ca8622","#bda29a","#6e7074","#546570","#c4ccd3"],textStyle:{fontFamily:Sm.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},Im={clearColorPalette:function(){eo(this,"colorIdx",0),eo(this,"colorNameMap",{})},getColorFromPalette:function(t,e){e=e||this;var i=io(e,"colorIdx")||0,n=io(e,"colorNameMap")||eo(e,"colorNameMap",{});if(n.hasOwnProperty(t))return n[t];var o=this.get("color",!0)||[];if(o.length){var r=o[i];return t&&(n[t]=r),eo(e,"colorIdx",(i+1)%o.length),r}}},Tm=f,Am=v,Cm=p,Dm=_,Lm=h,Pm=S,km="\x00_ec_inner",Om=Hr.extend({constructor:Om,init:function(t,e,i,n){i=i||{},this.option=null,this._theme=new Hr(i),this._optionManager=n},setOption:function(t,e){k(!(km 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)):ma.call(this,n),e=!0}if(("timeline"===t||"media"===t)&&this.restoreData(),!t||"recreate"===t||"timeline"===t){var o=i.getTimelineOption(this);o&&(this.mergeOption(o),e=!0)}if(!t||"recreate"===t||"media"===t){var r=i.getMediaOption(this,this._api);r.length&&Tm(r,function(t){this.mergeOption(t,e=!0)},this)}return e},mergeOption:function(t){function e(e,n){var o=Ur(t[e]),s=$r(r.get(e),o);Kr(s),Tm(s,function(t){var i=t.option;Pm(i)&&(t.keyInfo.mainType=e,t.keyInfo.subType=xa(e,i,t.exist))});var l=ya(r,n);i[e]=[],r.set(e,[]),Tm(s,function(t,n){var o=t.exist,s=t.option;if(k(Pm(s)||o,"Empty component definition"),s){var h=bm.getClass(e,t.keyInfo.subType,!0);if(o&&o instanceof h)o.name=t.keyInfo.name,o.mergeOption(s,this),o.optionUpdated(s,!1);else{var u=a({dependentModels:l,componentIndex:n},t.keyInfo);o=new h(s,this,this,u),a(o,u),o.init(s,this,this,u),o.optionUpdated(null,!0)}}else o.mergeOption({},this),o.optionUpdated({},!1);r.get(e)[n]=o,i[e][n]=o.option},this),"series"===e&&(this._seriesIndices=_a(r.get("series")))}var i=this.option,r=this._componentsMap,s=[];Tm(t,function(t,e){null!=t&&(bm.hasClass(e)?s.push(e):i[e]=null==i[e]?n(t):o(i[e],t,!0))}),bm.topologicalTravel(s,bm.getAllClassMainTypes(),e,this),this._seriesIndices=this._seriesIndices||[]},getOption:function(){var t=n(this.option);return Tm(t,function(e,i){if(bm.hasClass(i)){for(var e=Ur(e),n=e.length-1;n>=0;n--)Jr(e[n])&&e.splice(n,1);t[i]=e}}),delete t[km],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,o=t.name,r=this._componentsMap.get(e);if(!r||!r.length)return[];var a;if(null!=i)Dm(i)||(i=[i]),a=Am(Cm(i,function(t){return r[t]}),function(t){return!!t});else if(null!=n){var s=Dm(n);a=Am(r,function(t){return s&&Lm(n,t.id)>=0||!s&&t.id===n})}else if(null!=o){var l=Dm(o);a=Am(r,function(t){return l&&Lm(o,t.name)>=0||!l&&t.name===o})}else a=r.slice();return wa(a,t)},findComponents:function(t){function e(t){var e=o+"Index",i=o+"Id",n=o+"Name";return!t||null==t[e]&&null==t[i]&&null==t[n]?null:{mainType:o,index:t[e],id:t[i],name:t[n]}}function i(e){return t.filter?Am(e,t.filter):e}var n=t.query,o=t.mainType,r=e(n),a=r?this.queryComponents(r):this._componentsMap.get(o);return i(wa(a,t))},eachComponent:function(t,e,i){var n=this._componentsMap;if("function"==typeof t)i=e,e=t,n.each(function(t,n){Tm(t,function(t,o){e.call(i,n,t,o)})});else if(b(t))Tm(n.get(t),e,i);else if(Pm(t)){var o=this.findComponents(t);Tm(o,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){Tm(this._seriesIndices,function(i){var n=this._componentsMap.get("series")[i];t.call(e,n,i)},this)},eachRawSeries:function(t,e){Tm(this._componentsMap.get("series"),t,e)},eachSeriesByType:function(t,e,i){Tm(this._seriesIndices,function(n){var o=this._componentsMap.get("series")[n];o.subType===t&&e.call(i,o,n)},this)},eachRawSeriesByType:function(t,e,i){return Tm(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=_a(i)},restoreData:function(){var t=this._componentsMap;this._seriesIndices=_a(t.get("series"));var e=[];t.each(function(t,i){e.push(i)}),bm.topologicalTravel(e,bm.getAllClassMainTypes(),function(e){Tm(t.get(e),function(t){t.restoreData()})})}});c(Om,Im);var zm=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isDisposed","on","off","getDataURL","getConnectedDataURL","getModel","getOption","getViewOfComponentModel","getViewOfSeriesModel"],Rm={};Sa.prototype={constructor:Sa,create:function(t,e){var i=[];f(Rm,function(n){var o=n.create(t,e);i=i.concat(o||[])}),this._coordinateSystems=i},update:function(t,e){f(this._coordinateSystems,function(i){i.update&&i.update(t,e)})},getCoordinateSystems:function(){return this._coordinateSystems.slice()}},Sa.register=function(t,e){Rm[t]=e},Sa.get=function(t){return Rm[t]};var Em=f,Bm=n,Vm=p,Nm=o,Fm=/^(min|max)?(.+)$/;Ma.prototype={constructor:Ma,setOption:function(t,e){t=Bm(t,!0);var i=this._optionBackup,n=Ia.call(this,t,e,!i);this._newBaseOption=n.baseOption,i?(Da(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=Vm(e.timelineOptions,Bm),this._mediaList=Vm(e.mediaList,Bm),this._mediaDefault=Bm(e.mediaDefault),this._currentMediaIndices=[],Bm(t?e.baseOption:this._newBaseOption)},getTimelineOption:function(t){var e,i=this._timelineOptions;if(i.length){var n=t.getComponent("timeline");n&&(e=Bm(i[n.getCurrentIndex()],!0))}return e},getMediaOption:function(){var t=this._api.getWidth(),e=this._api.getHeight(),i=this._mediaList,n=this._mediaDefault,o=[],r=[];if(!i.length&&!n)return r;for(var a=0,s=i.length;s>a;a++)Ta(i[a].query,t,e)&&o.push(a);return!o.length&&n&&(o=[-1]),o.length&&!Ca(o,this._currentMediaIndices)&&(r=Vm(o,function(t){return Bm(-1===t?n.option:i[t].option)})),this._currentMediaIndices=o,r}};var Gm=f,Hm=S,Wm=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"],Zm=function(t,e){Gm(za(t.series),function(t){Hm(t)&&Oa(t)});var i=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];e&&i.push("valueAxis","categoryAxis","logAxis","timeAxis"),Gm(i,function(e){Gm(za(t[e]),function(t){t&&(Pa(t,"axisLabel"),Pa(t.axisPointer,"label"))})}),Gm(za(t.parallel),function(t){var e=t&&t.parallelAxisDefault;Pa(e,"axisLabel"),Pa(e&&e.axisPointer,"label")}),Gm(za(t.calendar),function(t){Pa(t,"dayLabel"),Pa(t,"monthLabel"),Pa(t,"yearLabel")}),Gm(za(t.radar),function(t){Pa(t,"name")}),Gm(za(t.geo),function(t){Hm(t)&&(ka(t.label),Gm(za(t.regions),function(t){ka(t.label)}))}),ka(Ra(t.timeline).label),Pa(Ra(t.axisPointer),"label"),Pa(Ra(t.tooltip).axisPointer,"label")},Um=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],Xm=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],qm=["bar","boxplot","candlestick","chord","effectScatter","funnel","gauge","lines","graph","heatmap","line","map","parallel","pie","radar","sankey","scatter","treemap"],Ym=function(t,e){Zm(t,e),t.series=Ur(t.series),f(t.series,function(t){if(S(t)){var e=t.type;if(("pie"===e||"gauge"===e)&&null!=t.clockWise&&(t.clockwise=t.clockWise),"gauge"===e){var i=Ea(t,"pointer.color");null!=i&&Ba(t,"itemStyle.normal.color",i)}for(var n=0;n":"")+a.join(r?"
":", ")}var n=io(this,"data"),o=this.getRawValue(t),r=_(o)?i(o):jn(qn(o)),a=n.getName(t),s=n.getItemVisual(t,"color");S(s)&&s.colorStops&&(s=(s.colorStops[0]||{}).color),s=s||"transparent";var l=Jn(s),h=this.name;return"\x00-"===h&&(h=""),h=h?jn(h)+(e?": ":"
"):"",e?l+h+r:h+l+(a?jn(a)+": "+r:r)},isAnimationEnabled:function(){if(vf.node)return!1;var t=this.getShallow("animation");return t&&this.getData().count()>this.getShallow("animationThreshold")&&(t=!1),t},restoreData:function(){eo(this,"data",io(this,"dataBeforeProcessed").cloneShallow())},getColorFromPalette:function(t,e){var i=this.ecModel,n=Im.getColorFromPalette.call(this,t,e);return n||(n=i.getColorFromPalette(t,e)),n},getAxisTooltipData:null,getTooltipPosition:null});c(jm,dm),c(jm,Im);var $m=function(){this.group=new wp,this.uid=aa("viewComponent")};$m.prototype={constructor:$m,init:function(){},render:function(){},dispose:function(){}};var Km=$m.prototype;Km.updateView=Km.updateLayout=Km.updateVisual=function(){},ao($m),ho($m,{registerWhenExtend:!0}),Na.prototype={type:"chart",init:function(){},render:function(){},highlight:function(t,e,i,n){Ga(t.getData(),n,"emphasis")},downplay:function(t,e,i,n){Ga(t.getData(),n,"normal")},remove:function(){this.group.removeAll()},dispose:function(){}};var Jm=Na.prototype;Jm.updateView=Jm.updateLayout=Jm.updateVisual=function(t,e,i,n){this.render(t,e,i,n)},ao(Na,["dispose"]),ho(Na,{registerWhenExtend:!0});var Qm="\x00__throttleOriginMethod",ty="\x00__throttleRate",ey="\x00__throttleType",iy=function(t){function e(e){var i=(e.visualColorAccessPath||"itemStyle.normal.color").split("."),n=e.getData(),o=e.get(i)||e.getColorFromPalette(e.get("name"));n.setVisual("color",o),t.isSeriesFiltered(e)||("function"!=typeof o||o instanceof jv||n.each(function(t){n.setItemVisual(t,"color",o(e.getDataParams(t)))}),n.each(function(t){var e=n.getItemModel(t),o=e.get(i,!0);null!=o&&n.setItemVisual(t,"color",o)}))}t.eachRawSeries(e)},ny=Math.PI,oy=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 Wv({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4}),n=new qv({shape:{startAngle:-ny/2,endAngle:-ny/2+.1,r:10},style:{stroke:e.color,lineCap:"round",lineWidth:5},zlevel:e.zlevel,z:10001}),o=new Wv({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*ny/2}).start("circularInOut"),n.animateShape(!0).when(1e3,{startAngle:3*ny/2}).delay(300).start("circularInOut");var r=new wp;return r.add(n),r.add(o),r.add(i),r.resize=function(){var e=t.getWidth()/2,r=t.getHeight()/2;n.setShape({cx:e,cy:r});var a=n.shape.r;o.setShape({x:e-a,y:r-a,width:2*a,height:2*a}),i.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},r.resize(),r},ry=f,ay=bm.parseClassType,sy="3.8.4",ly={zrender:"3.7.3"},hy=1e3,uy=5e3,cy=1e3,dy=2e3,fy=3e3,py=4e3,gy=5e3,vy={PROCESSOR:{FILTER:hy,STATISTIC:uy},VISUAL:{LAYOUT:cy,GLOBAL:dy,CHART:fy,COMPONENT:py,BRUSH:gy}},my="__flagInMainProcess",yy="__hasGradientOrPatternBg",xy="__optionUpdated",_y=/^[a-zA-Z0-9_]+$/;Xa.prototype.on=Ua("on"),Xa.prototype.off=Ua("off"),Xa.prototype.one=Ua("one"),c(Xa,Ff);var wy=qa.prototype;wy._onframe=function(){if(this[xy]){var t=this[xy].silent;this[my]=!0,by.prepareAndUpdate.call(this),this[my]=!1,this[xy]=!1,Ka.call(this,t),Ja.call(this,t)}},wy.getDom=function(){return this._dom},wy.getZr=function(){return this._zr},wy.setOption=function(t,e,i){var n;if(S(e)&&(i=e.lazyUpdate,n=e.silent,e=e.notMerge),this[my]=!0,!this._model||e){var o=new Ma(this._api),r=this._theme,a=this._model=new Om(null,null,r,o);a.init(null,null,r,o)}this._model.setOption(t,Ay),i?(this[xy]={silent:n},this[my]=!1):(by.prepareAndUpdate.call(this),this._zr.flush(),this[xy]=!1,this[my]=!1,Ka.call(this,n),Ja.call(this,n))},wy.setTheme=function(){console.log("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},wy.getModel=function(){return this._model},wy.getOption=function(){return this._model&&this._model.getOption()},wy.getWidth=function(){return this._zr.getWidth()},wy.getHeight=function(){return this._zr.getHeight()},wy.getDevicePixelRatio=function(){return this._zr.painter.dpr||window.devicePixelRatio||1 },wy.getRenderedCanvas=function(t){if(vf.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)}},wy.getSvgDataUrl=function(){if(vf.svgSupported){var t=this._zr,e=t.storage.getDisplayList();return f(e,function(t){t.stopAnimation(!0)}),t.painter.pathToSvg()}},wy.getDataURL=function(t){t=t||{};var e=t.excludeComponents,i=this._model,n=[],o=this;ry(e,function(t){i.eachComponent({mainType:t},function(t){var e=o._componentsMap[t.__viewId];e.group.ignore||(n.push(e),e.group.ignore=!0)})});var r="svg"===this._zr.painter.getType()?this.getSvgDataUrl():this.getRenderedCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return ry(n,function(t){t.group.ignore=!1}),r},wy.getConnectedDataURL=function(t){if(vf.canvasSupported){var e=this.group,i=Math.min,o=Math.max,r=1/0;if(Oy[e]){var a=r,s=r,l=-r,h=-r,u=[],c=t&&t.pixelRatio||1;f(ky,function(r){if(r.group===e){var c=r.getRenderedCanvas(n(t)),d=r.getDom().getBoundingClientRect();a=i(d.left,a),s=i(d.top,s),l=o(d.right,l),h=o(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,p=h-s,g=Af();g.width=d,g.height=p;var v=In(g);return ry(u,function(t){var e=new tn({style:{x:t.left*c-a,y:t.top*c-s,image:t.dom}});v.add(e)}),v.refreshImmediately(),g.toDataURL("image/"+(t&&t.type||"png"))}return this.getDataURL(t)}},wy.convertToPixel=x(Ya,"convertToPixel"),wy.convertFromPixel=x(Ya,"convertFromPixel"),wy.containPixel=function(t,e){var i,n=this._model;return t=ea(n,t),f(t,function(t,n){n.indexOf("Models")>=0&&f(t,function(t){var o=t.coordinateSystem;if(o&&o.containPoint)i|=!!o.containPoint(e);else if("seriesModels"===n){var r=this._chartsMap[t.__viewId];r&&r.containPoint&&(i|=r.containPoint(e,t))}},this)},this),!!i},wy.getVisual=function(t,e){var i=this._model;t=ea(i,t,{defaultMainType:"series"});var n=t.seriesModel,o=n.getData(),r=t.hasOwnProperty("dataIndexInside")?t.dataIndexInside:t.hasOwnProperty("dataIndex")?o.indexOfRawIndex(t.dataIndex):null;return null!=r?o.getItemVisual(r,e):o.getVisual(e)},wy.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},wy.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]};var by={update:function(t){var e=this._model,i=this._api,n=this._coordSysMgr,o=this._zr;if(e){e.restoreData(),n.create(this._model,this._api),es.call(this,e,i),is.call(this,e),n.update(e,i),os.call(this,e,t),rs.call(this,e,t);var r=e.get("backgroundColor")||"transparent",a=o.painter;if(a.isSingleCanvas&&a.isSingleCanvas())o.configLayer(0,{clearColor:r});else{if(!vf.canvasSupported){var s=Le(r);r=Ne(s,"rgb"),0===s[3]&&(r="transparent")}r.colorStops||r.image?(o.configLayer(0,{clearColor:r}),this[yy]=!0,this._dom.style.background="transparent"):(this[yy]&&o.configLayer(0,{clearColor:null}),this[yy]=!1,this._dom.style.background=r)}ry(Cy,function(t){t(e,i)})}},updateView:function(t){var e=this._model;e&&(e.eachSeries(function(t){t.getData().clearAllVisual()}),os.call(this,e,t),Qa.call(this,"updateView",e,t))},updateVisual:function(t){var e=this._model;e&&(e.eachSeries(function(t){t.getData().clearAllVisual()}),os.call(this,e,t,!0),Qa.call(this,"updateVisual",e,t))},updateLayout:function(t){var e=this._model;e&&(ns.call(this,e,t),Qa.call(this,"updateLayout",e,t))},prepareAndUpdate:function(t){var e=this._model;ts.call(this,"component",e),ts.call(this,"chart",e),by.update.call(this,t)}};wy.resize=function(t){this[my]=!0,this._zr.resize(t);var e=this._model&&this._model.resetOption("media"),i=e?"prepareAndUpdate":"update";by[i].call(this),this._loadingFX&&this._loadingFX.resize(),this[my]=!1;var n=t&&t.silent;Ka.call(this,n),Ja.call(this,n)},wy.showLoading=function(t,e){if(S(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),Py[t]){var i=Py[t](this._api,e),n=this._zr;this._loadingFX=i,n.add(i)}},wy.hideLoading=function(){this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},wy.makeActionFromEvent=function(t){var e=a({},t);return e.type=Iy[t.type],e},wy.dispatchAction=function(t,e){if(S(e)||(e={silent:!!e}),My[t.type]&&this._model){if(this[my])return void this._pendingActions.push(t);$a.call(this,t,e.silent),e.flush?this._zr.flush(!0):e.flush!==!1&&vf.browser.weChat&&this._throttledZrFlush(),Ka.call(this,e.silent),Ja.call(this,e.silent)}},wy.on=Ua("on"),wy.off=Ua("off"),wy.one=Ua("one");var Sy=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];wy._initEvents=function(){ry(Sy,function(t){this._zr.on(t,function(e){var i,n=this.getModel(),o=e.target;if("globalout"===t)i={};else if(o&&null!=o.dataIndex){var r=o.dataModel||n.getSeriesByIndex(o.seriesIndex);i=r&&r.getDataParams(o.dataIndex,o.dataType)||{}}else o&&o.eventData&&(i=a({},o.eventData));i&&(i.event=e,i.type=t,this.trigger(t,i))},this)},this),ry(Iy,function(t,e){this._messageCenter.on(e,function(t){this.trigger(e,t)},this)},this)},wy.isDisposed=function(){return this._disposed},wy.clear=function(){this.setOption({series:[]},!0)},wy.dispose=function(){if(!this._disposed){this._disposed=!0;var t=this._api,e=this._model;ry(this._componentsViews,function(i){i.dispose(e,t)}),ry(this._chartsViews,function(i){i.dispose(e,t)}),this._zr.dispose(),delete ky[this.id]}},c(qa,Ff);var My={},Iy={},Ty=[],Ay=[],Cy=[],Dy=[],Ly={},Py={},ky={},Oy={},zy=new Date-0,Ry=new Date-0,Ey="_echarts_instance_",By={},Vy=fs;Is(dy,iy),ys(Ym),Ts("default",oy),ws({type:"highlight",event:"highlight",update:"highlight"},B),ws({type:"downplay",event:"downplay",update:"downplay"},B);var Ny={};Rs.prototype={constructor:Rs,add:function(t){return this._add=t,this},update:function(t){return this._update=t,this},remove:function(t){return this._remove=t,this},execute:function(){var t,e=this._old,i=this._new,n={},o={},r=[],a=[];for(Es(e,n,r,"_oldKeyGetter",this),Es(i,o,a,"_newKeyGetter",this),t=0;tu;u++)this._add&&this._add(l[u]);else this._add&&this._add(l)}}}};var Fy=S,Gy="undefined",Hy=typeof window===Gy?global:window,Wy={"float":typeof Hy.Float64Array===Gy?Array:Hy.Float64Array,"int":typeof Hy.Int32Array===Gy?Array:Hy.Int32Array,ordinal:Array,number:Array,time:Array},Zy=["stackedOn","hasItemOption","_nameList","_idList","_rawData"];Vs.prototype.pure=!1,Vs.prototype.count=function(){return this._array.length},Vs.prototype.getItem=function(t){return this._array[t]};var Uy=function(t,e){t=t||["x","y"];for(var i={},n=[],o=0;od;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!=o&&(e[d]=r[s[o]][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},Xy.count=function(){return this.indices.length},Xy.get=function(t,e,i){var n=this._storage,o=this.indices[e];if(null==o||!n[t])return 0/0;var r=n[t][o];if(i){var a=this._dimensionInfos[t];if(a&&a.stackable)for(var s=this.stackedOn;s;){var l=s.get(t,e);(r>=0&&l>0||0>=r&&0>l)&&(r+=l),s=s.stackedOn}}return r},Xy.getValues=function(t,e,i){var n=[];_(t)||(i=e,e=t,t=this.dimensions);for(var o=0,r=t.length;r>o;o++)n.push(this.get(t[o],e,i));return n},Xy.hasValue=function(t){for(var e=this.dimensions,i=this._dimensionInfos,n=0,o=e.length;o>n;n++)if("ordinal"!==i[e[n]].type&&isNaN(this.get(e[n],t)))return!1;return!0},Xy.getDataExtent=function(t,e,i){t=this.getDimension(t);var n=this._storage[t],o=this.getDimensionInfo(t);e=o&&o.stackable&&e;var r,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++)r=this.get(t,h,e),(!i||i(r,t,h))&&(s>r&&(s=r),r>l&&(l=r));return this._extent[t+!!e]=[s,l]}return[1/0,-1/0]},Xy.getSum=function(t,e){var i=this._storage[t],n=0;if(i)for(var o=0,r=this.count();r>o;o++){var a=this.get(t,o,e);isNaN(a)||(n+=a)}return n},Xy.indexOf=function(t,e){var i=this._storage,n=i[t],o=this.indices;if(n)for(var r=0,a=o.length;a>r;r++){var s=o[r];if(n[s]===e)return r}return-1},Xy.indexOfName=function(t){for(var e=this.indices,i=this._nameList,n=0,o=e.length;o>n;n++){var r=e[n];if(i[r]===t)return n}return-1},Xy.indexOfRawIndex=function(t){var e=this.indices,i=e[t];if(null!=i&&i===t)return t;for(var n=0,o=e.length-1;o>=n;){var r=(n+o)/2|0;if(e[r]t))return r;o=r-1}}return-1},Xy.indicesOfNearest=function(t,e,i,n){var o=this._storage,r=o[t],a=[];if(!r)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},Xy.getRawIndex=function(t){var e=this.indices[t];return null==e?-1:e},Xy.getRawDataItem=function(t){return this._rawData.getItem(this.getRawIndex(t))},Xy.getName=function(t){return this._nameList[this.indices[t]]||""},Xy.getId=function(t){return this._idList[this.indices[t]]||this.getRawIndex(t)+""},Xy.each=function(t,e,i,n){"function"==typeof t&&(n=i,i=e,e=t,t=[]),t=p(Ns(t),this.getDimension,this);var o=[],r=t.length,a=this.indices;n=n||this;for(var s=0;sl;l++)o[l]=this.get(t[l],s,i);o[l]=s,e.apply(n,o)}},Xy.filterSelf=function(t,e,i,n){"function"==typeof t&&(n=i,i=e,e=t,t=[]),t=p(Ns(t),this.getDimension,this);var o=[],r=[],a=t.length,s=this.indices;n=n||this;for(var l=0;lu;u++)r[u]=this.get(t[u],l,i);r[u]=l,h=e.apply(n,r)}else h=e.call(n,l);h&&o.push(s[l])}return this.indices=o,this._extent={},this},Xy.mapArray=function(t,e,i,n){"function"==typeof t&&(n=i,i=e,e=t,t=[]);var o=[];return this.each(t,function(){o.push(e&&e.apply(this,arguments))},i,n),o},Xy.map=function(t,e,i,n){t=p(Ns(t),this.getDimension,this);var o=Fs(this,t),r=o.indices=this.indices,a=o._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 o=0;op;p+=c){c>f-p&&(c=f-p,h.length=c);for(var g=0;c>g;g++){var v=s[p+g];h[g]=d[v],u[g]=v}var m=i(h),v=u[n(h,m)||0];d[v]=m,l.push(v)}return o},Xy.getItemModel=function(t){var e=this.hostModel;return t=this.indices[t],new Hr(this._rawData.getItem(t),e,e&&e.ecModel)},Xy.diff=function(t){var e,i=this._idList,n=t&&t._idList,o="e\x00\x00";return new Rs(t?t.indices:[],this.indices,function(t){return null!=(e=n[t])?e:o+t},function(t){return null!=(e=i[t])?e:o+t})},Xy.getVisual=function(t){var e=this._visual;return e&&e[t]},Xy.setVisual=function(t,e){if(Fy(t))for(var i in t)t.hasOwnProperty(i)&&this.setVisual(i,t[i]);else this._visual=this._visual||{},this._visual[t]=e},Xy.setLayout=function(t,e){if(Fy(t))for(var i in t)t.hasOwnProperty(i)&&this.setLayout(i,t[i]);else this._layout[t]=e},Xy.getLayout=function(t){return this._layout[t]},Xy.getItemLayout=function(t){return this._itemLayouts[t]},Xy.setItemLayout=function(t,e,i){this._itemLayouts[t]=i?a(this._itemLayouts[t]||{},e):e},Xy.clearItemLayouts=function(){this._itemLayouts.length=0},Xy.getItemVisual=function(t,e,i){var n=this._itemVisuals[t],o=n&&n[e];return null!=o||i?o:this.getVisual(e)},Xy.setItemVisual=function(t,e,i){var n=this._itemVisuals[t]||{};if(this._itemVisuals[t]=n,Fy(e))for(var o in e)e.hasOwnProperty(o)&&(n[o]=e[o]);else n[e]=i},Xy.clearAllVisual=function(){this._visual={},this._itemVisuals=[]};var qy=function(t){t.seriesIndex=this.seriesIndex,t.dataIndex=this.dataIndex,t.dataType=this.dataType};Xy.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(qy,e)),this._graphicEls[t]=e},Xy.getItemGraphicEl=function(t){return this._graphicEls[t]},Xy.eachItemGraphicEl=function(t,e){f(this._graphicEls,function(i,n){i&&t&&t.call(e,i,n)})},Xy.cloneShallow=function(){var t=p(this.dimensions,this.getDimensionInfo,this),e=new Uy(t,this.hostModel);return e._storage=this._storage,Bs(e,this),e.indices=this.indices.slice(),this._extent&&(e._extent=a({},this._extent)),e},Xy.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(L(arguments)))})},Xy.TRANSFERABLE_METHODS=["cloneShallow","downSample","map"],Xy.CHANGABLE_METHODS=["filterSelf"];var Yy=f,jy=b,$y=s,Ky={tooltip:1,label:1,itemName:1},Jy=Gs.guessOrdinal=function(t,e){for(var i=0,n=t.length;n>i;i++){var o=Hs(t[i]);if(!_(o))return!1;var o=o[e];if(null!=o&&isFinite(o)&&""!==o)return!1;if(jy(o)&&"-"!==o)return!0}return!1},Qy={cartesian2d:function(t,e,i,n){var o=p(["xAxis","yAxis"],function(t){return i.queryComponents({mainType:t,index:e.get(t+"Index"),id:e.get(t+"Id")})[0]}),r=o[0],a=o[1],s=r.get("type"),l=a.get("type"),h=[{name:"x",type:qs(s),stackable:Xs(s)},{name:"y",type:qs(l),stackable:Xs(l)}],u="category"===s,c="category"===l;h=Gs(h,t,n);var d={};return u&&(d.x=r),c&&(d.y=a),{dimensions:h,categoryIndex:u?0:c?1:-1,categoryAxesModels:d}},singleAxis:function(t,e,i,n){var o=i.queryComponents({mainType:"singleAxis",index:e.get("singleAxisIndex"),id:e.get("singleAxisId")})[0],r=o.get("type"),a="category"===r,s=[{name:"single",type:qs(r),stackable:Xs(r)}];s=Gs(s,t,n);var l={};return a&&(l.single=o),{dimensions:s,categoryIndex:a?0:-1,categoryAxesModels:l}},polar:function(t,e,i,n){var o=i.queryComponents({mainType:"polar",index:e.get("polarIndex"),id:e.get("polarId")})[0],r=o.findAxisModel("angleAxis"),a=o.findAxisModel("radiusAxis"),s=a.get("type"),l=r.get("type"),h=[{name:"radius",type:qs(s),stackable:Xs(s)},{name:"angle",type:qs(l),stackable:Xs(l)}],u="category"===l,c="category"===s;h=Gs(h,t,n);var d={};return c&&(d.radius=a),u&&(d.angle=r),{dimensions:h,categoryIndex:u?1:c?0:-1,categoryAxesModels:d}},geo:function(t,e,i,n){return{dimensions:Gs([{name:"lng"},{name:"lat"}],t,n)}}};js.prototype.parse=function(t){return t},js.prototype.getSetting=function(t){return this._setting[t]},js.prototype.contain=function(t){var e=this._extent;return t>=e[0]&&t<=e[1]},js.prototype.normalize=function(t){var e=this._extent;return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])},js.prototype.scale=function(t){var e=this._extent;return t*(e[1]-e[0])+e[0]},js.prototype.unionExtent=function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1])},js.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getDataExtent(e,!0))},js.prototype.getExtent=function(){return this._extent.slice()},js.prototype.setExtent=function(t,e){var i=this._extent;isNaN(t)||(i[0]=t),isNaN(e)||(i[1]=e)},js.prototype.getTicksLabels=function(){for(var t=[],e=this.getTicks(),i=0;ie[1]&&(e[1]=t[1]),ox.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=Ks(t)},getTicks:function(){return tl(this._interval,this._extent,this._niceExtent,this._intervalPrecision)},getTicksLabels:function(){for(var t=[],e=this.getTicks(),i=0;io&&(o=-o,n.reverse());var r=$s(n,t,e,i);this._intervalPrecision=r.intervalPrecision,this._interval=r.interval,this._niceExtent=r.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 o=this._interval;t.fixMin||(e[0]=nx(Math.floor(e[0]/o)*o)),t.fixMax||(e[1]=nx(Math.ceil(e[1]/o)*o))}});ox.create=function(){return new ox};var rx=ox.prototype,ax=Math.ceil,sx=Math.floor,lx=1e3,hx=60*lx,ux=60*hx,cx=24*ux,dx=function(t,e,i,n){for(;n>i;){var o=i+n>>>1;t[o][1]r&&(r=e),null!=i&&r>i&&(r=i);var a=px.length,s=dx(px,r,0,a),l=px[Math.min(s,a-1)],h=l[1];if("year"===l[0]){var u=o/h,c=Zn(u/t,!0);h*=c}var d=this.getSetting("useUTC")?0:60*new Date(+n[0]||+n[1]).getTimezoneOffset()*1e3,f=[Math.round(ax((n[0]-d)/h)*h+d),Math.round(sx((n[1]-d)/h)*h+d)];Qs(f,n),this._stepLvl=l,this._interval=h,this._niceExtent=f},parse:function(t){return+Gn(t)}});f(["contain","normalize"],function(t){fx.prototype[t]=function(e){return rx[t].call(this,this.parse(e))}});var px=[["hh:mm:ss",lx],["hh:mm:ss",5*lx],["hh:mm:ss",10*lx],["hh:mm:ss",15*lx],["hh:mm:ss",30*lx],["hh:mm\nMM-dd",hx],["hh:mm\nMM-dd",5*hx],["hh:mm\nMM-dd",10*hx],["hh:mm\nMM-dd",15*hx],["hh:mm\nMM-dd",30*hx],["hh:mm\nMM-dd",ux],["hh:mm\nMM-dd",2*ux],["hh:mm\nMM-dd",6*ux],["hh:mm\nMM-dd",12*ux],["MM-dd\nyyyy",cx],["MM-dd\nyyyy",2*cx],["MM-dd\nyyyy",3*cx],["MM-dd\nyyyy",4*cx],["MM-dd\nyyyy",5*cx],["MM-dd\nyyyy",6*cx],["week",7*cx],["MM-dd\nyyyy",10*cx],["week",14*cx],["week",21*cx],["month",31*cx],["week",42*cx],["month",62*cx],["week",42*cx],["quarter",380*cx/4],["month",31*cx*4],["month",31*cx*5],["half-year",380*cx/2],["month",31*cx*8],["month",31*cx*10],["year",380*cx]];fx.create=function(t){return new fx({useUTC:t.ecModel.get("useUTC")})};var gx=js.prototype,vx=ox.prototype,mx=En,yx=On,xx=Math.floor,_x=Math.ceil,wx=Math.pow,bx=Math.log,Sx=js.extend({type:"log",base:10,$constructor:function(){js.apply(this,arguments),this._originalScale=new ox},getTicks:function(){var t=this._originalScale,e=this._extent,i=t.getExtent();return p(vx.getTicks.call(this),function(n){var o=On(wx(this.base,n));return o=n===e[0]&&t.__fixMin?el(o,i[0]):o,o=n===e[1]&&t.__fixMax?el(o,i[1]):o},this)},getLabel:vx.getLabel,scale:function(t){return t=gx.scale.call(this,t),wx(this.base,t)},setExtent:function(t,e){var i=this.base;t=bx(t)/bx(i),e=bx(e)/bx(i),vx.setExtent.call(this,t,e)},getExtent:function(){var t=this.base,e=gx.getExtent.call(this);e[0]=wx(t,e[0]),e[1]=wx(t,e[1]);var i=this._originalScale,n=i.getExtent();return i.__fixMin&&(e[0]=el(e[0],n[0])),i.__fixMax&&(e[1]=el(e[1],n[1])),e},unionExtent:function(t){this._originalScale.unionExtent(t);var e=this.base;t[0]=bx(t[0])/bx(e),t[1]=bx(t[1])/bx(e),gx.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=Hn(i),o=t/i*n;for(.5>=o&&(n*=10);!isNaN(n)&&Math.abs(n)<1&&Math.abs(n)>0;)n*=10;var r=[On(_x(e[0]/n)*n),On(xx(e[1]/n)*n)];this._interval=n,this._niceExtent=r}},niceExtent:function(t){vx.niceExtent.call(this,t);var e=this._originalScale;e.__fixMin=t.fixMin,e.__fixMax=t.fixMax}});f(["contain","normalize"],function(t){Sx.prototype[t]=function(e){return e=bx(e)/bx(this.base),gx[t].call(this,e)}}),Sx.create=function(){return new Sx};var Mx={getFormattedLabels:function(){return sl(this.axis,this.get("axisLabel.formatter"))},getCategories:function(){return"category"===this.get("type")&&p(this.get("data"),hl)},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&&!T(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&&!T(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:B,setRange:function(t,e){this.option.rangeStart=t,this.option.rangeEnd=e},resetRange:function(){this.option.rangeStart=this.option.rangeEnd=null}},Ix=tr({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var i=e.cx,n=e.cy,o=e.width/2,r=e.height/2;t.moveTo(i,n-r),t.lineTo(i+o,n+r),t.lineTo(i-o,n+r),t.closePath()}}),Tx=tr({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var i=e.cx,n=e.cy,o=e.width/2,r=e.height/2;t.moveTo(i,n-r),t.lineTo(i+o,n),t.lineTo(i,n+r),t.lineTo(i-o,n),t.closePath()}}),Ax=tr({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var i=e.x,n=e.y,o=e.width/5*3,r=Math.max(o,e.height),a=o/2,s=a*a/(r-a),l=n-r+a+s,h=Math.asin(s/a),u=Math.cos(h)*a,c=Math.sin(h),d=Math.cos(h),f=.6*a,p=.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-p,i,n),t.bezierCurveTo(i,n-p,i-u+c*f,l+s+d*f,i-u,l+s),t.closePath()}}),Cx=tr({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var i=e.height,n=e.width,o=e.x,r=e.y,a=n/3*2;t.moveTo(o,r),t.lineTo(o+a,r+i),t.lineTo(o,r+i/4*3),t.lineTo(o-a,r+i),t.lineTo(o,r),t.closePath()}}),Dx={line:Zv,rect:Wv,roundRect:Wv,square:Wv,circle:zv,diamond:Tx,pin:Ax,arrow:Cx,triangle:Ix},Lx={line:function(t,e,i,n,o){o.x1=t,o.y1=e+n/2,o.x2=t+i,o.y2=e+n/2},rect:function(t,e,i,n,o){o.x=t,o.y=e,o.width=i,o.height=n},roundRect:function(t,e,i,n,o){o.x=t,o.y=e,o.width=i,o.height=n,o.r=Math.min(i,n)/4},square:function(t,e,i,n,o){var r=Math.min(i,n);o.x=t,o.y=e,o.width=r,o.height=r},circle:function(t,e,i,n,o){o.cx=t+i/2,o.cy=e+n/2,o.r=Math.min(i,n)/2},diamond:function(t,e,i,n,o){o.cx=t+i/2,o.cy=e+n/2,o.width=i,o.height=n},pin:function(t,e,i,n,o){o.x=t+i/2,o.y=e+n/2,o.width=i,o.height=n},arrow:function(t,e,i,n,o){o.x=t+i/2,o.y=e+n/2,o.width=i,o.height=n},triangle:function(t,e,i,n,o){o.cx=t+i/2,o.cy=e+n/2,o.width=i,o.height=n}},Px={};f(Dx,function(t,e){Px[e]=new t});var kx=tr({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,o=Px[n];"none"!==e.symbolType&&(o||(n="rect",o=Px[n]),Lx[n](e.x,e.y,e.width,e.height,o.shape),o.buildPath(t,o.shape,i))}}),Ox=(Object.freeze||Object)({createList:dl,createScale:fl,mixinAxisModelCommonMethods:pl,completeDimensions:Gs,createSymbol:cl}),zx=Pn,Rx=[0,1],Ex=function(t,e,i){this.dim=t,this.scale=e,this._extent=i||[0,0],this.inverse=!1,this.onBand=!1,this._labelInterval};Ex.prototype={constructor:Ex,contain:function(t){var e=this._extent,i=Math.min(e[0],e[1]),n=Math.max(e[0],e[1]);return t>=i&&n>=t},containData:function(t){return this.contain(this.dataToCoord(t))},getExtent:function(){return this._extent.slice()},getPixelPrecision:function(t){return Bn(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(),gl(i,n.count())),zx(t,Rx,i,e)},coordToData:function(t,e){var i=this._extent,n=this.scale;this.onBand&&"ordinal"===n.type&&(i=i.slice(),gl(i,n.count()));var o=zx(t,i,Rx,e);return this.scale.scale(o)},pointToData:function(){},getTicksCoords:function(t){if(this.onBand&&!t){for(var e=this.getBands(),i=[],n=0;na;a++)e.push([r*a/i+n,r*(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=al(p(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 Bx=1e-8;yl.prototype={constructor:yl,properties:null,getBoundingRect:function(){var t=this._rect;if(t)return t;for(var e=Number.MAX_VALUE,i=[e,e],n=[-e,-e],o=[],r=[],a=this.geometries,s=0;sn;n++)if("polygon"===i[n].type){var r=i[n].exterior,a=i[n].interiors;if(ml(r,t[0],t[1])){for(var s=0;s<(a?a.length:0);s++)if(ml(a[s]))continue t;return!0}}return!1},transformTo:function(t,e,i,n){var o=this.getBoundingRect(),r=o.width/o.height;i?n||(n=i/r):i=r*n;for(var a=new Qe(t,e,i,n),s=o.calculateTransform(a),l=this.geometries,h=0;h0}),function(t){var e=t.properties,i=t.geometry,n=i.coordinates,o=[];"Polygon"===i.type&&o.push({type:"polygon",exterior:n[0],interiors:n.slice(1)}),"MultiPolygon"===i.type&&f(n,function(t){t[0]&&o.push({type:"polygon",exterior:t[0],interiors:t.slice(1)})});var r=new yl(e.name,o,e.cp);return r.properties=e,r})},Nx={};f(["map","each","filter","indexOf","inherits","reduce","filter","bind","curry","isArray","isString","isObject","isFunction","extend","defaults","clone","merge"],function(t){Nx[t]=kf[t]});var Fx="__ec_stack_";Tl.getLayoutOnAxis=Sl;var Gx=function(t){this._axes={},this._dimList=[],this.name=t||""};Gx.prototype={constructor:Gx,type:"cartesian",getAxis:function(t){return this._axes[t]},getAxes:function(){return p(this._dimList,Al,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?[]:{},o=0;oe[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(Hx,Ex);var Wx={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)"]}}},Zx={}; Zx.categoryAxis=o({boundaryGap:!0,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},Wx),Zx.valueAxis=o({boundaryGap:[0,0],splitNumber:5},Wx),Zx.timeAxis=s({scale:!0,min:"dataMin",max:"dataMax"},Zx.valueAxis),Zx.logAxis=s({scale:!0,logBase:10},Zx.valueAxis);var Ux=["value","category","time","log"],Xx=function(t,e,i,n){f(Ux,function(a){e.extend({type:t+"Axis."+a,mergeDefaultAndTheme:function(e,n){var r=this.layoutMode,s=r?fa(e):{},l=n.getTheme();o(e,l.get(a+"Axis")),o(e,this.getDefaultOption()),e.type=i(t,e),r&&da(e,s,r)},defaultOption:r([{},Zx[a+"Axis"],n],!0)})}),bm.registerSubTypeDefaulter(t+"Axis",x(i,t))},qx=bm.extend({type:"cartesian2dAxis",axis:null,init:function(){qx.superApply(this,"init",arguments),this.resetRange()},mergeOption:function(){qx.superApply(this,"mergeOption",arguments),this.resetRange()},restoreData:function(){qx.superApply(this,"restoreData",arguments),this.resetRange()},getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"grid",index:this.option.gridIndex,id:this.option.gridId})[0]}});o(qx.prototype,Mx);var Yx={offset:0};Xx("x",qx,Dl,Yx),Xx("y",qx,Dl,Yx),bm.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 jx=f,$x=rl,Kx=nl,Jx=Ol.prototype;Jx.type="grid",Jx.axisPointerEnabled=!0,Jx.getRect=function(){return this._rect},Jx.update=function(t,e){var i=this._axesMap;this._updateScale(t,this.model),jx(i.x,function(t){Kx(t.scale,t.model)}),jx(i.y,function(t){Kx(t.scale,t.model)}),jx(i.x,function(t){zl(i,"y",t)}),jx(i.y,function(t){zl(i,"x",t)}),this.resize(this.model,e)},Jx.resize=function(t,e,i){function n(){jx(r,function(t){var e=t.isHorizontal(),i=e?[0,o.width]:[0,o.height],n=t.inverse?1:0;t.setExtent(i[n],i[1-n]),El(t,e?o.x:o.y)})}var o=ua(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()});this._rect=o;var r=this._axesList;n(),!i&&t.get("containLabel")&&(jx(r,function(t){if(!t.model.get("axisLabel.inside")){var e=kl(t);if(e){var i=t.isHorizontal()?"height":"width",n=t.model.get("axisLabel.margin");o[i]-=e[i]+n,"top"===t.position?o.y+=e.height+n:"left"===t.position&&(o.x+=e.width+n)}}}),n())},Jx.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]}},Jx.getAxes=function(){return this._axesList.slice()},Jx.getCartesian=function(t,e){if(null!=t&&null!=e){var i="x"+t+"y"+e;return this._coordsMap[i]}S(t)&&(e=t.yAxisIndex,t=t.xAxisIndex);for(var n=0,o=this._coordsList;n0?1:-1,a=n.height>0?1:-1;return{x:n.x+r*o/2,y:n.y+a*o/2,width:n.width-r*o,height:n.height-a*o}},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}}},a_=Math.PI,s_=function(t,e){this.opt=e,this.axisModel=t,s(e,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0}),this.group=new wp;var i=new wp({position:e.position.slice(),rotation:e.rotation});i.updateTransform(),this._transform=i.transform,this._dumbGroup=i};s_.prototype={constructor:s_,hasBuilder:function(t){return!!l_[t]},add:function(t){l_[t].call(this)},getGroup:function(){return this.group}};var l_={axisLine:function(){var t=this.opt,e=this.axisModel;if(e.get("axisLine.show")){var i=this.axisModel.axis.getExtent(),n=this._transform,o=[i[0],0],r=[i[1],0];n&&(ie(o,o,n),ie(r,r,n));var s=a({lineCap:"round"},e.getModel("axisLine.lineStyle").getLineStyle());this.group.add(new Zv(ar({anid:"line",shape:{x1:o[0],y1:o[1],x2:r[0],y2:r[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,o],[t.rotation-Math.PI/2,r]],function(t,e){if("none"!==l[e]&&null!=l[e]){var i=cl(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=Jl(this,t,e),n=Ql(this,t,e);Yl(t,n,i)},axisName:function(){var t=this.opt,e=this.axisModel,i=A(t.axisName,e.get("name"));if(i){var n,o=e.get("nameLocation"),r=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"===o?h[0]-u*l:"end"===o?h[1]+u*l:(h[0]+h[1])/2,Kl(o)?t.labelOffset+r*l:0],d=e.get("nameRotate");null!=d&&(d=d*a_/180);var f;Kl(o)?n=h_(t.rotation,null!=d?d:t.rotation,r):(n=Xl(t,o,d||0,h),f=t.axisNameAvailableWidth,null!=f&&(f=Math.abs(f/Math.sin(n.rotation)),!isFinite(f)&&(f=null)));var p=s.getFont(),g=e.get("nameTruncate",!0)||{},v=g.ellipsis,m=A(t.nameTruncateMaxWidth,g.maxWidth,f),y=null!=v&&null!=m?wg(i,m,p,v,{minChar:2,placeholder:g.placeholder}):i,x=e.get("tooltip",!0),_=e.mainType,w={componentType:_,name:i,$vars:["name"]};w[_+"Index"]=e.componentIndex;var b=new Ov({anid:"name",__fullText:i,__truncatedText:y,position:c,rotation:n.rotation,silent:ql(e),z2:1,tooltip:x&&x.show?a({content:i,formatter:function(){return i},formatterParams:w},x):null});Sr(b.style,s,{text:y,textFont:p,textFill:s.getTextColor()||e.get("axisLine.lineStyle.color"),textAlign:n.textAlign,textVerticalAlign:n.textVerticalAlign}),e.get("triggerEvent")&&(b.eventData=Ul(e),b.eventData.targetType="axisName",b.eventData.name=i),this._dumbGroup.add(b),b.updateTransform(),this.group.add(b),b.decomposeTransform()}}},h_=s_.innerTextLayout=function(t,e,i){var n,o,r=Nn(e-t);return Fn(r)?(o=i>0?"top":"bottom",n="center"):Fn(r-a_)?(o=i>0?"bottom":"top",n="center"):(o="middle",n=r>0&&a_>r?i>0?"right":"left":i>0?"left":"right"),{rotation:r,textAlign:n,textVerticalAlign:o}},u_=s_.ifIgnoreOnTick=function(t,e,i,n,o,r){if(0===e&&o||e===n-1&&r)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))},c_=s_.getInterval=function(t,e){var i=t.get("interval");return(null==i||"auto"==i)&&(i=e),i},d_=f,f_=x,p_=Cs({type:"axis",_axisPointer:null,axisPointerClass:null,render:function(t,e,i,n){this.axisPointerClass&&ah(t),p_.superApply(this,"render",arguments),ch(this,t,e,i,n,!0)},updateAxisPointer:function(t,e,i,n){ch(this,t,e,i,n,!1)},remove:function(t,e){var i=this._axisPointer;i&&i.remove(e),p_.superApply(this,"remove",arguments)},dispose:function(t,e){dh(this,e),p_.superApply(this,"dispose",arguments)}}),g_=[];p_.registerAxisPointerClass=function(t,e){g_[t]=e},p_.getAxisPointerClass=function(t){return t&&g_[t]};var v_=s_.ifIgnoreOnTick,m_=s_.getInterval,y_=["axisLine","axisTickLabel","axisName"],x_=["splitArea","splitLine"],__=p_.extend({type:"cartesianAxis",axisPointerClass:"CartesianAxisPointer",render:function(t,e,i,n){this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new wp,this.group.add(this._axisGroup),t.get("show")){var r=t.getCoordSysModel(),a=fh(r,t),s=new s_(t,a);f(y_,s.add,s),this._axisGroup.add(s.getGroup()),f(x_,function(e){t.get(e+".show")&&this["_"+e](t,r,a.labelInterval)},this),Vr(o,this._axisGroup,t),__.superCall(this,"render",t,e,i,n)}},_splitLine:function(t,e,i){var n=t.axis;if(!n.scale.isBlank()){var o=t.getModel("splitLine"),r=o.getModel("lineStyle"),a=r.get("color"),l=m_(o,i);a=_(a)?a:[a];for(var h=e.coordinateSystem.getRect(),u=n.isHorizontal(),c=0,d=n.getTicksCoords(),f=n.scale.getTicks(),p=t.get("axisLabel.showMinLabel"),g=t.get("axisLabel.showMaxLabel"),v=[],m=[],y=r.getLineStyle(),x=0;x0&&Mh(i[o-1]);o--);for(;o>n&&Mh(i[n]);n++);}for(;o>n;)n+=Ih(t,i,n,o,o,1,r.min,r.max,e.smooth,e.smoothMonotone,e.connectNulls)+1}}),E_=Zo.extend({type:"ec-polygon",shape:{points:[],stackedOnPoints:[],smooth:0,stackedOnSmooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},brush:Ev(Zo.prototype.brush),buildPath:function(t,e){var i=e.points,n=e.stackedOnPoints,o=0,r=i.length,a=e.smoothMonotone,s=Th(i,e.smoothConstraint),l=Th(n,e.smoothConstraint);if(e.connectNulls){for(;r>0&&Mh(i[r-1]);r--);for(;r>o&&Mh(i[o]);o++);}for(;r>o;){var h=Ih(t,i,o,r,r,1,s.min,s.max,e.smooth,a,e.connectNulls);Ih(t,n,o+h-1,h,r,-1,l.min,l.max,e.stackedOnSmooth,a,e.connectNulls),o+=h+1,t.closePath()}}});Na.extend({type:"line",init:function(){var t=new wp,e=new xh;this.group.add(e.group),this._symbolDraw=e,this._lineGroup=t},render:function(t,e,i){var n=t.coordinateSystem,o=this.group,r=t.getData(),a=t.getModel("lineStyle.normal"),l=t.getModel("areaStyle.normal"),h=r.mapArray(r.getItemLayout,!0),u="polar"===n.type,c=this._coordSys,d=this._symbolDraw,f=this._polyline,p=this._polygon,g=this._lineGroup,v=t.get("animation"),m=!l.isEmpty(),y=Ph(n,r),x=t.get("showSymbol"),_=x&&!u&&!t.get("showAllSymbol")&&this._getSymbolIgnoreFunc(r,n),w=this._data;w&&w.eachItemGraphicEl(function(t,e){t.__temp&&(o.remove(t),w.setItemGraphicEl(e,null))}),x||d.remove(),o.add(g);var b=!u&&t.get("step");f&&c.type===n.type&&b===this._step?(m&&!p?p=this._newPolygon(h,y,n,v):p&&!m&&(g.remove(p),p=this._polygon=null),g.setClipPath(zh(n,!1,t)),x&&d.updateData(r,_),r.eachItemGraphicEl(function(t){t.stopAnimation(!0)}),Ah(this._stackedOnPoints,y)&&Ah(this._points,h)||(v?this._updateAnimation(r,y,n,i,b):(b&&(h=Rh(h,n,b),y=Rh(y,n,b)),f.setShape({points:h}),p&&p.setShape({points:h,stackedOnPoints:y})))):(x&&d.updateData(r,_),b&&(h=Rh(h,n,b),y=Rh(y,n,b)),f=this._newPolyline(h,n,v),m&&(p=this._newPolygon(h,y,n,v)),g.setClipPath(zh(n,!0,t)));var S=Eh(r,n)||r.getVisual("color");f.useStyle(s(a.getLineStyle(),{fill:"none",stroke:S,lineJoin:"bevel"}));var M=t.get("smooth");if(M=Ch(t.get("smooth")),f.setShape({smooth:M,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")}),p){var I=r.stackedOn,T=0;if(p.useStyle(s(l.getAreaStyle(),{fill:S,opacity:.7,lineJoin:"bevel"})),I){var A=I.hostModel;T=Ch(A.get("smooth"))}p.setShape({smooth:M,stackedOnSmooth:T,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")})}this._data=r,this._coordSys=n,this._stackedOnPoints=y,this._points=h,this._step=b},dispose:function(){},highlight:function(t,e,i,n){var o=t.getData(),r=ta(o,n);if(!(r instanceof Array)&&null!=r&&r>=0){var a=o.getItemGraphicEl(r);if(!a){var s=o.getItemLayout(r);if(!s)return;a=new mh(o,r),a.position=s,a.setZ(t.get("zlevel"),t.get("z")),a.ignore=isNaN(s[0])||isNaN(s[1]),a.__temp=!0,o.setItemGraphicEl(r,a),a.stopSymbolAnimation(!0),this.group.add(a)}a.highlight()}else Na.prototype.highlight.call(this,t,e,i,n)},downplay:function(t,e,i,n){var o=t.getData(),r=ta(o,n);if(null!=r&&r>=0){var a=o.getItemGraphicEl(r);a&&(a.__temp?(o.setItemGraphicEl(r,null),this.group.remove(a)):a.downplay())}else Na.prototype.downplay.call(this,t,e,i,n)},_newPolyline:function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new R_({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 E_({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?y(i.isLabelIgnored,i):void 0},_updateAnimation:function(t,e,i,n,o){var r=this._polyline,a=this._polygon,s=t.hostModel,l=A_(this._data,t,this._stackedOnPoints,e,this._coordSys,i),h=l.current,u=l.stackedOnCurrent,c=l.next,d=l.stackedOnNext;o&&(h=Rh(l.current,i,o),u=Rh(l.stackedOnCurrent,i,o),c=Rh(l.next,i,o),d=Rh(l.stackedOnNext,i,o)),r.shape.__points=l.current,r.shape.points=h,Or(r,{shape:{points:c}},s),a&&(a.setShape({points:h,stackedOnPoints:u}),Or(a,{shape:{points:c,stackedOnPoints:d}},s));for(var f=[],p=l.status,g=0;ge&&(e=t[i]);return e},min:function(t){for(var e=1/0,i=0;i1){var h;"string"==typeof i?h=N_[i]:"function"==typeof i&&(h=i),h&&(e=e.downSample(r.dim,1/l,h,F_),t.setData(e))}}},this)};Is(x(B_,"line","circle","line")),Ms(x(V_,"line")),xs(vy.PROCESSOR.STATISTIC,x(G_,"line"));var H_={updateSelectedMap:function(t){this._targetList=t.slice(),this._selectTargetMap=g(t||[],function(t,e){return t.set(e.name,e),t},E())},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}},W_=Ds({type:"series.pie",init:function(t){W_.superApply(this,"init",arguments),this.legendDataProvider=function(){return this.getRawData()},this.updateSelectedMap(t.data),this._defaultLabelLine(t)},mergeOption:function(t){W_.superCall(this,"mergeOption",t),this.updateSelectedMap(this.option.data)},getInitialData:function(t){var e=Gs(["value"],t.data),i=new Uy(e,this);return i.initData(t.data),i},getDataParams:function(t){var e=this.getData(),i=W_.superCall(this,"getDataParams",t),n=[];return e.each("value",function(t){n.push(t)}),i.percent=Vn(n,t,e.hostModel.get("percentPrecision")),i.$vars.push("percent"),i},_defaultLabelLine:function(t){Xr(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(W_,H_);var Z_=Nh.prototype;Z_.updateData=function(t,e,i){function n(){r.stopAnimation(!0),r.animateTo({shape:{r:u.r+l.get("hoverOffset")}},300,"elasticOut")}function o(){r.stopAnimation(!0),r.animateTo({shape:{r:u.r}},300,"elasticOut")}var r=this.childAt(0),l=t.hostModel,h=t.getItemModel(e),u=t.getItemLayout(e),c=a({},u);if(c.label=null,i){r.setShape(c);var d=l.getShallow("animationType");"scale"===d?(r.shape.r=u.r0,zr(r,{shape:{r:u.r}},l,e)):(r.shape.endAngle=u.startAngle,Or(r,{shape:{endAngle:u.endAngle}},l,e))}else Or(r,{shape:c},l,e);var f=h.getModel("itemStyle"),p=t.getItemVisual(e,"color");r.useStyle(s({lineJoin:"bevel",fill:p},f.getModel("normal").getItemStyle())),r.hoverStyle=f.getModel("emphasis").getItemStyle();var g=h.getShallow("cursor");g&&r.attr("cursor",g),Vh(this,t.getItemLayout(e),h.get("selected"),l.get("selectedOffset"),l.get("animation")),r.off("mouseover").off("mouseout").off("emphasis").off("normal"),h.get("hoverAnimation")&&l.isAnimationEnabled()&&r.on("mouseover",n).on("mouseout",o).on("emphasis",n).on("normal",o),this._updateLabel(t,e),wr(this)},Z_._updateLabel=function(t,e){var i=this.childAt(1),n=this.childAt(2),o=t.hostModel,r=t.getItemModel(e),a=t.getItemLayout(e),s=a.label,l=t.getItemVisual(e,"color");Or(i,{shape:{points:s.linePoints||[[s.x,s.y],[s.x,s.y],[s.x,s.y]]}},o,e),Or(n,{style:{x:s.x,y:s.y}},o,e),n.attr({rotation:s.rotation,origin:[s.x,s.y],z2:10});var h=r.getModel("label.normal"),u=r.getModel("label.emphasis"),c=r.getModel("labelLine.normal"),d=r.getModel("labelLine.emphasis"),l=t.getItemVisual(e,"color");br(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(Nh,wp);var U_=(Na.extend({type:"pie",init:function(){var t=new wp;this._sectorGroup=t},render:function(t,e,i,n){if(!n||n.from!==this.uid){var o=t.getData(),r=this._data,a=this.group,s=e.get("animation"),l=!r,h=t.get("animationType"),u=x(Bh,this.uid,t,s,i),c=t.get("selectedMode");if(o.diff(r).add(function(t){var e=new Nh(o,t);l&&"scale"!==h&&e.eachChild(function(t){t.stopAnimation(!0)}),c&&e.on("click",u),o.setItemGraphicEl(t,e),a.add(e)}).update(function(t,e){var i=r.getItemGraphicEl(e);i.updateData(o,t),i.off("click"),c&&i.on("click",u),a.add(i),o.setItemGraphicEl(t,i)}).remove(function(t){var e=r.getItemGraphicEl(t);a.remove(e)}).execute(),s&&l&&o.count()>0&&"scale"!==h){var d=o.getItemLayout(0),f=Math.max(i.getWidth(),i.getHeight())/2,p=y(a.removeClipPath,a); a.setClipPath(this._createClipPath(d.cx,d.cy,f,d.startAngle,d.clockwise,p,t))}this._data=o}},dispose:function(){},_createClipPath:function(t,e,i,n,o,r,a){var s=new Bv({shape:{cx:t,cy:e,r0:0,r:i,startAngle:n,endAngle:n,clockwise:o}});return zr(s,{shape:{endAngle:n+(o?1:-1)*Math.PI*2}},a,r),s},containPoint:function(t,e){var i=e.getData(),n=i.getItemLayout(0);if(n){var o=t[0]-n.cx,r=t[1]-n.cy,a=Math.sqrt(o*o+r*r);return a<=n.r&&a>=n.r0}}}),function(t,e){f(e,function(e){e.update="updateView",ws(e,function(i,n){var o={};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);o[i]=t.isSelected(i)||!1})}),{name:i.name,selected:o}})})}),X_=function(t,e){var i={};e.eachRawSeriesByType(t,function(t){var n=t.getRawData(),o={};if(!e.isSeriesFiltered(t)){var r=t.getData();r.each(function(t){var e=r.getRawIndex(t);o[e]=t}),n.each(function(e){var a=o[e],s=null!=a&&r.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&&r.setItemVisual(a,"color",h)}})}})},q_=function(t,e,i,n){var o,r,a=t.getData(),s=[],l=!1;a.each(function(i){var n,h,u,c,d=a.getItemLayout(i),f=a.getItemModel(i),p=f.getModel("label.normal"),g=p.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);o=d.cx,r=d.cy;var b="inside"===g||"inner"===g;if("center"===g)n=d.cx,h=d.cy,c="center";else{var S=(b?(d.r+d.r0)/2*_:d.r*_)+o,M=(b?(d.r+d.r0)/2*w:d.r*w)+r;if(n=S+3*_,h=M+3*w,!b){var I=S+_*(m+e-d.r),T=M+w*(m+e-d.r),A=I+(0>_?-1:1)*y,C=T;n=A+(0>_?-5:5),h=C,u=[[S,M],[I,T],[A,C]]}c=b?"center":_>0?"left":"right"}var D=p.getFont(),L=p.get("rotate")?0>_?-x+Math.PI:-x:0,P=t.getFormattedLabel(i,"normal")||a.getName(i),k=yi(P,D,c,"top");l=!!L,d.label={x:n,y:h,position:g,height:k.height,len:m,len2:y,linePoints:u,textAlign:c,verticalAlign:"middle",rotation:L,inside:b},b||s.push(d.label)}),!l&&t.get("avoidLabelOverlap")&&Gh(s,o,r,e,i,n)},Y_=2*Math.PI,j_=Math.PI/180,$_=function(t,e,i){e.eachSeriesByType(t,function(t){var e=t.get("center"),n=t.get("radius");_(n)||(n=[0,n]),_(e)||(e=[e,e]);var o=i.getWidth(),r=i.getHeight(),a=Math.min(o,r),s=kn(e[0],o),l=kn(e[1],r),h=kn(n[0],a/2),u=kn(n[1],a/2),c=t.getData(),d=-t.get("startAngle")*j_,f=t.get("minAngle")*j_,p=0;c.each("value",function(t){!isNaN(t)&&p++});var g=c.getSum("value"),v=Math.PI/(g||p)*2,m=t.get("clockwise"),y=t.get("roseType"),x=t.get("stillShowZeroSum"),w=c.getDataExtent("value");w[0]=0;var b=Y_,S=0,M=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===g&&x?v:t*v:Y_/p,f>i?(i=f,b-=f):S+=t;var n=M+I*i;c.setItemLayout(e,{angle:i,startAngle:M,endAngle:n,clockwise:m,cx:s,cy:l,r0:h,r:y?Pn(t,w,[h,u]):u}),M=n},!0),Y_>b&&p)if(.001>=b){var T=Y_/p;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/S,M=d,c.each("value",function(t,e){if(!isNaN(t)){var i=c.getItemLayout(e),n=i.angle===f?f:t*v;i.startAngle=M,i.endAngle=M+I*n,M+=I*n}});q_(t,u,o,r)})},K_=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),o=0;o=0;r--){var a=n[r],s=o[r],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 r}return-1}}),Q_=Hh.prototype;Q_.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=cl(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)},Q_.updateLayout=function(t){var e=t.getData();this._symbolEl.setShape({points:e.mapArray(e.getItemLayout)})},Q_.remove=function(){this.group.removeAll()},Ls({type:"scatter",init:function(){this._normalSymbolDraw=new xh,this._largeSymbolDraw=new Hh},render:function(t){var e=t.getData(),i=this._largeSymbolDraw,n=this._normalSymbolDraw,o=this.group,r=t.get("large")&&e.count()>t.get("largeThreshold")?i:n;this._symbolDraw=r,r.updateData(e),o.add(r.group),o.remove(r===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(){}}),Is(x(B_,"scatter","circle",null)),Ms(x(V_,"scatter"));var tw=Zo.extend({type:"whiskerInBox",shape:{},buildPath:function(t,e){for(var i in e)if(e.hasOwnProperty(i)&&0===i.indexOf("ends")){var n=e[i];t.moveTo(n[0][0],n[0][1]),t.lineTo(n[1][0],n[1][1])}}}),ew=Wh.prototype;ew._createContent=function(t,e,i){var n=t.getItemLayout(e),o="horizontal"===n.chartLayout?1:0,r=0;this.add(new Gv({shape:{points:i?Zh(n.bodyEnds,o,n):n.bodyEnds},style:{strokeNoScale:!0},z2:100})),this.bodyIndex=r++;var a=p(n.whiskerEnds,function(t){return i?Zh(t,o,n):t});this.add(new tw({shape:Uh(a),style:{strokeNoScale:!0},z2:100})),this.whiskerIndex=r++},ew.updateData=function(t,e,i){var n=this._seriesModel=t.hostModel,o=t.getItemLayout(e),r=nm[i?"initProps":"updateProps"];r(this.childAt(this.bodyIndex),{shape:{points:o.bodyEnds}},n,e),r(this.childAt(this.whiskerIndex),{shape:Uh(o.whiskerEnds)},n,e),this.styleUpdater.call(null,this,t,e)},u(Wh,wp);var iw=Xh.prototype;iw.updateData=function(t){var e=this.group,i=this._data,n=this.styleUpdater;t.diff(i).add(function(i){if(t.hasValue(i)){var o=new Wh(t,i,n,!0);t.setItemGraphicEl(i,o),e.add(o)}}).update(function(o,r){var a=i.getItemGraphicEl(r);return t.hasValue(o)?(a?a.updateData(t,o):a=new Wh(t,o,n),e.add(a),void t.setItemGraphicEl(o,a)):void e.remove(a)}).remove(function(t){var n=i.getItemGraphicEl(t);n&&e.remove(n)}).execute(),this._data=t},iw.remove=function(){var t=this.group,e=this._data;this._data=null,e&&e.eachItemGraphicEl(function(e){e&&t.remove(e)})};var nw={_baseAxisDim:null,getInitialData:function(t,e){var i,n,o=e.getComponent("xAxis",this.get("xAxisIndex")),r=e.getComponent("yAxis",this.get("yAxisIndex")),a=o.get("type"),s=r.get("type");"category"===a?(t.layout="horizontal",i=o.getCategories(),n=!0):"category"===s?(t.layout="vertical",i=r.getCategories(),n=!0):t.layout=t.layout||"horizontal";var l=["x","y"],h="horizontal"===t.layout?0:1,u=this._baseAxisDim=l[h],c=l[1-h],d=t.data;n&&f(d,function(t,e){t.value&&_(t.value)?t.value.unshift(e):_(t)&&t.unshift(e)});var p=this.defaultValueDimensions,g=[{name:u,otherDims:{tooltip:!1},dimsDef:["base"]},{name:c,dimsDef:p.slice()}];g=Gs(g,d,{encodeDef:this.get("encode"),dimsDef:this.get("dimensions"),dimCount:p.length+1});var v=new Uy(g,this);return v.initData(d,i?i.slice():null),v},getBaseAxis:function(){var t=this._baseAxisDim;return this.ecModel.getComponent(t+"Axis",this.get(t+"AxisIndex")).axis}},ow={init:function(){var t=this._whiskerBoxDraw=new Xh(this.getStyleUpdater());this.group.add(t.group)},render:function(t){this._whiskerBoxDraw.updateData(t.getData())},remove:function(){this._whiskerBoxDraw.remove()}},rw=jm.extend({type:"series.candlestick",dependencies:["xAxis","yAxis","grid"],defaultValueDimensions:["open","close","lowest","highest"],dimensions:null,defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,layout:null,itemStyle:{normal:{color:"#c23531",color0:"#314656",borderWidth:1,borderColor:"#c23531",borderColor0:"#314656"},emphasis:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,animationUpdate:!1,animationEasing:"linear",animationDuration:300},getShadowDim:function(){return"open"},brushSelector:function(t,e,i){var n=e.getItemLayout(t);return i.rect(n.brushRect)}});c(rw,nw,!0);var aw=Na.extend({type:"candlestick",getStyleUpdater:function(){return qh},dispose:B});c(aw,ow,!0);var sw=["itemStyle","normal"],lw=["itemStyle","emphasis"],hw=function(t){t&&_(t.series)&&f(t.series,function(t){S(t)&&"k"===t.type&&(t.type="candlestick")})},uw=["itemStyle","normal","borderColor"],cw=["itemStyle","normal","borderColor0"],dw=["itemStyle","normal","color"],fw=["itemStyle","normal","color0"],pw=function(t){t.eachRawSeriesByType("candlestick",function(e){var i=e.getData();i.setVisual({legendSymbol:"roundRect"}),t.isSeriesFiltered(e)||i.each(function(t){var e=i.getItemModel(t),n=i.getItemLayout(t).sign;i.setItemVisual(t,{color:e.get(n>0?dw:fw),borderColor:e.get(n>0?uw:cw)})})})},gw=C,vw=function(t){t.eachSeriesByType("candlestick",function(t){var e,i=t.coordinateSystem,n=t.getData(),o=Yh(t,n),r=t.get("layout"),a="horizontal"===r?0:1,s=1-a,l=["x","y"],h=[];if(f(n.dimensions,function(t){var i=n.getDimensionInfo(t),o=i.coordDim;o===l[s]?h.push(t):o===l[a]&&(e=t)}),!(null==e||h.length<4)){var u=0;n.each([e].concat(h),function(){function t(t){var e=[];return e[a]=f,e[s]=t,isNaN(f)||isNaN(t)?[0/0,0/0]:i.dataToPoint(e)}function e(t,e){var i=t.slice(),n=t.slice();i[a]=lr(i[a]+o/2,1,!1),n[a]=lr(n[a]-o/2,1,!0),e?T.push(i,n):T.push(n,i)}function l(){var e=t(Math.min(g,v,m,y)),i=t(Math.max(g,v,m,y));return e[a]-=o/2,i[a]-=o/2,{x:e[0],y:e[1],width:s?o:i[0]-e[0],height:s?i[1]-e[1]:o}}function c(t){return t[a]=lr(t[a],1),t}var d=arguments,f=d[0],p=d[h.length+1],g=d[1],v=d[2],m=d[3],y=d[4],x=Math.min(g,v),_=Math.max(g,v),w=t(x),b=t(_),S=t(m),M=t(y),I=[[c(M),c(b)],[c(S),c(w)]],T=[];e(b,0),e(w,1);var A;A=g>v?-1:v>g?1:u>0?n.getItemModel(u-1).get()[2]<=v?1:-1:1,n.setItemLayout(p,{chartLayout:r,sign:A,initBaseline:g>v?b[s]:w[s],bodyEnds:T,whiskerEnds:I,brushRect:l()}),++u},!0)}})};ys(hw),Is(pw),Ms(vw);var mw=ie;c(jh,Yf),$h.prototype={constructor:$h,type:"view",dimensions:["x","y"],setBoundingRect:function(t,e,i,n){return this._rect=new Qe(t,e,i,n),this._rect},getBoundingRect:function(){return this._rect},setViewRect:function(t,e,i,n){this.transformTo(t,e,i,n),this._viewRect=new Qe(t,e,i,n)},transformTo:function(t,e,i,n){var o=this.getBoundingRect(),r=this._viewTransform;r.transform=o.calculateTransform(new Qe(t,e,i,n)),r.decomposeTransform(),this._updateTransform()},setCenter:function(t){t&&(this._center=t,this._updateCenterAndZoom())},setZoom:function(t){t=t||1;var e=this.zoomLimit;e&&(null!=e.max&&(t=Math.min(e.max,t)),null!=e.min&&(t=Math.max(e.min,t))),this._zoom=t,this._updateCenterAndZoom()},getDefaultCenter:function(){var t=this.getBoundingRect(),e=t.x+t.width/2,i=t.y+t.height/2;return[e,i]},getCenter:function(){return this._center||this.getDefaultCenter()},getZoom:function(){return this._zoom||1},getRoamTransform:function(){return this._roamTransform},_updateCenterAndZoom:function(){var t=this._viewTransform.getLocalTransform(),e=this._roamTransform,i=this.getDefaultCenter(),n=this.getCenter(),o=this.getZoom();n=ie([],n,t),i=ie([],i,t),e.origin=n,e.position=[i[0]-n[0],i[1]-n[1]],e.scale=[o,o],this._updateTransform()},_updateTransform:function(){var t=this._roamTransform,e=this._viewTransform;e.parent=t,t.updateTransform(),e.updateTransform(),e.transform&&de(this.transform||(this.transform=[]),e.transform),this.transform?(this.invTransform=this.invTransform||[],me(this.invTransform,this.transform)):this.invTransform=null,this.decomposeTransform()},getViewRect:function(){return this._viewRect},getViewRectAfterRoam:function(){var t=this.getBoundingRect().clone();return t.applyTransform(this.transform),t},dataToPoint:function(t){var e=this.transform;return e?mw([],t,e):[t[0],t[1]]},pointToData:function(t){var e=this.invTransform;return e?mw([],t,e):[t[0],t[1]]},convertToPixel:x(Kh,"dataToPoint"),convertFromPixel:x(Kh,"pointToData"),containPoint:function(t){return this.getViewRectAfterRoam().contain(t[0],t[1])}},c($h,Yf);for(var yw=[126,25],xw=[[[0,3.5],[7,11.2],[15,11.9],[30,7],[42,.7],[52,.7],[56,7.7],[59,.7],[64,.7],[64,0],[5,0],[0,3.5]],[[13,16.1],[19,14.7],[16,21.7],[11,23.1],[13,16.1]],[[12,32.2],[14,38.5],[15,38.5],[13,32.2],[12,32.2]],[[16,47.6],[12,53.2],[13,53.2],[18,47.6],[16,47.6]],[[6,64.4],[8,70],[9,70],[8,64.4],[6,64.4]],[[23,82.6],[29,79.8],[30,79.8],[25,82.6],[23,82.6]],[[37,70.7],[43,62.3],[44,62.3],[39,70.7],[37,70.7]],[[48,51.1],[51,45.5],[53,45.5],[50,51.1],[48,51.1]],[[51,35],[51,28.7],[53,28.7],[53,35],[51,35]],[[52,22.4],[55,17.5],[56,17.5],[53,22.4],[52,22.4]],[[58,12.6],[62,7],[63,7],[60,12.6],[58,12.6]],[[0,3.5],[0,93.1],[64,93.1],[64,0],[63,0],[63,92.4],[1,92.4],[1,3.5],[0,3.5]]],_w=0;_we;++e)"台湾"===t.regions[e].name&&t.regions[e].geometries.push({type:"polygon",exterior:Aw[0]})},Dw=[bw,Mw,Tw,Cw];Jh.prototype={constructor:Jh,type:"geo",dimensions:["lng","lat"],containCoord:function(t){for(var e=this.regions,i=0;i"+jn(n+" : "+i)},getTooltipPosition:function(t){if(null!=t){var e=this.getData().getName(t),i=this.coordinateSystem,n=i.getRegion(e);return n&&i.dataToPoint(n.center)}},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},defaultOption:{zlevel:0,z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:.75,showLegendSymbol:!0,dataRangeHoverLink:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{normal:{show:!1,color:"#000"},emphasis:{show:!0,color:"rgb(100,0,0)"}},itemStyle:{normal:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{areaColor:"rgba(255,215,0,0.8)"}}}});c(Pw,H_);var kw="\x00_ec_interaction_mutex";ws({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},function(){}),c(ou,Ff);var Ow={axisPointer:1,tooltip:1,brush:1};yu.prototype={constructor:yu,draw:function(t,e,i,n,o){var r="geo"===t.mainType,a=t.getData&&t.getData();r&&e.eachComponent({mainType:"series",subType:"map"},function(e){a||e.getHostGeoModel()!==t||(a=e.getData())});var s=t.coordinateSystem,l=this.group,h=s.scale,u={position:s.position,scale:h};!l.childAt(0)||o?l.attr(u):Or(l,u,t),l.removeAll();var c=["itemStyle","normal"],d=["itemStyle","emphasis"],p=["label","normal"],g=["label","emphasis"],v=E();f(s.regions,function(e){var i=v.get(e.name)||v.set(e.name,new wp),n=new Yv({shape:{paths:[]}});i.add(n);var o,s=t.getRegionModel(e.name)||t,u=s.getModel(c),m=s.getModel(d),y=gu(u,h),x=gu(m,h),_=s.getModel(p),w=s.getModel(g);if(a){o=a.indexOfName(e.name);var b=a.getItemVisual(o,"color",!0);b&&(y.fill=b)}f(e.geometries,function(t){if("polygon"===t.type){n.shape.paths.push(new Gv({shape:{points:t.exterior}}));for(var e=0;e<(t.interiors?t.interiors.length:0);e++)n.shape.paths.push(new Gv({shape:{points:t.interiors[e]}}))}}),n.setStyle(y),n.style.strokeNoScale=!0,n.culling=!0;var S=_.get("show"),M=w.get("show"),I=a&&isNaN(a.get("value",o)),T=a&&a.getItemLayout(o);if(r||I&&(S||M)||T&&T.showLabel){var A,C=r?e.name:o;(!a||o>=0)&&(A=t);var D=new Ov({position:e.center.slice(),scale:[1/h[0],1/h[1]],z2:10,silent:!0});br(D.style,D.hoverStyle={},_,w,{labelFetcher:A,labelDataIndex:C,defaultText:e.name,useInsideStyle:!1},{textAlign:"center",textVerticalAlign:"middle"}),i.add(D)}if(a)a.setItemGraphicEl(o,i);else{var s=t.getRegionModel(e.name);n.eventData={componentType:"geo",geoIndex:t.componentIndex,name:e.name,region:s&&s.option||{}}}var L=i.__regions||(i.__regions=[]);L.push(e),wr(i,x,{hoverSilentOnTouch:!!t.get("selectedMode")}),l.add(i)}),this._updateController(t,e,i),vu(this,t,l,i,n),mu(t,l)},remove:function(){this.group.removeAll(),this._controller.dispose(),this._controllerHost={}},_updateController:function(t,e,i){function n(){var e={type:"geoRoam",componentType:l};return e[l+"Id"]=t.id,e}var o=t.coordinateSystem,r=this._controller,s=this._controllerHost;s.zoomLimit=t.get("scaleLimit"),s.zoom=o.getZoom(),r.enable(t.get("roam")||!1);var l=t.mainType;r.off("pan").on("pan",function(t,e){this._mouseDownFlag=!1,du(s,t,e),i.dispatchAction(a(n(),{dx:t,dy:e}))},this),r.off("zoom").on("zoom",function(t,e,o){if(this._mouseDownFlag=!1,fu(s,t,e,o),i.dispatchAction(a(n(),{zoom:t,originX:e,originY:o})),this._updateGroup){var r=this.group,l=r.scale;r.traverse(function(t){"text"===t.type&&t.attr("scale",[1/l[0],1/l[1]])})}},this),r.setPointerChecker(function(e,n,r){return o.getViewRectAfterRoam().contain(n,r)&&!pu(e,i,t)})}},Ls({type:"map",render:function(t,e,i,n){if(!n||"mapToggleSelect"!==n.type||n.from!==this.uid){var o=this.group;if(o.removeAll(),!t.getHostGeoModel()){if(n&&"geoRoam"===n.type&&"series"===n.componentType&&n.seriesId===t.id){var r=this._mapDraw;r&&o.add(r.group)}else if(t.needsDrawMap){var r=this._mapDraw||new yu(i,!0);o.add(r.group),r.draw(t,e,i,this,n),this._mapDraw=r}else this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;t.get("showLegendSymbol")&&e.getComponent("legend")&&this._renderSymbols(t,e,i)}}},remove:function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null,this.group.removeAll()},dispose:function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null},_renderSymbols:function(t){var e=t.originalData,i=this.group;e.each("value",function(n,o){if(!isNaN(n)){var r=e.getItemLayout(o);if(r&&r.point){var a=r.point,s=r.offset,l=new zv({style:{fill:t.getData().getVisual("color")},shape:{cx:a[0]+9*s,cy:a[1],r:3},silent:!0,z2:s?8:10});if(!s){var h=t.mainSeries.getData(),u=e.getName(o),c=h.indexOfName(u),d=e.getItemModel(o),f=d.getModel("label.normal"),p=d.getModel("label.emphasis"),g=h.getItemGraphicEl(c),v=C(t.getFormattedLabel(o,"normal"),u),m=C(t.getFormattedLabel(o,"emphasis"),v),y=function(){var t=Sr({},p,{text:p.get("show")?m:null},{isRectText:!0,useInsideStyle:!1},!0);l.style.extendFrom(t),l.__mapOriginalZ2=l.z2,l.z2+=1},x=function(){Sr(l.style,f,{text:f.get("show")?v:null,textPosition:f.getShallow("position")||"bottom"},{isRectText:!0,useInsideStyle:!1}),null!=l.__mapOriginalZ2&&(l.z2=l.__mapOriginalZ2,l.__mapOriginalZ2=null)};g.on("mouseover",y).on("mouseout",x).on("emphasis",y).on("normal",x),x()}i.add(l)}}})}}),ws({type:"geoRoam",event:"geoRoam",update:"updateLayout"},function(t,e){var i=t.componentType||"series";e.eachComponent({mainType:i,query:t},function(e){var n=e.coordinateSystem;if("geo"===n.type){var o=xu(n,t,e.get("scaleLimit"));e.setCenter&&e.setCenter(o.center),e.setZoom&&e.setZoom(o.zoom),"series"===i&&f(e.seriesGroup,function(t){t.setCenter(o.center),t.setZoom(o.zoom)})}})});var zw=function(t){var e={};t.eachSeriesByType("map",function(i){var n=i.getMapType();if(!i.getHostGeoModel()&&!e[n]){var o={};f(i.seriesGroup,function(e){var i=e.coordinateSystem,n=e.originalData;e.get("showLegendSymbol")&&t.getComponent("legend")&&n.each("value",function(t,e){var r=n.getName(e),a=i.getRegion(r);if(a&&!isNaN(t)){var s=o[r]||0,l=i.dataToPoint(a.center);o[r]=s+1,n.setItemLayout(e,{point:l,offset:s})}})});var r=i.getData();r.each(function(t){var e=r.getName(t),i=r.getItemLayout(t)||{};i.showLabel=!o[e],r.setItemLayout(t,i)}),e[n]=!0}})},Rw=function(t){t.eachSeriesByType("map",function(t){var e=t.get("color"),i=t.getModel("itemStyle.normal"),n=i.get("areaColor"),o=i.get("color")||e[t.seriesIndex%e.length];t.getData().setVisual({areaColor:n,color:o})})},Ew=function(t){var e={};t.eachSeriesByType("map",function(t){var i=t.getHostGeoModel(),n=i?"o"+i.id:"i"+t.getMapType();(e[n]=e[n]||[]).push(t)}),f(e,function(t){for(var e=_u(p(t,function(t){return t.getData()}),t[0].get("mapValueCalculation")),i=0;i "))},defaultOption:{coordinateSystem:"geo",zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,label:{normal:{show:!1,position:"end"}},lineStyle:{normal:{opacity:.5}}}}),Nw=Zv.prototype,Fw=Xv.prototype,Gw=tr({type:"ec-line",style:{stroke:"#000",fill:null},shape:{x1:0,y1:0,x2:0,y2:0,percent:1,cpx1:null,cpy1:null},buildPath:function(t,e){(bu(e)?Nw:Fw).buildPath(t,e)},pointAt:function(t){return bu(this.shape)?Nw.pointAt.call(this,t):Fw.pointAt.call(this,t)},tangentAt:function(t){var e=this.shape,i=bu(e)?[e.x2-e.x1,e.y2-e.y1]:Fw.tangentAt.call(this,t);return K(i,i)}}),Hw=["fromSymbol","toSymbol"],Ww=Cu.prototype;Ww.beforeUpdate=Au,Ww._createLine=function(t,e,i){var n=t.hostModel,o=t.getItemLayout(e),r=Iu(o);r.shape.percent=0,zr(r,{shape:{percent:1}},n,e),this.add(r);var a=new Ov({name:"label"});this.add(a),f(Hw,function(i){var n=Mu(i,t,e);this.add(n),this[Su(i)]=t.getItemVisual(e,i)},this),this._updateCommonStl(t,e,i)},Ww.updateData=function(t,e,i){var n=t.hostModel,o=this.childOfName("line"),r=t.getItemLayout(e),a={shape:{}};Tu(a.shape,r),Or(o,a,n,e),f(Hw,function(i){var n=t.getItemVisual(e,i),o=Su(i);if(this[o]!==n){this.remove(this.childOfName(i));var r=Mu(i,t,e);this.add(r)}this[o]=n},this),this._updateCommonStl(t,e,i)},Ww._updateCommonStl=function(t,e,i){var n=t.hostModel,o=this.childOfName("line"),r=i&&i.lineStyle,a=i&&i.hoverLineStyle,l=i&&i.labelModel,h=i&&i.hoverLabelModel;if(!i||t.hasItemOption){var u=t.getItemModel(e);r=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=D(t.getItemVisual(e,"opacity"),r.opacity,1);o.useStyle(s({strokeNoScale:!0,fill:"none",stroke:c,opacity:d},r)),o.hoverStyle=a,f(Hw,function(t){var e=this.childOfName(t);e&&(e.setColor(c),e.setStyle({opacity:d}))},this);var p,g,v,m,y=l.getShallow("show"),x=h.getShallow("show"),_=this.childOfName("label");if(y||x){var w=n.getRawValue(e);g=null==w?g=t.getName(e):isFinite(w)?On(w):w,p=c||"#000",v=C(n.getFormattedLabel(e,"normal",t.dataType),g),m=C(n.getFormattedLabel(e,"emphasis",t.dataType),v)}if(y){var b=Sr(_.style,l,{text:v},{autoColor:p});_.__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,wr(this)},Ww.highlight=function(){this.trigger("emphasis")},Ww.downplay=function(){this.trigger("normal")},Ww.updateLayout=function(t,e){this.setLinePoints(t.getItemLayout(e))},Ww.setLinePoints=function(t){var e=this.childOfName("line");Tu(e.shape,t),e.dirty()},u(Cu,wp);var Zw=Pu.prototype;Zw.updateData=function(t){var e=this._lineData,i=this.group,n=this._ctor,o=t.hostModel,r={lineStyle:o.getModel("lineStyle.normal").getLineStyle(),hoverLineStyle:o.getModel("lineStyle.emphasis").getLineStyle(),labelModel:o.getModel("label.normal"),hoverLabelModel:o.getModel("label.emphasis")};t.diff(e).add(function(e){if(Lu(t.getItemLayout(e))){var o=new n(t,e,r);t.setItemGraphicEl(e,o),i.add(o)}}).update(function(o,a){var s=e.getItemGraphicEl(a);return Lu(t.getItemLayout(o))?(s?s.updateData(t,o,r):s=new n(t,o,r),t.setItemGraphicEl(o,s),void i.add(s)):void i.remove(s)}).remove(function(t){i.remove(e.getItemGraphicEl(t))}).execute(),this._lineData=t},Zw.updateLayout=function(){var t=this._lineData;t.eachItemGraphicEl(function(e,i){e.updateLayout(t,i)},this)},Zw.remove=function(){this.group.removeAll()};var Uw=ku.prototype;Uw.createLine=function(t,e,i){return new Cu(t,e,i)},Uw._updateEffectSymbol=function(t,e){var i=t.getItemModel(e),n=i.getModel("effect"),o=n.get("symbolSize"),r=n.get("symbol");_(o)||(o=[o,o]);var a=n.get("color")||t.getItemVisual(e,"color"),s=this.childAt(1);this._symbolType!==r&&(this.remove(s),s=cl(r,-.5,-.5,1,1,a),s.z2=100,s.culling=!0,this.add(s)),s&&(s.setStyle("shadowColor",a),s.setStyle(n.getItemStyle(["color"])),s.attr("scale",o),s.setColor(a),s.attr("scale",o),this._symbolType=r,this._updateEffectAnimation(t,n,e))},Uw._updateEffectAnimation=function(t,e,i){var n=this.childAt(1);if(n){var o=this,r=t.getItemLayout(i),a=1e3*e.get("period"),s=e.get("loop"),l=e.get("constantSpeed"),h=A(e.get("delay"),function(e){return e/t.count()*a/3}),u="function"==typeof h;if(n.ignore=!0,this.updateAnimationPoints(n,r),l>0&&(a=this.getLineLength(n)/l*1e3),a!==this._period||s!==this._loop){n.stopAnimation();var c=h;u&&(c=h(i)),n.__t>0&&(c=-a*n.__t),n.__t=0;var d=n.animate("",s).when(a,{__t:1}).delay(c).during(function(){o.updateSymbolPosition(n)});s||d.done(function(){o.remove(n)}),d.start()}this._period=a,this._loop=s}},Uw.getLineLength=function(t){return Ef(t.__p1,t.__cp1)+Ef(t.__cp1,t.__p2)},Uw.updateAnimationPoints=function(t,e){t.__p1=e[0],t.__p2=e[1],t.__cp1=e[2]||[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2]},Uw.updateData=function(t,e,i){this.childAt(0).updateData(t,e,i),this._updateEffectSymbol(t,e)},Uw.updateSymbolPosition=function(t){var e=t.__p1,i=t.__p2,n=t.__cp1,o=t.__t,r=t.position,a=xo,s=_o;r[0]=a(e[0],n[0],i[0],o),r[1]=a(e[1],n[1],i[1],o);var l=s(e[0],n[0],i[0],o),h=s(e[1],n[1],i[1],o);t.rotation=-Math.atan2(h,l)-Math.PI/2,t.ignore=!1 },Uw.updateLayout=function(t,e){this.childAt(0).updateLayout(t,e);var i=t.getItemModel(e).getModel("effect");this._updateEffectAnimation(t,i,e)},u(ku,wp);var Xw=Ou.prototype;Xw._createPolyline=function(t,e,i){var n=t.getItemLayout(e),o=new Hv({shape:{points:n}});this.add(o),this._updateCommonStl(t,e,i)},Xw.updateData=function(t,e,i){var n=t.hostModel,o=this.childAt(0),r={shape:{points:t.getItemLayout(e)}};Or(o,r,n,e),this._updateCommonStl(t,e,i)},Xw._updateCommonStl=function(t,e,i){var n=this.childAt(0),o=t.getItemModel(e),r=t.getItemVisual(e,"color"),a=i&&i.lineStyle,l=i&&i.hoverLineStyle;(!i||t.hasItemOption)&&(a=o.getModel("lineStyle.normal").getLineStyle(),l=o.getModel("lineStyle.emphasis").getLineStyle()),n.useStyle(s({strokeNoScale:!0,fill:"none",stroke:r},a)),n.hoverStyle=l,wr(this)},Xw.updateLayout=function(t,e){var i=this.childAt(0);i.setShape("points",t.getItemLayout(e))},u(Ou,wp);var qw=zu.prototype;qw.createLine=function(t,e,i){return new Ou(t,e,i)},qw.updateAnimationPoints=function(t,e){this._points=e;for(var i=[0],n=0,o=1;o=0&&!(n[r]<=e);r--);r=Math.min(r,o-2)}else{for(var r=a;o>r&&!(n[r]>e);r++);r=Math.min(r-1,o-2)}ee(t.position,i[r],i[r+1],(e-n[r])/(n[r+1]-n[r]));var l=i[r+1][0]-i[r][0],h=i[r+1][1]-i[r][1];t.rotation=-Math.atan2(h,l)-Math.PI/2,this._lastFrame=r,this._lastFramePercent=e,t.ignore=!1}},u(zu,ku);var Yw=tr({shape:{polyline:!1,segs:[]},buildPath:function(t,e){for(var i=e.segs,n=e.polyline,o=0;o2?t.quadraticCurveTo(r[2][0],r[2][1],r[1][0],r[1][1]):t.lineTo(r[1][0],r[1][1])}},findDataIndex:function(t,e){for(var i=this.shape,n=i.segs,o=i.polyline,r=Math.max(this.style.lineWidth,1),a=0;a2){if(ko(s[0][0],s[0][1],s[2][0],s[2][1],s[1][0],s[1][1],r,t,e))return a}else if(Lo(s[0][0],s[0][1],s[1][0],s[1][1],r,t,e))return a}return-1}}),jw=Ru.prototype;jw.updateData=function(t){this.group.removeAll();var e=this._lineEl,i=t.hostModel;e.setShape({segs:t.mapArray(t.getItemLayout),polyline:i.get("polyline")}),e.useStyle(i.getModel("lineStyle.normal").getLineStyle());var n=t.getVisual("color");n&&e.setStyle("stroke",n),e.setStyle("fill"),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)},jw.updateLayout=function(t){var e=t.getData();this._lineEl.setShape({segs:e.mapArray(e.getItemLayout)})},jw.remove=function(){this.group.removeAll()},Ls({type:"lines",init:function(){},render:function(t,e,i){var n=t.getData(),o=this._lineDraw,r=t.get("effect.show"),a=t.get("polyline"),s=t.get("large")&&n.count()>=t.get("largeThreshold");(r!==this._hasEffet||a!==this._isPolyline||s!==this._isLarge)&&(o&&o.remove(),o=this._lineDraw=s?new Ru:new Pu(a?r?zu:Ou:r?ku:Cu),this._hasEffet=r,this._isPolyline=a,this._isLarge=s);var l=t.get("zlevel"),h=t.get("effect.trailLength"),u=i.getZr(),c="svg"===u.painter.getType();c||u.painter.getLayer(l).clear(!0),null==this._lastZlevel||c||u.configLayer(this._lastZlevel,{motionBlur:!1}),r&&h&&(c||u.configLayer(l,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(h/10+.9,1),0)})),this.group.add(o.group),o.updateData(n),this._lastZlevel=l},updateLayout:function(t,e,i){this._lineDraw.updateLayout(t);var n=i.getZr(),o="svg"===n.painter.getType();o||n.painter.getLayer(this._lastZlevel).clear(!0)},remove:function(t,e){this._lineDraw&&this._lineDraw.remove(e,!0);var i=e.getZr(),n="svg"===i.painter.getType();n||i.painter.getLayer(this._lastZlevel).clear(!0)},dispose:function(){}});var $w=function(t){t.eachSeriesByType("lines",function(t){var e=t.coordinateSystem,i=t.getData();i.each(function(n){var o=i.getItemModel(n),r=o.option instanceof Array?o.option:o.get("coords"),a=[];if(t.get("polyline"))for(var s=0;s=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}}});ws("legendToggleSelect","legendselectchanged",x(Vu,"toggleSelected")),ws("legendSelect","legendselected",x(Vu,"select")),ws("legendUnSelect","legendunselected",x(Vu,"unSelect"));var tb=x,eb=f,ib=wp,nb=Cs({type:"legend.plain",newlineDisabled:!1,init:function(){this.group.add(this._contentGroup=new ib),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 o=t.getBoxLayoutParams(),r={width:i.getWidth(),height:i.getHeight()},a=t.get("padding"),l=ua(o,r,a),h=this.layoutInner(t,n,l),u=ua(s({width:h.width,height:h.height},o),r,a);this.group.attr("position",[u.x-h.x,u.y-h.y]),this.group.add(this._backgroundEl=Nu(h,t))}},resetInner:function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl)},renderInner:function(t,e,i,n){var o=this.getContentGroup(),r=E(),a=e.get("selectedMode");eb(e.getData(),function(s,l){var h=s.get("name");if(!this.newlineDisabled&&(""===h||"\n"===h))return void o.add(new ib({newline:!0}));var u=i.getSeriesByName(h)[0];if(!r.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",p=c.getVisual("symbol"),g=this._createItem(h,l,s,e,f,p,t,d,a);g.on("click",tb(Fu,h,n)).on("mouseover",tb(Gu,u,null,n)).on("mouseout",tb(Hu,u,null,n)),r.set(h,!0)}else i.eachRawSeries(function(i){if(!r.get(h)&&i.legendDataProvider){var o=i.legendDataProvider(),u=o.indexOfName(h);if(0>u)return;var c=o.getItemVisual(u,"color"),d="roundRect",f=this._createItem(h,l,s,e,d,null,t,c,a);f.on("click",tb(Fu,h,n)).on("mouseover",tb(Gu,i,h,n)).on("mouseout",tb(Hu,i,h,n)),r.set(h,!0)}},this)},this)},_createItem:function(t,e,i,n,o,r,s,l,h){var u=n.get("itemWidth"),c=n.get("itemHeight"),d=n.get("inactiveColor"),f=n.isSelected(t),p=new ib,g=i.getModel("textStyle"),v=i.get("icon"),m=i.getModel("tooltip"),y=m.parentModel;if(o=v||o,p.add(cl(o,0,0,u,c,f?l:d,!0)),!v&&r&&(r!==o||"none"==r)){var x=.8*c;"none"===r&&(r="circle"),p.add(cl(r,(u-x)/2,(c-x)/2,x,x,f?l:d))}var _="left"===s?u+5:-5,w=s,b=n.get("formatter"),S=t;"string"==typeof b&&b?S=b.replace("{name}",null!=t?t:""):"function"==typeof b&&(S=b(t)),p.add(new Ov({style:Sr({},g,{text:S,x:_,y:c/2,textFill:f?g.getTextColor():d,textAlign:w,textVerticalAlign:"middle"})}));var M=new Wv({shape:p.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 p.add(M),p.eachChild(function(t){t.silent=!0}),M.silent=!h,this.getContentGroup().add(p),wr(p),p.__legendDataIndex=e,p},layoutInner:function(t,e,i){var n=this.getContentGroup();xm(t.get("orient"),n,t.get("itemGap"),i.width,i.height);var o=n.getBoundingRect();return n.attr("position",[-o.x,-o.y]),this.group.getBoundingRect()}}),ob=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 p=[0,0],g=[-c.x,-c.y],v=C(t.get("pageButtonGap",!0),t.get("itemGap",!0));if(d){var m=t.get("pageButtonPosition",!0);"end"===m?g[a]+=i[s]-c[s]:p[a]+=c[s]+v}g[1-a]+=u[l]/2-c[l]/2,n.attr("position",f),o.attr("position",p),r.attr("position",g);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]+g[1-a]),o.__rectSize=i[s],d){var x={x:0,y:0};x[s]=Math.max(i[s]-c[s]-v,0),x[l]=y[l],o.setClipPath(new Wv({shape:x})),o.__rectSize=x[s]}else r.eachChild(function(t){t.attr({invisible:!0,silent:!0})});var _=this._getPageInfo(t);return null!=_.pageIndex&&Or(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 o=null!=e[n+"DataIndex"],r=i.childOfName(n);r&&(r.setStyle("fill",o?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),r.cursor=o?"pointer":"default")});var n=i.childOfName("pageText"),o=t.get("pageFormatter"),r=e.pageIndex,a=null!=r?r+1:0,s=e.pageCount;n&&o&&n.setStyle("text",b(o)?o.replace("{current}",a).replace("{total}",s):o({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,o,r,a=t.get("scrollDataIndex",!0),s=this.getContentGroup(),l=s.getBoundingRect(),h=this._containerGroup.__rectSize,u=t.getOrient().index,c=sb[u],d=sb[1-u],f=lb[u],p=s.position.slice();this._showController?s.eachChild(function(t){t.__legendDataIndex===a&&(r=t)}):r=s.childAt(0);var g=h?Math.ceil(l[c]/h):0;if(r){var v=r.getBoundingRect(),m=r.position[u]+v[f];p[u]=-m-l[f],i=Math.floor(g*(m+v[f]+h/2)/l[c]),i=l[c]&&g?Math.max(0,Math.min(g-1,i)):-1;var y={x:0,y:0};y[c]=h,y[d]=l[d],y[f]=-p[u]-l[f];var x,_=s.children();if(s.eachChild(function(t,i){var n=e(t);n.intersect(y)&&(null==x&&(x=i),o=t.__legendDataIndex),i===_.length-1&&n[f]+n[c]<=y[f]+y[c]&&(o=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:p,pageIndex:i,pageCount:g,pagePrevDataIndex:n,pageNextDataIndex:o}}});ws("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 ub=function(t,e){var i,n=[],o=t.seriesIndex;if(null==o||!(i=e.getSeriesByIndex(o)))return{point:[]};var r=i.getData(),a=ta(r,t);if(null==a||_(a))return{point:[]};var s=r.getItemGraphicEl(a),l=i.coordinateSystem;if(i.getTooltipPosition)n=i.getTooltipPosition(a)||[];else if(l&&l.dataToPoint)n=l.dataToPoint(r.getValues(p(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}},cb=f,db=x,fb=fm(),pb=function(t,e,i){var n=t.currTrigger,o=[t.x,t.y],r=t,a=t.dispatchAction||y(i.dispatchAction,i),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){Qu(o)&&(o=ub({seriesIndex:r.seriesIndex,dataIndex:r.dataIndex},e).point);var l=Qu(o),h=r.axesInfo,u=s.axesInfo,c="leave"===n||Qu(o),d={},f={},p={list:[],map:{}},g={showPointer:db(Xu,f),showTooltip:db(qu,p)};cb(s.coordSysMap,function(t,e){var i=l||t.containPoint(o);cb(s.coordSysAxesInfo[e],function(t){var e=t.axis,n=Ku(h,t);if(!c&&i&&(!h||n)){var r=n&&n.value;null!=r||l||(r=e.pointToData(o)),null!=r&&Zu(t,r,g,!1,d)}})});var v={};return cb(u,function(t,e){var i=t.linkGroup;i&&!f[e]&&cb(i.axesInfo,function(e,n){var o=f[n];if(e!==t&&o){var r=o.value;i.mapper&&(r=t.axis.scale.parse(i.mapper(r,Ju(e),Ju(t)))),v[t.key]=r}})}),cb(v,function(t,e){Zu(u[e],t,g,!0,d)}),Yu(f,u,d),ju(p,o,t,a),$u(u,a,i),d}},gb=(As({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}}}),fm()),vb=f,mb=Cs({type:"axisPointer",render:function(t,e,i){var n=e.getComponent("tooltip"),o=t.get("triggerOn")||n&&n.get("triggerOn")||"mousemove|click";tc("axisPointer",i,function(t,e,i){"none"!==o&&("leave"===t||o.indexOf(t)>=0)&&i({type:"updateAxisPointer",currTrigger:t,x:e&&e.offsetX,y:e&&e.offsetY})})},remove:function(t,e){ac(e.getZr(),"axisPointer"),mb.superApply(this._model,"remove",arguments)},dispose:function(t,e){ac("axisPointer",e),mb.superApply(this._model,"dispose",arguments)}}),yb=fm(),xb=n,_b=y;sc.prototype={_group:null,_lastGraphicKey:null,_handle:null,_dragging:!1,_lastValue:null,_lastStatus:null,_payloadInfo:null,animationThreshold:15,render:function(t,e,i,n){var o=e.get("value"),r=e.get("status");if(this._axisModel=t,this._axisPointerModel=e,this._api=i,n||this._lastValue!==o||this._lastStatus!==r){this._lastValue=o,this._lastStatus=r;var a=this._group,s=this._handle;if(!r||"hide"===r)return a&&a.hide(),void(s&&s.hide());a&&a.show(),s&&s.show();var l={};this.makeElOption(l,o,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=x(lc,e,u);this.updatePointerEl(a,l,c,e),this.updateLabelEl(a,l,c,e)}else a=this._group=new wp,this.createPointerEl(a,l,t,e),this.createLabelEl(a,l,t,e),i.getZr().add(a);dc(a,e,!0),this._renderHandle(o)}},remove:function(t){this.clear(t)},dispose:function(t){this.clear(t)},determineAnimation:function(t,e){var i=e.get("animation"),n=t.axis,o="category"===n.type,r=e.get("snap");if(!r&&!o)return!1;if("auto"===i||null==i){var a=this.animationThreshold;if(o&&n.getBandWidth()>a)return!0;if(r){var s=sh(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=yb(t).pointerEl=new nm[i.type](xb(e.pointer));t.add(n)}},createLabelEl:function(t,e,i,n){if(e.label){var o=yb(t).labelEl=new Wv(xb(e.label));t.add(o),uc(o,n)}},updatePointerEl:function(t,e,i){var n=yb(t).pointerEl;n&&(n.setStyle(e.pointer.style),i(n,{shape:e.pointer.shape}))},updateLabelEl:function(t,e,i,n){var o=yb(t).labelEl;o&&(o.setStyle(e.label.style),i(o,{shape:e.label.shape,position:e.label.position}),uc(o,n))},_renderHandle:function(t){if(!this._dragging&&this.updateHandleTransform){var e=this._axisPointerModel,i=this._api.getZr(),n=this._handle,o=e.getModel("handle"),r=e.get("status");if(!o.get("show")||!r||"hide"===r)return n&&i.remove(n),void(this._handle=null);var a;this._handle||(a=!0,n=this._handle=Gr(o.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){$p(t.event)},onmousedown:_b(this._onHandleDragMove,this,0,0),drift:_b(this._onHandleDragMove,this),ondragend:_b(this._onHandleDragEnd,this)}),i.add(n)),dc(n,e,!1);var s=["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];n.setStyle(o.getItemStyle(null,s));var l=o.get("size");_(l)||(l=[l,l]),n.attr("scale",[l[0]/2,l[1]/2]),Wa(this,"_doDispatchAxisPointer",o.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,a)}},_moveHandleToValue:function(t,e){lc(this._axisPointerModel,!e&&this._moveAnimation,this._handle,cc(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},_onHandleDragMove:function(t,e){var i=this._handle;if(i){this._dragging=!0;var n=this.updateHandleTransform(cc(i),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=n,i.stopAnimation(),i.attr(cc(n)),yb(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]}}},sc.prototype.constructor=sc,ao(sc);var wb=sc.extend({makeElOption:function(t,e,i,n,o){var r=i.axis,a=r.grid,s=n.get("type"),l=wc(a,r).getOtherAxis(r).getGlobalExtent(),h=r.toGlobalCoord(r.dataToCoord(e,!0));if(s&&"none"!==s){var u=fc(n),c=bb[s](r,h,l,u);c.style=u,t.graphicKey=c.type,t.pointer=c}var d=fh(a.model,i);yc(e,t,d,i,n,o)},getHandleTransform:function(t,e,i){var n=fh(e.axis.grid.model,e,{labelInside:!1});return n.labelMargin=i.get("handle.margin"),{position:mc(e.axis,t,n),rotation:n.rotation+(n.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(t,e,i){var n=i.axis,o=n.grid,r=n.getGlobalExtent(!0),a=wc(o,n).getOtherAxis(n).getGlobalExtent(),s="x"===n.dim?0:1,l=t.position;l[s]+=e[s],l[s]=Math.min(r[1],l[s]),l[s]=Math.max(r[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]}}}),bb={line:function(t,e,i,n){var o=xc([e,i[0]],[e,i[1]],bc(t));return ar({shape:o,style:n}),{type:"Line",shape:o}},shadow:function(t,e,i){var n=t.getBandWidth(),o=i[1]-i[0];return{type:"Rect",shape:_c([e-n/2,i[0]],[n,o],bc(t))}}};p_.registerAxisPointerClass("CartesianAxisPointer",wb),ys(function(t){if(t){(!t.axisPointer||0===t.axisPointer.length)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!_(e)&&(t.axisPointer.link=[e])}}),xs(vy.PROCESSOR.STATISTIC,function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=th(t,e)}),ws({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},pb),As({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 Sb=f,Mb=Yn,Ib=["","-webkit-","-moz-","-o-"],Tb="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;";Tc.prototype={constructor:Tc,_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+Ic(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 o=this.el.style;o.left=t+"px",o.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(y(this.hide,this),t)):this.hide())},isShow:function(){return this._show}};var Ab=y,Cb=f,Db=kn,Lb=new Wv({shape:{x:-1,y:-1,width:2,height:2}});Cs({type:"tooltip",init:function(t,e){if(!vf.node){var i=new Tc(e.getDom(),e);this._tooltipContent=i}},render:function(t,e,i){if(!vf.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");tc("itemTooltip",this._api,Ab(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&&!vf.node){var o=Cc(n,i);this._ticket="";var r=n.dataByCoordSys;if(n.tooltip&&null!=n.x&&null!=n.y){var a=Lb;a.position=[n.x,n.y],a.update(),a.tooltip=n.tooltip,this._tryShow({offsetX:n.x,offsetY:n.y,target:a},o)}else if(r)this._tryShow({offsetX:n.x,offsetY:n.y,position:n.position,event:{},dataByCoordSys:n.dataByCoordSys,tooltipOption:n.tooltipOption},o);else if(null!=n.seriesIndex){if(this._manuallyAxisShowTip(t,e,i,n))return;var s=ub(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:{}},o)}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:{}},o))}},manuallyHideTip:function(t,e,i,n){var o=this._tooltipContent;this._alwaysShowContent||o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=null,n.from!==this.uid&&this._hide(Cc(n,i))},_manuallyAxisShowTip:function(t,e,i,n){var o=n.seriesIndex,r=n.dataIndex,a=e.getComponent("axisPointer").coordSysAxesInfo;if(null!=o&&null!=r&&null!=a){var s=e.getSeriesByIndex(o);if(s){var l=s.getData(),t=Ac([l.getItemModel(r),s,(s.coordinateSystem||{}).model,t]);if("axis"===t.get("trigger"))return i.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:r,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 o=t.dataByCoordSys;o&&o.length?this._showAxisTooltip(o,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=y(e,this),clearTimeout(this._showTimout),i>0?this._showTimout=setTimeout(e,i):e()},_showAxisTooltip:function(t,e){var i=this._ecModel,n=this._tooltipModel,o=[e.offsetX,e.offsetY],r=[],a=[],s=Ac([e.tooltipOption,n]);Cb(t,function(t){Cb(t.dataByAxis,function(t){var e=i.getComponent(t.axisDim+"Axis",t.axisIndex),n=t.value,o=[];if(e&&null!=n){var s=vc(n,e.axis,i,t.seriesDataIndices,t.valueLabelOpt);f(t.seriesDataIndices,function(r){var l=i.getSeriesByIndex(r.seriesIndex),h=r.dataIndexInside,u=l&&l.getDataParams(h);u.axisDim=t.axisDim,u.axisIndex=t.axisIndex,u.axisType=t.axisType,u.axisId=t.axisId,u.axisValue=ll(e.axis,n),u.axisValueLabel=s,u&&(a.push(u),o.push(l.formatTooltip(h,!0)))});var l=s;r.push((l?jn(l)+"
":"")+o.join("
"))}})},this),r.reverse(),r=r.join("

");var l=e.position;this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(t)?this._updatePosition(s,l,o[0],o[1],this._tooltipContent,a):this._showTooltipContent(s,r,a,Math.random(),o[0],o[1],l) })},_showSeriesItemTooltip:function(t,e,i){var n=this._ecModel,o=e.seriesIndex,r=n.getSeriesByIndex(o),a=e.dataModel||r,s=e.dataIndex,l=e.dataType,h=a.getData(),u=Ac([h.getItemModel(s),a,r&&(r.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),p="item_"+a.name+"_"+s;this._showOrMove(u,function(){this._showTooltipContent(u,f,d,p,t.offsetX,t.offsetY,t.position,t.target)}),i({type:"showTip",dataIndexInside:s,dataIndex:h.getRawIndex(s),seriesIndex:o,from:this.uid})}},_showComponentItemTooltip:function(t,e,i){var n=e.tooltip;if("string"==typeof n){var o=n;n={content:o,formatter:o}}var r=new Hr(n,this._tooltipModel,this._ecModel),a=r.get("content"),s=Math.random();this._showOrMove(r,function(){this._showTooltipContent(r,a,r.get("formatterParams")||{},s,t.offsetX,t.offsetY,t.position,e)}),i({type:"showTip",from:this.uid})},_showTooltipContent:function(t,e,i,n,o,r,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=$n(h,i,!0);else if("function"==typeof h){var c=Ab(function(e,n){e===this._ticket&&(l.setContent(n),this._updatePosition(t,a,o,r,l,i,s))},this);this._ticket=n,u=h(i,n,c)}l.setContent(u),l.show(t),this._updatePosition(t,a,o,r,l,i,s)}},_updatePosition:function(t,e,i,n,o,r,a){var s=this._api.getWidth(),l=this._api.getHeight();e=e||t.get("position");var h=o.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],r,o.el,d,{viewSize:[s,l],contentSize:h.slice()})),_(e))i=Db(e[0],s),n=Db(e[1],l);else if(S(e)){e.width=h[0],e.height=h[1];var f=ua(e,{width:s,height:l});i=f.x,n=f.y,u=null,c=null}else if("string"==typeof e&&a){var p=kc(e,d,h);i=p[0],n=p[1]}else{var p=Dc(i,n,o.el,s,l,u?null:20,c?null:20);i=p[0],n=p[1]}if(u&&(i-=Oc(u)?h[0]/2:"right"===u?h[0]:0),c&&(n-=Oc(c)?h[1]/2:"bottom"===c?h[1]:0),t.get("confine")){var p=Lc(i,n,o.el,s,l);i=p[0],n=p[1]}o.moveTo(i,n)},_updateContentNotChangedOnAxis:function(t){var e=this._lastDataByCoordSys,i=!!e&&e.length===t.length;return i&&Cb(e,function(e,n){var o=e.dataByAxis||{},r=t[n]||{},a=r.dataByAxis||[];i&=o.length===a.length,i&&Cb(o,function(t,e){var n=a[e]||{},o=t.seriesDataIndices||[],r=n.seriesDataIndices||[];i&=t.value===n.value&&t.axisType===n.axisType&&t.axisId===n.axisId&&o.length===r.length,i&&Cb(o,function(t,e){var n=r[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){vf.node||(this._tooltipContent.hide(),ac("itemTooltip",e))}}),ws({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},function(){}),ws({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},function(){});var Pb=qn,kb=jn,Ob=As({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(vf.node)return!1;var t=this.__hostSeries;return this.getShallow("animation")&&t&&t.isAnimationEnabled()},mergeOption:function(t,e,i,n){var o=this.constructor,r=this.mainType+"Model";i||e.eachSeries(function(t){var i=t.get(this.mainType),s=t[r];return i&&i.data?(s?s.mergeOption(i,e,!0):(n&&zc(i),f(i.data,function(t){t instanceof Array?(zc(t[0]),zc(t[1])):zc(t)}),s=new o(i,this,e),a(s,{mainType:this.mainType,seriesIndex:t.seriesIndex,name:t.name,createdBySelf:!0}),s.__hostSeries=t),void(t[r]=s)):void(t[r]=null)},this)},formatTooltip:function(t){var e=this.getData(),i=this.getRawValue(t),n=_(i)?p(i,Pb).join(", "):Pb(i),o=e.getName(t),r=kb(this.name);return(null!=i||o)&&(r+="
"),o&&(r+=kb(o),null!=i&&(r+=" : ")),null!=i&&(r+=kb(n)),r},getData:function(){return this._data},setData:function(t){this._data=t}});c(Ob,dm),Ob.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 zb=h,Rb=x,Eb={min:Rb(Vc,"min"),max:Rb(Vc,"max"),average:Rb(Vc,"average")},Bb=Cs({type:"marker",init:function(){this.markerGroupMap=E()},render:function(t,e,i){var n=this.markerGroupMap;n.each(function(t){t.__keep=!1});var o=this.type+"Model";e.eachSeries(function(t){var n=t[o];n&&this.renderSeries(t,n,e,i)},this),n.each(function(t){!t.__keep&&this.group.remove(t.group)},this)},renderSeries:function(){}});Bb.extend({type:"markPoint",updateLayout:function(t,e,i){e.eachSeries(function(t){var e=t.markPointModel;e&&(Zc(e.getData(),t,i),this.markerGroupMap.get(t.id).updateLayout(e))},this)},renderSeries:function(t,e,i,n){var o=t.coordinateSystem,r=t.id,a=t.getData(),s=this.markerGroupMap,l=s.get(r)||s.set(r,new xh),h=Uc(o,t,e);e.setData(h),Zc(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")}}),ys(function(t){t.markPoint=t.markPoint||{}}),Ob.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 Vb=function(t,e,i,r){var s=t.getData(),l=r.type;if(!_(r)&&("min"===l||"max"===l||"average"===l||null!=r.xAxis||null!=r.yAxis)){var h,u,c;if(null!=r.yAxis||null!=r.xAxis)u=null!=r.yAxis?"y":"x",h=e.getAxis(u),c=A(r.yAxis,r.xAxis);else{var d=Fc(r,s,e,t);u=d.valueDataDim,h=d.valueAxis,c=Wc(s,u,l)}var f="x"===u?0:1,p=1-f,g=n(r),v={};g.type=null,g.coord=[],v.coord=[],g.coord[p]=-1/0,v.coord[p]=1/0;var m=i.get("precision");m>=0&&"number"==typeof c&&(c=+c.toFixed(Math.min(m,20))),g.coord[f]=v.coord[f]=c,r=[g,v,{type:l,valueIndex:r.valueIndex,value:c}]}return r=[Nc(t,r[0]),Nc(t,r[1]),a({},r[2])],r[2].type=r[2].type||"",o(r[2],r[0]),o(r[2],r[1]),r};Bb.extend({type:"markLine",updateLayout:function(t,e,i){e.eachSeries(function(t){var e=t.markLineModel;if(e){var n=e.getData(),o=e.__from,r=e.__to;o.each(function(e){jc(o,e,!0,t,i),jc(r,e,!1,t,i)}),n.each(function(t){n.setItemLayout(t,[o.getItemLayout(t),r.getItemLayout(t)])}),this.markerGroupMap.get(t.id).updateLayout()}},this)},renderSeries:function(t,e,i,n){function o(e,i,o){var r=e.getItemModel(i);jc(e,i,o,t,n),e.setItemVisual(i,{symbolSize:r.get("symbolSize")||g[o?0:1],symbol:r.get("symbol",!0)||p[o?0:1],color:r.get("itemStyle.normal.color")||s.getVisual("color")})}var r=t.coordinateSystem,a=t.id,s=t.getData(),l=this.markerGroupMap,h=l.get(a)||l.set(a,new Pu);this.group.add(h.group);var u=$c(r,t,e),c=u.from,d=u.to,f=u.line;e.__from=c,e.__to=d,e.setData(f);var p=e.get("symbol"),g=e.get("symbolSize");_(p)||(p=[p,p]),"number"==typeof g&&(g=[g,g]),u.from.each(function(t){o(c,t,!0),o(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")}}),ys(function(t){t.markLine=t.markLine||{}}),Ob.extend({type:"markArea",defaultOption:{zlevel:0,z:1,tooltip:{trigger:"item"},animation:!1,label:{normal:{show:!0,position:"top"},emphasis:{show:!0,position:"top"}},itemStyle:{normal:{borderWidth:0}}}});var Nb=function(t,e,i,n){var o=Nc(t,n[0]),a=Nc(t,n[1]),s=A,l=o.coord,h=a.coord;l[0]=s(l[0],-1/0),l[1]=s(l[1],-1/0),h[0]=s(h[0],1/0),h[1]=s(h[1],1/0);var u=r([{},o,a]);return u.coord=[o.coord,a.coord],u.x0=o.x,u.y0=o.y,u.x1=a.x,u.y1=a.y,u},Fb=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]];Bb.extend({type:"markArea",updateLayout:function(t,e,i){e.eachSeries(function(t){var e=t.markAreaModel;if(e){var n=e.getData();n.each(function(e){var o=p(Fb,function(o){return td(n,e,o,t,i)});n.setItemLayout(e,o);var r=n.getItemGraphicEl(e);r.setShape("points",o)})}},this)},renderSeries:function(t,e,i,n){var o=t.coordinateSystem,r=t.name,a=t.getData(),l=this.markerGroupMap,h=l.get(r)||l.set(r,{group:new wp});this.group.add(h.group),h.__keep=!0;var u=ed(o,t,e);e.setData(u),u.each(function(e){u.setItemLayout(e,p(Fb,function(i){return td(u,e,i,t,n)})),u.setItemVisual(e,{color:a.getVisual("color")})}),u.diff(h.__data).add(function(t){var e=new Gv({shape:{points:u.getItemLayout(t)}});u.setItemGraphicEl(t,e),h.group.add(e)}).update(function(t,i){var n=h.__data.getItemGraphicEl(i);Or(n,{shape:{points:u.getItemLayout(t)}},e,t),h.group.add(n),u.setItemGraphicEl(t,n)}).remove(function(t){var e=h.__data.getItemGraphicEl(t);h.group.remove(e)}).execute(),u.eachItemGraphicEl(function(t,i){var n=u.getItemModel(i),o=n.getModel("label.normal"),r=n.getModel("label.emphasis"),a=u.getItemVisual(i,"color");t.useStyle(s(n.getModel("itemStyle.normal").getItemStyle(),{fill:Ve(a,.4),stroke:a})),t.hoverStyle=n.getModel("itemStyle.emphasis").getItemStyle(),br(t.style,t.hoverStyle,o,r,{labelFetcher:e,labelDataIndex:i,defaultText:u.getName(i)||"",isRectText:!0,autoColor:a}),wr(t,{}),t.dataModel=e}),h.__data=u,h.group.silent=e.get("silent")||t.get("silent")}}),ys(function(t){t.markArea=t.markArea||{}}),bm.registerSubTypeDefaulter("dataZoom",function(){return"slider"});var Gb=["x","y","z","radius","angle","single"],Hb=["cartesian2d","polar","singleAxis"],Wb=nd(Gb,["axisIndex","axis","index","id"]),Zb=f,Ub=zn,Xb=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};Xb.prototype={constructor:Xb,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(id(i.get("coordinateSystem"))){var n=this._dimName,o=e.queryComponents({mainType:n+"Axis",index:i.get(n+"AxisIndex"),id:i.get(n+"AxisId")})[0];this._axisIndex===(o&&o.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,o=this.getAxisModel(),r="x"===i||"y"===i;r?(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)===(o.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,o=this._dataZoomModel.getRangePropMode(),r=[0,100],a=[t.start,t.end],s=[];return Zb(["startValue","endValue"],function(e){s.push(null!=t[e]?n.parse(t[e]):null)}),Zb([0,1],function(t){var i=s[t],l=a[t];"percent"===o[t]?(null==l&&(l=r[t]),i=n.parse(Pn(l,r,e,!0))):l=Pn(i,e,r,!0),s[t]=i,a[t]=l}),{valueWindow:Ub(s),percentWindow:Ub(a)}},reset:function(t){if(t===this._dataZoomModel){this._dataExtent=rd(this,this._dimName,this.getTargetSeriesModels());var e=this.calculateDataWindow(t.option);this._valueWindow=e.valueWindow,this._percentWindow=e.percentWindow,ld(this),sd(this)}},restore:function(t){t===this._dataZoomModel&&(this._valueWindow=this._percentWindow=null,sd(this,!0))},filterData:function(t){function e(t){return t>=r[0]&&t<=r[1]}if(t===this._dataZoomModel){var i=this._dimName,n=this.getTargetSeriesModels(),o=t.get("filterMode"),r=this._valueWindow;if("none"!==o){var a=this.getOtherAxisModel();t.get("$fromToolbox")&&a&&"category"===a.get("type")&&(o="empty"),Zb(n,function(t){var n=t.getData(),a=t.coordDimToDataDim(i);"weakFilter"===o?n&&n.filterSelf(function(t){for(var e,i,o,s=0;sr[1];if(h&&!u&&!c)return!0;h&&(o=!0),u&&(e=!0),c&&(i=!0)}return o&&e&&i}):n&&Zb(a,function(i){"empty"===o?t.setData(n.map(i,function(t){return e(t)?t:0/0})):n.filterSelf(i,e)})})}}}};var qb=f,Yb=Wb,jb=As({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=hd(t);this.mergeDefaultAndTheme(t,i),this.doInit(n)},mergeOption:function(t){var e=hd(t);o(this.option,t,!0),this.doInit(e)},doInit:function(t){var e=this.option;vf.canvasSupported||(e.realtime=!1),this._setDefaultThrottle(t),ud(this,t),qb([["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,o){var r=this.dependentModels[e.axis][i],a=r.__dzAxisProxy||(r.__dzAxisProxy=new Xb(e.name,i,this,o));t[e.name+"_"+i]=a},this)},_resetTarget:function(){var t=this.option,e=this._judgeAutoMode();Yb(function(e){var i=e.axisIndex;t[i]=Ur(t[i])},this),"axisIndex"===e?this._autoSetAxisIndex():"orient"===e&&this._autoSetOrient()},_judgeAutoMode:function(){var t=this.option,e=!1;Yb(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 o="vertical"===e?"y":"x";n[o+"Axis"].length?(i[o+"AxisIndex"]=[0],t=!1):qb(n.singleAxis,function(n){t&&n.get("orient",!0)===e&&(i.singleAxisIndex=[n.componentIndex],t=!1)})}t&&Yb(function(e){if(t){var n=[],o=this.dependentModels[e.axis];if(o.length&&!n.length)for(var r=0,a=o.length;a>r;r++)"category"===o[r].get("type")&&n.push(r);i[e.axisIndex]=n,n.length&&(t=!1)}},this),t&&this.ecModel.eachSeries(function(t){this._isSeriesHasAllAxesTypeOf(t,"value")&&Yb(function(e){var n=i[e.axisIndex],o=t.get(e.axisIndex),r=t.get(e.axisId),a=t.ecModel.queryComponents({mainType:e.axis,index:o,id:r})[0];o=a.componentIndex,h(n,o)<0&&n.push(o)})},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 Yb(function(n){var o=t.get(n.axisIndex),r=this.dependentModels[n.axis][o];r&&r.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 Yb(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;Yb(function(n){qb(this.get(n.axisIndex),function(o){t.call(e,n,o,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;qb([["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&&ud(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()}}),$b=$m.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 o,r=0;rr&&(e[1-n]=e[n]+u.sign*r),e}),Jb=Wv,Qb=Pn,tS=zn,eS=y,iS=f,nS=7,oS=1,rS=30,aS="horizontal",sS="vertical",lS=5,hS=["line","bar","candlestick","scatter"],uS=$b.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 uS.superApply(this,"render",arguments),Wa(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(){uS.superApply(this,"remove",arguments),Za(this,"_dispatchZoomAction")},dispose:function(){uS.superApply(this,"dispose",arguments),Za(this,"_dispatchZoomAction")},_buildView:function(){var t=this.group;t.removeAll(),this._resetLocation(),this._resetInterval();var e=this._displayables.barGroup=new wp;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()},o=this._orient===aS?{right:n.width-i.x-i.width,top:n.height-rS-nS,width:i.width,height:rS}:{right:nS,top:i.y,width:rS,height:i.height},r=fa(t.option);f(["right","top","width","height"],function(t){"ph"===r[t]&&(r[t]=o[t])});var a=ua(r,n,t.padding);this._location={x:a.x,y:a.y},this._size=[a.width,a.height],this._orient===sS&&this._size.reverse()},_positionGroup:function(){var t=this.group,e=this._location,i=this._orient,n=this.dataZoomModel.getFirstTargetAxisModel(),o=n&&n.get("inverse"),r=this._displayables.barGroup,a=(this._dataShadowInfo||{}).otherAxisInverse;r.attr(i!==aS||o?i===aS&&o?{scale:a?[-1,1]:[-1,-1]}:i!==sS||o?{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([r]);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 Jb({silent:!0,shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:t.get("backgroundColor")},z2:-40})),i.add(new Jb({shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:"transparent"},z2:0,onclick:y(this._onClickPanelClick,this)}))},_renderDataShadow:function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(t){var e=this._size,i=t.series,n=i.getRawData(),o=i.getShadowDim?i.getShadowDim():t.otherDim;if(null!=o){var r=n.getDataExtent(o),a=.3*(r[1]-r[0]);r=[r[0]-a,r[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),p=0,g=Math.round(n.count()/e[0]);n.each([o],function(t,e){if(g>0&&e%g)return void(p+=f);var i=null==t||isNaN(t)||""===t,n=i?0:Qb(t,r,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([p,0]),d.push([p,0])),c.push([p,n]),d.push([p,n]),p+=f,l=i});var v=this.dataZoomModel;this._displayables.barGroup.add(new Gv({shape:{points:c},style:s({fill:v.get("dataBackgroundColor")},v.getModel("dataBackground.areaStyle").getAreaStyle()),silent:!0,z2:-20})),this._displayables.barGroup.add(new Hv({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(o,r){var a=t.getAxisProxy(o.name,r).getTargetSeriesModels();f(a,function(t){if(!(i||e!==!0&&h(hS,t.get("type"))<0)){var a,s=n.getComponent(o.axis,r).axis,l=fd(o.name),u=t.coordinateSystem;null!=l&&u.getOtherAxis&&(a=u.getOtherAxis(s).inverse),i={thisAxis:s,series:t,thisDim:o.name,otherDim:l,otherAxisInverse:a}}},this)},this),i}},_renderHandle:function(){var t=this._displayables,e=t.handles=[],i=t.handleLabels=[],n=this._displayables.barGroup,o=this._size,r=this.dataZoomModel;n.add(t.filler=new Jb({draggable:!0,cursor:pd(this._orient),drift:eS(this._onDragMove,this,"all"),onmousemove:function(t){$p(t.event)},ondragstart:eS(this._showDataInfo,this,!0),ondragend:eS(this._onDragEnd,this),onmouseover:eS(this._showDataInfo,this,!0),onmouseout:eS(this._showDataInfo,this,!1),style:{fill:r.get("fillerColor"),textPosition:"inside"}})),n.add(new Jb(sr({silent:!0,shape:{x:0,y:0,width:o[0],height:o[1]},style:{stroke:r.get("dataBackgroundColor")||r.get("borderColor"),lineWidth:oS,fill:"rgba(0,0,0,0)"}}))),iS([0,1],function(t){var o=Gr(r.get("handleIcon"),{cursor:pd(this._orient),draggable:!0,drift:eS(this._onDragMove,this,t),onmousemove:function(t){$p(t.event)},ondragend:eS(this._onDragEnd,this),onmouseover:eS(this._showDataInfo,this,!0),onmouseout:eS(this._showDataInfo,this,!1)},{x:-1,y:0,width:2,height:2}),a=o.getBoundingRect();this._handleHeight=kn(r.get("handleSize"),this._size[1]),this._handleWidth=a.width/a.height*this._handleHeight,o.setStyle(r.getModel("handleStyle").getItemStyle());var s=r.get("handleColor");null!=s&&(o.style.fill=s),n.add(e[t]=o);var l=r.textStyleModel;this.group.add(i[t]=new Ov({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=[Qb(t[0],[0,100],e,!0),Qb(t[1],[0,100],e,!0)]},_updateInterval:function(t,e){var i=this.dataZoomModel,n=this._handleEnds,o=this._getViewExtent(),r=i.findRepresentativeAxisProxy().getMinMaxSpan(),a=[0,100];Kb(e,n,o,i.get("zoomLock")?"all":t,null!=r.minSpan?Qb(r.minSpan,a,o,!0):null,null!=r.maxSpan?Qb(r.maxSpan,a,o,!0):null),this._range=tS([Qb(n[0],o,a,!0),Qb(n[1],o,a,!0)])},_updateView:function(t){var e=this._displayables,i=this._handleEnds,n=tS(i.slice()),o=this._size;iS([0,1],function(t){var n=e.handles[t],r=this._handleHeight;n.attr({scale:[r/2,r/2],position:[i[t],o[1]/2-r/2]})},this),e.filler.setShape({x:n[0],y:0,width:n[1]-n[0],height:o[1]}),this._updateDataInfo(t)},_updateDataInfo:function(t){function e(t){var e=Rr(n.handles[t].parent,this.group),i=Br(0===t?"right":"left",e),s=this._handleWidth/2+lS,l=Er([c[t]+(0===t?-s:s),this._size[1]/2],e);o[t].setStyle({x:l[0],y:l[1],textVerticalAlign:r===aS?"middle":i,textAlign:r===aS?i:"center",text:a[t]})}var i=this.dataZoomModel,n=this._displayables,o=n.handleLabels,r=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=tS(this._handleEnds.slice());e.call(this,0),e.call(this,1)},_formatLabel:function(t,e){var i=this.dataZoomModel,n=i.get("labelFormatter"),o=i.get("labelPrecision");(null==o||"auto"===o)&&(o=e.getPixelPrecision());var r=null==t||isNaN(t)?"":"category"===e.type||"time"===e.type?e.scale.getLabel(Math.round(t)):t.toFixed(Math.min(o,20));return w(n)?n(t,r):b(n)?n.replace("{value}",r):r},_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(),o=Er([e,i],n,!0);this._updateInterval(t,o[0]);var r=this.dataZoomModel.get("realtime");this._updateView(!r),r&&r&&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,o=(n[0]+n[1])/2;this._updateInterval("all",i[0]-o),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(iS(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}});jb.extend({type:"dataZoom.inside",defaultOption:{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,preventDefaultMouseMove:!0}});var cS=x,dS="\x00_ec_dataZoom_roams",fS=y,pS=$b.extend({type:"dataZoom.inside",init:function(){this._range},render:function(t,e,i,n){pS.superApply(this,"render",arguments),md(n,t.id)&&(this._range=t.getPercentRange()),f(this.getTargetCoordInfo(),function(e,n){var o=p(e,function(t){return yd(t.model)});f(e,function(e){var r=e.model,a=t.option;gd(i,{coordId:yd(r),allCoordIds:o,containsPoint:function(t,e,i){return r.coordinateSystem.containPoint([e,i])},dataZoomId:t.id,throttleRate:t.get("throttle",!0),panGetRange:fS(this._onPan,this,e,n),zoomGetRange:fS(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(){vd(this.api,this.dataZoomModel.id),pS.superApply(this,"dispose",arguments),this._range=null},_onPan:function(t,e,i,n,o,r,a,s,l){var h=this._range.slice(),u=t.axisModels[0];if(u){var c=gS[e]([r,a],[s,l],u,i,t),d=c.signal*(h[1]-h[0])*c.pixel/c.pixelLength;return Kb(d,h,[0,100],"all"),this._range=h}},_onZoom:function(t,e,i,n,o,r){var a=this._range.slice(),s=t.axisModels[0];if(s){var l=gS[e](null,[o,r],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 Kb(0,a,[0,100],0,u.minSpan,u.maxSpan),this._range=a}}}),gS={grid:function(t,e,i,n,o){var r=i.axis,a={},s=o.model.coordinateSystem.getRect();return t=t||[0,0],"x"===r.dim?(a.pixel=e[0]-t[0],a.pixelLength=s.width,a.pixelStart=s.x,a.signal=r.inverse?1:-1):(a.pixel=e[1]-t[1],a.pixelLength=s.height,a.pixelStart=s.y,a.signal=r.inverse?-1:1),a},polar:function(t,e,i,n,o){var r=i.axis,a={},s=o.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=r.inverse?1:-1):(a.pixel=e[1]-t[1],a.pixelLength=h[1]-h[0],a.pixelStart=h[0],a.signal=r.inverse?-1:1),a},singleAxis:function(t,e,i,n,o){var r=i.axis,a=o.model.coordinateSystem.getRect(),s={};return t=t||[0,0],"horizontal"===r.orient?(s.pixel=e[0]-t[0],s.pixelLength=a.width,s.pixelStart=a.x,s.signal=r.inverse?1:-1):(s.pixel=e[1]-t[1],s.pixelLength=a.height,s.pixelStart=a.y,s.signal=r.inverse?-1:1),s}};xs(function(t){t.eachComponent("dataZoom",function(t){t.eachTargetAxis(Ad),t.eachTargetAxis(Cd)}),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)})}),ws("dataZoom",function(t,e){var i=od(y(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 vS=f,mS=function(t){var e=t&&t.visualMap;_(e)||(e=e?[e]:[]),vS(e,function(t){if(t){Dd(t,"splitList")&&!Dd(t,"pieces")&&(t.pieces=t.splitList,delete t.splitList);var e=t.pieces;e&&_(e)&&vS(e,function(t){S(t)&&(Dd(t,"start")&&!Dd(t,"min")&&(t.min=t.start),Dd(t,"end")&&!Dd(t,"max")&&(t.max=t.end))})}})};bm.registerSubTypeDefaulter("visualMap",function(t){return t.categories||(t.pieces?t.pieces.length>0:t.splitNumber>0)&&!t.calculable?"piecewise":"continuous"});var yS=f,xS=S,_S=-1,wS=function(t){var e=t.mappingMethod,i=t.type,o=this.option=n(t);this.type=i,this.mappingMethod=e,this._normalizeData=SS[e];var r=bS[i];this.applyVisual=r.applyVisual,this.getColorMapper=r.getColorMapper,this._doMap=r._doMap[e],"piecewise"===e?(kd(o),Ld(o)):"category"===e?o.categories?Pd(o):kd(o,!0):(k("linear"!==e||o.dataExtent),kd(o))};wS.prototype={constructor:wS,mapValueToVisual:function(t){var e=this._normalizeData(t);return this._doMap(e,t)},getNormalizer:function(){return y(this._normalizeData,this)}};var bS=wS.visualHandlers={color:{applyVisual:Rd("color"),getColorMapper:function(){var t=this.option;return y("category"===t.mappingMethod?function(t,e){return!e&&(t=this._normalizeData(t)),Ed.call(this,t)}:function(e,i,n){var o=!!n;return!i&&(e=this._normalizeData(e)),n=Re(e,t.parsedVisual,n),o?n:Ne(n,"rgba")},this)},_doMap:{linear:function(t){return Ne(Re(t,this.option.parsedVisual),"rgba")},category:Ed,piecewise:function(t,e){var i=Nd.call(this,e);return null==i&&(i=Ne(Re(t,this.option.parsedVisual),"rgba")),i},fixed:Bd}},colorHue:Od(function(t,e){return Be(t,e)}),colorSaturation:Od(function(t,e){return Be(t,null,e)}),colorLightness:Od(function(t,e){return Be(t,null,null,e)}),colorAlpha:Od(function(t,e){return Ve(t,e)}),opacity:{applyVisual:Rd("opacity"),_doMap:Vd([0,1])},symbol:{applyVisual:function(t,e,i){var n=this.mapValueToVisual(t);if(b(n))i("symbol",n);else if(xS(n))for(var o in n)n.hasOwnProperty(o)&&i(o,n[o])},_doMap:{linear:zd,category:Ed,piecewise:function(t,e){var i=Nd.call(this,e);return null==i&&(i=zd.call(this,t)),i},fixed:Bd}},symbolSize:{applyVisual:Rd("symbolSize"),_doMap:Vd([0,1])}},SS={linear:function(t){return Pn(t,this.option.dataExtent,[0,1],!0)},piecewise:function(t){var e=this.option.pieceList,i=wS.findPieceIndex(t,e,!0); return null!=i?Pn(i,[0,e.length-1],[0,1],!0):void 0},category:function(t){var e=this.option.categories?this.option.categoryMap[t]:t;return null==e?_S:e},fixed:B};wS.listVisualTypes=function(){var t=[];return f(bS,function(e,i){t.push(i)}),t},wS.addVisualHandler=function(t,e){bS[t]=e},wS.isValidType=function(t){return bS.hasOwnProperty(t)},wS.eachVisual=function(t,e,i){S(t)?f(t,e,i):e.call(i,t)},wS.mapVisual=function(t,e,i){var n,o=_(t)?[]:S(t)?{}:(n=!0,null);return wS.eachVisual(t,function(t,r){var a=e.call(i,t,r);n?o=a:o[r]=a}),o},wS.retrieveVisuals=function(t){var e,i={};return t&&yS(bS,function(n,o){t.hasOwnProperty(o)&&(i[o]=t[o],e=!0)}),e?i:null},wS.prepareVisualTypes=function(t){if(xS(t)){var e=[];yS(t,function(t,i){e.push(i)}),t=e}else{if(!_(t))return[];t=t.slice()}return t.sort(function(t,e){return"color"===e&&"color"!==t&&0===t.indexOf("color")?1:-1}),t},wS.dependsOn=function(t,e){return"color"===e?!(!t||0!==t.indexOf(e)):t===e},wS.findPieceIndex=function(t,e,i){function n(e,i){var n=Math.abs(e-t);r>n&&(r=n,o=i)}for(var o,r=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(Gd(c[1],t,u[1]))return a}else if(1/0===u[1]){if(Gd(c[0],u[0],t))return a}else if(Gd(c[0],u[0],t)&&Gd(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:o:void 0};var MS=f;Is(vy.VISUAL.COMPONENT,function(t){t.eachComponent("visualMap",function(e){Xd(e,t)}),qd(t)});var IS={get:function(t,e,i){var o=n((TS[t]||{})[e]);return i&&_(o)?o[o.length-1]:o}},TS={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]}},AS=wS.mapVisual,CS=wS.eachVisual,DS=_,LS=f,PS=zn,kS=Pn,OS=B,zS=["#f6efa6","#d88273","#bf444c"],RS=As({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;vf.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=y(t,this),this.controllerVisuals=Wd(this.option.controller,e,t),this.targetVisuals=Wd(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=Ur(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 o,r,a=this.option,s=a.precision,l=this.dataBound,h=a.formatter;return i=i||["<",">"],_(t)&&(t=t.slice(),o=!0),r=e?t:o?[n(t[0]),n(t[1])]:n(t),b(h)?h.replace("{value}",o?r[0]:r).replace("{value2}",o?r[1]:r):w(h)?o?h(t[0],t[1]):h(t):o?t[0]===l[0]?i[0]+" "+r[1]:t[1]===l[1]?i[1]+" "+r[0]:r[0]+" - "+r[1]:r},resetExtent:function(){var t=this.option,e=PS([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){DS(r.color)&&!t.inRange&&(t.inRange={color:r.color.slice().reverse()}),t.inRange=t.inRange||{color:zS},LS(this.stateList,function(e){var i=t[e];if(b(i)){var n=IS.get(i,"active",h);n?(t[e]={},t[e][i]=n):delete t[e]}},this)}function e(t,e,i){var n=t[e],o=t[i];n&&!o&&(o=t[i]={},LS(n,function(t,e){if(wS.isValidType(e)){var i=IS.get(e,"inactive",h);null!=i&&(o[e]=i,"color"!==e||o.hasOwnProperty("opacity")||o.hasOwnProperty("colorAlpha")||(o.opacity=[0,0]))}}))}function i(t){var e=(t.inRange||{}).symbol||(t.outOfRange||{}).symbol,i=(t.inRange||{}).symbolSize||(t.outOfRange||{}).symbolSize,o=this.get("inactiveColor");LS(this.stateList,function(r){var a=this.itemSize,s=t[r];s||(s=t[r]={color:h?o:[o]}),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=AS(s.symbol,function(t){return"none"===t||"square"===t?"roundRect":t});var l=s.symbolSize;if(null!=l){var u=-1/0;CS(l,function(t){t>u&&(u=t)}),s.symbolSize=AS(l,function(t){return kS(t,[0,u],[0,a[0]],!0)})}},this)}var r=this.option,a={inRange:r.inRange,outOfRange:r.outOfRange},s=r.target||(r.target={}),l=r.controller||(r.controller={});o(s,a),o(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:OS,getValueState:OS,getVisualMeta:OS}),ES=[20,140],BS=RS.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(){BS.superApply(this,"optionUpdated",arguments),this.resetExtent(),this.resetVisual(function(t){t.mappingMethod="linear",t.dataExtent=this.getExtent()}),this._resetRange()},resetItemSize:function(){BS.superApply(this,"resetItemSize",arguments);var t=this.itemSize;"horizontal"===this._orient&&t.reverse(),(null==t[0]||isNaN(t[0]))&&(t[0]=ES[0]),(null==t[1]||isNaN(t[1]))&&(t[1]=ES[1])},_resetRange:function(){var t=this.getExtent(),e=this.option.range;!e||e.auto?(t.auto=1,this.option.range=t):_(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(){RS.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=zn((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=[],o=i.getData();o.each(this.getDataDimension(o),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){o.push({value:e,color:t(e,i)})}for(var i=jd(this,"outOfRange",this.getExtent()),n=jd(this,"inRange",this.option.range.slice()),o=[],r=0,a=0,s=n.length,l=i.length;l>a&&(!n.length||i[a]<=n[0]);a++)i[a]r;r++,h=0)h&&o.length&&e(n[r],"outOfRange"),e(n[r],"inRange");for(var h=1;l>a;a++)(!n.length||n[n.length-1]r;r++){var a=t[0]+o*r;if(a>t[1])break;n.push({color:this.getControllerVisual(a,"color",e),offset:r/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 wp("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,o=i.handleThumbs,r=i.handleLabels;FS([0,1],function(a){var s=o[a];s.setStyle("fill",e.handlesColor[a]),s.position[1]=t[a];var l=Er(i.handleLabelPoints[a],Rr(s,this.group));r[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 o=this.visualMapModel,r=o.getExtent(),a=o.itemSize,s=[0,a[1]],l=NS(t,r,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=Er(h.indicatorLabelPoint,Rr(u,this.group)),p=h.indicatorLabel;p.attr("invisible",!1);var g=this._applyTransform("left",h.barGroup),v=this._orient;p.setStyle({text:(i?i:"")+o.formatValueText(e),textVerticalAlign:"horizontal"===v?g:"middle",textAlign:"horizontal"===v?"center":g,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]=GS(HS(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 o=[0,n[1]],r=i.getExtent();t=GS(HS(o[0],t),o[1]);var a=ef(i,r,o),s=[t-a,t+a],l=NS(t,o,r,!0),h=[NS(s[0],o,r,!0),NS(s[1],o,r,!0)];s[0]o[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=Qr(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 o=n.getData(e.dataType),r=o.getDimension(i.getDataDimension(o)),a=o.get(r,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 o=Rr(e,n?null:this.group);return nm[_(t)?"applyTransform":"transformDirection"](t,o,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()}}),XS={type:"selectDataRange",event:"dataRangeSelected",update:"update"};ws(XS,function(t,e){e.eachComponent({mainType:"visualMap",query:t},function(e){e.setSelected(t.selected)})}),ys(mS);{var qS=RS.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){qS.superApply(this,"optionUpdated",arguments),this._pieceList=[],this.resetExtent();var i=this._mode=this._determineMode();YS[this._mode].call(this),this._resetSelected(t,e);var o=this.option.categories;this.resetVisual(function(t,e){"categories"===i?(t.mappingMethod="category",t.categories=n(o)):(t.dataExtent=this.getExtent(),t.mappingMethod="piecewise",t.pieceList=p(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]&&(S(t[e])?t[e].hasOwnProperty(i):t[e]===i)}var e=this.option,i={},n=wS.listVisualTypes(),o=this.isCategory();f(e.pieces,function(t){f(n,function(e){t.hasOwnProperty(e)&&(i[e]=1)})}),f(i,function(i,n){var r=0;f(this.stateList,function(i){r|=t(e,i,n)||t(e.target,i,n)},this),!r&&f(this.stateList,function(t){(e[t]||(e[t]={}))[n]=IS.get(n,"inRange"===t?"active":"inactive",o)})},this),RS.prototype.completeVisualOption.apply(this,arguments)},_resetSelected:function(t,e){var i=this.option,n=this._pieceList,o=(e?i:t).selected||{};if(i.selected=o,f(n,function(t){var e=this.getSelectedMapKey(t);o.hasOwnProperty(e)||(o[e]=!0)},this),"single"===i.selectedMode){var r=!1;f(n,function(t){var e=this.getSelectedMapKey(t);o[e]&&(r?o[e]=!1:r=!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=wS.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=[],o=i.getData();o.each(this.getDataDimension(o),function(e,i){var o=wS.findPieceIndex(e,this._pieceList);o===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,r){var a=o.getRepresentValue({interval:e});r||(r=o.getValueState(a));var s=t(a,r);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=[],o=this,r=this._pieceList.slice();if(r.length){var a=r[0].interval[0];a!==-1/0&&r.unshift({interval:[-1/0,a]}),a=r[r.length-1].interval[1],1/0!==a&&r.push({interval:[a,1/0]})}else r.push({interval:[-1/0,1/0]});var s=-1/0;return f(r,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}}}}),YS={splitNumber:function(){var t=this.option,e=this._pieceList,i=Math.min(t.precision,20),n=this.getExtent(),o=t.splitNumber;o=Math.max(parseInt(o,10),1),t.splitNumber=o;for(var r=(n[1]-n[0])/o;+r.toFixed(i)!==r&&5>i;)i++;t.precision=i,r=+r.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+o;l>a;s+=r){var h=a===o-1?n[1]:s+r;e.push({index:a++,interval:[s,h],close:[1,1]})}t.maxOpen&&e.push({index:a++,interval:[n[1],1/0],close:[0,0]}),Un(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),rf(t,this._pieceList)},pieces:function(){var t=this.option,e=this._pieceList;f(t.pieces,function(t,i){S(t)||(t={value:t});var n={text:"",index:i};if(null!=t.label&&(n.text=t.label),t.hasOwnProperty("value")){var o=n.value=t.value;n.interval=[o,o],n.close=[1,1]}else{for(var r=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==r[u];d++)r[u]=t[c[d]],a[u]=s[d],h[u]=2===d;null==r[u]&&(r[u]=l[u])}h[0]&&1/0===r[1]&&(a[0]=0),h[1]&&r[0]===-1/0&&(a[1]=0),r[0]===r[1]&&a[0]&&a[1]&&(n.value=r[0])}n.visual=wS.retrieveVisuals(t),e.push(n)},this),rf(t,e),Un(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)}};VS.extend({type:"visualMap.piecewise",doRender:function(){function t(t){var o=t.piece,h=new wp;h.onclick=y(this._onItemClick,this,o),this._enableHoverLink(h,t.indexInModelPieceList);var u=i.getRepresentValue(o);if(this._createItemSymbol(h,u,[0,0,l[0],l[1]]),c){var d=this.visualMapModel.getValueState(u);h.add(new Ov({style:{x:"right"===s?-n:l[0]+n,y:l[1]/2,text:o.text,textVerticalAlign:"middle",textAlign:s,textFont:r,textFill:a,opacity:"outOfRange"===d?.5:1}}))}e.add(h)}var e=this.group;e.removeAll();var i=this.visualMapModel,n=i.get("textGap"),o=i.textStyleModel,r=o.getFont(),a=o.getTextColor(),s=this._getItemAlign(),l=i.itemSize,h=this._getViewData(),u=h.endsText,c=A(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),xm(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",y(i,this,"highlight")).on("mouseout",y(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,o){if(e){var r=new wp,a=this.visualMapModel.textStyleModel;r.add(new Ov({style:{x:n?"right"===o?i[0]:0:i[0]/2,y:i[1]/2,textVerticalAlign:"middle",textAlign:n?o:"center",text:e,textFont:a.getFont(),textFill:a.getTextColor()}})),t.add(r)}},_getViewData:function(){var t=this.visualMapModel,e=p(t.getPieceList(),function(t,e){return{piece:t,indexInModelPieceList:e}}),i=t.get("text"),n=t.get("orient"),o=t.get("inverse");return("horizontal"===n?o:!o)?e.reverse():i&&(i=i.slice().reverse()),{viewPieceList:e,endsText:i}},_createItemSymbol:function(t,e,i){t.add(cl(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,o=n(i.selected),r=e.getSelectedMapKey(t);"single"===i.selectedMode?(o[r]=!0,f(o,function(t,e){o[e]=e===r})):o[r]=!o[r],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:o})}})}ys(mS),ys(function(t){var e=t.graphic;_(e)?t.graphic=e[0]&&e[0].elements?[t.graphic[0]]:[{elements:e}]:e&&!e.elements&&(t.graphic=[{elements:[e]}])});var jS=As({type:"graphic",defaultOption:{elements:[],parentId:null},_elOptionsToUpdate:null,mergeOption:function(){var t=this.option.elements;this.option.elements=null,jS.superApply(this,"mergeOption",arguments),this.option.elements=t},optionUpdated:function(t,e){var i=this.option,n=(e?i:t).elements,o=i.elements=e?[]:i.elements,r=[];this._flatten(n,r);var a=$r(o,r);Kr(a);var s=this._elOptionsToUpdate=[];f(a,function(t,e){var i=t.option;i&&(s.push(i),uf(t,i),cf(o,e,i),df(o[e],i))},this);for(var l=o.length-1;l>=0;l--)null==o[l]?o.splice(l,1):delete o[l].$action},_flatten:function(t,e,i){f(t,function(t){if(t){i&&(t.parentOption=i),e.push(t);var n=t.children;"group"===t.type&&n&&this._flatten(n,e,t),delete t.children}},this)},useElOptionsToUpdate:function(){var t=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,t}});Cs({type:"graphic",init:function(){this._elMap=E(),this._lastGraphicModel},render:function(t,e,i){t!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=t,this._updateElements(t,i),this._relocate(t,i)},_updateElements:function(t){var e=t.useElOptionsToUpdate();if(e){var i=this._elMap,n=this.group;f(e,function(t){var e=t.$action,o=t.id,r=i.get(o),a=t.parentId,s=null!=a?i.get(a):n;if("text"===t.type){var l=t.style;t.hv&&t.hv[1]&&(l.textVerticalAlign=l.textBaseline=null),!l.hasOwnProperty("textFill")&&l.fill&&(l.textFill=l.fill),!l.hasOwnProperty("textStroke")&&l.stroke&&(l.textStroke=l.stroke)}var h=lf(t);e&&"merge"!==e?"replace"===e?(sf(r,i),af(o,s,h,i)):"remove"===e&&sf(r,i):r?r.attr(h):af(o,s,h,i);var u=i.get(o);u&&(u.__ecGraphicWidth=t.width,u.__ecGraphicHeight=t.height)})}},_relocate:function(t,e){for(var i=t.option.elements,n=this.group,o=this._elMap,r=i.length-1;r>=0;r--){var a=i[r],s=o.get(a.id);if(s){var l=s.parent,h=l===n?{width:e.getWidth(),height:e.getHeight()}:{width:l.__ecGraphicWidth||0,height:l.__ecGraphicHeight||0};ca(s,a,h,null,{hv:a.hv,boundingMode:a.bounding})}}},_clear:function(){var t=this._elMap;t.each(function(e){sf(e,t)}),this._elMap=E()},dispose:function(){this._clear()}}),t.version=sy,t.dependencies=ly,t.PRIORITY=vy,t.init=cs,t.connect=ds,t.disConnect=fs,t.disconnect=Vy,t.dispose=ps,t.getInstanceByDom=gs,t.getInstanceById=vs,t.registerTheme=ms,t.registerPreprocessor=ys,t.registerProcessor=xs,t.registerPostUpdate=_s,t.registerAction=ws,t.registerCoordinateSystem=bs,t.getCoordinateSystemDimensions=Ss,t.registerLayout=Ms,t.registerVisual=Is,t.registerLoading=Ts,t.extendComponentModel=As,t.extendComponentView=Cs,t.extendSeriesModel=Ds,t.extendChartView=Ls,t.setCanvasCreator=Ps,t.registerMap=ks,t.getMap=Os,t.dataTool=Ny,t.zrender=dg,t.graphic=nm,t.number=vg,t.format=Sg,t.throttle=Ha,t.helper=Ox,t.matrix=Uf,t.vector=Vf,t.color=lp,t.util=Nx,t.List=Uy,t.Model=Hr,t.Axis=Ex,t.env=vf,t.parseGeoJson=Vx});