From d56fc66aa8ec51ace577fa05ebd45dbccb27ce00 Mon Sep 17 00:00:00 2001 From: peyxgo6zl <1506421526@qq.com> Date: Tue, 10 May 2022 16:30:45 +0800 Subject: [PATCH] ADD file via upload --- static/assets/js/echarts.min.js | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 static/assets/js/echarts.min.js diff --git a/static/assets/js/echarts.min.js b/static/assets/js/echarts.min.js new file mode 100644 index 0000000..f59cf04 --- /dev/null +++ b/static/assets/js/echarts.min.js @@ -0,0 +1,25 @@ +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.echarts={})}(this,function(t){"use strict";function e(t){var e={},i={},n=t.match(/Firefox\/([\d.]+)/),a=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),o=t.match(/Edge\/([\d.]+)/),r=/micromessenger/i.test(t);return n&&(i.firefox=!0,i.version=n[1]),a&&(i.ie=!0,i.version=a[1]),o&&(i.edge=!0,i.version=o[1]),r&&(i.weChat=!0),{browser:i,os:e,node:!1,canvasSupported:!!document.createElement("canvas").getContext,svgSupported:"undefined"!=typeof SVGRect,touchEventsSupported:"ontouchstart"in window&&!i.ie&&!i.edge,pointerEventsSupported:"onpointerdown"in window&&(i.edge||i.ie&&i.version>=11),domSupported:"undefined"!=typeof document}}function i(t,e){"createCanvas"===t&&(vS=null),gS[t]=e}function n(t){if(null==t||"object"!=typeof t)return t;var e=t,i=lS.call(t);if("[object Array]"===i){if(!R(t)){e=[];for(var a=0,o=t.length;o>a;a++)e[a]=n(t[a])}}else if(sS[i]){if(!R(t)){var r=t.constructor;if(t.constructor.from)e=r.from(t);else{e=new r(t.length);for(var a=0,o=t.length;o>a;a++)e[a]=n(t[a])}}}else if(!rS[i]&&!R(t)&&!T(t)){e={};for(var s in t)t.hasOwnProperty(s)&&(e[s]=n(t[s]))}return e}function a(t,e,i){if(!S(e)||!S(t))return i?n(e):t;for(var o in e)if(e.hasOwnProperty(o)){var r=t[o],s=e[o];!S(s)||!S(r)||_(s)||_(r)||T(s)||T(r)||M(s)||M(r)||R(s)||R(r)?!i&&o in t||(t[o]=n(e[o],!0)):a(r,s,i)}return t}function o(t,e){for(var i=t[0],n=1,o=t.length;o>n;n++)i=a(i,t[n],e);return i}function r(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);return t}function s(t,e,i){for(var n in e)e.hasOwnProperty(n)&&(i?null!=e[n]:null==t[n])&&(t[n]=e[n]);return t}function l(){return vS||(vS=mS().getContext("2d")),vS}function u(t,e){if(t){if(t.indexOf)return t.indexOf(e);for(var i=0,n=t.length;n>i;i++)if(t[i]===e)return i}return-1}function h(t,e){function i(){}var n=t.prototype;i.prototype=e.prototype,t.prototype=new i;for(var a in n)n.hasOwnProperty(a)&&(t.prototype[a]=n[a]);t.prototype.constructor=t,t.superClass=e}function c(t,e,i){t="prototype"in t?t.prototype:t,e="prototype"in e?e.prototype:e,s(t,e,i)}function d(t){return t?"string"==typeof t?!1:"number"==typeof t.length:void 0}function f(t,e,i){if(t&&e)if(t.forEach&&t.forEach===hS)t.forEach(e,i);else if(t.length===+t.length)for(var n=0,a=t.length;a>n;n++)e.call(i,t[n],n,t);else for(var o in t)t.hasOwnProperty(o)&&e.call(i,t[o],o,t)}function p(t,e,i){if(t&&e){if(t.map&&t.map===fS)return t.map(e,i);for(var n=[],a=0,o=t.length;o>a;a++)n.push(e.call(i,t[a],a,t));return n}}function g(t,e,i,n){if(t&&e){if(t.reduce&&t.reduce===pS)return t.reduce(e,i,n);for(var a=0,o=t.length;o>a;a++)i=e.call(n,i,t[a],a,t);return i}}function m(t,e,i){if(t&&e){if(t.filter&&t.filter===cS)return t.filter(e,i);for(var n=[],a=0,o=t.length;o>a;a++)e.call(i,t[a],a,t)&&n.push(t[a]);return n}}function v(t,e,i){if(t&&e)for(var n=0,a=t.length;a>n;n++)if(e.call(i,t[n],n,t))return t[n]}function y(t,e){var i=dS.call(arguments,2);return function(){return t.apply(e,i.concat(dS.call(arguments)))}}function x(t){var e=dS.call(arguments,1);return function(){return t.apply(this,e.concat(dS.call(arguments)))}}function _(t){return"[object Array]"===lS.call(t)}function w(t){return"function"==typeof t}function b(t){return"[object String]"===lS.call(t)}function S(t){var e=typeof t;return"function"===e||!!t&&"object"===e}function M(t){return!!rS[lS.call(t)]}function I(t){return!!sS[lS.call(t)]}function T(t){return"object"==typeof t&&"number"==typeof t.nodeType&&"object"==typeof t.ownerDocument}function A(t){return t!==t}function D(){for(var t=0,e=arguments.length;e>t;t++)if(null!=arguments[t])return arguments[t]}function C(t,e){return null!=t?t:e}function L(t,e,i){return null!=t?t:null!=e?e:i}function k(){return Function.call.apply(dS,arguments)}function P(t){if("number"==typeof t)return[t,t,t,t];var e=t.length;return 2===e?[t[0],t[1],t[0],t[1]]:3===e?[t[0],t[1],t[2],t[1]]:t}function O(t,e){if(!t)throw new Error(e)}function N(t){return null==t?null:"function"==typeof t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}function z(t){t[yS]=!0}function R(t){return t[yS]}function E(t){function e(t,e){i?n.set(t,e):n.set(e,t)}var i=_(t);this.data={};var n=this;t instanceof E?t.each(e):t&&f(t,e)}function B(t){return new E(t)}function V(t,e){for(var i=new t.constructor(t.length+e.length),n=0;nd;d++){var p=1<r;r++)for(var s=0;8>s;s++)null==o[s]&&(o[s]=0),o[s]+=((r+s)%2?-1:1)*de(i,7,0===r?1:0,1<o;o++){var r=document.createElement("div"),s=r.style,l=o%2,u=(o>>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",n[l]+":0",a[u]+":0",n[1-l]+":auto",a[1-u]+":auto",""].join("!important;"),t.appendChild(r),i.push(r)}return i}function ve(t,e,i){for(var n=i?"invTrans":"trans",a=e[n],o=e.srcCoords,r=!0,s=[],l=[],u=0;4>u;u++){var h=t[u].getBoundingClientRect(),c=2*u,d=h.left,f=h.top;s.push(d,f),r=r&&o&&d===o[c]&&f===o[c+1],l.push(t[u].offsetLeft,t[u].offsetTop)}return r&&a?a:(e.srcCoords=s,e[n]=i?fe(l,s):fe(s,l))}function ye(t){return"CANVAS"===t.nodeName.toUpperCase()}function xe(t,e,i,n){return i=i||{},n||!oS.canvasSupported?_e(t,e,i):oS.browser.firefox&&null!=e.layerX&&e.layerX!==e.offsetX?(i.zrX=e.layerX,i.zrY=e.layerY):null!=e.offsetX?(i.zrX=e.offsetX,i.zrY=e.offsetY):_e(t,e,i),i}function _e(t,e,i){if(oS.domSupported&&t.getBoundingClientRect){var n=e.clientX,a=e.clientY;if(ye(t)){var o=t.getBoundingClientRect();return i.zrX=n-o.left,void(i.zrY=a-o.top)}if(ge(OS,t,n,a))return i.zrX=OS[0],void(i.zrY=OS[1])}i.zrX=i.zrY=0}function we(t){return t||window.event}function be(t,e,i){if(e=we(e),null!=e.zrX)return e;var n=e.type,a=n&&n.indexOf("touch")>=0;if(a){var o="touchend"!==n?e.targetTouches[0]:e.changedTouches[0];o&&xe(t,o,e,i)}else xe(t,e,e,i),e.zrDelta=e.wheelDelta?e.wheelDelta/120:-(e.detail||0)/3;var r=e.button;return null==e.which&&void 0!==r&&PS.test(e.type)&&(e.which=1&r?1:2&r?3:4&r?2:0),e}function Se(t,e,i,n){kS?t.addEventListener(e,i,n):t.attachEvent("on"+e,i)}function Me(t,e,i,n){kS?t.removeEventListener(e,i,n):t.detachEvent("on"+e,i)}function Ie(t){return 2===t.which||3===t.which}function Te(t){var e=t[1][0]-t[0][0],i=t[1][1]-t[0][1];return Math.sqrt(e*e+i*i)}function Ae(t){return[(t[0][0]+t[1][0])/2,(t[0][1]+t[1][1])/2]}function De(t,e,i){return{type:t,event:i,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:i.zrX,offsetY:i.zrY,gestureEvent:i.gestureEvent,pinchX:i.pinchX,pinchY:i.pinchY,pinchScale:i.pinchScale,wheelDelta:i.zrDelta,zrByTouch:i.zrByTouch,which:i.which,stop:Ce}}function Ce(){NS(this.event)}function Le(){}function ke(t,e,i){if(t[t.rectHover?"rectContain":"contain"](e,i)){for(var n,a=t;a;){if(a.clipPath&&!a.clipPath.contain(e,i))return!1;a.silent&&(n=!0),a=a.parent}return n?ES:!0}return!1}function Pe(t,e,i){var n=t.painter;return 0>e||e>n.getWidth()||0>i||i>n.getHeight()}function Oe(){var t=new GS(6);return Ne(t),t}function Ne(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function ze(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 Re(t,e,i){var n=e[0]*i[0]+e[2]*i[1],a=e[1]*i[0]+e[3]*i[1],o=e[0]*i[2]+e[2]*i[3],r=e[1]*i[2]+e[3]*i[3],s=e[0]*i[4]+e[2]*i[5]+e[4],l=e[1]*i[4]+e[3]*i[5]+e[5];return t[0]=n,t[1]=a,t[2]=o,t[3]=r,t[4]=s,t[5]=l,t}function Ee(t,e,i){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+i[0],t[5]=e[5]+i[1],t}function Be(t,e,i){var n=e[0],a=e[2],o=e[4],r=e[1],s=e[3],l=e[5],u=Math.sin(i),h=Math.cos(i);return t[0]=n*h+r*u,t[1]=-n*u+r*h,t[2]=a*h+s*u,t[3]=-a*u+h*s,t[4]=h*o+u*l,t[5]=h*l-u*o,t}function Ve(t,e,i){var n=i[0],a=i[1];return t[0]=e[0]*n,t[1]=e[1]*a,t[2]=e[2]*n,t[3]=e[3]*a,t[4]=e[4]*n,t[5]=e[5]*a,t}function Ge(t,e){var i=e[0],n=e[2],a=e[4],o=e[1],r=e[3],s=e[5],l=i*r-o*n;return l?(l=1/l,t[0]=r*l,t[1]=-o*l,t[2]=-n*l,t[3]=i*l,t[4]=(n*s-r*a)*l,t[5]=(o*a-i*s)*l,t):null}function Fe(t){var e=Oe();return ze(e,t),e}function We(t){return t>HS||-HS>t}function He(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 Ze(t){return t=Math.round(t),0>t?0:t>255?255:t}function Xe(t){return t=Math.round(t),0>t?0:t>360?360:t}function Ue(t){return 0>t?0:t>1?1:t}function Ye(t){return Ze(t.length&&"%"===t.charAt(t.length-1)?parseFloat(t)/100*255:parseInt(t,10))}function je(t){return Ue(t.length&&"%"===t.charAt(t.length-1)?parseFloat(t)/100:parseFloat(t))}function qe(t,e,i){return 0>i?i+=1:i>1&&(i-=1),1>6*i?t+(e-t)*i*6:1>2*i?e:2>3*i?t+(e-t)*(2/3-i)*6:t}function Ke(t,e,i){return t+(e-t)*i}function $e(t,e,i,n,a){return t[0]=e,t[1]=i,t[2]=n,t[3]=a,t}function Je(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function Qe(t,e){nM&&Je(nM,e),nM=iM.put(t,nM||e.slice())}function ti(t,e){if(t){e=e||[];var i=iM.get(t);if(i)return Je(e,i);t+="";var n=t.replace(/ /g,"").toLowerCase();if(n in eM)return Je(e,eM[n]),Qe(t,e),e;if("#"!==n.charAt(0)){var a=n.indexOf("("),o=n.indexOf(")");if(-1!==a&&o+1===n.length){var r=n.substr(0,a),s=n.substr(a+1,o-(a+1)).split(","),l=1;switch(r){case"rgba":if(4!==s.length)return void $e(e,0,0,0,1);l=je(s.pop());case"rgb":return 3!==s.length?void $e(e,0,0,0,1):($e(e,Ye(s[0]),Ye(s[1]),Ye(s[2]),l),Qe(t,e),e);case"hsla":return 4!==s.length?void $e(e,0,0,0,1):(s[3]=je(s[3]),ei(s,e),Qe(t,e),e);case"hsl":return 3!==s.length?void $e(e,0,0,0,1):(ei(s,e),Qe(t,e),e);default:return}}$e(e,0,0,0,1)}else{if(4===n.length){var u=parseInt(n.substr(1),16);return u>=0&&4095>=u?($e(e,(3840&u)>>4|(3840&u)>>8,240&u|(240&u)>>4,15&u|(15&u)<<4,1),Qe(t,e),e):void $e(e,0,0,0,1)}if(7===n.length){var u=parseInt(n.substr(1),16);return u>=0&&16777215>=u?($e(e,(16711680&u)>>16,(65280&u)>>8,255&u,1),Qe(t,e),e):void $e(e,0,0,0,1)}}}}function ei(t,e){var i=(parseFloat(t[0])%360+360)%360/360,n=je(t[1]),a=je(t[2]),o=.5>=a?a*(n+1):a+n-a*n,r=2*a-o;return e=e||[],$e(e,Ze(255*qe(r,o,i+1/3)),Ze(255*qe(r,o,i)),Ze(255*qe(r,o,i-1/3)),1),4===t.length&&(e[3]=t[3]),e}function ii(t){if(t){var e,i,n=t[0]/255,a=t[1]/255,o=t[2]/255,r=Math.min(n,a,o),s=Math.max(n,a,o),l=s-r,u=(s+r)/2;if(0===l)e=0,i=0;else{i=.5>u?l/(s+r):l/(2-s-r);var h=((s-n)/6+l/2)/l,c=((s-a)/6+l/2)/l,d=((s-o)/6+l/2)/l;n===s?e=d-c:a===s?e=1/3+h-d:o===s&&(e=2/3+c-h),0>e&&(e+=1),e>1&&(e-=1)}var f=[360*e,i,u];return null!=t[3]&&f.push(t[3]),f}}function ni(t,e){var i=ti(t);if(i){for(var n=0;3>n;n++)i[n]=0>e?i[n]*(1-e)|0:(255-i[n])*e+i[n]|0,i[n]>255?i[n]=255:t[n]<0&&(i[n]=0);return ui(i,4===i.length?"rgba":"rgb")}}function ai(t){var e=ti(t);return e?((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1):void 0}function oi(t,e,i){if(e&&e.length&&t>=0&&1>=t){i=i||[];var n=t*(e.length-1),a=Math.floor(n),o=Math.ceil(n),r=e[a],s=e[o],l=n-a;return i[0]=Ze(Ke(r[0],s[0],l)),i[1]=Ze(Ke(r[1],s[1],l)),i[2]=Ze(Ke(r[2],s[2],l)),i[3]=Ue(Ke(r[3],s[3],l)),i}}function ri(t,e,i){if(e&&e.length&&t>=0&&1>=t){var n=t*(e.length-1),a=Math.floor(n),o=Math.ceil(n),r=ti(e[a]),s=ti(e[o]),l=n-a,u=ui([Ze(Ke(r[0],s[0],l)),Ze(Ke(r[1],s[1],l)),Ze(Ke(r[2],s[2],l)),Ue(Ke(r[3],s[3],l))],"rgba");return i?{color:u,leftIndex:a,rightIndex:o,value:n}:u}}function si(t,e,i,n){return t=ti(t),t?(t=ii(t),null!=e&&(t[0]=Xe(e)),null!=i&&(t[1]=je(i)),null!=n&&(t[2]=je(n)),ui(ei(t),"rgba")):void 0}function li(t,e){return t=ti(t),t&&null!=e?(t[3]=Ue(e),ui(t,"rgba")):void 0}function ui(t,e){if(t&&t.length){var i=t[0]+","+t[1]+","+t[2];return("rgba"===e||"hsva"===e||"hsla"===e)&&(i+=","+t[3]),e+"("+i+")"}}function hi(t,e){return t[e]}function ci(t,e,i){t[e]=i}function di(t,e,i){return(e-t)*i+t}function fi(t,e,i){return i>.5?e:t}function pi(t,e,i,n,a){var o=t.length;if(1===a)for(var r=0;o>r;r++)n[r]=di(t[r],e[r],i);else for(var s=o&&t[0].length,r=0;o>r;r++)for(var l=0;s>l;l++)n[r][l]=di(t[r][l],e[r][l],i)}function gi(t,e,i){var n=t.length,a=e.length;if(n!==a){var o=n>a;if(o)t.length=a;else for(var r=n;a>r;r++)t.push(1===i?e[r]:sM.call(e[r]))}for(var s=t[0]&&t[0].length,r=0;rl;l++)isNaN(t[r][l])&&(t[r][l]=e[r][l])}function mi(t,e,i){if(t===e)return!0;var n=t.length;if(n!==e.length)return!1;if(1===i){for(var a=0;n>a;a++)if(t[a]!==e[a])return!1}else for(var o=t[0].length,a=0;n>a;a++)for(var r=0;o>r;r++)if(t[a][r]!==e[a][r])return!1;return!0}function vi(t,e,i,n,a,o,r,s,l){var u=t.length;if(1===l)for(var h=0;u>h;h++)s[h]=yi(t[h],e[h],i[h],n[h],a,o,r);else for(var c=t[0].length,h=0;u>h;h++)for(var d=0;c>d;d++)s[h][d]=yi(t[h][d],e[h][d],i[h][d],n[h][d],a,o,r)}function yi(t,e,i,n,a,o,r){var s=.5*(i-t),l=.5*(n-e);return(2*(e-i)+s+l)*r+(-3*(e-i)-2*s-l)*o+s*a+e}function xi(t){if(d(t)){var e=t.length;if(d(t[0])){for(var i=[],n=0;e>n;n++)i.push(sM.call(t[n]));return i}return sM.call(t)}return t}function _i(t){return t[0]=Math.floor(t[0]),t[1]=Math.floor(t[1]),t[2]=Math.floor(t[2]),"rgba("+t.join(",")+")"}function wi(t){var e=t[t.length-1].value;return d(e&&e[0])?2:1}function bi(t,e,i,n,a,o){var r=t._getter,s=t._setter,l="spline"===e,u=n.length;if(u){var h,c=n[0].value,f=d(c),p=!1,g=!1,m=f?wi(n):0;n.sort(function(t,e){return t.time-e.time}),h=n[u-1].time;for(var v=[],y=[],x=n[0].value,_=!0,w=0;u>w;w++){v.push(n[w].time/h);var b=n[w].value;if(f&&mi(b,x,m)||!f&&b===x||(_=!1),x=b,"string"==typeof b){var S=ti(b);S?(b=S,p=!0):g=!0}y.push(b)}if(o||!_){for(var M=y[u-1],w=0;u-1>w;w++)f?gi(y[w],M,m):!isNaN(y[w])||isNaN(M)||g||p||(y[w]=M);f&&gi(r(t._target,a),M,m);var I,T,A,D,C,L,k=0,P=0;if(p)var O=[0,0,0,0];var N=function(t,e){var i;if(0>e)i=0;else if(P>e){for(I=Math.min(k+1,u-1),i=I;i>=0&&!(v[i]<=e);i--);i=Math.min(i,u-2)}else{for(i=k;u>i&&!(v[i]>e);i++);i=Math.min(i-1,u-2)}k=i,P=e;var n=v[i+1]-v[i];if(0!==n)if(T=(e-v[i])/n,l)if(D=y[i],A=y[0===i?i:i-1],C=y[i>u-2?u-1:i+1],L=y[i>u-3?u-1:i+2],f)vi(A,D,C,L,T,T*T,T*T*T,r(t,a),m);else{var o;if(p)o=vi(A,D,C,L,T,T*T,T*T*T,O,1),o=_i(O);else{if(g)return fi(D,C,T);o=yi(A,D,C,L,T,T*T,T*T*T)}s(t,a,o)}else if(f)pi(y[i],y[i+1],T,r(t,a),m);else{var o;if(p)pi(y[i],y[i+1],T,O,1),o=_i(O);else{if(g)return fi(y[i],y[i+1],T);o=di(y[i],y[i+1],T)}s(t,a,o)}},z=new He({target:t._target,life:h,loop:t._loop,delay:t._delay,onframe:N,ondestroy:i});return e&&"spline"!==e&&(z.easing=e),z}}}function Si(t,e,i,n,a,o,r,s){function l(){h--,h||o&&o()}b(n)?(o=a,a=n,n=0):w(a)?(o=a,a="linear",n=0):w(n)?(o=n,n=0):w(i)?(o=i,i=500):i||(i=500),t.stopAnimation(),Mi(t,"",t,e,i,n,s);var u=t.animators.slice(),h=u.length;h||o&&o();for(var c=0;c0&&t.animate(e,!1).when(null==a?500:a,s).delay(o||0)}function Ii(t,e,i,n){if(e){var a={};a[e]={},a[e][i]=n,t.attr(a)}else t.attr(i,n)}function Ti(t,e,i,n){0>i&&(t+=i,i=-i),0>n&&(e+=n,n=-n),this.x=t,this.y=e,this.width=i,this.height=n}function Ai(t){for(var e=0;t>=_M;)e|=1&t,t>>=1;return t+e}function Di(t,e,i,n){var a=e+1;if(a===i)return 1;if(n(t[a++],t[e])<0){for(;i>a&&n(t[a],t[a-1])<0;)a++;Ci(t,e,a)}else for(;i>a&&n(t[a],t[a-1])>=0;)a++;return a-e}function Ci(t,e,i){for(i--;i>e;){var n=t[e];t[e++]=t[i],t[i--]=n}}function Li(t,e,i,n,a){for(n===e&&n++;i>n;n++){for(var o,r=t[n],s=e,l=n;l>s;)o=s+l>>>1,a(r,t[o])<0?l=o:s=o+1;var u=n-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]=r}}function ki(t,e,i,n,a,o){var r=0,s=0,l=1;if(o(t,e[i+a])>0){for(s=n-a;s>l&&o(t,e[i+a+l])>0;)r=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s),r+=a,l+=a}else{for(s=a+1;s>l&&o(t,e[i+a-l])<=0;)r=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s);var u=r;r=a-l,l=a-u}for(r++;l>r;){var h=r+(l-r>>>1);o(t,e[i+h])>0?r=h+1:l=h}return l}function Pi(t,e,i,n,a,o){var r=0,s=0,l=1;if(o(t,e[i+a])<0){for(s=a+1;s>l&&o(t,e[i+a-l])<0;)r=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s);var u=r;r=a-l,l=a-u}else{for(s=n-a;s>l&&o(t,e[i+a+l])>=0;)r=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s),r+=a,l+=a}for(r++;l>r;){var h=r+(l-r>>>1);o(t,e[i+h])<0?l=h:r=h+1}return l}function Oi(t,e){function i(t,e){l[c]=t,u[c]=e,c+=1}function n(){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;o(t)}}function a(){for(;c>1;){var t=c-2;t>0&&u[t-1]=a?r(n,a,o,h):s(n,a,o,h)))}function r(i,n,a,o){var r=0;for(r=0;n>r;r++)d[r]=t[i+r];var s=0,l=a,u=i;if(t[u++]=t[l++],0!==--o){if(1===n){for(r=0;o>r;r++)t[u+r]=t[l+r];return void(t[u+o]=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===--o){p=!0;break}}else if(t[u++]=d[s++],c++,f=0,1===--n){p=!0;break}while(g>(c|f));if(p)break;do{if(c=Pi(t[l],d,s,n,0,e),0!==c){for(r=0;c>r;r++)t[u+r]=d[s+r];if(u+=c,s+=c,n-=c,1>=n){p=!0;break}}if(t[u++]=t[l++],0===--o){p=!0;break}if(f=ki(d[s],t,l,o,0,e),0!==f){for(r=0;f>r;r++)t[u+r]=t[l+r];if(u+=f,l+=f,o-=f,0===o){p=!0;break}}if(t[u++]=d[s++],1===--n){p=!0;break}g--}while(c>=wM||f>=wM);if(p)break;0>g&&(g=0),g+=2}if(h=g,1>h&&(h=1),1===n){for(r=0;o>r;r++)t[u+r]=t[l+r];t[u+o]=d[s]}else{if(0===n)throw new Error;for(r=0;n>r;r++)t[u+r]=d[s+r]}}else for(r=0;n>r;r++)t[u+r]=d[s+r]}function s(i,n,a,o){var r=0;for(r=0;o>r;r++)d[r]=t[a+r];var s=i+n-1,l=o-1,u=a+o-1,c=0,f=0;if(t[u--]=t[s--],0!==--n){if(1===o){for(u-=n,s-=n,f=u+1,c=s+1,r=n-1;r>=0;r--)t[f+r]=t[c+r];return void(t[u]=d[l])}for(var p=h;;){var g=0,m=0,v=!1;do if(e(d[l],t[s])<0){if(t[u--]=t[s--],g++,m=0,0===--n){v=!0;break}}else if(t[u--]=d[l--],m++,g=0,1===--o){v=!0;break}while(p>(g|m));if(v)break;do{if(g=n-Pi(d[l],t,i,n,n-1,e),0!==g){for(u-=g,s-=g,n-=g,f=u+1,c=s+1,r=g-1;r>=0;r--)t[f+r]=t[c+r];if(0===n){v=!0;break}}if(t[u--]=d[l--],1===--o){v=!0;break}if(m=o-ki(t[s],d,0,o,o-1,e),0!==m){for(u-=m,l-=m,o-=m,f=u+1,c=l+1,r=0;m>r;r++)t[f+r]=d[c+r];if(1>=o){v=!0;break}}if(t[u--]=t[s--],0===--n){v=!0;break}p--}while(g>=wM||m>=wM);if(v)break;0>p&&(p=0),p+=2}if(h=p,1>h&&(h=1),1===o){for(u-=n,s-=n,f=u+1,c=s+1,r=n-1;r>=0;r--)t[f+r]=t[c+r];t[u]=d[l]}else{if(0===o)throw new Error;for(c=u-(o-1),r=0;o>r;r++)t[c+r]=d[r]}}else for(c=u-(o-1),r=0;o>r;r++)t[c+r]=d[r]}var l,u,h=wM,c=0,d=[];l=[],u=[],this.mergeRuns=n,this.forceMergeRuns=a,this.pushRun=i}function Ni(t,e,i,n){i||(i=0),n||(n=t.length);var a=n-i;if(!(2>a)){var o=0;if(_M>a)return o=Di(t,i,n,e),void Li(t,i,n,i+o,e);var r=new Oi(t,e),s=Ai(a);do{if(o=Di(t,i,n,e),s>o){var l=a;l>s&&(l=s),Li(t,i,i+l,i+o,e),o=l}r.pushRun(i,o),r.mergeRuns(),a-=o,i+=o}while(0!==a);r.forceMergeRuns()}}function zi(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}function Ri(t,e,i){var n=null==e.x?0:e.x,a=null==e.x2?1:e.x2,o=null==e.y?0:e.y,r=null==e.y2?0:e.y2;e.global||(n=n*i.width+i.x,a=a*i.width+i.x,o=o*i.height+i.y,r=r*i.height+i.y),n=isNaN(n)?0:n,a=isNaN(a)?1:a,o=isNaN(o)?0:o,r=isNaN(r)?0:r;var s=t.createLinearGradient(n,o,a,r);return s}function Ei(t,e,i){var n=i.width,a=i.height,o=Math.min(n,a),r=null==e.x?.5:e.x,s=null==e.y?.5:e.y,l=null==e.r?.5:e.r;e.global||(r=r*n+i.x,s=s*a+i.y,l*=o);var u=t.createRadialGradient(r,s,0,r,s,l);return u}function Bi(){return!1}function Vi(t,e,i){var n=mS(),a=e.getWidth(),o=e.getHeight(),r=n.style;return r&&(r.position="absolute",r.left=0,r.top=0,r.width=a+"px",r.height=o+"px",n.setAttribute("data-zr-dom-id",t)),n.width=a*i,n.height=o*i,n}function Gi(t){if("string"==typeof t){var e=zM.get(t);return e&&e.image}return t}function Fi(t,e,i,n,a){if(t){if("string"==typeof t){if(e&&e.__zrImageSrc===t||!i)return e;var o=zM.get(t),r={hostEl:i,cb:n,cbPayload:a};return o?(e=o.image,!Hi(e)&&o.pending.push(r)):(e=new Image,e.onload=e.onerror=Wi,zM.put(t,e.__cachedImgObj={image:e,pending:[r]}),e.src=e.__zrImageSrc=t),e}return t}return e}function Wi(){var t=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;eo;o++)a=Math.max(an(n[o],e).width,a);return EM>BM&&(EM=0,RM={}),EM++,RM[i]=a,a}function Ui(t,e,i,n,a,o,r,s){return r?ji(t,e,i,n,a,o,r,s):Yi(t,e,i,n,a,o,s)}function Yi(t,e,i,n,a,o,r){var s=on(t,e,a,o,r),l=Xi(t,e);a&&(l+=a[1]+a[3]);var u=s.outerHeight,h=qi(0,l,i),c=Ki(0,u,n),d=new Ti(h,c,l,u);return d.lineHeight=s.lineHeight,d}function ji(t,e,i,n,a,o,r,s){var l=rn(t,{rich:r,truncate:s,font:e,textAlign:i,textPadding:a,textLineHeight:o}),u=l.outerWidth,h=l.outerHeight,c=qi(0,u,i),d=Ki(0,h,n);return new Ti(c,d,u,h)}function qi(t,e,i){return"right"===i?t-=e:"center"===i&&(t-=e/2),t}function Ki(t,e,i){return"middle"===i?t-=e/2:"bottom"===i&&(t-=e),t}function $i(t,e,i){var n=e.textPosition,a=e.textDistance,o=i.x,r=i.y;a=a||0;var s=i.height,l=i.width,u=s/2,h="left",c="top";switch(n){case"left":o-=a,r+=u,h="right",c="middle";break;case"right":o+=a+l,r+=u,c="middle";break;case"top":o+=l/2,r-=a,h="center",c="bottom";break;case"bottom":o+=l/2,r+=s+a,h="center";break;case"inside":o+=l/2,r+=u,h="center",c="middle";break;case"insideLeft":o+=a,r+=u,c="middle";break;case"insideRight":o+=l-a,r+=u,h="right",c="middle";break;case"insideTop":o+=l/2,r+=a,h="center";break;case"insideBottom":o+=l/2,r+=s-a,h="center",c="bottom";break;case"insideTopLeft":o+=a,r+=a;break;case"insideTopRight":o+=l-a,r+=a,h="right";break;case"insideBottomLeft":o+=a,r+=s-a,c="bottom";break;case"insideBottomRight":o+=l-a,r+=s-a,h="right",c="bottom"}return t=t||{},t.x=o,t.y=r,t.textAlign=h,t.textVerticalAlign=c,t}function Ji(t,e,i,n,a){if(!e)return"";var o=(t+"").split("\n");a=Qi(e,i,n,a);for(var r=0,s=o.length;s>r;r++)o[r]=tn(o[r],a);return o.join("\n")}function Qi(t,e,i,n){n=r({},n),n.font=e;var i=C(i,"...");n.maxIterations=C(n.maxIterations,2);var a=n.minChar=C(n.minChar,0);n.cnCharWidth=Xi("国",e);var o=n.ascCharWidth=Xi("a",e);n.placeholder=C(n.placeholder,"");for(var s=t=Math.max(0,t-1),l=0;a>l&&s>=o;l++)s-=o;var u=Xi(i,e);return u>s&&(i="",u=0),s=t-u,n.ellipsis=i,n.ellipsisWidth=u,n.contentWidth=s,n.containerWidth=t,n}function tn(t,e){var i=e.containerWidth,n=e.font,a=e.contentWidth;if(!i)return"";var o=Xi(t,n);if(i>=o)return t;for(var r=0;;r++){if(a>=o||r>=e.maxIterations){t+=e.ellipsis;break}var s=0===r?en(t,a,e.ascCharWidth,e.cnCharWidth):o>0?Math.floor(t.length*a/o):0;t=t.substr(0,s),o=Xi(t,n)}return""===t&&(t=e.placeholder),t}function en(t,e,i,n){for(var a=0,o=0,r=t.length;r>o&&e>a;o++){var s=t.charCodeAt(o);a+=s>=0&&127>=s?i:n}return o}function nn(t){return Xi("国",t)}function an(t,e){return FM.measureText(t,e)}function on(t,e,i,n,a){null!=t&&(t+="");var o=C(n,nn(e)),r=t?t.split("\n"):[],s=r.length*o,l=s,u=!0;if(i&&(l+=i[0]+i[2]),t&&a){u=!1;var h=a.outerHeight,c=a.outerWidth;if(null!=h&&l>h)t="",r=[];else if(null!=c)for(var d=Qi(c-(i?i[1]+i[3]:0),e,a.ellipsis,{minChar:a.minChar,placeholder:a.placeholder}),f=0,p=r.length;p>f;f++)r[f]=tn(r[f],d)}return{lines:r,height:s,outerHeight:l,lineHeight:o,canCacheByTextString:u}}function rn(t,e){var i={lines:[],width:0,height:0};if(null!=t&&(t+=""),!t)return i;for(var n,a=VM.lastIndex=0;null!=(n=VM.exec(t));){var o=n.index;o>a&&sn(i,t.substring(a,o)),sn(i,n[2],n[1]),a=VM.lastIndex}af)return{lines:[],width:0,height:0};x.textWidth=Xi(x.text,b);var M=_.textWidth,I=null==M||"auto"===M;if("string"==typeof M&&"%"===M.charAt(M.length-1))x.percentWidth=M,u.push(x),M=0;else{if(I){M=x.textWidth;var T=_.textBackgroundColor,A=T&&T.image;A&&(A=Gi(A),Hi(A)&&(M=Math.max(M,A.width*S/A.height)))}var D=w?w[1]+w[3]:0;M+=D;var k=null!=d?d-v:null;null!=k&&M>k&&(!I||D>k?(x.text="",x.textWidth=M=0):(x.text=Ji(x.text,k-D,b,c.ellipsis,{minChar:c.minChar}),x.textWidth=Xi(x.text,b),M=x.textWidth+D))}v+=x.width=M,_&&(m=Math.max(m,x.lineHeight))}g.width=v,g.lineHeight=m,s+=m,l=Math.max(l,v)}i.outerWidth=i.width=C(e.textWidth,l),i.outerHeight=i.height=C(e.textHeight,s),h&&(i.outerWidth+=h[1]+h[3],i.outerHeight+=h[0]+h[2]);for(var p=0;pl&&(r+=l,l=-l),0>u&&(s+=u,u=-u),"number"==typeof h?i=n=a=o=h:h instanceof Array?1===h.length?i=n=a=o=h[0]:2===h.length?(i=a=h[0],n=o=h[1]):3===h.length?(i=h[0],n=o=h[1],a=h[2]):(i=h[0],n=h[1],a=h[2],o=h[3]):i=n=a=o=0;var c;i+n>l&&(c=i+n,i*=l/c,n*=l/c),a+o>l&&(c=a+o,a*=l/c,o*=l/c),n+a>u&&(c=n+a,n*=u/c,a*=u/c),i+o>u&&(c=i+o,i*=u/c,o*=u/c),t.moveTo(r+i,s),t.lineTo(r+l-n,s),0!==n&&t.arc(r+l-n,s+n,n,-Math.PI/2,0),t.lineTo(r+l,s+u-a),0!==a&&t.arc(r+l-a,s+u-a,a,0,Math.PI/2),t.lineTo(r+o,s+u),0!==o&&t.arc(r+o,s+u-o,o,Math.PI/2,Math.PI),t.lineTo(r,s+i),0!==i&&t.arc(r+i,s+i,i,Math.PI,1.5*Math.PI)}function hn(t){return cn(t),f(t.rich,cn),t}function cn(t){if(t){t.font=ln(t);var e=t.textAlign;"middle"===e&&(e="center"),t.textAlign=null==e||HM[e]?e:"left";var i=t.textVerticalAlign||t.textBaseline;"center"===i&&(i="middle"),t.textVerticalAlign=null==i||ZM[i]?i:"top";var n=t.textPadding;n&&(t.textPadding=P(t.textPadding))}}function dn(t,e,i,n,a,o){n.rich?pn(t,e,i,n,a,o):fn(t,e,i,n,a,o)}function fn(t,e,i,n,a,o){var r,s=yn(n),l=!1,u=e.__attrCachedBy===IM.PLAIN_TEXT;o!==TM?(o&&(r=o.style,l=!s&&u&&r),e.__attrCachedBy=s?IM.NONE:IM.PLAIN_TEXT):u&&(e.__attrCachedBy=IM.NONE);var h=n.font||WM;l&&h===(r.font||WM)||(e.font=h);var c=t.__computedFont;t.__styleFont!==h&&(t.__styleFont=h,c=t.__computedFont=e.font);var d=n.textPadding,f=n.textLineHeight,p=t.__textCotentBlock;(!p||t.__dirtyText)&&(p=t.__textCotentBlock=on(i,c,d,f,n.truncate));var g=p.outerHeight,m=p.lines,v=p.lineHeight,y=wn(YM,t,n,a),x=y.baseX,_=y.baseY,w=y.textAlign||"left",b=y.textVerticalAlign;mn(e,n,a,x,_);var S=Ki(_,g,b),M=x,I=S;if(s||d){var T=Xi(i,c),A=T;d&&(A+=d[1]+d[3]);var D=qi(x,A,w);s&&xn(t,e,n,D,S,A,g),d&&(M=Tn(x,w,d),I+=d[0])}e.textAlign=w,e.textBaseline="middle",e.globalAlpha=n.opacity||1;for(var C=0;CT&&(_=b[T],!_.textAlign||"left"===_.textAlign);)vn(t,e,_,n,M,v,A,"left"),I-=_.width,A+=_.width,T++;for(;C>=0&&(_=b[C],"right"===_.textAlign);)vn(t,e,_,n,M,v,D,"right"),I-=_.width,D-=_.width,C--;for(A+=(o-(A-m)-(y-D)-I)/2;C>=T;)_=b[T],vn(t,e,_,n,M,v,A+_.width/2,"center"),A+=_.width,T++;v+=M}}function mn(t,e,i,n,a){if(i&&e.textRotation){var o=e.textOrigin;"center"===o?(n=i.width/2+i.x,a=i.height/2+i.y):o&&(n=o[0]+i.x,a=o[1]+i.y),t.translate(n,a),t.rotate(-e.textRotation),t.translate(-n,-a)}}function vn(t,e,i,n,a,o,r,s){var l=n.rich[i.styleName]||{}; +l.text=i.text;var u=i.textVerticalAlign,h=o+a/2;"top"===u?h=o+i.height/2:"bottom"===u&&(h=o+a-i.height/2),!i.isLineHolder&&yn(l)&&xn(t,e,l,"right"===s?r-i.width:"center"===s?r-i.width/2:r,h-i.height/2,i.width,i.height);var c=i.textPadding;c&&(r=Tn(r,s,c),h-=i.height/2-c[2]-i.textHeight/2),bn(e,"shadowBlur",L(l.textShadowBlur,n.textShadowBlur,0)),bn(e,"shadowColor",l.textShadowColor||n.textShadowColor||"transparent"),bn(e,"shadowOffsetX",L(l.textShadowOffsetX,n.textShadowOffsetX,0)),bn(e,"shadowOffsetY",L(l.textShadowOffsetY,n.textShadowOffsetY,0)),bn(e,"textAlign",s),bn(e,"textBaseline","middle"),bn(e,"font",i.font||WM);var d=Sn(l.textStroke||n.textStroke,p),f=Mn(l.textFill||n.textFill),p=C(l.textStrokeWidth,n.textStrokeWidth);d&&(bn(e,"lineWidth",p),bn(e,"strokeStyle",d),e.strokeText(i.text,r,h)),f&&(bn(e,"fillStyle",f),e.fillText(i.text,r,h))}function yn(t){return!!(t.textBackgroundColor||t.textBorderWidth&&t.textBorderColor)}function xn(t,e,i,n,a,o,r){var s=i.textBackgroundColor,l=i.textBorderWidth,u=i.textBorderColor,h=b(s);if(bn(e,"shadowBlur",i.textBoxShadowBlur||0),bn(e,"shadowColor",i.textBoxShadowColor||"transparent"),bn(e,"shadowOffsetX",i.textBoxShadowOffsetX||0),bn(e,"shadowOffsetY",i.textBoxShadowOffsetY||0),h||l&&u){e.beginPath();var c=i.textBorderRadius;c?un(e,{x:n,y:a,width:o,height:r,r:c}):e.rect(n,a,o,r),e.closePath()}if(h)if(bn(e,"fillStyle",s),null!=i.fillOpacity){var d=e.globalAlpha;e.globalAlpha=i.fillOpacity*i.opacity,e.fill(),e.globalAlpha=d}else e.fill();else if(S(s)){var f=s.image;f=Fi(f,null,t,_n,s),f&&Hi(f)&&e.drawImage(f,n,a,o,r)}if(l&&u)if(bn(e,"lineWidth",l),bn(e,"strokeStyle",u),null!=i.strokeOpacity){var d=e.globalAlpha;e.globalAlpha=i.strokeOpacity*i.opacity,e.stroke(),e.globalAlpha=d}else e.stroke()}function _n(t,e){e.image=t}function wn(t,e,i,n){var a=i.x||0,o=i.y||0,r=i.textAlign,s=i.textVerticalAlign;if(n){var l=i.textPosition;if(l instanceof Array)a=n.x+In(l[0],n.width),o=n.y+In(l[1],n.height);else{var u=e&&e.calculateTextPosition?e.calculateTextPosition(UM,i,n):$i(UM,i,n);a=u.x,o=u.y,r=r||u.textAlign,s=s||u.textVerticalAlign}var h=i.textOffset;h&&(a+=h[0],o+=h[1])}return t=t||{},t.baseX=a,t.baseY=o,t.textAlign=r,t.textVerticalAlign=s,t}function bn(t,e,i){return t[e]=MM(t,e,i),t[e]}function Sn(t,e){return null==t||0>=e||"transparent"===t||"none"===t?null:t.image||t.colorStops?"#000":t}function Mn(t){return null==t||"none"===t?null:t.image||t.colorStops?"#000":t}function In(t,e){return"string"==typeof t?t.lastIndexOf("%")>=0?parseFloat(t)/100*e:parseFloat(t):t}function Tn(t,e,i){return"right"===e?t-i[1]:"center"===e?t+i[3]/2-i[1]/2:t+i[3]}function An(t,e){return null!=t&&(t||e.textBackgroundColor||e.textBorderWidth&&e.textBorderColor||e.textPadding)}function Dn(t){t=t||{},gM.call(this,t);for(var e in t)t.hasOwnProperty(e)&&"style"!==e&&(this[e]=t[e]);this.style=new DM(t.style,this),this._rect=null,this.__clipPaths=null}function Cn(t){Dn.call(this,t)}function Ln(t){return parseInt(t,10)}function kn(t){return t?t.__builtin__?!0:"function"!=typeof t.resize||"function"!=typeof t.refresh?!1:!0:!1}function Pn(t,e,i){return tI.copy(t.getBoundingRect()),t.transform&&tI.applyTransform(t.transform),eI.width=e,eI.height=i,!tI.intersect(eI)}function On(t,e){if(t===e)return!1;if(!t||!e||t.length!==e.length)return!0;for(var i=0;in;n++){var o=i[n];!t.emphasis[e].hasOwnProperty(o)&&t[e].hasOwnProperty(o)&&(t.emphasis[e][o]=t[e][o])}}}function na(t){return!xI(t)||_I(t)||t instanceof Date?t:t.value}function aa(t){return xI(t)&&!(t instanceof Array)}function oa(t,e){e=(e||[]).slice();var i=p(t||[],function(t){return{exist:t}});return yI(e,function(t,n){if(xI(t)){for(var a=0;a=i.length&&i.push({option:t})}}),i}function ra(t){var e=B();yI(t,function(t){var i=t.exist;i&&e.set(i.id,t)}),yI(t,function(t){var i=t.option;O(!i||null==i.id||!e.get(i.id)||e.get(i.id)===t,"id duplicates: "+(i&&i.id)),i&&null!=i.id&&e.set(i.id,t),!t.keyInfo&&(t.keyInfo={})}),yI(t,function(t,i){var n=t.exist,a=t.option,o=t.keyInfo;if(xI(a)){if(o.name=null!=a.name?a.name+"":n?n.name:wI+i,n)o.id=n.id;else if(null!=a.id)o.id=a.id+"";else{var r=0;do o.id="\x00"+o.name+"\x00"+r++;while(e.get(o.id))}e.set(o.id,t)}})}function sa(t){var e=t.name;return!(!e||!e.indexOf(wI))}function la(t){return xI(t)&&t.id&&0===(t.id+"").indexOf("\x00_ec_\x00")}function ua(t,e){function i(t,e,i){for(var n=0,a=t.length;a>n;n++)for(var o=t[n].seriesId,r=ea(t[n].dataIndex),s=i&&i[o],l=0,u=r.length;u>l;l++){var h=r[l];s&&s[h]?s[h]=null:(e[o]||(e[o]={}))[h]=1}}function n(t,e){var i=[];for(var a in t)if(t.hasOwnProperty(a)&&null!=t[a])if(e)i.push(+a);else{var o=n(t[a],!0);o.length&&i.push({seriesId:a,dataIndex:o})}return i}var a={},o={};return i(t||[],a),i(e||[],o,a),[n(a),n(o)]}function ha(t,e){return null!=e.dataIndexInside?e.dataIndexInside:null!=e.dataIndex?_(e.dataIndex)?p(e.dataIndex,function(e){return t.indexOfRawIndex(e)}):t.indexOfRawIndex(e.dataIndex):null!=e.name?_(e.name)?p(e.name,function(e){return t.indexOfName(e)}):t.indexOfName(e.name):void 0}function ca(){var t="__\x00ec_inner_"+SI++ +"_"+Math.random().toFixed(5);return function(e){return e[t]||(e[t]={})}}function da(t,e,i){if(b(e)){var n={};n[e+"Index"]=0,e=n}var a=i&&i.defaultMainType;!a||fa(e,a+"Index")||fa(e,a+"Id")||fa(e,a+"Name")||(e[a+"Index"]=0);var o={};return yI(e,function(n,a){var n=e[a];if("dataIndex"===a||"dataIndexInside"===a)return void(o[a]=n);var r=a.match(/^(\w+)(Index|Id|Name)$/)||[],s=r[1],l=(r[2]||"").toLowerCase();if(!(!s||!l||null==n||"index"===l&&"none"===n||i&&i.includeMainTypes&&u(i.includeMainTypes,s)<0)){var h={mainType:s};("index"!==l||"all"!==n)&&(h[l]=n);var c=t.queryComponents(h);o[s+"Models"]=c,o[s+"Model"]=c[0]}}),o}function fa(t,e){return t&&t.hasOwnProperty(e)}function pa(t,e,i){t.setAttribute?t.setAttribute(e,i):t[e]=i}function ga(t,e){return t.getAttribute?t.getAttribute(e):t[e]}function ma(t){return"auto"===t?oS.domSupported?"html":"richText":t||"html"}function va(t,e){var i=B(),n=[];return f(t,function(t){var a=e(t);(i.get(a)||(n.push(a),i.set(a,[]))).push(t)}),{keys:n,buckets:i}}function ya(t){var e={main:"",sub:""};return t&&(t=t.split(MI),e.main=t[0]||"",e.sub=t[1]||""),e}function xa(t){O(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(t),'componentType "'+t+'" illegal')}function _a(t){t.$constructor=t,t.extend=function(t){var e=this,i=function(){t.$constructor?t.$constructor.apply(this,arguments):e.apply(this,arguments)};return r(i.prototype,t),i.extend=this.extend,i.superCall=ba,i.superApply=Sa,h(i,this),i.superClass=e,i}}function wa(t){var e=["__\x00is_clz",TI++,Math.random().toFixed(3)].join("_");t.prototype[e]=!0,t.isInstance=function(t){return!(!t||!t[e])}}function ba(t,e){var i=k(arguments,2);return this.superClass.prototype[e].apply(t,i)}function Sa(t,e,i){return this.superClass.prototype[e].apply(t,i)}function Ma(t,e){function i(t){var e=n[t.main];return e&&e[II]||(e=n[t.main]={},e[II]=!0),e}e=e||{};var n={};if(t.registerClass=function(t,e){if(e)if(xa(e),e=ya(e),e.sub){if(e.sub!==II){var a=i(e);a[e.sub]=t}}else n[e.main]=t;return t},t.getClass=function(t,e,i){var a=n[t];if(a&&a[II]&&(a=e?a[e]:null),i&&!a)throw new Error(e?"Component "+t+"."+(e||"")+" not exists. Load it first.":t+".type should be specified.");return a},t.getClassesByMainType=function(t){t=ya(t);var e=[],i=n[t.main];return i&&i[II]?f(i,function(t,i){i!==II&&e.push(t)}):e.push(i),e},t.hasClass=function(t){return t=ya(t),!!n[t.main]},t.getAllClassMainTypes=function(){var t=[];return f(n,function(e,i){t.push(i)}),t},t.hasSubTypes=function(t){t=ya(t);var e=n[t.main];return e&&e[II]},t.parseClassType=ya,e.registerWhenExtend){var a=t.extend;a&&(t.extend=function(e){var i=a.call(this,e);return t.registerClass(i,e.type)})}return t}function Ia(t){return t>-NI&&NI>t}function Ta(t){return t>NI||-NI>t}function Aa(t,e,i,n,a){var o=1-a;return o*o*(o*t+3*a*e)+a*a*(a*n+3*o*i)}function Da(t,e,i,n,a){var o=1-a;return 3*(((e-t)*o+2*(i-e)*a)*o+(n-i)*a*a)}function Ca(t,e,i,n,a,o){var r=n+3*(e-i)-t,s=3*(i-2*e+t),l=3*(e-t),u=t-a,h=s*s-3*r*l,c=s*l-9*r*u,d=l*l-3*s*u,f=0;if(Ia(h)&&Ia(c))if(Ia(s))o[0]=0;else{var p=-l/s;p>=0&&1>=p&&(o[f++]=p)}else{var g=c*c-4*h*d;if(Ia(g)){var m=c/h,p=-s/r+m,v=-m/2;p>=0&&1>=p&&(o[f++]=p),v>=0&&1>=v&&(o[f++]=v)}else if(g>0){var y=OI(g),x=h*s+1.5*r*(-c+y),_=h*s+1.5*r*(-c-y);x=0>x?-PI(-x,EI):PI(x,EI),_=0>_?-PI(-_,EI):PI(_,EI);var p=(-s-(x+_))/(3*r);p>=0&&1>=p&&(o[f++]=p)}else{var w=(2*h*s-3*r*c)/(2*OI(h*h*h)),b=Math.acos(w)/3,S=OI(h),M=Math.cos(b),p=(-s-2*S*M)/(3*r),v=(-s+S*(M+RI*Math.sin(b)))/(3*r),I=(-s+S*(M-RI*Math.sin(b)))/(3*r);p>=0&&1>=p&&(o[f++]=p),v>=0&&1>=v&&(o[f++]=v),I>=0&&1>=I&&(o[f++]=I)}}return f}function La(t,e,i,n,a){var o=6*i-12*e+6*t,r=9*e+3*n-3*t-9*i,s=3*e-3*t,l=0;if(Ia(r)){if(Ta(o)){var u=-s/o;u>=0&&1>=u&&(a[l++]=u)}}else{var h=o*o-4*r*s;if(Ia(h))a[0]=-o/(2*r);else if(h>0){var c=OI(h),u=(-o+c)/(2*r),d=(-o-c)/(2*r);u>=0&&1>=u&&(a[l++]=u),d>=0&&1>=d&&(a[l++]=d)}}return l}function ka(t,e,i,n,a,o){var r=(e-t)*a+t,s=(i-e)*a+e,l=(n-i)*a+i,u=(s-r)*a+r,h=(l-s)*a+s,c=(h-u)*a+u;o[0]=t,o[1]=r,o[2]=u,o[3]=c,o[4]=c,o[5]=h,o[6]=l,o[7]=n}function Pa(t,e,i,n,a,o,r,s,l,u,h){var c,d,f,p,g,m=.005,v=1/0;BI[0]=l,BI[1]=u;for(var y=0;1>y;y+=.05)VI[0]=Aa(t,i,a,r,y),VI[1]=Aa(e,n,o,s,y),p=MS(BI,VI),v>p&&(c=y,v=p);v=1/0;for(var x=0;32>x&&!(zI>m);x++)d=c-m,f=c+m,VI[0]=Aa(t,i,a,r,d),VI[1]=Aa(e,n,o,s,d),p=MS(VI,BI),d>=0&&v>p?(c=d,v=p):(GI[0]=Aa(t,i,a,r,f),GI[1]=Aa(e,n,o,s,f),g=MS(GI,BI),1>=f&&v>g?(c=f,v=g):m*=.5);return h&&(h[0]=Aa(t,i,a,r,c),h[1]=Aa(e,n,o,s,c)),OI(v)}function Oa(t,e,i,n){var a=1-n;return a*(a*t+2*n*e)+n*n*i}function Na(t,e,i,n){return 2*((1-n)*(e-t)+n*(i-e))}function za(t,e,i,n,a){var o=t-2*e+i,r=2*(e-t),s=t-n,l=0;if(Ia(o)){if(Ta(r)){var u=-s/r;u>=0&&1>=u&&(a[l++]=u)}}else{var h=r*r-4*o*s;if(Ia(h)){var u=-r/(2*o);u>=0&&1>=u&&(a[l++]=u)}else if(h>0){var c=OI(h),u=(-r+c)/(2*o),d=(-r-c)/(2*o);u>=0&&1>=u&&(a[l++]=u),d>=0&&1>=d&&(a[l++]=d)}}return l}function Ra(t,e,i){var n=t+i-2*e;return 0===n?.5:(t-e)/n}function Ea(t,e,i,n,a){var o=(e-t)*n+t,r=(i-e)*n+e,s=(r-o)*n+o;a[0]=t,a[1]=o,a[2]=s,a[3]=s,a[4]=r,a[5]=i}function Ba(t,e,i,n,a,o,r,s,l){var u,h=.005,c=1/0;BI[0]=r,BI[1]=s;for(var d=0;1>d;d+=.05){VI[0]=Oa(t,i,a,d),VI[1]=Oa(e,n,o,d);var f=MS(BI,VI);c>f&&(u=d,c=f)}c=1/0;for(var p=0;32>p&&!(zI>h);p++){var g=u-h,m=u+h;VI[0]=Oa(t,i,a,g),VI[1]=Oa(e,n,o,g);var f=MS(VI,BI);if(g>=0&&c>f)u=g,c=f;else{GI[0]=Oa(t,i,a,m),GI[1]=Oa(e,n,o,m);var v=MS(GI,BI);1>=m&&c>v?(u=m,c=v):h*=.5}}return l&&(l[0]=Oa(t,i,a,u),l[1]=Oa(e,n,o,u)),OI(c)}function Va(t,e,i){if(0!==t.length){var n,a=t[0],o=a[0],r=a[0],s=a[1],l=a[1];for(n=1;nh;h++){var p=d(t,i,a,r,qI[h]);l[0]=FI(p,l[0]),u[0]=WI(p,u[0])}for(f=c(e,n,o,s,KI),h=0;f>h;h++){var g=d(e,n,o,s,KI[h]);l[1]=FI(g,l[1]),u[1]=WI(g,u[1])}l[0]=FI(t,l[0]),u[0]=WI(t,u[0]),l[0]=FI(r,l[0]),u[0]=WI(r,u[0]),l[1]=FI(e,l[1]),u[1]=WI(e,u[1]),l[1]=FI(s,l[1]),u[1]=WI(s,u[1])}function Wa(t,e,i,n,a,o,r,s){var l=Ra,u=Oa,h=WI(FI(l(t,i,a),1),0),c=WI(FI(l(e,n,o),1),0),d=u(t,i,a,h),f=u(e,n,o,c);r[0]=FI(t,a,d),r[1]=FI(e,o,f),s[0]=WI(t,a,d),s[1]=WI(e,o,f)}function Ha(t,e,i,n,a,o,r,s,l){var u=re,h=se,c=Math.abs(a-o);if(1e-4>c%XI&&c>1e-4)return s[0]=t-i,s[1]=e-n,l[0]=t+i,void(l[1]=e+n);if(UI[0]=ZI(a)*i+t,UI[1]=HI(a)*n+e,YI[0]=ZI(o)*i+t,YI[1]=HI(o)*n+e,u(s,UI,YI),h(l,UI,YI),a%=XI,0>a&&(a+=XI),o%=XI,0>o&&(o+=XI),a>o&&!r?o+=XI:o>a&&r&&(a+=XI),r){var d=o;o=a,a=d}for(var f=0;o>f;f+=Math.PI/2)f>a&&(jI[0]=ZI(f)*i+t,jI[1]=HI(f)*n+e,u(s,jI,s),h(l,jI,l))}function Za(t,e,i,n,a,o,r){if(0===a)return!1;var s=a,l=0,u=t;if(r>e+s&&r>n+s||e-s>r&&n-s>r||o>t+s&&o>i+s||t-s>o&&i-s>o)return!1;if(t===i)return Math.abs(o-t)<=s/2;l=(e-n)/(t-i),u=(t*n-i*e)/(t-i);var h=l*o-r+u,c=h*h/(l*l+1);return s/2*s/2>=c}function Xa(t,e,i,n,a,o,r,s,l,u,h){if(0===l)return!1;var c=l;if(h>e+c&&h>n+c&&h>o+c&&h>s+c||e-c>h&&n-c>h&&o-c>h&&s-c>h||u>t+c&&u>i+c&&u>a+c&&u>r+c||t-c>u&&i-c>u&&a-c>u&&r-c>u)return!1;var d=Pa(t,e,i,n,a,o,r,s,u,h,null);return c/2>=d}function Ua(t,e,i,n,a,o,r,s,l){if(0===r)return!1;var u=r;if(l>e+u&&l>n+u&&l>o+u||e-u>l&&n-u>l&&o-u>l||s>t+u&&s>i+u&&s>a+u||t-u>s&&i-u>s&&a-u>s)return!1;var h=Ba(t,e,i,n,a,o,s,l,null);return u/2>=h}function Ya(t){return t%=hT,0>t&&(t+=hT),t}function ja(t,e,i,n,a,o,r,s,l){if(0===r)return!1;var u=r;s-=t,l-=e;var h=Math.sqrt(s*s+l*l);if(h-u>i||i>h+u)return!1;if(Math.abs(n-a)%cT<1e-4)return!0;if(o){var c=n;n=Ya(a),a=Ya(c)}else n=Ya(n),a=Ya(a);n>a&&(a+=cT);var d=Math.atan2(l,s);return 0>d&&(d+=cT),d>=n&&a>=d||d+cT>=n&&a>=d+cT}function qa(t,e,i,n,a,o){if(o>e&&o>n||e>o&&n>o)return 0;if(n===e)return 0;var r=e>n?1:-1,s=(o-e)/(n-e);(1===s||0===s)&&(r=e>n?.5:-.5);var l=s*(i-t)+t;return l===a?1/0:l>a?r:0}function Ka(t,e){return Math.abs(t-e)e&&u>n&&u>o&&u>s||e>u&&n>u&&o>u&&s>u)return 0;var h=Ca(e,n,o,s,u,gT);if(0===h)return 0;for(var c,d,f=0,p=-1,g=0;h>g;g++){var m=gT[g],v=0===m||1===m?.5:1,y=Aa(t,i,a,r,m);l>y||(0>p&&(p=La(e,n,o,s,mT),mT[1]1&&$a(),c=Aa(e,n,o,s,mT[0]),p>1&&(d=Aa(e,n,o,s,mT[1]))),f+=2===p?mc?v:-v:md?v:-v:d>s?v:-v:mc?v:-v:c>s?v:-v)}return f}function Qa(t,e,i,n,a,o,r,s){if(s>e&&s>n&&s>o||e>s&&n>s&&o>s)return 0;var l=za(e,n,o,s,gT);if(0===l)return 0;var u=Ra(e,n,o);if(u>=0&&1>=u){for(var h=0,c=Oa(e,n,o,u),d=0;l>d;d++){var f=0===gT[d]||1===gT[d]?.5:1,p=Oa(t,i,a,gT[d]);r>p||(h+=gT[d]c?f:-f:c>o?f:-f)}return h}var f=0===gT[0]||1===gT[0]?.5:1,p=Oa(t,i,a,gT[0]);return r>p?0:e>o?f:-f}function to(t,e,i,n,a,o,r,s){if(s-=e,s>i||-i>s)return 0;var l=Math.sqrt(i*i-s*s);gT[0]=-l,gT[1]=l;var u=Math.abs(n-a);if(1e-4>u)return 0;if(1e-4>u%fT){n=0,a=fT;var h=o?1:-1;return r>=gT[0]+t&&r<=gT[1]+t?h:0}if(o){var l=n;n=Ya(a),a=Ya(l)}else n=Ya(n),a=Ya(a);n>a&&(a+=fT);for(var c=0,d=0;2>d;d++){var f=gT[d];if(f+t>r){var p=Math.atan2(s,f),h=o?1:-1;0>p&&(p=fT+p),(p>=n&&a>=p||p+fT>=n&&a>=p+fT)&&(p>Math.PI/2&&p<1.5*Math.PI&&(h=-h),c+=h)}}return c}function eo(t,e,i,n,a){for(var o=0,r=0,s=0,l=0,u=0,h=0;h1&&(i||(o+=qa(r,s,l,u,n,a))),1===h&&(r=t[h],s=t[h+1],l=r,u=s),c){case dT.M:l=t[h++],u=t[h++],r=l,s=u;break;case dT.L:if(i){if(Za(r,s,t[h],t[h+1],e,n,a))return!0}else o+=qa(r,s,t[h],t[h+1],n,a)||0;r=t[h++],s=t[h++];break;case dT.C:if(i){if(Xa(r,s,t[h++],t[h++],t[h++],t[h++],t[h],t[h+1],e,n,a))return!0}else o+=Ja(r,s,t[h++],t[h++],t[h++],t[h++],t[h],t[h+1],n,a)||0;r=t[h++],s=t[h++];break;case dT.Q:if(i){if(Ua(r,s,t[h++],t[h++],t[h],t[h+1],e,n,a))return!0}else o+=Qa(r,s,t[h++],t[h++],t[h],t[h+1],n,a)||0;r=t[h++],s=t[h++];break;case dT.A:var d=t[h++],f=t[h++],p=t[h++],g=t[h++],m=t[h++],v=t[h++];h+=1;var y=1-t[h++],x=Math.cos(m)*p+d,_=Math.sin(m)*g+f;h>1?o+=qa(r,s,x,_,n,a):(l=x,u=_);var w=(n-d)*g/p+d;if(i){if(ja(d,f,g,m,m+v,y,e,w,a))return!0}else o+=to(d,f,g,m,m+v,y,w,a);r=Math.cos(m+v)*p+d,s=Math.sin(m+v)*g+f;break;case dT.R:l=r=t[h++],u=s=t[h++];var b=t[h++],S=t[h++],x=l+b,_=u+S;if(i){if(Za(l,u,x,u,e,n,a)||Za(x,u,x,_,e,n,a)||Za(x,_,l,_,e,n,a)||Za(l,_,l,u,e,n,a))return!0}else o+=qa(x,u,x,_,n,a),o+=qa(l,_,l,u,n,a);break;case dT.Z:if(i){if(Za(r,s,l,u,e,n,a))return!0}else o+=qa(r,s,l,u,n,a);r=l,s=u}}return i||Ka(s,u)||(o+=qa(r,s,l,u,n,a)||0),0!==o}function io(t,e,i){return eo(t,0,!1,e,i)}function no(t,e,i,n){return eo(t,e,!0,i,n)}function ao(t){Dn.call(this,t),this.path=null}function oo(t,e,i,n,a,o,r,s,l,u,h){var c=l*(DT/180),d=AT(c)*(t-i)/2+TT(c)*(e-n)/2,f=-1*TT(c)*(t-i)/2+AT(c)*(e-n)/2,p=d*d/(r*r)+f*f/(s*s);p>1&&(r*=IT(p),s*=IT(p));var g=(a===o?-1:1)*IT((r*r*s*s-r*r*f*f-s*s*d*d)/(r*r*f*f+s*s*d*d))||0,m=g*r*f/s,v=g*-s*d/r,y=(t+i)/2+AT(c)*m-TT(c)*v,x=(e+n)/2+TT(c)*m+AT(c)*v,_=kT([1,0],[(d-m)/r,(f-v)/s]),w=[(d-m)/r,(f-v)/s],b=[(-1*d-m)/r,(-1*f-v)/s],S=kT(w,b);LT(w,b)<=-1&&(S=DT),LT(w,b)>=1&&(S=0),0===o&&S>0&&(S-=2*DT),1===o&&0>S&&(S+=2*DT),h.addData(u,y,x,r,s,_,S,c,o)}function ro(t){if(!t)return new uT;for(var e,i=0,n=0,a=i,o=n,r=new uT,s=uT.CMD,l=t.match(PT),u=0;ug;g++)f[g]=parseFloat(f[g]);for(var m=0;p>m;){var v,y,x,_,w,b,S,M=i,I=n;switch(d){case"l":i+=f[m++],n+=f[m++],h=s.L,r.addData(h,i,n);break;case"L":i=f[m++],n=f[m++],h=s.L,r.addData(h,i,n);break;case"m":i+=f[m++],n+=f[m++],h=s.M,r.addData(h,i,n),a=i,o=n,d="l";break;case"M":i=f[m++],n=f[m++],h=s.M,r.addData(h,i,n),a=i,o=n,d="L";break;case"h":i+=f[m++],h=s.L,r.addData(h,i,n);break;case"H":i=f[m++],h=s.L,r.addData(h,i,n);break;case"v":n+=f[m++],h=s.L,r.addData(h,i,n);break;case"V":n=f[m++],h=s.L,r.addData(h,i,n);break;case"C":h=s.C,r.addData(h,f[m++],f[m++],f[m++],f[m++],f[m++],f[m++]),i=f[m-2],n=f[m-1];break;case"c":h=s.C,r.addData(h,f[m++]+i,f[m++]+n,f[m++]+i,f[m++]+n,f[m++]+i,f[m++]+n),i+=f[m-2],n+=f[m-1];break;case"S":v=i,y=n;var T=r.len(),A=r.data;e===s.C&&(v+=i-A[T-4],y+=n-A[T-3]),h=s.C,M=f[m++],I=f[m++],i=f[m++],n=f[m++],r.addData(h,v,y,M,I,i,n);break;case"s":v=i,y=n;var T=r.len(),A=r.data;e===s.C&&(v+=i-A[T-4],y+=n-A[T-3]),h=s.C,M=i+f[m++],I=n+f[m++],i+=f[m++],n+=f[m++],r.addData(h,v,y,M,I,i,n);break;case"Q":M=f[m++],I=f[m++],i=f[m++],n=f[m++],h=s.Q,r.addData(h,M,I,i,n);break;case"q":M=f[m++]+i,I=f[m++]+n,i+=f[m++],n+=f[m++],h=s.Q,r.addData(h,M,I,i,n);break;case"T":v=i,y=n;var T=r.len(),A=r.data;e===s.Q&&(v+=i-A[T-4],y+=n-A[T-3]),i=f[m++],n=f[m++],h=s.Q,r.addData(h,v,y,i,n);break;case"t":v=i,y=n;var T=r.len(),A=r.data;e===s.Q&&(v+=i-A[T-4],y+=n-A[T-3]),i+=f[m++],n+=f[m++],h=s.Q,r.addData(h,v,y,i,n);break;case"A":x=f[m++],_=f[m++],w=f[m++],b=f[m++],S=f[m++],M=i,I=n,i=f[m++],n=f[m++],h=s.A,oo(M,I,i,n,b,S,x,_,w,h,r);break;case"a":x=f[m++],_=f[m++],w=f[m++],b=f[m++],S=f[m++],M=i,I=n,i+=f[m++],n+=f[m++],h=s.A,oo(M,I,i,n,b,S,x,_,w,h,r)}}("z"===d||"Z"===d)&&(h=s.Z,r.addData(h),i=a,n=o),e=h}return r.toStatic(),r}function so(t,e){var i=ro(t);return e=e||{},e.buildPath=function(t){if(t.setData){t.setData(i.data);var e=t.getContext();e&&t.rebuildPath(e)}else{var e=t;i.rebuildPath(e)}},e.applyTransform=function(t){MT(i,t),this.dirty(!0)},e}function lo(t,e){return new ao(so(t,e))}function uo(t,e){return ao.extend(so(t,e))}function ho(t,e){for(var i=[],n=t.length,a=0;n>a;a++){var o=t[a];o.path||o.createPathProxy(),o.__dirtyPath&&o.buildPath(o.path,o.shape,!0),i.push(o.path)}var r=new ao(e);return r.createPathProxy(),r.buildPath=function(t){t.appendPath(i);var e=t.getContext();e&&t.rebuildPath(e)},r}function co(t,e,i,n,a,o,r){var s=.5*(i-t),l=.5*(n-e);return(2*(e-i)+s+l)*r+(-3*(e-i)-2*s-l)*o+s*a+e}function fo(t,e,i){var n=e.points,a=e.smooth;if(n&&n.length>=2){if(a&&"spline"!==a){var o=FT(n,a,i,e.smoothConstraint);t.moveTo(n[0][0],n[0][1]);for(var r=n.length,s=0;(i?r:r-1)>s;s++){var l=o[2*s],u=o[2*s+1],h=n[(s+1)%r];t.bezierCurveTo(l[0],l[1],u[0],u[1],h[0],h[1])}}else{"spline"===a&&(n=GT(n,i)),t.moveTo(n[0][0],n[0][1]);for(var s=1,c=n.length;c>s;s++)t.lineTo(n[s][0],n[s][1])}i&&t.closePath()}}function po(t,e,i){if(e){var n=e.x1,a=e.x2,o=e.y1,r=e.y2;t.x1=n,t.x2=a,t.y1=o,t.y2=r;var s=i&&i.lineWidth;s&&(ZT(2*n)===ZT(2*a)&&(t.x1=t.x2=mo(n,s,!0)),ZT(2*o)===ZT(2*r)&&(t.y1=t.y2=mo(o,s,!0)))}}function go(t,e,i){if(e){var n=e.x,a=e.y,o=e.width,r=e.height;t.x=n,t.y=a,t.width=o,t.height=r;var s=i&&i.lineWidth;s&&(t.x=mo(n,s,!0),t.y=mo(a,s,!0),t.width=Math.max(mo(n+o,s,!1)-t.x,0===o?0:1),t.height=Math.max(mo(a+r,s,!1)-t.y,0===r?0:1))}}function mo(t,e,i){if(!e)return t;var n=ZT(2*t);return(n+ZT(e))%2===0?n/2:(n+(i?1:-1))/2}function vo(t,e,i){var n=t.cpx2,a=t.cpy2;return null===n||null===a?[(i?Da:Aa)(t.x1,t.cpx1,t.cpx2,t.x2,e),(i?Da:Aa)(t.y1,t.cpy1,t.cpy2,t.y2,e)]:[(i?Na:Oa)(t.x1,t.cpx1,t.x2,e),(i?Na:Oa)(t.y1,t.cpy1,t.y2,e)]}function yo(t){Dn.call(this,t),this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.notClear=!0}function xo(t){return ao.extend(t)}function _o(t,e){return uo(t,e)}function wo(t,e){dA[t]=e}function bo(t){return dA.hasOwnProperty(t)?dA[t]:void 0}function So(t,e,i,n){var a=lo(t,e);return i&&("center"===n&&(i=Io(i,a.getBoundingRect())),To(a,i)),a}function Mo(t,e,i){var n=new Cn({style:{image:t,x:e.x,y:e.y,width:e.width,height:e.height},onload:function(t){if("center"===i){var a={width:t.width,height:t.height};n.setStyle(Io(e,a))}}});return n}function Io(t,e){var i,n=e.width/e.height,a=t.height*n;a<=t.width?i=t.height:(a=t.width,i=a/n);var o=t.x+t.width/2,r=t.y+t.height/2;return{x:o-a/2,y:r-i/2,width:a,height:i}}function To(t,e){if(t.applyTransform){var i=t.getBoundingRect(),n=i.calculateTransform(e);t.applyTransform(n)}}function Ao(t){return po(t.shape,t.shape,t.style),t}function Do(t){return go(t.shape,t.shape,t.style),t}function Co(t){return null!=t&&"none"!==t}function Lo(t){if("string"!=typeof t)return t;var e=gA.get(t);return e||(e=ni(t,-.1),1e4>mA&&(gA.set(t,e),mA++)),e}function ko(t){if(t.__hoverStlDirty){t.__hoverStlDirty=!1;var e=t.__hoverStl;if(!e)return void(t.__cachedNormalStl=t.__cachedNormalZ2=null);var i=t.__cachedNormalStl={};t.__cachedNormalZ2=t.z2;var n=t.style;for(var a in e)null!=e[a]&&(i[a]=n[a]);i.fill=n.fill,i.stroke=n.stroke}}function Po(t){var e=t.__hoverStl;if(e&&!t.__highlighted){var i=t.__zr,n=t.useHoverLayer&&i&&"canvas"===i.painter.type;if(t.__highlighted=n?"layer":"plain",!(t.isGroup||!i&&t.useHoverLayer)){var a=t,o=t.style;n&&(a=i.addHover(t),o=a.style),er(o),n||ko(a),o.extendFrom(e),Oo(o,e,"fill"),Oo(o,e,"stroke"),tr(o),n||(t.dirty(!1),t.z2+=rA)}}}function Oo(t,e,i){!Co(e[i])&&Co(t[i])&&(t[i]=Lo(t[i]))}function No(t){var e=t.__highlighted;if(e&&(t.__highlighted=!1,!t.isGroup))if("layer"===e)t.__zr&&t.__zr.removeHover(t);else{var i=t.style,n=t.__cachedNormalStl;n&&(er(i),t.setStyle(n),tr(i));var a=t.__cachedNormalZ2;null!=a&&t.z2-a===rA&&(t.z2=a)}}function zo(t,e,i){var n,a=uA,o=uA;t.__highlighted&&(a=lA,n=!0),e(t,i),t.__highlighted&&(o=lA,n=!0),t.isGroup&&t.traverse(function(t){!t.isGroup&&e(t,i)}),n&&t.__highDownOnUpdate&&t.__highDownOnUpdate(a,o)}function Ro(t,e){e=t.__hoverStl=e!==!1&&(t.hoverStyle||e||{}),t.__hoverStlDirty=!0,t.__highlighted&&(t.__cachedNormalStl=null,No(t),Po(t))}function Eo(t){!Fo(this,t)&&!this.__highByOuter&&zo(this,Po)}function Bo(t){!Fo(this,t)&&!this.__highByOuter&&zo(this,No)}function Vo(t){this.__highByOuter|=1<<(t||0),zo(this,Po)}function Go(t){!(this.__highByOuter&=~(1<<(t||0)))&&zo(this,No)}function Fo(t,e){return t.__highDownSilentOnTouch&&e.zrByTouch}function Wo(t,e){Ho(t,!0),zo(t,Ro,e)}function Ho(t,e){var i=e===!1;if(t.__highDownSilentOnTouch=t.highDownSilentOnTouch,t.__highDownOnUpdate=t.highDownOnUpdate,!i||t.__highDownDispatcher){var n=i?"off":"on";t[n]("mouseover",Eo)[n]("mouseout",Bo),t[n]("emphasis",Vo)[n]("normal",Go),t.__highByOuter=t.__highByOuter||0,t.__highDownDispatcher=!i}}function Zo(t){return!(!t||!t.__highDownDispatcher)}function Xo(t){var e=cA[t];return null==e&&32>=hA&&(e=cA[t]=hA++),e}function Uo(t,e,i,n,a,o,r){a=a||oA;var s,l=a.labelFetcher,u=a.labelDataIndex,h=a.labelDimIndex,c=a.labelProp,d=i.getShallow("show"),f=n.getShallow("show");(d||f)&&(l&&(s=l.getFormattedLabel(u,"normal",null,h,c)),null==s&&(s=w(a.defaultText)?a.defaultText(u,a):a.defaultText));var p=d?s:null,g=f?C(l?l.getFormattedLabel(u,"emphasis",null,h,c):null,s):null;(null!=p||null!=g)&&(jo(t,i,o,a),jo(e,n,r,a,!0)),t.text=p,e.text=g}function Yo(t,e,i){var n=t.style;e&&(er(n),t.setStyle(e),tr(n)),n=t.__hoverStl,i&&n&&(er(n),r(n,i),tr(n))}function jo(t,e,i,n,a){return Ko(t,e,n,a),i&&r(t,i),t}function qo(t,e,i){var n,a={isRectText:!0};i===!1?n=!0:a.autoColor=i,Ko(t,e,a,n)}function Ko(t,e,i,n){if(i=i||oA,i.isRectText){var a;i.getTextPosition?a=i.getTextPosition(e,n):(a=e.getShallow("position")||(n?null:"inside"),"outside"===a&&(a="top")),t.textPosition=a,t.textOffset=e.getShallow("offset");var o=e.getShallow("rotate");null!=o&&(o*=Math.PI/180),t.textRotation=o,t.textDistance=C(e.getShallow("distance"),n?null:5)}var r,s=e.ecModel,l=s&&s.option.textStyle,u=$o(e);if(u){r={};for(var h in u)if(u.hasOwnProperty(h)){var c=e.getModel(["rich",h]);Jo(r[h]={},c,l,i,n)}}return t.rich=r,Jo(t,e,l,i,n,!0),i.forceRich&&!i.textStyle&&(i.textStyle={}),t}function $o(t){for(var e;t&&t!==t.ecModel;){var i=(t.option||oA).rich;if(i){e=e||{};for(var n in i)i.hasOwnProperty(n)&&(e[n]=1)}t=t.parentModel}return e}function Jo(t,e,i,n,a,o){i=!a&&i||oA,t.textFill=Qo(e.getShallow("color"),n)||i.color,t.textStroke=Qo(e.getShallow("textBorderColor"),n)||i.textBorderColor,t.textStrokeWidth=C(e.getShallow("textBorderWidth"),i.textBorderWidth),a||(o&&(t.insideRollbackOpt=n,tr(t)),null==t.textFill&&(t.textFill=n.autoColor)),t.fontStyle=e.getShallow("fontStyle")||i.fontStyle,t.fontWeight=e.getShallow("fontWeight")||i.fontWeight,t.fontSize=e.getShallow("fontSize")||i.fontSize,t.fontFamily=e.getShallow("fontFamily")||i.fontFamily,t.textAlign=e.getShallow("align"),t.textVerticalAlign=e.getShallow("verticalAlign")||e.getShallow("baseline"),t.textLineHeight=e.getShallow("lineHeight"),t.textWidth=e.getShallow("width"),t.textHeight=e.getShallow("height"),t.textTag=e.getShallow("tag"),o&&n.disableBox||(t.textBackgroundColor=Qo(e.getShallow("backgroundColor"),n),t.textPadding=e.getShallow("padding"),t.textBorderColor=Qo(e.getShallow("borderColor"),n),t.textBorderWidth=e.getShallow("borderWidth"),t.textBorderRadius=e.getShallow("borderRadius"),t.textBoxShadowColor=e.getShallow("shadowColor"),t.textBoxShadowBlur=e.getShallow("shadowBlur"),t.textBoxShadowOffsetX=e.getShallow("shadowOffsetX"),t.textBoxShadowOffsetY=e.getShallow("shadowOffsetY")),t.textShadowColor=e.getShallow("textShadowColor")||i.textShadowColor,t.textShadowBlur=e.getShallow("textShadowBlur")||i.textShadowBlur,t.textShadowOffsetX=e.getShallow("textShadowOffsetX")||i.textShadowOffsetX,t.textShadowOffsetY=e.getShallow("textShadowOffsetY")||i.textShadowOffsetY}function Qo(t,e){return"auto"!==t?t:e&&e.autoColor?e.autoColor:null}function tr(t){var e,i=t.textPosition,n=t.insideRollbackOpt;if(n&&null==t.textFill){var a=n.autoColor,o=n.isRectText,r=n.useInsideStyle,s=r!==!1&&(r===!0||o&&i&&"string"==typeof i&&i.indexOf("inside")>=0),l=!s&&null!=a;(s||l)&&(e={textFill:t.textFill,textStroke:t.textStroke,textStrokeWidth:t.textStrokeWidth}),s&&(t.textFill="#fff",null==t.textStroke&&(t.textStroke=a,null==t.textStrokeWidth&&(t.textStrokeWidth=2))),l&&(t.textFill=a)}t.insideRollback=e}function er(t){var e=t.insideRollback;e&&(t.textFill=e.textFill,t.textStroke=e.textStroke,t.textStrokeWidth=e.textStrokeWidth,t.insideRollback=null)}function ir(t,e){var i=e&&e.getModel("textStyle");return N([t.fontStyle||i&&i.getShallow("fontStyle")||"",t.fontWeight||i&&i.getShallow("fontWeight")||"",(t.fontSize||i&&i.getShallow("fontSize")||12)+"px",t.fontFamily||i&&i.getShallow("fontFamily")||"sans-serif"].join(" "))}function nr(t,e,i,n,a,o){"function"==typeof a&&(o=a,a=null);var r=n&&n.isAnimationEnabled();if(r){var s=t?"Update":"",l=n.getShallow("animationDuration"+s),u=n.getShallow("animationEasing"+s),h=n.getShallow("animationDelay"+s);"function"==typeof h&&(h=h(a,n.getAnimationDelayParams?n.getAnimationDelayParams(e,a):null)),"function"==typeof l&&(l=l(a)),l>0?e.animateTo(i,l,h||0,u,o,!!o):(e.stopAnimation(),e.attr(i),o&&o())}else e.stopAnimation(),e.attr(i),o&&o()}function ar(t,e,i,n,a){nr(!0,t,e,i,n,a)}function or(t,e,i,n,a){nr(!1,t,e,i,n,a)}function rr(t,e){for(var i=Ne([]);t&&t!==e;)Re(i,t.getLocalTransform(),i),t=t.parent;return i}function sr(t,e,i){return e&&!d(e)&&(e=ZS.getLocalTransform(e)),i&&(e=Ge([],e)),oe([],t,e)}function lr(t,e,i){var n=0===e[4]||0===e[5]||0===e[0]?1:Math.abs(2*e[4]/e[0]),a=0===e[4]||0===e[5]||0===e[2]?1:Math.abs(2*e[4]/e[2]),o=["left"===t?-n:"right"===t?n:0,"top"===t?-a:"bottom"===t?a:0];return o=sr(o,e,i),Math.abs(o[0])>Math.abs(o[1])?o[0]>0?"right":"left":o[1]>0?"bottom":"top"}function ur(t,e,i){function n(t){var e={};return t.traverse(function(t){!t.isGroup&&t.anid&&(e[t.anid]=t)}),e}function a(t){var e={position:H(t.position),rotation:t.rotation};return t.shape&&(e.shape=r({},t.shape)),e}if(t&&e){var o=n(t);e.traverse(function(t){if(!t.isGroup&&t.anid){var e=o[t.anid];if(e){var n=a(t);t.attr(a(e)),ar(t,n,i,t.dataIndex)}}})}}function hr(t,e){return p(t,function(t){var i=t[0];i=nA(i,e.x),i=aA(i,e.x+e.width);var n=t[1];return n=nA(n,e.y),n=aA(n,e.y+e.height),[i,n]})}function cr(t,e){var i=nA(t.x,e.x),n=aA(t.x+t.width,e.x+e.width),a=nA(t.y,e.y),o=aA(t.y+t.height,e.y+e.height);return n>=i&&o>=a?{x:i,y:a,width:n-i,height:o-a}:void 0}function dr(t,e,i){e=r({rectHover:!0},e);var n=e.style={strokeNoScale:!0};return i=i||{x:-1,y:-1,width:2,height:2},t?0===t.indexOf("image://")?(n.image=t.slice(8),s(n,i),new Cn(e)):So(t.replace("path://",""),e,i,"center"):void 0}function fr(t,e,i,n,a){for(var o=0,r=a[a.length-1];og||g>1)return!1;var m=gr(f,p,h,c)/d;return 0>m||m>1?!1:!0}function gr(t,e,i,n){return t*n-i*e}function mr(t){return 1e-6>=t&&t>=-1e-6}function vr(t,e,i){this.parentModel=e,this.ecModel=i,this.option=t}function yr(t,e,i){for(var n=0;n=0&&i.push(t)}),i}t.topologicalTravel=function(t,e,n,a){function o(t){l[t].entryCount--,0===l[t].entryCount&&u.push(t)}function r(t){h[t]=!0,o(t)}if(t.length){var s=i(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&&(n.call(a,c,d.originalDeps.slice()),delete h[c]),f(d.successor,p?r:o)}f(h,function(){throw new Error("Circle dependency may exists")})}}}function Sr(t){return t.replace(/^\s+|\s+$/g,"")}function Mr(t,e,i,n){var a=e[1]-e[0],o=i[1]-i[0];if(0===a)return 0===o?i[0]:(i[0]+i[1])/2;if(n)if(a>0){if(t<=e[0])return i[0];if(t>=e[1])return i[1]}else{if(t>=e[0])return i[0];if(t<=e[1])return i[1]}else{if(t===e[0])return i[0];if(t===e[1])return i[1]}return(t-e[0])/a*o+i[0]}function Ir(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?Sr(t).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?0/0:+t}function Tr(t,e,i){return null==e&&(e=10),e=Math.min(Math.max(0,e),20),t=(+t).toFixed(e),i?t:+t}function Ar(t){return t.sort(function(t,e){return t-e}),t}function Dr(t){if(t=+t,isNaN(t))return 0;for(var e=1,i=0;Math.round(t*e)/e!==t;)e*=10,i++;return i}function Cr(t){var e=t.toString(),i=e.indexOf("e");if(i>0){var n=+e.slice(i+1);return 0>n?-n:0}var a=e.indexOf(".");return 0>a?0:e.length-1-a}function Lr(t,e){var i=Math.log,n=Math.LN10,a=Math.floor(i(t[1]-t[0])/n),o=Math.round(i(Math.abs(e[1]-e[0]))/n),r=Math.min(Math.max(-a+o,0),20);return isFinite(r)?r:20}function kr(t,e,i){if(!t[e])return 0;var n=g(t,function(t,e){return t+(isNaN(e)?0:e)},0);if(0===n)return 0;for(var a=Math.pow(10,i),o=p(t,function(t){return(isNaN(t)?0:t)/n*a*100}),r=100*a,s=p(o,function(t){return Math.floor(t)}),l=g(s,function(t,e){return t+e},0),u=p(o,function(t,e){return t-s[e]});r>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]/a}function Pr(t){var e=2*Math.PI;return(t%e+e)%e}function Or(t){return t>-IA&&IA>t}function Nr(t){if(t instanceof Date)return t;if("string"==typeof t){var e=AA.exec(t);if(!e)return new Date(0/0);if(e[8]){var i=+e[4]||0;return"Z"!==e[8].toUpperCase()&&(i-=e[8].slice(0,3)),new Date(Date.UTC(+e[1],+(e[2]||1)-1,+e[3]||1,i,+(e[5]||0),+e[6]||0,+e[7]||0))}return new Date(+e[1],+(e[2]||1)-1,+e[3]||1,+e[4]||0,+(e[5]||0),+e[6]||0,+e[7]||0)}return new Date(null==t?0/0:Math.round(t))}function zr(t){return Math.pow(10,Rr(t))}function Rr(t){if(0===t)return 0;var e=Math.floor(Math.log(t)/Math.LN10);return t/Math.pow(10,e)>=10&&e++,e}function Er(t,e){var i,n=Rr(t),a=Math.pow(10,n),o=t/a;return i=e?1.5>o?1:2.5>o?2:4>o?3:7>o?5:10:1>o?1:2>o?2:3>o?3:5>o?5:10,t=i*a,n>=-20?+t.toFixed(0>n?-n:0):t}function Br(t,e){var i=(t.length-1)*e+1,n=Math.floor(i),a=+t[n-1],o=i-n;return o?a+o*(t[n]-a):a}function Vr(t){function e(t,i,n){return t.interval[n]s;s++)o[s]<=i&&(o[s]=i,r[s]=s?1:1-n),i=o[s],n=r[s];o[0]===o[1]&&r[0]*r[1]!==1?t.splice(a,1):a++}return t}function Gr(t){return t-parseFloat(t)>=0}function Fr(t){return isNaN(t)?"-":(t=(t+"").split("."),t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:""))}function Wr(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 Hr(t){return null==t?"":(t+"").replace(LA,function(t,e){return kA[e]})}function Zr(t,e,i){_(e)||(e=[e]);var n=e.length;if(!n)return"";for(var a=e[0].$vars||[],o=0;os;s++)for(var l=0;l':'':{renderMode:a,content:"{marker"+o+"|} ",style:{color:i}}:""}function Yr(t,e){return t+="","0000".substr(0,e-t.length)+t}function jr(t,e,i){("week"===t||"month"===t||"quarter"===t||"half-year"===t||"year"===t)&&(t="MM-dd\nyyyy");var n=Nr(e),a=i?"UTC":"",o=n["get"+a+"FullYear"](),r=n["get"+a+"Month"]()+1,s=n["get"+a+"Date"](),l=n["get"+a+"Hours"](),u=n["get"+a+"Minutes"](),h=n["get"+a+"Seconds"](),c=n["get"+a+"Milliseconds"]();return t=t.replace("MM",Yr(r,2)).replace("M",r).replace("yyyy",o).replace("yy",o%100).replace("dd",Yr(s,2)).replace("d",s).replace("hh",Yr(l,2)).replace("h",l).replace("mm",Yr(u,2)).replace("m",u).replace("ss",Yr(h,2)).replace("s",h).replace("SSS",Yr(c,3))}function qr(t){return t?t.charAt(0).toUpperCase()+t.substr(1):t}function Kr(t){return Ui(t.text,t.font,t.textAlign,t.textVerticalAlign,t.textPadding,t.textLineHeight,t.rich,t.truncate)}function $r(t,e,i,n,a,o,r,s){return Ui(t,e,i,n,a,s,o,r)}function Jr(t,e){if("_blank"===e||"blank"===e){var i=window.open();i.opener=null,i.location=t}else window.open(t,e)}function Qr(t,e,i,n,a){var o=0,r=0;null==n&&(n=1/0),null==a&&(a=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 m=f.width+(g?-g.x+f.x:0);h=o+m,h>n||l.newline?(o=0,h=m,r+=s+i,s=f.height):s=Math.max(s,f.height)}else{var v=f.height+(g?-g.y+f.y:0);c=r+v,c>a||l.newline?(o+=s+i,r=0,c=v,s=f.width):s=Math.max(s,f.width)}l.newline||(d[0]=o,d[1]=r,"horizontal"===t?o=h+i:r=c+i)})}function ts(t,e,i){var n=e.width,a=e.height,o=Ir(t.x,n),r=Ir(t.y,a),s=Ir(t.x2,n),l=Ir(t.y2,a);return(isNaN(o)||isNaN(parseFloat(t.x)))&&(o=0),(isNaN(s)||isNaN(parseFloat(t.x2)))&&(s=n),(isNaN(r)||isNaN(parseFloat(t.y)))&&(r=0),(isNaN(l)||isNaN(parseFloat(t.y2)))&&(l=a),i=CA(i||0),{width:Math.max(s-o-i[1]-i[3],0),height:Math.max(l-r-i[0]-i[2],0)}}function es(t,e,i){i=CA(i||0);var n=e.width,a=e.height,o=Ir(t.left,n),r=Ir(t.top,a),s=Ir(t.right,n),l=Ir(t.bottom,a),u=Ir(t.width,n),h=Ir(t.height,a),c=i[2]+i[0],d=i[1]+i[3],f=t.aspect;switch(isNaN(u)&&(u=n-s-d-o),isNaN(h)&&(h=a-l-c-r),null!=f&&(isNaN(u)&&isNaN(h)&&(f>n/a?u=.8*n:h=.8*a),isNaN(u)&&(u=f*h),isNaN(h)&&(h=u/f)),isNaN(o)&&(o=n-s-u-d),isNaN(r)&&(r=a-l-h-c),t.left||t.right){case"center":o=n/2-u/2-i[3];break;case"right":o=n-u-d}switch(t.top||t.bottom){case"middle":case"center":r=a/2-h/2-i[0];break;case"bottom":r=a-h-c}o=o||0,r=r||0,isNaN(u)&&(u=n-d-o-(s||0)),isNaN(h)&&(h=a-c-r-(l||0));var p=new Ti(o+i[3],r+i[0],u,h);return p.margin=i,p}function is(t,e,i,n,a){var o=!a||!a.hv||a.hv[0],r=!a||!a.hv||a.hv[1],l=a&&a.boundingMode||"all";if(o||r){var u;if("raw"===l)u="group"===t.type?new Ti(0,0,+e.width||0,+e.height||0):t.getBoundingRect();else if(u=t.getBoundingRect(),t.needLocalTransform()){var h=t.getLocalTransform();u=u.clone(),u.applyTransform(h)}e=es(s({width:u.width,height:u.height},e),i,n);var c=t.position,d=o?e.x-u.x:0,f=r?e.y-u.y:0;t.attr("position","raw"===l?[d,f]:[c[0]+d,c[1]+f])}}function ns(t,e){return null!=t[BA[e][0]]||null!=t[BA[e][1]]&&null!=t[BA[e][2]]}function as(t,e,i){function n(i,n){var r={},l=0,u={},h=0,c=2;if(RA(i,function(e){u[e]=t[e]}),RA(i,function(t){a(e,t)&&(r[t]=u[t]=e[t]),o(r,t)&&l++,o(u,t)&&h++}),s[n])return o(e,i[1])?u[i[2]]=null:o(e,i[2])&&(u[i[1]]=null),u;if(h!==c&&l){if(l>=c)return r;for(var d=0;dn;n++)if(t[n].length>e)return t[n];return t[i-1]}function us(t){this.fromDataset=t.fromDataset,this.data=t.data||(t.sourceFormat===KA?{}:[]),this.sourceFormat=t.sourceFormat||$A,this.seriesLayoutBy=t.seriesLayoutBy||QA,this.dimensionsDefine=t.dimensionsDefine,this.encodeDefine=t.encodeDefine&&B(t.encodeDefine),this.startIndex=t.startIndex||0,this.dimensionsDetectCount=t.dimensionsDetectCount}function hs(t){var e=t.option.source,i=$A;if(I(e))i=JA;else if(_(e)){0===e.length&&(i=jA);for(var n=0,a=e.length;a>n;n++){var o=e[n];if(null!=o){if(_(o)){i=jA;break}if(S(o)){i=qA;break}}}}else if(S(e)){for(var r in e)if(e.hasOwnProperty(r)&&d(e[r])){i=KA;break}}else if(null!=e)throw new Error("Invalid data");iD(t).sourceFormat=i}function cs(t){return iD(t).source}function ds(t){iD(t).datasetMap=B()}function fs(t){var e=t.option,i=e.data,n=I(i)?JA:YA,a=!1,o=e.seriesLayoutBy,r=e.sourceHeader,s=e.dimensions,l=_s(t);if(l){var u=l.option;i=u.source,n=iD(l).sourceFormat,a=!0,o=o||u.seriesLayoutBy,null==r&&(r=u.sourceHeader),s=s||u.dimensions}var h=ps(i,n,o,r,s);iD(t).source=new us({data:i,fromDataset:a,seriesLayoutBy:o,sourceFormat:n,dimensionsDefine:h.dimensionsDefine,startIndex:h.startIndex,dimensionsDetectCount:h.dimensionsDetectCount,encodeDefine:e.encode})}function ps(t,e,i,n,a){if(!t)return{dimensionsDefine:gs(a)};var o,r;if(e===jA)"auto"===n||null==n?ms(function(t){null!=t&&"-"!==t&&(b(t)?null==r&&(r=1):r=0)},i,t,10):r=n?1:0,a||1!==r||(a=[],ms(function(t,e){a[e]=null!=t?t:""},i,t)),o=a?a.length:i===tD?t.length:t[0]?t[0].length:null;else if(e===qA)a||(a=vs(t));else if(e===KA)a||(a=[],f(t,function(t,e){a.push(e)}));else if(e===YA){var s=na(t[0]);o=_(s)&&s.length||1}return{startIndex:r,dimensionsDefine:gs(a),dimensionsDetectCount:o}}function gs(t){if(t){var e=B();return p(t,function(t){if(t=r({},S(t)?t:{name:t}),null==t.name)return t;t.name+="",null==t.displayName&&(t.displayName=t.name);var i=e.get(t.name);return i?t.name+="-"+i.count++:e.set(t.name,{count:1}),t})}}function ms(t,e,i,n){if(null==n&&(n=1/0),e===tD)for(var a=0;aa;a++)t(i[a]?i[a][0]:null,a);else for(var o=i[0]||[],a=0;aa;a++)t(o[a],a)}function vs(t){for(var e,i=0;in;n++)t.push(e+n)}function a(t){var e=t.dimsDef;return e?e.length:1}var o={},r=_s(e);if(!r||!t)return o;var s,l,u=[],h=[],c=e.ecModel,d=iD(c).datasetMap,p=r.uid+"_"+i.seriesLayoutBy;t=t.slice(),f(t,function(e,i){!S(e)&&(t[i]={name:e}),"ordinal"===e.type&&null==s&&(s=i,l=a(t[i])),o[e.name]=[]});var g=d.get(p)||d.set(p,{categoryWayDim:l,valueWayDim:0});return f(t,function(t,e){var i=t.name,r=a(t);if(null==s){var l=g.valueWayDim;n(o[i],l,r),n(h,l,r),g.valueWayDim+=r}else if(s===e)n(o[i],0,r),n(u,0,r);else{var l=g.categoryWayDim;n(o[i],l,r),n(h,l,r),g.categoryWayDim+=r}}),u.length&&(o.itemName=u),h.length&&(o.seriesName=h),o}function xs(t,e,i){var n={},a=_s(t);if(!a)return n;var o,r=e.sourceFormat,s=e.dimensionsDefine;(r===qA||r===KA)&&f(s,function(t,e){"name"===(S(t)?t.name:t)&&(o=e)});var l=function(){function t(t){return null!=t.v&&null!=t.n}for(var n={},a={},l=[],u=0,h=Math.min(5,i);h>u;u++){var c=bs(e.data,r,e.seriesLayoutBy,s,e.startIndex,u);l.push(c);var d=c===eD.Not;if(d&&null==n.v&&u!==o&&(n.v=u),(null==n.n||n.n===n.v||!d&&l[n.n]===eD.Not)&&(n.n=u),t(n)&&l[n.n]!==eD.Not)return n;d||(c===eD.Might&&null==a.v&&u!==o&&(a.v=u),(null==a.n||a.n===a.v)&&(a.n=u))}return t(n)?n:t(a)?a:null}();if(l){n.value=l.v;var u=null!=o?o:l.n;n.itemName=[u],n.seriesName=[u]}return n}function _s(t){var e=t.option,i=e.data;return i?void 0:t.ecModel.getComponent("dataset",e.datasetIndex||0)}function ws(t,e){return bs(t.data,t.sourceFormat,t.seriesLayoutBy,t.dimensionsDefine,t.startIndex,e)}function bs(t,e,i,n,a,o){function r(t){var e=b(t);return null!=t&&isFinite(t)&&""!==t?e?eD.Might:eD.Not:e&&"-"!==t?eD.Must:void 0}var s,l=5;if(I(t))return eD.Not;var u,h;if(n){var c=n[o];S(c)?(u=c.name,h=c.type):b(c)&&(u=c)}if(null!=h)return"ordinal"===h?eD.Must:eD.Not;if(e===jA)if(i===tD){for(var d=t[o],f=0;f<(d||[]).length&&l>f;f++)if(null!=(s=r(d[a+f])))return s}else for(var f=0;ff;f++){var p=t[a+f];if(p&&null!=(s=r(p[o])))return s}else if(e===qA){if(!u)return eD.Not;for(var f=0;ff;f++){var g=t[f];if(g&&null!=(s=r(g[u])))return s}}else if(e===KA){if(!u)return eD.Not;var d=t[u];if(!d||I(d))return eD.Not;for(var f=0;ff;f++)if(null!=(s=r(d[f])))return s}else if(e===YA)for(var f=0;ff;f++){var g=t[f],m=na(g);if(!_(m))return eD.Not;if(null!=(s=r(m[o])))return s}return eD.Not}function Ss(t,e){if(e){var i=e.seiresIndex,n=e.seriesId,a=e.seriesName;return null!=i&&t.componentIndex!==i||null!=n&&t.id!==n||null!=a&&t.name!==a}}function Ms(t,e){var i=t.color&&!t.colorLayer;f(e,function(e,o){"colorLayer"===o&&i||WA.hasClass(o)||("object"==typeof e?t[o]=t[o]?a(t[o],e,!1):n(e):null==t[o]&&(t[o]=e))})}function Is(t){t=t,this.option={},this.option[nD]=1,this._componentsMap=B({series:[]}),this._seriesIndices,this._seriesIndicesMap,Ms(t,this._theme.option),a(t,ZA,!1),this.mergeOption(t)}function Ts(t,e){_(e)||(e=e?[e]:[]);var i={};return f(e,function(e){i[e]=(t.get(e)||[]).slice()}),i}function As(t,e,i){var n=e.type?e.type:i?i.subType:WA.determineSubType(t,e);return n}function Ds(t,e){t._seriesIndicesMap=B(t._seriesIndices=p(e,function(t){return t.componentIndex})||[])}function Cs(t,e){return e.hasOwnProperty("subType")?m(t,function(t){return t.subType===e.subType}):t}function Ls(t){f(oD,function(e){this[e]=y(t[e],t)},this)}function ks(){this._coordinateSystems=[]}function Ps(t){this._api=t,this._timelineOptions=[],this._mediaList=[],this._mediaDefault,this._currentMediaIndices=[],this._optionBackup,this._newBaseOption}function Os(t,e,i){var n,a,o=[],r=[],s=t.timeline;if(t.baseOption&&(a=t.baseOption),(s||t.options)&&(a=a||{},o=(t.options||[]).slice()),t.media){a=a||{};var l=t.media;sD(l,function(t){t&&t.option&&(t.query?r.push(t):n||(n=t))})}return a||(a=t),a.timeline||(a.timeline=s),sD([a].concat(o).concat(p(r,function(t){return t.option})),function(t){sD(e,function(e){e(t,i)})}),{baseOption:a,timelineOptions:o,mediaDefault:n,mediaList:r}}function Ns(t,e,i){var n={width:e,height:i,aspectratio:e/i},a=!0;return f(t,function(t,e){var i=e.match(cD);if(i&&i[1]&&i[2]){var o=i[1],r=i[2].toLowerCase();zs(n[r],t,o)||(a=!1)}}),a}function zs(t,e,i){return"min"===i?t>=e:"max"===i?e>=t:t===e}function Rs(t,e){return t.join(",")===e.join(",")}function Es(t,e){e=e||{},sD(e,function(e,i){if(null!=e){var n=t[i];if(WA.hasClass(i)){e=ea(e),n=ea(n);var a=oa(n,e);t[i]=uD(a,function(t){return t.option&&t.exist?hD(t.exist,t.option,!0):t.exist||t.option})}else t[i]=hD(n,e,!0)}})}function Bs(t){var e=t&&t.itemStyle;if(e)for(var i=0,n=pD.length;n>i;i++){var o=pD[i],r=e.normal,s=e.emphasis;r&&r[o]&&(t[o]=t[o]||{},t[o].normal?a(t[o].normal,r[o]):t[o].normal=r[o],r[o]=null),s&&s[o]&&(t[o]=t[o]||{},t[o].emphasis?a(t[o].emphasis,s[o]):t[o].emphasis=s[o],s[o]=null)}}function Vs(t,e,i){if(t&&t[e]&&(t[e].normal||t[e].emphasis)){var n=t[e].normal,a=t[e].emphasis;n&&(i?(t[e].normal=t[e].emphasis=null,s(t[e],n)):t[e]=n),a&&(t.emphasis=t.emphasis||{},t.emphasis[e]=a)}}function Gs(t){Vs(t,"itemStyle"),Vs(t,"lineStyle"),Vs(t,"areaStyle"),Vs(t,"label"),Vs(t,"labelLine"),Vs(t,"upperLabel"),Vs(t,"edgeLabel")}function Fs(t,e){var i=fD(t)&&t[e],n=fD(i)&&i.textStyle;if(n)for(var a=0,o=bI.length;o>a;a++){var e=bI[a];n.hasOwnProperty(e)&&(i[e]=n[e])}}function Ws(t){t&&(Gs(t),Fs(t,"label"),t.emphasis&&Fs(t.emphasis,"label"))}function Hs(t){if(fD(t)){Bs(t),Gs(t),Fs(t,"label"),Fs(t,"upperLabel"),Fs(t,"edgeLabel"),t.emphasis&&(Fs(t.emphasis,"label"),Fs(t.emphasis,"upperLabel"),Fs(t.emphasis,"edgeLabel"));var e=t.markPoint;e&&(Bs(e),Ws(e));var i=t.markLine;i&&(Bs(i),Ws(i));var n=t.markArea;n&&Ws(n);var a=t.data;if("graph"===t.type){a=a||t.nodes;var o=t.links||t.edges;if(o&&!I(o))for(var r=0;r=0;p--){var g=t[p];if(s||(d=g.data.rawIndexOf(g.stackedByDimension,c)),d>=0){var m=g.data.getByRawIndex(g.stackResultDimension,d);if(h>=0&&m>0||0>=h&&0>m){h+=m,f=m;break}}}return n[0]=h,n[1]=f,n});r.hostModel.setData(l),e.data=l})}function Ks(t,e){us.isInstance(t)||(t=us.seriesDataToSource(t)),this._source=t;var i=this._data=t.data,n=t.sourceFormat;n===JA&&(this._offset=0,this._dimSize=e,this._data=i);var a=wD[n===jA?n+"_"+t.seriesLayoutBy:n];r(this,a)}function $s(){return this._data.length}function Js(t){return this._data[t]}function Qs(t){for(var e=0;ee.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function pl(t,e){f(t.CHANGABLE_METHODS,function(i){t.wrapMethod(i,x(gl,e))})}function gl(t){var e=ml(t);e&&e.setOutputEnd(this.count())}function ml(t){var e=(t.ecModel||{}).scheduler,i=e&&e.getPipeline(t.uid);if(i){var n=i.currentTask;if(n){var a=n.agentStubMap;a&&(n=a.get(t.uid))}return n}}function vl(){this.group=new xM,this.uid=_r("viewChart"),this.renderTask=ol({plan:_l,reset:wl}),this.renderTask.context={view:this}}function yl(t,e,i){if(t&&(t.trigger(e,i),t.isGroup&&!Zo(t)))for(var n=0,a=t.childCount();a>n;n++)yl(t.childAt(n),e,i)}function xl(t,e,i){var n=ha(t,e),a=e&&null!=e.highlightKey?Xo(e.highlightKey):null;null!=n?f(ea(n),function(e){yl(t.getItemGraphicEl(e),i,a)}):t.eachItemGraphicEl(function(t){yl(t,i,a)})}function _l(t){return ND(t.model)}function wl(t){var e=t.model,i=t.ecModel,n=t.api,a=t.payload,o=e.pipelineContext.progressiveRender,r=t.view,s=a&&OD(a).updateMethod,l=o?"incrementalPrepareRender":s&&r[s]?s:"render";return"render"!==l&&r[l](e,i,n,a),RD[l]}function bl(t,e,i){function n(){h=(new Date).getTime(),c=null,t.apply(r,s||[])}var a,o,r,s,l,u=0,h=0,c=null;e=e||0;var d=function(){a=(new Date).getTime(),r=this,s=arguments;var t=l||e,d=l||i;l=null,o=a-(d?u:h)-t,clearTimeout(c),d?c=setTimeout(n,t):o>=0?n():c=setTimeout(n,-o),u=a};return d.clear=function(){c&&(clearTimeout(c),c=null)},d.debounceNextCall=function(t){l=t},d}function Sl(t,e,i,n){var a=t[e];if(a){var o=a[ED]||a,r=a[VD],s=a[BD];if(s!==i||r!==n){if(null==i||!n)return t[e]=o;a=t[e]=bl(o,i,"debounce"===n),a[ED]=o,a[VD]=n,a[BD]=i}return a}}function Ml(t,e){var i=t[e];i&&i[ED]&&(t[e]=i[ED])}function Il(t,e,i,n){this.ecInstance=t,this.api=e,this.unfinished;var i=this._dataProcessorHandlers=i.slice(),n=this._visualHandlers=n.slice();this._allHandlers=i.concat(n),this._stageTaskMap=B()}function Tl(t,e,i,n,a){function o(t,e){return t.setDirty&&(!t.dirtyMap||t.dirtyMap.get(e.__pipeline.id))}a=a||{};var r;f(e,function(e){if(!a.visualType||a.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){o(a,t)&&(t.dirty(),h=!0)}),h&&u.dirty(),UD(u,n);var d=t.getPerformArgs(u,a.block);c.each(function(t){t.perform(d)}),r|=u.perform(d)}else l&&l.each(function(s){o(a,s)&&s.dirty();var l=t.getPerformArgs(s,a.block);l.skip=!e.performRawSeries&&i.isSeriesFiltered(s.context.model),UD(s,n),r|=s.perform(l)})}}),t.unfinished|=r}function Al(t,e,i,n,a){function o(i){var o=i.uid,s=r.get(o)||r.set(o,ol({plan:Ol,reset:Nl,count:Rl}));s.context={model:i,ecModel:n,api:a,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:t},El(t,i,s)}var r=i.seriesTaskMap||(i.seriesTaskMap=B()),s=e.seriesType,l=e.getTargetSeries;e.createOnAllSeries?n.eachRawSeries(o):s?n.eachRawSeriesByType(s,o):l&&l(n,a).each(o);var u=t._pipelineMap;r.each(function(t,e){u.get(e)||(t.dispose(),r.removeKey(e))})}function Dl(t,e,i,n,a){function o(e){var i=e.uid,n=s.get(i);n||(n=s.set(i,ol({reset:Ll,onDirty:Pl})),r.dirty()),n.context={model:e,overallProgress:h,modifyOutputEnd:c},n.agent=r,n.__block=h,El(t,e,n)}var r=i.overallTask=i.overallTask||ol({reset:Cl});r.context={ecModel:n,api:a,overallReset:e.overallReset,scheduler:t};var s=r.agentStubMap=r.agentStubMap||B(),l=e.seriesType,u=e.getTargetSeries,h=!0,c=e.modifyOutputEnd;l?n.eachRawSeriesByType(l,o):u?u(n,a).each(o):(h=!1,f(n.getSeries(),o));var d=t._pipelineMap;s.each(function(t,e){d.get(e)||(t.dispose(),r.dirty(),s.removeKey(e))})}function Cl(t){t.overallReset(t.ecModel,t.api,t.payload)}function Ll(t){return t.overallProgress&&kl}function kl(){this.agent.dirty(),this.getDownstream().dirty()}function Pl(){this.agent&&this.agent.dirty()}function Ol(t){return t.plan&&t.plan(t.model,t.ecModel,t.api,t.payload)}function Nl(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=ea(t.reset(t.model,t.ecModel,t.api,t.payload));return e.length>1?p(e,function(t,e){return zl(e)}):YD}function zl(t){return function(e,i){var n=i.data,a=i.resetDefines[t];if(a&&a.dataEach)for(var o=e.start;o0?parseInt(n,10)/100:n?parseFloat(n):0;var a=i.getAttribute("stop-color")||"#000000";e.addColorStop(n,a)}i=i.nextSibling}}function Hl(t,e){t&&t.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),s(e.__inheritedStyle,t.__inheritedStyle))}function Zl(t){for(var e=N(t).split(aC),i=[],n=0;n0;o-=2){var r=a[o],s=a[o-1];switch(n=n||Oe(),s){case"translate":r=N(r).split(aC),Ee(n,n,[parseFloat(r[0]),parseFloat(r[1]||0)]);break;case"scale":r=N(r).split(aC),Ve(n,n,[parseFloat(r[0]),parseFloat(r[1]||r[0])]);break;case"rotate":r=N(r).split(aC),Be(n,n,parseFloat(r[0]));break;case"skew":r=N(r).split(aC),console.warn("Skew transform is not supported yet");break;case"matrix":var r=N(r).split(aC);n[0]=parseFloat(r[0]),n[1]=parseFloat(r[1]),n[2]=parseFloat(r[2]),n[3]=parseFloat(r[3]),n[4]=parseFloat(r[4]),n[5]=parseFloat(r[5])}}e.setLocalTransform(n)}}function jl(t){var e=t.getAttribute("style"),i={};if(!e)return i;var n={};hC.lastIndex=0;for(var a;null!=(a=hC.exec(e));)n[a[1]]=a[2];for(var o in sC)sC.hasOwnProperty(o)&&null!=n[o]&&(i[sC[o]]=n[o]);return i}function ql(t,e,i){var n=e/t.width,a=i/t.height,o=Math.min(n,a),r=[o,o],s=[-(t.x+t.width/2)*o+e/2,-(t.y+t.height/2)*o+i/2];return{scale:r,position:s}}function Kl(t,e){var i=new Fl;return i.parse(t,e)}function $l(t,e){return function(i,n,a){(e||!this._disposed)&&(i=i&&i.toLowerCase(),AS.prototype[t].call(this,i,n,a))}}function Jl(){AS.call(this)}function Ql(t,e,i){function a(t,e){return t.__prio-e.__prio}i=i||{},"string"==typeof e&&(e=UC[e]),this.id,this.group,this._dom=t;var o="canvas",r=this._zr=Kn(t,{renderer:i.renderer||o,devicePixelRatio:i.devicePixelRatio,width:i.width,height:i.height});this._throttledZrFlush=bl(y(r.flush,r),17);var e=n(e);e&&yD(e,!0),this._theme=e,this._chartsViews=[],this._chartsMap={},this._componentsViews=[],this._componentsMap={},this._coordSysMgr=new ks;var s=this._api=vu(this);Ni(XC,a),Ni(WC,a),this._scheduler=new Il(this,s,WC,XC),AS.call(this,this._ecEventProcessor=new yu),this._messageCenter=new Jl,this._initEvents(),this.resize=y(this.resize,this),this._pendingActions=[],r.animation.on("frame",this._onframe,this),su(r,this),z(this)}function tu(t,e,i){if(!this._disposed){var n,a=this._model,o=this._coordSysMgr.getCoordinateSystems();e=da(a,e);for(var r=0;re.get("hoverLayerThreshold")&&!oS.node&&e.eachSeries(function(e){if(!e.preventUsingHoverLayer){var i=t._chartsMap[e.__viewId];i.__alive&&i.group.traverse(function(t){t.useHoverLayer=!0})}})}function gu(t,e){var i=t.get("blendMode")||null;e.group.traverse(function(t){t.isGroup||t.style.blend!==i&&t.setStyle("blend",i),t.eachPendingDisplayable&&t.eachPendingDisplayable(function(t){t.setStyle("blend",i)})})}function mu(t,e){var i=t.get("z"),n=t.get("zlevel");e.group.traverse(function(t){"group"!==t.type&&(null!=i&&(t.z=i),null!=n&&(t.zlevel=n))})}function vu(t){var e=t._coordSysMgr;return r(new Ls(t),{getCoordinateSystems:y(e.getCoordinateSystems,e),getComponentByElement:function(e){for(;e;){var i=e.__ecComponentInfo;if(null!=i)return t._model.getComponent(i.mainType,i.index);e=e.parent}}})}function yu(){this.eventInfo}function xu(t){function e(t,e){for(var i=0;i65535?sL:uL}function Qu(t){var e=t.constructor;return e===Array?t.slice():new e(t)}function th(t,e){f(hL.concat(e.__wrappedMethods||[]),function(i){e.hasOwnProperty(i)&&(t[i]=e[i])}),t.__wrappedMethods=e.__wrappedMethods,f(cL,function(i){t[i]=n(e[i])}),t._calculationInfo=r(e._calculationInfo)}function eh(t,e,i,n,a){var o=rL[e.type],r=n-1,s=e.name,l=t[s][r];if(l&&l.lengthc;c+=i)t[s].push(new o(Math.min(a-c,i)))}function ih(t){var e=t._invertedIndicesMap;f(e,function(i,n){var a=t._dimensionInfos[n],o=a.ordinalMeta;if(o){i=e[n]=new lL(o.categories.length);for(var r=0;r=0?this._indices[t]:-1}function rh(t,e){var i=t._idList[e];return null==i&&(i=nh(t,t._idDimIdx,e)),null==i&&(i=oL+e),i}function sh(t){return _(t)||(t=[t]),t}function lh(t,e){var i=t.dimensions,n=new dL(p(i,t.getDimensionInfo,t),t.hostModel);th(n,t);for(var a=n._storage={},o=t._storage,r=0;r=0?(a[s]=uh(o[s]),n._rawExtent[s]=hh(),n._extent[s]=null):a[s]=o[s])}return n}function uh(t){for(var e=new Array(t.length),i=0;id;d++){var p=o[d]=r({},S(o[d])?o[d]:{name:o[d]}),g=p.name,m=h[d]=new $u;null!=g&&null==l.get(g)&&(m.name=m.displayName=g,l.set(g,d)),null!=p.type&&(m.type=p.type),null!=p.displayName&&(m.displayName=p.displayName)}var v=i.encodeDef;!v&&i.encodeDefaulter&&(v=i.encodeDefaulter(e,c)),v=B(v),v.each(function(t,e){if(t=ea(t).slice(),1===t.length&&!b(t[0])&&t[0]<0)return void v.set(e,!1);var i=v.set(e,[]);f(t,function(t,n){b(t)&&(t=l.get(t)),null!=t&&c>t&&(i[n]=t,a(h[t],e,n))})});var y=0;f(t,function(t){var e,t,i,o;if(b(t))e=t,t={};else{e=t.name;var r=t.ordinalMeta;t.ordinalMeta=null,t=n(t),t.ordinalMeta=r,i=t.dimsDef,o=t.otherDims,t.name=t.coordDim=t.coordDimIndex=t.dimsDef=t.otherDims=null}var l=v.get(e);if(l!==!1){var l=ea(l);if(!l.length)for(var u=0;u<(i&&i.length||1);u++){for(;yI;I++){var m=h[I]=h[I]||new $u,T=m.coordDim;null==T&&(m.coordDim=fh(M,u,w),m.coordDimIndex=0,(!x||0>=_)&&(m.isExtraCoord=!0),_--),null==m.name&&(m.name=fh(m.coordDim,l)),null!=m.type||ws(e,I,m.name)!==eD.Must&&(!m.isExtraCoord||null==m.otherDims.itemName&&null==m.otherDims.seriesName)||(m.type="ordinal")}return h}function dh(t,e,i,n){var a=Math.max(t.dimensionsDetectCount||1,e.length,i.length,n||0);return f(e,function(t){var e=t.dimsDef;e&&(a=Math.max(a,e.length))}),a}function fh(t,e,i){if(i||null!=e.get(t)){for(var n=0;null!=e.get(t+n);)n++;t+=n}return e.set(t,!0),t}function ph(t){this.coordSysName=t,this.coordSysDims=[],this.axisMap=B(),this.categoryAxisMap=B(),this.firstCategoryDimIndex=null}function gh(t){var e=t.get("coordinateSystem"),i=new ph(e),n=mL[e];return n?(n(t,i,i.axisMap,i.categoryAxisMap),i):void 0}function mh(t){return"category"===t.get("type")}function vh(t,e,i){i=i||{};var n,a,o,r,s=i.byIndex,l=i.stackedCoordDimension,u=!(!t||!t.get("stack"));if(f(e,function(t,i){b(t)&&(e[i]=t={name:t}),u&&!t.isExtraCoord&&(s||n||!t.ordinalMeta||(n=t),a||"ordinal"===t.type||"time"===t.type||l&&l!==t.coordDim||(a=t))}),!a||s||n||(s=!0),a){o="__\x00ecstackresult",r="__\x00ecstackedover",n&&(n.createInvertedIndices=!0);var h=a.coordDim,c=a.type,d=0;f(e,function(t){t.coordDim===h&&d++}),e.push({name:o,coordDim:h,coordDimIndex:d,type:c,isExtraCoord:!0,isCalculationCoord:!0}),d++,e.push({name:r,coordDim:r,coordDimIndex:d,type:c,isExtraCoord:!0,isCalculationCoord:!0})}return{stackedDimension:a&&a.name,stackedByDimension:n&&n.name,isStackedByIndex:s,stackedOverDimension:r,stackResultDimension:o}}function yh(t,e){return!!e&&e===t.getCalculationInfo("stackedDimension")}function xh(t,e){return yh(t,e)?t.getCalculationInfo("stackResultDimension"):e}function _h(t,e,i){i=i||{},us.isInstance(t)||(t=us.seriesDataToSource(t));var n,a=e.get("coordinateSystem"),o=ks.get(a),r=gh(e);r&&(n=p(r.coordSysDims,function(t){var e={name:t},i=r.axisMap.get(t);if(i){var n=i.get("type");e.type=qu(n)}return e})),n||(n=o&&(o.getDimensionsInfo?o.getDimensionsInfo():o.dimensions.slice())||["x","y"]);var s,l,u=gL(t,{coordDimensions:n,generateCoord:i.generateCoord,encodeDefaulter:i.useEncodeDefaulter?x(ys,n,e):null});r&&f(u,function(t,e){var i=t.coordDim,n=r.categoryAxisMap.get(i);n&&(null==s&&(s=e),t.ordinalMeta=n.getOrdinalMeta()),null!=t.otherDims.itemName&&(l=!0)}),l||null==s||(u[s].otherDims.itemName=0);var h=vh(e,u),c=new dL(u,e);c.setCalculationInfo(h);var d=null!=s&&wh(t)?function(t,e,i,n){return n===s?i:this.defaultDimValueGetter(t,e,i,n)}:null;return c.hasItemOption=!1,c.initData(t,null,d),c}function wh(t){if(t.sourceFormat===YA){var e=bh(t.data||[]);return null!=e&&!_(na(e))}}function bh(t){for(var e=0;er&&(r=a.interval=i),null!=n&&r>n&&(r=a.interval=n);var s=a.intervalPrecision=Dh(r),l=a.niceTickExtent=[_L(Math.ceil(t[0]/r)*r,s),_L(Math.floor(t[1]/r)*r,s)];return Lh(l,t),a}function Dh(t){return Cr(t)+2}function Ch(t,e,i){t[e]=Math.max(Math.min(t[e],i[1]),i[0])}function Lh(t,e){!isFinite(t[0])&&(t[0]=e[0]),!isFinite(t[1])&&(t[1]=e[1]),Ch(t,0,e),Ch(t,1,e),t[0]>t[1]&&(t[0]=t[1])}function kh(t){return t.get("stack")||SL+t.seriesIndex}function Ph(t){return t.dim+t.index}function Oh(t){var e=[],i=t.axis,n="axis0";if("category"===i.type){for(var a=i.getBandWidth(),o=0;os;++s){var u=a.get(r,s);e[o]?e[o].push(u):e[o]=[u]}});var i=[];for(var n in e)if(e.hasOwnProperty(n)){var a=e[n];if(a){a.sort(function(t,e){return t-e});for(var o=null,r=1;r0&&(o=null===o?s:Math.min(o,s))}i[n]=o}}return i}function Rh(t){var e=zh(t),i=[];return f(t,function(t){var n,a=t.coordinateSystem,o=a.getBaseAxis(),r=o.getExtent();if("category"===o.type)n=o.getBandWidth();else if("value"===o.type||"time"===o.type){var s=o.dim+"_"+o.index,l=e[s],u=Math.abs(r[1]-r[0]),h=o.scale.getExtent(),c=Math.abs(h[1]-h[0]);n=l?u/c*l:u}else{var d=t.getData();n=Math.abs(r[1]-r[0])/d.count()}var f=Ir(t.get("barWidth"),n),p=Ir(t.get("barMaxWidth"),n),g=Ir(t.get("barMinWidth")||1,n),m=t.get("barGap"),v=t.get("barCategoryGap");i.push({bandWidth:n,barWidth:f,barMaxWidth:p,barMinWidth:g,barGap:m,barCategoryGap:v,axisKey:Ph(o),stackId:kh(t)})}),Eh(i)}function Eh(t){var e={};f(t,function(t){var i=t.axisKey,n=t.bandWidth,a=e[i]||{bandWidth:n,remainedWidth:n,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},o=a.stacks;e[i]=a;var r=t.stackId;o[r]||a.autoWidthCount++,o[r]=o[r]||{width:0,maxWidth:0};var s=t.barWidth;s&&!o[r].width&&(o[r].width=s,s=Math.min(a.remainedWidth,s),a.remainedWidth-=s);var l=t.barMaxWidth;l&&(o[r].maxWidth=l);var u=t.barMinWidth;u&&(o[r].minWidth=u);var h=t.barGap;null!=h&&(a.gap=h);var c=t.barCategoryGap;null!=c&&(a.categoryGap=c)});var i={};return f(e,function(t,e){i[e]={};var n=t.stacks,a=t.bandWidth,o=Ir(t.categoryGap,a),r=Ir(t.gap,1),s=t.remainedWidth,l=t.autoWidthCount,u=(s-o)/(l+(l-1)*r);u=Math.max(u,0),f(n,function(t){var e=t.maxWidth,i=t.minWidth;if(t.width){var n=t.width;e&&(n=Math.min(n,e)),i&&(n=Math.max(n,i)),t.width=n,s-=n+r*n,l--}else{var n=u;e&&n>e&&(n=Math.min(e,s)),i&&i>n&&(n=i),n!==u&&(t.width=n,s-=n+r*n,l--)}}),u=(s-o)/(l+(l-1)*r),u=Math.max(u,0);var h,c=0;f(n,function(t){t.width||(t.width=u),h=t,c+=t.width*(1+r)}),h&&(c-=h.width*r);var d=-c/2;f(n,function(t,n){i[e][n]=i[e][n]||{bandWidth:a,offset:d,width:t.width},d+=t.width*(1+r)})}),i}function Bh(t,e,i){if(t&&e){var n=t[Ph(e)];return null!=n&&null!=i&&(n=n[kh(i)]),n}}function Vh(t,e){var i=Nh(t,e),n=Rh(i),a={};f(i,function(t){var e=t.getData(),i=t.coordinateSystem,o=i.getBaseAxis(),r=kh(t),s=n[Ph(o)][r],l=s.offset,u=s.width,h=i.getOtherAxis(o),c=t.get("barMinHeight")||0;a[r]=a[r]||[],e.setLayout({bandWidth:s.bandWidth,offset:l,size:u});for(var d=e.mapDimension(h.dim),f=e.mapDimension(o.dim),p=yh(e,d),g=h.isHorizontal(),m=Wh(o,h,p),v=0,y=e.count();y>v;v++){var x=e.get(d,v),_=e.get(f,v),w=x>=0?"p":"n",b=m;p&&(a[r][_]||(a[r][_]={p:m,n:m}),b=a[r][_][w]);var S,M,I,T;if(g){var A=i.dataToPoint([x,_]);S=b,M=A[1]+l,I=A[0]-m,T=u,Math.abs(I)I?-1:1)*c),isNaN(I)||p&&(a[r][_][w]+=I)}else{var A=i.dataToPoint([_,x]);S=A[0]+l,M=b,I=u,T=A[1]-m,Math.abs(T)=T?-1:1)*c),isNaN(T)||p&&(a[r][_][w]+=T)}e.setItemLayout(v,{x:S,y:M,width:I,height:T})}},this)}function Gh(t){return t.coordinateSystem&&"cartesian2d"===t.coordinateSystem.type}function Fh(t){return t.pipelineContext&&t.pipelineContext.large}function Wh(t,e){return e.toGlobalCoord(e.dataToCoord("log"===e.type?1:0))}function Hh(t,e){return GL(t,VL(e))}function Zh(t,e){var i,n,a,o=t.type,r=e.getMin(),s=e.getMax(),l=t.getExtent();"ordinal"===o?i=e.getCategories().length:(n=e.get("boundaryGap"),_(n)||(n=[n||0,n||0]),"boolean"==typeof n[0]&&(n=[0,0]),n[0]=Ir(n[0],1),n[1]=Ir(n[1],1),a=l[1]-l[0]||Math.abs(l[0])),"dataMin"===r?r=l[0]:"function"==typeof r&&(r=r({min:l[0],max:l[1]})),"dataMax"===s?s=l[1]:"function"==typeof s&&(s=s({min:l[0],max:l[1]}));var u=null!=r,h=null!=s;null==r&&(r="ordinal"===o?i?0:0/0:l[0]-n[0]*a),null==s&&(s="ordinal"===o?i?i-1:0/0:l[1]+n[1]*a),(null==r||!isFinite(r))&&(r=0/0),(null==s||!isFinite(s))&&(s=0/0),t.setBlank(A(r)||A(s)||"ordinal"===o&&!t.getOrdinalMeta().categories.length),e.getNeedCrossZero()&&(r>0&&s>0&&!u&&(r=0),0>r&&0>s&&!h&&(s=0));var c=e.ecModel;if(c&&"time"===o){var d,p=Nh("bar",c);if(f(p,function(t){d|=t.getBaseAxis()===e.axis}),d){var g=Rh(p),m=Xh(r,s,e,g);r=m.min,s=m.max}}return{extent:[r,s],fixMin:u,fixMax:h}}function Xh(t,e,i,n){var a=i.axis.getExtent(),o=a[1]-a[0],r=Bh(n,i.axis);if(void 0===r)return{min:t,max:e};var s=1/0;f(r,function(t){s=Math.min(t.offset,s)});var l=-1/0;f(r,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)/o,d=h/c-h;return e+=d*(l/u),t-=d*(s/u),{min:t,max:e}}function Uh(t,e){var i=Zh(t,e),n=i.extent,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.fixMin,fixMax:i.fixMax,minInterval:"interval"===o||"time"===o?e.get("minInterval"):null,maxInterval:"interval"===o||"time"===o?e.get("maxInterval"):null});var r=e.get("interval");null!=r&&t.setInterval&&t.setInterval(r)}function Yh(t,e){if(e=e||t.get("type"))switch(e){case"category":return new xL(t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),[1/0,-1/0]);case"value":return new bL;default:return(Sh.getClass(e)||bL).create(t)}}function jh(t){var e=t.scale.getExtent(),i=e[0],n=e[1];return!(i>0&&n>0||0>i&&0>n)}function qh(t){var e=t.getLabelModel().get("formatter"),i="category"===t.type?t.scale.getExtent()[0]:null;return"string"==typeof e?e=function(e){return function(i){return i=t.scale.getLabel(i),e.replace("{value}",null!=i?i:"")}}(e):"function"==typeof e?function(n,a){return null!=i&&(a=n-i),e(Kh(t,n),a)}:function(e){return t.scale.getLabel(e)}}function Kh(t,e){return"category"===t.type?t.scale.getLabel(e):e}function $h(t){var e=t.model,i=t.scale;if(e.get("axisLabel.show")&&!i.isBlank()){var n,a,o="category"===t.type,r=i.getExtent();o?a=i.count():(n=i.getTicks(),a=n.length);var s,l=t.getLabelModel(),u=qh(t),h=1;a>40&&(h=Math.ceil(a/40));for(var c=0;a>c;c+=h){var d=n?n[c]:r[0]+c,f=u(d),p=l.getTextRect(f),g=Jh(p,l.get("rotate")||0);s?s.union(g):s=g}return s}}function Jh(t,e){var i=e*Math.PI/180,n=t.plain(),a=n.width,o=n.height,r=a*Math.abs(Math.cos(i))+Math.abs(o*Math.sin(i)),s=a*Math.abs(Math.sin(i))+Math.abs(o*Math.cos(i)),l=new Ti(n.x,n.y,r,s);return l}function Qh(t){var e=t.get("interval");return null==e?"auto":e}function tc(t){return"category"===t.type&&0===Qh(t.getLabelModel())}function ec(t,e){if("image"!==this.type){var i=this.style,n=this.shape;n&&"line"===n.symbolType?i.stroke=t:this.__isEmptyBrush?(i.stroke=t,i.fill=e||"#fff"):(i.fill&&(i.fill=t),i.stroke&&(i.stroke=t)),this.dirty(!1)}}function ic(t,e,i,n,a,o,r){var s=0===t.indexOf("empty");s&&(t=t.substr(5,1).toLowerCase()+t.substr(6));var l;return l=0===t.indexOf("image://")?Mo(t.slice(8),new Ti(e,i,n,a),r?"center":"cover"):0===t.indexOf("path://")?So(t.slice(7),{},new Ti(e,i,n,a),r?"center":"cover"):new tk({shape:{symbolType:t,x:e,y:i,width:n,height:a}}),l.__isEmptyBrush=s,l.setColor=ec,l.setColor(o),l}function nc(t){return _h(t.getSource(),t)}function ac(t,e){var i=e;vr.isInstance(e)||(i=new vr(e),c(i,UL));var n=Yh(i);return n.setExtent(t[0],t[1]),Uh(n,i),n}function oc(t){c(t,UL)}function rc(t,e){return Math.abs(t-e)>1^-(1&s),l=l>>1^-(1&l),s+=a,l+=o,a=s,o=l,n.push([s/i,l/i])}return n}function cc(t){return"category"===t.type?fc(t):mc(t)}function dc(t,e){return"category"===t.type?gc(t,e):{ticks:t.scale.getTicks()}}function fc(t){var e=t.getLabelModel(),i=pc(t,e);return!e.get("show")||t.scale.isBlank()?{labels:[],labelCategoryInterval:i.labelCategoryInterval}:i}function pc(t,e){var i=vc(t,"labels"),n=Qh(e),a=yc(i,n);if(a)return a;var o,r;return w(n)?o=Mc(t,n):(r="auto"===n?_c(t):n,o=Sc(t,r)),xc(i,n,{labels:o,labelCategoryInterval:r})}function gc(t,e){var i=vc(t,"ticks"),n=Qh(e),a=yc(i,n);if(a)return a;var o,r;if((!e.get("show")||t.scale.isBlank())&&(o=[]),w(n))o=Mc(t,n,!0);else if("auto"===n){var s=pc(t,t.getLabelModel());r=s.labelCategoryInterval,o=p(s.labels,function(t){return t.tickValue})}else r=n,o=Sc(t,r,!0);return xc(i,n,{ticks:o,tickCategoryInterval:r})}function mc(t){var e=t.scale.getTicks(),i=qh(t);return{labels:p(e,function(e,n){return{formattedLabel:i(e,n),rawLabel:t.scale.getLabel(e),tickValue:e}})}}function vc(t,e){return ok(t)[e]||(ok(t)[e]=[])}function yc(t,e){for(var i=0;i40&&(s=Math.max(1,Math.floor(r/40)));for(var l=o[0],u=t.dataToCoord(l+1)-t.dataToCoord(l),h=Math.abs(u*Math.cos(n)),c=Math.abs(u*Math.sin(n)),d=0,f=0;l<=o[1];l+=s){var p=0,g=0,m=Ui(i(l),e.font,"center","top");p=1.3*m.width,g=1.3*m.height,d=Math.max(d,p,7),f=Math.max(f,g,7)}var v=d/h,y=f/c;isNaN(v)&&(v=1/0),isNaN(y)&&(y=1/0);var x=Math.max(0,Math.floor(Math.min(v,y))),_=ok(t.model),w=t.getExtent(),b=_.lastAutoInterval,S=_.lastTickCount;return null!=b&&null!=S&&Math.abs(b-x)<=1&&Math.abs(S-r)<=1&&b>x&&_.axisExtend0===w[0]&&_.axisExtend1===w[1]?x=b:(_.lastTickCount=r,_.lastAutoInterval=x,_.axisExtend0=w[0],_.axisExtend1=w[1]),x}function bc(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 Sc(t,e,i){function n(t){l.push(i?t:{formattedLabel:a(t),rawLabel:o.getLabel(t),tickValue:t})}var a=qh(t),o=t.scale,r=o.getExtent(),s=t.getLabelModel(),l=[],u=Math.max((e||0)+1,1),h=r[0],c=o.count();0!==h&&u>1&&c/u>2&&(h=Math.round(Math.ceil(h/u)*u));var d=tc(t),f=s.get("showMinLabel")||d,p=s.get("showMaxLabel")||d;f&&h!==r[0]&&n(r[0]);for(var g=h;g<=r[1];g+=u)n(g);return p&&g-u!==r[1]&&n(r[1]),l}function Mc(t,e,i){var n=t.scale,a=qh(t),o=[];return f(n.getTicks(),function(t){var r=n.getLabel(t);e(t,r)&&o.push(i?t:{formattedLabel:a(t),rawLabel:r,tickValue:t})}),o}function Ic(t,e){var i=t[1]-t[0],n=e,a=i/n/2;t[0]+=a,t[1]-=a}function Tc(t,e,i,n){function a(t,e){return t=Tr(t),e=Tr(e),d?t>e:e>t}var o=e.length;if(t.onBand&&!i&&o){var r,s,l=t.getExtent();if(1===o)e[0].coord=l[0],r=e[1]={coord:l[0]};else{var u=e[o-1].tickValue-e[0].tickValue,h=(e[o-1].coord-e[0].coord)/u;f(e,function(t){t.coord-=h/2});var c=t.scale.getExtent();s=1+c[1]-e[o-1].tickValue,r={coord:e[o-1].coord+h*s},e.push(r)}var d=l[0]>l[1];a(e[0].coord,l[0])&&(n?e[0].coord=l[0]:e.shift()),n&&a(l[0],e[0].coord)&&e.unshift({coord:l[0]}),a(l[1],r.coord)&&(n?r.coord=l[1]:e.pop()),n&&a(r.coord,l[1])&&e.push({coord:l[1]})}}function Ac(t){return this._axes[t]}function Dc(t){ck.call(this,t)}function Cc(t,e){return e.type||(e.data?"category":"value")}function Lc(t,e){return t.getCoordSysModel()===e}function kc(t,e,i){this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this._initCartesian(t,e,i),this.model=t}function Pc(t,e,i,n){function a(t){return t.dim+"_"+t.index}i.getAxesOnZeroOf=function(){return o?[o]:[]};var o,r=t[e],s=i.model,l=s.get("axisLine.onZero"),u=s.get("axisLine.onZeroAxisIndex");if(l){if(null!=u)Oc(r[u])&&(o=r[u]);else for(var h in r)if(r.hasOwnProperty(h)&&Oc(r[h])&&!n[a(r[h])]){o=r[h];break}o&&(n[a(o)]=!0)}}function Oc(t){return t&&"category"!==t.type&&"time"!==t.type&&jh(t)}function Nc(t,e){var i=t.getExtent(),n=i[0]+i[1];t.toGlobalCoord="x"===t.dim?function(t){return t+e}:function(t){return n-t+e},t.toLocalCoord="x"===t.dim?function(t){return t-e}:function(t){return n-t+e}}function zc(t){return p(_k,function(e){var i=t.getReferringComponents(e)[0];return i})}function Rc(t){return"cartesian2d"===t.get("coordinateSystem")}function Ec(t,e){var i=t.mapDimension("defaultedLabel",!0),n=i.length;if(1===n)return nl(t,e,i[0]);if(n){for(var a=[],o=0;o0?"bottom":"top":a.width>0?"left":"right";l||Bc(t.style,f,n,u,o,i,g),Uc(a)&&(f.fill=f.stroke="none"),Wo(t,f)}function jc(t,e){var i=t.get(Ik)||0,n=isNaN(e.width)?Number.MAX_VALUE:Math.abs(e.width),a=isNaN(e.height)?Number.MAX_VALUE:Math.abs(e.height);return Math.min(i,n,a)}function qc(t,e,i){var n=t.getData(),a=[],o=n.getLayout("valueAxisHorizontal")?1:0;a[1-o]=n.getLayout("valueAxisStart");var r=n.getLayout("largeDataIndices"),s=n.getLayout("barWidth"),l=t.getModel("backgroundStyle"),u=t.get("showBackground",!0);if(u){var h=n.getLayout("largeBackgroundPoints"),c=[];c[1-o]=n.getLayout("backgroundStart");var d=new Pk({shape:{points:h},incremental:!!i,__startPoint:c,__baseDimIdx:o,__largeDataIndices:r,__barWidth:s,silent:!0,z2:0});Jc(d,l,n),e.add(d)}var f=new Pk({shape:{points:n.getLayout("largePoints")},incremental:!!i,__startPoint:a,__baseDimIdx:o,__largeDataIndices:r,__barWidth:s});e.add(f),$c(f,t,n),f.seriesIndex=t.seriesIndex,t.get("silent")||(f.on("mousedown",Ok),f.on("mousemove",Ok))}function Kc(t,e,i){var n=t.__baseDimIdx,a=1-n,o=t.shape.points,r=t.__largeDataIndices,s=Math.abs(t.__barWidth/2),l=t.__startPoint[a];Tk[0]=e,Tk[1]=i;for(var u=Tk[n],h=Tk[1-n],c=u-s,d=u+s,f=0,p=o.length/2;p>f;f++){var g=2*f,m=o[g+n],v=o[g+a];if(m>=c&&d>=m&&(v>=l?h>=l&&v>=h:h>=v&&l>=h))return r[f]}return-1}function $c(t,e,i){var n=i.getVisual("borderColor")||i.getVisual("color"),a=e.getModel("itemStyle").getItemStyle(["color","borderColor"]);t.useStyle(a),t.style.fill=null,t.style.stroke=n,t.style.lineWidth=i.getLayout("barWidth")}function Jc(t,e,i){var n=e.get("borderColor")||e.get("color"),a=e.getItemStyle(["color","borderColor"]);t.useStyle(a),t.style.fill=null,t.style.stroke=n,t.style.lineWidth=i.getLayout("barWidth")}function Qc(t,e,i){var n,a="polar"===i.type;return n=a?i.getArea():i.grid.getRect(),a?{cx:n.cx,cy:n.cy,r0:t?n.r0:e.r0,r:t?n.r:e.r,startAngle:t?e.startAngle:0,endAngle:t?e.endAngle:2*Math.PI}:{x:t?e.x:n.x,y:t?n.y:e.y,width:t?e.width:n.width,height:t?n.height:e.height}}function td(t,e,i){var n="polar"===t.type?BT:UT;return new n({shape:Qc(e,i,t),silent:!0,z2:0})}function ed(t,e,i,n){var a,o,r=Pr(i-t.rotation),s=n[0]>n[1],l="start"===e&&!s||"start"!==e&&s;return Or(r-Nk/2)?(o=l?"bottom":"top",a="center"):Or(r-1.5*Nk)?(o=l?"top":"bottom",a="center"):(o="middle",a=1.5*Nk>r&&r>Nk/2?l?"left":"right":l?"right":"left"),{rotation:r,textAlign:a,textVerticalAlign:o}}function id(t,e,i){if(!tc(t.axis)){var n=t.get("axisLabel.showMinLabel"),a=t.get("axisLabel.showMaxLabel");e=e||[],i=i||[];var o=e[0],r=e[1],s=e[e.length-1],l=e[e.length-2],u=i[0],h=i[1],c=i[i.length-1],d=i[i.length-2];n===!1?(nd(o),nd(u)):ad(o,r)&&(n?(nd(r),nd(h)):(nd(o),nd(u))),a===!1?(nd(s),nd(c)):ad(l,s)&&(a?(nd(l),nd(d)):(nd(s),nd(c)))}}function nd(t){t&&(t.ignore=!0)}function ad(t,e){var i=t&&t.getBoundingRect().clone(),n=e&&e.getBoundingRect().clone();if(i&&n){var a=Ne([]);return Be(a,a,-t.rotation),i.applyTransform(Re([],a,t.getLocalTransform())),n.applyTransform(Re([],a,e.getLocalTransform())),i.intersect(n)}}function od(t){return"middle"===t||"center"===t}function rd(t,e,i,n,a){for(var o=[],r=[],s=[],l=0;l=0||t===e}function md(t){var e=vd(t);if(e){var i=e.axisPointerModel,n=e.axis.scale,a=i.option,o=i.get("status"),r=i.get("value");null!=r&&(r=n.parse(r));var s=xd(i);null==o&&(a.status=s?"show":"hide");var l=n.getExtent().slice();l[0]>l[1]&&l.reverse(),(null==r||r>l[1])&&(r=l[1]),r0?i=n[0]:n[1]<0&&(i=n[1]),i}function Rd(t,e,i,n){var a=0/0;t.stacked&&(a=i.get(i.getCalculationInfo("stackedOverDimension"),n)),isNaN(a)&&(a=t.valueStart);var o=t.baseDataOffset,r=[];return r[o]=i.get(t.baseDim,n),r[1-o]=a,e.dataToPoint(r)}function Ed(t,e){var i=[];return e.diff(t).add(function(t){i.push({cmd:"+",idx:t})}).update(function(t,e){i.push({cmd:"=",idx:e,idx1:t})}).remove(function(t){i.push({cmd:"-",idx:t})}).execute(),i}function Bd(t){return isNaN(t[0])||isNaN(t[1])}function Vd(t,e,i,n,a,o,r,s,l,u){return"none"!==u&&u?Gd.apply(this,arguments):Fd.apply(this,arguments)}function Gd(t,e,i,n,a,o,r,s,l,u,h){for(var c=0,d=i,f=0;n>f;f++){var p=e[d];if(d>=a||0>d)break;if(Bd(p)){if(h){d+=o;continue}break}if(d===i)t[o>0?"moveTo":"lineTo"](p[0],p[1]);else if(l>0){var g=e[c],m="y"===u?1:0,v=(p[m]-g[m])*l;aP(rP,g),rP[m]=g[m]+v,aP(sP,p),sP[m]=p[m]-v,t.bezierCurveTo(rP[0],rP[1],sP[0],sP[1],p[0],p[1])}else t.lineTo(p[0],p[1]);c=d,d+=o}return f}function Fd(t,e,i,n,a,o,r,s,l,u,h){for(var c=0,d=i,f=0;n>f;f++){var p=e[d];if(d>=a||0>d)break;if(Bd(p)){if(h){d+=o;continue}break}if(d===i)t[o>0?"moveTo":"lineTo"](p[0],p[1]),aP(rP,p);else if(l>0){var g=d+o,m=e[g];if(h)for(;m&&Bd(e[g]);)g+=o,m=e[g];var v=.5,y=e[c],m=e[g];if(!m||Bd(m))aP(sP,p);else{Bd(m)&&!h&&(m=p),Y(oP,m,y);var x,_;if("x"===u||"y"===u){var w="x"===u?0:1;x=Math.abs(p[w]-y[w]),_=Math.abs(p[w]-m[w])}else x=SS(p,y),_=SS(p,m);v=_/(_+x),nP(sP,p,oP,-l*(1-v))}eP(rP,rP,s),iP(rP,rP,r),eP(sP,sP,s),iP(sP,sP,r),t.bezierCurveTo(rP[0],rP[1],sP[0],sP[1],p[0],p[1]),nP(rP,p,oP,l*v)}else t.lineTo(p[0],p[1]);c=d,d+=o}return f}function Wd(t,e){var i=[1/0,1/0],n=[-1/0,-1/0];if(e)for(var a=0;an[0]&&(n[0]=o[0]),o[1]>n[1]&&(n[1]=o[1])}return{min:e?i:n,max:e?n:i}}function Hd(t,e){if(t.length===e.length){for(var i=0;ia;a++)n.push(Rd(i,t,e,a));return n}function Yd(t,e,i){for(var n=e.getBaseAxis(),a="x"===n.dim||"radius"===n.dim?0:1,o=[],r=0;r=0;o--){var r=i[o].dimension,s=t.dimensions[r],l=t.getDimensionInfo(s);if(n=l&&l.coordDim,"x"===n||"y"===n){a=i[o];break}}if(a){var u=e.getAxis(n),h=p(a.stops,function(t){return{coord:u.toGlobalCoord(u.dataToCoord(t.value)),color:t.color}}),c=h.length,d=a.outerColors.slice();c&&h[0].coord>h[c-1].coord&&(h.reverse(),d.reverse());var g=10,m=h[0].coord-g,v=h[c-1].coord+g,y=v-m;if(.001>y)return"transparent";f(h,function(t){t.offset=(t.coord-m)/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 x=new tA(0,0,0,0,h,!0);return x[n]=m,x[n+"2"]=v,x}}}function qd(t,e,i){var n=t.get("showAllSymbol"),a="auto"===n;if(!n||a){var o=i.getAxesByScale("ordinal")[0];if(o&&(!a||!Kd(o,e))){var r=e.mapDimension(o.dim),s={};return f(o.getViewLabels(),function(t){s[t.tickValue]=1}),function(t){return!s.hasOwnProperty(e.get(r,t))}}}}function Kd(t,e){var i=t.getExtent(),n=Math.abs(i[1]-i[0])/t.scale.count();isNaN(n)&&(n=0);for(var a=e.count(),o=Math.max(1,Math.round(a/5)),r=0;a>r;r+=o)if(1.5*Td.getSymbolSize(e,r)[t.isHorizontal()?1:0]>n)return!1;return!0}function $d(t,e,i){if("cartesian2d"===t.type){var n=t.getBaseAxis().isHorizontal(),a=Gc(t,e,i);if(!i.get("clip",!0)){var o=a.shape,r=Math.max(o.width,o.height);n?(o.y-=r,o.height+=2*r):(o.x-=r,o.width+=2*r)}return a}return Fc(t,e,i)}function Jd(t,e){this.getAllNames=function(){var t=e();return t.mapArray(t.getName)},this.containName=function(t){var i=e();return i.indexOfName(t)>=0},this.indexOfName=function(e){var i=t();return i.indexOfName(e)},this.getItemVisual=function(e,i){var n=t();return n.getItemVisual(e,i)}}function Qd(t,e,i,n){var a=e.getData(),o=this.dataIndex,r=a.getName(o),s=e.get("selectedOffset");n.dispatchAction({type:"pieToggleSelect",from:t,name:r,seriesId:e.id}),a.each(function(t){tf(a.getItemGraphicEl(t),a.getItemLayout(t),e.isSelected(a.getName(t)),s,i)})}function tf(t,e,i,n,a){var o=(e.startAngle+e.endAngle)/2,r=Math.cos(o),s=Math.sin(o),l=i?n:0,u=[r*l,s*l];a?t.animate().when(200,{position:u}).start("bounceOut"):t.attr("position",u)}function ef(t,e){xM.call(this);var i=new BT({z2:2}),n=new HT,a=new NT;this.add(i),this.add(n),this.add(a),this.updateData(t,e,!0)}function nf(t,e,i,n,a,o,r,s,l,u){function h(e,i,n){for(var a=e;i>a&&!(t[a].y+n>l+r);a++)if(t[a].y+=n,a>e&&i>a+1&&t[a+1].y>t[a].y+t[a].height)return void c(a,n/2);c(i-1,n/2)}function c(e,i){for(var n=e;n>=0&&!(t[n].y-i0&&t[n].y>t[n-1].y+t[n-1].height));n--);}function d(t,e,i,n,a,o){for(var r=o>0?e?Number.MAX_VALUE:0:e?Number.MAX_VALUE:0,s=0,l=t.length;l>s;s++)if("none"===t[s].labelAlignTo){var u=Math.abs(t[s].y-n),h=t[s].len,c=t[s].len2,d=a+h>u?Math.sqrt((a+h+c)*(a+h+c)-u*u):Math.abs(t[s].x-i);e&&d>=r&&(d=r-10),!e&&r>=d&&(d=r+10),t[s].x=i+d*o,r=d}}t.sort(function(t,e){return t.y-e.y});for(var f,p=0,g=t.length,m=[],v=[],y=0;g>y;y++){if("outer"===t[y].position&&"labelLine"===t[y].labelAlignTo){var x=t[y].x-u;t[y].linePoints[1][0]+=x,t[y].x=u}f=t[y].y-p,0>f&&h(y,g,-f,a),p=t[y].y+t[y].height}0>r-p&&c(g-1,p-r);for(var y=0;g>y;y++)t[y].y>=i?v.push(t[y]):m.push(t[y]);d(m,!1,e,i,n,a),d(v,!0,e,i,n,a)}function af(t,e,i,n,a,o,r,s){for(var l=[],u=[],h=Number.MAX_VALUE,c=-Number.MAX_VALUE,d=0;d0?"P":"N",o=n.getVisual("borderColor"+a)||n.getVisual("color"+a),r=i.getModel(NP).getItemStyle(RP);e.useStyle(r),e.style.fill=null,e.style.stroke=o}function vf(t,e,i,n,a){var o;return o=i>n?-1:n>i?1:e>0?t.get(a,e-1)<=n?1:-1:1}function yf(t,e){var i,n=t.getBaseAxis(),a="category"===n.type?n.getBandWidth():(i=n.getExtent(),Math.abs(i[1]-i[0])/e.count()),o=Ir(C(t.get("barMaxWidth"),a),a),r=Ir(C(t.get("barMinWidth"),1),a),s=t.get("barWidth");return null!=s?Ir(s,a):Math.max(Math.min(a/2,o),r)}function xf(t,e,i){sk.call(this,t,e,i),this.type="value",this.angle=0,this.name="",this.model}function _f(t,e,i){this._model=t,this.dimensions=[],this._indicatorAxes=p(t.getIndicatorModels(),function(t,e){var i="indicator_"+e,n=new xf(i,"log"===t.get("axisType")?new XL:new bL);return n.name=t.get("name"),n.model=t,t.axis=n,this.dimensions.push(i),n},this),this.resize(t,i),this.cx,this.cy,this.r,this.r0,this.startAngle}function wf(t,e){return s({show:e},t)}function bf(t){return _(t)||(t=[+t,+t]),t}function Sf(t){return!isNaN(t[0])&&!isNaN(t[1])}function Mf(t){return[t.cx,t.cy]}function If(){var t=mS();this.canvas=t,this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={}}function Tf(t,e,i){var n=t[1]-t[0];e=p(e,function(e){return{interval:[(e.interval[0]-t[0])/n,(e.interval[1]-t[0])/n]}});var a=e.length,o=0;return function(t){for(var n=o;a>n;n++){var r=e[n].interval;if(r[0]<=t&&t<=r[1]){o=n;break}}if(n===a)for(var n=o-1;n>=0;n--){var r=e[n].interval;if(r[0]<=t&&t<=r[1]){o=n;break}}return n>=0&&a>n&&i[n]}}function Af(t,e){var i=t[1]-t[0];return e=[(e[0]-t[0])/i,(e[1]-t[0])/i],function(t){return t>=e[0]&&t<=e[1]}}function Df(t){var e=t.dimensions;return"lng"===e[0]&&"lat"===e[1]}function Cf(t){var e=t.mainData,i=t.datas;i||(i={main:e},t.datasAttr={main:"data"}),t.datas=t.mainData=null,zf(e,i,t),QP(i,function(i){QP(e.TRANSFERABLE_METHODS,function(e){i.wrapMethod(e,x(Lf,t))})}),e.wrapMethod("cloneShallow",x(Pf,t)),QP(e.CHANGABLE_METHODS,function(i){e.wrapMethod(i,x(kf,t))}),O(i[e.dataType]===e)}function Lf(t,e){if(Nf(this)){var i=r({},this[tO]);i[this.dataType]=e,zf(e,i,t)}else Rf(e,this.dataType,this[eO],t);return e}function kf(t,e){return t.struct&&t.struct.update(this),e}function Pf(t,e){return QP(e[tO],function(i,n){i!==e&&Rf(i.cloneShallow(),n,e,t)}),e}function Of(t){var e=this[eO];return null==t||null==e?e:e[tO][t]}function Nf(t){return t[eO]===t}function zf(t,e,i){t[tO]={},QP(e,function(e,n){Rf(e,n,t,i)})}function Rf(t,e,i,n){i[tO][e]=t,t[eO]=i,t.dataType=e,n.struct&&(t[n.structAttr]=n.struct,n.struct[n.datasAttr[e]]=t),t.getLinkedData=Of}function Ef(t){this.root,this.data,this._nodes=[],this.hostModel=t}function Bf(t,e){var i=e.children;t.parentNode!==e&&(i.push(t),t.parentNode=e)}function Vf(t){t.hierNode={defaultAncestor:null,ancestor:t,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var e,i,n=[t];e=n.pop();)if(i=e.children,e.isExpand&&i.length)for(var a=i.length,o=a-1;o>=0;o--){var r=i[o];r.hierNode={defaultAncestor:null,ancestor:r,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},n.push(r)}}function Gf(t,e){var i=t.isExpand?t.children:[],n=t.parentNode.children,a=t.hierNode.i?n[t.hierNode.i-1]:null;if(i.length){Xf(t);var o=(i[0].hierNode.prelim+i[i.length-1].hierNode.prelim)/2;a?(t.hierNode.prelim=a.hierNode.prelim+e(t,a),t.hierNode.modifier=t.hierNode.prelim-o):t.hierNode.prelim=o}else a&&(t.hierNode.prelim=a.hierNode.prelim+e(t,a));t.parentNode.hierNode.defaultAncestor=Uf(t,a,t.parentNode.hierNode.defaultAncestor||n[0],e)}function Ff(t){var e=t.hierNode.prelim+t.parentNode.hierNode.modifier;t.setLayout({x:e},!0),t.hierNode.modifier+=t.parentNode.hierNode.modifier}function Wf(t){return arguments.length?t:$f}function Hf(t,e){var i={};return t-=Math.PI/2,i.x=e*Math.cos(t),i.y=e*Math.sin(t),i}function Zf(t,e){return es(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function Xf(t){for(var e=t.children,i=e.length,n=0,a=0;--i>=0;){var o=e[i];o.hierNode.prelim+=n,o.hierNode.modifier+=n,a+=o.hierNode.change,n+=o.hierNode.shift+a}}function Uf(t,e,i,n){if(e){for(var a=t,o=t,r=o.parentNode.children[0],s=e,l=a.hierNode.modifier,u=o.hierNode.modifier,h=r.hierNode.modifier,c=s.hierNode.modifier;s=Yf(s),o=jf(o),s&&o;){a=Yf(a),r=jf(r),a.hierNode.ancestor=t;var d=s.hierNode.prelim+c-o.hierNode.prelim-u+n(s,o);d>0&&(Kf(qf(s,t,i),t,d),u+=d,l+=d),c+=s.hierNode.modifier,u+=o.hierNode.modifier,l+=a.hierNode.modifier,h+=r.hierNode.modifier}s&&!Yf(a)&&(a.hierNode.thread=s,a.hierNode.modifier+=c-l),o&&!jf(r)&&(r.hierNode.thread=o,r.hierNode.modifier+=u-h,i=t)}return i}function Yf(t){var e=t.children;return e.length&&t.isExpand?e[e.length-1]:t.hierNode.thread}function jf(t){var e=t.children;return e.length&&t.isExpand?e[0]:t.hierNode.thread}function qf(t,e,i){return t.hierNode.ancestor.parentNode===e.parentNode?t.hierNode.ancestor:i}function Kf(t,e,i){var n=i/(e.hierNode.i-t.hierNode.i);e.hierNode.change-=n,e.hierNode.shift+=i,e.hierNode.modifier+=i,e.hierNode.prelim+=i,t.hierNode.change+=n}function $f(t,e){return t.parentNode===e.parentNode?1:2}function Jf(){ZS.call(this)}function Qf(t){this.name=t,this.zoomLimit,ZS.call(this),this._roamTransformable=new Jf,this._rawTransformable=new Jf,this._center,this._zoom}function tp(t,e,i,n){var a=i.seriesModel,o=a?a.coordinateSystem:null;return o===this?o[t](n):null}function ep(t,e,i){var n=t.target,a=n.position;a[0]+=e,a[1]+=i,n.dirty()}function ip(t,e,i,n){var a=t.target,o=t.zoomLimit,r=a.position,s=a.scale,l=t.zoom=t.zoom||1;if(l*=e,o){var u=o.min||0,h=o.max||1/0;l=Math.max(Math.min(h,l),u)}var c=l/t.zoom;t.zoom=l,r[0]-=(i-r[0])*(c-1),r[1]-=(n-r[1])*(c-1),s[0]*=c,s[1]*=c,a.dirty()}function np(t,e,i){var n=rp(t);n[e]=i}function ap(t,e,i){var n=rp(t),a=n[e];a===i&&(n[e]=null)}function op(t,e){return!!rp(t)[e]}function rp(t){return t[aO]||(t[aO]={})}function sp(t){this.pointerChecker,this._zr=t,this._opt={};var e=y,i=e(lp,this),a=e(up,this),o=e(hp,this),r=e(cp,this),l=e(dp,this);AS.call(this),this.setPointerChecker=function(t){this.pointerChecker=t},this.enable=function(e,u){this.disable(),this._opt=s(n(u)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),null==e&&(e=!0),(e===!0||"move"===e||"pan"===e)&&(t.on("mousedown",i),t.on("mousemove",a),t.on("mouseup",o)),(e===!0||"scale"===e||"zoom"===e)&&(t.on("mousewheel",r),t.on("pinch",l))},this.disable=function(){t.off("mousedown",i),t.off("mousemove",a),t.off("mouseup",o),t.off("mousewheel",r),t.off("pinch",l)},this.dispose=this.disable,this.isDragging=function(){return this._dragging},this.isPinching=function(){return this._pinching}}function lp(t){if(!(Ie(t)||t.target&&t.target.draggable)){var e=t.offsetX,i=t.offsetY;this.pointerChecker&&this.pointerChecker(t,e,i)&&(this._x=e,this._y=i,this._dragging=!0)}}function up(t){if(this._dragging&&gp("moveOnMouseMove",t,this._opt)&&"pinch"!==t.gestureEvent&&!op(this._zr,"globalPan")){var e=t.offsetX,i=t.offsetY,n=this._x,a=this._y,o=e-n,r=i-a;this._x=e,this._y=i,this._opt.preventDefaultMouseMove&&NS(t.event),pp(this,"pan","moveOnMouseMove",t,{dx:o,dy:r,oldX:n,oldY:a,newX:e,newY:i})}}function hp(t){Ie(t)||(this._dragging=!1)}function cp(t){var e=gp("zoomOnMouseWheel",t,this._opt),i=gp("moveOnMouseWheel",t,this._opt),n=t.wheelDelta,a=Math.abs(n),o=t.offsetX,r=t.offsetY;if(0!==n&&(e||i)){if(e){var s=a>3?1.4:a>1?1.2:1.1,l=n>0?s:1/s;fp(this,"zoom","zoomOnMouseWheel",t,{scale:l,originX:o,originY:r})}if(i){var u=Math.abs(n),h=(n>0?1:-1)*(u>3?.4:u>1?.15:.05);fp(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:h,originX:o,originY:r})}}}function dp(t){if(!op(this._zr,"globalPan")){var e=t.pinchScale>1?1.1:1/1.1;fp(this,"zoom",null,t,{scale:e,originX:t.pinchX,originY:t.pinchY})}}function fp(t,e,i,n,a){t.pointerChecker&&t.pointerChecker(n,a.originX,a.originY)&&(NS(n.event),pp(t,e,i,n,a))}function pp(t,e,i,n,a){a.isAvailableBehavior=y(gp,null,i,n),t.trigger(e,a)}function gp(t,e,i){var n=i[t];return!t||n&&(!b(n)||e.event[n+"Key"])}function mp(t,e,i){var n=e.getComponentByElement(t.topTarget),a=n&&n.coordinateSystem;return n&&n!==i&&!oO[n.mainType]&&a&&a.model!==i}function vp(t,e){var i=t.getItemLayout(e);return i&&!isNaN(i.x)&&!isNaN(i.y)&&"none"!==t.getItemVisual(e,"symbol")}function yp(t,e,i){return i.itemModel=e,i.itemStyle=e.getModel("itemStyle").getItemStyle(),i.hoverItemStyle=e.getModel("emphasis.itemStyle").getItemStyle(),i.lineStyle=e.getModel("lineStyle").getLineStyle(),i.labelModel=e.getModel("label"),i.hoverLabelModel=e.getModel("emphasis.label"),i.symbolInnerColor=t.isExpand===!1&&0!==t.children.length?i.itemStyle.fill:"#fff",i}function xp(t,e,i,n,a,o){var r=!i,s=t.tree.getNodeByDataIndex(e),l=s.getModel(),o=yp(s,l,o),u=t.tree.root,h=s.parentNode===u?s:s.parentNode||s,c=t.getItemGraphicEl(h.dataIndex),d=h.getLayout(),f=c?{x:c.position[0],y:c.position[1],rawX:c.__radialOldRawX,rawY:c.__radialOldRawY}:d,p=s.getLayout();r?(i=new Td(t,e,o),i.attr("position",[f.x,f.y])):i.updateData(t,e,o),i.__radialOldRawX=i.__radialRawX,i.__radialOldRawY=i.__radialRawY,i.__radialRawX=p.rawX,i.__radialRawY=p.rawY,n.add(i),t.setItemGraphicEl(e,i),ar(i,{position:[p.x,p.y]},a);var g=i.getSymbolPath();if("radial"===o.layout){var m,v,y=u.children[0],x=y.getLayout(),_=y.children.length;if(p.x===x.x&&s.isExpand===!0){var w={};w.x=(y.children[0].getLayout().x+y.children[_-1].getLayout().x)/2,w.y=(y.children[0].getLayout().y+y.children[_-1].getLayout().y)/2,m=Math.atan2(w.y-x.y,w.x-x.x),0>m&&(m=2*Math.PI+m),v=w.xm&&(m=2*Math.PI+m),0===s.children.length||0!==s.children.length&&s.isExpand===!1?(v=p.xx.x,v||(m-=Math.PI));var b=v?"left":"right",S=o.labelModel.get("rotate"),M=S*(Math.PI/180);g.setStyle({textPosition:o.labelModel.get("position")||b,textRotation:null==S?-m:M,textOrigin:"center",verticalAlign:"middle"})}_p(a,s,u,i,f,d,p,n,o)}function _p(t,e,i,n,a,o,r,l,u){var h=u.edgeShape,c=n.__edge;if("curve"===h)e.parentNode&&e.parentNode!==i&&(c||(c=n.__edge=new KT({shape:bp(u,a,a),style:s({opacity:0,strokeNoScale:!0},u.lineStyle)})),ar(c,{shape:bp(u,o,r),style:s({opacity:1},u.lineStyle)},t));else if("polyline"===h&&"orthogonal"===u.layout&&e!==i&&e.children&&0!==e.children.length&&e.isExpand===!0){for(var d=e.children,f=[],p=0;p=0;o--)n.push(a[o])}}function Tp(t,e){var i=Zf(t,e);t.layoutInfo=i;var n=t.get("layout"),a=0,o=0,r=null;"radial"===n?(a=2*Math.PI,o=Math.min(i.height,i.width)/2,r=Wf(function(t,e){return(t.parentNode===e.parentNode?1:2)/t.depth})):(a=i.width,o=i.height,r=Wf());var s=t.getData().tree.root,l=s.children[0];if(l){Vf(s),Mp(l,Gf,r),s.hierNode.modifier=-l.hierNode.prelim,Ip(l,Ff);var u=l,h=l,c=l;Ip(l,function(t){var e=t.getLayout().x;eh.getLayout().x&&(h=t),t.depth>c.depth&&(c=t)});var d=u===h?1:r(u,h)/2,f=d-u.getLayout().x,p=0,g=0,m=0,v=0;if("radial"===n)p=a/(h.getLayout().x+d+f),g=o/(c.depth-1||1),Ip(l,function(t){m=(t.getLayout().x+f)*p,v=(t.depth-1)*g;var e=Hf(m,v);t.setLayout({x:e.x,y:e.y,rawX:m,rawY:v},!0)});else{var y=t.getOrient();"RL"===y||"LR"===y?(g=o/(h.getLayout().x+d+f),p=a/(c.depth-1||1),Ip(l,function(t){v=(t.getLayout().x+f)*g,m="LR"===y?(t.depth-1)*p:a-(t.depth-1)*p,t.setLayout({x:m,y:v},!0)})):("TB"===y||"BT"===y)&&(p=a/(h.getLayout().x+d+f),g=o/(c.depth-1||1),Ip(l,function(t){m=(t.getLayout().x+f)*p,v="TB"===y?(t.depth-1)*g:o-(t.depth-1)*g,t.setLayout({x:m,y:v},!0)}))}}}function Ap(t,e,i){if(t&&u(e,t.type)>=0){var n=i.getData().tree.root,a=t.targetNode;if("string"==typeof a&&(a=n.getNodeById(a)),a&&n.contains(a))return{node:a};var o=t.targetNodeId;if(null!=o&&(a=n.getNodeById(o)))return{node:a}}}function Dp(t){for(var e=[];t;)t=t.parentNode,t&&e.push(t);return e.reverse()}function Cp(t,e){var i=Dp(t);return u(i,e)>=0}function Lp(t,e){for(var i=[];t;){var n=t.dataIndex;i.push({name:t.name,dataIndex:n,value:e.getRawValue(n)}),t=t.parentNode}return i.reverse(),i}function kp(t){var e=0;f(t.children,function(t){kp(t);var i=t.value;_(i)&&(i=i[0]),e+=i});var i=t.value;_(i)&&(i=i[0]),(null==i||isNaN(i))&&(i=e),0>i&&(i=0),_(t.value)?t.value[0]=i:t.value=i}function Pp(t,e){var i=e.get("color");if(i){t=t||[];var n;if(f(t,function(t){var e=new vr(t),i=e.get("color");(e.get("itemStyle.color")||i&&"none"!==i)&&(n=!0)}),!n){var a=t[0]||(t[0]={});a.color=i.slice()}return t}}function Op(t){this.group=new xM,t.add(this.group)}function Np(t,e,i,n,a,o){var r=[[a?t:t-hO,e],[t+i,e],[t+i,e+n],[a?t:t-hO,e+n]];return!o&&r.splice(2,0,[t+i+hO,e+n/2]),!a&&r.push([t,e+n/2]),r}function zp(t,e,i){t.eventData={componentType:"series",componentSubType:"treemap",componentIndex:e.componentIndex,seriesIndex:e.componentIndex,seriesName:e.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:i&&i.dataIndex,name:i&&i.name},treePathInfo:i&&Lp(i,e)}}function Rp(){var t,e=[],i={};return{add:function(t,n,a,o,r){return b(o)&&(r=o,o=0),i[t.id]?!1:(i[t.id]=1,e.push({el:t,target:n,time:a,delay:o,easing:r}),!0)},done:function(e){return t=e,this},start:function(){function n(){a--,a||(e.length=0,i={},t&&t())}for(var a=e.length,o=0,r=e.length;r>o;o++){var s=e[o];s.el.animateTo(s.target,s.time,s.delay,s.easing,n)}return this}}}function Ep(){return{nodeGroup:[],background:[],content:[]}}function Bp(t,e,i,a,o,s,l,u,h,c){function d(e,i,n){if(i.dataIndex=l.dataIndex,i.seriesIndex=t.seriesIndex,i.setShape({x:0,y:0,width:b,height:S}),I)p(i);else{i.invisible=!1;var a=l.getVisual("borderColor",!0),o=P.get("borderColor"),r=MO(k);r.fill=a;var s=SO(P);if(s.fill=o,n){var u=b-2*M;g(r,s,a,u,C,{x:M,y:0,width:u,height:C})}else r.text=s.text=null;i.setStyle(r),Ro(i,s)}e.add(i)}function f(e,i){i.dataIndex=l.dataIndex,i.seriesIndex=t.seriesIndex;var n=Math.max(b-2*M,0),a=Math.max(S-2*M,0);if(i.culling=!0,i.setShape({x:M,y:M,width:n,height:a}),I)p(i);else{i.invisible=!1;var o=l.getVisual("color",!0),r=MO(k);r.fill=o;var s=SO(P);g(r,s,o,n,a),i.setStyle(r),Ro(i,s)}e.add(i)}function p(t){!t.invisible&&s.push(t)}function g(e,i,a,o,r,s){var u=N.get("name"),h=N.getModel(s?yO:mO),c=N.getModel(s?xO:vO),d=h.getShallow("show");Uo(e,i,h,c,{defaultText:d?u:null,autoColor:a,isRectText:!0,labelFetcher:t,labelDataIndex:l.dataIndex,labelProp:s?"upperLabel":"label"}),m(e,s,_),m(i,s,_),s&&(e.textRect=n(s)),e.truncate=d&&h.get("ellipsis")?{outerWidth:o,outerHeight:r,minChar:2}:null}function m(e,i,n){var a=e.text;if(!i&&n.isLeafRoot&&null!=a){var o=t.get("drillDownIcon",!0);e.text=o?o+" "+a:a}}function v(t,n,a,r){var s=null!=A&&i[t][A],l=o[t];return s?(i[t][A]=null,y(l,s,t)):I||(s=new n({z:Vp(a,r)}),s.__tmDepth=a,s.__tmStorageName=t,x(l,s,t)),e[t][T]=s}function y(t,e,i){var n=t[T]={};n.old="nodeGroup"===i?e.position.slice():r({},e.shape)}function x(t,e,i){var n=t[T]={},r=l.parentNode;if(r&&(!a||"drillDown"===a.direction)){var s=0,u=0,h=o.background[r.getRawIndex()];!a&&h&&h.old&&(s=h.old.width,u=h.old.height),n.old="nodeGroup"===i?[0,u]:{x:s,y:u,width:0,height:0}}n.fadein="nodeGroup"!==i}if(l){var _=l.getLayout(),w=t.getData();if(w.setItemGraphicEl(l.dataIndex,null),_&&_.isInView){var b=_.width,S=_.height,M=_.borderWidth,I=_.invisible,T=l.getRawIndex(),A=u&&u.getRawIndex(),D=l.viewChildren,C=_.upperHeight,L=D&&D.length,k=l.getModel("itemStyle"),P=l.getModel("emphasis.itemStyle"),O=v("nodeGroup",dO);if(O){if(h.add(O),O.attr("position",[_.x||0,_.y||0]),O.__tmNodeWidth=b,O.__tmNodeHeight=S,_.isAboveViewRoot)return O;var N=l.getModel(),z=v("background",fO,c,wO);if(z&&d(O,z,L&&_.upperLabelHeight),L)Zo(O)&&Ho(O,!1),z&&(Ho(z,!0),w.setItemGraphicEl(l.dataIndex,z));else{var R=v("content",fO,c,bO);R&&f(O,R),z&&Zo(z)&&Ho(z,!1),Ho(O,!0),w.setItemGraphicEl(l.dataIndex,O)}return O}}}}function Vp(t,e){var i=t*_O+e;return(i-1)/i}function Gp(t){var e=t.pieceList;t.hasSpecialVisual=!1,f(e,function(e,i){e.originIndex=i,null!=e.visual&&(t.hasSpecialVisual=!0)})}function Fp(t){var e=t.categories,i=t.visual,n=t.categoryMap={}; +if(DO(e,function(t,e){n[t]=e}),!_(i)){var a=[];S(i)?DO(i,function(t,e){var i=n[e];a[null!=i?i:LO]=t}):a[LO]=i,i=Kp(t,a)}for(var o=e.length-1;o>=0;o--)null==i[o]&&(delete n[e[o]],e.pop())}function Wp(t,e){var i=t.visual,n=[];S(i)?DO(i,function(t){n.push(t)}):null!=i&&n.push(i);var a={color:1,symbol:1};e||1!==n.length||a.hasOwnProperty(t.type)||(n[1]=n[0]),Kp(t,n)}function Hp(t){return{applyVisual:function(e,i,n){e=this.mapValueToVisual(e),n("color",t(i("color"),e))},_doMap:jp([0,1])}}function Zp(t){var e=this.option.visual;return e[Math.round(Mr(t,[0,1],[0,e.length-1],!0))]||{}}function Xp(t){return function(e,i,n){n(t,this.mapValueToVisual(e))}}function Up(t){var e=this.option.visual;return e[this.option.loop&&t!==LO?t%e.length:t]}function Yp(){return this.option.visual[0]}function jp(t){return{linear:function(e){return Mr(e,t,this.option.visual,!0)},category:Up,piecewise:function(e,i){var n=qp.call(this,i);return null==n&&(n=Mr(e,t,this.option.visual,!0)),n},fixed:Yp}}function qp(t){var e=this.option,i=e.pieceList;if(e.hasSpecialVisual){var n=kO.findPieceIndex(t,i),a=i[n];if(a&&a.visual)return a.visual[this.type]}}function Kp(t,e){return t.visual=e,"color"===t.type&&(t.parsedVisual=p(e,function(t){return ti(t)})),e}function $p(t,e,i){return t?i>=e:i>e}function Jp(t,e,i,n){var a=t.getModel(),o=t.getLayout();if(o&&!o.invisible&&o.isInView){var r,s=t.getModel(zO),l=Qp(s,e,n),u=s.get("borderColor"),h=s.get("borderColorSaturation");null!=h&&(r=tg(l,t),u=eg(h,r)),t.setVisual("borderColor",u);var c=t.viewChildren;if(c&&c.length){var d=ng(t,a,o,s,l,c);f(c,function(t,e){if(t.depth>=i.length||t===i[t.depth]){var o=og(a,l,t,e,d,n);Jp(t,o,i,n)}})}else r=tg(l,t),t.setVisual("color",r)}}function Qp(t,e,i){var n=r({},e),a=i.designatedVisualItemStyle;return f(["color","colorAlpha","colorSaturation"],function(i){a[i]=e[i];var o=t.get(i);a[i]=null,null!=o&&(n[i]=o)}),n}function tg(t){var e=ig(t,"color");if(e){var i=ig(t,"colorAlpha"),n=ig(t,"colorSaturation");return n&&(e=si(e,null,null,n)),i&&(e=li(e,i)),e}}function eg(t,e){return null!=e?si(e,null,null,t):null}function ig(t,e){var i=t[e];return null!=i&&"none"!==i?i:void 0}function ng(t,e,i,n,a,o){if(o&&o.length){var r=ag(e,"color")||null!=a.color&&"none"!==a.color&&(ag(e,"colorAlpha")||ag(e,"colorSaturation"));if(r){var s=e.get("visualMin"),l=e.get("visualMax"),u=i.dataExtent.slice();null!=s&&su[1]&&(u[1]=l);var h=e.get("colorMappingBy"),c={type:r.name,dataExtent:u,visual:r.range};"color"!==c.type||"index"!==h&&"id"!==h?c.mappingMethod="linear":(c.mappingMethod="category",c.loop=!0);var d=new kO(c);return d.__drColorMappingBy=h,d}}}function ag(t,e){var i=t.get(e);return NO(i)&&i.length?{name:e,range:i}:null}function og(t,e,i,n,a,o){var s=r({},e);if(a){var l=a.type,u="color"===l&&a.__drColorMappingBy,h="index"===u?n:"id"===u?o.mapIdToIndex(i.getId()):i.getValue(t.get("visualDimension"));s[l]=a.mapValueToVisual(h)}return s}function rg(t,e,i,n){var a,o;if(!t.isRemoved()){var r=t.getLayout();a=r.width,o=r.height;var s=t.getModel(),l=s.get(FO),u=s.get(WO)/2,h=mg(s),c=Math.max(l,h),d=l-u,f=c-u,s=t.getModel();t.setLayout({borderWidth:l,upperHeight:c,upperLabelHeight:h},!0),a=EO(a-2*d,0),o=EO(o-d-f,0);var p=a*o,g=sg(t,s,p,e,i,n);if(g.length){var m={x:d,y:f,width:a,height:o},v=BO(a,o),y=1/0,x=[];x.area=0;for(var _=0,w=g.length;w>_;){var b=g[_];x.push(b),x.area+=b.getLayout().area;var S=cg(x,v,e.squareRatio);y>=S?(_++,y=S):(x.area-=x.pop().getLayout().area,dg(x,v,m,u,!1),v=BO(m.width,m.height),x.length=x.area=0,y=1/0)}if(x.length&&dg(x,v,m,u,!0),!i){var M=s.get("childrenVisibleMin");null!=M&&M>p&&(i=!0)}for(var _=0,w=g.length;w>_;_++)rg(g[_],e,i,n+1)}}}function sg(t,e,i,n,a,o){var r=t.children||[],s=n.sort;"asc"!==s&&"desc"!==s&&(s=null);var l=null!=n.leafDepth&&n.leafDepth<=o;if(a&&!l)return t.viewChildren=[];r=m(r,function(t){return!t.isRemoved()}),ug(r,s);var u=hg(e,r,s);if(0===u.sum)return t.viewChildren=[];if(u.sum=lg(e,i,u.sum,s,r),0===u.sum)return t.viewChildren=[];for(var h=0,c=r.length;c>h;h++){var d=r[h].getValue()/u.sum*i;r[h].setLayout({area:d})}return l&&(r.length&&t.setLayout({isLeafRoot:!0},!0),r.length=0),t.viewChildren=r,t.setLayout({dataExtent:u.dataExtent},!0),r}function lg(t,e,i,n,a){if(!n)return i;for(var o=t.get("visibleMin"),r=a.length,s=r,l=r-1;l>=0;l--){var u=a["asc"===n?r-l-1:l].getValue();o>u/i*e&&(s=l,i-=u)}return"asc"===n?a.splice(0,r-s):a.splice(s,r-s),i}function ug(t,e){return e&&t.sort(function(t,i){var n="asc"===e?t.getValue()-i.getValue():i.getValue()-t.getValue();return 0===n?"asc"===e?t.dataIndex-i.dataIndex:i.dataIndex-t.dataIndex:n}),t}function hg(t,e,i){for(var n=0,a=0,o=e.length;o>a;a++)n+=e[a].getValue();var r,s=t.get("visualDimension");if(e&&e.length)if("value"===s&&i)r=[e[e.length-1].getValue(),e[0].getValue()],"asc"===i&&r.reverse();else{var r=[1/0,-1/0];GO(e,function(t){var e=t.getValue(s);er[1]&&(r[1]=e)})}else r=[0/0,0/0];return{sum:n,dataExtent:r}}function cg(t,e,i){for(var n,a=0,o=1/0,r=0,s=t.length;s>r;r++)n=t[r].getLayout().area,n&&(o>n&&(o=n),n>a&&(a=n));var l=t.area*t.area,u=e*e*i;return l?EO(u*a/l,l/(u*o)):1/0}function dg(t,e,i,n,a){var o=e===i.width?0:1,r=1-o,s=["x","y"],l=["width","height"],u=i[s[o]],h=e?t.area/e:0;(a||h>i[l[r]])&&(h=i[l[r]]);for(var c=0,d=t.length;d>c;c++){var f=t[c],p={},g=h?f.getLayout().area/h:0,m=p[l[r]]=EO(h-2*n,0),v=i[s[o]]+i[l[o]]-u,y=c===d-1||g>v?v:g,x=p[l[o]]=EO(y-2*n,0);p[s[r]]=i[s[r]]+BO(n,m/2),p[s[o]]=u+BO(n,x/2),u+=y,f.setLayout(p,!0)}i[s[r]]+=h,i[l[r]]-=h}function fg(t,e,i,n,a){var o=(e||{}).node,r=[n,a];if(!o||o===i)return r;for(var s,l=n*a,u=l*t.option.zoomToNodeRatio;s=o.parentNode;){for(var h=0,c=s.children,d=0,f=c.length;f>d;d++)h+=c[d].getValue();var p=o.getValue();if(0===p)return r;u*=h/p;var g=s.getModel(),m=g.get(FO),v=Math.max(m,mg(g,m));u+=4*m*m+(3*m+v)*Math.pow(u,.5),u>TA&&(u=TA),o=s}l>u&&(u=l);var y=Math.pow(u/l,.5);return[n*y,a*y]}function pg(t,e,i){if(e)return{x:e.x,y:e.y};var n={x:0,y:0};if(!i)return n;var a=i.node,o=a.getLayout();if(!o)return n;for(var r=[o.width/2,o.height/2],s=a;s;){var l=s.getLayout();r[0]+=l.x,r[1]+=l.y,s=s.parentNode}return{x:t.width/2-r[0],y:t.height/2-r[1]}}function gg(t,e,i,n,a){var o=t.getLayout(),r=i[a],s=r&&r===t;if(!(r&&!s||a===i.length&&t!==n)){t.setLayout({isInView:!0,invisible:!s&&!e.intersect(o),isAboveViewRoot:s},!0);var l=new Ti(e.x-o.x,e.y-o.y,e.width,e.height);GO(t.viewChildren||[],function(t){gg(t,l,i,n,a+1)})}}function mg(t){return t.get(HO)?t.get(ZO):0}function vg(t){var e=0;f(t.children,function(t){vg(t);var i=t.value;_(i)&&(i=i[0]),e+=i});var i=t.value;_(i)&&(i=i[0]),(null==i||isNaN(i))&&(i=e),0>i&&(i=0),_(t.value)?t.value[0]=i:t.value=i}function yg(t,e,i){function n(){r.ignore=r.hoverIgnore}function a(){r.ignore=r.normalIgnore}xM.call(this);var o=new BT({z2:YO});o.seriesIndex=e.seriesIndex;var r=new NT({z2:jO,silent:t.getModel("label").get("silent")});this.add(o),this.add(r),this.updateData(!0,t,"normal",e,i),this.on("emphasis",n).on("normal",a).on("mouseover",n).on("mouseout",a)}function xg(t,e,i){var n=t.getVisual("color"),a=t.getVisual("visualMeta");a&&0!==a.length||(n=null);var o=t.getModel("itemStyle").get("color");if(o)return o;if(n)return n;if(0===t.depth)return i.option.color[0];var r=i.option.color.length;return o=i.option.color[_g(t)%r]}function _g(t){for(var e=t;e.depth>1;)e=e.parentNode;var i=t.getAncestors()[0];return u(i.children,e)}function wg(t,e,i){return i===UO.NONE?!1:i===UO.SELF?t===e:i===UO.ANCESTOR?t===e||t.isAncestorOf(e):t===e||t.isDescendantOf(e)}function bg(t,e,i){var n=e.getData();n.setItemVisual(t.dataIndex,"color",i)}function Sg(t,e){var i=t.children||[];t.children=Mg(i,e),i.length&&f(t.children,function(t){Sg(t,e)})}function Mg(t,e){if("function"==typeof e)return t.sort(e);var i="asc"===e;return t.sort(function(t,e){var n=(t.getValue()-e.getValue())*(i?1:-1);return 0===n?(t.dataIndex-e.dataIndex)*(i?-1:1):n})}function Ig(t){for(var e,i=0;i1?(f.width=l,f.height=l/c):(f.height=l,f.width=l*c),f.y=s[1]-f.height/2,f.x=s[0]-f.width/2}else o=t.getBoxLayoutParams(),o.aspect=c,f=es(o,{width:u,height:h});this.setViewRect(f.x,f.y,f.width,f.height),this.setCenter(t.get("center")),this.setZoom(t.get("zoom"))}function Bg(t,e){f(e.get("geoCoord"),function(e,i){t.addGeoCoord(i,e)})}function Vg(t,e){var i={};return f(t,function(t){t.each(t.mapDimension("value"),function(e,n){var a="ec-"+t.getName(n);i[a]=i[a]||[],isNaN(e)||i[a].push(e)})}),t[0].map(t[0].mapDimension("value"),function(n,a){for(var o="ec-"+t[0].getName(a),r=0,s=1/0,l=-1/0,u=i[o].length,h=0;u>h;h++)s=Math.min(s,i[o][h]),l=Math.max(l,i[o][h]),r+=i[o][h];var c;return c="min"===e?s:"max"===e?l:"average"===e?r/u:r,0===u?0/0:c})}function Gg(t){var e=t.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(t.data=p(e,function(t){var e=[t[0].coord,t[1].coord],i={coords:e};return t[0].name&&(i.fromName=t[0].name),t[1].name&&(i.toName=t[1].name),o([i,t[0],t[1]])}))}function Fg(t){return isNaN(+t.cpx1)||isNaN(+t.cpy1)}function Wg(t){return"_"+t+"Type"}function Hg(t,e,i){var n=e.getItemVisual(i,t);if(n&&"none"!==n){var a=e.getItemVisual(i,"color"),o=e.getItemVisual(i,t+"Size"),r=e.getItemVisual(i,t+"Rotate");_(o)||(o=[o,o]);var s=ic(n,-o[0]/2,-o[1]/2,o[0],o[1],a);return s.__specifiedRotation=null==r||isNaN(r)?void 0:+r*Math.PI/180||0,s.name=t,s}}function Zg(t){var e=new PN({name:"line",subPixelOptimize:!0});return Xg(e.shape,t),e}function Xg(t,e){t.x1=e[0][0],t.y1=e[0][1],t.x2=e[1][0],t.y2=e[1][1],t.percent=1;var i=e[2];i?(t.cpx1=i[0],t.cpy1=i[1]):(t.cpx1=0/0,t.cpy1=0/0)}function Ug(){var t=this,e=t.childOfName("fromSymbol"),i=t.childOfName("toSymbol"),n=t.childOfName("label");if(e||i||!n.ignore){for(var a=1,o=this.parent;o;)o.scale&&(a/=o.scale[0]),o=o.parent;var r=t.childOfName("line");if(this.__dirty||r.__dirty){var s=r.shape.percent,l=r.pointAt(0),u=r.pointAt(s),h=Y([],u,l);if(te(h,h),e){e.attr("position",l);var c=e.__specifiedRotation;if(null==c){var d=r.tangentAt(0);e.attr("rotation",Math.PI/2-Math.atan2(d[1],d[0]))}else e.attr("rotation",c);e.attr("scale",[a*s,a*s])}if(i){i.attr("position",u);var c=i.__specifiedRotation;if(null==c){var d=r.tangentAt(1);i.attr("rotation",-Math.PI/2-Math.atan2(d[1],d[0]))}else i.attr("rotation",c);i.attr("scale",[a*s,a*s])}if(!n.ignore){n.attr("position",u);var f,p,g,m,v=n.__labelDistance,y=v[0]*a,x=v[1]*a,_=s/2,d=r.tangentAt(_),w=[d[1],-d[0]],b=r.pointAt(_);w[1]>0&&(w[0]=-w[0],w[1]=-w[1]);var S=d[0]<0?-1:1;if("start"!==n.__position&&"end"!==n.__position){var M=-Math.atan2(d[1],d[0]);u[0].8?"left":h[0]<-.8?"right":"center",g=h[1]>.8?"top":h[1]<-.8?"bottom":"middle";break;case"start":f=[-h[0]*y+l[0],-h[1]*x+l[1]],p=h[0]>.8?"right":h[0]<-.8?"left":"center",g=h[1]>.8?"bottom":h[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":f=[y*S+l[0],l[1]+I],p=d[0]<0?"right":"left",m=[-y*S,-I];break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":f=[b[0],b[1]+I],p="center",m=[0,-I];break;case"insideEndTop":case"insideEnd":case"insideEndBottom":f=[-y*S+u[0],u[1]+I],p=d[0]>=0?"right":"left",m=[y*S,-I]}n.attr({style:{textVerticalAlign:n.__verticalAlign||g,textAlign:n.__textAlign||p},position:f,scale:[a,a],origin:m})}}}}function Yg(t,e,i){xM.call(this),this._createLine(t,e,i)}function jg(t){this._ctor=t||Yg,this.group=new xM}function qg(t,e,i,n){var a=e.getItemLayout(i);if(tm(a)){var o=new t._ctor(e,i,n);e.setItemGraphicEl(i,o),t.group.add(o)}}function Kg(t,e,i,n,a,o){var r=e.getItemGraphicEl(n);return tm(i.getItemLayout(a))?(r?r.updateData(i,a,o):r=new t._ctor(i,a,o),i.setItemGraphicEl(a,r),void t.group.add(r)):void t.group.remove(r)}function $g(t){return t.animators&&t.animators.length>0}function Jg(t){var e=t.hostModel;return{lineStyle:e.getModel("lineStyle").getLineStyle(),hoverLineStyle:e.getModel("emphasis.lineStyle").getLineStyle(),labelModel:e.getModel("label"),hoverLabelModel:e.getModel("emphasis.label")}}function Qg(t){return isNaN(t[0])||isNaN(t[1])}function tm(t){return!Qg(t[0])&&!Qg(t[1])}function em(t,e,i){xM.call(this),this.add(this.createLine(t,e,i)),this._updateEffectSymbol(t,e)}function im(t,e,i){xM.call(this),this._createPolyline(t,e,i)}function nm(t,e,i){em.call(this,t,e,i),this._lastFrame=0,this._lastFramePercent=0}function am(){this.group=new xM}function om(t){return t instanceof Array||(t=[t,t]),t}function rm(t){return"_EC_"+t}function sm(t,e){this.id=null==t?"":t,this.inEdges=[],this.outEdges=[],this.edges=[],this.hostGraph,this.dataIndex=null==e?-1:e}function lm(t,e,i){this.node1=t,this.node2=e,this.dataIndex=null==i?-1:i}function um(t){qN(t)&&(t.__curvenessList=[],t.__edgeMap={},KN(t))}function hm(t,e,i,n){if(qN(i)){var a=$N(t,e,i),o=i.__edgeMap,r=o[JN(a)];o[a]&&!r?o[a].isForward=!0:r&&o[a]&&(r.isForward=!0,o[a].isForward=!1),o[a]=o[a]||[],o[a].push(n)}}function cm(t,e,i,n){var a=qN(e),o=_(a);if(!a)return null;var r=QN(t,e);if(!r)return null;for(var s=-1,l=0;l=h;h+=.1){nz[0]=rz(a[0],o[0],r[0],h),nz[1]=rz(a[1],o[1],r[1],h);var c=lz(sz(nz,e)-l);s>c&&(s=c,n=h)}for(var d=0;32>d;d++){var f=n+u;az[0]=rz(a[0],o[0],r[0],n),az[1]=rz(a[1],o[1],r[1],n),oz[0]=rz(a[0],o[0],r[0],f),oz[1]=rz(a[1],o[1],r[1],f);var c=sz(az,e)-l;if(lz(c)<.01)break;var p=sz(oz,e)-l;u/=2,0>c?p>=0?n+=u:n-=u:p>=0?n-=u:n+=u}return n}function gm(t,e){var i=t.getVisual("opacity");return null!=i?i:t.getModel().get(e)}function mm(t,e,i){var n=t.getGraphicEl(),a=gm(t,e);null!=i&&(null==a&&(a=1),a*=i),n.downplay&&n.downplay(),n.traverse(function(t){if(!t.isGroup){var e=t.lineLabelOriginalOpacity;(null==e||null!=i)&&(e=a),t.setStyle("opacity",e)}})}function vm(t,e){var i=gm(t,e),n=t.getGraphicEl();n.traverse(function(t){!t.isGroup&&t.setStyle("opacity",i)}),n.highlight&&n.highlight()}function ym(t){return t instanceof Array||(t=[t,t]),t}function xm(t){var e=t.coordinateSystem;if(!e||"view"===e.type){var i=t.getGraph();i.eachNode(function(t){var e=t.getModel();t.setLayout([+e.get("x"),+e.get("y")])}),_m(i,t)}}function _m(t,e){t.eachEdge(function(t,i){var n=L(t.getModel().get("lineStyle.curveness"),-cm(t,e,i,!0),0),a=H(t.node1.getLayout()),o=H(t.node2.getLayout()),r=[a,o];+n&&r.push([(a[0]+o[0])/2-(a[1]-o[1])*n,(a[1]+o[1])/2-(o[0]-a[0])*n]),t.setLayout(r)})}function wm(t,e){var i=t.coordinateSystem;if(!i||"view"===i.type){var n=i.getBoundingRect(),a=t.getData(),o=a.graph,r=n.width/2+n.x,s=n.height/2+n.y,l=Math.min(n.width,n.height)/2,u=a.count();a.setLayout({cx:r,cy:s}),u&&(wz[e](t,i,o,a,l,r,s,u),o.eachEdge(function(e,i){var n,a=L(e.getModel().get("lineStyle.curveness"),cm(e,t,i),0),o=H(e.node1.getLayout()),l=H(e.node2.getLayout()),u=(o[0]+l[0])/2,h=(o[1]+l[1])/2;+a&&(a*=3,n=[r*a+u*(1-a),s*a+h*(1-a)]),e.setLayout([o,l,n])}))}}function bm(t,e,i){for(var n=i.rect,a=n.width,o=n.height,r=[n.x+a/2,n.y+o/2],s=null==i.gravity?.1:i.gravity,l=0;lo;o++){var p=t[o];p.fixed||(Y(n,r,p.p),Sz(p.p,p.p,n,s*c))}for(var o=0;a>o;o++)for(var u=t[o],g=o+1;a>g;g++){var h=t[g];Y(n,h.p,u.p);var d=j(n);0===d&&(Z(n,Math.random()-.5,Math.random()-.5),d=1);var m=(u.rep+h.rep)/d/d;!u.fixed&&Sz(u.pp,u.pp,n,m),!h.fixed&&Sz(h.pp,h.pp,n,-m)}for(var v=[],o=0;a>o;o++){var p=t[o];p.fixed||(Y(v,p.p,p.pp),Sz(p.p,p.p,v,c),W(p.pp,p.p))}c=.992*c,i&&i(t,e,.01>c)}}}function Sm(t,e,i){var n=t.getBoxLayoutParams();return n.aspect=i,es(n,{width:e.getWidth(),height:e.getHeight()})}function Mm(t,e,i,n,a){var o=t.ends,r=new Cz({shape:{points:a?Tm(o,n,t):o}});return Im(t,r,e,i,a),r}function Im(t,e,i,n,a){var o=i.hostModel,r=vA[a?"initProps":"updateProps"];r(e,{shape:{points:t.ends}},o,n);var s=i.getItemModel(n),l=s.getModel(Az),u=i.getItemVisual(n,"color"),h=l.getItemStyle(["borderColor"]);h.stroke=u,h.strokeNoScale=!0,e.useStyle(h),e.z2=100;var c=s.getModel(Dz).getItemStyle();Wo(e,c)}function Tm(t,e,i){return p(t,function(t){return t=t.slice(),t[e]=i.initBaseline,t})}function Am(t){var e=[],i=[];return t.eachSeriesByType("boxplot",function(t){var n=t.getBaseAxis(),a=u(i,n);0>a&&(a=i.length,i[a]=n,e[a]={axis:n,seriesModels:[]}),e[a].seriesModels.push(t)}),e}function Dm(t){var e,i,n=t.axis,a=t.seriesModels,o=a.length,r=t.boxWidthList=[],s=t.boxOffsetList=[],l=[];if("category"===n.type)i=n.getBandWidth();else{var u=0;Pz(a,function(t){u=Math.max(u,t.getData().count())}),e=n.getExtent(),Math.abs(e[1]-e[0])/u}Pz(a,function(t){var e=t.get("boxWidth");_(e)||(e=[e,e]),l.push([Ir(e[0],i)||0,Ir(e[1],i)||0])});var h=.8*i-2,c=h/o*.3,d=(h-c*(o-1))/o,f=d/2-h/2;Pz(a,function(t,e){s.push(f),f+=c+d,r.push(Math.min(Math.max(d,l[e][0]),l[e][1]))})}function Cm(t,e,i){function n(t,i,n){var a=s.get(i,n),o=[];o[u]=t,o[h]=a;var l;return isNaN(t)||isNaN(a)?l=[0/0,0/0]:(l=r.dataToPoint(o),l[u]+=e),l}function a(t,e,i){var n=e.slice(),a=e.slice();n[u]+=l,a[u]-=l,i?t.push(n,a):t.push(a,n)}function o(t,e){var i=e.slice(),n=e.slice();i[u]-=l,n[u]+=l,t.push(i,n)}var r=t.coordinateSystem,s=t.getData(),l=i/2,u="horizontal"===t.get("layout")?0:1,h=1-u,c=["x","y"],d=s.mapDimension(c[u]),f=s.mapDimension(c[h],!0);if(!(null==d||f.length<5))for(var p=0;p0?-1:0>i?1:e?-1:1}}function Om(t,e){return Math.min(null!=e[1]?e[1]:1/0,Math.max(null!=e[0]?e[0]:-1/0,t))}function Nm(t,e,i){this._axesMap=B(),this._axesLayout={},this.dimensions=t.dimensions,this._rect,this._model=t,this._init(t,e,i)}function zm(t,e){return Bz(Vz(t,e[0]),e[1])}function Rm(t,e){var i=e.layoutLength/(e.axisCount-1);return{position:i*t,axisNameAvailableWidth:i,axisLabelShow:!0}}function Em(t,e){var i,n,a=e.layoutLength,o=e.axisExpandWidth,r=e.axisCount,s=e.axisCollapseWidth,l=e.winInnerIndices,u=s,h=!1;return ttR}function iv(t){var e=t.length-1;return 0>e&&(e=0),[t[0],t[e]]}function nv(t,e,i,n){var a=new xM;return a.add(new UT({name:"main",style:sv(i),silent:!0,draggable:!0,cursor:"move",drift:Yz(t,e,a,"nswe"),ondragend:Yz(tv,e,{isEnd:!0})})),jz(n,function(i){a.add(new UT({name:i,style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:Yz(t,e,a,i),ondragend:Yz(tv,e,{isEnd:!0})}))}),a}function av(t,e,i,n){var a=n.brushStyle.lineWidth||0,o=$z(a,eR),r=i[0][0],s=i[1][0],l=r-a/2,u=s-a/2,h=i[0][1],c=i[1][1],d=h-o+a/2,f=c-o+a/2,p=h-r,g=c-s,m=p+a,v=g+a;rv(t,e,"main",r,s,p,g),n.transformable&&(rv(t,e,"w",l,u,o,v),rv(t,e,"e",d,u,o,v),rv(t,e,"n",l,u,m,o),rv(t,e,"s",l,f,m,o),rv(t,e,"nw",l,u,o,o),rv(t,e,"ne",d,u,o,o),rv(t,e,"sw",l,f,o,o),rv(t,e,"se",d,f,o,o))}function ov(t,e){var i=e.__brushOption,n=i.transformable,a=e.childAt(0);a.useStyle(sv(i)),a.attr({silent:!n,cursor:n?"move":"default"}),jz(["w","e","n","s","se","sw","ne","nw"],function(i){var a=e.childOfName(i),o=hv(t,i);a&&a.attr({silent:!n,invisible:!n,cursor:n?aR[o]+"-resize":null})})}function rv(t,e,i,n,a,o,r){var s=e.childOfName(i);s&&s.setShape(gv(pv(t,e,[[n,a],[n+o,a+r]])))}function sv(t){return s({strokeNoScale:!0},t.brushStyle)}function lv(t,e,i,n){var a=[Kz(t,i),Kz(e,n)],o=[$z(t,i),$z(e,n)];return[[a[0],o[0]],[a[1],o[1]]]}function uv(t){return rr(t.group)}function hv(t,e){if(e.length>1){e=e.split("");var i=[hv(t,e[0]),hv(t,e[1])];return("e"===i[0]||"w"===i[0])&&i.reverse(),i.join("")}var n={w:"left",e:"right",n:"top",s:"bottom"},a={left:"w",right:"e",top:"n",bottom:"s"},i=lr(n[e],uv(t));return a[i]}function cv(t,e,i,n,a,o,r){var s=n.__brushOption,l=t(s.range),u=fv(i,o,r);jz(a.split(""),function(t){var e=nR[t];l[e[0]][e[1]]+=u[e[0]]}),s.range=e(lv(l[0][0],l[1][0],l[0][1],l[1][1])),qm(i,n),tv(i,{isEnd:!1})}function dv(t,e,i,n){var a=e.__brushOption.range,o=fv(t,i,n);jz(a,function(t){t[0]+=o[0],t[1]+=o[1]}),qm(t,e),tv(t,{isEnd:!1})}function fv(t,e,i){var n=t.group,a=n.transformCoordToLocal(e,i),o=n.transformCoordToLocal(0,0);return[a[0]-o[0],a[1]-o[1]]}function pv(t,e,i){var a=Jm(t,e);return a&&a!==!0?a.clipPath(i,t._transform):n(i)}function gv(t){var e=Kz(t[0][0],t[1][0]),i=Kz(t[0][1],t[1][1]),n=$z(t[0][0],t[1][0]),a=$z(t[0][1],t[1][1]);return{x:e,y:i,width:n-e,height:a-i}}function mv(t,e,i){if(t._brushType&&!bv(t,e)){var n=t._zr,a=t._covers,o=$m(t,e,i);if(!t._dragging)for(var r=0;re||e>n.getWidth()||0>i||i>n.getHeight()}function Sv(t){return{createCover:function(e,i){return nv(Yz(cv,function(e){var i=[e,[0,100]];return t&&i.reverse(),i},function(e){return e[t]}),e,i,[["w","e"],["n","s"]][t])},getCreatingRange:function(e){var i=iv(e),n=Kz(i[0][t],i[1][t]),a=$z(i[0][t],i[1][t]);return[n,a]},updateCoverShape:function(e,i,n,a){var o,r=Jm(e,i);if(r!==!0&&r.getLinearBrushOtherExtent)o=r.getLinearBrushOtherExtent(t,e._transform);else{var s=e._zr;o=[0,[s.getWidth(),s.getHeight()][1-t]]}var l=[n,o];t&&l.reverse(),av(e,i,l,a)},updateCommon:ov,contain:yv}}function Mv(t){return t=Av(t),function(e){return hr(e,t)}}function Iv(t,e){return t=Av(t),function(i){var n=null!=e?e:i,a=n?t.width:t.height,o=n?t.x:t.y;return[o,o+(a||0)]}}function Tv(t,e,i){return t=Av(t),function(n,a){return t.contain(a[0],a[1])&&!mp(n,e,i)}}function Av(t){return Ti.create(t)}function Dv(t,e,i){return i&&"axisAreaSelect"===i.type&&e.findComponents({mainType:"parallelAxis",query:i})[0]===t}function Cv(t){var e=t.axis;return p(t.activeIntervals,function(t){return{brushType:"lineX",panelId:"pl",range:[e.dataToCoord(t[0],!0),e.dataToCoord(t[1],!0)]}})}function Lv(t,e){return e.getComponent("parallel",t.get("parallelIndex"))}function kv(t,e){var i=t._model;return i.get("axisExpandable")&&i.get("axisExpandTriggerOn")===e}function Pv(t,e){if(!t.encodeDefine){var i=e.ecModel.getComponent("parallel",e.get("parallelIndex"));if(i){var n=t.encodeDefine=B();f(i.dimensions,function(t){var e=Ov(t);n.set(t,e)})}}}function Ov(t){return+t.replace("dim","")}function Nv(t,e,i){var n=t.model,a=t.getRect(),o=new UT({shape:{x:a.x,y:a.y,width:a.width,height:a.height}}),r="horizontal"===n.get("layout")?"width":"height";return o.setShape(r,0),or(o,{shape:{width:a.width,height:a.height}},e,i),o}function zv(t,e,i,n){for(var a=[],o=0;or;r++)a[r]=r;return"function"==typeof e?a.sort(e):"none"!==e&&a.sort(function(t,e){return o?n[t]-n[e]:n[e]-n[t]}),a}function Xv(t){t.each(function(e){var i,n,a,o,r=t.getItemModel(e),s=r.getModel("label"),l=s.get("position"),u=r.get("orient"),h=r.getModel("labelLine"),c=t.getItemLayout(e),d=c.points,f="inner"===l||"inside"===l||"center"===l||"insideLeft"===l||"insideRight"===l; +if(f)"insideLeft"===l?(n=(d[0][0]+d[3][0])/2+5,a=(d[0][1]+d[3][1])/2,i="left"):"insideRight"===l?(n=(d[1][0]+d[2][0])/2-5,a=(d[1][1]+d[2][1])/2,i="right"):(n=(d[0][0]+d[1][0]+d[2][0]+d[3][0])/4,a=(d[0][1]+d[1][1]+d[2][1]+d[3][1])/4,i="center"),o=[[n,a],[n,a]];else{var p,g,m,v,y=h.get("length");"left"===l?(p=(d[3][0]+d[0][0])/2,g=(d[3][1]+d[0][1])/2,m=p-y,n=m-5,i="right"):"right"===l?(p=(d[1][0]+d[2][0])/2,g=(d[1][1]+d[2][1])/2,m=p+y,n=m+5,i="left"):"top"===l?(p=(d[3][0]+d[0][0])/2,g=(d[3][1]+d[0][1])/2,v=g-y,a=v-5,i="center"):"bottom"===l?(p=(d[1][0]+d[2][0])/2,g=(d[1][1]+d[2][1])/2,v=g+y,a=v+5,i="center"):"rightTop"===l?(p="horizontal"===u?d[3][0]:d[1][0],g="horizontal"===u?d[3][1]:d[1][1],"horizontal"===u?(v=g-y,a=v-5,i="center"):(m=p+y,n=m+5,i="top")):"rightBottom"===l?(p=d[2][0],g=d[2][1],"horizontal"===u?(v=g+y,a=v+5,i="center"):(m=p+y,n=m+5,i="bottom")):"leftTop"===l?(p=d[0][0],g="horizontal"===u?d[0][1]:d[1][1],"horizontal"===u?(v=g-y,a=v-5,i="center"):(m=p-y,n=m-5,i="right")):"leftBottom"===l?(p="horizontal"===u?d[1][0]:d[3][0],g="horizontal"===u?d[1][1]:d[2][1],"horizontal"===u?(v=g+y,a=v+5,i="center"):(m=p-y,n=m-5,i="right")):(p=(d[1][0]+d[2][0])/2,g=(d[1][1]+d[2][1])/2,"horizontal"===u?(v=g+y,a=v+5,i="center"):(m=p+y,n=m+5,i="left")),"horizontal"===u?(m=p,n=m):(v=g,a=v),o=[[p,g],[m,v]]}c.label={linePoints:o,x:n,y:a,verticalAlign:"middle",textAlign:i,inside:f}})}function Uv(t,e){return t.getVisual("opacity")||t.getModel().get(e)}function Yv(t,e,i){var n=t.getGraphicEl(),a=Uv(t,e);null!=i&&(null==a&&(a=1),a*=i),n.downplay&&n.downplay(),n.traverse(function(t){"group"!==t.type&&t.setStyle("opacity",a)})}function jv(t,e){var i=Uv(t,e),n=t.getGraphicEl();n.traverse(function(t){"group"!==t.type&&t.setStyle("opacity",i)}),n.highlight&&n.highlight()}function qv(t,e,i){var n=new UT({shape:{x:t.x-10,y:t.y-10,width:0,height:t.height+20}});return or(n,{shape:{width:t.width+20}},e,i),n}function Kv(t,e){return es(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function $v(t,e,i,n,a,o,r,s,l){Qv(t,e,i,a,o,s,l),ay(t,e,o,a,n,r,s),vy(t,s)}function Jv(t){f(t,function(t){var e=gy(t.outEdges,py),i=gy(t.inEdges,py),n=t.getValue()||0,a=Math.max(e,i,n);t.setLayout({value:a},!0)})}function Qv(t,e,i,n,a,o,r){for(var s=[],l=[],u=[],h=[],c=0,d=0,f=0;f=0;y&&v.depth>p&&(p=v.depth),m.setLayout({depth:y?v.depth:c},!0),"vertical"===o?m.setLayout({dy:i},!0):m.setLayout({dx:i},!0);for(var x=0;xc-1?p:c-1;r&&"left"!==r&&ey(t,r,o,M);var d="vertical"===o?(a-i)/M:(n-i)/M;ny(t,d,o)}function ty(t){var e=t.hostGraph.data.getRawDataItem(t.dataIndex);return null!=e.depth&&e.depth>=0}function ey(t,e,i,n){if("right"===e){for(var a=[],o=t,r=0;o.length;){for(var s=0;s0;o--)l*=.99,ly(s,l,r),sy(s,a,i,n,r),my(s,l,r),sy(s,a,i,n,r)}function oy(t,e){var i=[],n="vertical"===e?"y":"x",a=va(t,function(t){return t.getLayout()[n]});return a.keys.sort(function(t,e){return t-e}),f(a.keys,function(t){i.push(a.buckets.get(t))}),i}function ry(t,e,i,n,a,o){var r=1/0;f(t,function(t){var e=t.length,s=0;f(t,function(t){s+=t.getLayout().value});var l="vertical"===o?(n-(e-1)*a)/s:(i-(e-1)*a)/s;r>l&&(r=l)}),f(t,function(t){f(t,function(t,e){var i=t.getLayout().value*r;"vertical"===o?(t.setLayout({x:e},!0),t.setLayout({dx:i},!0)):(t.setLayout({y:e},!0),t.setLayout({dy:i},!0))})}),f(e,function(t){var e=+t.getValue()*r;t.setLayout({dy:e},!0)})}function sy(t,e,i,n,a){var o="vertical"===a?"x":"y";f(t,function(t){t.sort(function(t,e){return t.getLayout()[o]-e.getLayout()[o]});for(var r,s,l,u=0,h=t.length,c="vertical"===a?"dx":"dy",d=0;h>d;d++)s=t[d],l=u-s.getLayout()[o],l>0&&(r=s.getLayout()[o]+l,"vertical"===a?s.setLayout({x:r},!0):s.setLayout({y:r},!0)),u=s.getLayout()[o]+s.getLayout()[c]+e;var f="vertical"===a?n:i;if(l=u-e-f,l>0)for(r=s.getLayout()[o]-l,"vertical"===a?s.setLayout({x:r},!0):s.setLayout({y:r},!0),u=r,d=h-2;d>=0;--d)s=t[d],l=s.getLayout()[o]+s.getLayout()[c]+e-u,l>0&&(r=s.getLayout()[o]-l,"vertical"===a?s.setLayout({x:r},!0):s.setLayout({y:r},!0)),u=s.getLayout()[o]})}function ly(t,e,i){f(t.slice().reverse(),function(t){f(t,function(t){if(t.outEdges.length){var n=gy(t.outEdges,uy,i)/gy(t.outEdges,py,i);if(isNaN(n)){var a=t.outEdges.length;n=a?gy(t.outEdges,hy,i)/a:0}if("vertical"===i){var o=t.getLayout().x+(n-fy(t,i))*e;t.setLayout({x:o},!0)}else{var r=t.getLayout().y+(n-fy(t,i))*e;t.setLayout({y:r},!0)}}})})}function uy(t,e){return fy(t.node2,e)*t.getValue()}function hy(t,e){return fy(t.node2,e)}function cy(t,e){return fy(t.node1,e)*t.getValue()}function dy(t,e){return fy(t.node1,e)}function fy(t,e){return"vertical"===e?t.getLayout().x+t.getLayout().dx/2:t.getLayout().y+t.getLayout().dy/2}function py(t){return t.getValue()}function gy(t,e,i){for(var n=0,a=t.length,o=-1;++o=f&&((r>f||d>=0&&0>s)&&(r=f,s=d,a=l,o.length=0),ER(u,function(t){o.push({seriesIndex:e.seriesIndex,dataIndexInside:t,dataIndex:e.getData().getRawIndex(t)})}))}}),{payloadBatch:o,snapToValue:a}}function My(t,e,i,n){t[e.key]={value:i,payloadBatch:n}}function Iy(t,e,i,n){var a=i.payloadBatch,o=e.axis,r=o.model,s=e.axisPointerModel;if(e.triggerTooltip&&a.length){var l=e.coordSys.model,u=_d(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:o.dim,axisIndex:r.componentIndex,axisType:r.type,axisId:r.id,value:n,valueLabelOpt:{precision:s.get("label.precision"),formatter:s.get("label.formatter")},seriesDataIndices:a.slice()})}}function Ty(t,e,i){var n=i.axesInfo=[];ER(e,function(e,i){var a=e.axisPointerModel.option,o=t[i];o?(!e.useHandle&&(a.status="show"),a.value=o.value,a.seriesDataIndices=(o.payloadBatch||[]).slice()):!e.useHandle&&(a.status="hide"),"show"===a.status&&n.push({axisDim:e.axis.dim,axisIndex:e.axis.model.componentIndex,value:a.value})})}function Ay(t,e,i,n){if(ky(e)||!t.list.length)return void n({type:"hideTip"});var a=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};n({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:i.tooltipOption,position:i.position,dataIndexInside:a.dataIndexInside,dataIndex:a.dataIndex,seriesIndex:a.seriesIndex,dataByCoordSys:t.list})}function Dy(t,e,i){var n=i.getZr(),a="axisPointerLastHighlights",o=VR(n)[a]||{},r=VR(n)[a]={};ER(t,function(t){var e=t.axisPointerModel.option;"show"===e.status&&ER(e.seriesDataIndices,function(t){var e=t.seriesIndex+" | "+t.dataIndex;r[e]=t})});var s=[],l=[];f(o,function(t,e){!r[e]&&l.push(t)}),f(r,function(t,e){!o[e]&&s.push(t)}),l.length&&i.dispatchAction({type:"downplay",escapeConnect:!0,batch:l}),s.length&&i.dispatchAction({type:"highlight",escapeConnect:!0,batch:s})}function Cy(t,e){for(var i=0;i<(t||[]).length;i++){var n=t[i];if(e.axis.dim===n.axisDim&&e.axis.model.componentIndex===n.axisIndex)return n}}function Ly(t){var e=t.axis.model,i={},n=i.axisDim=t.axis.dim;return i.axisIndex=i[n+"AxisIndex"]=e.componentIndex,i.axisName=i[n+"AxisName"]=e.name,i.axisId=i[n+"AxisId"]=e.id,i}function ky(t){return!t||null==t[0]||isNaN(t[0])||null==t[1]||isNaN(t[1])}function Py(t,e,i){if(!oS.node){var n=e.getZr();FR(n).records||(FR(n).records={}),Oy(n,e);var a=FR(n).records[t]||(FR(n).records[t]={});a.handler=i}}function Oy(t,e){function i(i,n){t.on(i,function(i){var a=Ey(e);WR(FR(t).records,function(t){t&&n(t,i,a.dispatchAction)}),Ny(a.pendings,e)})}FR(t).initialized||(FR(t).initialized=!0,i("click",x(Ry,"click")),i("mousemove",x(Ry,"mousemove")),i("globalout",zy))}function Ny(t,e){var i,n=t.showTip.length,a=t.hideTip.length;n?i=t.showTip[n-1]:a&&(i=t.hideTip[a-1]),i&&(i.dispatchAction=null,e.dispatchAction(i))}function zy(t,e,i){t.handler("leave",null,i)}function Ry(t,e,i,n){e.handler(t,i,n)}function Ey(t){var e={showTip:[],hideTip:[]},i=function(n){var a=e[n.type];a?a.push(n):(n.dispatchAction=i,t.dispatchAction(n))};return{dispatchAction:i,pendings:e}}function By(t,e){if(!oS.node){var i=e.getZr(),n=(FR(i).records||{})[t];n&&(FR(i).records[t]=null)}}function Vy(){}function Gy(t,e,i,n){Fy(ZR(i).lastProp,n)||(ZR(i).lastProp=n,e?ar(i,n,t):(i.stopAnimation(),i.attr(n)))}function Fy(t,e){if(S(t)&&S(e)){var i=!0;return f(e,function(e,n){i=i&&Fy(t[n],e)}),!!i}return t===e}function Wy(t,e){t[e.get("label.show")?"show":"hide"]()}function Hy(t){return{position:t.position.slice(),rotation:t.rotation||0}}function Zy(t,e,i){var n=e.get("z"),a=e.get("zlevel");t&&t.traverse(function(t){"group"!==t.type&&(null!=n&&(t.z=n),null!=a&&(t.zlevel=a),t.silent=i)})}function Xy(t){var e,i=t.get("type"),n=t.getModel(i+"Style");return"line"===i?(e=n.getLineStyle(),e.fill=null):"shadow"===i&&(e=n.getAreaStyle(),e.stroke=null),e}function Uy(t,e,i,n,a){var o=i.get("value"),r=jy(o,e.axis,e.ecModel,i.get("seriesDataIndices"),{precision:i.get("label.precision"),formatter:i.get("label.formatter")}),s=i.getModel("label"),l=CA(s.get("padding")||0),u=s.getFont(),h=Ui(r,u),c=a.position,d=h.width+l[1]+l[3],f=h.height+l[0]+l[2],p=a.align;"right"===p&&(c[0]-=d),"center"===p&&(c[0]-=d/2);var g=a.verticalAlign;"bottom"===g&&(c[1]-=f),"middle"===g&&(c[1]-=f/2),Yy(c,d,f,n);var m=s.get("backgroundColor");m&&"auto"!==m||(m=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:r,textFont:u,textFill:s.getTextColor(),textPosition:"inside",textPadding:l,fill:m,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 Yy(t,e,i,n){var a=n.getWidth(),o=n.getHeight();t[0]=Math.min(t[0]+e,a)-e,t[1]=Math.min(t[1]+i,o)-i,t[0]=Math.max(t[0],0),t[1]=Math.max(t[1],0)}function jy(t,e,i,n,a){t=e.scale.parse(t);var o=e.scale.getLabel(t,{precision:a.precision}),r=a.formatter;if(r){var s={value:Kh(e,t),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};f(n,function(t){var e=i.getSeriesByIndex(t.seriesIndex),n=t.dataIndexInside,a=e&&e.getDataParams(n);a&&s.seriesData.push(a)}),b(r)?o=r.replace("{value}",o):w(r)&&(o=r(s))}return o}function qy(t,e,i){var n=Oe();return Be(n,n,i.rotation),Ee(n,n,i.position),sr([t.dataToCoord(e),(i.labelOffset||0)+(i.labelDirection||1)*(i.labelMargin||0)],n)}function Ky(t,e,i,n,a,o){var r=zk.innerTextLayout(i.rotation,0,i.labelDirection);i.labelMargin=a.get("label.margin"),Uy(e,n,a,o,{position:qy(n.axis,t,i),align:r.textAlign,verticalAlign:r.textVerticalAlign})}function $y(t,e,i){return i=i||0,{x1:t[i],y1:t[1-i],x2:e[i],y2:e[1-i]}}function Jy(t,e,i){return i=i||0,{x:t[i],y:t[1-i],width:e[i],height:e[1-i]}}function Qy(t,e,i,n,a,o){return{cx:t,cy:e,r0:i,r:n,startAngle:a,endAngle:o,clockwise:!0}}function tx(t,e){var i={};return i[e.dim+"AxisIndex"]=e.index,t.getCartesian(i)}function ex(t){return"x"===t.dim?0:1}function ix(t){return t.isHorizontal()?0:1}function nx(t,e){var i=t.getRect();return[i[qR[e]],i[qR[e]]+i[KR[e]]]}function ax(t,e,i){var n=new UT({shape:{x:t.x-10,y:t.y-10,width:0,height:t.height+20}});return or(n,{shape:{width:t.width+20,height:t.height+20}},e,i),n}function ox(t,e,i){if(t.count())for(var n,a=e.coordinateSystem,o=e.getLayerSeries(),r=t.mapDimension("single"),s=t.mapDimension("value"),l=p(o,function(e){return p(e.indices,function(e){var i=a.dataToPoint(t.get(r,e));return i[1]=t.get(s,e),i})}),u=rx(l),h=u.y0,c=i/u.max,d=o.length,f=o[0].indices.length,g=0;f>g;++g){n=h[g]*c,t.setItemLayout(o[0].indices[g],{layerIndex:0,x:l[0][g][0],y0:n,y:l[0][g][1]*c});for(var m=1;d>m;++m)n+=l[m-1][g][1]*c,t.setItemLayout(o[m].indices[g],{layerIndex:m,x:l[m][g][0],y0:n,y:l[m][g][1]*c})}}function rx(t){for(var e,i=t.length,n=t[0].length,a=[],o=[],r=0,s={},l=0;n>l;++l){for(var u=0,e=0;i>u;++u)e+=t[u][l][1];e>r&&(r=e),a.push(e)}for(var h=0;n>h;++h)o[h]=(r-a[h])/2;r=0;for(var c=0;n>c;++c){var d=a[c]+o[c];d>r&&(r=d)}return s.y0=o,s.max=r,s}function sx(t,e,i,n){var a=t.getItemLayout(e),o=i.get("symbolRepeat"),r=i.get("symbolClip"),s=i.get("symbolPosition")||"start",l=i.get("symbolRotate"),u=(l||0)*Math.PI/180||0,h=i.get("symbolPatternSize")||2,c=i.isAnimationEnabled(),d={dataIndex:e,layout:a,itemModel:i,symbolType:t.getItemVisual(e,"symbol")||"circle",color:t.getItemVisual(e,"color"),symbolClip:r,symbolRepeat:o,symbolRepeatDirection:i.get("symbolRepeatDirection"),symbolPatternSize:h,rotation:u,animationModel:c?i:null,hoverAnimation:c&&i.get("hoverAnimation"),z2:i.getShallow("z",!0)||0};lx(i,o,a,n,d),hx(t,e,a,o,r,d.boundingLength,d.pxSign,h,n,d),cx(i,d.symbolScale,u,n,d);var f=d.symbolSize,p=i.get("symbolOffset");return _(p)&&(p=[Ir(p[0],f[0]),Ir(p[1],f[1])]),dx(i,f,a,o,r,p,s,d.valueLineWidth,d.boundingLength,d.repeatCutLength,n,d),d}function lx(t,e,i,n,a){var o,r=n.valueDim,s=t.get("symbolBoundingData"),l=n.coordSys.getOtherAxis(n.coordSys.getBaseAxis()),u=l.toGlobalCoord(l.dataToCoord(0)),h=1-+(i[r.wh]<=0);if(_(s)){var c=[ux(l,s[0])-u,ux(l,s[1])-u];c[1]0?1:0>o?-1:0}function ux(t,e){return t.toGlobalCoord(t.dataToCoord(t.scale.parse(e)))}function hx(t,e,i,n,a,o,r,s,l,u){var h=l.valueDim,c=l.categoryDim,d=Math.abs(i[c.wh]),f=t.getItemVisual(e,"symbolSize");_(f)?f=f.slice():(null==f&&(f="100%"),f=[f,f]),f[c.index]=Ir(f[c.index],d),f[h.index]=Ir(f[h.index],n?d:Math.abs(o)),u.symbolSize=f;var p=u.symbolScale=[f[0]/s,f[1]/s];p[h.index]*=(l.isHorizontal?-1:1)*r}function cx(t,e,i,n,a){var o=t.get(aE)||0;o&&(rE.attr({scale:e.slice(),rotation:i}),rE.updateTransform(),o/=rE.getLineScale(),o*=e[n.valueDim.index]),a.valueLineWidth=o}function dx(t,e,i,n,a,o,s,l,u,h,c,d){var f=c.categoryDim,p=c.valueDim,g=d.pxSign,m=Math.max(e[p.index]+l,0),v=m;if(n){var y=Math.abs(u),x=D(t.get("symbolMargin"),"15%")+"",_=!1;x.lastIndexOf("!")===x.length-1&&(_=!0,x=x.slice(0,x.length-1)),x=Ir(x,e[p.index]);var w=Math.max(m+2*x,0),b=_?0:2*x,S=Gr(n),M=S?n:Lx((y+b)/w),I=y-M*m;x=I/2/(_?M:M-1),w=m+2*x,b=_?0:2*x,S||"fixed"===n||(M=h?Lx((Math.abs(h)+b)/w):0),v=M*w-b,d.repeatTimes=M,d.symbolMargin=x}var T=g*(v/2),A=d.pathPosition=[];A[f.index]=i[f.wh]/2,A[p.index]="start"===s?T:"end"===s?u-T:u/2,o&&(A[0]+=o[0],A[1]+=o[1]);var C=d.bundlePosition=[];C[f.index]=i[f.xy],C[p.index]=i[p.xy];var L=d.barRectShape=r({},i);L[p.wh]=g*Math.max(Math.abs(i[p.wh]),Math.abs(A[p.index]+T)),L[f.wh]=i[f.wh];var k=d.clipShape={};k[f.xy]=-i[f.xy],k[f.wh]=c.ecSize[f.wh],k[p.xy]=0,k[p.wh]=i[p.wh]}function fx(t){var e=t.symbolPatternSize,i=ic(t.symbolType,-e/2,-e/2,e,e,t.color);return i.attr({culling:!0}),"image"!==i.type&&i.setStyle({strokeNoScale:!0}),i}function px(t,e,i,n){function a(t){var e=h.slice(),n=i.pxSign,a=t;return("start"===i.symbolRepeatDirection?n>0:0>n)&&(a=d-1-t),e[c.index]=p*(a-d/2+.5)+h[c.index],{position:e,scale:i.symbolScale.slice(),rotation:i.rotation}}function o(){Ax(t,function(t){t.trigger("emphasis")})}function r(){Ax(t,function(t){t.trigger("normal")})}var s=t.__pictorialBundle,l=i.symbolSize,u=i.valueLineWidth,h=i.pathPosition,c=e.valueDim,d=i.repeatTimes||0,f=0,p=l[e.valueDim.index]+u+2*i.symbolMargin;for(Ax(t,function(t){t.__pictorialAnimationIndex=f,t.__pictorialRepeatTimes=d,d>f?Dx(t,null,a(f),i,n):Dx(t,null,{scale:[0,0]},i,n,function(){s.remove(t)}),bx(t,i),f++});d>f;f++){var g=fx(i);g.__pictorialAnimationIndex=f,g.__pictorialRepeatTimes=d,s.add(g);var m=a(f);Dx(g,{position:m.position,scale:[0,0]},{scale:m.scale,rotation:m.rotation},i,n),g.on("mouseover",o).on("mouseout",r),bx(g,i)}}function gx(t,e,i,n){function a(){this.trigger("emphasis")}function o(){this.trigger("normal")}var r=t.__pictorialBundle,s=t.__pictorialMainPath;s?Dx(s,null,{position:i.pathPosition.slice(),scale:i.symbolScale.slice(),rotation:i.rotation},i,n):(s=t.__pictorialMainPath=fx(i),r.add(s),Dx(s,{position:i.pathPosition.slice(),scale:[0,0],rotation:i.rotation},{scale:i.symbolScale.slice()},i,n),s.on("mouseover",a).on("mouseout",o)),bx(s,i)}function mx(t,e,i){var n=r({},e.barRectShape),a=t.__pictorialBarRect;a?Dx(a,null,{shape:n},e,i):(a=t.__pictorialBarRect=new UT({z2:2,shape:n,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),t.add(a))}function vx(t,e,i,n){if(i.symbolClip){var a=t.__pictorialClipPath,o=r({},i.clipShape),s=e.valueDim,l=i.animationModel,u=i.dataIndex;if(a)ar(a,{shape:o},l,u);else{o[s.wh]=0,a=new UT({shape:o}),t.__pictorialBundle.setClipPath(a),t.__pictorialClipPath=a;var h={};h[s.wh]=i.clipShape[s.wh],vA[n?"updateProps":"initProps"](a,{shape:h},l,u)}}}function yx(t,e){var i=t.getItemModel(e);return i.getAnimationDelayParams=xx,i.isAnimationEnabled=_x,i}function xx(t){return{index:t.__pictorialAnimationIndex,count:t.__pictorialRepeatTimes}}function _x(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function bx(t,e){t.off("emphasis").off("normal");var i=e.symbolScale.slice();e.hoverAnimation&&t.on("emphasis",function(){this.animateTo({scale:[1.1*i[0],1.1*i[1]]},400,"elasticOut")}).on("normal",function(){this.animateTo({scale:i.slice()},400,"elasticOut")})}function Sx(t,e,i,n){var a=new xM,o=new xM;return a.add(o),a.__pictorialBundle=o,o.attr("position",i.bundlePosition.slice()),i.symbolRepeat?px(a,e,i):gx(a,e,i),mx(a,i,n),vx(a,e,i,n),a.__pictorialShapeStr=Tx(t,i),a.__pictorialSymbolMeta=i,a}function Mx(t,e,i){var n=i.animationModel,a=i.dataIndex,o=t.__pictorialBundle;ar(o,{position:i.bundlePosition.slice()},n,a),i.symbolRepeat?px(t,e,i,!0):gx(t,e,i,!0),mx(t,i,!0),vx(t,e,i,!0)}function Ix(t,e,i,n){var a=n.__pictorialBarRect;a&&(a.style.text=null);var o=[];Ax(n,function(t){o.push(t)}),n.__pictorialMainPath&&o.push(n.__pictorialMainPath),n.__pictorialClipPath&&(i=null),f(o,function(t){ar(t,{scale:[0,0]},i,e,function(){n.parent&&n.parent.remove(n)})}),t.setItemGraphicEl(e,null)}function Tx(t,e){return[t.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function Ax(t,e,i){f(t.__pictorialBundle.children(),function(n){n!==t.__pictorialBarRect&&e.call(i,n)})}function Dx(t,e,i,n,a,o){e&&t.attr(e),n.symbolClip&&!a?i&&t.attr(i):i&&vA[a?"updateProps":"initProps"](t,i,n.animationModel,n.dataIndex,o)}function Cx(t,e,i){var n=i.color,a=i.dataIndex,o=i.itemModel,r=o.getModel("itemStyle").getItemStyle(["color"]),l=o.getModel("emphasis.itemStyle").getItemStyle(),u=o.getShallow("cursor");Ax(t,function(t){t.setColor(n),t.setStyle(s({fill:n,opacity:i.opacity},r)),Wo(t,l),u&&(t.cursor=u),t.z2=i.z2});var h={},c=e.valueDim.posDesc[+(i.boundingLength>0)],d=t.__pictorialBarRect;Bc(d.style,h,o,n,e.seriesModel,a,c),Wo(d,h)}function Lx(t){var e=Math.round(t);return Math.abs(t-e)<1e-4?e:Math.ceil(t)}function kx(t,e){return e=e||[0,0],p(["x","y"],function(i,n){var a=this.getAxis(i),o=e[n],r=t[n]/2;return"category"===a.type?a.getBandWidth():Math.abs(a.dataToCoord(o-r)-a.dataToCoord(o+r))},this)}function Px(t,e){return e=e||[0,0],p([0,1],function(i){var n=e[i],a=t[i]/2,o=[],r=[];return o[i]=n-a,r[i]=n+a,o[1-i]=r[1-i]=e[1-i],Math.abs(this.dataToPoint(o)[i]-this.dataToPoint(r)[i])},this)}function Ox(t,e){var i=this.getAxis(),n=e instanceof Array?e[0]:e,a=(t instanceof Array?t[0]:t)/2;return"category"===i.type?i.getBandWidth():Math.abs(i.dataToCoord(n-a)-i.dataToCoord(n+a))}function Nx(t,e){return p(["Radius","Angle"],function(i,n){var a=this["get"+i+"Axis"](),o=e[n],r=t[n]/2,s="dataTo"+i,l="category"===a.type?a.getBandWidth():Math.abs(a[s](o-r)-a[s](o+r));return"Angle"===i&&(l=l*Math.PI/180),l},this)}function zx(t){var e,i=t.type;if("path"===i){var n=t.shape,a=null!=n.width&&null!=n.height?{x:n.x||0,y:n.y||0,width:n.width,height:n.height}:null,o=qx(n);e=So(o,null,a,n.layout||"center"),e.__customPathData=o}else if("image"===i)e=new Cn({}),e.__customImagePath=t.style.image;else if("text"===i)e=new NT({}),e.__customText=t.style.text;else if("group"===i)e=new xM;else{if("compoundPath"===i)throw new Error('"compoundPath" is not supported yet.');var r=bo(i);e=new r}return e.__customGraphicType=i,e.name=t.name,e}function Rx(t,e,i,a,o,r,s){var l={},u=i.style||{};if(i.shape&&(l.shape=n(i.shape)),i.position&&(l.position=i.position.slice()),i.scale&&(l.scale=i.scale.slice()),i.origin&&(l.origin=i.origin.slice()),i.rotation&&(l.rotation=i.rotation),"image"===t.type&&i.style){var h=l.style={};f(["x","y","width","height"],function(e){Ex(e,h,u,t.style,r)})}if("text"===t.type&&i.style){var h=l.style={};f(["x","y"],function(e){Ex(e,h,u,t.style,r)}),!u.hasOwnProperty("textFill")&&u.fill&&(u.textFill=u.fill),!u.hasOwnProperty("textStroke")&&u.stroke&&(u.textStroke=u.stroke)}if("group"!==t.type&&(t.useStyle(u),r)){t.style.opacity=0;var c=u.opacity;null==c&&(c=1),or(t,{style:{opacity:c}},a,e)}r?t.attr(l):ar(t,l,a,e),i.hasOwnProperty("z2")&&t.attr("z2",i.z2||0),i.hasOwnProperty("silent")&&t.attr("silent",i.silent),i.hasOwnProperty("invisible")&&t.attr("invisible",i.invisible),i.hasOwnProperty("ignore")&&t.attr("ignore",i.ignore),i.hasOwnProperty("info")&&t.attr("info",i.info);var d=i.styleEmphasis;Ro(t,d),s&&Ho(t,d!==!1)}function Ex(t,e,i,n,a){null==i[t]||a||(e[t]=i[t],i[t]=n[t])}function Bx(t,e,i,n){function a(t){null==t&&(t=m),S&&(v=e.getItemModel(t),y=v.getModel(gE),x=v.getModel(mE),_=e.getItemVisual(t,"color"),S=!1)}function o(t,i){return null==i&&(i=m),e.get(e.getDimension(t||0),i)}function r(i,n){null==n&&(n=m),a(n);var o=v.getModel(fE).getItemStyle();null!=_&&(o.fill=_);var r=e.getItemVisual(n,"opacity");null!=r&&(o.opacity=r);var s=i?Ux(i,y):y;return jo(o,s,null,{autoColor:_,isRectText:!0}),o.text=s.getShallow("show")?C(t.getFormattedLabel(n,"normal"),Ec(e,n)):null,i&&Yx(o,i),o}function l(i,n){null==n&&(n=m),a(n);var o=v.getModel(pE).getItemStyle(),r=i?Ux(i,x):x;return jo(o,r,null,{isRectText:!0},!0),o.text=r.getShallow("show")?L(t.getFormattedLabel(n,"emphasis"),t.getFormattedLabel(n,"normal"),Ec(e,n)):null,i&&Yx(o,i),o}function u(t,i){return null==i&&(i=m),e.getItemVisual(i,t)}function h(t){if(p.getBaseAxis){var e=p.getBaseAxis();return Oh(s({axis:e},t),n)}}function c(){return i.getCurrentSeriesIndices()}function d(t){return ir(t,i)}var f=t.get("renderItem"),p=t.coordinateSystem,g={};p&&(g=p.prepareCustoms?p.prepareCustoms():yE[p.type](p));var m,v,y,x,_,w=s({getWidth:n.getWidth,getHeight:n.getHeight,getZr:n.getZr,getDevicePixelRatio:n.getDevicePixelRatio,value:o,style:r,styleEmphasis:l,visual:u,barLayout:h,currentSeriesIndices:c,font:d},g.api||{}),b={context:{},seriesId:t.id,seriesName:t.name,seriesIndex:t.seriesIndex,coordSys:g.coordSys,dataInsideLength:e.count(),encode:Vx(t.getData())},S=!0;return function(t,i){return m=t,S=!0,f&&f(s({dataIndexInside:t,dataIndex:e.getRawIndex(t),actionType:i?i.type:null},b),w)}}function Vx(t){var e={};return f(t.dimensions,function(i,n){var a=t.getDimensionInfo(i);if(!a.isExtraCoord){var o=a.coordDim,r=e[o]=e[o]||[];r[a.coordDimIndex]=n}}),e}function Gx(t,e,i,n,a,o){return t=Fx(t,e,i,n,a,o,!0),t&&o.setItemGraphicEl(e,t),t}function Fx(t,e,i,n,a,o,r){var s=!i;i=i||{};var l=i.type,u=i.shape,h=i.style;if(t&&(s||null!=l&&l!==t.__customGraphicType||"path"===l&&Kx(u)&&qx(u)!==t.__customPathData||"image"===l&&$x(h,"image")&&h.image!==t.__customImagePath||"text"===l&&$x(u,"text")&&h.text!==t.__customText)&&(a.remove(t),t=null),!s){var c=!t;return!t&&(t=zx(i)),Rx(t,e,i,n,o,c,r),"group"===l&&Wx(t,e,i,n,o),a.add(t),t}}function Wx(t,e,i,n,a){var o=i.children,r=o?o.length:0,s=i.$mergeChildren,l="byName"===s||i.diffChildrenByName,u=s===!1;if(r||l||u){if(l)return void Hx({oldChildren:t.children()||[],newChildren:o||[],dataIndex:e,animatableModel:n,group:t,data:a});u&&t.removeAll();for(var h=0;r>h;h++)o[h]&&Fx(t.childAt(h),e,o[h],n,t,a)}}function Hx(t){new Xu(t.oldChildren,t.newChildren,Zx,Zx,t).add(Xx).update(Xx).remove(jx).execute()}function Zx(t,e){var i=t&&t.name;return null!=i?i:vE+e}function Xx(t,e){var i=this.context,n=null!=t?i.newChildren[t]:null,a=null!=e?i.oldChildren[e]:null;Fx(a,i.dataIndex,n,i.animatableModel,i.group,i.data)}function Ux(t,e){var i=new vr({},e);return f(dE,function(e,n){t.hasOwnProperty(e)&&(i.option[n]=t[e])}),i}function Yx(t,e){for(var i in e)(e.hasOwnProperty(i)||!dE.hasOwnProperty(i))&&(t[i]=e[i])}function jx(t){var e=this.context,i=e.oldChildren[t];i&&e.group.remove(i)}function qx(t){return t&&(t.pathData||t.d)}function Kx(t){return t&&(t.hasOwnProperty("pathData")||t.hasOwnProperty("d"))}function $x(t,e){return t&&t.hasOwnProperty(e)}function Jx(t){return t.get("stack")||"__ec_stack_"+t.seriesIndex}function Qx(t,e){return e.dim+t.model.componentIndex}function t_(t,e){var i={},n=e_(m(e.getSeriesByType(t),function(t){return!e.isSeriesFiltered(t)&&t.coordinateSystem&&"polar"===t.coordinateSystem.type}));e.eachSeriesByType(t,function(t){if("polar"===t.coordinateSystem.type){var e=t.getData(),a=t.coordinateSystem,o=a.getBaseAxis(),r=Qx(a,o),s=Jx(t),l=n[r][s],u=l.offset,h=l.width,c=a.getOtherAxis(o),d=t.coordinateSystem.cx,f=t.coordinateSystem.cy,p=t.get("barMinHeight")||0,g=t.get("barMinAngle")||0;i[s]=i[s]||[];for(var m=e.mapDimension(c.dim),v=e.mapDimension(o.dim),y=yh(e,m),x="radius"!==o.dim||!t.get("roundCap",!0),_="radius"===c.dim?c.dataToRadius(0):c.dataToAngle(0),w=0,b=e.count();b>w;w++){var S=e.get(m,w),M=e.get(v,w),I=S>=0?"p":"n",T=_;y&&(i[s][M]||(i[s][M]={p:_,n:_}),T=i[s][M][I]);var A,D,C,L;if("radius"===c.dim){var k=c.dataToRadius(S)-_,P=o.dataToAngle(M);Math.abs(k)k?-1:1)*p),A=T,D=T+k,C=P-u,L=C-h,y&&(i[s][M][I]=D)}else{var O=c.dataToAngle(S,x)-_,N=o.dataToRadius(M);Math.abs(O)O?-1:1)*g),A=N+u,D=A+h,C=T,L=T+O,y&&(i[s][M][I]=L)}e.setItemLayout(w,{cx:d,cy:f,r0:A,r:D,startAngle:-C*Math.PI/180,endAngle:-L*Math.PI/180})}}},this)}function e_(t){var e={};f(t,function(t){var i=t.getData(),n=t.coordinateSystem,a=n.getBaseAxis(),o=Qx(n,a),r=a.getExtent(),s="category"===a.type?a.getBandWidth():Math.abs(r[1]-r[0])/i.count(),l=e[o]||{bandWidth:s,remainedWidth:s,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},u=l.stacks;e[o]=l;var h=Jx(t);u[h]||l.autoWidthCount++,u[h]=u[h]||{width:0,maxWidth:0};var c=Ir(t.get("barWidth"),s),d=Ir(t.get("barMaxWidth"),s),f=t.get("barGap"),p=t.get("barCategoryGap");c&&!u[h].width&&(c=Math.min(l.remainedWidth,c),u[h].width=c,l.remainedWidth-=c),d&&(u[h].maxWidth=d),null!=f&&(l.gap=f),null!=p&&(l.categoryGap=p)});var i={};return f(e,function(t,e){i[e]={};var n=t.stacks,a=t.bandWidth,o=Ir(t.categoryGap,a),r=Ir(t.gap,1),s=t.remainedWidth,l=t.autoWidthCount,u=(s-o)/(l+(l-1)*r);u=Math.max(u,0),f(n,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-o)/(l+(l-1)*r),u=Math.max(u,0);var h,c=0;f(n,function(t){t.width||(t.width=u),h=t,c+=t.width*(1+r)}),h&&(c-=h.width*r);var d=-c/2;f(n,function(t,n){i[e][n]=i[e][n]||{offset:d,width:t.width},d+=t.width*(1+r)})}),i}function i_(t,e){sk.call(this,"radius",t,e),this.type="category"}function n_(t,e){e=e||[0,360],sk.call(this,"angle",t,e),this.type="category"}function a_(t,e){return e.type||(e.data?"category":"value")}function o_(t,e,i){var n=e.get("center"),a=i.getWidth(),o=i.getHeight();t.cx=Ir(n[0],a),t.cy=Ir(n[1],o);var r=t.getRadiusAxis(),s=Math.min(a,o)/2,l=e.get("radius");null==l?l=[0,"100%"]:_(l)||(l=[0,l]),l=[Ir(l[0],s),Ir(l[1],s)],r.inverse?r.setExtent(l[1],l[0]):r.setExtent(l[0],l[1])}function r_(t){var e=this,i=e.getAngleAxis(),n=e.getRadiusAxis();if(i.scale.setExtent(1/0,-1/0),n.scale.setExtent(1/0,-1/0),t.eachSeries(function(t){if(t.coordinateSystem===e){var a=t.getData();f(a.mapDimension("radius",!0),function(t){n.scale.unionExtentFromData(a,xh(a,t))}),f(a.mapDimension("angle",!0),function(t){i.scale.unionExtentFromData(a,xh(a,t))})}}),Uh(i.scale,i.model),Uh(n.scale,n.model),"category"===i.type&&!i.onBand){var a=i.getExtent(),o=360/i.scale.count();i.inverse?a[1]+=o:a[1]-=o,i.setExtent(a[0],a[1])}}function s_(t,e){if(t.type=e.get("type"),t.scale=Yh(e),t.onBand=e.get("boundaryGap")&&"category"===t.type,t.inverse=e.get("inverse"),"angleAxis"===e.mainType){t.inverse^=e.get("clockwise");var i=e.get("startAngle");t.setExtent(i,i+(t.inverse?-360:360))}e.axis=t,t.model=e}function l_(t,e,i){e[1]>e[0]&&(e=e.slice().reverse());var n=t.coordToPoint([e[0],i]),a=t.coordToPoint([e[1],i]);return{x1:n[0],y1:n[1],x2:a[0],y2:a[1]}}function u_(t){var e=t.getRadiusAxis();return e.inverse?0:1}function h_(t){var e=t[0],i=t[t.length-1];e&&i&&Math.abs(Math.abs(e.coord-i.coord)-360)<1e-4&&t.pop() +}function c_(t,e,i){return{position:[t.cx,t.cy],rotation:i/180*Math.PI,labelDirection:-1,tickDirection:-1,nameDirection:1,labelRotate:e.getModel("axisLabel").get("rotate"),z2:1}}function d_(t,e,i,n,a){var o=e.axis,r=o.dataToCoord(t),s=n.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l,u,h,c=n.getRadiusAxis().getExtent();if("radius"===o.dim){var d=Oe();Be(d,d,s),Ee(d,d,[n.cx,n.cy]),l=sr([r,-a],d);var f=e.getModel("axisLabel").get("rotate")||0,p=zk.innerTextLayout(s,f*Math.PI/180,-1);u=p.textAlign,h=p.textVerticalAlign}else{var g=c[1];l=n.coordToPoint([g+a,r]);var m=n.cx,v=n.cy;u=Math.abs(l[0]-m)/g<.3?"center":l[0]>m?"left":"right",h=Math.abs(l[1]-v)/g<.3?"middle":l[1]>v?"top":"bottom"}return{position:l,align:u,verticalAlign:h}}function f_(t,e){e.update="updateView",Lu(e,function(e,i){var n={};return i.eachComponent({mainType:"geo",query:e},function(i){i[t](e.name);var a=i.coordinateSystem;f(a.regions,function(t){n[t.name]=i.isSelected(t.name)||!1})}),{selected:n,name:e.name}})}function p_(t){this._model=t}function g_(t,e,i,n){var a=i.calendarModel,o=i.seriesModel,r=a?a.coordinateSystem:o?o.coordinateSystem:null;return r===this?r[t](n):null}function m_(t,e){var i=t.cellSize;_(i)?1===i.length&&(i[1]=i[0]):i=t.cellSize=[i,i];var n=p([0,1],function(t){return ns(e,t)&&(i[t]="auto"),null!=i[t]&&"auto"!==i[t]});as(t,e,{type:"box",ignoreSize:n})}function v_(t,e,i){var n,a={},o="toggleSelected"===t;return i.eachComponent("legend",function(i){o&&null!=n?i[n?"select":"unSelect"](e.name):"allSelect"===t||"inverseSelect"===t?i[t]():(i[t](e.name),n=i.isSelected(e.name));var r=i.getData();f(r,function(t){var e=t.get("name");if("\n"!==e&&""!==e){var n=i.isSelected(e);a[e]=a.hasOwnProperty(e)?a[e]&&n:n}})}),"allSelect"===t||"inverseSelect"===t?{selected:a}:{name:e.name,selected:a}}function y_(t,e,i){var n=e.getBoxLayoutParams(),a=e.get("padding"),o={width:i.getWidth(),height:i.getHeight()},r=es(n,o,a);VA(e.get("orient"),t,e.get("itemGap"),r.width,r.height),is(t,n,o,a)}function x_(t,e){var i=CA(e.get("padding")),n=e.getItemStyle(["color","opacity"]);n.fill=e.get("backgroundColor");var t=new UT({shape:{x:t.x-i[3],y:t.y-i[0],width:t.width+i[1]+i[3],height:t.height+i[0]+i[2],r:e.get("borderRadius")},style:n,silent:!0,z2:-1});return t}function __(t,e,i,n,a,o){var r;return"line"!==e&&e.indexOf("empty")<0?(r=i.getItemStyle(),t.style.stroke=n,o||(r.stroke=a)):r=i.getItemStyle(["borderWidth","borderColor"]),t.setStyle(r)}function w_(t,e,i,n){S_(t,e,i,n),i.dispatchAction({type:"legendToggleSelect",name:null!=t?t:e}),b_(t,e,i,n)}function b_(t,e,i,n){var a=i.getZr().storage.getDisplayList()[0];a&&a.useHoverLayer||i.dispatchAction({type:"highlight",seriesName:t,name:e,excludeSeriesId:n})}function S_(t,e,i,n){var a=i.getZr().storage.getDisplayList()[0];a&&a.useHoverLayer||i.dispatchAction({type:"downplay",seriesName:t,name:e,excludeSeriesId:n})}function M_(t,e,i){var n=t.getOrient(),a=[1,1];a[n.index]=0,as(e,i,{type:"box",ignoreSize:a})}function I_(t){var e="cubic-bezier(0.23, 1, 0.32, 1)",i="left "+t+"s "+e+",top "+t+"s "+e;return p(qE,function(t){return t+"transition:"+i}).join(";")}function T_(t){var e=[],i=t.get("fontSize"),n=t.getTextColor();n&&e.push("color:"+n),e.push("font:"+t.getFont());var a=t.get("lineHeight");null==a&&(a=Math.round(3*i/2)),i&&e.push("line-height:"+a+"px");var o=t.get("textShadowColor"),r=t.get("textShadowBlur")||0,s=t.get("textShadowOffsetX")||0,l=t.get("textShadowOffsetY")||0;return r&&e.push("text-shadow:"+s+"px "+l+"px "+r+"px "+o),YE(["decoration","align"],function(i){var n=t.get(i);n&&e.push("text-"+i+":"+n)}),e.join(";")}function A_(t){var e=[],i=t.get("transitionDuration"),n=t.get("backgroundColor"),a=t.getModel("textStyle"),o=t.get("padding");return i&&e.push(I_(i)),n&&(oS.canvasSupported?e.push("background-Color:"+n):(e.push("background-Color:#"+ai(n)),e.push("filter:alpha(opacity=70)"))),YE(["width","color","radius"],function(i){var n="border-"+i,a=jE(n),o=t.get(a);null!=o&&e.push(n+":"+o+("color"===i?"":"px"))}),e.push(T_(a)),null!=o&&e.push("padding:"+CA(o).join("px ")+"px"),e.join(";")+";"}function D_(t,e,i,n,a){var o=e&&e.painter;if(i){var r=o&&o.getViewportRoot();r&&pe(t,r,document.body,n,a)}else{t[0]=n,t[1]=a;var s=o&&o.getViewportRootOffset();s&&(t[0]+=s.offsetLeft,t[1]+=s.offsetTop)}t[2]=t[0]/e.getWidth(),t[3]=t[1]/e.getHeight()}function C_(t,e,i){if(oS.wxa)return null;var n=document.createElement("div");n.domBelongToZr=!0,this.el=n;var a=this._zr=e.getZr(),o=this._appendToBody=i&&i.appendToBody;this._styleCoord=[0,0,0,0],D_(this._styleCoord,a,o,e.getWidth()/2,e.getHeight()/2),o?document.body.appendChild(n):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(t){if(t=t||window.event,!r._enterable){var e=a.handler,i=a.painter.getViewportRoot();be(i,t,!0),e.dispatch("mousemove",t)}},n.onmouseleave=function(){r._enterable&&r._show&&r.hideLater(r._hideDelay),r._inContent=!1}}function L_(t,e,i,n){t[0]=i,t[1]=n,t[2]=t[0]/e.getWidth(),t[3]=t[1]/e.getHeight()}function k_(t){var e=this._zr=t.getZr();this._styleCoord=[0,0,0,0],L_(this._styleCoord,e,t.getWidth()/2,t.getHeight()/2),this._show=!1,this._hideTimeout}function P_(t){for(var e=t.pop();t.length;){var i=t.pop();i&&(vr.isInstance(i)&&(i=i.get("tooltip",!0)),"string"==typeof i&&(i={formatter:i}),e=new vr(i,e,e.ecModel))}return e}function O_(t,e){return t.dispatchAction||y(e.dispatchAction,e)}function N_(t,e,i,n,a,o,r){var s=i.getOuterSize(),l=s.width,u=s.height;return null!=o&&(t+l+o>n?t-=l+o:t+=o),null!=r&&(e+u+r>a?e-=u+r:e+=r),[t,e]}function z_(t,e,i,n,a){var o=i.getOuterSize(),r=o.width,s=o.height;return t=Math.min(t+r,n)-r,e=Math.min(e+s,a)-s,t=Math.max(t,0),e=Math.max(e,0),[t,e]}function R_(t,e,i){var n=i[0],a=i[1],o=5,r=0,s=0,l=e.width,u=e.height;switch(t){case"inside":r=e.x+l/2-n/2,s=e.y+u/2-a/2;break;case"top":r=e.x+l/2-n/2,s=e.y-a-o;break;case"bottom":r=e.x+l/2-n/2,s=e.y+u+o;break;case"left":r=e.x-n-o,s=e.y+u/2-a/2;break;case"right":r=e.x+l+o,s=e.y+u/2-a/2}return[r,s]}function E_(t){return"center"===t||"middle"===t}function B_(t){ia(t,"label",["show"])}function V_(t){return!(isNaN(parseFloat(t.x))&&isNaN(parseFloat(t.y)))}function G_(t){return!isNaN(parseFloat(t.x))&&!isNaN(parseFloat(t.y))}function F_(t,e,i,n,a,o){var r=[],s=yh(e,n),l=s?e.getCalculationInfo("stackResultDimension"):n,u=Y_(e,l,t),h=e.indicesOfNearest(l,u)[0];r[a]=e.get(i,h),r[o]=e.get(l,h);var c=e.get(n,h),d=Dr(e.get(n,h));return d=Math.min(d,20),d>=0&&(r[o]=+r[o].toFixed(d)),[r,c]}function W_(t,e){var i=t.getData(),a=t.coordinateSystem;if(e&&!G_(e)&&!_(e.coord)&&a){var o=a.dimensions,r=H_(e,i,a,t);if(e=n(e),e.type&&rB[e.type]&&r.baseAxis&&r.valueAxis){var s=aB(o,r.baseAxis.dim),l=aB(o,r.valueAxis.dim),u=rB[e.type](i,r.baseDataDim,r.valueDataDim,s,l);e.coord=u[0],e.value=u[1]}else{for(var h=[null!=e.xAxis?e.xAxis:e.radiusAxis,null!=e.yAxis?e.yAxis:e.angleAxis],c=0;2>c;c++)rB[h[c]]&&(h[c]=Y_(i,i.mapDimension(o[c]),h[c]));e.coord=h}}return e}function H_(t,e,i,n){var a={};return null!=t.valueIndex||null!=t.valueDim?(a.valueDataDim=null!=t.valueIndex?e.getDimension(t.valueIndex):t.valueDim,a.valueAxis=i.getAxis(Z_(n,a.valueDataDim)),a.baseAxis=i.getOtherAxis(a.valueAxis),a.baseDataDim=e.mapDimension(a.baseAxis.dim)):(a.baseAxis=n.getBaseAxis(),a.valueAxis=i.getOtherAxis(a.baseAxis),a.baseDataDim=e.mapDimension(a.baseAxis.dim),a.valueDataDim=e.mapDimension(a.valueAxis.dim)),a}function Z_(t,e){var i=t.getData(),n=i.dimensions;e=i.getDimension(e);for(var a=0;an?t.coord&&t.coord[n]:t.value}function Y_(t,e,i){if("average"===i){var n=0,a=0;return t.each(e,function(t){isNaN(t)||(n+=t,a++)}),n/a}return"median"===i?t.getMedian(e):t.getDataExtent(e,!0)["max"===i?1:0]}function j_(t,e,i){var n=e.coordinateSystem;t.each(function(a){var o,r=t.getItemModel(a),s=Ir(r.get("x"),i.getWidth()),l=Ir(r.get("y"),i.getHeight());if(isNaN(s)||isNaN(l)){if(e.getMarkerPosition)o=e.getMarkerPosition(t.getValues(t.dimensions,a));else if(n){var u=t.get(n.dimensions[0],a),h=t.get(n.dimensions[1],a);o=n.dataToPoint([u,h])}}else o=[s,l];isNaN(s)||(o[0]=s),isNaN(l)||(o[1]=l),t.setItemLayout(a,o)})}function q_(t,e,i){var n;n=t?p(t&&t.dimensions,function(t){var i=e.getData().getDimensionInfo(e.getData().mapDimension(t))||{};return s({name:t},i)}):[{name:"value",type:"float"}];var a=new dL(n,i),o=p(i.get("data"),x(W_,e));return t&&(o=m(o,x(X_,t))),a.initData(o,null,t?U_:function(t){return t.value}),a}function K_(t){return!isNaN(t)&&!isFinite(t)}function $_(t,e,i,n){var a=1-t,o=n.dimensions[t];return K_(e[a])&&K_(i[a])&&e[t]===i[t]&&n.getAxis(o).containData(e[t])}function J_(t,e){if("cartesian2d"===t.type){var i=e[0].coord,n=e[1].coord;if(i&&n&&($_(1,i,n,t)||$_(0,i,n,t)))return!0}return X_(t,e[0])&&X_(t,e[1])}function Q_(t,e,i,n,a){var o,r=n.coordinateSystem,s=t.getItemModel(e),l=Ir(s.get("x"),a.getWidth()),u=Ir(s.get("y"),a.getHeight());if(isNaN(l)||isNaN(u)){if(n.getMarkerPosition)o=n.getMarkerPosition(t.getValues(t.dimensions,e));else{var h=r.dimensions,c=t.get(h[0],e),d=t.get(h[1],e);o=r.dataToPoint([c,d])}if("cartesian2d"===r.type){var f=r.getAxis("x"),p=r.getAxis("y"),h=r.dimensions;K_(t.get(h[0],e))?o[0]=f.toGlobalCoord(f.getExtent()[i?0:1]):K_(t.get(h[1],e))&&(o[1]=p.toGlobalCoord(p.getExtent()[i?0:1]))}isNaN(l)||(o[0]=l),isNaN(u)||(o[1]=u)}else o=[l,u];t.setItemLayout(e,o)}function tw(t,e,i){var n;n=t?p(t&&t.dimensions,function(t){var i=e.getData().getDimensionInfo(e.getData().mapDimension(t))||{};return s({name:t},i)}):[{name:"value",type:"float"}];var a=new dL(n,i),o=new dL(n,i),r=new dL([],i),l=p(i.get("data"),x(lB,e,t,i));t&&(l=m(l,x(J_,t)));var u=t?U_:function(t){return t.value};return a.initData(p(l,function(t){return t[0]}),null,u),o.initData(p(l,function(t){return t[1]}),null,u),r.initData(p(l,function(t){return t[2]})),r.hasItemOption=!0,{from:a,to:o,line:r}}function ew(t){return!isNaN(t)&&!isFinite(t)}function iw(t,e,i){var n=1-t;return ew(e[n])&&ew(i[n])}function nw(t,e){var i=e.coord[0],n=e.coord[1];return"cartesian2d"===t.type&&i&&n&&(iw(1,i,n,t)||iw(0,i,n,t))?!0:X_(t,{coord:i,x:e.x0,y:e.y0})||X_(t,{coord:n,x:e.x1,y:e.y1})}function aw(t,e,i,n,a){var o,r=n.coordinateSystem,s=t.getItemModel(e),l=Ir(s.get(i[0]),a.getWidth()),u=Ir(s.get(i[1]),a.getHeight());if(isNaN(l)||isNaN(u)){if(n.getMarkerPosition)o=n.getMarkerPosition(t.getValues(i,e));else{var h=t.get(i[0],e),c=t.get(i[1],e),d=[h,c];r.clampData&&r.clampData(d,d),o=r.dataToPoint(d,!0)}if("cartesian2d"===r.type){var f=r.getAxis("x"),p=r.getAxis("y"),h=t.get(i[0],e),c=t.get(i[1],e);ew(h)?o[0]=f.toGlobalCoord(f.getExtent()["x0"===i[0]?0:1]):ew(c)&&(o[1]=p.toGlobalCoord(p.getExtent()["y0"===i[1]?0:1]))}isNaN(l)||(o[0]=l),isNaN(u)||(o[1]=u)}else o=[l,u];return o}function ow(t,e,i){var n,a,o=["x0","y0","x1","y1"];t?(n=p(t&&t.dimensions,function(t){var i=e.getData(),n=i.getDimensionInfo(i.mapDimension(t))||{};return s({name:t},n)}),a=new dL(p(o,function(t,e){return{name:t,type:n[e%2].type}}),i)):(n=[{name:"value",type:"float"}],a=new dL(n,i));var r=p(i.get("data"),x(uB,e,t,i));t&&(r=m(r,x(nw,t)));var l=t?function(t,e,i,n){return t.coord[Math.floor(n/2)][n%2]}:function(t){return t.value};return a.initData(r,null,l),a.hasItemOption=!0,a}function rw(t){var e=t.type,i={number:"value",time:"time"};if(i[e]&&(t.axisType=i[e],delete t.type),sw(t),lw(t,"controlPosition")){var n=t.controlStyle||(t.controlStyle={});lw(n,"position")||(n.position=t.controlPosition),"none"!==n.position||lw(n,"show")||(n.show=!1,delete n.position),delete t.controlPosition}f(t.data||[],function(t){S(t)&&!_(t)&&(!lw(t,"value")&&lw(t,"name")&&(t.value=t.name),sw(t))})}function sw(t){var e=t.itemStyle||(t.itemStyle={}),i=e.emphasis||(e.emphasis={}),n=t.label||t.label||{},a=n.normal||(n.normal={}),o={normal:1,emphasis:1};f(n,function(t,e){o[e]||lw(a,e)||(a[e]=t)}),i.label&&!lw(n,"emphasis")&&(n.emphasis=i.label,delete i.label)}function lw(t,e){return t.hasOwnProperty(e)}function uw(t,e){return es(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()},t.get("padding"))}function hw(t,e,i,n){var a=n.style,o=dr(t.get(e),n||{},new Ti(i[0],i[1],i[2],i[3]));return a&&o.setStyle(a),o}function cw(t,e,i,n,o,r){var s=e.get("color");if(o)o.setColor(s),i.add(o),r&&r.onUpdate(o);else{var l=t.get("symbol");o=ic(l,-1,-1,2,2,s),o.setStyle("strokeNoScale",!0),i.add(o),r&&r.onCreate(o)}var u=e.getItemStyle(["color","symbol","symbolSize"]);o.setStyle(u),n=a({rectHover:!0,z2:100},n,!0);var h=t.get("symbolSize");h=h instanceof Array?h.slice():[+h,+h],h[0]/=2,h[1]/=2,n.scale=h;var c=t.get("symbolOffset");if(c){var d=n.position=n.position||[0,0];d[0]+=Ir(c[0],h[0]),d[1]+=Ir(c[1],h[1])}var f=t.get("symbolRotate");return n.rotation=(f||0)*Math.PI/180||0,o.attr(n),o.updateTransform(),o}function dw(t,e,i,n,a){if(!t.dragging){var o=n.getModel("checkpointStyle"),r=i.dataToCoord(n.getData().get(["value"],e));a||!o.get("animation",!0)?t.attr({position:[r,0]}):(t.stopAnimation(!0),t.animateTo({position:[r,0]},o.get("animationDuration",!0),o.get("animationEasing",!0)))}}function fw(t){return u(_B,t)>=0}function pw(t,e){t=t.slice();var i=p(t,qr);e=(e||[]).slice();var n=p(e,qr);return function(a,o){f(t,function(t,r){for(var s={name:t,capital:i[r]},l=0;l=0}function a(t,n){var a=!1;return e(function(e){f(i(t,e)||[],function(t){n.records[e.name][t]&&(a=!0)})}),a}function o(t,n){n.nodes.push(t),e(function(e){f(i(t,e)||[],function(t){n.records[e.name][t]=!0})})}return function(i){function r(t){!n(t,s)&&a(t,s)&&(o(t,s),l=!0)}var s={nodes:[],records:{}};if(e(function(t){s.records[t.name]={}}),!i)return s;o(i,s);var l;do l=!1,t(r);while(l);return s}}function mw(t,e,i){var n=[1/0,-1/0];return bB(i,function(t){var i=t.getData();i&&bB(i.mapDimension(e,!0),function(t){var e=i.getApproximateExtent(t);e[0]n[1]&&(n[1]=e[1])})}),n[1]0?0:0/0);var r=i.getMax(!0);return null!=r&&"dataMax"!==r&&"function"!=typeof r?e[1]=r:a&&(e[1]=o>0?o-1:0/0),i.get("scale",!0)||(e[0]>0&&(e[0]=0),e[1]<0&&(e[1]=0)),e}function yw(t,e){var i=t.getAxisModel(),n=t._percentWindow,a=t._valueWindow;if(n){var o=Lr(a,[0,500]);o=Math.min(o,20);var r=e||0===n[0]&&100===n[1];i.setRange(r?null:+a[0].toFixed(o),r?null:+a[1].toFixed(o))}}function xw(t){var e=t._minMaxSpan={},i=t._dataZoomModel,n=t._dataExtent;bB(["min","max"],function(a){var o=i.get(a+"Span"),r=i.get(a+"ValueSpan");null!=r&&(r=t.getAxisModel().axis.scale.parse(r)),null!=r?o=Mr(n[0]+r,n,[0,100],!0):null!=o&&(r=Mr(o,[0,100],n,!0)-n[0]),e[a+"Span"]=o,e[a+"ValueSpan"]=r})}function _w(t){var e={};return IB(["start","end","startValue","endValue","throttle"],function(i){t.hasOwnProperty(i)&&(e[i]=t[i])}),e}function ww(t,e){var i=t._rangePropMode,n=t.get("rangeMode");IB([["start","startValue"],["end","endValue"]],function(t,a){var o=null!=e[t[0]],r=null!=e[t[1]];o&&!r?i[a]="percent":!o&&r?i[a]="value":n?i[a]=n[a]:o&&(i[a]="percent")})}function bw(t){var e={x:"y",y:"x",radius:"angle",angle:"radius"};return e[t]}function Sw(t){return"vertical"===t?"ns-resize":"ew-resize"}function Mw(t,e){var i=Aw(t),n=e.dataZoomId,a=e.coordId;f(i,function(t){var i=t.dataZoomInfos;i[n]&&u(e.allCoordIds,a)<0&&(delete i[n],t.count--)}),Cw(i);var o=i[a];o||(o=i[a]={coordId:a,dataZoomInfos:{},count:0},o.controller=Dw(t,o),o.dispatchAction=x(Lw,t)),!o.dataZoomInfos[n]&&o.count++,o.dataZoomInfos[n]=e;var r=kw(o.dataZoomInfos);o.controller.enable(r.controlType,r.opt),o.controller.setPointerChecker(e.containsPoint),Sl(o,"dispatchAction",e.dataZoomModel.get("throttle",!0),"fixRate")}function Iw(t,e){var i=Aw(t);f(i,function(t){t.controller.dispose();var i=t.dataZoomInfos;i[e]&&(delete i[e],t.count--)}),Cw(i)}function Tw(t){return t.type+"\x00_"+t.id}function Aw(t){var e=t.getZr();return e[WB]||(e[WB]={})}function Dw(t,e){var i=new sp(t.getZr());return f(["pan","zoom","scrollMove"],function(t){i.on(t,function(i){var n=[];f(e.dataZoomInfos,function(a){if(i.isAvailableBehavior(a.dataZoomModel.option)){var o=(a.getRange||{})[t],r=o&&o(e.controller,i);!a.dataZoomModel.get("disabled",!0)&&r&&n.push({dataZoomId:a.dataZoomId,start:r[0],end:r[1]})}}),n.length&&e.dispatchAction(n)})}),i}function Cw(t){f(t,function(e,i){e.count||(e.controller.dispose(),delete t[i])})}function Lw(t,e){t.dispatchAction({type:"dataZoom",batch:e})}function kw(t){var e,i="type_",n={type_true:2,type_move:1,type_false:0,type_undefined:-1},a=!0;return f(t,function(t){var o=t.dataZoomModel,r=o.get("disabled",!0)?!1:o.get("zoomLock",!0)?"move":!0;n[i+r]>n[i+e]&&(e=r),a&=o.get("preventDefaultMouseMove",!0)}),{controlType:e,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!a}}}function Pw(t){return function(e,i,n,a){var o=this._range,r=o.slice(),s=e.axisModels[0];if(s){var l=t(r,s,e,i,n,a);return Rz(l,r,[0,100],"all"),this._range=r,o[0]!==r[0]||o[1]!==r[1]?r:void 0}}}function Ow(t){var e={};f(t,function(t){e[t]=1}),t.length=0,f(e,function(e,i){t.push(i)})}function Nw(t){if(t)for(var e in t)if(t.hasOwnProperty(e))return!0}function zw(t,e,i){function a(){var t=function(){};t.prototype.__hidden=t.prototype;var e=new t;return e}var o={};return qB(e,function(e){var r=o[e]=a();qB(t[e],function(t,a){if(kO.isValidType(a)){var o={type:a,visual:t};i&&i(o,e),r[a]=new kO(o),"opacity"===a&&(o=n(o),o.type="colorAlpha",r.__hidden.__alphaForOpacity=new kO(o))}})}),o}function Rw(t,e,i){var a;f(i,function(t){e.hasOwnProperty(t)&&Nw(e[t])&&(a=!0)}),a&&f(i,function(i){e.hasOwnProperty(i)&&Nw(e[i])?t[i]=n(e[i]):delete t[i]})}function Ew(t,e,i,n,a,o){function r(t){return i.getItemVisual(h,t)}function s(t,e){i.setItemVisual(h,t,e)}function l(t,l){h=null==o?t:l;var c=i.getRawDataItem(h);if(!c||c.visualMap!==!1)for(var d=n.call(a,t),f=e[d],p=u[d],g=0,m=p.length;m>g;g++){var v=p[g];f[v]&&f[v].applyVisual(t,r,s)}}var u={};f(t,function(t){var i=kO.prepareVisualTypes(e[t]);u[t]=i});var h;null==o?i.each(l):i.each([o],l)}function Bw(t,e,i,n){function a(t,a){function r(t){return a.getItemVisual(l,t)}function s(t,e){a.setItemVisual(l,t,e)}null!=n&&(n=a.getDimension(n));for(var l;null!=(l=t.next());){var u=a.getRawDataItem(l);if(!u||u.visualMap!==!1)for(var h=null!=n?a.get(n,l,!0):l,c=i(h),d=e[c],f=o[c],p=0,g=f.length;g>p;p++){var m=f[p];d[m]&&d[m].applyVisual(h,r,s)}}}var o={};return f(t,function(t){var i=kO.prepareVisualTypes(e[t]);o[t]=i}),{progress:a}}function Vw(t){var e=["x","y"],i=["width","height"];return{point:function(e,i,n){if(e){var a=n.range,o=e[t];return Gw(o,a)}},rect:function(n,a,o){if(n){var r=o.range,s=[n[e[t]],n[e[t]]+n[i[t]]];return s[1]=0)&&t(o,n,a)})}function Ww(t){return t[0]>t[1]&&t.reverse(),t}function Hw(t,e){return da(t,e,{includeMainTypes:eV})}function Zw(t,e,i,n){var a=i.getAxis(["x","y"][t]),o=Ww(p([0,1],function(t){return e?a.coordToData(a.toLocalCoord(n[t])):a.toGlobalCoord(a.dataToCoord(n[t]))})),r=[];return r[t]=o,r[1-t]=[0/0,0/0],{values:o,xyMinMax:r}}function Xw(t,e,i,n){return[e[0]-n[t]*i[0],e[1]-n[t]*i[1]]}function Uw(t,e){var i=Yw(t),n=Yw(e),a=[i[0]/n[0],i[1]/n[1]];return isNaN(a[0])&&(a[0]=1),isNaN(a[1])&&(a[1]=1),a}function Yw(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[0/0,0/0]}function jw(t){t.eachComponent({mainType:"brush"},function(e){var i=e.brushTargetManager=new Fw(e.option,t);i.setInputRanges(e.areas,t)})}function qw(t,e,i,n,a){if(a){var o=t.getZr();if(!o[hV]){o[uV]||(o[uV]=Kw);var r=Sl(o,uV,i,e);r(t,n)}}}function Kw(t,e){if(!t.isDisposed()){var i=t.getZr();i[hV]=!0,t.dispatchAction({type:"brushSelect",batch:e}),i[hV]=!1}}function $w(t,e,i,n){for(var a=0,o=e.length;o>a;a++){var r=e[a];if(t[r.brushType](n,i,r.selectors,r))return!0}}function Jw(t){var e=t.brushSelector;if(b(e)){var i=[];return f(KB,function(t,n){i[n]=function(i,n,a,o){var r=n.getItemLayout(i);return t[e](r,a,o)}}),i}if(w(e)){var n={};return f(KB,function(t,i){n[i]=e}),n}return e}function Qw(t,e){var i=t.option.seriesIndex;return null!=i&&"all"!==i&&(_(i)?u(i,e)<0:e!==i)}function tb(t){var e=t.selectors={};return f(KB[t.brushType],function(i,n){e[n]=function(n){return i(n,e,t)}}),t}function eb(t){return new Ti(t[0][0],t[1][0],t[0][1]-t[0][0],t[1][1]-t[1][0])}function ib(t,e){return a({brushType:t.brushType,brushMode:t.brushMode,transformable:t.transformable,brushStyle:new vr(t.brushStyle).getItemStyle(),removeOnClick:t.removeOnClick,z:t.z},e,!0)}function nb(t,e,i,n){(!n||n.$from!==t.id)&&this._brushController.setPanels(t.brushTargetManager.makePanelOpts(i)).enableBrush(t.brushOption).updateCovers(t.areas.slice())}function ab(t,e){pV[t]=e}function ob(t){return pV[t]}function rb(t,e,i){this.model=t,this.ecModel=e,this.api=i,this._brushType,this._brushMode}function sb(t,e){return t&&t.hasOwnProperty&&t.hasOwnProperty(e)}function lb(t,e,i,n){function a(t){return l[t]}function o(t,e){l[t]=e}for(var r=e.targetVisuals[n],s=kO.prepareVisualTypes(r),l={color:t.getData().getVisual("color")},u=0,h=s.length;h>u;u++){var c=s[u],d=r["opacity"===c?"__alphaForOpacity":c];d&&d.applyVisual(i,a,o)}return l.color}function ub(t,e,i){if(i[0]===i[1])return i.slice();for(var n=200,a=(i[1]-i[0])/n,o=i[0],r=[],s=0;n>=s&&oc;c++)h[s[1-r][c]]=u[c],h[l[c]]=2===c?i[0]:n[l[c]];var d=[["x","width",3],["y","height",0]][r],f=es(h,o,n.padding);return l[(f.margin[d[2]]||0)+f[d[0]]+.5*f[d[1]]<.5*o[d[1]]?0:1]}function cb(t,e){return f(t||[],function(t){null!=t.dataIndex&&(t.dataIndexInside=t.dataIndex,t.dataIndex=null),t.highlightKey="visualMap"+(e?e.componentIndex:"")}),t}function db(t,e,i,n){return new WT({shape:{points:t},draggable:!!i,cursor:e,drift:i,onmousemove:function(t){NS(t.event)},ondragend:n})}function fb(t,e){return 0===t?[[0,0],[e,0],[e,-e]]:[[0,0],[e,0],[e,e]]}function pb(t,e,i,n){return t?[[0,-zV(e,RV(i,0))],[BV,0],[0,zV(e,RV(n-i,0))]]:[[0,0],[5,-5],[5,5]]}function gb(t,e,i){var n=EV/2,a=t.get("hoverLinkDataSize");return a&&(n=OV(a,e,i,!0)/2),n}function mb(t){var e=t.get("hoverLinkOnHandle");return!!(null==e?t.get("realtime"):e)}function vb(t){return"vertical"===t?"ns-resize":"ew-resize"}function yb(t,e){var i=t.inverse;("vertical"===t.orient?!i:i)&&e.reverse()}function xb(t){return 0===t.indexOf("my")}function _b(t){this.model=t}function wb(t){this.model=t}function bb(t){var e={},i=[],n=[];return t.eachRawSeries(function(t){var a=t.coordinateSystem;if(!a||"cartesian2d"!==a.type&&"polar"!==a.type)i.push(t);else{var o=a.getBaseAxis();if("category"===o.type){var r=o.dim+"_"+o.index;e[r]||(e[r]={categoryAxis:o,valueAxis:a.getOtherAxis(o),series:[]},n.push({axisDim:o.dim,axisIndex:o.index})),e[r].series.push(t)}else i.push(t)}}),{seriesGroupByCategoryAxis:e,other:i,meta:n}}function Sb(t){var e=[];return f(t,function(t){var i=t.categoryAxis,n=t.valueAxis,a=n.dim,o=[" "].concat(p(t.series,function(t){return t.name})),r=[i.model.getCategories()];f(t.series,function(t){var e=t.getRawData();r.push(t.getRawData().mapArray(e.mapDimension(a),function(t){return t}))});for(var s=[o.join(QV)],l=0;lr;r++)n[r]=arguments[r];i.push((o?o+QV:"")+n.join(QV))}),i.join("\n")}).join("\n\n"+JV+"\n\n")}function Ib(t){var e=bb(t);return{value:m([Sb(e.seriesGroupByCategoryAxis),Mb(e.other)],function(t){return t.replace(/[\n\t\s]/g,"")}).join("\n\n"+JV+"\n\n"),meta:e.meta}}function Tb(t){return t.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Ab(t){var e=t.slice(0,t.indexOf("\n"));return e.indexOf(QV)>=0?!0:void 0}function Db(t){for(var e=t.split(/\n+/g),i=Tb(e.shift()).split(tG),n=[],a=p(i,function(t){return{name:t,data:[]}}),o=0;o=0;a--){var o=i[a];if(o[n])break}if(0>a){var r=t.queryComponents({mainType:"dataZoom",subType:"select",id:n})[0];if(r){var s=r.getPercentRange();i[0][n]={dataZoomId:n,start:s[0],end:s[1]}}}}),i.push(e)}function Nb(t){var e=Eb(t),i=e[e.length-1];e.length>1&&e.pop();var n={};return eG(i,function(t,i){for(var a=e.length-1;a>=0;a--){var t=e[a][i];if(t){n[i]=t;break}}}),n}function zb(t){t[iG]=null}function Rb(t){return Eb(t).length}function Eb(t){var e=t[iG];return e||(e=t[iG]=[{}]),e}function Bb(t,e,i){(this._brushController=new Gm(i.getZr())).on("brush",y(this._onBrush,this)).mount(),this._isZoomActive}function Vb(t){var e={};return f(["xAxisIndex","yAxisIndex"],function(i){e[i]=t[i],null==e[i]&&(e[i]="all"),(e[i]===!1||"none"===e[i])&&(e[i]=[])}),e}function Gb(t,e){t.setIconStatus("back",Rb(e)>1?"emphasis":"normal")}function Fb(t,e,i,n,a){var o=i._isZoomActive;n&&"takeGlobalCursor"===n.type&&(o="dataZoomSelect"===n.key?n.dataZoomSelectActive:!1),i._isZoomActive=o,t.setIconStatus("zoom",o?"emphasis":"normal");var r=new Fw(Vb(t.option),e,{include:["grid"]});i._brushController.setPanels(r.makePanelOpts(a,function(t){return t.xAxisDeclared&&!t.yAxisDeclared?"lineX":!t.xAxisDeclared&&t.yAxisDeclared?"lineY":"rect"})).enableBrush(o?{brushType:"auto",brushStyle:t.getModel("brushStyle").getItemStyle()}:!1)}function Wb(t){this.model=t}function Hb(t,e,i,n){var a=i.type,o=hG.hasOwnProperty(a)?hG[a]:bo(a),r=new o(i);e.add(r),n.set(t,r),r.__ecGraphicId=t}function Zb(t,e){var i=t&&t.parent;i&&("group"===t.type&&t.traverse(function(t){Zb(t,e)}),e.removeKey(t.__ecGraphicId),i.remove(t))}function Xb(t){return t=r({},t),f(["id","parentId","$action","hv","bounding"].concat(EA),function(e){delete t[e]}),t}function Ub(t,e){var i;return f(e,function(e){null!=t[e]&&"auto"!==t[e]&&(i=!0)}),i}function Yb(t,e){var i=t.exist;if(e.id=t.keyInfo.id,!e.type&&i&&(e.type=i.type),null==e.parentId){var n=e.parentOption;n?e.parentId=n.id:i&&(e.parentId=i.parentId)}e.parentOption=null}function jb(t,e,i){var n=r({},i),o=t[e],s=i.$action||"merge";"merge"===s?o?(a(o,n,!0),as(o,n,{ignoreSize:!0}),rs(i,o)):t[e]=n:"replace"===s?t[e]=n:"remove"===s&&o&&(t[e]=null)}function qb(t,e){t&&(t.hv=e.hv=[Ub(e,["left","right"]),Ub(e,["top","bottom"])],"group"===t.type&&(null==t.width&&(t.width=e.width=0),null==t.height&&(t.height=e.height=0)))}function Kb(t,e){var i=t.eventData;t.silent||t.ignore||i||(i=t.eventData={componentType:"graphic",componentIndex:e.componentIndex,name:t.name}),i&&(i.info=t.info)}function $b(t){return dG(t)}function Jb(){if(!gG&&mG){gG=!0;var t=mG.styleSheets;t.length<31?mG.createStyleSheet().addRule(".zrvml","behavior:url(#default#VML)"):t[0].addRule(".zrvml","behavior:url(#default#VML)")}}function Qb(t){return parseInt(t,10)}function tS(t,e){Jb(),this.root=t,this.storage=e;var i=document.createElement("div"),n=document.createElement("div");i.style.cssText="display:inline-block;overflow:hidden;position:relative;width:300px;height:150px;",n.style.cssText="position:absolute;left:0;top:0;",t.appendChild(i),this._vmlRoot=n,this._vmlViewport=i,this.resize();var a=e.delFromStorage,o=e.addToStorage;e.delFromStorage=function(t){a.call(e,t),t&&t.onRemove&&t.onRemove(n)},e.addToStorage=function(t){t.onAdd&&t.onAdd(n),o.call(e,t)},this._firstPaint=!0}function eS(t){return function(){fM('In IE8.0 VML mode painter not support method "'+t+'"')}}var iS=2311,nS=function(){return iS++},aS={};aS="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 oS=aS,rS={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1,"[object Canvas]":1},sS={"[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},lS=Object.prototype.toString,uS=Array.prototype,hS=uS.forEach,cS=uS.filter,dS=uS.slice,fS=uS.map,pS=uS.reduce,gS={},mS=function(){return gS.createCanvas()};gS.createCanvas=function(){return document.createElement("canvas")};var vS,yS="__ec_primitive__";E.prototype={constructor:E,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 i in this.data)this.data.hasOwnProperty(i)&&t(this.data[i],i)},removeKey:function(t){delete this.data[t]}};var xS=(Object.freeze||Object)({$override:i,clone:n,merge:a,mergeAll:o,extend:r,defaults:s,createCanvas:mS,getContext:l,indexOf:u,inherits:h,mixin:c,isArrayLike:d,each:f,map:p,reduce:g,filter:m,find:v,bind:y,curry:x,isArray:_,isFunction:w,isString:b,isObject:S,isBuiltInObject:M,isTypedArray:I,isDom:T,eqNaN:A,retrieve:D,retrieve2:C,retrieve3:L,slice:k,normalizeCssArray:P,assert:O,trim:N,setAsPrimitive:z,isPrimitive:R,createHashMap:B,concatArray:V,noop:G}),_S="undefined"==typeof Float32Array?Array:Float32Array,wS=j,bS=q,SS=ee,MS=ie,IS=(Object.freeze||Object)({create:F,copy:W,clone:H,set:Z,add:X,scaleAndAdd:U,sub:Y,len:j,length:wS,lenSquare:q,lengthSquare:bS,mul:K,div:$,dot:J,scale:Q,normalize:te,distance:ee,dist:SS,distanceSquare:ie,distSquare:MS,negate:ne,lerp:ae,applyTransform:oe,min:re,max:se});le.prototype={constructor:le,_dragStart:function(t){for(var e=t.target;e&&!e.draggable;)e=e.parent;e&&(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 i=t.offsetX,n=t.offsetY,a=i-this._x,o=n-this._y;this._x=i,this._y=n,e.drift(a,o,t),this.dispatchToElement(ue(e,t),"drag",t.event);var r=this.findHover(i,n,e).target,s=this._dropTarget;this._dropTarget=r,e!==r&&(s&&r!==s&&this.dispatchToElement(ue(s,t),"dragleave",t.event),r&&r!==s&&this.dispatchToElement(ue(r,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 TS=Array.prototype.slice,AS=function(t){this._$handlers={},this._$eventProcessor=t};AS.prototype={constructor:AS,one:function(t,e,i,n){return ce(this,t,e,i,n,!0)},on:function(t,e,i,n){return ce(this,t,e,i,n,!1)},isSilent:function(t){var e=this._$handlers;return!e[t]||!e[t].length},off:function(t,e){var i=this._$handlers;if(!t)return this._$handlers={},this;if(e){if(i[t]){for(var n=[],a=0,o=i[t].length;o>a;a++)i[t][a].h!==e&&n.push(i[t][a]);i[t]=n}i[t]&&0===i[t].length&&delete i[t]}else delete i[t];return this},trigger:function(t){var e=this._$handlers[t],i=this._$eventProcessor;if(e){var n=arguments,a=n.length;a>3&&(n=TS.call(n,1));for(var o=e.length,r=0;o>r;){var s=e[r];if(i&&i.filter&&null!=s.query&&!i.filter(t,s.query))r++;else{switch(a){case 1:s.h.call(s.ctx);break;case 2:s.h.call(s.ctx,n[1]);break;case 3:s.h.call(s.ctx,n[1],n[2]);break;default:s.h.apply(s.ctx,n)}s.one?(e.splice(r,1),o--):r++}}}return i&&i.afterTrigger&&i.afterTrigger(t),this},triggerWithContext:function(t){var e=this._$handlers[t],i=this._$eventProcessor;if(e){var n=arguments,a=n.length;a>4&&(n=TS.call(n,1,n.length-1));for(var o=n[n.length-1],r=e.length,s=0;r>s;){var l=e[s];if(i&&i.filter&&null!=l.query&&!i.filter(t,l.query))s++;else{switch(a){case 1:l.h.call(o);break;case 2:l.h.call(o,n[1]);break;case 3:l.h.call(o,n[1],n[2]);break;default:l.h.apply(o,n)}l.one?(e.splice(s,1),r--):s++}}}return i&&i.afterTrigger&&i.afterTrigger(t),this}};var DS=Math.log(2),CS="___zrEVENTSAVED",LS=[],kS="undefined"!=typeof window&&!!window.addEventListener,PS=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,OS=[],NS=kS?function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0}:function(t){t.returnValue=!1,t.cancelBubble=!0},zS=function(){this._track=[]};zS.prototype={constructor:zS,recognize:function(t,e,i){return this._doTrack(t,e,i),this._recognize(t)},clear:function(){return this._track.length=0,this},_doTrack:function(t,e,i){var n=t.touches;if(n){for(var a={points:[],touches:[],target:e,event:t},o=0,r=n.length;r>o;o++){var s=n[o],l=xe(i,s,{});a.points.push([l.zrX,l.zrY]),a.touches.push(s)}this._track.push(a)}},_recognize:function(t){for(var e in RS)if(RS.hasOwnProperty(e)){var i=RS[e](this._track,t);if(i)return i}}};var RS={pinch:function(t,e){var i=t.length;if(i){var n=(t[i-1]||{}).points,a=(t[i-2]||{}).points||n;if(a&&a.length>1&&n&&n.length>1){var o=Te(n)/Te(a);!isFinite(o)&&(o=1),e.pinchScale=o;var r=Ae(n);return e.pinchX=r[0],e.pinchY=r[1],{type:"pinch",target:t[0].target,event:e}}}}},ES="silent";Le.prototype.dispose=function(){};var BS=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],VS=function(t,e,i,n){AS.call(this),this.storage=t,this.painter=e,this.painterRoot=n,i=i||new Le,this.proxy=null,this._hovered={},this._lastTouchMoment,this._lastX,this._lastY,this._gestureMgr,le.call(this),this.setHandlerProxy(i)};VS.prototype={constructor:VS,setHandlerProxy:function(t){this.proxy&&this.proxy.dispose(),t&&(f(BS,function(e){t.on&&t.on(e,this[e],this)},this),t.handler=this),this.proxy=t},mousemove:function(t){var e=t.zrX,i=t.zrY,n=Pe(this,e,i),a=this._hovered,o=a.target;o&&!o.__zr&&(a=this.findHover(a.x,a.y),o=a.target);var r=this._hovered=n?{x:e,y:i}:this.findHover(e,i),s=r.target,l=this.proxy;l.setCursor&&l.setCursor(s?s.cursor:"default"),o&&s!==o&&this.dispatchToElement(a,"mouseout",t),this.dispatchToElement(r,"mousemove",t),s&&s!==o&&this.dispatchToElement(r,"mouseover",t)},mouseout:function(t){var e=t.zrEventControl,i=t.zrIsToLocalDOM;"only_globalout"!==e&&this.dispatchToElement(this._hovered,"mouseout",t),"no_globalout"!==e&&!i&&this.trigger("globalout",{type:"globalout",event:t})},resize:function(){this._hovered={}},dispatch:function(t,e){var i=this[t];i&&i.call(this,e)},dispose:function(){this.proxy.dispose(),this.storage=this.proxy=this.painter=null},setCursorStyle:function(t){var e=this.proxy;e.setCursor&&e.setCursor(t)},dispatchToElement:function(t,e,i){t=t||{};var n=t.target;if(!n||!n.silent){for(var a="on"+e,o=De(e,t,i);n&&(n[a]&&(o.cancelBubble=n[a].call(n,o)),n.trigger(e,o),n=n.parent,!o.cancelBubble););o.cancelBubble||(this.trigger(e,o),this.painter&&this.painter.eachOtherLayer(function(t){"function"==typeof t[a]&&t[a].call(t,o),t.trigger&&t.trigger(e,o)}))}},findHover:function(t,e,i){for(var n=this.storage.getDisplayList(),a={x:t,y:e},o=n.length-1;o>=0;o--){var r;if(n[o]!==i&&!n[o].ignore&&(r=ke(n[o],t,e))&&(!a.topTarget&&(a.topTarget=n[o]),r!==ES)){a.target=n[o];break}}return a},processGesture:function(t,e){this._gestureMgr||(this._gestureMgr=new zS);var i=this._gestureMgr;"start"===e&&i.clear();var n=i.recognize(t,this.findHover(t.zrX,t.zrY,null).target,this.proxy.dom);if("end"===e&&i.clear(),n){var a=n.type;t.gestureEvent=a,this.dispatchToElement({target:n.target},a,n.event)}}},f(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(t){VS.prototype[t]=function(e){var i,n,a=e.zrX,o=e.zrY,r=Pe(this,a,o);if("mouseup"===t&&r||(i=this.findHover(a,o),n=i.target),"mousedown"===t)this._downEl=n,this._downPoint=[e.zrX,e.zrY],this._upEl=n;else if("mouseup"===t)this._upEl=n;else if("click"===t){if(this._downEl!==this._upEl||!this._downPoint||SS(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(i,t,e)}}),c(VS,AS),c(VS,le);var GS="undefined"==typeof Float32Array?Array:Float32Array,FS=(Object.freeze||Object)({create:Oe,identity:Ne,copy:ze,mul:Re,translate:Ee,rotate:Be,scale:Ve,invert:Ge,clone:Fe}),WS=Ne,HS=5e-5,ZS=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},XS=ZS.prototype;XS.transform=null,XS.needLocalTransform=function(){return We(this.rotation)||We(this.position[0])||We(this.position[1])||We(this.scale[0]-1)||We(this.scale[1]-1)};var US=[];XS.updateTransform=function(){var t=this.parent,e=t&&t.transform,i=this.needLocalTransform(),n=this.transform;if(!i&&!e)return void(n&&WS(n));n=n||Oe(),i?this.getLocalTransform(n):WS(n),e&&(i?Re(n,t.transform,n):ze(n,t.transform)),this.transform=n;var a=this.globalScaleRatio;if(null!=a&&1!==a){this.getGlobalScale(US);var o=US[0]<0?-1:1,r=US[1]<0?-1:1,s=((US[0]-o)*a+o)/US[0]||0,l=((US[1]-r)*a+r)/US[1]||0;n[0]*=s,n[1]*=s,n[2]*=l,n[3]*=l}this.invTransform=this.invTransform||Oe(),Ge(this.invTransform,n)},XS.getLocalTransform=function(t){return ZS.getLocalTransform(this,t)},XS.setTransform=function(t){var e=this.transform,i=t.dpr||1;e?t.setTransform(i*e[0],i*e[1],i*e[2],i*e[3],i*e[4],i*e[5]):t.setTransform(i,0,0,i,0,0)},XS.restoreTransform=function(t){var e=t.dpr||1;t.setTransform(e,0,0,e,0,0)};var YS=[],jS=Oe();XS.setLocalTransform=function(t){if(t){var e=t[0]*t[0]+t[1]*t[1],i=t[2]*t[2]+t[3]*t[3],n=this.position,a=this.scale;We(e-1)&&(e=Math.sqrt(e)),We(i-1)&&(i=Math.sqrt(i)),t[0]<0&&(e=-e),t[3]<0&&(i=-i),n[0]=t[4],n[1]=t[5],a[0]=e,a[1]=i,this.rotation=Math.atan2(-t[1]/i,t[0]/e)}},XS.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(Re(YS,t.invTransform,e),e=YS);var i=this.origin;i&&(i[0]||i[1])&&(jS[4]=i[0],jS[5]=i[1],Re(YS,e,jS),YS[4]-=i[0],YS[5]-=i[1],e=YS),this.setLocalTransform(e)}},XS.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)},XS.transformCoordToLocal=function(t,e){var i=[t,e],n=this.invTransform;return n&&oe(i,i,n),i},XS.transformCoordToGlobal=function(t,e){var i=[t,e],n=this.transform;return n&&oe(i,i,n),i},ZS.getLocalTransform=function(t,e){e=e||[],WS(e);var i=t.origin,n=t.scale||[1,1],a=t.rotation||0,o=t.position||[0,0];return i&&(e[4]-=i[0],e[5]-=i[1]),Ve(e,e,n),a&&Be(e,e,a),i&&(e[4]+=i[0],e[5]+=i[1]),e[4]+=o[0],e[5]+=o[1],e};var qS={linear:function(t){return t},quadraticIn:function(t){return t*t},quadraticOut:function(t){return t*(2-t)},quadraticInOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},quarticIn:function(t){return t*t*t*t},quarticOut:function(t){return 1- --t*t*t*t},quarticInOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},quinticIn:function(t){return t*t*t*t*t},quinticOut:function(t){return--t*t*t*t*t+1},quinticInOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},sinusoidalIn:function(t){return 1-Math.cos(t*Math.PI/2)},sinusoidalOut:function(t){return Math.sin(t*Math.PI/2)},sinusoidalInOut:function(t){return.5*(1-Math.cos(Math.PI*t))},exponentialIn:function(t){return 0===t?0:Math.pow(1024,t-1)},exponentialOut:function(t){return 1===t?1:1-Math.pow(2,-10*t)},exponentialInOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(-Math.pow(2,-10*(t-1))+2)},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var e,i=.1,n=.4;return 0===t?0:1===t?1:(!i||1>i?(i=1,e=n/4):e=n*Math.asin(1/i)/(2*Math.PI),-(i*Math.pow(2,10*(t-=1))*Math.sin(2*(t-e)*Math.PI/n)))},elasticOut:function(t){var e,i=.1,n=.4;return 0===t?0:1===t?1:(!i||1>i?(i=1,e=n/4):e=n*Math.asin(1/i)/(2*Math.PI),i*Math.pow(2,-10*t)*Math.sin(2*(t-e)*Math.PI/n)+1)},elasticInOut:function(t){var e,i=.1,n=.4;return 0===t?0:1===t?1:(!i||1>i?(i=1,e=n/4):e=n*Math.asin(1/i)/(2*Math.PI),(t*=2)<1?-.5*i*Math.pow(2,10*(t-=1))*Math.sin(2*(t-e)*Math.PI/n):i*Math.pow(2,-10*(t-=1))*Math.sin(2*(t-e)*Math.PI/n)*.5+1)},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},backInOut:function(t){var e=2.5949095;return(t*=2)<1?.5*t*t*((e+1)*t-e):.5*((t-=2)*t*((e+1)*t+e)+2)},bounceIn:function(t){return 1-qS.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*qS.bounceIn(2*t):.5*qS.bounceOut(2*t-1)+.5}};He.prototype={constructor:He,step:function(t,e){if(this._initialized||(this._startTime=t+this._delay,this._initialized=!0),this._paused)return void(this._pausedTime+=e);var i=(t-this._startTime-this._pausedTime)/this._life;if(!(0>i)){i=Math.min(i,1);var n=this.easing,a="string"==typeof n?qS[n]:n,o="function"==typeof a?a(i):i;return this.fire("frame",o),1===i?this.loop?(this.restart(t),"restart"):(this._needsRemove=!0,"destroy"):null}},restart:function(t){var e=(t-this._startTime-this._pausedTime)%this._life;this._startTime=t-e+this.gap,this._pausedTime=0,this._needsRemove=!1},fire:function(t,e){t="on"+t,this[t]&&this[t](this._target,e)},pause:function(){this._paused=!0},resume:function(){this._paused=!1}};var KS=function(){this.head=null,this.tail=null,this._len=0},$S=KS.prototype;$S.insert=function(t){var e=new JS(t);return this.insertEntry(e),e},$S.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++},$S.remove=function(t){var e=t.prev,i=t.next;e?e.next=i:this.head=i,i?i.prev=e:this.tail=e,t.next=t.prev=null,this._len--},$S.len=function(){return this._len},$S.clear=function(){this.head=this.tail=null,this._len=0};var JS=function(t){this.value=t,this.next,this.prev},QS=function(t){this._list=new KS,this._map={},this._maxSize=t||10,this._lastRemovedEntry=null},tM=QS.prototype;tM.put=function(t,e){var i=this._list,n=this._map,a=null;if(null==n[t]){var o=i.len(),r=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var s=i.head;i.remove(s),delete n[s.key],a=s.value,this._lastRemovedEntry=s}r?r.value=e:r=new JS(e),r.key=t,i.insertEntry(r),n[t]=r}return a},tM.get=function(t){var e=this._map[t],i=this._list;return null!=e?(e!==i.tail&&(i.remove(e),i.insertEntry(e)),e.value):void 0},tM.clear=function(){this._list.clear(),this._map={}};var eM={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]},iM=new QS(20),nM=null,aM=oi,oM=ri,rM=(Object.freeze||Object)({parse:ti,lift:ni,toHex:ai,fastLerp:oi,fastMapToColor:aM,lerp:ri,mapToColor:oM,modifyHSL:si,modifyAlpha:li,stringify:ui}),sM=Array.prototype.slice,lM=function(t,e,i,n){this._tracks={},this._target=t,this._loop=e||!1,this._getter=i||hi,this._setter=n||ci,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]};lM.prototype={when:function(t,e){var i=this._tracks;for(var n in e)if(e.hasOwnProperty(n)){if(!i[n]){i[n]=[];var a=this._getter(this._target,n);if(null==a)continue;0!==t&&i[n].push({time:0,value:xi(a)})}i[n].push({time:t,value:e[n]})}return this},during:function(t){return this._onframeList.push(t),this},pause:function(){for(var t=0;ti;i++)t[i].call(this)},start:function(t,e){var i,n=this,a=0,o=function(){a--,a||n._doneCallback()};for(var r in this._tracks)if(this._tracks.hasOwnProperty(r)){var s=bi(this,t,o,this._tracks[r],r,e);s&&(this._clipList.push(s),a++,this.animation&&this.animation.addClip(s),i=s)}if(i){var l=i.onframe;i.onframe=function(t,e){l(t,e);for(var i=0;il;l++)s&&(s=s[r[l]]);s&&(i=s)}else i=a;if(!i)return void fM('Property "'+t+'" is not existed in element '+a.id);var c=a.animators,d=new lM(i,e);return d.during(function(){a.dirty(n)}).done(function(){c.splice(u(c,d),1)}),c.push(d),o&&o.animation.addAnimator(d),d},stopAnimation:function(t){for(var e=this.animators,i=e.length,n=0;i>n;n++)e[n].stop(t);return e.length=0,this},animateTo:function(t,e,i,n,a,o){Si(this,t,e,i,n,a,o)},animateFrom:function(t,e,i,n,a,o){Si(this,t,e,i,n,a,o,!0)}};var gM=function(t){ZS.call(this,t),AS.call(this,t),pM.call(this,t),this.id=t.id||nS()};gM.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 i=this.transform;i||(i=this.transform=[1,0,0,1,0,0]),i[4]+=t,i[5]+=e,this.decomposeTransform(),this.dirty(!1)},beforeUpdate:function(){},afterUpdate:function(){},update:function(){this.updateTransform()},traverse:function(){},attrKV:function(t,e){if("position"===t||"scale"===t||"origin"===t){if(e){var i=this[t];i||(i=this[t]=[]),i[0]=e[0],i[1]=e[1]}}else this[t]=e},hide:function(){this.ignore=!0,this.__zr&&this.__zr.refresh()},show:function(){this.ignore=!1,this.__zr&&this.__zr.refresh()},attr:function(t,e){if("string"==typeof t)this.attrKV(t,e);else if(S(t))for(var i in t)t.hasOwnProperty(i)&&this.attrKV(i,t[i]);return this.dirty(!1),this},setClipPath:function(t){var e=this.__zr;e&&t.addSelfToZr(e),this.clipPath&&this.clipPath!==t&&this.removeClipPath(),this.clipPath=t,t.__zr=e,t.__clipTarget=this,this.dirty(!1)},removeClipPath:function(){var t=this.clipPath;t&&(t.__zr&&t.removeSelfFromZr(t.__zr),t.__zr=null,t.__clipTarget=null,this.clipPath=null,this.dirty(!1))},addSelfToZr:function(t){this.__zr=t;var e=this.animators;if(e)for(var i=0;in||i>s||l>o||a>u)},contain:function(t,e){var i=this;return t>=i.x&&t<=i.x+i.width&&e>=i.y&&e<=i.y+i.height},clone:function(){return new Ti(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}}},Ti.create=function(t){return new Ti(t.x,t.y,t.width,t.height)};var xM=function(t){t=t||{},gM.call(this,t);for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);this._children=[],this.__storage=null,this.__dirty=!0};xM.prototype={constructor:xM,isGroup:!0,type:"group",silent:!1,children:function(){return this._children.slice()},childAt:function(t){return this._children[t]},childOfName:function(t){for(var e=this._children,i=0;i=0&&(i.splice(n,0,t),this._doAdd(t))}return this},_doAdd:function(t){t.parent&&t.parent.remove(t),t.parent=this;var e=this.__storage,i=this.__zr;e&&e!==t.__storage&&(e.addToStorage(t),t instanceof xM&&t.addChildrenToStorage(e)),i&&i.refresh()},remove:function(t){var e=this.__zr,i=this.__storage,n=this._children,a=u(n,t);return 0>a?this:(n.splice(a,1),t.parent=null,i&&(i.delFromStorage(t),t instanceof xM&&t.delChildrenFromStorage(i)),e&&e.refresh(),this)},removeAll:function(){var t,e,i=this._children,n=this.__storage;for(e=0;en;n++)this._updateAndAddDisplayable(e[n],null,t);i.length=this._displayListLen,oS.canvasSupported&&Ni(i,zi)},_updateAndAddDisplayable:function(t,e,i){if(!t.ignore||i){t.beforeUpdate(),t.__dirty&&t.update(),t.afterUpdate();var n=t.clipPath;if(n){e=e?e.slice():[];for(var a=n,o=t;a;)a.parent=o,a.updateTransform(),e.push(a),o=a,a=a.clipPath}if(t.isGroup){for(var r=t._children,s=0;se;e++)this.delRoot(t[e]);else{var a=u(this._roots,t);a>=0&&(this.delFromStorage(t),this._roots.splice(a,1),t instanceof xM&&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:zi};var SM={shadowBlur:1,shadowOffsetX:1,shadowOffsetY:1,textShadowBlur:1,textShadowOffsetX:1,textShadowOffsetY:1,textBoxShadowBlur:1,textBoxShadowOffsetX:1,textBoxShadowOffsetY:1},MM=function(t,e,i){return SM.hasOwnProperty(e)?i*=t.dpr:i},IM={NONE:0,STYLE_BIND:1,PLAIN_TEXT:2},TM=9,AM=[["shadowBlur",0],["shadowOffsetX",0],["shadowOffsetY",0],["shadowColor","#000"],["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]],DM=function(t){this.extendFrom(t,!1)};DM.prototype={constructor:DM,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,i){var n=this,a=i&&i.style,o=!a||t.__attrCachedBy!==IM.STYLE_BIND;t.__attrCachedBy=IM.STYLE_BIND;for(var r=0;r0},extendFrom:function(t,e){if(t)for(var i in t)!t.hasOwnProperty(i)||e!==!0&&(e===!1?this.hasOwnProperty(i):null==t[i])||(this[i]=t[i])},set:function(t,e){"string"==typeof t?this[t]=e:this.extendFrom(t,!0)},clone:function(){var t=new this.constructor;return t.extendFrom(this,!0),t},getGradient:function(t,e,i){for(var n="radial"===e.type?Ei:Ri,a=n(t,e,i),o=e.colorStops,r=0;r=0&&i.splice(n,1),t.__hoverMir=null},clearHover:function(){for(var t=this._hoverElements,e=0;ea;){var o=t[a],r=o.__from;r&&r.__zr?(a++,r.invisible||(o.transform=r.transform,o.invTransform=r.invTransform,o.__clipPaths=r.__clipPaths,this._doPaintEl(o,i,!0,n))):(t.splice(a,1),r.__hoverMir=null,e--)}i.ctx.restore()}},getHoverLayer:function(){return this.getLayer(KM)},_paintList:function(t,e,i){if(this._redrawId===i){e=e||!1,this._updateLayerStatus(t);var n=this._doPaintList(t,e);if(this._needsManuallyCompositing&&this._compositeManually(),!n){var a=this;NM(function(){a._paintList(t,e,i)})}}},_compositeManually:function(){var t=this.getLayer($M).ctx,e=this._domRoot.width,i=this._domRoot.height;t.clearRect(0,0,e,i),this.eachBuiltinLayer(function(n){n.virtual&&t.drawImage(n.dom,0,0,e,i)})},_doPaintList:function(t,e){for(var i=[],n=0;n15)break}}o.__drawIndex=m,o.__drawIndex0&&t>n[0]){for(r=0;a-1>r&&!(n[r]t);r++);o=i[n[r]]}if(n.splice(r+1,0,t),i[t]=e,!e.virtual)if(o){var l=o.dom;l.nextSibling?s.insertBefore(e.dom,l.nextSibling):s.appendChild(e.dom)}else s.firstChild?s.insertBefore(e.dom,s.firstChild):s.appendChild(e.dom)},eachLayer:function(t,e){var i,n,a=this._zlevelList;for(n=0;n0?JM:0),this._needsManuallyCompositing),s.__builtin__||fM("ZLevel "+l+" has been used by unkown layer "+s.id),s!==o&&(s.__used=!0,s.__startIndex!==i&&(s.__dirty=!0),s.__startIndex=i,s.__drawIndex=s.incremental?-1:i,e(i),o=s),n.__dirty&&(s.__dirty=!0,s.incremental&&s.__drawIndex<0&&(s.__drawIndex=i))}e(i),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 i=this._layerConfig;i[t]?a(i[t],e,!0):i[t]=e;for(var n=0;n=0&&this._clips.splice(e,1)},removeAnimator:function(t){for(var e=t.getClips(),i=0;ir;r++){var s=i[r],l=s.step(t,e);l&&(a.push(l),o.push(s))}for(var r=0;n>r;)i[r]._needsRemove?(i[r]=i[n-1],i.pop(),n--):r++;n=a.length;for(var r=0;n>r;r++)o[r].fire(a[r]);this._time=t,this.onframe(e),this.trigger("frame",e),this.stage.update&&this.stage.update()},_startLoop:function(){function t(){e._running&&(NM(t),!e._paused&&e._update())}var e=this;this._running=!0,NM(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 i=new lM(t,e.loop,e.getter,e.setter);return this.addAnimator(i),i}},c(nI,AS);var aI=300,oI=oS.domSupported,rI=function(){var t=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],e=["touchstart","touchend","touchmove"],i={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},n=p(t,function(t){var e=t.replace("mouse","pointer");return i.hasOwnProperty(e)?e:t});return{mouse:t,touch:e,pointer:n}}(),sI={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},lI=Wn.prototype;lI.stopPropagation=lI.stopImmediatePropagation=lI.preventDefault=G;var uI={mousedown:function(t){t=be(this.dom,t),this._mayPointerCapture=[t.zrX,t.zrY],this.trigger("mousedown",t)},mousemove:function(t){t=be(this.dom,t);var e=this._mayPointerCapture;!e||t.zrX===e[0]&&t.zrY===e[1]||Yn(this,!0),this.trigger("mousemove",t)},mouseup:function(t){t=be(this.dom,t),Yn(this,!1),this.trigger("mouseup",t)},mouseout:function(t){t=be(this.dom,t),this._pointerCapturing&&(t.zrEventControl="no_globalout");var e=t.toElement||t.relatedTarget;t.zrIsToLocalDOM=Fn(this,e),this.trigger("mouseout",t)},touchstart:function(t){t=be(this.dom,t),Vn(t),this._lastTouchMoment=new Date,this.handler.processGesture(t,"start"),uI.mousemove.call(this,t),uI.mousedown.call(this,t)},touchmove:function(t){t=be(this.dom,t),Vn(t),this.handler.processGesture(t,"change"),uI.mousemove.call(this,t)},touchend:function(t){t=be(this.dom,t),Vn(t),this.handler.processGesture(t,"end"),uI.mouseup.call(this,t),+new Date-this._lastTouchMoment=0||n&&u(n,r)<0)){var s=e.getShallow(r);null!=s&&(a[t[o][0]]=s)}}return a}},DI=AI([["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),CI={getLineStyle:function(t){var e=DI(this,t);return e.lineDash=this.getLineDash(e.lineWidth),e},getLineDash:function(t){null==t&&(t=1);var e=this.get("type"),i=Math.max(t,2),n=4*t;return"solid"===e||null==e?!1:"dashed"===e?[n,n]:[i,i]}},LI=AI([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),kI={getAreaStyle:function(t,e){return LI(this,t,e)}},PI=Math.pow,OI=Math.sqrt,NI=1e-8,zI=1e-4,RI=OI(3),EI=1/3,BI=F(),VI=F(),GI=F(),FI=Math.min,WI=Math.max,HI=Math.sin,ZI=Math.cos,XI=2*Math.PI,UI=F(),YI=F(),jI=F(),qI=[],KI=[],$I={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},JI=[],QI=[],tT=[],eT=[],iT=Math.min,nT=Math.max,aT=Math.cos,oT=Math.sin,rT=Math.sqrt,sT=Math.abs,lT="undefined"!=typeof Float32Array,uT=function(t){this._saveData=!t,this._saveData&&(this.data=[]),this._ctx=null};uT.prototype={constructor:uT,_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,i){i=i||0,this._ux=sT(i/cM/t)||0,this._uy=sT(i/cM/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($I.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},lineTo:function(t,e){var i=sT(t-this._xi)>this._ux||sT(e-this._yi)>this._uy||this._len<5;return this.addData($I.L,t,e),this._ctx&&i&&(this._needsDash()?this._dashedLineTo(t,e):this._ctx.lineTo(t,e)),i&&(this._xi=t,this._yi=e),this},bezierCurveTo:function(t,e,i,n,a,o){return this.addData($I.C,t,e,i,n,a,o),this._ctx&&(this._needsDash()?this._dashedBezierTo(t,e,i,n,a,o):this._ctx.bezierCurveTo(t,e,i,n,a,o)),this._xi=a,this._yi=o,this},quadraticCurveTo:function(t,e,i,n){return this.addData($I.Q,t,e,i,n),this._ctx&&(this._needsDash()?this._dashedQuadraticTo(t,e,i,n):this._ctx.quadraticCurveTo(t,e,i,n)),this._xi=i,this._yi=n,this},arc:function(t,e,i,n,a,o){return this.addData($I.A,t,e,i,i,n,a-n,0,o?0:1),this._ctx&&this._ctx.arc(t,e,i,n,a,o),this._xi=aT(a)*i+t,this._yi=oT(a)*i+e,this},arcTo:function(t,e,i,n,a){return this._ctx&&this._ctx.arcTo(t,e,i,n,a),this},rect:function(t,e,i,n){return this._ctx&&this._ctx.rect(t,e,i,n),this.addData($I.R,t,e,i,n),this},closePath:function(){this.addData($I.Z);var t=this._ctx,e=this._x0,i=this._y0;return t&&(this._needsDash()&&this._dashedLineTo(e,i),t.closePath()),this._xi=e,this._yi=i,this},fill:function(t){t&&t.fill(),this.toStatic()},stroke:function(t){t&&t.stroke(),this.toStatic()},setLineDash:function(t){if(t instanceof Array){this._lineDash=t,this._dashIdx=0;for(var e=0,i=0;ii;i++)this.data[i]=t[i];this._len=e},appendPath:function(t){t instanceof Array||(t=[t]);for(var e=t.length,i=0,n=this._len,a=0;e>a;a++)i+=t[a].len();lT&&this.data instanceof Float32Array&&(this.data=new Float32Array(n+i));for(var a=0;e>a;a++)for(var o=t[a].data,r=0;re.length&&(this._expandData(),e=this.data);for(var i=0;io&&(o=a+o),o%=a,f-=o*h,p-=o*c;h>0&&t>=f||0>h&&f>=t||0===h&&(c>0&&e>=p||0>c&&p>=e);)n=this._dashIdx,i=r[n],f+=h*i,p+=c*i,this._dashIdx=(n+1)%g,h>0&&l>f||0>h&&f>l||c>0&&u>p||0>c&&p>u||s[n%2?"moveTo":"lineTo"](h>=0?iT(f,t):nT(f,t),c>=0?iT(p,e):nT(p,e));h=f-t,c=p-e,this._dashOffset=-rT(h*h+c*c)},_dashedBezierTo:function(t,e,i,n,a,o){var r,s,l,u,h,c=this._dashSum,d=this._dashOffset,f=this._lineDash,p=this._ctx,g=this._xi,m=this._yi,v=Aa,y=0,x=this._dashIdx,_=f.length,w=0;for(0>d&&(d=c+d),d%=c,r=0;1>r;r+=.1)s=v(g,t,i,a,r+.1)-v(g,t,i,a,r),l=v(m,e,n,o,r+.1)-v(m,e,n,o,r),y+=rT(s*s+l*l);for(;_>x&&(w+=f[x],!(w>d));x++);for(r=(w-d)/y;1>=r;)u=v(g,t,i,a,r),h=v(m,e,n,o,r),x%2?p.moveTo(u,h):p.lineTo(u,h),r+=f[x]/y,x=(x+1)%_;x%2!==0&&p.lineTo(a,o),s=a-u,l=o-h,this._dashOffset=-rT(s*s+l*l)},_dashedQuadraticTo:function(t,e,i,n){var a=i,o=n;i=(i+2*t)/3,n=(n+2*e)/3,t=(this._xi+2*t)/3,e=(this._yi+2*e)/3,this._dashedBezierTo(t,e,i,n,a,o)},toStatic:function(){var t=this.data;t instanceof Array&&(t.length=this._len,lT&&(this.data=new Float32Array(t)))},getBoundingRect:function(){JI[0]=JI[1]=tT[0]=tT[1]=Number.MAX_VALUE,QI[0]=QI[1]=eT[0]=eT[1]=-Number.MAX_VALUE;for(var t=this.data,e=0,i=0,n=0,a=0,o=0;oc;){var d=s[c++];switch(1===c&&(n=s[c],a=s[c+1],e=n,i=a),d){case $I.M:e=n=s[c++],i=a=s[c++],t.moveTo(n,a);break;case $I.L:o=s[c++],r=s[c++],(sT(o-n)>l||sT(r-a)>u||c===h-1)&&(t.lineTo(o,r),n=o,a=r);break;case $I.C:t.bezierCurveTo(s[c++],s[c++],s[c++],s[c++],s[c++],s[c++]),n=s[c-2],a=s[c-1];break;case $I.Q:t.quadraticCurveTo(s[c++],s[c++],s[c++],s[c++]),n=s[c-2],a=s[c-1];break;case $I.A:var f=s[c++],p=s[c++],g=s[c++],m=s[c++],v=s[c++],y=s[c++],x=s[c++],_=s[c++],w=g>m?g:m,b=g>m?1:g/m,S=g>m?m/g:1,M=Math.abs(g-m)>.001,I=v+y;M?(t.translate(f,p),t.rotate(x),t.scale(b,S),t.arc(0,0,w,v,I,1-_),t.scale(1/b,1/S),t.rotate(-x),t.translate(-f,-p)):t.arc(f,p,w,v,I,1-_),1===c&&(e=aT(v)*g+f,i=oT(v)*m+p),n=aT(I)*g+f,a=oT(I)*m+p;break;case $I.R:e=n=s[c],i=a=s[c+1],t.rect(s[c++],s[c++],s[c++],s[c++]);break;case $I.Z:t.closePath(),n=e,a=i}}}},uT.CMD=$I;var hT=2*Math.PI,cT=2*Math.PI,dT=uT.CMD,fT=2*Math.PI,pT=1e-4,gT=[-1,-1,-1],mT=[-1,-1],vT=PM.prototype.getCanvasPattern,yT=Math.abs,xT=new uT(!0);ao.prototype={constructor:ao,type:"path",__dirtyPath:!0,strokeContainThreshold:5,segmentIgnoreThreshold:0,subPixelOptimize:!1,brush:function(t,e){var i=this.style,n=this.path||xT,a=i.hasStroke(),o=i.hasFill(),r=i.fill,s=i.stroke,l=o&&!!r.colorStops,u=a&&!!s.colorStops,h=o&&!!r.image,c=a&&!!s.image;if(i.bind(t,this,e),this.setTransform(t),this.__dirty){var d;l&&(d=d||this.getBoundingRect(),this._fillGradient=i.getGradient(t,r,d)),u&&(d=d||this.getBoundingRect(),this._strokeGradient=i.getGradient(t,s,d))}l?t.fillStyle=this._fillGradient:h&&(t.fillStyle=vT.call(r,t)),u?t.strokeStyle=this._strokeGradient:c&&(t.strokeStyle=vT.call(s,t));var f=i.lineDash,p=i.lineDashOffset,g=!!t.setLineDash,m=this.getGlobalScale();if(n.setScale(m[0],m[1],this.segmentIgnoreThreshold),this.__dirtyPath||f&&!g&&a?(n.beginPath(t),f&&!g&&(n.setLineDash(f),n.setLineDashOffset(p)),this.buildPath(n,this.shape,!1),this.path&&(this.__dirtyPath=!1)):(t.beginPath(),this.path.rebuildPath(t)),o)if(null!=i.fillOpacity){var v=t.globalAlpha;t.globalAlpha=i.fillOpacity*i.opacity,n.fill(t),t.globalAlpha=v}else n.fill(t);if(f&&g&&(t.setLineDash(f),t.lineDashOffset=p),a)if(null!=i.strokeOpacity){var v=t.globalAlpha;t.globalAlpha=i.strokeOpacity*i.opacity,n.stroke(t),t.globalAlpha=v}else n.stroke(t);f&&g&&t.setLineDash([]),null!=i.text&&(this.restoreTransform(t),this.drawRectText(t,this.getBoundingRect()))},buildPath:function(){},createPathProxy:function(){this.path=new uT},getBoundingRect:function(){var t=this._rect,e=this.style,i=!t;if(i){var n=this.path;n||(n=this.path=new uT),this.__dirtyPath&&(n.beginPath(),this.buildPath(n,this.shape,!1)),t=n.getBoundingRect()}if(this._rect=t,e.hasStroke()){var a=this._rectWithStroke||(this._rectWithStroke=t.clone());if(this.__dirty||i){a.copy(t);var o=e.lineWidth,r=e.strokeNoScale?this.getLineScale():1;e.hasFill()||(o=Math.max(o,this.strokeContainThreshold||4)),r>1e-10&&(a.width+=o/r,a.height+=o/r,a.x-=o/r/2,a.y-=o/r/2)}return a}return t},contain:function(t,e){var i=this.transformCoordToLocal(t,e),n=this.getBoundingRect(),a=this.style;if(t=i[0],e=i[1],n.contain(t,e)){var o=this.path.data;if(a.hasStroke()){var r=a.lineWidth,s=a.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(a.hasFill()||(r=Math.max(r,this.strokeContainThreshold)),no(o,r/s,t,e)))return!0}if(a.hasFill())return io(o,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):Dn.prototype.attrKV.call(this,t,e)},setShape:function(t,e){var i=this.shape;if(i){if(S(t))for(var n in t)t.hasOwnProperty(n)&&(i[n]=t[n]);else i[t]=e;this.dirty(!0)}return this},getLineScale:function(){var t=this.transform;return t&&yT(t[0]-1)>1e-10&&yT(t[3]-1)>1e-10?Math.sqrt(yT(t[0]*t[3]-t[2]*t[1])):1}},ao.extend=function(t){var e=function(e){ao.call(this,e),t.style&&this.style.extendFrom(t.style,!1);var i=t.shape;if(i){this.shape=this.shape||{};var n=this.shape;for(var a in i)!n.hasOwnProperty(a)&&i.hasOwnProperty(a)&&(n[a]=i[a])}t.init&&t.init.call(this,e)};h(e,ao);for(var i in t)"style"!==i&&"shape"!==i&&(e.prototype[i]=t[i]);return e},h(ao,Dn);var _T=uT.CMD,wT=[[],[],[]],bT=Math.sqrt,ST=Math.atan2,MT=function(t,e){var i,n,a,o,r,s,l=t.data,u=_T.M,h=_T.C,c=_T.L,d=_T.R,f=_T.A,p=_T.Q;for(a=0,o=0;ar;r++){var s=wT[r];s[0]=l[a++],s[1]=l[a++],oe(s,s,e),l[o++]=s[0],l[o++]=s[1]}}},IT=Math.sqrt,TT=Math.sin,AT=Math.cos,DT=Math.PI,CT=function(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])},LT=function(t,e){return(t[0]*e[0]+t[1]*e[1])/(CT(t)*CT(e))},kT=function(t,e){return(t[0]*e[1]=11?function(){var e,i=this.__clipPaths,n=this.style;if(i)for(var a=0;ao;o++)a+=ee(t[o-1],t[o]);var r=a/2;r=i>r?i:r;for(var o=0;r>o;o++){var s,l,u,h=o/(r-1)*(e?i:i-1),c=Math.floor(h),d=h-c,f=t[c%i];e?(s=t[(c-1+i)%i],l=t[(c+1)%i],u=t[(c+2)%i]):(s=t[0===c?c:c-1],l=t[c>i-2?i-1:c+1],u=t[c>i-3?i-1:c+2]);var p=d*d,g=d*p;n.push([co(s[0],f[0],l[0],u[0],d,p,g),co(s[1],f[1],l[1],u[1],d,p,g)])}return n},FT=function(t,e,i,n){var a,o,r,s,l=[],u=[],h=[],c=[];if(n){r=[1/0,1/0],s=[-1/0,-1/0];for(var d=0,f=t.length;f>d;d++)re(r,r,t[d]),se(s,s,t[d]);re(r,r,n[0]),se(s,s,n[1])}for(var d=0,f=t.length;f>d;d++){var p=t[d];if(i)a=t[d?d-1:f-1],o=t[(d+1)%f];else{if(0===d||d===f-1){l.push(H(t[d]));continue}a=t[d-1],o=t[d+1]}Y(u,o,a),Q(u,u,e);var g=ee(p,a),m=ee(p,o),v=g+m;0!==v&&(g/=v,m/=v),Q(h,u,-g),Q(c,u,m);var y=X([],p,h),x=X([],p,c);n&&(se(y,y,r),re(y,y,s),se(x,x,r),re(x,x,s)),l.push(y),l.push(x)}return i&&l.push(l.shift()),l},WT=ao.extend({type:"polygon",shape:{points:null,smooth:!1,smoothConstraint:null},buildPath:function(t,e){fo(t,e,!0) +}}),HT=ao.extend({type:"polyline",shape:{points:null,smooth:!1,smoothConstraint:null},style:{stroke:"#000",fill:null},buildPath:function(t,e){fo(t,e,!1)}}),ZT=Math.round,XT={},UT=ao.extend({type:"rect",shape:{r:0,x:0,y:0,width:0,height:0},buildPath:function(t,e){var i,n,a,o;this.subPixelOptimize?(go(XT,e,this.style),i=XT.x,n=XT.y,a=XT.width,o=XT.height,XT.r=e.r,e=XT):(i=e.x,n=e.y,a=e.width,o=e.height),e.r?un(t,e):t.rect(i,n,a,o),t.closePath()}}),YT={},jT=ao.extend({type:"line",shape:{x1:0,y1:0,x2:0,y2:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(t,e){var i,n,a,o;this.subPixelOptimize?(po(YT,e,this.style),i=YT.x1,n=YT.y1,a=YT.x2,o=YT.y2):(i=e.x1,n=e.y1,a=e.x2,o=e.y2);var r=e.percent;0!==r&&(t.moveTo(i,n),1>r&&(a=i*(1-r)+a*r,o=n*(1-r)+o*r),t.lineTo(a,o))},pointAt:function(t){var e=this.shape;return[e.x1*(1-t)+e.x2*t,e.y1*(1-t)+e.y2*t]}}),qT=[],KT=ao.extend({type:"bezier-curve",shape:{x1:0,y1:0,x2:0,y2:0,cpx1:0,cpy1:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(t,e){var i=e.x1,n=e.y1,a=e.x2,o=e.y2,r=e.cpx1,s=e.cpy1,l=e.cpx2,u=e.cpy2,h=e.percent;0!==h&&(t.moveTo(i,n),null==l||null==u?(1>h&&(Ea(i,r,a,h,qT),r=qT[1],a=qT[2],Ea(n,s,o,h,qT),s=qT[1],o=qT[2]),t.quadraticCurveTo(r,s,a,o)):(1>h&&(ka(i,r,l,a,h,qT),r=qT[1],l=qT[2],a=qT[3],ka(n,s,u,o,h,qT),s=qT[1],u=qT[2],o=qT[3]),t.bezierCurveTo(r,s,l,u,a,o)))},pointAt:function(t){return vo(this.shape,t,!1)},tangentAt:function(t){var e=vo(this.shape,t,!0);return te(e,e)}}),$T=ao.extend({type:"arc",shape:{cx:0,cy:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},style:{stroke:"#000",fill:null},buildPath:function(t,e){var i=e.cx,n=e.cy,a=Math.max(e.r,0),o=e.startAngle,r=e.endAngle,s=e.clockwise,l=Math.cos(o),u=Math.sin(o);t.moveTo(l*a+i,u*a+n),t.arc(i,n,a,o,r,!s)}}),JT=ao.extend({type:"compound",shape:{paths:null},_updatePathDirty:function(){for(var t=this.__dirtyPath,e=this.shape.paths,i=0;i"'])/g,kA={"&":"&","<":"<",">":">",'"':""","'":"'"},PA=["a","b","c","d","e","f","g"],OA=function(t,e){return"{"+t+(null==e?"":e)+"}"},NA=Ji,zA=(Object.freeze||Object)({addCommas:Fr,toCamelCase:Wr,normalizeCssArray:CA,encodeHTML:Hr,formatTpl:Zr,formatTplSimple:Xr,getTooltipMarker:Ur,formatTime:jr,capitalFirst:qr,truncateText:NA,getTextBoundingRect:Kr,getTextRect:$r,windowOpen:Jr}),RA=f,EA=["left","right","top","bottom","width","height"],BA=[["width","left","right"],["height","top","bottom"]],VA=Qr,GA=(x(Qr,"vertical"),x(Qr,"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")}}}),FA=ca(),WA=vr.extend({type:"component",id:"",name:"",mainType:"",subType:"",componentIndex:0,defaultOption:null,ecModel:null,dependentModels:[],uid:null,layoutMode:null,$constructor:function(t,e,i,n){vr.call(this,t,e,i,n),this.uid=_r("ec_cpt_model")},init:function(t,e,i){this.mergeDefaultAndTheme(t,i)},mergeDefaultAndTheme:function(t,e){var i=this.layoutMode,n=i?os(t):{},o=e.getTheme();a(t,o.get(this.mainType)),a(t,this.getDefaultOption()),i&&as(t,n,i)},mergeOption:function(t){a(this.option,t,!0);var e=this.layoutMode;e&&as(this.option,t,e)},optionUpdated:function(){},getDefaultOption:function(){var t=FA(this);if(!t.defaultOption){for(var e=[],i=this.constructor;i;){var n=i.prototype.defaultOption;n&&e.push(n),i=i.superClass}for(var o={},r=e.length-1;r>=0;r--)o=a(o,e[r],!0);t.defaultOption=o}return t.defaultOption},getReferringComponents:function(t){return this.ecModel.queryComponents({mainType:t,index:this.get(t+"Index",!0),id:this.get(t+"Id",!0)})}});Ma(WA,{registerWhenExtend:!0}),wr(WA),br(WA,ss),c(WA,GA);var HA="";"undefined"!=typeof navigator&&(HA=navigator.platform||"");var ZA={color:["#c23531","#2f4554","#61a0a8","#d48265","#91c7ae","#749f83","#ca8622","#bda29a","#6e7074","#546570","#c4ccd3"],gradientColor:["#f6efa6","#d88273","#bf444c"],textStyle:{fontFamily:HA.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},XA=ca(),UA={clearColorPalette:function(){XA(this).colorIdx=0,XA(this).colorNameMap={}},getColorFromPalette:function(t,e,i){e=e||this;var n=XA(e),a=n.colorIdx||0,o=n.colorNameMap=n.colorNameMap||{};if(o.hasOwnProperty(t))return o[t];var r=ea(this.get("color",!0)),s=this.get("colorLayer",!0),l=null!=i&&s?ls(s,i):r;if(l=l||r,l&&l.length){var u=l[a];return t&&(o[t]=u),n.colorIdx=(a+1)%l.length,u}}},YA="original",jA="arrayRows",qA="objectRows",KA="keyedColumns",$A="unknown",JA="typedArray",QA="column",tD="row";us.seriesDataToSource=function(t){return new us({data:t,sourceFormat:I(t)?JA:YA,fromDataset:!1})},wa(us);var eD={Must:1,Might:2,Not:3},iD=ca(),nD="\x00_ec_inner",aD=vr.extend({init:function(t,e,i,n){i=i||{},this.option=null,this._theme=new vr(i),this._optionManager=n},setOption:function(t,e){O(!(nD in t),"please use chart.getOption()"),this._optionManager.setOption(t,e),this.resetOption(null)},resetOption:function(t){var e=!1,i=this._optionManager;if(!t||"recreate"===t){var n=i.mountOption("recreate"===t);this.option&&"recreate"!==t?(this.restoreData(),this.mergeOption(n)):Is.call(this,n),e=!0}if(("timeline"===t||"media"===t)&&this.restoreData(),!t||"recreate"===t||"timeline"===t){var a=i.getTimelineOption(this);a&&(this.mergeOption(a),e=!0)}if(!t||"recreate"===t||"media"===t){var o=i.getMediaOption(this,this._api);o.length&&f(o,function(t){this.mergeOption(t,e=!0)},this)}return e},mergeOption:function(t){function e(e,n){var a=ea(t[e]),s=oa(o.get(e),a);ra(s),f(s,function(t){var i=t.option;S(i)&&(t.keyInfo.mainType=e,t.keyInfo.subType=As(e,i,t.exist))});var l=Ts(o,n);i[e]=[],o.set(e,[]),f(s,function(t,n){var a=t.exist,s=t.option;if(O(S(s)||a,"Empty component definition"),s){var u=WA.getClass(e,t.keyInfo.subType,!0);if(a&&a.constructor===u)a.name=t.keyInfo.name,a.mergeOption(s,this),a.optionUpdated(s,!1);else{var h=r({dependentModels:l,componentIndex:n},t.keyInfo);a=new u(s,this,this,h),r(a,h),a.init(s,this,this,h),a.optionUpdated(null,!0)}}else a.mergeOption({},this),a.optionUpdated({},!1);o.get(e)[n]=a,i[e][n]=a.option},this),"series"===e&&Ds(this,o.get("series"))}var i=this.option,o=this._componentsMap,s=[];ds(this),f(t,function(t,e){null!=t&&(WA.hasClass(e)?e&&s.push(e):i[e]=null==i[e]?n(t):a(i[e],t,!0))}),WA.topologicalTravel(s,WA.getAllClassMainTypes(),e,this),this._seriesIndicesMap=B(this._seriesIndices=this._seriesIndices||[])},getOption:function(){var t=n(this.option);return f(t,function(e,i){if(WA.hasClass(i)){for(var e=ea(e),n=e.length-1;n>=0;n--)la(e[n])&&e.splice(n,1);t[i]=e}}),delete t[nD],t},getTheme:function(){return this._theme},getComponent:function(t,e){var i=this._componentsMap.get(t);return i?i[e||0]:void 0},queryComponents:function(t){var e=t.mainType;if(!e)return[];var i=t.index,n=t.id,a=t.name,o=this._componentsMap.get(e);if(!o||!o.length)return[];var r;if(null!=i)_(i)||(i=[i]),r=m(p(i,function(t){return o[t]}),function(t){return!!t});else if(null!=n){var s=_(n);r=m(o,function(t){return s&&u(n,t.id)>=0||!s&&t.id===n})}else if(null!=a){var l=_(a);r=m(o,function(t){return l&&u(a,t.name)>=0||!l&&t.name===a})}else r=o.slice();return Cs(r,t)},findComponents:function(t){function e(t){var e=a+"Index",i=a+"Id",n=a+"Name";return!t||null==t[e]&&null==t[i]&&null==t[n]?null:{mainType:a,index:t[e],id:t[i],name:t[n]}}function i(e){return t.filter?m(e,t.filter):e}var n=t.query,a=t.mainType,o=e(n),r=o?this.queryComponents(o):this._componentsMap.get(a);return i(Cs(r,t))},eachComponent:function(t,e,i){var n=this._componentsMap;if("function"==typeof t)i=e,e=t,n.each(function(t,n){f(t,function(t,a){e.call(i,n,t,a)})});else if(b(t))f(n.get(t),e,i);else if(S(t)){var a=this.findComponents(t);f(a,e,i)}},getSeriesByName:function(t){var e=this._componentsMap.get("series");return m(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 m(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(i){var n=this._componentsMap.get("series")[i];t.call(e,n,i)},this)},eachRawSeries:function(t,e){f(this._componentsMap.get("series"),t,e)},eachSeriesByType:function(t,e,i){f(this._seriesIndices,function(n){var a=this._componentsMap.get("series")[n];a.subType===t&&e.call(i,a,n)},this)},eachRawSeriesByType:function(t,e,i){return f(this.getSeriesByType(t),e,i)},isSeriesFiltered:function(t){return null==this._seriesIndicesMap.get(t.componentIndex)},getCurrentSeriesIndices:function(){return(this._seriesIndices||[]).slice()},filterSeries:function(t,e){var i=m(this._componentsMap.get("series"),t,e);Ds(this,i)},restoreData:function(t){var e=this._componentsMap;Ds(this,e.get("series"));var i=[];e.each(function(t,e){i.push(e)}),WA.topologicalTravel(i,WA.getAllClassMainTypes(),function(i){f(e.get(i),function(e){("series"!==i||!Ss(e,t))&&e.restoreData()})})}});c(aD,UA);var oD=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isDisposed","on","off","getDataURL","getConnectedDataURL","getModel","getOption","getViewOfComponentModel","getViewOfSeriesModel"],rD={};ks.prototype={constructor:ks,create:function(t,e){var i=[];f(rD,function(n){var a=n.create(t,e);i=i.concat(a||[])}),this._coordinateSystems=i},update:function(t,e){f(this._coordinateSystems,function(i){i.update&&i.update(t,e)})},getCoordinateSystems:function(){return this._coordinateSystems.slice()}},ks.register=function(t,e){rD[t]=e},ks.get=function(t){return rD[t]};var sD=f,lD=n,uD=p,hD=a,cD=/^(min|max)?(.+)$/;Ps.prototype={constructor:Ps,setOption:function(t,e){t&&f(ea(t.series),function(t){t&&t.data&&I(t.data)&&z(t.data)}),t=lD(t);var i=this._optionBackup,n=Os.call(this,t,e,!i);this._newBaseOption=n.baseOption,i?(Es(i.baseOption,n.baseOption),n.timelineOptions.length&&(i.timelineOptions=n.timelineOptions),n.mediaList.length&&(i.mediaList=n.mediaList),n.mediaDefault&&(i.mediaDefault=n.mediaDefault)):this._optionBackup=n},mountOption:function(t){var e=this._optionBackup;return this._timelineOptions=uD(e.timelineOptions,lD),this._mediaList=uD(e.mediaList,lD),this._mediaDefault=lD(e.mediaDefault),this._currentMediaIndices=[],lD(t?e.baseOption:this._newBaseOption)},getTimelineOption:function(t){var e,i=this._timelineOptions;if(i.length){var n=t.getComponent("timeline");n&&(e=lD(i[n.getCurrentIndex()],!0))}return e},getMediaOption:function(){var t=this._api.getWidth(),e=this._api.getHeight(),i=this._mediaList,n=this._mediaDefault,a=[],o=[];if(!i.length&&!n)return o;for(var r=0,s=i.length;s>r;r++)Ns(i[r].query,t,e)&&a.push(r);return!a.length&&n&&(a=[-1]),a.length&&!Rs(a,this._currentMediaIndices)&&(o=uD(a,function(t){return lD(-1===t?n.option:i[t].option)})),this._currentMediaIndices=a,o}};var dD=f,fD=S,pD=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"],gD=function(t,e){dD(Zs(t.series),function(t){fD(t)&&Hs(t)});var i=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];e&&i.push("valueAxis","categoryAxis","logAxis","timeAxis"),dD(i,function(e){dD(Zs(t[e]),function(t){t&&(Fs(t,"axisLabel"),Fs(t.axisPointer,"label"))})}),dD(Zs(t.parallel),function(t){var e=t&&t.parallelAxisDefault;Fs(e,"axisLabel"),Fs(e&&e.axisPointer,"label")}),dD(Zs(t.calendar),function(t){Vs(t,"itemStyle"),Fs(t,"dayLabel"),Fs(t,"monthLabel"),Fs(t,"yearLabel")}),dD(Zs(t.radar),function(t){Fs(t,"name")}),dD(Zs(t.geo),function(t){fD(t)&&(Ws(t),dD(Zs(t.regions),function(t){Ws(t)}))}),dD(Zs(t.timeline),function(t){Ws(t),Vs(t,"label"),Vs(t,"itemStyle"),Vs(t,"controlStyle",!0);var e=t.data;_(e)&&f(e,function(t){S(t)&&(Vs(t,"label"),Vs(t,"itemStyle"))})}),dD(Zs(t.toolbox),function(t){Vs(t,"iconStyle"),dD(t.feature,function(t){Vs(t,"iconStyle")})}),Fs(Xs(t.axisPointer),"label"),Fs(Xs(t.tooltip).axisPointer,"label")},mD=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],vD=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],yD=function(t,e){gD(t,e),t.series=ea(t.series),f(t.series,function(t){if(S(t)){var e=t.type;if("line"===e)null!=t.clipOverflow&&(t.clip=t.clipOverflow);else if("pie"===e||"gauge"===e)null!=t.clockWise&&(t.clockwise=t.clockWise);else if("gauge"===e){var i=Us(t,"pointer.color");null!=i&&Ys(t,"itemStyle.color",i)}js(t)}}),t.dataRange&&(t.visualMap=t.dataRange),f(vD,function(e){var i=t[e];i&&(_(i)||(i=[i]),f(i,function(t){js(t)}))})},xD=function(t){var e=B();t.eachSeries(function(t){var i=t.get("stack");if(i){var n=e.get(i)||e.set(i,[]),a=t.getData(),o={stackResultDimension:a.getCalculationInfo("stackResultDimension"),stackedOverDimension:a.getCalculationInfo("stackedOverDimension"),stackedDimension:a.getCalculationInfo("stackedDimension"),stackedByDimension:a.getCalculationInfo("stackedByDimension"),isStackedByIndex:a.getCalculationInfo("isStackedByIndex"),data:a,seriesModel:t};if(!o.stackedDimension||!o.isStackedByIndex&&!o.stackedByDimension)return;n.length&&a.setCalculationInfo("stackedOnSeries",n[n.length-1].seriesModel),n.push(o)}}),e.each(qs)},_D=Ks.prototype;_D.pure=!1,_D.persistent=!0,_D.getSource=function(){return this._source};var wD={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:Qs},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=[],i=this._data,n=0;n=1)&&(t=1),t}var i=this._upstream,n=t&&t.skip;if(this._dirty&&i){var a=this.context;a.data=a.outputData=i.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var o;this._plan&&!n&&(o=this._plan(this.context));var r=e(this._modBy),s=this._modDataCount||0,l=e(t&&t.modBy),u=t&&t.modDataCount||0;(r!==l||s!==u)&&(o="reset");var h;(this._dirty||"reset"===o)&&(this._dirty=!1,h=ll(this,n)),this._modBy=l,this._modDataCount=u;var c=t&&t.step;if(this._dueEnd=i?i._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(!n&&(h||f>d)){var p=this._progress;if(_(p))for(var g=0;gn?n++:null}function e(){var t=n%r*a+Math.ceil(n/r),e=n>=i?null:o>t?t:n;return n++,e}var i,n,a,o,r,s={reset:function(l,u,h,c){n=l,i=u,a=h,o=c,r=Math.ceil(o/a),s.next=a>1&&o>0?e:t}};return s}();TD.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},TD.unfinished=function(){return this._progress&&this._dueIndex":"",m=p+s.join(p||", ");return{renderMode:n,content:m,style:u}}function o(t){return{renderMode:n,content:Hr(Fr(t)),style:u}}var r=this;n=n||"html";var s="html"===n?"
":"\n",l="richText"===n,u={},h=0,c=this.getData(),d=c.mapDimension("defaultedTooltip",!0),p=d.length,m=this.getRawValue(t),v=_(m),y=c.getItemVisual(t,"color");S(y)&&y.colorStops&&(y=(y.colorStops[0]||{}).color),y=y||"transparent";var x=p>1||v&&!p?a(m):o(p?nl(c,t,d[0]):v?m[0]:m),w=x.content,b=r.seriesIndex+"at"+h,M=Ur({color:y,type:"item",renderMode:n,markerId:b});u[b]=y,++h;var I=c.getName(t),T=this.name;sa(this)||(T=""),T=T?Hr(T)+(e?": ":s):"";var A="string"==typeof M?M:M.content,D=e?A+T+w:T+A+(I?Hr(I)+": "+w:w);return{html:D,markers:u}},isAnimationEnabled:function(){if(oS.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,i){var n=this.ecModel,a=UA.getColorFromPalette.call(this,t,e,i);return a||(a=n.getColorFromPalette(t,e,i)),a},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(CD,ID),c(CD,UA);var LD=function(){this.group=new xM,this.uid=_r("viewComponent")};LD.prototype={constructor:LD,init:function(){},render:function(){},dispose:function(){},filterForExposedEvent:null};var kD=LD.prototype;kD.updateView=kD.updateLayout=kD.updateVisual=function(){},_a(LD),Ma(LD,{registerWhenExtend:!0});var PD=function(){var t=ca();return function(e){var i=t(e),n=e.pipelineContext,a=i.large,o=i.progressiveRender,r=i.large=n&&n.large,s=i.progressiveRender=n&&n.progressiveRender;return!!(a^r||o^s)&&"reset"}},OD=ca(),ND=PD();vl.prototype={type:"chart",init:function(){},render:function(){},highlight:function(t,e,i,n){xl(t.getData(),n,"emphasis")},downplay:function(t,e,i,n){xl(t.getData(),n,"normal")},remove:function(){this.group.removeAll()},dispose:function(){},incrementalPrepareRender:null,incrementalRender:null,updateTransform:null,filterForExposedEvent:null};var zD=vl.prototype;zD.updateView=zD.updateLayout=zD.updateVisual=function(t,e,i,n){this.render(t,e,i,n)},_a(vl,["dispose"]),Ma(vl,{registerWhenExtend:!0}),vl.markUpdateMethod=function(t,e){OD(t).updateMethod=e};var RD={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)}}},ED="\x00__throttleOriginMethod",BD="\x00__throttleRate",VD="\x00__throttleType",GD={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var i=t.getData(),n=(t.visualColorAccessPath||"itemStyle.color").split("."),a=t.get(n),o=!w(a)||a instanceof QT?null:a;(!a||o)&&(a=t.getColorFromPalette(t.name,null,e.getSeriesCount())),i.setVisual("color",a);var r=(t.visualBorderColorAccessPath||"itemStyle.borderColor").split("."),s=t.get(r);if(i.setVisual("borderColor",s),!e.isSeriesFiltered(t)){o&&i.each(function(e){i.setItemVisual(e,"color",o(t.getDataParams(e)))});var l=function(t,e){var i=t.getItemModel(e),a=i.get(n,!0),o=i.get(r,!0);null!=a&&t.setItemVisual(e,"color",a),null!=o&&t.setItemVisual(e,"borderColor",o)};return{dataEach:i.hasItemOption?l:null}}}},FD={legend:{selector:{all:"全选",inverse:"反选"}},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:""}}}},WD=function(t,e){function i(t,e){if("string"!=typeof t)return t; +var i=t;return f(e,function(t,e){i=i.replace(new RegExp("\\{\\s*"+e+"\\s*\\}","g"),t)}),i}function n(t){var e=r.get(t);if(null==e){for(var i=t.split("."),n=FD.aria,a=0;as)){var d=a();l=d?i(n("general.withTitle"),{title:d}):n("general.withoutTitle");var p=[],g=s>1?"series.multiple.prefix":"series.single.prefix";l+=i(n(g),{seriesCount:s}),e.eachSeries(function(t,e){if(c>e){var a,r=t.get("name"),l="series."+(s>1?"multiple":"single")+".";a=n(r?l+"withName":l+"withoutName"),a=i(a,{seriesId:t.seriesIndex,seriesName:t.get("name"),seriesType:o(t.subType)});var h=t.getData();window.data=h,a+=h.count()>u?i(n("data.partialData"),{displayCnt:u}):n("data.allData");for(var d=[],f=0;ff){var g=h.getName(f),m=nl(h,f);d.push(i(n(g?"data.withName":"data.withoutName"),{name:g,value:m}))}a+=d.join(n("data.separator.middle"))+n("data.separator.end"),p.push(a)}}),l+=p.join(n("series.multiple.separator.middle"))+n("series.multiple.separator.end"),t.setAttribute("aria-label",l)}}},HD=Math.PI,ZD=function(t,e){e=e||{},s(e,{text:"loading",textColor:"#000",fontSize:"12px",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#c23531",spinnerRadius:10,lineWidth:5,zlevel:0});var i=new xM,n=new UT({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});i.add(n);var a=e.fontSize+" sans-serif",o=new UT({style:{fill:"none",text:e.text,font:a,textPosition:"right",textDistance:10,textFill:e.textColor},zlevel:e.zlevel,z:10001});if(i.add(o),e.showSpinner){var r=new $T({shape:{startAngle:-HD/2,endAngle:-HD/2+.1,r:e.spinnerRadius},style:{stroke:e.color,lineCap:"round",lineWidth:e.lineWidth},zlevel:e.zlevel,z:10001});r.animateShape(!0).when(1e3,{endAngle:3*HD/2}).start("circularInOut"),r.animateShape(!0).when(1e3,{startAngle:3*HD/2}).delay(300).start("circularInOut"),i.add(r)}return i.resize=function(){var i=Xi(e.text,a),s=e.showSpinner?e.spinnerRadius:0,l=(t.getWidth()-2*s-(e.showSpinner&&i?10:0)-i)/2-(e.showSpinner?0:i/2),u=t.getHeight()/2;e.showSpinner&&r.setShape({cx:l,cy:u}),o.setShape({x:l-s,y:u-s,width:2*s,height:2*s}),n.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},i.resize(),i},XD=Il.prototype;XD.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each(function(t){var e=t.overallTask;e&&e.dirty()})},XD.getPerformArgs=function(t,e){if(t.__pipeline){var i=this._pipelineMap.get(t.__pipeline.id),n=i.context,a=!e&&i.progressiveEnabled&&(!n||n.progressiveRender)&&t.__idxInPipeline>i.blockIndex,o=a?i.step:null,r=n&&n.modDataCount,s=null!=r?Math.ceil(r/o):null;return{step:o,modBy:s,modDataCount:r}}},XD.getPipeline=function(t){return this._pipelineMap.get(t)},XD.updateStreamModes=function(t,e){var i=this._pipelineMap.get(t.uid),n=t.getData(),a=n.count(),o=i.progressiveEnabled&&e.incrementalPrepareRender&&a>=i.threshold,r=t.get("large")&&a>=t.get("largeThreshold"),s="mod"===t.get("progressiveChunkMode")?a:null;t.pipelineContext=i.context={progressiveRender:o,modDataCount:s,large:r}},XD.restorePipelines=function(t){var e=this,i=e._pipelineMap=B();t.eachSeries(function(t){var n=t.getProgressive(),a=t.uid;i.set(a,{id:a,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:n&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(n||700),count:0}),El(e,t,t.dataTask)})},XD.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.ecInstance.getModel(),i=this.api;f(this._allHandlers,function(n){var a=t.get(n.uid)||t.set(n.uid,[]);n.reset&&Al(this,n,a,e,i),n.overallReset&&Dl(this,n,a,e,i)},this)},XD.prepareView=function(t,e,i,n){var a=t.renderTask,o=a.context;o.model=e,o.ecModel=i,o.api=n,a.__block=!t.incrementalPrepareRender,El(this,e,a)},XD.performDataProcessorTasks=function(t,e){Tl(this,this._dataProcessorHandlers,t,e,{block:!0})},XD.performVisualTasks=function(t,e,i){Tl(this,this._visualHandlers,t,e,i)},XD.performSeriesTasks=function(t){var e;t.eachSeries(function(t){e|=t.dataTask.perform()}),this.unfinished|=e},XD.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 UD=XD.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)},YD=zl(0);Il.wrapStageHandler=function(t,e){return w(t)&&(t={overallReset:t,seriesType:Bl(t)}),t.uid=_r("stageHandler"),e&&(t.visualType=e),t};var jD,qD={},KD={};Vl(qD,aD),Vl(KD,Ls),qD.eachSeriesByType=qD.eachRawSeriesByType=function(t){jD=t},qD.eachComponent=function(t){"series"===t.mainType&&t.subType&&(jD=t.subType)};var $D=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"],JD={color:$D,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],$D]},QD="#eee",tC=function(){return{axisLine:{lineStyle:{color:QD}},axisTick:{lineStyle:{color:QD}},axisLabel:{textStyle:{color:QD}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:QD}}}},eC=["#dd6b66","#759aa0","#e69d87","#8dc1a9","#ea7e53","#eedd78","#73a373","#73b9bc","#7289ab","#91ca8c","#f49f42"],iC={color:eC,backgroundColor:"#333",tooltip:{axisPointer:{lineStyle:{color:QD},crossStyle:{color:QD},label:{color:"#000"}}},legend:{textStyle:{color:QD}},textStyle:{color:QD},title:{textStyle:{color:QD}},toolbox:{iconStyle:{normal:{borderColor:QD}}},dataZoom:{textStyle:{color:QD}},visualMap:{textStyle:{color:QD}},timeline:{lineStyle:{color:QD},itemStyle:{normal:{color:eC[1]}},label:{normal:{textStyle:{color:QD}}},controlStyle:{normal:{color:QD,borderColor:QD}}},timeAxis:tC(),logAxis:tC(),valueAxis:tC(),categoryAxis:tC(),line:{symbol:"circle"},graph:{color:eC},gauge:{title:{textStyle:{color:QD}}},candlestick:{itemStyle:{normal:{color:"#FD1050",color0:"#0CF49B",borderColor:"#FD1050",borderColor0:"#0CF49B"}}}};iC.categoryAxis.splitLine.show=!1,WA.extend({type:"dataset",defaultOption:{seriesLayoutBy:QA,sourceHeader:null,dimensions:null,source:null},optionUpdated:function(){hs(this)}}),LD.extend({type:"dataset"});var nC=ao.extend({type:"ellipse",shape:{cx:0,cy:0,rx:0,ry:0},buildPath:function(t,e){var i=.5522848,n=e.cx,a=e.cy,o=e.rx,r=e.ry,s=o*i,l=r*i;t.moveTo(n-o,a),t.bezierCurveTo(n-o,a-l,n-s,a-r,n,a-r),t.bezierCurveTo(n+s,a-r,n+o,a-l,n+o,a),t.bezierCurveTo(n+o,a+l,n+s,a+r,n,a+r),t.bezierCurveTo(n-s,a+r,n-o,a+l,n-o,a),t.closePath()}}),aC=/[\s,]+/;Fl.prototype.parse=function(t,e){e=e||{};var i=Gl(t);if(!i)throw new Error("Illegal svg");var n=new xM;this._root=n;var a=i.getAttribute("viewBox")||"",o=parseFloat(i.getAttribute("width")||e.width),r=parseFloat(i.getAttribute("height")||e.height);isNaN(o)&&(o=null),isNaN(r)&&(r=null),Xl(i,n,null,!0);for(var s=i.firstChild;s;)this._parseNode(s,n),s=s.nextSibling;var l,u;if(a){var h=N(a).split(aC);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!=o&&null!=r&&(u=ql(l,o,r),!e.ignoreViewBox)){var c=n;n=new xM,n.add(c),c.scale=u.scale.slice(),c.position=u.position.slice()}return e.ignoreRootClip||null==o||null==r||n.setClipPath(new UT({shape:{x:0,y:0,width:o,height:r}})),{root:n,width:o,height:r,viewBoxRect:l,viewBoxTransform:u}},Fl.prototype._parseNode=function(t,e){var i=t.nodeName.toLowerCase();"defs"===i?this._isDefine=!0:"text"===i&&(this._isText=!0);var n;if(this._isDefine){var a=rC[i];if(a){var o=a.call(this,t),r=t.getAttribute("id");r&&(this._defs[r]=o)}}else{var a=oC[i];a&&(n=a.call(this,t,e),e.add(n))}for(var s=t.firstChild;s;)1===s.nodeType&&this._parseNode(s,n),3===s.nodeType&&this._isText&&this._parseText(s,n),s=s.nextSibling;"defs"===i?this._isDefine=!1:"text"===i&&(this._isText=!1)},Fl.prototype._parseText=function(t,e){if(1===t.nodeType){var i=t.getAttribute("dx")||0,n=t.getAttribute("dy")||0;this._textX+=parseFloat(i),this._textY+=parseFloat(n)}var a=new NT({style:{text:t.textContent,transformText:!0},position:[this._textX||0,this._textY||0]});Hl(e,a),Xl(t,a,this._defs);var o=a.style.fontSize;o&&9>o&&(a.style.fontSize=9,a.scale=a.scale||[1,1],a.scale[0]*=o/9,a.scale[1]*=o/9);var r=a.getBoundingRect();return this._textX+=r.width,e.add(a),a};var oC={g:function(t,e){var i=new xM;return Hl(e,i),Xl(t,i,this._defs),i},rect:function(t,e){var i=new UT;return Hl(e,i),Xl(t,i,this._defs),i.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)}),i},circle:function(t,e){var i=new zT;return Hl(e,i),Xl(t,i,this._defs),i.setShape({cx:parseFloat(t.getAttribute("cx")||0),cy:parseFloat(t.getAttribute("cy")||0),r:parseFloat(t.getAttribute("r")||0)}),i},line:function(t,e){var i=new jT;return Hl(e,i),Xl(t,i,this._defs),i.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)}),i},ellipse:function(t,e){var i=new nC;return Hl(e,i),Xl(t,i,this._defs),i.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)}),i},polygon:function(t,e){var i=t.getAttribute("points");i&&(i=Zl(i));var n=new WT({shape:{points:i||[]}});return Hl(e,n),Xl(t,n,this._defs),n},polyline:function(t,e){var i=new ao;Hl(e,i),Xl(t,i,this._defs);var n=t.getAttribute("points");n&&(n=Zl(n));var a=new HT({shape:{points:n||[]}});return a},image:function(t,e){var i=new Cn;return Hl(e,i),Xl(t,i,this._defs),i.setStyle({image:t.getAttribute("xlink:href"),x:t.getAttribute("x"),y:t.getAttribute("y"),width:t.getAttribute("width"),height:t.getAttribute("height")}),i},text:function(t,e){var i=t.getAttribute("x")||0,n=t.getAttribute("y")||0,a=t.getAttribute("dx")||0,o=t.getAttribute("dy")||0;this._textX=parseFloat(i)+parseFloat(a),this._textY=parseFloat(n)+parseFloat(o);var r=new xM;return Hl(e,r),Xl(t,r,this._defs),r},tspan:function(t,e){var i=t.getAttribute("x"),n=t.getAttribute("y");null!=i&&(this._textX=parseFloat(i)),null!=n&&(this._textY=parseFloat(n));var a=t.getAttribute("dx")||0,o=t.getAttribute("dy")||0,r=new xM;return Hl(e,r),Xl(t,r,this._defs),this._textX+=a,this._textY+=o,r},path:function(t,e){var i=t.getAttribute("d")||"",n=lo(i);return Hl(e,n),Xl(t,n,this._defs),n}},rC={lineargradient:function(t){var e=parseInt(t.getAttribute("x1")||0,10),i=parseInt(t.getAttribute("y1")||0,10),n=parseInt(t.getAttribute("x2")||10,10),a=parseInt(t.getAttribute("y2")||0,10),o=new tA(e,i,n,a);return Wl(t,o),o},radialgradient:function(){}},sC={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"},lC=/url\(\s*#(.*?)\)/,uC=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.e,]*)\)/g,hC=/([^\s:;]+)\s*:\s*([^:;]+)/g,cC=B(),dC={registerMap:function(t,e,i){var n;return _(e)?n=e:e.svg?n=[{type:"svg",source:e.svg,specialAreas:e.specialAreas}]:(e.geoJson&&!e.features&&(i=e.specialAreas,e=e.geoJson),n=[{type:"geoJSON",source:e,specialAreas:i}]),f(n,function(t){var e=t.type;"geoJson"===e&&(e=t.type="geoJSON");var i=fC[e];i(t)}),cC.set(t,n)},retrieveMap:function(t){return cC.get(t)}},fC={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=Gl(t.source)}},pC=O,gC=f,mC=w,vC=S,yC=WA.parseClassType,xC="4.9.0",_C={zrender:"4.3.2"},wC=1,bC=1e3,SC=800,MC=900,IC=5e3,TC=1e3,AC=1100,DC=2e3,CC=3e3,LC=3500,kC=4e3,PC=5e3,OC={PROCESSOR:{FILTER:bC,SERIES_FILTER:SC,STATISTIC:IC},VISUAL:{LAYOUT:TC,PROGRESSIVE_LAYOUT:AC,GLOBAL:DC,CHART:CC,POST_CHART_LAYOUT:LC,COMPONENT:kC,BRUSH:PC}},NC="__flagInMainProcess",zC="__optionUpdated",RC=/^[a-zA-Z0-9_]+$/;Jl.prototype.on=$l("on",!0),Jl.prototype.off=$l("off",!0),Jl.prototype.one=$l("one",!0),c(Jl,AS);var EC=Ql.prototype;EC._onframe=function(){if(!this._disposed){var t=this._scheduler;if(this[zC]){var e=this[zC].silent;this[NC]=!0,eu(this),BC.update.call(this),this[NC]=!1,this[zC]=!1,ou.call(this,e),ru.call(this,e)}else if(t.unfinished){var i=wC,n=this._model,a=this._api;t.unfinished=!1;do{var o=+new Date;t.performSeriesTasks(n),t.performDataProcessorTasks(n),nu(this,n),t.performVisualTasks(n),du(this,this._model,a,"remain"),i-=+new Date-o}while(i>0&&t.unfinished);t.unfinished||this._zr.flush()}}},EC.getDom=function(){return this._dom},EC.getZr=function(){return this._zr},EC.setOption=function(t,e,i){if(!this._disposed){var n;if(vC(e)&&(i=e.lazyUpdate,n=e.silent,e=e.notMerge),this[NC]=!0,!this._model||e){var a=new Ps(this._api),o=this._theme,r=this._model=new aD;r.scheduler=this._scheduler,r.init(null,null,o,a)}this._model.setOption(t,HC),i?(this[zC]={silent:n},this[NC]=!1):(eu(this),BC.update.call(this),this._zr.flush(),this[zC]=!1,this[NC]=!1,ou.call(this,n),ru.call(this,n))}},EC.setTheme=function(){console.error("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},EC.getModel=function(){return this._model},EC.getOption=function(){return this._model&&this._model.getOption()},EC.getWidth=function(){return this._zr.getWidth()},EC.getHeight=function(){return this._zr.getHeight()},EC.getDevicePixelRatio=function(){return this._zr.painter.dpr||window.devicePixelRatio||1},EC.getRenderedCanvas=function(t){if(oS.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)}},EC.getSvgDataURL=function(){if(oS.svgSupported){var t=this._zr,e=t.storage.getDisplayList();return f(e,function(t){t.stopAnimation(!0)}),t.painter.toDataURL()}},EC.getDataURL=function(t){if(!this._disposed){t=t||{};var e=t.excludeComponents,i=this._model,n=[],a=this;gC(e,function(t){i.eachComponent({mainType:t},function(t){var e=a._componentsMap[t.__viewId];e.group.ignore||(n.push(e),e.group.ignore=!0)})});var o="svg"===this._zr.painter.getType()?this.getSvgDataURL():this.getRenderedCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return gC(n,function(t){t.group.ignore=!1}),o}},EC.getConnectedDataURL=function(t){if(!this._disposed&&oS.canvasSupported){var e="svg"===t.type,i=this.group,a=Math.min,o=Math.max,r=1/0;if(qC[i]){var s=r,l=r,u=-r,h=-r,c=[],d=t&&t.pixelRatio||1;f(jC,function(r){if(r.group===i){var d=e?r.getZr().painter.getSvgDom().innerHTML:r.getRenderedCanvas(n(t)),f=r.getDom().getBoundingClientRect();s=a(f.left,s),l=a(f.top,l),u=o(f.right,u),h=o(f.bottom,h),c.push({dom:d,left:f.left,top:f.top})}}),s*=d,l*=d,u*=d,h*=d;var p=u-s,g=h-l,m=mS(),v=Kn(m,{renderer:e?"svg":"canvas"});if(v.resize({width:p,height:g}),e){var y="";return gC(c,function(t){var e=t.left-s,i=t.top-l;y+=''+t.dom+""}),v.painter.getSvgRoot().innerHTML=y,t.connectedBackgroundColor&&v.painter.setBackgroundColor(t.connectedBackgroundColor),v.refreshImmediately(),v.painter.toDataURL()}return t.connectedBackgroundColor&&v.add(new UT({shape:{x:0,y:0,width:p,height:g},style:{fill:t.connectedBackgroundColor}})),gC(c,function(t){var e=new Cn({style:{x:t.left*d-s,y:t.top*d-l,image:t.dom}});v.add(e)}),v.refreshImmediately(),m.toDataURL("image/"+(t&&t.type||"png"))}return this.getDataURL(t)}},EC.convertToPixel=x(tu,"convertToPixel"),EC.convertFromPixel=x(tu,"convertFromPixel"),EC.containPixel=function(t,e){if(!this._disposed){var i,n=this._model;return t=da(n,t),f(t,function(t,n){n.indexOf("Models")>=0&&f(t,function(t){var a=t.coordinateSystem;if(a&&a.containPoint)i|=!!a.containPoint(e);else if("seriesModels"===n){var o=this._chartsMap[t.__viewId];o&&o.containPoint&&(i|=o.containPoint(e,t))}},this)},this),!!i}},EC.getVisual=function(t,e){var i=this._model;t=da(i,t,{defaultMainType:"series"});var n=t.seriesModel,a=n.getData(),o=t.hasOwnProperty("dataIndexInside")?t.dataIndexInside:t.hasOwnProperty("dataIndex")?a.indexOfRawIndex(t.dataIndex):null;return null!=o?a.getItemVisual(o,e):a.getVisual(e)},EC.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},EC.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]};var BC={prepareAndUpdate:function(t){eu(this),BC.update.call(this,t)},update:function(t){var e=this._model,i=this._api,n=this._zr,a=this._coordSysMgr,o=this._scheduler;if(e){o.restoreData(e,t),o.performSeriesTasks(e),a.create(e,i),o.performDataProcessorTasks(e,t),nu(this,e),a.update(e,i),uu(e),o.performVisualTasks(e,t),hu(this,e,i,t);var r=e.get("backgroundColor")||"transparent";if(oS.canvasSupported)n.setBackgroundColor(r);else{var s=ti(r);r=ui(s,"rgb"),0===s[3]&&(r="transparent")}fu(e,i)}},updateTransform:function(t){var e=this._model,i=this,n=this._api;if(e){var a=[];e.eachComponent(function(o,r){var s=i.getViewOfComponentModel(r);if(s&&s.__alive)if(s.updateTransform){var l=s.updateTransform(r,e,n,t);l&&l.update&&a.push(s)}else a.push(s)});var o=B();e.eachSeries(function(a){var r=i._chartsMap[a.__viewId];if(r.updateTransform){var s=r.updateTransform(a,e,n,t);s&&s.update&&o.set(a.uid,1)}else o.set(a.uid,1)}),uu(e),this._scheduler.performVisualTasks(e,t,{setDirty:!0,dirtyMap:o}),du(i,e,n,t,o),fu(e,this._api)}},updateView:function(t){var e=this._model;e&&(vl.markUpdateMethod(t,"updateView"),uu(e),this._scheduler.performVisualTasks(e,t,{setDirty:!0}),hu(this,this._model,this._api,t),fu(e,this._api))},updateVisual:function(t){BC.update.call(this,t)},updateLayout:function(t){BC.update.call(this,t)}};EC.resize=function(t){if(!this._disposed){this._zr.resize(t);var e=this._model;if(this._loadingFX&&this._loadingFX.resize(),e){var i=e.resetOption("media"),n=t&&t.silent;this[NC]=!0,i&&eu(this),BC.update.call(this),this[NC]=!1,ou.call(this,n),ru.call(this,n)}}},EC.showLoading=function(t,e){if(!this._disposed&&(vC(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),YC[t])){var i=YC[t](this._api,e),n=this._zr;this._loadingFX=i,n.add(i)}},EC.hideLoading=function(){this._disposed||(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},EC.makeActionFromEvent=function(t){var e=r({},t);return e.type=FC[t.type],e},EC.dispatchAction=function(t,e){if(!this._disposed&&(vC(e)||(e={silent:!!e}),GC[t.type]&&this._model)){if(this[NC])return void this._pendingActions.push(t);au.call(this,t,e.silent),e.flush?this._zr.flush(!0):e.flush!==!1&&oS.browser.weChat&&this._throttledZrFlush(),ou.call(this,e.silent),ru.call(this,e.silent)}},EC.appendData=function(t){if(!this._disposed){var e=t.seriesIndex,i=this.getModel(),n=i.getSeriesByIndex(e);n.appendData(t),this._scheduler.unfinished=!0}},EC.on=$l("on",!1),EC.off=$l("off",!1),EC.one=$l("one",!1);var VC=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];EC._initEvents=function(){gC(VC,function(t){var e=function(e){var i,n=this.getModel(),a=e.target,o="globalout"===t;if(o)i={};else if(a&&null!=a.dataIndex){var s=a.dataModel||n.getSeriesByIndex(a.seriesIndex);i=s&&s.getDataParams(a.dataIndex,a.dataType,a)||{}}else a&&a.eventData&&(i=r({},a.eventData));if(i){var l=i.componentType,u=i.componentIndex;("markLine"===l||"markPoint"===l||"markArea"===l)&&(l="series",u=i.seriesIndex);var h=l&&null!=u&&n.getComponent(l,u),c=h&&this["series"===h.mainType?"_chartsMap":"_componentsMap"][h.__viewId];i.event=e,i.type=t,this._ecEventProcessor.eventInfo={targetEl:a,packedEvent:i,model:h,view:c},this.trigger(t,i)}};e.zrEventfulCallAtLast=!0,this._zr.on(t,e,this)},this),gC(FC,function(t,e){this._messageCenter.on(e,function(t){this.trigger(e,t)},this)},this)},EC.isDisposed=function(){return this._disposed},EC.clear=function(){this._disposed||this.setOption({series:[]},!0)},EC.dispose=function(){if(!this._disposed){this._disposed=!0,pa(this.getDom(),JC,"");var t=this._api,e=this._model;gC(this._componentsViews,function(i){i.dispose(e,t)}),gC(this._chartsViews,function(i){i.dispose(e,t)}),this._zr.dispose(),delete jC[this.id]}},c(Ql,AS),yu.prototype={constructor:yu,normalizeQuery:function(t){var e={},i={},n={};if(b(t)){var a=yC(t);e.mainType=a.main||null,e.subType=a.sub||null}else{var o=["Index","Name","Id"],r={name:1,dataIndex:1,dataType:1};f(t,function(t,a){for(var s=!1,l=0;l0&&h===a.length-u.length){var c=a.slice(0,h);"data"!==c&&(e.mainType=c,e[u.toLowerCase()]=t,s=!0)}}r.hasOwnProperty(a)&&(i[a]=t,s=!0),s||(n[a]=t)})}return{cptQuery:e,dataQuery:i,otherQuery:n}},filter:function(t,e){function i(t,e,i,n){return null==t[i]||e[n||i]===t[i]}var n=this.eventInfo;if(!n)return!0;var a=n.targetEl,o=n.packedEvent,r=n.model,s=n.view;if(!r||!s)return!0;var l=e.cptQuery,u=e.dataQuery;return i(l,r,"mainType")&&i(l,r,"subType")&&i(l,r,"index","componentIndex")&&i(l,r,"name")&&i(l,r,"id")&&i(u,o,"name")&&i(u,o,"dataIndex")&&i(u,o,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(t,e.otherQuery,a,o))},afterTrigger:function(){this.eventInfo=null}};var GC={},FC={},WC=[],HC=[],ZC=[],XC=[],UC={},YC={},jC={},qC={},KC=new Date-0,$C=new Date-0,JC="_echarts_instance_",QC=bu;Nu(DC,GD),Au(yD),Du(MC,xD),Ru("default",ZD),Lu({type:"highlight",event:"highlight",update:"highlight"},G),Lu({type:"downplay",event:"downplay",update:"downplay"},G),Tu("light",JD),Tu("dark",iC);var tL={};Xu.prototype={constructor:Xu,add:function(t){return this._add=t,this},update:function(t){return this._update=t,this},remove:function(t){return this._remove=t,this},execute:function(){var t,e=this._old,i=this._new,n={},a={},o=[],r=[];for(Uu(e,n,o,"_oldKeyGetter",this),Uu(i,a,r,"_newKeyGetter",this),t=0;th;h++)this._add&&this._add(l[h]);else this._add&&this._add(l)}}}};var eL=B(["tooltip","label","itemName","itemId","seriesName"]),iL=S,nL="undefined",aL=-1,oL="e\x00\x00",rL={"float":typeof Float64Array===nL?Array:Float64Array,"int":typeof Int32Array===nL?Array:Int32Array,ordinal:Array,number:Array,time:Array},sL=typeof Uint32Array===nL?Array:Uint32Array,lL=typeof Int32Array===nL?Array:Int32Array,uL=typeof Uint16Array===nL?Array:Uint16Array,hL=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_rawData","_chunkSize","_chunkCount","_dimValueGetter","_count","_rawCount","_nameDimIdx","_idDimIdx"],cL=["_extent","_approximateExtent","_rawExtent"],dL=function(t,e){t=t||["x","y"];for(var i={},n=[],a={},o=0;oh;h++){var c=a[h];r[c]||(r[c]=hh()),n[c]||(n[c]=[]),eh(n,this._dimensionInfos[c],i,u,l),this._chunkCount=n[c].length}for(var d=new Array(o),f=s;l>f;f++){for(var p=f-s,g=Math.floor(f/i),m=f%i,v=0;o>v;v++){var c=a[v],y=this._dimValueGetterArrayRows(t[p]||d,c,p,v);n[c][g][m]=y;var x=r[c];yx[1]&&(x[1]=y)}e&&(this._nameList[f]=e[p])}this._rawCount=this._count=l,this._extent={},ih(this)},fL._initDataFromProvider=function(t,e){if(!(t>=e)){for(var i,n=this._chunkSize,a=this._rawData,o=this._storage,r=this.dimensions,s=r.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=r[p];c[g]||(c[g]=hh());var m=l[g];0===m.otherDims.itemName&&(i=this._nameDimIdx=p),0===m.otherDims.itemId&&(this._idDimIdx=p),o[g]||(o[g]=[]),eh(o,m,n,f,e),this._chunkCount=o[g].length}for(var v=new Array(s),y=t;e>y;y++){v=a.getItem(y,v);for(var x=Math.floor(y/n),_=y%n,w=0;s>w;w++){var g=r[w],b=o[g][x],S=this._dimValueGetter(v,g,y,w);b[_]=S;var M=c[g];SM[1]&&(M[1]=S)}if(!a.pure){var I=u[y];if(v&&null==I)if(null!=v.name)u[y]=I=v.name;else if(null!=i){var T=r[i],A=o[T][x];if(A){I=A[_];var D=l[T].ordinalMeta;D&&D.categories.length&&(I=D.categories[I])}}var C=null==v?null:v.id;null==C&&null!=I&&(d[I]=d[I]||0,C=I,d[I]>0&&(C+="__ec__"+d[I]),d[I]++),null!=C&&(h[y]=C)}}!a.persistent&&a.clean&&a.clean(),this._rawCount=this._count=e,this._extent={},ih(this)}},fL.count=function(){return this._count},fL.getIndices=function(){var t,e=this._indices;if(e){var i=e.constructor,n=this._count;if(i===Array){t=new i(n);for(var a=0;n>a;a++)t[a]=e[a]}else t=new i(e.buffer,0,n)}else for(var i=Ju(this),t=new i(this.count()),a=0;a=0&&e=0&&en;n++)i.push(this.get(t[n],e));return i},fL.hasValue=function(t){for(var e=this._dimensionsSummary.dataDimsOnCoord,i=0,n=e.length;n>i;i++)if(isNaN(this.get(e[i],t)))return!1;return!0},fL.getDataExtent=function(t){t=this.getDimension(t);var e=this._storage[t],i=hh();if(!e)return i;var n,a=this.count(),o=!this._indices;if(o)return this._rawExtent[t].slice();if(n=this._extent[t])return n.slice();n=i;for(var r=n[0],s=n[1],l=0;a>l;l++){var u=this._getFast(t,this.getRawIndex(l));r>u&&(r=u),u>s&&(s=u)}return n=[r,s],this._extent[t]=n,n},fL.getApproximateExtent=function(t){return t=this.getDimension(t),this._approximateExtent[t]||this.getDataExtent(t)},fL.setApproximateExtent=function(t,e){e=this.getDimension(e),this._approximateExtent[e]=t.slice()},fL.getCalculationInfo=function(t){return this._calculationInfo[t]},fL.setCalculationInfo=function(t,e){iL(t)?r(this._calculationInfo,t):this._calculationInfo[t]=e},fL.getSum=function(t){var e=this._storage[t],i=0;if(e)for(var n=0,a=this.count();a>n;n++){var o=this.get(t,n);isNaN(o)||(i+=o)}return i},fL.getMedian=function(t){var e=[];this.each(t,function(t){isNaN(t)||e.push(t)});var i=[].concat(e).sort(function(t,e){return t-e}),n=this.count();return 0===n?0:n%2===1?i[(n-1)/2]:(i[n/2]+i[n/2-1])/2},fL.rawIndexOf=function(t,e){var i=t&&this._invertedIndicesMap[t],n=i[e];return null==n||isNaN(n)?aL:n},fL.indexOfName=function(t){for(var e=0,i=this.count();i>e;e++)if(this.getName(e)===t)return e;return-1},fL.indexOfRawIndex=function(t){if(t>=this._rawCount||0>t)return-1;if(!this._indices)return t;var e=this._indices,i=e[t];if(null!=i&&i=n;){var o=(n+a)/2|0;if(e[o]t))return o;a=o-1}}return-1},fL.indicesOfNearest=function(t,e,i){var n=this._storage,a=n[t],o=[];if(!a)return o;null==i&&(i=1/0);for(var r=1/0,s=-1,l=0,u=0,h=this.count();h>u;u++){var c=e-this.get(t,u),d=Math.abs(c);i>=d&&((r>d||d===r&&c>=0&&0>s)&&(r=d,s=c,l=0),c===s&&(o[l++]=u))}return o.length=l,o},fL.getRawIndex=ah,fL.getRawDataItem=function(t){if(this._rawData.persistent)return this._rawData.getItem(this.getRawIndex(t));for(var e=[],i=0;ir;r++)s[r]=this.get(t[r],o);s[r]=o,e.apply(i,s)}}},fL.filterSelf=function(t,e,i,n){if(this._count){"function"==typeof t&&(n=i,i=e,e=t,t=[]),i=i||n||this,t=p(sh(t),this.getDimension,this);for(var a=this.count(),o=Ju(this),r=new o(a),s=[],l=t.length,u=0,h=t[0],c=0;a>c;c++){var d,f=this.getRawIndex(c);if(0===l)d=e.call(i,c);else if(1===l){var g=this._getFast(h,f);d=e.call(i,g,c)}else{for(var m=0;l>m;m++)s[m]=this._getFast(h,f);s[m]=c,d=e.apply(i,s)}d&&(r[u++]=f)}return a>u&&(this._indices=r),this._count=u,this._extent={},this.getRawIndex=this._indices?oh:ah,this}},fL.selectRange=function(t){if(this._count){var e=[];for(var i in t)t.hasOwnProperty(i)&&e.push(i);var n=e.length;if(n){var a=this.count(),o=Ju(this),r=new o(a),s=0,l=e[0],u=t[l][0],h=t[l][1],c=!1;if(!this._indices){var d=0;if(1===n){for(var f=this._storage[e[0]],p=0;pv;v++){var y=g[v];(y>=u&&h>=y||isNaN(y))&&(r[s++]=d),d++}c=!0}else if(2===n){for(var f=this._storage[l],x=this._storage[e[1]],_=t[e[1]][0],w=t[e[1]][1],p=0;pv;v++){var y=g[v],S=b[v];(y>=u&&h>=y||isNaN(y))&&(S>=_&&w>=S||isNaN(S))&&(r[s++]=d),d++}c=!0}}if(!c)if(1===n)for(var v=0;a>v;v++){var M=this.getRawIndex(v),y=this._getFast(l,M);(y>=u&&h>=y||isNaN(y))&&(r[s++]=M)}else for(var v=0;a>v;v++){for(var I=!0,M=this.getRawIndex(v),p=0;n>p;p++){var T=e[p],y=this._getFast(i,M); +(yt[T][1])&&(I=!1)}I&&(r[s++]=this.getRawIndex(v))}return a>s&&(this._indices=r),this._count=s,this._extent={},this.getRawIndex=this._indices?oh:ah,this}}},fL.mapArray=function(t,e,i,n){"function"==typeof t&&(n=i,i=e,e=t,t=[]),i=i||n||this;var a=[];return this.each(t,function(){a.push(e&&e.apply(this,arguments))},i),a},fL.map=function(t,e,i,n){i=i||n||this,t=p(sh(t),this.getDimension,this);var a=lh(this,t);a._indices=this._indices,a.getRawIndex=a._indices?oh:ah;for(var o=a._storage,r=[],s=this._chunkSize,l=t.length,u=this.count(),h=[],c=a._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(i,h);if(null!=g){"object"!=typeof g&&(r[0]=g,g=r);for(var m=this.getRawIndex(d),v=Math.floor(m/s),y=m%s,x=0;xb[1]&&(b[1]=w)}}}return a},fL.downSample=function(t,e,i,n){for(var a=lh(this,[t]),o=a._storage,r=[],s=Math.floor(1/e),l=o[t],u=this.count(),h=this._chunkSize,c=a._rawExtent[t],d=new(Ju(this))(u),f=0,p=0;u>p;p+=s){s>u-p&&(s=u-p,r.length=s);for(var g=0;s>g;g++){var m=this.getRawIndex(p+g),v=Math.floor(m/h),y=m%h;r[g]=l[v][y]}var x=i(r),_=this.getRawIndex(Math.min(p+n(r,x)||0,u-1)),w=Math.floor(_/h),b=_%h;l[w][b]=x,xc[1]&&(c[1]=x),d[f++]=_}return a._count=f,a._indices=d,a.getRawIndex=oh,a},fL.getItemModel=function(t){var e=this.hostModel;return new vr(this.getRawDataItem(t),e,e&&e.ecModel)},fL.diff=function(t){var e=this;return new Xu(t?t.getIndices():[],this.getIndices(),function(e){return rh(t,e)},function(t){return rh(e,t)})},fL.getVisual=function(t){var e=this._visual;return e&&e[t]},fL.setVisual=function(t,e){if(iL(t))for(var i in t)t.hasOwnProperty(i)&&this.setVisual(i,t[i]);else this._visual=this._visual||{},this._visual[t]=e},fL.setLayout=function(t,e){if(iL(t))for(var i in t)t.hasOwnProperty(i)&&this.setLayout(i,t[i]);else this._layout[t]=e},fL.getLayout=function(t){return this._layout[t]},fL.getItemLayout=function(t){return this._itemLayouts[t]},fL.setItemLayout=function(t,e,i){this._itemLayouts[t]=i?r(this._itemLayouts[t]||{},e):e},fL.clearItemLayouts=function(){this._itemLayouts.length=0},fL.getItemVisual=function(t,e,i){var n=this._itemVisuals[t],a=n&&n[e];return null!=a||i?a:this.getVisual(e)},fL.setItemVisual=function(t,e,i){var n=this._itemVisuals[t]||{},a=this.hasItemVisual;if(this._itemVisuals[t]=n,iL(e))for(var o in e)e.hasOwnProperty(o)&&(n[o]=e[o],a[o]=!0);else n[e]=i,a[e]=!0},fL.clearAllVisual=function(){this._visual={},this._itemVisuals=[],this.hasItemVisual={}};var pL=function(t){t.seriesIndex=this.seriesIndex,t.dataIndex=this.dataIndex,t.dataType=this.dataType};fL.setItemGraphicEl=function(t,e){var i=this.hostModel;e&&(e.dataIndex=t,e.dataType=this.dataType,e.seriesIndex=i&&i.seriesIndex,"group"===e.type&&e.traverse(pL,e)),this._graphicEls[t]=e},fL.getItemGraphicEl=function(t){return this._graphicEls[t]},fL.eachItemGraphicEl=function(t,e){f(this._graphicEls,function(i,n){i&&t&&t.call(e,i,n)})},fL.cloneShallow=function(t){if(!t){var e=p(this.dimensions,this.getDimensionInfo,this);t=new dL(e,this.hostModel)}if(t._storage=this._storage,th(t,this),this._indices){var i=this._indices.constructor;t._indices=new i(this._indices)}else t._indices=null;return t.getRawIndex=t._indices?oh:ah,t},fL.wrapMethod=function(t,e){var i=this[t];"function"==typeof i&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var t=i.apply(this,arguments);return e.apply(this,[t].concat(k(arguments)))})},fL.TRANSFERABLE_METHODS=["cloneShallow","downSample","map"],fL.CHANGABLE_METHODS=["filterSelf","selectRange"];var gL=function(t,e){return e=e||{},ch(e.coordDimensions||[],t,{dimsDef:e.dimensionsDefine||t.dimensionsDefine,encodeDef:e.encodeDefine||t.encodeDefine,dimCount:e.dimensionsCount,encodeDefaulter:e.encodeDefaulter,generateCoord:e.generateCoord,generateCoordCount:e.generateCoordCount})},mL={cartesian2d:function(t,e,i,n){var a=t.getReferringComponents("xAxis")[0],o=t.getReferringComponents("yAxis")[0];e.coordSysDims=["x","y"],i.set("x",a),i.set("y",o),mh(a)&&(n.set("x",a),e.firstCategoryDimIndex=0),mh(o)&&(n.set("y",o),null==e.firstCategoryDimIndex&(e.firstCategoryDimIndex=1))},singleAxis:function(t,e,i,n){var a=t.getReferringComponents("singleAxis")[0];e.coordSysDims=["single"],i.set("single",a),mh(a)&&(n.set("single",a),e.firstCategoryDimIndex=0)},polar:function(t,e,i,n){var a=t.getReferringComponents("polar")[0],o=a.findAxisModel("radiusAxis"),r=a.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],i.set("radius",o),i.set("angle",r),mh(o)&&(n.set("radius",o),e.firstCategoryDimIndex=0),mh(r)&&(n.set("angle",r),null==e.firstCategoryDimIndex&&(e.firstCategoryDimIndex=1))},geo:function(t,e){e.coordSysDims=["lng","lat"]},parallel:function(t,e,i,n){var a=t.ecModel,o=a.getComponent("parallel",t.get("parallelIndex")),r=e.coordSysDims=o.dimensions.slice();f(o.parallelAxisIndex,function(t,o){var s=a.getComponent("parallelAxis",t),l=r[o];i.set(l,s),mh(s)&&null==e.firstCategoryDimIndex&&(n.set(l,s),e.firstCategoryDimIndex=o)})}};Sh.prototype.parse=function(t){return t},Sh.prototype.getSetting=function(t){return this._setting[t]},Sh.prototype.contain=function(t){var e=this._extent;return t>=e[0]&&t<=e[1]},Sh.prototype.normalize=function(t){var e=this._extent;return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])},Sh.prototype.scale=function(t){var e=this._extent;return t*(e[1]-e[0])+e[0]},Sh.prototype.unionExtent=function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1])},Sh.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},Sh.prototype.getExtent=function(){return this._extent.slice()},Sh.prototype.setExtent=function(t,e){var i=this._extent;isNaN(t)||(i[0]=t),isNaN(e)||(i[1]=e)},Sh.prototype.isBlank=function(){return this._isBlank},Sh.prototype.setBlank=function(t){this._isBlank=t},Sh.prototype.getLabel=null,_a(Sh),Ma(Sh,{registerWhenExtend:!0}),Mh.createByAxisModel=function(t){var e=t.option,i=e.data,n=i&&p(i,Th);return new Mh({categories:n,needCollect:!n,deduplication:e.dedplication!==!1})};var vL=Mh.prototype;vL.getOrdinal=function(t){return Ih(this).get(t)},vL.parseAndCollect=function(t){var e,i=this._needCollect;if("string"!=typeof t&&!i)return t;if(i&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,e;var n=Ih(this);return e=n.get(t),null==e&&(i?(e=this.categories.length,this.categories[e]=t,n.set(t,e)):e=0/0),e};var yL=Sh.prototype,xL=Sh.extend({type:"ordinal",init:function(t,e){(!t||_(t))&&(t=new Mh({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),yL.contain.call(this,t)&&null!=this._ordinalMeta.categories[t]},normalize:function(t){return yL.normalize.call(this,this.parse(t))},scale:function(t){return Math.round(yL.scale.call(this,t))},getTicks:function(){for(var t=[],e=this._extent,i=e[0];i<=e[1];)t.push(i),i++;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:G,niceExtent:G});xL.create=function(){return new xL};var _L=Tr,wL=Tr,bL=Sh.extend({type:"interval",_interval:0,_intervalPrecision:2,setExtent:function(t,e){var i=this._extent;isNaN(t)||(i[0]=parseFloat(t)),isNaN(e)||(i[1]=parseFloat(e))},unionExtent:function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1]),bL.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=Dh(t)},getTicks:function(t){var e=this._interval,i=this._extent,n=this._niceExtent,a=this._intervalPrecision,o=[];if(!e)return o;var r=1e4;i[0]r)return[];var l=o.length?o[o.length-1]:n[1];return i[1]>l&&o.push(t?wL(l+e,a):i[1]),o},getMinorTicks:function(t){for(var e=this.getTicks(!0),i=[],n=this.getExtent(),a=1;as;){var c=Tr(r+(s+1)*h);c>n[0]&&ca&&(a=-a,n.reverse());var o=Ah(n,t,e,i);this._intervalPrecision=o.intervalPrecision,this._interval=o.interval,this._niceExtent=o.niceTickExtent}},niceExtent:function(t){var e=this._extent;if(e[0]===e[1])if(0!==e[0]){var i=e[0];t.fixMax?e[0]-=i/2:(e[1]+=i/2,e[0]-=i/2)}else e[1]=1;var n=e[1]-e[0];isFinite(n)||(e[0]=0,e[1]=1),this.niceTicks(t.splitNumber,t.minInterval,t.maxInterval);var a=this._interval;t.fixMin||(e[0]=wL(Math.floor(e[0]/a)*a)),t.fixMax||(e[1]=wL(Math.ceil(e[1]/a)*a))}});bL.create=function(){return new bL};var SL="__ec_stack_",ML=.5,IL="undefined"!=typeof Float32Array?Float32Array:Array,TL={seriesType:"bar",plan:PD(),reset:function(t){function e(t,e){for(var i,d=t.count,f=new IL(2*d),p=new IL(2*d),g=new IL(d),m=[],v=[],y=0,x=0;null!=(i=t.next());)v[h]=e.get(s,i),v[1-h]=e.get(l,i),m=n.dataToPoint(v,null,m),p[y]=u?a.x+a.width:m[0],f[y++]=m[0],p[y]=u?m[1]:a.y+a.height,f[y++]=m[1],g[x++]=i;e.setLayout({largePoints:f,largeDataIndices:g,largeBackgroundPoints:p,barWidth:c,valueAxisStart:Wh(o,r,!1),backgroundStart:u?a.x:a.y,valueAxisHorizontal:u})}if(Gh(t)&&Fh(t)){var i=t.getData(),n=t.coordinateSystem,a=n.grid.getRect(),o=n.getBaseAxis(),r=n.getOtherAxis(o),s=i.mapDimension(r.dim),l=i.mapDimension(o.dim),u=r.isHorizontal(),h=u?0:1,c=Bh(Rh([t]),o,t).width;return c>ML||(c=ML),{progress:e}}}},AL=bL.prototype,DL=Math.ceil,CL=Math.floor,LL=1e3,kL=60*LL,PL=60*kL,OL=24*PL,NL=function(t,e,i,n){for(;n>i;){var a=i+n>>>1;t[a][1]o&&(o=e),null!=i&&o>i&&(o=i);var r=RL.length,s=NL(RL,o,0,r),l=RL[Math.min(s,r-1)],u=l[1];if("year"===l[0]){var h=a/u,c=Er(h/t,!0);u*=c}var d=this.getSetting("useUTC")?0:60*new Date(+n[0]||+n[1]).getTimezoneOffset()*1e3,f=[Math.round(DL((n[0]-d)/u)*u+d),Math.round(CL((n[1]-d)/u)*u+d)];Lh(f,n),this._stepLvl=l,this._interval=u,this._niceExtent=f},parse:function(t){return+Nr(t)}});f(["contain","normalize"],function(t){zL.prototype[t]=function(e){return AL[t].call(this,this.parse(e))}});var RL=[["hh:mm:ss",LL],["hh:mm:ss",5*LL],["hh:mm:ss",10*LL],["hh:mm:ss",15*LL],["hh:mm:ss",30*LL],["hh:mm\nMM-dd",kL],["hh:mm\nMM-dd",5*kL],["hh:mm\nMM-dd",10*kL],["hh:mm\nMM-dd",15*kL],["hh:mm\nMM-dd",30*kL],["hh:mm\nMM-dd",PL],["hh:mm\nMM-dd",2*PL],["hh:mm\nMM-dd",6*PL],["hh:mm\nMM-dd",12*PL],["MM-dd\nyyyy",OL],["MM-dd\nyyyy",2*OL],["MM-dd\nyyyy",3*OL],["MM-dd\nyyyy",4*OL],["MM-dd\nyyyy",5*OL],["MM-dd\nyyyy",6*OL],["week",7*OL],["MM-dd\nyyyy",10*OL],["week",14*OL],["week",21*OL],["month",31*OL],["week",42*OL],["month",62*OL],["week",70*OL],["quarter",95*OL],["month",31*OL*4],["month",31*OL*5],["half-year",380*OL/2],["month",31*OL*8],["month",31*OL*10],["year",380*OL]];zL.create=function(t){return new zL({useUTC:t.ecModel.get("useUTC")})};var EL=Sh.prototype,BL=bL.prototype,VL=Cr,GL=Tr,FL=Math.floor,WL=Math.ceil,HL=Math.pow,ZL=Math.log,XL=Sh.extend({type:"log",base:10,$constructor:function(){Sh.apply(this,arguments),this._originalScale=new bL},getTicks:function(t){var e=this._originalScale,i=this._extent,n=e.getExtent();return p(BL.getTicks.call(this,t),function(t){var a=Tr(HL(this.base,t));return a=t===i[0]&&e.__fixMin?Hh(a,n[0]):a,a=t===i[1]&&e.__fixMax?Hh(a,n[1]):a},this)},getMinorTicks:BL.getMinorTicks,getLabel:BL.getLabel,scale:function(t){return t=EL.scale.call(this,t),HL(this.base,t)},setExtent:function(t,e){var i=this.base;t=ZL(t)/ZL(i),e=ZL(e)/ZL(i),BL.setExtent.call(this,t,e)},getExtent:function(){var t=this.base,e=EL.getExtent.call(this);e[0]=HL(t,e[0]),e[1]=HL(t,e[1]);var i=this._originalScale,n=i.getExtent();return i.__fixMin&&(e[0]=Hh(e[0],n[0])),i.__fixMax&&(e[1]=Hh(e[1],n[1])),e},unionExtent:function(t){this._originalScale.unionExtent(t);var e=this.base;t[0]=ZL(t[0])/ZL(e),t[1]=ZL(t[1])/ZL(e),EL.unionExtent.call(this,t)},unionExtentFromData:function(t,e){this.unionExtent(t.getApproximateExtent(e))},niceTicks:function(t){t=t||10;var e=this._extent,i=e[1]-e[0];if(!(1/0===i||0>=i)){var n=zr(i),a=t/i*n;for(.5>=a&&(n*=10);!isNaN(n)&&Math.abs(n)<1&&Math.abs(n)>0;)n*=10;var o=[Tr(WL(e[0]/n)*n),Tr(FL(e[1]/n)*n)];this._interval=n,this._niceExtent=o}},niceExtent:function(t){BL.niceExtent.call(this,t);var e=this._originalScale;e.__fixMin=t.fixMin,e.__fixMax=t.fixMax}});f(["contain","normalize"],function(t){XL.prototype[t]=function(e){return e=ZL(e)/ZL(this.base),EL[t].call(this,e)}}),XL.create=function(){return new XL};var UL={getMin:function(t){var e=this.option,i=t||null==e.rangeStart?e.min:e.rangeStart;return this.axis&&null!=i&&"dataMin"!==i&&"function"!=typeof i&&!A(i)&&(i=this.axis.scale.parse(i)),i},getMax:function(t){var e=this.option,i=t||null==e.rangeEnd?e.max:e.rangeEnd;return this.axis&&null!=i&&"dataMax"!==i&&"function"!=typeof i&&!A(i)&&(i=this.axis.scale.parse(i)),i},getNeedCrossZero:function(){var t=this.option;return null!=t.rangeStart||null!=t.rangeEnd?!1:!t.scale},getCoordSysModel:G,setRange:function(t,e){this.option.rangeStart=t,this.option.rangeEnd=e},resetRange:function(){this.option.rangeStart=this.option.rangeEnd=null}},YL=xo({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var i=e.cx,n=e.cy,a=e.width/2,o=e.height/2;t.moveTo(i,n-o),t.lineTo(i+a,n+o),t.lineTo(i-a,n+o),t.closePath()}}),jL=xo({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var i=e.cx,n=e.cy,a=e.width/2,o=e.height/2;t.moveTo(i,n-o),t.lineTo(i+a,n),t.lineTo(i,n+o),t.lineTo(i-a,n),t.closePath()}}),qL=xo({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var i=e.x,n=e.y,a=e.width/5*3,o=Math.max(a,e.height),r=a/2,s=r*r/(o-r),l=n-o+r+s,u=Math.asin(s/r),h=Math.cos(u)*r,c=Math.sin(u),d=Math.cos(u),f=.6*r,p=.7*r;t.moveTo(i-h,l+s),t.arc(i,l,r,Math.PI-u,2*Math.PI+u),t.bezierCurveTo(i+h-c*f,l+s+d*f,i,n-p,i,n),t.bezierCurveTo(i,n-p,i-h+c*f,l+s+d*f,i-h,l+s),t.closePath()}}),KL=xo({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var i=e.height,n=e.width,a=e.x,o=e.y,r=n/3*2;t.moveTo(a,o),t.lineTo(a+r,o+i),t.lineTo(a,o+i/4*3),t.lineTo(a-r,o+i),t.lineTo(a,o),t.closePath()}}),$L={line:jT,rect:UT,roundRect:UT,square:UT,circle:zT,diamond:jL,pin:qL,arrow:KL,triangle:YL},JL={line:function(t,e,i,n,a){a.x1=t,a.y1=e+n/2,a.x2=t+i,a.y2=e+n/2},rect:function(t,e,i,n,a){a.x=t,a.y=e,a.width=i,a.height=n},roundRect:function(t,e,i,n,a){a.x=t,a.y=e,a.width=i,a.height=n,a.r=Math.min(i,n)/4},square:function(t,e,i,n,a){var o=Math.min(i,n);a.x=t,a.y=e,a.width=o,a.height=o},circle:function(t,e,i,n,a){a.cx=t+i/2,a.cy=e+n/2,a.r=Math.min(i,n)/2},diamond:function(t,e,i,n,a){a.cx=t+i/2,a.cy=e+n/2,a.width=i,a.height=n},pin:function(t,e,i,n,a){a.x=t+i/2,a.y=e+n/2,a.width=i,a.height=n},arrow:function(t,e,i,n,a){a.x=t+i/2,a.y=e+n/2,a.width=i,a.height=n},triangle:function(t,e,i,n,a){a.cx=t+i/2,a.cy=e+n/2,a.width=i,a.height=n}},QL={};f($L,function(t,e){QL[e]=new t});var tk=xo({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(t,e,i){var n=$i(t,e,i),a=this.shape;return a&&"pin"===a.symbolType&&"inside"===e.textPosition&&(n.y=i.y+.4*i.height),n},buildPath:function(t,e,i){var n=e.symbolType;if("none"!==n){var a=QL[n];a||(n="rect",a=QL[n]),JL[n](e.x,e.y,e.width,e.height,a.shape),a.buildPath(t,a.shape,i)}}}),ek={isDimensionStacked:yh,enableDataStack:vh,getStackedDimension:xh},ik=(Object.freeze||Object)({createList:nc,getLayoutRect:es,dataStack:ek,createScale:ac,mixinAxisModelCommonMethods:oc,completeDimensions:ch,createDimensions:gL,createSymbol:ic}),nk=1e-8;lc.prototype={constructor:lc,properties:null,getBoundingRect:function(){var t=this._rect;if(t)return t;for(var e=Number.MAX_VALUE,i=[e,e],n=[-e,-e],a=[],o=[],r=this.geometries,s=0;sn;n++)if("polygon"===i[n].type){var o=i[n].exterior,r=i[n].interiors;if(sc(o,t[0],t[1])){for(var s=0;s<(r?r.length:0);s++)if(sc(r[s]))continue t;return!0}}return!1},transformTo:function(t,e,i,n){var a=this.getBoundingRect(),o=a.width/a.height;i?n||(n=i/o):i=o*n;for(var r=new Ti(t,e,i,n),s=a.calculateTransform(r),l=this.geometries,u=0;u0}),function(t){var i=t.properties,n=t.geometry,a=n.coordinates,o=[];"Polygon"===n.type&&o.push({type:"polygon",exterior:a[0],interiors:a.slice(1)}),"MultiPolygon"===n.type&&f(a,function(t){t[0]&&o.push({type:"polygon",exterior:t[0],interiors:t.slice(1)})});var r=new lc(i[e||"name"],o,i.cp);return r.properties=i,r})},ok=ca(),rk=[0,1],sk=function(t,e,i){this.dim=t,this.scale=e,this._extent=i||[0,0],this.inverse=!1,this.onBand=!1};sk.prototype={constructor:sk,contain:function(t){var e=this._extent,i=Math.min(e[0],e[1]),n=Math.max(e[0],e[1]);return t>=i&&n>=t},containData:function(t){return this.scale.contain(t)},getExtent:function(){return this._extent.slice()},getPixelPrecision:function(t){return Lr(t||this.scale.getExtent(),this._extent)},setExtent:function(t,e){var i=this._extent;i[0]=t,i[1]=e},dataToCoord:function(t,e){var i=this._extent,n=this.scale;return t=n.normalize(t),this.onBand&&"ordinal"===n.type&&(i=i.slice(),Ic(i,n.count())),Mr(t,rk,i,e)},coordToData:function(t,e){var i=this._extent,n=this.scale;this.onBand&&"ordinal"===n.type&&(i=i.slice(),Ic(i,n.count()));var a=Mr(t,i,rk,e);return this.scale.scale(a)},pointToData:function(){},getTicksCoords:function(t){t=t||{};var e=t.tickModel||this.getTickModel(),i=dc(this,e),n=i.ticks,a=p(n,function(t){return{coord:this.dataToCoord(t),tickValue:t}},this),o=e.get("alignWithLabel");return Tc(this,a,o,t.clamp),a},getMinorTicksCoords:function(){if("ordinal"===this.scale.type)return[];var t=this.model.getModel("minorTick"),e=t.get("splitNumber");e>0&&100>e||(e=5);var i=this.scale.getMinorTicks(e),n=p(i,function(t){return p(t,function(t){return{coord:this.dataToCoord(t),tickValue:t}},this)},this);return n},getViewLabels:function(){return cc(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(),i=e[1]-e[0]+(this.onBand?1:0);0===i&&(i=1);var n=Math.abs(t[1]-t[0]);return Math.abs(n)/i},isHorizontal:null,getRotate:null,calculateCategoryInterval:function(){return wc(this)}};var lk=ak,uk={};f(["map","each","filter","indexOf","inherits","reduce","filter","bind","curry","isArray","isString","isObject","isFunction","extend","defaults","clone","merge"],function(t){uk[t]=xS[t]});var hk={};f(["extendShape","extendPath","makePath","makeImage","mergePath","resizePath","createIcon","setHoverStyle","setLabelStyle","setTextStyle","setText","getFont","updateProps","initProps","getTransform","clipPointsByRect","clipRectByRect","registerShape","getShapeClass","Group","Image","Text","Circle","Sector","Ring","Polygon","Polyline","Rect","Line","BezierCurve","Arc","IncrementalDisplayable","CompoundPath","LinearGradient","RadialGradient","BoundingRect"],function(t){hk[t]=vA[t]});var ck=function(t){this._axes={},this._dimList=[],this.name=t||""};ck.prototype={constructor:ck,type:"cartesian",getAxis:function(t){return this._axes[t]},getAxes:function(){return p(this._dimList,Ac,this)},getAxesByScale:function(t){return t=t.toLowerCase(),m(this.getAxes(),function(e){return e.scale.type===t})},addAxis:function(t){var e=t.dim;this._axes[e]=t,this._dimList.push(e)},dataToCoord:function(t){return this._dataCoordConvert(t,"dataToCoord")},coordToData:function(t){return this._dataCoordConvert(t,"coordToData")},_dataCoordConvert:function(t,e){for(var i=this._dimList,n=t instanceof Array?[]:{},a=0;ae[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(dk,sk);var fk={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)"]}}},pk={};pk.categoryAxis=a({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},fk),pk.valueAxis=a({boundaryGap:[0,0],splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#eee",width:1}}},fk),pk.timeAxis=s({scale:!0,min:"dataMin",max:"dataMax"},pk.valueAxis),pk.logAxis=s({scale:!0,logBase:10},pk.valueAxis);var gk=["value","category","time","log"],mk=function(t,e,i,n){f(gk,function(r){e.extend({type:t+"Axis."+r,mergeDefaultAndTheme:function(e,n){var o=this.layoutMode,s=o?os(e):{},l=n.getTheme();a(e,l.get(r+"Axis")),a(e,this.getDefaultOption()),e.type=i(t,e),o&&as(e,s,o)},optionUpdated:function(){var t=this.option;"category"===t.type&&(this.__ordinalMeta=Mh.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:o([{},pk[r+"Axis"],n],!0)})}),WA.registerSubTypeDefaulter(t+"Axis",x(i,t))},vk=WA.extend({type:"cartesian2dAxis",axis:null,init:function(){vk.superApply(this,"init",arguments),this.resetRange()},mergeOption:function(){vk.superApply(this,"mergeOption",arguments),this.resetRange()},restoreData:function(){vk.superApply(this,"restoreData",arguments),this.resetRange()},getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"grid",index:this.option.gridIndex,id:this.option.gridId})[0]}});a(vk.prototype,UL);var yk={offset:0};mk("x",vk,Cc,yk),mk("y",vk,Cc,yk),WA.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 xk=kc.prototype;xk.type="grid",xk.axisPointerEnabled=!0,xk.getRect=function(){return this._rect},xk.update=function(t,e){var i=this._axesMap;this._updateScale(t,this.model),f(i.x,function(t){Uh(t.scale,t.model)}),f(i.y,function(t){Uh(t.scale,t.model)});var n={};f(i.x,function(t){Pc(i,"y",t,n)}),f(i.y,function(t){Pc(i,"x",t,n)}),this.resize(this.model,e)},xk.resize=function(t,e,i){function n(){f(o,function(t){var e=t.isHorizontal(),i=e?[0,a.width]:[0,a.height],n=t.inverse?1:0;t.setExtent(i[n],i[1-n]),Nc(t,e?a.x:a.y)})}var a=es(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()});this._rect=a;var o=this._axesList;n(),!i&&t.get("containLabel")&&(f(o,function(t){if(!t.model.get("axisLabel.inside")){var e=$h(t);if(e){var i=t.isHorizontal()?"height":"width",n=t.model.get("axisLabel.margin");a[i]-=e[i]+n,"top"===t.position?a.y+=e.height+n:"left"===t.position&&(a.x+=e.width+n)}}}),n())},xk.getAxis=function(t,e){var i=this._axesMap[t];if(null!=i){if(null==e)for(var n in i)if(i.hasOwnProperty(n))return i[n];return i[e]}},xk.getAxes=function(){return this._axesList.slice()},xk.getCartesian=function(t,e){if(null!=t&&null!=e){var i="x"+t+"y"+e;return this._coordsMap[i]}S(t)&&(e=t.yAxisIndex,t=t.xAxisIndex);for(var n=0,a=this._coordsList;nt&&(t=e),t},defaultOption:{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1}}});var bk=AI([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["stroke","barBorderColor"],["lineWidth","barBorderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),Sk={getBarItemStyle:function(t){var e=bk(this,t);if(this.getBorderLineDash){var i=this.getBorderLineDash();i&&(e.lineDash=i)}return e}},Mk=xo({type:"sausage",shape:{cx:0,cy:0,r0:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},buildPath:function(t,e){var i=e.cx,n=e.cy,a=Math.max(e.r0||0,0),o=Math.max(e.r,0),r=.5*(o-a),s=a+r,l=e.startAngle,u=e.endAngle,h=e.clockwise,c=Math.cos(l),d=Math.sin(l),f=Math.cos(u),p=Math.sin(u),g=h?u-l<2*Math.PI:l-u<2*Math.PI; +g&&(t.moveTo(c*a+i,d*a+n),t.arc(c*s+i,d*s+n,r,-Math.PI+l,l,!h)),t.arc(i,n,o,l,u,!h),t.moveTo(f*o+i,p*o+n),t.arc(f*s+i,p*s+n,r,u-2*Math.PI,u-Math.PI,!h),0!==a&&(t.arc(i,n,a,u,l,h),t.moveTo(c*a+i,p*a+n)),t.closePath()}}),Ik=["itemStyle","barBorderWidth"],Tk=[0,0];r(vr.prototype,Sk),Gu({type:"bar",render:function(t,e,i){this._updateDrawMode(t);var n=t.get("coordinateSystem");return("cartesian2d"===n||"polar"===n)&&(this._isLargeDraw?this._renderLarge(t,e,i):this._renderNormal(t,e,i)),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,i=this.group,n=t.getData(),a=this._data,o=t.coordinateSystem,r=o.getBaseAxis();"cartesian2d"===o.type?e=r.isHorizontal():"polar"===o.type&&(e="angle"===r.dim);var s=t.isAnimationEnabled()?t:null,l=t.get("clip",!0),u=Hc(o,n);i.removeClipPath();var h=t.get("roundCap",!0),c=t.get("showBackground",!0),d=t.getModel("backgroundStyle"),f=d.get("barBorderRadius")||0,p=[],g=this._backgroundEls||[],m=function(t){var i=kk[o.type](n,t),a=td(o,e,i);return a.useStyle(d.getBarItemStyle()),"cartesian2d"===o.type&&a.setShape("r",f),p[t]=a,a};n.diff(a).add(function(a){var r=n.getItemModel(a),d=kk[o.type](n,a,r);if(c&&m(a),n.hasValue(a)){if(l){var f=Ck[o.type](u,d);if(f)return void i.remove(p)}var p=Lk[o.type](a,d,e,s,!1,h);n.setItemGraphicEl(a,p),i.add(p),Yc(p,n,a,r,d,t,e,"polar"===o.type)}}).update(function(r,v){var y=n.getItemModel(r),x=kk[o.type](n,r,y);if(c){var _;0===g.length?_=m(v):(_=g[v],_.useStyle(d.getBarItemStyle()),"cartesian2d"===o.type&&_.setShape("r",f),p[r]=_);var w=kk[o.type](n,r),b=Qc(e,w,o);ar(_,{shape:b},s,r)}var S=a.getItemGraphicEl(v);if(!n.hasValue(r))return void i.remove(S);if(l){var M=Ck[o.type](u,x);if(M)return void i.remove(S)}S?ar(S,{shape:x},s,r):S=Lk[o.type](r,x,e,s,!0,h),n.setItemGraphicEl(r,S),i.add(S),Yc(S,n,r,y,x,t,e,"polar"===o.type)}).remove(function(t){var e=a.getItemGraphicEl(t);"cartesian2d"===o.type?e&&Zc(t,s,e):e&&Xc(t,s,e)}).execute();var v=this._backgroundGroup||(this._backgroundGroup=new xM);v.removeAll();for(var y=0;yi&&(e.x+=e.width,e.width=-e.width),0>n&&(e.y+=e.height,e.height=-e.height);var a=Ak(e.x,t.x),o=Dk(e.x+e.width,t.x+t.width),r=Ak(e.y,t.y),s=Dk(e.y+e.height,t.y+t.height);e.x=a,e.y=r,e.width=o-a,e.height=s-r;var l=e.width<0||e.height<0;return 0>i&&(e.x+=e.width,e.width=-e.width),0>n&&(e.y+=e.height,e.height=-e.height),l},polar:function(t,e){var i=e.r0<=e.r?1:-1;if(0>i){var n=e.r;e.r=e.r0,e.r0=n}var n=Dk(e.r,t.r),a=Ak(e.r0,t.r0);e.r=n,e.r0=a;var o=0>n-a;if(0>i){var n=e.r;e.r=e.r0,e.r0=n}return o}},Lk={cartesian2d:function(t,e,i,n,a){var o=new UT({shape:r({},e),z2:1});if(o.name="item",n){var s=o.shape,l=i?"height":"width",u={};s[l]=0,u[l]=e[l],vA[a?"updateProps":"initProps"](o,{shape:u},n,t)}return o},polar:function(t,e,i,n,a,o){var r=e.startAngle0?1:-1,r=n.height>0?1:-1;return{x:n.x+o*a/2,y:n.y+r*a/2,width:n.width-o*a,height:n.height-r*a}},polar:function(t,e){var i=t.getItemLayout(e);return{cx:i.cx,cy:i.cy,r0:i.r0,r:i.r,startAngle:i.startAngle,endAngle:i.endAngle}}},Pk=ao.extend({type:"largeBar",shape:{points:[]},buildPath:function(t,e){for(var i=e.points,n=this.__startPoint,a=this.__baseDimIdx,o=0;o=0?i:null},30,!1),Nk=Math.PI,zk=function(t,e){this.opt=e,this.axisModel=t,s(e,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0}),this.group=new xM;var i=new xM({position:e.position.slice(),rotation:e.rotation});i.updateTransform(),this._transform=i.transform,this._dumbGroup=i};zk.prototype={constructor:zk,hasBuilder:function(t){return!!Rk[t]},add:function(t){Rk[t].call(this)},getGroup:function(){return this.group}};var Rk={axisLine:function(){var t=this.opt,e=this.axisModel;if(e.get("axisLine.show")){var i=this.axisModel.axis.getExtent(),n=this._transform,a=[i[0],0],o=[i[1],0];n&&(oe(a,a,n),oe(o,o,n));var s=r({lineCap:"round"},e.getModel("axisLine.lineStyle").getLineStyle());this.group.add(new jT({anid:"line",subPixelOptimize:!0,shape:{x1:a[0],y1:a[1],x2:o[0],y2:o[1]},style:s,strokeContainThreshold:t.strokeContainThreshold||5,silent:!0,z2:1}));var l=e.get("axisLine.symbol"),u=e.get("axisLine.symbolSize"),h=e.get("axisLine.symbolOffset")||0;if("number"==typeof h&&(h=[h,h]),null!=l){"string"==typeof l&&(l=[l,l]),("string"==typeof u||"number"==typeof u)&&(u=[u,u]);var c=u[0],d=u[1];f([{rotate:t.rotation+Math.PI/2,offset:h[0],r:0},{rotate:t.rotation-Math.PI/2,offset:h[1],r:Math.sqrt((a[0]-o[0])*(a[0]-o[0])+(a[1]-o[1])*(a[1]-o[1]))}],function(e,i){if("none"!==l[i]&&null!=l[i]){var n=ic(l[i],-c/2,-d/2,c,d,s.stroke,!0),o=e.r+e.offset,r=[a[0]+o*Math.cos(t.rotation),a[1]-o*Math.sin(t.rotation)];n.attr({rotation:e.rotate,position:r,silent:!0,z2:11}),this.group.add(n)}},this)}}},axisTickLabel:function(){var t=this.axisModel,e=this.opt,i=sd(this,t,e),n=ud(this,t,e);id(t,n,i),ld(this,t,e)},axisName:function(){var t=this.opt,e=this.axisModel,i=D(t.axisName,e.get("name"));if(i){var n,a=e.get("nameLocation"),o=t.nameDirection,s=e.getModel("nameTextStyle"),l=e.get("nameGap")||0,u=this.axisModel.axis.getExtent(),h=u[0]>u[1]?-1:1,c=["start"===a?u[0]-h*l:"end"===a?u[1]+h*l:(u[0]+u[1])/2,od(a)?t.labelOffset+o*l:0],d=e.get("nameRotate");null!=d&&(d=d*Nk/180);var f;od(a)?n=Bk(t.rotation,null!=d?d:t.rotation,o):(n=ed(t,a,d||0,u),f=t.axisNameAvailableWidth,null!=f&&(f=Math.abs(f/Math.sin(n.rotation)),!isFinite(f)&&(f=null)));var p=s.getFont(),g=e.get("nameTruncate",!0)||{},m=g.ellipsis,v=D(t.nameTruncateMaxWidth,g.maxWidth,f),y=null!=m&&null!=v?NA(i,v,p,m,{minChar:2,placeholder:g.placeholder}):i,x=e.get("tooltip",!0),_=e.mainType,w={componentType:_,name:i,$vars:["name"]};w[_+"Index"]=e.componentIndex;var b=new NT({anid:"name",__fullText:i,__truncatedText:y,position:c,rotation:n.rotation,silent:Vk(e),z2:1,tooltip:x&&x.show?r({content:i,formatter:function(){return i},formatterParams:w},x):null});jo(b.style,s,{text:y,textFont:p,textFill:s.getTextColor()||e.get("axisLine.lineStyle.color"),textAlign:s.get("align")||n.textAlign,textVerticalAlign:s.get("verticalAlign")||n.textVerticalAlign}),e.get("triggerEvent")&&(b.eventData=Ek(e),b.eventData.targetType="axisName",b.eventData.name=i),this._dumbGroup.add(b),b.updateTransform(),this.group.add(b),b.decomposeTransform()}}},Ek=zk.makeAxisEventDataBase=function(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e},Bk=zk.innerTextLayout=function(t,e,i){var n,a,o=Pr(e-t);return Or(o)?(a=i>0?"top":"bottom",n="center"):Or(o-Nk)?(a=i>0?"bottom":"top",n="center"):(a="middle",n=o>0&&Nk>o?i>0?"right":"left":i>0?"left":"right"),{rotation:o,textAlign:n,textVerticalAlign:a}},Vk=zk.isLabelSilent=function(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)},Gk=f,Fk=x,Wk=Bu({type:"axis",_axisPointer:null,axisPointerClass:null,render:function(t,e,i,n){this.axisPointerClass&&md(t),Wk.superApply(this,"render",arguments),wd(this,t,e,i,n,!0)},updateAxisPointer:function(t,e,i,n){wd(this,t,e,i,n,!1)},remove:function(t,e){var i=this._axisPointer;i&&i.remove(e),Wk.superApply(this,"remove",arguments)},dispose:function(t,e){bd(this,e),Wk.superApply(this,"dispose",arguments)}}),Hk=[];Wk.registerAxisPointerClass=function(t,e){Hk[t]=e},Wk.getAxisPointerClass=function(t){return t&&Hk[t]};var Zk=["axisLine","axisTickLabel","axisName"],Xk=["splitArea","splitLine","minorSplitLine"],Uk=Wk.extend({type:"cartesianAxis",axisPointerClass:"CartesianAxisPointer",render:function(t,e,i,n){this.group.removeAll();var a=this._axisGroup;if(this._axisGroup=new xM,this.group.add(this._axisGroup),t.get("show")){var o=t.getCoordSysModel(),r=Sd(o,t),s=new zk(t,r);f(Zk,s.add,s),this._axisGroup.add(s.getGroup()),f(Xk,function(e){t.get(e+".show")&&this["_"+e](t,o)},this),ur(a,this._axisGroup,t),Uk.superCall(this,"render",t,e,i,n)}},remove:function(){Id(this)},_splitLine:function(t,e){var i=t.axis;if(!i.scale.isBlank()){var n=t.getModel("splitLine"),a=n.getModel("lineStyle"),o=a.get("color");o=_(o)?o:[o];for(var r=e.coordinateSystem.getRect(),l=i.isHorizontal(),u=0,h=i.getTicksCoords({tickModel:n}),c=[],d=[],f=a.getLineStyle(),p=0;p0&&Bd(i[a-1]);a--);for(;a>n&&Bd(i[n]);n++);}for(;a>n;)n+=Vd(t,i,n,a,a,1,o.min,o.max,e.smooth,e.smoothMonotone,e.connectNulls)+1}}),uP=ao.extend({type:"ec-polygon",shape:{points:[],stackedOnPoints:[],smooth:0,stackedOnSmooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},brush:ET(ao.prototype.brush),buildPath:function(t,e){var i=e.points,n=e.stackedOnPoints,a=0,o=i.length,r=e.smoothMonotone,s=Wd(i,e.smoothConstraint),l=Wd(n,e.smoothConstraint);if(e.connectNulls){for(;o>0&&Bd(i[o-1]);o--);for(;o>a&&Bd(i[a]);a++);}for(;o>a;){var u=Vd(t,i,a,o,o,1,s.min,s.max,e.smooth,r,e.connectNulls);Vd(t,n,a+u-1,u,o,-1,l.min,l.max,e.stackedOnSmooth,r,e.connectNulls),a+=u+1,t.closePath()}}});vl.extend({type:"line",init:function(){var t=new xM,e=new Ld;this.group.add(e.group),this._symbolDraw=e,this._lineGroup=t},render:function(t,e,i){var n=t.coordinateSystem,a=this.group,o=t.getData(),r=t.getModel("lineStyle"),l=t.getModel("areaStyle"),u=o.mapArray(o.getItemLayout),h="polar"===n.type,c=this._coordSys,d=this._symbolDraw,f=this._polyline,p=this._polygon,g=this._lineGroup,m=t.get("animation"),v=!l.isEmpty(),y=l.get("origin"),x=Nd(n,o,y),_=Ud(n,o,x),w=t.get("showSymbol"),b=w&&!h&&qd(t,o,n),S=this._data;S&&S.eachItemGraphicEl(function(t,e){t.__temp&&(a.remove(t),S.setItemGraphicEl(e,null))}),w||d.remove(),a.add(g);var M,I=!h&&t.get("step");n&&n.getArea&&t.get("clip",!0)&&(M=n.getArea(),null!=M.width?(M.x-=.1,M.y-=.1,M.width+=.2,M.height+=.2):M.r0&&(M.r0-=.5,M.r1+=.5)),this._clipShapeForSymbol=M,f&&c.type===n.type&&I===this._step?(v&&!p?p=this._newPolygon(u,_,n,m):p&&!v&&(g.remove(p),p=this._polygon=null),g.setClipPath($d(n,!1,t)),w&&d.updateData(o,{isIgnore:b,clipShape:M}),o.eachItemGraphicEl(function(t){t.stopAnimation(!0)}),Hd(this._stackedOnPoints,_)&&Hd(this._points,u)||(m?this._updateAnimation(o,_,n,i,I,y):(I&&(u=Yd(u,n,I),_=Yd(_,n,I)),f.setShape({points:u}),p&&p.setShape({points:u,stackedOnPoints:_})))):(w&&d.updateData(o,{isIgnore:b,clipShape:M}),I&&(u=Yd(u,n,I),_=Yd(_,n,I)),f=this._newPolyline(u,n,m),v&&(p=this._newPolygon(u,_,n,m)),g.setClipPath($d(n,!0,t)));var T=jd(o,n)||o.getVisual("color");f.useStyle(s(r.getLineStyle(),{fill:"none",stroke:T,lineJoin:"bevel"}));var A=t.get("smooth");if(A=Xd(t.get("smooth")),f.setShape({smooth:A,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")}),p){var D=o.getCalculationInfo("stackedOnSeries"),C=0;p.useStyle(s(l.getAreaStyle(),{fill:T,opacity:.7,lineJoin:"bevel"})),D&&(C=Xd(D.get("smooth"))),p.setShape({smooth:A,stackedOnSmooth:C,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")})}this._data=o,this._coordSys=n,this._stackedOnPoints=_,this._points=u,this._step=I,this._valueOrigin=y},dispose:function(){},highlight:function(t,e,i,n){var a=t.getData(),o=ha(a,n);if(!(o instanceof Array)&&null!=o&&o>=0){var r=a.getItemGraphicEl(o);if(!r){var s=a.getItemLayout(o);if(!s)return;if(this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(s[0],s[1]))return;r=new Td(a,o),r.position=s,r.setZ(t.get("zlevel"),t.get("z")),r.ignore=isNaN(s[0])||isNaN(s[1]),r.__temp=!0,a.setItemGraphicEl(o,r),r.stopSymbolAnimation(!0),this.group.add(r)}r.highlight()}else vl.prototype.highlight.call(this,t,e,i,n)},downplay:function(t,e,i,n){var a=t.getData(),o=ha(a,n);if(null!=o&&o>=0){var r=a.getItemGraphicEl(o);r&&(r.__temp?(a.setItemGraphicEl(o,null),this.group.remove(r)):r.downplay())}else vl.prototype.downplay.call(this,t,e,i,n)},_newPolyline:function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new lP({shape:{points:t},silent:!0,z2:10}),this._lineGroup.add(e),this._polyline=e,e},_newPolygon:function(t,e){var i=this._polygon;return i&&this._lineGroup.remove(i),i=new uP({shape:{points:t,stackedOnPoints:e},silent:!0}),this._lineGroup.add(i),this._polygon=i,i},_updateAnimation:function(t,e,i,n,a,o){var r=this._polyline,s=this._polygon,l=t.hostModel,u=tP(this._data,t,this._stackedOnPoints,e,this._coordSys,i,this._valueOrigin,o),h=u.current,c=u.stackedOnCurrent,d=u.next,f=u.stackedOnNext;if(a&&(h=Yd(u.current,i,a),c=Yd(u.stackedOnCurrent,i,a),d=Yd(u.next,i,a),f=Yd(u.stackedOnNext,i,a)),Zd(h,d)>3e3||s&&Zd(c,f)>3e3)return r.setShape({points:d}),void(s&&s.setShape({points:d,stackedOnPoints:f}));r.shape.__points=u.current,r.shape.points=h,ar(r,{shape:{points:d}},l),s&&(s.setShape({points:h,stackedOnPoints:c}),ar(s,{shape:{points:d,stackedOnPoints:f}},l));for(var p=[],g=u.status,m=0;me&&(e=t[i]);return isFinite(e)?e:0/0},min:function(t){for(var e=1/0,i=0;i1){var u;"string"==typeof i?u=dP[i]:"function"==typeof i&&(u=i),u&&t.setData(e.downSample(e.mapDimension(o.dim),1/l,u,fP))}}}}};Nu(hP("line","circle","line")),Ou(cP("line")),Du(OC.PROCESSOR.STATISTIC,pP("line"));var gP=function(t,e,i){e=_(e)&&{coordDimensions:e}||r({},e);var n=t.getSource(),a=gL(n,e),o=new dL(a,t);return o.initData(n,i),o},mP={updateSelectedMap:function(t){this._targetList=_(t)?t.slice():[],this._selectTargetMap=g(t||[],function(t,e){return t.set(e.name,e),t},B())},select:function(t,e){var i=null!=e?this._targetList[e]:this._selectTargetMap.get(t),n=this.get("selectedMode");"single"===n&&this._selectTargetMap.each(function(t){t.selected=!1}),i&&(i.selected=!0)},unSelect:function(t,e){var i=null!=e?this._targetList[e]:this._selectTargetMap.get(t);i&&(i.selected=!1)},toggleSelected:function(t,e){var i=null!=e?this._targetList[e]:this._selectTargetMap.get(t);return null!=i?(this[i.selected?"unSelect":"select"](t,e),i.selected):void 0},isSelected:function(t,e){var i=null!=e?this._targetList[e]:this._selectTargetMap.get(t);return i&&i.selected}},vP=Vu({type:"series.pie",init:function(t){vP.superApply(this,"init",arguments),this.legendVisualProvider=new Jd(y(this.getData,this),y(this.getRawData,this)),this.updateSelectedMap(this._createSelectableList()),this._defaultLabelLine(t)},mergeOption:function(t){vP.superCall(this,"mergeOption",t),this.updateSelectedMap(this._createSelectableList())},getInitialData:function(){return gP(this,{coordDimensions:["value"],encodeDefaulter:x(xs,this)})},_createSelectableList:function(){for(var t=this.getRawData(),e=t.mapDimension("value"),i=[],n=0,a=t.count();a>n;n++)i.push({name:t.getName(n),value:t.get(e,n),selected:al(t,n,"selected")});return i},getDataParams:function(t){var e=this.getData(),i=vP.superCall(this,"getDataParams",t),n=[];return e.each(e.mapDimension("value"),function(t){n.push(t)}),i.percent=kr(n,t,e.hostModel.get("percentPrecision")),i.$vars.push("percent"),i},_defaultLabelLine:function(t){ia(t,"labelLine",["show"]);var e=t.labelLine,i=t.emphasis.labelLine;e.show=e.show&&t.label.show,i.show=i.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,minShowLabelAngle:0,selectedOffset:10,hoverOffset:10,avoidLabelOverlap:!0,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:!1,show:!0,position:"outer",alignTo:"none",margin:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1},animationType:"expansion",animationTypeUpdate:"transition",animationEasing:"cubicOut"}});c(vP,mP);var yP=ef.prototype;yP.updateData=function(t,e,i){var n=this.childAt(0),a=this.childAt(1),o=this.childAt(2),l=t.hostModel,u=t.getItemModel(e),h=t.getItemLayout(e),c=r({},h);c.label=null;var d=l.getShallow("animationTypeUpdate");if(i){n.setShape(c);var f=l.getShallow("animationType");"scale"===f?(n.shape.r=h.r0,or(n,{shape:{r:h.r}},l,e)):(n.shape.endAngle=h.startAngle,ar(n,{shape:{endAngle:h.endAngle}},l,e))}else"expansion"===d?n.setShape(c):ar(n,{shape:c},l,e);var p=t.getItemVisual(e,"color");n.useStyle(s({lineJoin:"bevel",fill:p},u.getModel("itemStyle").getItemStyle())),n.hoverStyle=u.getModel("emphasis.itemStyle").getItemStyle();var g=u.getShallow("cursor");g&&n.attr("cursor",g),tf(this,t.getItemLayout(e),l.isSelected(t.getName(e)),l.get("selectedOffset"),l.get("animation"));var m=!i&&"transition"===d;this._updateLabel(t,e,m),this.highDownOnUpdate=l.get("silent")?null:function(t,e){var i=l.isAnimationEnabled()&&u.get("hoverAnimation");"emphasis"===e?(a.ignore=a.hoverIgnore,o.ignore=o.hoverIgnore,i&&(n.stopAnimation(!0),n.animateTo({shape:{r:h.r+l.get("hoverOffset")}},300,"elasticOut"))):(a.ignore=a.normalIgnore,o.ignore=o.normalIgnore,i&&(n.stopAnimation(!0),n.animateTo({shape:{r:h.r}},300,"elasticOut")))},Wo(this)},yP._updateLabel=function(t,e,i){var n=this.childAt(1),a=this.childAt(2),o=t.hostModel,r=t.getItemModel(e),s=t.getItemLayout(e),l=s.label,u=t.getItemVisual(e,"color");if(!l||isNaN(l.x)||isNaN(l.y))return void(a.ignore=a.normalIgnore=a.hoverIgnore=n.ignore=n.normalIgnore=n.hoverIgnore=!0);var h={points:l.linePoints||[[l.x,l.y],[l.x,l.y],[l.x,l.y]]},c={x:l.x,y:l.y};i?(ar(n,{shape:h},o,e),ar(a,{style:c},o,e)):(n.attr({shape:h}),a.attr({style:c})),a.attr({rotation:l.rotation,origin:[l.x,l.y],z2:10});var d=r.getModel("label"),f=r.getModel("emphasis.label"),p=r.getModel("labelLine"),g=r.getModel("emphasis.labelLine"),u=t.getItemVisual(e,"color");Uo(a.style,a.hoverStyle={},d,f,{labelFetcher:t.hostModel,labelDataIndex:e,defaultText:l.text,autoColor:u,useInsideStyle:!!l.inside},{textAlign:l.textAlign,textVerticalAlign:l.verticalAlign,opacity:t.getItemVisual(e,"opacity")}),a.ignore=a.normalIgnore=!d.get("show"),a.hoverIgnore=!f.get("show"),n.ignore=n.normalIgnore=!p.get("show"),n.hoverIgnore=!g.get("show"),n.setStyle({stroke:u,opacity:t.getItemVisual(e,"opacity")}),n.setStyle(p.getModel("lineStyle").getLineStyle()),n.hoverStyle=g.getModel("lineStyle").getLineStyle();var m=p.get("smooth");m&&m===!0&&(m=.4),n.setShape({smooth:m})},h(ef,xM);var xP=(vl.extend({type:"pie",init:function(){var t=new xM;this._sectorGroup=t},render:function(t,e,i,n){if(!n||n.from!==this.uid){var a=t.getData(),o=this._data,r=this.group,s=e.get("animation"),l=!o,u=t.get("animationType"),h=t.get("animationTypeUpdate"),c=x(Qd,this.uid,t,s,i),d=t.get("selectedMode");if(a.diff(o).add(function(t){var e=new ef(a,t);l&&"scale"!==u&&e.eachChild(function(t){t.stopAnimation(!0)}),d&&e.on("click",c),a.setItemGraphicEl(t,e),r.add(e)}).update(function(t,e){var i=o.getItemGraphicEl(e);l||"transition"===h||i.eachChild(function(t){t.stopAnimation(!0)}),i.updateData(a,t),i.off("click"),d&&i.on("click",c),r.add(i),a.setItemGraphicEl(t,i)}).remove(function(t){var e=o.getItemGraphicEl(t);r.remove(e)}).execute(),s&&a.count()>0&&(l?"scale"!==u:"transition"!==h)){for(var f=a.getItemLayout(0),p=1;isNaN(f.startAngle)&&p=n.r0}}}),function(t,e){f(e,function(e){e.update="updateView",Lu(e,function(i,n){var a={};return n.eachComponent({mainType:"series",subType:t,query:i},function(t){t[e.method]&&t[e.method](i.name,i.dataIndex);var n=t.getData();n.each(function(e){var i=n.getName(e);a[i]=t.isSelected(i)||!1})}),{name:i.name,selected:a,seriesId:i.seriesId}})})}),_P=function(t){return{getTargetSeries:function(e){var i={},n=B();return e.eachSeriesByType(t,function(t){t.__paletteScope=i,n.set(t.uid,t)}),n},reset:function(t){var e=t.getRawData(),i={},n=t.getData();n.each(function(t){var e=n.getRawIndex(t);i[e]=t}),e.each(function(a){var o,r=i[a],s=null!=r&&n.getItemVisual(r,"color",!0),l=null!=r&&n.getItemVisual(r,"borderColor",!0);if(s&&l||(o=e.getItemModel(a)),!s){var u=o.get("itemStyle.color")||t.getColorFromPalette(e.getName(a)||a+"",t.__paletteScope,e.count());null!=r&&n.setItemVisual(r,"color",u) +}if(!l){var h=o.get("itemStyle.borderColor");null!=r&&n.setItemVisual(r,"borderColor",h)}})}}},wP=Math.PI/180,bP=function(t,e,i,n,a,o){var r,s,l=t.getData(),u=[],h=!1,c=(t.get("minShowLabelAngle")||0)*wP;l.each(function(n){var o=l.getItemLayout(n),d=l.getItemModel(n),f=d.getModel("label"),p=f.get("position")||d.get("emphasis.label.position"),g=f.get("distanceToLabelLine"),m=f.get("alignTo"),v=Ir(f.get("margin"),i),y=f.get("bleedMargin"),x=f.getFont(),_=d.getModel("labelLine"),w=_.get("length");w=Ir(w,i);var b=_.get("length2");if(b=Ir(b,i),!(o.angleD?-1:1)*b,B=R;S="edge"===m?0>D?a+v:a+i-v:E+(0>D?-g:g),M=B,I=[[O,N],[z,R],[E,B]]}T=P?"center":"edge"===m?D>0?"right":"left":D>0?"left":"right"}var V,G=f.get("rotate");V="number"==typeof G?G*(Math.PI/180):G?0>D?-A+Math.PI:-A:0,h=!!V,o.label={x:S,y:M,position:p,height:k.height,len:w,len2:b,linePoints:I,textAlign:T,verticalAlign:"middle",rotation:V,inside:P,labelDistance:g,labelAlignTo:m,labelMargin:v,bleedMargin:y,textRect:k,text:L,font:x},P||u.push(o.label)}}),!h&&t.get("avoidLabelOverlap")&&af(u,r,s,e,i,n,a,o)},SP=2*Math.PI,MP=Math.PI/180,IP=function(t,e,i){e.eachSeriesByType(t,function(t){var e=t.getData(),n=e.mapDimension("value"),a=rf(t,i),o=t.get("center"),r=t.get("radius");_(r)||(r=[0,r]),_(o)||(o=[o,o]);var s=Ir(a.width,i.getWidth()),l=Ir(a.height,i.getHeight()),u=Math.min(s,l),h=Ir(o[0],s)+a.x,c=Ir(o[1],l)+a.y,d=Ir(r[0],u/2),f=Ir(r[1],u/2),p=-t.get("startAngle")*MP,g=t.get("minAngle")*MP,m=0;e.each(n,function(t){!isNaN(t)&&m++});var v=e.getSum(n),y=Math.PI/(v||m)*2,x=t.get("clockwise"),w=t.get("roseType"),b=t.get("stillShowZeroSum"),S=e.getDataExtent(n);S[0]=0;var M=SP,I=0,T=p,A=x?1:-1;if(e.each(n,function(t,i){var n;if(isNaN(t))return void e.setItemLayout(i,{angle:0/0,startAngle:0/0,endAngle:0/0,clockwise:x,cx:h,cy:c,r0:d,r:w?0/0:f,viewRect:a});n="area"!==w?0===v&&b?y:t*y:SP/m,g>n?(n=g,M-=g):I+=t;var o=T+A*n;e.setItemLayout(i,{angle:n,startAngle:T,endAngle:o,clockwise:x,cx:h,cy:c,r0:d,r:w?Mr(t,S,[d,f]):f,viewRect:a}),T=o}),SP>M&&m)if(.001>=M){var D=SP/m;e.each(n,function(t,i){if(!isNaN(t)){var n=e.getItemLayout(i);n.angle=D,n.startAngle=p+A*i*D,n.endAngle=p+A*(i+1)*D}})}else y=M/I,T=p,e.each(n,function(t,i){if(!isNaN(t)){var n=e.getItemLayout(i),a=n.angle===g?g:t*y;n.startAngle=T,n.endAngle=T+A*a,T+=A*a}});bP(t,f,a.width,a.height,a.x,a.y)})},TP=function(t){return{seriesType:t,reset:function(t,e){var i=e.findComponents({mainType:"legend"});if(i&&i.length){var n=t.getData();n.filterSelf(function(t){for(var e=n.getName(t),a=0;a=0;s--){var l=2*s,u=n[l]-o/2,h=n[l+1]-r/2;if(t>=u&&e>=h&&u+o>=t&&h+r>=e)return s}return-1}}),CP=sf.prototype;CP.isPersistent=function(){return!this._incremental},CP.updateData=function(t,e){this.group.removeAll();var i=new DP({rectHover:!0,cursor:"default"});i.setShape({points:t.getLayout("symbolPoints")}),this._setCommon(i,t,!1,e),this.group.add(i),this._incremental=null},CP.updateLayout=function(t){if(!this._incremental){var e=t.getLayout("symbolPoints");this.group.eachChild(function(t){if(null!=t.startIndex){var i=2*(t.endIndex-t.startIndex),n=4*t.startIndex*2;e=new Float32Array(e.buffer,n,i)}t.setShape("points",e)})}},CP.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clearIncremental(),t.count()>2e6?(this._incremental||(this._incremental=new yo({silent:!0})),this.group.add(this._incremental)):this._incremental=null},CP.incrementalUpdate=function(t,e,i){var n;this._incremental?(n=new DP,this._incremental.addDisplayable(n,!0)):(n=new DP({rectHover:!0,cursor:"default",startIndex:t.start,endIndex:t.end}),n.incremental=!0,this.group.add(n)),n.setShape({points:e.getLayout("symbolPoints")}),this._setCommon(n,e,!!this._incremental,i)},CP._setCommon=function(t,e,i,n){var a=e.hostModel;n=n||{};var o=e.getVisual("symbolSize");t.setShape("size",o instanceof Array?o:[o,o]),t.softClipShape=n.clipShape||null,t.symbolProxy=ic(e.getVisual("symbol"),0,0,0,0),t.setColor=t.symbolProxy.setColor;var r=t.shape.size[0]=0&&(t.dataIndex=i+(t.startIndex||0))}))},CP.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},CP._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()},Gu({type:"scatter",render:function(t){var e=t.getData(),i=this._updateSymbolDraw(e,t);i.updateData(e,{clipShape:this._getClipShape(t)}),this._finished=!0},incrementalPrepareRender:function(t){var e=t.getData(),i=this._updateSymbolDraw(e,t);i.incrementalPrepareUpdate(e),this._finished=!1},incrementalRender:function(t,e){this._symbolDraw.incrementalUpdate(t,e.getData(),{clipShape:this._getClipShape(e)}),this._finished=t.end===e.getData().count()},updateTransform:function(t){var e=t.getData();if(this.group.dirty(),!this._finished||e.count()>1e4||!this._symbolDraw.isPersistent())return{update:!0};var i=cP().reset(t);i.progress&&i.progress({start:0,end:e.count()},e),this._symbolDraw.updateLayout(e)},_getClipShape:function(t){var e=t.coordinateSystem,i=e&&e.getArea&&e.getArea();return t.get("clip",!0)?i:null},_updateSymbolDraw:function(t,e){var i=this._symbolDraw,n=e.pipelineContext,a=n.large;return i&&a===this._isLargeDraw||(i&&i.remove(),i=this._symbolDraw=a?new sf:new Ld,this._isLargeDraw=a,this.group.removeAll()),this.group.add(i.group),i},remove:function(){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},dispose:function(){}}),Nu(hP("scatter","circle")),Ou(cP("scatter")),CD.extend({type:"series.effectScatter",dependencies:["grid","polar"],getInitialData:function(){return _h(this.getSource(),this,{useEncodeDefaulter:!0})},brushSelector:"point",defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,effectType:"ripple",progressive:0,showEffectOn:"render",rippleEffect:{period:4,scale:2.5,brushType:"fill"},symbolSize:10}});var LP=3,kP=hf.prototype;kP.stopEffectAnimation=function(){this.childAt(1).removeAll()},kP.startEffectAnimation=function(t){for(var e=t.symbolType,i=t.color,n=this.childAt(1),a=0;LP>a;a++){var o=ic(e,-1,-1,2,2,i);o.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scale:[.5,.5]});var r=-a/LP*t.period+t.effectOffset;o.animate("",!0).when(t.period,{scale:[t.rippleScale/2,t.rippleScale/2]}).delay(r).start(),o.animateStyle(!0).when(t.period,{opacity:0}).delay(r).start(),n.add(o)}uf(n,t)},kP.updateEffectAnimation=function(t){for(var e=this._effectCfg,i=this.childAt(1),n=["symbolType","period","rippleScale"],a=0;a0?WP:HP)}function a(t,e){return e.get(t>0?GP:FP)}var o=t.getData();if(o.setVisual({legendSymbol:"roundRect",colorP:n(1,t),colorN:n(-1,t),borderColorP:a(1,t),borderColorN:a(-1,t)}),!e.isSeriesFiltered(t)){var r=t.pipelineContext.large;return!r&&{progress:i}}}},XP="undefined"!=typeof Float32Array?Float32Array:Array,UP={seriesType:"candlestick",plan:PD(),reset:function(t){function e(t,e){function i(t,e){var i=[];return i[r]=e,i[s]=t,isNaN(e)||isNaN(t)?[0/0,0/0]:n.dataToPoint(i)}function a(t,e,i){var n=e.slice(),a=e.slice();n[r]=pA(n[r]+o/2,1,!1),a[r]=pA(a[r]-o/2,1,!0),i?t.push(n,a):t.push(a,n)}function l(t,e,n){var a=i(t,n),l=i(e,n);return a[r]-=o/2,l[r]-=o/2,{x:a[0],y:a[1],width:s?o:l[0]-a[0],height:s?l[1]-a[1]:o}}function h(t){return t[r]=pA(t[r],1),t}for(var g;null!=(g=t.next());){var m=e.get(u,g),v=e.get(c,g),y=e.get(d,g),x=e.get(f,g),_=e.get(p,g),w=Math.min(v,y),b=Math.max(v,y),S=i(w,m),M=i(b,m),I=i(x,m),T=i(_,m),A=[];a(A,M,0),a(A,S,1),A.push(h(T),h(M),h(I),h(S)),e.setItemLayout(g,{sign:vf(e,g,v,y,d),initBaseline:v>y?M[s]:S[s],ends:A,brushRect:l(x,_,m)})}}function i(t,e){for(var i,a,o=new XP(4*t.count),l=0,h=[],g=[];null!=(a=t.next());){var m=e.get(u,a),v=e.get(c,a),y=e.get(d,a),x=e.get(f,a),_=e.get(p,a);isNaN(m)||isNaN(x)||isNaN(_)?(o[l++]=0/0,l+=3):(o[l++]=vf(e,a,v,y,d),h[r]=m,h[s]=x,i=n.dataToPoint(h,null,g),o[l++]=i?i[0]:0/0,o[l++]=i?i[1]:0/0,h[s]=_,i=n.dataToPoint(h,null,g),o[l++]=i?i[1]:0/0)}e.setLayout("largePoints",o)}var n=t.coordinateSystem,a=t.getData(),o=yf(t,a),r=0,s=1,l=["x","y"],u=a.mapDimension(l[r]),h=a.mapDimension(l[s],!0),c=h[0],d=h[1],f=h[2],p=h[3];return a.setLayout({candleWidth:o,isSimpleBox:1.3>=o}),null==u||h.length<4?void 0:{progress:t.pipelineContext.large?i:e}}};Au(VP),Nu(ZP),Ou(UP),h(xf,sk),_f.prototype.getIndicatorAxes=function(){return this._indicatorAxes},_f.prototype.dataToPoint=function(t,e){var i=this._indicatorAxes[e];return this.coordToPoint(i.dataToCoord(t),e)},_f.prototype.coordToPoint=function(t,e){var i=this._indicatorAxes[e],n=i.angle,a=this.cx+t*Math.cos(n),o=this.cy-t*Math.sin(n);return[a,o]},_f.prototype.pointToData=function(t){var e=t[0]-this.cx,i=t[1]-this.cy,n=Math.sqrt(e*e+i*i);e/=n,i/=n;for(var a,o=Math.atan2(-i,e),r=1/0,s=-1,l=0;lh&&(a=u,s=l,r=h)}return[s,+(a&&a.coordToData(n))]},_f.prototype.resize=function(t,e){var i=t.get("center"),n=e.getWidth(),a=e.getHeight(),o=Math.min(n,a)/2;this.cx=Ir(i[0],n),this.cy=Ir(i[1],a),this.startAngle=t.get("startAngle")*Math.PI/180;var r=t.get("radius");("string"==typeof r||"number"==typeof r)&&(r=[0,r]),this.r0=Ir(r[0],o),this.r=Ir(r[1],o),f(this._indicatorAxes,function(t,e){t.setExtent(this.r0,this.r);var i=this.startAngle+e*Math.PI*2/this._indicatorAxes.length;i=Math.atan2(Math.sin(i),Math.cos(i)),t.angle=i},this)},_f.prototype.update=function(t){function e(t){var e=Math.pow(10,Math.floor(Math.log(t)/Math.LN10)),i=t/e;return 2===i?i=5:i*=2,i*e}var i=this._indicatorAxes,n=this._model;f(i,function(t){t.scale.setExtent(1/0,-1/0)}),t.eachSeriesByType("radar",function(e){if("radar"===e.get("coordinateSystem")&&t.getComponent("radar",e.get("radarIndex"))===n){var a=e.getData();f(i,function(t){t.scale.unionExtentFromData(a,a.mapDimension(t.dim))})}},this);var a=n.get("splitNumber");f(i,function(t){var i=Zh(t.scale,t.model).extent;Uh(t.scale,t.model);var n=t.model,o=t.scale,r=n.getMin(),s=n.getMax(),l=o.getInterval();if(null!=r&&null!=s)o.setExtent(+r,+s),o.setInterval((s-r)/a);else if(null!=r){var u;do u=r+l*a,o.setExtent(+r,u),o.setInterval(l),l=e(l);while(ui[0]&&isFinite(h)&&isFinite(i[0]))}else{var c=o.getTicks().length-1;c>a&&(l=e(l));var u=Math.ceil(i[1]/l)*l,h=Tr(u-l*a);o.setExtent(h,u),o.setInterval(l)}})},_f.dimensions=[],_f.create=function(t,e){var i=[];return t.eachComponent("radar",function(n){var a=new _f(n,t,e);i.push(a),n.coordinateSystem=a}),t.eachSeriesByType("radar",function(t){"radar"===t.get("coordinateSystem")&&(t.coordinateSystem=i[t.get("radarIndex")||0])}),i},ks.register("radar",_f);var YP=pk.valueAxis,jP=(Eu({type:"radar",optionUpdated:function(){var t=this.get("boundaryGap"),e=this.get("splitNumber"),i=this.get("scale"),o=this.get("axisLine"),l=this.get("axisTick"),u=this.get("axisType"),h=this.get("axisLabel"),c=this.get("name"),d=this.get("name.show"),f=this.get("name.formatter"),g=this.get("nameGap"),m=this.get("triggerEvent"),v=p(this.get("indicator")||[],function(p){null!=p.max&&p.max>0&&!p.min?p.min=0:null!=p.min&&p.min<0&&!p.max&&(p.max=0);var v=c;if(null!=p.color&&(v=s({color:p.color},c)),p=a(n(p),{boundaryGap:t,splitNumber:e,scale:i,axisLine:o,axisTick:l,axisType:u,axisLabel:h,name:p.text,nameLocation:"end",nameGap:g,nameTextStyle:v,triggerEvent:m},!1),d||(p.name=""),"string"==typeof f){var y=p.name;p.name=f.replace("{value}",null!=y?y:"")}else"function"==typeof f&&(p.name=f(p.name,p));var x=r(new vr(p,null,this.ecModel),UL);return x.mainType="radar",x.componentIndex=this.componentIndex,x},this);this.getIndicatorModels=function(){return v}},defaultOption:{zlevel:0,z:0,center:["50%","50%"],radius:"75%",startAngle:90,name:{show:!0},boundaryGap:[0,0],splitNumber:5,nameGap:15,scale:!1,shape:"polygon",axisLine:a({lineStyle:{color:"#bbb"}},YP.axisLine),axisLabel:wf(YP.axisLabel,!1),axisTick:wf(YP.axisTick,!1),axisType:"interval",splitLine:wf(YP.splitLine,!0),splitArea:wf(YP.splitArea,!0),indicator:[]}}),["axisLine","axisTickLabel","axisName"]);Bu({type:"radar",render:function(t){var e=this.group;e.removeAll(),this._buildAxes(t),this._buildSplitLineAndArea(t)},_buildAxes:function(t){var e=t.coordinateSystem,i=e.getIndicatorAxes(),n=p(i,function(t){var i=new zk(t.model,{position:[e.cx,e.cy],rotation:t.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return i});f(n,function(t){f(jP,t.add,t),this.group.add(t.getGroup())},this)},_buildSplitLineAndArea:function(t){function e(t,e,i){var n=i%e.length;return t[n]=t[n]||[],n}var i=t.coordinateSystem,n=i.getIndicatorAxes();if(n.length){var a=t.get("shape"),o=t.getModel("splitLine"),r=t.getModel("splitArea"),l=o.getModel("lineStyle"),u=r.getModel("areaStyle"),h=o.get("show"),c=r.get("show"),d=l.get("color"),g=u.get("color");d=_(d)?d:[d],g=_(g)?g:[g];var m=[],v=[];if("circle"===a)for(var y=n[0].getTicksCoords(),x=i.cx,w=i.cy,b=0;b=b;b++){for(var A=[],D=0;D":"\n";return Hr(""===s?this.name:s)+l+p(r,function(e){var i=a.get(a.mapDimension(e.dim),t);return Hr(e.name+" : "+i)}).join(l)},getTooltipPosition:function(t){if(null!=t)for(var e=this.getData(),i=this.coordinateSystem,n=e.getValues(p(i.dimensions,function(t){return e.mapDimension(t)}),t,!0),a=0,o=n.length;o>a;a++)if(!isNaN(n[a])){var r=i.getIndicatorAxes();return i.coordToPoint(r[a].dataToCoord(n[a]),a)}},defaultOption:{zlevel:0,z:2,coordinateSystem:"radar",legendHoverLink:!0,radarIndex:0,lineStyle:{width:2,type:"solid"},label:{position:"top"},symbol:"emptyCircle",symbolSize:4}});Gu({type:"radar",render:function(t){function e(t,e){var i=t.getItemVisual(e,"symbol")||"circle",n=t.getItemVisual(e,"color");if("none"!==i){var a=bf(t.getItemVisual(e,"symbolSize")),o=ic(i,-1,-1,2,2,n),r=t.getItemVisual(e,"symbolRotate")||0;return o.attr({style:{strokeNoScale:!0},z2:100,scale:[a[0]/2,a[1]/2],rotation:r*Math.PI/180||0}),o}}function i(i,n,a,o,r,s){a.removeAll();for(var l=0;lf;++f){var p=t[f],g=p[0],m=p[1],v=p[2],y=n(v);c.globalAlpha=y,c.drawImage(r,g-u,m-u)}if(!h.width||!h.height)return h;for(var x=c.getImageData(0,0,h.width,h.height),_=x.data,w=0,b=_.length,S=this.minOpacity,M=this.maxOpacity,I=M-S;b>w;){var y=_[w+3]/256,T=4*Math.floor(y*(JP-1));if(y>0){var A=o(y)?s:l;y>0&&(y=y*I+S),_[w++]=A[T],_[w++]=A[T+1],_[w++]=A[T+2],_[w++]=A[T+3]*y*256}else w+=4}return c.putImageData(x,0,0),h},_getBrush:function(){var t=this._brushCanvas||(this._brushCanvas=mS()),e=this.pointSize+this.blurSize,i=2*e;t.width=i,t.height=i;var n=t.getContext("2d");return n.clearRect(0,0,i,i),n.shadowOffsetX=i,n.shadowBlur=this.blurSize,n.shadowColor="#000",n.beginPath(),n.arc(-e,e,this.pointSize,0,2*Math.PI,!0),n.closePath(),n.fill(),t},_getGradient:function(t,e,i){for(var n=this._gradientPixels,a=n[i]||(n[i]=new Uint8ClampedArray(1024)),o=[0,0,0,0],r=0,s=0;256>s;s++)e[i](s/255,!0,o),a[r++]=o[0],a[r++]=o[1],a[r++]=o[2],a[r++]=o[3];return a}},Gu({type:"heatmap",render:function(t,e,i){var n;e.eachComponent("visualMap",function(e){e.eachTargetSeries(function(i){i===t&&(n=e)})}),this.group.removeAll(),this._incrementalDisplayable=null;var a=t.coordinateSystem;"cartesian2d"===a.type||"calendar"===a.type?this._renderOnCartesianAndCalendar(t,i,0,t.getData().count()):Df(a)&&this._renderOnGeo(a,t,n,i)},incrementalPrepareRender:function(){this.group.removeAll()},incrementalRender:function(t,e,i,n){var a=e.coordinateSystem;a&&this._renderOnCartesianAndCalendar(e,n,t.start,t.end,!0)},_renderOnCartesianAndCalendar:function(t,e,i,n,a){var o,s,l=t.coordinateSystem;if("cartesian2d"===l.type){var u=l.getAxis("x"),h=l.getAxis("y");o=u.getBandWidth(),s=h.getBandWidth()}for(var c=this.group,d=t.getData(),f="itemStyle",p="emphasis.itemStyle",g="label",m="emphasis.label",v=t.getModel(f).getItemStyle(["color"]),y=t.getModel(p).getItemStyle(),x=t.getModel(g),_=t.getModel(m),w=l.type,b="cartesian2d"===w?[d.mapDimension("x"),d.mapDimension("y"),d.mapDimension("value")]:[d.mapDimension("time"),d.mapDimension("value")],S=i;n>S;S++){var M;if("cartesian2d"===w){if(isNaN(d.get(b[2],S)))continue;var I=l.dataToPoint([d.get(b[0],S),d.get(b[1],S)]);M=new UT({shape:{x:Math.floor(Math.round(I[0])-o/2),y:Math.floor(Math.round(I[1])-s/2),width:Math.ceil(o),height:Math.ceil(s)},style:{fill:d.getItemVisual(S,"color"),opacity:d.getItemVisual(S,"opacity")}})}else{if(isNaN(d.get(b[1],S)))continue;M=new UT({z2:1,shape:l.dataToRect([d.get(b[0],S)]).contentShape,style:{fill:d.getItemVisual(S,"color"),opacity:d.getItemVisual(S,"opacity")}})}var T=d.getItemModel(S);d.hasItemOption&&(v=T.getModel(f).getItemStyle(["color"]),y=T.getModel(p).getItemStyle(),x=T.getModel(g),_=T.getModel(m));var A=t.getRawValue(S),D="-";A&&null!=A[2]&&(D=A[2]),Uo(v,y,x,_,{labelFetcher:t,labelDataIndex:S,defaultText:D,isRectText:!0}),M.setStyle(v),Wo(M,d.hasItemOption?y:r({},y)),M.incremental=a,a&&(M.useHoverLayer=!0),c.add(M),d.setItemGraphicEl(S,M)}},_renderOnGeo:function(t,e,i,n){var a=i.targetVisuals.inRange,o=i.targetVisuals.outOfRange,r=e.getData(),s=this._hmLayer||this._hmLayer||new If;s.blurSize=e.get("blurSize"),s.pointSize=e.get("pointSize"),s.minOpacity=e.get("minOpacity"),s.maxOpacity=e.get("maxOpacity");var l=t.getViewRect().clone(),u=t.getRoamTransform();l.applyTransform(u);var h=Math.max(l.x,0),c=Math.max(l.y,0),d=Math.min(l.width+l.x,n.getWidth()),f=Math.min(l.height+l.y,n.getHeight()),p=d-h,g=f-c,m=[r.mapDimension("lng"),r.mapDimension("lat"),r.mapDimension("value")],v=r.mapArray(m,function(e,i,n){var a=t.dataToPoint([e,i]);return a[0]-=h,a[1]-=c,a.push(n),a}),y=i.getExtent(),x="visualMap.continuous"===i.type?Af(y,i.option.range):Tf(y,i.getPieceList(),i.option.selected);s.update(v,p,g,a.color.getNormalizer(),{inRange:a.color.getColorMapper(),outOfRange:o.color.getColorMapper()},x);var _=new Cn({style:{width:p,height:g,x:h,y:c,image:s.canvas},silent:!0});this.group.add(_)},dispose:function(){}});var QP=f,tO="\x00__link_datas",eO="\x00__link_mainData",iO=function(t,e){this.name=t||"",this.depth=0,this.height=0,this.parentNode=null,this.dataIndex=-1,this.children=[],this.viewChildren=[],this.hostTree=e +};iO.prototype={constructor:iO,isRemoved:function(){return this.dataIndex<0},eachNode:function(t,e,i){"function"==typeof t&&(i=e,e=t,t=null),t=t||{},b(t)&&(t={order:t});var n,a=t.order||"preorder",o=this[t.attr||"children"];"preorder"===a&&(n=e.call(i,this));for(var r=0;!n&&re&&(e=n.height)}this.height=e+1},getNodeById:function(t){if(this.getId()===t)return this;for(var e=0,i=this.children,n=i.length;n>e;e++){var a=i[e].getNodeById(t);if(a)return a}},contains:function(t){if(t===this)return!0;for(var e=0,i=this.children,n=i.length;n>e;e++){var a=i[e].contains(t);if(a)return a}},getAncestors:function(t){for(var e=[],i=t?this:this.parentNode;i;)e.push(i),i=i.parentNode;return e.reverse(),e},getValue:function(t){var e=this.hostTree.data;return e.get(e.getDimension(t||"value"),this.dataIndex)},setLayout:function(t,e){this.dataIndex>=0&&this.hostTree.data.setItemLayout(this.dataIndex,t,e)},getLayout:function(){return this.hostTree.data.getItemLayout(this.dataIndex)},getModel:function(t){if(!(this.dataIndex<0)){var e=this.hostTree,i=e.data.getItemModel(this.dataIndex);return i.getModel(t)}},setVisual:function(t,e){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,t,e)},getVisual:function(t,e){return this.hostTree.data.getItemVisual(this.dataIndex,t,e)},getRawIndex:function(){return this.hostTree.data.getRawIndex(this.dataIndex)},getId:function(){return this.hostTree.data.getId(this.dataIndex)},isAncestorOf:function(t){for(var e=t.parentNode;e;){if(e===this)return!0;e=e.parentNode}return!1},isDescendantOf:function(t){return t!==this&&t.isAncestorOf(this)}},Ef.prototype={constructor:Ef,type:"tree",eachNode:function(t,e,i){this.root.eachNode(t,e,i)},getNodeByDataIndex:function(t){var e=this.data.getRawIndex(t);return this._nodes[e]},getNodeByName:function(t){return this.root.getNodeByName(t)},update:function(){for(var t=this.data,e=this._nodes,i=0,n=e.length;n>i;i++)e[i].dataIndex=-1;for(var i=0,n=t.count();n>i;i++)e[t.getRawIndex(i)].dataIndex=i},clearLayouts:function(){this.data.clearItemLayouts()}},Ef.createTree=function(t,e,i){function n(t,e){var i=t.value;r=Math.max(r,_(i)?i.length:1),o.push(t);var s=new iO(t.name,a);e?Bf(s,e):a.root=s,a._nodes.push(s);var l=t.children;if(l)for(var u=0;ur&&(r=t.depth)});var s=t.expandAndCollapse,l=s&&t.initialTreeDepth>=0?t.initialTreeDepth:r;return o.root.eachNode("preorder",function(t){var e=t.hostTree.data.getRawDataItem(t.dataIndex);t.isExpand=e&&null!=e.collapsed?!e.collapsed:t.depth<=l}),o.data},getOrient:function(){var t=this.get("orient");return"horizontal"===t?t="LR":"vertical"===t&&(t="TB"),t},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},formatTooltip:function(t){for(var e=this.getData().tree,i=e.root.children[0],n=e.getNodeByDataIndex(t),a=n.getValue(),o=n.name;n&&n!==i;)o=n.parentNode.name+"."+o,n=n.parentNode;return Hr(o+(isNaN(a)||null==a?"":" : "+a))},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderColor:"#c23531",borderWidth:1.5},label:{show:!0,color:"#555"},leaves:{label:{show:!0}},animationEasing:"linear",animationDuration:700,animationDurationUpdate:1e3}});var nO=oe;c(Jf,ZS),Qf.prototype={constructor:Qf,type:"view",dimensions:["x","y"],setBoundingRect:function(t,e,i,n){return this._rect=new Ti(t,e,i,n),this._rect},getBoundingRect:function(){return this._rect},setViewRect:function(t,e,i,n){this.transformTo(t,e,i,n),this._viewRect=new Ti(t,e,i,n)},transformTo:function(t,e,i,n){var a=this.getBoundingRect(),o=this._rawTransformable;o.transform=a.calculateTransform(new Ti(t,e,i,n)),o.decomposeTransform(),this._updateTransform()},setCenter:function(t){t&&(this._center=t,this._updateCenterAndZoom())},setZoom:function(t){t=t||1;var e=this.zoomLimit;e&&(null!=e.max&&(t=Math.min(e.max,t)),null!=e.min&&(t=Math.max(e.min,t))),this._zoom=t,this._updateCenterAndZoom()},getDefaultCenter:function(){var t=this.getBoundingRect(),e=t.x+t.width/2,i=t.y+t.height/2;return[e,i]},getCenter:function(){return this._center||this.getDefaultCenter()},getZoom:function(){return this._zoom||1},getRoamTransform:function(){return this._roamTransformable.getLocalTransform()},_updateCenterAndZoom:function(){var t=this._rawTransformable.getLocalTransform(),e=this._roamTransformable,i=this.getDefaultCenter(),n=this.getCenter(),a=this.getZoom();n=oe([],n,t),i=oe([],i,t),e.origin=n,e.position=[i[0]-n[0],i[1]-n[1]],e.scale=[a,a],this._updateTransform()},_updateTransform:function(){var t=this._roamTransformable,e=this._rawTransformable;e.parent=t,t.updateTransform(),e.updateTransform(),ze(this.transform||(this.transform=[]),e.transform||Oe()),this._rawTransform=e.getLocalTransform(),this.invTransform=this.invTransform||[],Ge(this.invTransform,this.transform),this.decomposeTransform()},getTransformInfo:function(){var t=this._roamTransformable.transform,e=this._rawTransformable;return{roamTransform:t?k(t):Oe(),rawScale:k(e.scale),rawPosition:k(e.position)}},getViewRect:function(){return this._viewRect},getViewRectAfterRoam:function(){var t=this.getBoundingRect().clone();return t.applyTransform(this.transform),t},dataToPoint:function(t,e,i){var n=e?this._rawTransform:this.transform;return i=i||[],n?nO(i,t,n):W(i,t)},pointToData:function(t){var e=this.invTransform;return e?nO([],t,e):[t[0],t[1]]},convertToPixel:x(tp,"dataToPoint"),convertFromPixel:x(tp,"pointToData"),containPoint:function(t){return this.getViewRectAfterRoam().contain(t[0],t[1])}},c(Qf,ZS);var aO="\x00_ec_interaction_mutex";Lu({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},function(){}),c(sp,AS);var oO={axisPointer:1,tooltip:1,brush:1},rO=xo({shape:{parentPoint:[],childPoints:[],orient:"",forkPosition:""},style:{stroke:"#000",fill:null},buildPath:function(t,e){var i=e.childPoints,n=i.length,a=e.parentPoint,o=i[0],r=i[n-1];if(1===n)return t.moveTo(a[0],a[1]),void t.lineTo(o[0],o[1]);var s=e.orient,l="TB"===s||"BT"===s?0:1,u=1-l,h=Ir(e.forkPosition,1),c=[];c[l]=a[l],c[u]=a[u]+(r[u]-a[u])*h,t.moveTo(a[0],a[1]),t.lineTo(c[0],c[1]),t.moveTo(o[0],o[1]),c[l]=o[l],t.lineTo(c[0],c[1]),c[l]=r[l],t.lineTo(c[0],c[1]),t.lineTo(r[0],r[1]);for(var d=1;n-1>d;d++){var f=i[d];t.moveTo(f[0],f[1]),c[l]=f[l],t.lineTo(c[0],c[1])}}});Gu({type:"tree",init:function(t,e){this._oldTree,this._mainGroup=new xM,this._controller=new sp(e.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},render:function(t,e,i){var n=t.getData(),a=t.layoutInfo,o=this._mainGroup,r=t.get("layout");"radial"===r?o.attr("position",[a.x+a.width/2,a.y+a.height/2]):o.attr("position",[a.x,a.y]),this._updateViewCoordSys(t,a,r),this._updateController(t,e,i);var s=this._data,l={expandAndCollapse:t.get("expandAndCollapse"),layout:r,edgeShape:t.get("edgeShape"),edgeForkPosition:t.get("edgeForkPosition"),orient:t.getOrient(),curvature:t.get("lineStyle.curveness"),symbolRotate:t.get("symbolRotate"),symbolOffset:t.get("symbolOffset"),hoverAnimation:t.get("hoverAnimation"),useNameLabel:!0,fadeIn:!0};n.diff(s).add(function(e){vp(n,e)&&xp(n,e,null,o,t,l)}).update(function(e,i){var a=s.getItemGraphicEl(i);return vp(n,e)?void xp(n,e,a,o,t,l):void(a&&wp(s,i,a,o,t,l))}).remove(function(e){var i=s.getItemGraphicEl(e);i&&wp(s,e,i,o,t,l)}).execute(),this._nodeScaleRatio=t.get("nodeScaleRatio"),this._updateNodeAndLinkScale(t),l.expandAndCollapse===!0&&n.eachItemGraphicEl(function(e,n){e.off("click").on("click",function(){i.dispatchAction({type:"treeExpandAndCollapse",seriesId:t.id,dataIndex:n})})}),this._data=n},_updateViewCoordSys:function(t){var e=t.getData(),i=[];e.each(function(t){var n=e.getItemLayout(t);!n||isNaN(n.x)||isNaN(n.y)||i.push([+n.x,+n.y])});var n=[],a=[];Va(i,n,a);var o=this._min,r=this._max;a[0]-n[0]===0&&(n[0]=o?o[0]:n[0]-1,a[0]=r?r[0]:a[0]+1),a[1]-n[1]===0&&(n[1]=o?o[1]:n[1]-1,a[1]=r?r[1]:a[1]+1);var s=t.coordinateSystem=new Qf;s.zoomLimit=t.get("scaleLimit"),s.setBoundingRect(n[0],n[1],a[0]-n[0],a[1]-n[1]),s.setCenter(t.get("center")),s.setZoom(t.get("zoom")),this.group.attr({position:s.position,scale:s.scale}),this._viewCoordSys=s,this._min=n,this._max=a},_updateController:function(t,e,i){var n=this._controller,a=this._controllerHost,o=this.group;n.setPointerChecker(function(e,n,a){var r=o.getBoundingRect();return r.applyTransform(o.transform),r.contain(n,a)&&!mp(e,i,t)}),n.enable(t.get("roam")),a.zoomLimit=t.get("scaleLimit"),a.zoom=t.coordinateSystem.getZoom(),n.off("pan").off("zoom").on("pan",function(e){ep(a,e.dx,e.dy),i.dispatchAction({seriesId:t.id,type:"treeRoam",dx:e.dx,dy:e.dy})},this).on("zoom",function(e){ip(a,e.scale,e.originX,e.originY),i.dispatchAction({seriesId:t.id,type:"treeRoam",zoom:e.scale,originX:e.originX,originY:e.originY}),this._updateNodeAndLinkScale(t)},this)},_updateNodeAndLinkScale:function(t){var e=t.getData(),i=this._getNodeGlobalScale(t),n=[i,i];e.eachItemGraphicEl(function(t){t.attr("scale",n)})},_getNodeGlobalScale:function(t){var e=t.coordinateSystem;if("view"!==e.type)return 1;var i=this._nodeScaleRatio,n=e.scale,a=n&&n[0]||1,o=e.getZoom(),r=(o-1)*i+1;return r/a},dispose:function(){this._controller&&this._controller.dispose(),this._controllerHost={}},remove:function(){this._mainGroup.removeAll(),this._data=null}}),Lu({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(t,e){e.eachComponent({mainType:"series",subType:"tree",query:t},function(e){var i=t.dataIndex,n=e.getData().tree,a=n.getNodeByDataIndex(i);a.isExpand=!a.isExpand})}),Lu({type:"treeRoam",event:"treeRoam",update:"none"},function(t,e){e.eachComponent({mainType:"series",subType:"tree",query:t},function(e){var i=e.coordinateSystem,n=Sp(i,t);e.setCenter&&e.setCenter(n.center),e.setZoom&&e.setZoom(n.zoom)})});var sO=function(t,e){t.eachSeriesByType("tree",function(t){Tp(t,e)})};Nu(hP("tree","circle")),Ou(sO),CD.extend({type:"series.treemap",layoutMode:"box",dependencies:["grid","polar"],preventUsingHoverLayer:!0,_viewRoot:null,defaultOption:{progressive:0,left:"center",top:"middle",right:null,bottom:null,width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.1024,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",borderColor:"rgba(255,255,255,0.7)",borderWidth:1,shadowColor:"rgba(150,150,150,1)",shadowBlur:3,shadowOffsetX:0,shadowOffsetY:0,textStyle:{color:"#fff"}},emphasis:{textStyle:{}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",ellipsis:!0},upperLabel:{show:!1,position:[0,"50%"],height:20,color:"#fff",ellipsis:!0,verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],color:"#fff",ellipsis:!0,verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},getInitialData:function(t,e){function i(t){t.wrapMethod("getItemModel",function(t,e){var i=l.getNodeByDataIndex(e),n=s[i.depth];return t.parentModel=n||r,t})}var n={name:t.name,children:t.data};kp(n);var a=t.levels||[],o=this.designatedVisualItemStyle={},r=new vr({itemStyle:o},this,e);a=t.levels=Pp(a,e);var s=p(a||[],function(t){return new vr(t,r,e)},this),l=Ef.createTree(n,this,i);return l.data},optionUpdated:function(){this.resetViewRoot()},formatTooltip:function(t){var e=this.getData(),i=this.getRawValue(t),n=Fr(_(i)?i[0]:i),a=e.getName(t);return Hr(a+": "+n)},getDataParams:function(t){var e=CD.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(t);return e.treePathInfo=Lp(i,this),e},setLayoutInfo:function(t){this.layoutInfo=this.layoutInfo||{},r(this.layoutInfo,t)},mapIdToIndex:function(t){var e=this._idIndexMap;e||(e=this._idIndexMap=B(),this._idIndexMapCount=0);var i=e.get(t);return null==i&&e.set(t,i=this._idIndexMapCount++),i},getViewRoot:function(){return this._viewRoot},resetViewRoot:function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getRawData().tree.root;(!t||t!==e&&!e.contains(t))&&(this._viewRoot=e)}});var lO=8,uO=8,hO=5;Op.prototype={constructor:Op,render:function(t,e,i,n){var a=t.getModel("breadcrumb"),o=this.group;if(o.removeAll(),a.get("show")&&i){var r=a.getModel("itemStyle"),s=r.getModel("textStyle"),l={pos:{left:a.get("left"),right:a.get("right"),top:a.get("top"),bottom:a.get("bottom")},box:{width:e.getWidth(),height:e.getHeight()},emptyItemWidth:a.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(i,l,s),this._renderContent(t,l,r,s,n),is(o,l.pos,l.box)}},_prepare:function(t,e,i){for(var n=t;n;n=n.parentNode){var a=n.getModel().get("name"),o=i.getTextRect(a),r=Math.max(o.width+2*lO,e.emptyItemWidth);e.totalWidth+=r+uO,e.renderList.push({node:n,text:a,width:r})}},_renderContent:function(t,e,i,n,a){for(var o=0,r=e.emptyItemWidth,l=t.get("breadcrumb.height"),u=ts(e.pos,e.box),h=e.totalWidth,c=e.renderList,d=c.length-1;d>=0;d--){var f=c[d],p=f.node,g=f.width,m=f.text;h>u.width&&(h-=g-r,g=r,m=null);var v=new WT({shape:{points:Np(o,0,g,l,d===c.length-1,0===d)},style:s(i.getItemStyle(),{lineJoin:"bevel",text:m,textFill:n.getTextColor(),textFont:n.getFont()}),z:10,onclick:x(a,p)});this.group.add(v),zp(v,t,p),o+=g+uO}},remove:function(){this.group.removeAll()}};var cO=y,dO=xM,fO=UT,pO=f,gO=3,mO=["label"],vO=["emphasis","label"],yO=["upperLabel"],xO=["emphasis","upperLabel"],_O=10,wO=1,bO=2,SO=AI([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),MO=function(t){var e=SO(t);return e.stroke=e.fill=e.lineWidth=null,e};Gu({type:"treemap",init:function(){this._containerGroup,this._storage=Ep(),this._oldTree,this._breadcrumb,this._controller,this._state="ready"},render:function(t,e,i,n){var a=e.findComponents({mainType:"series",subType:"treemap",query:n});if(!(u(a,t)<0)){this.seriesModel=t,this.api=i,this.ecModel=e;var o=["treemapZoomToNode","treemapRootToNode"],r=Ap(n,o,t),s=n&&n.type,l=t.layoutInfo,h=!this._oldTree,c=this._storage,d="treemapRootToNode"===s&&r&&c?{rootNodeGroup:c.nodeGroup[r.node.getRawIndex()],direction:n.direction}:null,f=this._giveContainerGroup(l),p=this._doRender(f,t,d);h||s&&"treemapZoomToNode"!==s&&"treemapRootToNode"!==s?p.renderFinally():this._doAnimation(f,p,t,d),this._resetController(i),this._renderBreadcrumb(t,i,r)}},_giveContainerGroup:function(t){var e=this._containerGroup;return e||(e=this._containerGroup=new dO,this._initEvents(e),this.group.add(e)),e.attr("position",[t.x,t.y]),e},_doRender:function(t,e,i){function n(t,e,i,a,o){function r(t){return t.getId()}function s(r,s){var l=null!=r?t[r]:null,u=null!=s?e[s]:null,h=d(l,u,i,o);h&&n(l&&l.viewChildren||[],u&&u.viewChildren||[],h,a,o+1)}a?(e=t,pO(t,function(t,e){!t.isRemoved()&&s(e,e)})):new Xu(e,t,r,r).add(s).update(s).remove(x(s,null)).execute()}function a(t){var e=Ep();return t&&pO(t,function(t,i){var n=e[i];pO(t,function(t){t&&(n.push(t),t.__tmWillDelete=1)})}),e}function o(){pO(f,function(t){pO(t,function(t){t.parent&&t.parent.remove(t)})}),pO(c,function(t){t.invisible=!0,t.dirty()})}var r=e.getData().tree,s=this._oldTree,l=Ep(),u=Ep(),h=this._storage,c=[],d=x(Bp,e,u,h,i,l,c);n(r.root?[r.root]:[],s&&s.root?[s.root]:[],t,r===s||!s,0);var f=a(h);return this._oldTree=r,this._storage=u,{lastsForAnimation:l,willDeleteEls:f,renderFinally:o}},_doAnimation:function(t,e,i,n){if(i.get("animation")){var a=i.get("animationDurationUpdate"),o=i.get("animationEasing"),s=Rp();pO(e.willDeleteEls,function(t,e){pO(t,function(t){if(!t.invisible){var i,r=t.parent;if(n&&"drillDown"===n.direction)i=r===n.rootNodeGroup?{shape:{x:0,y:0,width:r.__tmNodeWidth,height:r.__tmNodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var l=0,u=0;r.__tmWillDelete||(l=r.__tmNodeWidth/2,u=r.__tmNodeHeight/2),i="nodeGroup"===e?{position:[l,u],style:{opacity:0}}:{shape:{x:l,y:u,width:0,height:0},style:{opacity:0}}}i&&s.add(t,i,a,o)}})}),pO(this._storage,function(t,i){pO(t,function(t,n){var l=e.lastsForAnimation[i][n],u={};l&&("nodeGroup"===i?l.old&&(u.position=t.position.slice(),t.attr("position",l.old)):(l.old&&(u.shape=r({},t.shape),t.setShape(l.old)),l.fadein?(t.setStyle("opacity",0),u.style={opacity:1}):1!==t.style.opacity&&(u.style={opacity:1})),s.add(t,u,a,o))})},this),this._state="animating",s.done(cO(function(){this._state="ready",e.renderFinally()},this)).start()}},_resetController:function(t){var e=this._controller;e||(e=this._controller=new sp(t.getZr()),e.enable(this.seriesModel.get("roam")),e.on("pan",cO(this._onPan,this)),e.on("zoom",cO(this._onZoom,this)));var i=new Ti(0,0,t.getWidth(),t.getHeight());e.setPointerChecker(function(t,e,n){return i.contain(e,n)})},_clearController:function(){var t=this._controller;t&&(t.dispose(),t=null)},_onPan:function(t){if("animating"!==this._state&&(Math.abs(t.dx)>gO||Math.abs(t.dy)>gO)){var e=this.seriesModel.getData().tree.root;if(!e)return;var i=e.getLayout();if(!i)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:i.x+t.dx,y:i.y+t.dy,width:i.width,height:i.height}})}},_onZoom:function(t){var e=t.originX,i=t.originY;if("animating"!==this._state){var n=this.seriesModel.getData().tree.root;if(!n)return;var a=n.getLayout();if(!a)return;var o=new Ti(a.x,a.y,a.width,a.height),r=this.seriesModel.layoutInfo;e-=r.x,i-=r.y;var s=Oe();Ee(s,s,[-e,-i]),Ve(s,s,[t.scale,t.scale]),Ee(s,s,[e,i]),o.applyTransform(s),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:o.x,y:o.y,width:o.width,height:o.height}})}},_initEvents:function(t){t.on("click",function(t){if("ready"===this._state){var e=this.seriesModel.get("nodeClick",!0);if(e){var i=this.findTarget(t.offsetX,t.offsetY);if(i){var n=i.node;if(n.getLayout().isLeafRoot)this._rootToNode(i);else if("zoomToNode"===e)this._zoomToNode(i);else if("link"===e){var a=n.hostTree.data.getItemModel(n.dataIndex),o=a.get("link",!0),r=a.get("target",!0)||"blank";o&&Jr(o,r)}}}}},this)},_renderBreadcrumb:function(t,e,i){function n(e){"animating"!==this._state&&(Cp(t.getViewRoot(),e)?this._rootToNode({node:e}):this._zoomToNode({node:e}))}i||(i=null!=t.get("leafDepth",!0)?{node:t.getViewRoot()}:this.findTarget(e.getWidth()/2,e.getHeight()/2),i||(i={node:t.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new Op(this.group))).render(t,e,i.node,cO(n,this))},remove:function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=Ep(),this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},dispose:function(){this._clearController()},_zoomToNode:function(t){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},_rootToNode:function(t){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},findTarget:function(t,e){var i,n=this.seriesModel.getViewRoot();return n.eachNode({attr:"viewChildren",order:"preorder"},function(n){var a=this._storage.background[n.getRawIndex()];if(a){var o=a.transformCoordToLocal(t,e),r=a.shape;if(!(r.x<=o[0]&&o[0]<=r.x+r.width&&r.y<=o[1]&&o[1]<=r.y+r.height))return!1;i={node:n,offsetX:o[0],offsetY:o[1]}}},this),i}});for(var IO=function(){},TO=["treemapZoomToNode","treemapRender","treemapMove"],AO=0;AOn&&(o=n,a=i)}for(var a,o=1/0,r=0,s=e.length;s>r;r++){var l=e[r].value;if(null!=l){if(l===t||"string"==typeof l&&l===t+"")return r;i&&n(l,r)}}for(var r=0,s=e.length;s>r;r++){var u=e[r],h=u.interval,c=u.close;if(h){if(h[0]===-1/0){if($p(c[1],t,h[1]))return r}else if(1/0===h[1]){if($p(c[0],h[0],t))return r}else if($p(c[0],h[0],t)&&$p(c[1],t,h[1]))return r;i&&n(h[0],r),i&&n(h[1],r)}}return i?1/0===t?e.length-1:t===-1/0?0:a:void 0};var NO=_,zO="itemStyle",RO={seriesType:"treemap",reset:function(t){var e=t.getData().tree,i=e.root;i.isRemoved()||Jp(i,{},t.getViewRoot().getAncestors(),t)}},EO=Math.max,BO=Math.min,VO=D,GO=f,FO=["itemStyle","borderWidth"],WO=["itemStyle","gapWidth"],HO=["upperLabel","show"],ZO=["upperLabel","height"],XO={seriesType:"treemap",reset:function(t,e,i,n){var a=i.getWidth(),o=i.getHeight(),s=t.option,l=es(t.getBoxLayoutParams(),{width:i.getWidth(),height:i.getHeight()}),u=s.size||[],h=Ir(VO(l.width,u[0]),a),c=Ir(VO(l.height,u[1]),o),d=n&&n.type,f=["treemapZoomToNode","treemapRootToNode"],p=Ap(n,f,t),g="treemapRender"===d||"treemapMove"===d?n.rootRect:null,m=t.getViewRoot(),v=Dp(m);if("treemapMove"!==d){var y="treemapZoomToNode"===d?fg(t,p,m,h,c):g?[g.width,g.height]:[h,c],x=s.sort;x&&"asc"!==x&&"desc"!==x&&(x="desc");var _={squareRatio:s.squareRatio,sort:x,leafDepth:s.leafDepth};m.hostTree.clearLayouts();var w={x:0,y:0,width:y[0],height:y[1],area:y[0]*y[1]};m.setLayout(w),rg(m,_,!1,0);var w=m.getLayout();GO(v,function(t,e){var i=(v[e+1]||m).getValue();t.setLayout(r({dataExtent:[i,i],borderWidth:0,upperHeight:0},w))})}var b=t.getData().tree.root;b.setLayout(pg(l,g,p),!0),t.setLayoutInfo(l),gg(b,new Ti(-l.x,-l.y,a,o),v,m,0)}};Nu(RO),Ou(XO),CD.extend({type:"series.sunburst",_viewRoot:null,getInitialData:function(t,e){function i(t){t.wrapMethod("getItemModel",function(t,e){var i=o.getNodeByDataIndex(e),n=a[i.depth];return n&&(t.parentModel=n),t})}var n={name:t.name,children:t.data};vg(n);var a=p(t.levels||[],function(t){return new vr(t,this,e)},this),o=Ef.createTree(n,this,i);return o.data},optionUpdated:function(){this.resetViewRoot()},getDataParams:function(t){var e=CD.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(t);return e.treePathInfo=Lp(i,this),e},defaultOption:{zlevel:0,z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,percentPrecision:2,stillShowZeroSum:!0,highlightPolicy:"descendant",nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},highlight:{itemStyle:{opacity:1}},downplay:{itemStyle:{opacity:.5},label:{opacity:.6}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicOut",data:[],levels:[],sort:"desc"},getViewRoot:function(){return this._viewRoot},resetViewRoot:function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getRawData().tree.root;(!t||t!==e&&!e.contains(t))&&(this._viewRoot=e)}});var UO={NONE:"none",DESCENDANT:"descendant",ANCESTOR:"ancestor",SELF:"self"},YO=2,jO=4,qO=yg.prototype;qO.updateData=function(t,e,i,n,o){this.node=e,e.piece=this,n=n||this._seriesModel,o=o||this._ecModel;var l=this.childAt(0);l.dataIndex=e.dataIndex;var u=e.getModel(),h=e.getLayout(),c=r({},h);c.label=null;var d=xg(e,n,o);bg(e,n,d);var f,p=u.getModel("itemStyle").getItemStyle();if("normal"===i)f=p;else{var g=u.getModel(i+".itemStyle").getItemStyle();f=a(g,p)}f=s({lineJoin:"bevel",fill:f.fill||d},f),t?(l.setShape(c),l.shape.r=h.r0,ar(l,{shape:{r:h.r}},n,e.dataIndex),l.useStyle(f)):"object"==typeof f.fill&&f.fill.type||"object"==typeof l.style.fill&&l.style.fill.type?(ar(l,{shape:c},n),l.useStyle(f)):ar(l,{shape:c,style:f},n),this._updateLabel(n,d,i);var m=u.getShallow("cursor");if(m&&l.attr("cursor",m),t){var v=n.getShallow("highlightPolicy");this._initEvents(l,e,n,v)}this._seriesModel=n||this._seriesModel,this._ecModel=o||this._ecModel,Wo(this)},qO.onEmphasis=function(t){var e=this;this.node.hostTree.root.eachNode(function(i){i.piece&&(e.node===i?i.piece.updateData(!1,i,"emphasis"):wg(i,e.node,t)?i.piece.childAt(0).trigger("highlight"):t!==UO.NONE&&i.piece.childAt(0).trigger("downplay"))})},qO.onNormal=function(){this.node.hostTree.root.eachNode(function(t){t.piece&&t.piece.updateData(!1,t,"normal")})},qO.onHighlight=function(){this.updateData(!1,this.node,"highlight")},qO.onDownplay=function(){this.updateData(!1,this.node,"downplay")},qO._updateLabel=function(t,e,i){function n(t){var e=r.get(t);return null==e?o.get(t):e}var a=this.node.getModel(),o=a.getModel("label"),r="normal"===i||"emphasis"===i?o:a.getModel(i+".label"),s=a.getModel("emphasis.label"),l=r.get("formatter"),u=l?i:"normal",h=D(t.getFormattedLabel(this.node.dataIndex,u,null,null,"label"),this.node.name);n("show")===!1&&(h="");var c=this.node.getLayout(),d=r.get("minAngle");null==d&&(d=o.get("minAngle")),d=d/180*Math.PI;var f=c.endAngle-c.startAngle;null!=d&&Math.abs(f)Math.PI/2?"right":"left"):w&&"center"!==w?"left"===w?(g=c.r0+_,m>Math.PI/2&&(w="right")):"right"===w&&(g=c.r-_,m>Math.PI/2&&(w="left")):(g=(c.r+c.r0)/2,w="center"),p.attr("style",{text:h,textAlign:w,textVerticalAlign:n("verticalAlign")||"middle",opacity:n("opacity")});var b=g*v+c.cx,S=g*y+c.cy;p.attr("position",[b,S]);var M=n("rotate"),I=0;"radial"===M?(I=-m,I<-Math.PI/2&&(I+=Math.PI)):"tangential"===M?(I=Math.PI/2-m,I>Math.PI/2?I-=Math.PI:I<-Math.PI/2&&(I+=Math.PI)):"number"==typeof M&&(I=M*Math.PI/180),p.attr("rotation",I)},qO._initEvents=function(t,e,i,n){t.off("mouseover").off("mouseout").off("emphasis").off("normal");var a=this,o=function(){a.onEmphasis(n)},r=function(){a.onNormal()},s=function(){a.onDownplay()},l=function(){a.onHighlight()};i.isAnimationEnabled()&&t.on("mouseover",o).on("mouseout",r).on("emphasis",o).on("normal",r).on("downplay",s).on("highlight",l)},h(yg,xM);var KO="sunburstRootToNode",$O=(vl.extend({type:"sunburst",init:function(){},render:function(t,e,i,n){function a(t,e){function i(t){return t.getId()}function n(i,n){var a=null==i?null:t[i],r=null==n?null:e[n];o(a,r)}(0!==t.length||0!==e.length)&&new Xu(e,t,i,i).add(n).update(n).remove(x(n,null)).execute()}function o(i,n){if(f||!i||i.getValue()||(i=null),i!==h&&n!==h)if(n&&n.piece)i?(n.piece.updateData(!1,i,"normal",t,e),u.setItemGraphicEl(i.dataIndex,n.piece)):r(n);else if(i){var a=new yg(i,t,e);d.add(a),u.setItemGraphicEl(i.dataIndex,a)}}function r(t){t&&t.piece&&(d.remove(t.piece),t.piece=null)}function s(i,n){if(n.depth>0){l.virtualPiece?l.virtualPiece.updateData(!1,i,"normal",t,e):(l.virtualPiece=new yg(i,t,e),d.add(l.virtualPiece)),n.piece._onclickEvent&&n.piece.off("click",n.piece._onclickEvent);var a=function(){l._rootToNode(n.parentNode)};n.piece._onclickEvent=a,l.virtualPiece.on("click",a)}else l.virtualPiece&&(d.remove(l.virtualPiece),l.virtualPiece=null)}var l=this;this.seriesModel=t,this.api=i,this.ecModel=e;var u=t.getData(),h=u.tree.root,c=t.getViewRoot(),d=this.group,f=t.get("renderLabelForZeroData"),p=[];c.eachNode(function(t){p.push(t)});var g=this._oldChildren||[];if(a(p,g),s(h,c),n&&n.highlight&&n.highlight.piece){var m=t.getShallow("highlightPolicy");n.highlight.piece.onEmphasis(m)}else if(n&&n.unhighlight){var v=this.virtualPiece;!v&&h.children.length&&(v=h.children[0].piece),v&&v.onNormal()}this._initEvents(),this._oldChildren=p},dispose:function(){},_initEvents:function(){var t=this,e=function(e){var i=!1,n=t.seriesModel.getViewRoot();n.eachNode(function(n){if(!i&&n.piece&&n.piece.childAt(0)===e.target){var a=n.getModel().get("nodeClick");if("rootToNode"===a)t._rootToNode(n);else if("link"===a){var o=n.getModel(),r=o.get("link");if(r){var s=o.get("target",!0)||"_blank"; +Jr(r,s)}}i=!0}})};this.group._onclickEvent&&this.group.off("click",this.group._onclickEvent),this.group.on("click",e),this.group._onclickEvent=e},_rootToNode:function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:KO,from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},containPoint:function(t,e){var i=e.getData(),n=i.getItemLayout(0);if(n){var a=t[0]-n.cx,o=t[1]-n.cy,r=Math.sqrt(a*a+o*o);return r<=n.r&&r>=n.r0}}}),"sunburstRootToNode");Lu({type:$O,update:"updateView"},function(t,e){function i(e){var i=Ap(t,[$O],e);if(i){var n=e.getViewRoot();n&&(t.direction=Cp(n,i.node)?"rollUp":"drillDown"),e.resetViewRoot(i.node)}}e.eachComponent({mainType:"series",subType:"sunburst",query:t},i)});var JO="sunburstHighlight";Lu({type:JO,update:"updateView"},function(t,e){function i(e){var i=Ap(t,[JO],e);i&&(t.highlight=i.node)}e.eachComponent({mainType:"series",subType:"sunburst",query:t},i)});var QO="sunburstUnhighlight";Lu({type:QO,update:"updateView"},function(t,e){function i(){t.unhighlight=!0}e.eachComponent({mainType:"series",subType:"sunburst",query:t},i)});var tN=Math.PI/180,eN=function(t,e,i){e.eachSeriesByType(t,function(t){var e=t.get("center"),n=t.get("radius");_(n)||(n=[0,n]),_(e)||(e=[e,e]);var a=i.getWidth(),o=i.getHeight(),r=Math.min(a,o),s=Ir(e[0],a),l=Ir(e[1],o),u=Ir(n[0],r/2),h=Ir(n[1],r/2),c=-t.get("startAngle")*tN,d=t.get("minAngle")*tN,p=t.getData().tree.root,g=t.getViewRoot(),m=g.depth,v=t.get("sort");null!=v&&Sg(g,v);var y=0;f(g.children,function(t){!isNaN(t.getValue())&&y++});var x=g.getValue(),w=Math.PI/(x||y)*2,b=g.depth>0,S=g.height-(b?-1:1),M=(h-u)/(S||1),I=t.get("clockwise"),T=t.get("stillShowZeroSum"),A=I?1:-1,D=function(t,e){if(t){var i=e;if(t!==p){var n=t.getValue(),a=0===x&&T?w:n*w;d>a&&(a=d),i=e+A*a;var o=t.depth-m-(b?-1:1),h=u+M*o,c=u+M*(o+1),g=t.getModel();null!=g.get("r0")&&(h=Ir(g.get("r0"),r/2)),null!=g.get("r")&&(c=Ir(g.get("r"),r/2)),t.setLayout({angle:a,startAngle:e,endAngle:i,clockwise:I,cx:s,cy:l,r0:h,r:c})}if(t.children&&t.children.length){var v=0;f(t.children,function(t){v+=D(t,e+v)})}return i-e}};if(b){var C=u,L=u+M,k=2*Math.PI;p.setLayout({angle:k,startAngle:c,endAngle:c+k,clockwise:I,cx:s,cy:l,r0:C,r:L})}D(g,c)})};Nu(x(_P,"sunburst")),Ou(x(eN,"sunburst")),Du(x(TP,"sunburst"));for(var iN=[126,25],nN=[[[0,3.5],[7,11.2],[15,11.9],[30,7],[42,.7],[52,.7],[56,7.7],[59,.7],[64,.7],[64,0],[5,0],[0,3.5]],[[13,16.1],[19,14.7],[16,21.7],[11,23.1],[13,16.1]],[[12,32.2],[14,38.5],[15,38.5],[13,32.2],[12,32.2]],[[16,47.6],[12,53.2],[13,53.2],[18,47.6],[16,47.6]],[[6,64.4],[8,70],[9,70],[8,64.4],[6,64.4]],[[23,82.6],[29,79.8],[30,79.8],[25,82.6],[23,82.6]],[[37,70.7],[43,62.3],[44,62.3],[39,70.7],[37,70.7]],[[48,51.1],[51,45.5],[53,45.5],[50,51.1],[48,51.1]],[[51,35],[51,28.7],[53,28.7],[53,35],[51,35]],[[52,22.4],[55,17.5],[56,17.5],[53,22.4],[52,22.4]],[[58,12.6],[62,7],[63,7],[60,12.6],[58,12.6]],[[0,3.5],[0,93.1],[64,93.1],[64,0],[63,0],[63,92.4],[1,92.4],[1,3.5],[0,3.5]]],aN=0;aNo;o++){var s=t.getName(o);i.set(s,!0),n.push({name:s,value:t.get(e,o),selected:al(t,o,"selected")})}var l=yN.load(this.getMapType(),this.option.nameMap,this.option.nameProperty);return f(l.regions,function(t){var e=t.name;i.get(e)||(n.push({name:e}),a.push(e))}),this.updateSelectedMap(n),t.appendValues([],a),t},getHostGeoModel:function(){var t=this.option.geoIndex;return null!=t?this.dependentModels.geo[t]:null},getMapType:function(){return(this.getHostGeoModel()||this).option.map},getRawValue:function(t){var e=this.getData();return e.get(e.mapDimension("value"),t)},getRegionModel:function(t){var e=this.getData();return e.getItemModel(e.indexOfName(t))},formatTooltip:function(t,e,i,n){for(var a=this.getData(),o=Fr(this.getRawValue(t)),r=a.getName(t),s=this.seriesGroup,l=[],u=0;u":"\n";return l.join(", ")+d+Hr(r+" : "+o)},getTooltipPosition:function(t){if(null!=t){var e=this.getData().getName(t),i=this.coordinateSystem,n=i.getRegion(e);return n&&i.dataToPoint(n.center)}},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},defaultOption:{zlevel:0,z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:.75,showLegendSymbol:!0,dataRangeHoverLink:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{areaColor:"rgba(255,215,0,0.8)"}},nameProperty:"name"}});c(xN,mP),Pg.prototype={constructor:Pg,draw:function(t,e,i,n,a){var o="geo"===t.mainType,r=t.getData&&t.getData();o&&e.eachComponent({mainType:"series",subType:"map"},function(e){r||e.getHostGeoModel()!==t||(r=e.getData())});var s=t.coordinateSystem;this._updateBackground(s);var l,u=this._regionsGroup,h=this.group,c=s.getTransformInfo(),d=!u.childAt(0)||a;if(d)h.transform=c.roamTransform,h.decomposeTransform(),h.dirty();else{var p=new ZS;p.transform=c.roamTransform,p.decomposeTransform();var g={scale:p.scale,position:p.position};l=p.scale,ar(h,g,t)}var m=c.rawScale,v=c.rawPosition;u.removeAll();var y=["itemStyle"],x=["emphasis","itemStyle"],_=["label"],w=["emphasis","label"],b=B();f(s.regions,function(e){var i=b.get(e.name)||b.set(e.name,new xM),n=new JT({segmentIgnoreThreshold:1,shape:{paths:[]}});i.add(n);var a,s=t.getRegionModel(e.name)||t,c=s.getModel(y),p=s.getModel(x),g=Cg(c),S=Cg(p),M=s.getModel(_),I=s.getModel(w);if(r){a=r.indexOfName(e.name);var T=r.getItemVisual(a,"color",!0);T&&(g.fill=T)}var A=function(t){return[t[0]*m[0]+v[0],t[1]*m[1]+v[1]]};f(e.geometries,function(t){if("polygon"===t.type){for(var e=[],i=0;i=0)&&(P=t);var N=new NT({position:A(e.center.slice()),scale:[1/h.scale[0],1/h.scale[1]],z2:10,silent:!0});if(Uo(N.style,N.hoverStyle={},M,I,{labelFetcher:P,labelDataIndex:O,defaultText:e.name,useInsideStyle:!1},{textAlign:"center",textVerticalAlign:"middle"}),!d){var z=[1/l[0],1/l[1]];ar(N,{scale:z},t)}i.add(N)}if(r)r.setItemGraphicEl(a,i);else{var s=t.getRegionModel(e.name);n.eventData={componentType:"geo",componentIndex:t.componentIndex,geoIndex:t.componentIndex,name:e.name,region:s&&s.option||{}}}var R=i.__regions||(i.__regions=[]);R.push(e),i.highDownSilentOnTouch=!!t.get("selectedMode"),Wo(i,S),u.add(i)}),this._updateController(t,e,i),Lg(this,t,u,i,n),kg(t,u)},remove:function(){this._regionsGroup.removeAll(),this._backgroundGroup.removeAll(),this._controller.dispose(),this._mapName&&yN.removeGraphic(this._mapName,this.uid),this._mapName=null,this._controllerHost={}},_updateBackground:function(t){var e=t.map;this._mapName!==e&&f(yN.makeGraphic(e,this.uid),function(t){this._backgroundGroup.add(t)},this),this._mapName=e},_updateController:function(t,e,i){function n(){var e={type:"geoRoam",componentType:l};return e[l+"Id"]=t.id,e}var a=t.coordinateSystem,o=this._controller,s=this._controllerHost;s.zoomLimit=t.get("scaleLimit"),s.zoom=a.getZoom(),o.enable(t.get("roam")||!1);var l=t.mainType;o.off("pan").on("pan",function(t){this._mouseDownFlag=!1,ep(s,t.dx,t.dy),i.dispatchAction(r(n(),{dx:t.dx,dy:t.dy}))},this),o.off("zoom").on("zoom",function(t){if(this._mouseDownFlag=!1,ip(s,t.scale,t.originX,t.originY),i.dispatchAction(r(n(),{zoom:t.scale,originX:t.originX,originY:t.originY})),this._updateGroup){var e=this.group.scale;this._regionsGroup.traverse(function(t){"text"===t.type&&t.attr("scale",[1/e[0],1/e[1]])})}},this),o.setPointerChecker(function(e,n,o){return a.getViewRectAfterRoam().contain(n,o)&&!mp(e,i,t)})}};var _N="__seriesMapHighDown",wN="__seriesMapCallKey";Gu({type:"map",render:function(t,e,i,n){if(!n||"mapToggleSelect"!==n.type||n.from!==this.uid){var a=this.group;if(a.removeAll(),!t.getHostGeoModel()){if(n&&"geoRoam"===n.type&&"series"===n.componentType&&n.seriesId===t.id){var o=this._mapDraw;o&&a.add(o.group)}else if(t.needsDrawMap){var o=this._mapDraw||new Pg(i,!0);a.add(o.group),o.draw(t,e,i,this,n),this._mapDraw=o}else this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;t.get("showLegendSymbol")&&e.getComponent("legend")&&this._renderSymbols(t,e,i)}}},remove:function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null,this.group.removeAll()},dispose:function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null},_renderSymbols:function(t){var e=t.originalData,i=this.group;e.each(e.mapDimension("value"),function(n,a){if(!isNaN(n)){var o=e.getItemLayout(a);if(o&&o.point){var s=o.point,l=o.offset,u=new zT({style:{fill:t.getData().getVisual("color")},shape:{cx:s[0]+9*l,cy:s[1],r:3},silent:!0,z2:8+(l?0:rA+1)});if(!l){var h=t.mainSeries.getData(),c=e.getName(a),d=h.indexOfName(c),f=e.getItemModel(a),p=f.getModel("label"),g=f.getModel("emphasis.label"),m=h.getItemGraphicEl(d),v=C(t.getFormattedLabel(d,"normal"),c),y=C(t.getFormattedLabel(d,"emphasis"),v),_=m[_N],w=Math.random();if(!_){_=m[_N]={};var b=x(Og,!0),S=x(Og,!1);m.on("mouseover",b).on("mouseout",S).on("emphasis",b).on("normal",S)}m[wN]=w,r(_,{recordVersion:w,circle:u,labelModel:p,hoverLabelModel:g,emphasisText:y,normalText:v}),Ng(_,!1)}i.add(u)}}})}}),Lu({type:"geoRoam",event:"geoRoam",update:"updateTransform"},function(t,e){var i=t.componentType||"series";e.eachComponent({mainType:i,query:t},function(e){var n=e.coordinateSystem;if("geo"===n.type){var a=Sp(n,t,e.get("scaleLimit"));e.setCenter&&e.setCenter(a.center),e.setZoom&&e.setZoom(a.zoom),"series"===i&&f(e.seriesGroup,function(t){t.setCenter(a.center),t.setZoom(a.zoom)})}})}),zg.prototype={constructor:zg,type:"geo",dimensions:["lng","lat"],containCoord:function(t){for(var e=this.regions,i=0;ia;a++)e[a]=e[a]||[],e[a][0]=this._flatCoords[i+2*a],e[a][1]=this._flatCoords[i+2*a+1];return n}for(var o=this._getCoordsFromItemModel(t),a=0;al;){s++;var u=t[l++];n[r++]=o+e,n[r++]=u;for(var h=0;u>h;h++){var c=t[l++],d=t[l++];a[o++]=c,a[o++]=d}}return{flatCoordsOffset:new Uint32Array(n.buffer,0,r),flatCoords:a,count:s}}return{flatCoordsOffset:null,flatCoords:null,count:t.length}},getInitialData:function(t){var e=new dL(["value"],this);return e.hasItemOption=!1,e.initData(t.data,[],function(t,i,n,a){if(t instanceof Array)return 0/0;e.hasItemOption=!0;var o=t.value;return null!=o?o instanceof Array?o[a]:o:void 0}),e},formatTooltip:function(t){var e=this.getData(),i=e.getItemModel(t),n=i.get("name");if(n)return n;var a=i.get("fromName"),o=i.get("toName"),r=[];return null!=a&&r.push(a),null!=o&&r.push(o),Hr(r.join(" > "))},preventIncremental:function(){return!!this.get("effect.show")},getProgressive:function(){var t=this.option.progressive;return null==t?this.option.large?1e4:this.get("progressive"):t},getProgressiveThreshold:function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?2e4:this.get("progressiveThreshold"):t},defaultOption:{coordinateSystem:"geo",zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}}}),LN=jT.prototype,kN=KT.prototype,PN=xo({type:"ec-line",style:{stroke:"#000",fill:null},shape:{x1:0,y1:0,x2:0,y2:0,percent:1,cpx1:null,cpy1:null},buildPath:function(t,e){this[Fg(e)?"_buildPathLine":"_buildPathCurve"](t,e)},_buildPathLine:LN.buildPath,_buildPathCurve:kN.buildPath,pointAt:function(t){return this[Fg(this.shape)?"_pointAtLine":"_pointAtCurve"](t)},_pointAtLine:LN.pointAt,_pointAtCurve:kN.pointAt,tangentAt:function(t){var e=this.shape,i=Fg(e)?[e.x2-e.x1,e.y2-e.y1]:this._tangentAtCurve(t);return te(i,i)},_tangentAtCurve:kN.tangentAt}),ON=["fromSymbol","toSymbol"],NN=Yg.prototype;NN.beforeUpdate=Ug,NN._createLine=function(t,e,i){var n=t.hostModel,a=t.getItemLayout(e),o=Zg(a);o.shape.percent=0,or(o,{shape:{percent:1}},n,e),this.add(o);var r=new NT({name:"label",lineLabelOriginalOpacity:1});this.add(r),f(ON,function(i){var n=Hg(i,t,e);this.add(n),this[Wg(i)]=t.getItemVisual(e,i)},this),this._updateCommonStl(t,e,i)},NN.updateData=function(t,e,i){var n=t.hostModel,a=this.childOfName("line"),o=t.getItemLayout(e),r={shape:{}};Xg(r.shape,o),ar(a,r,n,e),f(ON,function(i){var n=t.getItemVisual(e,i),a=Wg(i);if(this[a]!==n){this.remove(this.childOfName(i));var o=Hg(i,t,e);this.add(o)}this[a]=n},this),this._updateCommonStl(t,e,i)},NN._updateCommonStl=function(t,e,i){var n=t.hostModel,a=this.childOfName("line"),o=i&&i.lineStyle,r=i&&i.hoverLineStyle,l=i&&i.labelModel,u=i&&i.hoverLabelModel;if(!i||t.hasItemOption){var h=t.getItemModel(e);o=h.getModel("lineStyle").getLineStyle(),r=h.getModel("emphasis.lineStyle").getLineStyle(),l=h.getModel("label"),u=h.getModel("emphasis.label")}var c=t.getItemVisual(e,"color"),d=L(t.getItemVisual(e,"opacity"),o.opacity,1);a.useStyle(s({strokeNoScale:!0,fill:"none",stroke:c,opacity:d},o)),a.hoverStyle=r,f(ON,function(t){var e=this.childOfName(t);e&&(e.setColor(c),e.setStyle({opacity:d}))},this);var p,g,m=l.getShallow("show"),v=u.getShallow("show"),y=this.childOfName("label");if((m||v)&&(p=c||"#000",g=n.getFormattedLabel(e,"normal",t.dataType),null==g)){var x=n.getRawValue(e);g=null==x?t.getName(e):isFinite(x)?Tr(x):x}var w=m?g:null,b=v?C(n.getFormattedLabel(e,"emphasis",t.dataType),g):null,S=y.style;if(null!=w||null!=b){jo(y.style,l,{text:w},{autoColor:p}),y.__textAlign=S.textAlign,y.__verticalAlign=S.textVerticalAlign,y.__position=l.get("position")||"middle";var M=l.get("distance");_(M)||(M=[M,M]),y.__labelDistance=M}y.hoverStyle=null!=b?{text:b,textFill:u.getTextColor(!0),fontStyle:u.getShallow("fontStyle"),fontWeight:u.getShallow("fontWeight"),fontSize:u.getShallow("fontSize"),fontFamily:u.getShallow("fontFamily")}:{text:null},y.ignore=!m&&!v,Wo(this)},NN.highlight=function(){this.trigger("emphasis")},NN.downplay=function(){this.trigger("normal")},NN.updateLayout=function(t,e){this.setLinePoints(t.getItemLayout(e))},NN.setLinePoints=function(t){var e=this.childOfName("line");Xg(e.shape,t),e.dirty()},h(Yg,xM);var zN=jg.prototype;zN.isPersistent=function(){return!0},zN.updateData=function(t){var e=this,i=e.group,n=e._lineData;e._lineData=t,n||i.removeAll();var a=Jg(t);t.diff(n).add(function(i){qg(e,t,i,a)}).update(function(i,o){Kg(e,n,t,o,i,a)}).remove(function(t){i.remove(n.getItemGraphicEl(t))}).execute()},zN.updateLayout=function(){var t=this._lineData;t&&t.eachItemGraphicEl(function(e,i){e.updateLayout(t,i)},this)},zN.incrementalPrepareUpdate=function(t){this._seriesScope=Jg(t),this._lineData=null,this.group.removeAll()},zN.incrementalUpdate=function(t,e){function i(t){t.isGroup||$g(t)||(t.incremental=t.useHoverLayer=!0)}for(var n=t.start;n0&&(r=this.getLineLength(n)/l*1e3),r!==this._period||s!==this._loop){n.stopAnimation();var c=u;h&&(c=u(i)),n.__t>0&&(c=-r*n.__t),n.__t=0;var d=n.animate("",s).when(r,{__t:1}).delay(c).during(function(){a.updateSymbolPosition(n)});s||d.done(function(){a.remove(n)}),d.start()}this._period=r,this._loop=s}},RN.getLineLength=function(t){return SS(t.__p1,t.__cp1)+SS(t.__cp1,t.__p2)},RN.updateAnimationPoints=function(t,e){t.__p1=e[0],t.__p2=e[1],t.__cp1=e[2]||[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2]},RN.updateData=function(t,e,i){this.childAt(0).updateData(t,e,i),this._updateEffectSymbol(t,e)},RN.updateSymbolPosition=function(t){var e=t.__p1,i=t.__p2,n=t.__cp1,a=t.__t,o=t.position,r=[o[0],o[1]],s=Oa,l=Na;o[0]=s(e[0],n[0],i[0],a),o[1]=s(e[1],n[1],i[1],a);var u=l(e[0],n[0],i[0],a),h=l(e[1],n[1],i[1],a);if(t.rotation=-Math.atan2(h,u)-Math.PI/2,"line"===this._symbolType||"rect"===this._symbolType||"roundRect"===this._symbolType)if(void 0!==t.__lastT&&t.__lastT=0&&!(n[o]<=e);o--);o=Math.min(o,a-2)}else{for(var o=r;a>o&&!(n[o]>e);o++);o=Math.min(o-1,a-2)}ae(t.position,i[o],i[o+1],(e-n[o])/(n[o+1]-n[o]));var l=i[o+1][0]-i[o][0],u=i[o+1][1]-i[o][1];t.rotation=-Math.atan2(u,l)-Math.PI/2,this._lastFrame=o,this._lastFramePercent=e,t.ignore=!1}},h(nm,em);var VN=xo({shape:{polyline:!1,curveness:0,segs:[]},buildPath:function(t,e){var i=e.segs,n=e.curveness;if(e.polyline)for(var a=0;a0){t.moveTo(i[a++],i[a++]);for(var r=1;o>r;r++)t.lineTo(i[a++],i[a++])}}else for(var a=0;a0){var c=(s+u)/2-(l-h)*n,d=(l+h)/2-(u-s)*n;t.quadraticCurveTo(c,d,u,h)}else t.lineTo(u,h)}},findDataIndex:function(){var t=this.shape,e=t.segs,i=t.curveness;if(t.polyline)for(var n=0,a=0;a0)for(var r=e[a++],s=e[a++],l=1;o>l;l++){var u=e[a++],h=e[a++];if(Za(r,s,u,h))return n}n++}else for(var n=0,a=0;a0){var c=(r+u)/2-(s-h)*i,d=(s+h)/2-(u-r)*i;if(Ua(r,s,c,d,u,h))return n}else if(Za(r,s,u,h))return n;n++}return-1}}),GN=am.prototype;GN.isPersistent=function(){return!this._incremental},GN.updateData=function(t){this.group.removeAll();var e=new VN({rectHover:!0,cursor:"default"});e.setShape({segs:t.getLayout("linesPoints")}),this._setCommon(e,t),this.group.add(e),this._incremental=null},GN.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clearIncremental(),t.count()>5e5?(this._incremental||(this._incremental=new yo({silent:!0})),this.group.add(this._incremental)):this._incremental=null},GN.incrementalUpdate=function(t,e){var i=new VN;i.setShape({segs:e.getLayout("linesPoints")}),this._setCommon(i,e,!!this._incremental),this._incremental?this._incremental.addDisplayable(i,!0):(i.rectHover=!0,i.cursor="default",i.__startIndex=t.start,this.group.add(i))},GN.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},GN._setCommon=function(t,e,i){var n=e.hostModel;t.setShape({polyline:n.get("polyline"),curveness:n.get("lineStyle.curveness")}),t.useStyle(n.getModel("lineStyle").getLineStyle()),t.style.strokeNoScale=!0;var a=e.getVisual("color");a&&t.setStyle("stroke",a),t.setStyle("fill"),i||(t.seriesIndex=n.seriesIndex,t.on("mousemove",function(e){t.dataIndex=null;var i=t.findDataIndex(e.offsetX,e.offsetY);i>0&&(t.dataIndex=i+t.__startIndex)}))},GN._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()};var FN={seriesType:"lines",plan:PD(),reset:function(t){function e(e,o){var r=[];if(a){var s,l=e.end-e.start;if(n){for(var u=0,h=e.start;hp;p++)d=i.dataToPoint(r[p],!1,d),s[c++]=d[0],s[c++]=d[1]}o.setLayout("linesPoints",s)}else for(var h=e.start;hv;v++)m.push(i.dataToPoint(r[v]));else{m[0]=i.dataToPoint(r[0]),m[1]=i.dataToPoint(r[1]);var y=g.get("lineStyle.curveness");+y&&(m[2]=[(m[0][0]+m[1][0])/2-(m[0][1]-m[1][1])*y,(m[0][1]+m[1][1])/2-(m[1][0]-m[0][0])*y])}o.setItemLayout(h,m)}}var i=t.coordinateSystem,n=t.get("polyline"),a=t.pipelineContext.large;return{progress:e}}};Gu({type:"lines",init:function(){},render:function(t,e,i){var n=t.getData(),a=this._updateLineDraw(n,t),o=t.get("zlevel"),r=t.get("effect.trailLength"),s=i.getZr(),l="svg"===s.painter.getType();l||s.painter.getLayer(o).clear(!0),null==this._lastZlevel||l||s.configLayer(this._lastZlevel,{motionBlur:!1}),this._showEffect(t)&&r&&(l||s.configLayer(o,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(r/10+.9,1),0)})),a.updateData(n);var u=t.get("clip",!0)&&Wc(t.coordinateSystem,!1,t);u?this.group.setClipPath(u):this.group.removeClipPath(),this._lastZlevel=o,this._finished=!0},incrementalPrepareRender:function(t,e,i){var n=t.getData(),a=this._updateLineDraw(n,t);a.incrementalPrepareUpdate(n),this._clearLayer(i),this._finished=!1},incrementalRender:function(t,e){this._lineDraw.incrementalUpdate(t,e.getData()),this._finished=t.end===e.getData().count()},updateTransform:function(t,e,i){var n=t.getData(),a=t.pipelineContext;if(!this._finished||a.large||a.progressiveRender)return{update:!0};var o=FN.reset(t);o.progress&&o.progress({start:0,end:n.count()},n),this._lineDraw.updateLayout(),this._clearLayer(i)},_updateLineDraw:function(t,e){var i=this._lineDraw,n=this._showEffect(e),a=!!e.get("polyline"),o=e.pipelineContext,r=o.large;return i&&n===this._hasEffet&&a===this._isPolyline&&r===this._isLargeDraw||(i&&i.remove(),i=this._lineDraw=r?new am:new jg(a?n?nm:im:n?em:Yg),this._hasEffet=n,this._isPolyline=a,this._isLargeDraw=r,this.group.removeAll()),this.group.add(i.group),i},_showEffect:function(t){return!!t.get("effect.show")},_clearLayer:function(t){var e=t.getZr(),i="svg"===e.painter.getType();i||null==this._lastZlevel||e.painter.getLayer(this._lastZlevel).clear(!0)},remove:function(t,e){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(e) +},dispose:function(){}});var WN="lineStyle.opacity".split("."),HN={seriesType:"lines",reset:function(t){function e(t,e){var i=t.getItemModel(e),n=om(i.getShallow("symbol",!0)),a=om(i.getShallow("symbolSize",!0)),o=i.get(WN);n[0]&&t.setItemVisual(e,"fromSymbol",n[0]),n[1]&&t.setItemVisual(e,"toSymbol",n[1]),a[0]&&t.setItemVisual(e,"fromSymbolSize",a[0]),a[1]&&t.setItemVisual(e,"toSymbolSize",a[1]),t.setItemVisual(e,"opacity",o)}var i=om(t.get("symbol")),n=om(t.get("symbolSize")),a=t.getData();return a.setVisual("fromSymbol",i&&i[0]),a.setVisual("toSymbol",i&&i[1]),a.setVisual("fromSymbolSize",n&&n[0]),a.setVisual("toSymbolSize",n&&n[1]),a.setVisual("opacity",t.get(WN)),{dataEach:a.hasItemOption?e:null}}};Ou(FN),Nu(HN);var ZN=function(t){this._directed=t||!1,this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this.data,this.edgeData},XN=ZN.prototype;XN.type="graph",XN.isDirected=function(){return this._directed},XN.addNode=function(t,e){t=null==t?""+e:""+t;var i=this._nodesMap;if(!i[rm(t)]){var n=new sm(t,e);return n.hostGraph=this,this.nodes.push(n),i[rm(t)]=n,n}},XN.getNodeByIndex=function(t){var e=this.data.getRawIndex(t);return this.nodes[e]},XN.getNodeById=function(t){return this._nodesMap[rm(t)]},XN.addEdge=function(t,e,i){var n=this._nodesMap,a=this._edgesMap;if("number"==typeof t&&(t=this.nodes[t]),"number"==typeof e&&(e=this.nodes[e]),sm.isInstance(t)||(t=n[rm(t)]),sm.isInstance(e)||(e=n[rm(e)]),t&&e){var o=t.id+"-"+e.id,r=new lm(t,e,i);return r.hostGraph=this,this._directed&&(t.outEdges.push(r),e.inEdges.push(r)),t.edges.push(r),t!==e&&e.edges.push(r),this.edges.push(r),a[o]=r,r}},XN.getEdgeByIndex=function(t){var e=this.edgeData.getRawIndex(t);return this.edges[e]},XN.getEdge=function(t,e){sm.isInstance(t)&&(t=t.id),sm.isInstance(e)&&(e=e.id);var i=this._edgesMap;return this._directed?i[t+"-"+e]:i[t+"-"+e]||i[e+"-"+t]},XN.eachNode=function(t,e){for(var i=this.nodes,n=i.length,a=0;n>a;a++)i[a].dataIndex>=0&&t.call(e,i[a],a)},XN.eachEdge=function(t,e){for(var i=this.edges,n=i.length,a=0;n>a;a++)i[a].dataIndex>=0&&i[a].node1.dataIndex>=0&&i[a].node2.dataIndex>=0&&t.call(e,i[a],a)},XN.breadthFirstTraverse=function(t,e,i,n){if(sm.isInstance(e)||(e=this._nodesMap[rm(e)]),e){for(var a="out"===i?"outEdges":"in"===i?"inEdges":"edges",o=0;oa;a++)i[a].dataIndex=-1;for(var a=0,o=t.count();o>a;a++)i[t.getRawIndex(a)].dataIndex=a;e.filterSelf(function(t){var i=n[e.getRawIndex(t)];return i.node1.dataIndex>=0&&i.node2.dataIndex>=0});for(var a=0,o=n.length;o>a;a++)n[a].dataIndex=-1;for(var a=0,o=e.count();o>a;a++)n[e.getRawIndex(a)].dataIndex=a},XN.clone=function(){for(var t=new ZN(this._directed),e=this.nodes,i=this.edges,n=0;n=0&&this[t][e].setItemVisual(this.dataIndex,i,n)},getVisual:function(i,n){return this[t][e].getItemVisual(this.dataIndex,i,n)},setLayout:function(i,n){this.dataIndex>=0&&this[t][e].setItemLayout(this.dataIndex,i,n)},getLayout:function(){return this[t][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[t][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[t][e].getRawIndex(this.dataIndex)}}};c(sm,UN("hostGraph","data")),c(lm,UN("hostGraph","edgeData")),ZN.Node=sm,ZN.Edge=lm,wa(sm),wa(lm);var YN=function(t,e,i,n,a){for(var o=new ZN(n),r=0;r "+f)),h++)}var p,g=i.get("coordinateSystem");if("cartesian2d"===g||"polar"===g)p=_h(t,i);else{var m=ks.get(g),v=m&&"view"!==m.type?m.dimensions||[]:[];u(v,"value")<0&&v.concat(["value"]);var y=gL(t,{coordDimensions:v});p=new dL(y,i),p.initData(t)}var x=new dL(["value"],i);return x.initData(l,s),a&&a(p,x),Cf({mainData:p,struct:o,structAttr:"graph",datas:{node:p,edge:x},datasAttr:{node:"data",edge:"edgeData"}}),o.update(),o},jN="-->",qN=function(t){return t.get("autoCurveness")||null},KN=function(t,e){var i=qN(t),n=20,a=[];if("number"==typeof i)n=i;else if(_(i))return void(t.__curvenessList=i);e>n&&(n=e);var o=n%2?n+2:n+3;a=[];for(var r=0;o>r;r++)a.push((r%2?r+1:r)/10*(r%2?-1:1));t.__curvenessList=a},$N=function(t,e,i){var n=[t.id,t.dataIndex].join("."),a=[e.id,e.dataIndex].join(".");return[i.uid,n,a].join(jN)},JN=function(t){var e=t.split(jN);return[e[0],e[2],e[1]].join(jN)},QN=function(t,e){var i=$N(t.node1,t.node2,e);return e.__edgeMap[i]},tz=function(t,e){var i=ez($N(t.node1,t.node2,e),e),n=ez($N(t.node2,t.node1,e),e);return i+n},ez=function(t,e){var i=e.__edgeMap;return i[t]?i[t].length:0},iz=Vu({type:"series.graph",init:function(t){function e(){return i._categoriesData}iz.superApply(this,"init",arguments);var i=this;this.legendVisualProvider=new Jd(e,e),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},mergeOption:function(t){iz.superApply(this,"mergeOption",arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},mergeDefaultAndTheme:function(t){iz.superApply(this,"mergeDefaultAndTheme",arguments),ia(t,["edgeLabel"],["show"])},getInitialData:function(t,e){function i(t,i){function n(t){return t=this.parsePath(t),t&&"label"===t[0]?r:t&&"emphasis"===t[0]&&"label"===t[1]?l:this.parentModel}t.wrapMethod("getItemModel",function(t){var e=o._categoriesModels,i=t.getShallow("category"),n=e[i];return n&&(n.parentModel=t.parentModel,t.parentModel=n),t});var a=o.getModel("edgeLabel"),r=new vr({label:a.option},a.parentModel,e),s=o.getModel("emphasis.edgeLabel"),l=new vr({emphasis:{label:s.option}},s.parentModel,e);i.wrapMethod("getItemModel",function(t){return t.customizeGetParent(n),t})}var n=t.edges||t.links||[],a=t.data||t.nodes||[],o=this;if(a&&n){um(this);var r=YN(a,n,this,!0,i);return f(r.edges,function(t){hm(t.node1,t.node2,this,t.dataIndex)},this),r.data}},getGraph:function(){return this.getData().graph},getEdgeData:function(){return this.getGraph().edgeData},getCategoriesData:function(){return this._categoriesData},formatTooltip:function(t,e,i){if("edge"===i){var n=this.getData(),a=this.getDataParams(t,i),o=n.graph.getEdgeByIndex(t),r=n.getName(o.node1.dataIndex),s=n.getName(o.node2.dataIndex),l=[];return null!=r&&l.push(r),null!=s&&l.push(s),l=Hr(l.join(" > ")),a.value&&(l+=" : "+Hr(a.value)),l}return iz.superApply(this,"formatTooltip",arguments)},_updateCategoriesData:function(){var t=p(this.option.categories||[],function(t){return null!=t.value?t:r({value:0},t)}),e=new dL(["value"],this);e.initData(t),this._categoriesData=e,this._categoriesModels=e.mapArray(function(t){return e.getItemModel(t,!0)})},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},isAnimationEnabled:function(){return iz.superCall(this,"isAnimationEnabled")&&!("force"===this.get("layout")&&this.get("force.layoutAnimation"))},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",legendHoverLink:!0,hoverAnimation:!0,layout:null,focusNodeAdjacency:!1,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,opacity:.5},emphasis:{label:{show:!0}}}}),nz=[],az=[],oz=[],rz=Oa,sz=MS,lz=Math.abs,uz=function(t,e){var i=[],n=Ea,a=[[],[],[]],o=[[],[]],r=[];e/=2,t.eachEdge(function(t){var s=t.getLayout(),l=t.getVisual("fromSymbol"),u=t.getVisual("toSymbol");s.__original||(s.__original=[H(s[0]),H(s[1])],s[2]&&s.__original.push(H(s[2])));var h=s.__original;if(null!=s[2]){if(W(a[0],h[0]),W(a[1],h[2]),W(a[2],h[1]),l&&"none"!==l){var c=fm(t.node1),d=pm(a,h[0],c*e);n(a[0][0],a[1][0],a[2][0],d,i),a[0][0]=i[3],a[1][0]=i[4],n(a[0][1],a[1][1],a[2][1],d,i),a[0][1]=i[3],a[1][1]=i[4]}if(u&&"none"!==u){var c=fm(t.node2),d=pm(a,h[1],c*e);n(a[0][0],a[1][0],a[2][0],d,i),a[1][0]=i[1],a[2][0]=i[2],n(a[0][1],a[1][1],a[2][1],d,i),a[1][1]=i[1],a[2][1]=i[2]}W(s[0],a[0]),W(s[1],a[2]),W(s[2],a[1])}else{if(W(o[0],h[0]),W(o[1],h[1]),Y(r,o[1],o[0]),te(r,r),l&&"none"!==l){var c=fm(t.node1);U(o[0],o[0],r,c*e)}if(u&&"none"!==u){var c=fm(t.node2);U(o[1],o[1],r,-c*e)}W(s[0],o[0]),W(s[1],o[1])}})},hz="__focusNodeAdjacency",cz="__unfocusNodeAdjacency",dz=["itemStyle","opacity"],fz=["lineStyle","opacity"];Gu({type:"graph",init:function(t,e){var i=new Ld,n=new jg,a=this.group;this._controller=new sp(e.getZr()),this._controllerHost={target:a},a.add(i.group),a.add(n.group),this._symbolDraw=i,this._lineDraw=n,this._firstRender=!0},render:function(t,e,i){var n=this,a=t.coordinateSystem;this._model=t;var o=this._symbolDraw,r=this._lineDraw,s=this.group;if("view"===a.type){var l={position:a.position,scale:a.scale};this._firstRender?s.attr(l):ar(s,l,t)}uz(t.getGraph(),dm(t));var u=t.getData();o.updateData(u);var h=t.getEdgeData();r.updateData(h),this._updateNodeAndLinkScale(),this._updateController(t,e,i),clearTimeout(this._layoutTimeout);var c=t.forceLayout,d=t.get("force.layoutAnimation");c&&this._startForceLayoutIteration(c,d),u.eachItemGraphicEl(function(e,a){var o=u.getItemModel(a);e.off("drag").off("dragend");var r=o.get("draggable");r&&e.on("drag",function(){c&&(c.warmUp(),!this._layouting&&this._startForceLayoutIteration(c,d),c.setFixed(a),u.setItemLayout(a,e.position))},this).on("dragend",function(){c&&c.setUnfixed(a)},this),e.setDraggable(r&&c),e[hz]&&e.off("mouseover",e[hz]),e[cz]&&e.off("mouseout",e[cz]),o.get("focusNodeAdjacency")&&(e.on("mouseover",e[hz]=function(){n._clearTimer(),i.dispatchAction({type:"focusNodeAdjacency",seriesId:t.id,dataIndex:e.dataIndex})}),e.on("mouseout",e[cz]=function(){n._dispatchUnfocus(i)}))},this),u.graph.eachEdge(function(e){var a=e.getGraphicEl();a[hz]&&a.off("mouseover",a[hz]),a[cz]&&a.off("mouseout",a[cz]),e.getModel().get("focusNodeAdjacency")&&(a.on("mouseover",a[hz]=function(){n._clearTimer(),i.dispatchAction({type:"focusNodeAdjacency",seriesId:t.id,edgeDataIndex:e.dataIndex})}),a.on("mouseout",a[cz]=function(){n._dispatchUnfocus(i)}))});var f="circular"===t.get("layout")&&t.get("circular.rotateLabel"),p=u.getLayout("cx"),g=u.getLayout("cy");u.eachItemGraphicEl(function(t,e){var i=u.getItemModel(e),n=i.get("label.rotate")||0,a=t.getSymbolPath();if(f){var o=u.getItemLayout(e),r=Math.atan2(o[1]-g,o[0]-p);0>r&&(r=2*Math.PI+r);var s=o[0]e&&(e=0),e*=u;var i=Math.asin(e/2/a);isNaN(i)&&(i=xz/2),_z[t.dataIndex]=i,l+=2*i});var h=(2*xz-l)/s/2,c=0;i.eachNode(function(t){var e=h+_z[t.dataIndex];c+=e,t.setLayout([a*Math.cos(c)+o,a*Math.sin(c)+r]),c+=e})}},bz=function(t){t.eachSeriesByType("graph",function(t){"circular"===t.get("layout")&&wm(t,"symbolSize")})},Sz=U,Mz=function(t){t.eachSeriesByType("graph",function(t){var e=t.coordinateSystem;if(!e||"view"===e.type)if("force"===t.get("layout")){var i=t.preservedPoints||{},n=t.getGraph(),a=n.data,o=n.edgeData,r=t.getModel("force"),s=r.get("initLayout");t.preservedPoints?a.each(function(t){var e=a.getId(t);a.setItemLayout(t,i[e]||[0/0,0/0])}):s&&"none"!==s?"circular"===s&&wm(t,"value"):xm(t);var l=a.getDataExtent("value"),u=o.getDataExtent("value"),h=r.get("repulsion"),c=r.get("edgeLength");_(h)||(h=[h,h]),_(c)||(c=[c,c]),c=[c[1],c[0]];var d=a.mapArray("value",function(t,e){var i=a.getItemLayout(e),n=Mr(t,l,h);return isNaN(n)&&(n=(h[0]+h[1])/2),{w:n,rep:n,fixed:a.getItemModel(e).get("fixed"),p:!i||isNaN(i[0])||isNaN(i[1])?null:i}}),f=o.mapArray("value",function(e,i){var a=n.getEdgeByIndex(i),o=Mr(e,u,c);isNaN(o)&&(o=(c[0]+c[1])/2);var r=a.getModel(),s=L(r.get("lineStyle.curveness"),-cm(a,t,i,!0),0);return{n1:d[a.node1.dataIndex],n2:d[a.node2.dataIndex],d:o,curveness:s,ignoreForceLayout:r.get("ignoreForceLayout")}}),e=t.coordinateSystem,p=e.getBoundingRect(),g=bm(d,f,{rect:p,gravity:r.get("gravity"),friction:r.get("friction")}),m=g.step;g.step=function(t){for(var e=0,o=d.length;o>e;e++)d[e].fixed&&W(d[e].p,n.getNodeByIndex(e).getLayout());m(function(e,o,r){for(var s=0,l=e.length;l>s;s++)e[s].fixed||n.getNodeByIndex(s).setLayout(e[s].p),i[a.getId(s)]=e[s].p;for(var s=0,l=o.length;l>s;s++){var u=o[s],h=n.getEdgeByIndex(s),c=u.n1.p,d=u.n2.p,f=h.getLayout();f=f?f.slice():[],f[0]=f[0]||[],f[1]=f[1]||[],W(f[0],c),W(f[1],d),+u.curveness&&(f[2]=[(c[0]+d[0])/2-(c[1]-d[1])*u.curveness,(c[1]+d[1])/2-(d[0]-c[0])*u.curveness]),h.setLayout(f)}t&&t(r)})},t.forceLayout=g,t.preservedPoints=i,g.step()}else t.forceLayout=null})},Iz=function(t,e){var i=[];return t.eachSeriesByType("graph",function(t){var n=t.get("coordinateSystem");if(!n||"view"===n){var a=t.getData(),o=a.mapArray(function(t){var e=a.getItemModel(t);return[+e.get("x"),+e.get("y")]}),r=[],s=[];Va(o,r,s),s[0]-r[0]===0&&(s[0]+=1,r[0]-=1),s[1]-r[1]===0&&(s[1]+=1,r[1]-=1);var l=(s[0]-r[0])/(s[1]-r[1]),u=Sm(t,e,l);isNaN(l)&&(r=[u.x,u.y],s=[u.x+u.width,u.y+u.height]);var h=s[0]-r[0],c=s[1]-r[1],d=u.width,f=u.height,p=t.coordinateSystem=new Qf;p.zoomLimit=t.get("scaleLimit"),p.setBoundingRect(r[0],r[1],h,c),p.setViewRect(u.x,u.y,d,f),p.setCenter(t.get("center")),p.setZoom(t.get("zoom")),i.push(p)}}),i};Du(gz),Nu(hP("graph","circle",null)),Nu(mz),Nu(vz),Ou(yz),Ou(OC.VISUAL.POST_CHART_LAYOUT,bz),Ou(Mz),ku("graphView",{create:Iz});var Tz=CD.extend({type:"series.boxplot",dependencies:["xAxis","yAxis","grid"],defaultValueDimensions:[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],dimensions:null,defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,layout:null,boxWidth:[7,50],itemStyle:{color:"#fff",borderWidth:1},emphasis:{itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:2,shadowOffsetY:2,shadowColor:"rgba(0,0,0,0.4)"}},animationEasing:"elasticOut",animationDuration:800}});c(Tz,PP,!0);var Az=["itemStyle"],Dz=["emphasis","itemStyle"],Cz=(vl.extend({type:"boxplot",render:function(t){var e=t.getData(),i=this.group,n=this._data;this._data||i.removeAll();var a="horizontal"===t.get("layout")?1:0;e.diff(n).add(function(t){if(e.hasValue(t)){var n=e.getItemLayout(t),o=Mm(n,e,t,a,!0);e.setItemGraphicEl(t,o),i.add(o)}}).update(function(t,o){var r=n.getItemGraphicEl(o);if(!e.hasValue(t))return void i.remove(r);var s=e.getItemLayout(t);r?Im(s,r,e,t):r=Mm(s,e,t,a),i.add(r),e.setItemGraphicEl(t,r)}).remove(function(t){var e=n.getItemGraphicEl(t);e&&i.remove(e)}).execute(),this._data=e},remove:function(){var t=this.group,e=this._data;this._data=null,e&&e.eachItemGraphicEl(function(e){e&&t.remove(e)})},dispose:G}),ao.extend({type:"boxplotBoxPath",shape:{},buildPath:function(t,e){var i=e.points,n=0;for(t.moveTo(i[n][0],i[n][1]),n++;4>n;n++)t.lineTo(i[n][0],i[n][1]);for(t.closePath();no&&(e[1-n]=e[n]+c.sign*o),e},Ez=f,Bz=Math.min,Vz=Math.max,Gz=Math.floor,Fz=Math.ceil,Wz=Tr,Hz=Math.PI;Nm.prototype={type:"parallel",constructor:Nm,_init:function(t,e){var i=t.dimensions,n=t.parallelAxisIndex;Ez(i,function(t,i){var a=n[i],o=e.getComponent("parallelAxis",a),r=this._axesMap.set(t,new zz(t,Yh(o),[0,0],o.get("type"),a)),s="category"===r.type;r.onBand=s&&o.get("boundaryGap"),r.inverse=o.get("inverse"),o.axis=r,r.model=o,r.coordinateSystem=o.coordinateSystem=this},this)},update:function(t){this._updateAxesFromSeries(this._model,t)},containPoint:function(t){var e=this._makeLayoutInfo(),i=e.axisBase,n=e.layoutBase,a=e.pixelDimIndex,o=t[1-a],r=t[a];return o>=i&&o<=i+e.axisLength&&r>=n&&r<=n+e.layoutLength},getModel:function(){return this._model},_updateAxesFromSeries:function(t,e){e.eachSeries(function(i){if(t.contains(i,e)){var n=i.getData();Ez(this.dimensions,function(t){var e=this._axesMap.get(t);e.scale.unionExtentFromData(n,n.mapDimension(t)),Uh(e.scale,e.model)},this)}},this)},resize:function(t,e){this._rect=es(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()}),this._layoutAxes()},getRect:function(){return this._rect},_makeLayoutInfo:function(){var t,e=this._model,i=this._rect,n=["x","y"],a=["width","height"],o=e.get("layout"),r="horizontal"===o?0:1,s=i[a[r]],l=[0,s],u=this.dimensions.length,h=zm(e.get("axisExpandWidth"),l),c=zm(e.get("axisExpandCount")||0,[0,u]),d=e.get("axisExpandable")&&u>3&&u>c&&c>1&&h>0&&s>0,f=e.get("axisExpandWindow");if(f)t=zm(f[1]-f[0],l),f[1]=f[0]+t;else{t=zm(h*(c-1),l);var p=e.get("axisExpandCenter")||Gz(u/2);f=[h*p-t/2],f[1]=f[0]+t}var g=(s-t)/(u-c);3>g&&(g=0);var m=[Gz(Wz(f[0]/h,1))+1,Fz(Wz(f[1]/h,1))-1],v=g/h*f[0];return{layout:o,pixelDimIndex:r,layoutBase:i[n[r]],layoutLength:s,axisBase:i[n[1-r]],axisLength:i[a[1-r]],axisExpandable:d,axisExpandWidth:h,axisCollapseWidth:g,axisExpandWindow:f,axisCount:u,winInnerIndices:m,axisExpandWindow0Pos:v}},_layoutAxes:function(){var t=this._rect,e=this._axesMap,i=this.dimensions,n=this._makeLayoutInfo(),a=n.layout;e.each(function(t){var e=[0,n.axisLength],i=t.inverse?1:0;t.setExtent(e[i],e[1-i])}),Ez(i,function(e,i){var o=(n.axisExpandable?Em:Rm)(i,n),r={horizontal:{x:o.position,y:n.axisLength},vertical:{x:0,y:o.position}},s={horizontal:Hz/2,vertical:0},l=[r[a].x+t.x,r[a].y+t.y],u=s[a],h=Oe();Be(h,h,u),Ee(h,h,l),this._axesLayout[e]={position:l,rotation:u,transform:h,axisNameAvailableWidth:o.axisNameAvailableWidth,axisLabelShow:o.axisLabelShow,nameTruncateMaxWidth:o.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},getAxis:function(t){return this._axesMap.get(t)},dataToPoint:function(t,e){return this.axisCoordToPoint(this._axesMap.get(e).dataToCoord(t),e)},eachActiveState:function(t,e,i,n){null==i&&(i=0),null==n&&(n=t.count());var a=this._axesMap,o=this.dimensions,r=[],s=[];f(o,function(e){r.push(t.mapDimension(e)),s.push(a.get(e).model)});for(var l=this.hasAxisBrushed(),u=i;n>u;u++){var h;if(l){h="active";for(var c=t.getValues(r,u),d=0,p=o.length;p>d;d++){var g=s[d].getActiveState(c[d]);if("inactive"===g){h="inactive";break}}}else h="normal";e(h,u)}},hasAxisBrushed:function(){for(var t=this.dimensions,e=this._axesMap,i=!1,n=0,a=t.length;a>n;n++)"normal"!==e.get(t[n]).model.getActiveState()&&(i=!0);return i},axisCoordToPoint:function(t,e){var i=this._axesLayout[e];return sr([t,0],i.transform)},getAxisLayout:function(t){return n(this._axesLayout[t])},getSlidedAxisExpandWindow:function(t){var e=this._makeLayoutInfo(),i=e.pixelDimIndex,n=e.axisExpandWindow.slice(),a=n[1]-n[0],o=[0,e.axisExpandWidth*(e.axisCount-1)];if(!this.containPoint(t))return{behavior:"none",axisExpandWindow:n};var r,s=t[i]-e.layoutBase-e.axisExpandWindow0Pos,l="slide",u=e.axisCollapseWidth,h=this._model.get("axisExpandSlideTriggerArea"),c=null!=h[0];if(u)c&&u&&sa*(1-h[0])?(l="jump",r=s-a*(1-h[2])):(r=s-a*h[1])>=0&&(r=s-a*(1-h[1]))<=0&&(r=0),r*=e.axisExpandWidth/u,r?Rz(r,n,o,"all"):l="none";else{var a=n[1]-n[0],d=o[1]*s/a;n=[Vz(0,d-a/2)],n[1]=Bz(o[1],n[0]+a),n[0]=n[1]-a}return{axisExpandWindow:n,behavior:l}}},ks.register("parallel",{create:Bm});var Zz=WA.extend({type:"baseParallelAxis",axis:null,activeIntervals:[],getAreaSelectStyle:function(){return AI([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},setActiveIntervals:function(t){var e=this.activeIntervals=n(t);if(e)for(var i=e.length-1;i>=0;i--)Ar(e[i])},getActiveState:function(t){var e=this.activeIntervals;if(!e.length)return"normal";if(null==t||isNaN(t))return"inactive";if(1===e.length){var i=e[0];if(i[0]<=t&&t<=i[1])return"active"}else for(var n=0,a=e.length;a>n;n++)if(e[n][0]<=t&&t<=e[n][1])return"active";return"inactive"}}),Xz={type:"value",dim:null,areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};a(Zz.prototype,UL),mk("parallel",Zz,Vm,Xz),WA.extend({type:"parallel",dependencies:["parallelAxis"],coordinateSystem:null,dimensions:null,parallelAxisIndex:null,layoutMode:"box",defaultOption:{zlevel:0,z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},init:function(){WA.prototype.init.apply(this,arguments),this.mergeOption({})},mergeOption:function(t){var e=this.option;t&&a(e,t,!0),this._initDimensions()},contains:function(t,e){var i=t.get("parallelIndex");return null!=i&&e.getComponent("parallel",i)===this},setAxisExpand:function(t){f(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(e){t.hasOwnProperty(e)&&(this.option[e]=t[e])},this)},_initDimensions:function(){var t=this.dimensions=[],e=this.parallelAxisIndex=[],i=m(this.dependentModels.parallelAxis,function(t){return(t.get("parallelIndex")||0)===this.componentIndex},this);f(i,function(i){t.push("dim"+i.get("dim")),e.push(i.componentIndex)})}});var Uz={type:"axisAreaSelect",event:"axisAreaSelected"};Lu(Uz,function(t,e){e.eachComponent({mainType:"parallelAxis",query:t},function(e){e.axis.model.setActiveIntervals(t.intervals)})}),Lu("parallelAxisExpand",function(t,e){e.eachComponent({mainType:"parallel",query:t},function(e){e.setAxisExpand(t)})});var Yz=x,jz=f,qz=p,Kz=Math.min,$z=Math.max,Jz=Math.pow,Qz=1e4,tR=6,eR=6,iR="globalPan",nR={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},aR={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},oR={brushStyle:{lineWidth:2,stroke:"rgba(0,0,0,0.3)",fill:"rgba(0,0,0,0.1)"},transformable:!0,brushMode:"single",removeOnClick:!1},rR=0;Gm.prototype={constructor:Gm,enableBrush:function(t){return this._brushType&&Wm(this),t.brushType&&Fm(this,t),this},setPanels:function(t){if(t&&t.length){var e=this._panels={};f(t,function(t){e[t.panelId]=n(t)})}else this._panels=null;return this},mount:function(t){t=t||{},this._enableGlobalPan=t.enableGlobalPan;var e=this.group;return this._zr.add(e),e.attr({position:t.position||[0,0],rotation:t.rotation||0,scale:t.scale||[1,1]}),this._transform=e.getLocalTransform(),this},eachCover:function(t,e){jz(this._covers,t,e)},updateCovers:function(t){function e(t,e){return(null!=t.id?t.id:s+e)+"-"+t.brushType}function i(t,i){return e(t.__brushOption,i)}function o(e,i){var n=t[e];if(null!=i&&l[i]===c)u[e]=l[i];else{var a=u[e]=null!=i?(l[i].__brushOption=n,l[i]):Um(h,Xm(h,n));qm(h,a)}}function r(t){l[t]!==c&&h.group.remove(l[t])}t=p(t,function(t){return a(n(oR),t,!0)});var s="\x00-brush-index-",l=this._covers,u=this._covers=[],h=this,c=this._creatingCover;return new Xu(l,t,i,e).add(o).update(o).remove(r).execute(),this},unmount:function(){return this.enableBrush(!1),Qm(this),this._zr.remove(this.group),this},dispose:function(){this.unmount(),this.off()}},c(Gm,AS);var sR={mousedown:function(t){if(this._dragging)wv(this,t);else if(!t.target||!t.target.draggable){vv(t);var e=this.group.transformCoordToLocal(t.offsetX,t.offsetY);this._creatingCover=null;var i=this._creatingPanel=$m(this,t,e);i&&(this._dragging=!0,this._track=[e.slice()])}},mousemove:function(t){var e=t.offsetX,i=t.offsetY,n=this.group.transformCoordToLocal(e,i);if(mv(this,t,n),this._dragging){vv(t);var a=xv(this,t,n,!1);a&&tv(this,a)}},mouseup:function(t){wv(this,t)}},lR={lineX:Sv(0),lineY:Sv(1),rect:{createCover:function(t,e){return nv(Yz(cv,function(t){return t},function(t){return t}),t,e,["w","e","n","s","se","sw","ne","nw"])},getCreatingRange:function(t){var e=iv(t);return lv(e[1][0],e[1][1],e[0][0],e[0][1])},updateCoverShape:function(t,e,i,n){av(t,e,i,n)},updateCommon:ov,contain:yv},polygon:{createCover:function(t,e){var i=new xM;return i.add(new HT({name:"main",style:sv(e),silent:!0})),i},getCreatingRange:function(t){return t},endCreating:function(t,e){e.remove(e.childAt(0)),e.add(new WT({name:"main",draggable:!0,drift:Yz(dv,t,e),ondragend:Yz(tv,t,{isEnd:!0})}))},updateCoverShape:function(t,e,i){e.childAt(0).setShape({points:pv(t,e,i)})},updateCommon:ov,contain:yv}},uR=["axisLine","axisTickLabel","axisName"],hR=Bu({type:"parallelAxis",init:function(t,e){hR.superApply(this,"init",arguments),(this._brushController=new Gm(e.getZr())).on("brush",y(this._onBrush,this))},render:function(t,e,i,n){if(!Dv(t,e,n)){this.axisModel=t,this.api=i,this.group.removeAll(); +var a=this._axisGroup;if(this._axisGroup=new xM,this.group.add(this._axisGroup),t.get("show")){var o=Lv(t,e),s=o.coordinateSystem,l=t.getAreaSelectStyle(),u=l.width,h=t.axis.dim,c=s.getAxisLayout(h),d=r({strokeContainThreshold:u},c),p=new zk(t,d);f(uR,p.add,p),this._axisGroup.add(p.getGroup()),this._refreshBrushController(d,l,t,o,u,i);var g=n&&n.animation===!1?null:t;ur(a,this._axisGroup,g)}}},_refreshBrushController:function(t,e,i,n,a,o){var r=i.axis.getExtent(),s=r[1]-r[0],l=Math.min(30,.1*Math.abs(s)),u=Ti.create({x:r[0],y:-a/2,width:s,height:a});u.x-=l,u.width+=2*l,this._brushController.mount({enableGlobalPan:!0,rotation:t.rotation,position:t.position}).setPanels([{panelId:"pl",clipPath:Mv(u),isTargetByCursor:Tv(u,o,n),getLinearBrushOtherExtent:Iv(u,0)}]).enableBrush({brushType:"lineX",brushStyle:e,removeOnClick:!0}).updateCovers(Cv(i))},_onBrush:function(t,e){var i=this.axisModel,n=i.axis,a=p(t,function(t){return[n.coordToData(t.range[0],!0),n.coordToData(t.range[1],!0)]});(!i.option.realtime===e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:i.id,intervals:a})},dispose:function(){this._brushController.dispose()}}),cR=5;Bu({type:"parallel",render:function(t,e,i){this._model=t,this._api=i,this._handlers||(this._handlers={},f(dR,function(t,e){i.getZr().on(e,this._handlers[e]=y(t,this))},this)),Sl(this,"_throttledDispatchExpand",t.get("axisExpandRate"),"fixRate")},dispose:function(t,e){f(this._handlers,function(t,i){e.getZr().off(i,t)}),this._handlers=null},_throttledDispatchExpand:function(t){this._dispatchExpand(t)},_dispatchExpand:function(t){t&&this._api.dispatchAction(r({type:"parallelAxisExpand"},t))}});var dR={mousedown:function(t){kv(this,"click")&&(this._mouseDownPoint=[t.offsetX,t.offsetY])},mouseup:function(t){var e=this._mouseDownPoint;if(kv(this,"click")&&e){var i=[t.offsetX,t.offsetY],n=Math.pow(e[0]-i[0],2)+Math.pow(e[1]-i[1],2);if(n>cR)return;var a=this._model.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]);"none"!==a.behavior&&this._dispatchExpand({axisExpandWindow:a.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(t){if(!this._mouseDownPoint&&kv(this,"mousemove")){var e=this._model,i=e.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]),n=i.behavior;"jump"===n&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand("none"===n?null:{axisExpandWindow:i.axisExpandWindow,animation:"jump"===n?null:!1})}}};Au(Nz),CD.extend({type:"series.parallel",dependencies:["parallel"],visualColorAccessPath:"lineStyle.color",getInitialData:function(){var t=this.getSource();return Pv(t,this),_h(t,this)},getRawIndicesByActiveState:function(t){var e=this.coordinateSystem,i=this.getData(),n=[];return e.eachActiveState(i,function(e,a){t===e&&n.push(i.getRawIndex(a))}),n},defaultOption:{zlevel:0,z:2,coordinateSystem:"parallel",parallelIndex:0,label:{show:!1},inactiveOpacity:.05,activeOpacity:1,lineStyle:{width:1,opacity:.45,type:"solid"},emphasis:{label:{show:!1}},progressive:500,smooth:!1,animationEasing:"linear"}});var fR=.3,pR=(vl.extend({type:"parallel",init:function(){this._dataGroup=new xM,this.group.add(this._dataGroup),this._data,this._initialized},render:function(t,e,i,n){function a(t){var e=Rv(l,s,t,c,h);Bv(e,l,t,d)}function o(e,i){var a=u.getItemGraphicEl(i),o=zv(l,e,c,h);l.setItemGraphicEl(e,a);var r=n&&n.animation===!1?null:t;ar(a,{shape:{points:o}},r,e),Bv(a,l,e,d)}function r(t){var e=u.getItemGraphicEl(t);s.remove(e)}var s=this._dataGroup,l=t.getData(),u=this._data,h=t.coordinateSystem,c=h.dimensions,d=Ev(t);if(l.diff(u).add(a).update(o).remove(r).execute(),!this._initialized){this._initialized=!0;var f=Nv(h,t,function(){setTimeout(function(){s.removeClipPath()})});s.setClipPath(f)}this._data=l},incrementalPrepareRender:function(){this._initialized=!0,this._data=null,this._dataGroup.removeAll()},incrementalRender:function(t,e){for(var i=e.getData(),n=e.coordinateSystem,a=n.dimensions,o=Ev(e),r=t.start;r=a/3?1:2),l=e.y-n(r)*o*(o>=a/3?1:2);r=e.angle-Math.PI/2,t.moveTo(s,l),t.lineTo(e.x+i(r)*o,e.y+n(r)*o),t.lineTo(e.x+i(e.angle)*a,e.y+n(e.angle)*a),t.lineTo(e.x-i(r)*o,e.y-n(r)*o),t.lineTo(s,l)}})),vR=2*Math.PI,yR=(vl.extend({type:"gauge",render:function(t,e,i){this.group.removeAll();var n=t.get("axisLine.lineStyle.color"),a=Gv(t,i);this._renderMain(t,e,i,n,a)},dispose:function(){},_renderMain:function(t,e,i,n,a){for(var o=this.group,r=t.getModel("axisLine"),s=r.getModel("lineStyle"),l=t.get("clockwise"),u=-t.get("startAngle")/180*Math.PI,h=-t.get("endAngle")/180*Math.PI,c=(h-u)%vR,d=u,f=s.get("width"),p=r.get("show"),g=0;p&&g=t)return n[0][1];for(var e=0;e=t&&(0===e?0:n[e-1][0])=I;I++){var T=Math.cos(_),A=Math.sin(_);if(f.get("show")){var D=new jT({shape:{x1:T*h+l,y1:A*h+u,x2:T*(h-y)+l,y2:A*(h-y)+u},style:S,silent:!0});"auto"===S.stroke&&D.setStyle({stroke:n(I/m)}),s.add(D)}if(g.get("show")){var C=Fv(Tr(I/m*(d-c)+c),g.get("formatter")),L=g.get("distance"),k=n(I/m);s.add(new NT({style:jo({},g,{text:C,x:T*(h-y-L)+l,y:A*(h-y-L)+u,textVerticalAlign:-.4>A?"top":A>.4?"bottom":"middle",textAlign:-.4>T?"left":T>.4?"right":"center"},{autoColor:k}),silent:!0}))}if(p.get("show")&&I!==m){for(var P=0;v>=P;P++){var T=Math.cos(_),A=Math.sin(_),O=new jT({shape:{x1:T*h+l,y1:A*h+u,x2:T*(h-x)+l,y2:A*(h-x)+u},silent:!0,style:M});"auto"===M.stroke&&O.setStyle({stroke:n((I+P/v)/m)}),s.add(O),_+=b}_-=b}else _+=w}},_renderPointer:function(t,e,i,n,a,o,r){var s=this.group,l=this._data;if(!t.get("pointer.show"))return void(l&&l.eachItemGraphicEl(function(t){s.remove(t)}));var u=[+t.get("min"),+t.get("max")],h=[o,r],c=t.getData(),d=c.mapDimension("value");c.diff(l).add(function(e){var i=new mR({shape:{angle:o}});or(i,{shape:{angle:Mr(c.get(d,e),u,h,!0)}},t),s.add(i),c.setItemGraphicEl(e,i)}).update(function(e,i){var n=l.getItemGraphicEl(i);ar(n,{shape:{angle:Mr(c.get(d,e),u,h,!0)}},t),s.add(n),c.setItemGraphicEl(e,n)}).remove(function(t){var e=l.getItemGraphicEl(t);s.remove(e)}).execute(),c.eachItemGraphicEl(function(t,e){var i=c.getItemModel(e),o=i.getModel("pointer");t.setShape({x:a.cx,y:a.cy,width:Ir(o.get("width"),a.r),r:Ir(o.get("length"),a.r)}),t.useStyle(i.getModel("itemStyle").getItemStyle()),"auto"===t.style.fill&&t.setStyle("fill",n(Mr(c.get(d,e),u,[0,1],!0))),Wo(t,i.getModel("emphasis.itemStyle").getItemStyle())}),this._data=c},_renderTitle:function(t,e,i,n,a){var o=t.getData(),r=o.mapDimension("value"),s=t.getModel("title");if(s.get("show")){var l=s.get("offsetCenter"),u=a.cx+Ir(l[0],a.r),h=a.cy+Ir(l[1],a.r),c=+t.get("min"),d=+t.get("max"),f=t.getData().get(r,0),p=n(Mr(f,[c,d],[0,1],!0));this.group.add(new NT({silent:!0,style:jo({},s,{x:u,y:h,text:o.getName(0),textAlign:"center",textVerticalAlign:"middle"},{autoColor:p,forceRich:!0})}))}},_renderDetail:function(t,e,i,n,a){var o=t.getModel("detail"),r=+t.get("min"),s=+t.get("max");if(o.get("show")){var l=o.get("offsetCenter"),u=a.cx+Ir(l[0],a.r),h=a.cy+Ir(l[1],a.r),c=Ir(o.get("width"),a.r),d=Ir(o.get("height"),a.r),f=t.getData(),p=f.get(f.mapDimension("value"),0),g=n(Mr(p,[r,s],[0,1],!0));this.group.add(new NT({silent:!0,style:jo({},o,{x:u,y:h,text:Fv(p,o.get("formatter")),textWidth:isNaN(c)?null:c,textHeight:isNaN(d)?null:d,textAlign:"center",textVerticalAlign:"middle"},{autoColor:g,forceRich:!0})}))}}}),Vu({type:"series.funnel",init:function(t){yR.superApply(this,"init",arguments),this.legendVisualProvider=new Jd(y(this.getData,this),y(this.getRawData,this)),this._defaultLabelLine(t)},getInitialData:function(){return gP(this,{coordDimensions:["value"],encodeDefaulter:x(xs,this)})},_defaultLabelLine:function(t){ia(t,"labelLine",["show"]);var e=t.labelLine,i=t.emphasis.labelLine;e.show=e.show&&t.label.show,i.show=i.show&&t.emphasis.label.show},getDataParams:function(t){var e=this.getData(),i=yR.superCall(this,"getDataParams",t),n=e.mapDimension("value"),a=e.getSum(n);return i.percent=a?+(e.get(n,t)/a*100).toFixed(2):0,i.$vars.push("percent"),i},defaultOption:{zlevel:0,z:2,legendHoverLink:!0,left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",orient:"vertical",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1,type:"solid"}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}}}})),xR=Wv.prototype,_R=["itemStyle","opacity"];xR.updateData=function(t,e,i){var n=this.childAt(0),a=t.hostModel,o=t.getItemModel(e),r=t.getItemLayout(e),l=t.getItemModel(e).get(_R);l=null==l?1:l,n.useStyle({}),i?(n.setShape({points:r.points}),n.setStyle({opacity:0}),or(n,{style:{opacity:l}},a,e)):ar(n,{style:{opacity:l},shape:{points:r.points}},a,e);var u=o.getModel("itemStyle"),h=t.getItemVisual(e,"color");n.setStyle(s({lineJoin:"round",fill:h},u.getItemStyle(["opacity"]))),n.hoverStyle=u.getModel("emphasis").getItemStyle(),this._updateLabel(t,e),Wo(this)},xR._updateLabel=function(t,e){var i=this.childAt(1),n=this.childAt(2),a=t.hostModel,o=t.getItemModel(e),r=t.getItemLayout(e),s=r.label,l=t.getItemVisual(e,"color");ar(i,{shape:{points:s.linePoints||s.linePoints}},a,e),ar(n,{style:{x:s.x,y:s.y}},a,e),n.attr({rotation:s.rotation,origin:[s.x,s.y],z2:10});var u=o.getModel("label"),h=o.getModel("emphasis.label"),c=o.getModel("labelLine"),d=o.getModel("emphasis.labelLine"),l=t.getItemVisual(e,"color");Uo(n.style,n.hoverStyle={},u,h,{labelFetcher:t.hostModel,labelDataIndex:e,defaultText:t.getName(e),autoColor:l,useInsideStyle:!!s.inside},{textAlign:s.textAlign,textVerticalAlign:s.verticalAlign}),n.ignore=n.normalIgnore=!u.get("show"),n.hoverIgnore=!h.get("show"),i.ignore=i.normalIgnore=!c.get("show"),i.hoverIgnore=!d.get("show"),i.setStyle({stroke:l}),i.setStyle(c.getModel("lineStyle").getLineStyle()),i.hoverStyle=d.getModel("lineStyle").getLineStyle()},h(Wv,xM);var wR=(vl.extend({type:"funnel",render:function(t){var e=t.getData(),i=this._data,n=this.group;e.diff(i).add(function(t){var i=new Wv(e,t);e.setItemGraphicEl(t,i),n.add(i)}).update(function(t,a){var o=i.getItemGraphicEl(a);o.updateData(e,t),n.add(o),e.setItemGraphicEl(t,o)}).remove(function(t){var e=i.getItemGraphicEl(t);n.remove(e)}).execute(),this._data=e},remove:function(){this.group.removeAll(),this._data=null},dispose:function(){}}),function(t,e){t.eachSeriesByType("funnel",function(t){var i=t.getData(),n=i.mapDimension("value"),a=t.get("sort"),o=Hv(t,e),r=Zv(i,a),s=t.get("orient"),l=o.width,u=o.height,h=o.x,c=o.y,d="horizontal"===s?[Ir(t.get("minSize"),u),Ir(t.get("maxSize"),u)]:[Ir(t.get("minSize"),l),Ir(t.get("maxSize"),l)],f=i.getDataExtent(n),p=t.get("min"),g=t.get("max");null==p&&(p=Math.min(f[0],0)),null==g&&(g=f[1]);var m=t.get("funnelAlign"),v=t.get("gap"),y="horizontal"===s?l:u,x=(y-v*(i.count()-1))/i.count(),_=function(t,e){if("horizontal"===s){var a,o=i.get(n,t)||0,r=Mr(o,[p,g],d,!0);switch(m){case"top":a=c;break;case"center":a=c+(u-r)/2;break;case"bottom":a=c+(u-r)}return[[e,a],[e,a+r]]}var f,o=i.get(n,t)||0,v=Mr(o,[p,g],d,!0);switch(m){case"left":f=h;break;case"center":f=h+(l-v)/2;break;case"right":f=h+l-v}return[[f,e],[f+v,e]]};"ascending"===a&&(x=-x,v=-v,"horizontal"===s?h+=l:c+=u,r=r.reverse());for(var w=0;w=0&&(r[o[s].depth]=new vr(o[s],this,e));if(a&&n){var l=YN(a,n,this,!0,i);return l.data}},setNodePosition:function(t,e){var i=this.option.data[t];i.localX=e[0],i.localY=e[1]},getGraph:function(){return this.getData().graph},getEdgeData:function(){return this.getGraph().edgeData},formatTooltip:function(t,e,i){if("edge"===i){var n=this.getDataParams(t,i),a=n.data,o=a.source+" -- "+a.target;return n.value&&(o+=" : "+n.value),Hr(o)}if("node"===i){var r=this.getGraph().getNodeByIndex(t),s=r.getLayout().value,l=this.getDataParams(t,i).data.name;if(s)var o=l+" : "+s;return Hr(o)}return bR.superCall(this,"formatTooltip",t,e)},optionUpdated:function(){var t=this.option;t.focusNodeAdjacency===!0&&(t.focusNodeAdjacency="allEdges")},getDataParams:function(t,e){var i=bR.superCall(this,"getDataParams",t,e);if(null==i.value&&"node"===e){var n=this.getGraph().getNodeByIndex(t),a=n.getLayout().value;i.value=a}return i},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",layout:null,left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,focusNodeAdjacency:!1,layoutIterations:32,label:{show:!0,position:"right",color:"#000",fontSize:12},levels:[],nodeAlign:"justify",itemStyle:{borderWidth:1,borderColor:"#333"},lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},animationEasing:"linear",animationDuration:1e3}}),SR=["itemStyle","opacity"],MR=["emphasis","itemStyle","opacity"],IR=["lineStyle","opacity"],TR=["emphasis","lineStyle","opacity"],AR=xo({shape:{x1:0,y1:0,x2:0,y2:0,cpx1:0,cpy1:0,cpx2:0,cpy2:0,extent:0,orient:""},buildPath:function(t,e){var i=e.extent;t.moveTo(e.x1,e.y1),t.bezierCurveTo(e.cpx1,e.cpy1,e.cpx2,e.cpy2,e.x2,e.y2),"vertical"===e.orient?(t.lineTo(e.x2+i,e.y2),t.bezierCurveTo(e.cpx2+i,e.cpy2,e.cpx1+i,e.cpy1,e.x1+i,e.y1)):(t.lineTo(e.x2,e.y2+i),t.bezierCurveTo(e.cpx2,e.cpy2+i,e.cpx1,e.cpy1+i,e.x1,e.y1+i)),t.closePath()},highlight:function(){this.trigger("emphasis")},downplay:function(){this.trigger("normal")}});Gu({type:"sankey",_model:null,_focusAdjacencyDisabled:!1,render:function(t,e,i){var n=this,a=t.getGraph(),o=this.group,r=t.layoutInfo,s=r.width,l=r.height,u=t.getData(),h=t.getData("edge"),c=t.get("orient");this._model=t,o.removeAll(),o.attr("position",[r.x,r.y]),a.eachEdge(function(e){var i=new AR;i.dataIndex=e.dataIndex,i.seriesIndex=t.seriesIndex,i.dataType="edge";var n,a,r,u,d,f,p,g,m=e.getModel("lineStyle"),v=m.get("curveness"),y=e.node1.getLayout(),x=e.node1.getModel(),_=x.get("localX"),w=x.get("localY"),b=e.node2.getLayout(),S=e.node2.getModel(),M=S.get("localX"),I=S.get("localY"),T=e.getLayout();switch(i.shape.extent=Math.max(1,T.dy),i.shape.orient=c,"vertical"===c?(n=(null!=_?_*s:y.x)+T.sy,a=(null!=w?w*l:y.y)+y.dy,r=(null!=M?M*s:b.x)+T.ty,u=null!=I?I*l:b.y,d=n,f=a*(1-v)+u*v,p=r,g=a*v+u*(1-v)):(n=(null!=_?_*s:y.x)+y.dx,a=(null!=w?w*l:y.y)+T.sy,r=null!=M?M*s:b.x,u=(null!=I?I*l:b.y)+T.ty,d=n*(1-v)+r*v,f=a,p=n*v+r*(1-v),g=u),i.setShape({x1:n,y1:a,x2:r,y2:u,cpx1:d,cpy1:f,cpx2:p,cpy2:g}),i.setStyle(m.getItemStyle()),i.style.fill){case"source":i.style.fill=e.node1.getVisual("color");break;case"target":i.style.fill=e.node2.getVisual("color")}Wo(i,e.getModel("emphasis.lineStyle").getItemStyle()),o.add(i),h.setItemGraphicEl(e.dataIndex,i)}),a.eachNode(function(e){var i=e.getLayout(),n=e.getModel(),a=n.get("localX"),r=n.get("localY"),h=n.getModel("label"),c=n.getModel("emphasis.label"),d=new UT({shape:{x:null!=a?a*s:i.x,y:null!=r?r*l:i.y,width:i.dx,height:i.dy},style:n.getModel("itemStyle").getItemStyle()}),f=e.getModel("emphasis.itemStyle").getItemStyle();Uo(d.style,f,h,c,{labelFetcher:t,labelDataIndex:e.dataIndex,defaultText:e.id,isRectText:!0}),d.setStyle("fill",e.getVisual("color")),Wo(d,f),o.add(d),u.setItemGraphicEl(e.dataIndex,d),d.dataType="node"}),u.eachItemGraphicEl(function(e,a){var o=u.getItemModel(a);o.get("draggable")&&(e.drift=function(e,o){n._focusAdjacencyDisabled=!0,this.shape.x+=e,this.shape.y+=o,this.dirty(),i.dispatchAction({type:"dragNode",seriesId:t.id,dataIndex:u.getRawIndex(a),localX:this.shape.x/s,localY:this.shape.y/l})},e.ondragend=function(){n._focusAdjacencyDisabled=!1},e.draggable=!0,e.cursor="move"),e.highlight=function(){this.trigger("emphasis")},e.downplay=function(){this.trigger("normal")},e.focusNodeAdjHandler&&e.off("mouseover",e.focusNodeAdjHandler),e.unfocusNodeAdjHandler&&e.off("mouseout",e.unfocusNodeAdjHandler),o.get("focusNodeAdjacency")&&(e.on("mouseover",e.focusNodeAdjHandler=function(){n._focusAdjacencyDisabled||(n._clearTimer(),i.dispatchAction({type:"focusNodeAdjacency",seriesId:t.id,dataIndex:e.dataIndex}))}),e.on("mouseout",e.unfocusNodeAdjHandler=function(){n._focusAdjacencyDisabled||n._dispatchUnfocus(i)}))}),h.eachItemGraphicEl(function(e,a){var o=h.getItemModel(a);e.focusNodeAdjHandler&&e.off("mouseover",e.focusNodeAdjHandler),e.unfocusNodeAdjHandler&&e.off("mouseout",e.unfocusNodeAdjHandler),o.get("focusNodeAdjacency")&&(e.on("mouseover",e.focusNodeAdjHandler=function(){n._focusAdjacencyDisabled||(n._clearTimer(),i.dispatchAction({type:"focusNodeAdjacency",seriesId:t.id,edgeDataIndex:e.dataIndex}))}),e.on("mouseout",e.unfocusNodeAdjHandler=function(){n._focusAdjacencyDisabled||n._dispatchUnfocus(i)}))}),!this._data&&t.get("animation")&&o.setClipPath(qv(o.getBoundingRect(),t,function(){o.removeClipPath()})),this._data=t.getData()},dispose:function(){this._clearTimer()},_dispatchUnfocus:function(t){var e=this;this._clearTimer(),this._unfocusDelayTimer=setTimeout(function(){e._unfocusDelayTimer=null,t.dispatchAction({type:"unfocusNodeAdjacency",seriesId:e._model.id})},500)},_clearTimer:function(){this._unfocusDelayTimer&&(clearTimeout(this._unfocusDelayTimer),this._unfocusDelayTimer=null)},focusNodeAdjacency:function(t,e,i,n){var a=t.getData(),o=a.graph,r=n.dataIndex,s=a.getItemModel(r),l=n.edgeDataIndex;if(null!=r||null!=l){var u=o.getNodeByIndex(r),h=o.getEdgeByIndex(l);if(o.eachNode(function(t){Yv(t,SR,.1)}),o.eachEdge(function(t){Yv(t,IR,.1)}),u){jv(u,MR);var c=s.get("focusNodeAdjacency");"outEdges"===c?f(u.outEdges,function(t){t.dataIndex<0||(jv(t,TR),jv(t.node2,MR))}):"inEdges"===c?f(u.inEdges,function(t){t.dataIndex<0||(jv(t,TR),jv(t.node1,MR))}):"allEdges"===c&&f(u.edges,function(t){t.dataIndex<0||(jv(t,TR),t.node1!==u&&jv(t.node1,MR),t.node2!==u&&jv(t.node2,MR))})}h&&(jv(h,TR),jv(h.node1,MR),jv(h.node2,MR))}},unfocusNodeAdjacency:function(t){var e=t.getGraph();e.eachNode(function(t){Yv(t,SR)}),e.eachEdge(function(t){Yv(t,IR)})}}),Lu({type:"dragNode",event:"dragnode",update:"update"},function(t,e){e.eachComponent({mainType:"series",subType:"sankey",query:t},function(e){e.setNodePosition(t.dataIndex,[t.localX,t.localY])})});var DR=function(t,e){t.eachSeriesByType("sankey",function(t){var i=t.get("nodeWidth"),n=t.get("nodeGap"),a=Kv(t,e);t.layoutInfo=a;var o=a.width,r=a.height,s=t.getGraph(),l=s.nodes,u=s.edges;Jv(l);var h=m(l,function(t){return 0===t.getLayout().value}),c=0!==h.length?0:t.get("layoutIterations"),d=t.get("orient"),f=t.get("nodeAlign");$v(l,u,i,n,o,r,c,d,f)})},CR=function(t){t.eachSeriesByType("sankey",function(t){var e=t.getGraph(),i=e.nodes;if(i.length){var n=1/0,a=-1/0;f(i,function(t){var e=t.getLayout().value;n>e&&(n=e),e>a&&(a=e)}),f(i,function(e){var i=new kO({type:"color",mappingMethod:"linear",dataExtent:[n,a],visual:t.get("color")}),o=i.mapValueToVisual(e.getLayout().value),r=e.getModel().get("itemStyle.color");null!=r?e.setVisual("color",r):e.setVisual("color",o)})}})};Ou(DR),Nu(CR);var LR=function(t,e,i,n,a){sk.call(this,t,e,i),this.type=n||"value",this.position=a||"bottom",this.orient=null};LR.prototype={constructor:LR,model:null,isHorizontal:function(){var t=this.position;return"top"===t||"bottom"===t},pointToData:function(t,e){return this.coordinateSystem.pointToData(t,e)[0]},toGlobalCoord:null,toLocalCoord:null},h(LR,sk),yy.prototype={type:"singleAxis",axisPointerEnabled:!0,constructor:yy,_init:function(t){var e=this.dimension,i=new LR(e,Yh(t),[0,0],t.get("type"),t.get("position")),n="category"===i.type;i.onBand=n&&t.get("boundaryGap"),i.inverse=t.get("inverse"),i.orient=t.get("orient"),t.axis=i,i.model=t,i.coordinateSystem=this,this._axis=i},update:function(t){t.eachSeries(function(t){if(t.coordinateSystem===this){var e=t.getData();f(e.mapDimension(this.dimension,!0),function(t){this._axis.scale.unionExtentFromData(e,t)},this),Uh(this._axis.scale,this._axis.model)}},this)},resize:function(t,e){this._rect=es({left:t.get("left"),top:t.get("top"),right:t.get("right"),bottom:t.get("bottom"),width:t.get("width"),height:t.get("height")},{width:e.getWidth(),height:e.getHeight()}),this._adjustAxis()},getRect:function(){return this._rect},_adjustAxis:function(){var t=this._rect,e=this._axis,i=e.isHorizontal(),n=i?[0,t.width]:[0,t.height],a=e.reverse?1:0;e.setExtent(n[a],n[1-a]),this._updateAxisTransform(e,i?t.x:t.y)},_updateAxisTransform:function(t,e){var i=t.getExtent(),n=i[0]+i[1],a=t.isHorizontal();t.toGlobalCoord=a?function(t){return t+e}:function(t){return n-t+e},t.toLocalCoord=a?function(t){return t-e}:function(t){return n-t+e}},getAxis:function(){return this._axis},getBaseAxis:function(){return this._axis},getAxes:function(){return[this._axis]},getTooltipAxes:function(){return{baseAxes:[this.getAxis()]}},containPoint:function(t){var e=this.getRect(),i=this.getAxis(),n=i.orient;return"horizontal"===n?i.contain(i.toLocalCoord(t[0]))&&t[1]>=e.y&&t[1]<=e.y+e.height:i.contain(i.toLocalCoord(t[1]))&&t[0]>=e.y&&t[0]<=e.y+e.height},pointToData:function(t){var e=this.getAxis();return[e.coordToData(e.toLocalCoord(t["horizontal"===e.orient?0:1]))]},dataToPoint:function(t){var e=this.getAxis(),i=this.getRect(),n=[],a="horizontal"===e.orient?0:1;return t instanceof Array&&(t=t[0]),n[a]=e.toGlobalCoord(e.dataToCoord(+t)),n[1-a]=0===a?i.y+i.height/2:i.x+i.width/2,n}},ks.register("single",{create:xy,dimensions:yy.prototype.dimensions});var kR=["axisLine","axisTickLabel","axisName"],PR=["splitArea","splitLine"],OR=Wk.extend({type:"singleAxis",axisPointerClass:"SingleAxisPointer",render:function(t,e,i,n){var a=this.group;a.removeAll();var o=this._axisGroup;this._axisGroup=new xM;var r=_y(t),s=new zk(t,r);f(kR,s.add,s),a.add(this._axisGroup),a.add(s.getGroup()),f(PR,function(e){t.get(e+".show")&&this["_"+e](t)},this),ur(o,this._axisGroup,t),OR.superCall(this,"render",t,e,i,n)},remove:function(){Id(this)},_splitLine:function(t){var e=t.axis;if(!e.scale.isBlank()){var i=t.getModel("splitLine"),n=i.getModel("lineStyle"),a=n.get("width"),o=n.get("color");o=o instanceof Array?o:[o];for(var r=t.coordinateSystem.getRect(),s=e.isHorizontal(),l=[],u=0,h=e.getTicksCoords({tickModel:i}),c=[],d=[],f=0;fr||_(r))return{point:[]};var s=o.getItemGraphicEl(r),l=i.coordinateSystem;if(i.getTooltipPosition)n=i.getTooltipPosition(r)||[];else if(l&&l.dataToPoint)n=l.dataToPoint(o.getValues(p(l.dimensions,function(t){return o.mapDimension(t)}),r,!0))||[];else if(s){var u=s.getBoundingRect().clone();u.applyTransform(s.transform),n=[u.x+u.width/2,u.y+u.height/2]}return{point:n,el:s}},ER=f,BR=x,VR=ca(),GR=function(t,e,i){var n=t.currTrigger,a=[t.x,t.y],o=t,r=t.dispatchAction||y(i.dispatchAction,i),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){ky(a)&&(a=RR({seriesIndex:o.seriesIndex,dataIndex:o.dataIndex},e).point);var l=ky(a),u=o.axesInfo,h=s.axesInfo,c="leave"===n||ky(a),d={},f={},p={list:[],map:{}},g={showPointer:BR(My,f),showTooltip:BR(Iy,p)};ER(s.coordSysMap,function(t,e){var i=l||t.containPoint(a);ER(s.coordSysAxesInfo[e],function(t){var e=t.axis,n=Cy(u,t);if(!c&&i&&(!u||n)){var o=n&&n.value;null!=o||l||(o=e.pointToData(a)),null!=o&&by(t,o,g,!1,d)}})});var m={};return ER(h,function(t,e){var i=t.linkGroup;i&&!f[e]&&ER(i.axesInfo,function(e,n){var a=f[n];if(e!==t&&a){var o=a.value;i.mapper&&(o=t.axis.scale.parse(i.mapper(o,Ly(e),Ly(t)))),m[t.key]=o}})}),ER(m,function(t,e){by(h[e],t,g,!0,d)}),Ty(f,h,d),Ay(p,a,t,r),Dy(h,r,i),d}},FR=(Eu({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}}}),ca()),WR=f,HR=Bu({type:"axisPointer",render:function(t,e,i){var n=e.getComponent("tooltip"),a=t.get("triggerOn")||n&&n.get("triggerOn")||"mousemove|click";Py("axisPointer",i,function(t,e,i){"none"!==a&&("leave"===t||a.indexOf(t)>=0)&&i({type:"updateAxisPointer",currTrigger:t,x:e&&e.offsetX,y:e&&e.offsetY})})},remove:function(t,e){By(e.getZr(),"axisPointer"),HR.superApply(this._model,"remove",arguments)},dispose:function(t,e){By("axisPointer",e),HR.superApply(this._model,"dispose",arguments)}}),ZR=ca(),XR=n,UR=y;Vy.prototype={_group:null,_lastGraphicKey:null,_handle:null,_dragging:!1,_lastValue:null,_lastStatus:null,_payloadInfo:null,animationThreshold:15,render:function(t,e,i,n){var a=e.get("value"),o=e.get("status");if(this._axisModel=t,this._axisPointerModel=e,this._api=i,n||this._lastValue!==a||this._lastStatus!==o){this._lastValue=a,this._lastStatus=o;var r=this._group,s=this._handle;if(!o||"hide"===o)return r&&r.hide(),void(s&&s.hide());r&&r.show(),s&&s.show();var l={};this.makeElOption(l,a,t,e,i);var u=l.graphicKey;u!==this._lastGraphicKey&&this.clear(i),this._lastGraphicKey=u;var h=this._moveAnimation=this.determineAnimation(t,e);if(r){var c=x(Gy,e,h);this.updatePointerEl(r,l,c,e),this.updateLabelEl(r,l,c,e)}else r=this._group=new xM,this.createPointerEl(r,l,t,e),this.createLabelEl(r,l,t,e),i.getZr().add(r);Zy(r,e,!0),this._renderHandle(a)}},remove:function(t){this.clear(t)},dispose:function(t){this.clear(t)},determineAnimation:function(t,e){var i=e.get("animation"),n=t.axis,a="category"===n.type,o=e.get("snap");if(!o&&!a)return!1;if("auto"===i||null==i){var r=this.animationThreshold;if(a&&n.getBandWidth()>r)return!0;if(o){var s=vd(t).seriesDataCount,l=n.getExtent();return Math.abs(l[0]-l[1])/s>r}return!1}return i===!0},makeElOption:function(){},createPointerEl:function(t,e){var i=e.pointer;if(i){var n=ZR(t).pointerEl=new vA[i.type](XR(e.pointer));t.add(n)}},createLabelEl:function(t,e,i,n){if(e.label){var a=ZR(t).labelEl=new UT(XR(e.label));t.add(a),Wy(a,n)}},updatePointerEl:function(t,e,i){var n=ZR(t).pointerEl;n&&e.pointer&&(n.setStyle(e.pointer.style),i(n,{shape:e.pointer.shape}))},updateLabelEl:function(t,e,i,n){var a=ZR(t).labelEl;a&&(a.setStyle(e.label.style),i(a,{shape:e.label.shape,position:e.label.position}),Wy(a,n))},_renderHandle:function(t){if(!this._dragging&&this.updateHandleTransform){var e=this._axisPointerModel,i=this._api.getZr(),n=this._handle,a=e.getModel("handle"),o=e.get("status");if(!a.get("show")||!o||"hide"===o)return n&&i.remove(n),void(this._handle=null);var r;this._handle||(r=!0,n=this._handle=dr(a.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){NS(t.event)},onmousedown:UR(this._onHandleDragMove,this,0,0),drift:UR(this._onHandleDragMove,this),ondragend:UR(this._onHandleDragEnd,this)}),i.add(n)),Zy(n,e,!1);var s=["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];n.setStyle(a.getItemStyle(null,s));var l=a.get("size");_(l)||(l=[l,l]),n.attr("scale",[l[0]/2,l[1]/2]),Sl(this,"_doDispatchAxisPointer",a.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,r)}},_moveHandleToValue:function(t,e){Gy(this._axisPointerModel,!e&&this._moveAnimation,this._handle,Hy(this.getHandleTransform(t,this._axisModel,this._axisPointerModel))) +},_onHandleDragMove:function(t,e){var i=this._handle;if(i){this._dragging=!0;var n=this.updateHandleTransform(Hy(i),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=n,i.stopAnimation(),i.attr(Hy(n)),ZR(i).lastProp=null,this._doDispatchAxisPointer()}},_doDispatchAxisPointer:function(){var t=this._handle;if(t){var e=this._payloadInfo,i=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:i.axis.dim,axisIndex:i.componentIndex}]})}},_onHandleDragEnd:function(){this._dragging=!1;var t=this._handle;if(t){var e=this._axisPointerModel.get("value");this._moveHandleToValue(e),this._api.dispatchAction({type:"hideTip"})}},getHandleTransform:null,updateHandleTransform:null,clear:function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),i=this._group,n=this._handle;e&&i&&(this._lastGraphicKey=null,i&&e.remove(i),n&&e.remove(n),this._group=null,this._handle=null,this._payloadInfo=null)},doClear:function(){},buildLabel:function(t,e,i){return i=i||0,{x:t[i],y:t[1-i],width:e[i],height:e[1-i]}}},Vy.prototype.constructor=Vy,_a(Vy);var YR=Vy.extend({makeElOption:function(t,e,i,n,a){var o=i.axis,r=o.grid,s=n.get("type"),l=tx(r,o).getOtherAxis(o).getGlobalExtent(),u=o.toGlobalCoord(o.dataToCoord(e,!0));if(s&&"none"!==s){var h=Xy(n),c=jR[s](o,u,l);c.style=h,t.graphicKey=c.type,t.pointer=c}var d=Sd(r.model,i);Ky(e,t,d,i,n,a)},getHandleTransform:function(t,e,i){var n=Sd(e.axis.grid.model,e,{labelInside:!1});return n.labelMargin=i.get("handle.margin"),{position:qy(e.axis,t,n),rotation:n.rotation+(n.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(t,e,i){var n=i.axis,a=n.grid,o=n.getGlobalExtent(!0),r=tx(a,n).getOtherAxis(n).getGlobalExtent(),s="x"===n.dim?0:1,l=t.position;l[s]+=e[s],l[s]=Math.min(o[1],l[s]),l[s]=Math.max(o[0],l[s]);var u=(r[1]+r[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]}}}),jR={line:function(t,e,i){var n=$y([e,i[0]],[e,i[1]],ex(t));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(t,e,i){var n=Math.max(1,t.getBandWidth()),a=i[1]-i[0];return{type:"Rect",shape:Jy([e-n/2,i[0]],[n,a],ex(t))}}};Wk.registerAxisPointerClass("CartesianAxisPointer",YR),Au(function(t){if(t){(!t.axisPointer||0===t.axisPointer.length)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!_(e)&&(t.axisPointer.link=[e])}}),Du(OC.PROCESSOR.STATISTIC,function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=hd(t,e)}),Lu({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},GR);var qR=["x","y"],KR=["width","height"],$R=Vy.extend({makeElOption:function(t,e,i,n,a){var o=i.axis,r=o.coordinateSystem,s=nx(r,1-ix(o)),l=r.dataToPoint(e)[0],u=n.get("type");if(u&&"none"!==u){var h=Xy(n),c=JR[u](o,l,s);c.style=h,t.graphicKey=c.type,t.pointer=c}var d=_y(i);Ky(e,t,d,i,n,a)},getHandleTransform:function(t,e,i){var n=_y(e,{labelInside:!1});return n.labelMargin=i.get("handle.margin"),{position:qy(e.axis,t,n),rotation:n.rotation+(n.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(t,e,i){var n=i.axis,a=n.coordinateSystem,o=ix(n),r=nx(a,o),s=t.position;s[o]+=e[o],s[o]=Math.min(r[1],s[o]),s[o]=Math.max(r[0],s[o]);var l=nx(a,1-o),u=(l[1]+l[0])/2,h=[u,u];return h[o]=s[o],{position:s,rotation:t.rotation,cursorPoint:h,tooltipOption:{verticalAlign:"middle"}}}}),JR={line:function(t,e,i){var n=$y([e,i[0]],[e,i[1]],ix(t));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(t,e,i){var n=t.getBandWidth(),a=i[1]-i[0];return{type:"Rect",shape:Jy([e-n/2,i[0]],[n,a],ix(t))}}};Wk.registerAxisPointerClass("SingleAxisPointer",$R),Bu({type:"single"});var QR=2,tE=CD.extend({type:"series.themeRiver",dependencies:["singleAxis"],nameMap:null,init:function(){tE.superApply(this,"init",arguments),this.legendVisualProvider=new Jd(y(this.getData,this),y(this.getRawData,this))},fixData:function(t){var e=t.length,i={},n=va(t,function(t){return i.hasOwnProperty(t[0])||(i[t[0]]=-1),t[2]}),a=[];n.buckets.each(function(t,e){a.push({name:e,dataList:t})});for(var o=a.length,r=0;o>r;++r){for(var s=a[r].name,l=0;ln;++n)i[n]=n;var a=t.mapDimension("single"),o=va(i,function(e){return t.get("name",e)}),r=[];return o.buckets.each(function(e,i){e.sort(function(e,i){return t.get(a,e)-t.get(a,i)}),r.push({name:i,indices:e})}),r},getAxisTooltipData:function(t,e){_(t)||(t=t?[t]:[]);for(var i,n=this.getData(),a=this.getLayerSeries(),o=[],r=a.length,s=0;r>s;++s){for(var l=Number.MAX_VALUE,u=-1,h=a[s].indices.length,c=0;h>c;++c){var d=n.get(t[0],a[s].indices[c]),f=Math.abs(d-e);l>=f&&(i=d,l=f,u=a[s].indices[c])}o.push(u)}return{dataIndices:o,nestestValue:i}},formatTooltip:function(t){var e=this.getData(),i=e.getName(t),n=e.get(e.mapDimension("value"),t);return(isNaN(n)||null==n)&&(n="-"),Hr(i+" : "+n)},defaultOption:{zlevel:0,z:2,coordinateSystem:"singleAxis",boundaryGap:["10%","10%"],singleAxisIndex:0,animationEasing:"linear",label:{margin:4,show:!0,position:"left",color:"#000",fontSize:11},emphasis:{label:{show:!0}}}});Gu({type:"themeRiver",init:function(){this._layers=[]},render:function(t){function e(t){return t.name}function i(e,i,s){var l=this._layers;if("remove"===e)return void a.remove(l[i]);for(var u,h=[],d=[],f=o[i].indices,p=0;pn[1]&&n.reverse(),{coordSys:{type:"polar",cx:t.cx,cy:t.cy,r:n[1],r0:n[0]},api:{coord:y(function(n){var a=e.dataToRadius(n[0]),o=i.dataToAngle(n[1]),r=t.coordToPoint([a,o]);return r.push(a,o*Math.PI/180),r}),size:y(Nx,t)}}},cE=function(t){var e=t.getRect(),i=t.getRangeInfo();return{coordSys:{type:"calendar",x:e.x,y:e.y,width:e.width,height:e.height,cellWidth:t.getCellWidth(),cellHeight:t.getCellHeight(),rangeInfo:{start:i.start,end:i.end,weeks:i.weeks,dayCount:i.allDay}},api:{coord:function(e,i){return t.dataToPoint(e,i)}}}},dE=sA,fE=["itemStyle"],pE=["emphasis","itemStyle"],gE=["label"],mE=["emphasis","label"],vE="e\x00\x00",yE={cartesian2d:sE,geo:lE,singleAxis:uE,polar:hE,calendar:cE};CD.extend({type:"series.custom",dependencies:["grid","polar","geo","singleAxis","calendar"],defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,useTransform:!0,clip:!1},getInitialData:function(){return _h(this.getSource(),this)},getDataParams:function(t,e,i){var n=CD.prototype.getDataParams.apply(this,arguments);return i&&(n.info=i.info),n}}),vl.extend({type:"custom",_data:null,render:function(t,e,i,n){var a=this._data,o=t.getData(),r=this.group,s=Bx(t,o,e,i);o.diff(a).add(function(e){Gx(null,e,s(e,n),t,r,o)}).update(function(e,i){var l=a.getItemGraphicEl(i);Gx(l,e,s(e,n),t,r,o)}).remove(function(t){var e=a.getItemGraphicEl(t);e&&r.remove(e)}).execute();var l=t.get("clip",!0)?Wc(t.coordinateSystem,!1,t):null;l?r.setClipPath(l):r.removeClipPath(),this._data=o},incrementalPrepareRender:function(){this.group.removeAll(),this._data=null},incrementalRender:function(t,e,i,n,a){function o(t){t.isGroup||(t.incremental=!0,t.useHoverLayer=!0)}for(var r=e.getData(),s=Bx(e,r,i,n),l=t.start;lc?c=f:(d.lastTickCount=a,d.lastAutoInterval=c),c}},h(n_,sk);var _E=function(t){this.name=t||"",this.cx=0,this.cy=0,this._radiusAxis=new i_,this._angleAxis=new n_,this._radiusAxis.polar=this._angleAxis.polar=this};_E.prototype={type:"polar",axisPointerEnabled:!0,constructor:_E,dimensions:["radius","angle"],model:null,containPoint:function(t){var e=this.pointToCoord(t);return this._radiusAxis.contain(e[0])&&this._angleAxis.contain(e[1])},containData:function(t){return this._radiusAxis.containData(t[0])&&this._angleAxis.containData(t[1])},getAxis:function(t){return this["_"+t+"Axis"]},getAxes:function(){return[this._radiusAxis,this._angleAxis]},getAxesByScale:function(t){var e=[],i=this._angleAxis,n=this._radiusAxis;return i.scale.type===t&&e.push(i),n.scale.type===t&&e.push(n),e},getAngleAxis:function(){return this._angleAxis},getRadiusAxis:function(){return this._radiusAxis},getOtherAxis:function(t){var e=this._angleAxis;return t===e?this._radiusAxis:e},getBaseAxis:function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},getTooltipAxes:function(t){var e=null!=t&&"auto"!==t?this.getAxis(t):this.getBaseAxis();return{baseAxes:[e],otherAxes:[this.getOtherAxis(e)]}},dataToPoint:function(t,e){return this.coordToPoint([this._radiusAxis.dataToRadius(t[0],e),this._angleAxis.dataToAngle(t[1],e)])},pointToData:function(t,e){var i=this.pointToCoord(t);return[this._radiusAxis.radiusToData(i[0],e),this._angleAxis.angleToData(i[1],e)]},pointToCoord:function(t){var e=t[0]-this.cx,i=t[1]-this.cy,n=this.getAngleAxis(),a=n.getExtent(),o=Math.min(a[0],a[1]),r=Math.max(a[0],a[1]);n.inverse?o=r-360:r=o+360;var s=Math.sqrt(e*e+i*i);e/=s,i/=s;for(var l=Math.atan2(-i,e)/Math.PI*180,u=o>l?1:-1;o>l||l>r;)l+=360*u;return[s,l]},coordToPoint:function(t){var e=t[0],i=t[1]/180*Math.PI,n=Math.cos(i)*e+this.cx,a=-Math.sin(i)*e+this.cy;return[n,a]},getArea:function(){var t=this.getAngleAxis(),e=this.getRadiusAxis(),i=e.getExtent().slice();i[0]>i[1]&&i.reverse();var n=t.getExtent(),a=Math.PI/180;return{cx:this.cx,cy:this.cy,r0:i[0],r:i[1],startAngle:-n[0]*a,endAngle:-n[1]*a,clockwise:t.inverse,contain:function(t,e){var i=t-this.cx,n=e-this.cy,a=i*i+n*n,o=this.r,r=this.r0;return o*o>=a&&a>=r*r}}}};var wE=WA.extend({type:"polarAxis",axis:null,getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"polar",index:this.option.polarIndex,id:this.option.polarId})[0]}});a(wE.prototype,UL);var bE={angle:{startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:!1}},radius:{splitNumber:5}};mk("angle",wE,a_,bE.angle),mk("radius",wE,a_,bE.radius),Eu({type:"polar",dependencies:["polarAxis","angleAxis"],coordinateSystem:null,findAxisModel:function(t){var e,i=this.ecModel;return i.eachComponent(t,function(t){t.getCoordSysModel()===this&&(e=t)},this),e},defaultOption:{zlevel:0,z:0,center:["50%","50%"],radius:"80%"}});var SE={dimensions:_E.prototype.dimensions,create:function(t,e){var i=[];return t.eachComponent("polar",function(t,n){var a=new _E(n);a.update=r_;var o=a.getRadiusAxis(),r=a.getAngleAxis(),s=t.findAxisModel("radiusAxis"),l=t.findAxisModel("angleAxis");s_(o,s),s_(r,l),o_(a,t,e),i.push(a),t.coordinateSystem=a,a.model=t}),t.eachSeries(function(e){if("polar"===e.get("coordinateSystem")){var i=t.queryComponents({mainType:"polar",index:e.get("polarIndex"),id:e.get("polarId")})[0];e.coordinateSystem=i.coordinateSystem}}),i}};ks.register("polar",SE);var ME=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];Wk.extend({type:"angleAxis",axisPointerClass:"PolarAxisPointer",render:function(t){if(this.group.removeAll(),t.get("show")){var e=t.axis,i=e.polar,a=i.getRadiusAxis().getExtent(),o=e.getTicksCoords(),r=e.getMinorTicksCoords(),s=p(e.getViewLabels(),function(t){var t=n(t);return t.coord=e.dataToCoord(t.tickValue),t});h_(s),h_(o),f(ME,function(n){!t.get(n+".show")||e.scale.isBlank()&&"axisLine"!==n||this["_"+n](t,i,o,r,a,s)},this)}},_axisLine:function(t,e,i,n,a){var o,r=t.getModel("axisLine.lineStyle"),s=u_(e),l=s?0:1;o=0===a[l]?new zT({shape:{cx:e.cx,cy:e.cy,r:a[s]},style:r.getLineStyle(),z2:1,silent:!0}):new VT({shape:{cx:e.cx,cy:e.cy,r:a[s],r0:a[l]},style:r.getLineStyle(),z2:1,silent:!0}),o.style.fill=null,this.group.add(o)},_axisTick:function(t,e,i,n,a){var o=t.getModel("axisTick"),r=(o.get("inside")?-1:1)*o.get("length"),l=a[u_(e)],u=p(i,function(t){return new jT({shape:l_(e,[l,l+r],t.coord)})});this.group.add(fA(u,{style:s(o.getModel("lineStyle").getLineStyle(),{stroke:t.get("axisLine.lineStyle.color")})}))},_minorTick:function(t,e,i,n,a){if(n.length){for(var o=t.getModel("axisTick"),r=t.getModel("minorTick"),l=(o.get("inside")?-1:1)*r.get("length"),u=a[u_(e)],h=[],c=0;cd?"left":"right",g=Math.abs(c[1]-f)/h<.3?"middle":c[1]>f?"top":"bottom";r&&r[o]&&r[o].textStyle&&(n=new vr(r[o].textStyle,s,s.ecModel));var m=new NT({silent:zk.isLabelSilent(t)});this.group.add(m),jo(m.style,n,{x:c[0],y:c[1],textFill:n.getTextColor()||t.get("axisLine.lineStyle.color"),text:i.formattedLabel,textAlign:p,textVerticalAlign:g}),u&&(m.eventData=zk.makeAxisEventDataBase(t),m.eventData.targetType="axisLabel",m.eventData.value=i.rawLabel)},this)},_splitLine:function(t,e,i,n,a){var o=t.getModel("splitLine"),r=o.getModel("lineStyle"),l=r.get("color"),u=0;l=l instanceof Array?l:[l];for(var h=[],c=0;ci?"0"+i:i;var n=t.getDate();n=10>n?"0"+n:n;var a=t.getDay();return a=Math.abs((a+7-this.getFirstDayOfWeek())%7),{y:e,m:i,d:n,day:a,time:t.getTime(),formatedDate:e+"-"+i+"-"+n,date:t}},getNextNDay:function(t,e){return e=e||0,0===e?this.getDateInfo(t):(t=new Date(this.getDateInfo(t).time),t.setDate(t.getDate()+e),this.getDateInfo(t))},update:function(t,e){function i(t,e){return null!=t[e]&&"auto"!==t[e]}this._firstDayOfWeek=+this._model.getModel("dayLabel").get("firstDay"),this._orient=this._model.get("orient"),this._lineWidth=this._model.getModel("itemStyle").getItemStyle().lineWidth||0,this._rangeInfo=this._getRangeInfo(this._initRangeOption());var n=this._rangeInfo.weeks||1,a=["width","height"],o=this._model.get("cellSize").slice(),r=this._model.getBoxLayoutParams(),s="horizontal"===this._orient?[n,7]:[7,n];f([0,1],function(t){i(o,t)&&(r[a[t]]=o[t]*s[t])});var l={width:e.getWidth(),height:e.getHeight()},u=this._rect=es(r,l);f([0,1],function(t){i(o,t)||(o[t]=u[a[t]]/s[t])}),this._sw=o[0],this._sh=o[1]},dataToPoint:function(t,e){_(t)&&(t=t[0]),null==e&&(e=!0);var i=this.getDateInfo(t),n=this._rangeInfo,a=i.formatedDate;if(e&&!(i.time>=n.start.time&&i.timeo.end.time&&t.reverse(),t},_getRangeInfo:function(t){t=[this.getDateInfo(t[0]),this.getDateInfo(t[1])];var e;t[0].time>t[1].time&&(e=!0,t.reverse());var i=Math.floor(t[1].time/LE)-Math.floor(t[0].time/LE)+1,n=new Date(t[0].time),a=n.getDate(),o=t[1].date.getDate();n.setDate(a+i-1);var r=n.getDate();if(r!==o)for(var s=n.getTime()-t[1].time>0?1:-1;(r=n.getDate())!==o&&(n.getTime()-t[1].time)*s>0;)i-=s,n.setDate(r-s);var l=Math.floor((i+t[0].day+6)/7),u=e?-l+1:l-1;return e&&t.reverse(),{range:[t[0].formatedDate,t[1].formatedDate],start:t[0],end:t[1],allDay:i,weeks:l,nthWeek:u,fweek:t[0].day,lweek:t[1].day}},_getDateByWeeksAndDay:function(t,e,i){var n=this._getRangeInfo(i);if(t>n.weeks||0===t&&en.lweek)return!1;var a=7*(t-1)-n.fweek+e,o=new Date(n.start.time);return o.setDate(n.start.d+a),this.getDateInfo(o)}},p_.dimensions=p_.prototype.dimensions,p_.getDimensionsInfo=p_.prototype.getDimensionsInfo,p_.create=function(t,e){var i=[];return t.eachComponent("calendar",function(n){var a=new p_(n,t,e);i.push(a),n.coordinateSystem=a}),t.eachSeries(function(t){"calendar"===t.get("coordinateSystem")&&(t.coordinateSystem=i[t.get("calendarIndex")||0])}),i},ks.register("calendar",p_);var kE=WA.extend({type:"calendar",coordinateSystem:null,defaultOption:{zlevel:0,z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{color:"#fff",borderWidth:1,borderColor:"#ccc"},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",nameMap:"en",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",nameMap:"en",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},init:function(t){var e=os(t);kE.superApply(this,"init",arguments),m_(t,e)},mergeOption:function(t){kE.superApply(this,"mergeOption",arguments),m_(this.option,t)}}),PE={EN:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],CN:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},OE={EN:["S","M","T","W","T","F","S"],CN:["日","一","二","三","四","五","六"]};Bu({type:"calendar",_tlpoints:null,_blpoints:null,_firstDayOfMonth:null,_firstDayPoints:null,render:function(t){var e=this.group;e.removeAll();var i=t.coordinateSystem,n=i.getRangeInfo(),a=i.getOrient();this._renderDayRect(t,n,e),this._renderLines(t,n,a,e),this._renderYearText(t,n,a,e),this._renderMonthText(t,a,e),this._renderWeekText(t,n,a,e)},_renderDayRect:function(t,e,i){for(var n=t.coordinateSystem,a=t.getModel("itemStyle").getItemStyle(),o=n.getCellWidth(),r=n.getCellHeight(),s=e.start.time;s<=e.end.time;s=n.getNextNDay(s,1).time){var l=n.dataToRect([s],!1).tl,u=new UT({shape:{x:l[0],y:l[1],width:o,height:r},cursor:"default",style:a});i.add(u)}},_renderLines:function(t,e,i,n){function a(e){o._firstDayOfMonth.push(r.getDateInfo(e)),o._firstDayPoints.push(r.dataToRect([e],!1).tl);var a=o._getLinePointsOfOneWeek(t,e,i);o._tlpoints.push(a[0]),o._blpoints.push(a[a.length-1]),l&&o._drawSplitline(a,s,n)}var o=this,r=t.coordinateSystem,s=t.getModel("splitLine.lineStyle").getLineStyle(),l=t.get("splitLine.show"),u=s.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var h=e.start,c=0;h.time<=e.end.time;c++){a(h.formatedDate),0===c&&(h=r.getDateInfo(e.start.y+"-"+e.start.m));var d=h.date;d.setMonth(d.getMonth()+1),h=r.getDateInfo(d)}a(r.getNextNDay(e.end.time,1).formatedDate),l&&this._drawSplitline(o._getEdgesPoints(o._tlpoints,u,i),s,n),l&&this._drawSplitline(o._getEdgesPoints(o._blpoints,u,i),s,n)},_getEdgesPoints:function(t,e,i){var n=[t[0].slice(),t[t.length-1].slice()],a="horizontal"===i?0:1;return n[0][a]=n[0][a]-e/2,n[1][a]=n[1][a]+e/2,n},_drawSplitline:function(t,e,i){var n=new HT({z2:20,shape:{points:t},style:e});i.add(n)},_getLinePointsOfOneWeek:function(t,e,i){var n=t.coordinateSystem;e=n.getDateInfo(e);for(var a=[],o=0;7>o;o++){var r=n.getNextNDay(e.time,o),s=n.dataToRect([r.time],!1);a[2*r.day]=s.tl,a[2*r.day+1]=s["horizontal"===i?"bl":"tr"]}return a},_formatterLabel:function(t,e){return"string"==typeof t&&t?Xr(t,e):"function"==typeof t?t(e):e.nameMap},_yearTextPositionControl:function(t,e,i,n,a){e=e.slice();var o=["center","bottom"];"bottom"===n?(e[1]+=a,o=["center","top"]):"left"===n?e[0]-=a:"right"===n?(e[0]+=a,o=["center","top"]):e[1]-=a;var r=0;return("left"===n||"right"===n)&&(r=Math.PI/2),{rotation:r,position:e,style:{textAlign:o[0],textVerticalAlign:o[1]}} +},_renderYearText:function(t,e,i,n){var a=t.getModel("yearLabel");if(a.get("show")){var o=a.get("margin"),r=a.get("position");r||(r="horizontal"!==i?"top":"left");var s=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],l=(s[0][0]+s[1][0])/2,u=(s[0][1]+s[1][1])/2,h="horizontal"===i?0:1,c={top:[l,s[h][1]],bottom:[l,s[1-h][1]],left:[s[1-h][0],u],right:[s[h][0],u]},d=e.start.y;+e.end.y>+e.start.y&&(d=d+"-"+e.end.y);var f=a.get("formatter"),p={start:e.start.y,end:e.end.y,nameMap:d},g=this._formatterLabel(f,p),m=new NT({z2:30});jo(m.style,a,{text:g}),m.attr(this._yearTextPositionControl(m,c[r],i,r,o)),n.add(m)}},_monthTextPositionControl:function(t,e,i,n,a){var o="left",r="top",s=t[0],l=t[1];return"horizontal"===i?(l+=a,e&&(o="center"),"start"===n&&(r="bottom")):(s+=a,e&&(r="middle"),"start"===n&&(o="right")),{x:s,y:l,textAlign:o,textVerticalAlign:r}},_renderMonthText:function(t,e,i){var n=t.getModel("monthLabel");if(n.get("show")){var a=n.get("nameMap"),o=n.get("margin"),s=n.get("position"),l=n.get("align"),u=[this._tlpoints,this._blpoints];b(a)&&(a=PE[a.toUpperCase()]||[]);var h="start"===s?0:1,c="horizontal"===e?0:1;o="start"===s?-o:o;for(var d="center"===l,f=0;ff;f++){var p=o.getNextNDay(c,f),g=o.dataToRect([p.time],!1).center,m=f;m=Math.abs((f+h)%7);var v=new NT({z2:30});r(jo(v.style,a,{text:l[m]}),this._weekTextPositionControl(g,i,s,u,d)),n.add(v)}}}}),Eu({type:"title",layoutMode:{type:"box",ignoreSize:!0},defaultOption:{zlevel:0,z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bolder",color:"#333"},subtextStyle:{color:"#aaa"}}}),Bu({type:"title",render:function(t,e,i){if(this.group.removeAll(),t.get("show")){var n=this.group,a=t.getModel("textStyle"),o=t.getModel("subtextStyle"),r=t.get("textAlign"),s=C(t.get("textBaseline"),t.get("textVerticalAlign")),l=new NT({style:jo({},a,{text:t.get("text"),textFill:a.getTextColor()},{disableBox:!0}),z2:10}),u=l.getBoundingRect(),h=t.get("subtext"),c=new NT({style:jo({},o,{text:h,textFill:o.getTextColor(),y:u.height+t.get("itemGap"),textVerticalAlign:"top"},{disableBox:!0}),z2:10}),d=t.get("link"),f=t.get("sublink"),p=t.get("triggerEvent",!0);l.silent=!d&&!p,c.silent=!f&&!p,d&&l.on("click",function(){Jr(d,"_"+t.get("target"))}),f&&c.on("click",function(){Jr(f,"_"+t.get("subtarget"))}),l.eventData=c.eventData=p?{componentType:"title",componentIndex:t.componentIndex}:null,n.add(l),h&&n.add(c);var g=n.getBoundingRect(),m=t.getBoxLayoutParams();m.width=g.width,m.height=g.height;var v=es(m,{width:i.getWidth(),height:i.getHeight()},t.get("padding"));r||(r=t.get("left")||t.get("right"),"middle"===r&&(r="center"),"right"===r?v.x+=v.width:"center"===r&&(v.x+=v.width/2)),s||(s=t.get("top")||t.get("bottom"),"center"===s&&(s="middle"),"bottom"===s?v.y+=v.height:"middle"===s&&(v.y+=v.height/2),s=s||"top"),n.attr("position",[v.x,v.y]);var y={textAlign:r,textVerticalAlign:s};l.setStyle(y),c.setStyle(y),g=n.getBoundingRect();var x=v.margin,_=t.getItemStyle(["color","opacity"]);_.fill=t.get("backgroundColor");var w=new UT({shape:{x:g.x-x[3],y:g.y-x[0],width:g.width+x[1]+x[3],height:g.height+x[0]+x[2],r:t.get("borderRadius")},style:_,subPixelOptimize:!0,silent:!0});n.add(w)}}});var NE=FD.legend.selector,zE={all:{type:"all",title:n(NE.all)},inverse:{type:"inverse",title:n(NE.inverse)}},RE=Eu({type:"legend.plain",dependencies:["series"],layoutMode:{type:"box",ignoreSize:!0},init:function(t,e,i){this.mergeDefaultAndTheme(t,i),t.selected=t.selected||{},this._updateSelector(t)},mergeOption:function(t){RE.superCall(this,"mergeOption",t),this._updateSelector(t)},_updateSelector:function(t){var e=t.selector;e===!0&&(e=t.selector=["all","inverse"]),_(e)&&f(e,function(t,i){b(t)&&(t={type:t}),e[i]=a(t,zE[t.type])})},optionUpdated:function(){this._updateData(this.ecModel);var t=this._data;if(t[0]&&"single"===this.get("selectedMode")){for(var e=!1,i=0;i=0},getOrient:function(){return"vertical"===this.get("orient")?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},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",inactiveBorderColor:"#ccc",itemStyle:{borderWidth:0},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:" sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}}});Lu("legendToggleSelect","legendselectchanged",x(v_,"toggleSelected")),Lu("legendAllSelect","legendselectall",x(v_,"allSelect")),Lu("legendInverseSelect","legendinverseselect",x(v_,"inverseSelect")),Lu("legendSelect","legendselected",x(v_,"select")),Lu("legendUnSelect","legendunselected",x(v_,"unSelect"));var EE=x,BE=f,VE=xM,GE=Bu({type:"legend.plain",newlineDisabled:!1,init:function(){this.group.add(this._contentGroup=new VE),this._backgroundEl,this.group.add(this._selectorGroup=new VE),this._isFirstRender=!0},getContentGroup:function(){return this._contentGroup},getSelectorGroup:function(){return this._selectorGroup},render:function(t,e,i){var n=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),t.get("show",!0)){var a=t.get("align"),o=t.get("orient");a&&"auto"!==a||(a="right"===t.get("left")&&"vertical"===o?"right":"left");var r=t.get("selector",!0),l=t.get("selectorPosition",!0);!r||l&&"auto"!==l||(l="horizontal"===o?"end":"start"),this.renderInner(a,t,e,i,r,o,l);var u=t.getBoxLayoutParams(),h={width:i.getWidth(),height:i.getHeight()},c=t.get("padding"),d=es(u,h,c),f=this.layoutInner(t,a,d,n,r,l),p=es(s({width:f.width,height:f.height},u),h,c);this.group.attr("position",[p.x-f.x,p.y-f.y]),this.group.add(this._backgroundEl=x_(f,t))}},resetInner:function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},renderInner:function(t,e,i,n,a,o,r){var s=this.getContentGroup(),l=B(),u=e.get("selectedMode"),h=[];i.eachRawSeries(function(t){!t.get("legendHoverLink")&&h.push(t.id)}),BE(e.getData(),function(a,o){var r=a.get("name");if(!this.newlineDisabled&&(""===r||"\n"===r))return void s.add(new VE({newline:!0}));var c=i.getSeriesByName(r)[0];if(!l.get(r))if(c){var d=c.getData(),f=d.getVisual("color"),p=d.getVisual("borderColor");"function"==typeof f&&(f=f(c.getDataParams(0))),"function"==typeof p&&(p=p(c.getDataParams(0)));var g=d.getVisual("legendSymbol")||"roundRect",m=d.getVisual("symbol"),v=this._createItem(r,o,a,e,g,m,t,f,p,u);v.on("click",EE(w_,r,null,n,h)).on("mouseover",EE(b_,c.name,null,n,h)).on("mouseout",EE(S_,c.name,null,n,h)),l.set(r,!0)}else i.eachRawSeries(function(i){if(!l.get(r)&&i.legendVisualProvider){var s=i.legendVisualProvider;if(!s.containName(r))return;var c=s.indexOfName(r),d=s.getItemVisual(c,"color"),f=s.getItemVisual(c,"borderColor"),p="roundRect",g=this._createItem(r,o,a,e,p,null,t,d,f,u);g.on("click",EE(w_,null,r,n,h)).on("mouseover",EE(b_,null,r,n,h)).on("mouseout",EE(S_,null,r,n,h)),l.set(r,!0)}},this)},this),a&&this._createSelector(a,e,n,o,r)},_createSelector:function(t,e,i){function n(t){var n=t.type,o=new NT({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){i.dispatchAction({type:"all"===n?"legendAllSelect":"legendInverseSelect"})}});a.add(o);var r=e.getModel("selectorLabel"),s=e.getModel("emphasis.selectorLabel");Uo(o.style,o.hoverStyle={},r,s,{defaultText:t.title,isRectText:!1}),Wo(o)}var a=this.getSelectorGroup();BE(t,function(t){n(t)})},_createItem:function(t,e,i,n,a,o,s,l,u,h){var c=n.get("itemWidth"),d=n.get("itemHeight"),f=n.get("inactiveColor"),p=n.get("inactiveBorderColor"),g=n.get("symbolKeepAspect"),m=n.getModel("itemStyle"),v=n.isSelected(t),y=new VE,x=i.getModel("textStyle"),_=i.get("icon"),w=i.getModel("tooltip"),b=w.parentModel;a=_||a;var S=ic(a,0,0,c,d,v?l:f,null==g?!0:g);if(y.add(__(S,a,m,u,p,v)),!_&&o&&(o!==a||"none"===o)){var M=.8*d;"none"===o&&(o="circle");var I=ic(o,(c-M)/2,(d-M)/2,M,M,v?l:f,null==g?!0:g);y.add(__(I,o,m,u,p,v))}var T="left"===s?c+5:-5,A=s,D=n.get("formatter"),C=t;"string"==typeof D&&D?C=D.replace("{name}",null!=t?t:""):"function"==typeof D&&(C=D(t)),y.add(new NT({style:jo({},x,{text:C,x:T,y:d/2,textFill:v?x.getTextColor():f,textAlign:A,textVerticalAlign:"middle"})}));var L=new UT({shape:y.getBoundingRect(),invisible:!0,tooltip:w.get("show")?r({content:t,formatter:b.get("formatter",!0)||function(){return t},formatterParams:{componentType:"legend",legendIndex:n.componentIndex,name:t,$vars:["name"]}},w.option):null});return y.add(L),y.eachChild(function(t){t.silent=!0}),L.silent=!h,this.getContentGroup().add(y),Wo(y),y.__legendDataIndex=e,y},layoutInner:function(t,e,i,n,a,o){var r=this.getContentGroup(),s=this.getSelectorGroup();VA(t.get("orient"),r,t.get("itemGap"),i.width,i.height);var l=r.getBoundingRect(),u=[-l.x,-l.y];if(a){VA("horizontal",s,t.get("selectorItemGap",!0));var h=s.getBoundingRect(),c=[-h.x,-h.y],d=t.get("selectorButtonGap",!0),f=t.getOrient().index,p=0===f?"width":"height",g=0===f?"height":"width",m=0===f?"y":"x";"end"===o?c[f]+=l[p]+d:u[f]+=h[p]+d,c[1-f]+=l[g]/2-h[g]/2,s.attr("position",c),r.attr("position",u);var v={x:0,y:0};return v[p]=l[p]+d+h[p],v[g]=Math.max(l[g],h[g]),v[m]=Math.min(0,h[m]+c[1-f]),v}return r.attr("position",u),this.group.getBoundingRect()},remove:function(){this.getContentGroup().removeAll(),this._isFirstRender=!0}}),FE=function(t){var e=t.findComponents({mainType:"legend"});e&&e.length&&t.filterSeries(function(t){for(var i=0;ii[a],f=[-h.x,-h.y];e||(f[n]=s.position[n]);var p=[0,0],g=[-c.x,-c.y],m=C(t.get("pageButtonGap",!0),t.get("itemGap",!0));if(d){var v=t.get("pageButtonPosition",!0);"end"===v?g[n]+=i[a]-c[a]:p[n]+=c[a]+m}g[1-n]+=h[o]/2-c[o]/2,s.attr("position",f),l.attr("position",p),u.attr("position",g);var y={x:0,y:0};if(y[a]=d?i[a]:h[a],y[o]=Math.max(h[o],c[o]),y[r]=Math.min(0,c[r]+g[1-n]),l.__rectSize=i[a],d){var x={x:0,y:0};x[a]=Math.max(i[a]-c[a]-m,0),x[o]=y[o],l.setClipPath(new UT({shape:x})),l.__rectSize=x[a]}else u.eachChild(function(t){t.attr({invisible:!0,silent:!0})});var _=this._getPageInfo(t);return null!=_.pageIndex&&ar(s,{position:_.contentPosition},d?t:!1),this._updatePageInfoView(t,_),y},_pageGo:function(t,e,i){var n=this._getPageInfo(e)[t];null!=n&&i.dispatchAction({type:"legendScroll",scrollDataIndex:n,legendId:e.id})},_updatePageInfoView:function(t,e){var i=this._controllerGroup;f(["pagePrev","pageNext"],function(n){var a=null!=e[n+"DataIndex"],o=i.childOfName(n);o&&(o.setStyle("fill",a?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),o.cursor=a?"pointer":"default")});var n=i.childOfName("pageText"),a=t.get("pageFormatter"),o=e.pageIndex,r=null!=o?o+1:0,s=e.pageCount;n&&a&&n.setStyle("text",b(a)?a.replace("{current}",r).replace("{total}",s):a({current:r,total:s}))},_getPageInfo:function(t){function e(t){if(t){var e=t.getBoundingRect(),i=e[l]+t.position[r];return{s:i,e:i+e[s],i:t.__legendDataIndex}}}function i(t,e){return t.e>=e&&t.s<=e+o}var n=t.get("scrollDataIndex",!0),a=this.getContentGroup(),o=this._containerGroup.__rectSize,r=t.getOrient().index,s=ZE[r],l=XE[r],u=this._findTargetItemIndex(n),h=a.children(),c=h[u],d=h.length,f=d?1:0,p={contentPosition:a.position.slice(),pageCount:f,pageIndex:f-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!c)return p;var g=e(c);p.contentPosition[r]=-g.s;for(var m=u+1,v=g,y=g,x=null;d>=m;++m)x=e(h[m]),(!x&&y.e>v.s+o||x&&!i(x,v.s))&&(v=y.i>v.i?y:x,v&&(null==p.pageNextDataIndex&&(p.pageNextDataIndex=v.i),++p.pageCount)),y=x;for(var m=u-1,v=g,y=g,x=null;m>=-1;--m)x=e(h[m]),x&&i(y,x.s)||!(v.i=0;){var l=a.indexOf(r),u=a.substr(s+o.length,l-s-o.length);n["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]},a=a.substr(l+1),s=a.indexOf("{marker")}var h=i.getModel("textStyle"),c=h.get("fontSize"),d=i.get("textLineHeight");null==d&&(d=Math.round(3*c/2)),this.el=new NT({style:jo({},h,{rich:n,text:t,textBackgroundColor:i.get("backgroundColor"),textBorderRadius:i.get("borderRadius"),textFill:i.get("textStyle.color"),textPadding:i.get("padding"),textLineHeight:d}),z:i.get("z")}),this._zr.add(this.el);var f=this;this.el.on("mouseover",function(){f._enterable&&(clearTimeout(f._hideTimeout),f._show=!0),f._inContent=!0}),this.el.on("mouseout",function(){f._enterable&&f._show&&f.hideLater(f._hideDelay),f._inContent=!1})},setEnterable:function(t){this._enterable=t},getSize:function(){var t=this.el.getBoundingRect();return[t.width,t.height]},moveTo:function(t,e){if(this.el){var i=this._styleCoord;L_(i,this._zr,t,e),this.el.attr("position",[i[0],i[1]])}},hide:function(){this.el&&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},dispose:function(){clearTimeout(this._hideTimeout),this.el&&this._zr.remove(this.el)},getOuterSize:function(){var t=this.getSize();return{width:t[0],height:t[1]}}};var $E=y,JE=f,QE=Ir,tB=new UT({shape:{x:-1,y:-1,width:2,height:2}});Bu({type:"tooltip",init:function(t,e){if(!oS.node){var i=t.getComponent("tooltip"),n=i.get("renderMode");this._renderMode=ma(n);var a;"html"===this._renderMode?(a=new C_(e.getDom(),e,{appendToBody:i.get("appendToBody",!0)}),this._newLine="
"):(a=new k_(e),this._newLine="\n"),this._tooltipContent=a}},render:function(t,e,i){if(!oS.node){this.group.removeAll(),this._tooltipModel=t,this._ecModel=e,this._api=i,this._lastDataByCoordSys=null,this._alwaysShowContent=t.get("alwaysShowContent");var n=this._tooltipContent;n.update(t),n.setEnterable(t.get("enterable")),this._initGlobalListener(),this._keepShow()}},_initGlobalListener:function(){var t=this._tooltipModel,e=t.get("triggerOn");Py("itemTooltip",this._api,$E(function(t,i,n){"none"!==e&&(e.indexOf(t)>=0?this._tryShow(i,n):"leave"===t&&this._hide(n))},this))},_keepShow:function(){var t=this._tooltipModel,e=this._ecModel,i=this._api;if(null!=this._lastX&&null!=this._lastY&&"none"!==t.get("triggerOn")){var n=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!i.isDisposed()&&n.manuallyShowTip(t,e,i,{x:n._lastX,y:n._lastY})})}},manuallyShowTip:function(t,e,i,n){if(n.from!==this.uid&&!oS.node){var a=O_(n,i);this._ticket="";var o=n.dataByCoordSys;if(n.tooltip&&null!=n.x&&null!=n.y){var r=tB;r.position=[n.x,n.y],r.update(),r.tooltip=n.tooltip,this._tryShow({offsetX:n.x,offsetY:n.y,target:r},a)}else if(o)this._tryShow({offsetX:n.x,offsetY:n.y,position:n.position,dataByCoordSys:n.dataByCoordSys,tooltipOption:n.tooltipOption},a);else if(null!=n.seriesIndex){if(this._manuallyAxisShowTip(t,e,i,n))return;var s=RR(n,e),l=s.point[0],u=s.point[1];null!=l&&null!=u&&this._tryShow({offsetX:l,offsetY:u,position:n.position,target:s.el},a)}else null!=n.x&&null!=n.y&&(i.dispatchAction({type:"updateAxisPointer",x:n.x,y:n.y}),this._tryShow({offsetX:n.x,offsetY:n.y,position:n.position,target:i.getZr().findHover(n.x,n.y).target},a))}},manuallyHideTip:function(t,e,i,n){var a=this._tooltipContent;!this._alwaysShowContent&&this._tooltipModel&&a.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=null,n.from!==this.uid&&this._hide(O_(n,i))},_manuallyAxisShowTip:function(t,e,i,n){var a=n.seriesIndex,o=n.dataIndex,r=e.getComponent("axisPointer").coordSysAxesInfo;if(null!=a&&null!=o&&null!=r){var s=e.getSeriesByIndex(a);if(s){var l=s.getData(),t=P_([l.getItemModel(o),s,(s.coordinateSystem||{}).model,t]);if("axis"===t.get("trigger"))return i.dispatchAction({type:"updateAxisPointer",seriesIndex:a,dataIndex:o,position:n.position}),!0}}},_tryShow:function(t,e){var i=t.target,n=this._tooltipModel;if(n){this._lastX=t.offsetX,this._lastY=t.offsetY;var a=t.dataByCoordSys;a&&a.length?this._showAxisTooltip(a,t):i&&null!=i.dataIndex?(this._lastDataByCoordSys=null,this._showSeriesItemTooltip(t,i,e)):i&&i.tooltip?(this._lastDataByCoordSys=null,this._showComponentItemTooltip(t,i,e)):(this._lastDataByCoordSys=null,this._hide(e))}},_showOrMove:function(t,e){var i=t.get("showDelay");e=y(e,this),clearTimeout(this._showTimout),i>0?this._showTimout=setTimeout(e,i):e()},_showAxisTooltip:function(t,e){var i=this._ecModel,n=this._tooltipModel,o=[e.offsetX,e.offsetY],r=[],s=[],l=P_([e.tooltipOption,n]),u=this._renderMode,h=this._newLine,c={};JE(t,function(t){JE(t.dataByAxis,function(t){var e=i.getComponent(t.axisDim+"Axis",t.axisIndex),n=t.value,o=[];if(e&&null!=n){var l=jy(n,e.axis,i,t.seriesDataIndices,t.valueLabelOpt);f(t.seriesDataIndices,function(r){var h=i.getSeriesByIndex(r.seriesIndex),d=r.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=Kh(e.axis,n),f.axisValueLabel=l,f){s.push(f);var p,g=h.formatTooltip(d,!0,null,u);if(S(g)){p=g.html;var m=g.markers;a(c,m)}else p=g;o.push(p)}});var d=l;r.push("html"!==u?o.join(h):(d?Hr(d)+h:"")+o.join(h))}})},this),r.reverse(),r=r.join(this._newLine+this._newLine);var d=e.position;this._showOrMove(l,function(){this._updateContentNotChangedOnAxis(t)?this._updatePosition(l,d,o[0],o[1],this._tooltipContent,s):this._showTooltipContent(l,r,s,Math.random(),o[0],o[1],d,void 0,c)})},_showSeriesItemTooltip:function(t,e,i){var n=this._ecModel,a=e.seriesIndex,o=n.getSeriesByIndex(a),r=e.dataModel||o,s=e.dataIndex,l=e.dataType,u=r.getData(l),h=P_([u.getItemModel(s),r,o&&(o.coordinateSystem||{}).model,this._tooltipModel]),c=h.get("trigger");if(null==c||"item"===c){var d,f,p=r.getDataParams(s,l),g=r.formatTooltip(s,!1,l,this._renderMode);S(g)?(d=g.html,f=g.markers):(d=g,f=null);var m="item_"+r.name+"_"+s;this._showOrMove(h,function(){this._showTooltipContent(h,d,p,m,t.offsetX,t.offsetY,t.position,t.target,f)}),i({type:"showTip",dataIndexInside:s,dataIndex:u.getRawIndex(s),seriesIndex:a,from:this.uid})}},_showComponentItemTooltip:function(t,e,i){var n=e.tooltip;if("string"==typeof n){var a=n;n={content:a,formatter:a}}var o=new vr(n,this._tooltipModel,this._ecModel),r=o.get("content"),s=Math.random();this._showOrMove(o,function(){this._showTooltipContent(o,r,o.get("formatterParams")||{},s,t.offsetX,t.offsetY,t.position,e)}),i({type:"showTip",from:this.uid})},_showTooltipContent:function(t,e,i,n,a,o,r,s,l){if(this._ticket="",t.get("showContent")&&t.get("show")){var u=this._tooltipContent,h=t.get("formatter");r=r||t.get("position");var c=e;if(h&&"string"==typeof h)c=Zr(h,i,!0);else if("function"==typeof h){var d=$E(function(e,n){e===this._ticket&&(u.setContent(n,l,t),this._updatePosition(t,r,a,o,u,i,s))},this);this._ticket=n,c=h(i,n,d)}u.setContent(c,l,t),u.show(t),this._updatePosition(t,r,a,o,u,i,s)}},_updatePosition:function(t,e,i,n,a,o,r){var s=this._api.getWidth(),l=this._api.getHeight();e=e||t.get("position");var u=a.getSize(),h=t.get("align"),c=t.get("verticalAlign"),d=r&&r.getBoundingRect().clone();if(r&&d.applyTransform(r.transform),"function"==typeof e&&(e=e([i,n],o,a.el,d,{viewSize:[s,l],contentSize:u.slice()})),_(e))i=QE(e[0],s),n=QE(e[1],l);else if(S(e)){e.width=u[0],e.height=u[1];var f=es(e,{width:s,height:l});i=f.x,n=f.y,h=null,c=null}else if("string"==typeof e&&r){var p=R_(e,d,u);i=p[0],n=p[1]}else{var p=N_(i,n,a,s,l,h?null:20,c?null:20);i=p[0],n=p[1]}if(h&&(i-=E_(h)?u[0]/2:"right"===h?u[0]:0),c&&(n-=E_(c)?u[1]/2:"bottom"===c?u[1]:0),t.get("confine")){var p=z_(i,n,a,s,l);i=p[0],n=p[1]}a.moveTo(i,n)},_updateContentNotChangedOnAxis:function(t){var e=this._lastDataByCoordSys,i=!!e&&e.length===t.length;return i&&JE(e,function(e,n){var a=e.dataByAxis||{},o=t[n]||{},r=o.dataByAxis||[];i&=a.length===r.length,i&&JE(a,function(t,e){var n=r[e]||{},a=t.seriesDataIndices||[],o=n.seriesDataIndices||[];i&=t.value===n.value&&t.axisType===n.axisType&&t.axisId===n.axisId&&a.length===o.length,i&&JE(a,function(t,e){var n=o[e];i&=t.seriesIndex===n.seriesIndex&&t.dataIndex===n.dataIndex})})}),this._lastDataByCoordSys=t,!!i},_hide:function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},dispose:function(t,e){oS.node||(this._tooltipContent.dispose(),By("itemTooltip",e))}}),Lu({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},function(){}),Lu({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},function(){});var eB=Fr,iB=Hr,nB=Eu({type:"marker",dependencies:["series","grid","polar","geo"],init:function(t,e,i){this.mergeDefaultAndTheme(t,i),this._mergeOption(t,i,!1,!0)},isAnimationEnabled:function(){if(oS.node)return!1;var t=this.__hostSeries;return this.getShallow("animation")&&t&&t.isAnimationEnabled()},mergeOption:function(t,e){this._mergeOption(t,e,!1,!1)},_mergeOption:function(t,e,i,n){var a=this.constructor,o=this.mainType+"Model";i||e.eachSeries(function(t){var i=t.get(this.mainType,!0),s=t[o];return i&&i.data?(s?s._mergeOption(i,e,!0):(n&&B_(i),f(i.data,function(t){t instanceof Array?(B_(t[0]),B_(t[1])):B_(t)}),s=new a(i,this,e),r(s,{mainType:this.mainType,seriesIndex:t.seriesIndex,name:t.name,createdBySelf:!0}),s.__hostSeries=t),void(t[o]=s)):void(t[o]=null)},this)},formatTooltip:function(t,e,i,n){var a=this.getData(),o=this.getRawValue(t),r=_(o)?p(o,eB).join(", "):eB(o),s=a.getName(t),l=iB(this.name),u="html"===n?"
":"\n";return(null!=o||s)&&(l+=u),s&&(l+=iB(s),null!=o&&(l+=" : ")),null!=o&&(l+=iB(r)),l},getData:function(){return this._data},setData:function(t){this._data=t}});c(nB,ID),nB.extend({type:"markPoint",defaultOption:{zlevel:0,z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}}});var aB=u,oB=x,rB={min:oB(F_,"min"),max:oB(F_,"max"),average:oB(F_,"average")},sB=Bu({type:"marker",init:function(){this.markerGroupMap=B()},render:function(t,e,i){var n=this.markerGroupMap;n.each(function(t){t.__keep=!1});var a=this.type+"Model";e.eachSeries(function(t){var n=t[a];n&&this.renderSeries(t,n,e,i)},this),n.each(function(t){!t.__keep&&this.group.remove(t.group)},this)},renderSeries:function(){}});sB.extend({type:"markPoint",updateTransform:function(t,e,i){e.eachSeries(function(t){var e=t.markPointModel;e&&(j_(e.getData(),t,i),this.markerGroupMap.get(t.id).updateLayout(e))},this)},renderSeries:function(t,e,i,n){var a=t.coordinateSystem,o=t.id,r=t.getData(),s=this.markerGroupMap,l=s.get(o)||s.set(o,new Ld),u=q_(a,t,e);e.setData(u),j_(e.getData(),t,n),u.each(function(t){var i=u.getItemModel(t),n=i.getShallow("symbol"),a=i.getShallow("symbolSize"),o=i.getShallow("symbolRotate"),s=w(n),l=w(a),h=w(o);if(s||l||h){var c=e.getRawValue(t),d=e.getDataParams(t);s&&(n=n(c,d)),l&&(a=a(c,d)),h&&(o=o(c,d))}u.setItemVisual(t,{symbol:n,symbolSize:a,symbolRotate:o,color:i.get("itemStyle.color")||r.getVisual("color")})}),l.updateData(u),this.group.add(l.group),u.eachItemGraphicEl(function(t){t.traverse(function(t){t.dataModel=e})}),l.__keep=!0,l.group.silent=e.get("silent")||t.get("silent")}}),Au(function(t){t.markPoint=t.markPoint||{}}),nB.extend({type:"markLine",defaultOption:{zlevel:0,z:5,symbol:["circle","arrow"],symbolSize:[8,16],precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"}}); +var lB=function(t,e,i,o){var s=t.getData(),l=o.type;if(!_(o)&&("min"===l||"max"===l||"average"===l||"median"===l||null!=o.xAxis||null!=o.yAxis)){var u,h;if(null!=o.yAxis||null!=o.xAxis)u=e.getAxis(null!=o.yAxis?"y":"x"),h=D(o.yAxis,o.xAxis);else{var c=H_(o,s,e,t);u=c.valueAxis;var d=xh(s,c.valueDataDim);h=Y_(s,d,l)}var f="x"===u.dim?0:1,p=1-f,g=n(o),m={};g.type=null,g.coord=[],m.coord=[],g.coord[p]=-1/0,m.coord[p]=1/0;var v=i.get("precision");v>=0&&"number"==typeof h&&(h=+h.toFixed(Math.min(v,20))),g.coord[f]=m.coord[f]=h,o=[g,m,{type:l,valueIndex:o.valueIndex,value:h}]}return o=[W_(t,o[0]),W_(t,o[1]),r({},o[2])],o[2].type=o[2].type||"",a(o[2],o[0]),a(o[2],o[1]),o};sB.extend({type:"markLine",updateTransform:function(t,e,i){e.eachSeries(function(t){var e=t.markLineModel;if(e){var n=e.getData(),a=e.__from,o=e.__to;a.each(function(e){Q_(a,e,!0,t,i),Q_(o,e,!1,t,i)}),n.each(function(t){n.setItemLayout(t,[a.getItemLayout(t),o.getItemLayout(t)])}),this.markerGroupMap.get(t.id).updateLayout()}},this)},renderSeries:function(t,e,i,n){function a(e,i,a){var o=e.getItemModel(i);Q_(e,i,a,t,n),e.setItemVisual(i,{symbolRotate:o.get("symbolRotate"),symbolSize:o.get("symbolSize")||g[a?0:1],symbol:o.get("symbol",!0)||p[a?0:1],color:o.get("itemStyle.color")||s.getVisual("color")})}var o=t.coordinateSystem,r=t.id,s=t.getData(),l=this.markerGroupMap,u=l.get(r)||l.set(r,new jg);this.group.add(u.group);var h=tw(o,t,e),c=h.from,d=h.to,f=h.line;e.__from=c,e.__to=d,e.setData(f);var p=e.get("symbol"),g=e.get("symbolSize");_(p)||(p=[p,p]),"number"==typeof g&&(g=[g,g]),h.from.each(function(t){a(c,t,!0),a(d,t,!1)}),f.each(function(t){var e=f.getItemModel(t).get("lineStyle.color");f.setItemVisual(t,{color:e||c.getItemVisual(t,"color")}),f.setItemLayout(t,[c.getItemLayout(t),d.getItemLayout(t)]),f.setItemVisual(t,{fromSymbolRotate:c.getItemVisual(t,"symbolRotate"),fromSymbolSize:c.getItemVisual(t,"symbolSize"),fromSymbol:c.getItemVisual(t,"symbol"),toSymbolRotate:d.getItemVisual(t,"symbolRotate"),toSymbolSize:d.getItemVisual(t,"symbolSize"),toSymbol:d.getItemVisual(t,"symbol")})}),u.updateData(f),h.line.eachItemGraphicEl(function(t){t.traverse(function(t){t.dataModel=e})}),u.__keep=!0,u.group.silent=e.get("silent")||t.get("silent")}}),Au(function(t){t.markLine=t.markLine||{}}),nB.extend({type:"markArea",defaultOption:{zlevel:0,z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}}});var uB=function(t,e,i,n){var a=W_(t,n[0]),r=W_(t,n[1]),s=D,l=a.coord,u=r.coord;l[0]=s(l[0],-1/0),l[1]=s(l[1],-1/0),u[0]=s(u[0],1/0),u[1]=s(u[1],1/0);var h=o([{},a,r]);return h.coord=[a.coord,r.coord],h.x0=a.x,h.y0=a.y,h.x1=r.x,h.y1=r.y,h},hB=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]];sB.extend({type:"markArea",updateTransform:function(t,e,i){e.eachSeries(function(t){var e=t.markAreaModel;if(e){var n=e.getData();n.each(function(e){var a=p(hB,function(a){return aw(n,e,a,t,i)});n.setItemLayout(e,a);var o=n.getItemGraphicEl(e);o.setShape("points",a)})}},this)},renderSeries:function(t,e,i,n){var a=t.coordinateSystem,o=t.id,r=t.getData(),l=this.markerGroupMap,u=l.get(o)||l.set(o,{group:new xM});this.group.add(u.group),u.__keep=!0;var h=ow(a,t,e);e.setData(h),h.each(function(e){var i=p(hB,function(i){return aw(h,e,i,t,n)}),o=!0;f(hB,function(t){if(o){var i=h.get(t[0],e),n=h.get(t[1],e);(ew(i)||a.getAxis("x").containData(i))&&(ew(n)||a.getAxis("y").containData(n))&&(o=!1)}}),h.setItemLayout(e,{points:i,allClipped:o}),h.setItemVisual(e,{color:r.getVisual("color")})}),h.diff(u.__data).add(function(t){var e=h.getItemLayout(t);if(!e.allClipped){var i=new WT({shape:{points:e.points}});h.setItemGraphicEl(t,i),u.group.add(i)}}).update(function(t,i){var n=u.__data.getItemGraphicEl(i),a=h.getItemLayout(t);a.allClipped?n&&u.group.remove(n):(n?ar(n,{shape:{points:a.points}},e,t):n=new WT({shape:{points:a.points}}),h.setItemGraphicEl(t,n),u.group.add(n))}).remove(function(t){var e=u.__data.getItemGraphicEl(t);u.group.remove(e)}).execute(),h.eachItemGraphicEl(function(t,i){var n=h.getItemModel(i),a=n.getModel("label"),o=n.getModel("emphasis.label"),r=h.getItemVisual(i,"color");t.useStyle(s(n.getModel("itemStyle").getItemStyle(),{fill:li(r,.4),stroke:r})),t.hoverStyle=n.getModel("emphasis.itemStyle").getItemStyle(),Uo(t.style,t.hoverStyle,a,o,{labelFetcher:e,labelDataIndex:i,defaultText:h.getName(i)||"",isRectText:!0,autoColor:r}),Wo(t,{}),t.dataModel=e}),u.__data=h,u.group.silent=e.get("silent")||t.get("silent")}}),Au(function(t){t.markArea=t.markArea||{}});var cB=function(t){var e=t&&t.timeline;_(e)||(e=e?[e]:[]),f(e,function(t){t&&rw(t)})};WA.registerSubTypeDefaulter("timeline",function(){return"slider"}),Lu({type:"timelineChange",event:"timelineChanged",update:"prepareAndUpdate"},function(t,e){var i=e.getComponent("timeline");return i&&null!=t.currentIndex&&(i.setCurrentIndex(t.currentIndex),!i.get("loop",!0)&&i.isIndexMax()&&i.setPlayState(!1)),e.resetOption("timeline"),s({currentIndex:i.option.currentIndex},t)}),Lu({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},function(t,e){var i=e.getComponent("timeline");i&&null!=t.playState&&i.setPlayState(t.playState)});var dB=WA.extend({type:"timeline",layoutMode:"box",defaultOption:{zlevel:0,z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},init:function(t,e,i){this._data,this._names,this.mergeDefaultAndTheme(t,i),this._initData()},mergeOption:function(){dB.superApply(this,"mergeOption",arguments),this._initData()},setCurrentIndex:function(t){null==t&&(t=this.option.currentIndex);var e=this._data.count();this.option.loop?t=(t%e+e)%e:(t>=e&&(t=e-1),0>t&&(t=0)),this.option.currentIndex=t},getCurrentIndex:function(){return this.option.currentIndex},isIndexMax:function(){return this.getCurrentIndex()>=this._data.count()-1},setPlayState:function(t){this.option.autoPlay=!!t},getPlayState:function(){return!!this.option.autoPlay},_initData:function(){var t=this.option,e=t.data||[],i=t.axisType,a=this._names=[];if("category"===i){var o=[];f(e,function(t,e){var i,r=na(t);S(t)?(i=n(t),i.value=e):i=e,o.push(i),b(r)||null!=r&&!isNaN(r)||(r=""),a.push(r+"")}),e=o}var r={category:"ordinal",time:"time"}[i]||"number",s=this._data=new dL([{name:"value",type:r}],this);s.initData(e,a)},getData:function(){return this._data},getCategories:function(){return"category"===this.get("axisType")?this._names.slice():void 0}}),fB=dB.extend({type:"timeline.slider",defaultOption:{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"emptyCircle",symbolSize:10,lineStyle:{show:!0,width:2,color:"#304654"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#304654"},itemStyle:{color:"#304654",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:13,color:"#c23531",borderWidth:5,borderColor:"rgba(194,53,49, 0.5)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:22,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"path://M18.6,50.8l22.5-22.5c0.2-0.2,0.3-0.4,0.3-0.7c0-0.3-0.1-0.5-0.3-0.7L18.7,4.4c-0.1-0.1-0.2-0.3-0.2-0.5 c0-0.4,0.3-0.8,0.8-0.8c0.2,0,0.5,0.1,0.6,0.3l23.5,23.5l0,0c0.2,0.2,0.3,0.4,0.3,0.7c0,0.3-0.1,0.5-0.3,0.7l-0.1,0.1L19.7,52 c-0.1,0.1-0.3,0.2-0.5,0.2c-0.4,0-0.8-0.3-0.8-0.8C18.4,51.2,18.5,51,18.6,50.8z",prevIcon:"path://M43,52.8L20.4,30.3c-0.2-0.2-0.3-0.4-0.3-0.7c0-0.3,0.1-0.5,0.3-0.7L42.9,6.4c0.1-0.1,0.2-0.3,0.2-0.5 c0-0.4-0.3-0.8-0.8-0.8c-0.2,0-0.5,0.1-0.6,0.3L18.3,28.8l0,0c-0.2,0.2-0.3,0.4-0.3,0.7c0,0.3,0.1,0.5,0.3,0.7l0.1,0.1L41.9,54 c0.1,0.1,0.3,0.2,0.5,0.2c0.4,0,0.8-0.3,0.8-0.8C43.2,53.2,43.1,53,43,52.8z",color:"#304654",borderColor:"#304654",borderWidth:1},emphasis:{label:{show:!0,color:"#c23531"},itemStyle:{color:"#c23531"},controlStyle:{color:"#c23531",borderColor:"#c23531",borderWidth:2}},data:[]}});c(fB,ID);var pB=LD.extend({type:"timeline"}),gB=function(t,e,i,n){sk.call(this,t,e,i),this.type=n||"value",this.model=null};gB.prototype={constructor:gB,getLabelModel:function(){return this.model.getModel("label")},isHorizontal:function(){return"horizontal"===this.model.get("orient")}},h(gB,sk);var mB=y,vB=f,yB=Math.PI;pB.extend({type:"timeline.slider",init:function(t,e){this.api=e,this._axis,this._viewRect,this._timer,this._currentPointer,this._mainGroup,this._labelGroup},render:function(t,e,i){if(this.model=t,this.api=i,this.ecModel=e,this.group.removeAll(),t.get("show",!0)){var n=this._layout(t,i),a=this._createGroup("mainGroup"),o=this._createGroup("labelGroup"),r=this._axis=this._createAxis(n,t);t.formatTooltip=function(t){return Hr(r.scale.getLabel(t))},vB(["AxisLine","AxisTick","Control","CurrentPointer"],function(e){this["_render"+e](n,a,r,t)},this),this._renderAxisLabel(n,o,r,t),this._position(n,t)}this._doPlayStop()},remove:function(){this._clearTimer(),this.group.removeAll()},dispose:function(){this._clearTimer()},_layout:function(t,e){var i=t.get("label.position"),n=t.get("orient"),a=uw(t,e);null==i||"auto"===i?i="horizontal"===n?a.y+a.height/2=0||"+"===i?"left":"right"},r={horizontal:i>=0||"+"===i?"top":"bottom",vertical:"middle"},s={horizontal:0,vertical:yB/2},l="vertical"===n?a.height:a.width,u=t.getModel("controlStyle"),h=u.get("show",!0),c=h?u.get("itemSize"):0,d=h?u.get("itemGap"):0,f=c+d,p=t.get("label.rotate")||0;p=p*yB/180;var g,m,v,y,x=u.get("position",!0),_=h&&u.get("showPlayBtn",!0),w=h&&u.get("showPrevBtn",!0),b=h&&u.get("showNextBtn",!0),S=0,M=l;return"left"===x||"bottom"===x?(_&&(g=[0,0],S+=f),w&&(m=[S,0],S+=f),b&&(v=[M-c,0],M-=f)):(_&&(g=[M-c,0],M-=f),w&&(m=[0,0],S+=f),b&&(v=[M-c,0],M-=f)),y=[S,M],t.get("inverse")&&y.reverse(),{viewRect:a,mainLength:l,orient:n,rotation:s[n],labelRotation:p,labelPosOpt:i,labelAlign:t.get("label.align")||o[n],labelBaseline:t.get("label.verticalAlign")||t.get("label.baseline")||r[n],playPosition:g,prevBtnPosition:m,nextBtnPosition:v,axisExtent:y,controlSize:c,controlGap:d}},_position:function(t){function e(t){var e=t.position;t.origin=[h[0][0]-e[0],h[1][0]-e[1]]}function i(t){return[[t.x,t.x+t.width],[t.y,t.y+t.height]]}function n(t,e,i,n,a){t[n]+=i[n][a]-e[n][a]}var a=this._mainGroup,o=this._labelGroup,r=t.viewRect;if("vertical"===t.orient){var s=Oe(),l=r.x,u=r.y+r.height;Ee(s,s,[-l,-u]),Be(s,s,-yB/2),Ee(s,s,[l,u]),r=r.clone(),r.applyTransform(s)}var h=i(r),c=i(a.getBoundingRect()),d=i(o.getBoundingRect()),f=a.position,p=o.position;p[0]=f[0]=h[0][0];var g=t.labelPosOpt;if(isNaN(g)){var m="+"===g?0:1;n(f,c,h,1,m),n(p,d,h,1,1-m)}else{var m=g>=0?0:1;n(f,c,h,1,m),p[1]=f[1]+g}a.attr("position",f),o.attr("position",p),a.rotation=o.rotation=t.rotation,e(a),e(o)},_createAxis:function(t,e){var i=e.getData(),n=e.get("axisType"),a=Yh(e,n);a.getTicks=function(){return i.mapArray(["value"],function(t){return t})};var o=i.getDataExtent("value");a.setExtent(o[0],o[1]),a.niceTicks();var r=new gB("value",a,t.axisExtent,n);return r.model=e,r},_createGroup:function(t){var e=this["_"+t]=new xM;return this.group.add(e),e},_renderAxisLine:function(t,e,i,n){var a=i.getExtent();n.get("lineStyle.show")&&e.add(new jT({shape:{x1:a[0],y1:0,x2:a[1],y2:0},style:r({lineCap:"round"},n.getModel("lineStyle").getLineStyle()),silent:!0,z2:1}))},_renderAxisTick:function(t,e,i,n){var a=n.getData(),o=i.scale.getTicks();vB(o,function(t){var o=i.dataToCoord(t),r=a.getItemModel(t),s=r.getModel("itemStyle"),l=r.getModel("emphasis.itemStyle"),u={position:[o,0],onclick:mB(this._changeTimeline,this,t)},h=cw(r,s,e,u);Wo(h,l.getItemStyle()),r.get("tooltip")?(h.dataIndex=t,h.dataModel=n):h.dataIndex=h.dataModel=null},this)},_renderAxisLabel:function(t,e,i,n){var a=i.getLabelModel();if(a.get("show")){var o=n.getData(),r=i.getViewLabels();vB(r,function(n){var a=n.tickValue,r=o.getItemModel(a),s=r.getModel("label"),l=r.getModel("emphasis.label"),u=i.dataToCoord(n.tickValue),h=new NT({position:[u,0],rotation:t.labelRotation-t.rotation,onclick:mB(this._changeTimeline,this,a),silent:!1});jo(h.style,s,{text:n.formattedLabel,textAlign:t.labelAlign,textVerticalAlign:t.labelBaseline}),e.add(h),Wo(h,jo({},l))},this)}},_renderControl:function(t,e,i,n){function a(t,i,a,h){if(t){var c={position:t,origin:[o/2,0],rotation:h?-r:0,rectHover:!0,style:s,onclick:a},d=hw(n,i,u,c);e.add(d),Wo(d,l)}}var o=t.controlSize,r=t.rotation,s=n.getModel("controlStyle").getItemStyle(),l=n.getModel("emphasis.controlStyle").getItemStyle(),u=[0,-o/2,o,o],h=n.getPlayState(),c=n.get("inverse",!0);a(t.nextBtnPosition,"controlStyle.nextIcon",mB(this._changeTimeline,this,c?"-":"+")),a(t.prevBtnPosition,"controlStyle.prevIcon",mB(this._changeTimeline,this,c?"+":"-")),a(t.playPosition,"controlStyle."+(h?"stopIcon":"playIcon"),mB(this._handlePlayClick,this,!h),!0)},_renderCurrentPointer:function(t,e,i,n){var a=n.getData(),o=n.getCurrentIndex(),r=a.getItemModel(o).getModel("checkpointStyle"),s=this,l={onCreate:function(t){t.draggable=!0,t.drift=mB(s._handlePointerDrag,s),t.ondragend=mB(s._handlePointerDragend,s),dw(t,o,i,n,!0)},onUpdate:function(t){dw(t,o,i,n)}};this._currentPointer=cw(r,r,this._mainGroup,{},this._currentPointer,l)},_handlePlayClick:function(t){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:t,from:this.uid})},_handlePointerDrag:function(t,e,i){this._clearTimer(),this._pointerChangeTimeline([i.offsetX,i.offsetY])},_handlePointerDragend:function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},_pointerChangeTimeline:function(t,e){var i=this._toAxisCoord(t)[0],n=this._axis,a=Ar(n.getExtent().slice());i>a[1]&&(i=a[1]),is&&(n=s,e=o)}),e},_clearTimer:function(){this._timer&&(clearTimeout(this._timer),this._timer=null)},_changeTimeline:function(t){var e=this.model.getCurrentIndex();"+"===t?t=e+1:"-"===t&&(t=e-1),this.api.dispatchAction({type:"timelineChange",currentIndex:t,from:this.uid})}}),Au(cB),WA.registerSubTypeDefaulter("dataZoom",function(){return"slider"});var xB=["x","y","z","radius","angle","single"],_B=["cartesian2d","polar","singleAxis"],wB=pw(xB,["axisIndex","axis","index","id"]),bB=f,SB=Ar,MB=function(t,e,i,n){this._dimName=t,this._axisIndex=e,this._valueWindow,this._percentWindow,this._dataExtent,this._minMaxSpan,this.ecModel=n,this._dataZoomModel=i};MB.prototype={constructor:MB,hostedBy:function(t){return this._dataZoomModel===t},getDataValueWindow:function(){return this._valueWindow.slice()},getDataPercentWindow:function(){return this._percentWindow.slice()},getTargetSeriesModels:function(){var t=[],e=this.ecModel;return e.eachSeries(function(i){if(fw(i.get("coordinateSystem"))){var n=this._dimName,a=e.queryComponents({mainType:n+"Axis",index:i.get(n+"AxisIndex"),id:i.get(n+"AxisId")})[0];this._axisIndex===(a&&a.componentIndex)&&t.push(i)}},this),t},getAxisModel:function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},getOtherAxisModel:function(){var t,e,i=this._dimName,n=this.ecModel,a=this.getAxisModel(),o="x"===i||"y"===i;o?(e="gridIndex",t="x"===i?"y":"x"):(e="polarIndex",t="angle"===i?"radius":"angle");var r;return n.eachComponent(t+"Axis",function(t){(t.get(e)||0)===(a.get(e)||0)&&(r=t)}),r},getMinMaxSpan:function(){return n(this._minMaxSpan)},calculateDataWindow:function(t){function e(t,e,i,n,a){var r=a?"Span":"ValueSpan";Rz(0,t,i,"all",h["min"+r],h["max"+r]);for(var s=0;2>s;s++)e[s]=Mr(t[s],i,n,!0),a&&(e[s]=o.parse(e[s]))}var i,n=this._dataExtent,a=this.getAxisModel(),o=a.axis.scale,r=this._dataZoomModel.getRangePropMode(),s=[0,100],l=[],u=[];bB(["start","end"],function(e,a){var h=t[e],c=t[e+"Value"];"percent"===r[a]?(null==h&&(h=s[a]),c=o.parse(Mr(h,s,n))):(i=!0,c=null==c?n[a]:o.parse(c),h=Mr(c,n,s)),u[a]=c,l[a]=h}),SB(u),SB(l);var h=this._minMaxSpan;return i?e(u,l,n,s,!1):e(l,u,s,n,!0),{valueWindow:u,percentWindow:l}},reset:function(t){if(t===this._dataZoomModel){var e=this.getTargetSeriesModels();this._dataExtent=mw(this,this._dimName,e),xw(this);var i=this.calculateDataWindow(t.settledOption);this._valueWindow=i.valueWindow,this._percentWindow=i.percentWindow,yw(this)}},restore:function(t){t===this._dataZoomModel&&(this._valueWindow=this._percentWindow=null,yw(this,!0))},filterData:function(t){function e(t){return t>=o[0]&&t<=o[1]}if(t===this._dataZoomModel){var i=this._dimName,n=this.getTargetSeriesModels(),a=t.get("filterMode"),o=this._valueWindow;"none"!==a&&bB(n,function(t){var n=t.getData(),r=n.mapDimension(i,!0);r.length&&("weakFilter"===a?n.filterSelf(function(t){for(var e,i,a,s=0;so[1];if(u&&!h&&!c)return!0;u&&(a=!0),h&&(e=!0),c&&(i=!0)}return a&&e&&i}):bB(r,function(i){if("empty"===a)t.setData(n=n.map(i,function(t){return e(t)?t:0/0}));else{var r={};r[i]=o,n.selectRange(r)}}),bB(r,function(t){n.setApproximateExtent(o,t)}))})}}};var IB=f,TB=wB,AB=Eu({type:"dataZoom",dependencies:["xAxis","yAxis","zAxis","radiusAxis","angleAxis","singleAxis","series"],defaultOption:{zlevel:0,z:4,orient:null,xAxisIndex:null,yAxisIndex:null,filterMode:"filter",throttle:null,start:0,end:100,startValue:null,endValue:null,minSpan:null,maxSpan:null,minValueSpan:null,maxValueSpan:null,rangeMode:null},init:function(t,e,i){this._dataIntervalByAxis={},this._dataInfo={},this._axisProxies={},this.textStyleModel,this._autoThrottle=!0,this._rangePropMode=["percent","percent"];var n=_w(t);this.settledOption=n,this.mergeDefaultAndTheme(t,i),this.doInit(n)},mergeOption:function(t){var e=_w(t);a(this.option,t,!0),a(this.settledOption,e,!0),this.doInit(e)},doInit:function(t){var e=this.option;oS.canvasSupported||(e.realtime=!1),this._setDefaultThrottle(t),ww(this,t);var i=this.settledOption;IB([["start","startValue"],["end","endValue"]],function(t,n){"value"===this._rangePropMode[n]&&(e[t[0]]=i[t[0]]=null)},this),this.textStyleModel=this.getModel("textStyle"),this._resetTarget(),this._giveAxisProxies()},_giveAxisProxies:function(){var t=this._axisProxies;this.eachTargetAxis(function(e,i,n,a){var o=this.dependentModels[e.axis][i],r=o.__dzAxisProxy||(o.__dzAxisProxy=new MB(e.name,i,this,a));t[e.name+"_"+i]=r},this)},_resetTarget:function(){var t=this.option,e=this._judgeAutoMode();TB(function(e){var i=e.axisIndex;t[i]=ea(t[i])},this),"axisIndex"===e?this._autoSetAxisIndex():"orient"===e&&this._autoSetOrient()},_judgeAutoMode:function(){var t=this.option,e=!1;TB(function(i){null!=t[i.axisIndex]&&(e=!0)},this);var i=t.orient;return null==i&&e?"orient":e?void 0:(null==i&&(t.orient="horizontal"),"axisIndex")},_autoSetAxisIndex:function(){var t=!0,e=this.get("orient",!0),i=this.option,n=this.dependentModels;if(t){var a="vertical"===e?"y":"x";n[a+"Axis"].length?(i[a+"AxisIndex"]=[0],t=!1):IB(n.singleAxis,function(n){t&&n.get("orient",!0)===e&&(i.singleAxisIndex=[n.componentIndex],t=!1)})}t&&TB(function(e){if(t){var n=[],a=this.dependentModels[e.axis];if(a.length&&!n.length)for(var o=0,r=a.length;r>o;o++)"category"===a[o].get("type")&&n.push(o);i[e.axisIndex]=n,n.length&&(t=!1)}},this),t&&this.ecModel.eachSeries(function(t){this._isSeriesHasAllAxesTypeOf(t,"value")&&TB(function(e){var n=i[e.axisIndex],a=t.get(e.axisIndex),o=t.get(e.axisId),r=t.ecModel.queryComponents({mainType:e.axis,index:a,id:o})[0];a=r.componentIndex,u(n,a)<0&&n.push(a)})},this)},_autoSetOrient:function(){var t;this.eachTargetAxis(function(e){!t&&(t=e.name)},this),this.option.orient="y"===t?"vertical":"horizontal"},_isSeriesHasAllAxesTypeOf:function(t,e){var i=!0;return TB(function(n){var a=t.get(n.axisIndex),o=this.dependentModels[n.axis][a];o&&o.get("type")===e||(i=!1)},this),i},_setDefaultThrottle:function(t){if(t.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var e=this.ecModel.option;this.option.throttle=e.animation&&e.animationDurationUpdate>0?100:20}},getFirstTargetAxisModel:function(){var t;return TB(function(e){if(null==t){var i=this.get(e.axisIndex);i.length&&(t=this.dependentModels[e.axis][i[0]])}},this),t},eachTargetAxis:function(t,e){var i=this.ecModel;TB(function(n){IB(this.get(n.axisIndex),function(a){t.call(e,n,a,this,i)},this)},this)},getAxisProxy:function(t,e){return this._axisProxies[t+"_"+e]},getAxisModel:function(t,e){var i=this.getAxisProxy(t,e);return i&&i.getAxisModel()},setRawRange:function(t){var e=this.option,i=this.settledOption;IB([["start","startValue"],["end","endValue"]],function(n){(null!=t[n[0]]||null!=t[n[1]])&&(e[n[0]]=i[n[0]]=t[n[0]],e[n[1]]=i[n[1]]=t[n[1]])},this),ww(this,t)},setCalculatedRange:function(t){var e=this.option;IB(["start","startValue","end","endValue"],function(i){e[i]=t[i]})},getPercentRange:function(){var t=this.findRepresentativeAxisProxy();return t?t.getDataPercentWindow():void 0},getValueRange:function(t,e){if(null!=t||null!=e)return this.getAxisProxy(t,e).getDataValueWindow();var i=this.findRepresentativeAxisProxy();return i?i.getDataValueWindow():void 0},findRepresentativeAxisProxy:function(t){if(t)return t.__dzAxisProxy;var e=this._axisProxies;for(var i in e)if(e.hasOwnProperty(i)&&e[i].hostedBy(this))return e[i];for(var i in e)if(e.hasOwnProperty(i)&&!e[i].hostedBy(this))return e[i]},getRangePropMode:function(){return this._rangePropMode.slice()}}),DB=LD.extend({type:"dataZoom",render:function(t,e,i){this.dataZoomModel=t,this.ecModel=e,this.api=i},getTargetCoordInfo:function(){function t(t,e,i,n){for(var a,o=0;o0&&e%g)return void(p+=f);var i=null==t||isNaN(t)||""===t,n=i?0:LB(t,o,u,!0);i&&!l&&e?(c.push([c[c.length-1][0],0]),d.push([d[d.length-1][0],0])):!i&&l&&(c.push([p,0]),d.push([p,0])),c.push([p,n]),d.push([p,n]),p+=f,l=i});var m=this.dataZoomModel;this._displayables.barGroup.add(new WT({shape:{points:c},style:s({fill:m.get("dataBackgroundColor")},m.getModel("dataBackground.areaStyle").getAreaStyle()),silent:!0,z2:-20})),this._displayables.barGroup.add(new HT({shape:{points:d},style:m.getModel("dataBackground.lineStyle").getLineStyle(),silent:!0,z2:-19}))}}},_prepareDataShadowInfo:function(){var t=this.dataZoomModel,e=t.get("showDataShadow");if(e!==!1){var i,n=this.ecModel;return t.eachTargetAxis(function(a,o){var r=t.getAxisProxy(a.name,o).getTargetSeriesModels();f(r,function(t){if(!(i||e!==!0&&u(GB,t.get("type"))<0)){var r,s=n.getComponent(a.axis,o).axis,l=bw(a.name),h=t.coordinateSystem;null!=l&&h.getOtherAxis&&(r=h.getOtherAxis(s).inverse),l=t.getData().mapDimension(l),i={thisAxis:s,series:t,thisDim:a.name,otherDim:l,otherAxisInverse:r}}},this)},this),i}},_renderHandle:function(){var t=this._displayables,e=t.handles=[],i=t.handleLabels=[],n=this._displayables.barGroup,a=this._size,o=this.dataZoomModel;n.add(t.filler=new CB({draggable:!0,cursor:Sw(this._orient),drift:PB(this._onDragMove,this,"all"),ondragstart:PB(this._showDataInfo,this,!0),ondragend:PB(this._onDragEnd,this),onmouseover:PB(this._showDataInfo,this,!0),onmouseout:PB(this._showDataInfo,this,!1),style:{fill:o.get("fillerColor"),textPosition:"inside"}})),n.add(new CB({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:a[0],height:a[1]},style:{stroke:o.get("dataBackgroundColor")||o.get("borderColor"),lineWidth:zB,fill:"rgba(0,0,0,0)"}})),OB([0,1],function(t){var a=dr(o.get("handleIcon"),{cursor:Sw(this._orient),draggable:!0,drift:PB(this._onDragMove,this,t),ondragend:PB(this._onDragEnd,this),onmouseover:PB(this._showDataInfo,this,!0),onmouseout:PB(this._showDataInfo,this,!1)},{x:-1,y:0,width:2,height:2}),r=a.getBoundingRect();this._handleHeight=Ir(o.get("handleSize"),this._size[1]),this._handleWidth=r.width/r.height*this._handleHeight,a.setStyle(o.getModel("handleStyle").getItemStyle());var s=o.get("handleColor");null!=s&&(a.style.fill=s),n.add(e[t]=a);var l=o.textStyleModel;this.group.add(i[t]=new NT({silent:!0,invisible:!0,style:{x:0,y:0,text:"",textVerticalAlign:"middle",textAlign:"center",textFill:l.getTextColor(),textFont:l.getFont()},z2:10}))},this)},_resetInterval:function(){var t=this._range=this.dataZoomModel.getPercentRange(),e=this._getViewExtent();this._handleEnds=[LB(t[0],[0,100],e,!0),LB(t[1],[0,100],e,!0)]},_updateInterval:function(t,e){var i=this.dataZoomModel,n=this._handleEnds,a=this._getViewExtent(),o=i.findRepresentativeAxisProxy().getMinMaxSpan(),r=[0,100];Rz(e,n,a,i.get("zoomLock")?"all":t,null!=o.minSpan?LB(o.minSpan,r,a,!0):null,null!=o.maxSpan?LB(o.maxSpan,r,a,!0):null);var s=this._range,l=this._range=kB([LB(n[0],a,r,!0),LB(n[1],a,r,!0)]);return!s||s[0]!==l[0]||s[1]!==l[1]},_updateView:function(t){var e=this._displayables,i=this._handleEnds,n=kB(i.slice()),a=this._size;OB([0,1],function(t){var n=e.handles[t],o=this._handleHeight;n.attr({scale:[o/2,o/2],position:[i[t],a[1]/2-o/2]})},this),e.filler.setShape({x:n[0],y:0,width:n[1]-n[0],height:a[1]}),this._updateDataInfo(t)},_updateDataInfo:function(t){function e(t){var e=rr(n.handles[t].parent,this.group),i=lr(0===t?"right":"left",e),s=this._handleWidth/2+VB,l=sr([c[t]+(0===t?-s:s),this._size[1]/2],e);a[t].setStyle({x:l[0],y:l[1],textVerticalAlign:o===EB?"middle":i,textAlign:o===EB?i:"center",text:r[t]})}var i=this.dataZoomModel,n=this._displayables,a=n.handleLabels,o=this._orient,r=["",""];if(i.get("showDetail")){var s=i.findRepresentativeAxisProxy();if(s){var l=s.getAxisModel().axis,u=this._range,h=t?s.calculateDataWindow({start:u[0],end:u[1]}).valueWindow:s.getDataValueWindow();r=[this._formatLabel(h[0],l),this._formatLabel(h[1],l)]}}var c=kB(this._handleEnds.slice());e.call(this,0),e.call(this,1)},_formatLabel:function(t,e){var i=this.dataZoomModel,n=i.get("labelFormatter"),a=i.get("labelPrecision");(null==a||"auto"===a)&&(a=e.getPixelPrecision());var o=null==t||isNaN(t)?"":"category"===e.type||"time"===e.type?e.scale.getLabel(Math.round(t)):t.toFixed(Math.min(a,20));return w(n)?n(t,o):b(n)?n.replace("{value}",o):o},_showDataInfo:function(t){t=this._dragging||t;var e=this._displayables.handleLabels;e[0].attr("invisible",!t),e[1].attr("invisible",!t)},_onDragMove:function(t,e,i,n){this._dragging=!0,NS(n.event);var a=this._displayables.barGroup.getLocalTransform(),o=sr([e,i],a,!0),r=this._updateInterval(t,o[0]),s=this.dataZoomModel.get("realtime");this._updateView(!s),r&&s&&this._dispatchZoomAction()},_onDragEnd:function(){this._dragging=!1,this._showDataInfo(!1);var t=this.dataZoomModel.get("realtime");!t&&this._dispatchZoomAction()},_onClickPanelClick:function(t){var e=this._size,i=this._displayables.barGroup.transformCoordToLocal(t.offsetX,t.offsetY);if(!(i[0]<0||i[0]>e[0]||i[1]<0||i[1]>e[1])){var n=this._handleEnds,a=(n[0]+n[1])/2,o=this._updateInterval("all",i[0]-a);this._updateView(),o&&this._dispatchZoomAction() +}},_dispatchZoomAction:function(){var t=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,start:t[0],end:t[1]})},_findCoordRect:function(){var t;if(OB(this.getTargetCoordInfo(),function(e){if(!t&&e.length){var i=e[0].model.coordinateSystem;t=i.getRect&&i.getRect()}}),!t){var e=this.api.getWidth(),i=this.api.getHeight();t={x:.2*e,y:.2*i,width:.6*e,height:.6*i}}return t}});Du({getTargetSeries:function(t){var e=B();return t.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(t,i,n){var a=n.getAxisProxy(t.name,i);f(a.getTargetSeriesModels(),function(t){e.set(t.uid,t)})})}),e},modifyOutputEnd:!0,overallReset:function(t,e){t.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(t,i,n){n.getAxisProxy(t.name,i).reset(n,e)}),t.eachTargetAxis(function(t,i,n){n.getAxisProxy(t.name,i).filterData(n,e)})}),t.eachComponent("dataZoom",function(t){var e=t.findRepresentativeAxisProxy(),i=e.getDataPercentWindow(),n=e.getDataValueWindow();t.setCalculatedRange({start:i[0],end:i[1],startValue:n[0],endValue:n[1]})})}}),Lu("dataZoom",function(t,e){var i=gw(y(e.eachComponent,e,"dataZoom"),wB,function(t,e){return t.get(e.axisIndex)}),n=[];e.eachComponent({mainType:"dataZoom",query:t},function(t){n.push.apply(n,i(t).nodes)}),f(n,function(e){e.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})})}),AB.extend({type:"dataZoom.inside",defaultOption:{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}});var WB="\x00_ec_dataZoom_roams",HB=y,ZB=DB.extend({type:"dataZoom.inside",init:function(){this._range},render:function(t,e,i){ZB.superApply(this,"render",arguments),this._range=t.getPercentRange(),f(this.getTargetCoordInfo(),function(e,n){var a=p(e,function(t){return Tw(t.model)});f(e,function(e){var o=e.model,r={};f(["pan","zoom","scrollMove"],function(t){r[t]=HB(XB[t],this,e,n)},this),Mw(i,{coordId:Tw(o),allCoordIds:a,containsPoint:function(t,e,i){return o.coordinateSystem.containPoint([e,i])},dataZoomId:t.id,dataZoomModel:t,getRange:r})},this)},this)},dispose:function(){Iw(this.api,this.dataZoomModel.id),ZB.superApply(this,"dispose",arguments),this._range=null}}),XB={zoom:function(t,e,i,n){var a=this._range,o=a.slice(),r=t.axisModels[0];if(r){var s=UB[e](null,[n.originX,n.originY],r,i,t),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(o[1]-o[0])+o[0],u=Math.max(1/n.scale,0);o[0]=(o[0]-l)*u+l,o[1]=(o[1]-l)*u+l;var h=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();return Rz(0,o,[0,100],0,h.minSpan,h.maxSpan),this._range=o,a[0]!==o[0]||a[1]!==o[1]?o:void 0}},pan:Pw(function(t,e,i,n,a,o){var r=UB[n]([o.oldX,o.oldY],[o.newX,o.newY],e,a,i);return r.signal*(t[1]-t[0])*r.pixel/r.pixelLength}),scrollMove:Pw(function(t,e,i,n,a,o){var r=UB[n]([0,0],[o.scrollDelta,o.scrollDelta],e,a,i);return r.signal*(t[1]-t[0])*o.scrollDelta})},UB={grid:function(t,e,i,n,a){var o=i.axis,r={},s=a.model.coordinateSystem.getRect();return t=t||[0,0],"x"===o.dim?(r.pixel=e[0]-t[0],r.pixelLength=s.width,r.pixelStart=s.x,r.signal=o.inverse?1:-1):(r.pixel=e[1]-t[1],r.pixelLength=s.height,r.pixelStart=s.y,r.signal=o.inverse?-1:1),r},polar:function(t,e,i,n,a){var o=i.axis,r={},s=a.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return t=t?s.pointToCoord(t):[0,0],e=s.pointToCoord(e),"radiusAxis"===i.mainType?(r.pixel=e[0]-t[0],r.pixelLength=l[1]-l[0],r.pixelStart=l[0],r.signal=o.inverse?1:-1):(r.pixel=e[1]-t[1],r.pixelLength=u[1]-u[0],r.pixelStart=u[0],r.signal=o.inverse?-1:1),r},singleAxis:function(t,e,i,n,a){var o=i.axis,r=a.model.coordinateSystem.getRect(),s={};return t=t||[0,0],"horizontal"===o.orient?(s.pixel=e[0]-t[0],s.pixelLength=r.width,s.pixelStart=r.x,s.signal=o.inverse?1:-1):(s.pixel=e[1]-t[1],s.pixelLength=r.height,s.pixelStart=r.y,s.signal=o.inverse?-1:1),s}},YB=["rect","polygon","keep","clear"],jB=function(t,e){var i=t&&t.brush;if(_(i)||(i=i?[i]:[]),i.length){var n=[];f(i,function(t){var e=t.hasOwnProperty("toolbox")?t.toolbox:[];e instanceof Array&&(n=n.concat(e))});var a=t&&t.toolbox;_(a)&&(a=a[0]),a||(a={feature:{}},t.toolbox=[a]);var o=a.feature||(a.feature={}),r=o.brush||(o.brush={}),s=r.type||(r.type=[]);s.push.apply(s,n),Ow(s),e&&!s.length&&s.push.apply(s,YB)}},qB=f,KB={lineX:Vw(0),lineY:Vw(1),rect:{point:function(t,e,i){return t&&i.boundingRect.contain(t[0],t[1])},rect:function(t,e,i){return t&&i.boundingRect.intersect(t)}},polygon:{point:function(t,e,i){return t&&i.boundingRect.contain(t[0],t[1])&&sc(i.range,t[0],t[1])},rect:function(t,e,i){var n=i.range;if(!t||n.length<=1)return!1;var a=t.x,o=t.y,r=t.width,s=t.height,l=n[0];return sc(n,a,o)||sc(n,a+r,o)||sc(n,a,o+s)||sc(n,a+r,o+s)||Ti.create(t).contain(l[0],l[1])||fr(a,o,a+r,o,n)||fr(a,o,a,o+s,n)||fr(a+r,o,a+r,o+s,n)||fr(a,o+s,a+r,o+s,n)?!0:void 0}}},$B=f,JB=u,QB=x,tV=["dataToPoint","pointToData"],eV=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],iV=Fw.prototype;iV.setOutputRanges=function(t,e){this.matchOutputRanges(t,e,function(t,e,i){if((t.coordRanges||(t.coordRanges=[])).push(e),!t.coordRange){t.coordRange=e;var n=rV[t.brushType](0,i,e);t.__rangeOffset={offset:sV[t.brushType](n.values,t.range,[1,1]),xyMinMax:n.xyMinMax}}})},iV.matchOutputRanges=function(t,e,i){$B(t,function(t){var n=this.findTargetInfo(t,e);n&&n!==!0&&f(n.coordSyses,function(n){var a=rV[t.brushType](1,n,t.range);i(t,a.values,n,e)})},this)},iV.setInputRanges=function(t,e){$B(t,function(t){var i=this.findTargetInfo(t,e);if(t.range=t.range||[],i&&i!==!0){t.panelId=i.panelId;var n=rV[t.brushType](0,i.coordSys,t.coordRange),a=t.__rangeOffset;t.range=a?sV[t.brushType](n.values,a.offset,Uw(n.xyMinMax,a.xyMinMax)):n.values}},this)},iV.makePanelOpts=function(t,e){return p(this._targetInfoList,function(i){var n=i.getPanelRect();return{panelId:i.panelId,defaultBrushType:e&&e(i),clipPath:Mv(n),isTargetByCursor:Tv(n,t,i.coordSysModel),getLinearBrushOtherExtent:Iv(n)}})},iV.controlSeries=function(t,e,i){var n=this.findTargetInfo(t,i);return n===!0||n&&JB(n.coordSyses,e.coordinateSystem)>=0},iV.findTargetInfo=function(t,e){for(var i=this._targetInfoList,n=Hw(e,t),a=0;a=0||JB(n,t.getAxis("y").model)>=0)&&o.push(t)}),e.push({panelId:"grid--"+t.id,gridModel:t,coordSysModel:t,coordSys:o[0],coordSyses:o,getPanelRect:oV.grid,xAxisDeclared:r[t.id],yAxisDeclared:s[t.id]})}))},geo:function(t,e){$B(t.geoModels,function(t){var i=t.coordinateSystem;e.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:i,coordSyses:[i],getPanelRect:oV.geo})})}},aV=[function(t,e){var i=t.xAxisModel,n=t.yAxisModel,a=t.gridModel;return!a&&i&&(a=i.axis.grid.model),!a&&n&&(a=n.axis.grid.model),a&&a===e.gridModel},function(t,e){var i=t.geoModel;return i&&i===e.geoModel}],oV={grid:function(){return this.coordSys.grid.getRect().clone()},geo:function(){var t=this.coordSys,e=t.getBoundingRect().clone();return e.applyTransform(rr(t)),e}},rV={lineX:QB(Zw,0),lineY:QB(Zw,1),rect:function(t,e,i){var n=e[tV[t]]([i[0][0],i[1][0]]),a=e[tV[t]]([i[0][1],i[1][1]]),o=[Ww([n[0],a[0]]),Ww([n[1],a[1]])];return{values:o,xyMinMax:o}},polygon:function(t,e,i){var n=[[1/0,-1/0],[1/0,-1/0]],a=p(i,function(i){var a=e[tV[t]](i);return n[0][0]=Math.min(n[0][0],a[0]),n[1][0]=Math.min(n[1][0],a[1]),n[0][1]=Math.max(n[0][1],a[0]),n[1][1]=Math.max(n[1][1],a[1]),a});return{values:a,xyMinMax:n}}},sV={lineX:QB(Xw,0),lineY:QB(Xw,1),rect:function(t,e,i){return[[t[0][0]-i[0]*e[0][0],t[0][1]-i[0]*e[0][1]],[t[1][0]-i[1]*e[1][0],t[1][1]-i[1]*e[1][1]]]},polygon:function(t,e,i){return p(t,function(t,n){return[t[0]-i[0]*e[n][0],t[1]-i[1]*e[n][1]]})}},lV=["inBrush","outOfBrush"],uV="__ecBrushSelect",hV="__ecInBrushSelectEvent",cV=OC.VISUAL.BRUSH;Ou(cV,function(t,e,i){t.eachComponent({mainType:"brush"},function(t){i&&"takeGlobalCursor"===i.type&&t.setBrushOption("brush"===i.key?i.brushOption:{brushType:!1})}),jw(t)}),Nu(cV,function(t,e,i){var a,o,r=[];t.eachComponent({mainType:"brush"},function(e,i){function l(t){return"all"===m||v[t]}function u(t){return!!t.length}function h(t,e){var i=t.coordinateSystem;w|=i.hasAxisBrushed(),l(e)&&i.eachActiveState(t.getData(),function(t,e){"active"===t&&(y[e]=1)})}function c(i,n,a){var o=Jw(i);if(o&&!Qw(e,n)&&(f(b,function(n){o[n.brushType]&&e.brushTargetManager.controlSeries(n,i,t)&&a.push(n),w|=u(a)}),l(n)&&u(a))){var r=i.getData();r.each(function(t){$w(o,a,r,t)&&(y[t]=1)})}}var d={brushId:e.id,brushIndex:i,brushName:e.name,areas:n(e.areas),selected:[]};r.push(d);var g=e.option,m=g.brushLink,v=[],y=[],x=[],w=0;i||(a=g.throttleType,o=g.throttleDelay);var b=p(e.areas,function(t){return tb(s({boundingRect:dV[t.brushType](t)},t))}),S=zw(e.option,lV,function(t){t.mappingMethod="fixed"});_(m)&&f(m,function(t){v[t]=1}),t.eachSeries(function(t,e){var i=x[e]=[];"parallel"===t.subType?h(t,e,i):c(t,e,i)}),t.eachSeries(function(t,e){var i={seriesId:t.id,seriesIndex:e,seriesName:t.name,dataIndex:[]};d.selected.push(i);var n=Jw(t),a=x[e],o=t.getData(),r=l(e)?function(t){return y[t]?(i.dataIndex.push(o.getRawIndex(t)),"inBrush"):"outOfBrush"}:function(t){return $w(n,a,o,t)?(i.dataIndex.push(o.getRawIndex(t)),"inBrush"):"outOfBrush"};(l(e)?w:u(a))&&Ew(lV,S,o,r)})}),qw(e,a,o,r,i)});{var dV={lineX:G,lineY:G,rect:function(t){return eb(t.range)},polygon:function(t){for(var e,i=t.range,n=0,a=i.length;a>n;n++){e=e||[[1/0,-1/0],[1/0,-1/0]];var o=i[n];o[0]e[0][1]&&(e[0][1]=o[0]),o[1]e[1][1]&&(e[1][1]=o[1])}return e&&eb(e)}},fV=["#ddd"];Eu({type:"brush",dependencies:["geo","grid","xAxis","yAxis","parallel","series"],defaultOption:{toolbox:null,brushLink:null,seriesIndex:"all",geoIndex:null,xAxisIndex:null,yAxisIndex:null,brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(120,140,180,0.3)",borderColor:"rgba(120,140,180,0.8)"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},areas:[],brushType:null,brushOption:{},coordInfoList:[],optionUpdated:function(t,e){var i=this.option;!e&&Rw(i,t,["inBrush","outOfBrush"]);var n=i.inBrush=i.inBrush||{};i.outOfBrush=i.outOfBrush||{color:fV},n.hasOwnProperty("liftZ")||(n.liftZ=5)},setAreas:function(t){t&&(this.areas=p(t,function(t){return ib(this.option,t)},this))},setBrushOption:function(t){this.brushOption=ib(this.option,t),this.brushType=this.brushOption.brushType}})}Bu({type:"brush",init:function(t,e){this.ecModel=t,this.api=e,this.model,(this._brushController=new Gm(e.getZr())).on("brush",y(this._onBrush,this)).mount()},render:function(t){return this.model=t,nb.apply(this,arguments)},updateTransform:function(t,e){return jw(e),nb.apply(this,arguments)},updateView:nb,dispose:function(){this._brushController.dispose()},_onBrush:function(t,e){var i=this.model.id;this.model.brushTargetManager.setOutputRanges(t,this.ecModel),(!e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:i,areas:n(t),$from:i}),e.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:i,areas:n(t),$from:i})}}),Lu({type:"brush",event:"brush"},function(t,e){e.eachComponent({mainType:"brush",query:t},function(e){e.setAreas(t.areas)})}),Lu({type:"brushSelect",event:"brushSelected",update:"none"},function(){}),Lu({type:"brushEnd",event:"brushEnd",update:"none"},function(){});var pV={},gV=FD.toolbox.brush;rb.defaultOption={show:!0,type:["rect","polygon","lineX","lineY","keep","clear"],icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:n(gV.title)};var mV=rb.prototype;mV.render=mV.updateView=function(t,e){var i,n,a;e.eachComponent({mainType:"brush"},function(t){i=t.brushType,n=t.brushOption.brushMode||"single",a|=t.areas.length}),this._brushType=i,this._brushMode=n,f(t.get("type",!0),function(e){t.setIconStatus(e,("keep"===e?"multiple"===n:"clear"===e?a:e===i)?"emphasis":"normal")})},mV.getIcons=function(){var t=this.model,e=t.get("icon",!0),i={};return f(t.get("type",!0),function(t){e[t]&&(i[t]=e[t])}),i},mV.onclick=function(t,e,i){var n=this._brushType,a=this._brushMode;"clear"===i?(e.dispatchAction({type:"axisAreaSelect",intervals:[]}),e.dispatchAction({type:"brush",command:"clear",areas:[]})):e.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"keep"===i?n:n===i?!1:i,brushMode:"keep"===i?"multiple"===a?"single":"multiple":a}})},ab("brush",rb),Au(jB);var vV=f,yV=function(t){var e=t&&t.visualMap;_(e)||(e=e?[e]:[]),vV(e,function(t){if(t){sb(t,"splitList")&&!sb(t,"pieces")&&(t.pieces=t.splitList,delete t.splitList);var e=t.pieces;e&&_(e)&&vV(e,function(t){S(t)&&(sb(t,"start")&&!sb(t,"min")&&(t.min=t.start),sb(t,"end")&&!sb(t,"max")&&(t.max=t.end))})}})};WA.registerSubTypeDefaulter("visualMap",function(t){return t.categories||(t.pieces?t.pieces.length>0:t.splitNumber>0)&&!t.calculable?"piecewise":"continuous"});var xV=OC.VISUAL.COMPONENT;Nu(xV,{createOnAllSeries:!0,reset:function(t,e){var i=[];return e.eachComponent("visualMap",function(e){var n=t.pipelineContext;!e.isTargetSeries(t)||n&&n.large||i.push(Bw(e.stateList,e.targetVisuals,y(e.getValueState,e),e.getDataDimension(t.getData())))}),i}}),Nu(xV,{createOnAllSeries:!0,reset:function(t,e){var i=t.getData(),n=[];e.eachComponent("visualMap",function(e){if(e.isTargetSeries(t)){var a=e.getVisualMeta(y(lb,null,t,e))||{stops:[],outerColors:[]},o=e.getDataDimension(i),r=i.getDimensionInfo(o);null!=r&&(a.dimension=r.index,n.push(a))}}),t.getData().setVisual("visualMeta",n)}});var _V={get:function(t,e,i){var a=n((wV[t]||{})[e]);return i&&_(a)?a[a.length-1]:a}},wV={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}},bV=kO.mapVisual,SV=kO.eachVisual,MV=_,IV=f,TV=Ar,AV=Mr,DV=G,CV=Eu({type:"visualMap",dependencies:["series"],stateList:["inRange","outOfRange"],replacableOptionKeys:["inRange","outOfRange","target","controller","color"],dataBound:[-1/0,1/0],layoutMode:{type:"box",ignoreSize:!0},defaultOption:{show:!0,zlevel:0,z:4,seriesIndex:"all",min:0,max:200,dimension:null,inRange:null,outOfRange:null,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,color:null,formatter:null,text:null,textStyle:{color:"#333"}},init:function(t,e,i){this._dataExtent,this.targetVisuals={},this.controllerVisuals={},this.textStyleModel,this.itemSize,this.mergeDefaultAndTheme(t,i)},optionUpdated:function(t,e){var i=this.option;oS.canvasSupported||(i.realtime=!1),!e&&Rw(i,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},resetVisual:function(t){var e=this.stateList;t=y(t,this),this.controllerVisuals=zw(this.option.controller,e,t),this.targetVisuals=zw(this.option.target,e,t)},getTargetSeriesIndices:function(){var t=this.option.seriesIndex,e=[];return null==t||"all"===t?this.ecModel.eachSeries(function(t,i){e.push(i)}):e=ea(t),e},eachTargetSeries:function(t,e){f(this.getTargetSeriesIndices(),function(i){t.call(e,this.ecModel.getSeriesByIndex(i))},this)},isTargetSeries:function(t){var e=!1;return this.eachTargetSeries(function(i){i===t&&(e=!0)}),e},formatValueText:function(t,e,i){function n(t){return t===l[0]?"min":t===l[1]?"max":(+t).toFixed(Math.min(s,20))}var a,o,r=this.option,s=r.precision,l=this.dataBound,u=r.formatter;return i=i||["<",">"],_(t)&&(t=t.slice(),a=!0),o=e?t:a?[n(t[0]),n(t[1])]:n(t),b(u)?u.replace("{value}",a?o[0]:o).replace("{value2}",a?o[1]:o):w(u)?a?u(t[0],t[1]):u(t):a?t[0]===l[0]?i[0]+" "+o[1]:t[1]===l[1]?i[1]+" "+o[0]:o[0]+" - "+o[1]:o},resetExtent:function(){var t=this.option,e=TV([t.min,t.max]);this._dataExtent=e},getDataDimension:function(t){var e=this.option.dimension,i=t.dimensions;if(null!=e||i.length){if(null!=e)return t.getDimension(e);for(var n=t.dimensions,a=n.length-1;a>=0;a--){var o=n[a],r=t.getDimensionInfo(o);if(!r.isCalculationCoord)return o}}},getExtent:function(){return this._dataExtent.slice()},completeVisualOption:function(){function t(t){MV(r.color)&&!t.inRange&&(t.inRange={color:r.color.slice().reverse()}),t.inRange=t.inRange||{color:o.get("gradientColor")},IV(this.stateList,function(e){var i=t[e];if(b(i)){var n=_V.get(i,"active",h);n?(t[e]={},t[e][i]=n):delete t[e]}},this)}function e(t,e,i){var n=t[e],a=t[i];n&&!a&&(a=t[i]={},IV(n,function(t,e){if(kO.isValidType(e)){var i=_V.get(e,"inactive",h);null!=i&&(a[e]=i,"color"!==e||a.hasOwnProperty("opacity")||a.hasOwnProperty("colorAlpha")||(a.opacity=[0,0]))}}))}function i(t){var e=(t.inRange||{}).symbol||(t.outOfRange||{}).symbol,i=(t.inRange||{}).symbolSize||(t.outOfRange||{}).symbolSize,a=this.get("inactiveColor");IV(this.stateList,function(o){var r=this.itemSize,s=t[o];s||(s=t[o]={color:h?a:[a]}),null==s.symbol&&(s.symbol=e&&n(e)||(h?"roundRect":["roundRect"])),null==s.symbolSize&&(s.symbolSize=i&&n(i)||(h?r[0]:[r[0],r[0]])),s.symbol=bV(s.symbol,function(t){return"none"===t||"square"===t?"roundRect":t});var l=s.symbolSize;if(null!=l){var u=-1/0;SV(l,function(t){t>u&&(u=t)}),s.symbolSize=bV(l,function(t){return AV(t,[0,u],[0,r[0]],!0)})}},this)}var o=this.ecModel,r=this.option,s={inRange:r.inRange,outOfRange:r.outOfRange},l=r.target||(r.target={}),u=r.controller||(r.controller={});a(l,s),a(u,s);var h=this.isCategory();t.call(this,l),t.call(this,u),e.call(this,l,"inRange","outOfRange"),i.call(this,u)},resetItemSize:function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},isCategory:function(){return!!this.option.categories},setSelected:DV,getValueState:DV,getVisualMeta:DV}),LV=[20,140],kV=CV.extend({type:"visualMap.continuous",defaultOption:{align:"auto",calculable:!1,range:null,realtime:!0,itemHeight:null,itemWidth:null,hoverLink:!0,hoverLinkDataSize:null,hoverLinkOnHandle:null},optionUpdated:function(){kV.superApply(this,"optionUpdated",arguments),this.resetExtent(),this.resetVisual(function(t){t.mappingMethod="linear",t.dataExtent=this.getExtent()}),this._resetRange()},resetItemSize:function(){kV.superApply(this,"resetItemSize",arguments);var t=this.itemSize;"horizontal"===this._orient&&t.reverse(),(null==t[0]||isNaN(t[0]))&&(t[0]=LV[0]),(null==t[1]||isNaN(t[1]))&&(t[1]=LV[1])},_resetRange:function(){var t=this.getExtent(),e=this.option.range;!e||e.auto?(t.auto=1,this.option.range=t):_(e)&&(e[0]>e[1]&&e.reverse(),e[0]=Math.max(e[0],t[0]),e[1]=Math.min(e[1],t[1]))},completeVisualOption:function(){CV.prototype.completeVisualOption.apply(this,arguments),f(this.stateList,function(t){var e=this.option.controller[t].symbolSize;e&&e[0]!==e[1]&&(e[0]=0)},this)},setSelected:function(t){this.option.range=t.slice(),this._resetRange()},getSelected:function(){var t=this.getExtent(),e=Ar((this.get("range")||[]).slice());return e[0]>t[1]&&(e[0]=t[1]),e[1]>t[1]&&(e[1]=t[1]),e[0]=i[1]||t<=e[1])?"inRange":"outOfRange"},findTargetDataIndices:function(t){var e=[];return this.eachTargetSeries(function(i){var n=[],a=i.getData();a.each(this.getDataDimension(a),function(e,i){t[0]<=e&&e<=t[1]&&n.push(i)},this),e.push({seriesId:i.id,dataIndex:n})},this),e},getVisualMeta:function(t){function e(e,i){a.push({value:e,color:t(e,i)})}for(var i=ub(this,"outOfRange",this.getExtent()),n=ub(this,"inRange",this.option.range.slice()),a=[],o=0,r=0,s=n.length,l=i.length;l>r&&(!n.length||i[r]<=n[0]);r++)i[r]o;o++,u=0)u&&a.length&&e(n[o],"outOfRange"),e(n[o],"inRange");for(var u=1;l>r;r++)(!n.length||n[n.length-1]o;o++){var r=t[0]+a*o;if(r>t[1])break;n.push({color:this.getControllerVisual(r,"color",e),offset:o/i})}return n.push({color:this.getControllerVisual(t[1],"color",e),offset:1}),n},_createBarPoints:function(t,e){var i=this.visualMapModel.itemSize;return[[i[0]-e[0],t[0]],[i[0],t[0]],[i[0],t[1]],[i[0]-e[1],t[1]]]},_createBarGroup:function(t){var e=this._orient,i=this.visualMapModel.get("inverse");return new xM("horizontal"!==e||i?"horizontal"===e&&i?{scale:"bottom"===t?[-1,1]:[1,1],rotation:-Math.PI/2}:"vertical"!==e||i?{scale:"left"===t?[1,1]:[-1,1]}:{scale:"left"===t?[1,-1]:[-1,-1]}:{scale:"bottom"===t?[1,1]:[-1,1],rotation:Math.PI/2})},_updateHandle:function(t,e){if(this._useHandle){var i=this._shapes,n=this.visualMapModel,a=i.handleThumbs,o=i.handleLabels;NV([0,1],function(r){var s=a[r];s.setStyle("fill",e.handlesColor[r]),s.position[1]=t[r];var l=sr(i.handleLabelPoints[r],rr(s,this.group));o[r].setStyle({x:l[0],y:l[1],text:n.formatValueText(this._dataInterval[r]),textVerticalAlign:"middle",textAlign:this._applyTransform("horizontal"===this._orient?0===r?"bottom":"top":"left",i.barGroup)})},this)}},_showIndicator:function(t,e,i,n){var a=this.visualMapModel,o=a.getExtent(),r=a.itemSize,s=[0,r[1]],l=OV(t,o,s,!0),u=this._shapes,h=u.indicator;if(h){h.position[1]=l,h.attr("invisible",!1),h.setShape("points",pb(!!i,n,l,r[1]));var c={convertOpacityToAlpha:!0},d=this.getControllerVisual(t,"color",c);h.setStyle("fill",d);var f=sr(u.indicatorLabelPoint,rr(h,this.group)),p=u.indicatorLabel;p.attr("invisible",!1);var g=this._applyTransform("left",u.barGroup),m=this._orient;p.setStyle({text:(i?i:"")+a.formatValueText(e),textVerticalAlign:"horizontal"===m?g:"middle",textAlign:"horizontal"===m?"center":g,x:f[0],y:f[1]})}},_enableHoverLinkToSeries:function(){var t=this;this._shapes.barGroup.on("mousemove",function(e){if(t._hovering=!0,!t._dragging){var i=t.visualMapModel.itemSize,n=t._applyTransform([e.offsetX,e.offsetY],t._shapes.barGroup,!0,!0);n[1]=zV(RV(0,n[1]),i[1]),t._doHoverLinkToSeries(n[1],0<=n[0]&&n[0]<=i[0])}}).on("mouseout",function(){t._hovering=!1,!t._dragging&&t._clearHoverLinkToSeries()})},_enableHoverLinkFromSeries:function(){var t=this.api.getZr();this.visualMapModel.option.hoverLink?(t.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),t.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},_doHoverLinkToSeries:function(t,e){var i=this.visualMapModel,n=i.itemSize;if(i.option.hoverLink){var a=[0,n[1]],o=i.getExtent();t=zV(RV(a[0],t),a[1]);var r=gb(i,o,a),s=[t-r,t+r],l=OV(t,a,o,!0),u=[OV(s[0],a,o,!0),OV(s[1],a,o,!0)];s[0]a[1]&&(u[1]=1/0),e&&(u[0]===-1/0?this._showIndicator(l,u[1],"< ",r):1/0===u[1]?this._showIndicator(l,u[0],"> ",r):this._showIndicator(l,l,"≈ ",r));var h=this._hoverLinkDataIndices,c=[];(e||mb(i))&&(c=this._hoverLinkDataIndices=i.findTargetDataIndices(u));var d=ua(h,c);this._dispatchHighDown("downplay",cb(d[0],i)),this._dispatchHighDown("highlight",cb(d[1],i))}},_hoverLinkFromSeriesMouseOver:function(t){var e=t.target,i=this.visualMapModel;if(e&&null!=e.dataIndex){var n=this.ecModel.getSeriesByIndex(e.seriesIndex);if(i.isTargetSeries(n)){var a=n.getData(e.dataType),o=a.get(i.getDataDimension(a),e.dataIndex,!0);isNaN(o)||this._showIndicator(o,o)}}},_hideIndicator:function(){var t=this._shapes;t.indicator&&t.indicator.attr("invisible",!0),t.indicatorLabel&&t.indicatorLabel.attr("invisible",!0)},_clearHoverLinkToSeries:function(){this._hideIndicator();var t=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",cb(t,this.visualMapModel)),t.length=0},_clearHoverLinkFromSeries:function(){this._hideIndicator();var t=this.api.getZr();t.off("mouseover",this._hoverLinkFromSeriesMouseOver),t.off("mouseout",this._hideIndicator)},_applyTransform:function(t,e,i,n){var a=rr(e,n?null:this.group);return vA[_(t)?"applyTransform":"transformDirection"](t,a,i)},_dispatchHighDown:function(t,e){e&&e.length&&this.api.dispatchAction({type:t,batch:e})},dispose:function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},remove:function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries() +}}),GV={type:"selectDataRange",event:"dataRangeSelected",update:"update"};Lu(GV,function(t,e){e.eachComponent({mainType:"visualMap",query:t},function(e){e.setSelected(t.selected)})}),Au(yV);{var FV=CV.extend({type:"visualMap.piecewise",defaultOption:{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieceList:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0,showLabel:null},optionUpdated:function(t,e){FV.superApply(this,"optionUpdated",arguments),this._pieceList=[],this.resetExtent();var i=this._mode=this._determineMode();WV[this._mode].call(this),this._resetSelected(t,e);var a=this.option.categories;this.resetVisual(function(t,e){"categories"===i?(t.mappingMethod="category",t.categories=n(a)):(t.dataExtent=this.getExtent(),t.mappingMethod="piecewise",t.pieceList=p(this._pieceList,function(t){var t=n(t);return"inRange"!==e&&(t.visual=null),t}))})},completeVisualOption:function(){function t(t,e,i){return t&&t[e]&&(S(t[e])?t[e].hasOwnProperty(i):t[e]===i)}var e=this.option,i={},n=kO.listVisualTypes(),a=this.isCategory();f(e.pieces,function(t){f(n,function(e){t.hasOwnProperty(e)&&(i[e]=1)})}),f(i,function(i,n){var o=0;f(this.stateList,function(i){o|=t(e,i,n)||t(e.target,i,n)},this),!o&&f(this.stateList,function(t){(e[t]||(e[t]={}))[n]=_V.get(n,"inRange"===t?"active":"inactive",a)})},this),CV.prototype.completeVisualOption.apply(this,arguments)},_resetSelected:function(t,e){var i=this.option,n=this._pieceList,a=(e?i:t).selected||{};if(i.selected=a,f(n,function(t){var e=this.getSelectedMapKey(t);a.hasOwnProperty(e)||(a[e]=!0)},this),"single"===i.selectedMode){var o=!1;f(n,function(t){var e=this.getSelectedMapKey(t);a[e]&&(o?a[e]=!1:o=!0)},this)}},getSelectedMapKey:function(t){return"categories"===this._mode?t.value+"":t.index+""},getPieceList:function(){return this._pieceList},_determineMode:function(){var t=this.option;return t.pieces&&t.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},setSelected:function(t){this.option.selected=n(t)},getValueState:function(t){var e=kO.findPieceIndex(t,this._pieceList);return null!=e&&this.option.selected[this.getSelectedMapKey(this._pieceList[e])]?"inRange":"outOfRange"},findTargetDataIndices:function(t){var e=[];return this.eachTargetSeries(function(i){var n=[],a=i.getData();a.each(this.getDataDimension(a),function(e,i){var a=kO.findPieceIndex(e,this._pieceList);a===t&&n.push(i)},this),e.push({seriesId:i.id,dataIndex:n})},this),e},getRepresentValue:function(t){var e;if(this.isCategory())e=t.value;else if(null!=t.value)e=t.value;else{var i=t.interval||[];e=i[0]===-1/0&&1/0===i[1]?0:(i[0]+i[1])/2}return e},getVisualMeta:function(t){function e(e,o){var r=a.getRepresentValue({interval:e});o||(o=a.getValueState(r));var s=t(r,o);e[0]===-1/0?n[0]=s:1/0===e[1]?n[1]=s:i.push({value:e[0],color:s},{value:e[1],color:s})}if(!this.isCategory()){var i=[],n=[],a=this,o=this._pieceList.slice();if(o.length){var r=o[0].interval[0];r!==-1/0&&o.unshift({interval:[-1/0,r]}),r=o[o.length-1].interval[1],1/0!==r&&o.push({interval:[r,1/0]})}else o.push({interval:[-1/0,1/0]});var s=-1/0;return f(o,function(t){var i=t.interval;i&&(i[0]>s&&e([s,i[0]],"outOfRange"),e(i.slice()),s=i[1])},this),{stops:i,outerColors:n}}}}),WV={splitNumber:function(){var t=this.option,e=this._pieceList,i=Math.min(t.precision,20),n=this.getExtent(),a=t.splitNumber;a=Math.max(parseInt(a,10),1),t.splitNumber=a;for(var o=(n[1]-n[0])/a;+o.toFixed(i)!==o&&5>i;)i++;t.precision=i,o=+o.toFixed(i),t.minOpen&&e.push({interval:[-1/0,n[0]],close:[0,0]});for(var r=0,s=n[0];a>r;s+=o,r++){var l=r===a-1?n[1]:s+o;e.push({interval:[s,l],close:[1,1]})}t.maxOpen&&e.push({interval:[n[1],1/0],close:[0,0]}),Vr(e),f(e,function(t,e){t.index=e,t.text=this.formatValueText(t.interval)},this)},categories:function(){var t=this.option;f(t.categories,function(t){this._pieceList.push({text:this.formatValueText(t,!0),value:t})},this),yb(t,this._pieceList)},pieces:function(){var t=this.option,e=this._pieceList;f(t.pieces,function(t,i){S(t)||(t={value:t});var n={text:"",index:i};if(null!=t.label&&(n.text=t.label),t.hasOwnProperty("value")){var a=n.value=t.value;n.interval=[a,a],n.close=[1,1]}else{for(var o=n.interval=[],r=n.close=[0,0],s=[1,0,1],l=[-1/0,1/0],u=[],h=0;2>h;h++){for(var c=[["gte","gt","min"],["lte","lt","max"]][h],d=0;3>d&&null==o[h];d++)o[h]=t[c[d]],r[h]=s[d],u[h]=2===d;null==o[h]&&(o[h]=l[h])}u[0]&&1/0===o[1]&&(r[0]=0),u[1]&&o[0]===-1/0&&(r[1]=0),o[0]===o[1]&&r[0]&&r[1]&&(n.value=o[0])}n.visual=kO.retrieveVisuals(t),e.push(n)},this),yb(t,e),Vr(e),f(e,function(t){var e=t.close,i=[["<","≤"][e[1]],[">","≥"][e[0]]];t.text=t.text||this.formatValueText(null!=t.value?t.value:t.interval,!1,i)},this)}};PV.extend({type:"visualMap.piecewise",doRender:function(){function t(t){var a=t.piece,u=new xM;u.onclick=y(this._onItemClick,this,a),this._enableHoverLink(u,t.indexInModelPieceList);var h=i.getRepresentValue(a);if(this._createItemSymbol(u,h,[0,0,l[0],l[1]]),c){var d=this.visualMapModel.getValueState(h);u.add(new NT({style:{x:"right"===s?-n:l[0]+n,y:l[1]/2,text:a.text,textVerticalAlign:"middle",textAlign:s,textFont:o,textFill:r,opacity:"outOfRange"===d?.5:1}}))}e.add(u)}var e=this.group;e.removeAll();var i=this.visualMapModel,n=i.get("textGap"),a=i.textStyleModel,o=a.getFont(),r=a.getTextColor(),s=this._getItemAlign(),l=i.itemSize,u=this._getViewData(),h=u.endsText,c=D(i.get("showLabel",!0),!h);h&&this._renderEndsText(e,h[0],l,c,s),f(u.viewPieceList,t,this),h&&this._renderEndsText(e,h[1],l,c,s),VA(i.get("orient"),e,i.get("itemGap")),this.renderBackground(e),this.positionGroup(e)},_enableHoverLink:function(t,e){function i(t){var i=this.visualMapModel;i.option.hoverLink&&this.api.dispatchAction({type:t,batch:cb(i.findTargetDataIndices(e),i)})}t.on("mouseover",y(i,this,"highlight")).on("mouseout",y(i,this,"downplay"))},_getItemAlign:function(){var t=this.visualMapModel,e=t.option;if("vertical"===e.orient)return hb(t,this.api,t.itemSize);var i=e.align;return i&&"auto"!==i||(i="left"),i},_renderEndsText:function(t,e,i,n,a){if(e){var o=new xM,r=this.visualMapModel.textStyleModel;o.add(new NT({style:{x:n?"right"===a?i[0]:0:i[0]/2,y:i[1]/2,textVerticalAlign:"middle",textAlign:n?a:"center",text:e,textFont:r.getFont(),textFill:r.getTextColor()}})),t.add(o)}},_getViewData:function(){var t=this.visualMapModel,e=p(t.getPieceList(),function(t,e){return{piece:t,indexInModelPieceList:e}}),i=t.get("text"),n=t.get("orient"),a=t.get("inverse");return("horizontal"===n?a:!a)?e.reverse():i&&(i=i.slice().reverse()),{viewPieceList:e,endsText:i}},_createItemSymbol:function(t,e,i){t.add(ic(this.getControllerVisual(e,"symbol"),i[0],i[1],i[2],i[3],this.getControllerVisual(e,"color")))},_onItemClick:function(t){var e=this.visualMapModel,i=e.option,a=n(i.selected),o=e.getSelectedMapKey(t);"single"===i.selectedMode?(a[o]=!0,f(a,function(t,e){a[e]=e===o})):a[o]=!a[o],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:a})}})}Au(yV);var HV=Eu({type:"toolbox",layoutMode:{type:"box",ignoreSize:!0},optionUpdated:function(){HV.superApply(this,"optionUpdated",arguments),f(this.option.feature,function(t,e){var i=ob(e);i&&a(t,i.defaultOption)})},defaultOption:{show:!0,z:6,zlevel:0,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}},tooltip:{show:!1}}});Bu({type:"toolbox",render:function(t,e,i,n){function a(a,r){var s,l=c[a],d=c[r],f=u[l],p=new vr(f,t,t.ecModel);if(n&&null!=n.newTitle&&n.featureName===l&&(f.title=n.newTitle),l&&!d){if(xb(l))s={model:p,onclick:p.option.onclick,featureName:l};else{var g=ob(l);if(!g)return;s=new g(p,e,i)}h[l]=s}else{if(s=h[d],!s)return;s.model=p,s.ecModel=e,s.api=i}return!l&&d?void(s.dispose&&s.dispose(e,i)):!p.get("show")||s.unusable?void(s.remove&&s.remove(e,i)):(o(p,s,l),p.setIconStatus=function(t,e){var i=this.option,n=this.iconPaths;i.iconStatus=i.iconStatus||{},i.iconStatus[t]=e,n[t]&&n[t].trigger(e)},void(s.render&&s.render(p,e,i,n)))}function o(n,a,o){var u=n.getModel("iconStyle"),h=n.getModel("emphasis.iconStyle"),c=a.getIcons?a.getIcons():n.get("icon"),d=n.get("title")||{};if("string"==typeof c){var p=c,g=d;c={},d={},c[o]=p,d[o]=g}var m=n.iconPaths={};f(c,function(o,c){var f=dr(o,{},{x:-l/2,y:-l/2,width:l,height:l});f.setStyle(u.getItemStyle()),f.hoverStyle=h.getItemStyle(),f.setStyle({text:d[c],textAlign:h.get("textAlign"),textBorderRadius:h.get("textBorderRadius"),textPadding:h.get("textPadding"),textFill:null});var p=t.getModel("tooltip");p&&p.get("show")&&f.attr("tooltip",r({content:d[c],formatter:p.get("formatter",!0)||function(){return d[c]},formatterParams:{componentType:"toolbox",name:c,title:d[c],$vars:["name","title"]},position:p.get("position",!0)||"bottom"},p.option)),Wo(f),t.get("showTitle")&&(f.__title=d[c],f.on("mouseover",function(){var e=h.getItemStyle(),i="vertical"===t.get("orient")?null==t.get("right")?"right":"left":null==t.get("bottom")?"bottom":"top";f.setStyle({textFill:h.get("textFill")||e.fill||e.stroke||"#000",textBackgroundColor:h.get("textBackgroundColor"),textPosition:h.get("textPosition")||i})}).on("mouseout",function(){f.setStyle({textFill:null,textBackgroundColor:null})})),f.trigger(n.get("iconStatus."+c)||"normal"),s.add(f),f.on("click",y(a.onclick,a,e,i,c)),m[c]=f})}var s=this.group;if(s.removeAll(),t.get("show")){var l=+t.get("itemSize"),u=t.get("feature")||{},h=this._features||(this._features={}),c=[];f(u,function(t,e){c.push(e)}),new Xu(this._featureNames||[],c).add(a).update(a).remove(x(a,null)).execute(),this._featureNames=c,y_(s,t,i),s.add(x_(s.getBoundingRect(),t)),s.eachChild(function(t){var e=t.__title,n=t.hoverStyle;if(n&&e){var a=Ui(e,ln(n)),o=t.position[0]+s.position[0],r=t.position[1]+s.position[1]+l,u=!1;r+a.height>i.getHeight()&&(n.textPosition="top",u=!0);var h=u?-5-a.height:l+8;o+a.width/2>i.getWidth()?(n.textPosition=["100%",h],n.textAlign="right"):o-a.width/2<0&&(n.textPosition=[0,h],n.textAlign="left")}})}},updateView:function(t,e,i,n){f(this._features,function(t){t.updateView&&t.updateView(t.model,e,i,n)})},remove:function(t,e){f(this._features,function(i){i.remove&&i.remove(t,e)}),this.group.removeAll()},dispose:function(t,e){f(this._features,function(i){i.dispose&&i.dispose(t,e)})}});var ZV=FD.toolbox.saveAsImage;_b.defaultOption={show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:ZV.title,type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],pixelRatio:1,lang:ZV.lang.slice()},_b.prototype.unusable=!oS.canvasSupported;var XV=_b.prototype;XV.onclick=function(t,e){var i=this.model,n=i.get("name")||t.get("title.0.text")||"echarts",a="svg"===e.getZr().painter.getType(),o=a?"svg":i.get("type",!0)||"png",r=e.getConnectedDataURL({type:o,backgroundColor:i.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",connectedBackgroundColor:i.get("connectedBackgroundColor"),excludeComponents:i.get("excludeComponents"),pixelRatio:i.get("pixelRatio")});if("function"!=typeof MouseEvent||oS.browser.ie||oS.browser.edge)if(window.navigator.msSaveOrOpenBlob){for(var s=atob(r.split(",")[1]),l=s.length,u=new Uint8Array(l);l--;)u[l]=s.charCodeAt(l);var h=new Blob([u]);window.navigator.msSaveOrOpenBlob(h,n+"."+o)}else{var c=i.get("lang"),d='',f=window.open();f.document.write(d)}else{var p=document.createElement("a");p.download=n+"."+o,p.target="_blank",p.href=r;var g=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});p.dispatchEvent(g)}},ab("saveAsImage",_b);var UV=FD.toolbox.magicType,YV="__ec_magicType_stack__";wb.defaultOption={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:n(UV.title),option:{},seriesIndex:{}};var jV=wb.prototype;jV.getIcons=function(){var t=this.model,e=t.get("icon"),i={};return f(t.get("type"),function(t){e[t]&&(i[t]=e[t])}),i};var qV={line:function(t,e,i,n){return"bar"===t?a({id:e,type:"line",data:i.get("data"),stack:i.get("stack"),markPoint:i.get("markPoint"),markLine:i.get("markLine")},n.get("option.line")||{},!0):void 0},bar:function(t,e,i,n){return"line"===t?a({id:e,type:"bar",data:i.get("data"),stack:i.get("stack"),markPoint:i.get("markPoint"),markLine:i.get("markLine")},n.get("option.bar")||{},!0):void 0},stack:function(t,e,i,n){var o=i.get("stack")===YV;return"line"===t||"bar"===t?(n.setIconStatus("stack",o?"normal":"emphasis"),a({id:e,stack:o?"":YV},n.get("option.stack")||{},!0)):void 0}},KV=[["line","bar"],["stack"]];jV.onclick=function(t,e,i){var o=this.model,r=o.get("seriesIndex."+i);if(qV[i]){var l={series:[]},h=function(e){var n=e.subType,a=e.id,r=qV[i](n,a,e,o);r&&(s(r,e.option),l.series.push(r));var u=e.coordinateSystem;if(u&&"cartesian2d"===u.type&&("line"===i||"bar"===i)){var h=u.getAxesByScale("ordinal")[0];if(h){var c=h.dim,d=c+"Axis",f=t.queryComponents({mainType:d,index:e.get(name+"Index"),id:e.get(name+"Id")})[0],p=f.componentIndex;l[d]=l[d]||[];for(var g=0;p>=g;g++)l[d][p]=l[d][p]||{};l[d][p].boundaryGap="bar"===i}}};f(KV,function(t){u(t,i)>=0&&f(t,function(t){o.setIconStatus(t,"normal")})}),o.setIconStatus(i,"emphasis"),t.eachComponent({mainType:"series",query:null==r?null:{seriesIndex:r}},h);var c;if("stack"===i){var d=l.series&&l.series[0]&&l.series[0].stack===YV;c=d?a({stack:UV.title.tiled},UV.title):n(UV.title)}e.dispatchAction({type:"changeMagicType",currentType:i,newOption:l,newTitle:c,featureName:"magicType"})}},Lu({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(t,e){e.mergeOption(t.newOption)}),ab("magicType",wb);var $V=FD.toolbox.dataView,JV=new Array(60).join("-"),QV=" ",tG=new RegExp("["+QV+"]+","g");kb.defaultOption={show:!0,readOnly:!1,optionToContent:null,contentToOption:null,icon:"M17.5,17.3H33 M17.5,17.3H33 M45.4,29.5h-28 M11.5,2v56H51V14.8L38.4,2H11.5z M38.4,2.2v12.7H51 M45.4,41.7h-28",title:n($V.title),lang:n($V.lang),backgroundColor:"#fff",textColor:"#000",textareaColor:"#fff",textareaBorderColor:"#333",buttonColor:"#c23531",buttonTextColor:"#fff"},kb.prototype.onclick=function(t,e){function i(){n.removeChild(o),x._dom=null}var n=e.getDom(),a=this.model;this._dom&&n.removeChild(this._dom);var o=document.createElement("div");o.style.cssText="position:absolute;left:5px;top:5px;bottom:5px;right:5px;",o.style.backgroundColor=a.get("backgroundColor")||"#fff";var r=document.createElement("h4"),s=a.get("lang")||[];r.innerHTML=s[0]||a.get("title"),r.style.cssText="margin: 10px 20px;",r.style.color=a.get("textColor");var l=document.createElement("div"),u=document.createElement("textarea");l.style.cssText="display:block;width:100%;overflow:auto;";var h=a.get("optionToContent"),c=a.get("contentToOption"),d=Ib(t);if("function"==typeof h){var f=h(e.getOption());"string"==typeof f?l.innerHTML=f:T(f)&&l.appendChild(f)}else l.appendChild(u),u.readOnly=a.get("readOnly"),u.style.cssText="width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;",u.style.color=a.get("textColor"),u.style.borderColor=a.get("textareaBorderColor"),u.style.backgroundColor=a.get("textareaColor"),u.value=d.value;var p=d.meta,g=document.createElement("div");g.style.cssText="position:absolute;bottom:0;left:0;right:0;";var m="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",v=document.createElement("div"),y=document.createElement("div");m+=";background-color:"+a.get("buttonColor"),m+=";color:"+a.get("buttonTextColor");var x=this;Se(v,"click",i),Se(y,"click",function(){var t;try{t="function"==typeof c?c(l,e.getOption()):Lb(u.value,p)}catch(n){throw i(),new Error("Data view format error "+n)}t&&e.dispatchAction({type:"changeDataView",newOption:t}),i()}),v.innerHTML=s[1],y.innerHTML=s[2],y.style.cssText=m,v.style.cssText=m,!a.get("readOnly")&&g.appendChild(y),g.appendChild(v),o.appendChild(r),o.appendChild(l),o.appendChild(g),l.style.height=n.clientHeight-80+"px",n.appendChild(o),this._dom=o},kb.prototype.remove=function(t,e){this._dom&&e.getDom().removeChild(this._dom)},kb.prototype.dispose=function(t,e){this.remove(t,e)},ab("dataView",kb),Lu({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},function(t,e){var i=[];f(t.newOption.series,function(t){var n=e.getSeriesByName(t.name)[0];if(n){var a=n.get("data");i.push({name:t.name,data:Pb(t.data,a)})}else i.push(r({type:"scatter"},t))}),e.mergeOption(s({series:i},t.newOption))});var eG=f,iG="\x00_ec_hist_store";AB.extend({type:"dataZoom.select"}),DB.extend({type:"dataZoom.select"});var nG=FD.toolbox.dataZoom,aG=f,oG="\x00_ec_\x00toolbox-dataZoom_";Bb.defaultOption={show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:n(nG.title),brushStyle:{borderWidth:0,color:"rgba(0,0,0,0.2)"}};var rG=Bb.prototype;rG.render=function(t,e,i,n){this.model=t,this.ecModel=e,this.api=i,Fb(t,e,this,n,i),Gb(t,e)},rG.onclick=function(t,e,i){sG[i].call(this)},rG.remove=function(){this._brushController.unmount()},rG.dispose=function(){this._brushController.dispose()};var sG={zoom:function(){var t=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:t})},back:function(){this._dispatchZoomAction(Nb(this.ecModel))}};rG._onBrush=function(t,e){function i(t,e,i){var r=e.getAxis(t),s=r.model,l=n(t,s,o),u=l.findRepresentativeAxisProxy(s).getMinMaxSpan();(null!=u.minValueSpan||null!=u.maxValueSpan)&&(i=Rz(0,i.slice(),r.scale.getExtent(),0,u.minValueSpan,u.maxValueSpan)),l&&(a[l.id]={dataZoomId:l.id,startValue:i[0],endValue:i[1]})}function n(t,e,i){var n;return i.eachComponent({mainType:"dataZoom",subType:"select"},function(i){var a=i.getAxisModel(t,e.componentIndex);a&&(n=i)}),n}if(e.isEnd&&t.length){var a={},o=this.ecModel;this._brushController.updateCovers([]);var r=new Fw(Vb(this.model.option),o,{include:["grid"]});r.matchOutputRanges(t,o,function(t,e,n){if("cartesian2d"===n.type){var a=t.brushType;"rect"===a?(i("x",n,e[0]),i("y",n,e[1])):i({lineX:"x",lineY:"y"}[a],n,e)}}),Ob(o,a),this._dispatchZoomAction(a)}},rG._dispatchZoomAction=function(t){var e=[];aG(t,function(t){e.push(n(t))}),e.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:e})},ab("dataZoom",Bb),Au(function(t){function e(t,e){if(e){var a=t+"Index",o=e[a];null==o||"all"===o||_(o)||(o=o===!1||"none"===o?[]:[o]),i(t,function(i,r){if(null==o||"all"===o||-1!==u(o,r)){var s={type:"select",$fromToolbox:!0,filterMode:e.filterMode||"filter",id:oG+t+r};s[a]=r,n.push(s)}})}}function i(e,i){var n=t[e];_(n)||(n=n?[n]:[]),aG(n,i)}if(t){var n=t.dataZoom||(t.dataZoom=[]);_(n)||(t.dataZoom=n=[n]);var a=t.toolbox;if(a&&(_(a)&&(a=a[0]),a&&a.feature)){var o=a.feature.dataZoom;e("xAxis",o),e("yAxis",o)}}});var lG=FD.toolbox.restore;Wb.defaultOption={show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:lG.title};var uG=Wb.prototype;uG.onclick=function(t,e){zb(t),e.dispatchAction({type:"restore",from:this.uid})},ab("restore",Wb),Lu({type:"restore",event:"restore",update:"prepareAndUpdate"},function(t,e){e.resetOption("recreate")});var hG={path:null,compoundPath:null,group:xM,image:Cn,text:NT};Au(function(t){var e=t.graphic;_(e)?t.graphic=e[0]&&e[0].elements?[t.graphic[0]]:[{elements:e}]:e&&!e.elements&&(t.graphic=[{elements:[e]}])});var cG=Eu({type:"graphic",defaultOption:{elements:[],parentId:null},_elOptionsToUpdate:null,mergeOption:function(){var t=this.option.elements;this.option.elements=null,cG.superApply(this,"mergeOption",arguments),this.option.elements=t},optionUpdated:function(t,e){var i=this.option,n=(e?i:t).elements,a=i.elements=e?[]:i.elements,o=[];this._flatten(n,o);var r=oa(a,o);ra(r);var s=this._elOptionsToUpdate=[];f(r,function(t,e){var i=t.option;i&&(s.push(i),Yb(t,i),jb(a,e,i),qb(a[e],i))},this);for(var l=a.length-1;l>=0;l--)null==a[l]?a.splice(l,1):delete a[l].$action},_flatten:function(t,e,i){f(t,function(t){if(t){i&&(t.parentOption=i),e.push(t);var n=t.children;"group"===t.type&&n&&this._flatten(n,e,t),delete t.children}},this)},useElOptionsToUpdate:function(){var t=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,t}});Bu({type:"graphic",init:function(){this._elMap=B(),this._lastGraphicModel},render:function(t,e,i){t!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=t,this._updateElements(t),this._relocate(t,i)},_updateElements:function(t){var e=t.useElOptionsToUpdate();if(e){var i=this._elMap,n=this.group;f(e,function(e){var a=e.$action,o=e.id,r=i.get(o),s=e.parentId,l=null!=s?i.get(s):n,u=e.style;"text"===e.type&&u&&(e.hv&&e.hv[1]&&(u.textVerticalAlign=u.textBaseline=null),!u.hasOwnProperty("textFill")&&u.fill&&(u.textFill=u.fill),!u.hasOwnProperty("textStroke")&&u.stroke&&(u.textStroke=u.stroke));var h=Xb(e);a&&"merge"!==a?"replace"===a?(Zb(r,i),Hb(o,l,h,i)):"remove"===a&&Zb(r,i):r?r.attr(h):Hb(o,l,h,i);var c=i.get(o);c&&(c.__ecGraphicWidthOption=e.width,c.__ecGraphicHeightOption=e.height,Kb(c,t,e))})}},_relocate:function(t,e){for(var i=t.option.elements,n=this.group,a=this._elMap,o=e.getWidth(),r=e.getHeight(),s=0;s=0;s--){var l=i[s],u=a.get(l.id);if(u){var h=u.parent,d=h===n?{width:o,height:r}:{width:h.__ecGraphicWidth,height:h.__ecGraphicHeight};is(u,l,d,null,{hv:l.hv,boundingMode:l.bounding})}}},_clear:function(){var t=this._elMap;t.each(function(e){Zb(e,t)}),this._elMap=B()},dispose:function(){this._clear()}});var dG,fG="urn:schemas-microsoft-com:vml",pG="undefined"==typeof window?null:window,gG=!1,mG=pG&&pG.document;if(mG&&!oS.canvasSupported)try{!mG.namespaces.zrvml&&mG.namespaces.add("zrvml",fG),dG=function(t){return mG.createElement("')}}catch(vG){dG=function(t){return mG.createElement("<"+t+' xmlns="'+fG+'" class="zrvml">')}}var yG=uT.CMD,xG=Math.round,_G=Math.sqrt,wG=Math.abs,bG=Math.cos,SG=Math.sin,MG=Math.max;if(!oS.canvasSupported){var IG=",",TG="progid:DXImageTransform.Microsoft",AG=21600,DG=AG/2,CG=1e5,LG=1e3,kG=function(t){t.style.cssText="position:absolute;left:0;top:0;width:1px;height:1px;",t.coordsize=AG+","+AG,t.coordorigin="0,0"},PG=function(t){return String(t).replace(/&/g,"&").replace(/"/g,""")},OG=function(t,e,i){return"rgb("+[t,e,i].join(",")+")"},NG=function(t,e){e&&t&&e.parentNode!==t&&t.appendChild(e)},zG=function(t,e){e&&t&&e.parentNode===t&&t.removeChild(e)},RG=function(t,e,i){return(parseFloat(t)||0)*CG+(parseFloat(e)||0)*LG+i},EG=In,BG=function(t,e,i){var n=ti(e);i=+i,isNaN(i)&&(i=1),n&&(t.color=OG(n[0],n[1],n[2]),t.opacity=i*n[3])},VG=function(t){var e=ti(t);return[OG(e[0],e[1],e[2]),e[3]]},GG=function(t,e,i){var n=e.fill;if(null!=n)if(n instanceof QT){var a,o=0,r=[0,0],s=0,l=1,u=i.getBoundingRect(),h=u.width,c=u.height;if("linear"===n.type){a="gradient";var d=i.transform,f=[n.x*h,n.y*c],p=[n.x2*h,n.y2*c];d&&(oe(f,f,d),oe(p,p,d));var g=p[0]-f[0],m=p[1]-f[1];o=180*Math.atan2(g,m)/Math.PI,0>o&&(o+=360),1e-6>o&&(o=0)}else{a="gradientradial";var f=[n.x*h,n.y*c],d=i.transform,v=i.scale,y=h,x=c;r=[(f[0]-u.x)/y,(f[1]-u.y)/x],d&&oe(f,f,d),y/=v[0]*AG,x/=v[1]*AG;var _=MG(y,x);s=0/_,l=2*n.r/_-s}var w=n.colorStops.slice();w.sort(function(t,e){return t.offset-e.offset});for(var b=w.length,S=[],M=[],I=0;b>I;I++){var T=w[I],A=VG(T.color);M.push(T.offset*l+s+" "+A[0]),(0===I||I===b-1)&&S.push(A)}if(b>=2){var D=S[0][0],C=S[1][0],L=S[0][1]*e.opacity,k=S[1][1]*e.opacity;t.type=a,t.method="none",t.focus="100%",t.angle=o,t.color=D,t.color2=C,t.colors=M.join(","),t.opacity=k,t.opacity2=L}"radial"===a&&(t.focusposition=r.join(","))}else BG(t,n,e.opacity)},FG=function(t,e){e.lineDash&&(t.dashstyle=e.lineDash.join(" ")),null==e.stroke||e.stroke instanceof QT||BG(t,e.stroke,e.opacity)},WG=function(t,e,i,n){var a="fill"===e,o=t.getElementsByTagName(e)[0];null!=i[e]&&"none"!==i[e]&&(a||!a&&i.lineWidth)?(t[a?"filled":"stroked"]="true",i[e]instanceof QT&&zG(t,o),o||(o=$b(e)),a?GG(o,i,n):FG(o,i),NG(t,o)):(t[a?"filled":"stroked"]="false",zG(t,o))},HG=[[],[],[]],ZG=function(t,e){var i,n,a,o,r,s,l=yG.M,u=yG.C,h=yG.L,c=yG.A,d=yG.Q,f=[],p=t.data,g=t.len();for(o=0;g>o;){switch(a=p[o++],n="",i=0,a){case l:n=" m ",i=1,r=p[o++],s=p[o++],HG[0][0]=r,HG[0][1]=s;break;case h:n=" l ",i=1,r=p[o++],s=p[o++],HG[0][0]=r,HG[0][1]=s;break;case d:case u:n=" c ",i=3;var m,v,y=p[o++],x=p[o++],_=p[o++],w=p[o++];a===d?(m=_,v=w,_=(_+2*y)/3,w=(w+2*x)/3,y=(r+2*y)/3,x=(s+2*x)/3):(m=p[o++],v=p[o++]),HG[0][0]=y,HG[0][1]=x,HG[1][0]=_,HG[1][1]=w,HG[2][0]=m,HG[2][1]=v,r=m,s=v;break;case c:var b=0,S=0,M=1,I=1,T=0;e&&(b=e[4],S=e[5],M=_G(e[0]*e[0]+e[1]*e[1]),I=_G(e[2]*e[2]+e[3]*e[3]),T=Math.atan2(-e[1]/I,e[0]/M));var A=p[o++],D=p[o++],C=p[o++],L=p[o++],k=p[o++]+T,P=p[o++]+k+T;o++;var O=p[o++],N=A+bG(k)*C,z=D+SG(k)*L,y=A+bG(P)*C,x=D+SG(P)*L,R=O?" wa ":" at ";Math.abs(N-y)<1e-4&&(Math.abs(P-k)>.01?O&&(N+=270/AG):Math.abs(z-D)<1e-4?O&&A>N||!O&&N>A?x-=270/AG:x+=270/AG:O&&D>z||!O&&z>D?y+=270/AG:y-=270/AG),f.push(R,xG(((A-C)*M+b)*AG-DG),IG,xG(((D-L)*I+S)*AG-DG),IG,xG(((A+C)*M+b)*AG-DG),IG,xG(((D+L)*I+S)*AG-DG),IG,xG((N*M+b)*AG-DG),IG,xG((z*I+S)*AG-DG),IG,xG((y*M+b)*AG-DG),IG,xG((x*I+S)*AG-DG)),r=y,s=x;break;case yG.R:var E=HG[0],B=HG[1];E[0]=p[o++],E[1]=p[o++],B[0]=E[0]+p[o++],B[1]=E[1]+p[o++],e&&(oe(E,E,e),oe(B,B,e)),E[0]=xG(E[0]*AG-DG),B[0]=xG(B[0]*AG-DG),E[1]=xG(E[1]*AG-DG),B[1]=xG(B[1]*AG-DG),f.push(" m ",E[0],IG,E[1]," l ",B[0],IG,E[1]," l ",B[0],IG,B[1]," l ",E[0],IG,B[1]);break;case yG.Z:f.push(" x ")}if(i>0){f.push(n);for(var V=0;i>V;V++){var G=HG[V];e&&oe(G,G,e),f.push(xG(G[0]*AG-DG),IG,xG(G[1]*AG-DG),i-1>V?IG:"")}}}return f.join("")};ao.prototype.brushVML=function(t){var e=this.style,i=this._vmlEl;i||(i=$b("shape"),kG(i),this._vmlEl=i),WG(i,"fill",e,this),WG(i,"stroke",e,this);var n=this.transform,a=null!=n,o=i.getElementsByTagName("stroke")[0];if(o){var r=e.lineWidth;if(a&&!e.strokeNoScale){var s=n[0]*n[3]-n[1]*n[2];r*=_G(wG(s))}o.weight=r+"px"}var l=this.path||(this.path=new uT);this.__dirtyPath&&(l.beginPath(),l.subPixelOptimize=!1,this.buildPath(l,this.shape),l.toStatic(),this.__dirtyPath=!1),i.path=ZG(l,this.transform),i.style.zIndex=RG(this.zlevel,this.z,this.z2),NG(t,i),null!=e.text?this.drawRectText(t,this.getBoundingRect()):this.removeRectText(t)},ao.prototype.onRemove=function(t){zG(t,this._vmlEl),this.removeRectText(t)},ao.prototype.onAdd=function(t){NG(t,this._vmlEl),this.appendRectText(t)};var XG=function(t){return"object"==typeof t&&t.tagName&&"IMG"===t.tagName.toUpperCase()};Cn.prototype.brushVML=function(t){var e,i,n=this.style,a=n.image;if(XG(a)){var o=a.src;if(o===this._imageSrc)e=this._imageWidth,i=this._imageHeight;else{var r=a.runtimeStyle,s=r.width,l=r.height;r.width="auto",r.height="auto",e=a.width,i=a.height,r.width=s,r.height=l,this._imageSrc=o,this._imageWidth=e,this._imageHeight=i}a=o}else a===this._imageSrc&&(e=this._imageWidth,i=this._imageHeight);if(a){var u=n.x||0,h=n.y||0,c=n.width,d=n.height,f=n.sWidth,p=n.sHeight,g=n.sx||0,m=n.sy||0,v=f&&p,y=this._vmlEl;y||(y=mG.createElement("div"),kG(y),this._vmlEl=y);var x,_=y.style,w=!1,b=1,S=1;if(this.transform&&(x=this.transform,b=_G(x[0]*x[0]+x[1]*x[1]),S=_G(x[2]*x[2]+x[3]*x[3]),w=x[1]||x[2]),w){var M=[u,h],I=[u+c,h],T=[u,h+d],A=[u+c,h+d];oe(M,M,x),oe(I,I,x),oe(T,T,x),oe(A,A,x);var D=MG(M[0],I[0],T[0],A[0]),C=MG(M[1],I[1],T[1],A[1]),L=[];L.push("M11=",x[0]/b,IG,"M12=",x[2]/S,IG,"M21=",x[1]/b,IG,"M22=",x[3]/S,IG,"Dx=",xG(u*b+x[4]),IG,"Dy=",xG(h*S+x[5])),_.padding="0 "+xG(D)+"px "+xG(C)+"px 0",_.filter=TG+".Matrix("+L.join("")+", SizingMethod=clip)"}else x&&(u=u*b+x[4],h=h*S+x[5]),_.filter="",_.left=xG(u)+"px",_.top=xG(h)+"px";var k=this._imageEl,P=this._cropEl;k||(k=mG.createElement("div"),this._imageEl=k);var O=k.style;if(v){if(e&&i)O.width=xG(b*e*c/f)+"px",O.height=xG(S*i*d/p)+"px";else{var N=new Image,z=this;N.onload=function(){N.onload=null,e=N.width,i=N.height,O.width=xG(b*e*c/f)+"px",O.height=xG(S*i*d/p)+"px",z._imageWidth=e,z._imageHeight=i,z._imageSrc=a},N.src=a}P||(P=mG.createElement("div"),P.style.overflow="hidden",this._cropEl=P);var R=P.style;R.width=xG((c+g*c/f)*b),R.height=xG((d+m*d/p)*S),R.filter=TG+".Matrix(Dx="+-g*c/f*b+",Dy="+-m*d/p*S+")",P.parentNode||y.appendChild(P),k.parentNode!==P&&P.appendChild(k)}else O.width=xG(b*c)+"px",O.height=xG(S*d)+"px",y.appendChild(k),P&&P.parentNode&&(y.removeChild(P),this._cropEl=null);var E="",B=n.opacity;1>B&&(E+=".Alpha(opacity="+xG(100*B)+") "),E+=TG+".AlphaImageLoader(src="+a+", SizingMethod=scale)",O.filter=E,y.style.zIndex=RG(this.zlevel,this.z,this.z2),NG(t,y),null!=n.text&&this.drawRectText(t,this.getBoundingRect())}},Cn.prototype.onRemove=function(t){zG(t,this._vmlEl),this._vmlEl=null,this._cropEl=null,this._imageEl=null,this.removeRectText(t)},Cn.prototype.onAdd=function(t){NG(t,this._vmlEl),this.appendRectText(t)};var UG,YG="normal",jG={},qG=0,KG=100,$G=document.createElement("div"),JG=function(t){var e=jG[t];if(!e){qG>KG&&(qG=0,jG={});var i,n=$G.style;try{n.font=t,i=n.fontFamily.split(",")[0]}catch(a){}e={style:n.fontStyle||YG,variant:n.fontVariant||YG,weight:n.fontWeight||YG,size:0|parseFloat(n.fontSize||12),family:i||"Microsoft YaHei"},jG[t]=e,qG++}return e};Zi("measureText",function(t,e){var i=mG;UG||(UG=i.createElement("div"),UG.style.cssText="position:absolute;top:-20000px;left:0;padding:0;margin:0;border:none;white-space:pre;",mG.body.appendChild(UG));try{UG.style.font=e}catch(n){}return UG.innerHTML="",UG.appendChild(i.createTextNode(t)),{width:UG.offsetWidth}});for(var QG=new Ti,tF=function(t,e,i,n){var a=this.style;this.__dirty&&hn(a,!0);var o=a.text;if(null!=o&&(o+=""),o){if(a.rich){var r=rn(o,a);o=[];for(var s=0;s