!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={},n={},i=t.match(/Firefox\/([\d.]+)/),r=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),a=t.match(/Edge\/([\d.]+)/),o=/micromessenger/i.test(t);return i&&(n.firefox=!0,n.version=i[1]),r&&(n.ie=!0,n.version=r[1]),a&&(n.edge=!0,n.version=a[1]),o&&(n.weChat=!0),{browser:n,os:e,node:!1,canvasSupported:!!document.createElement("canvas").getContext,svgSupported:"undefined"!=typeof SVGRect,touchEventsSupported:"ontouchstart"in window&&!n.ie&&!n.edge,pointerEventsSupported:"onpointerdown"in window&&(n.edge||n.ie&&n.version>=11),domSupported:"undefined"!=typeof document}}function n(t,e){"createCanvas"===t&&(Mf=null),bf[t]=e}function i(t){if(null==t||"object"!=typeof t)return t;var e=t,n=gf.call(t);if("[object Array]"===n){if(!z(t)){e=[];for(var r=0,a=t.length;a>r;r++)e[r]=i(t[r])}}else if(pf[n]){if(!z(t)){var o=t.constructor;if(t.constructor.from)e=o.from(t);else{e=new o(t.length);for(var r=0,a=t.length;a>r;r++)e[r]=i(t[r])}}}else if(!ff[n]&&!z(t)&&!T(t)){e={};for(var s in t)t.hasOwnProperty(s)&&(e[s]=i(t[s]))}return e}function r(t,e,n){if(!S(e)||!S(t))return n?i(e):t;for(var a in e)if(e.hasOwnProperty(a)){var o=t[a],s=e[a];!S(s)||!S(o)||x(s)||x(o)||T(s)||T(o)||M(s)||M(o)||z(s)||z(o)?!n&&a in t||(t[a]=i(e[a],!0)):r(o,s,n)}return t}function a(t,e){for(var n=t[0],i=1,a=t.length;a>i;i++)n=r(n,t[i],e);return n}function o(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function s(t,e,n){for(var i in e)e.hasOwnProperty(i)&&(n?null!=e[i]:null==t[i])&&(t[i]=e[i]);return t}function l(){return Mf||(Mf=Sf().getContext("2d")),Mf}function u(t,e){if(t){if(t.indexOf)return t.indexOf(e);for(var n=0,i=t.length;i>n;n++)if(t[n]===e)return n}return-1}function h(t,e){function n(){}var i=t.prototype;n.prototype=e.prototype,t.prototype=new n;for(var r in i)t.prototype[r]=i[r];t.prototype.constructor=t,t.superClass=e}function c(t,e,n){t="prototype"in t?t.prototype:t,e="prototype"in e?e.prototype:e,s(t,e,n)}function d(t){return t?"string"==typeof t?!1:"number"==typeof t.length:void 0}function f(t,e,n){if(t&&e)if(t.forEach&&t.forEach===mf)t.forEach(e,n);else if(t.length===+t.length)for(var i=0,r=t.length;r>i;i++)e.call(n,t[i],i,t);else for(var a in t)t.hasOwnProperty(a)&&e.call(n,t[a],a,t)}function p(t,e,n){if(t&&e){if(t.map&&t.map===xf)return t.map(e,n);for(var i=[],r=0,a=t.length;a>r;r++)i.push(e.call(n,t[r],r,t));return i}}function g(t,e,n,i){if(t&&e){if(t.reduce&&t.reduce===wf)return t.reduce(e,n,i);for(var r=0,a=t.length;a>r;r++)n=e.call(i,n,t[r],r,t);return n}}function v(t,e,n){if(t&&e){if(t.filter&&t.filter===yf)return t.filter(e,n);for(var i=[],r=0,a=t.length;a>r;r++)e.call(n,t[r],r,t)&&i.push(t[r]);return i}}function m(t,e,n){if(t&&e)for(var i=0,r=t.length;r>i;i++)if(e.call(n,t[i],i,t))return t[i]}function y(t,e){var n=_f.call(arguments,2);return function(){return t.apply(e,n.concat(_f.call(arguments)))}}function _(t){var e=_f.call(arguments,1);return function(){return t.apply(this,e.concat(_f.call(arguments)))}}function x(t){return"[object Array]"===gf.call(t)}function w(t){return"function"==typeof t}function b(t){return"[object String]"===gf.call(t)}function S(t){var e=typeof t;return"function"===e||!!t&&"object"===e}function M(t){return!!ff[gf.call(t)]}function I(t){return!!pf[gf.call(t)]}function T(t){return"object"==typeof t&&"number"==typeof t.nodeType&&"object"==typeof t.ownerDocument}function C(t){return t!==t}function D(){for(var t=0,e=arguments.length;e>t;t++)if(null!=arguments[t])return arguments[t]}function A(t,e){return null!=t?t:e}function k(t,e,n){return null!=t?t:null!=e?e:n}function P(){return Function.call.apply(_f,arguments)}function L(t){if("number"==typeof t)return[t,t,t,t];var e=t.length;return 2===e?[t[0],t[1],t[0],t[1]]:3===e?[t[0],t[1],t[2],t[1]]:t}function O(t,e){if(!t)throw new Error(e)}function B(t){return null==t?null:"function"==typeof t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}function E(t){t[If]=!0}function z(t){return t[If]}function R(t){function e(t,e){n?i.set(t,e):i.set(e,t)}var n=x(t);this.data={};var i=this;t instanceof R?t.each(e):t&&f(t,e)}function N(t){return new R(t)}function F(t,e){for(var n=new t.constructor(t.length+e.length),i=0;i=0;if(r){var a="touchend"!==i?e.targetTouches[0]:e.changedTouches[0];a&&fe(t,a,e,n)}else fe(t,e,e,n),e.zrDelta=e.wheelDelta?e.wheelDelta/120:-(e.detail||0)/3;var o=e.button;return null==e.which&&void 0!==o&&zf.test(e.type)&&(e.which=1&o?1:2&o?3:4&o?2:0),e}function ve(t,e,n){Ef?t.addEventListener(e,n):t.attachEvent("on"+e,n)}function me(t,e,n){Ef?t.removeEventListener(e,n):t.detachEvent("on"+e,n)}function ye(t){var e=t[1][0]-t[0][0],n=t[1][1]-t[0][1];return Math.sqrt(e*e+n*n)}function _e(t){return[(t[0][0]+t[1][0])/2,(t[0][1]+t[1][1])/2]}function xe(t,e,n){return{type:t,event:n,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:we}}function we(){Rf(this.event)}function be(){}function Se(t,e,n){if(t[t.rectHover?"rectContain":"contain"](e,n)){for(var i,r=t;r;){if(r.clipPath&&!r.clipPath.contain(e,n))return!1;r.silent&&(i=!0),r=r.parent}return i?Vf:!0}return!1}function Me(){var t=new Wf(6);return Ie(t),t}function Ie(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function Te(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 Ce(t,e,n){var i=e[0]*n[0]+e[2]*n[1],r=e[1]*n[0]+e[3]*n[1],a=e[0]*n[2]+e[2]*n[3],o=e[1]*n[2]+e[3]*n[3],s=e[0]*n[4]+e[2]*n[5]+e[4],l=e[1]*n[4]+e[3]*n[5]+e[5];return t[0]=i,t[1]=r,t[2]=a,t[3]=o,t[4]=s,t[5]=l,t}function De(t,e,n){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+n[0],t[5]=e[5]+n[1],t}function Ae(t,e,n){var i=e[0],r=e[2],a=e[4],o=e[1],s=e[3],l=e[5],u=Math.sin(n),h=Math.cos(n);return t[0]=i*h+o*u,t[1]=-i*u+o*h,t[2]=r*h+s*u,t[3]=-r*u+h*s,t[4]=h*a+u*l,t[5]=h*l-u*a,t}function ke(t,e,n){var i=n[0],r=n[1];return t[0]=e[0]*i,t[1]=e[1]*r,t[2]=e[2]*i,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*r,t}function Pe(t,e){var n=e[0],i=e[2],r=e[4],a=e[1],o=e[3],s=e[5],l=n*o-a*i;return l?(l=1/l,t[0]=o*l,t[1]=-a*l,t[2]=-i*l,t[3]=n*l,t[4]=(i*s-o*r)*l,t[5]=(a*r-n*s)*l,t):null}function Le(t){var e=Me();return Te(e,t),e}function Oe(t){return t>qf||-qf>t}function Be(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 Ee(t){return t=Math.round(t),0>t?0:t>255?255:t}function ze(t){return t=Math.round(t),0>t?0:t>360?360:t}function Re(t){return 0>t?0:t>1?1:t}function Ne(t){return Ee(t.length&&"%"===t.charAt(t.length-1)?parseFloat(t)/100*255:parseInt(t,10))}function Fe(t){return Re(t.length&&"%"===t.charAt(t.length-1)?parseFloat(t)/100:parseFloat(t))}function Ve(t,e,n){return 0>n?n+=1:n>1&&(n-=1),1>6*n?t+(e-t)*n*6:1>2*n?e:2>3*n?t+(e-t)*(2/3-n)*6:t}function He(t,e,n){return t+(e-t)*n}function Ge(t,e,n,i,r){return t[0]=e,t[1]=n,t[2]=i,t[3]=r,t}function We(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function Xe(t,e){op&&We(op,e),op=ap.put(t,op||e.slice())}function Ye(t,e){if(t){e=e||[];var n=ap.get(t);if(n)return We(e,n);t+="";var i=t.replace(/ /g,"").toLowerCase();if(i in rp)return We(e,rp[i]),Xe(t,e),e;if("#"!==i.charAt(0)){var r=i.indexOf("("),a=i.indexOf(")");if(-1!==r&&a+1===i.length){var o=i.substr(0,r),s=i.substr(r+1,a-(r+1)).split(","),l=1;switch(o){case"rgba":if(4!==s.length)return void Ge(e,0,0,0,1);l=Fe(s.pop());case"rgb":return 3!==s.length?void Ge(e,0,0,0,1):(Ge(e,Ne(s[0]),Ne(s[1]),Ne(s[2]),l),Xe(t,e),e);case"hsla":return 4!==s.length?void Ge(e,0,0,0,1):(s[3]=Fe(s[3]),qe(s,e),Xe(t,e),e);case"hsl":return 3!==s.length?void Ge(e,0,0,0,1):(qe(s,e),Xe(t,e),e);default:return}}Ge(e,0,0,0,1)}else{if(4===i.length){var u=parseInt(i.substr(1),16);return u>=0&&4095>=u?(Ge(e,(3840&u)>>4|(3840&u)>>8,240&u|(240&u)>>4,15&u|(15&u)<<4,1),Xe(t,e),e):void Ge(e,0,0,0,1)}if(7===i.length){var u=parseInt(i.substr(1),16);return u>=0&&16777215>=u?(Ge(e,(16711680&u)>>16,(65280&u)>>8,255&u,1),Xe(t,e),e):void Ge(e,0,0,0,1)}}}}function qe(t,e){var n=(parseFloat(t[0])%360+360)%360/360,i=Fe(t[1]),r=Fe(t[2]),a=.5>=r?r*(i+1):r+i-r*i,o=2*r-a;return e=e||[],Ge(e,Ee(255*Ve(o,a,n+1/3)),Ee(255*Ve(o,a,n)),Ee(255*Ve(o,a,n-1/3)),1),4===t.length&&(e[3]=t[3]),e}function je(t){if(t){var e,n,i=t[0]/255,r=t[1]/255,a=t[2]/255,o=Math.min(i,r,a),s=Math.max(i,r,a),l=s-o,u=(s+o)/2;if(0===l)e=0,n=0;else{n=.5>u?l/(s+o):l/(2-s-o);var h=((s-i)/6+l/2)/l,c=((s-r)/6+l/2)/l,d=((s-a)/6+l/2)/l;i===s?e=d-c:r===s?e=1/3+h-d:a===s&&(e=2/3+c-h),0>e&&(e+=1),e>1&&(e-=1)}var f=[360*e,n,u];return null!=t[3]&&f.push(t[3]),f}}function Ue(t,e){var n=Ye(t);if(n){for(var i=0;3>i;i++)n[i]=0>e?n[i]*(1-e)|0:(255-n[i])*e+n[i]|0,n[i]>255?n[i]=255:t[i]<0&&(n[i]=0);return tn(n,4===n.length?"rgba":"rgb")}}function Ze(t){var e=Ye(t);return e?((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1):void 0}function $e(t,e,n){if(e&&e.length&&t>=0&&1>=t){n=n||[];var i=t*(e.length-1),r=Math.floor(i),a=Math.ceil(i),o=e[r],s=e[a],l=i-r;return n[0]=Ee(He(o[0],s[0],l)),n[1]=Ee(He(o[1],s[1],l)),n[2]=Ee(He(o[2],s[2],l)),n[3]=Re(He(o[3],s[3],l)),n}}function Ke(t,e,n){if(e&&e.length&&t>=0&&1>=t){var i=t*(e.length-1),r=Math.floor(i),a=Math.ceil(i),o=Ye(e[r]),s=Ye(e[a]),l=i-r,u=tn([Ee(He(o[0],s[0],l)),Ee(He(o[1],s[1],l)),Ee(He(o[2],s[2],l)),Re(He(o[3],s[3],l))],"rgba");return n?{color:u,leftIndex:r,rightIndex:a,value:i}:u}}function Qe(t,e,n,i){return t=Ye(t),t?(t=je(t),null!=e&&(t[0]=ze(e)),null!=n&&(t[1]=Fe(n)),null!=i&&(t[2]=Fe(i)),tn(qe(t),"rgba")):void 0}function Je(t,e){return t=Ye(t),t&&null!=e?(t[3]=Re(e),tn(t,"rgba")):void 0}function tn(t,e){if(t&&t.length){var n=t[0]+","+t[1]+","+t[2];return("rgba"===e||"hsva"===e||"hsla"===e)&&(n+=","+t[3]),e+"("+n+")"}}function en(t,e){return t[e]}function nn(t,e,n){t[e]=n}function rn(t,e,n){return(e-t)*n+t}function an(t,e,n){return n>.5?e:t}function on(t,e,n,i,r){var a=t.length;if(1===r)for(var o=0;a>o;o++)i[o]=rn(t[o],e[o],n);else for(var s=a&&t[0].length,o=0;a>o;o++)for(var l=0;s>l;l++)i[o][l]=rn(t[o][l],e[o][l],n)}function sn(t,e,n){var i=t.length,r=e.length;if(i!==r){var a=i>r;if(a)t.length=r;else for(var o=i;r>o;o++)t.push(1===n?e[o]:hp.call(e[o]))}for(var s=t[0]&&t[0].length,o=0;ol;l++)isNaN(t[o][l])&&(t[o][l]=e[o][l])}function ln(t,e,n){if(t===e)return!0;var i=t.length;if(i!==e.length)return!1;if(1===n){for(var r=0;i>r;r++)if(t[r]!==e[r])return!1}else for(var a=t[0].length,r=0;i>r;r++)for(var o=0;a>o;o++)if(t[r][o]!==e[r][o])return!1;return!0}function un(t,e,n,i,r,a,o,s,l){var u=t.length;if(1===l)for(var h=0;u>h;h++)s[h]=hn(t[h],e[h],n[h],i[h],r,a,o);else for(var c=t[0].length,h=0;u>h;h++)for(var d=0;c>d;d++)s[h][d]=hn(t[h][d],e[h][d],n[h][d],i[h][d],r,a,o)}function hn(t,e,n,i,r,a,o){var s=.5*(n-t),l=.5*(i-e);return(2*(e-n)+s+l)*o+(-3*(e-n)-2*s-l)*a+s*r+e}function cn(t){if(d(t)){var e=t.length;if(d(t[0])){for(var n=[],i=0;e>i;i++)n.push(hp.call(t[i]));return n}return hp.call(t)}return t}function dn(t){return t[0]=Math.floor(t[0]),t[1]=Math.floor(t[1]),t[2]=Math.floor(t[2]),"rgba("+t.join(",")+")"}function fn(t){var e=t[t.length-1].value;return d(e&&e[0])?2:1}function pn(t,e,n,i,r,a){var o=t._getter,s=t._setter,l="spline"===e,u=i.length;if(u){var h,c=i[0].value,f=d(c),p=!1,g=!1,v=f?fn(i):0;i.sort(function(t,e){return t.time-e.time}),h=i[u-1].time;for(var m=[],y=[],_=i[0].value,x=!0,w=0;u>w;w++){m.push(i[w].time/h);var b=i[w].value;if(f&&ln(b,_,v)||!f&&b===_||(x=!1),_=b,"string"==typeof b){var S=Ye(b);S?(b=S,p=!0):g=!0}y.push(b)}if(a||!x){for(var M=y[u-1],w=0;u-1>w;w++)f?sn(y[w],M,v):!isNaN(y[w])||isNaN(M)||g||p||(y[w]=M);f&&sn(o(t._target,r),M,v);var I,T,C,D,A,k,P=0,L=0;if(p)var O=[0,0,0,0];var B=function(t,e){var n;if(0>e)n=0;else if(L>e){for(I=Math.min(P+1,u-1),n=I;n>=0&&!(m[n]<=e);n--);n=Math.min(n,u-2)}else{for(n=P;u>n&&!(m[n]>e);n++);n=Math.min(n-1,u-2)}P=n,L=e;var i=m[n+1]-m[n];if(0!==i)if(T=(e-m[n])/i,l)if(D=y[n],C=y[0===n?n:n-1],A=y[n>u-2?u-1:n+1],k=y[n>u-3?u-1:n+2],f)un(C,D,A,k,T,T*T,T*T*T,o(t,r),v);else{var a;if(p)a=un(C,D,A,k,T,T*T,T*T*T,O,1),a=dn(O);else{if(g)return an(D,A,T);a=hn(C,D,A,k,T,T*T,T*T*T)}s(t,r,a)}else if(f)on(y[n],y[n+1],T,o(t,r),v);else{var a;if(p)on(y[n],y[n+1],T,O,1),a=dn(O);else{if(g)return an(y[n],y[n+1],T);a=rn(y[n],y[n+1],T)}s(t,r,a)}},E=new Be({target:t._target,life:h,loop:t._loop,delay:t._delay,onframe:B,ondestroy:n});return e&&"spline"!==e&&(E.easing=e),E}}}function gn(t,e,n,i,r,a,o,s){function l(){h--,h||a&&a()}b(i)?(a=r,r=i,i=0):w(r)?(a=r,r="linear",i=0):w(i)?(a=i,i=0):w(n)?(a=n,n=500):n||(n=500),t.stopAnimation(),vn(t,"",t,e,n,i,s);var u=t.animators.slice(),h=u.length;h||a&&a();for(var c=0;c0&&t.animate(e,!1).when(null==r?500:r,s).delay(a||0)}function mn(t,e,n,i){if(e){var r={};r[e]={},r[e][n]=i,t.attr(r)}else t.attr(n,i)}function yn(t,e,n,i){0>n&&(t+=n,n=-n),0>i&&(e+=i,i=-i),this.x=t,this.y=e,this.width=n,this.height=i}function _n(t){for(var e=0;t>=Sp;)e|=1&t,t>>=1;return t+e}function xn(t,e,n,i){var r=e+1;if(r===n)return 1;if(i(t[r++],t[e])<0){for(;n>r&&i(t[r],t[r-1])<0;)r++;wn(t,e,r)}else for(;n>r&&i(t[r],t[r-1])>=0;)r++;return r-e}function wn(t,e,n){for(n--;n>e;){var i=t[e];t[e++]=t[n],t[n--]=i}}function bn(t,e,n,i,r){for(i===e&&i++;n>i;i++){for(var a,o=t[i],s=e,l=i;l>s;)a=s+l>>>1,r(o,t[a])<0?l=a:s=a+1;var u=i-s;switch(u){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;u>0;)t[s+u]=t[s+u-1],u--}t[s]=o}}function Sn(t,e,n,i,r,a){var o=0,s=0,l=1;if(a(t,e[n+r])>0){for(s=i-r;s>l&&a(t,e[n+r+l])>0;)o=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s),o+=r,l+=r}else{for(s=r+1;s>l&&a(t,e[n+r-l])<=0;)o=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s);var u=o;o=r-l,l=r-u}for(o++;l>o;){var h=o+(l-o>>>1);a(t,e[n+h])>0?o=h+1:l=h}return l}function Mn(t,e,n,i,r,a){var o=0,s=0,l=1;if(a(t,e[n+r])<0){for(s=r+1;s>l&&a(t,e[n+r-l])<0;)o=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s);var u=o;o=r-l,l=r-u}else{for(s=i-r;s>l&&a(t,e[n+r+l])>=0;)o=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s),o+=r,l+=r}for(o++;l>o;){var h=o+(l-o>>>1);a(t,e[n+h])<0?l=h:o=h+1}return l}function In(t,e){function n(t,e){l[c]=t,u[c]=e,c+=1}function i(){for(;c>1;){var t=c-2;if(t>=1&&u[t-1]<=u[t]+u[t+1]||t>=2&&u[t-2]<=u[t]+u[t-1])u[t-1]u[t+1])break;a(t)}}function r(){for(;c>1;){var t=c-2;t>0&&u[t-1]=r?o(i,r,a,h):s(i,r,a,h)))}function o(n,i,r,a){var o=0;for(o=0;i>o;o++)d[o]=t[n+o];var s=0,l=r,u=n;if(t[u++]=t[l++],0!==--a){if(1===i){for(o=0;a>o;o++)t[u+o]=t[l+o];return void(t[u+a]=d[s])}for(var c,f,p,g=h;;){c=0,f=0,p=!1;do if(e(t[l],d[s])<0){if(t[u++]=t[l++],f++,c=0,0===--a){p=!0;break}}else if(t[u++]=d[s++],c++,f=0,1===--i){p=!0;break}while(g>(c|f));if(p)break;do{if(c=Mn(t[l],d,s,i,0,e),0!==c){for(o=0;c>o;o++)t[u+o]=d[s+o];if(u+=c,s+=c,i-=c,1>=i){p=!0;break}}if(t[u++]=t[l++],0===--a){p=!0;break}if(f=Sn(d[s],t,l,a,0,e),0!==f){for(o=0;f>o;o++)t[u+o]=t[l+o];if(u+=f,l+=f,a-=f,0===a){p=!0;break}}if(t[u++]=d[s++],1===--i){p=!0;break}g--}while(c>=Mp||f>=Mp);if(p)break;0>g&&(g=0),g+=2}if(h=g,1>h&&(h=1),1===i){for(o=0;a>o;o++)t[u+o]=t[l+o];t[u+a]=d[s]}else{if(0===i)throw new Error;for(o=0;i>o;o++)t[u+o]=d[s+o]}}else for(o=0;i>o;o++)t[u+o]=d[s+o]}function s(n,i,r,a){var o=0;for(o=0;a>o;o++)d[o]=t[r+o];var s=n+i-1,l=a-1,u=r+a-1,c=0,f=0;if(t[u--]=t[s--],0!==--i){if(1===a){for(u-=i,s-=i,f=u+1,c=s+1,o=i-1;o>=0;o--)t[f+o]=t[c+o];return void(t[u]=d[l])}for(var p=h;;){var g=0,v=0,m=!1;do if(e(d[l],t[s])<0){if(t[u--]=t[s--],g++,v=0,0===--i){m=!0;break}}else if(t[u--]=d[l--],v++,g=0,1===--a){m=!0;break}while(p>(g|v));if(m)break;do{if(g=i-Mn(d[l],t,n,i,i-1,e),0!==g){for(u-=g,s-=g,i-=g,f=u+1,c=s+1,o=g-1;o>=0;o--)t[f+o]=t[c+o];if(0===i){m=!0;break}}if(t[u--]=d[l--],1===--a){m=!0;break}if(v=a-Sn(t[s],d,0,a,a-1,e),0!==v){for(u-=v,l-=v,a-=v,f=u+1,c=l+1,o=0;v>o;o++)t[f+o]=d[c+o];if(1>=a){m=!0;break}}if(t[u--]=t[s--],0===--i){m=!0;break}p--}while(g>=Mp||v>=Mp);if(m)break;0>p&&(p=0),p+=2}if(h=p,1>h&&(h=1),1===a){for(u-=i,s-=i,f=u+1,c=s+1,o=i-1;o>=0;o--)t[f+o]=t[c+o];t[u]=d[l]}else{if(0===a)throw new Error;for(c=u-(a-1),o=0;a>o;o++)t[c+o]=d[o]}}else for(c=u-(a-1),o=0;a>o;o++)t[c+o]=d[o]}var l,u,h=Mp,c=0,d=[];l=[],u=[],this.mergeRuns=i,this.forceMergeRuns=r,this.pushRun=n}function Tn(t,e,n,i){n||(n=0),i||(i=t.length);var r=i-n;if(!(2>r)){var a=0;if(Sp>r)return a=xn(t,n,i,e),void bn(t,n,i,n+a,e);var o=new In(t,e),s=_n(r);do{if(a=xn(t,n,i,e),s>a){var l=r;l>s&&(l=s),bn(t,n,n+l,n+a,e),a=l}o.pushRun(n,a),o.mergeRuns(),r-=a,n+=a}while(0!==r);o.forceMergeRuns()}}function Cn(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}function Dn(t,e,n){var i=null==e.x?0:e.x,r=null==e.x2?1:e.x2,a=null==e.y?0:e.y,o=null==e.y2?0:e.y2;e.global||(i=i*n.width+n.x,r=r*n.width+n.x,a=a*n.height+n.y,o=o*n.height+n.y),i=isNaN(i)?0:i,r=isNaN(r)?1:r,a=isNaN(a)?0:a,o=isNaN(o)?0:o;var s=t.createLinearGradient(i,a,r,o);return s}function An(t,e,n){var i=n.width,r=n.height,a=Math.min(i,r),o=null==e.x?.5:e.x,s=null==e.y?.5:e.y,l=null==e.r?.5:e.r;e.global||(o=o*i+n.x,s=s*r+n.y,l*=a);var u=t.createRadialGradient(o,s,0,o,s,l);return u}function kn(){return!1}function Pn(t,e,n){var i=Sf(),r=e.getWidth(),a=e.getHeight(),o=i.style;return o&&(o.position="absolute",o.left=0,o.top=0,o.width=r+"px",o.height=a+"px",i.setAttribute("data-zr-dom-id",t)),i.width=r*n,i.height=a*n,i}function Ln(t){if("string"==typeof t){var e=Np.get(t);return e&&e.image}return t}function On(t,e,n,i,r){if(t){if("string"==typeof t){if(e&&e.__zrImageSrc===t||!n)return e;var a=Np.get(t),o={hostEl:n,cb:i,cbPayload:r};return a?(e=a.image,!En(e)&&a.pending.push(o)):(e=new Image,e.onload=e.onerror=Bn,Np.put(t,e.__cachedImgObj={image:e,pending:[o]}),e.src=e.__zrImageSrc=t),e}return t}return e}function Bn(){var t=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;ea;a++)r=Math.max(Un(i[a],e).width,r);return Vp>Hp&&(Vp=0,Fp={}),Vp++,Fp[n]=r,r}function Rn(t,e,n,i,r,a,o,s){return o?Fn(t,e,n,i,r,a,o,s):Nn(t,e,n,i,r,a,s)}function Nn(t,e,n,i,r,a,o){var s=Zn(t,e,r,a,o),l=zn(t,e);r&&(l+=r[1]+r[3]);var u=s.outerHeight,h=Vn(0,l,n),c=Hn(0,u,i),d=new yn(h,c,l,u);return d.lineHeight=s.lineHeight,d}function Fn(t,e,n,i,r,a,o,s){var l=$n(t,{rich:o,truncate:s,font:e,textAlign:n,textPadding:r,textLineHeight:a}),u=l.outerWidth,h=l.outerHeight,c=Vn(0,u,n),d=Hn(0,h,i);return new yn(c,d,u,h)}function Vn(t,e,n){return"right"===n?t-=e:"center"===n&&(t-=e/2),t}function Hn(t,e,n){return"middle"===n?t-=e/2:"bottom"===n&&(t-=e),t}function Gn(t,e,n){var i=e.x,r=e.y,a=e.height,o=e.width,s=a/2,l="left",u="top";switch(t){case"left":i-=n,r+=s,l="right",u="middle";break;case"right":i+=n+o,r+=s,u="middle";break;case"top":i+=o/2,r-=n,l="center",u="bottom";break;case"bottom":i+=o/2,r+=a+n,l="center";break;case"inside":i+=o/2,r+=s,l="center",u="middle";break;case"insideLeft":i+=n,r+=s,u="middle";break;case"insideRight":i+=o-n,r+=s,l="right",u="middle";break;case"insideTop":i+=o/2,r+=n,l="center";break;case"insideBottom":i+=o/2,r+=a-n,l="center",u="bottom";break;case"insideTopLeft":i+=n,r+=n;break;case"insideTopRight":i+=o-n,r+=n,l="right";break;case"insideBottomLeft":i+=n,r+=a-n,u="bottom";break;case"insideBottomRight":i+=o-n,r+=a-n,l="right",u="bottom"}return{x:i,y:r,textAlign:l,textVerticalAlign:u}}function Wn(t,e,n,i,r){if(!e)return"";var a=(t+"").split("\n");r=Xn(e,n,i,r);for(var o=0,s=a.length;s>o;o++)a[o]=Yn(a[o],r);return a.join("\n")}function Xn(t,e,n,i){i=o({},i),i.font=e;var n=A(n,"...");i.maxIterations=A(i.maxIterations,2);var r=i.minChar=A(i.minChar,0);i.cnCharWidth=zn("国",e);var a=i.ascCharWidth=zn("a",e);i.placeholder=A(i.placeholder,"");for(var s=t=Math.max(0,t-1),l=0;r>l&&s>=a;l++)s-=a;var u=zn(n,e);return u>s&&(n="",u=0),s=t-u,i.ellipsis=n,i.ellipsisWidth=u,i.contentWidth=s,i.containerWidth=t,i}function Yn(t,e){var n=e.containerWidth,i=e.font,r=e.contentWidth;if(!n)return"";var a=zn(t,i);if(n>=a)return t;for(var o=0;;o++){if(r>=a||o>=e.maxIterations){t+=e.ellipsis;break}var s=0===o?qn(t,r,e.ascCharWidth,e.cnCharWidth):a>0?Math.floor(t.length*r/a):0;t=t.substr(0,s),a=zn(t,i)}return""===t&&(t=e.placeholder),t}function qn(t,e,n,i){for(var r=0,a=0,o=t.length;o>a&&e>r;a++){var s=t.charCodeAt(a);r+=s>=0&&127>=s?n:i}return a}function jn(t){return zn("国",t)}function Un(t,e){return Xp.measureText(t,e)}function Zn(t,e,n,i,r){null!=t&&(t+="");var a=A(i,jn(e)),o=t?t.split("\n"):[],s=o.length*a,l=s;if(n&&(l+=n[0]+n[2]),t&&r){var u=r.outerHeight,h=r.outerWidth;if(null!=u&&l>u)t="",o=[];else if(null!=h)for(var c=Xn(h-(n?n[1]+n[3]:0),e,r.ellipsis,{minChar:r.minChar,placeholder:r.placeholder}),d=0,f=o.length;f>d;d++)o[d]=Yn(o[d],c)}return{lines:o,height:s,outerHeight:l,lineHeight:a}}function $n(t,e){var n={lines:[],width:0,height:0};if(null!=t&&(t+=""),!t)return n;for(var i,r=Gp.lastIndex=0;null!=(i=Gp.exec(t));){var a=i.index;a>r&&Kn(n,t.substring(r,a)),Kn(n,i[2],i[1]),r=Gp.lastIndex}rf)return{lines:[],width:0,height:0};_.textWidth=zn(_.text,b);var M=x.textWidth,I=null==M||"auto"===M;if("string"==typeof M&&"%"===M.charAt(M.length-1))_.percentWidth=M,u.push(_),M=0;else{if(I){M=_.textWidth;var T=x.textBackgroundColor,C=T&&T.image;C&&(C=Ln(C),En(C)&&(M=Math.max(M,C.width*S/C.height)))}var D=w?w[1]+w[3]:0;M+=D;var P=null!=d?d-m:null;null!=P&&M>P&&(!I||D>P?(_.text="",_.textWidth=M=0):(_.text=Wn(_.text,P-D,b,c.ellipsis,{minChar:c.minChar}),_.textWidth=zn(_.text,b),M=_.textWidth+D))}m+=_.width=M,x&&(v=Math.max(v,_.lineHeight))}g.width=m,g.lineHeight=v,s+=v,l=Math.max(l,m)}n.outerWidth=n.width=A(e.textWidth,l),n.outerHeight=n.height=A(e.textHeight,s),h&&(n.outerWidth+=h[1]+h[3],n.outerHeight+=h[0]+h[2]);for(var p=0;pl&&(o+=l,l=-l),0>u&&(s+=u,u=-u),"number"==typeof h?n=i=r=a=h:h instanceof Array?1===h.length?n=i=r=a=h[0]:2===h.length?(n=r=h[0],i=a=h[1]):3===h.length?(n=h[0],i=a=h[1],r=h[2]):(n=h[0],i=h[1],r=h[2],a=h[3]):n=i=r=a=0;var c;n+i>l&&(c=n+i,n*=l/c,i*=l/c),r+a>l&&(c=r+a,r*=l/c,a*=l/c),i+r>u&&(c=i+r,i*=u/c,r*=u/c),n+a>u&&(c=n+a,n*=u/c,a*=u/c),t.moveTo(o+n,s),t.lineTo(o+l-i,s),0!==i&&t.arc(o+l-i,s+i,i,-Math.PI/2,0),t.lineTo(o+l,s+u-r),0!==r&&t.arc(o+l-r,s+u-r,r,0,Math.PI/2),t.lineTo(o+a,s+u),0!==a&&t.arc(o+a,s+u-a,a,Math.PI/2,Math.PI),t.lineTo(o,s+n),0!==n&&t.arc(o+n,s+n,n,Math.PI,1.5*Math.PI)}function ti(t){return ei(t),f(t.rich,ei),t}function ei(t){if(t){t.font=Qn(t);var e=t.textAlign;"middle"===e&&(e="center"),t.textAlign=null==e||qp[e]?e:"left";var n=t.textVerticalAlign||t.textBaseline;"center"===n&&(n="middle"),t.textVerticalAlign=null==n||jp[n]?n:"top";var i=t.textPadding;i&&(t.textPadding=L(t.textPadding))}}function ni(t,e,n,i,r,a){i.rich?ri(t,e,n,i,r,a):ii(t,e,n,i,r,a)}function ii(t,e,n,i,r,a){var o,s=li(i),l=!1,u=e.__attrCachedBy===Dp.PLAIN_TEXT;a!==Ap?(a&&(o=a.style,l=!s&&u&&o),e.__attrCachedBy=s?Dp.NONE:Dp.PLAIN_TEXT):u&&(e.__attrCachedBy=Dp.NONE);var h=i.font||Yp;l&&h===(o.font||Yp)||(e.font=h);var c=t.__computedFont;t.__styleFont!==h&&(t.__styleFont=h,c=t.__computedFont=e.font);var d=i.textPadding,f=i.textLineHeight,p=t.__textCotentBlock;(!p||t.__dirtyText)&&(p=t.__textCotentBlock=Zn(n,c,d,f,i.truncate));var g=p.outerHeight,v=p.lines,m=p.lineHeight,y=ci(g,i,r),_=y.baseX,x=y.baseY,w=y.textAlign||"left",b=y.textVerticalAlign;oi(e,i,r,_,x);var S=Hn(x,g,b),M=_,I=S;if(s||d){var T=zn(n,c),C=T;d&&(C+=d[1]+d[3]);var D=Vn(_,C,w);s&&ui(t,e,i,D,S,C,g),d&&(M=vi(_,w,d),I+=d[0])}e.textAlign=w,e.textBaseline="middle",e.globalAlpha=i.opacity||1;for(var A=0;AT&&(x=b[T],!x.textAlign||"left"===x.textAlign);)si(t,e,x,i,M,m,C,"left"),I-=x.width,C+=x.width,T++;for(;A>=0&&(x=b[A],"right"===x.textAlign);)si(t,e,x,i,M,m,D,"right"),I-=x.width,D-=x.width,A--;for(C+=(a-(C-v)-(y-D)-I)/2;A>=T;)x=b[T],si(t,e,x,i,M,m,C+x.width/2,"center"),C+=x.width,T++;m+=M}}function oi(t,e,n,i,r){if(n&&e.textRotation){var a=e.textOrigin;"center"===a?(i=n.width/2+n.x,r=n.height/2+n.y):a&&(i=a[0]+n.x,r=a[1]+n.y),t.translate(i,r),t.rotate(-e.textRotation),t.translate(-i,-r)}}function si(t,e,n,i,r,a,o,s){var l=i.rich[n.styleName]||{};l.text=n.text;var u=n.textVerticalAlign,h=a+r/2;"top"===u?h=a+n.height/2:"bottom"===u&&(h=a+r-n.height/2),!n.isLineHolder&&li(l)&&ui(t,e,l,"right"===s?o-n.width:"center"===s?o-n.width/2:o,h-n.height/2,n.width,n.height);var c=n.textPadding;c&&(o=vi(o,s,c),h-=n.height/2-c[2]-n.textHeight/2),di(e,"shadowBlur",k(l.textShadowBlur,i.textShadowBlur,0)),di(e,"shadowColor",l.textShadowColor||i.textShadowColor||"transparent"),di(e,"shadowOffsetX",k(l.textShadowOffsetX,i.textShadowOffsetX,0)),di(e,"shadowOffsetY",k(l.textShadowOffsetY,i.textShadowOffsetY,0)),di(e,"textAlign",s),di(e,"textBaseline","middle"),di(e,"font",n.font||Yp);var d=fi(l.textStroke||i.textStroke,p),f=pi(l.textFill||i.textFill),p=A(l.textStrokeWidth,i.textStrokeWidth);d&&(di(e,"lineWidth",p),di(e,"strokeStyle",d),e.strokeText(n.text,o,h)),f&&(di(e,"fillStyle",f),e.fillText(n.text,o,h))}function li(t){return!!(t.textBackgroundColor||t.textBorderWidth&&t.textBorderColor)}function ui(t,e,n,i,r,a,o){var s=n.textBackgroundColor,l=n.textBorderWidth,u=n.textBorderColor,h=b(s);if(di(e,"shadowBlur",n.textBoxShadowBlur||0),di(e,"shadowColor",n.textBoxShadowColor||"transparent"),di(e,"shadowOffsetX",n.textBoxShadowOffsetX||0),di(e,"shadowOffsetY",n.textBoxShadowOffsetY||0),h||l&&u){e.beginPath();var c=n.textBorderRadius;c?Jn(e,{x:i,y:r,width:a,height:o,r:c}):e.rect(i,r,a,o),e.closePath()}if(h)if(di(e,"fillStyle",s),null!=n.fillOpacity){var d=e.globalAlpha;e.globalAlpha=n.fillOpacity*n.opacity,e.fill(),e.globalAlpha=d}else e.fill();else if(S(s)){var f=s.image;f=On(f,null,t,hi,s),f&&En(f)&&e.drawImage(f,i,r,a,o)}if(l&&u)if(di(e,"lineWidth",l),di(e,"strokeStyle",u),null!=n.strokeOpacity){var d=e.globalAlpha;e.globalAlpha=n.strokeOpacity*n.opacity,e.stroke(),e.globalAlpha=d}else e.stroke()}function hi(t,e){e.image=t}function ci(t,e,n){var i=e.x||0,r=e.y||0,a=e.textAlign,o=e.textVerticalAlign;if(n){var s=e.textPosition;if(s instanceof Array)i=n.x+gi(s[0],n.width),r=n.y+gi(s[1],n.height);else{var l=Gn(s,n,e.textDistance);i=l.x,r=l.y,a=a||l.textAlign,o=o||l.textVerticalAlign}var u=e.textOffset;u&&(i+=u[0],r+=u[1])}return{baseX:i,baseY:r,textAlign:a,textVerticalAlign:o}}function di(t,e,n){return t[e]=Cp(t,e,n),t[e]}function fi(t,e){return null==t||0>=e||"transparent"===t||"none"===t?null:t.image||t.colorStops?"#000":t }function pi(t){return null==t||"none"===t?null:t.image||t.colorStops?"#000":t}function gi(t,e){return"string"==typeof t?t.lastIndexOf("%")>=0?parseFloat(t)/100*e:parseFloat(t):t}function vi(t,e,n){return"right"===e?t-n[1]:"center"===e?t+n[3]/2-n[1]/2:t+n[3]}function mi(t,e){return null!=t&&(t||e.textBackgroundColor||e.textBorderWidth&&e.textBorderColor||e.textPadding)}function yi(t){t=t||{},yp.call(this,t);for(var e in t)t.hasOwnProperty(e)&&"style"!==e&&(this[e]=t[e]);this.style=new Pp(t.style,this),this._rect=null,this.__clipPaths=[]}function _i(t){yi.call(this,t)}function xi(t){return parseInt(t,10)}function wi(t){return t?t.__builtin__?!0:"function"!=typeof t.resize||"function"!=typeof t.refresh?!1:!0:!1}function bi(t,e,n){return eg.copy(t.getBoundingRect()),t.transform&&eg.applyTransform(t.transform),ng.width=e,ng.height=n,!eg.intersect(ng)}function Si(t,e){if(t===e)return!1;if(!t||!e||t.length!==e.length)return!0;for(var n=0;ni;i++){var a=n[i];!t.emphasis[e].hasOwnProperty(a)&&t[e].hasOwnProperty(a)&&(t.emphasis[e][a]=t[e][a])}}}function Ni(t){return!_g(t)||xg(t)||t instanceof Date?t:t.value}function Fi(t){return _g(t)&&!(t instanceof Array)}function Vi(t,e){e=(e||[]).slice();var n=p(t||[],function(t){return{exist:t}});return yg(e,function(t,i){if(_g(t)){for(var r=0;r=n.length&&n.push({option:t})}}),n}function Hi(t){var e=N();yg(t,function(t){var n=t.exist;n&&e.set(n.id,t)}),yg(t,function(t){var n=t.option;O(!n||null==n.id||!e.get(n.id)||e.get(n.id)===t,"id duplicates: "+(n&&n.id)),n&&null!=n.id&&e.set(n.id,t),!t.keyInfo&&(t.keyInfo={})}),yg(t,function(t,n){var i=t.exist,r=t.option,a=t.keyInfo;if(_g(r)){if(a.name=null!=r.name?r.name+"":i?i.name:wg+n,i)a.id=i.id;else if(null!=r.id)a.id=r.id+"";else{var o=0;do a.id="\x00"+a.name+"\x00"+o++;while(e.get(a.id))}e.set(a.id,t)}})}function Gi(t){var e=t.name;return!(!e||!e.indexOf(wg))}function Wi(t){return _g(t)&&t.id&&0===(t.id+"").indexOf("\x00_ec_\x00")}function Xi(t,e){return null!=e.dataIndexInside?e.dataIndexInside:null!=e.dataIndex?x(e.dataIndex)?p(e.dataIndex,function(e){return t.indexOfRawIndex(e)}):t.indexOfRawIndex(e.dataIndex):null!=e.name?x(e.name)?p(e.name,function(e){return t.indexOfName(e)}):t.indexOfName(e.name):void 0}function Yi(){var t="__\x00ec_inner_"+Sg++ +"_"+Math.random().toFixed(5);return function(e){return e[t]||(e[t]={})}}function qi(t,e,n){if(b(e)){var i={};i[e+"Index"]=0,e=i}var r=n&&n.defaultMainType;!r||ji(e,r+"Index")||ji(e,r+"Id")||ji(e,r+"Name")||(e[r+"Index"]=0);var a={};return yg(e,function(i,r){var i=e[r];if("dataIndex"===r||"dataIndexInside"===r)return void(a[r]=i);var o=r.match(/^(\w+)(Index|Id|Name)$/)||[],s=o[1],l=(o[2]||"").toLowerCase();if(!(!s||!l||null==i||"index"===l&&"none"===i||n&&n.includeMainTypes&&u(n.includeMainTypes,s)<0)){var h={mainType:s};("index"!==l||"all"!==i)&&(h[l]=i);var c=t.queryComponents(h);a[s+"Models"]=c,a[s+"Model"]=c[0]}}),a}function ji(t,e){return t&&t.hasOwnProperty(e)}function Ui(t,e,n){t.setAttribute?t.setAttribute(e,n):t[e]=n}function Zi(t,e){return t.getAttribute?t.getAttribute(e):t[e]}function $i(t){return"auto"===t?df.domSupported?"html":"richText":t||"html"}function Ki(t){var e={main:"",sub:""};return t&&(t=t.split(Mg),e.main=t[0]||"",e.sub=t[1]||""),e}function Qi(t){O(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(t),'componentType "'+t+'" illegal')}function Ji(t){t.$constructor=t,t.extend=function(t){var e=this,n=function(){t.$constructor?t.$constructor.apply(this,arguments):e.apply(this,arguments)};return o(n.prototype,t),n.extend=this.extend,n.superCall=er,n.superApply=nr,h(n,this),n.superClass=e,n}}function tr(t){var e=["__\x00is_clz",Tg++,Math.random().toFixed(3)].join("_");t.prototype[e]=!0,t.isInstance=function(t){return!(!t||!t[e])}}function er(t,e){var n=P(arguments,2);return this.superClass.prototype[e].apply(t,n)}function nr(t,e,n){return this.superClass.prototype[e].apply(t,n)}function ir(t,e){function n(t){var e=i[t.main];return e&&e[Ig]||(e=i[t.main]={},e[Ig]=!0),e}e=e||{};var i={};if(t.registerClass=function(t,e){if(e)if(Qi(e),e=Ki(e),e.sub){if(e.sub!==Ig){var r=n(e);r[e.sub]=t}}else i[e.main]=t;return t},t.getClass=function(t,e,n){var r=i[t];if(r&&r[Ig]&&(r=e?r[e]:null),n&&!r)throw new Error(e?"Component "+t+"."+(e||"")+" not exists. Load it first.":t+".type should be specified.");return r},t.getClassesByMainType=function(t){t=Ki(t);var e=[],n=i[t.main];return n&&n[Ig]?f(n,function(t,n){n!==Ig&&e.push(t)}):e.push(n),e},t.hasClass=function(t){return t=Ki(t),!!i[t.main]},t.getAllClassMainTypes=function(){var t=[];return f(i,function(e,n){t.push(n)}),t},t.hasSubTypes=function(t){t=Ki(t);var e=i[t.main];return e&&e[Ig]},t.parseClassType=Ki,e.registerWhenExtend){var r=t.extend;r&&(t.extend=function(e){var n=r.call(this,e);return t.registerClass(n,e.type)})}return t}function rr(t){return t>-Bg&&Bg>t}function ar(t){return t>Bg||-Bg>t}function or(t,e,n,i,r){var a=1-r;return a*a*(a*t+3*r*e)+r*r*(r*i+3*a*n)}function sr(t,e,n,i,r){var a=1-r;return 3*(((e-t)*a+2*(n-e)*r)*a+(i-n)*r*r)}function lr(t,e,n,i,r,a){var o=i+3*(e-n)-t,s=3*(n-2*e+t),l=3*(e-t),u=t-r,h=s*s-3*o*l,c=s*l-9*o*u,d=l*l-3*s*u,f=0;if(rr(h)&&rr(c))if(rr(s))a[0]=0;else{var p=-l/s;p>=0&&1>=p&&(a[f++]=p)}else{var g=c*c-4*h*d;if(rr(g)){var v=c/h,p=-s/o+v,m=-v/2;p>=0&&1>=p&&(a[f++]=p),m>=0&&1>=m&&(a[f++]=m)}else if(g>0){var y=Og(g),_=h*s+1.5*o*(-c+y),x=h*s+1.5*o*(-c-y);_=0>_?-Lg(-_,Rg):Lg(_,Rg),x=0>x?-Lg(-x,Rg):Lg(x,Rg);var p=(-s-(_+x))/(3*o);p>=0&&1>=p&&(a[f++]=p)}else{var w=(2*h*s-3*o*c)/(2*Og(h*h*h)),b=Math.acos(w)/3,S=Og(h),M=Math.cos(b),p=(-s-2*S*M)/(3*o),m=(-s+S*(M+zg*Math.sin(b)))/(3*o),I=(-s+S*(M-zg*Math.sin(b)))/(3*o);p>=0&&1>=p&&(a[f++]=p),m>=0&&1>=m&&(a[f++]=m),I>=0&&1>=I&&(a[f++]=I)}}return f}function ur(t,e,n,i,r){var a=6*n-12*e+6*t,o=9*e+3*i-3*t-9*n,s=3*e-3*t,l=0;if(rr(o)){if(ar(a)){var u=-s/a;u>=0&&1>=u&&(r[l++]=u)}}else{var h=a*a-4*o*s;if(rr(h))r[0]=-a/(2*o);else if(h>0){var c=Og(h),u=(-a+c)/(2*o),d=(-a-c)/(2*o);u>=0&&1>=u&&(r[l++]=u),d>=0&&1>=d&&(r[l++]=d)}}return l}function hr(t,e,n,i,r,a){var o=(e-t)*r+t,s=(n-e)*r+e,l=(i-n)*r+n,u=(s-o)*r+o,h=(l-s)*r+s,c=(h-u)*r+u;a[0]=t,a[1]=o,a[2]=u,a[3]=c,a[4]=c,a[5]=h,a[6]=l,a[7]=i}function cr(t,e,n,i,r,a,o,s,l,u,h){var c,d,f,p,g,v=.005,m=1/0;Ng[0]=l,Ng[1]=u;for(var y=0;1>y;y+=.05)Fg[0]=or(t,n,r,o,y),Fg[1]=or(e,i,a,s,y),p=Pf(Ng,Fg),m>p&&(c=y,m=p);m=1/0;for(var _=0;32>_&&!(Eg>v);_++)d=c-v,f=c+v,Fg[0]=or(t,n,r,o,d),Fg[1]=or(e,i,a,s,d),p=Pf(Fg,Ng),d>=0&&m>p?(c=d,m=p):(Vg[0]=or(t,n,r,o,f),Vg[1]=or(e,i,a,s,f),g=Pf(Vg,Ng),1>=f&&m>g?(c=f,m=g):v*=.5);return h&&(h[0]=or(t,n,r,o,c),h[1]=or(e,i,a,s,c)),Og(m)}function dr(t,e,n,i){var r=1-i;return r*(r*t+2*i*e)+i*i*n}function fr(t,e,n,i){return 2*((1-i)*(e-t)+i*(n-e))}function pr(t,e,n,i,r){var a=t-2*e+n,o=2*(e-t),s=t-i,l=0;if(rr(a)){if(ar(o)){var u=-s/o;u>=0&&1>=u&&(r[l++]=u)}}else{var h=o*o-4*a*s;if(rr(h)){var u=-o/(2*a);u>=0&&1>=u&&(r[l++]=u)}else if(h>0){var c=Og(h),u=(-o+c)/(2*a),d=(-o-c)/(2*a);u>=0&&1>=u&&(r[l++]=u),d>=0&&1>=d&&(r[l++]=d)}}return l}function gr(t,e,n){var i=t+n-2*e;return 0===i?.5:(t-e)/i}function vr(t,e,n,i,r){var a=(e-t)*i+t,o=(n-e)*i+e,s=(o-a)*i+a;r[0]=t,r[1]=a,r[2]=s,r[3]=s,r[4]=o,r[5]=n}function mr(t,e,n,i,r,a,o,s,l){var u,h=.005,c=1/0;Ng[0]=o,Ng[1]=s;for(var d=0;1>d;d+=.05){Fg[0]=dr(t,n,r,d),Fg[1]=dr(e,i,a,d);var f=Pf(Ng,Fg);c>f&&(u=d,c=f)}c=1/0;for(var p=0;32>p&&!(Eg>h);p++){var g=u-h,v=u+h;Fg[0]=dr(t,n,r,g),Fg[1]=dr(e,i,a,g);var f=Pf(Fg,Ng);if(g>=0&&c>f)u=g,c=f;else{Vg[0]=dr(t,n,r,v),Vg[1]=dr(e,i,a,v);var m=Pf(Vg,Ng);1>=v&&c>m?(u=v,c=m):h*=.5}}return l&&(l[0]=dr(t,n,r,u),l[1]=dr(e,i,a,u)),Og(c)}function yr(t,e,n){if(0!==t.length){var i,r=t[0],a=r[0],o=r[0],s=r[1],l=r[1];for(i=1;ih;h++){var p=d(t,n,r,o,Zg[h]);l[0]=Hg(p,l[0]),u[0]=Gg(p,u[0])}for(f=c(e,i,a,s,$g),h=0;f>h;h++){var g=d(e,i,a,s,$g[h]);l[1]=Hg(g,l[1]),u[1]=Gg(g,u[1])}l[0]=Hg(t,l[0]),u[0]=Gg(t,u[0]),l[0]=Hg(o,l[0]),u[0]=Gg(o,u[0]),l[1]=Hg(e,l[1]),u[1]=Gg(e,u[1]),l[1]=Hg(s,l[1]),u[1]=Gg(s,u[1])}function wr(t,e,n,i,r,a,o,s){var l=gr,u=dr,h=Gg(Hg(l(t,n,r),1),0),c=Gg(Hg(l(e,i,a),1),0),d=u(t,n,r,h),f=u(e,i,a,c);o[0]=Hg(t,r,d),o[1]=Hg(e,a,f),s[0]=Gg(t,r,d),s[1]=Gg(e,a,f)}function br(t,e,n,i,r,a,o,s,l){var u=oe,h=se,c=Math.abs(r-a);if(1e-4>c%Yg&&c>1e-4)return s[0]=t-n,s[1]=e-i,l[0]=t+n,void(l[1]=e+i);if(qg[0]=Xg(r)*n+t,qg[1]=Wg(r)*i+e,jg[0]=Xg(a)*n+t,jg[1]=Wg(a)*i+e,u(s,qg,jg),h(l,qg,jg),r%=Yg,0>r&&(r+=Yg),a%=Yg,0>a&&(a+=Yg),r>a&&!o?a+=Yg:a>r&&o&&(r+=Yg),o){var d=a;a=r,r=d}for(var f=0;a>f;f+=Math.PI/2)f>r&&(Ug[0]=Xg(f)*n+t,Ug[1]=Wg(f)*i+e,u(s,Ug,s),h(l,Ug,l))}function Sr(t,e,n,i,r,a,o){if(0===r)return!1;var s=r,l=0,u=t;if(o>e+s&&o>i+s||e-s>o&&i-s>o||a>t+s&&a>n+s||t-s>a&&n-s>a)return!1;if(t===n)return Math.abs(a-t)<=s/2;l=(e-i)/(t-n),u=(t*i-n*e)/(t-n);var h=l*a-o+u,c=h*h/(l*l+1);return s/2*s/2>=c}function Mr(t,e,n,i,r,a,o,s,l,u,h){if(0===l)return!1;var c=l;if(h>e+c&&h>i+c&&h>a+c&&h>s+c||e-c>h&&i-c>h&&a-c>h&&s-c>h||u>t+c&&u>n+c&&u>r+c&&u>o+c||t-c>u&&n-c>u&&r-c>u&&o-c>u)return!1;var d=cr(t,e,n,i,r,a,o,s,u,h,null);return c/2>=d}function Ir(t,e,n,i,r,a,o,s,l){if(0===o)return!1;var u=o;if(l>e+u&&l>i+u&&l>a+u||e-u>l&&i-u>l&&a-u>l||s>t+u&&s>n+u&&s>r+u||t-u>s&&n-u>s&&r-u>s)return!1;var h=mr(t,e,n,i,r,a,s,l,null);return u/2>=h}function Tr(t){return t%=hv,0>t&&(t+=hv),t}function Cr(t,e,n,i,r,a,o,s,l){if(0===o)return!1;var u=o;s-=t,l-=e;var h=Math.sqrt(s*s+l*l);if(h-u>n||n>h+u)return!1;if(Math.abs(i-r)%cv<1e-4)return!0;if(a){var c=i;i=Tr(r),r=Tr(c)}else i=Tr(i),r=Tr(r);i>r&&(r+=cv);var d=Math.atan2(l,s);return 0>d&&(d+=cv),d>=i&&r>=d||d+cv>=i&&r>=d+cv}function Dr(t,e,n,i,r,a){if(a>e&&a>i||e>a&&i>a)return 0;if(i===e)return 0;var o=e>i?1:-1,s=(a-e)/(i-e);(1===s||0===s)&&(o=e>i?.5:-.5);var l=s*(n-t)+t;return l===r?1/0:l>r?o:0}function Ar(t,e){return Math.abs(t-e)e&&u>i&&u>a&&u>s||e>u&&i>u&&a>u&&s>u)return 0;var h=lr(e,i,a,s,u,gv);if(0===h)return 0;for(var c,d,f=0,p=-1,g=0;h>g;g++){var v=gv[g],m=0===v||1===v?.5:1,y=or(t,n,r,o,v);l>y||(0>p&&(p=ur(e,i,a,s,vv),vv[1]1&&kr(),c=or(e,i,a,s,vv[0]),p>1&&(d=or(e,i,a,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 Lr(t,e,n,i,r,a,o,s){if(s>e&&s>i&&s>a||e>s&&i>s&&a>s)return 0;var l=pr(e,i,a,s,gv);if(0===l)return 0;var u=gr(e,i,a);if(u>=0&&1>=u){for(var h=0,c=dr(e,i,a,u),d=0;l>d;d++){var f=0===gv[d]||1===gv[d]?.5:1,p=dr(t,n,r,gv[d]);o>p||(h+=gv[d]c?f:-f:c>a?f:-f)}return h}var f=0===gv[0]||1===gv[0]?.5:1,p=dr(t,n,r,gv[0]);return o>p?0:e>a?f:-f}function Or(t,e,n,i,r,a,o,s){if(s-=e,s>n||-n>s)return 0;var l=Math.sqrt(n*n-s*s);gv[0]=-l,gv[1]=l;var u=Math.abs(i-r);if(1e-4>u)return 0;if(1e-4>u%fv){i=0,r=fv;var h=a?1:-1;return o>=gv[0]+t&&o<=gv[1]+t?h:0}if(a){var l=i;i=Tr(r),r=Tr(l)}else i=Tr(i),r=Tr(r);i>r&&(r+=fv);for(var c=0,d=0;2>d;d++){var f=gv[d];if(f+t>o){var p=Math.atan2(s,f),h=a?1:-1;0>p&&(p=fv+p),(p>=i&&r>=p||p+fv>=i&&r>=p+fv)&&(p>Math.PI/2&&p<1.5*Math.PI&&(h=-h),c+=h)}}return c}function Br(t,e,n,i,r){for(var a=0,o=0,s=0,l=0,u=0,h=0;h1&&(n||(a+=Dr(o,s,l,u,i,r))),1===h&&(o=t[h],s=t[h+1],l=o,u=s),c){case dv.M:l=t[h++],u=t[h++],o=l,s=u;break;case dv.L:if(n){if(Sr(o,s,t[h],t[h+1],e,i,r))return!0}else a+=Dr(o,s,t[h],t[h+1],i,r)||0;o=t[h++],s=t[h++];break;case dv.C:if(n){if(Mr(o,s,t[h++],t[h++],t[h++],t[h++],t[h],t[h+1],e,i,r))return!0}else a+=Pr(o,s,t[h++],t[h++],t[h++],t[h++],t[h],t[h+1],i,r)||0;o=t[h++],s=t[h++];break;case dv.Q:if(n){if(Ir(o,s,t[h++],t[h++],t[h],t[h+1],e,i,r))return!0}else a+=Lr(o,s,t[h++],t[h++],t[h],t[h+1],i,r)||0;o=t[h++],s=t[h++];break;case dv.A:var d=t[h++],f=t[h++],p=t[h++],g=t[h++],v=t[h++],m=t[h++];h+=1;var y=1-t[h++],_=Math.cos(v)*p+d,x=Math.sin(v)*g+f;h>1?a+=Dr(o,s,_,x,i,r):(l=_,u=x);var w=(i-d)*g/p+d;if(n){if(Cr(d,f,g,v,v+m,y,e,w,r))return!0}else a+=Or(d,f,g,v,v+m,y,w,r);o=Math.cos(v+m)*p+d,s=Math.sin(v+m)*g+f;break;case dv.R:l=o=t[h++],u=s=t[h++];var b=t[h++],S=t[h++],_=l+b,x=u+S;if(n){if(Sr(l,u,_,u,e,i,r)||Sr(_,u,_,x,e,i,r)||Sr(_,x,l,x,e,i,r)||Sr(l,x,l,u,e,i,r))return!0}else a+=Dr(_,u,_,x,i,r),a+=Dr(l,x,l,u,i,r);break;case dv.Z:if(n){if(Sr(o,s,l,u,e,i,r))return!0}else a+=Dr(o,s,l,u,i,r);o=l,s=u}}return n||Ar(s,u)||(a+=Dr(o,s,l,u,i,r)||0),0!==a}function Er(t,e,n){return Br(t,0,!1,e,n)}function zr(t,e,n,i){return Br(t,e,!0,n,i)}function Rr(t){yi.call(this,t),this.path=null}function Nr(t,e,n,i,r,a,o,s,l,u,h){var c=l*(Dv/180),d=Cv(c)*(t-n)/2+Tv(c)*(e-i)/2,f=-1*Tv(c)*(t-n)/2+Cv(c)*(e-i)/2,p=d*d/(o*o)+f*f/(s*s);p>1&&(o*=Iv(p),s*=Iv(p));var g=(r===a?-1:1)*Iv((o*o*s*s-o*o*f*f-s*s*d*d)/(o*o*f*f+s*s*d*d))||0,v=g*o*f/s,m=g*-s*d/o,y=(t+n)/2+Cv(c)*v-Tv(c)*m,_=(e+i)/2+Tv(c)*v+Cv(c)*m,x=Pv([1,0],[(d-v)/o,(f-m)/s]),w=[(d-v)/o,(f-m)/s],b=[(-1*d-v)/o,(-1*f-m)/s],S=Pv(w,b);kv(w,b)<=-1&&(S=Dv),kv(w,b)>=1&&(S=0),0===a&&S>0&&(S-=2*Dv),1===a&&0>S&&(S+=2*Dv),h.addData(u,y,_,o,s,x,S,c,a)}function Fr(t){if(!t)return new uv;for(var e,n=0,i=0,r=n,a=i,o=new uv,s=uv.CMD,l=t.match(Lv),u=0;ug;g++)f[g]=parseFloat(f[g]);for(var v=0;p>v;){var m,y,_,x,w,b,S,M=n,I=i;switch(d){case"l":n+=f[v++],i+=f[v++],h=s.L,o.addData(h,n,i);break;case"L":n=f[v++],i=f[v++],h=s.L,o.addData(h,n,i);break;case"m":n+=f[v++],i+=f[v++],h=s.M,o.addData(h,n,i),r=n,a=i,d="l";break;case"M":n=f[v++],i=f[v++],h=s.M,o.addData(h,n,i),r=n,a=i,d="L";break;case"h":n+=f[v++],h=s.L,o.addData(h,n,i);break;case"H":n=f[v++],h=s.L,o.addData(h,n,i);break;case"v":i+=f[v++],h=s.L,o.addData(h,n,i);break;case"V":i=f[v++],h=s.L,o.addData(h,n,i);break;case"C":h=s.C,o.addData(h,f[v++],f[v++],f[v++],f[v++],f[v++],f[v++]),n=f[v-2],i=f[v-1];break;case"c":h=s.C,o.addData(h,f[v++]+n,f[v++]+i,f[v++]+n,f[v++]+i,f[v++]+n,f[v++]+i),n+=f[v-2],i+=f[v-1];break;case"S":m=n,y=i;var T=o.len(),C=o.data;e===s.C&&(m+=n-C[T-4],y+=i-C[T-3]),h=s.C,M=f[v++],I=f[v++],n=f[v++],i=f[v++],o.addData(h,m,y,M,I,n,i);break;case"s":m=n,y=i;var T=o.len(),C=o.data;e===s.C&&(m+=n-C[T-4],y+=i-C[T-3]),h=s.C,M=n+f[v++],I=i+f[v++],n+=f[v++],i+=f[v++],o.addData(h,m,y,M,I,n,i);break;case"Q":M=f[v++],I=f[v++],n=f[v++],i=f[v++],h=s.Q,o.addData(h,M,I,n,i);break;case"q":M=f[v++]+n,I=f[v++]+i,n+=f[v++],i+=f[v++],h=s.Q,o.addData(h,M,I,n,i);break;case"T":m=n,y=i;var T=o.len(),C=o.data;e===s.Q&&(m+=n-C[T-4],y+=i-C[T-3]),n=f[v++],i=f[v++],h=s.Q,o.addData(h,m,y,n,i);break;case"t":m=n,y=i;var T=o.len(),C=o.data;e===s.Q&&(m+=n-C[T-4],y+=i-C[T-3]),n+=f[v++],i+=f[v++],h=s.Q,o.addData(h,m,y,n,i);break;case"A":_=f[v++],x=f[v++],w=f[v++],b=f[v++],S=f[v++],M=n,I=i,n=f[v++],i=f[v++],h=s.A,Nr(M,I,n,i,b,S,_,x,w,h,o);break;case"a":_=f[v++],x=f[v++],w=f[v++],b=f[v++],S=f[v++],M=n,I=i,n+=f[v++],i+=f[v++],h=s.A,Nr(M,I,n,i,b,S,_,x,w,h,o)}}("z"===d||"Z"===d)&&(h=s.Z,o.addData(h),n=r,i=a),e=h}return o.toStatic(),o}function Vr(t,e){var n=Fr(t);return e=e||{},e.buildPath=function(t){if(t.setData){t.setData(n.data);var e=t.getContext();e&&t.rebuildPath(e)}else{var e=t;n.rebuildPath(e)}},e.applyTransform=function(t){Mv(n,t),this.dirty(!0)},e}function Hr(t,e){return new Rr(Vr(t,e))}function Gr(t,e){return Rr.extend(Vr(t,e))}function Wr(t,e){for(var n=[],i=t.length,r=0;i>r;r++){var a=t[r];a.path||a.createPathProxy(),a.__dirtyPath&&a.buildPath(a.path,a.shape,!0),n.push(a.path)}var o=new Rr(e);return o.createPathProxy(),o.buildPath=function(t){t.appendPath(n);var e=t.getContext();e&&t.rebuildPath(e)},o}function Xr(t,e,n,i,r,a,o){var s=.5*(n-t),l=.5*(i-e);return(2*(e-n)+s+l)*o+(-3*(e-n)-2*s-l)*a+s*r+e}function Yr(t,e,n){var i=e.points,r=e.smooth;if(i&&i.length>=2){if(r&&"spline"!==r){var a=Hv(i,r,n,e.smoothConstraint);t.moveTo(i[0][0],i[0][1]);for(var o=i.length,s=0;(n?o:o-1)>s;s++){var l=a[2*s],u=a[2*s+1],h=i[(s+1)%o];t.bezierCurveTo(l[0],l[1],u[0],u[1],h[0],h[1])}}else{"spline"===r&&(i=Vv(i,n)),t.moveTo(i[0][0],i[0][1]);for(var s=1,c=i.length;c>s;s++)t.lineTo(i[s][0],i[s][1])}n&&t.closePath()}}function qr(t,e,n){var i=n&&n.lineWidth;if(e&&i){var r=e.x1,a=e.x2,o=e.y1,s=e.y2;Xv(2*r)===Xv(2*a)?t.x1=t.x2=Ur(r,i,!0):(t.x1=r,t.x2=a),Xv(2*o)===Xv(2*s)?t.y1=t.y2=Ur(o,i,!0):(t.y1=o,t.y2=s)}}function jr(t,e,n){var i=n&&n.lineWidth;if(e&&i){var r=e.x,a=e.y,o=e.width,s=e.height;t.x=Ur(r,i,!0),t.y=Ur(a,i,!0),t.width=Math.max(Ur(r+o,i,!1)-t.x,0===o?0:1),t.height=Math.max(Ur(a+s,i,!1)-t.y,0===s?0:1)}}function Ur(t,e,n){var i=Xv(2*t);return(i+Xv(e))%2===0?i/2:(i+(n?1:-1))/2}function Zr(t,e,n){var i=t.cpx2,r=t.cpy2;return null===i||null===r?[(n?sr:or)(t.x1,t.cpx1,t.cpx2,t.x2,e),(n?sr:or)(t.y1,t.cpy1,t.cpy2,t.y2,e)]:[(n?fr:dr)(t.x1,t.cpx1,t.x2,e),(n?fr:dr)(t.y1,t.cpy1,t.y2,e)]}function $r(t){yi.call(this,t),this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.notClear=!0}function Kr(t){return Rr.extend(t)}function Qr(t,e){return Gr(t,e)}function Jr(t,e,n,i){var r=Hr(t,e);return n&&("center"===i&&(n=ea(n,r.getBoundingRect())),na(r,n)),r}function ta(t,e,n){var i=new _i({style:{image:t,x:e.x,y:e.y,width:e.width,height:e.height},onload:function(t){if("center"===n){var r={width:t.width,height:t.height};i.setStyle(ea(e,r))}}});return i}function ea(t,e){var n,i=e.width/e.height,r=t.height*i;r<=t.width?n=t.height:(r=t.width,n=r/i);var a=t.x+t.width/2,o=t.y+t.height/2;return{x:a-r/2,y:o-n/2,width:r,height:n}}function na(t,e){if(t.applyTransform){var n=t.getBoundingRect(),i=n.calculateTransform(e);t.applyTransform(i)}}function ia(t){var e=t.shape,n=t.style.lineWidth;return im(2*e.x1)===im(2*e.x2)&&(e.x1=e.x2=aa(e.x1,n,!0)),im(2*e.y1)===im(2*e.y2)&&(e.y1=e.y2=aa(e.y1,n,!0)),t}function ra(t){var e=t.shape,n=t.style.lineWidth,i=e.x,r=e.y,a=e.width,o=e.height;return e.x=aa(e.x,n,!0),e.y=aa(e.y,n,!0),e.width=Math.max(aa(i+a,n,!1)-e.x,0===a?0:1),e.height=Math.max(aa(r+o,n,!1)-e.y,0===o?0:1),t}function aa(t,e,n){var i=im(2*t);return(i+im(e))%2===0?i/2:(i+(n?1:-1))/2}function oa(t){return null!=t&&"none"!==t}function sa(t){if("string"!=typeof t)return t;var e=um.get(t);return e||(e=Ue(t,-.1),1e4>hm&&(um.set(t,e),hm++)),e}function la(t){if(t.__hoverStlDirty){t.__hoverStlDirty=!1;var e=t.__hoverStl;if(!e)return void(t.__cachedNormalStl=t.__cachedNormalZ2=null);var n=t.__cachedNormalStl={};t.__cachedNormalZ2=t.z2;var i=t.style;for(var r in e)null!=e[r]&&(n[r]=i[r]);n.fill=i.fill,n.stroke=i.stroke}}function ua(t){var e=t.__hoverStl;if(e&&!t.__highlighted){var n=t.useHoverLayer;t.__highlighted=n?"layer":"plain";var i=t.__zr;if(i||!n){var r=t,a=t.style;n&&(r=i.addHover(t),a=r.style),Aa(a),n||la(r),a.extendFrom(e),ha(a,e,"fill"),ha(a,e,"stroke"),Da(a),n||(t.dirty(!1),t.z2+=sm)}}}function ha(t,e,n){!oa(e[n])&&oa(t[n])&&(t[n]=sa(t[n]))}function ca(t){var e=t.__highlighted;if(e)if(t.__highlighted=!1,"layer"===e)t.__zr&&t.__zr.removeHover(t);else if(e){var n=t.style,i=t.__cachedNormalStl;i&&(Aa(n),t.setStyle(i),Da(n));var r=t.__cachedNormalZ2;null!=r&&t.z2-r===sm&&(t.z2=r)}}function da(t,e){t.isGroup?t.traverse(function(t){!t.isGroup&&e(t)}):e(t)}function fa(t,e){e=t.__hoverStl=e!==!1&&(e||{}),t.__hoverStlDirty=!0,t.__highlighted&&(t.__cachedNormalStl=null,ca(t),ua(t))}function pa(t){return t&&t.__isEmphasisEntered}function ga(t){this.__hoverSilentOnTouch&&t.zrByTouch||!this.__isEmphasisEntered&&da(this,ua)}function va(t){this.__hoverSilentOnTouch&&t.zrByTouch||!this.__isEmphasisEntered&&da(this,ca)}function ma(){this.__isEmphasisEntered=!0,da(this,ua)}function ya(){this.__isEmphasisEntered=!1,da(this,ca)}function _a(t,e,n){t.isGroup?t.traverse(function(t){!t.isGroup&&fa(t,t.hoverStyle||e)}):fa(t,t.hoverStyle||e),xa(t,n)}function xa(t,e){var n=e===!1;if(t.__hoverSilentOnTouch=null!=e&&e.hoverSilentOnTouch,!n||t.__hoverStyleTrigger){var i=n?"off":"on";t[i]("mouseover",ga)[i]("mouseout",va),t[i]("emphasis",ma)[i]("normal",ya),t.__hoverStyleTrigger=!n}}function wa(t,e,n,i,r,a,o){r=r||om;var s,l=r.labelFetcher,u=r.labelDataIndex,h=r.labelDimIndex,c=n.getShallow("show"),d=i.getShallow("show");(c||d)&&(l&&(s=l.getFormattedLabel(u,"normal",null,h)),null==s&&(s=w(r.defaultText)?r.defaultText(u,r):r.defaultText));var f=c?s:null,p=d?A(l?l.getFormattedLabel(u,"emphasis",null,h):null,s):null;(null!=f||null!=p)&&(ba(t,n,a,r),ba(e,i,o,r,!0)),t.text=f,e.text=p}function ba(t,e,n,i,r){return Ma(t,e,i,r),n&&o(t,n),t}function Sa(t,e,n){var i,r={isRectText:!0};n===!1?i=!0:r.autoColor=n,Ma(t,e,r,i)}function Ma(t,e,n,i){if(n=n||om,n.isRectText){var r=e.getShallow("position")||(i?null:"inside");"outside"===r&&(r="top"),t.textPosition=r,t.textOffset=e.getShallow("offset");var a=e.getShallow("rotate");null!=a&&(a*=Math.PI/180),t.textRotation=a,t.textDistance=A(e.getShallow("distance"),i?null:5)}var o,s=e.ecModel,l=s&&s.option.textStyle,u=Ia(e);if(u){o={};for(var h in u)if(u.hasOwnProperty(h)){var c=e.getModel(["rich",h]);Ta(o[h]={},c,l,n,i)}}return t.rich=o,Ta(t,e,l,n,i,!0),n.forceRich&&!n.textStyle&&(n.textStyle={}),t}function Ia(t){for(var e;t&&t!==t.ecModel;){var n=(t.option||om).rich;if(n){e=e||{};for(var i in n)n.hasOwnProperty(i)&&(e[i]=1)}t=t.parentModel}return e}function Ta(t,e,n,i,r,a){n=!r&&n||om,t.textFill=Ca(e.getShallow("color"),i)||n.color,t.textStroke=Ca(e.getShallow("textBorderColor"),i)||n.textBorderColor,t.textStrokeWidth=A(e.getShallow("textBorderWidth"),n.textBorderWidth),t.insideRawTextPosition=t.textPosition,r||(a&&(t.insideRollbackOpt=i,Da(t)),null==t.textFill&&(t.textFill=i.autoColor)),t.fontStyle=e.getShallow("fontStyle")||n.fontStyle,t.fontWeight=e.getShallow("fontWeight")||n.fontWeight,t.fontSize=e.getShallow("fontSize")||n.fontSize,t.fontFamily=e.getShallow("fontFamily")||n.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"),a&&i.disableBox||(t.textBackgroundColor=Ca(e.getShallow("backgroundColor"),i),t.textPadding=e.getShallow("padding"),t.textBorderColor=Ca(e.getShallow("borderColor"),i),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")||n.textShadowColor,t.textShadowBlur=e.getShallow("textShadowBlur")||n.textShadowBlur,t.textShadowOffsetX=e.getShallow("textShadowOffsetX")||n.textShadowOffsetX,t.textShadowOffsetY=e.getShallow("textShadowOffsetY")||n.textShadowOffsetY}function Ca(t,e){return"auto"!==t?t:e&&e.autoColor?e.autoColor:null}function Da(t){var e=t.insideRollbackOpt;if(e&&null==t.textFill){var n,i=e.useInsideStyle,r=t.insideRawTextPosition,a=e.autoColor;i!==!1&&(i===!0||e.isRectText&&r&&"string"==typeof r&&r.indexOf("inside")>=0)?(n={textFill:null,textStroke:t.textStroke,textStrokeWidth:t.textStrokeWidth},t.textFill="#fff",null==t.textStroke&&(t.textStroke=a,null==t.textStrokeWidth&&(t.textStrokeWidth=2))):null!=a&&(n={textFill:null},t.textFill=a),n&&(t.insideRollback=n)}}function Aa(t){var e=t.insideRollback;e&&(t.textFill=e.textFill,t.textStroke=e.textStroke,t.textStrokeWidth=e.textStrokeWidth,t.insideRollback=null)}function ka(t,e){var n=e||e.getModel("textStyle");return B([t.fontStyle||n&&n.getShallow("fontStyle")||"",t.fontWeight||n&&n.getShallow("fontWeight")||"",(t.fontSize||n&&n.getShallow("fontSize")||12)+"px",t.fontFamily||n&&n.getShallow("fontFamily")||"sans-serif"].join(" "))}function Pa(t,e,n,i,r,a){"function"==typeof r&&(a=r,r=null);var o=i&&i.isAnimationEnabled();if(o){var s=t?"Update":"",l=i.getShallow("animationDuration"+s),u=i.getShallow("animationEasing"+s),h=i.getShallow("animationDelay"+s);"function"==typeof h&&(h=h(r,i.getAnimationDelayParams?i.getAnimationDelayParams(e,r):null)),"function"==typeof l&&(l=l(r)),l>0?e.animateTo(n,l,h||0,u,a,!!a):(e.stopAnimation(),e.attr(n),a&&a())}else e.stopAnimation(),e.attr(n),a&&a()}function La(t,e,n,i,r){Pa(!0,t,e,n,i,r)}function Oa(t,e,n,i,r){Pa(!1,t,e,n,i,r)}function Ba(t,e){for(var n=Ie([]);t&&t!==e;)Ce(n,t.getLocalTransform(),n),t=t.parent;return n}function Ea(t,e,n){return e&&!d(e)&&(e=jf.getLocalTransform(e)),n&&(e=Pe([],e)),ae([],t,e)}function za(t,e,n){var i=0===e[4]||0===e[5]||0===e[0]?1:Math.abs(2*e[4]/e[0]),r=0===e[4]||0===e[5]||0===e[2]?1:Math.abs(2*e[4]/e[2]),a=["left"===t?-i:"right"===t?i:0,"top"===t?-r:"bottom"===t?r:0];return a=Ea(a,e,n),Math.abs(a[0])>Math.abs(a[1])?a[0]>0?"right":"left":a[1]>0?"bottom":"top"}function Ra(t,e,n){function i(t){var e={};return t.traverse(function(t){!t.isGroup&&t.anid&&(e[t.anid]=t)}),e}function r(t){var e={position:W(t.position),rotation:t.rotation};return t.shape&&(e.shape=o({},t.shape)),e}if(t&&e){var a=i(t);e.traverse(function(t){if(!t.isGroup&&t.anid){var e=a[t.anid];if(e){var i=r(t);t.attr(r(e)),La(t,i,n,t.dataIndex)}}})}}function Na(t,e){return p(t,function(t){var n=t[0];n=rm(n,e.x),n=am(n,e.x+e.width);var i=t[1];return i=rm(i,e.y),i=am(i,e.y+e.height),[n,i]})}function Fa(t,e){var n=rm(t.x,e.x),i=am(t.x+t.width,e.x+e.width),r=rm(t.y,e.y),a=am(t.y+t.height,e.y+e.height);return i>=n&&a>=r?{x:n,y:r,width:i-n,height:a-r}:void 0}function Va(t,e,n){e=o({rectHover:!0},e);var i=e.style={strokeNoScale:!0};return n=n||{x:-1,y:-1,width:2,height:2},t?0===t.indexOf("image://")?(i.image=t.slice(8),s(i,n),new _i(e)):Jr(t.replace("path://",""),e,n,"center"):void 0}function Ha(t,e,n){this.parentModel=e,this.ecModel=n,this.option=t}function Ga(t,e,n){for(var i=0;i=0&&n.push(t)}),n}t.topologicalTravel=function(t,e,i,r){function a(t){l[t].entryCount--,0===l[t].entryCount&&u.push(t)}function o(t){h[t]=!0,a(t)}if(t.length){var s=n(e),l=s.graph,u=s.noEntryList,h={};for(f(t,function(t){h[t]=!0});u.length;){var c=u.pop(),d=l[c],p=!!h[c];p&&(i.call(r,c,d.originalDeps.slice()),delete h[c]),f(d.successor,p?o:a)}f(h,function(){throw new Error("Circle dependency may exists")})}}}function ja(t){return t.replace(/^\s+/,"").replace(/\s+$/,"")}function Ua(t,e,n,i){var r=e[1]-e[0],a=n[1]-n[0];if(0===r)return 0===a?n[0]:(n[0]+n[1])/2;if(i)if(r>0){if(t<=e[0])return n[0];if(t>=e[1])return n[1]}else{if(t>=e[0])return n[0];if(t<=e[1])return n[1]}else{if(t===e[0])return n[0];if(t===e[1])return n[1]}return(t-e[0])/r*a+n[0]}function Za(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?ja(t).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?0/0:+t}function $a(t,e,n){return null==e&&(e=10),e=Math.min(Math.max(0,e),20),t=(+t).toFixed(e),n?t:+t}function Ka(t){return t.sort(function(t,e){return t-e}),t}function Qa(t){if(t=+t,isNaN(t))return 0;for(var e=1,n=0;Math.round(t*e)/e!==t;)e*=10,n++;return n}function Ja(t){var e=t.toString(),n=e.indexOf("e");if(n>0){var i=+e.slice(n+1);return 0>i?-i:0}var r=e.indexOf(".");return 0>r?0:e.length-1-r}function to(t,e){var n=Math.log,i=Math.LN10,r=Math.floor(n(t[1]-t[0])/i),a=Math.round(n(Math.abs(e[1]-e[0]))/i),o=Math.min(Math.max(-r+a,0),20);return isFinite(o)?o:20}function eo(t,e,n){if(!t[e])return 0;var i=g(t,function(t,e){return t+(isNaN(e)?0:e)},0);if(0===i)return 0;for(var r=Math.pow(10,n),a=p(t,function(t){return(isNaN(t)?0:t)/i*r*100}),o=100*r,s=p(a,function(t){return Math.floor(t)}),l=g(s,function(t,e){return t+e},0),u=p(a,function(t,e){return t-s[e]});o>l;){for(var h=Number.NEGATIVE_INFINITY,c=null,d=0,f=u.length;f>d;++d)u[d]>h&&(h=u[d],c=d);++s[c],u[c]=0,++l}return s[e]/r}function no(t){var e=2*Math.PI;return(t%e+e)%e}function io(t){return t>-_m&&_m>t}function ro(t){if(t instanceof Date)return t;if("string"==typeof t){var e=wm.exec(t);if(!e)return new Date(0/0);if(e[8]){var n=+e[4]||0;return"Z"!==e[8].toUpperCase()&&(n-=e[8].slice(0,3)),new Date(Date.UTC(+e[1],+(e[2]||1)-1,+e[3]||1,n,+(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 ao(t){return Math.pow(10,oo(t))}function oo(t){return Math.floor(Math.log(t)/Math.LN10)}function so(t,e){var n,i=oo(t),r=Math.pow(10,i),a=t/r;return n=e?1.5>a?1:2.5>a?2:4>a?3:7>a?5:10:1>a?1:2>a?2:3>a?3:5>a?5:10,t=n*r,i>=-20?+t.toFixed(0>i?-i:0):t}function lo(t,e){var n=(t.length-1)*e+1,i=Math.floor(n),r=+t[i-1],a=n-i;return a?r+a*(t[i]-r):r}function uo(t){function e(t,n,i){return t.interval[i]s;s++)a[s]<=n&&(a[s]=n,o[s]=s?1:1-i),n=a[s],i=o[s];a[0]===a[1]&&o[0]*o[1]!==1?t.splice(r,1):r++}return t}function ho(t){return t-parseFloat(t)>=0}function co(t){return isNaN(t)?"-":(t=(t+"").split("."),t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:""))}function fo(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 po(t){return null==t?"":(t+"").replace(Mm,function(t,e){return Im[e]})}function go(t,e,n){x(e)||(e=[e]);var i=e.length;if(!i)return"";for(var r=e[0].$vars||[],a=0;as;s++)for(var l=0;l':'':{renderMode:r,content:"{marker"+a+"|} ",style:{color:n}}:""}function yo(t,e){return t+="","0000".substr(0,e-t.length)+t}function _o(t,e,n){("week"===t||"month"===t||"quarter"===t||"half-year"===t||"year"===t)&&(t="MM-dd\nyyyy");var i=ro(e),r=n?"UTC":"",a=i["get"+r+"FullYear"](),o=i["get"+r+"Month"]()+1,s=i["get"+r+"Date"](),l=i["get"+r+"Hours"](),u=i["get"+r+"Minutes"](),h=i["get"+r+"Seconds"](),c=i["get"+r+"Milliseconds"]();return t=t.replace("MM",yo(o,2)).replace("M",o).replace("yyyy",a).replace("yy",a%100).replace("dd",yo(s,2)).replace("d",s).replace("hh",yo(l,2)).replace("h",l).replace("mm",yo(u,2)).replace("m",u).replace("ss",yo(h,2)).replace("s",h).replace("SSS",yo(c,3))}function xo(t){return t?t.charAt(0).toUpperCase()+t.substr(1):t}function wo(t){return Rn(t.text,t.font,t.textAlign,t.textVerticalAlign,t.textPadding,t.textLineHeight,t.rich,t.truncate)}function bo(t,e,n,i,r,a,o,s){return Rn(t,e,n,i,r,s,a,o)}function So(t,e,n,i,r){var a=0,o=0;null==i&&(i=1/0),null==r&&(r=1/0);var s=0;e.eachChild(function(l,u){var h,c,d=l.position,f=l.getBoundingRect(),p=e.childAt(u+1),g=p&&p.getBoundingRect();if("horizontal"===t){var v=f.width+(g?-g.x+f.x:0);h=a+v,h>i||l.newline?(a=0,h=v,o+=s+n,s=f.height):s=Math.max(s,f.height)}else{var m=f.height+(g?-g.y+f.y:0);c=o+m,c>r||l.newline?(a+=s+n,o=0,c=m,s=f.width):s=Math.max(s,f.width)}l.newline||(d[0]=a,d[1]=o,"horizontal"===t?a=h+n:o=c+n)})}function Mo(t,e,n){n=Sm(n||0);var i=e.width,r=e.height,a=Za(t.left,i),o=Za(t.top,r),s=Za(t.right,i),l=Za(t.bottom,r),u=Za(t.width,i),h=Za(t.height,r),c=n[2]+n[0],d=n[1]+n[3],f=t.aspect;switch(isNaN(u)&&(u=i-s-d-a),isNaN(h)&&(h=r-l-c-o),null!=f&&(isNaN(u)&&isNaN(h)&&(f>i/r?u=.8*i:h=.8*r),isNaN(u)&&(u=f*h),isNaN(h)&&(h=u/f)),isNaN(a)&&(a=i-s-u-d),isNaN(o)&&(o=r-l-h-c),t.left||t.right){case"center":a=i/2-u/2-n[3];break;case"right":a=i-u-d}switch(t.top||t.bottom){case"middle":case"center":o=r/2-h/2-n[0];break;case"bottom":o=r-h-c}a=a||0,o=o||0,isNaN(u)&&(u=i-d-a-(s||0)),isNaN(h)&&(h=r-c-o-(l||0));var p=new yn(a+n[3],o+n[0],u,h);return p.margin=n,p}function Io(t,e,n){function i(n,i){var o={},l=0,u={},h=0,c=2;if(km(n,function(e){u[e]=t[e]}),km(n,function(t){r(e,t)&&(o[t]=u[t]=e[t]),a(o,t)&&l++,a(u,t)&&h++}),s[i])return a(e,n[1])?u[n[2]]=null:a(e,n[2])&&(u[n[1]]=null),u;if(h!==c&&l){if(l>=c)return o;for(var d=0;di;i++)if(t[i].length>e)return t[i];return t[n-1]}function ko(t){var e=t.get("coordinateSystem"),n={coordSysName:e,coordSysDims:[],axisMap:N(),categoryAxisMap:N()},i=Hm[e];return i?(i(t,n,n.axisMap,n.categoryAxisMap),n):void 0}function Po(t){return"category"===t.get("type")}function Lo(t){this.fromDataset=t.fromDataset,this.data=t.data||(t.sourceFormat===Ym?{}:[]),this.sourceFormat=t.sourceFormat||qm,this.seriesLayoutBy=t.seriesLayoutBy||Um,this.dimensionsDefine=t.dimensionsDefine,this.encodeDefine=t.encodeDefine&&N(t.encodeDefine),this.startIndex=t.startIndex||0,this.dimensionsDetectCount=t.dimensionsDetectCount}function Oo(t){var e=t.option.source,n=qm;if(I(e))n=jm;else if(x(e)){0===e.length&&(n=Wm);for(var i=0,r=e.length;r>i;i++){var a=e[i];if(null!=a){if(x(a)){n=Wm;break}if(S(a)){n=Xm;break}}}}else if(S(e)){for(var o in e)if(e.hasOwnProperty(o)&&d(e[o])){n=Ym;break}}else if(null!=e)throw new Error("Invalid data");$m(t).sourceFormat=n}function Bo(t){return $m(t).source}function Eo(t){$m(t).datasetMap=N()}function zo(t){var e=t.option,n=e.data,i=I(n)?jm:Gm,r=!1,a=e.seriesLayoutBy,o=e.sourceHeader,s=e.dimensions,l=Go(t);if(l){var u=l.option;n=u.source,i=$m(l).sourceFormat,r=!0,a=a||u.seriesLayoutBy,null==o&&(o=u.sourceHeader),s=s||u.dimensions}var h=Ro(n,i,a,o,s),c=e.encode;!c&&l&&(c=Ho(t,l,n,i,a,h)),$m(t).source=new Lo({data:n,fromDataset:r,seriesLayoutBy:a,sourceFormat:i,dimensionsDefine:h.dimensionsDefine,startIndex:h.startIndex,dimensionsDetectCount:h.dimensionsDetectCount,encodeDefine:c})}function Ro(t,e,n,i,r){if(!t)return{dimensionsDefine:No(r)};var a,o,s;if(e===Wm)"auto"===i||null==i?Fo(function(t){null!=t&&"-"!==t&&(b(t)?null==o&&(o=1):o=0)},n,t,10):o=i?1:0,r||1!==o||(r=[],Fo(function(t,e){r[e]=null!=t?t:""},n,t)),a=r?r.length:n===Zm?t.length:t[0]?t[0].length:null;else if(e===Xm)r||(r=Vo(t),s=!0);else if(e===Ym)r||(r=[],s=!0,f(t,function(t,e){r.push(e)}));else if(e===Gm){var l=Ni(t[0]);a=x(l)&&l.length||1}var u;return s&&f(r,function(t,e){"name"===(S(t)?t.name:t)&&(u=e)}),{startIndex:o,dimensionsDefine:No(r),dimensionsDetectCount:a,potentialNameDimIndex:u}}function No(t){if(t){var e=N();return p(t,function(t){if(t=o({},S(t)?t:{name:t}),null==t.name)return t;t.name+="",null==t.displayName&&(t.displayName=t.name);var n=e.get(t.name);return n?t.name+="-"+n.count++:e.set(t.name,{count:1}),t})}}function Fo(t,e,n,i){if(null==i&&(i=1/0),e===Zm)for(var r=0;rr;r++)t(n[r]?n[r][0]:null,r);else for(var a=n[0]||[],r=0;rr;r++)t(a[r],r)}function Vo(t){for(var e,n=0;n_&&null==y;_++)Xo(n,i,r,a.dimensionsDefine,a.startIndex,_)||(y=_);if(null!=y){s.value=y;var x=a.potentialNameDimIndex||Math.max(y-1,0);u.push(x),l.push(x)}}return l.length&&(s.itemName=l),u.length&&(s.seriesName=u),s}function Go(t){var e=t.option,n=e.data;return n?void 0:t.ecModel.getComponent("dataset",e.datasetIndex||0)}function Wo(t,e){return Xo(t.data,t.sourceFormat,t.seriesLayoutBy,t.dimensionsDefine,t.startIndex,e)}function Xo(t,e,n,i,r,a){function o(t){return null!=t&&isFinite(t)&&""!==t?!1:b(t)&&"-"!==t?!0:void 0}var s,l=5;if(I(t))return!1;var u;if(i&&(u=i[a],u=S(u)?u.name:u),e===Wm)if(n===Zm){for(var h=t[a],c=0;c<(h||[]).length&&l>c;c++)if(null!=(s=o(h[r+c])))return s}else for(var c=0;cc;c++){var d=t[r+c];if(d&&null!=(s=o(d[a])))return s}else if(e===Xm){if(!u)return;for(var c=0;cc;c++){var f=t[c];if(f&&null!=(s=o(f[u])))return s}}else if(e===Ym){if(!u)return;var h=t[u];if(!h||I(h))return!1;for(var c=0;cc;c++)if(null!=(s=o(h[c])))return s}else if(e===Gm)for(var c=0;cc;c++){var f=t[c],p=Ni(f);if(!x(p))return!1;if(null!=(s=o(p[a])))return s}return!1}function Yo(t,e){if(e){var n=e.seiresIndex,i=e.seriesId,r=e.seriesName;return null!=n&&t.componentIndex!==n||null!=i&&t.id!==i||null!=r&&t.name!==r}}function qo(t,e){var n=t.color&&!t.colorLayer;f(e,function(e,a){"colorLayer"===a&&n||zm.hasClass(a)||("object"==typeof e?t[a]=t[a]?r(t[a],e,!1):i(e):null==t[a]&&(t[a]=e))})}function jo(t){t=t,this.option={},this.option[Km]=1,this._componentsMap=N({series:[]}),this._seriesIndices,this._seriesIndicesMap,qo(t,this._theme.option),r(t,Nm,!1),this.mergeOption(t)}function Uo(t,e){x(e)||(e=e?[e]:[]);var n={};return f(e,function(e){n[e]=(t.get(e)||[]).slice()}),n}function Zo(t,e,n){var i=e.type?e.type:n?n.subType:zm.determineSubType(t,e);return i}function $o(t,e){t._seriesIndicesMap=N(t._seriesIndices=p(e,function(t){return t.componentIndex})||[])}function Ko(t,e){return e.hasOwnProperty("subType")?v(t,function(t){return t.subType===e.subType}):t}function Qo(t){f(Jm,function(e){this[e]=y(t[e],t)},this)}function Jo(){this._coordinateSystems=[]}function ts(t){this._api=t,this._timelineOptions=[],this._mediaList=[],this._mediaDefault,this._currentMediaIndices=[],this._optionBackup,this._newBaseOption}function es(t,e,n){var i,r,a=[],o=[],s=t.timeline;if(t.baseOption&&(r=t.baseOption),(s||t.options)&&(r=r||{},a=(t.options||[]).slice()),t.media){r=r||{};var l=t.media;ey(l,function(t){t&&t.option&&(t.query?o.push(t):i||(i=t))})}return r||(r=t),r.timeline||(r.timeline=s),ey([r].concat(a).concat(p(o,function(t){return t.option})),function(t){ey(e,function(e){e(t,n)})}),{baseOption:r,timelineOptions:a,mediaDefault:i,mediaList:o}}function ns(t,e,n){var i={width:e,height:n,aspectratio:e/n},r=!0;return f(t,function(t,e){var n=e.match(ay);if(n&&n[1]&&n[2]){var a=n[1],o=n[2].toLowerCase();is(i[o],t,a)||(r=!1)}}),r}function is(t,e,n){return"min"===n?t>=e:"max"===n?e>=t:t===e}function rs(t,e){return t.join(",")===e.join(",")}function as(t,e){e=e||{},ey(e,function(e,n){if(null!=e){var i=t[n];if(zm.hasClass(n)){e=zi(e),i=zi(i);var r=Vi(i,e);t[n]=iy(r,function(t){return t.option&&t.exist?ry(t.exist,t.option,!0):t.exist||t.option})}else t[n]=ry(i,e,!0)}})}function os(t){var e=t&&t.itemStyle;if(e)for(var n=0,i=ly.length;i>n;n++){var a=ly[n],o=e.normal,s=e.emphasis;o&&o[a]&&(t[a]=t[a]||{},t[a].normal?r(t[a].normal,o[a]):t[a].normal=o[a],o[a]=null),s&&s[a]&&(t[a]=t[a]||{},t[a].emphasis?r(t[a].emphasis,s[a]):t[a].emphasis=s[a],s[a]=null)}}function ss(t,e,n){if(t&&t[e]&&(t[e].normal||t[e].emphasis)){var i=t[e].normal,r=t[e].emphasis;i&&(n?(t[e].normal=t[e].emphasis=null,s(t[e],i)):t[e]=i),r&&(t.emphasis=t.emphasis||{},t.emphasis[e]=r)}}function ls(t){ss(t,"itemStyle"),ss(t,"lineStyle"),ss(t,"areaStyle"),ss(t,"label"),ss(t,"labelLine"),ss(t,"upperLabel"),ss(t,"edgeLabel")}function us(t,e){var n=sy(t)&&t[e],i=sy(n)&&n.textStyle;if(i)for(var r=0,a=bg.length;a>r;r++){var e=bg[r];i.hasOwnProperty(e)&&(n[e]=i[e])}}function hs(t){t&&(ls(t),us(t,"label"),t.emphasis&&us(t.emphasis,"label"))}function cs(t){if(sy(t)){os(t),ls(t),us(t,"label"),us(t,"upperLabel"),us(t,"edgeLabel"),t.emphasis&&(us(t.emphasis,"label"),us(t.emphasis,"upperLabel"),us(t.emphasis,"edgeLabel"));var e=t.markPoint;e&&(os(e),hs(e));var n=t.markLine;n&&(os(n),hs(n));var i=t.markArea;i&&hs(i);var r=t.data;if("graph"===t.type){r=r||t.nodes;var a=t.links||t.edges;if(a&&!I(a))for(var o=0;o=0;p--){var g=t[p];if(s||(d=g.data.rawIndexOf(g.stackedByDimension,c)),d>=0){var v=g.data.getByRawIndex(g.stackResultDimension,d);if(h>=0&&v>0||0>=h&&0>v){h+=v,f=v;break}}}return i[0]=h,i[1]=f,i});o.hostModel.setData(l),e.data=l})}function ys(t,e){Lo.isInstance(t)||(t=Lo.seriesDataToSource(t)),this._source=t;var n=this._data=t.data,i=t.sourceFormat;i===jm&&(this._offset=0,this._dimSize=e,this._data=n);var r=gy[i===Wm?i+"_"+t.seriesLayoutBy:i];o(this,r)}function _s(){return this._data.length}function xs(t){return this._data[t]}function ws(t){for(var e=0;ee.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function zs(t,e){f(t.CHANGABLE_METHODS,function(n){t.wrapMethod(n,_(Rs,e))})}function Rs(t){var e=Ns(t);e&&e.setOutputEnd(this.count())}function Ns(t){var e=(t.ecModel||{}).scheduler,n=e&&e.getPipeline(t.uid);if(n){var i=n.currentTask;if(i){var r=i.agentStubMap;r&&(i=r.get(t.uid))}return i}}function Fs(){this.group=new bp,this.uid=Xa("viewChart"),this.renderTask=Cs({plan:Gs,reset:Ws}),this.renderTask.context={view:this}}function Vs(t,e){if(t&&(t.trigger(e),"group"===t.type))for(var n=0;n=0?i():c=setTimeout(i,-a),u=r};return d.clear=function(){c&&(clearTimeout(c),c=null)},d.debounceNextCall=function(t){l=t},d}function Ys(t,e,n,i){var r=t[e];if(r){var a=r[Py]||r,o=r[Oy],s=r[Ly];if(s!==n||o!==i){if(null==n||!i)return t[e]=a;r=t[e]=Xs(a,n,"debounce"===i),r[Py]=a,r[Oy]=i,r[Ly]=n}return r}}function qs(t,e,n,i){this.ecInstance=t,this.api=e,this.unfinished;var n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice();this._allHandlers=n.concat(i),this._stageTaskMap=N()}function js(t,e,n,i,r){function a(t,e){return t.setDirty&&(!t.dirtyMap||t.dirtyMap.get(e.__pipeline.id))}r=r||{};var o;f(e,function(e){if(!r.visualType||r.visualType===e.visualType){var s=t._stageTaskMap.get(e.uid),l=s.seriesTaskMap,u=s.overallTask;if(u){var h,c=u.agentStubMap;c.each(function(t){a(r,t)&&(t.dirty(),h=!0)}),h&&u.dirty(),Vy(u,i);var d=t.getPerformArgs(u,r.block);c.each(function(t){t.perform(d)}),o|=u.perform(d)}else l&&l.each(function(s){a(r,s)&&s.dirty();var l=t.getPerformArgs(s,r.block);l.skip=!e.performRawSeries&&n.isSeriesFiltered(s.context.model),Vy(s,i),o|=s.perform(l)})}}),t.unfinished|=o}function Us(t,e,n,i,r){function a(n){var a=n.uid,s=o.get(a)||o.set(a,Cs({plan:tl,reset:el,count:il}));s.context={model:n,ecModel:i,api:r,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:t},rl(t,n,s)}var o=n.seriesTaskMap||(n.seriesTaskMap=N()),s=e.seriesType,l=e.getTargetSeries;e.createOnAllSeries?i.eachRawSeries(a):s?i.eachRawSeriesByType(s,a):l&&l(i,r).each(a);var u=t._pipelineMap;o.each(function(t,e){u.get(e)||(t.dispose(),o.removeKey(e))})}function Zs(t,e,n,i,r){function a(e){var n=e.uid,i=s.get(n);i||(i=s.set(n,Cs({reset:Ks,onDirty:Js})),o.dirty()),i.context={model:e,overallProgress:h,modifyOutputEnd:c},i.agent=o,i.__block=h,rl(t,e,i)}var o=n.overallTask=n.overallTask||Cs({reset:$s});o.context={ecModel:i,api:r,overallReset:e.overallReset,scheduler:t};var s=o.agentStubMap=o.agentStubMap||N(),l=e.seriesType,u=e.getTargetSeries,h=!0,c=e.modifyOutputEnd;l?i.eachRawSeriesByType(l,a):u?u(i,r).each(a):(h=!1,f(i.getSeries(),a));var d=t._pipelineMap;s.each(function(t,e){d.get(e)||(t.dispose(),o.dirty(),s.removeKey(e))})}function $s(t){t.overallReset(t.ecModel,t.api,t.payload)}function Ks(t){return t.overallProgress&&Qs}function Qs(){this.agent.dirty(),this.getDownstream().dirty()}function Js(){this.agent&&this.agent.dirty()}function tl(t){return t.plan&&t.plan(t.model,t.ecModel,t.api,t.payload)}function el(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=zi(t.reset(t.model,t.ecModel,t.api,t.payload));return e.length>1?p(e,function(t,e){return nl(e)}):Hy}function nl(t){return function(e,n){var i=n.data,r=n.resetDefines[t];if(r&&r.dataEach)for(var a=e.start;a0?parseInt(i,10)/100:i?parseFloat(i):0;var r=n.getAttribute("stop-color")||"#000000";e.addColorStop(i,r)}n=n.nextSibling}}function hl(t,e){t&&t.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),s(e.__inheritedStyle,t.__inheritedStyle))}function cl(t){for(var e=B(t).split(Qy),n=[],i=0;i0;a-=2){var o=r[a],s=r[a-1];switch(i=i||Me(),s){case"translate":o=B(o).split(Qy),De(i,i,[parseFloat(o[0]),parseFloat(o[1]||0)]);break;case"scale":o=B(o).split(Qy),ke(i,i,[parseFloat(o[0]),parseFloat(o[1]||o[0])]);break;case"rotate":o=B(o).split(Qy),Ae(i,i,parseFloat(o[0]));break;case"skew":o=B(o).split(Qy),console.warn("Skew transform is not supported yet");break;case"matrix":var o=B(o).split(Qy);i[0]=parseFloat(o[0]),i[1]=parseFloat(o[1]),i[2]=parseFloat(o[2]),i[3]=parseFloat(o[3]),i[4]=parseFloat(o[4]),i[5]=parseFloat(o[5])}}e.setLocalTransform(i)}}function gl(t){var e=t.getAttribute("style"),n={};if(!e)return n;var i={};r_.lastIndex=0;for(var r;null!=(r=r_.exec(e));)i[r[1]]=r[2];for(var a in e_)e_.hasOwnProperty(a)&&null!=i[a]&&(n[e_[a]]=i[a]);return n}function vl(t,e,n){var i=e/t.width,r=n/t.height,a=Math.min(i,r),o=[a,a],s=[-(t.x+t.width/2)*a+e/2,-(t.y+t.height/2)*a+n/2];return{scale:o,position:s}}function ml(t){return function(e,n,i){e=e&&e.toLowerCase(),Bf.prototype[t].call(this,e,n,i)}}function yl(){Bf.call(this)}function _l(t,e,n){function r(t,e){return t.__prio-e.__prio}n=n||{},"string"==typeof e&&(e=z_[e]),this.id,this.group,this._dom=t;var a="canvas",o=this._zr=Pi(t,{renderer:n.renderer||a,devicePixelRatio:n.devicePixelRatio,width:n.width,height:n.height});this._throttledZrFlush=Xs(y(o.flush,o),17);var e=i(e);e&&dy(e,!0),this._theme=e,this._chartsViews=[],this._chartsMap={},this._componentsViews=[],this._componentsMap={},this._coordSysMgr=new Jo;var s=this._api=Rl(this);Tn(E_,r),Tn(L_,r),this._scheduler=new qs(this,s,L_,E_),Bf.call(this,this._ecEventProcessor=new Nl),this._messageCenter=new yl,this._initEvents(),this.resize=y(this.resize,this),this._pendingActions=[],o.animation.on("frame",this._onframe,this),Cl(o,this),E(this)}function xl(t,e,n){var i,r=this._model,a=this._coordSysMgr.getCoordinateSystems();e=qi(r,e);for(var o=0;oe.get("hoverLayerThreshold")&&!df.node&&n.traverse(function(t){t.isGroup||(t.useHoverLayer=!0)})}function El(t,e){var n=t.get("blendMode")||null;e.group.traverse(function(t){t.isGroup||t.style.blend!==n&&t.setStyle("blend",n),t.eachPendingDisplayable&&t.eachPendingDisplayable(function(t){t.setStyle("blend",n)})})}function zl(t,e){var n=t.get("z"),i=t.get("zlevel");e.group.traverse(function(t){"group"!==t.type&&(null!=n&&(t.z=n),null!=i&&(t.zlevel=i))})}function Rl(t){var e=t._coordSysMgr;return o(new Qo(t),{getCoordinateSystems:y(e.getCoordinateSystems,e),getComponentByElement:function(e){for(;e;){var n=e.__ecComponentInfo;if(null!=n)return t._model.getComponent(n.mainType,n.index);e=e.parent}}})}function Nl(){this.eventInfo}function Fl(t){function e(t,e){for(var n=0;n65535?K_:J_}function mu(t){var e=t.constructor;return e===Array?t.slice():new e(t)}function yu(t,e){f(tx.concat(e.__wrappedMethods||[]),function(n){e.hasOwnProperty(n)&&(t[n]=e[n])}),t.__wrappedMethods=e.__wrappedMethods,f(ex,function(n){t[n]=i(e[n])}),t._calculationInfo=o(e._calculationInfo)}function _u(t,e,n,i,r){var a=$_[e.type],o=i-1,s=e.name,l=t[s][o];if(l&&l.lengthc;c+=n)t[s].push(new a(Math.min(r-c,n)))}function xu(t){var e=t._invertedIndicesMap;f(e,function(n,i){var r=t._dimensionInfos[i],a=r.ordinalMeta;if(a){n=e[i]=new Q_(a.categories.length);for(var o=0;o=0?this._indices[t]:-1}function Mu(t,e){var n=t._idList[e];return null==n&&(n=wu(t,t._idDimIdx,e)),null==n&&(n=Z_+e),n}function Iu(t){return x(t)||(t=[t]),t}function Tu(t,e){var n=t.dimensions,i=new nx(p(n,t.getDimensionInfo,t),t.hostModel);yu(i,t);for(var r=i._storage={},a=t._storage,o=0;o=0?(r[s]=Cu(a[s]),i._rawExtent[s]=Du(),i._extent[s]=null):r[s]=a[s])}return i}function Cu(t){for(var e=new Array(t.length),n=0;np;p++){var g=a[p]=o({},S(a[p])?a[p]:{name:a[p]}),v=g.name,m=c[p]={otherDims:{}};null!=v&&null==u.get(v)&&(m.name=m.displayName=v,u.set(v,p)),null!=g.type&&(m.type=g.type),null!=g.displayName&&(m.displayName=g.displayName) }l.each(function(t,e){if(t=zi(t).slice(),1===t.length&&t[0]<0)return void l.set(e,!1);var n=l.set(e,[]);f(t,function(t,i){b(t)&&(t=u.get(t)),null!=t&&d>t&&(n[i]=t,r(c[t],e,i))})});var y=0;f(t,function(t){var e,t,n,a;if(b(t))e=t,t={};else{e=t.name;var o=t.ordinalMeta;t.ordinalMeta=null,t=i(t),t.ordinalMeta=o,n=t.dimsDef,a=t.otherDims,t.name=t.coordDim=t.coordDimIndex=t.dimsDef=t.otherDims=null}var u=l.get(e);if(u!==!1){var u=zi(u);if(!u.length)for(var h=0;h<(n&&n.length||1);h++){for(;yI;I++){var m=c[I]=c[I]||{},T=m.coordDim;null==T&&(m.coordDim=Pu(M,h,w),m.coordDimIndex=0,(!_||0>=x)&&(m.isExtraCoord=!0),x--),null==m.name&&(m.name=Pu(m.coordDim,u)),null==m.type&&Wo(e,I,m.name)&&(m.type="ordinal")}return c}function ku(t,e,n,i){var r=Math.max(t.dimensionsDetectCount||1,e.length,n.length,i||0);return f(e,function(t){var e=t.dimsDef;e&&(r=Math.max(r,e.length))}),r}function Pu(t,e,n){if(n||null!=e.get(t)){for(var i=0;null!=e.get(t+i);)i++;t+=i}return e.set(t,!0),t}function Lu(t,e,n){n=n||{};var i,r,a,o,s=n.byIndex,l=n.stackedCoordDimension,u=!(!t||!t.get("stack"));if(f(e,function(t,n){b(t)&&(e[n]=t={name:t}),u&&!t.isExtraCoord&&(s||i||!t.ordinalMeta||(i=t),r||"ordinal"===t.type||"time"===t.type||l&&l!==t.coordDim||(r=t))}),!r||s||i||(s=!0),r){a="__\x00ecstackresult",o="__\x00ecstackedover",i&&(i.createInvertedIndices=!0);var h=r.coordDim,c=r.type,d=0;f(e,function(t){t.coordDim===h&&d++}),e.push({name:a,coordDim:h,coordDimIndex:d,type:c,isExtraCoord:!0,isCalculationCoord:!0}),d++,e.push({name:o,coordDim:o,coordDimIndex:d,type:c,isExtraCoord:!0,isCalculationCoord:!0})}return{stackedDimension:r&&r.name,stackedByDimension:i&&i.name,isStackedByIndex:s,stackedOverDimension:o,stackResultDimension:a}}function Ou(t,e){return!!e&&e===t.getCalculationInfo("stackedDimension")}function Bu(t,e){return Ou(t,e)?t.getCalculationInfo("stackResultDimension"):e}function Eu(t,e,n){n=n||{},Lo.isInstance(t)||(t=Lo.seriesDataToSource(t));var i,r=e.get("coordinateSystem"),a=Jo.get(r),o=ko(e);o&&(i=p(o.coordSysDims,function(t){var e={name:t},n=o.axisMap.get(t);if(n){var i=n.get("type");e.type=pu(i)}return e})),i||(i=a&&(a.getDimensionsInfo?a.getDimensionsInfo():a.dimensions.slice())||["x","y"]);var s,l,u=ax(t,{coordDimensions:i,generateCoord:n.generateCoord});o&&f(u,function(t,e){var n=t.coordDim,i=o.categoryAxisMap.get(n);i&&(null==s&&(s=e),t.ordinalMeta=i.getOrdinalMeta()),null!=t.otherDims.itemName&&(l=!0)}),l||null==s||(u[s].otherDims.itemName=0);var h=Lu(e,u),c=new nx(u,e);c.setCalculationInfo(h);var d=null!=s&&zu(t)?function(t,e,n,i){return i===s?n:this.defaultDimValueGetter(t,e,n,i)}:null;return c.hasItemOption=!1,c.initData(t,null,d),c}function zu(t){if(t.sourceFormat===Gm){var e=Ru(t.data||[]);return null!=e&&!x(Ni(e))}}function Ru(t){for(var e=0;eo&&(o=r.interval=n),null!=i&&o>i&&(o=r.interval=i);var s=r.intervalPrecision=Wu(o),l=r.niceTickExtent=[ux(Math.ceil(t[0]/o)*o,s),ux(Math.floor(t[1]/o)*o,s)];return Yu(l,t),r}function Wu(t){return Ja(t)+2}function Xu(t,e,n){t[e]=Math.max(Math.min(t[e],n[1]),n[0])}function Yu(t,e){!isFinite(t[0])&&(t[0]=e[0]),!isFinite(t[1])&&(t[1]=e[1]),Xu(t,0,e),Xu(t,1,e),t[0]>t[1]&&(t[0]=t[1])}function qu(t,e,n,i){var r=[];if(!t)return r;var a=1e4;e[0]a)return[];return e[1]>(r.length?r[r.length-1]:n[1])&&r.push(e[1]),r}function ju(t){return t.get("stack")||dx+t.seriesIndex}function Uu(t){return t.dim+t.index}function Zu(t,e){var n=[];return e.eachSeriesByType(t,function(t){th(t)&&!eh(t)&&n.push(t)}),n}function $u(t){var e=[];return f(t,function(t){var n=t.getData(),i=t.coordinateSystem,r=i.getBaseAxis(),a=r.getExtent(),o="category"===r.type?r.getBandWidth():Math.abs(a[1]-a[0])/n.count(),s=Za(t.get("barWidth"),o),l=Za(t.get("barMaxWidth"),o),u=t.get("barGap"),h=t.get("barCategoryGap");e.push({bandWidth:o,barWidth:s,barMaxWidth:l,barGap:u,barCategoryGap:h,axisKey:Uu(r),stackId:ju(t)})}),Ku(e)}function Ku(t){var e={};f(t,function(t){var n=t.axisKey,i=t.bandWidth,r=e[n]||{bandWidth:i,remainedWidth:i,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},a=r.stacks;e[n]=r;var o=t.stackId;a[o]||r.autoWidthCount++,a[o]=a[o]||{width:0,maxWidth:0};var s=t.barWidth;s&&!a[o].width&&(a[o].width=s,s=Math.min(r.remainedWidth,s),r.remainedWidth-=s);var l=t.barMaxWidth;l&&(a[o].maxWidth=l);var u=t.barGap;null!=u&&(r.gap=u);var h=t.barCategoryGap;null!=h&&(r.categoryGap=h)});var n={};return f(e,function(t,e){n[e]={};var i=t.stacks,r=t.bandWidth,a=Za(t.categoryGap,r),o=Za(t.gap,1),s=t.remainedWidth,l=t.autoWidthCount,u=(s-a)/(l+(l-1)*o);u=Math.max(u,0),f(i,function(t){var e=t.maxWidth;e&&u>e&&(e=Math.min(e,s),t.width&&(e=Math.min(e,t.width)),s-=e,t.width=e,l--)}),u=(s-a)/(l+(l-1)*o),u=Math.max(u,0);var h,c=0;f(i,function(t){t.width||(t.width=u),h=t,c+=t.width*(1+o)}),h&&(c-=h.width*o);var d=-c/2;f(i,function(t,i){n[e][i]=n[e][i]||{offset:d,width:t.width},d+=t.width*(1+o)})}),n}function Qu(t,e,n){if(t&&e){var i=t[Uu(e)];return null!=i&&null!=n&&(i=i[ju(n)]),i}}function Ju(t,e){var n=Zu(t,e),i=$u(n),r={};f(n,function(t){var e=t.getData(),n=t.coordinateSystem,a=n.getBaseAxis(),o=ju(t),s=i[Uu(a)][o],l=s.offset,u=s.width,h=n.getOtherAxis(a),c=t.get("barMinHeight")||0;r[o]=r[o]||[],e.setLayout({offset:l,size:u});for(var d=e.mapDimension(h.dim),f=e.mapDimension(a.dim),p=Ou(e,d),g=h.isHorizontal(),v=nh(a,h,p),m=0,y=e.count();y>m;m++){var _=e.get(d,m),x=e.get(f,m);if(!isNaN(_)){var w=_>=0?"p":"n",b=v;p&&(r[o][x]||(r[o][x]={p:v,n:v}),b=r[o][x][w]);var S,M,I,T;if(g){var C=n.dataToPoint([_,x]);S=b,M=C[1]+l,I=C[0]-v,T=u,Math.abs(I)I?-1:1)*c),p&&(r[o][x][w]+=I)}else{var C=n.dataToPoint([x,_]);S=C[0]+l,M=b,I=u,T=C[1]-v,Math.abs(T)=T?-1:1)*c),p&&(r[o][x][w]+=T)}e.setItemLayout(m,{x:S,y:M,width:I,height:T})}}},this)}function th(t){return t.coordinateSystem&&"cartesian2d"===t.coordinateSystem.type}function eh(t){return t.pipelineContext&&t.pipelineContext.large}function nh(t,e){var n,i,r=e.getGlobalExtent();r[0]>r[1]?(n=r[1],i=r[0]):(n=r[0],i=r[1]);var a=e.toGlobalCoord(e.dataToCoord(0));return n>a&&(a=n),a>i&&(a=i),a}function ih(t,e){return kx(t,Ax(e))}function rh(t,e){var n,i,r,a=t.type,o=e.getMin(),s=e.getMax(),l=null!=o,u=null!=s,h=t.getExtent();"ordinal"===a?n=e.getCategories().length:(i=e.get("boundaryGap"),x(i)||(i=[i||0,i||0]),"boolean"==typeof i[0]&&(i=[0,0]),i[0]=Za(i[0],1),i[1]=Za(i[1],1),r=h[1]-h[0]||Math.abs(h[0])),null==o&&(o="ordinal"===a?n?0:0/0:h[0]-i[0]*r),null==s&&(s="ordinal"===a?n?n-1:0/0:h[1]+i[1]*r),"dataMin"===o?o=h[0]:"function"==typeof o&&(o=o({min:h[0],max:h[1]})),"dataMax"===s?s=h[1]:"function"==typeof s&&(s=s({min:h[0],max:h[1]})),(null==o||!isFinite(o))&&(o=0/0),(null==s||!isFinite(s))&&(s=0/0),t.setBlank(C(o)||C(s)||"ordinal"===a&&!t.getOrdinalMeta().categories.length),e.getNeedCrossZero()&&(o>0&&s>0&&!l&&(o=0),0>o&&0>s&&!u&&(s=0));var c=e.ecModel;if(c&&"time"===a){var d,p=Zu("bar",c);if(f(p,function(t){d|=t.getBaseAxis()===e.axis}),d){var g=$u(p),v=ah(o,s,e,g);o=v.min,s=v.max}}return[o,s]}function ah(t,e,n,i){var r=n.axis.getExtent(),a=r[1]-r[0],o=Qu(i,n.axis);if(void 0===o)return{min:t,max:e};var s=1/0;f(o,function(t){s=Math.min(t.offset,s)});var l=-1/0;f(o,function(t){l=Math.max(t.offset+t.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,h=e-t,c=1-(s+l)/a,d=h/c-h;return e+=d*(l/u),t-=d*(s/u),{min:t,max:e}}function oh(t,e){var n=rh(t,e),i=null!=e.getMin(),r=null!=e.getMax(),a=e.get("splitNumber");"log"===t.type&&(t.base=e.get("logBase"));var o=t.type;t.setExtent(n[0],n[1]),t.niceExtent({splitNumber:a,fixMin:i,fixMax:r,minInterval:"interval"===o||"time"===o?e.get("minInterval"):null,maxInterval:"interval"===o||"time"===o?e.get("maxInterval"):null});var s=e.get("interval");null!=s&&t.setInterval&&t.setInterval(s)}function sh(t,e){if(e=e||t.get("type"))switch(e){case"category":return new lx(t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),[1/0,-1/0]);case"value":return new cx;default:return(Nu.getClass(e)||cx).create(t)}}function lh(t){var e=t.scale.getExtent(),n=e[0],i=e[1];return!(n>0&&i>0||0>n&&0>i)}function uh(t){var e=t.getLabelModel().get("formatter"),n="category"===t.type?t.scale.getExtent()[0]:null;return"string"==typeof e?e=function(e){return function(n){return n=t.scale.getLabel(n),e.replace("{value}",null!=n?n:"")}}(e):"function"==typeof e?function(i,r){return null!=n&&(r=i-n),e(hh(t,i),r)}:function(e){return t.scale.getLabel(e)}}function hh(t,e){return"category"===t.type?t.scale.getLabel(e):e}function ch(t){var e=t.model,n=t.scale;if(e.get("axisLabel.show")&&!n.isBlank()){var i,r,a="category"===t.type,o=n.getExtent();a?r=n.count():(i=n.getTicks(),r=i.length);var s,l=t.getLabelModel(),u=uh(t),h=1;r>40&&(h=Math.ceil(r/40));for(var c=0;r>c;c+=h){var d=i?i[c]:o[0]+c,f=u(d),p=l.getTextRect(f),g=dh(p,l.get("rotate")||0);s?s.union(g):s=g}return s}}function dh(t,e){var n=e*Math.PI/180,i=t.plain(),r=i.width,a=i.height,o=r*Math.cos(n)+a*Math.sin(n),s=r*Math.sin(n)+a*Math.cos(n),l=new yn(i.x,i.y,o,s);return l}function fh(t){var e=t.get("interval");return null==e?"auto":e}function ph(t){return"category"===t.type&&0===fh(t.getLabelModel())}function gh(t,e){if("image"!==this.type){var n=this.style,i=this.shape;i&&"line"===i.symbolType?n.stroke=t:this.__isEmptyBrush?(n.stroke=t,n.fill=e||"#fff"):(n.fill&&(n.fill=t),n.stroke&&(n.stroke=t)),this.dirty(!1)}}function vh(t,e,n,i,r,a,o){var s=0===t.indexOf("empty");s&&(t=t.substr(5,1).toLowerCase()+t.substr(6));var l;return l=0===t.indexOf("image://")?ta(t.slice(8),new yn(e,n,i,r),o?"center":"cover"):0===t.indexOf("path://")?Jr(t.slice(7),{},new yn(e,n,i,r),o?"center":"cover"):new Xx({shape:{symbolType:t,x:e,y:n,width:i,height:r}}),l.__isEmptyBrush=s,l.setColor=gh,l.setColor(a),l}function mh(t){return Eu(t.getSource(),t)}function yh(t,e){var n=e;Ha.isInstance(e)||(n=new Ha(e),c(n,zx));var i=sh(n);return i.setExtent(t[0],t[1]),oh(i,n),i}function _h(t){c(t,zx)}function xh(t,e){return Math.abs(t-e)>1^-(1&s),l=l>>1^-(1&l),s+=r,l+=a,r=s,a=l,i.push([s/n,l/n])}return i}function Ih(t){return"category"===t.type?Ch(t):kh(t)}function Th(t,e){return"category"===t.type?Ah(t,e):{ticks:t.scale.getTicks()}}function Ch(t){var e=t.getLabelModel(),n=Dh(t,e);return!e.get("show")||t.scale.isBlank()?{labels:[],labelCategoryInterval:n.labelCategoryInterval}:n}function Dh(t,e){var n=Ph(t,"labels"),i=fh(e),r=Lh(n,i);if(r)return r;var a,o;return w(i)?a=Nh(t,i):(o="auto"===i?Bh(t):i,a=Rh(t,o)),Oh(n,i,{labels:a,labelCategoryInterval:o})}function Ah(t,e){var n=Ph(t,"ticks"),i=fh(e),r=Lh(n,i);if(r)return r;var a,o;if((!e.get("show")||t.scale.isBlank())&&(a=[]),w(i))a=Nh(t,i,!0);else if("auto"===i){var s=Dh(t,t.getLabelModel());o=s.labelCategoryInterval,a=p(s.labels,function(t){return t.tickValue})}else o=i,a=Rh(t,o,!0);return Oh(n,i,{ticks:a,tickCategoryInterval:o})}function kh(t){var e=t.scale.getTicks(),n=uh(t);return{labels:p(e,function(e,i){return{formattedLabel:n(e,i),rawLabel:t.scale.getLabel(e),tickValue:e}})}}function Ph(t,e){return Zx(t)[e]||(Zx(t)[e]=[])}function Lh(t,e){for(var n=0;n40&&(s=Math.max(1,Math.floor(o/40)));for(var l=a[0],u=t.dataToCoord(l+1)-t.dataToCoord(l),h=Math.abs(u*Math.cos(i)),c=Math.abs(u*Math.sin(i)),d=0,f=0;l<=a[1];l+=s){var p=0,g=0,v=Rn(n(l),e.font,"center","top");p=1.3*v.width,g=1.3*v.height,d=Math.max(d,p,7),f=Math.max(f,g,7)}var m=d/h,y=f/c;isNaN(m)&&(m=1/0),isNaN(y)&&(y=1/0);var _=Math.max(0,Math.floor(Math.min(m,y))),x=Zx(t.model),w=x.lastAutoInterval,b=x.lastTickCount;return null!=w&&null!=b&&Math.abs(w-_)<=1&&Math.abs(b-o)<=1&&w>_?_=w:(x.lastTickCount=o,x.lastAutoInterval=_),_}function zh(t){var e=t.getLabelModel();return{axisRotate:t.getRotate?t.getRotate():t.isHorizontal&&!t.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}function Rh(t,e,n){function i(t){l.push(n?t:{formattedLabel:r(t),rawLabel:a.getLabel(t),tickValue:t})}var r=uh(t),a=t.scale,o=a.getExtent(),s=t.getLabelModel(),l=[],u=Math.max((e||0)+1,1),h=o[0],c=a.count();0!==h&&u>1&&c/u>2&&(h=Math.round(Math.ceil(h/u)*u));var d=ph(t),f=s.get("showMinLabel")||d,p=s.get("showMaxLabel")||d;f&&h!==o[0]&&i(o[0]);for(var g=h;g<=o[1];g+=u)i(g);return p&&g!==o[1]&&i(o[1]),l}function Nh(t,e,n){var i=t.scale,r=uh(t),a=[];return f(i.getTicks(),function(t){var o=i.getLabel(t);e(t,o)&&a.push(n?t:{formattedLabel:r(t),rawLabel:o,tickValue:t})}),a}function Fh(t,e){var n=t[1]-t[0],i=e,r=n/i/2;t[0]+=r,t[1]-=r}function Vh(t,e,n,i,r){function a(t,e){return h?t>e:e>t}var o=e.length;if(t.onBand&&!i&&o){var s,l=t.getExtent();if(1===o)e[0].coord=l[0],s=e[1]={coord:l[0]};else{var u=e[1].coord-e[0].coord;f(e,function(t){t.coord-=u/2;var e=e||0;e%2>0&&(t.coord-=u/(2*(e+1)))}),s={coord:e[o-1].coord+u},e.push(s)}var h=l[0]>l[1];a(e[0].coord,l[0])&&(r?e[0].coord=l[0]:e.shift()),r&&a(l[0],e[0].coord)&&e.unshift({coord:l[0]}),a(l[1],s.coord)&&(r?s.coord=l[1]:e.pop()),r&&a(s.coord,l[1])&&e.push({coord:l[1]})}}function Hh(t){return this._axes[t]}function Gh(t){ew.call(this,t)}function Wh(t,e){return e.type||(e.data?"category":"value")}function Xh(t,e){return t.getCoordSysModel()===e}function Yh(t,e,n){this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this._initCartesian(t,e,n),this.model=t}function qh(t,e,n,i){function r(t){return t.dim+"_"+t.index}n.getAxesOnZeroOf=function(){return a?[a]:[]};var a,o=t[e],s=n.model,l=s.get("axisLine.onZero"),u=s.get("axisLine.onZeroAxisIndex");if(l){if(null!=u)jh(o[u])&&(a=o[u]);else for(var h in o)if(o.hasOwnProperty(h)&&jh(o[h])&&!i[r(o[h])]){a=o[h];break}a&&(i[r(a)]=!0)}}function jh(t){return t&&"category"!==t.type&&"time"!==t.type&&lh(t)}function Uh(t,e){var n=t.getExtent(),i=n[0]+n[1];t.toGlobalCoord="x"===t.dim?function(t){return t+e}:function(t){return i-t+e},t.toLocalCoord="x"===t.dim?function(t){return t-e}:function(t){return i-t+e}}function Zh(t){return p(hw,function(e){var n=t.getReferringComponents(e)[0];return n})}function $h(t){return"cartesian2d"===t.get("coordinateSystem")}function Kh(t,e){var n=t.mapDimension("defaultedLabel",!0),i=n.length;if(1===i)return Is(t,e,n[0]);if(i){for(var r=[],a=0;a0?"bottom":"top":r.width>0?"left":"right";l||Qh(t.style,d,i,u,a,n,p),_a(t,d)}function ic(t,e){var n=t.get(pw)||0;return Math.min(n,Math.abs(e.width),Math.abs(e.height))}function rc(t,e,n){var i=t.getData(),r=[],a=i.getLayout("valueAxisHorizontal")?1:0;r[1-a]=i.getLayout("valueAxisStart");var o=new mw({shape:{points:i.getLayout("largePoints")},incremental:!!n,__startPoint:r,__valueIdx:a});e.add(o),ac(o,t,i)}function ac(t,e,n){var i=n.getVisual("borderColor")||n.getVisual("color"),r=e.getModel("itemStyle").getItemStyle(["color","borderColor"]);t.useStyle(r),t.style.fill=null,t.style.stroke=i,t.style.lineWidth=n.getLayout("barWidth")}function oc(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e}function sc(t,e,n,i){var r,a,o=no(n-t.rotation),s=i[0]>i[1],l="start"===e&&!s||"start"!==e&&s;return io(o-yw/2)?(a=l?"bottom":"top",r="center"):io(o-1.5*yw)?(a=l?"top":"bottom",r="center"):(a="middle",r=1.5*yw>o&&o>yw/2?l?"left":"right":l?"right":"left"),{rotation:o,textAlign:r,textVerticalAlign:a}}function lc(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)}function uc(t,e,n){if(!ph(t.axis)){var i=t.get("axisLabel.showMinLabel"),r=t.get("axisLabel.showMaxLabel");e=e||[],n=n||[];var a=e[0],o=e[1],s=e[e.length-1],l=e[e.length-2],u=n[0],h=n[1],c=n[n.length-1],d=n[n.length-2];i===!1?(hc(a),hc(u)):cc(a,o)&&(i?(hc(o),hc(h)):(hc(a),hc(u))),r===!1?(hc(s),hc(c)):cc(l,s)&&(r?(hc(l),hc(d)):(hc(s),hc(c)))}}function hc(t){t&&(t.ignore=!0)}function cc(t,e){var n=t&&t.getBoundingRect().clone(),i=e&&e.getBoundingRect().clone();if(n&&i){var r=Ie([]);return Ae(r,r,-t.rotation),n.applyTransform(Ce([],r,t.getLocalTransform())),i.applyTransform(Ce([],r,e.getLocalTransform())),n.intersect(i)}}function dc(t){return"middle"===t||"center"===t}function fc(t,e,n){var i=e.axis;if(e.get("axisTick.show")&&!i.scale.isBlank()){for(var r=e.getModel("axisTick"),a=r.getModel("lineStyle"),o=r.get("length"),l=i.getTicksCoords(),u=[],h=[],c=t._transform,d=[],f=0;f=0||t===e}function wc(t){var e=bc(t);if(e){var n=e.axisPointerModel,i=e.axis.scale,r=n.option,a=n.get("status"),o=n.get("value");null!=o&&(o=i.parse(o));var s=Mc(n);null==a&&(r.status=s?"show":"hide");var l=i.getExtent().slice();l[0]>l[1]&&l.reverse(),(null==o||o>l[1])&&(o=l[1]),o0?n=i[0]:i[1]<0&&(n=i[1]),n}function Gc(t,e,n,i){var r=0/0;t.stacked&&(r=n.get(n.getCalculationInfo("stackedOverDimension"),i)),isNaN(r)&&(r=t.valueStart);var a=t.baseDataOffset,o=[];return o[a]=n.get(t.baseDim,i),o[1-a]=r,e.dataToPoint(o)}function Wc(t,e){var n=[];return e.diff(t).add(function(t){n.push({cmd:"+",idx:t})}).update(function(t,e){n.push({cmd:"=",idx:e,idx1:t})}).remove(function(t){n.push({cmd:"-",idx:t})}).execute(),n}function Xc(t){return isNaN(t[0])||isNaN(t[1])}function Yc(t,e,n,i,r,a,o,s,l,u){return"none"!==u&&u?qc.apply(this,arguments):jc.apply(this,arguments)}function qc(t,e,n,i,r,a,o,s,l,u,h){for(var c=0,d=n,f=0;i>f;f++){var p=e[d];if(d>=r||0>d)break;if(Xc(p)){if(h){d+=a;continue}break}if(d===n)t[a>0?"moveTo":"lineTo"](p[0],p[1]);else if(l>0){var g=e[c],v="y"===u?1:0,m=(p[v]-g[v])*l;Vw(Gw,g),Gw[v]=g[v]+m,Vw(Ww,p),Ww[v]=p[v]-m,t.bezierCurveTo(Gw[0],Gw[1],Ww[0],Ww[1],p[0],p[1])}else t.lineTo(p[0],p[1]);c=d,d+=a}return f}function jc(t,e,n,i,r,a,o,s,l,u,h){for(var c=0,d=n,f=0;i>f;f++){var p=e[d];if(d>=r||0>d)break;if(Xc(p)){if(h){d+=a;continue}break}if(d===n)t[a>0?"moveTo":"lineTo"](p[0],p[1]),Vw(Gw,p);else if(l>0){var g=d+a,v=e[g];if(h)for(;v&&Xc(e[g]);)g+=a,v=e[g];var m=.5,y=e[c],v=e[g];if(!v||Xc(v))Vw(Ww,p);else{Xc(v)&&!h&&(v=p),j(Hw,v,y);var _,x;if("x"===u||"y"===u){var w="x"===u?0:1;_=Math.abs(p[w]-y[w]),x=Math.abs(p[w]-v[w])}else _=kf(p,y),x=kf(p,v);m=x/(x+_),Fw(Ww,p,Hw,-l*(1-m))}Rw(Gw,Gw,s),Nw(Gw,Gw,o),Rw(Ww,Ww,s),Nw(Ww,Ww,o),t.bezierCurveTo(Gw[0],Gw[1],Ww[0],Ww[1],p[0],p[1]),Fw(Gw,p,Hw,l*m)}else t.lineTo(p[0],p[1]);c=d,d+=a}return f}function Uc(t,e){var n=[1/0,1/0],i=[-1/0,-1/0];if(e)for(var r=0;ri[0]&&(i[0]=a[0]),a[1]>i[1]&&(i[1]=a[1])}return{min:e?n:i,max:e?i:n}}function Zc(t,e){if(t.length===e.length){for(var n=0;ne[0]?1:-1;e[0]+=i*n,e[1]-=i*n}return e}function Qc(t,e,n){if(!n.valueDim)return[];for(var i=[],r=0,a=e.count();a>r;r++)i.push(Gc(n,t,e,r));return i}function Jc(t,e,n,i){var r=Kc(t.getAxis("x")),a=Kc(t.getAxis("y")),o=t.getBaseAxis().isHorizontal(),s=Math.min(r[0],r[1]),l=Math.min(a[0],a[1]),u=Math.max(r[0],r[1])-s,h=Math.max(a[0],a[1])-l;if(n)s-=.5,u+=.5,l-=.5,h+=.5;else{var c=i.get("lineStyle.width")||2,d=i.get("clipOverflow")?c/2:Math.max(u,h);o?(l-=d,h+=2*d):(s-=d,u+=2*d)}var f=new qv({shape:{x:s,y:l,width:u,height:h}});return e&&(f.shape[o?"width":"height"]=0,Oa(f,{shape:{width:u,height:h}},i)),f}function td(t,e,n,i){var r=t.getAngleAxis(),a=t.getRadiusAxis(),o=a.getExtent().slice();o[0]>o[1]&&o.reverse();var s=r.getExtent(),l=Math.PI/180;n&&(o[0]-=.5,o[1]+=.5);var u=new Nv({shape:{cx:$a(t.cx,1),cy:$a(t.cy,1),r0:$a(o[0],1),r:$a(o[1],1),startAngle:-s[0]*l,endAngle:-s[1]*l,clockwise:r.inverse}});return e&&(u.shape.endAngle=-s[0]*l,Oa(u,{shape:{endAngle:-s[1]*l}},i)),u}function ed(t,e,n,i){return"polar"===t.type?td(t,e,n,i):Jc(t,e,n,i)}function nd(t,e,n){for(var i=e.getBaseAxis(),r="x"===i.dim||"radius"===i.dim?0:1,a=[],o=0;o=0;a--){var o=n[a].dimension,s=t.dimensions[o],l=t.getDimensionInfo(s);if(i=l&&l.coordDim,"x"===i||"y"===i){r=n[a];break}}if(r){var u=e.getAxis(i),h=p(r.stops,function(t){return{coord:u.toGlobalCoord(u.dataToCoord(t.value)),color:t.color}}),c=h.length,d=r.outerColors.slice();c&&h[0].coord>h[c-1].coord&&(h.reverse(),d.reverse());var g=10,v=h[0].coord-g,m=h[c-1].coord+g,y=m-v;if(.001>y)return"transparent";f(h,function(t){t.offset=(t.coord-v)/y}),h.push({offset:c?h[c-1].offset:.5,color:d[1]||"transparent"}),h.unshift({offset:c?h[0].offset:.5,color:d[0]||"transparent"});var _=new tm(0,0,0,0,h,!0);return _[i]=v,_[i+"2"]=m,_}}}function rd(t,e,n){var i=t.get("showAllSymbol"),r="auto"===i;if(!i||r){var a=n.getAxesByScale("ordinal")[0];if(a&&(!r||!ad(a,e))){var o=e.mapDimension(a.dim),s={};return f(a.getViewLabels(),function(t){s[t.tickValue]=1}),function(t){return!s.hasOwnProperty(e.get(o,t))}}}}function ad(t,e){var n=t.getExtent(),i=Math.abs(n[1]-n[0])/t.scale.count();isNaN(i)&&(i=0);for(var r=e.count(),a=Math.max(1,Math.round(r/5)),o=0;r>o;o+=a)if(1.5*Ac.getSymbolSize(e,o)[t.isHorizontal()?1:0]>i)return!1;return!0}function od(t,e,n,i){var r=e.getData(),a=this.dataIndex,o=r.getName(a),s=e.get("selectedOffset");i.dispatchAction({type:"pieToggleSelect",from:t,name:o,seriesId:e.id}),r.each(function(t){sd(r.getItemGraphicEl(t),r.getItemLayout(t),e.isSelected(r.getName(t)),s,n)})}function sd(t,e,n,i,r){var a=(e.startAngle+e.endAngle)/2,o=Math.cos(a),s=Math.sin(a),l=n?i:0,u=[o*l,s*l];r?t.animate().when(200,{position:u}).start("bounceOut"):t.attr("position",u)}function ld(t,e){function n(){a.ignore=a.hoverIgnore,o.ignore=o.hoverIgnore}function i(){a.ignore=a.normalIgnore,o.ignore=o.normalIgnore}bp.call(this);var r=new Nv({z2:2}),a=new Wv,o=new Bv;this.add(r),this.add(a),this.add(o),this.updateData(t,e,!0),this.on("emphasis",n).on("normal",i).on("mouseover",n).on("mouseout",i)}function ud(t,e,n,i,r,a,o){function s(e,n,i){for(var r=e;n>r;r++)if(t[r].y+=i,r>e&&n>r+1&&t[r+1].y>t[r].y+t[r].height)return void l(r,i/2);l(n-1,i/2)}function l(e,n){for(var i=e;i>=0&&(t[i].y-=n,!(i>0&&t[i].y>t[i-1].y+t[i-1].height));i--);}function u(t,e,n,i,r,a){for(var o=a>0?e?Number.MAX_VALUE:0:e?Number.MAX_VALUE:0,s=0,l=t.length;l>s;s++){var u=Math.abs(t[s].y-i),h=t[s].len,c=t[s].len2,d=r+h>u?Math.sqrt((r+h+c)*(r+h+c)-u*u):Math.abs(t[s].x-n); e&&d>=o&&(d=o-10),!e&&o>=d&&(d=o+10),t[s].x=n+d*a,o=d}}t.sort(function(t,e){return t.y-e.y});for(var h,c=0,d=t.length,f=[],p=[],g=0;d>g;g++)h=t[g].y-c,0>h&&s(g,d,-h,r),c=t[g].y+t[g].height;0>o-c&&l(d-1,c-o);for(var g=0;d>g;g++)t[g].y>=n?p.push(t[g]):f.push(t[g]);u(f,!1,e,n,i,r),u(p,!0,e,n,i,r)}function hd(t,e,n,i,r,a){for(var o=[],s=[],l=0;l=f&&((o>f||d>=0&&0>s)&&(o=f,s=d,r=l,a.length=0),xb(u,function(t){a.push({seriesIndex:e.seriesIndex,dataIndexInside:t,dataIndex:e.getData().getRawIndex(t)})}))}}),{payloadBatch:a,snapToValue:r}}function xd(t,e,n,i){t[e.key]={value:n,payloadBatch:i}}function wd(t,e,n,i){var r=n.payloadBatch,a=e.axis,o=a.model,s=e.axisPointerModel;if(e.triggerTooltip&&r.length){var l=e.coordSys.model,u=Ic(l),h=t.map[u];h||(h=t.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},t.list.push(h)),h.dataByAxis.push({axisDim:a.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:i,valueLabelOpt:{precision:s.get("label.precision"),formatter:s.get("label.formatter")},seriesDataIndices:r.slice()})}}function bd(t,e,n){var i=n.axesInfo=[];xb(e,function(e,n){var r=e.axisPointerModel.option,a=t[n];a?(!e.useHandle&&(r.status="show"),r.value=a.value,r.seriesDataIndices=(a.payloadBatch||[]).slice()):!e.useHandle&&(r.status="hide"),"show"===r.status&&i.push({axisDim:e.axis.dim,axisIndex:e.axis.model.componentIndex,value:r.value})})}function Sd(t,e,n,i){if(Cd(e)||!t.list.length)return void i({type:"hideTip"});var r=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};i({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:r.dataIndexInside,dataIndex:r.dataIndex,seriesIndex:r.seriesIndex,dataByCoordSys:t.list})}function Md(t,e,n){var i=n.getZr(),r="axisPointerLastHighlights",a=bb(i)[r]||{},o=bb(i)[r]={};xb(t,function(t){var e=t.axisPointerModel.option;"show"===e.status&&xb(e.seriesDataIndices,function(t){var e=t.seriesIndex+" | "+t.dataIndex;o[e]=t})});var s=[],l=[];f(a,function(t,e){!o[e]&&l.push(t)}),f(o,function(t,e){!a[e]&&s.push(t)}),l.length&&n.dispatchAction({type:"downplay",escapeConnect:!0,batch:l}),s.length&&n.dispatchAction({type:"highlight",escapeConnect:!0,batch:s})}function Id(t,e){for(var n=0;n<(t||[]).length;n++){var i=t[n];if(e.axis.dim===i.axisDim&&e.axis.model.componentIndex===i.axisIndex)return i}}function Td(t){var e=t.axis.model,n={},i=n.axisDim=t.axis.dim;return n.axisIndex=n[i+"AxisIndex"]=e.componentIndex,n.axisName=n[i+"AxisName"]=e.name,n.axisId=n[i+"AxisId"]=e.id,n}function Cd(t){return!t||null==t[0]||isNaN(t[0])||null==t[1]||isNaN(t[1])}function Dd(t,e,n){if(!df.node){var i=e.getZr();Mb(i).records||(Mb(i).records={}),Ad(i,e);var r=Mb(i).records[t]||(Mb(i).records[t]={});r.handler=n}}function Ad(t,e){function n(n,i){t.on(n,function(n){var r=Od(e);Ib(Mb(t).records,function(t){t&&i(t,n,r.dispatchAction)}),kd(r.pendings,e)})}Mb(t).initialized||(Mb(t).initialized=!0,n("click",_(Ld,"click")),n("mousemove",_(Ld,"mousemove")),n("globalout",Pd))}function kd(t,e){var n,i=t.showTip.length,r=t.hideTip.length;i?n=t.showTip[i-1]:r&&(n=t.hideTip[r-1]),n&&(n.dispatchAction=null,e.dispatchAction(n))}function Pd(t,e,n){t.handler("leave",null,n)}function Ld(t,e,n,i){e.handler(t,n,i)}function Od(t){var e={showTip:[],hideTip:[]},n=function(i){var r=e[i.type];r?r.push(i):(i.dispatchAction=n,t.dispatchAction(i))};return{dispatchAction:n,pendings:e}}function Bd(t,e){if(!df.node){var n=e.getZr(),i=(Mb(n).records||{})[t];i&&(Mb(n).records[t]=null)}}function Ed(){}function zd(t,e,n,i){Rd(Cb(n).lastProp,i)||(Cb(n).lastProp=i,e?La(n,i,t):(n.stopAnimation(),n.attr(i)))}function Rd(t,e){if(S(t)&&S(e)){var n=!0;return f(e,function(e,i){n=n&&Rd(t[i],e)}),!!n}return t===e}function Nd(t,e){t[e.get("label.show")?"show":"hide"]()}function Fd(t){return{position:t.position.slice(),rotation:t.rotation||0}}function Vd(t,e,n){var i=e.get("z"),r=e.get("zlevel");t&&t.traverse(function(t){"group"!==t.type&&(null!=i&&(t.z=i),null!=r&&(t.zlevel=r),t.silent=n)})}function Hd(t){var e,n=t.get("type"),i=t.getModel(n+"Style");return"line"===n?(e=i.getLineStyle(),e.fill=null):"shadow"===n&&(e=i.getAreaStyle(),e.stroke=null),e}function Gd(t,e,n,i,r){var a=n.get("value"),o=Xd(a,e.axis,e.ecModel,n.get("seriesDataIndices"),{precision:n.get("label.precision"),formatter:n.get("label.formatter")}),s=n.getModel("label"),l=Sm(s.get("padding")||0),u=s.getFont(),h=Rn(o,u),c=r.position,d=h.width+l[1]+l[3],f=h.height+l[0]+l[2],p=r.align;"right"===p&&(c[0]-=d),"center"===p&&(c[0]-=d/2);var g=r.verticalAlign;"bottom"===g&&(c[1]-=f),"middle"===g&&(c[1]-=f/2),Wd(c,d,f,i);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:o,textFont:u,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 Wd(t,e,n,i){var r=i.getWidth(),a=i.getHeight();t[0]=Math.min(t[0]+e,r)-e,t[1]=Math.min(t[1]+n,a)-n,t[0]=Math.max(t[0],0),t[1]=Math.max(t[1],0)}function Xd(t,e,n,i,r){t=e.scale.parse(t);var a=e.scale.getLabel(t,{precision:r.precision}),o=r.formatter;if(o){var s={value:hh(e,t),seriesData:[]};f(i,function(t){var e=n.getSeriesByIndex(t.seriesIndex),i=t.dataIndexInside,r=e&&e.getDataParams(i);r&&s.seriesData.push(r)}),b(o)?a=o.replace("{value}",a):w(o)&&(a=o(s))}return a}function Yd(t,e,n){var i=Me();return Ae(i,i,n.rotation),De(i,i,n.position),Ea([t.dataToCoord(e),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],i)}function qd(t,e,n,i,r,a){var o=_w.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=r.get("label.margin"),Gd(e,i,r,a,{position:Yd(i.axis,t,n),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function jd(t,e,n){return n=n||0,{x1:t[n],y1:t[1-n],x2:e[n],y2:e[1-n]}}function Ud(t,e,n){return n=n||0,{x:t[n],y:t[1-n],width:e[n],height:e[1-n]}}function Zd(t,e){var n={};return n[e.dim+"AxisIndex"]=e.index,t.getCartesian(n)}function $d(t){return"x"===t.dim?0:1}function Kd(t){var e="cubic-bezier(0.23, 1, 0.32, 1)",n="left "+t+"s "+e+",top "+t+"s "+e;return p(Bb,function(t){return t+"transition:"+n}).join(";")}function Qd(t){var e=[],n=t.get("fontSize"),i=t.getTextColor();return i&&e.push("color:"+i),e.push("font:"+t.getFont()),n&&e.push("line-height:"+Math.round(3*n/2)+"px"),Lb(["decoration","align"],function(n){var i=t.get(n);i&&e.push("text-"+n+":"+i)}),e.join(";")}function Jd(t){var e=[],n=t.get("transitionDuration"),i=t.get("backgroundColor"),r=t.getModel("textStyle"),a=t.get("padding");return n&&e.push(Kd(n)),i&&(df.canvasSupported?e.push("background-Color:"+i):(e.push("background-Color:#"+Ze(i)),e.push("filter:alpha(opacity=70)"))),Lb(["width","color","radius"],function(n){var i="border-"+n,r=Ob(i),a=t.get(r);null!=a&&e.push(i+":"+a+("color"===n?"":"px"))}),e.push(Qd(r)),null!=a&&e.push("padding:"+Sm(a).join("px ")+"px"),e.join(";")+";"}function tf(t,e){if(df.wxa)return null;var n=document.createElement("div"),i=this._zr=e.getZr();this.el=n,this._x=e.getWidth()/2,this._y=e.getHeight()/2,t.appendChild(n),this._container=t,this._show=!1,this._hideTimeout;var r=this;n.onmouseenter=function(){r._enterable&&(clearTimeout(r._hideTimeout),r._show=!0),r._inContent=!0},n.onmousemove=function(e){if(e=e||window.event,!r._enterable){var n=i.handler;ge(t,e,!0),n.dispatch("mousemove",e)}},n.onmouseleave=function(){r._enterable&&r._show&&r.hideLater(r._hideDelay),r._inContent=!1}}function ef(t){this._zr=t.getZr(),this._show=!1,this._hideTimeout}function nf(t){for(var e=t.pop();t.length;){var n=t.pop();n&&(Ha.isInstance(n)&&(n=n.get("tooltip",!0)),"string"==typeof n&&(n={formatter:n}),e=new Ha(n,e,e.ecModel))}return e}function rf(t,e){return t.dispatchAction||y(e.dispatchAction,e)}function af(t,e,n,i,r,a,o){var s=n.getOuterSize(),l=s.width,u=s.height;return null!=a&&(t+l+a>i?t-=l+a:t+=a),null!=o&&(e+u+o>r?e-=u+o:e+=o),[t,e]}function of(t,e,n,i,r){var a=n.getOuterSize(),o=a.width,s=a.height;return t=Math.min(t+o,i)-o,e=Math.min(e+s,r)-s,t=Math.max(t,0),e=Math.max(e,0),[t,e]}function sf(t,e,n){var i=n[0],r=n[1],a=5,o=0,s=0,l=e.width,u=e.height;switch(t){case"inside":o=e.x+l/2-i/2,s=e.y+u/2-r/2;break;case"top":o=e.x+l/2-i/2,s=e.y-r-a;break;case"bottom":o=e.x+l/2-i/2,s=e.y+u+a;break;case"left":o=e.x-i-a,s=e.y+u/2-r/2;break;case"right":o=e.x+l+a,s=e.y+u/2-r/2}return[o,s]}function lf(t){return"center"===t||"middle"===t}var uf=2311,hf=function(){return uf++},cf={};cf="object"==typeof wx&&"function"==typeof wx.getSystemInfoSync?{browser:{},os:{},node:!1,wxa:!0,canvasSupported:!0,svgSupported:!1,touchEventsSupported:!0,domSupported:!1}:"undefined"==typeof document&&"undefined"!=typeof self?{browser:{},os:{},node:!1,worker:!0,canvasSupported:!0,domSupported:!1}:"undefined"==typeof navigator?{browser:{},os:{},node:!0,worker:!1,canvasSupported:!0,svgSupported:!0,domSupported:!1}:e(navigator.userAgent);var df=cf,ff={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1,"[object Canvas]":1},pf={"[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},gf=Object.prototype.toString,vf=Array.prototype,mf=vf.forEach,yf=vf.filter,_f=vf.slice,xf=vf.map,wf=vf.reduce,bf={},Sf=function(){return bf.createCanvas()};bf.createCanvas=function(){return document.createElement("canvas")};var Mf,If="__ec_primitive__";R.prototype={constructor:R,get:function(t){return this.data.hasOwnProperty(t)?this.data[t]:null},set:function(t,e){return this.data[t]=e},each:function(t,e){void 0!==e&&(t=y(t,e));for(var n in this.data)this.data.hasOwnProperty(n)&&t(this.data[n],n)},removeKey:function(t){delete this.data[t]}};var Tf=(Object.freeze||Object)({$override:n,clone:i,merge:r,mergeAll:a,extend:o,defaults:s,createCanvas:Sf,getContext:l,indexOf:u,inherits:h,mixin:c,isArrayLike:d,each:f,map:p,reduce:g,filter:v,find:m,bind:y,curry:_,isArray:x,isFunction:w,isString:b,isObject:S,isBuiltInObject:M,isTypedArray:I,isDom:T,eqNaN:C,retrieve:D,retrieve2:A,retrieve3:k,slice:P,normalizeCssArray:L,assert:O,trim:B,setAsPrimitive:E,isPrimitive:z,createHashMap:N,concatArray:F,noop:V}),Cf="undefined"==typeof Float32Array?Array:Float32Array,Df=U,Af=Z,kf=ee,Pf=ne,Lf=(Object.freeze||Object)({create:H,copy:G,clone:W,set:X,add:Y,scaleAndAdd:q,sub:j,len:U,length:Df,lenSquare:Z,lengthSquare:Af,mul:$,div:K,dot:Q,scale:J,normalize:te,distance:ee,dist:kf,distanceSquare:ne,distSquare:Pf,negate:ie,lerp:re,applyTransform:ae,min:oe,max:se});le.prototype={constructor:le,_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(ue(e,t),"dragstart",t.event))},_drag:function(t){var e=this._draggingTarget;if(e){var n=t.offsetX,i=t.offsetY,r=n-this._x,a=i-this._y;this._x=n,this._y=i,e.drift(r,a,t),this.dispatchToElement(ue(e,t),"drag",t.event);var o=this.findHover(n,i,e).target,s=this._dropTarget;this._dropTarget=o,e!==o&&(s&&o!==s&&this.dispatchToElement(ue(s,t),"dragleave",t.event),o&&o!==s&&this.dispatchToElement(ue(o,t),"dragenter",t.event))}},_dragEnd:function(t){var e=this._draggingTarget;e&&(e.dragging=!1),this.dispatchToElement(ue(e,t),"dragend",t.event),this._dropTarget&&this.dispatchToElement(ue(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null}};var Of=Array.prototype.slice,Bf=function(t){this._$handlers={},this._$eventProcessor=t};Bf.prototype={constructor:Bf,one:function(t,e,n,i){return ce(this,t,e,n,i,!0)},on:function(t,e,n,i){return ce(this,t,e,n,i,!1)},isSilent:function(t){var e=this._$handlers;return!e[t]||!e[t].length},off:function(t,e){var n=this._$handlers;if(!t)return this._$handlers={},this;if(e){if(n[t]){for(var i=[],r=0,a=n[t].length;a>r;r++)n[t][r].h!==e&&i.push(n[t][r]);n[t]=i}n[t]&&0===n[t].length&&delete n[t]}else delete n[t];return this},trigger:function(t){var e=this._$handlers[t],n=this._$eventProcessor;if(e){var i=arguments,r=i.length;r>3&&(i=Of.call(i,1));for(var a=e.length,o=0;a>o;){var s=e[o];if(n&&n.filter&&null!=s.query&&!n.filter(t,s.query))o++;else{switch(r){case 1:s.h.call(s.ctx);break;case 2:s.h.call(s.ctx,i[1]);break;case 3:s.h.call(s.ctx,i[1],i[2]);break;default:s.h.apply(s.ctx,i)}s.one?(e.splice(o,1),a--):o++}}}return n&&n.afterTrigger&&n.afterTrigger(t),this},triggerWithContext:function(t){var e=this._$handlers[t],n=this._$eventProcessor;if(e){var i=arguments,r=i.length;r>4&&(i=Of.call(i,1,i.length-1));for(var a=i[i.length-1],o=e.length,s=0;o>s;){var l=e[s];if(n&&n.filter&&null!=l.query&&!n.filter(t,l.query))s++;else{switch(r){case 1:l.h.call(a);break;case 2:l.h.call(a,i[1]);break;case 3:l.h.call(a,i[1],i[2]);break;default:l.h.apply(a,i)}l.one?(e.splice(s,1),o--):s++}}}return n&&n.afterTrigger&&n.afterTrigger(t),this}};var Ef="undefined"!=typeof window&&!!window.addEventListener,zf=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Rf=Ef?function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0}:function(t){t.returnValue=!1,t.cancelBubble=!0},Nf=function(){this._track=[]};Nf.prototype={constructor:Nf,recognize:function(t,e,n){return this._doTrack(t,e,n),this._recognize(t)},clear:function(){return this._track.length=0,this},_doTrack:function(t,e,n){var i=t.touches;if(i){for(var r={points:[],touches:[],target:e,event:t},a=0,o=i.length;o>a;a++){var s=i[a],l=fe(n,s,{});r.points.push([l.zrX,l.zrY]),r.touches.push(s)}this._track.push(r)}},_recognize:function(t){for(var e in Ff)if(Ff.hasOwnProperty(e)){var n=Ff[e](this._track,t);if(n)return n}}};var Ff={pinch:function(t,e){var n=t.length;if(n){var i=(t[n-1]||{}).points,r=(t[n-2]||{}).points||i;if(r&&r.length>1&&i&&i.length>1){var a=ye(i)/ye(r);!isFinite(a)&&(a=1),e.pinchScale=a;var o=_e(i);return e.pinchX=o[0],e.pinchY=o[1],{type:"pinch",target:t[0].target,event:e}}}}},Vf="silent";be.prototype.dispose=function(){};var Hf=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],Gf=function(t,e,n,i){Bf.call(this),this.storage=t,this.painter=e,this.painterRoot=i,n=n||new be,this.proxy=null,this._hovered={},this._lastTouchMoment,this._lastX,this._lastY,this._gestureMgr,le.call(this),this.setHandlerProxy(n)};Gf.prototype={constructor:Gf,setHandlerProxy:function(t){this.proxy&&this.proxy.dispose(),t&&(f(Hf,function(e){t.on&&t.on(e,this[e],this)},this),t.handler=this),this.proxy=t},mousemove:function(t){var e=t.zrX,n=t.zrY,i=this._hovered,r=i.target;r&&!r.__zr&&(i=this.findHover(i.x,i.y),r=i.target);var a=this._hovered=this.findHover(e,n),o=a.target,s=this.proxy;s.setCursor&&s.setCursor(o?o.cursor:"default"),r&&o!==r&&this.dispatchToElement(i,"mouseout",t),this.dispatchToElement(a,"mousemove",t),o&&o!==r&&this.dispatchToElement(a,"mouseover",t)},mouseout:function(t){this.dispatchToElement(this._hovered,"mouseout",t);var e,n=t.toElement||t.relatedTarget;do n=n&&n.parentNode;while(n&&9!==n.nodeType&&!(e=n===this.painterRoot));!e&&this.trigger("globalout",{event:t})},resize:function(){this._hovered={}},dispatch:function(t,e){var n=this[t];n&&n.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,n){t=t||{};var i=t.target;if(!i||!i.silent){for(var r="on"+e,a=xe(e,t,n);i&&(i[r]&&(a.cancelBubble=i[r].call(i,a)),i.trigger(e,a),i=i.parent,!a.cancelBubble););a.cancelBubble||(this.trigger(e,a),this.painter&&this.painter.eachOtherLayer(function(t){"function"==typeof t[r]&&t[r].call(t,a),t.trigger&&t.trigger(e,a)}))}},findHover:function(t,e,n){for(var i=this.storage.getDisplayList(),r={x:t,y:e},a=i.length-1;a>=0;a--){var o;if(i[a]!==n&&!i[a].ignore&&(o=Se(i[a],t,e))&&(!r.topTarget&&(r.topTarget=i[a]),o!==Vf)){r.target=i[a];break}}return r},processGesture:function(t,e){this._gestureMgr||(this._gestureMgr=new Nf);var n=this._gestureMgr;"start"===e&&n.clear();var i=n.recognize(t,this.findHover(t.zrX,t.zrY,null).target,this.proxy.dom);if("end"===e&&n.clear(),i){var r=i.type;t.gestureEvent=r,this.dispatchToElement({target:i.target},r,i.event)}}},f(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(t){Gf.prototype[t]=function(e){var n=this.findHover(e.zrX,e.zrY),i=n.target;if("mousedown"===t)this._downEl=i,this._downPoint=[e.zrX,e.zrY],this._upEl=i;else if("mouseup"===t)this._upEl=i;else if("click"===t){if(this._downEl!==this._upEl||!this._downPoint||kf(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(n,t,e)}}),c(Gf,Bf),c(Gf,le);var Wf="undefined"==typeof Float32Array?Array:Float32Array,Xf=(Object.freeze||Object)({create:Me,identity:Ie,copy:Te,mul:Ce,translate:De,rotate:Ae,scale:ke,invert:Pe,clone:Le}),Yf=Ie,qf=5e-5,jf=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},Uf=jf.prototype;Uf.transform=null,Uf.needLocalTransform=function(){return Oe(this.rotation)||Oe(this.position[0])||Oe(this.position[1])||Oe(this.scale[0]-1)||Oe(this.scale[1]-1)};var Zf=[];Uf.updateTransform=function(){var t=this.parent,e=t&&t.transform,n=this.needLocalTransform(),i=this.transform;if(!n&&!e)return void(i&&Yf(i));i=i||Me(),n?this.getLocalTransform(i):Yf(i),e&&(n?Ce(i,t.transform,i):Te(i,t.transform)),this.transform=i;var r=this.globalScaleRatio;if(null!=r&&1!==r){this.getGlobalScale(Zf);var a=Zf[0]<0?-1:1,o=Zf[1]<0?-1:1,s=((Zf[0]-a)*r+a)/Zf[0]||0,l=((Zf[1]-o)*r+o)/Zf[1]||0;i[0]*=s,i[1]*=s,i[2]*=l,i[3]*=l}this.invTransform=this.invTransform||Me(),Pe(this.invTransform,i)},Uf.getLocalTransform=function(t){return jf.getLocalTransform(this,t)},Uf.setTransform=function(t){var e=this.transform,n=t.dpr||1;e?t.setTransform(n*e[0],n*e[1],n*e[2],n*e[3],n*e[4],n*e[5]):t.setTransform(n,0,0,n,0,0)},Uf.restoreTransform=function(t){var e=t.dpr||1;t.setTransform(e,0,0,e,0,0)};var $f=[],Kf=Me();Uf.setLocalTransform=function(t){if(t){var e=t[0]*t[0]+t[1]*t[1],n=t[2]*t[2]+t[3]*t[3],i=this.position,r=this.scale;Oe(e-1)&&(e=Math.sqrt(e)),Oe(n-1)&&(n=Math.sqrt(n)),t[0]<0&&(e=-e),t[3]<0&&(n=-n),i[0]=t[4],i[1]=t[5],r[0]=e,r[1]=n,this.rotation=Math.atan2(-t[1]/n,t[0]/e)}},Uf.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(Ce($f,t.invTransform,e),e=$f);var n=this.origin;n&&(n[0]||n[1])&&(Kf[4]=n[0],Kf[5]=n[1],Ce($f,e,Kf),$f[4]-=n[0],$f[5]-=n[1],e=$f),this.setLocalTransform(e)}},Uf.getGlobalScale=function(t){var e=this.transform;return t=t||[],e?(t[0]=Math.sqrt(e[0]*e[0]+e[1]*e[1]),t[1]=Math.sqrt(e[2]*e[2]+e[3]*e[3]),e[0]<0&&(t[0]=-t[0]),e[3]<0&&(t[1]=-t[1]),t):(t[0]=1,t[1]=1,t)},Uf.transformCoordToLocal=function(t,e){var n=[t,e],i=this.invTransform;return i&&ae(n,n,i),n},Uf.transformCoordToGlobal=function(t,e){var n=[t,e],i=this.transform;return i&&ae(n,n,i),n},jf.getLocalTransform=function(t,e){e=e||[],Yf(e);var n=t.origin,i=t.scale||[1,1],r=t.rotation||0,a=t.position||[0,0];return n&&(e[4]-=n[0],e[5]-=n[1]),ke(e,e,i),r&&Ae(e,e,r),n&&(e[4]+=n[0],e[5]+=n[1]),e[4]+=a[0],e[5]+=a[1],e};var Qf={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,n=.1,i=.4;return 0===t?0:1===t?1:(!n||1>n?(n=1,e=i/4):e=i*Math.asin(1/n)/(2*Math.PI),-(n*Math.pow(2,10*(t-=1))*Math.sin(2*(t-e)*Math.PI/i)))},elasticOut:function(t){var e,n=.1,i=.4;return 0===t?0:1===t?1:(!n||1>n?(n=1,e=i/4):e=i*Math.asin(1/n)/(2*Math.PI),n*Math.pow(2,-10*t)*Math.sin(2*(t-e)*Math.PI/i)+1)},elasticInOut:function(t){var e,n=.1,i=.4;return 0===t?0:1===t?1:(!n||1>n?(n=1,e=i/4):e=i*Math.asin(1/n)/(2*Math.PI),(t*=2)<1?-.5*n*Math.pow(2,10*(t-=1))*Math.sin(2*(t-e)*Math.PI/i):n*Math.pow(2,-10*(t-=1))*Math.sin(2*(t-e)*Math.PI/i)*.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-Qf.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*Qf.bounceIn(2*t):.5*Qf.bounceOut(2*t-1)+.5}};Be.prototype={constructor:Be,step:function(t,e){if(this._initialized||(this._startTime=t+this._delay,this._initialized=!0),this._paused)return void(this._pausedTime+=e);var n=(t-this._startTime-this._pausedTime)/this._life;if(!(0>n)){n=Math.min(n,1);var i=this.easing,r="string"==typeof i?Qf[i]:i,a="function"==typeof r?r(n):n;return this.fire("frame",a),1===n?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},tp=Jf.prototype;tp.insert=function(t){var e=new ep(t);return this.insertEntry(e),e},tp.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++},tp.remove=function(t){var e=t.prev,n=t.next;e?e.next=n:this.head=n,n?n.prev=e:this.tail=e,t.next=t.prev=null,this._len--},tp.len=function(){return this._len},tp.clear=function(){this.head=this.tail=null,this._len=0};var ep=function(t){this.value=t,this.next,this.prev},np=function(t){this._list=new Jf,this._map={},this._maxSize=t||10,this._lastRemovedEntry=null},ip=np.prototype;ip.put=function(t,e){var n=this._list,i=this._map,r=null;if(null==i[t]){var a=n.len(),o=this._lastRemovedEntry;if(a>=this._maxSize&&a>0){var s=n.head;n.remove(s),delete i[s.key],r=s.value,this._lastRemovedEntry=s}o?o.value=e:o=new ep(e),o.key=t,n.insertEntry(o),i[t]=o}return r},ip.get=function(t){var e=this._map[t],n=this._list;return null!=e?(e!==n.tail&&(n.remove(e),n.insertEntry(e)),e.value):void 0},ip.clear=function(){this._list.clear(),this._map={}};var rp={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]},ap=new np(20),op=null,sp=$e,lp=Ke,up=(Object.freeze||Object)({parse:Ye,lift:Ue,toHex:Ze,fastLerp:$e,fastMapToColor:sp,lerp:Ke,mapToColor:lp,modifyHSL:Qe,modifyAlpha:Je,stringify:tn}),hp=Array.prototype.slice,cp=function(t,e,n,i){this._tracks={},this._target=t,this._loop=e||!1,this._getter=n||en,this._setter=i||nn,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]};cp.prototype={when:function(t,e){var n=this._tracks;for(var i in e)if(e.hasOwnProperty(i)){if(!n[i]){n[i]=[];var r=this._getter(this._target,i);if(null==r)continue;0!==t&&n[i].push({time:0,value:cn(r)})}n[i].push({time:t,value:e[i]})}return this},during:function(t){return this._onframeList.push(t),this},pause:function(){for(var t=0;tn;n++)t[n].call(this)},start:function(t,e){var n,i=this,r=0,a=function(){r--,r||i._doneCallback()};for(var o in this._tracks)if(this._tracks.hasOwnProperty(o)){var s=pn(this,t,a,this._tracks[o],o,e);s&&(this._clipList.push(s),r++,this.animation&&this.animation.addClip(s),n=s)}if(n){var l=n.onframe;n.onframe=function(t,e){l(t,e);for(var n=0;n1&&(gp=function(){for(var t in arguments)console.log(arguments[t])});var vp=gp,mp=function(){this.animators=[]};mp.prototype={constructor:mp,animate:function(t,e){var n,i=!1,r=this,a=this.__zr;if(t){var o=t.split("."),s=r;i="shape"===o[0];for(var l=0,h=o.length;h>l;l++)s&&(s=s[o[l]]);s&&(n=s)}else n=r;if(!n)return void vp('Property "'+t+'" is not existed in element '+r.id);var c=r.animators,d=new cp(n,e);return d.during(function(){r.dirty(i)}).done(function(){c.splice(u(c,d),1)}),c.push(d),a&&a.animation.addAnimator(d),d},stopAnimation:function(t){for(var e=this.animators,n=e.length,i=0;n>i;i++)e[i].stop(t); return e.length=0,this},animateTo:function(t,e,n,i,r,a){gn(this,t,e,n,i,r,a)},animateFrom:function(t,e,n,i,r,a){gn(this,t,e,n,i,r,a,!0)}};var yp=function(t){jf.call(this,t),Bf.call(this,t),mp.call(this,t),this.id=t.id||hf()};yp.prototype={type:"element",name:"",__zr:null,ignore:!1,clipPath:null,isGroup:!1,drift:function(t,e){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0}var n=this.transform;n||(n=this.transform=[1,0,0,1,0,0]),n[4]+=t,n[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 n=this[t];n||(n=this[t]=[]),n[0]=e[0],n[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 n in t)t.hasOwnProperty(n)&&this.attrKV(n,t[n]);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 n=0;ni||n>s||l>a||r>u)},contain:function(t,e){var n=this;return t>=n.x&&t<=n.x+n.width&&e>=n.y&&e<=n.y+n.height},clone:function(){return new yn(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}}},yn.create=function(t){return new yn(t.x,t.y,t.width,t.height)};var bp=function(t){t=t||{},yp.call(this,t);for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);this._children=[],this.__storage=null,this.__dirty=!0};bp.prototype={constructor:bp,isGroup:!0,type:"group",silent:!1,children:function(){return this._children.slice()},childAt:function(t){return this._children[t]},childOfName:function(t){for(var e=this._children,n=0;n=0&&(n.splice(i,0,t),this._doAdd(t))}return this},_doAdd:function(t){t.parent&&t.parent.remove(t),t.parent=this;var e=this.__storage,n=this.__zr;e&&e!==t.__storage&&(e.addToStorage(t),t instanceof bp&&t.addChildrenToStorage(e)),n&&n.refresh()},remove:function(t){var e=this.__zr,n=this.__storage,i=this._children,r=u(i,t);return 0>r?this:(i.splice(r,1),t.parent=null,n&&(n.delFromStorage(t),t instanceof bp&&t.delChildrenFromStorage(n)),e&&e.refresh(),this)},removeAll:function(){var t,e,n=this._children,i=this.__storage;for(e=0;ei;i++)this._updateAndAddDisplayable(e[i],null,t);n.length=this._displayListLen,df.canvasSupported&&Tn(n,Cn)},_updateAndAddDisplayable:function(t,e,n){if(!t.ignore||n){t.beforeUpdate(),t.__dirty&&t.update(),t.afterUpdate();var i=t.clipPath;if(i){e=e?e.slice():[];for(var r=i,a=t;r;)r.parent=a,r.updateTransform(),e.push(r),a=r,r=r.clipPath}if(t.isGroup){for(var o=t._children,s=0;se;e++)this.delRoot(t[e]);else{var r=u(this._roots,t);r>=0&&(this.delFromStorage(t),this._roots.splice(r,1),t instanceof bp&&t.delChildrenFromStorage(this))}},addToStorage:function(t){return t&&(t.__storage=this,t.dirty(!1)),this},delFromStorage:function(t){return t&&(t.__storage=null),this},dispose:function(){this._renderList=this._roots=null},displayableSortFunc:Cn};var Tp={shadowBlur:1,shadowOffsetX:1,shadowOffsetY:1,textShadowBlur:1,textShadowOffsetX:1,textShadowOffsetY:1,textBoxShadowBlur:1,textBoxShadowOffsetX:1,textBoxShadowOffsetY:1},Cp=function(t,e,n){return Tp.hasOwnProperty(e)?n*=t.dpr:n},Dp={NONE:0,STYLE_BIND:1,PLAIN_TEXT:2},Ap=9,kp=[["shadowBlur",0],["shadowOffsetX",0],["shadowOffsetY",0],["shadowColor","#000"],["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]],Pp=function(t){this.extendFrom(t,!1)};Pp.prototype={constructor:Pp,fill:"#000",stroke:null,opacity:1,fillOpacity:null,strokeOpacity:null,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,n){var i=this,r=n&&n.style,a=!r||t.__attrCachedBy!==Dp.STYLE_BIND;t.__attrCachedBy=Dp.STYLE_BIND;for(var o=0;o0},extendFrom:function(t,e){if(t)for(var n in t)!t.hasOwnProperty(n)||e!==!0&&(e===!1?this.hasOwnProperty(n):null==t[n])||(this[n]=t[n])},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,n){for(var i="radial"===e.type?An:Dn,r=i(t,e,n),a=e.colorStops,o=0;o=0&&n.splice(i,1),t.__hoverMir=null},clearHover:function(){for(var t=this._hoverElements,e=0;er;){var a=t[r],o=a.__from;o&&o.__zr?(r++,o.invisible||(a.transform=o.transform,a.invTransform=o.invTransform,a.__clipPaths=o.__clipPaths,this._doPaintEl(a,n,!0,i))):(t.splice(r,1),o.__hoverMir=null,e--)}n.ctx.restore()}},getHoverLayer:function(){return this.getLayer(Kp)},_paintList:function(t,e,n){if(this._redrawId===n){e=e||!1,this._updateLayerStatus(t);var i=this._doPaintList(t,e);if(this._needsManuallyCompositing&&this._compositeManually(),!i){var r=this;Rp(function(){r._paintList(t,e,n)})}}},_compositeManually:function(){var t=this.getLayer(Qp).ctx,e=this._domRoot.width,n=this._domRoot.height;t.clearRect(0,0,e,n),this.eachBuiltinLayer(function(i){i.virtual&&t.drawImage(i.dom,0,0,e,n)})},_doPaintList:function(t,e){for(var n=[],i=0;i15)break}}a.__drawIndex=v,a.__drawIndex0&&t>i[0]){for(o=0;r-1>o&&!(i[o]t);o++);a=n[i[o]]}if(i.splice(o+1,0,t),n[t]=e,!e.virtual)if(a){var l=a.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 n,i,r=this._zlevelList;for(i=0;i0?Jp:0),this._needsManuallyCompositing),o.__builtin__||vp("ZLevel "+s+" has been used by unkown layer "+o.id),o!==r&&(o.__used=!0,o.__startIndex!==n&&(o.__dirty=!0),o.__startIndex=n,o.__drawIndex=o.incremental?-1:n,e(n),r=o),i.__dirty&&(o.__dirty=!0,o.incremental&&o.__drawIndex<0&&(o.__drawIndex=n))}e(n),this.eachBuiltinLayer(function(t){!t.__used&&t.getElementCount()>0&&(t.__dirty=!0,t.__startIndex=t.__endIndex=t.__drawIndex=0),t.__dirty&&t.__drawIndex<0&&(t.__drawIndex=t.__startIndex)})},clear:function(){return this.eachBuiltinLayer(this._clearLayer),this},_clearLayer:function(t){t.clear()},setBackgroundColor:function(t){this._backgroundColor=t},configLayer:function(t,e){if(e){var n=this._layerConfig;n[t]?r(n[t],e,!0):n[t]=e;for(var i=0;i=0&&this._clips.splice(e,1)},removeAnimator:function(t){for(var e=t.getClips(),n=0;no;o++){var s=n[o],l=s.step(t,e);l&&(r.push(l),a.push(s))}for(var o=0;i>o;)n[o]._needsRemove?(n[o]=n[i-1],n.pop(),i--):o++;i=r.length;for(var o=0;i>o;o++)a[o].fire(r[o]);this._time=t,this.onframe(e),this.trigger("frame",e),this.stage.update&&this.stage.update()},_startLoop:function(){function t(){e._running&&(Rp(t),!e._paused&&e._update())}var e=this;this._running=!0,Rp(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=[]},isFinished:function(){return!this._clips.length},animate:function(t,e){e=e||{};var n=new cp(t,e.loop,e.getter,e.setter);return this.addAnimator(n),n}},c(rg,Bf);var ag=300,og=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],sg=["touchstart","touchend","touchmove"],lg={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},ug=p(og,function(t){var e=t.replace("mouse","pointer");return lg[e]?e:t}),hg={mousemove:function(t){t=ge(this.dom,t),this.trigger("mousemove",t)},mouseout:function(t){t=ge(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=ge(this.dom,t),t.zrByTouch=!0,this._lastTouchMoment=new Date,this.handler.processGesture(this,t,"start"),hg.mousemove.call(this,t),hg.mousedown.call(this,t),Ci(this)},touchmove:function(t){t=ge(this.dom,t),t.zrByTouch=!0,this.handler.processGesture(this,t,"change"),hg.mousemove.call(this,t),Ci(this)},touchend:function(t){t=ge(this.dom,t),t.zrByTouch=!0,this.handler.processGesture(this,t,"end"),hg.mouseup.call(this,t),+new Date-this._lastTouchMoment=0||i&&u(i,o)<0)){var s=e.getShallow(o);null!=s&&(r[t[a][0]]=s)}}return r}},Dg=Cg([["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),Ag={getLineStyle:function(t){var e=Dg(this,t),n=this.getLineDash(e.lineWidth);return n&&(e.lineDash=n),e},getLineDash:function(t){null==t&&(t=1);var e=this.get("type"),n=Math.max(t,2),i=4*t;return"solid"===e||null==e?null:"dashed"===e?[i,i]:[n,n]}},kg=Cg([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),Pg={getAreaStyle:function(t,e){return kg(this,t,e)}},Lg=Math.pow,Og=Math.sqrt,Bg=1e-8,Eg=1e-4,zg=Og(3),Rg=1/3,Ng=H(),Fg=H(),Vg=H(),Hg=Math.min,Gg=Math.max,Wg=Math.sin,Xg=Math.cos,Yg=2*Math.PI,qg=H(),jg=H(),Ug=H(),Zg=[],$g=[],Kg={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Qg=[],Jg=[],tv=[],ev=[],nv=Math.min,iv=Math.max,rv=Math.cos,av=Math.sin,ov=Math.sqrt,sv=Math.abs,lv="undefined"!=typeof Float32Array,uv=function(t){this._saveData=!t,this._saveData&&(this.data=[]),this._ctx=null};uv.prototype={constructor:uv,_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/pp/t)||0,this._uy=sv(1/pp/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 n=sv(t-this._xi)>this._ux||sv(e-this._yi)>this._uy||this._len<5;return this.addData(Kg.L,t,e),this._ctx&&n&&(this._needsDash()?this._dashedLineTo(t,e):this._ctx.lineTo(t,e)),n&&(this._xi=t,this._yi=e),this},bezierCurveTo:function(t,e,n,i,r,a){return this.addData(Kg.C,t,e,n,i,r,a),this._ctx&&(this._needsDash()?this._dashedBezierTo(t,e,n,i,r,a):this._ctx.bezierCurveTo(t,e,n,i,r,a)),this._xi=r,this._yi=a,this},quadraticCurveTo:function(t,e,n,i){return this.addData(Kg.Q,t,e,n,i),this._ctx&&(this._needsDash()?this._dashedQuadraticTo(t,e,n,i):this._ctx.quadraticCurveTo(t,e,n,i)),this._xi=n,this._yi=i,this},arc:function(t,e,n,i,r,a){return this.addData(Kg.A,t,e,n,n,i,r-i,0,a?0:1),this._ctx&&this._ctx.arc(t,e,n,i,r,a),this._xi=rv(r)*n+t,this._yi=av(r)*n+e,this},arcTo:function(t,e,n,i,r){return this._ctx&&this._ctx.arcTo(t,e,n,i,r),this},rect:function(t,e,n,i){return this._ctx&&this._ctx.rect(t,e,n,i),this.addData(Kg.R,t,e,n,i),this},closePath:function(){this.addData(Kg.Z);var t=this._ctx,e=this._x0,n=this._y0;return t&&(this._needsDash()&&this._dashedLineTo(e,n),t.closePath()),this._xi=e,this._yi=n,this},fill:function(t){t&&t.fill(),this.toStatic()},stroke:function(t){t&&t.stroke(),this.toStatic()},setLineDash:function(t){if(t instanceof Array){this._lineDash=t,this._dashIdx=0;for(var e=0,n=0;nn;n++)this.data[n]=t[n];this._len=e},appendPath:function(t){t instanceof Array||(t=[t]);for(var e=t.length,n=0,i=this._len,r=0;e>r;r++)n+=t[r].len();lv&&this.data instanceof Float32Array&&(this.data=new Float32Array(i+n));for(var r=0;e>r;r++)for(var a=t[r].data,o=0;oe.length&&(this._expandData(),e=this.data);for(var n=0;na&&(a=r+a),a%=r,f-=a*h,p-=a*c;h>0&&t>=f||0>h&&f>=t||0===h&&(c>0&&e>=p||0>c&&p>=e);)i=this._dashIdx,n=o[i],f+=h*n,p+=c*n,this._dashIdx=(i+1)%g,h>0&&l>f||0>h&&f>l||c>0&&u>p||0>c&&p>u||s[i%2?"moveTo":"lineTo"](h>=0?nv(f,t):iv(f,t),c>=0?nv(p,e):iv(p,e));h=f-t,c=p-e,this._dashOffset=-ov(h*h+c*c)},_dashedBezierTo:function(t,e,n,i,r,a){var o,s,l,u,h,c=this._dashSum,d=this._dashOffset,f=this._lineDash,p=this._ctx,g=this._xi,v=this._yi,m=or,y=0,_=this._dashIdx,x=f.length,w=0;for(0>d&&(d=c+d),d%=c,o=0;1>o;o+=.1)s=m(g,t,n,r,o+.1)-m(g,t,n,r,o),l=m(v,e,i,a,o+.1)-m(v,e,i,a,o),y+=ov(s*s+l*l);for(;x>_&&(w+=f[_],!(w>d));_++);for(o=(w-d)/y;1>=o;)u=m(g,t,n,r,o),h=m(v,e,i,a,o),_%2?p.moveTo(u,h):p.lineTo(u,h),o+=f[_]/y,_=(_+1)%x;_%2!==0&&p.lineTo(r,a),s=r-u,l=a-h,this._dashOffset=-ov(s*s+l*l)},_dashedQuadraticTo:function(t,e,n,i){var r=n,a=i;n=(n+2*t)/3,i=(i+2*e)/3,t=(this._xi+2*t)/3,e=(this._yi+2*e)/3,this._dashedBezierTo(t,e,n,i,r,a)},toStatic:function(){var t=this.data;t instanceof Array&&(t.length=this._len,lv&&(this.data=new Float32Array(t)))},getBoundingRect:function(){Qg[0]=Qg[1]=tv[0]=tv[1]=Number.MAX_VALUE,Jg[0]=Jg[1]=ev[0]=ev[1]=-Number.MAX_VALUE;for(var t=this.data,e=0,n=0,i=0,r=0,a=0;ac;){var d=s[c++];switch(1===c&&(i=s[c],r=s[c+1],e=i,n=r),d){case Kg.M:e=i=s[c++],n=r=s[c++],t.moveTo(i,r);break;case Kg.L:a=s[c++],o=s[c++],(sv(a-i)>l||sv(o-r)>u||c===h-1)&&(t.lineTo(a,o),i=a,r=o);break;case Kg.C:t.bezierCurveTo(s[c++],s[c++],s[c++],s[c++],s[c++],s[c++]),i=s[c-2],r=s[c-1];break;case Kg.Q:t.quadraticCurveTo(s[c++],s[c++],s[c++],s[c++]),i=s[c-2],r=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++],_=s[c++],x=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(_),t.scale(b,S),t.arc(0,0,w,m,I,1-x),t.scale(1/b,1/S),t.rotate(-_),t.translate(-f,-p)):t.arc(f,p,w,m,I,1-x),1===c&&(e=rv(m)*g+f,n=av(m)*v+p),i=rv(I)*g+f,r=av(I)*v+p;break;case Kg.R:e=i=s[c],n=r=s[c+1],t.rect(s[c++],s[c++],s[c++],s[c++]);break;case Kg.Z:t.closePath(),i=e,r=n}}}},uv.CMD=Kg;var hv=2*Math.PI,cv=2*Math.PI,dv=uv.CMD,fv=2*Math.PI,pv=1e-4,gv=[-1,-1,-1],vv=[-1,-1],mv=Ep.prototype.getCanvasPattern,yv=Math.abs,_v=new uv(!0);Rr.prototype={constructor:Rr,type:"path",__dirtyPath:!0,strokeContainThreshold:5,subPixelOptimize:!1,brush:function(t,e){var n=this.style,i=this.path||_v,r=n.hasStroke(),a=n.hasFill(),o=n.fill,s=n.stroke,l=a&&!!o.colorStops,u=r&&!!s.colorStops,h=a&&!!o.image,c=r&&!!s.image;if(n.bind(t,this,e),this.setTransform(t),this.__dirty){var d;l&&(d=d||this.getBoundingRect(),this._fillGradient=n.getGradient(t,o,d)),u&&(d=d||this.getBoundingRect(),this._strokeGradient=n.getGradient(t,s,d))}l?t.fillStyle=this._fillGradient:h&&(t.fillStyle=mv.call(o,t)),u?t.strokeStyle=this._strokeGradient:c&&(t.strokeStyle=mv.call(s,t));var f=n.lineDash,p=n.lineDashOffset,g=!!t.setLineDash,v=this.getGlobalScale();if(i.setScale(v[0],v[1]),this.__dirtyPath||f&&!g&&r?(i.beginPath(t),f&&!g&&(i.setLineDash(f),i.setLineDashOffset(p)),this.buildPath(i,this.shape,!1),this.path&&(this.__dirtyPath=!1)):(t.beginPath(),this.path.rebuildPath(t)),a)if(null!=n.fillOpacity){var m=t.globalAlpha;t.globalAlpha=n.fillOpacity*n.opacity,i.fill(t),t.globalAlpha=m}else i.fill(t);if(f&&g&&(t.setLineDash(f),t.lineDashOffset=p),r)if(null!=n.strokeOpacity){var m=t.globalAlpha;t.globalAlpha=n.strokeOpacity*n.opacity,i.stroke(t),t.globalAlpha=m}else i.stroke(t);f&&g&&t.setLineDash([]),null!=n.text&&(this.restoreTransform(t),this.drawRectText(t,this.getBoundingRect()))},buildPath:function(){},createPathProxy:function(){this.path=new uv},getBoundingRect:function(){var t=this._rect,e=this.style,n=!t;if(n){var i=this.path;i||(i=this.path=new uv),this.__dirtyPath&&(i.beginPath(),this.buildPath(i,this.shape,!1)),t=i.getBoundingRect()}if(this._rect=t,e.hasStroke()){var r=this._rectWithStroke||(this._rectWithStroke=t.clone());if(this.__dirty||n){r.copy(t);var a=e.lineWidth,o=e.strokeNoScale?this.getLineScale():1;e.hasFill()||(a=Math.max(a,this.strokeContainThreshold||4)),o>1e-10&&(r.width+=a/o,r.height+=a/o,r.x-=a/o/2,r.y-=a/o/2)}return r}return t},contain:function(t,e){var n=this.transformCoordToLocal(t,e),i=this.getBoundingRect(),r=this.style;if(t=n[0],e=n[1],i.contain(t,e)){var a=this.path.data;if(r.hasStroke()){var o=r.lineWidth,s=r.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(r.hasFill()||(o=Math.max(o,this.strokeContainThreshold)),zr(a,o/s,t,e)))return!0}if(r.hasFill())return Er(a,t,e)}return!1},dirty:function(t){null==t&&(t=!0),t&&(this.__dirtyPath=t,this._rect=null),this.__dirty=this.__dirtyText=!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):yi.prototype.attrKV.call(this,t,e)},setShape:function(t,e){var n=this.shape;if(n){if(S(t))for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);else n[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}},Rr.extend=function(t){var e=function(e){Rr.call(this,e),t.style&&this.style.extendFrom(t.style,!1);var n=t.shape;if(n){this.shape=this.shape||{};var i=this.shape;for(var r in n)!i.hasOwnProperty(r)&&n.hasOwnProperty(r)&&(i[r]=n[r])}t.init&&t.init.call(this,e)};h(e,Rr);for(var n in t)"style"!==n&&"shape"!==n&&(e.prototype[n]=t[n]);return e},h(Rr,yi);var xv=uv.CMD,wv=[[],[],[]],bv=Math.sqrt,Sv=Math.atan2,Mv=function(t,e){var n,i,r,a,o,s,l=t.data,u=xv.M,h=xv.C,c=xv.L,d=xv.R,f=xv.A,p=xv.Q;for(r=0,a=0;ro;o++){var s=wv[o];s[0]=l[r++],s[1]=l[r++],ae(s,s,e),l[a++]=s[0],l[a++]=s[1]}}},Iv=Math.sqrt,Tv=Math.sin,Cv=Math.cos,Dv=Math.PI,Av=function(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])},kv=function(t,e){return(t[0]*e[0]+t[1]*e[1])/(Av(t)*Av(e))},Pv=function(t,e){return(t[0]*e[1]=11?function(){var e,n=this.__clipPaths,i=this.style;if(n)for(var r=0;ra;a++)r+=ee(t[a-1],t[a]);var o=r/2;o=n>o?n:o;for(var a=0;o>a;a++){var s,l,u,h=a/(o-1)*(e?n:n-1),c=Math.floor(h),d=h-c,f=t[c%n];e?(s=t[(c-1+n)%n],l=t[(c+1)%n],u=t[(c+2)%n]):(s=t[0===c?c:c-1],l=t[c>n-2?n-1:c+1],u=t[c>n-3?n-1:c+2]);var p=d*d,g=d*p;i.push([Xr(s[0],f[0],l[0],u[0],d,p,g),Xr(s[1],f[1],l[1],u[1],d,p,g)])}return i},Hv=function(t,e,n,i){var r,a,o,s,l=[],u=[],h=[],c=[];if(i){o=[1/0,1/0],s=[-1/0,-1/0];for(var d=0,f=t.length;f>d;d++)oe(o,o,t[d]),se(s,s,t[d]);oe(o,o,i[0]),se(s,s,i[1])}for(var d=0,f=t.length;f>d;d++){var p=t[d];if(n)r=t[d?d-1:f-1],a=t[(d+1)%f];else{if(0===d||d===f-1){l.push(W(t[d]));continue}r=t[d-1],a=t[d+1]}j(u,a,r),J(u,u,e);var g=ee(p,r),v=ee(p,a),m=g+v;0!==m&&(g/=m,v/=m),J(h,u,-g),J(c,u,v);var y=Y([],p,h),_=Y([],p,c);i&&(se(y,y,o),oe(y,y,s),se(_,_,o),oe(_,_,s)),l.push(y),l.push(_)}return n&&l.push(l.shift()),l},Gv=Rr.extend({type:"polygon",shape:{points:null,smooth:!1,smoothConstraint:null},buildPath:function(t,e){Yr(t,e,!0)}}),Wv=Rr.extend({type:"polyline",shape:{points:null,smooth:!1,smoothConstraint:null},style:{stroke:"#000",fill:null},buildPath:function(t,e){Yr(t,e,!1)}}),Xv=Math.round,Yv={},qv=Rr.extend({type:"rect",shape:{r:0,x:0,y:0,width:0,height:0},buildPath:function(t,e){var n,i,r,a;this.subPixelOptimize?(jr(Yv,e,this.style),n=Yv.x,i=Yv.y,r=Yv.width,a=Yv.height,Yv.r=e.r,e=Yv):(n=e.x,i=e.y,r=e.width,a=e.height),e.r?Jn(t,e):t.rect(n,i,r,a),t.closePath()}}),jv={},Uv=Rr.extend({type:"line",shape:{x1:0,y1:0,x2:0,y2:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(t,e){var n,i,r,a;this.subPixelOptimize?(qr(jv,e,this.style),n=jv.x1,i=jv.y1,r=jv.x2,a=jv.y2):(n=e.x1,i=e.y1,r=e.x2,a=e.y2);var o=e.percent;0!==o&&(t.moveTo(n,i),1>o&&(r=n*(1-o)+r*o,a=i*(1-o)+a*o),t.lineTo(r,a))},pointAt:function(t){var e=this.shape;return[e.x1*(1-t)+e.x2*t,e.y1*(1-t)+e.y2*t]}}),Zv=[],$v=Rr.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 n=e.x1,i=e.y1,r=e.x2,a=e.y2,o=e.cpx1,s=e.cpy1,l=e.cpx2,u=e.cpy2,h=e.percent;0!==h&&(t.moveTo(n,i),null==l||null==u?(1>h&&(vr(n,o,r,h,Zv),o=Zv[1],r=Zv[2],vr(i,s,a,h,Zv),s=Zv[1],a=Zv[2]),t.quadraticCurveTo(o,s,r,a)):(1>h&&(hr(n,o,l,r,h,Zv),o=Zv[1],l=Zv[2],r=Zv[3],hr(i,s,u,a,h,Zv),s=Zv[1],u=Zv[2],a=Zv[3]),t.bezierCurveTo(o,s,l,u,r,a)))},pointAt:function(t){return Zr(this.shape,t,!1)},tangentAt:function(t){var e=Zr(this.shape,t,!0);return te(e,e)}}),Kv=Rr.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 n=e.cx,i=e.cy,r=Math.max(e.r,0),a=e.startAngle,o=e.endAngle,s=e.clockwise,l=Math.cos(a),u=Math.sin(a);t.moveTo(l*r+n,u*r+i),t.arc(n,i,r,a,o,!s)}}),Qv=Rr.extend({type:"compound",shape:{paths:null},_updatePathDirty:function(){for(var t=this.__dirtyPath,e=this.shape.paths,n=0;n"'])/g,Im={"&":"&","<":"<",">":">",'"':""","'":"'"},Tm=["a","b","c","d","e","f","g"],Cm=function(t,e){return"{"+t+(null==e?"":e)+"}"},Dm=Wn,Am=(Object.freeze||Object)({addCommas:co,toCamelCase:fo,normalizeCssArray:Sm,encodeHTML:po,formatTpl:go,formatTplSimple:vo,getTooltipMarker:mo,formatTime:_o,capitalFirst:xo,truncateText:Dm,getTextBoundingRect:wo,getTextRect:bo}),km=f,Pm=["left","right","top","bottom","width","height"],Lm=[["width","left","right"],["height","top","bottom"]],Om=So,Bm=(_(So,"vertical"),_(So,"horizontal"),{getBoxLayoutParams:function(){return{left:this.get("left"),top:this.get("top"),right:this.get("right"),bottom:this.get("bottom"),width:this.get("width"),height:this.get("height")}}}),Em=Yi(),zm=Ha.extend({type:"component",id:"",name:"",mainType:"",subType:"",componentIndex:0,defaultOption:null,ecModel:null,dependentModels:[],uid:null,layoutMode:null,$constructor:function(t,e,n,i){Ha.call(this,t,e,n,i),this.uid=Xa("ec_cpt_model")},init:function(t,e,n){this.mergeDefaultAndTheme(t,n)},mergeDefaultAndTheme:function(t,e){var n=this.layoutMode,i=n?To(t):{},a=e.getTheme();r(t,a.get(this.mainType)),r(t,this.getDefaultOption()),n&&Io(t,i,n)},mergeOption:function(t){r(this.option,t,!0);var e=this.layoutMode;e&&Io(this.option,t,e)},optionUpdated:function(){},getDefaultOption:function(){var t=Em(this);if(!t.defaultOption){for(var e=[],n=this.constructor;n;){var i=n.prototype.defaultOption;i&&e.push(i),n=n.superClass}for(var a={},o=e.length-1;o>=0;o--)a=r(a,e[o],!0);t.defaultOption=a}return t.defaultOption},getReferringComponents:function(t){return this.ecModel.queryComponents({mainType:t,index:this.get(t+"Index",!0),id:this.get(t+"Id",!0)})}});ir(zm,{registerWhenExtend:!0}),Ya(zm),qa(zm,Do),c(zm,Bm);var Rm="";"undefined"!=typeof navigator&&(Rm=navigator.platform||"");var Nm={color:["#c23531","#2f4554","#61a0a8","#d48265","#91c7ae","#749f83","#ca8622","#bda29a","#6e7074","#546570","#c4ccd3"],gradientColor:["#f6efa6","#d88273","#bf444c"],textStyle:{fontFamily:Rm.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},Fm=Yi(),Vm={clearColorPalette:function(){Fm(this).colorIdx=0,Fm(this).colorNameMap={}},getColorFromPalette:function(t,e,n){e=e||this;var i=Fm(e),r=i.colorIdx||0,a=i.colorNameMap=i.colorNameMap||{};if(a.hasOwnProperty(t))return a[t];var o=zi(this.get("color",!0)),s=this.get("colorLayer",!0),l=null!=n&&s?Ao(s,n):o;if(l=l||o,l&&l.length){var u=l[r];return t&&(a[t]=u),i.colorIdx=(r+1)%l.length,u}}},Hm={cartesian2d:function(t,e,n,i){var r=t.getReferringComponents("xAxis")[0],a=t.getReferringComponents("yAxis")[0];e.coordSysDims=["x","y"],n.set("x",r),n.set("y",a),Po(r)&&(i.set("x",r),e.firstCategoryDimIndex=0),Po(a)&&(i.set("y",a),e.firstCategoryDimIndex=1)},singleAxis:function(t,e,n,i){var r=t.getReferringComponents("singleAxis")[0];e.coordSysDims=["single"],n.set("single",r),Po(r)&&(i.set("single",r),e.firstCategoryDimIndex=0)},polar:function(t,e,n,i){var r=t.getReferringComponents("polar")[0],a=r.findAxisModel("radiusAxis"),o=r.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],n.set("radius",a),n.set("angle",o),Po(a)&&(i.set("radius",a),e.firstCategoryDimIndex=0),Po(o)&&(i.set("angle",o),e.firstCategoryDimIndex=1)},geo:function(t,e){e.coordSysDims=["lng","lat"]},parallel:function(t,e,n,i){var r=t.ecModel,a=r.getComponent("parallel",t.get("parallelIndex")),o=e.coordSysDims=a.dimensions.slice();f(a.parallelAxisIndex,function(t,a){var s=r.getComponent("parallelAxis",t),l=o[a];n.set(l,s),Po(s)&&null==e.firstCategoryDimIndex&&(i.set(l,s),e.firstCategoryDimIndex=a)})}},Gm="original",Wm="arrayRows",Xm="objectRows",Ym="keyedColumns",qm="unknown",jm="typedArray",Um="column",Zm="row";Lo.seriesDataToSource=function(t){return new Lo({data:t,sourceFormat:I(t)?jm:Gm,fromDataset:!1})},tr(Lo);var $m=Yi(),Km="\x00_ec_inner",Qm=Ha.extend({init:function(t,e,n,i){n=n||{},this.option=null,this._theme=new Ha(n),this._optionManager=i},setOption:function(t,e){O(!(Km in t),"please use chart.getOption()"),this._optionManager.setOption(t,e),this.resetOption(null)},resetOption:function(t){var e=!1,n=this._optionManager;if(!t||"recreate"===t){var i=n.mountOption("recreate"===t);this.option&&"recreate"!==t?(this.restoreData(),this.mergeOption(i)):jo.call(this,i),e=!0}if(("timeline"===t||"media"===t)&&this.restoreData(),!t||"recreate"===t||"timeline"===t){var r=n.getTimelineOption(this);r&&(this.mergeOption(r),e=!0)}if(!t||"recreate"===t||"media"===t){var a=n.getMediaOption(this,this._api);a.length&&f(a,function(t){this.mergeOption(t,e=!0)},this)}return e},mergeOption:function(t){function e(e,i){var r=zi(t[e]),s=Vi(a.get(e),r);Hi(s),f(s,function(t){var n=t.option;S(n)&&(t.keyInfo.mainType=e,t.keyInfo.subType=Zo(e,n,t.exist))});var l=Uo(a,i);n[e]=[],a.set(e,[]),f(s,function(t,i){var r=t.exist,s=t.option;if(O(S(s)||r,"Empty component definition"),s){var u=zm.getClass(e,t.keyInfo.subType,!0);if(r&&r instanceof u)r.name=t.keyInfo.name,r.mergeOption(s,this),r.optionUpdated(s,!1);else{var h=o({dependentModels:l,componentIndex:i},t.keyInfo);r=new u(s,this,this,h),o(r,h),r.init(s,this,this,h),r.optionUpdated(null,!0)}}else r.mergeOption({},this),r.optionUpdated({},!1);a.get(e)[i]=r,n[e][i]=r.option},this),"series"===e&&$o(this,a.get("series"))}var n=this.option,a=this._componentsMap,s=[];Eo(this),f(t,function(t,e){null!=t&&(zm.hasClass(e)?e&&s.push(e):n[e]=null==n[e]?i(t):r(n[e],t,!0))}),zm.topologicalTravel(s,zm.getAllClassMainTypes(),e,this),this._seriesIndicesMap=N(this._seriesIndices=this._seriesIndices||[])},getOption:function(){var t=i(this.option);return f(t,function(e,n){if(zm.hasClass(n)){for(var e=zi(e),i=e.length-1;i>=0;i--)Wi(e[i])&&e.splice(i,1);t[n]=e}}),delete t[Km],t},getTheme:function(){return this._theme},getComponent:function(t,e){var n=this._componentsMap.get(t);return n?n[e||0]:void 0},queryComponents:function(t){var e=t.mainType;if(!e)return[];var n=t.index,i=t.id,r=t.name,a=this._componentsMap.get(e);if(!a||!a.length)return[];var o;if(null!=n)x(n)||(n=[n]),o=v(p(n,function(t){return a[t]}),function(t){return!!t});else if(null!=i){var s=x(i);o=v(a,function(t){return s&&u(i,t.id)>=0||!s&&t.id===i})}else if(null!=r){var l=x(r);o=v(a,function(t){return l&&u(r,t.name)>=0||!l&&t.name===r})}else o=a.slice();return Ko(o,t)},findComponents:function(t){function e(t){var e=r+"Index",n=r+"Id",i=r+"Name";return!t||null==t[e]&&null==t[n]&&null==t[i]?null:{mainType:r,index:t[e],id:t[n],name:t[i]}}function n(e){return t.filter?v(e,t.filter):e}var i=t.query,r=t.mainType,a=e(i),o=a?this.queryComponents(a):this._componentsMap.get(r);return n(Ko(o,t))},eachComponent:function(t,e,n){var i=this._componentsMap;if("function"==typeof t)n=e,e=t,i.each(function(t,i){f(t,function(t,r){e.call(n,i,t,r)})});else if(b(t))f(i.get(t),e,n);else if(S(t)){var r=this.findComponents(t);f(r,e,n)}},getSeriesByName:function(t){var e=this._componentsMap.get("series");return v(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 v(e,function(e){return e.subType===t})},getSeries:function(){return this._componentsMap.get("series").slice()},getSeriesCount:function(){return this._componentsMap.get("series").length},eachSeries:function(t,e){f(this._seriesIndices,function(n){var i=this._componentsMap.get("series")[n];t.call(e,i,n)},this)},eachRawSeries:function(t,e){f(this._componentsMap.get("series"),t,e)},eachSeriesByType:function(t,e,n){f(this._seriesIndices,function(i){var r=this._componentsMap.get("series")[i];r.subType===t&&e.call(n,r,i)},this)},eachRawSeriesByType:function(t,e,n){return f(this.getSeriesByType(t),e,n)},isSeriesFiltered:function(t){return null==this._seriesIndicesMap.get(t.componentIndex)},getCurrentSeriesIndices:function(){return(this._seriesIndices||[]).slice()},filterSeries:function(t,e){var n=v(this._componentsMap.get("series"),t,e);$o(this,n)},restoreData:function(t){var e=this._componentsMap;$o(this,e.get("series"));var n=[];e.each(function(t,e){n.push(e)}),zm.topologicalTravel(n,zm.getAllClassMainTypes(),function(n){f(e.get(n),function(e){("series"!==n||!Yo(e,t))&&e.restoreData()})})}});c(Qm,Vm);var Jm=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isDisposed","on","off","getDataURL","getConnectedDataURL","getModel","getOption","getViewOfComponentModel","getViewOfSeriesModel"],ty={};Jo.prototype={constructor:Jo,create:function(t,e){var n=[];f(ty,function(i){var r=i.create(t,e);n=n.concat(r||[])}),this._coordinateSystems=n},update:function(t,e){f(this._coordinateSystems,function(n){n.update&&n.update(t,e)})},getCoordinateSystems:function(){return this._coordinateSystems.slice()}},Jo.register=function(t,e){ty[t]=e},Jo.get=function(t){return ty[t]};var ey=f,ny=i,iy=p,ry=r,ay=/^(min|max)?(.+)$/;ts.prototype={constructor:ts,setOption:function(t,e){t&&f(zi(t.series),function(t){t&&t.data&&I(t.data)&&E(t.data)}),t=ny(t,!0);var n=this._optionBackup,i=es.call(this,t,e,!n);this._newBaseOption=i.baseOption,n?(as(n.baseOption,i.baseOption),i.timelineOptions.length&&(n.timelineOptions=i.timelineOptions),i.mediaList.length&&(n.mediaList=i.mediaList),i.mediaDefault&&(n.mediaDefault=i.mediaDefault)):this._optionBackup=i},mountOption:function(t){var e=this._optionBackup;return this._timelineOptions=iy(e.timelineOptions,ny),this._mediaList=iy(e.mediaList,ny),this._mediaDefault=ny(e.mediaDefault),this._currentMediaIndices=[],ny(t?e.baseOption:this._newBaseOption)},getTimelineOption:function(t){var e,n=this._timelineOptions;if(n.length){var i=t.getComponent("timeline");i&&(e=ny(n[i.getCurrentIndex()],!0))}return e},getMediaOption:function(){var t=this._api.getWidth(),e=this._api.getHeight(),n=this._mediaList,i=this._mediaDefault,r=[],a=[];if(!n.length&&!i)return a;for(var o=0,s=n.length;s>o;o++)ns(n[o].query,t,e)&&r.push(o);return!r.length&&i&&(r=[-1]),r.length&&!rs(r,this._currentMediaIndices)&&(a=iy(r,function(t){return ny(-1===t?i.option:n[t].option)})),this._currentMediaIndices=r,a}};var oy=f,sy=S,ly=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"],uy=function(t,e){oy(ds(t.series),function(t){sy(t)&&cs(t)});var n=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];e&&n.push("valueAxis","categoryAxis","logAxis","timeAxis"),oy(n,function(e){oy(ds(t[e]),function(t){t&&(us(t,"axisLabel"),us(t.axisPointer,"label"))})}),oy(ds(t.parallel),function(t){var e=t&&t.parallelAxisDefault;us(e,"axisLabel"),us(e&&e.axisPointer,"label")}),oy(ds(t.calendar),function(t){ss(t,"itemStyle"),us(t,"dayLabel"),us(t,"monthLabel"),us(t,"yearLabel")}),oy(ds(t.radar),function(t){us(t,"name")}),oy(ds(t.geo),function(t){sy(t)&&(hs(t),oy(ds(t.regions),function(t){hs(t) }))}),oy(ds(t.timeline),function(t){hs(t),ss(t,"label"),ss(t,"itemStyle"),ss(t,"controlStyle",!0);var e=t.data;x(e)&&f(e,function(t){S(t)&&(ss(t,"label"),ss(t,"itemStyle"))})}),oy(ds(t.toolbox),function(t){ss(t,"iconStyle"),oy(t.feature,function(t){ss(t,"iconStyle")})}),us(fs(t.axisPointer),"label"),us(fs(t.tooltip).axisPointer,"label")},hy=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],cy=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],dy=function(t,e){uy(t,e),t.series=zi(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 n=ps(t,"pointer.color");null!=n&&gs(t,"itemStyle.normal.color",n)}vs(t)}}),t.dataRange&&(t.visualMap=t.dataRange),f(cy,function(e){var n=t[e];n&&(x(n)||(n=[n]),f(n,function(t){vs(t)}))})},fy=function(t){var e=N();t.eachSeries(function(t){var n=t.get("stack");if(n){var i=e.get(n)||e.set(n,[]),r=t.getData(),a={stackResultDimension:r.getCalculationInfo("stackResultDimension"),stackedOverDimension:r.getCalculationInfo("stackedOverDimension"),stackedDimension:r.getCalculationInfo("stackedDimension"),stackedByDimension:r.getCalculationInfo("stackedByDimension"),isStackedByIndex:r.getCalculationInfo("isStackedByIndex"),data:r,seriesModel:t};if(!a.stackedDimension||!a.isStackedByIndex&&!a.stackedByDimension)return;i.length&&r.setCalculationInfo("stackedOnSeries",i[i.length-1].seriesModel),i.push(a)}}),e.each(ms)},py=ys.prototype;py.pure=!1,py.persistent=!0,py.getSource=function(){return this._source};var gy={arrayRows_column:{pure:!0,count:function(){return Math.max(0,this._data.length-this._source.startIndex)},getItem:function(t){return this._data[t+this._source.startIndex]},appendData:ws},arrayRows_row:{pure:!0,count:function(){var t=this._data[0];return t?Math.max(0,t.length-this._source.startIndex):0},getItem:function(t){t+=this._source.startIndex;for(var e=[],n=this._data,i=0;i=1)&&(t=1),t}var n=this._upstream,i=t&&t.skip;if(this._dirty&&n){var r=this.context;r.data=r.outputData=n.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var a;this._plan&&!i&&(a=this._plan(this.context));var o=e(this._modBy),s=this._modDataCount||0,l=e(t&&t.modBy),u=t&&t.modDataCount||0;(o!==l||s!==u)&&(a="reset");var h;(this._dirty||"reset"===a)&&(this._dirty=!1,h=ks(this,i)),this._modBy=l,this._modDataCount=u;var c=t&&t.step;if(this._dueEnd=n?n._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var d=this._dueIndex,f=Math.min(null!=c?this._dueIndex+c:1/0,this._dueEnd);if(!i&&(h||f>d)){var p=this._progress;if(x(p))for(var g=0;gi?i++:null}function e(){var t=i%o*r+Math.ceil(i/o),e=i>=n?null:a>t?t:i;return i++,e}var n,i,r,a,o,s={reset:function(l,u,h,c){i=l,n=u,r=h,a=c,o=Math.ceil(a/r),s.next=r>1&&a>0?e:t}};return s}();xy.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},xy.unfinished=function(){return this._progress&&this._dueIndex":"",v=p+s.join(p||", ");return{renderMode:i,content:v,style:u}}function a(t){return{renderMode:i,content:po(co(t)),style:u}}var o=this;i=i||"html";var s="html"===i?"
":"\n",l="richText"===i,u={},h=0,c=this.getData(),d=c.mapDimension("defaultedTooltip",!0),p=d.length,v=this.getRawValue(t),m=x(v),y=c.getItemVisual(t,"color");S(y)&&y.colorStops&&(y=(y.colorStops[0]||{}).color),y=y||"transparent";var _=p>1||m&&!p?r(v):a(p?Is(c,t,d[0]):m?v[0]:v),w=_.content,b=o.seriesIndex+"at"+h,M=mo({color:y,type:"item",renderMode:i,markerId:b});u[b]=y,++h;var I=c.getName(t),T=this.name;Gi(this)||(T=""),T=T?po(T)+(e?": ":s):"";var C="string"==typeof M?M:M.content,D=e?C+T+w:T+C+(I?po(I)+": "+w:w);return{html:D,markers:u}},isAnimationEnabled:function(){if(df.node)return!1;var t=this.getShallow("animation");return t&&this.getData().count()>this.getShallow("animationThreshold")&&(t=!1),t},restoreData:function(){this.dataTask.dirty()},getColorFromPalette:function(t,e,n){var i=this.ecModel,r=Vm.getColorFromPalette.call(this,t,e,n);return r||(r=i.getColorFromPalette(t,e,n)),r},coordDimToDataDim:function(t){return this.getRawData().mapDimension(t,!0)},getProgressive:function(){return this.get("progressive")},getProgressiveThreshold:function(){return this.get("progressiveThreshold")},getAxisTooltipData:null,getTooltipPosition:null,pipeTask:null,preventIncremental:null,pipelineContext:null});c(Sy,_y),c(Sy,Vm);var My=function(){this.group=new bp,this.uid=Xa("viewComponent")};My.prototype={constructor:My,init:function(){},render:function(){},dispose:function(){},filterForExposedEvent:null};var Iy=My.prototype;Iy.updateView=Iy.updateLayout=Iy.updateVisual=function(){},Ji(My),ir(My,{registerWhenExtend:!0});var Ty=function(){var t=Yi();return function(e){var n=t(e),i=e.pipelineContext,r=n.large,a=n.progressiveRender,o=n.large=i.large,s=n.progressiveRender=i.progressiveRender;return!!(r^o||a^s)&&"reset"}},Cy=Yi(),Dy=Ty();Fs.prototype={type:"chart",init:function(){},render:function(){},highlight:function(t,e,n,i){Hs(t.getData(),i,"emphasis")},downplay:function(t,e,n,i){Hs(t.getData(),i,"normal")},remove:function(){this.group.removeAll()},dispose:function(){},incrementalPrepareRender:null,incrementalRender:null,updateTransform:null,filterForExposedEvent:null};var Ay=Fs.prototype;Ay.updateView=Ay.updateLayout=Ay.updateVisual=function(t,e,n,i){this.render(t,e,n,i)},Ji(Fs,["dispose"]),ir(Fs,{registerWhenExtend:!0}),Fs.markUpdateMethod=function(t,e){Cy(t).updateMethod=e};var ky={incrementalPrepareRender:{progress:function(t,e){e.view.incrementalRender(t,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(t,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}},Py="\x00__throttleOriginMethod",Ly="\x00__throttleRate",Oy="\x00__throttleType",By={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var n=t.getData(),i=(t.visualColorAccessPath||"itemStyle.color").split("."),r=t.get(i)||t.getColorFromPalette(t.name,null,e.getSeriesCount());if(n.setVisual("color",r),!e.isSeriesFiltered(t)){"function"!=typeof r||r instanceof Jv||n.each(function(e){n.setItemVisual(e,"color",r(t.getDataParams(e)))});var a=function(t,e){var n=t.getItemModel(e),r=n.get(i,!0);null!=r&&t.setItemVisual(e,"color",r)};return{dataEach:n.hasItemOption?a:null}}}},Ey={toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType},",withoutName:"第{seriesId}个系列是一个{seriesType},",separator:{middle:";",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:",",end:""}}}},zy=function(t,e){function n(t,e){if("string"!=typeof t)return t;var n=t;return f(e,function(t,e){n=n.replace(new RegExp("\\{\\s*"+e+"\\s*\\}","g"),t)}),n}function i(t){var e=o.get(t);if(null==e){for(var n=t.split("."),i=Ey.aria,r=0;rs)){var d=r();l=d?n(i("general.withTitle"),{title:d}):i("general.withoutTitle");var p=[],g=s>1?"series.multiple.prefix":"series.single.prefix";l+=n(i(g),{seriesCount:s}),e.eachSeries(function(t,e){if(c>e){var r,o=t.get("name"),l="series."+(s>1?"multiple":"single")+".";r=i(o?l+"withName":l+"withoutName"),r=n(r,{seriesId:t.seriesIndex,seriesName:t.get("name"),seriesType:a(t.subType)});var h=t.getData();window.data=h,r+=h.count()>u?n(i("data.partialData"),{displayCnt:u}):i("data.allData");for(var d=[],f=0;ff){var g=h.getName(f),v=Is(h,f);d.push(n(i(g?"data.withName":"data.withoutName"),{name:g,value:v}))}r+=d.join(i("data.separator.middle"))+i("data.separator.end"),p.push(r)}}),l+=p.join(i("series.multiple.separator.middle"))+i("series.multiple.separator.end"),t.setAttribute("aria-label",l)}}},Ry=Math.PI,Ny=function(t,e){e=e||{},s(e,{text:"loading",color:"#c23531",textColor:"#000",maskColor:"rgba(255, 255, 255, 0.8)",zlevel:0});var n=new qv({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4}),i=new Kv({shape:{startAngle:-Ry/2,endAngle:-Ry/2+.1,r:10},style:{stroke:e.color,lineCap:"round",lineWidth:5},zlevel:e.zlevel,z:10001}),r=new qv({style:{fill:"none",text:e.text,textPosition:"right",textDistance:10,textFill:e.textColor},zlevel:e.zlevel,z:10001});i.animateShape(!0).when(1e3,{endAngle:3*Ry/2}).start("circularInOut"),i.animateShape(!0).when(1e3,{startAngle:3*Ry/2}).delay(300).start("circularInOut");var a=new bp;return a.add(i),a.add(r),a.add(n),a.resize=function(){var e=t.getWidth()/2,a=t.getHeight()/2;i.setShape({cx:e,cy:a});var o=i.shape.r;r.setShape({x:e-o,y:a-o,width:2*o,height:2*o}),n.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},a.resize(),a},Fy=qs.prototype;Fy.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each(function(t){var e=t.overallTask;e&&e.dirty()})},Fy.getPerformArgs=function(t,e){if(t.__pipeline){var n=this._pipelineMap.get(t.__pipeline.id),i=n.context,r=!e&&n.progressiveEnabled&&(!i||i.progressiveRender)&&t.__idxInPipeline>n.blockIndex,a=r?n.step:null,o=i&&i.modDataCount,s=null!=o?Math.ceil(o/a):null;return{step:a,modBy:s,modDataCount:o}}},Fy.getPipeline=function(t){return this._pipelineMap.get(t)},Fy.updateStreamModes=function(t,e){var n=this._pipelineMap.get(t.uid),i=t.getData(),r=i.count(),a=n.progressiveEnabled&&e.incrementalPrepareRender&&r>=n.threshold,o=t.get("large")&&r>=t.get("largeThreshold"),s="mod"===t.get("progressiveChunkMode")?r:null;t.pipelineContext=n.context={progressiveRender:a,modDataCount:s,large:o}},Fy.restorePipelines=function(t){var e=this,n=e._pipelineMap=N();t.eachSeries(function(t){var i=t.getProgressive(),r=t.uid;n.set(r,{id:r,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:i&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),rl(e,t,t.dataTask)})},Fy.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.ecInstance.getModel(),n=this.api;f(this._allHandlers,function(i){var r=t.get(i.uid)||t.set(i.uid,[]);i.reset&&Us(this,i,r,e,n),i.overallReset&&Zs(this,i,r,e,n)},this)},Fy.prepareView=function(t,e,n,i){var r=t.renderTask,a=r.context;a.model=e,a.ecModel=n,a.api=i,r.__block=!t.incrementalPrepareRender,rl(this,e,r)},Fy.performDataProcessorTasks=function(t,e){js(this,this._dataProcessorHandlers,t,e,{block:!0})},Fy.performVisualTasks=function(t,e,n){js(this,this._visualHandlers,t,e,n)},Fy.performSeriesTasks=function(t){var e;t.eachSeries(function(t){e|=t.dataTask.perform()}),this.unfinished|=e},Fy.plan=function(){this._pipelineMap.each(function(t){var e=t.tail;do{if(e.__block){t.blockIndex=e.__idxInPipeline;break}e=e.getUpstream()}while(e)})};var Vy=Fy.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)},Hy=nl(0);qs.wrapStageHandler=function(t,e){return w(t)&&(t={overallReset:t,seriesType:al(t)}),t.uid=Xa("stageHandler"),e&&(t.visualType=e),t};var Gy,Wy={},Xy={};ol(Wy,Qm),ol(Xy,Qo),Wy.eachSeriesByType=Wy.eachRawSeriesByType=function(t){Gy=t},Wy.eachComponent=function(t){"series"===t.mainType&&t.subType&&(Gy=t.subType)};var Yy=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"],qy={color:Yy,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],Yy]},jy="#eee",Uy=function(){return{axisLine:{lineStyle:{color:jy}},axisTick:{lineStyle:{color:jy}},axisLabel:{textStyle:{color:jy}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:jy}}}},Zy=["#dd6b66","#759aa0","#e69d87","#8dc1a9","#ea7e53","#eedd78","#73a373","#73b9bc","#7289ab","#91ca8c","#f49f42"],$y={color:Zy,backgroundColor:"#333",tooltip:{axisPointer:{lineStyle:{color:jy},crossStyle:{color:jy}}},legend:{textStyle:{color:jy}},textStyle:{color:jy},title:{textStyle:{color:jy}},toolbox:{iconStyle:{normal:{borderColor:jy}}},dataZoom:{textStyle:{color:jy}},visualMap:{textStyle:{color:jy}},timeline:{lineStyle:{color:jy},itemStyle:{normal:{color:Zy[1]}},label:{normal:{textStyle:{color:jy}}},controlStyle:{normal:{color:jy,borderColor:jy}}},timeAxis:Uy(),logAxis:Uy(),valueAxis:Uy(),categoryAxis:Uy(),line:{symbol:"circle"},graph:{color:Zy},gauge:{title:{textStyle:{color:jy}}},candlestick:{itemStyle:{normal:{color:"#FD1050",color0:"#0CF49B",borderColor:"#FD1050",borderColor0:"#0CF49B"}}}};$y.categoryAxis.splitLine.show=!1,zm.extend({type:"dataset",defaultOption:{seriesLayoutBy:Um,sourceHeader:null,dimensions:null,source:null},optionUpdated:function(){Oo(this)}}),My.extend({type:"dataset"});var Ky=Rr.extend({type:"ellipse",shape:{cx:0,cy:0,rx:0,ry:0},buildPath:function(t,e){var n=.5522848,i=e.cx,r=e.cy,a=e.rx,o=e.ry,s=a*n,l=o*n;t.moveTo(i-a,r),t.bezierCurveTo(i-a,r-l,i-s,r-o,i,r-o),t.bezierCurveTo(i+s,r-o,i+a,r-l,i+a,r),t.bezierCurveTo(i+a,r+l,i+s,r+o,i,r+o),t.bezierCurveTo(i-s,r+o,i-a,r+l,i-a,r),t.closePath()}}),Qy=/[\s,]+/;ll.prototype.parse=function(t,e){e=e||{};var n=sl(t);if(!n)throw new Error("Illegal svg");var i=new bp;this._root=i;var r=n.getAttribute("viewBox")||"",a=parseFloat(n.getAttribute("width")||e.width),o=parseFloat(n.getAttribute("height")||e.height);isNaN(a)&&(a=null),isNaN(o)&&(o=null),dl(n,i,null,!0);for(var s=n.firstChild;s;)this._parseNode(s,i),s=s.nextSibling;var l,u;if(r){var h=B(r).split(Qy);h.length>=4&&(l={x:parseFloat(h[0]||0),y:parseFloat(h[1]||0),width:parseFloat(h[2]),height:parseFloat(h[3])})}if(l&&null!=a&&null!=o&&(u=vl(l,a,o),!e.ignoreViewBox)){var c=i;i=new bp,i.add(c),c.scale=u.scale.slice(),c.position=u.position.slice()}return e.ignoreRootClip||null==a||null==o||i.setClipPath(new qv({shape:{x:0,y:0,width:a,height:o}})),{root:i,width:a,height:o,viewBoxRect:l,viewBoxTransform:u}},ll.prototype._parseNode=function(t,e){var n=t.nodeName.toLowerCase();"defs"===n?this._isDefine=!0:"text"===n&&(this._isText=!0);var i;if(this._isDefine){var r=t_[n];if(r){var a=r.call(this,t),o=t.getAttribute("id");o&&(this._defs[o]=a)}}else{var r=Jy[n];r&&(i=r.call(this,t,e),e.add(i))}for(var s=t.firstChild;s;)1===s.nodeType&&this._parseNode(s,i),3===s.nodeType&&this._isText&&this._parseText(s,i),s=s.nextSibling;"defs"===n?this._isDefine=!1:"text"===n&&(this._isText=!1)},ll.prototype._parseText=function(t,e){if(1===t.nodeType){var n=t.getAttribute("dx")||0,i=t.getAttribute("dy")||0;this._textX+=parseFloat(n),this._textY+=parseFloat(i)}var r=new Bv({style:{text:t.textContent,transformText:!0},position:[this._textX||0,this._textY||0]});hl(e,r),dl(t,r,this._defs);var a=r.style.fontSize;a&&9>a&&(r.style.fontSize=9,r.scale=r.scale||[1,1],r.scale[0]*=a/9,r.scale[1]*=a/9);var o=r.getBoundingRect();return this._textX+=o.width,e.add(r),r};var Jy={g:function(t,e){var n=new bp;return hl(e,n),dl(t,n,this._defs),n},rect:function(t,e){var n=new qv;return hl(e,n),dl(t,n,this._defs),n.setShape({x:parseFloat(t.getAttribute("x")||0),y:parseFloat(t.getAttribute("y")||0),width:parseFloat(t.getAttribute("width")||0),height:parseFloat(t.getAttribute("height")||0)}),n},circle:function(t,e){var n=new Ev;return hl(e,n),dl(t,n,this._defs),n.setShape({cx:parseFloat(t.getAttribute("cx")||0),cy:parseFloat(t.getAttribute("cy")||0),r:parseFloat(t.getAttribute("r")||0)}),n},line:function(t,e){var n=new Uv;return hl(e,n),dl(t,n,this._defs),n.setShape({x1:parseFloat(t.getAttribute("x1")||0),y1:parseFloat(t.getAttribute("y1")||0),x2:parseFloat(t.getAttribute("x2")||0),y2:parseFloat(t.getAttribute("y2")||0)}),n},ellipse:function(t,e){var n=new Ky;return hl(e,n),dl(t,n,this._defs),n.setShape({cx:parseFloat(t.getAttribute("cx")||0),cy:parseFloat(t.getAttribute("cy")||0),rx:parseFloat(t.getAttribute("rx")||0),ry:parseFloat(t.getAttribute("ry")||0)}),n},polygon:function(t,e){var n=t.getAttribute("points");n&&(n=cl(n));var i=new Gv({shape:{points:n||[]}});return hl(e,i),dl(t,i,this._defs),i},polyline:function(t,e){var n=new Rr;hl(e,n),dl(t,n,this._defs);var i=t.getAttribute("points");i&&(i=cl(i));var r=new Wv({shape:{points:i||[]}});return r},image:function(t,e){var n=new _i;return hl(e,n),dl(t,n,this._defs),n.setStyle({image:t.getAttribute("xlink:href"),x:t.getAttribute("x"),y:t.getAttribute("y"),width:t.getAttribute("width"),height:t.getAttribute("height")}),n},text:function(t,e){var n=t.getAttribute("x")||0,i=t.getAttribute("y")||0,r=t.getAttribute("dx")||0,a=t.getAttribute("dy")||0;this._textX=parseFloat(n)+parseFloat(r),this._textY=parseFloat(i)+parseFloat(a);var o=new bp;return hl(e,o),dl(t,o,this._defs),o},tspan:function(t,e){var n=t.getAttribute("x"),i=t.getAttribute("y");null!=n&&(this._textX=parseFloat(n)),null!=i&&(this._textY=parseFloat(i));var r=t.getAttribute("dx")||0,a=t.getAttribute("dy")||0,o=new bp;return hl(e,o),dl(t,o,this._defs),this._textX+=r,this._textY+=a,o},path:function(t,e){var n=t.getAttribute("d")||"",i=Hr(n);return hl(e,i),dl(t,i,this._defs),i}},t_={lineargradient:function(t){var e=parseInt(t.getAttribute("x1")||0,10),n=parseInt(t.getAttribute("y1")||0,10),i=parseInt(t.getAttribute("x2")||10,10),r=parseInt(t.getAttribute("y2")||0,10),a=new tm(e,n,i,r);return ul(t,a),a},radialgradient:function(){}},e_={fill:"fill",stroke:"stroke","stroke-width":"lineWidth",opacity:"opacity","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-miterlimit":"miterLimit","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","text-align":"textAlign","alignment-baseline":"textBaseline"},n_=/url\(\s*#(.*?)\)/,i_=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.e,]*)\)/g,r_=/([^\s:;]+)\s*:\s*([^:;]+)/g,a_=N(),o_={registerMap:function(t,e,n){var i;return x(e)?i=e:e.svg?i=[{type:"svg",source:e.svg,specialAreas:e.specialAreas}]:(e.geoJson&&!e.features&&(n=e.specialAreas,e=e.geoJson),i=[{type:"geoJSON",source:e,specialAreas:n}]),f(i,function(t){var e=t.type;"geoJson"===e&&(e=t.type="geoJSON");var n=s_[e];n(t)}),a_.set(t,i)},retrieveMap:function(t){return a_.get(t)}},s_={geoJSON:function(t){var e=t.source;t.geoJSON=b(e)?"undefined"!=typeof JSON&&JSON.parse?JSON.parse(e):new Function("return ("+e+");")():e},svg:function(t){t.svgXML=sl(t.source)}},l_=O,u_=f,h_=w,c_=S,d_=zm.parseClassType,f_="4.2.1",p_={zrender:"4.0.6"},g_=1,v_=1e3,m_=5e3,y_=1e3,__=2e3,x_=3e3,w_=4e3,b_=5e3,S_={PROCESSOR:{FILTER:v_,STATISTIC:m_},VISUAL:{LAYOUT:y_,GLOBAL:__,CHART:x_,COMPONENT:w_,BRUSH:b_}},M_="__flagInMainProcess",I_="__optionUpdated",T_=/^[a-zA-Z0-9_]+$/;yl.prototype.on=ml("on"),yl.prototype.off=ml("off"),yl.prototype.one=ml("one"),c(yl,Bf);var C_=_l.prototype;C_._onframe=function(){if(!this._disposed){var t=this._scheduler;if(this[I_]){var e=this[I_].silent;this[M_]=!0,wl(this),D_.update.call(this),this[M_]=!1,this[I_]=!1,Il.call(this,e),Tl.call(this,e)}else if(t.unfinished){var n=g_,i=this._model,r=this._api;t.unfinished=!1;do{var a=+new Date;t.performSeriesTasks(i),t.performDataProcessorTasks(i),Sl(this,i),t.performVisualTasks(i),Ll(this,this._model,r,"remain"),n-=+new Date-a}while(n>0&&t.unfinished);t.unfinished||this._zr.flush()}}},C_.getDom=function(){return this._dom},C_.getZr=function(){return this._zr},C_.setOption=function(t,e,n){var i;if(c_(e)&&(n=e.lazyUpdate,i=e.silent,e=e.notMerge),this[M_]=!0,!this._model||e){var r=new ts(this._api),a=this._theme,o=this._model=new Qm(null,null,a,r);o.scheduler=this._scheduler,o.init(null,null,a,r)}this._model.setOption(t,O_),n?(this[I_]={silent:i},this[M_]=!1):(wl(this),D_.update.call(this),this._zr.flush(),this[I_]=!1,this[M_]=!1,Il.call(this,i),Tl.call(this,i))},C_.setTheme=function(){console.error("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},C_.getModel=function(){return this._model},C_.getOption=function(){return this._model&&this._model.getOption()},C_.getWidth=function(){return this._zr.getWidth()},C_.getHeight=function(){return this._zr.getHeight()},C_.getDevicePixelRatio=function(){return this._zr.painter.dpr||window.devicePixelRatio||1},C_.getRenderedCanvas=function(t){if(df.canvasSupported){t=t||{},t.pixelRatio=t.pixelRatio||1,t.backgroundColor=t.backgroundColor||this._model.get("backgroundColor");var e=this._zr;return e.painter.getRenderedCanvas(t)}},C_.getSvgDataUrl=function(){if(df.svgSupported){var t=this._zr,e=t.storage.getDisplayList();return f(e,function(t){t.stopAnimation(!0)}),t.painter.pathToDataUrl()}},C_.getDataURL=function(t){t=t||{};var e=t.excludeComponents,n=this._model,i=[],r=this;u_(e,function(t){n.eachComponent({mainType:t},function(t){var e=r._componentsMap[t.__viewId];e.group.ignore||(i.push(e),e.group.ignore=!0)})});var a="svg"===this._zr.painter.getType()?this.getSvgDataUrl():this.getRenderedCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return u_(i,function(t){t.group.ignore=!1}),a},C_.getConnectedDataURL=function(t){if(df.canvasSupported){var e=this.group,n=Math.min,r=Math.max,a=1/0;if(F_[e]){var o=a,s=a,l=-a,u=-a,h=[],c=t&&t.pixelRatio||1;f(N_,function(a){if(a.group===e){var c=a.getRenderedCanvas(i(t)),d=a.getDom().getBoundingClientRect();o=n(d.left,o),s=n(d.top,s),l=r(d.right,l),u=r(d.bottom,u),h.push({dom:c,left:d.left,top:d.top})}}),o*=c,s*=c,l*=c,u*=c;var d=l-o,p=u-s,g=Sf();g.width=d,g.height=p;var v=Pi(g);return u_(h,function(t){var e=new _i({style:{x:t.left*c-o,y:t.top*c-s,image:t.dom}});v.add(e)}),v.refreshImmediately(),g.toDataURL("image/"+(t&&t.type||"png"))}return this.getDataURL(t)}},C_.convertToPixel=_(xl,"convertToPixel"),C_.convertFromPixel=_(xl,"convertFromPixel"),C_.containPixel=function(t,e){var n,i=this._model;return t=qi(i,t),f(t,function(t,i){i.indexOf("Models")>=0&&f(t,function(t){var r=t.coordinateSystem;if(r&&r.containPoint)n|=!!r.containPoint(e);else if("seriesModels"===i){var a=this._chartsMap[t.__viewId];a&&a.containPoint&&(n|=a.containPoint(e,t))}},this)},this),!!n},C_.getVisual=function(t,e){var n=this._model;t=qi(n,t,{defaultMainType:"series"});var i=t.seriesModel,r=i.getData(),a=t.hasOwnProperty("dataIndexInside")?t.dataIndexInside:t.hasOwnProperty("dataIndex")?r.indexOfRawIndex(t.dataIndex):null;return null!=a?r.getItemVisual(a,e):r.getVisual(e)},C_.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},C_.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]};var D_={prepareAndUpdate:function(t){wl(this),D_.update.call(this,t)},update:function(t){var e=this._model,n=this._api,i=this._zr,r=this._coordSysMgr,a=this._scheduler;if(e){a.restoreData(e,t),a.performSeriesTasks(e),r.create(e,n),a.performDataProcessorTasks(e,t),Sl(this,e),r.update(e,n),Al(e),a.performVisualTasks(e,t),kl(this,e,n,t);var o=e.get("backgroundColor")||"transparent";if(df.canvasSupported)i.setBackgroundColor(o);else{var s=Ye(o);o=tn(s,"rgb"),0===s[3]&&(o="transparent")}Ol(e,n)}},updateTransform:function(t){var e=this._model,n=this,i=this._api;if(e){var r=[];e.eachComponent(function(a,o){var s=n.getViewOfComponentModel(o);if(s&&s.__alive)if(s.updateTransform){var l=s.updateTransform(o,e,i,t);l&&l.update&&r.push(s)}else r.push(s)});var a=N();e.eachSeries(function(r){var o=n._chartsMap[r.__viewId];if(o.updateTransform){var s=o.updateTransform(r,e,i,t);s&&s.update&&a.set(r.uid,1)}else a.set(r.uid,1)}),Al(e),this._scheduler.performVisualTasks(e,t,{setDirty:!0,dirtyMap:a}),Ll(n,e,i,t,a),Ol(e,this._api)}},updateView:function(t){var e=this._model;e&&(Fs.markUpdateMethod(t,"updateView"),Al(e),this._scheduler.performVisualTasks(e,t,{setDirty:!0}),kl(this,this._model,this._api,t),Ol(e,this._api))},updateVisual:function(t){D_.update.call(this,t)},updateLayout:function(t){D_.update.call(this,t)}};C_.resize=function(t){this._zr.resize(t);var e=this._model;if(this._loadingFX&&this._loadingFX.resize(),e){var n=e.resetOption("media"),i=t&&t.silent;this[M_]=!0,n&&wl(this),D_.update.call(this),this[M_]=!1,Il.call(this,i),Tl.call(this,i)}},C_.showLoading=function(t,e){if(c_(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),R_[t]){var n=R_[t](this._api,e),i=this._zr;this._loadingFX=n,i.add(n)}},C_.hideLoading=function(){this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},C_.makeActionFromEvent=function(t){var e=o({},t);return e.type=P_[t.type],e},C_.dispatchAction=function(t,e){if(c_(e)||(e={silent:!!e}),k_[t.type]&&this._model){if(this[M_])return void this._pendingActions.push(t);Ml.call(this,t,e.silent),e.flush?this._zr.flush(!0):e.flush!==!1&&df.browser.weChat&&this._throttledZrFlush(),Il.call(this,e.silent),Tl.call(this,e.silent)}},C_.appendData=function(t){var e=t.seriesIndex,n=this.getModel(),i=n.getSeriesByIndex(e);i.appendData(t),this._scheduler.unfinished=!0},C_.on=ml("on"),C_.off=ml("off"),C_.one=ml("one");var A_=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];C_._initEvents=function(){u_(A_,function(t){var e=function(e){var n,i=this.getModel(),r=e.target,a="globalout"===t;if(a)n={};else if(r&&null!=r.dataIndex){var s=r.dataModel||i.getSeriesByIndex(r.seriesIndex);n=s&&s.getDataParams(r.dataIndex,r.dataType,r)||{}}else r&&r.eventData&&(n=o({},r.eventData));if(n){var l=n.componentType,u=n.componentIndex;("markLine"===l||"markPoint"===l||"markArea"===l)&&(l="series",u=n.seriesIndex); var h=l&&null!=u&&i.getComponent(l,u),c=h&&this["series"===h.mainType?"_chartsMap":"_componentsMap"][h.__viewId];n.event=e,n.type=t,this._ecEventProcessor.eventInfo={targetEl:r,packedEvent:n,model:h,view:c},this.trigger(t,n)}};e.zrEventfulCallAtLast=!0,this._zr.on(t,e,this)},this),u_(P_,function(t,e){this._messageCenter.on(e,function(t){this.trigger(e,t)},this)},this)},C_.isDisposed=function(){return this._disposed},C_.clear=function(){this.setOption({series:[]},!0)},C_.dispose=function(){if(!this._disposed){this._disposed=!0,Ui(this.getDom(),G_,"");var t=this._api,e=this._model;u_(this._componentsViews,function(n){n.dispose(e,t)}),u_(this._chartsViews,function(n){n.dispose(e,t)}),this._zr.dispose(),delete N_[this.id]}},c(_l,Bf),Nl.prototype={constructor:Nl,normalizeQuery:function(t){var e={},n={},i={};if(b(t)){var r=d_(t);e.mainType=r.main||null,e.subType=r.sub||null}else{var a=["Index","Name","Id"],o={name:1,dataIndex:1,dataType:1};f(t,function(t,r){for(var s=!1,l=0;l0&&h===r.length-u.length){var c=r.slice(0,h);"data"!==c&&(e.mainType=c,e[u.toLowerCase()]=t,s=!0)}}o.hasOwnProperty(r)&&(n[r]=t,s=!0),s||(i[r]=t)})}return{cptQuery:e,dataQuery:n,otherQuery:i}},filter:function(t,e){function n(t,e,n,i){return null==t[n]||e[i||n]===t[n]}var i=this.eventInfo;if(!i)return!0;var r=i.targetEl,a=i.packedEvent,o=i.model,s=i.view;if(!o||!s)return!0;var l=e.cptQuery,u=e.dataQuery;return n(l,o,"mainType")&&n(l,o,"subType")&&n(l,o,"index","componentIndex")&&n(l,o,"name")&&n(l,o,"id")&&n(u,a,"name")&&n(u,a,"dataIndex")&&n(u,a,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(t,e.otherQuery,r,a))},afterTrigger:function(){this.eventInfo=null}};var k_={},P_={},L_=[],O_=[],B_=[],E_=[],z_={},R_={},N_={},F_={},V_=new Date-0,H_=new Date-0,G_="_echarts_instance_",W_=Gl;tu(__,By),jl(dy),Ul(m_,fy),nu("default",Ny),$l({type:"highlight",event:"highlight",update:"highlight"},V),$l({type:"downplay",event:"downplay",update:"downplay"},V),ql("light",qy),ql("dark",$y);var X_={};cu.prototype={constructor:cu,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,n=this._new,i={},r={},a=[],o=[];for(du(e,i,a,"_oldKeyGetter",this),du(n,r,o,"_newKeyGetter",this),t=0;th;h++)this._add&&this._add(l[h]);else this._add&&this._add(l)}}}};var Y_=N(["tooltip","label","itemName","itemId","seriesName"]),q_=S,j_="undefined",U_=-1,Z_="e\x00\x00",$_={"float":typeof Float64Array===j_?Array:Float64Array,"int":typeof Int32Array===j_?Array:Int32Array,ordinal:Array,number:Array,time:Array},K_=typeof Uint32Array===j_?Array:Uint32Array,Q_=typeof Int32Array===j_?Array:Int32Array,J_=typeof Uint16Array===j_?Array:Uint16Array,tx=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_rawData","_chunkSize","_chunkCount","_dimValueGetter","_count","_rawCount","_nameDimIdx","_idDimIdx"],ex=["_extent","_approximateExtent","_rawExtent"],nx=function(t,e){t=t||["x","y"];for(var n={},i=[],r={},a=0;ah;h++){var c=r[h];o[c]||(o[c]=Du()),i[c]||(i[c]=[]),_u(i,this._dimensionInfos[c],n,u,l),this._chunkCount=i[c].length}for(var d=new Array(a),f=s;l>f;f++){for(var p=f-s,g=Math.floor(f/n),v=f%n,m=0;a>m;m++){var c=r[m],y=this._dimValueGetterArrayRows(t[p]||d,c,p,m);i[c][g][v]=y;var _=o[c];y<_[0]&&(_[0]=y),y>_[1]&&(_[1]=y)}e&&(this._nameList[f]=e[p])}this._rawCount=this._count=l,this._extent={},xu(this)},ix._initDataFromProvider=function(t,e){if(!(t>=e)){for(var n,i=this._chunkSize,r=this._rawData,a=this._storage,o=this.dimensions,s=o.length,l=this._dimensionInfos,u=this._nameList,h=this._idList,c=this._rawExtent,d=this._nameRepeatCount={},f=this._chunkCount,p=0;s>p;p++){var g=o[p];c[g]||(c[g]=Du());var v=l[g];0===v.otherDims.itemName&&(n=this._nameDimIdx=p),0===v.otherDims.itemId&&(this._idDimIdx=p),a[g]||(a[g]=[]),_u(a,v,i,f,e),this._chunkCount=a[g].length}for(var m=new Array(s),y=t;e>y;y++){m=r.getItem(y,m);for(var _=Math.floor(y/i),x=y%i,w=0;s>w;w++){var g=o[w],b=a[g][_],S=this._dimValueGetter(m,g,y,w);b[x]=S;var M=c[g];SM[1]&&(M[1]=S)}if(!r.pure){var I=u[y];if(m&&null==I)if(null!=m.name)u[y]=I=m.name;else if(null!=n){var T=o[n],C=a[T][_];if(C){I=C[x];var D=l[T].ordinalMeta;D&&D.categories.length&&(I=D.categories[I])}}var A=null==m?null:m.id;null==A&&null!=I&&(d[I]=d[I]||0,A=I,d[I]>0&&(A+="__ec__"+d[I]),d[I]++),null!=A&&(h[y]=A)}}!r.persistent&&r.clean&&r.clean(),this._rawCount=this._count=e,this._extent={},xu(this)}},ix.count=function(){return this._count},ix.getIndices=function(){var t,e=this._indices;if(e){var n=e.constructor,i=this._count;if(n===Array){t=new n(i);for(var r=0;i>r;r++)t[r]=e[r]}else t=new n(e.buffer,0,i)}else for(var n=vu(this),t=new n(this.count()),r=0;r=0&&e=0&&ei;i++)n.push(this.get(t[i],e));return n},ix.hasValue=function(t){for(var e=this._dimensionsSummary.dataDimsOnCoord,n=this._dimensionInfos,i=0,r=e.length;r>i;i++)if("ordinal"!==n[e[i]].type&&isNaN(this.get(e[i],t)))return!1;return!0},ix.getDataExtent=function(t){t=this.getDimension(t);var e=this._storage[t],n=Du();if(!e)return n;var i,r=this.count(),a=!this._indices;if(a)return this._rawExtent[t].slice();if(i=this._extent[t])return i.slice();i=n;for(var o=i[0],s=i[1],l=0;r>l;l++){var u=this._getFast(t,this.getRawIndex(l));o>u&&(o=u),u>s&&(s=u)}return i=[o,s],this._extent[t]=i,i},ix.getApproximateExtent=function(t){return t=this.getDimension(t),this._approximateExtent[t]||this.getDataExtent(t)},ix.setApproximateExtent=function(t,e){e=this.getDimension(e),this._approximateExtent[e]=t.slice()},ix.getCalculationInfo=function(t){return this._calculationInfo[t]},ix.setCalculationInfo=function(t,e){q_(t)?o(this._calculationInfo,t):this._calculationInfo[t]=e},ix.getSum=function(t){var e=this._storage[t],n=0;if(e)for(var i=0,r=this.count();r>i;i++){var a=this.get(t,i);isNaN(a)||(n+=a)}return n},ix.getMedian=function(t){var e=[];this.each(t,function(t){isNaN(t)||e.push(t)});var n=[].concat(e).sort(function(t,e){return t-e}),i=this.count();return 0===i?0:i%2===1?n[(i-1)/2]:(n[i/2]+n[i/2-1])/2},ix.rawIndexOf=function(t,e){var n=t&&this._invertedIndicesMap[t],i=n[e];return null==i||isNaN(i)?U_:i},ix.indexOfName=function(t){for(var e=0,n=this.count();n>e;e++)if(this.getName(e)===t)return e;return-1},ix.indexOfRawIndex=function(t){if(!this._indices)return t;if(t>=this._rawCount||0>t)return-1;var e=this._indices,n=e[t];if(null!=n&&n=i;){var a=(i+r)/2|0;if(e[a]t))return a;r=a-1}}return-1},ix.indicesOfNearest=function(t,e,n){var i=this._storage,r=i[t],a=[];if(!r)return a;null==n&&(n=1/0);for(var o=Number.MAX_VALUE,s=-1,l=0,u=this.count();u>l;l++){var h=e-this.get(t,l),c=Math.abs(h);n>=h&&o>=c&&((o>c||h>=0&&0>s)&&(o=c,s=h,a.length=0),a.push(l))}return a},ix.getRawIndex=bu,ix.getRawDataItem=function(t){if(this._rawData.persistent)return this._rawData.getItem(this.getRawIndex(t));for(var e=[],n=0;no;o++)s[o]=this.get(t[o],a);s[o]=a,e.apply(n,s)}}},ix.filterSelf=function(t,e,n,i){if(this._count){"function"==typeof t&&(i=n,n=e,e=t,t=[]),n=n||i||this,t=p(Iu(t),this.getDimension,this);for(var r=this.count(),a=vu(this),o=new a(r),s=[],l=t.length,u=0,h=t[0],c=0;r>c;c++){var d,f=this.getRawIndex(c);if(0===l)d=e.call(n,c);else if(1===l){var g=this._getFast(h,f);d=e.call(n,g,c)}else{for(var v=0;l>v;v++)s[v]=this._getFast(h,f);s[v]=c,d=e.apply(n,s)}d&&(o[u++]=f)}return r>u&&(this._indices=o),this._count=u,this._extent={},this.getRawIndex=this._indices?Su:bu,this}},ix.selectRange=function(t){if(this._count){var e=[];for(var n in t)t.hasOwnProperty(n)&&e.push(n);var i=e.length;if(i){var r=this.count(),a=vu(this),o=new a(r),s=0,l=e[0],u=t[l][0],h=t[l][1],c=!1;if(!this._indices){var d=0;if(1===i){for(var f=this._storage[e[0]],p=0;pm;m++){var y=g[m];(y>=u&&h>=y||isNaN(y))&&(o[s++]=d),d++}c=!0}else if(2===i){for(var f=this._storage[l],_=this._storage[e[1]],x=t[e[1]][0],w=t[e[1]][1],p=0;pm;m++){var y=g[m],S=b[m];(y>=u&&h>=y||isNaN(y))&&(S>=x&&w>=S||isNaN(S))&&(o[s++]=d),d++}c=!0}}if(!c)if(1===i)for(var m=0;r>m;m++){var M=this.getRawIndex(m),y=this._getFast(l,M);(y>=u&&h>=y||isNaN(y))&&(o[s++]=M)}else for(var m=0;r>m;m++){for(var I=!0,M=this.getRawIndex(m),p=0;i>p;p++){var T=e[p],y=this._getFast(n,M);(yt[T][1])&&(I=!1)}I&&(o[s++]=this.getRawIndex(m))}return r>s&&(this._indices=o),this._count=s,this._extent={},this.getRawIndex=this._indices?Su:bu,this}}},ix.mapArray=function(t,e,n,i){"function"==typeof t&&(i=n,n=e,e=t,t=[]),n=n||i||this;var r=[];return this.each(t,function(){r.push(e&&e.apply(this,arguments))},n),r},ix.map=function(t,e,n,i){n=n||i||this,t=p(Iu(t),this.getDimension,this);var r=Tu(this,t);r._indices=this._indices,r.getRawIndex=r._indices?Su:bu;for(var a=r._storage,o=[],s=this._chunkSize,l=t.length,u=this.count(),h=[],c=r._rawExtent,d=0;u>d;d++){for(var f=0;l>f;f++)h[f]=this.get(t[f],d);h[l]=d;var g=e&&e.apply(n,h);if(null!=g){"object"!=typeof g&&(o[0]=g,g=o);for(var v=this.getRawIndex(d),m=Math.floor(v/s),y=v%s,_=0;_b[1]&&(b[1]=w)}}}return r},ix.downSample=function(t,e,n,i){for(var r=Tu(this,[t]),a=r._storage,o=[],s=Math.floor(1/e),l=a[t],u=this.count(),h=this._chunkSize,c=r._rawExtent[t],d=new(vu(this))(u),f=0,p=0;u>p;p+=s){s>u-p&&(s=u-p,o.length=s);for(var g=0;s>g;g++){var v=this.getRawIndex(p+g),m=Math.floor(v/h),y=v%h;o[g]=l[m][y]}var _=n(o),x=this.getRawIndex(Math.min(p+i(o,_)||0,u-1)),w=Math.floor(x/h),b=x%h;l[w][b]=_,_c[1]&&(c[1]=_),d[f++]=x}return r._count=f,r._indices=d,r.getRawIndex=Su,r},ix.getItemModel=function(t){var e=this.hostModel;return new Ha(this.getRawDataItem(t),e,e&&e.ecModel)},ix.diff=function(t){var e=this;return new cu(t?t.getIndices():[],this.getIndices(),function(e){return Mu(t,e)},function(t){return Mu(e,t)})},ix.getVisual=function(t){var e=this._visual;return e&&e[t]},ix.setVisual=function(t,e){if(q_(t))for(var n in t)t.hasOwnProperty(n)&&this.setVisual(n,t[n]);else this._visual=this._visual||{},this._visual[t]=e},ix.setLayout=function(t,e){if(q_(t))for(var n in t)t.hasOwnProperty(n)&&this.setLayout(n,t[n]);else this._layout[t]=e},ix.getLayout=function(t){return this._layout[t]},ix.getItemLayout=function(t){return this._itemLayouts[t]},ix.setItemLayout=function(t,e,n){this._itemLayouts[t]=n?o(this._itemLayouts[t]||{},e):e},ix.clearItemLayouts=function(){this._itemLayouts.length=0},ix.getItemVisual=function(t,e,n){var i=this._itemVisuals[t],r=i&&i[e];return null!=r||n?r:this.getVisual(e)},ix.setItemVisual=function(t,e,n){var i=this._itemVisuals[t]||{},r=this.hasItemVisual;if(this._itemVisuals[t]=i,q_(e))for(var a in e)e.hasOwnProperty(a)&&(i[a]=e[a],r[a]=!0);else i[e]=n,r[e]=!0},ix.clearAllVisual=function(){this._visual={},this._itemVisuals=[],this.hasItemVisual={}};var rx=function(t){t.seriesIndex=this.seriesIndex,t.dataIndex=this.dataIndex,t.dataType=this.dataType};ix.setItemGraphicEl=function(t,e){var n=this.hostModel;e&&(e.dataIndex=t,e.dataType=this.dataType,e.seriesIndex=n&&n.seriesIndex,"group"===e.type&&e.traverse(rx,e)),this._graphicEls[t]=e},ix.getItemGraphicEl=function(t){return this._graphicEls[t]},ix.eachItemGraphicEl=function(t,e){f(this._graphicEls,function(n,i){n&&t&&t.call(e,n,i)})},ix.cloneShallow=function(t){if(!t){var e=p(this.dimensions,this.getDimensionInfo,this);t=new nx(e,this.hostModel)}if(t._storage=this._storage,yu(t,this),this._indices){var n=this._indices.constructor;t._indices=new n(this._indices)}else t._indices=null;return t.getRawIndex=t._indices?Su:bu,t},ix.wrapMethod=function(t,e){var n=this[t];"function"==typeof n&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var t=n.apply(this,arguments);return e.apply(this,[t].concat(P(arguments)))})},ix.TRANSFERABLE_METHODS=["cloneShallow","downSample","map"],ix.CHANGABLE_METHODS=["filterSelf","selectRange"];var ax=function(t,e){return e=e||{},Au(e.coordDimensions||[],t,{dimsDef:e.dimensionsDefine||t.dimensionsDefine,encodeDef:e.encodeDefine||t.encodeDefine,dimCount:e.dimensionsCount,generateCoord:e.generateCoord,generateCoordCount:e.generateCoordCount})};Nu.prototype.parse=function(t){return t},Nu.prototype.getSetting=function(t){return this._setting[t]},Nu.prototype.contain=function(t){var e=this._extent;return t>=e[0]&&t<=e[1]},Nu.prototype.normalize=function(t){var e=this._extent;return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])},Nu.prototype.scale=function(t){var e=this._extent;return t*(e[1]-e[0])+e[0]},Nu.prototype.unionExtent=function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1])},Nu.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},Nu.prototype.getExtent=function(){return this._extent.slice()},Nu.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=t),isNaN(e)||(n[1]=e)},Nu.prototype.isBlank=function(){return this._isBlank},Nu.prototype.setBlank=function(t){this._isBlank=t},Nu.prototype.getLabel=null,Ji(Nu),ir(Nu,{registerWhenExtend:!0}),Fu.createByAxisModel=function(t){var e=t.option,n=e.data,i=n&&p(n,Hu);return new Fu({categories:i,needCollect:!i,deduplication:e.dedplication!==!1})};var ox=Fu.prototype;ox.getOrdinal=function(t){return Vu(this).get(t)},ox.parseAndCollect=function(t){var e,n=this._needCollect;if("string"!=typeof t&&!n)return t;if(n&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,e;var i=Vu(this);return e=i.get(t),null==e&&(n?(e=this.categories.length,this.categories[e]=t,i.set(t,e)):e=0/0),e};var sx=Nu.prototype,lx=Nu.extend({type:"ordinal",init:function(t,e){(!t||x(t))&&(t=new Fu({categories:t})),this._ordinalMeta=t,this._extent=e||[0,t.categories.length-1]},parse:function(t){return"string"==typeof t?this._ordinalMeta.getOrdinal(t):Math.round(t)},contain:function(t){return t=this.parse(t),sx.contain.call(this,t)&&null!=this._ordinalMeta.categories[t]},normalize:function(t){return sx.normalize.call(this,this.parse(t))},scale:function(t){return Math.round(sx.scale.call(this,t))},getTicks:function(){for(var t=[],e=this._extent,n=e[0];n<=e[1];)t.push(n),n++;return t},getLabel:function(t){return this.isBlank()?void 0:this._ordinalMeta.categories[t]},count:function(){return this._extent[1]-this._extent[0]+1},unionExtentFromData:function(t,e){this.unionExtent(t.getApproximateExtent(e))},getOrdinalMeta:function(){return this._ordinalMeta},niceTicks:V,niceExtent:V});lx.create=function(){return new lx};var ux=$a,hx=$a,cx=Nu.extend({type:"interval",_interval:0,_intervalPrecision:2,setExtent:function(t,e){var n=this._extent;isNaN(t)||(n[0]=parseFloat(t)),isNaN(e)||(n[1]=parseFloat(e))},unionExtent:function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1]),cx.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=Wu(t)},getTicks:function(){return qu(this._interval,this._extent,this._niceExtent,this._intervalPrecision)},getLabel:function(t,e){if(null==t)return"";var n=e&&e.precision;return null==n?n=Ja(t)||0:"auto"===n&&(n=this._intervalPrecision),t=hx(t,n,!0),co(t)},niceTicks:function(t,e,n){t=t||5;var i=this._extent,r=i[1]-i[0];if(isFinite(r)){0>r&&(r=-r,i.reverse());var a=Gu(i,t,e,n);this._intervalPrecision=a.intervalPrecision,this._interval=a.interval,this._niceExtent=a.niceTickExtent}},niceExtent:function(t){var e=this._extent;if(e[0]===e[1])if(0!==e[0]){var n=e[0];t.fixMax?e[0]-=n/2:(e[1]+=n/2,e[0]-=n/2)}else e[1]=1;var i=e[1]-e[0];isFinite(i)||(e[0]=0,e[1]=1),this.niceTicks(t.splitNumber,t.minInterval,t.maxInterval);var r=this._interval;t.fixMin||(e[0]=hx(Math.floor(e[0]/r)*r)),t.fixMax||(e[1]=hx(Math.ceil(e[1]/r)*r))}});cx.create=function(){return new cx};var dx="__ec_stack_",fx=.5,px="undefined"!=typeof Float32Array?Float32Array:Array,gx={seriesType:"bar",plan:Ty(),reset:function(t){function e(t,e){for(var n,c=new px(2*t.count),d=[],f=[],p=0;null!=(n=t.next());)f[u]=e.get(o,n),f[1-u]=e.get(s,n),d=i.dataToPoint(f,null,d),c[p++]=d[0],c[p++]=d[1];e.setLayout({largePoints:c,barWidth:h,valueAxisStart:nh(r,a,!1),valueAxisHorizontal:l})}if(th(t)&&eh(t)){var n=t.getData(),i=t.coordinateSystem,r=i.getBaseAxis(),a=i.getOtherAxis(r),o=n.mapDimension(a.dim),s=n.mapDimension(r.dim),l=a.isHorizontal(),u=l?0:1,h=Qu($u([t]),r,t).width;return h>fx||(h=fx),{progress:e}}}},vx=cx.prototype,mx=Math.ceil,yx=Math.floor,_x=1e3,xx=60*_x,bx=60*xx,Sx=24*bx,Mx=function(t,e,n,i){for(;i>n;){var r=n+i>>>1;t[r][1]a&&(a=e),null!=n&&a>n&&(a=n);var o=Tx.length,s=Mx(Tx,a,0,o),l=Tx[Math.min(s,o-1)],u=l[1];if("year"===l[0]){var h=r/u,c=so(h/t,!0);u*=c}var d=this.getSetting("useUTC")?0:60*new Date(+i[0]||+i[1]).getTimezoneOffset()*1e3,f=[Math.round(mx((i[0]-d)/u)*u+d),Math.round(yx((i[1]-d)/u)*u+d)];Yu(f,i),this._stepLvl=l,this._interval=u,this._niceExtent=f},parse:function(t){return+ro(t)}});f(["contain","normalize"],function(t){Ix.prototype[t]=function(e){return vx[t].call(this,this.parse(e))}});var Tx=[["hh:mm:ss",_x],["hh:mm:ss",5*_x],["hh:mm:ss",10*_x],["hh:mm:ss",15*_x],["hh:mm:ss",30*_x],["hh:mm\nMM-dd",xx],["hh:mm\nMM-dd",5*xx],["hh:mm\nMM-dd",10*xx],["hh:mm\nMM-dd",15*xx],["hh:mm\nMM-dd",30*xx],["hh:mm\nMM-dd",bx],["hh:mm\nMM-dd",2*bx],["hh:mm\nMM-dd",6*bx],["hh:mm\nMM-dd",12*bx],["MM-dd\nyyyy",Sx],["MM-dd\nyyyy",2*Sx],["MM-dd\nyyyy",3*Sx],["MM-dd\nyyyy",4*Sx],["MM-dd\nyyyy",5*Sx],["MM-dd\nyyyy",6*Sx],["week",7*Sx],["MM-dd\nyyyy",10*Sx],["week",14*Sx],["week",21*Sx],["month",31*Sx],["week",42*Sx],["month",62*Sx],["week",70*Sx],["quarter",95*Sx],["month",31*Sx*4],["month",31*Sx*5],["half-year",380*Sx/2],["month",31*Sx*8],["month",31*Sx*10],["year",380*Sx]];Ix.create=function(t){return new Ix({useUTC:t.ecModel.get("useUTC")})};var Cx=Nu.prototype,Dx=cx.prototype,Ax=Ja,kx=$a,Px=Math.floor,Lx=Math.ceil,Ox=Math.pow,Bx=Math.log,Ex=Nu.extend({type:"log",base:10,$constructor:function(){Nu.apply(this,arguments),this._originalScale=new cx},getTicks:function(){var t=this._originalScale,e=this._extent,n=t.getExtent();return p(Dx.getTicks.call(this),function(i){var r=$a(Ox(this.base,i));return r=i===e[0]&&t.__fixMin?ih(r,n[0]):r,r=i===e[1]&&t.__fixMax?ih(r,n[1]):r},this)},getLabel:Dx.getLabel,scale:function(t){return t=Cx.scale.call(this,t),Ox(this.base,t)},setExtent:function(t,e){var n=this.base;t=Bx(t)/Bx(n),e=Bx(e)/Bx(n),Dx.setExtent.call(this,t,e)},getExtent:function(){var t=this.base,e=Cx.getExtent.call(this);e[0]=Ox(t,e[0]),e[1]=Ox(t,e[1]);var n=this._originalScale,i=n.getExtent();return n.__fixMin&&(e[0]=ih(e[0],i[0])),n.__fixMax&&(e[1]=ih(e[1],i[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),Cx.unionExtent.call(this,t)},unionExtentFromData:function(t,e){this.unionExtent(t.getApproximateExtent(e))},niceTicks:function(t){t=t||10;var e=this._extent,n=e[1]-e[0];if(!(1/0===n||0>=n)){var i=ao(n),r=t/n*i;for(.5>=r&&(i*=10);!isNaN(i)&&Math.abs(i)<1&&Math.abs(i)>0;)i*=10;var a=[$a(Lx(e[0]/i)*i),$a(Px(e[1]/i)*i)];this._interval=i,this._niceExtent=a}},niceExtent:function(t){Dx.niceExtent.call(this,t);var e=this._originalScale;e.__fixMin=t.fixMin,e.__fixMax=t.fixMax}});f(["contain","normalize"],function(t){Ex.prototype[t]=function(e){return e=Bx(e)/Bx(this.base),Cx[t].call(this,e)}}),Ex.create=function(){return new Ex};var zx={getMin:function(t){var e=this.option,n=t||null==e.rangeStart?e.min:e.rangeStart;return this.axis&&null!=n&&"dataMin"!==n&&"function"!=typeof n&&!C(n)&&(n=this.axis.scale.parse(n)),n},getMax:function(t){var e=this.option,n=t||null==e.rangeEnd?e.max:e.rangeEnd;return this.axis&&null!=n&&"dataMax"!==n&&"function"!=typeof n&&!C(n)&&(n=this.axis.scale.parse(n)),n},getNeedCrossZero:function(){var t=this.option;return null!=t.rangeStart||null!=t.rangeEnd?!1:!t.scale},getCoordSysModel:V,setRange:function(t,e){this.option.rangeStart=t,this.option.rangeEnd=e},resetRange:function(){this.option.rangeStart=this.option.rangeEnd=null}},Rx=Kr({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var n=e.cx,i=e.cy,r=e.width/2,a=e.height/2;t.moveTo(n,i-a),t.lineTo(n+r,i+a),t.lineTo(n-r,i+a),t.closePath()}}),Nx=Kr({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var n=e.cx,i=e.cy,r=e.width/2,a=e.height/2;t.moveTo(n,i-a),t.lineTo(n+r,i),t.lineTo(n,i+a),t.lineTo(n-r,i),t.closePath()}}),Fx=Kr({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var n=e.x,i=e.y,r=e.width/5*3,a=Math.max(r,e.height),o=r/2,s=o*o/(a-o),l=i-a+o+s,u=Math.asin(s/o),h=Math.cos(u)*o,c=Math.sin(u),d=Math.cos(u),f=.6*o,p=.7*o;t.moveTo(n-h,l+s),t.arc(n,l,o,Math.PI-u,2*Math.PI+u),t.bezierCurveTo(n+h-c*f,l+s+d*f,n,i-p,n,i),t.bezierCurveTo(n,i-p,n-h+c*f,l+s+d*f,n-h,l+s),t.closePath()}}),Vx=Kr({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var n=e.height,i=e.width,r=e.x,a=e.y,o=i/3*2;t.moveTo(r,a),t.lineTo(r+o,a+n),t.lineTo(r,a+n/4*3),t.lineTo(r-o,a+n),t.lineTo(r,a),t.closePath()}}),Hx={line:Uv,rect:qv,roundRect:qv,square:qv,circle:Ev,diamond:Nx,pin:Fx,arrow:Vx,triangle:Rx},Gx={line:function(t,e,n,i,r){r.x1=t,r.y1=e+i/2,r.x2=t+n,r.y2=e+i/2},rect:function(t,e,n,i,r){r.x=t,r.y=e,r.width=n,r.height=i},roundRect:function(t,e,n,i,r){r.x=t,r.y=e,r.width=n,r.height=i,r.r=Math.min(n,i)/4},square:function(t,e,n,i,r){var a=Math.min(n,i);r.x=t,r.y=e,r.width=a,r.height=a},circle:function(t,e,n,i,r){r.cx=t+n/2,r.cy=e+i/2,r.r=Math.min(n,i)/2},diamond:function(t,e,n,i,r){r.cx=t+n/2,r.cy=e+i/2,r.width=n,r.height=i},pin:function(t,e,n,i,r){r.x=t+n/2,r.y=e+i/2,r.width=n,r.height=i},arrow:function(t,e,n,i,r){r.x=t+n/2,r.y=e+i/2,r.width=n,r.height=i},triangle:function(t,e,n,i,r){r.cx=t+n/2,r.cy=e+i/2,r.width=n,r.height=i}},Wx={};f(Hx,function(t,e){Wx[e]=new t});var Xx=Kr({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,n){var i=e.symbolType,r=Wx[i];"none"!==e.symbolType&&(r||(i="rect",r=Wx[i]),Gx[i](e.x,e.y,e.width,e.height,r.shape),r.buildPath(t,r.shape,n))}}),Yx={isDimensionStacked:Ou,enableDataStack:Lu,getStackedDimension:Bu},qx=(Object.freeze||Object)({createList:mh,getLayoutRect:Mo,dataStack:Yx,createScale:yh,mixinAxisModelCommonMethods:_h,completeDimensions:Au,createDimensions:ax,createSymbol:vh}),jx=1e-8;bh.prototype={constructor:bh,properties:null,getBoundingRect:function(){var t=this._rect;if(t)return t;for(var e=Number.MAX_VALUE,n=[e,e],i=[-e,-e],r=[],a=[],o=this.geometries,s=0;si;i++)if("polygon"===n[i].type){var a=n[i].exterior,o=n[i].interiors;if(wh(a,t[0],t[1])){for(var s=0;s<(o?o.length:0);s++)if(wh(o[s]))continue t;return!0}}return!1},transformTo:function(t,e,n,i){var r=this.getBoundingRect(),a=r.width/r.height;n?i||(i=n/a):n=a*i;for(var o=new yn(t,e,n,i),s=r.calculateTransform(o),l=this.geometries,u=0;u0}),function(t){var e=t.properties,n=t.geometry,i=n.coordinates,r=[];"Polygon"===n.type&&r.push({type:"polygon",exterior:i[0],interiors:i.slice(1)}),"MultiPolygon"===n.type&&f(i,function(t){t[0]&&r.push({type:"polygon",exterior:t[0],interiors:t.slice(1)})});var a=new bh(e.name,r,e.cp);return a.properties=e,a})},Zx=Yi(),$x=[0,1],Kx=function(t,e,n){this.dim=t,this.scale=e,this._extent=n||[0,0],this.inverse=!1,this.onBand=!1};Kx.prototype={constructor:Kx,contain:function(t){var e=this._extent,n=Math.min(e[0],e[1]),i=Math.max(e[0],e[1]);return t>=n&&i>=t},containData:function(t){return this.contain(this.dataToCoord(t))},getExtent:function(){return this._extent.slice()},getPixelPrecision:function(t){return to(t||this.scale.getExtent(),this._extent)},setExtent:function(t,e){var n=this._extent;n[0]=t,n[1]=e},dataToCoord:function(t,e){var n=this._extent,i=this.scale;return t=i.normalize(t),this.onBand&&"ordinal"===i.type&&(n=n.slice(),Fh(n,i.count())),Ua(t,$x,n,e)},coordToData:function(t,e){var n=this._extent,i=this.scale;this.onBand&&"ordinal"===i.type&&(n=n.slice(),Fh(n,i.count()));var r=Ua(t,n,$x,e);return this.scale.scale(r)},pointToData:function(){},getTicksCoords:function(t){t=t||{};var e=t.tickModel||this.getTickModel(),n=Th(this,e),i=n.ticks,r=p(i,function(t){return{coord:this.dataToCoord(t),tickValue:t}},this),a=e.get("alignWithLabel");return Vh(this,r,n.tickCategoryInterval,a,t.clamp),r},getViewLabels:function(){return Ih(this).labels},getLabelModel:function(){return this.model.getModel("axisLabel")},getTickModel:function(){return this.model.getModel("axisTick")},getBandWidth:function(){var t=this._extent,e=this.scale.getExtent(),n=e[1]-e[0]+(this.onBand?1:0);0===n&&(n=1);var i=Math.abs(t[1]-t[0]);return Math.abs(i)/n},isHorizontal:null,getRotate:null,calculateCategoryInterval:function(){return Eh(this)}};var Qx=Ux,Jx={};f(["map","each","filter","indexOf","inherits","reduce","filter","bind","curry","isArray","isString","isObject","isFunction","extend","defaults","clone","merge"],function(t){Jx[t]=Tf[t]});var tw={};f(["extendShape","extendPath","makePath","makeImage","mergePath","resizePath","createIcon","setHoverStyle","setLabelStyle","setTextStyle","setText","getFont","updateProps","initProps","getTransform","clipPointsByRect","clipRectByRect","Group","Image","Text","Circle","Sector","Ring","Polygon","Polyline","Rect","Line","BezierCurve","Arc","IncrementalDisplayable","CompoundPath","LinearGradient","RadialGradient","BoundingRect"],function(t){tw[t]=cm[t]});var ew=function(t){this._axes={},this._dimList=[],this.name=t||""};ew.prototype={constructor:ew,type:"cartesian",getAxis:function(t){return this._axes[t]},getAxes:function(){return p(this._dimList,Hh,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 n=this._dimList,i=t instanceof Array?[]:{},r=0;re[1]&&e.reverse(),e},getOtherAxis:function(){this.grid.getOtherAxis()},pointToData:function(t,e){return this.coordToData(this.toLocalCoord(t["x"===this.dim?0:1]),e)},toLocalCoord:null,toGlobalCoord:null},h(nw,Kx);var iw={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)"]}}},rw={};rw.categoryAxis=r({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},iw),rw.valueAxis=r({boundaryGap:[0,0],splitNumber:5},iw),rw.timeAxis=s({scale:!0,min:"dataMin",max:"dataMax"},rw.valueAxis),rw.logAxis=s({scale:!0,logBase:10},rw.valueAxis);var aw=["value","category","time","log"],ow=function(t,e,n,i){f(aw,function(o){e.extend({type:t+"Axis."+o,mergeDefaultAndTheme:function(e,i){var a=this.layoutMode,s=a?To(e):{},l=i.getTheme();r(e,l.get(o+"Axis")),r(e,this.getDefaultOption()),e.type=n(t,e),a&&Io(e,s,a)},optionUpdated:function(){var t=this.option;"category"===t.type&&(this.__ordinalMeta=Fu.createByAxisModel(this))},getCategories:function(t){var e=this.option;return"category"===e.type?t?e.data:this.__ordinalMeta.categories:void 0},getOrdinalMeta:function(){return this.__ordinalMeta},defaultOption:a([{},rw[o+"Axis"],i],!0)})}),zm.registerSubTypeDefaulter(t+"Axis",_(n,t))},sw=zm.extend({type:"cartesian2dAxis",axis:null,init:function(){sw.superApply(this,"init",arguments),this.resetRange()},mergeOption:function(){sw.superApply(this,"mergeOption",arguments),this.resetRange()},restoreData:function(){sw.superApply(this,"restoreData",arguments),this.resetRange()},getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"grid",index:this.option.gridIndex,id:this.option.gridId})[0]}});r(sw.prototype,zx);var lw={offset:0};ow("x",sw,Wh,lw),ow("y",sw,Wh,lw),zm.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 uw=Yh.prototype;uw.type="grid",uw.axisPointerEnabled=!0,uw.getRect=function(){return this._rect},uw.update=function(t,e){var n=this._axesMap;this._updateScale(t,this.model),f(n.x,function(t){oh(t.scale,t.model)}),f(n.y,function(t){oh(t.scale,t.model)});var i={};f(n.x,function(t){qh(n,"y",t,i)}),f(n.y,function(t){qh(n,"x",t,i)}),this.resize(this.model,e)},uw.resize=function(t,e,n){function i(){f(a,function(t){var e=t.isHorizontal(),n=e?[0,r.width]:[0,r.height],i=t.inverse?1:0;t.setExtent(n[i],n[1-i]),Uh(t,e?r.x:r.y)})}var r=Mo(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()});this._rect=r;var a=this._axesList;i(),!n&&t.get("containLabel")&&(f(a,function(t){if(!t.model.get("axisLabel.inside")){var e=ch(t);if(e){var n=t.isHorizontal()?"height":"width",i=t.model.get("axisLabel.margin");r[n]-=e[n]+i,"top"===t.position?r.y+=e.height+i:"left"===t.position&&(r.x+=e.width+i)}}}),i())},uw.getAxis=function(t,e){var n=this._axesMap[t];if(null!=n){if(null==e)for(var i in n)if(n.hasOwnProperty(i))return n[i];return n[e]}},uw.getAxes=function(){return this._axesList.slice()},uw.getCartesian=function(t,e){if(null!=t&&null!=e){var n="x"+t+"y"+e;return this._coordsMap[n]}S(t)&&(e=t.yAxisIndex,t=t.xAxisIndex);for(var i=0,r=this._coordsList;it&&(t=e),t}});var dw=Cg([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["stroke","barBorderColor"],["lineWidth","barBorderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),fw={getBarItemStyle:function(t){var e=dw(this,t);if(this.getBorderLineDash){var n=this.getBorderLineDash();n&&(e.lineDash=n)}return e}},pw=["itemStyle","barBorderWidth"];o(Ha.prototype,fw),ou({type:"bar",render:function(t,e,n){this._updateDrawMode(t);var i=t.get("coordinateSystem");return("cartesian2d"===i||"polar"===i)&&(this._isLargeDraw?this._renderLarge(t,e,n):this._renderNormal(t,e,n)),this.group},incrementalPrepareRender:function(t){this._clear(),this._updateDrawMode(t)},incrementalRender:function(t,e){this._incrementalRenderLarge(t,e)},_updateDrawMode:function(t){var e=t.pipelineContext.large;(null==this._isLargeDraw||e^this._isLargeDraw)&&(this._isLargeDraw=e,this._clear())},_renderNormal:function(t){var e,n=this.group,i=t.getData(),r=this._data,a=t.coordinateSystem,o=a.getBaseAxis();"cartesian2d"===a.type?e=o.isHorizontal():"polar"===a.type&&(e="angle"===o.dim);var s=t.isAnimationEnabled()?t:null;i.diff(r).add(function(r){if(i.hasValue(r)){var o=i.getItemModel(r),l=vw[a.type](i,r,o),u=gw[a.type](i,r,o,l,e,s);i.setItemGraphicEl(r,u),n.add(u),nc(u,i,r,o,l,t,e,"polar"===a.type)}}).update(function(o,l){var u=r.getItemGraphicEl(l);if(!i.hasValue(o))return void n.remove(u);var h=i.getItemModel(o),c=vw[a.type](i,o,h);u?La(u,{shape:c},s,o):u=gw[a.type](i,o,h,c,e,s,!0),i.setItemGraphicEl(o,u),n.add(u),nc(u,i,o,h,c,t,e,"polar"===a.type)}).remove(function(t){var e=r.getItemGraphicEl(t);"cartesian2d"===a.type?e&&tc(t,s,e):e&&ec(t,s,e)}).execute(),this._data=i},_renderLarge:function(t){this._clear(),rc(t,this.group)},_incrementalRenderLarge:function(t,e){rc(e,this.group,!0)},dispose:V,remove:function(t){this._clear(t)},_clear:function(t){var e=this.group,n=this._data;t&&t.get("animation")&&n&&!this._isLargeDraw?n.eachItemGraphicEl(function(e){"sector"===e.type?ec(e.dataIndex,t,e):tc(e.dataIndex,t,e)}):e.removeAll(),this._data=null}});var gw={cartesian2d:function(t,e,n,i,r,a,s){var l=new qv({shape:o({},i)});if(a){var u=l.shape,h=r?"height":"width",c={};u[h]=0,c[h]=i[h],cm[s?"updateProps":"initProps"](l,{shape:c},a,e)}return l},polar:function(t,e,n,i,r,a,o){var l=i.startAngle0?1:-1,o=i.height>0?1:-1;return{x:i.x+a*r/2,y:i.y+o*r/2,width:i.width-a*r,height:i.height-o*r}},polar:function(t,e){var n=t.getItemLayout(e);return{cx:n.cx,cy:n.cy,r0:n.r0,r:n.r,startAngle:n.startAngle,endAngle:n.endAngle}}},mw=Rr.extend({type:"largeBar",shape:{points:[]},buildPath:function(t,e){for(var n=e.points,i=this.__startPoint,r=this.__valueIdx,a=0;au[1]?-1:1,c=["start"===r?u[0]-h*l:"end"===r?u[1]+h*l:(u[0]+u[1])/2,dc(r)?t.labelOffset+a*l:0],d=e.get("nameRotate");null!=d&&(d=d*yw/180);var f;dc(r)?i=ww(t.rotation,null!=d?d:t.rotation,a):(i=sc(t,r,d||0,u),f=t.axisNameAvailableWidth,null!=f&&(f=Math.abs(f/Math.sin(i.rotation)),!isFinite(f)&&(f=null)));var p=s.getFont(),g=e.get("nameTruncate",!0)||{},v=g.ellipsis,m=D(t.nameTruncateMaxWidth,g.maxWidth,f),y=null!=v&&null!=m?Dm(n,m,p,v,{minChar:2,placeholder:g.placeholder}):n,_=e.get("tooltip",!0),x=e.mainType,w={componentType:x,name:n,$vars:["name"]};w[x+"Index"]=e.componentIndex;var b=new Bv({anid:"name",__fullText:n,__truncatedText:y,position:c,rotation:i.rotation,silent:lc(e),z2:1,tooltip:_&&_.show?o({content:n,formatter:function(){return n},formatterParams:w},_):null});ba(b.style,s,{text:y,textFont:p,textFill:s.getTextColor()||e.get("axisLine.lineStyle.color"),textAlign:i.textAlign,textVerticalAlign:i.textVerticalAlign}),e.get("triggerEvent")&&(b.eventData=oc(e),b.eventData.targetType="axisName",b.eventData.name=n),this._dumbGroup.add(b),b.updateTransform(),this.group.add(b),b.decomposeTransform()}}},ww=_w.innerTextLayout=function(t,e,n){var i,r,a=no(e-t);return io(a)?(r=n>0?"top":"bottom",i="center"):io(a-yw)?(r=n>0?"bottom":"top",i="center"):(r="middle",i=a>0&&yw>a?n>0?"right":"left":n>0?"left":"right"),{rotation:a,textAlign:i,textVerticalAlign:r}},bw=f,Sw=_,Mw=ru({type:"axis",_axisPointer:null,axisPointerClass:null,render:function(t,e,n,i){this.axisPointerClass&&wc(t),Mw.superApply(this,"render",arguments),Tc(this,t,e,n,i,!0)},updateAxisPointer:function(t,e,n,i){Tc(this,t,e,n,i,!1)},remove:function(t,e){var n=this._axisPointer;n&&n.remove(e),Mw.superApply(this,"remove",arguments)},dispose:function(t,e){Cc(this,e),Mw.superApply(this,"dispose",arguments)}}),Iw=[];Mw.registerAxisPointerClass=function(t,e){Iw[t]=e},Mw.getAxisPointerClass=function(t){return t&&Iw[t]};var Tw=["axisLine","axisTickLabel","axisName"],Cw=["splitArea","splitLine"],Dw=Mw.extend({type:"cartesianAxis",axisPointerClass:"CartesianAxisPointer",render:function(t,e,n,i){this.group.removeAll();var r=this._axisGroup;if(this._axisGroup=new bp,this.group.add(this._axisGroup),t.get("show")){var a=t.getCoordSysModel(),o=Dc(a,t),s=new _w(t,o);f(Tw,s.add,s),this._axisGroup.add(s.getGroup()),f(Cw,function(e){t.get(e+".show")&&this["_"+e](t,a)},this),Ra(r,this._axisGroup,t),Dw.superCall(this,"render",t,e,n,i)}},remove:function(){this._splitAreaColors=null},_splitLine:function(t,e){var n=t.axis;if(!n.scale.isBlank()){var i=t.getModel("splitLine"),r=i.getModel("lineStyle"),a=r.get("color");a=x(a)?a:[a];for(var o=e.coordinateSystem.getRect(),l=n.isHorizontal(),u=0,h=n.getTicksCoords({tickModel:i}),c=[],d=[],f=r.getLineStyle(),p=0;p0&&Xc(n[r-1]);r--);for(;r>i&&Xc(n[i]);i++);}for(;r>i;)i+=Yc(t,n,i,r,r,1,a.min,a.max,e.smooth,e.smoothMonotone,e.connectNulls)+1}}),Yw=Rr.extend({type:"ec-polygon",shape:{points:[],stackedOnPoints:[],smooth:0,stackedOnSmooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},brush:Rv(Rr.prototype.brush),buildPath:function(t,e){var n=e.points,i=e.stackedOnPoints,r=0,a=n.length,o=e.smoothMonotone,s=Uc(n,e.smoothConstraint),l=Uc(i,e.smoothConstraint);if(e.connectNulls){for(;a>0&&Xc(n[a-1]);a--);for(;a>r&&Xc(n[r]);r++);}for(;a>r;){var u=Yc(t,n,r,a,a,1,s.min,s.max,e.smooth,o,e.connectNulls);Yc(t,i,r+u-1,u,a,-1,l.min,l.max,e.stackedOnSmooth,o,e.connectNulls),r+=u+1,t.closePath()}}});Fs.extend({type:"line",init:function(){var t=new bp,e=new zc;this.group.add(e.group),this._symbolDraw=e,this._lineGroup=t},render:function(t,e,n){var i=t.coordinateSystem,r=this.group,a=t.getData(),o=t.getModel("lineStyle"),l=t.getModel("areaStyle"),u=a.mapArray(a.getItemLayout),h="polar"===i.type,c=this._coordSys,d=this._symbolDraw,f=this._polyline,p=this._polygon,g=this._lineGroup,v=t.get("animation"),m=!l.isEmpty(),y=l.get("origin"),_=Vc(i,a,y),x=Qc(i,a,_),w=t.get("showSymbol"),b=w&&!h&&rd(t,a,i),S=this._data;S&&S.eachItemGraphicEl(function(t,e){t.__temp&&(r.remove(t),S.setItemGraphicEl(e,null))}),w||d.remove(),r.add(g);var M=!h&&t.get("step");f&&c.type===i.type&&M===this._step?(m&&!p?p=this._newPolygon(u,x,i,v):p&&!m&&(g.remove(p),p=this._polygon=null),g.setClipPath(ed(i,!1,!1,t)),w&&d.updateData(a,{isIgnore:b,clipShape:ed(i,!1,!0,t)}),a.eachItemGraphicEl(function(t){t.stopAnimation(!0)}),Zc(this._stackedOnPoints,x)&&Zc(this._points,u)||(v?this._updateAnimation(a,x,i,n,M,y):(M&&(u=nd(u,i,M),x=nd(x,i,M)),f.setShape({points:u}),p&&p.setShape({points:u,stackedOnPoints:x})))):(w&&d.updateData(a,{isIgnore:b,clipShape:ed(i,!1,!0,t)}),M&&(u=nd(u,i,M),x=nd(x,i,M)),f=this._newPolyline(u,i,v),m&&(p=this._newPolygon(u,x,i,v)),g.setClipPath(ed(i,!0,!1,t)));var I=id(a,i)||a.getVisual("color");f.useStyle(s(o.getLineStyle(),{fill:"none",stroke:I,lineJoin:"bevel"}));var T=t.get("smooth");if(T=$c(t.get("smooth")),f.setShape({smooth:T,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")}),p){var C=a.getCalculationInfo("stackedOnSeries"),D=0;p.useStyle(s(l.getAreaStyle(),{fill:I,opacity:.7,lineJoin:"bevel"})),C&&(D=$c(C.get("smooth"))),p.setShape({smooth:T,stackedOnSmooth:D,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")})}this._data=a,this._coordSys=i,this._stackedOnPoints=x,this._points=u,this._step=M,this._valueOrigin=y},dispose:function(){},highlight:function(t,e,n,i){var r=t.getData(),a=Xi(r,i);if(!(a instanceof Array)&&null!=a&&a>=0){var o=r.getItemGraphicEl(a);if(!o){var s=r.getItemLayout(a);if(!s)return;o=new Ac(r,a),o.position=s,o.setZ(t.get("zlevel"),t.get("z")),o.ignore=isNaN(s[0])||isNaN(s[1]),o.__temp=!0,r.setItemGraphicEl(a,o),o.stopSymbolAnimation(!0),this.group.add(o)}o.highlight()}else Fs.prototype.highlight.call(this,t,e,n,i)},downplay:function(t,e,n,i){var r=t.getData(),a=Xi(r,i);if(null!=a&&a>=0){var o=r.getItemGraphicEl(a);o&&(o.__temp?(r.setItemGraphicEl(a,null),this.group.remove(o)):o.downplay())}else Fs.prototype.downplay.call(this,t,e,n,i)},_newPolyline:function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new Xw({shape:{points:t},silent:!0,z2:10}),this._lineGroup.add(e),this._polyline=e,e},_newPolygon:function(t,e){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new Yw({shape:{points:t,stackedOnPoints:e},silent:!0}),this._lineGroup.add(n),this._polygon=n,n},_updateAnimation:function(t,e,n,i,r,a){var o=this._polyline,s=this._polygon,l=t.hostModel,u=zw(this._data,t,this._stackedOnPoints,e,this._coordSys,n,this._valueOrigin,a),h=u.current,c=u.stackedOnCurrent,d=u.next,f=u.stackedOnNext;r&&(h=nd(u.current,n,r),c=nd(u.stackedOnCurrent,n,r),d=nd(u.next,n,r),f=nd(u.stackedOnNext,n,r)),o.shape.__points=u.current,o.shape.points=h,La(o,{shape:{points:d}},l),s&&(s.setShape({points:h,stackedOnPoints:c}),La(s,{shape:{points:d,stackedOnPoints:f}},l));for(var p=[],g=u.status,v=0;ve&&(e=t[n]);return isFinite(e)?e:0/0},min:function(t){for(var e=1/0,n=0;n1){var u;"string"==typeof n?u=Uw[n]:"function"==typeof n&&(u=n),u&&t.setData(e.downSample(e.mapDimension(a.dim),1/l,u,Zw))}}}}};tu(qw("line","circle","line")),Jl(jw("line")),Ul(S_.PROCESSOR.STATISTIC,$w("line"));var Kw=function(t,e,n){e=x(e)&&{coordDimensions:e}||o({},e);var i=t.getSource(),r=ax(i,e),a=new nx(r,t);return a.initData(i,n),a},Qw={updateSelectedMap:function(t){this._targetList=x(t)?t.slice():[],this._selectTargetMap=g(t||[],function(t,e){return t.set(e.name,e),t},N())},select:function(t,e){var n=null!=e?this._targetList[e]:this._selectTargetMap.get(t),i=this.get("selectedMode");"single"===i&&this._selectTargetMap.each(function(t){t.selected=!1}),n&&(n.selected=!0)},unSelect:function(t,e){var n=null!=e?this._targetList[e]:this._selectTargetMap.get(t);n&&(n.selected=!1)},toggleSelected:function(t,e){var n=null!=e?this._targetList[e]:this._selectTargetMap.get(t);return null!=n?(this[n.selected?"unSelect":"select"](t,e),n.selected):void 0},isSelected:function(t,e){var n=null!=e?this._targetList[e]:this._selectTargetMap.get(t);return n&&n.selected}},Jw=au({type:"series.pie",init:function(t){Jw.superApply(this,"init",arguments),this.legendDataProvider=function(){return this.getRawData() },this.updateSelectedMap(this._createSelectableList()),this._defaultLabelLine(t)},mergeOption:function(t){Jw.superCall(this,"mergeOption",t),this.updateSelectedMap(this._createSelectableList())},getInitialData:function(){return Kw(this,["value"])},_createSelectableList:function(){for(var t=this.getRawData(),e=t.mapDimension("value"),n=[],i=0,r=t.count();r>i;i++)n.push({name:t.getName(i),value:t.get(e,i),selected:Ts(t,i,"selected")});return n},getDataParams:function(t){var e=this.getData(),n=Jw.superCall(this,"getDataParams",t),i=[];return e.each(e.mapDimension("value"),function(t){i.push(t)}),n.percent=eo(i,t,e.hostModel.get("percentPrecision")),n.$vars.push("percent"),n},_defaultLabelLine:function(t){Ri(t,"labelLine",["show"]);var e=t.labelLine,n=t.emphasis.labelLine;e.show=e.show&&t.label.show,n.show=n.show&&t.emphasis.label.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:{rotate:!1,show:!0,position:"outer"},labelLine:{show:!0,length:15,length2:15,smooth:!1,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1},animationType:"expansion",animationEasing:"cubicOut"}});c(Jw,Qw);var tb=ld.prototype;tb.updateData=function(t,e,n){function i(){a.stopAnimation(!0),a.animateTo({shape:{r:h.r+l.get("hoverOffset")}},300,"elasticOut")}function r(){a.stopAnimation(!0),a.animateTo({shape:{r:h.r}},300,"elasticOut")}var a=this.childAt(0),l=t.hostModel,u=t.getItemModel(e),h=t.getItemLayout(e),c=o({},h);if(c.label=null,n){a.setShape(c);var d=l.getShallow("animationType");"scale"===d?(a.shape.r=h.r0,Oa(a,{shape:{r:h.r}},l,e)):(a.shape.endAngle=h.startAngle,La(a,{shape:{endAngle:h.endAngle}},l,e))}else La(a,{shape:c},l,e);var f=t.getItemVisual(e,"color");a.useStyle(s({lineJoin:"bevel",fill:f},u.getModel("itemStyle").getItemStyle())),a.hoverStyle=u.getModel("emphasis.itemStyle").getItemStyle();var p=u.getShallow("cursor");p&&a.attr("cursor",p),sd(this,t.getItemLayout(e),l.isSelected(null,e),l.get("selectedOffset"),l.get("animation")),a.off("mouseover").off("mouseout").off("emphasis").off("normal"),u.get("hoverAnimation")&&l.isAnimationEnabled()&&a.on("mouseover",i).on("mouseout",r).on("emphasis",i).on("normal",r),this._updateLabel(t,e),_a(this)},tb._updateLabel=function(t,e){var n=this.childAt(1),i=this.childAt(2),r=t.hostModel,a=t.getItemModel(e),o=t.getItemLayout(e),s=o.label,l=t.getItemVisual(e,"color");La(n,{shape:{points:s.linePoints||[[s.x,s.y],[s.x,s.y],[s.x,s.y]]}},r,e),La(i,{style:{x:s.x,y:s.y}},r,e),i.attr({rotation:s.rotation,origin:[s.x,s.y],z2:10});var u=a.getModel("label"),h=a.getModel("emphasis.label"),c=a.getModel("labelLine"),d=a.getModel("emphasis.labelLine"),l=t.getItemVisual(e,"color");wa(i.style,i.hoverStyle={},u,h,{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")}),i.ignore=i.normalIgnore=!u.get("show"),i.hoverIgnore=!h.get("show"),n.ignore=n.normalIgnore=!c.get("show"),n.hoverIgnore=!d.get("show"),n.setStyle({stroke:l,opacity:t.getItemVisual(e,"opacity")}),n.setStyle(c.getModel("lineStyle").getLineStyle()),n.hoverStyle=d.getModel("lineStyle").getLineStyle();var f=c.get("smooth");f&&f===!0&&(f=.4),n.setShape({smooth:f})},h(ld,bp);var eb=(Fs.extend({type:"pie",init:function(){var t=new bp;this._sectorGroup=t},render:function(t,e,n,i){if(!i||i.from!==this.uid){var r=t.getData(),a=this._data,o=this.group,s=e.get("animation"),l=!a,u=t.get("animationType"),h=_(od,this.uid,t,s,n),c=t.get("selectedMode");if(r.diff(a).add(function(t){var e=new ld(r,t);l&&"scale"!==u&&e.eachChild(function(t){t.stopAnimation(!0)}),c&&e.on("click",h),r.setItemGraphicEl(t,e),o.add(e)}).update(function(t,e){var n=a.getItemGraphicEl(e);n.updateData(r,t),n.off("click"),c&&n.on("click",h),o.add(n),r.setItemGraphicEl(t,n)}).remove(function(t){var e=a.getItemGraphicEl(t);o.remove(e)}).execute(),s&&l&&r.count()>0&&"scale"!==u){var d=r.getItemLayout(0),f=Math.max(n.getWidth(),n.getHeight())/2,p=y(o.removeClipPath,o);o.setClipPath(this._createClipPath(d.cx,d.cy,f,d.startAngle,d.clockwise,p,t))}else o.removeClipPath();this._data=r}},dispose:function(){},_createClipPath:function(t,e,n,i,r,a,o){var s=new Nv({shape:{cx:t,cy:e,r0:0,r:n,startAngle:i,endAngle:i,clockwise:r}});return Oa(s,{shape:{endAngle:i+(r?1:-1)*Math.PI*2}},o,a),s},containPoint:function(t,e){var n=e.getData(),i=n.getItemLayout(0);if(i){var r=t[0]-i.cx,a=t[1]-i.cy,o=Math.sqrt(r*r+a*a);return o<=i.r&&o>=i.r0}}}),function(t,e){f(e,function(e){e.update="updateView",$l(e,function(n,i){var r={};return i.eachComponent({mainType:"series",subType:t,query:n},function(t){t[e.method]&&t[e.method](n.name,n.dataIndex);var i=t.getData();i.each(function(e){var n=i.getName(e);r[n]=t.isSelected(n)||!1})}),{name:n.name,selected:r}})})}),nb=function(t){return{getTargetSeries:function(e){var n={},i=N();return e.eachSeriesByType(t,function(t){t.__paletteScope=n,i.set(t.uid,t)}),i},reset:function(t){var e=t.getRawData(),n={},i=t.getData();i.each(function(t){var e=i.getRawIndex(t);n[e]=t}),e.each(function(r){var a=n[r],o=null!=a&&i.getItemVisual(a,"color",!0);if(o)e.setItemVisual(r,"color",o);else{var s=e.getItemModel(r),l=s.get("itemStyle.color")||t.getColorFromPalette(e.getName(r)||r+"",t.__paletteScope,e.count());e.setItemVisual(r,"color",l),null!=a&&i.setItemVisual(a,"color",l)}})}}},ib=function(t,e,n,i){var r,a,o=t.getData(),s=[],l=!1;o.each(function(n){var i,u,h,c,d=o.getItemLayout(n),f=o.getItemModel(n),p=f.getModel("label"),g=p.get("position")||f.get("emphasis.label.position"),v=f.getModel("labelLine"),m=v.get("length"),y=v.get("length2"),_=(d.startAngle+d.endAngle)/2,x=Math.cos(_),w=Math.sin(_);r=d.cx,a=d.cy;var b="inside"===g||"inner"===g;if("center"===g)i=d.cx,u=d.cy,c="center";else{var S=(b?(d.r+d.r0)/2*x:d.r*x)+r,M=(b?(d.r+d.r0)/2*w:d.r*w)+a;if(i=S+3*x,u=M+3*w,!b){var I=S+x*(m+e-d.r),T=M+w*(m+e-d.r),C=I+(0>x?-1:1)*y,D=T;i=C+(0>x?-5:5),u=D,h=[[S,M],[I,T],[C,D]]}c=b?"center":x>0?"left":"right"}var A=p.getFont(),k=p.get("rotate")?0>x?-_+Math.PI:-_:0,P=t.getFormattedLabel(n,"normal")||o.getName(n),L=Rn(P,A,c,"top");l=!!k,d.label={x:i,y:u,position:g,height:L.height,len:m,len2:y,linePoints:h,textAlign:c,verticalAlign:"middle",rotation:k,inside:b},b||s.push(d.label)}),!l&&t.get("avoidLabelOverlap")&&hd(s,r,a,e,n,i)},rb=2*Math.PI,ab=Math.PI/180,ob=function(t,e,n){e.eachSeriesByType(t,function(t){var e=t.getData(),i=e.mapDimension("value"),r=t.get("center"),a=t.get("radius");x(a)||(a=[0,a]),x(r)||(r=[r,r]);var o=n.getWidth(),s=n.getHeight(),l=Math.min(o,s),u=Za(r[0],o),h=Za(r[1],s),c=Za(a[0],l/2),d=Za(a[1],l/2),f=-t.get("startAngle")*ab,p=t.get("minAngle")*ab,g=0;e.each(i,function(t){!isNaN(t)&&g++});var v=e.getSum(i),m=Math.PI/(v||g)*2,y=t.get("clockwise"),_=t.get("roseType"),w=t.get("stillShowZeroSum"),b=e.getDataExtent(i);b[0]=0;var S=rb,M=0,I=f,T=y?1:-1;if(e.each(i,function(t,n){var i;if(isNaN(t))return void e.setItemLayout(n,{angle:0/0,startAngle:0/0,endAngle:0/0,clockwise:y,cx:u,cy:h,r0:c,r:_?0/0:d});i="area"!==_?0===v&&w?m:t*m:rb/g,p>i?(i=p,S-=p):M+=t;var r=I+T*i;e.setItemLayout(n,{angle:i,startAngle:I,endAngle:r,clockwise:y,cx:u,cy:h,r0:c,r:_?Ua(t,b,[c,d]):d}),I=r}),rb>S&&g)if(.001>=S){var C=rb/g;e.each(i,function(t,n){if(!isNaN(t)){var i=e.getItemLayout(n);i.angle=C,i.startAngle=f+T*n*C,i.endAngle=f+T*(n+1)*C}})}else m=S/M,I=f,e.each(i,function(t,n){if(!isNaN(t)){var i=e.getItemLayout(n),r=i.angle===p?p:t*m;i.startAngle=I,i.endAngle=I+T*r,I+=T*r}});ib(t,d,o,s)})},sb=function(t){return{seriesType:t,reset:function(t,e){var n=e.findComponents({mainType:"legend"});if(n&&n.length){var i=t.getData();i.filterSelf(function(t){for(var e=i.getName(t),r=0;r=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}}});$l("legendToggleSelect","legendselectchanged",_(dd,"toggleSelected")),$l("legendSelect","legendselected",_(dd,"select")),$l("legendUnSelect","legendunselected",_(dd,"unSelect"));var ub=_,hb=f,cb=bp,db=ru({type:"legend.plain",newlineDisabled:!1,init:function(){this.group.add(this._contentGroup=new cb),this._backgroundEl,this._isFirstRender=!0},getContentGroup:function(){return this._contentGroup},render:function(t,e,n){var i=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),t.get("show",!0)){var r=t.get("align");r&&"auto"!==r||(r="right"===t.get("left")&&"vertical"===t.get("orient")?"right":"left"),this.renderInner(r,t,e,n);var a=t.getBoxLayoutParams(),o={width:n.getWidth(),height:n.getHeight()},l=t.get("padding"),u=Mo(a,o,l),h=this.layoutInner(t,r,u,i),c=Mo(s({width:h.width,height:h.height},a),o,l);this.group.attr("position",[c.x-h.x,c.y-h.y]),this.group.add(this._backgroundEl=fd(h,t))}},resetInner:function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl)},renderInner:function(t,e,n,i){var r=this.getContentGroup(),a=N(),o=e.get("selectedMode"),s=[];n.eachRawSeries(function(t){!t.get("legendHoverLink")&&s.push(t.id)}),hb(e.getData(),function(l,u){var h=l.get("name");if(!this.newlineDisabled&&(""===h||"\n"===h))return void r.add(new cb({newline:!0}));var c=n.getSeriesByName(h)[0];if(!a.get(h))if(c){var d=c.getData(),f=d.getVisual("color");"function"==typeof f&&(f=f(c.getDataParams(0)));var p=d.getVisual("legendSymbol")||"roundRect",g=d.getVisual("symbol"),v=this._createItem(h,u,l,e,p,g,t,f,o);v.on("click",ub(pd,h,i)).on("mouseover",ub(gd,c.name,null,i,s)).on("mouseout",ub(vd,c.name,null,i,s)),a.set(h,!0)}else n.eachRawSeries(function(n){if(!a.get(h)&&n.legendDataProvider){var r=n.legendDataProvider(),c=r.indexOfName(h);if(0>c)return;var d=r.getItemVisual(c,"color"),f="roundRect",p=this._createItem(h,u,l,e,f,null,t,d,o);p.on("click",ub(pd,h,i)).on("mouseover",ub(gd,null,h,i,s)).on("mouseout",ub(vd,null,h,i,s)),a.set(h,!0)}},this)},this)},_createItem:function(t,e,n,i,r,a,s,l,u){var h=i.get("itemWidth"),c=i.get("itemHeight"),d=i.get("inactiveColor"),f=i.get("symbolKeepAspect"),p=i.isSelected(t),g=new cb,v=n.getModel("textStyle"),m=n.get("icon"),y=n.getModel("tooltip"),_=y.parentModel;if(r=m||r,g.add(vh(r,0,0,h,c,p?l:d,null==f?!0:f)),!m&&a&&(a!==r||"none"===a)){var x=.8*c;"none"===a&&(a="circle"),g.add(vh(a,(h-x)/2,(c-x)/2,x,x,p?l:d,null==f?!0:f))}var w="left"===s?h+5:-5,b=s,S=i.get("formatter"),M=t;"string"==typeof S&&S?M=S.replace("{name}",null!=t?t:""):"function"==typeof S&&(M=S(t)),g.add(new Bv({style:ba({},v,{text:M,x:w,y:c/2,textFill:p?v.getTextColor():d,textAlign:b,textVerticalAlign:"middle"})}));var I=new qv({shape:g.getBoundingRect(),invisible:!0,tooltip:y.get("show")?o({content:t,formatter:_.get("formatter",!0)||function(){return t},formatterParams:{componentType:"legend",legendIndex:i.componentIndex,name:t,$vars:["name"]}},y.option):null});return g.add(I),g.eachChild(function(t){t.silent=!0}),I.silent=!u,this.getContentGroup().add(g),_a(g),g.__legendDataIndex=e,g},layoutInner:function(t,e,n){var i=this.getContentGroup();Om(t.get("orient"),i,t.get("itemGap"),n.width,n.height);var r=i.getBoundingRect();return i.attr("position",[-r.x,-r.y]),this.group.getBoundingRect()},remove:function(){this.getContentGroup().removeAll(),this._isFirstRender=!0}}),fb=function(t){var e=t.findComponents({mainType:"legend"});e&&e.length&&t.filterSeries(function(t){for(var n=0;nn[l],p=[-c.x,-c.y];i||(p[s]=r.position[s]);var g=[0,0],v=[-d.x,-d.y],m=A(t.get("pageButtonGap",!0),t.get("itemGap",!0));if(f){var y=t.get("pageButtonPosition",!0);"end"===y?v[s]+=n[l]-d[l]:g[s]+=d[l]+m}v[1-s]+=c[u]/2-d[u]/2,r.attr("position",p),a.attr("position",g),o.attr("position",v);var _=this.group.getBoundingRect(),_={x:0,y:0};if(_[l]=f?n[l]:c[l],_[u]=Math.max(c[u],d[u]),_[h]=Math.min(0,d[h]+v[1-s]),a.__rectSize=n[l],f){var x={x:0,y:0};x[l]=Math.max(n[l]-d[l]-m,0),x[u]=_[u],a.setClipPath(new qv({shape:x})),a.__rectSize=x[l]}else o.eachChild(function(t){t.attr({invisible:!0,silent:!0})});var w=this._getPageInfo(t);return null!=w.pageIndex&&La(r,{position:w.contentPosition},f?t:!1),this._updatePageInfoView(t,w),_},_pageGo:function(t,e,n){var i=this._getPageInfo(e)[t];null!=i&&n.dispatchAction({type:"legendScroll",scrollDataIndex:i,legendId:e.id})},_updatePageInfoView:function(t,e){var n=this._controllerGroup;f(["pagePrev","pageNext"],function(i){var r=null!=e[i+"DataIndex"],a=n.childOfName(i);a&&(a.setStyle("fill",r?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),a.cursor=r?"pointer":"default")});var i=n.childOfName("pageText"),r=t.get("pageFormatter"),a=e.pageIndex,o=null!=a?a+1:0,s=e.pageCount;i&&r&&i.setStyle("text",b(r)?r.replace("{current}",o).replace("{total}",s):r({current:o,total:s}))},_getPageInfo:function(t){function e(t){if(t){var e=t.getBoundingRect(),n=e[l]+t.position[o];return{s:n,e:n+e[s],i:t.__legendDataIndex}}}function n(t,e){return t.e>=e&&t.s<=e+a}var i=t.get("scrollDataIndex",!0),r=this.getContentGroup(),a=this._containerGroup.__rectSize,o=t.getOrient().index,s=vb[o],l=mb[o],u=this._findTargetItemIndex(i),h=r.children(),c=h[u],d=h.length,f=d?1:0,p={contentPosition:r.position.slice(),pageCount:f,pageIndex:f-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!c)return p;var g=e(c);p.contentPosition[o]=-g.s;for(var v=u+1,m=g,y=g,_=null;d>=v;++v)_=e(h[v]),(!_&&y.e>m.s+a||_&&!n(_,m.s))&&(m=y.i>m.i?y:_,m&&(null==p.pageNextDataIndex&&(p.pageNextDataIndex=m.i),++p.pageCount)),y=_;for(var v=u-1,m=g,y=g,_=null;v>=-1;--v)_=e(h[v]),_&&n(y,_.s)||!(m.io||x(o))return{point:[]};var s=a.getItemGraphicEl(o),l=n.coordinateSystem;if(n.getTooltipPosition)i=n.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)i=l.dataToPoint(a.getValues(p(l.dimensions,function(t){return a.mapDimension(t)}),o,!0))||[];else if(s){var u=s.getBoundingRect().clone();u.applyTransform(s.transform),i=[u.x+u.width/2,u.y+u.height/2]}return{point:i,el:s}},xb=f,wb=_,bb=Yi(),Sb=function(t,e,n){var i=t.currTrigger,r=[t.x,t.y],a=t,o=t.dispatchAction||y(n.dispatchAction,n),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){Cd(r)&&(r=_b({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},e).point);var l=Cd(r),u=a.axesInfo,h=s.axesInfo,c="leave"===i||Cd(r),d={},f={},p={list:[],map:{}},g={showPointer:wb(xd,f),showTooltip:wb(wd,p)};xb(s.coordSysMap,function(t,e){var n=l||t.containPoint(r);xb(s.coordSysAxesInfo[e],function(t){var e=t.axis,i=Id(u,t);if(!c&&n&&(!u||i)){var a=i&&i.value;null!=a||l||(a=e.pointToData(r)),null!=a&&yd(t,a,g,!1,d)}})});var v={};return xb(h,function(t,e){var n=t.linkGroup;n&&!f[e]&&xb(n.axesInfo,function(e,i){var r=f[i];if(e!==t&&r){var a=r.value;n.mapper&&(a=t.axis.scale.parse(n.mapper(a,Td(e),Td(t)))),v[t.key]=a}})}),xb(v,function(t,e){yd(h[e],t,g,!0,d)}),bd(f,h,d),Sd(p,r,t,o),Md(h,o,n),d}},Mb=(iu({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}}}),Yi()),Ib=f,Tb=ru({type:"axisPointer",render:function(t,e,n){var i=e.getComponent("tooltip"),r=t.get("triggerOn")||i&&i.get("triggerOn")||"mousemove|click";Dd("axisPointer",n,function(t,e,n){"none"!==r&&("leave"===t||r.indexOf(t)>=0)&&n({type:"updateAxisPointer",currTrigger:t,x:e&&e.offsetX,y:e&&e.offsetY})})},remove:function(t,e){Bd(e.getZr(),"axisPointer"),Tb.superApply(this._model,"remove",arguments)},dispose:function(t,e){Bd("axisPointer",e),Tb.superApply(this._model,"dispose",arguments)}}),Cb=Yi(),Db=i,Ab=y;Ed.prototype={_group:null,_lastGraphicKey:null,_handle:null,_dragging:!1,_lastValue:null,_lastStatus:null,_payloadInfo:null,animationThreshold:15,render:function(t,e,n,i){var r=e.get("value"),a=e.get("status");if(this._axisModel=t,this._axisPointerModel=e,this._api=n,i||this._lastValue!==r||this._lastStatus!==a){this._lastValue=r,this._lastStatus=a;var o=this._group,s=this._handle;if(!a||"hide"===a)return o&&o.hide(),void(s&&s.hide());o&&o.show(),s&&s.show();var l={};this.makeElOption(l,r,t,e,n);var u=l.graphicKey;u!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=u;var h=this._moveAnimation=this.determineAnimation(t,e);if(o){var c=_(zd,e,h);this.updatePointerEl(o,l,c,e),this.updateLabelEl(o,l,c,e)}else o=this._group=new bp,this.createPointerEl(o,l,t,e),this.createLabelEl(o,l,t,e),n.getZr().add(o);Vd(o,e,!0),this._renderHandle(r)}},remove:function(t){this.clear(t)},dispose:function(t){this.clear(t)},determineAnimation:function(t,e){var n=e.get("animation"),i=t.axis,r="category"===i.type,a=e.get("snap");if(!a&&!r)return!1;if("auto"===n||null==n){var o=this.animationThreshold;if(r&&i.getBandWidth()>o)return!0;if(a){var s=bc(t).seriesDataCount,l=i.getExtent();return Math.abs(l[0]-l[1])/s>o}return!1}return n===!0},makeElOption:function(){},createPointerEl:function(t,e){var n=e.pointer;if(n){var i=Cb(t).pointerEl=new cm[n.type](Db(e.pointer));t.add(i)}},createLabelEl:function(t,e,n,i){if(e.label){var r=Cb(t).labelEl=new qv(Db(e.label));t.add(r),Nd(r,i)}},updatePointerEl:function(t,e,n){var i=Cb(t).pointerEl;i&&(i.setStyle(e.pointer.style),n(i,{shape:e.pointer.shape}))},updateLabelEl:function(t,e,n,i){var r=Cb(t).labelEl;r&&(r.setStyle(e.label.style),n(r,{shape:e.label.shape,position:e.label.position}),Nd(r,i))},_renderHandle:function(t){if(!this._dragging&&this.updateHandleTransform){var e=this._axisPointerModel,n=this._api.getZr(),i=this._handle,r=e.getModel("handle"),a=e.get("status");if(!r.get("show")||!a||"hide"===a)return i&&n.remove(i),void(this._handle=null);var o;this._handle||(o=!0,i=this._handle=Va(r.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){Rf(t.event)},onmousedown:Ab(this._onHandleDragMove,this,0,0),drift:Ab(this._onHandleDragMove,this),ondragend:Ab(this._onHandleDragEnd,this)}),n.add(i)),Vd(i,e,!1);var s=["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];i.setStyle(r.getItemStyle(null,s));var l=r.get("size");x(l)||(l=[l,l]),i.attr("scale",[l[0]/2,l[1]/2]),Ys(this,"_doDispatchAxisPointer",r.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,o)}},_moveHandleToValue:function(t,e){zd(this._axisPointerModel,!e&&this._moveAnimation,this._handle,Fd(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},_onHandleDragMove:function(t,e){var n=this._handle;if(n){this._dragging=!0;var i=this.updateHandleTransform(Fd(n),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=i,n.stopAnimation(),n.attr(Fd(i)),Cb(n).lastProp=null,this._doDispatchAxisPointer()}},_doDispatchAxisPointer:function(){var t=this._handle;if(t){var e=this._payloadInfo,n=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:n.axis.dim,axisIndex:n.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(),n=this._group,i=this._handle;e&&n&&(this._lastGraphicKey=null,n&&e.remove(n),i&&e.remove(i),this._group=null,this._handle=null,this._payloadInfo=null)},doClear:function(){},buildLabel:function(t,e,n){return n=n||0,{x:t[n],y:t[1-n],width:e[n],height:e[1-n]}}},Ed.prototype.constructor=Ed,Ji(Ed);var kb=Ed.extend({makeElOption:function(t,e,n,i,r){var a=n.axis,o=a.grid,s=i.get("type"),l=Zd(o,a).getOtherAxis(a).getGlobalExtent(),u=a.toGlobalCoord(a.dataToCoord(e,!0));if(s&&"none"!==s){var h=Hd(i),c=Pb[s](a,u,l,h);c.style=h,t.graphicKey=c.type,t.pointer=c}var d=Dc(o.model,n);qd(e,t,d,n,i,r)},getHandleTransform:function(t,e,n){var i=Dc(e.axis.grid.model,e,{labelInside:!1});return i.labelMargin=n.get("handle.margin"),{position:Yd(e.axis,t,i),rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(t,e,n){var i=n.axis,r=i.grid,a=i.getGlobalExtent(!0),o=Zd(r,i).getOtherAxis(i).getGlobalExtent(),s="x"===i.dim?0:1,l=t.position;l[s]+=e[s],l[s]=Math.min(a[1],l[s]),l[s]=Math.max(a[0],l[s]);var u=(o[1]+o[0])/2,h=[u,u];h[s]=l[s];var c=[{verticalAlign:"middle"},{align:"center"}];return{position:l,rotation:t.rotation,cursorPoint:h,tooltipOption:c[s]}}}),Pb={line:function(t,e,n,i){var r=jd([e,n[0]],[e,n[1]],$d(t));return ia({shape:r,style:i}),{type:"Line",shape:r}},shadow:function(t,e,n){var i=Math.max(1,t.getBandWidth()),r=n[1]-n[0];return{type:"Rect",shape:Ud([e-i/2,n[0]],[i,r],$d(t))}}};Mw.registerAxisPointerClass("CartesianAxisPointer",kb),jl(function(t){if(t){(!t.axisPointer||0===t.axisPointer.length)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!x(e)&&(t.axisPointer.link=[e])}}),Ul(S_.PROCESSOR.STATISTIC,function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=gc(t,e)}),$l({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},Sb),iu({type:"tooltip",dependencies:["axisPointer"],defaultOption:{zlevel:0,z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",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 Lb=f,Ob=fo,Bb=["","-webkit-","-moz-","-o-"],Eb="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;";tf.prototype={constructor:tf,_enterable:!0,update:function(){var t=this._container,e=t.currentStyle||document.defaultView.getComputedStyle(t),n=t.style;"absolute"!==n.position&&"absolute"!==e.position&&(n.position="relative")},show:function(t){clearTimeout(this._hideTimeout);var e=this.el;e.style.cssText=Eb+Jd(t)+";left:"+this._x+"px;top:"+this._y+"px;"+(t.get("extraCssText")||""),e.style.display=e.innerHTML?"block":"none",e.style.pointerEvents=this._enterable?"auto":"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 n,i=this._zr;i&&i.painter&&(n=i.painter.getViewportRootOffset())&&(t+=n.offsetLeft,e+=n.offsetTop);var r=this.el.style;r.left=t+"px",r.top=e+"px",this._x=t,this._y=e},hide:function(){this.el.style.display="none",this._show=!1},hideLater:function(t){!this._show||this._inContent&&this._enterable||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(y(this.hide,this),t)):this.hide())},isShow:function(){return this._show},getOuterSize:function(){var t=this.el.clientWidth,e=this.el.clientHeight;if(document.defaultView&&document.defaultView.getComputedStyle){var n=document.defaultView.getComputedStyle(this.el);n&&(t+=parseInt(n.paddingLeft,10)+parseInt(n.paddingRight,10)+parseInt(n.borderLeftWidth,10)+parseInt(n.borderRightWidth,10),e+=parseInt(n.paddingTop,10)+parseInt(n.paddingBottom,10)+parseInt(n.borderTopWidth,10)+parseInt(n.borderBottomWidth,10))}return{width:t,height:e}}},ef.prototype={constructor:ef,_enterable:!0,update:function(){},show:function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.attr("show",!0),this._show=!0},setContent:function(t,e,n){this.el&&this._zr.remove(this.el);for(var i={},r=t,a="{marker",o="|}",s=r.indexOf(a);s>=0;){var l=r.indexOf(o),u=r.substr(s+a.length,l-s-a.length);i["marker"+u]=u.indexOf("sub")>-1?{textWidth:4,textHeight:4,textBorderRadius:2,textBackgroundColor:e[u],textOffset:[3,0]}:{textWidth:10,textHeight:10,textBorderRadius:5,textBackgroundColor:e[u]},r=r.substr(l+1),s=r.indexOf("{marker")}this.el=new Bv({style:{rich:i,text:t,textLineHeight:20,textBackgroundColor:n.get("backgroundColor"),textBorderRadius:n.get("borderRadius"),textFill:n.get("textStyle.color"),textPadding:n.get("padding")},z:n.get("z")}),this._zr.add(this.el);var h=this;this.el.on("mouseover",function(){h._enterable&&(clearTimeout(h._hideTimeout),h._show=!0),h._inContent=!0}),this.el.on("mouseout",function(){h._enterable&&h._show&&h.hideLater(h._hideDelay),h._inContent=!1})},setEnterable:function(t){this._enterable=t},getSize:function(){var t=this.el.getBoundingRect();return[t.width,t.height]},moveTo:function(t,e){this.el&&this.el.attr("position",[t,e])},hide:function(){this.el.hide(),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},getOuterSize:function(){return this.getSize()}};var zb=y,Rb=f,Nb=Za,Fb=new qv({shape:{x:-1,y:-1,width:2,height:2}});ru({type:"tooltip",init:function(t,e){if(!df.node){var n=t.getComponent("tooltip"),i=n.get("renderMode");this._renderMode=$i(i);var r;"html"===this._renderMode?(r=new tf(e.getDom(),e),this._newLine="
"):(r=new ef(e),this._newLine="\n"),this._tooltipContent=r}},render:function(t,e,n){if(!df.node){this.group.removeAll(),this._tooltipModel=t,this._ecModel=e,this._api=n,this._lastDataByCoordSys=null,this._alwaysShowContent=t.get("alwaysShowContent");var i=this._tooltipContent;i.update(),i.setEnterable(t.get("enterable")),this._initGlobalListener(),this._keepShow()}},_initGlobalListener:function(){var t=this._tooltipModel,e=t.get("triggerOn");Dd("itemTooltip",this._api,zb(function(t,n,i){"none"!==e&&(e.indexOf(t)>=0?this._tryShow(n,i):"leave"===t&&this._hide(i))},this))},_keepShow:function(){var t=this._tooltipModel,e=this._ecModel,n=this._api;if(null!=this._lastX&&null!=this._lastY&&"none"!==t.get("triggerOn")){var i=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){i.manuallyShowTip(t,e,n,{x:i._lastX,y:i._lastY})})}},manuallyShowTip:function(t,e,n,i){if(i.from!==this.uid&&!df.node){var r=rf(i,n);this._ticket="";var a=i.dataByCoordSys;if(i.tooltip&&null!=i.x&&null!=i.y){var o=Fb;o.position=[i.x,i.y],o.update(),o.tooltip=i.tooltip,this._tryShow({offsetX:i.x,offsetY:i.y,target:o},r)}else if(a)this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,event:{},dataByCoordSys:i.dataByCoordSys,tooltipOption:i.tooltipOption},r);else if(null!=i.seriesIndex){if(this._manuallyAxisShowTip(t,e,n,i))return;var s=_b(i,e),l=s.point[0],u=s.point[1];null!=l&&null!=u&&this._tryShow({offsetX:l,offsetY:u,position:i.position,target:s.el,event:{}},r)}else null!=i.x&&null!=i.y&&(n.dispatchAction({type:"updateAxisPointer",x:i.x,y:i.y}),this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,target:n.getZr().findHover(i.x,i.y).target,event:{}},r))}},manuallyHideTip:function(t,e,n,i){var r=this._tooltipContent;!this._alwaysShowContent&&this._tooltipModel&&r.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=null,i.from!==this.uid&&this._hide(rf(i,n))},_manuallyAxisShowTip:function(t,e,n,i){var r=i.seriesIndex,a=i.dataIndex,o=e.getComponent("axisPointer").coordSysAxesInfo;if(null!=r&&null!=a&&null!=o){var s=e.getSeriesByIndex(r);if(s){var l=s.getData(),t=nf([l.getItemModel(a),s,(s.coordinateSystem||{}).model,t]);if("axis"===t.get("trigger"))return n.dispatchAction({type:"updateAxisPointer",seriesIndex:r,dataIndex:a,position:i.position}),!0}}},_tryShow:function(t,e){var n=t.target,i=this._tooltipModel;if(i){this._lastX=t.offsetX,this._lastY=t.offsetY;var r=t.dataByCoordSys;r&&r.length?this._showAxisTooltip(r,t):n&&null!=n.dataIndex?(this._lastDataByCoordSys=null,this._showSeriesItemTooltip(t,n,e)):n&&n.tooltip?(this._lastDataByCoordSys=null,this._showComponentItemTooltip(t,n,e)):(this._lastDataByCoordSys=null,this._hide(e))}},_showOrMove:function(t,e){var n=t.get("showDelay");e=y(e,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(e,n):e()},_showAxisTooltip:function(t,e){var n=this._ecModel,i=this._tooltipModel,a=[e.offsetX,e.offsetY],o=[],s=[],l=nf([e.tooltipOption,i]),u=this._renderMode,h=this._newLine,c={};Rb(t,function(t){Rb(t.dataByAxis,function(t){var e=n.getComponent(t.axisDim+"Axis",t.axisIndex),i=t.value,a=[];if(e&&null!=i){var l=Xd(i,e.axis,n,t.seriesDataIndices,t.valueLabelOpt);f(t.seriesDataIndices,function(o){var h=n.getSeriesByIndex(o.seriesIndex),d=o.dataIndexInside,f=h&&h.getDataParams(d);if(f.axisDim=t.axisDim,f.axisIndex=t.axisIndex,f.axisType=t.axisType,f.axisId=t.axisId,f.axisValue=hh(e.axis,i),f.axisValueLabel=l,f){s.push(f);var p,g=h.formatTooltip(d,!0,null,u);if(S(g)){p=g.html;var v=g.markers;r(c,v)}else p=g;a.push(p)}});var d=l;o.push("html"!==u?a.join(h):(d?po(d)+h:"")+a.join(h))}})},this),o.reverse(),o=o.join(this._newLine+this._newLine);var d=e.position;this._showOrMove(l,function(){this._updateContentNotChangedOnAxis(t)?this._updatePosition(l,d,a[0],a[1],this._tooltipContent,s):this._showTooltipContent(l,o,s,Math.random(),a[0],a[1],d,void 0,c)})},_showSeriesItemTooltip:function(t,e,n){var i=this._ecModel,r=e.seriesIndex,a=i.getSeriesByIndex(r),o=e.dataModel||a,s=e.dataIndex,l=e.dataType,u=o.getData(),h=nf([u.getItemModel(s),o,a&&(a.coordinateSystem||{}).model,this._tooltipModel]),c=h.get("trigger");if(null==c||"item"===c){var d,f,p=o.getDataParams(s,l),g=o.formatTooltip(s,!1,l,this._renderMode);S(g)?(d=g.html,f=g.markers):(d=g,f=null);var v="item_"+o.name+"_"+s;this._showOrMove(h,function(){this._showTooltipContent(h,d,p,v,t.offsetX,t.offsetY,t.position,t.target,f)}),n({type:"showTip",dataIndexInside:s,dataIndex:u.getRawIndex(s),seriesIndex:r,from:this.uid})}},_showComponentItemTooltip:function(t,e,n){var i=e.tooltip;if("string"==typeof i){var r=i;i={content:r,formatter:r}}var a=new Ha(i,this._tooltipModel,this._ecModel),o=a.get("content"),s=Math.random();this._showOrMove(a,function(){this._showTooltipContent(a,o,a.get("formatterParams")||{},s,t.offsetX,t.offsetY,t.position,e)}),n({type:"showTip",from:this.uid})},_showTooltipContent:function(t,e,n,i,r,a,o,s,l){if(this._ticket="",t.get("showContent")&&t.get("show")){var u=this._tooltipContent,h=t.get("formatter");o=o||t.get("position");var c=e;if(h&&"string"==typeof h)c=go(h,n,!0);else if("function"==typeof h){var d=zb(function(e,i){e===this._ticket&&(u.setContent(i,l,t),this._updatePosition(t,o,r,a,u,n,s))},this);this._ticket=i,c=h(n,i,d)}u.setContent(c,l,t),u.show(t),this._updatePosition(t,o,r,a,u,n,s)}},_updatePosition:function(t,e,n,i,r,a,o){var s=this._api.getWidth(),l=this._api.getHeight();e=e||t.get("position");var u=r.getSize(),h=t.get("align"),c=t.get("verticalAlign"),d=o&&o.getBoundingRect().clone();if(o&&d.applyTransform(o.transform),"function"==typeof e&&(e=e([n,i],a,r.el,d,{viewSize:[s,l],contentSize:u.slice()})),x(e))n=Nb(e[0],s),i=Nb(e[1],l);else if(S(e)){e.width=u[0],e.height=u[1];var f=Mo(e,{width:s,height:l});n=f.x,i=f.y,h=null,c=null}else if("string"==typeof e&&o){var p=sf(e,d,u);n=p[0],i=p[1]}else{var p=af(n,i,r,s,l,h?null:20,c?null:20);n=p[0],i=p[1]}if(h&&(n-=lf(h)?u[0]/2:"right"===h?u[0]:0),c&&(i-=lf(c)?u[1]/2:"bottom"===c?u[1]:0),t.get("confine")){var p=of(n,i,r,s,l);n=p[0],i=p[1]}r.moveTo(n,i)},_updateContentNotChangedOnAxis:function(t){var e=this._lastDataByCoordSys,n=!!e&&e.length===t.length;return n&&Rb(e,function(e,i){var r=e.dataByAxis||{},a=t[i]||{},o=a.dataByAxis||[];n&=r.length===o.length,n&&Rb(r,function(t,e){var i=o[e]||{},r=t.seriesDataIndices||[],a=i.seriesDataIndices||[];n&=t.value===i.value&&t.axisType===i.axisType&&t.axisId===i.axisId&&r.length===a.length,n&&Rb(r,function(t,e){var i=a[e];n&=t.seriesIndex===i.seriesIndex&&t.dataIndex===i.dataIndex})})}),this._lastDataByCoordSys=t,!!n},_hide:function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},dispose:function(t,e){df.node||(this._tooltipContent.hide(),Bd("itemTooltip",e))}}),$l({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},function(){}),$l({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},function(){}),t.version=f_,t.dependencies=p_,t.PRIORITY=S_,t.init=Vl,t.connect=Hl,t.disConnect=Gl,t.disconnect=W_,t.dispose=Wl,t.getInstanceByDom=Xl,t.getInstanceById=Yl,t.registerTheme=ql,t.registerPreprocessor=jl,t.registerProcessor=Ul,t.registerPostUpdate=Zl,t.registerAction=$l,t.registerCoordinateSystem=Kl,t.getCoordinateSystemDimensions=Ql,t.registerLayout=Jl,t.registerVisual=tu,t.registerLoading=nu,t.extendComponentModel=iu,t.extendComponentView=ru,t.extendSeriesModel=au,t.extendChartView=ou,t.setCanvasCreator=su,t.registerMap=lu,t.getMap=uu,t.dataTool=X_,t.zrender=mg,t.number=bm,t.format=Am,t.throttle=Xs,t.helper=qx,t.matrix=Xf,t.vector=Lf,t.color=up,t.parseGeoJSON=Ux,t.parseGeoJson=Qx,t.util=Jx,t.graphic=tw,t.List=nx,t.Model=Ha,t.Axis=Kx,t.env=df});