-
Notifications
You must be signed in to change notification settings - Fork 0
/
echarts.min.js
24 lines (24 loc) · 736 KB
/
echarts.min.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
!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&&(iS=null),tS[t]=e}function n(t){if(null==t||"object"!=typeof t)return t;var e=t,i=Yb.call(t);if("[object Array]"===i){if(!z(t)){e=[];for(var a=0,o=t.length;o>a;a++)e[a]=n(t[a])}}else if(Ub[i]){if(!z(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(!Xb[i]&&!z(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)||z(s)||z(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 iS||(iS=eS().getContext("2d")),iS}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===qb)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===Jb)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===Qb)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===Kb)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=$b.call(arguments,2);return function(){return t.apply(e,i.concat($b.call(arguments)))}}function x(t){var e=$b.call(arguments,1);return function(){return t.apply(this,e.concat($b.call(arguments)))}}function _(t){return"[object Array]"===Yb.call(t)}function w(t){return"function"==typeof t}function b(t){return"[object String]"===Yb.call(t)}function S(t){var e=typeof t;return"function"===e||!!t&&"object"===e}function M(t){return!!Xb[Yb.call(t)]}function I(t){return!!Ub[Yb.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($b,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 E(t){t[nS]=!0}function z(t){return t[nS]}function R(t){function e(t,e){i?n.set(t,e):n.set(e,t)}var i=_(t);this.data={};var n=this;t instanceof R?t.each(e):t&&f(t,e)}function B(t){return new R(t)}function V(t,e){for(var i=new t.constructor(t.length+e.length),n=0;n<t.length;n++)i[n]=t[n];var a=t.length;for(n=0;n<e.length;n++)i[n+a]=e[n];return i}function G(){}function F(t,e){var i=new oS(2);return null==t&&(t=0),null==e&&(e=0),i[0]=t,i[1]=e,i}function W(t,e){return t[0]=e[0],t[1]=e[1],t}function H(t){var e=new oS(2);return e[0]=t[0],e[1]=t[1],e}function Z(t,e,i){return t[0]=e,t[1]=i,t}function X(t,e,i){return t[0]=e[0]+i[0],t[1]=e[1]+i[1],t}function U(t,e,i,n){return t[0]=e[0]+i[0]*n,t[1]=e[1]+i[1]*n,t}function Y(t,e,i){return t[0]=e[0]-i[0],t[1]=e[1]-i[1],t}function j(t){return Math.sqrt(q(t))}function q(t){return t[0]*t[0]+t[1]*t[1]}function K(t,e,i){return t[0]=e[0]*i[0],t[1]=e[1]*i[1],t}function $(t,e,i){return t[0]=e[0]/i[0],t[1]=e[1]/i[1],t}function J(t,e){return t[0]*e[0]+t[1]*e[1]}function Q(t,e,i){return t[0]=e[0]*i,t[1]=e[1]*i,t}function te(t,e){var i=j(e);return 0===i?(t[0]=0,t[1]=0):(t[0]=e[0]/i,t[1]=e[1]/i),t}function ee(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}function ie(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])}function ne(t,e){return t[0]=-e[0],t[1]=-e[1],t}function ae(t,e,i,n){return t[0]=e[0]+n*(i[0]-e[0]),t[1]=e[1]+n*(i[1]-e[1]),t}function oe(t,e,i){var n=e[0],a=e[1];return t[0]=i[0]*n+i[2]*a+i[4],t[1]=i[1]*n+i[3]*a+i[5],t}function re(t,e,i){return t[0]=Math.min(e[0],i[0]),t[1]=Math.min(e[1],i[1]),t}function se(t,e,i){return t[0]=Math.max(e[0],i[0]),t[1]=Math.max(e[1],i[1]),t}function le(){this.on("mousedown",this._dragStart,this),this.on("mousemove",this._drag,this),this.on("mouseup",this._dragEnd,this)}function ue(t,e){return{target:t,topTarget:e&&e.topTarget}}function he(t,e){var i=t._$eventProcessor;return null!=e&&i&&i.normalizeQuery&&(e=i.normalizeQuery(e)),e}function ce(t,e,i,n,a,o){var r=t._$handlers;if("function"==typeof i&&(a=n,n=i,i=null),!n||!e)return t;i=he(t,i),r[e]||(r[e]=[]);for(var s=0;s<r[e].length;s++)if(r[e][s].h===n)return t;var l={h:n,one:o,query:i,ctx:a||t,callAtLast:n.zrEventfulCallAtLast},u=r[e].length-1,h=r[e][u];return h&&h.callAtLast?r[e].splice(u,0,l):r[e].push(l),t}function de(t,e,i,n,a,o){var r=n+"-"+a,s=t.length;if(o.hasOwnProperty(r))return o[r];if(1===e){var l=Math.round(Math.log((1<<s)-1&~a)/fS);return t[i][l]}for(var u=n|1<<i,h=i+1;n&1<<h;)h++;for(var c=0,d=0,f=0;s>d;d++){var p=1<<d;p&a||(c+=(f%2?-1:1)*t[i][d]*de(t,e-1,h,u,a|p,o),f++)}return o[r]=c,c}function fe(t,e){var i=[[t[0],t[1],1,0,0,0,-e[0]*t[0],-e[0]*t[1]],[0,0,0,t[0],t[1],1,-e[1]*t[0],-e[1]*t[1]],[t[2],t[3],1,0,0,0,-e[2]*t[2],-e[2]*t[3]],[0,0,0,t[2],t[3],1,-e[3]*t[2],-e[3]*t[3]],[t[4],t[5],1,0,0,0,-e[4]*t[4],-e[4]*t[5]],[0,0,0,t[4],t[5],1,-e[5]*t[4],-e[5]*t[5]],[t[6],t[7],1,0,0,0,-e[6]*t[6],-e[6]*t[7]],[0,0,0,t[6],t[7],1,-e[7]*t[6],-e[7]*t[7]]],n={},a=de(i,8,0,0,0,n);if(0!==a){for(var o=[],r=0;8>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<<r,1<<s,n)/a*e[r];return function(t,e,i){var n=e*o[6]+i*o[7]+1;t[0]=(e*o[0]+i*o[1]+o[2])/n,t[1]=(e*o[3]+i*o[4]+o[5])/n}}}function pe(t,e,i,n,a){return ge(gS,e,n,a,!0)&&ge(t,i,gS[0],gS[1])}function ge(t,e,i,n,a){if(e.getBoundingClientRect&&Zb.domSupported&&!ye(e)){var o=e[pS]||(e[pS]={}),r=me(e,o),s=ve(r,o,a);if(s)return s(t,i,n),!0}return!1}function me(t,e){var i=e.markers;if(i)return i;i=e.markers=[];for(var n=["left","right"],a=["top","bottom"],o=0;4>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||!Zb.canvasSupported?_e(t,e,i):Zb.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(Zb.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(yS,t,n,a))return i.zrX=yS[0],void(i.zrY=yS[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&&vS.test(e.type)&&(e.which=1&r?1:2&r?3:4&r?2:0),e}function Se(t,e,i,n){mS?t.addEventListener(e,i,n):t.attachEvent("on"+e,i)}function Me(t,e,i,n){mS?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(){xS(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?bS:!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 IS(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 Ee(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 ze(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 Re(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 Ee(e,t),e}function We(t){return t>DS||-DS>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){WS&&Je(WS,e),WS=FS.put(t,WS||e.slice())}function ti(t,e){if(t){e=e||[];var i=FS.get(t);if(i)return Je(e,i);t+="";var n=t.replace(/ /g,"").toLowerCase();if(n in GS)return Je(e,GS[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]:US.call(e[r]))}for(var s=t[0]&&t[0].length,r=0;r<t.length;r++)if(1===i)isNaN(t[r])&&(t[r]=e[r]);else for(var l=0;s>l;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(US.call(t[n]));return i}return US.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)}},E=new He({target:t._target,life:h,loop:t._loop,delay:t._delay,onframe:N,ondestroy:i});return e&&"spline"!==e&&(E.easing=e),E}}}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;c<u.length;c++)u[c].done(l).start(a,r)}function Mi(t,e,i,n,a,o,r){var s={},l=0;for(var u in n)n.hasOwnProperty(u)&&(null!=i[u]?S(n[u])&&!d(n[u])?Mi(t,e?e+"."+u:u,i[u],n[u],a,o,r):(r?(s[u]=i[u],Ii(t,e,u,n[u])):s[u]=n[u],l++):null==n[u]||r||Ii(t,e,u,n[u]));l>0&&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>=oM;)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]&&t--;else if(u[t]>u[t+1])break;o(t)}}function a(){for(;c>1;){var t=c-2;t>0&&u[t-1]<u[t+1]&&t--,o(t)}}function o(i){var n=l[i],a=u[i],o=l[i+1],h=u[i+1];u[i]=a+h,i===c-3&&(l[i+1]=l[i+2],u[i+1]=u[i+2]),c--;var d=Pi(t[o],t,n,a,0,e);n+=d,a-=d,0!==a&&(h=ki(t[n+a-1],t,o,h,h-1,e),0!==h&&(h>=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>=rM||f>=rM);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>=rM||m>=rM);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=rM,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(oM>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 Ei(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}function zi(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 Ri(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=eS(),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=_M.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=_M.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,_M.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;e<t.pending.length;e++){var i=t.pending[e],n=i.cb;n&&n(this,i.cbPayload),i.hostEl.dirty()}t.pending.length=0}function Hi(t){return t&&t.width&&t.height}function Zi(t,e){e=e||IM;var i=t+":"+e;if(wM[i])return wM[i];for(var n=(t+"").split("\n"),a=0,o=0,r=n.length;r>o;o++)a=Math.max(nn(n[o],e).width,a);return bM>SM&&(bM=0,wM={}),bM++,wM[i]=a,a}function Xi(t,e,i,n,a,o,r,s){return r?Yi(t,e,i,n,a,o,r,s):Ui(t,e,i,n,a,o,s)}function Ui(t,e,i,n,a,o,r){var s=an(t,e,a,o,r),l=Zi(t,e);a&&(l+=a[1]+a[3]);var u=s.outerHeight,h=ji(0,l,i),c=qi(0,u,n),d=new Ti(h,c,l,u);return d.lineHeight=s.lineHeight,d}function Yi(t,e,i,n,a,o,r,s){var l=on(t,{rich:r,truncate:s,font:e,textAlign:i,textPadding:a,textLineHeight:o}),u=l.outerWidth,h=l.outerHeight,c=ji(0,u,i),d=qi(0,h,n);return new Ti(c,d,u,h)}function ji(t,e,i){return"right"===i?t-=e:"center"===i&&(t-=e/2),t}function qi(t,e,i){return"middle"===i?t-=e/2:"bottom"===i&&(t-=e),t}function Ki(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 $i(t,e,i,n,a){if(!e)return"";var o=(t+"").split("\n");a=Ji(e,i,n,a);for(var r=0,s=o.length;s>r;r++)o[r]=Qi(o[r],a);return o.join("\n")}function Ji(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=Zi("国",e);var o=n.ascCharWidth=Zi("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=Zi(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 Qi(t,e){var i=e.containerWidth,n=e.font,a=e.contentWidth;if(!i)return"";var o=Zi(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?tn(t,a,e.ascCharWidth,e.cnCharWidth):o>0?Math.floor(t.length*a/o):0;t=t.substr(0,s),o=Zi(t,n)}return""===t&&(t=e.placeholder),t}function tn(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 en(t){return Zi("国",t)}function nn(t,e){return TM.measureText(t,e)}function an(t,e,i,n,a){null!=t&&(t+="");var o=C(n,en(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=Ji(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]=Qi(r[f],d)}return{lines:r,height:s,outerHeight:l,lineHeight:o,canCacheByTextString:u}}function on(t,e){var i={lines:[],width:0,height:0};if(null!=t&&(t+=""),!t)return i;for(var n,a=MM.lastIndex=0;null!=(n=MM.exec(t));){var o=n.index;o>a&&rn(i,t.substring(a,o)),rn(i,n[2],n[1]),a=MM.lastIndex}a<t.length&&rn(i,t.substring(a,t.length));var r=i.lines,s=0,l=0,u=[],h=e.textPadding,c=e.truncate,d=c&&c.outerWidth,f=c&&c.outerHeight;h&&(null!=d&&(d-=h[1]+h[3]),null!=f&&(f-=h[0]+h[2]));for(var p=0;p<r.length;p++){for(var g=r[p],m=0,v=0,y=0;y<g.tokens.length;y++){var x=g.tokens[y],_=x.styleName&&e.rich[x.styleName]||{},w=x.textPadding=_.textPadding,b=x.font=_.font||e.font,S=x.textHeight=C(_.textHeight,en(b));if(w&&(S+=w[0]+w[2]),x.height=S,x.lineHeight=L(_.textLineHeight,e.textLineHeight,S),x.textAlign=_&&_.textAlign||e.textAlign,x.textVerticalAlign=_&&_.textVerticalAlign||"middle",null!=f&&s+x.lineHeight>f)return{lines:[],width:0,height:0};x.textWidth=Zi(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=$i(x.text,k-D,b,c.ellipsis,{minChar:c.minChar}),x.textWidth=Zi(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;p<u.length;p++){var x=u[p],P=x.percentWidth;x.width=parseInt(P,10)/100*l}return i}function rn(t,e,i){for(var n=""===e,a=e.split("\n"),o=t.lines,r=0;r<a.length;r++){var s=a[r],l={styleName:i,text:s,isLineHolder:!s&&!n};if(r)o.push({tokens:[l]});else{var u=(o[o.length-1]||(o[0]={tokens:[]})).tokens,h=u.length;1===h&&u[0].isLineHolder?u[0]=l:(s||!h||n)&&u.push(l)}}}function sn(t){var e=(t.fontSize||t.fontFamily)&&[t.fontStyle,t.fontWeight,(t.fontSize||12)+"px",t.fontFamily||"sans-serif"].join(" ");return e&&N(e)||t.textFont||t.font}function ln(t,e){var i,n,a,o,r=e.x,s=e.y,l=e.width,u=e.height,h=e.r;0>l&&(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 un(t){return hn(t),f(t.rich,hn),t}function hn(t){if(t){t.font=sn(t);var e=t.textAlign;"middle"===e&&(e="center"),t.textAlign=null==e||DM[e]?e:"left";var i=t.textVerticalAlign||t.textBaseline;"center"===i&&(i="middle"),t.textVerticalAlign=null==i||CM[i]?i:"top";var n=t.textPadding;n&&(t.textPadding=P(t.textPadding))}}function cn(t,e,i,n,a,o){n.rich?fn(t,e,i,n,a,o):dn(t,e,i,n,a,o)}function dn(t,e,i,n,a,o){var r,s=vn(n),l=!1,u=e.__attrCachedBy===hM.PLAIN_TEXT;o!==cM?(o&&(r=o.style,l=!s&&u&&r),e.__attrCachedBy=s?hM.NONE:hM.PLAIN_TEXT):u&&(e.__attrCachedBy=hM.NONE);var h=n.font||AM;l&&h===(r.font||AM)||(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=an(i,c,d,f,n.truncate));var g=p.outerHeight,m=p.lines,v=p.lineHeight,y=_n(PM,t,n,a),x=y.baseX,_=y.baseY,w=y.textAlign||"left",b=y.textVerticalAlign;gn(e,n,a,x,_);var S=qi(_,g,b),M=x,I=S;if(s||d){var T=Zi(i,c),A=T;d&&(A+=d[1]+d[3]);var D=ji(x,A,w);s&&yn(t,e,n,D,S,A,g),d&&(M=In(x,w,d),I+=d[0])}e.textAlign=w,e.textBaseline="middle",e.globalAlpha=n.opacity||1;for(var C=0;C<LM.length;C++){var L=LM[C],k=L[0],P=L[1],O=n[k];l&&O===r[k]||(e[P]=uM(e,P,O||L[2]))}I+=v/2;var N=n.textStrokeWidth,E=l?r.textStrokeWidth:null,z=!l||N!==E,R=!l||z||n.textStroke!==r.textStroke,B=bn(n.textStroke,N),V=Sn(n.textFill);if(B&&(z&&(e.lineWidth=N),R&&(e.strokeStyle=B)),V&&(l&&n.textFill===r.textFill||(e.fillStyle=V)),1===m.length)B&&e.strokeText(m[0],M,I),V&&e.fillText(m[0],M,I);else for(var C=0;C<m.length;C++)B&&e.strokeText(m[C],M,I),V&&e.fillText(m[C],M,I),I+=v}function fn(t,e,i,n,a,o){o!==cM&&(e.__attrCachedBy=hM.NONE);var r=t.__textCotentBlock;(!r||t.__dirtyText)&&(r=t.__textCotentBlock=on(i,n)),pn(t,e,r,n,a)}function pn(t,e,i,n,a){var o=i.width,r=i.outerWidth,s=i.outerHeight,l=n.textPadding,u=_n(PM,t,n,a),h=u.baseX,c=u.baseY,d=u.textAlign,f=u.textVerticalAlign;gn(e,n,a,h,c);var p=ji(h,r,d),g=qi(c,s,f),m=p,v=g;l&&(m+=l[3],v+=l[0]);var y=m+o;vn(n)&&yn(t,e,n,p,g,r,s);for(var x=0;x<i.lines.length;x++){for(var _,w=i.lines[x],b=w.tokens,S=b.length,M=w.lineHeight,I=w.width,T=0,A=m,D=y,C=S-1;S>T&&(_=b[T],!_.textAlign||"left"===_.textAlign);)mn(t,e,_,n,M,v,A,"left"),I-=_.width,A+=_.width,T++;for(;C>=0&&(_=b[C],"right"===_.textAlign);)mn(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],mn(t,e,_,n,M,v,A+_.width/2,"center"),A+=_.width,T++;v+=M}}function gn(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 mn(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&&vn(l)&&yn(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=In(r,s,c),h-=i.height/2-c[2]-i.textHeight/2),wn(e,"shadowBlur",L(l.textShadowBlur,n.textShadowBlur,0)),wn(e,"shadowColor",l.textShadowColor||n.textShadowColor||"transparent"),wn(e,"shadowOffsetX",L(l.textShadowOffsetX,n.textShadowOffsetX,0)),wn(e,"shadowOffsetY",L(l.textShadowOffsetY,n.textShadowOffsetY,0)),wn(e,"textAlign",s),wn(e,"textBaseline","middle"),wn(e,"font",i.font||AM);var d=bn(l.textStroke||n.textStroke,p),f=Sn(l.textFill||n.textFill),p=C(l.textStrokeWidth,n.textStrokeWidth);d&&(wn(e,"lineWidth",p),wn(e,"strokeStyle",d),e.strokeText(i.text,r,h)),f&&(wn(e,"fillStyle",f),e.fillText(i.text,r,h))}function vn(t){return!!(t.textBackgroundColor||t.textBorderWidth&&t.textBorderColor)}function yn(t,e,i,n,a,o,r){var s=i.textBackgroundColor,l=i.textBorderWidth,u=i.textBorderColor,h=b(s);if(wn(e,"shadowBlur",i.textBoxShadowBlur||0),wn(e,"shadowColor",i.textBoxShadowColor||"transparent"),wn(e,"shadowOffsetX",i.textBoxShadowOffsetX||0),wn(e,"shadowOffsetY",i.textBoxShadowOffsetY||0),h||l&&u){e.beginPath();var c=i.textBorderRadius;c?ln(e,{x:n,y:a,width:o,height:r,r:c}):e.rect(n,a,o,r),e.closePath()}if(h)if(wn(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,xn,s),f&&Hi(f)&&e.drawImage(f,n,a,o,r)}if(l&&u)if(wn(e,"lineWidth",l),wn(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 xn(t,e){e.image=t}function _n(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+Mn(l[0],n.width),o=n.y+Mn(l[1],n.height);else{var u=e&&e.calculateTextPosition?e.calculateTextPosition(kM,i,n):Ki(kM,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 wn(t,e,i){return t[e]=uM(t,e,i),t[e]}function bn(t,e){return null==t||0>=e||"transparent"===t||"none"===t?null:t.image||t.colorStops?"#000":t}function Sn(t){return null==t||"none"===t?null:t.image||t.colorStops?"#000":t}function Mn(t,e){return"string"==typeof t?t.lastIndexOf("%")>=0?parseFloat(t)/100*e:parseFloat(t):t}function In(t,e,i){return"right"===e?t-i[1]:"center"===e?t+i[3]/2-i[1]/2:t+i[3]}function Tn(t,e){return null!=t&&(t||e.textBackgroundColor||e.textBorderWidth&&e.textBorderColor||e.textPadding)}function An(t){t=t||{},tM.call(this,t);for(var e in t)t.hasOwnProperty(e)&&"style"!==e&&(this[e]=t[e]);this.style=new fM(t.style,this),this._rect=null,this.__clipPaths=null}function Dn(t){An.call(this,t)}function Cn(t){return parseInt(t,10)}function Ln(t){return t?t.__builtin__?!0:"function"!=typeof t.resize||"function"!=typeof t.refresh?!1:!0:!1}function kn(t,e,i){return VM.copy(t.getBoundingRect()),t.transform&&VM.applyTransform(t.transform),GM.width=e,GM.height=i,!VM.intersect(GM)}function Pn(t,e){if(t===e)return!1;if(!t||!e||t.length!==e.length)return!0;for(var i=0;i<t.length;i++)if(t[i]!==e[i])return!0;return!1}function On(t,e){for(var i=0;i<t.length;i++){var n=t[i];n.setTransform(e),e.beginPath(),n.buildPath(e,n.shape),e.clip(),n.restoreTransform(e)}}function Nn(t,e){var i=document.createElement("div");return i.style.cssText=["position:relative","width:"+t+"px","height:"+e+"px","padding:0","margin:0","border-width:0"].join(";")+";",i}function En(t){return"mousewheel"===t&&Zb.browser.firefox?"DOMMouseScroll":t}function zn(t){var e=t.pointerType;return"pen"===e||"touch"===e}function Rn(t){t.touching=!0,null!=t.touchTimer&&(clearTimeout(t.touchTimer),t.touchTimer=null),t.touchTimer=setTimeout(function(){t.touching=!1,t.touchTimer=null},700)}function Bn(t){t&&(t.zrByTouch=!0)}function Vn(t,e){return be(t.dom,new Fn(t,e),!0)}function Gn(t,e){for(var i=e,n=!1;i&&9!==i.nodeType&&!(n=i.domBelongToZr||i!==e&&i===t.painterRoot);)i=i.parentNode;return n}function Fn(t,e){this.type=e.type,this.target=this.currentTarget=t.dom,this.pointerType=e.pointerType,this.clientX=e.clientX,this.clientY=e.clientY}function Wn(t,e){var i=e.domHandlers;Zb.pointerEventsSupported?f(XM.pointer,function(n){Zn(e,n,function(e){i[n].call(t,e)})}):(Zb.touchEventsSupported&&f(XM.touch,function(n){Zn(e,n,function(a){i[n].call(t,a),Rn(e)})}),f(XM.mouse,function(n){Zn(e,n,function(a){a=we(a),e.touching||i[n].call(t,a)})}))}function Hn(t,e){function i(i){function n(n){n=we(n),Gn(t,n.target)||(n=Vn(t,n),e.domHandlers[i].call(t,n))}Zn(e,i,n,{capture:!0})}Zb.pointerEventsSupported?f(UM.pointer,i):Zb.touchEventsSupported||f(UM.mouse,i)}function Zn(t,e,i,n){t.mounted[e]=i,t.listenerOpts[e]=n,Se(t.domTarget,En(e),i,n)}function Xn(t){var e=t.mounted;for(var i in e)e.hasOwnProperty(i)&&Me(t.domTarget,En(i),e[i],t.listenerOpts[i]);t.mounted={}}function Un(t,e){if(t._mayPointerCapture=null,ZM&&t._pointerCapturing^e){t._pointerCapturing=e;var i=t._globalHandlerScope;e?Hn(t,i):Xn(i)}}function Yn(t,e){this.domTarget=t,this.domHandlers=e,this.mounted={},this.listenerOpts={},this.touchTimer=null,this.touching=!1}function jn(t,e){dS.call(this),this.dom=t,this.painterRoot=e,this._localHandlerScope=new Yn(t,jM),ZM&&(this._globalHandlerScope=new Yn(document,qM)),this._pointerCapturing=!1,this._mayPointerCapture=null,Wn(this,this._localHandlerScope)}function qn(t,e){var i=new eI(Wb(),t,e);return QM[i.id]=i,i}function Kn(t){if(t)t.dispose();else{for(var e in QM)QM.hasOwnProperty(e)&&QM[e].dispose();QM={}}return this}function $n(t){return QM[t]}function Jn(t,e){JM[t]=e}function Qn(t){delete QM[t]}function ta(t){return t instanceof Array?t:null==t?[]:[t]}function ea(t,e,i){if(t){t[e]=t[e]||{},t.emphasis=t.emphasis||{},t.emphasis[e]=t.emphasis[e]||{};for(var n=0,a=i.length;a>n;n++){var o=i[n];!t.emphasis[e].hasOwnProperty(o)&&t[e].hasOwnProperty(o)&&(t.emphasis[e][o]=t[e][o])}}}function ia(t){return!aI(t)||oI(t)||t instanceof Date?t:t.value}function na(t){return aI(t)&&!(t instanceof Array)}function aa(t,e){e=(e||[]).slice();var i=p(t||[],function(t){return{exist:t}});return nI(e,function(t,n){if(aI(t)){for(var a=0;a<i.length;a++)if(!i[a].option&&null!=t.id&&i[a].exist.id===t.id+"")return i[a].option=t,void(e[n]=null);for(var a=0;a<i.length;a++){var o=i[a].exist;if(!(i[a].option||null!=o.id&&null!=t.id||null==t.name||sa(t)||sa(o)||o.name!==t.name+""))return i[a].option=t,void(e[n]=null)}}}),nI(e,function(t){if(aI(t)){for(var e=0;e<i.length;e++){var n=i[e].exist;if(!i[e].option&&!sa(n)&&null==t.id){i[e].option=t;break}}e>=i.length&&i.push({option:t})}}),i}function oa(t){var e=B();nI(t,function(t){var i=t.exist;i&&e.set(i.id,t)}),nI(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={})}),nI(t,function(t,i){var n=t.exist,a=t.option,o=t.keyInfo;if(aI(a)){if(o.name=null!=a.name?a.name+"":n?n.name:rI+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 ra(t){var e=t.name;return!(!e||!e.indexOf(rI))}function sa(t){return aI(t)&&t.id&&0===(t.id+"").indexOf("\x00_ec_\x00")}function la(t,e){function i(t,e,i){for(var n=0,a=t.length;a>n;n++)for(var o=t[n].seriesId,r=ta(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 ua(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 ha(){var t="__\x00ec_inner_"+lI++ +"_"+Math.random().toFixed(5);return function(e){return e[t]||(e[t]={})}}function ca(t,e,i){if(b(e)){var n={};n[e+"Index"]=0,e=n}var a=i&&i.defaultMainType;!a||da(e,a+"Index")||da(e,a+"Id")||da(e,a+"Name")||(e[a+"Index"]=0);var o={};return nI(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 da(t,e){return t&&t.hasOwnProperty(e)}function fa(t,e,i){t.setAttribute?t.setAttribute(e,i):t[e]=i}function pa(t,e){return t.getAttribute?t.getAttribute(e):t[e]}function ga(t){return"auto"===t?Zb.domSupported?"html":"richText":t||"html"}function ma(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 va(t){var e={main:"",sub:""};return t&&(t=t.split(uI),e.main=t[0]||"",e.sub=t[1]||""),e}function ya(t){O(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(t),'componentType "'+t+'" illegal')}function xa(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=wa,i.superApply=ba,h(i,this),i.superClass=e,i}}function _a(t){var e=["__\x00is_clz",cI++,Math.random().toFixed(3)].join("_");t.prototype[e]=!0,t.isInstance=function(t){return!(!t||!t[e])}}function wa(t,e){var i=k(arguments,2);return this.superClass.prototype[e].apply(t,i)}function ba(t,e,i){return this.superClass.prototype[e].apply(t,i)}function Sa(t,e){function i(t){var e=n[t.main];return e&&e[hI]||(e=n[t.main]={},e[hI]=!0),e}e=e||{};var n={};if(t.registerClass=function(t,e){if(e)if(ya(e),e=va(e),e.sub){if(e.sub!==hI){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[hI]&&(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=va(t);var e=[],i=n[t.main];return i&&i[hI]?f(i,function(t,i){i!==hI&&e.push(t)}):e.push(i),e},t.hasClass=function(t){return t=va(t),!!n[t.main]},t.getAllClassMainTypes=function(){var t=[];return f(n,function(e,i){t.push(i)}),t},t.hasSubTypes=function(t){t=va(t);var e=n[t.main];return e&&e[hI]},t.parseClassType=va,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 Ma(t){return t>-xI&&xI>t}function Ia(t){return t>xI||-xI>t}function Ta(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 Aa(t,e,i,n,a){var o=1-a;return 3*(((e-t)*o+2*(i-e)*a)*o+(n-i)*a*a)}function Da(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(Ma(h)&&Ma(c))if(Ma(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(Ma(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=yI(g),x=h*s+1.5*r*(-c+y),_=h*s+1.5*r*(-c-y);x=0>x?-vI(-x,bI):vI(x,bI),_=0>_?-vI(-_,bI):vI(_,bI);var p=(-s-(x+_))/(3*r);p>=0&&1>=p&&(o[f++]=p)}else{var w=(2*h*s-3*r*c)/(2*yI(h*h*h)),b=Math.acos(w)/3,S=yI(h),M=Math.cos(b),p=(-s-2*S*M)/(3*r),v=(-s+S*(M+wI*Math.sin(b)))/(3*r),I=(-s+S*(M-wI*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 Ca(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(Ma(r)){if(Ia(o)){var u=-s/o;u>=0&&1>=u&&(a[l++]=u)}}else{var h=o*o-4*r*s;if(Ma(h))a[0]=-o/(2*r);else if(h>0){var c=yI(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 La(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 ka(t,e,i,n,a,o,r,s,l,u,h){var c,d,f,p,g,m=.005,v=1/0;SI[0]=l,SI[1]=u;for(var y=0;1>y;y+=.05)MI[0]=Ta(t,i,a,r,y),MI[1]=Ta(e,n,o,s,y),p=uS(SI,MI),v>p&&(c=y,v=p);v=1/0;for(var x=0;32>x&&!(_I>m);x++)d=c-m,f=c+m,MI[0]=Ta(t,i,a,r,d),MI[1]=Ta(e,n,o,s,d),p=uS(MI,SI),d>=0&&v>p?(c=d,v=p):(II[0]=Ta(t,i,a,r,f),II[1]=Ta(e,n,o,s,f),g=uS(II,SI),1>=f&&v>g?(c=f,v=g):m*=.5);return h&&(h[0]=Ta(t,i,a,r,c),h[1]=Ta(e,n,o,s,c)),yI(v)}function Pa(t,e,i,n){var a=1-n;return a*(a*t+2*n*e)+n*n*i}function Oa(t,e,i,n){return 2*((1-n)*(e-t)+n*(i-e))}function Na(t,e,i,n,a){var o=t-2*e+i,r=2*(e-t),s=t-n,l=0;if(Ma(o)){if(Ia(r)){var u=-s/r;u>=0&&1>=u&&(a[l++]=u)}}else{var h=r*r-4*o*s;if(Ma(h)){var u=-r/(2*o);u>=0&&1>=u&&(a[l++]=u)}else if(h>0){var c=yI(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 Ea(t,e,i){var n=t+i-2*e;return 0===n?.5:(t-e)/n}function za(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 Ra(t,e,i,n,a,o,r,s,l){var u,h=.005,c=1/0;SI[0]=r,SI[1]=s;for(var d=0;1>d;d+=.05){MI[0]=Pa(t,i,a,d),MI[1]=Pa(e,n,o,d);var f=uS(SI,MI);c>f&&(u=d,c=f)}c=1/0;for(var p=0;32>p&&!(_I>h);p++){var g=u-h,m=u+h;MI[0]=Pa(t,i,a,g),MI[1]=Pa(e,n,o,g);var f=uS(MI,SI);if(g>=0&&c>f)u=g,c=f;else{II[0]=Pa(t,i,a,m),II[1]=Pa(e,n,o,m);var v=uS(II,SI);1>=m&&c>v?(u=m,c=v):h*=.5}}return l&&(l[0]=Pa(t,i,a,u),l[1]=Pa(e,n,o,u)),yI(c)}function Ba(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;n<t.length;n++)a=t[n],o=TI(o,a[0]),r=AI(r,a[0]),s=TI(s,a[1]),l=AI(l,a[1]);e[0]=o,e[1]=s,i[0]=r,i[1]=l}}function Va(t,e,i,n,a,o){a[0]=TI(t,i),a[1]=TI(e,n),o[0]=AI(t,i),o[1]=AI(e,n)}function Ga(t,e,i,n,a,o,r,s,l,u){var h,c=Ca,d=Ta,f=c(t,i,a,r,NI);for(l[0]=1/0,l[1]=1/0,u[0]=-1/0,u[1]=-1/0,h=0;f>h;h++){var p=d(t,i,a,r,NI[h]);l[0]=TI(p,l[0]),u[0]=AI(p,u[0])}for(f=c(e,n,o,s,EI),h=0;f>h;h++){var g=d(e,n,o,s,EI[h]);l[1]=TI(g,l[1]),u[1]=AI(g,u[1])}l[0]=TI(t,l[0]),u[0]=AI(t,u[0]),l[0]=TI(r,l[0]),u[0]=AI(r,u[0]),l[1]=TI(e,l[1]),u[1]=AI(e,u[1]),l[1]=TI(s,l[1]),u[1]=AI(s,u[1])}function Fa(t,e,i,n,a,o,r,s){var l=Ea,u=Pa,h=AI(TI(l(t,i,a),1),0),c=AI(TI(l(e,n,o),1),0),d=u(t,i,a,h),f=u(e,n,o,c);r[0]=TI(t,a,d),r[1]=TI(e,o,f),s[0]=AI(t,a,d),s[1]=AI(e,o,f)}function Wa(t,e,i,n,a,o,r,s,l){var u=re,h=se,c=Math.abs(a-o);if(1e-4>c%LI&&c>1e-4)return s[0]=t-i,s[1]=e-n,l[0]=t+i,void(l[1]=e+n);if(kI[0]=CI(a)*i+t,kI[1]=DI(a)*n+e,PI[0]=CI(o)*i+t,PI[1]=DI(o)*n+e,u(s,kI,PI),h(l,kI,PI),a%=LI,0>a&&(a+=LI),o%=LI,0>o&&(o+=LI),a>o&&!r?o+=LI:o>a&&r&&(a+=LI),r){var d=o;o=a,a=d}for(var f=0;o>f;f+=Math.PI/2)f>a&&(OI[0]=CI(f)*i+t,OI[1]=DI(f)*n+e,u(s,OI,s),h(l,OI,l))}function Ha(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 Za(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=ka(t,e,i,n,a,o,r,s,u,h,null);return c/2>=d}function Xa(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=Ra(t,e,i,n,a,o,s,l,null);return u/2>=h}function Ua(t){return t%=qI,0>t&&(t+=qI),t}function Ya(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)%KI<1e-4)return!0;if(o){var c=n;n=Ua(a),a=Ua(c)}else n=Ua(n),a=Ua(a);n>a&&(a+=KI);var d=Math.atan2(l,s);return 0>d&&(d+=KI),d>=n&&a>=d||d+KI>=n&&a>=d+KI}function ja(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 qa(t,e){return Math.abs(t-e)<QI}function Ka(){var t=eT[0];eT[0]=eT[1],eT[1]=t}function $a(t,e,i,n,a,o,r,s,l,u){if(u>e&&u>n&&u>o&&u>s||e>u&&n>u&&o>u&&s>u)return 0;var h=Da(e,n,o,s,u,tT);if(0===h)return 0;for(var c,d,f=0,p=-1,g=0;h>g;g++){var m=tT[g],v=0===m||1===m?.5:1,y=Ta(t,i,a,r,m);l>y||(0>p&&(p=Ca(e,n,o,s,eT),eT[1]<eT[0]&&p>1&&Ka(),c=Ta(e,n,o,s,eT[0]),p>1&&(d=Ta(e,n,o,s,eT[1]))),f+=2===p?m<eT[0]?e>c?v:-v:m<eT[1]?c>d?v:-v:d>s?v:-v:m<eT[0]?e>c?v:-v:c>s?v:-v)}return f}function Ja(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=Na(e,n,o,s,tT);if(0===l)return 0;var u=Ea(e,n,o);if(u>=0&&1>=u){for(var h=0,c=Pa(e,n,o,u),d=0;l>d;d++){var f=0===tT[d]||1===tT[d]?.5:1,p=Pa(t,i,a,tT[d]);r>p||(h+=tT[d]<u?e>c?f:-f:c>o?f:-f)}return h}var f=0===tT[0]||1===tT[0]?.5:1,p=Pa(t,i,a,tT[0]);return r>p?0:e>o?f:-f}function Qa(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);tT[0]=-l,tT[1]=l;var u=Math.abs(n-a);if(1e-4>u)return 0;if(1e-4>u%JI){n=0,a=JI;var h=o?1:-1;return r>=tT[0]+t&&r<=tT[1]+t?h:0}if(o){var l=n;n=Ua(a),a=Ua(l)}else n=Ua(n),a=Ua(a);n>a&&(a+=JI);for(var c=0,d=0;2>d;d++){var f=tT[d];if(f+t>r){var p=Math.atan2(s,f),h=o?1:-1;0>p&&(p=JI+p),(p>=n&&a>=p||p+JI>=n&&a>=p+JI)&&(p>Math.PI/2&&p<1.5*Math.PI&&(h=-h),c+=h)}}return c}function to(t,e,i,n,a){for(var o=0,r=0,s=0,l=0,u=0,h=0;h<t.length;){var c=t[h++];switch(c===$I.M&&h>1&&(i||(o+=ja(r,s,l,u,n,a))),1===h&&(r=t[h],s=t[h+1],l=r,u=s),c){case $I.M:l=t[h++],u=t[h++],r=l,s=u;break;case $I.L:if(i){if(Ha(r,s,t[h],t[h+1],e,n,a))return!0}else o+=ja(r,s,t[h],t[h+1],n,a)||0;r=t[h++],s=t[h++];break;case $I.C:if(i){if(Za(r,s,t[h++],t[h++],t[h++],t[h++],t[h],t[h+1],e,n,a))return!0}else o+=$a(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 $I.Q:if(i){if(Xa(r,s,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+1],n,a)||0;r=t[h++],s=t[h++];break;case $I.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+=ja(r,s,x,_,n,a):(l=x,u=_);var w=(n-d)*g/p+d;if(i){if(Ya(d,f,g,m,m+v,y,e,w,a))return!0}else o+=Qa(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 $I.R:l=r=t[h++],u=s=t[h++];var b=t[h++],S=t[h++],x=l+b,_=u+S;if(i){if(Ha(l,u,x,u,e,n,a)||Ha(x,u,x,_,e,n,a)||Ha(x,_,l,_,e,n,a)||Ha(l,_,l,u,e,n,a))return!0}else o+=ja(x,u,x,_,n,a),o+=ja(l,_,l,u,n,a);break;case $I.Z:if(i){if(Ha(r,s,l,u,e,n,a))return!0}else o+=ja(r,s,l,u,n,a);r=l,s=u}}return i||qa(s,u)||(o+=ja(r,s,l,u,n,a)||0),0!==o}function eo(t,e,i){return to(t,0,!1,e,i)}function io(t,e,i,n){return to(t,e,!0,i,n)}function no(t){An.call(this,t),this.path=null}function ao(t,e,i,n,a,o,r,s,l,u,h){var c=l*(fT/180),d=dT(c)*(t-i)/2+cT(c)*(e-n)/2,f=-1*cT(c)*(t-i)/2+dT(c)*(e-n)/2,p=d*d/(r*r)+f*f/(s*s);p>1&&(r*=hT(p),s*=hT(p));var g=(a===o?-1:1)*hT((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+dT(c)*m-cT(c)*v,x=(e+n)/2+cT(c)*m+dT(c)*v,_=mT([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=mT(w,b);gT(w,b)<=-1&&(S=fT),gT(w,b)>=1&&(S=0),0===o&&S>0&&(S-=2*fT),1===o&&0>S&&(S+=2*fT),h.addData(u,y,x,r,s,_,S,c,o)}function oo(t){if(!t)return new jI;for(var e,i=0,n=0,a=i,o=n,r=new jI,s=jI.CMD,l=t.match(vT),u=0;u<l.length;u++){for(var h,c=l[u],d=c.charAt(0),f=c.match(yT)||[],p=f.length,g=0;p>g;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,ao(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,ao(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 ro(t,e){var i=oo(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){uT(i,t),this.dirty(!0)},e}function so(t,e){return new no(ro(t,e))}function lo(t,e){return no.extend(ro(t,e))}function uo(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 no(e);return r.createPathProxy(),r.buildPath=function(t){t.appendPath(i);var e=t.getContext();e&&t.rebuildPath(e)},r}function ho(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 co(t,e,i){var n=e.points,a=e.smooth;if(n&&n.length>=2){if(a&&"spline"!==a){var o=TT(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=IT(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 fo(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&&(CT(2*n)===CT(2*a)&&(t.x1=t.x2=go(n,s,!0)),CT(2*o)===CT(2*r)&&(t.y1=t.y2=go(o,s,!0)))}}function po(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=go(n,s,!0),t.y=go(a,s,!0),t.width=Math.max(go(n+o,s,!1)-t.x,0===o?0:1),t.height=Math.max(go(a+r,s,!1)-t.y,0===r?0:1))}}function go(t,e,i){if(!e)return t;var n=CT(2*t);return(n+CT(e))%2===0?n/2:(n+(i?1:-1))/2}function mo(t,e,i){var n=t.cpx2,a=t.cpy2;return null===n||null===a?[(i?Aa:Ta)(t.x1,t.cpx1,t.cpx2,t.x2,e),(i?Aa:Ta)(t.y1,t.cpy1,t.cpy2,t.y2,e)]:[(i?Oa:Pa)(t.x1,t.cpx1,t.x2,e),(i?Oa:Pa)(t.y1,t.cpy1,t.y2,e)]}function vo(t){An.call(this,t),this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.notClear=!0}function yo(t){return no.extend(t)}function xo(t,e){return lo(t,e)}function _o(t,e){$T[t]=e}function wo(t){return $T.hasOwnProperty(t)?$T[t]:void 0}function bo(t,e,i,n){var a=so(t,e);return i&&("center"===n&&(i=Mo(i,a.getBoundingRect())),Io(a,i)),a}function So(t,e,i){var n=new Dn({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(Mo(e,a))}}});return n}function Mo(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 Io(t,e){if(t.applyTransform){var i=t.getBoundingRect(),n=i.calculateTransform(e);t.applyTransform(n)}}function To(t){return fo(t.shape,t.shape,t.style),t}function Ao(t){return po(t.shape,t.shape,t.style),t}function Do(t){return null!=t&&"none"!==t}function Co(t){if("string"!=typeof t)return t;var e=tA.get(t);return e||(e=ni(t,-.1),1e4>eA&&(tA.set(t,e),eA++)),e}function Lo(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 ko(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),tr(o),n||Lo(a),o.extendFrom(e),Po(o,e,"fill"),Po(o,e,"stroke"),Qo(o),n||(t.dirty(!1),t.z2+=XT)}}}function Po(t,e,i){!Do(e[i])&&Do(t[i])&&(t[i]=Co(t[i]))}function Oo(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&&(tr(i),t.setStyle(n),Qo(i));var a=t.__cachedNormalZ2;null!=a&&t.z2-a===XT&&(t.z2=a)}}function No(t,e,i){var n,a=jT,o=jT;t.__highlighted&&(a=YT,n=!0),e(t,i),t.__highlighted&&(o=YT,n=!0),t.isGroup&&t.traverse(function(t){!t.isGroup&&e(t,i)}),n&&t.__highDownOnUpdate&&t.__highDownOnUpdate(a,o)}function Eo(t,e){e=t.__hoverStl=e!==!1&&(t.hoverStyle||e||{}),t.__hoverStlDirty=!0,t.__highlighted&&(t.__cachedNormalStl=null,Oo(t),ko(t))}function zo(t){!Go(this,t)&&!this.__highByOuter&&No(this,ko)}function Ro(t){!Go(this,t)&&!this.__highByOuter&&No(this,Oo)}function Bo(t){this.__highByOuter|=1<<(t||0),No(this,ko)}function Vo(t){!(this.__highByOuter&=~(1<<(t||0)))&&No(this,Oo)}function Go(t,e){return t.__highDownSilentOnTouch&&e.zrByTouch}function Fo(t,e){Wo(t,!0),No(t,Eo,e)}function Wo(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",zo)[n]("mouseout",Ro),t[n]("emphasis",Bo)[n]("normal",Vo),t.__highByOuter=t.__highByOuter||0,t.__highDownDispatcher=!i}}function Ho(t){return!(!t||!t.__highDownDispatcher)}function Zo(t){var e=KT[t];return null==e&&32>=qT&&(e=KT[t]=qT++),e}function Xo(t,e,i,n,a,o,r){a=a||ZT;var s,l=a.labelFetcher,u=a.labelDataIndex,h=a.labelDimIndex,c=i.getShallow("show"),d=n.getShallow("show");(c||d)&&(l&&(s=l.getFormattedLabel(u,"normal",null,h)),null==s&&(s=w(a.defaultText)?a.defaultText(u,a):a.defaultText));var f=c?s:null,p=d?C(l?l.getFormattedLabel(u,"emphasis",null,h):null,s):null;(null!=f||null!=p)&&(Yo(t,i,o,a),Yo(e,n,r,a,!0)),t.text=f,e.text=p}function Uo(t,e,i){var n=t.style;e&&(tr(n),t.setStyle(e),Qo(n)),n=t.__hoverStl,i&&n&&(tr(n),r(n,i),Qo(n))}function Yo(t,e,i,n,a){return qo(t,e,n,a),i&&r(t,i),t}function jo(t,e,i){var n,a={isRectText:!0};i===!1?n=!0:a.autoColor=i,qo(t,e,a,n)}function qo(t,e,i,n){if(i=i||ZT,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=Ko(e);if(u){r={};for(var h in u)if(u.hasOwnProperty(h)){var c=e.getModel(["rich",h]);$o(r[h]={},c,l,i,n)}}return t.rich=r,$o(t,e,l,i,n,!0),i.forceRich&&!i.textStyle&&(i.textStyle={}),t}function Ko(t){for(var e;t&&t!==t.ecModel;){var i=(t.option||ZT).rich;if(i){e=e||{};for(var n in i)i.hasOwnProperty(n)&&(e[n]=1)}t=t.parentModel}return e}function $o(t,e,i,n,a,o){i=!a&&i||ZT,t.textFill=Jo(e.getShallow("color"),n)||i.color,t.textStroke=Jo(e.getShallow("textBorderColor"),n)||i.textBorderColor,t.textStrokeWidth=C(e.getShallow("textBorderWidth"),i.textBorderWidth),a||(o&&(t.insideRollbackOpt=n,Qo(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=Jo(e.getShallow("backgroundColor"),n),t.textPadding=e.getShallow("padding"),t.textBorderColor=Jo(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 Jo(t,e){return"auto"!==t?t:e&&e.autoColor?e.autoColor:null}function Qo(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 tr(t){var e=t.insideRollback;e&&(t.textFill=e.textFill,t.textStroke=e.textStroke,t.textStrokeWidth=e.textStrokeWidth,t.insideRollback=null)}function er(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 ir(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 nr(t,e,i,n,a){ir(!0,t,e,i,n,a)}function ar(t,e,i,n,a){ir(!1,t,e,i,n,a)}function or(t,e){for(var i=Ne([]);t&&t!==e;)ze(i,t.getLocalTransform(),i),t=t.parent;return i}function rr(t,e,i){return e&&!d(e)&&(e=CS.getLocalTransform(e)),i&&(e=Ge([],e)),oe([],t,e)}function sr(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=rr(o,e,i),Math.abs(o[0])>Math.abs(o[1])?o[0]>0?"right":"left":o[1]>0?"bottom":"top"}function lr(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)),nr(t,n,i,t.dataIndex)}}})}}function ur(t,e){return p(t,function(t){var i=t[0];i=WT(i,e.x),i=HT(i,e.x+e.width);var n=t[1];return n=WT(n,e.y),n=HT(n,e.y+e.height),[i,n]})}function hr(t,e){var i=WT(t.x,e.x),n=HT(t.x+t.width,e.x+e.width),a=WT(t.y,e.y),o=HT(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 cr(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 Dn(e)):bo(t.replace("path://",""),e,i,"center"):void 0}function dr(t,e,i,n,a){for(var o=0,r=a[a.length-1];o<a.length;o++){var s=a[o];if(fr(t,e,i,n,s[0],s[1],r[0],r[1]))return!0;r=s}}function fr(t,e,i,n,a,o,r,s){var l=i-t,u=n-e,h=r-a,c=s-o,d=pr(h,c,l,u);if(gr(d))return!1;var f=t-a,p=e-o,g=pr(f,p,l,u)/d;
if(0>g||g>1)return!1;var m=pr(f,p,h,c)/d;return 0>m||m>1?!1:!0}function pr(t,e,i,n){return t*n-i*e}function gr(t){return 1e-6>=t&&t>=-1e-6}function mr(t,e,i){this.parentModel=e,this.ecModel=i,this.option=t}function vr(t,e,i){for(var n=0;n<e.length&&(!e[n]||(t=t&&"object"==typeof t?t[e[n]]:null,null!=t));n++);return null==t&&i&&(t=i.get(e)),t}function yr(t,e){var i=lA(t).getParent;return i?i.call(t,e):t.parentModel}function xr(t){return[t||"",uA++,Math.random().toFixed(5)].join("_")}function _r(t){var e={};return t.registerSubTypeDefaulter=function(t,i){t=va(t),e[t.main]=i},t.determineSubType=function(i,n){var a=n.type;if(!a){var o=va(i).main;t.hasSubTypes(i)&&e[o]&&(a=e[o](n))}return a},t}function wr(t,e){function i(t){var i={},o=[];return f(t,function(r){var s=n(i,r),l=s.originalDeps=e(r),h=a(l,t);s.entryCount=h.length,0===s.entryCount&&o.push(r),f(h,function(t){u(s.predecessor,t)<0&&s.predecessor.push(t);var e=n(i,t);u(e.successor,t)<0&&e.successor.push(r)})}),{graph:i,noEntryList:o}}function n(t,e){return t[e]||(t[e]={predecessor:[],successor:[]}),t[e]}function a(t,e){var i=[];return f(t,function(t){u(e,t)>=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 br(t){return t.replace(/^\s+|\s+$/g,"")}function Sr(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 Mr(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?br(t).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?0/0:+t}function Ir(t,e,i){return null==e&&(e=10),e=Math.min(Math.max(0,e),20),t=(+t).toFixed(e),i?t:+t}function Tr(t){return t.sort(function(t,e){return t-e}),t}function Ar(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 Dr(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 Cr(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 Lr(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 kr(t){var e=2*Math.PI;return(t%e+e)%e}function Pr(t){return t>-hA&&hA>t}function Or(t){if(t instanceof Date)return t;if("string"==typeof t){var e=dA.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 Nr(t){return Math.pow(10,Er(t))}function Er(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 zr(t,e){var i,n=Er(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 Rr(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 Br(t){function e(t,i,n){return t.interval[n]<i.interval[n]||t.interval[n]===i.interval[n]&&(t.close[n]-i.close[n]===(n?-1:1)||!n&&e(t,i,1))}t.sort(function(t,i){return e(t,i,0)?-1:1});for(var i=-1/0,n=1,a=0;a<t.length;){for(var o=t[a].interval,r=t[a].close,s=0;2>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 Vr(t){return t-parseFloat(t)>=0}function Gr(t){return isNaN(t)?"-":(t=(t+"").split("."),t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:""))}function Fr(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 Wr(t){return null==t?"":(t+"").replace(gA,function(t,e){return mA[e]})}function Hr(t,e,i){_(e)||(e=[e]);var n=e.length;if(!n)return"";for(var a=e[0].$vars||[],o=0;o<a.length;o++){var r=vA[o];t=t.replace(yA(r),yA(r,0))}for(var s=0;n>s;s++)for(var l=0;l<a.length;l++){var u=e[s][a[l]];t=t.replace(yA(vA[l],s),i?Wr(u):u)}return t}function Zr(t,e,i){return f(e,function(e,n){t=t.replace("{"+n+"}",i?Wr(e):e)}),t}function Xr(t,e){t=b(t)?{color:t,extraCssText:e}:t||{};var i=t.color,n=t.type,e=t.extraCssText,a=t.renderMode||"html",o=t.markerId||"X";return i?"html"===a?"subItem"===n?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+Wr(i)+";"+(e||"")+'"></span>':'<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:'+Wr(i)+";"+(e||"")+'"></span>':{renderMode:a,content:"{marker"+o+"|} ",style:{color:i}}:""}function Ur(t,e){return t+="","0000".substr(0,e-t.length)+t}function Yr(t,e,i){("week"===t||"month"===t||"quarter"===t||"half-year"===t||"year"===t)&&(t="MM-dd\nyyyy");var n=Or(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",Ur(r,2)).replace("M",r).replace("yyyy",o).replace("yy",o%100).replace("dd",Ur(s,2)).replace("d",s).replace("hh",Ur(l,2)).replace("h",l).replace("mm",Ur(u,2)).replace("m",u).replace("ss",Ur(h,2)).replace("s",h).replace("SSS",Ur(c,3))}function jr(t){return t?t.charAt(0).toUpperCase()+t.substr(1):t}function qr(t){return Xi(t.text,t.font,t.textAlign,t.textVerticalAlign,t.textPadding,t.textLineHeight,t.rich,t.truncate)}function Kr(t,e,i,n,a,o,r,s){return Xi(t,e,i,n,a,s,o,r)}function $r(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 Jr(t,e,i){var n=e.width,a=e.height,o=Mr(t.x,n),r=Mr(t.y,a),s=Mr(t.x2,n),l=Mr(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=pA(i||0),{width:Math.max(s-o-i[1]-i[3],0),height:Math.max(l-r-i[0]-i[2],0)}}function Qr(t,e,i){i=pA(i||0);var n=e.width,a=e.height,o=Mr(t.left,n),r=Mr(t.top,a),s=Mr(t.right,n),l=Mr(t.bottom,a),u=Mr(t.width,n),h=Mr(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 ts(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=Qr(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 es(t,e){return null!=t[SA[e][0]]||null!=t[SA[e][1]]&&null!=t[SA[e][2]]}function is(t,e,i){function n(i,n){var r={},l=0,u={},h=0,c=2;if(wA(i,function(e){u[e]=t[e]}),wA(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;d<i.length;d++){var f=i[d];if(!a(r,f)&&a(t,f)){r[f]=t[f];break}}return r}return u}function a(t,e){return t.hasOwnProperty(e)}function o(t,e){return null!=t[e]&&"auto"!==t[e]}function r(t,e,i){wA(t,function(t){e[t]=i[t]})}!S(i)&&(i={});var s=i.ignoreSize;!_(s)&&(s=[s,s]);var l=n(SA[0],0),u=n(SA[1],1);r(SA[0],t,l),r(SA[1],t,u)}function ns(t){return as({},t)}function as(t,e){return e&&t&&wA(bA,function(i){e.hasOwnProperty(i)&&(t[i]=e[i])}),t}function os(t){var e=[];return f(AA.getClassesByMainType(t),function(t){e=e.concat(t.prototype.dependencies||[])}),e=p(e,function(t){return va(t).main}),"dataset"!==t&&u(e,"dataset")<=0&&e.unshift("dataset"),e}function rs(t,e){for(var i=t.length,n=0;i>n;n++)if(t[n].length>e)return t[n];return t[i-1]}function ss(t){this.fromDataset=t.fromDataset,this.data=t.data||(t.sourceFormat===EA?{}:[]),this.sourceFormat=t.sourceFormat||zA,this.seriesLayoutBy=t.seriesLayoutBy||BA,this.dimensionsDefine=t.dimensionsDefine,this.encodeDefine=t.encodeDefine&&B(t.encodeDefine),this.startIndex=t.startIndex||0,this.dimensionsDetectCount=t.dimensionsDetectCount}function ls(t){var e=t.option.source,i=zA;if(I(e))i=RA;else if(_(e)){0===e.length&&(i=OA);for(var n=0,a=e.length;a>n;n++){var o=e[n];if(null!=o){if(_(o)){i=OA;break}if(S(o)){i=NA;break}}}}else if(S(e)){for(var r in e)if(e.hasOwnProperty(r)&&d(e[r])){i=EA;break}}else if(null!=e)throw new Error("Invalid data");FA(t).sourceFormat=i}function us(t){return FA(t).source}function hs(t){FA(t).datasetMap=B()}function cs(t){var e=t.option,i=e.data,n=I(i)?RA:PA,a=!1,o=e.seriesLayoutBy,r=e.sourceHeader,s=e.dimensions,l=ys(t);if(l){var u=l.option;i=u.source,n=FA(l).sourceFormat,a=!0,o=o||u.seriesLayoutBy,null==r&&(r=u.sourceHeader),s=s||u.dimensions}var h=ds(i,n,o,r,s);FA(t).source=new ss({data:i,fromDataset:a,seriesLayoutBy:o,sourceFormat:n,dimensionsDefine:h.dimensionsDefine,startIndex:h.startIndex,dimensionsDetectCount:h.dimensionsDetectCount,encodeDefine:e.encode})}function ds(t,e,i,n,a){if(!t)return{dimensionsDefine:fs(a)};var o,r;if(e===OA)"auto"===n||null==n?ps(function(t){null!=t&&"-"!==t&&(b(t)?null==r&&(r=1):r=0)},i,t,10):r=n?1:0,a||1!==r||(a=[],ps(function(t,e){a[e]=null!=t?t:""},i,t)),o=a?a.length:i===VA?t.length:t[0]?t[0].length:null;else if(e===NA)a||(a=gs(t));else if(e===EA)a||(a=[],f(t,function(t,e){a.push(e)}));else if(e===PA){var s=ia(t[0]);o=_(s)&&s.length||1}return{startIndex:r,dimensionsDefine:fs(a),dimensionsDetectCount:o}}function fs(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 ps(t,e,i,n){if(null==n&&(n=1/0),e===VA)for(var a=0;a<i.length&&n>a;a++)t(i[a]?i[a][0]:null,a);else for(var o=i[0]||[],a=0;a<o.length&&n>a;a++)t(o[a],a)}function gs(t){for(var e,i=0;i<t.length&&!(e=t[i++]););if(e){var n=[];return f(e,function(t,e){n.push(e)}),n}}function ms(t,e,i){function n(t,e,i){for(var n=0;i>n;n++)t.push(e+n)}function a(t){var e=t.dimsDef;return e?e.length:1}var o={},r=ys(e);if(!r||!t)return o;var s,l,u=[],h=[],c=e.ecModel,d=FA(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 vs(t,e,i){var n={},a=ys(t);if(!a)return n;var o,r=e.sourceFormat,s=e.dimensionsDefine;(r===NA||r===EA)&&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=_s(e.data,r,e.seriesLayoutBy,s,e.startIndex,u);l.push(c);var d=c===GA.Not;if(d&&null==n.v&&u!==o&&(n.v=u),(null==n.n||n.n===n.v||!d&&l[n.n]===GA.Not)&&(n.n=u),t(n)&&l[n.n]!==GA.Not)return n;d||(c===GA.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 ys(t){var e=t.option,i=e.data;return i?void 0:t.ecModel.getComponent("dataset",e.datasetIndex||0)}function xs(t,e){return _s(t.data,t.sourceFormat,t.seriesLayoutBy,t.dimensionsDefine,t.startIndex,e)}function _s(t,e,i,n,a,o){function r(t){var e=b(t);return null!=t&&isFinite(t)&&""!==t?e?GA.Might:GA.Not:e&&"-"!==t?GA.Must:void 0}var s,l=5;if(I(t))return GA.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?GA.Must:GA.Not;if(e===OA)if(i===VA){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;f<t.length&&l>f;f++){var p=t[a+f];if(p&&null!=(s=r(p[o])))return s}else if(e===NA){if(!u)return GA.Not;for(var f=0;f<t.length&&l>f;f++){var g=t[f];if(g&&null!=(s=r(g[u])))return s}}else if(e===EA){if(!u)return GA.Not;var d=t[u];if(!d||I(d))return GA.Not;for(var f=0;f<d.length&&l>f;f++)if(null!=(s=r(d[f])))return s}else if(e===PA)for(var f=0;f<t.length&&l>f;f++){var g=t[f],m=ia(g);if(!_(m))return GA.Not;if(null!=(s=r(m[o])))return s}return GA.Not}function ws(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 bs(t,e){var i=t.color&&!t.colorLayer;f(e,function(e,o){"colorLayer"===o&&i||AA.hasClass(o)||("object"==typeof e?t[o]=t[o]?a(t[o],e,!1):n(e):null==t[o]&&(t[o]=e))})}function Ss(t){t=t,this.option={},this.option[WA]=1,this._componentsMap=B({series:[]}),this._seriesIndices,this._seriesIndicesMap,bs(t,this._theme.option),a(t,CA,!1),this.mergeOption(t)}function Ms(t,e){_(e)||(e=e?[e]:[]);var i={};return f(e,function(e){i[e]=(t.get(e)||[]).slice()}),i}function Is(t,e,i){var n=e.type?e.type:i?i.subType:AA.determineSubType(t,e);return n}function Ts(t,e){t._seriesIndicesMap=B(t._seriesIndices=p(e,function(t){return t.componentIndex})||[])}function As(t,e){return e.hasOwnProperty("subType")?m(t,function(t){return t.subType===e.subType}):t}function Ds(t){f(ZA,function(e){this[e]=y(t[e],t)},this)}function Cs(){this._coordinateSystems=[]}function Ls(t){this._api=t,this._timelineOptions=[],this._mediaList=[],this._mediaDefault,this._currentMediaIndices=[],this._optionBackup,this._newBaseOption}function ks(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;UA(l,function(t){t&&t.option&&(t.query?r.push(t):n||(n=t))})}return a||(a=t),a.timeline||(a.timeline=s),UA([a].concat(o).concat(p(r,function(t){return t.option})),function(t){UA(e,function(e){e(t,i)})}),{baseOption:a,timelineOptions:o,mediaDefault:n,mediaList:r}}function Ps(t,e,i){var n={width:e,height:i,aspectratio:e/i},a=!0;return f(t,function(t,e){var i=e.match(KA);if(i&&i[1]&&i[2]){var o=i[1],r=i[2].toLowerCase();Os(n[r],t,o)||(a=!1)}}),a}function Os(t,e,i){return"min"===i?t>=e:"max"===i?e>=t:t===e}function Ns(t,e){return t.join(",")===e.join(",")}function Es(t,e){e=e||{},UA(e,function(e,i){if(null!=e){var n=t[i];if(AA.hasClass(i)){e=ta(e),n=ta(n);var a=aa(n,e);t[i]=jA(a,function(t){return t.option&&t.exist?qA(t.exist,t.option,!0):t.exist||t.option})}else t[i]=qA(n,e,!0)}})}function zs(t){var e=t&&t.itemStyle;if(e)for(var i=0,n=QA.length;n>i;i++){var o=QA[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 Rs(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 Bs(t){Rs(t,"itemStyle"),Rs(t,"lineStyle"),Rs(t,"areaStyle"),Rs(t,"label"),Rs(t,"labelLine"),Rs(t,"upperLabel"),Rs(t,"edgeLabel")}function Vs(t,e){var i=JA(t)&&t[e],n=JA(i)&&i.textStyle;if(n)for(var a=0,o=sI.length;o>a;a++){var e=sI[a];n.hasOwnProperty(e)&&(i[e]=n[e])}}function Gs(t){t&&(Bs(t),Vs(t,"label"),t.emphasis&&Vs(t.emphasis,"label"))}function Fs(t){if(JA(t)){zs(t),Bs(t),Vs(t,"label"),Vs(t,"upperLabel"),Vs(t,"edgeLabel"),t.emphasis&&(Vs(t.emphasis,"label"),Vs(t.emphasis,"upperLabel"),Vs(t.emphasis,"edgeLabel"));var e=t.markPoint;e&&(zs(e),Gs(e));var i=t.markLine;i&&(zs(i),Gs(i));var n=t.markArea;n&&Gs(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<o.length;r++)Gs(o[r]);f(t.categories,function(t){Bs(t)})}if(a&&!I(a))for(var r=0;r<a.length;r++)Gs(a[r]);var e=t.markPoint;if(e&&e.data)for(var s=e.data,r=0;r<s.length;r++)Gs(s[r]);var i=t.markLine;if(i&&i.data)for(var l=i.data,r=0;r<l.length;r++)_(l[r])?(Gs(l[r][0]),Gs(l[r][1])):Gs(l[r]);"gauge"===t.type?(Vs(t,"axisLabel"),Vs(t,"title"),Vs(t,"detail")):"treemap"===t.type?(Rs(t.breadcrumb,"itemStyle"),f(t.levels,function(t){Bs(t)})):"tree"===t.type&&Bs(t.leaves)}}function Ws(t){return _(t)?t:t?[t]:[]}function Hs(t){return(_(t)?t[0]:t)||{}}function Zs(t,e){e=e.split(",");for(var i=t,n=0;n<e.length&&(i=i&&i[e[n]],null!=i);n++);return i}function Xs(t,e,i,n){e=e.split(",");for(var a,o=t,r=0;r<e.length-1;r++)a=e[r],null==o[a]&&(o[a]={}),o=o[a];(n||null==o[e[r]])&&(o[e[r]]=i)}function Us(t){f(eD,function(e){e[0]in t&&!(e[1]in t)&&(t[e[1]]=t[e[0]])})}function Ys(t){f(t,function(e,i){var n=[],a=[0/0,0/0],o=[e.stackResultDimension,e.stackedOverDimension],r=e.data,s=e.isStackedByIndex,l=r.map(o,function(o,l,u){var h=r.get(e.stackedDimension,u);if(isNaN(h))return a;var c,d;s?d=r.getRawIndex(u):c=r.get(e.stackedByDimension,u);for(var f=0/0,p=i-1;p>=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 js(t,e){ss.isInstance(t)||(t=ss.seriesDataToSource(t)),this._source=t;var i=this._data=t.data,n=t.sourceFormat;n===RA&&(this._offset=0,this._dimSize=e,this._data=i);var a=rD[n===OA?n+"_"+t.seriesLayoutBy:n];r(this,a)}function qs(){return this._data.length}function Ks(t){return this._data[t]}function $s(t){for(var e=0;e<t.length;e++)this._data.push(t[e])}function Js(t,e,i){return null!=i?t[i]:t}function Qs(t,e,i,n){return tl(t[n],this._dimensionInfos[e])}function tl(t,e){var i=e&&e.type;if("ordinal"===i){var n=e&&e.ordinalMeta;return n?n.parseAndCollect(t):t}return"time"===i&&"number"!=typeof t&&null!=t&&"-"!==t&&(t=+Or(t)),null==t||""===t?0/0:+t}function el(t,e,i){if(t){var n=t.getRawDataItem(e);if(null!=n){var a,o,r=t.getProvider().getSource().sourceFormat,s=t.getDimensionInfo(i);return s&&(a=s.name,o=s.index),sD[r](n,e,o,a)}}}function il(t,e,i){if(t){var n=t.getProvider().getSource().sourceFormat;if(n===PA||n===NA){var a=t.getRawDataItem(e);return n!==PA||S(a)||(a=null),a?a[i]:void 0}}}function nl(t){return new al(t)}function al(t){t=t||{},this._reset=t.reset,this._plan=t.plan,this._count=t.count,this._onDirty=t.onDirty,this._dirty=!0,this.context}function ol(t,e,i,n,a,o){dD.reset(i,n,a,o),t._callingProgress=e,t._callingProgress({start:i,end:n,count:n-i,next:dD.next},t.context)}function rl(t,e){t._dueIndex=t._outputDueEnd=t._dueEnd=0,t._settedOutputEnd=null;var i,n;!e&&t._reset&&(i=t._reset(t.context),i&&i.progress&&(n=i.forceFirstProgress,i=i.progress),_(i)&&!i.length&&(i=null)),t._progress=i,t._modBy=t._modDataCount=null;var a=t._downstream;return a&&a.dirty(),n}function sl(t){var e=t.name;ra(t)||(t.name=ll(t)||e)}function ll(t){var e=t.getRawData(),i=e.mapDimension("seriesName",!0),n=[];return f(i,function(t){var i=e.getDimensionInfo(t);i.displayName&&n.push(i.displayName)}),n.join(" ")}function ul(t){return t.model.getRawData().count()}function hl(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),cl}function cl(t,e){t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function dl(t,e){f(t.CHANGABLE_METHODS,function(i){t.wrapMethod(i,x(fl,e))})}function fl(t){var e=pl(t);e&&e.setOutputEnd(this.count())}function pl(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 gl(){this.group=new aM,this.uid=xr("viewChart"),this.renderTask=nl({plan:yl,reset:xl}),this.renderTask.context={view:this}}function ml(t,e,i){if(t&&(t.trigger(e,i),t.isGroup&&!Ho(t)))for(var n=0,a=t.childCount();a>n;n++)ml(t.childAt(n),e,i)}function vl(t,e,i){var n=ua(t,e),a=e&&null!=e.highlightKey?Zo(e.highlightKey):null;null!=n?f(ta(n),function(e){ml(t.getItemGraphicEl(e),i,a)}):t.eachItemGraphicEl(function(t){ml(t,i,a)})}function yl(t){return xD(t.model)}function xl(t){var e=t.model,i=t.ecModel,n=t.api,a=t.payload,o=e.pipelineContext.progressiveRender,r=t.view,s=a&&yD(a).updateMethod,l=o?"incrementalPrepareRender":s&&r[s]?s:"render";return"render"!==l&&r[l](e,i,n,a),wD[l]}function _l(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 wl(t,e,i,n){var a=t[e];if(a){var o=a[bD]||a,r=a[MD],s=a[SD];if(s!==i||r!==n){if(null==i||!n)return t[e]=o;a=t[e]=_l(o,i,"debounce"===n),a[bD]=o,a[MD]=n,a[SD]=i}return a}}function bl(t,e){var i=t[e];i&&i[bD]&&(t[e]=i[bD])}function Sl(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 Ml(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(),kD(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),kD(s,n),r|=s.perform(l)})}}),t.unfinished|=r}function Il(t,e,i,n,a){function o(i){var o=i.uid,s=r.get(o)||r.set(o,nl({plan:kl,reset:Pl,count:Nl}));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 Tl(t,e,i,n,a){function o(e){var i=e.uid,n=s.get(i);n||(n=s.set(i,nl({reset:Dl,onDirty:Ll})),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||nl({reset:Al});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 Al(t){t.overallReset(t.ecModel,t.api,t.payload)}function Dl(t){return t.overallProgress&&Cl}function Cl(){this.agent.dirty(),this.getDownstream().dirty()}function Ll(){this.agent&&this.agent.dirty()}function kl(t){return t.plan&&t.plan(t.model,t.ecModel,t.api,t.payload)}function Pl(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=ta(t.reset(t.model,t.ecModel,t.api,t.payload));return e.length>1?p(e,function(t,e){return Ol(e)}):PD}function Ol(t){return function(e,i){var n=i.data,a=i.resetDefines[t];if(a&&a.dataEach)for(var o=e.start;o<e.end;o++)a.dataEach(n,o);else a&&a.progress&&a.progress(e,n)}}function Nl(t){return t.data.count()}function El(t,e,i){var n=e.uid,a=t._pipelineMap.get(n);!a.head&&(a.head=i),a.tail&&a.tail.pipe(i),a.tail=i,i.__idxInPipeline=a.count++,i.__pipeline=a}function zl(t){OD=null;try{t(ND,ED)}catch(e){}return OD}function Rl(t,e){for(var i in e.prototype)t[i]=G}function Bl(t){if(b(t)){var e=new DOMParser;t=e.parseFromString(t,"text/xml")}for(9===t.nodeType&&(t=t.firstChild);"svg"!==t.nodeName.toLowerCase()||1!==t.nodeType;)t=t.nextSibling;return t}function Vl(){this._defs={},this._root=null,this._isDefine=!1,this._isText=!1}function Gl(t,e){for(var i=t.firstChild;i;){if(1===i.nodeType){var n=i.getAttribute("offset");n=n.indexOf("%")>0?parseInt(n,10)/100:n?parseFloat(n):0;var a=i.getAttribute("stop-color")||"#000000";e.addColorStop(n,a)}i=i.nextSibling}}function Fl(t,e){t&&t.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),s(e.__inheritedStyle,t.__inheritedStyle))}function Wl(t){for(var e=N(t).split(HD),i=[],n=0;n<e.length;n+=2){var a=parseFloat(e[n]),o=parseFloat(e[n+1]);i.push([a,o])}return i}function Hl(t,e,i,n){var a=e.__inheritedStyle||{},o="text"===e.type;if(1===t.nodeType&&(Xl(t,e),r(a,Ul(t)),!n))for(var s in UD)if(UD.hasOwnProperty(s)){var l=t.getAttribute(s);null!=l&&(a[UD[s]]=l)}var u=o?"textFill":"fill",h=o?"textStroke":"stroke";e.style=e.style||new fM;var c=e.style;null!=a.fill&&c.set(u,Zl(a.fill,i)),null!=a.stroke&&c.set(h,Zl(a.stroke,i)),f(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],function(t){var e="lineWidth"===t&&o?"textStrokeWidth":t;null!=a[t]&&c.set(e,parseFloat(a[t]))}),a.textBaseline&&"auto"!==a.textBaseline||(a.textBaseline="alphabetic"),"alphabetic"===a.textBaseline&&(a.textBaseline="bottom"),"start"===a.textAlign&&(a.textAlign="left"),"end"===a.textAlign&&(a.textAlign="right"),f(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign","textBaseline"],function(t){null!=a[t]&&c.set(t,a[t])}),a.lineDash&&(e.style.lineDash=N(a.lineDash).split(HD)),c[h]&&"none"!==c[h]&&(e[h]=!0),e.__inheritedStyle=a}function Zl(t,e){var i=e&&t&&t.match(YD);if(i){var n=N(i[1]),a=e[n];return a}return t}function Xl(t,e){var i=t.getAttribute("transform");if(i){i=i.replace(/,/g," ");var n=null,a=[];i.replace(jD,function(t,e,i){a.push(e,i)});for(var o=a.length-1;o>0;o-=2){var r=a[o],s=a[o-1];switch(n=n||Oe(),s){case"translate":r=N(r).split(HD),Re(n,n,[parseFloat(r[0]),parseFloat(r[1]||0)]);break;case"scale":r=N(r).split(HD),Ve(n,n,[parseFloat(r[0]),parseFloat(r[1]||r[0])]);break;case"rotate":r=N(r).split(HD),Be(n,n,parseFloat(r[0]));break;case"skew":r=N(r).split(HD),console.warn("Skew transform is not supported yet");break;case"matrix":var r=N(r).split(HD);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 Ul(t){var e=t.getAttribute("style"),i={};if(!e)return i;var n={};qD.lastIndex=0;for(var a;null!=(a=qD.exec(e));)n[a[1]]=a[2];for(var o in UD)UD.hasOwnProperty(o)&&null!=n[o]&&(i[UD[o]]=n[o]);return i}function Yl(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 jl(t,e){var i=new Vl;return i.parse(t,e)}function ql(t,e){return function(i,n,a){(e||!this._disposed)&&(i=i&&i.toLowerCase(),dS.prototype[t].call(this,i,n,a))}}function Kl(){dS.call(this)}function $l(t,e,i){function a(t,e){return t.__prio-e.__prio}i=i||{},"string"==typeof e&&(e=kC[e]),this.id,this.group,this._dom=t;var o="canvas",r=this._zr=qn(t,{renderer:i.renderer||o,devicePixelRatio:i.devicePixelRatio,width:i.width,height:i.height});this._throttledZrFlush=_l(y(r.flush,r),17);var e=n(e);e&&nD(e,!0),this._theme=e,this._chartsViews=[],this._chartsMap={},this._componentsViews=[],this._componentsMap={},this._coordSysMgr=new Cs;var s=this._api=gu(this);Ni(LC,a),Ni(AC,a),this._scheduler=new Sl(this,s,AC,LC),dS.call(this,this._ecEventProcessor=new mu),this._messageCenter=new Kl,this._initEvents(),this.resize=y(this.resize,this),this._pendingActions=[],r.animation.on("frame",this._onframe,this),ou(r,this),E(this)}function Jl(t,e,i){if(!this._disposed){var n,a=this._model,o=this._coordSysMgr.getCoordinateSystems();e=ca(a,e);for(var r=0;r<o.length;r++){var s=o[r];if(s[t]&&null!=(n=s[t](a,e,i)))return n}}}function Ql(t){var e=t._model,i=t._scheduler;i.restorePipelines(e),i.prepareStageTasks(),ru(t,"component",e,i),ru(t,"chart",e,i),i.plan()}function tu(t,e,i,n,a){function o(n){n&&n.__alive&&n[e]&&n[e](n.__model,r,t._api,i)}var r=t._model;if(!n)return void tC(t._componentsViews.concat(t._chartsViews),o);var s={};s[n+"Id"]=i[n+"Id"],s[n+"Index"]=i[n+"Index"],s[n+"Name"]=i[n+"Name"];var l={mainType:n,query:s};a&&(l.subType=a);var u=i.excludeSeriesId;null!=u&&(u=B(ta(u))),r&&r.eachComponent(l,function(e){u&&null!=u.get(e.id)||o(t["series"===n?"_chartsMap":"_componentsMap"][e.__viewId])},t)}function eu(t,e){var i=t._chartsMap,n=t._scheduler;e.eachSeries(function(t){n.updateStreamModes(t,i[t.__viewId])})}function iu(t,e){var i=t.type,n=t.escapeConnect,a=IC[i],o=a.actionInfo,l=(o.update||"update").split(":"),u=l.pop();l=null!=l[0]&&nC(l[0]),this[xC]=!0;var h=[t],c=!1;t.batch&&(c=!0,h=p(t.batch,function(e){return e=s(r({},e),t),e.batch=null,e}));var d,f=[],g="highlight"===i||"downplay"===i;tC(h,function(t){d=a.action(t,this._model,this._api),d=d||r({},t),d.type=o.event||d.type,f.push(d),g?tu(this,u,t,"series"):l&&tu(this,u,t,l.main,l.sub)},this),"none"===u||g||l||(this[_C]?(Ql(this),SC.update.call(this,t),this[_C]=!1):SC[u].call(this,t)),d=c?{type:o.event||i,escapeConnect:n,batch:f}:f[0],this[xC]=!1,!e&&this._messageCenter.trigger(d.type,d)}function nu(t){for(var e=this._pendingActions;e.length;){var i=e.shift();iu.call(this,i,t)}}function au(t){!t&&this.trigger("updated")}function ou(t,e){t.on("rendered",function(){e.trigger("rendered"),!t.animation.isFinished()||e[_C]||e._scheduler.unfinished||e._pendingActions.length||e.trigger("finished")})}function ru(t,e,i,n){function a(t){var e="_ec_"+t.id+"_"+t.type,a=s[e];if(!a){var h=nC(t.type),c=o?gD.getClass(h.main,h.sub):gl.getClass(h.sub);a=new c,a.init(i,u),s[e]=a,r.push(a),l.add(a.group)}t.__viewId=a.__id=e,a.__alive=!0,a.__model=t,a.group.__ecComponentInfo={mainType:t.mainType,index:t.componentIndex},!o&&n.prepareView(a,t,i,u)}for(var o="component"===e,r=o?t._componentsViews:t._chartsViews,s=o?t._componentsMap:t._chartsMap,l=t._zr,u=t._api,h=0;h<r.length;h++)r[h].__alive=!1;o?i.eachComponent(function(t,e){"series"!==t&&a(e)}):i.eachSeries(a);for(var h=0;h<r.length;){var c=r[h];c.__alive?h++:(!o&&c.renderTask.dispose(),l.remove(c.group),c.dispose(i,u),r.splice(h,1),delete s[c.__id],c.__id=c.group.__ecComponentInfo=null)}}function su(t){t.clearColorPalette(),t.eachSeries(function(t){t.clearColorPalette()})}function lu(t,e,i,n){uu(t,e,i,n),tC(t._chartsViews,function(t){t.__alive=!1}),hu(t,e,i,n),tC(t._chartsViews,function(t){t.__alive||t.remove(e,i)})}function uu(t,e,i,n,a){tC(a||t._componentsViews,function(t){var a=t.__model;
t.render(a,e,i,n),pu(a,t)})}function hu(t,e,i,n,a){var o,r=t._scheduler;e.eachSeries(function(e){var i=t._chartsMap[e.__viewId];i.__alive=!0;var s=i.renderTask;r.updatePayload(s,n),a&&a.get(e.uid)&&s.dirty(),o|=s.perform(r.getPerformArgs(s)),i.group.silent=!!e.get("silent"),pu(e,i),fu(e,i)}),r.unfinished|=o,du(t,e),AD(t._zr.dom,e)}function cu(t,e){tC(CC,function(i){i(t,e)})}function du(t,e){var i=t._zr,n=i.storage,a=0;n.traverse(function(){a++}),a>e.get("hoverLayerThreshold")&&!Zb.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 fu(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 pu(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 gu(t){var e=t._coordSysMgr;return r(new Ds(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 mu(){this.eventInfo}function vu(t){function e(t,e){for(var i=0;i<t.length;i++){var n=t[i];n[o]=e}}var i=0,n=1,a=2,o="__connectUpdateStatus";tC(TC,function(r,s){t._messageCenter.on(s,function(r){if(NC[t.group]&&t[o]!==i){if(r&&r.escapeConnect)return;var s=t.makeActionFromEvent(r),l=[];tC(OC,function(e){e!==t&&e.group===t.group&&l.push(e)}),e(l,i),tC(l,function(t){t[o]!==n&&t.dispatchAction(s)}),e(l,a)}})})}function yu(t,e,i){var n=bu(t);if(n)return n;var a=new $l(t,e,i);return a.id="ec_"+EC++,OC[a.id]=a,fa(t,RC,a.id),vu(a),a}function xu(t){if(_(t)){var e=t;t=null,tC(e,function(e){null!=e.group&&(t=e.group)}),t=t||"g_"+zC++,tC(e,function(e){e.group=t})}return NC[t]=!0,t}function _u(t){NC[t]=!1}function wu(t){"string"==typeof t?t=OC[t]:t instanceof $l||(t=bu(t)),t instanceof $l&&!t.isDisposed()&&t.dispose()}function bu(t){return OC[pa(t,RC)]}function Su(t){return OC[t]}function Mu(t,e){kC[t]=e}function Iu(t){DC.push(t)}function Tu(t,e){Ou(AC,t,e,sC)}function Au(t){CC.push(t)}function Du(t,e,i){"function"==typeof e&&(i=e,e="");var n=iC(t)?t.type:[t,t={event:e}][0];t.event=(t.event||n).toLowerCase(),e=t.event,QD(wC.test(n)&&wC.test(e)),IC[n]||(IC[n]={action:i,actionInfo:t}),TC[e]=n}function Cu(t,e){Cs.register(t,e)}function Lu(t){var e=Cs.get(t);return e?e.getDimensionsInfo?e.getDimensionsInfo():e.dimensions.slice():void 0}function ku(t,e){Ou(LC,t,e,cC,"layout")}function Pu(t,e){Ou(LC,t,e,pC,"visual")}function Ou(t,e,i,n,a){(eC(e)||iC(e))&&(i=e,e=n);var o=Sl.wrapStageHandler(i,a);return o.__prio=e,o.__raw=i,t.push(o),o}function Nu(t,e){PC[t]=e}function Eu(t){return AA.extend(t)}function zu(t){return gD.extend(t)}function Ru(t){return pD.extend(t)}function Bu(t){return gl.extend(t)}function Vu(t){i("createCanvas",t)}function Gu(t,e,i){$D.registerMap(t,e,i)}function Fu(t){var e=$D.retrieveMap(t);return e&&e[0]&&{geoJson:e[0].geoJSON,specialAreas:e[0].specialAreas}}function Wu(t){return t}function Hu(t,e,i,n,a){this._old=t,this._new=e,this._oldKeyGetter=i||Wu,this._newKeyGetter=n||Wu,this.context=a}function Zu(t,e,i,n,a){for(var o=0;o<t.length;o++){var r="_ec_"+a[n](t[o],o),s=e[r];null==s?(i.push(r),e[r]=o):(s.length||(e[r]=s=[s]),s.push(o))}}function Xu(t){var e={},i=e.encode={},n=B(),a=[],o=[],r=e.userOutput={dimensionNames:t.dimensions.slice(),encode:{}};f(t.dimensions,function(e){var s=t.getDimensionInfo(e),l=s.coordDim;if(l){var u=s.coordDimIndex;Uu(i,l)[u]=e,s.isExtraCoord||(n.set(l,1),ju(s.type)&&(a[0]=e),Uu(r.encode,l)[u]=s.index),s.defaultTooltip&&o.push(e)}GC.each(function(t,e){var n=Uu(i,e),a=s.otherDims[e];null!=a&&a!==!1&&(n[a]=s.name)})});var s=[],l={};n.each(function(t,e){var n=i[e];l[e]=n[0],s=s.concat(n)}),e.dataDimsOnCoord=s,e.encodeFirstDimNotExtra=l;var u=i.label;u&&u.length&&(a=u.slice());var h=i.tooltip;return h&&h.length?o=h.slice():o.length||(o=a.slice()),i.defaultedLabel=a,i.defaultedTooltip=o,e}function Uu(t,e){return t.hasOwnProperty(e)||(t[e]=[]),t[e]}function Yu(t){return"category"===t?"ordinal":"time"===t?"time":"float"}function ju(t){return!("ordinal"===t||"time"===t)}function qu(t){null!=t&&r(this,t),this.otherDims={}}function Ku(t){return t._rawCount>65535?UC:jC}function $u(t){var e=t.constructor;return e===Array?t.slice():new e(t)}function Ju(t,e){f(qC.concat(e.__wrappedMethods||[]),function(i){e.hasOwnProperty(i)&&(t[i]=e[i])}),t.__wrappedMethods=e.__wrappedMethods,f(KC,function(i){t[i]=n(e[i])}),t._calculationInfo=r(e._calculationInfo)}function Qu(t,e,i,n,a){var o=XC[e.type],r=n-1,s=e.name,l=t[s][r];if(l&&l.length<i){for(var u=new o(Math.min(a-r*i,i)),h=0;h<l.length;h++)u[h]=l[h];t[s][r]=u}for(var c=n*i;a>c;c+=i)t[s].push(new o(Math.min(a-c,i)))}function th(t){var e=t._invertedIndicesMap;f(e,function(i,n){var a=t._dimensionInfos[n],o=a.ordinalMeta;if(o){i=e[n]=new YC(o.categories.length);for(var r=0;r<i.length;r++)i[r]=HC;for(var r=0;r<t._count;r++)i[t.get(n,r)]=r}})}function eh(t,e,i){var n;if(null!=e){var a=t._chunkSize,o=Math.floor(i/a),r=i%a,s=t.dimensions[e],l=t._storage[s][o];if(l){n=l[r];var u=t._dimensionInfos[s].ordinalMeta;u&&u.categories.length&&(n=u.categories[n])}}return n}function ih(t){return t}function nh(t){return t<this._count&&t>=0?this._indices[t]:-1}function ah(t,e){var i=t._idList[e];return null==i&&(i=eh(t,t._idDimIdx,e)),null==i&&(i=ZC+e),i}function oh(t){return _(t)||(t=[t]),t}function rh(t,e){var i=t.dimensions,n=new $C(p(i,t.getDimensionInfo,t),t.hostModel);Ju(n,t);for(var a=n._storage={},o=t._storage,r=0;r<i.length;r++){var s=i[r];o[s]&&(u(e,s)>=0?(a[s]=sh(o[s]),n._rawExtent[s]=lh(),n._extent[s]=null):a[s]=o[s])}return n}function sh(t){for(var e=new Array(t.length),i=0;i<t.length;i++)e[i]=$u(t[i]);return e}function lh(){return[1/0,-1/0]}function uh(t,e,i){function a(t,e,i){null!=GC.get(e)?t.otherDims[e]=i:(t.coordDim=e,t.coordDimIndex=i,u.set(e,!0))}ss.isInstance(e)||(e=ss.seriesDataToSource(e)),i=i||{},t=(t||[]).slice();for(var o=(i.dimsDef||[]).slice(),l=B(),u=B(),h=[],c=hh(e,t,o,i.dimCount),d=0;c>d;d++){var p=o[d]=r({},S(o[d])?o[d]:{name:o[d]}),g=p.name,m=h[d]=new qu;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=ta(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=ta(l);if(!l.length)for(var u=0;u<(i&&i.length||1);u++){for(;y<h.length&&null!=h[y].coordDim;)y++;y<h.length&&l.push(y++)}f(l,function(n,r){var l=h[n];if(a(s(l,t),e,r),null==l.name&&i){var u=i[r];!S(u)&&(u={name:u}),l.name=l.displayName=u.name,l.defaultTooltip=u.defaultTooltip}o&&s(l.otherDims,o)})}});var x=i.generateCoord,_=i.generateCoordCount,w=null!=_;_=x?_||1:0;for(var M=x||"value",I=0;c>I;I++){var m=h[I]=h[I]||new qu,T=m.coordDim;null==T&&(m.coordDim=ch(M,u,w),m.coordDimIndex=0,(!x||0>=_)&&(m.isExtraCoord=!0),_--),null==m.name&&(m.name=ch(m.coordDim,l)),null!=m.type||xs(e,I,m.name)!==GA.Must&&(!m.isExtraCoord||null==m.otherDims.itemName&&null==m.otherDims.seriesName)||(m.type="ordinal")}return h}function hh(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 ch(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 dh(t){this.coordSysName=t,this.coordSysDims=[],this.axisMap=B(),this.categoryAxisMap=B(),this.firstCategoryDimIndex=null}function fh(t){var e=t.get("coordinateSystem"),i=new dh(e),n=eL[e];return n?(n(t,i,i.axisMap,i.categoryAxisMap),i):void 0}function ph(t){return"category"===t.get("type")}function gh(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 mh(t,e){return!!e&&e===t.getCalculationInfo("stackedDimension")}function vh(t,e){return mh(t,e)?t.getCalculationInfo("stackResultDimension"):e}function yh(t,e,i){i=i||{},ss.isInstance(t)||(t=ss.seriesDataToSource(t));var n,a=e.get("coordinateSystem"),o=Cs.get(a),r=fh(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=Yu(n)}return e})),n||(n=o&&(o.getDimensionsInfo?o.getDimensionsInfo():o.dimensions.slice())||["x","y"]);var s,l,u=tL(t,{coordDimensions:n,generateCoord:i.generateCoord,encodeDefaulter:i.useEncodeDefaulter?x(ms,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=gh(e,u),c=new $C(u,e);c.setCalculationInfo(h);var d=null!=s&&xh(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 xh(t){if(t.sourceFormat===PA){var e=_h(t.data||[]);return null!=e&&!_(ia(e))}}function _h(t){for(var e=0;e<t.length&&null==t[e];)e++;return t[e]}function wh(t){this._setting=t||{},this._extent=[1/0,-1/0],this._interval=0,this.init&&this.init.apply(this,arguments)}function bh(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this._map}function Sh(t){return t._map||(t._map=B(t.categories))}function Mh(t){return S(t)&&null!=t.value?t.value:t+""}function Ih(t,e,i,n){var a={},o=t[1]-t[0],r=a.interval=zr(o/e,!0);null!=i&&i>r&&(r=a.interval=i),null!=n&&r>n&&(r=a.interval=n);var s=a.intervalPrecision=Th(r),l=a.niceTickExtent=[oL(Math.ceil(t[0]/r)*r,s),oL(Math.floor(t[1]/r)*r,s)];return Dh(l,t),a}function Th(t){return Dr(t)+2}function Ah(t,e,i){t[e]=Math.max(Math.min(t[e],i[1]),i[0])}function Dh(t,e){!isFinite(t[0])&&(t[0]=e[0]),!isFinite(t[1])&&(t[1]=e[1]),Ah(t,0,e),Ah(t,1,e),t[0]>t[1]&&(t[0]=t[1])}function Ch(t){return t.get("stack")||lL+t.seriesIndex}function Lh(t){return t.dim+t.index}function kh(t){var e=[],i=t.axis,n="axis0";if("category"===i.type){for(var a=i.getBandWidth(),o=0;o<t.count;o++)e.push(s({bandWidth:a,axisKey:n,stackId:lL+o},t));for(var r=Eh(e),l=[],o=0;o<t.count;o++){var u=r[n][lL+o];u.offsetCenter=u.offset+u.width/2,l.push(u)}return l}}function Ph(t,e){var i=[];return e.eachSeriesByType(t,function(t){Bh(t)&&!Vh(t)&&i.push(t)}),i}function Oh(t){var e={};f(t,function(t){var i=t.coordinateSystem,n=i.getBaseAxis();if("time"===n.type||"value"===n.type)for(var a=t.getData(),o=n.dim+"_"+n.index,r=a.mapDimension(n.dim),s=0,l=a.count();l>s;++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;r<a.length;++r){var s=a[r]-a[r-1];s>0&&(o=null===o?s:Math.min(o,s))}i[n]=o}}return i}function Nh(t){var e=Oh(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=Mr(t.get("barWidth"),n),p=Mr(t.get("barMaxWidth"),n),g=Mr(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:Lh(o),stackId:Ch(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=Mr(t.categoryGap,a),r=Mr(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 zh(t,e,i){if(t&&e){var n=t[Lh(e)];return null!=n&&null!=i&&(n=n[Ch(i)]),n}}function Rh(t,e){var i=Ph(t,e),n=Nh(i),a={};f(i,function(t){var e=t.getData(),i=t.coordinateSystem,o=i.getBaseAxis(),r=Ch(t),s=n[Lh(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=mh(e,d),g=h.isHorizontal(),m=Gh(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)<c&&(I=(0>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)<c&&(T=(0>=T?-1:1)*c),isNaN(T)||p&&(a[r][_][w]+=T)}e.setItemLayout(v,{x:S,y:M,width:I,height:T})}},this)}function Bh(t){return t.coordinateSystem&&"cartesian2d"===t.coordinateSystem.type}function Vh(t){return t.pipelineContext&&t.pipelineContext.large}function Gh(t,e){return e.toGlobalCoord(e.dataToCoord("log"===e.type?1:0))}function Fh(t,e){return IL(t,ML(e))}function Wh(t,e){var i,n,a,o=t.type,r=e.getMin(),s=e.getMax(),l=null!=r,u=null!=s,h=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]=Mr(n[0],1),n[1]=Mr(n[1],1),a=h[1]-h[0]||Math.abs(h[0])),null==r&&(r="ordinal"===o?i?0:0/0:h[0]-n[0]*a),null==s&&(s="ordinal"===o?i?i-1:0/0:h[1]+n[1]*a),"dataMin"===r?r=h[0]:"function"==typeof r&&(r=r({min:h[0],max:h[1]})),"dataMax"===s?s=h[1]:"function"==typeof s&&(s=s({min:h[0],max:h[1]})),(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&&!l&&(r=0),0>r&&0>s&&!u&&(s=0));var c=e.ecModel;if(c&&"time"===o){var d,p=Ph("bar",c);if(f(p,function(t){d|=t.getBaseAxis()===e.axis}),d){var g=Nh(p),m=Hh(r,s,e,g);r=m.min,s=m.max}}return[r,s]}function Hh(t,e,i,n){var a=i.axis.getExtent(),o=a[1]-a[0],r=zh(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 Zh(t,e){var i=Wh(t,e),n=null!=e.getMin(),a=null!=e.getMax(),o=e.get("splitNumber");"log"===t.type&&(t.base=e.get("logBase"));var r=t.type;t.setExtent(i[0],i[1]),t.niceExtent({splitNumber:o,fixMin:n,fixMax:a,minInterval:"interval"===r||"time"===r?e.get("minInterval"):null,maxInterval:"interval"===r||"time"===r?e.get("maxInterval"):null});var s=e.get("interval");null!=s&&t.setInterval&&t.setInterval(s)}function Xh(t,e){if(e=e||t.get("type"))switch(e){case"category":return new aL(t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),[1/0,-1/0]);case"value":return new sL;default:return(wh.getClass(e)||sL).create(t)}}function Uh(t){var e=t.scale.getExtent(),i=e[0],n=e[1];return!(i>0&&n>0||0>i&&0>n)}function Yh(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(jh(t,n),a)}:function(e){return t.scale.getLabel(e)}}function jh(t,e){return"category"===t.type?t.scale.getLabel(e):e}function qh(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=Yh(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=Kh(p,l.get("rotate")||0);s?s.union(g):s=g}return s}}function Kh(t,e){var i=e*Math.PI/180,n=t.plain(),a=n.width,o=n.height,r=a*Math.cos(i)+o*Math.sin(i),s=a*Math.sin(i)+o*Math.cos(i),l=new Ti(n.x,n.y,r,s);return l}function $h(t){var e=t.get("interval");return null==e?"auto":e}function Jh(t){return"category"===t.type&&0===$h(t.getLabelModel())}function Qh(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 tc(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://")?So(t.slice(8),new Ti(e,i,n,a),r?"center":"cover"):0===t.indexOf("path://")?bo(t.slice(7),{},new Ti(e,i,n,a),r?"center":"cover"):new VL({shape:{symbolType:t,x:e,y:i,width:n,height:a}}),l.__isEmptyBrush=s,l.setColor=Qh,l.setColor(o),l}function ec(t){return yh(t.getSource(),t)}function ic(t,e){var i=e;mr.isInstance(e)||(i=new mr(e),c(i,kL));var n=Xh(i);return n.setExtent(t[0],t[1]),Zh(n,i),n}function nc(t){c(t,kL)}function ac(t,e){return Math.abs(t-e)<WL}function oc(t,e,i){var n=0,a=t[0];if(!a)return!1;for(var o=1;o<t.length;o++){var r=t[o];n+=ja(a[0],a[1],r[0],r[1],e,i),a=r}var s=t[0];return ac(a[0],s[0])&&ac(a[1],s[1])||(n+=ja(a[0],a[1],s[0],s[1],e,i)),0!==n}function rc(t,e,i){if(this.name=t,this.geometries=e,i)i=[i[0],i[1]];else{var n=this.getBoundingRect();i=[n.x+n.width/2,n.y+n.height/2]}this.center=i}function sc(t){if(!t.UTF8Encoding)return t;var e=t.UTF8Scale;null==e&&(e=1024);for(var i=t.features,n=0;n<i.length;n++)for(var a=i[n],o=a.geometry,r=o.coordinates,s=o.encodeOffsets,l=0;l<r.length;l++){var u=r[l];if("Polygon"===o.type)r[l]=lc(u,s[l],e);else if("MultiPolygon"===o.type)for(var h=0;h<u.length;h++){var c=u[h];u[h]=lc(c,s[l][h],e)}}return t.UTF8Encoding=!1,t}function lc(t,e,i){for(var n=[],a=e[0],o=e[1],r=0;r<t.length;r+=2){var s=t.charCodeAt(r)-64,l=t.charCodeAt(r+1)-64;s=s>>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 uc(t){return"category"===t.type?cc(t):pc(t)}function hc(t,e){return"category"===t.type?fc(t,e):{ticks:t.scale.getTicks()}}function cc(t){var e=t.getLabelModel(),i=dc(t,e);return!e.get("show")||t.scale.isBlank()?{labels:[],labelCategoryInterval:i.labelCategoryInterval}:i}function dc(t,e){var i=gc(t,"labels"),n=$h(e),a=mc(i,n);if(a)return a;var o,r;return w(n)?o=bc(t,n):(r="auto"===n?yc(t):n,o=wc(t,r)),vc(i,n,{labels:o,labelCategoryInterval:r})}function fc(t,e){var i=gc(t,"ticks"),n=$h(e),a=mc(i,n);if(a)return a;var o,r;if((!e.get("show")||t.scale.isBlank())&&(o=[]),w(n))o=bc(t,n,!0);else if("auto"===n){var s=dc(t,t.getLabelModel());r=s.labelCategoryInterval,o=p(s.labels,function(t){return t.tickValue})}else r=n,o=wc(t,r,!0);return vc(i,n,{ticks:o,tickCategoryInterval:r})}function pc(t){var e=t.scale.getTicks(),i=Yh(t);return{labels:p(e,function(e,n){return{formattedLabel:i(e,n),rawLabel:t.scale.getLabel(e),tickValue:e}})}}function gc(t,e){return ZL(t)[e]||(ZL(t)[e]=[])}function mc(t,e){for(var i=0;i<t.length;i++)if(t[i].key===e)return t[i].value}function vc(t,e,i){return t.push({key:e,value:i}),i}function yc(t){var e=ZL(t).autoInterval;return null!=e?e:ZL(t).autoInterval=t.calculateCategoryInterval()}function xc(t){var e=_c(t),i=Yh(t),n=(e.axisRotate-e.labelRotate)/180*Math.PI,a=t.scale,o=a.getExtent(),r=a.count();if(o[1]-o[0]<1)return 0;var s=1;r>40&&(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=Xi(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))),_=ZL(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 _c(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 wc(t,e,i){function n(t){l.push(i?t:{formattedLabel:a(t),rawLabel:o.getLabel(t),tickValue:t})}var a=Yh(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=Jh(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 bc(t,e,i){var n=t.scale,a=Yh(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 Sc(t,e){var i=t[1]-t[0],n=e,a=i/n/2;t[0]+=a,t[1]-=a}function Mc(t,e,i,n){function a(t,e){return t=Ir(t),e=Ir(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 Ic(t){return this._axes[t]}function Tc(t){KL.call(this,t)}function Ac(t,e){return e.type||(e.data?"category":"value")}function Dc(t,e){return t.getCoordSysModel()===e}function Cc(t,e,i){this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this._initCartesian(t,e,i),this.model=t}function Lc(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)kc(r[u])&&(o=r[u]);else for(var h in r)if(r.hasOwnProperty(h)&&kc(r[h])&&!n[a(r[h])]){o=r[h];break}o&&(n[a(o)]=!0)}}function kc(t){return t&&"category"!==t.type&&"time"!==t.type&&Uh(t)}function Pc(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 Oc(t){return p(ok,function(e){var i=t.getReferringComponents(e)[0];return i})}function Nc(t){return"cartesian2d"===t.get("coordinateSystem")}function Ec(t,e){var i=t.mapDimension("defaultedLabel",!0),n=i.length;if(1===n)return el(t,e,i[0]);if(n){for(var a=[],o=0;o<i.length;o++){var r=el(t,e,i[o]);a.push(r)}return a.join(" ")}}function zc(t,e,i,n,a,o){var r=i.getModel("label"),s=i.getModel("emphasis.label");Xo(t,e,r,s,{labelFetcher:a,labelDataIndex:o,defaultText:Ec(a.getData(),o),isRectText:!0,autoColor:n}),Rc(t),Rc(e)}function Rc(t,e){"outside"===t.textPosition&&(t.textPosition=e)}function Bc(t,e,i){var n=t.getArea(),a=t.getBaseAxis().isHorizontal(),o=n.x,r=n.y,s=n.width,l=n.height,u=i.get("lineStyle.width")||2;o-=u/2,r-=u/2,s+=u,l+=u;var h=new kT({shape:{x:o,y:r,width:s,height:l}});return e&&(h.shape[a?"width":"height"]=0,ar(h,{shape:{width:s,height:l}},i)),h}function Vc(t,e,i){var n=t.getArea(),a=new ST({shape:{cx:Ir(t.cx,1),cy:Ir(t.cy,1),r0:Ir(n.r0,1),r:Ir(n.r,1),startAngle:n.startAngle,endAngle:n.endAngle,clockwise:n.clockwise}});return e&&(a.shape.endAngle=n.startAngle,ar(a,{shape:{endAngle:n.endAngle}},i)),a}function Gc(t,e,i){return t?"polar"===t.type?Vc(t,e,i):"cartesian2d"===t.type?Bc(t,e,i):null:null}function Fc(t,e){var i=t.getArea&&t.getArea();if("cartesian2d"===t.type){var n=t.getBaseAxis();if("category"!==n.type||!n.onBand){var a=e.getLayout("bandWidth");n.isHorizontal()?(i.x-=a,i.width+=2*a):(i.y-=a,i.height+=2*a)}}return i}function Wc(t,e,i){i.style.text=null,nr(i,{shape:{width:0}},e,t,function(){i.parent&&i.parent.remove(i)})}function Hc(t,e,i){i.style.text=null,nr(i,{shape:{r:i.shape.r0}},e,t,function(){i.parent&&i.parent.remove(i)})}function Zc(t){return null!=t.startAngle&&null!=t.endAngle&&t.startAngle===t.endAngle}function Xc(t,e,i,n,a,o,r,l){var u=e.getItemVisual(i,"color"),h=e.getItemVisual(i,"opacity"),c=e.getVisual("borderColor"),d=n.getModel("itemStyle"),f=n.getModel("emphasis.itemStyle").getBarItemStyle();l||t.setShape("r",d.get("barBorderRadius")||0),t.useStyle(s({stroke:Zc(a)?"none":c,fill:Zc(a)?"none":u,opacity:h},d.getBarItemStyle()));var p=n.getShallow("cursor");p&&t.attr("cursor",p);var g=r?a.height>0?"bottom":"top":a.width>0?"left":"right";l||zc(t.style,f,n,u,o,i,g),Zc(a)&&(f.fill=f.stroke="none"),Fo(t,f)}function Uc(t,e){var i=t.get(hk)||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 Yc(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 vk({shape:{points:h},incremental:!!i,__startPoint:c,__baseDimIdx:o,__largeDataIndices:r,__barWidth:s,silent:!0,z2:0});Kc(d,l,n),e.add(d)}var f=new vk({shape:{points:n.getLayout("largePoints")},incremental:!!i,__startPoint:a,__baseDimIdx:o,__largeDataIndices:r,__barWidth:s});e.add(f),qc(f,t,n),f.seriesIndex=t.seriesIndex,t.get("silent")||(f.on("mousedown",yk),f.on("mousemove",yk))}function jc(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];ck[0]=e,ck[1]=i;for(var u=ck[n],h=ck[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 qc(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 Kc(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 $c(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 Jc(t,e,i){var n="polar"===t.type?ST:kT;return new n({shape:$c(e,i,t),silent:!0,z2:0})}function Qc(t,e,i,n){var a,o,r=kr(i-t.rotation),s=n[0]>n[1],l="start"===e&&!s||"start"!==e&&s;return Pr(r-xk/2)?(o=l?"bottom":"top",a="center"):Pr(r-1.5*xk)?(o=l?"top":"bottom",a="center"):(o="middle",a=1.5*xk>r&&r>xk/2?l?"left":"right":l?"right":"left"),{rotation:r,textAlign:a,textVerticalAlign:o}}function td(t,e,i){if(!Jh(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?(ed(o),ed(u)):id(o,r)&&(n?(ed(r),ed(h)):(ed(o),ed(u))),a===!1?(ed(s),ed(c)):id(l,s)&&(a?(ed(l),ed(d)):(ed(s),ed(c)))}}function ed(t){t&&(t.ignore=!0)}function id(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(ze([],a,t.getLocalTransform())),n.applyTransform(ze([],a,e.getLocalTransform())),i.intersect(n)}}function nd(t){return"middle"===t||"center"===t}function ad(t,e,i,n,a){for(var o=[],r=[],s=[],l=0;l<t.length;l++){var u=t[l].coord;r[0]=u,r[1]=0,s[0]=u,s[1]=i,e&&(oe(r,r,e),oe(s,s,e));var h=new OT({anid:a+"_"+t[l].tickValue,subPixelOptimize:!0,shape:{x1:r[0],y1:r[1],x2:s[0],y2:s[1]},style:n,z2:2,silent:!0});o.push(h)}return o}function od(t,e,i){var n=e.axis,a=e.getModel("axisTick");if(a.get("show")&&!n.scale.isBlank()){for(var o=a.getModel("lineStyle"),r=i.tickDirection*a.get("length"),l=n.getTicksCoords(),u=ad(l,t._transform,r,s(o.getLineStyle(),{stroke:e.get("axisLine.lineStyle.color")}),"ticks"),h=0;h<u.length;h++)t.group.add(u[h]);return u}}function rd(t,e,i){var n=e.axis,a=e.getModel("minorTick");if(a.get("show")&&!n.scale.isBlank()){var o=n.getMinorTicksCoords();if(o.length)for(var r=a.getModel("lineStyle"),l=i.tickDirection*a.get("length"),u=s(r.getLineStyle(),s(e.getModel("axisTick").getLineStyle(),{stroke:e.get("axisLine.lineStyle.color")})),h=0;h<o.length;h++)for(var c=ad(o[h],t._transform,l,u,"minorticks_"+h),d=0;d<c.length;d++)t.group.add(c[d])}}function sd(t,e,i){var n=e.axis,a=D(i.axisLabelShow,e.get("axisLabel.show"));if(a&&!n.scale.isBlank()){var o=e.getModel("axisLabel"),r=o.get("margin"),s=n.getViewLabels(),l=(D(i.labelRotate,o.get("rotate"))||0)*xk/180,u=Sk(i.rotation,l,i.labelDirection),h=e.getCategories&&e.getCategories(!0),c=[],d=Mk(e),p=e.get("triggerEvent");return f(s,function(a,s){var l=a.tickValue,f=a.formattedLabel,g=a.rawLabel,m=o;h&&h[l]&&h[l].textStyle&&(m=new mr(h[l].textStyle,o,e.ecModel));var v=m.getTextColor()||e.get("axisLine.lineStyle.color"),y=n.dataToCoord(l),x=[y,i.labelOffset+i.labelDirection*r],_=new xT({anid:"label_"+l,position:x,rotation:u.rotation,silent:d,z2:10});Yo(_.style,m,{text:f,textAlign:m.getShallow("align",!0)||u.textAlign,textVerticalAlign:m.getShallow("verticalAlign",!0)||m.getShallow("baseline",!0)||u.textVerticalAlign,textFill:"function"==typeof v?v("category"===n.type?g:"value"===n.type?l+"":l,s):v}),p&&(_.eventData=bk(e),_.eventData.targetType="axisLabel",_.eventData.value=g),t._dumbGroup.add(_),_.updateTransform(),c.push(_),t.group.add(_),_.decomposeTransform()}),c}}function ld(t,e){var i={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return ud(i,t,e),i.seriesInvolved&&cd(i,t),i}function ud(t,e,i){var n=e.getComponent("tooltip"),a=e.getComponent("axisPointer"),o=a.get("link",!0)||[],r=[];Ik(i.getCoordinateSystems(),function(i){function s(n,s,l){var h=l.model.getModel("axisPointer",a),d=h.get("show");if(d&&("auto"!==d||n||vd(h))){null==s&&(s=h.get("triggerTooltip")),h=n?hd(l,c,a,e,n,s):h;var f=h.get("snap"),p=yd(l.model),g=s||f||"category"===l.type,m=t.axesInfo[p]={key:p,axis:l,coordSys:i,axisPointerModel:h,triggerTooltip:s,involveSeries:g,snap:f,useHandle:vd(h),seriesModels:[]};u[p]=m,t.seriesInvolved|=g;var v=dd(o,l);if(null!=v){var y=r[v]||(r[v]={axesInfo:{}});y.axesInfo[p]=m,y.mapper=o[v].mapper,m.linkGroup=y}}}if(i.axisPointerEnabled){var l=yd(i.model),u=t.coordSysAxesInfo[l]={};t.coordSysMap[l]=i;var h=i.model,c=h.getModel("tooltip",n);
if(Ik(i.getAxes(),Tk(s,!1,null)),i.getTooltipAxes&&n&&c.get("show")){var d="axis"===c.get("trigger"),f="cross"===c.get("axisPointer.type"),p=i.getTooltipAxes(c.get("axisPointer.axis"));(d||f)&&Ik(p.baseAxes,Tk(s,f?"cross":!0,d)),f&&Ik(p.otherAxes,Tk(s,"cross",!1))}}})}function hd(t,e,i,a,o,r){var l=e.getModel("axisPointer"),u={};Ik(["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],function(t){u[t]=n(l.get(t))}),u.snap="category"!==t.type&&!!r,"cross"===l.get("type")&&(u.type="line");var h=u.label||(u.label={});if(null==h.show&&(h.show=!1),"cross"===o){var c=l.get("label.show");if(h.show=null!=c?c:!0,!r){var d=u.lineStyle=l.get("crossStyle");d&&s(h,d.textStyle)}}return t.model.getModel("axisPointer",new mr(u,i,a))}function cd(t,e){e.eachSeries(function(e){var i=e.coordinateSystem,n=e.get("tooltip.trigger",!0),a=e.get("tooltip.show",!0);i&&"none"!==n&&n!==!1&&"item"!==n&&a!==!1&&e.get("axisPointer.show",!0)!==!1&&Ik(t.coordSysAxesInfo[yd(i.model)],function(t){var n=t.axis;i.getAxis(n.dim)===n&&(t.seriesModels.push(e),null==t.seriesDataCount&&(t.seriesDataCount=0),t.seriesDataCount+=e.getData().count())})},this)}function dd(t,e){for(var i=e.model,n=e.dim,a=0;a<t.length;a++){var o=t[a]||{};if(fd(o[n+"AxisId"],i.id)||fd(o[n+"AxisIndex"],i.componentIndex)||fd(o[n+"AxisName"],i.name))return a}}function fd(t,e){return"all"===t||_(t)&&u(t,e)>=0||t===e}function pd(t){var e=gd(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=vd(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]),r<l[0]&&(r=l[0]),a.value=r,s&&(a.status=e.axis.scale.isBlank()?"hide":"show")}}function gd(t){var e=(t.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return e&&e.axesInfo[yd(t)]}function md(t){var e=gd(t);return e&&e.axisPointerModel}function vd(t){return!!t.get("handle.show")}function yd(t){return t.type+"||"+t.id}function xd(t,e,i,n,a,o){var r=Ak.getAxisPointerClass(t.axisPointerClass);if(r){var s=md(e);s?(t._axisPointer||(t._axisPointer=new r)).render(e,s,n,o):_d(t,n)}}function _d(t,e,i){var n=t._axisPointer;n&&n.dispose(e,i),t._axisPointer=null}function wd(t,e,i){i=i||{};var n=t.coordinateSystem,a=e.axis,o={},r=a.getAxesOnZeroOf()[0],s=a.position,l=r?"onZero":s,u=a.dim,h=n.getRect(),c=[h.x,h.x+h.width,h.y,h.y+h.height],d={left:0,right:1,top:0,bottom:1,onZero:2},f=e.get("offset")||0,p="x"===u?[c[2]-f,c[3]+f]:[c[0]-f,c[1]+f];if(r){var g=r.toGlobalCoord(r.dataToCoord(0));p[d.onZero]=Math.max(Math.min(g,p[1]),p[0])}o.position=["y"===u?p[d[l]]:c[0],"x"===u?p[d[l]]:c[3]],o.rotation=Math.PI/2*("x"===u?0:1);var m={top:-1,bottom:1,left:-1,right:1};o.labelDirection=o.tickDirection=o.nameDirection=m[s],o.labelOffset=r?p[d[s]]-p[d.onZero]:0,e.get("axisTick.inside")&&(o.tickDirection=-o.tickDirection),D(i.labelInside,e.get("axisLabel.inside"))&&(o.labelDirection=-o.labelDirection);var v=e.get("axisLabel.rotate");return o.labelRotate="top"===l?-v:v,o.z2=1,o}function bd(t,e,i,n){var a=i.axis;if(!a.scale.isBlank()){var o=i.getModel("splitArea"),r=o.getModel("areaStyle"),l=r.get("color"),u=n.coordinateSystem.getRect(),h=a.getTicksCoords({tickModel:o,clamp:!0});if(h.length){var c=l.length,d=t.__splitAreaColors,f=B(),p=0;if(d)for(var g=0;g<h.length;g++){var m=d.get(h[g].tickValue);if(null!=m){p=(m+(c-1)*g)%c;break}}var v=a.toGlobalCoord(h[0].coord),y=r.getAreaStyle();l=_(l)?l:[l];for(var g=1;g<h.length;g++){var x,w,b,S,M=a.toGlobalCoord(h[g].coord);a.isHorizontal()?(x=v,w=u.y,b=M-x,S=u.height,v=x+b):(x=u.x,w=v,b=u.width,S=M-w,v=w+S);var I=h[g-1].tickValue;null!=I&&f.set(I,p),e.add(new kT({anid:null!=I?"area_"+I:null,shape:{x:x,y:w,width:b,height:S},style:s({fill:l[p]},y),silent:!0})),p=(p+1)%c}t.__splitAreaColors=f}}}function Sd(t){t.__splitAreaColors=null}function Md(t,e,i){aM.call(this),this.updateData(t,e,i)}function Id(t){return[t[0]/2,t[1]/2]}function Td(t,e){this.parent.drift(t,e)}function Ad(t,e){if(!this.incremental&&!this.useHoverLayer)if("emphasis"===e){var i=this.__symbolOriginalScale,n=i[1]/i[0],a={scale:[Math.max(1.1*i[0],i[0]+3),Math.max(1.1*i[1],i[1]+3*n)]};this.animateTo(a,400,"elasticOut")}else"normal"===e&&this.animateTo({scale:this.__symbolOriginalScale},400,"elasticOut")}function Dd(t){this.group=new aM,this._symbolCtor=t||Md}function Cd(t,e,i,n){return!(!e||isNaN(e[0])||isNaN(e[1])||n.isIgnore&&n.isIgnore(i)||n.clipShape&&!n.clipShape.contain(e[0],e[1])||"none"===t.getItemVisual(i,"symbol"))}function Ld(t){return null==t||S(t)||(t={isIgnore:t}),t||{}}function kd(t){var e=t.hostModel;return{itemStyle:e.getModel("itemStyle").getItemStyle(["color"]),hoverItemStyle:e.getModel("emphasis.itemStyle").getItemStyle(),symbolRotate:e.get("symbolRotate"),symbolOffset:e.get("symbolOffset"),hoverAnimation:e.get("hoverAnimation"),labelModel:e.getModel("label"),hoverLabelModel:e.getModel("emphasis.label"),cursorStyle:e.get("cursor")}}function Pd(t,e,i){var n,a=t.getBaseAxis(),o=t.getOtherAxis(a),r=Od(o,i),s=a.dim,l=o.dim,u=e.mapDimension(l),h=e.mapDimension(s),c="x"===l||"radius"===l?1:0,d=p(t.dimensions,function(t){return e.mapDimension(t)}),f=e.getCalculationInfo("stackResultDimension");return(n|=mh(e,d[0]))&&(d[0]=f),(n|=mh(e,d[1]))&&(d[1]=f),{dataDimsForPoint:d,valueStart:r,valueAxisDim:l,baseAxisDim:s,stacked:!!n,valueDim:u,baseDim:h,baseDataOffset:c,stackedOverDimension:e.getCalculationInfo("stackedOverDimension")}}function Od(t,e){var i=0,n=t.scale.getExtent();return"start"===e?i=n[0]:"end"===e?i=n[1]:n[0]>0?i=n[0]:n[1]<0&&(i=n[1]),i}function Nd(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 zd(t){return isNaN(t[0])||isNaN(t[1])}function Rd(t,e,i,n,a,o,r,s,l,u){return"none"!==u&&u?Bd.apply(this,arguments):Vd.apply(this,arguments)}function Bd(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(zd(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;Hk(Xk,g),Xk[m]=g[m]+v,Hk(Uk,p),Uk[m]=p[m]-v,t.bezierCurveTo(Xk[0],Xk[1],Uk[0],Uk[1],p[0],p[1])}else t.lineTo(p[0],p[1]);c=d,d+=o}return f}function Vd(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(zd(p)){if(h){d+=o;continue}break}if(d===i)t[o>0?"moveTo":"lineTo"](p[0],p[1]),Hk(Xk,p);else if(l>0){var g=d+o,m=e[g];if(h)for(;m&&zd(e[g]);)g+=o,m=e[g];var v=.5,y=e[c],m=e[g];if(!m||zd(m))Hk(Uk,p);else{zd(m)&&!h&&(m=p),Y(Zk,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=lS(p,y),_=lS(p,m);v=_/(_+x),Wk(Uk,p,Zk,-l*(1-v))}Gk(Xk,Xk,s),Fk(Xk,Xk,r),Gk(Uk,Uk,s),Fk(Uk,Uk,r),t.bezierCurveTo(Xk[0],Xk[1],Uk[0],Uk[1],p[0],p[1]),Wk(Xk,p,Zk,l*v)}else t.lineTo(p[0],p[1]);c=d,d+=o}return f}function Gd(t,e){var i=[1/0,1/0],n=[-1/0,-1/0];if(e)for(var a=0;a<t.length;a++){var o=t[a];o[0]<i[0]&&(i[0]=o[0]),o[1]<i[1]&&(i[1]=o[1]),o[0]>n[0]&&(n[0]=o[0]),o[1]>n[1]&&(n[1]=o[1])}return{min:e?i:n,max:e?n:i}}function Fd(t,e){if(t.length===e.length){for(var i=0;i<t.length;i++){var n=t[i],a=e[i];if(n[0]!==a[0]||n[1]!==a[1])return}return!0}}function Wd(t){return"number"==typeof t?t:t?.5:0}function Hd(t,e,i){if(!i.valueDim)return[];for(var n=[],a=0,o=e.count();o>a;a++)n.push(Nd(i,t,e,a));return n}function Zd(t,e,i){for(var n=e.getBaseAxis(),a="x"===n.dim||"radius"===n.dim?0:1,o=[],r=0;r<t.length-1;r++){var s=t[r+1],l=t[r];o.push(l);var u=[];switch(i){case"end":u[a]=s[a],u[1-a]=l[1-a],o.push(u);break;case"middle":var h=(l[a]+s[a])/2,c=[];u[a]=c[a]=h,u[1-a]=l[1-a],c[1-a]=s[1-a],o.push(u),o.push(c);break;default:u[a]=l[a],u[1-a]=s[1-a],o.push(u)}}return t[r]&&o.push(t[r]),o}function Xd(t,e){var i=t.getVisual("visualMeta");if(i&&i.length&&t.count()&&"cartesian2d"===e.type){for(var n,a,o=i.length-1;o>=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 VT(0,0,0,0,h,!0);return x[n]=m,x[n+"2"]=v,x}}}function Ud(t,e,i){var n=t.get("showAllSymbol"),a="auto"===n;if(!n||a){var o=i.getAxesByScale("ordinal")[0];if(o&&(!a||!Yd(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 Yd(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*Md.getSymbolSize(e,r)[t.isHorizontal()?1:0]>n)return!1;return!0}function jd(t,e,i){if("cartesian2d"===t.type){var n=t.getBaseAxis().isHorizontal(),a=Bc(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 Vc(t,e,i)}function qd(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 Kd(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){$d(a.getItemGraphicEl(t),a.getItemLayout(t),e.isSelected(a.getName(t)),s,i)})}function $d(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 Jd(t,e){aM.call(this);var i=new ST({z2:2}),n=new DT,a=new xT;this.add(i),this.add(n),this.add(a),this.updateData(t,e,!0)}function Qd(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-i<l)&&(t[n].y-=i,!(n>0&&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 tf(t,e,i,n,a,o,r,s){for(var l=[],u=[],h=Number.MAX_VALUE,c=-Number.MAX_VALUE,d=0;d<t.length;d++)ef(t[d])||(t[d].x<e?(h=Math.min(h,t[d].x),l.push(t[d])):(c=Math.max(c,t[d].x),u.push(t[d])));Qd(u,e,i,n,1,a,o,r,s,c),Qd(l,e,i,n,-1,a,o,r,s,h);for(var d=0;d<t.length;d++){var f=t[d];if(!ef(f)){var p=f.linePoints;if(p){var g,m="edge"===f.labelAlignTo,v=f.textRect.width;g=m?f.x<e?p[2][0]-f.labelDistance-r-f.labelMargin:r+a-f.labelMargin-p[2][0]-f.labelDistance:f.x<e?f.x-r-f.bleedMargin:r+a-f.x-f.bleedMargin,g<f.textRect.width&&(f.text=$i(f.text,g,f.font),"edge"===f.labelAlignTo&&(v=Zi(f.text,f.font)));var y=p[1][0]-p[2][0];m?p[2][0]=f.x<e?r+f.labelMargin+v+f.labelDistance:r+a-f.labelMargin-v-f.labelDistance:(p[2][0]=f.x<e?f.x+f.labelDistance:f.x-f.labelDistance,p[1][0]=p[2][0]+y),p[1][1]=p[2][1]=f.y}}}}function ef(t){return"center"===t.position}function nf(t,e){return Qr(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function af(){this.group=new aM}function of(t){return _(t)||(t=[+t,+t]),t}function rf(t,e){var i=e.rippleEffectColor||e.color;t.eachChild(function(t){t.attr({z:e.z,zlevel:e.zlevel,style:{stroke:"stroke"===e.brushType?i:null,fill:"fill"===e.brushType?i:null}})})}function sf(t,e){aM.call(this);var i=new Md(t,e),n=new aM;this.add(i),this.add(n),n.beforeUpdate=function(){this.attr(i.getScale())},this.updateData(t,e)}function lf(t,e,i){var n=t.ends;return new bP({shape:{points:i?cf(n,t):n},z2:100})}function uf(t,e){for(var i=!0,n=0;n<e.ends.length;n++)if(t.contain(e.ends[n][0],e.ends[n][1])){i=!1;break}return i}function hf(t,e,i,n){var a=e.getItemModel(i),o=a.getModel(xP),r=e.getItemVisual(i,"color"),s=e.getItemVisual(i,"borderColor")||r,l=o.getItemStyle(wP);t.useStyle(l),t.style.strokeNoScale=!0,t.style.fill=r,t.style.stroke=s,t.__simpleBox=n;var u=a.getModel(_P).getItemStyle();Fo(t,u)}function cf(t,e){return p(t,function(t){return t=t.slice(),t[1]=e.initBaseline,t})}function df(t,e,i){var n=t.getData(),a=n.getLayout("largePoints"),o=new SP({shape:{points:a},__sign:1});e.add(o);var r=new SP({shape:{points:a},__sign:-1});e.add(r),ff(1,o,t,n),ff(-1,r,t,n),i&&(o.incremental=!0,r.incremental=!0)}function ff(t,e,i,n){var a=t>0?"P":"N",o=n.getVisual("borderColor"+a)||n.getVisual("color"+a),r=i.getModel(xP).getItemStyle(wP);e.useStyle(r),e.style.fill=null,e.style.stroke=o}function pf(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 gf(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=Mr(C(t.get("barMaxWidth"),a),a),r=Mr(C(t.get("barMinWidth"),1),a),s=t.get("barWidth");return null!=s?Mr(s,a):Math.max(Math.min(a/2,o),r)}function mf(t,e,i){UL.call(this,t,e,i),this.type="value",this.angle=0,this.name="",this.model}function vf(t,e,i){this._model=t,this.dimensions=[],this._indicatorAxes=p(t.getIndicatorModels(),function(t,e){var i="indicator_"+e,n=new mf(i,"log"===t.get("axisType")?new LL:new sL);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 yf(t,e){return s({show:e},t)}function xf(t){return _(t)||(t=[+t,+t]),t}function _f(t){return!isNaN(t[0])&&!isNaN(t[1])}function wf(t){return[t.cx,t.cy]}function bf(){var t=eS();this.canvas=t,this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={}}function Sf(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 Mf(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 If(t){var e=t.dimensions;return"lng"===e[0]&&"lat"===e[1]}function Tf(t){var e=t.mainData,i=t.datas;i||(i={main:e},t.datasAttr={main:"data"}),t.datas=t.mainData=null,Pf(e,i,t),BP(i,function(i){BP(e.TRANSFERABLE_METHODS,function(e){i.wrapMethod(e,x(Af,t))})}),e.wrapMethod("cloneShallow",x(Cf,t)),BP(e.CHANGABLE_METHODS,function(i){e.wrapMethod(i,x(Df,t))}),O(i[e.dataType]===e)}function Af(t,e){if(kf(this)){var i=r({},this[VP]);i[this.dataType]=e,Pf(e,i,t)}else Of(e,this.dataType,this[GP],t);return e}function Df(t,e){return t.struct&&t.struct.update(this),e}function Cf(t,e){return BP(e[VP],function(i,n){i!==e&&Of(i.cloneShallow(),n,e,t)}),e}function Lf(t){var e=this[GP];return null==t||null==e?e:e[VP][t]}function kf(t){return t[GP]===t}function Pf(t,e,i){t[VP]={},BP(e,function(e,n){Of(e,n,t,i)})}function Of(t,e,i,n){i[VP][e]=t,t[GP]=i,t.dataType=e,n.struct&&(t[n.structAttr]=n.struct,n.struct[n.datasAttr[e]]=t),t.getLinkedData=Lf}function Nf(t,e,i){this.root,this.data,this._nodes=[],this.hostModel=t,this.levelModels=p(e||[],function(e){return new mr(e,t,t.ecModel)}),this.leavesModel=new mr(i||{},t,t.ecModel)}function Ef(t,e){var i=e.children;t.parentNode!==e&&(i.push(t),t.parentNode=e)}function zf(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 Rf(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){Wf(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=Hf(t,a,t.parentNode.hierNode.defaultAncestor||n[0],e)}function Bf(t){var e=t.hierNode.prelim+t.parentNode.hierNode.modifier;t.setLayout({x:e},!0),t.hierNode.modifier+=t.parentNode.hierNode.modifier}function Vf(t){return arguments.length?t:jf}function Gf(t,e){var i={};return t-=Math.PI/2,i.x=e*Math.cos(t),i.y=e*Math.sin(t),i}function Ff(t,e){return Qr(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function Wf(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 Hf(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=Zf(s),o=Xf(o),s&&o;){a=Zf(a),r=Xf(r),a.hierNode.ancestor=t;var d=s.hierNode.prelim+c-o.hierNode.prelim-u+n(s,o);d>0&&(Yf(Uf(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&&!Zf(a)&&(a.hierNode.thread=s,a.hierNode.modifier+=c-l),o&&!Xf(r)&&(r.hierNode.thread=o,r.hierNode.modifier+=u-h,i=t)}return i}function Zf(t){var e=t.children;return e.length&&t.isExpand?e[e.length-1]:t.hierNode.thread}function Xf(t){var e=t.children;return e.length&&t.isExpand?e[0]:t.hierNode.thread}function Uf(t,e,i){return t.hierNode.ancestor.parentNode===e.parentNode?t.hierNode.ancestor:i}function Yf(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 jf(t,e){return t.parentNode===e.parentNode?1:2}function qf(){CS.call(this)}function Kf(t){this.name=t,this.zoomLimit,CS.call(this),this._roamTransformable=new qf,this._rawTransformable=new qf,this._center,this._zoom}function $f(t,e,i,n){var a=i.seriesModel,o=a?a.coordinateSystem:null;return o===this?o[t](n):null}function Jf(t,e,i){var n=t.target,a=n.position;a[0]+=e,a[1]+=i,n.dirty()}function Qf(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 tp(t,e,i){var n=np(t);n[e]=i}function ep(t,e,i){var n=np(t),a=n[e];a===i&&(n[e]=null)}function ip(t,e){return!!np(t)[e]}function np(t){return t[HP]||(t[HP]={})}function ap(t){this.pointerChecker,this._zr=t,this._opt={};var e=y,i=e(op,this),a=e(rp,this),o=e(sp,this),r=e(lp,this),l=e(up,this);dS.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 op(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 rp(t){if(this._dragging&&dp("moveOnMouseMove",t,this._opt)&&"pinch"!==t.gestureEvent&&!ip(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&&xS(t.event),cp(this,"pan","moveOnMouseMove",t,{dx:o,dy:r,oldX:n,oldY:a,newX:e,newY:i})}}function sp(t){Ie(t)||(this._dragging=!1)}function lp(t){var e=dp("zoomOnMouseWheel",t,this._opt),i=dp("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;hp(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);hp(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:h,originX:o,originY:r})}}}function up(t){if(!ip(this._zr,"globalPan")){var e=t.pinchScale>1?1.1:1/1.1;hp(this,"zoom",null,t,{scale:e,originX:t.pinchX,originY:t.pinchY})}}function hp(t,e,i,n,a){t.pointerChecker&&t.pointerChecker(n,a.originX,a.originY)&&(xS(n.event),cp(t,e,i,n,a))}function cp(t,e,i,n,a){a.isAvailableBehavior=y(dp,null,i,n),t.trigger(e,a)}function dp(t,e,i){var n=i[t];return!t||n&&(!b(n)||e.event[n+"Key"])}function fp(t,e,i){var n=e.getComponentByElement(t.topTarget),a=n&&n.coordinateSystem;return n&&n!==i&&!ZP[n.mainType]&&a&&a.model!==i}function pp(t,e){var i=t.getItemLayout(e);return i&&!isNaN(i.x)&&!isNaN(i.y)&&"none"!==t.getItemVisual(e,"symbol")}function gp(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 mp(t,e,i,n,a,o){var r=!i,s=t.tree.getNodeByDataIndex(e),l=s.getModel(),o=gp(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 Md(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),nr(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.x<x.x,v&&(m-=Math.PI)}else m=Math.atan2(p.y-x.y,p.x-x.x),0>m&&(m=2*Math.PI+m),0===s.children.length||0!==s.children.length&&s.isExpand===!1?(v=p.x<x.x,v&&(m-=Math.PI)):(v=p.x>x.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"})}vp(a,s,u,i,f,d,p,n,o)}function vp(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 ET({shape:xp(u,a,a),style:s({opacity:0,strokeNoScale:!0},u.lineStyle)})),nr(c,{shape:xp(u,o,r),style:{opacity:1}},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<d.length;p++){var g=d[p].getLayout();f.push([g.x,g.y])}c||(c=n.__edge=new XP({shape:{parentPoint:[r.x,r.y],childPoints:[[r.x,r.y]],orient:u.orient,forkPosition:u.edgeForkPosition},style:s({opacity:0,strokeNoScale:!0},u.lineStyle)})),nr(c,{shape:{parentPoint:[r.x,r.y],childPoints:f},style:{opacity:1}},t)}l.add(c)}function yp(t,e,i,n,a,o){for(var r,s=t.tree.getNodeByDataIndex(e),l=t.tree.root,u=s.getModel(),o=gp(s,u,o),h=s.parentNode===l?s:s.parentNode||s,c=o.edgeShape;r=h.getLayout(),null==r;)h=h.parentNode===l?h:h.parentNode||h;nr(i,{position:[r.x+1,r.y+1]},a,function(){n.remove(i),t.setItemGraphicEl(e,null)}),i.fadeOut(null,{keepLabel:!0});var d=t.getItemGraphicEl(h.dataIndex),f=d.__edge,p=i.__edge||(h.isExpand===!1||1===h.children.length?f:void 0),c=o.edgeShape;p&&("curve"===c?nr(p,{shape:xp(o,r,r),style:{opacity:0}},a,function(){n.remove(p)}):"polyline"===c&&"orthogonal"===o.layout&&nr(p,{shape:{parentPoint:[r.x,r.y],childPoints:[[r.x,r.y]]},style:{opacity:0}},a,function(){n.remove(p)}))}function xp(t,e,i){var n,a,o,r,s,l,u,h,c=t.orient;if("radial"===t.layout){s=e.rawX,u=e.rawY,l=i.rawX,h=i.rawY;var d=Gf(s,u),f=Gf(s,u+(h-u)*t.curvature),p=Gf(l,h+(u-h)*t.curvature),g=Gf(l,h);return{x1:d.x,y1:d.y,x2:g.x,y2:g.y,cpx1:f.x,cpy1:f.y,cpx2:p.x,cpy2:p.y}}return s=e.x,u=e.y,l=i.x,h=i.y,("LR"===c||"RL"===c)&&(n=s+(l-s)*t.curvature,a=u,o=l+(s-l)*t.curvature,r=h),("TB"===c||"BT"===c)&&(n=s,a=u+(h-u)*t.curvature,o=l,r=h+(u-h)*t.curvature),{x1:s,y1:u,x2:l,y2:h,cpx1:n,cpy1:a,cpx2:o,cpy2:r}}function _p(t,e,i){var n=t.getZoom(),a=t.getCenter(),o=e.zoom,r=t.dataToPoint(a);if(null!=e.dx&&null!=e.dy){r[0]-=e.dx,r[1]-=e.dy;var a=t.pointToData(r);t.setCenter(a)}if(null!=o){if(i){var s=i.min||0,l=i.max||1/0;o=Math.max(Math.min(n*o,l),s)/n}t.scale[0]*=o,t.scale[1]*=o;var u=t.position,h=(e.originX-u[0])*(o-1),c=(e.originY-u[1])*(o-1);u[0]-=h,u[1]-=c,t.updateTransform();var a=t.pointToData(r);t.setCenter(a),t.setZoom(o*n)}return{center:t.getCenter(),zoom:t.getZoom()}}function wp(t,e,i){for(var n,a=[t],o=[];n=a.pop();)if(o.push(n),n.isExpand){var r=n.children;if(r.length)for(var s=0;s<r.length;s++)a.push(r[s])}for(;n=o.pop();)e(n,i)}function bp(t,e){for(var i,n=[t];i=n.pop();)if(e(i),i.isExpand){var a=i.children;if(a.length)for(var o=a.length-1;o>=0;o--)n.push(a[o])}}function Sp(t,e){var i=Ff(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=Vf(function(t,e){return(t.parentNode===e.parentNode?1:2)/t.depth})):(a=i.width,o=i.height,r=Vf());var s=t.getData().tree.root,l=s.children[0];if(l){zf(s),wp(l,Rf,r),s.hierNode.modifier=-l.hierNode.prelim,bp(l,Bf);var u=l,h=l,c=l;bp(l,function(t){var e=t.getLayout().x;e<u.getLayout().x&&(u=t),e>h.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),bp(l,function(t){m=(t.getLayout().x+f)*p,v=(t.depth-1)*g;var e=Gf(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),bp(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),bp(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 Mp(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 Ip(t){for(var e=[];t;)t=t.parentNode,t&&e.push(t);return e.reverse()}function Tp(t,e){var i=Ip(t);return u(i,e)>=0}function Ap(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 Dp(t){var e=0;f(t.children,function(t){Dp(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 Cp(t,e){var i=e.get("color");if(i){t=t||[];var n;if(f(t,function(t){var e=new mr(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 Lp(t){this.group=new aM,t.add(this.group)}function kp(t,e,i,n,a,o){var r=[[a?t:t-qP,e],[t+i,e],[t+i,e+n],[a?t:t-qP,e+n]];return!o&&r.splice(2,0,[t+i+qP,e+n/2]),!a&&r.push([t,e+n/2]),r}function Pp(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&&Ap(i,e)}}function Op(){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 Np(){return{nodeGroup:[],background:[],content:[]}}function Ep(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:w,height:b}),M)p(i);else{i.invisible=!1;var a=l.getVisual("borderColor",!0),o=P.get("borderColor"),r=uO(k);r.fill=a;var s=lO(P);if(s.fill=o,n){var u=w-2*S;g(r,s,a,u,C,{x:S,y:0,width:u,height:C})}else r.text=s.text=null;i.setStyle(r),Eo(i,s)}e.add(i)}function f(e,i){i.dataIndex=l.dataIndex,i.seriesIndex=t.seriesIndex;var n=Math.max(w-2*S,0),a=Math.max(b-2*S,0);if(i.culling=!0,i.setShape({x:S,y:S,width:n,height:a}),M)p(i);else{i.invisible=!1;var o=l.getVisual("color",!0),r=uO(k);r.fill=o;var s=lO(P);g(r,s,o,n,a),i.setStyle(r),Eo(i,s)}e.add(i)}function p(t){!t.invisible&&s.push(t)}function g(e,i,a,o,r,s){var u=D(t.getFormattedLabel(l.dataIndex,"normal",null,null,s?"upperLabel":"label"),N.get("name"));if(!s&&x.isLeafRoot){var h=t.get("drillDownIcon",!0);u=h?h+" "+u:u}var c=N.getModel(s?nO:eO),d=N.getModel(s?aO:iO),f=c.getShallow("show");Xo(e,i,c,d,{defaultText:f?u:null,autoColor:a,isRectText:!0}),s&&(e.textRect=n(s)),e.truncate=f&&c.get("ellipsis")?{outerWidth:o,outerHeight:r,minChar:2}:null}function m(t,n,a,r){var s=null!=T&&i[t][T],l=o[t];return s?(i[t][T]=null,v(l,s,t)):M||(s=new n({z:zp(a,r)}),s.__tmDepth=a,s.__tmStorageName=t,y(l,s,t)),e[t][I]=s}function v(t,e,i){var n=t[I]={};n.old="nodeGroup"===i?e.position.slice():r({},e.shape)}function y(t,e,i){var n=t[I]={},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 x=l.getLayout(),_=t.getData();if(_.setItemGraphicEl(l.dataIndex,null),x&&x.isInView){var w=x.width,b=x.height,S=x.borderWidth,M=x.invisible,I=l.getRawIndex(),T=u&&u.getRawIndex(),A=l.viewChildren,C=x.upperHeight,L=A&&A.length,k=l.getModel("itemStyle"),P=l.getModel("emphasis.itemStyle"),O=m("nodeGroup",$P);if(O){if(h.add(O),O.attr("position",[x.x||0,x.y||0]),O.__tmNodeWidth=w,O.__tmNodeHeight=b,x.isAboveViewRoot)return O;var N=l.getModel(),E=m("background",JP,c,rO);if(E&&d(O,E,L&&x.upperHeight),L)Ho(O)&&Wo(O,!1),E&&(Wo(E,!0),_.setItemGraphicEl(l.dataIndex,E));else{var z=m("content",JP,c,sO);z&&f(O,z),E&&Ho(E)&&Wo(E,!1),Wo(O,!0),_.setItemGraphicEl(l.dataIndex,O)}return O}}}}function zp(t,e){var i=t*oO+e;return(i-1)/i}function Rp(t){var e=t.pieceList;t.hasSpecialVisual=!1,f(e,function(e,i){e.originIndex=i,null!=e.visual&&(t.hasSpecialVisual=!0)})}function Bp(t){var e=t.categories,i=t.visual,n=t.categoryMap={};if(fO(e,function(t,e){n[t]=e}),!_(i)){var a=[];S(i)?fO(i,function(t,e){var i=n[e];a[null!=i?i:gO]=t}):a[gO]=i,i=Yp(t,a)}for(var o=e.length-1;o>=0;o--)null==i[o]&&(delete n[e[o]],e.pop())}function Vp(t,e){var i=t.visual,n=[];S(i)?fO(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]),Yp(t,n)
}function Gp(t){return{applyVisual:function(e,i,n){e=this.mapValueToVisual(e),n("color",t(i("color"),e))},_doMap:Xp([0,1])}}function Fp(t){var e=this.option.visual;return e[Math.round(Sr(t,[0,1],[0,e.length-1],!0))]||{}}function Wp(t){return function(e,i,n){n(t,this.mapValueToVisual(e))}}function Hp(t){var e=this.option.visual;return e[this.option.loop&&t!==gO?t%e.length:t]}function Zp(){return this.option.visual[0]}function Xp(t){return{linear:function(e){return Sr(e,t,this.option.visual,!0)},category:Hp,piecewise:function(e,i){var n=Up.call(this,i);return null==n&&(n=Sr(e,t,this.option.visual,!0)),n},fixed:Zp}}function Up(t){var e=this.option,i=e.pieceList;if(e.hasSpecialVisual){var n=mO.findPieceIndex(t,i),a=i[n];if(a&&a.visual)return a.visual[this.type]}}function Yp(t,e){return t.visual=e,"color"===t.type&&(t.parsedVisual=p(e,function(t){return ti(t)})),e}function jp(t,e,i){return t?i>=e:i>e}function qp(t,e,i,n,a,o){var r=t.getModel(),s=t.getLayout();if(s&&!s.invisible&&s.isInView){var l,u=t.getModel(_O),h=i[t.depth],c=Kp(u,e,h,n),d=u.get("borderColor"),p=u.get("borderColorSaturation");null!=p&&(l=$p(c,t),d=Jp(p,l)),t.setVisual("borderColor",d);var g=t.viewChildren;if(g&&g.length){var m=tg(t,r,s,u,c,g);f(g,function(t,e){if(t.depth>=a.length||t===a[t.depth]){var s=ig(r,c,t,e,m,o);qp(t,s,i,n,a,o)}})}else l=$p(c,t),t.setVisual("color",l)}}function Kp(t,e,i,n){var a=r({},e);return f(["color","colorAlpha","colorSaturation"],function(o){var r=t.get(o,!0);null==r&&i&&(r=i[o]),null==r&&(r=e[o]),null==r&&(r=n.get(o)),null!=r&&(a[o]=r)}),a}function $p(t){var e=Qp(t,"color");if(e){var i=Qp(t,"colorAlpha"),n=Qp(t,"colorSaturation");return n&&(e=si(e,null,null,n)),i&&(e=li(e,i)),e}}function Jp(t,e){return null!=e?si(e,null,null,t):null}function Qp(t,e){var i=t[e];return null!=i&&"none"!==i?i:void 0}function tg(t,e,i,n,a,o){if(o&&o.length){var r=eg(e,"color")||null!=a.color&&"none"!==a.color&&(eg(e,"colorAlpha")||eg(e,"colorSaturation"));if(r){var s=e.get("visualMin"),l=e.get("visualMax"),u=i.dataExtent.slice();null!=s&&s<u[0]&&(u[0]=s),null!=l&&l>u[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 mO(c);return d.__drColorMappingBy=h,d}}}function eg(t,e){var i=t.get(e);return xO(i)&&i.length?{name:e,range:i}:null}function ig(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 ng(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(TO),u=s.get(AO)/2,h=fg(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=bO(a-2*d,0),o=bO(o-d-f,0);var p=a*o,g=ag(t,s,p,e,i,n);if(g.length){var m={x:d,y:f,width:a,height:o},v=SO(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=lg(x,v,e.squareRatio);y>=S?(_++,y=S):(x.area-=x.pop().getLayout().area,ug(x,v,m,u,!1),v=SO(m.width,m.height),x.length=x.area=0,y=1/0)}if(x.length&&ug(x,v,m,u,!0),!i){var M=s.get("childrenVisibleMin");null!=M&&M>p&&(i=!0)}for(var _=0,w=g.length;w>_;_++)ng(g[_],e,i,n+1)}}}function ag(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()}),rg(r,s);var u=sg(e,r,s);if(0===u.sum)return t.viewChildren=[];if(u.sum=og(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 og(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 rg(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 sg(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];IO(e,function(t){var e=t.getValue(s);e<r[0]&&(r[0]=e),e>r[1]&&(r[1]=e)})}else r=[0/0,0/0];return{sum:n,dataExtent:r}}function lg(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?bO(u*a/l,l/(u*o)):1/0}function ug(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]]=bO(h-2*n,0),v=i[s[o]]+i[l[o]]-u,y=c===d-1||g>v?v:g,x=p[l[o]]=bO(y-2*n,0);p[s[r]]=i[s[r]]+SO(n,m/2),p[s[o]]=u+SO(n,x/2),u+=y,f.setLayout(p,!0)}i[s[r]]+=h,i[l[r]]-=h}function hg(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(TO),v=Math.max(m,fg(g,m));u+=4*m*m+(3*m+v)*Math.pow(u,.5),u>cA&&(u=cA),o=s}l>u&&(u=l);var y=Math.pow(u/l,.5);return[n*y,a*y]}function cg(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 dg(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);IO(t.viewChildren||[],function(t){dg(t,l,i,n,a+1)})}}function fg(t){return t.get(DO)?t.get(CO):0}function pg(t){var e=0;f(t.children,function(t){pg(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 gg(t,e,i){function n(){r.ignore=r.hoverIgnore}function a(){r.ignore=r.normalIgnore}aM.call(this);var o=new ST({z2:PO});o.seriesIndex=e.seriesIndex;var r=new xT({z2:OO,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 mg(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[vg(t)%r]}function vg(t){for(var e=t;e.depth>1;)e=e.parentNode;var i=t.getAncestors()[0];return u(i.children,e)}function yg(t,e,i){return i===kO.NONE?!1:i===kO.SELF?t===e:i===kO.ANCESTOR?t===e||t.isAncestorOf(e):t===e||t.isDescendantOf(e)}function xg(t,e,i){var n=e.getData();n.setItemVisual(t.dataIndex,"color",i)}function _g(t,e){var i=t.children||[];t.children=wg(i,e),i.length&&f(t.children,function(t){_g(t,e)})}function wg(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 bg(t){for(var e,i=0;i<t.length;i++){var n=t[i].getBoundingRect();e=e||n.clone(),e.union(n)}return e}function Sg(t,e){var i,n,a=t.svgXML;try{i=a&&jl(a,{ignoreViewBox:!0,ignoreRootClip:!0})||{},n=i.root,O(null!=n)}catch(o){throw new Error("Invalid svg format\n"+o.message)}var r=i.width,s=i.height,l=i.viewBoxRect;if(e||(e=null==r||null==s?n.getBoundingRect():new Ti(0,0,0,0),null!=r&&(e.width=r),null!=s&&(e.height=s)),l){var u=Yl(l,e.width,e.height),h=n;n=new aM,n.add(h),h.scale=u.scale,h.position=u.position}return n.setClipPath(new kT({shape:e.plain()})),{root:n,boundingRect:e}}function Mg(t){return function(e,i){var n=Ig(e),a=[];return f(n,function(n){var o=iN[n.type][t];o&&a.push(o(e,n,i))}),a}}function Ig(t){var e=$D.retrieveMap(t)||[];return e}function Tg(t){var e=t.getItemStyle(),i=t.get("areaColor");return null!=i&&(e.fill=i),e}function Ag(t,e,i,n,a){i.off("click"),i.off("mousedown"),e.get("selectedMode")&&(i.on("mousedown",function(){t._mouseDownFlag=!0}),i.on("click",function(o){if(t._mouseDownFlag){t._mouseDownFlag=!1;for(var r=o.target;!r.__regions;)r=r.parent;if(r){var s={type:("geo"===e.mainType?"geo":"map")+"ToggleSelect",batch:p(r.__regions,function(t){return{name:t.name,from:a.uid}})};s[e.mainType+"Id"]=e.id,n.dispatchAction(s),Dg(e,i)}}}))}function Dg(t,e){e.eachChild(function(e){f(e.__regions,function(i){e.trigger(t.isSelected(i.name)?"emphasis":"normal")})})}function Cg(t,e){var i=new aM;this.uid=xr("ec_map_draw"),this._controller=new ap(t.getZr()),this._controllerHost={target:e?i:null},this.group=i,this._updateGroup=e,this._mouseDownFlag,this._mapName,this._initialized,i.add(this._regionsGroup=new aM),i.add(this._backgroundGroup=new aM)}function Lg(t){var e=this[oN];e&&e.recordVersion===this[rN]&&kg(e,t)}function kg(t,e){var i=t.circle,n=t.labelModel,a=t.hoverLabelModel,o=t.emphasisText,r=t.normalText;e?(i.style.extendFrom(Yo({},a,{text:a.get("show")?o:null},{isRectText:!0,useInsideStyle:!1},!0)),i.__mapOriginalZ2=i.z2,i.z2+=XT):(Yo(i.style,n,{text:n.get("show")?r:null,textPosition:n.getShallow("position")||"bottom"},{isRectText:!0,useInsideStyle:!1}),i.dirty(!1),null!=i.__mapOriginalZ2&&(i.z2=i.__mapOriginalZ2,i.__mapOriginalZ2=null))}function Pg(t,e,i,n){Kf.call(this,t),this.map=e;var a=nN.load(e,i);this._nameCoordMap=a.nameCoordMap,this._regionsMap=a.regionsMap,this._invertLongitute=null==n?!0:n,this.regions=a.regions,this._rect=a.boundingRect}function Og(t,e,i,n){var a=i.geoModel,o=i.seriesModel,r=a?a.coordinateSystem:o?o.coordinateSystem||(o.getReferringComponents("geo")[0]||{}).coordinateSystem:null;return r===this?r[t](n):null}function Ng(t,e){var i=t.get("boundingCoords");if(null!=i){var n=i[0],a=i[1];isNaN(n[0])||isNaN(n[1])||isNaN(a[0])||isNaN(a[1])||this.setBoundingRect(n[0],n[1],a[0]-n[0],a[1]-n[1])}var o,r=this.getBoundingRect(),s=t.get("layoutCenter"),l=t.get("layoutSize"),u=e.getWidth(),h=e.getHeight(),c=r.width/r.height*this.aspectScale,d=!1;s&&l&&(s=[Mr(s[0],u),Mr(s[1],h)],l=Mr(l,Math.min(u,h)),isNaN(s[0])||isNaN(s[1])||isNaN(l)||(d=!0));var f;if(d){var f={};c>1?(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=Qr(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 Eg(t,e){f(e.get("geoCoord"),function(e,i){t.addGeoCoord(i,e)})}function zg(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 Rg(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 Bg(t){return isNaN(+t.cpx1)||isNaN(+t.cpy1)}function Vg(t){return"_"+t+"Type"}function Gg(t,e,i){var n=e.getItemVisual(i,"color"),a=e.getItemVisual(i,t),o=e.getItemVisual(i,t+"Size");if(a&&"none"!==a){_(o)||(o=[o,o]);var r=tc(a,-o[0]/2,-o[1]/2,o[0],o[1],n);return r.name=t,r}}function Fg(t){var e=new vN({name:"line",subPixelOptimize:!0});return Wg(e.shape,t),e}function Wg(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 Hg(){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=r.tangentAt(0);e.attr("rotation",Math.PI/2-Math.atan2(c[1],c[0])),e.attr("scale",[a*s,a*s])}if(i){i.attr("position",u);var c=r.tangentAt(1);i.attr("rotation",-Math.PI/2-Math.atan2(c[1],c[0])),i.attr("scale",[a*s,a*s])}if(!n.ignore){n.attr("position",u);var d,f,p,g,m=n.__labelDistance,v=m[0]*a,y=m[1]*a,x=s/2,c=r.tangentAt(x),_=[c[1],-c[0]],w=r.pointAt(x);_[1]>0&&(_[0]=-_[0],_[1]=-_[1]);var b=c[0]<0?-1:1;if("start"!==n.__position&&"end"!==n.__position){var S=-Math.atan2(c[1],c[0]);u[0]<l[0]&&(S=Math.PI+S),n.attr("rotation",S)}var M;switch(n.__position){case"insideStartTop":case"insideMiddleTop":case"insideEndTop":case"middle":M=-y,p="bottom";break;case"insideStartBottom":case"insideMiddleBottom":case"insideEndBottom":M=y,p="top";break;default:M=0,p="middle"}switch(n.__position){case"end":d=[h[0]*v+u[0],h[1]*y+u[1]],f=h[0]>.8?"left":h[0]<-.8?"right":"center",p=h[1]>.8?"top":h[1]<-.8?"bottom":"middle";break;case"start":d=[-h[0]*v+l[0],-h[1]*y+l[1]],f=h[0]>.8?"right":h[0]<-.8?"left":"center",p=h[1]>.8?"bottom":h[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":d=[v*b+l[0],l[1]+M],f=c[0]<0?"right":"left",g=[-v*b,-M];break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":d=[w[0],w[1]+M],f="center",g=[0,-M];break;case"insideEndTop":case"insideEnd":case"insideEndBottom":d=[-v*b+u[0],u[1]+M],f=c[0]>=0?"right":"left",g=[v*b,-M]}n.attr({style:{textVerticalAlign:n.__verticalAlign||p,textAlign:n.__textAlign||f},position:d,scale:[a,a],origin:g})}}}}function Zg(t,e,i){aM.call(this),this._createLine(t,e,i)}function Xg(t){this._ctor=t||Zg,this.group=new aM}function Ug(t,e,i,n){var a=e.getItemLayout(i);if(Kg(a)){var o=new t._ctor(e,i,n);e.setItemGraphicEl(i,o),t.group.add(o)}}function Yg(t,e,i,n,a,o){var r=e.getItemGraphicEl(n);return Kg(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 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 Kg(t){return!qg(t[0])&&!qg(t[1])}function $g(t,e,i){aM.call(this),this.add(this.createLine(t,e,i)),this._updateEffectSymbol(t,e)}function Jg(t,e,i){aM.call(this),this._createPolyline(t,e,i)}function Qg(t,e,i){$g.call(this,t,e,i),this._lastFrame=0,this._lastFramePercent=0}function tm(){this.group=new aM}function em(t){return t instanceof Array||(t=[t,t]),t}function im(t){return"_EC_"+t}function nm(t,e){this.id=null==t?"":t,this.inEdges=[],this.outEdges=[],this.edges=[],this.hostGraph,this.dataIndex=null==e?-1:e}function am(t,e,i){this.node1=t,this.node2=e,this.dataIndex=null==i?-1:i}function om(t){var e=t.coordinateSystem;if("view"!==e.type)return 1;var i=t.option.nodeScaleRatio,n=e.scale,a=n&&n[0]||1,o=e.getZoom(),r=(o-1)*i+1;return r/a}function rm(t){var e=t.getVisual("symbolSize");return e instanceof Array&&(e=(e[0]+e[1])/2),+e}function sm(t,e,i){for(var n,a=t[0],o=t[1],r=t[2],s=1/0,l=i*i,u=.1,h=.1;.9>=h;h+=.1){NN[0]=RN(a[0],o[0],r[0],h),NN[1]=RN(a[1],o[1],r[1],h);var c=VN(BN(NN,e)-l);s>c&&(s=c,n=h)}for(var d=0;32>d;d++){var f=n+u;EN[0]=RN(a[0],o[0],r[0],n),EN[1]=RN(a[1],o[1],r[1],n),zN[0]=RN(a[0],o[0],r[0],f),zN[1]=RN(a[1],o[1],r[1],f);var c=BN(EN,e)-l;if(VN(c)<.01)break;var p=BN(zN,e)-l;u/=2,0>c?p>=0?n+=u:n-=u:p>=0?n-=u:n+=u}return n}function lm(t,e){var i=t.getVisual("opacity");return null!=i?i:t.getModel().get(e)}function um(t,e,i){var n=t.getGraphicEl(),a=lm(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 hm(t,e){var i=lm(t,e),n=t.getGraphicEl();n.traverse(function(t){!t.isGroup&&t.setStyle("opacity",i)}),n.highlight&&n.highlight()}function cm(t){return t instanceof Array||(t=[t,t]),t}function dm(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")])}),fm(i)}}function fm(t){t.eachEdge(function(t){var e=t.getModel().get("lineStyle.curveness")||0,i=H(t.node1.getLayout()),n=H(t.node2.getLayout()),a=[i,n];+e&&a.push([(i[0]+n[0])/2-(i[1]-n[1])*e,(i[1]+n[1])/2-(n[0]-i[0])*e]),t.setLayout(a)})}function pm(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&&(JN[e](t,i,o,a,l,r,s,u),o.eachEdge(function(t){var e,i=t.getModel().get("lineStyle.curveness")||0,n=H(t.node1.getLayout()),a=H(t.node2.getLayout()),o=(n[0]+a[0])/2,l=(n[1]+a[1])/2;+i&&(i*=3,e=[r*i+o*(1-i),s*i+l*(1-i)]),t.setLayout([n,a,e])}))}}function gm(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;l<t.length;l++){var u=t[l];u.p||(u.p=F(a*(Math.random()-.5)+r[0],o*(Math.random()-.5)+r[1])),u.pp=H(u.p),u.edges=null}var h=null==i.friction?.6:i.friction,c=h;return{warmUp:function(){c=.8*h},setFixed:function(e){t[e].fixed=!0},setUnfixed:function(e){t[e].fixed=!1},step:function(i){for(var n=[],a=t.length,o=0;o<e.length;o++){var l=e[o];if(!l.ignoreForceLayout){var u=l.n1,h=l.n2;Y(n,h.p,u.p);var d=j(n)-l.d,f=h.w/(u.w+h.w);isNaN(f)&&(f=0),te(n,n),!u.fixed&&tE(u.p,u.p,n,f*d*c),!h.fixed&&tE(h.p,h.p,n,-(1-f)*d*c)}}for(var o=0;a>o;o++){var p=t[o];p.fixed||(Y(n,r,p.p),tE(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&&tE(u.pp,u.pp,n,m),!h.fixed&&tE(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),tE(p.p,p.p,v,c),W(p.pp,p.p))}c=.992*c,i&&i(t,e,.01>c)}}}function mm(t,e,i){var n=t.getBoxLayoutParams();return n.aspect=i,Qr(n,{width:e.getWidth(),height:e.getHeight()})}function vm(t,e,i,n,a){var o=t.ends,r=new rE({shape:{points:a?xm(o,n,t):o}});return ym(t,r,e,i,a),r}function ym(t,e,i,n,a){var o=i.hostModel,r=iA[a?"initProps":"updateProps"];r(e,{shape:{points:t.ends}},o,n);var s=i.getItemModel(n),l=s.getModel(aE),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(oE).getItemStyle();Fo(e,c)}function xm(t,e,i){return p(t,function(t){return t=t.slice(),t[e]=i.initBaseline,t})}function _m(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 wm(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;uE(a,function(t){u=Math.max(u,t.getData().count())}),e=n.getExtent(),Math.abs(e[1]-e[0])/u}uE(a,function(t){var e=t.get("boxWidth");_(e)||(e=[e,e]),l.push([Mr(e[0],i)||0,Mr(e[1],i)||0])});var h=.8*i-2,c=h/o*.3,d=(h-c*(o-1))/o,f=d/2-h/2;uE(a,function(t,e){s.push(f),f+=c+d,r.push(Math.min(Math.max(d,l[e][0]),l[e][1]))})}function bm(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;p<s.count();p++){var g=s.get(d,p),m=n(g,f[2],p),v=n(g,f[0],p),y=n(g,f[1],p),x=n(g,f[3],p),_=n(g,f[4],p),w=[];a(w,y,0),a(w,x,1),w.push(v,y,_,x),o(w,v),o(w,_),o(w,m),s.setItemLayout(p,{initBaseline:m[h],ends:w})}}function Sm(t){if(!t.parallel){var e=!1;f(t.series,function(t){t&&"parallel"===t.type&&(e=!0)}),e&&(t.parallel=[{}])}}function Mm(t){var e=ta(t.parallelAxis);f(e,function(e){if(S(e)){var i=e.parallelIndex||0,n=ta(t.parallel)[i];n&&n.parallelAxisDefault&&a(e,n.parallelAxisDefault,!1)}})}function Im(t,e){var i=t[e]-t[1-e];return{span:Math.abs(i),sign:i>0?-1:0>i?1:e?-1:1}}function Tm(t,e){return Math.min(null!=e[1]?e[1]:1/0,Math.max(null!=e[0]?e[0]:-1/0,t))}function Am(t,e,i){this._axesMap=B(),this._axesLayout={},this.dimensions=t.dimensions,this._rect,this._model=t,this._init(t,e,i)}function Dm(t,e){return gE(mE(t,e[0]),e[1])}function Cm(t,e){var i=e.layoutLength/(e.axisCount-1);return{position:i*t,axisNameAvailableWidth:i,axisLabelShow:!0}}function Lm(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 t<l[0]?(i=t*s,n=s):t<=l[1]?(i=e.axisExpandWindow0Pos+t*o-e.axisExpandWindow[0],u=o,h=!0):(i=a-(r-1-t)*s,n=s),{position:i,axisNameAvailableWidth:u,axisLabelShow:h,nameTruncateMaxWidth:n}}function km(t,e){var i=[];return t.eachComponent("parallel",function(n,a){var o=new Am(n,t,e);o.name="parallel_"+a,o.resize(n,e),n.coordinateSystem=o,o.model=n,i.push(o)}),t.eachSeries(function(e){if("parallel"===e.get("coordinateSystem")){var i=t.queryComponents({mainType:"parallel",index:e.get("parallelIndex"),id:e.get("parallelId")})[0];e.coordinateSystem=i.coordinateSystem}}),i}function Pm(t,e){return e.type||(e.data?"category":"value")}function Om(t){dS.call(this),this._zr=t,this.group=new aM,this._brushType,this._brushOption,this._panels,this._track=[],this._dragging,this._covers=[],this._creatingCover,this._creatingPanel,this._enableGlobalPan,this._uid="brushController_"+RE++,this._handlers={},IE(BE,function(t,e){this._handlers[e]=y(t,this)},this)}function Nm(t,e){var i=t._zr;t._enableGlobalPan||tp(i,OE,t._uid),zm(i,t._handlers),t._brushType=e.brushType,t._brushOption=a(n(zE),e,!0)}function Em(t){var e=t._zr;ep(e,OE,t._uid),Rm(e,t._handlers),t._brushType=t._brushOption=null}function zm(t,e){IE(e,function(e,i){t.on(i,e)})}function Rm(t,e){IE(e,function(e,i){t.off(i,e)})}function Bm(t,e){var i=VE[e.brushType].createCover(t,e);return i.__brushOption=e,Fm(i,e),t.group.add(i),i}function Vm(t,e){var i=Hm(e);return i.endCreating&&(i.endCreating(t,e),Fm(e,e.__brushOption)),e}function Gm(t,e){var i=e.__brushOption;Hm(e).updateCoverShape(t,e,i.range,i)}function Fm(t,e){var i=e.z;null==i&&(i=LE),t.traverse(function(t){t.z=i,t.z2=i})}function Wm(t,e){Hm(e).updateCommon(t,e),Gm(t,e)}function Hm(t){return VE[t.__brushOption.brushType]}function Zm(t,e,i){var n=t._panels;if(!n)return!0;var a,o=t._transform;return IE(n,function(t){t.isTargetByCursor(e,i,o)&&(a=t)}),a}function Xm(t,e){var i=t._panels;if(!i)return!0;var n=e.__brushOption.panelId;return null!=n?i[n]:!0}function Um(t){var e=t._covers,i=e.length;return IE(e,function(e){t.group.remove(e)},t),e.length=0,!!i}function Ym(t,e){var i=TE(t._covers,function(t){var e=t.__brushOption,i=n(e.range);return{brushType:e.brushType,panelId:e.panelId,range:i}});t.trigger("brush",i,{isEnd:!!e.isEnd,removeOnClick:!!e.removeOnClick})}function jm(t){var e=t._track;if(!e.length)return!1;var i=e[e.length-1],n=e[0],a=i[0]-n[0],o=i[1]-n[1],r=CE(a*a+o*o,.5);return r>kE}function qm(t){var e=t.length-1;return 0>e&&(e=0),[t[0],t[e]]}function Km(t,e,i,n){var a=new aM;return a.add(new kT({name:"main",style:tv(i),silent:!0,draggable:!0,cursor:"move",drift:ME(t,e,a,"nswe"),ondragend:ME(Ym,e,{isEnd:!0})})),IE(n,function(i){a.add(new kT({name:i,style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:ME(t,e,a,i),ondragend:ME(Ym,e,{isEnd:!0})}))}),a}function $m(t,e,i,n){var a=n.brushStyle.lineWidth||0,o=DE(a,PE),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;Qm(t,e,"main",r,s,p,g),n.transformable&&(Qm(t,e,"w",l,u,o,v),Qm(t,e,"e",d,u,o,v),Qm(t,e,"n",l,u,m,o),Qm(t,e,"s",l,f,m,o),Qm(t,e,"nw",l,u,o,o),Qm(t,e,"ne",d,u,o,o),Qm(t,e,"sw",l,f,o,o),Qm(t,e,"se",d,f,o,o))}function Jm(t,e){var i=e.__brushOption,n=i.transformable,a=e.childAt(0);a.useStyle(tv(i)),a.attr({silent:!n,cursor:n?"move":"default"}),IE(["w","e","n","s","se","sw","ne","nw"],function(i){var a=e.childOfName(i),o=nv(t,i);a&&a.attr({silent:!n,invisible:!n,cursor:n?EE[o]+"-resize":null})})}function Qm(t,e,i,n,a,o,r){var s=e.childOfName(i);s&&s.setShape(lv(sv(t,e,[[n,a],[n+o,a+r]])))}function tv(t){return s({strokeNoScale:!0},t.brushStyle)}function ev(t,e,i,n){var a=[AE(t,i),AE(e,n)],o=[DE(t,i),DE(e,n)];return[[a[0],o[0]],[a[1],o[1]]]}function iv(t){return or(t.group)}function nv(t,e){if(e.length>1){e=e.split("");var i=[nv(t,e[0]),nv(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=sr(n[e],iv(t));return a[i]}function av(t,e,i,n,a,o,r){var s=n.__brushOption,l=t(s.range),u=rv(i,o,r);IE(a.split(""),function(t){var e=NE[t];l[e[0]][e[1]]+=u[e[0]]}),s.range=e(ev(l[0][0],l[1][0],l[0][1],l[1][1])),Wm(i,n),Ym(i,{isEnd:!1})}function ov(t,e,i,n){var a=e.__brushOption.range,o=rv(t,i,n);IE(a,function(t){t[0]+=o[0],t[1]+=o[1]}),Wm(t,e),Ym(t,{isEnd:!1})}function rv(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 sv(t,e,i){var a=Xm(t,e);return a&&a!==!0?a.clipPath(i,t._transform):n(i)}function lv(t){var e=AE(t[0][0],t[1][0]),i=AE(t[0][1],t[1][1]),n=DE(t[0][0],t[1][0]),a=DE(t[0][1],t[1][1]);return{x:e,y:i,width:n-e,height:a-i}}function uv(t,e,i){if(t._brushType&&!gv(t,e)){var n=t._zr,a=t._covers,o=Zm(t,e,i);if(!t._dragging)for(var r=0;r<a.length;r++){var s=a[r].__brushOption;if(o&&(o===!0||s.panelId===o.panelId)&&VE[s.brushType].contain(a[r],i[0],i[1]))return}o&&n.setCursorStyle("crosshair")}}function hv(t){var e=t.event;e.preventDefault&&e.preventDefault()}function cv(t,e,i){return t.childOfName("main").contain(e,i)}function dv(t,e,i,a){var o,r=t._creatingCover,s=t._creatingPanel,l=t._brushOption;if(t._track.push(i.slice()),jm(t)||r){if(s&&!r){"single"===l.brushMode&&Um(t);var u=n(l);u.brushType=fv(u.brushType,s),u.panelId=s===!0?null:s.panelId,r=t._creatingCover=Bm(t,u),t._covers.push(r)}if(r){var h=VE[fv(t._brushType,s)],c=r.__brushOption;c.range=h.getCreatingRange(sv(t,r,t._track)),a&&(Vm(t,r),h.updateCommon(t,r)),Gm(t,r),o={isEnd:a}}}else a&&"single"===l.brushMode&&l.removeOnClick&&Zm(t,e,i)&&Um(t)&&(o={isEnd:a,removeOnClick:!0});return o}function fv(t,e){return"auto"===t?e.defaultBrushType:t}function pv(t,e){if(t._dragging){hv(e);var i=e.offsetX,n=e.offsetY,a=t.group.transformCoordToLocal(i,n),o=dv(t,e,a,!0);t._dragging=!1,t._track=[],t._creatingCover=null,o&&Ym(t,o)}}function gv(t,e,i){var n=t._zr;return 0>e||e>n.getWidth()||0>i||i>n.getHeight()}function mv(t){return{createCover:function(e,i){return Km(ME(av,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=qm(e),n=AE(i[0][t],i[1][t]),a=DE(i[0][t],i[1][t]);return[n,a]},updateCoverShape:function(e,i,n,a){var o,r=Xm(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(),$m(e,i,l,a)},updateCommon:Jm,contain:cv}}function vv(t){return t=_v(t),function(e){return ur(e,t)}}function yv(t,e){return t=_v(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 xv(t,e,i){return t=_v(t),function(n,a){return t.contain(a[0],a[1])&&!fp(n,e,i)}}function _v(t){return Ti.create(t)}function wv(t,e,i){return i&&"axisAreaSelect"===i.type&&e.findComponents({mainType:"parallelAxis",query:i})[0]===t}function bv(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 Sv(t,e){return e.getComponent("parallel",t.get("parallelIndex"))}function Mv(t,e){var i=t._model;return i.get("axisExpandable")&&i.get("axisExpandTriggerOn")===e}function Iv(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=Tv(t);n.set(t,e)})}}}function Tv(t){return+t.replace("dim","")}function Av(t,e,i){var n=t.model,a=t.getRect(),o=new kT({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),ar(o,{shape:{width:a.width,height:a.height}},e,i),o}function Dv(t,e,i,n){for(var a=[],o=0;o<i.length;o++){var r=i[o],s=t.get(t.mapDimension(r),e);Pv(s,n.getAxis(r).type)||a.push(n.dataToPoint(s,r))}return a}function Cv(t,e,i,n,a){var o=Dv(t,i,n,a),r=new DT({shape:{points:o},silent:!0,z2:10});return e.add(r),t.setItemGraphicEl(i,r),r}function Lv(t){var e=t.get("smooth",!0);return e===!0&&(e=ZE),{lineStyle:t.getModel("lineStyle").getLineStyle(),smooth:null!=e?e:ZE}}function kv(t,e,i,n){var a=n.lineStyle;if(e.hasItemOption){var o=e.getItemModel(i).getModel("lineStyle");a=o.getLineStyle()}t.useStyle(a);var r=t.style;r.fill=null,r.stroke=e.getItemVisual(i,"color"),r.opacity=e.getItemVisual(i,"opacity"),n.smooth&&(t.shape.smooth=n.smooth)}function Pv(t,e){return"category"===e?null==t:null==t||isNaN(t)}function Ov(t,e){var i=t.get("center"),n=e.getWidth(),a=e.getHeight(),o=Math.min(n,a),r=Mr(i[0],e.getWidth()),s=Mr(i[1],e.getHeight()),l=Mr(t.get("radius"),o/2);return{cx:r,cy:s,r:l}}function Nv(t,e){return e&&("string"==typeof e?t=e.replace("{value}",null!=t?t:""):"function"==typeof e&&(t=e(t))),t}function Ev(t,e){aM.call(this);var i=new AT,n=new DT,a=new xT;this.add(i),this.add(n),this.add(a),this.highDownOnUpdate=function(t,e){"emphasis"===e?(n.ignore=n.hoverIgnore,a.ignore=a.hoverIgnore):(n.ignore=n.normalIgnore,a.ignore=a.normalIgnore)},this.updateData(t,e,!0)}function zv(t,e){return Qr(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function Rv(t,e){for(var i=t.mapDimension("value"),n=t.mapArray(i,function(t){return t}),a=[],o="ascending"===e,r=0,s=t.count();s>r;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 Bv(t){t.each(function(e){var i,n,a,o,r=t.getItemModel(e),s=r.getModel("label"),l=s.get("position"),u=r.getModel("labelLine"),h=t.getItemLayout(e),c=h.points,d="inner"===l||"inside"===l||"center"===l||"insideLeft"===l||"insideRight"===l;if(d)"insideLeft"===l?(n=(c[0][0]+c[3][0])/2+5,a=(c[0][1]+c[3][1])/2,i="left"):"insideRight"===l?(n=(c[1][0]+c[2][0])/2-5,a=(c[1][1]+c[2][1])/2,i="right"):(n=(c[0][0]+c[1][0]+c[2][0]+c[3][0])/4,a=(c[0][1]+c[1][1]+c[2][1]+c[3][1])/4,i="center"),o=[[n,a],[n,a]];else{var f,p,g,m=u.get("length");"left"===l?(f=(c[3][0]+c[0][0])/2,p=(c[3][1]+c[0][1])/2,g=f-m,n=g-5,i="right"):"right"===l?(f=(c[1][0]+c[2][0])/2,p=(c[1][1]+c[2][1])/2,g=f+m,n=g+5,i="left"):"rightTop"===l?(f=c[1][0],p=c[1][1],g=f+m,n=g+5,i="top"):"rightBottom"===l?(f=c[2][0],p=c[2][1],g=f+m,n=g+5,i="bottom"):"leftTop"===l?(f=c[0][0],p=c[1][1],g=f-m,n=g-5,i="right"):"leftBottom"===l?(f=c[3][0],p=c[2][1],g=f-m,n=g-5,i="right"):(f=(c[1][0]+c[2][0])/2,p=(c[1][1]+c[2][1])/2,g=f+m,n=g+5,i="left");var v=p;o=[[f,p],[g,v]],a=v}h.label={linePoints:o,x:n,y:a,verticalAlign:"middle",textAlign:i,inside:d}})}function Vv(t,e){return t.getVisual("opacity")||t.getModel().get(e)}function Gv(t,e,i){var n=t.getGraphicEl(),a=Vv(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 Fv(t,e){var i=Vv(t,e),n=t.getGraphicEl();n.traverse(function(t){"group"!==t.type&&t.setStyle("opacity",i)
}),n.highlight&&n.highlight()}function Wv(t,e,i){var n=new kT({shape:{x:t.x-10,y:t.y-10,width:0,height:t.height+20}});return ar(n,{shape:{width:t.width+20}},e,i),n}function Hv(t,e){return Qr(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function Zv(t,e,i,n,a,o,r,s,l){Uv(t,e,i,a,o,s,l),$v(t,e,o,a,n,r,s),ly(t,s)}function Xv(t){f(t,function(t){var e=ry(t.outEdges,oy),i=ry(t.inEdges,oy),n=t.getValue()||0,a=Math.max(e,i,n);t.setLayout({value:a},!0)})}function Uv(t,e,i,n,a,o,r){for(var s=[],l=[],u=[],h=[],c=0,d=0,f=0;f<e.length;f++)s[f]=1;for(f=0;f<t.length;f++)l[f]=t[f].inEdges.length,0===l[f]&&u.push(t[f]);for(var p=-1;u.length;){for(var g=0;g<u.length;g++){var m=u[g],v=m.hostGraph.data.getRawDataItem(m.dataIndex),y=null!=v.depth&&v.depth>=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;x<m.outEdges.length;x++){var _=m.outEdges[x],w=e.indexOf(_);s[w]=0;var b=_.node2,S=t.indexOf(b);0===--l[S]&&h.indexOf(b)<0&&h.push(b)}}++c,u=h,h=[]}for(f=0;f<s.length;f++)if(1===s[f])throw new Error("Sankey is a DAG, the original data has cycle!");var M=p>c-1?p:c-1;r&&"left"!==r&&jv(t,r,o,M);var d="vertical"===o?(a-i)/M:(n-i)/M;Kv(t,d,o)}function Yv(t){var e=t.hostGraph.data.getRawDataItem(t.dataIndex);return null!=e.depth&&e.depth>=0}function jv(t,e,i,n){if("right"===e){for(var a=[],o=t,r=0;o.length;){for(var s=0;s<o.length;s++){var l=o[s];l.setLayout({skNodeHeight:r},!0);for(var u=0;u<l.inEdges.length;u++){var h=l.inEdges[u];a.indexOf(h.node1)<0&&a.push(h.node1)}}o=a,a=[],++r}f(t,function(t){Yv(t)||t.setLayout({depth:Math.max(0,n-t.getLayout().skNodeHeight)},!0)})}else"justify"===e&&qv(t,n)}function qv(t,e){f(t,function(t){Yv(t)||t.outEdges.length||t.setLayout({depth:e},!0)})}function Kv(t,e,i){f(t,function(t){var n=t.getLayout().depth*e;"vertical"===i?t.setLayout({y:n},!0):t.setLayout({x:n},!0)})}function $v(t,e,i,n,a,o,r){var s=Jv(t,r);Qv(s,e,i,n,a,r),ty(s,a,i,n,r);for(var l=1;o>0;o--)l*=.99,ey(s,l,r),ty(s,a,i,n,r),sy(s,l,r),ty(s,a,i,n,r)}function Jv(t,e){var i=[],n="vertical"===e?"y":"x",a=ma(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 Qv(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 ty(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 ey(t,e,i){f(t.slice().reverse(),function(t){f(t,function(t){if(t.outEdges.length){var n=ry(t.outEdges,iy,i)/ry(t.outEdges,oy,i);if("vertical"===i){var a=t.getLayout().x+(n-ay(t,i))*e;t.setLayout({x:a},!0)}else{var o=t.getLayout().y+(n-ay(t,i))*e;t.setLayout({y:o},!0)}}})})}function iy(t,e){return ay(t.node2,e)*t.getValue()}function ny(t,e){return ay(t.node1,e)*t.getValue()}function ay(t,e){return"vertical"===e?t.getLayout().x+t.getLayout().dx/2:t.getLayout().y+t.getLayout().dy/2}function oy(t){return t.getValue()}function ry(t,e,i){for(var n=0,a=t.length,o=-1;++o<a;){var r=+e.call(t,t[o],i);isNaN(r)||(n+=r)}return n}function sy(t,e,i){f(t,function(t){f(t,function(t){if(t.inEdges.length){var n=ry(t.inEdges,ny,i)/ry(t.inEdges,oy,i);if("vertical"===i){var a=t.getLayout().x+(n-ay(t,i))*e;t.setLayout({x:a},!0)}else{var o=t.getLayout().y+(n-ay(t,i))*e;t.setLayout({y:o},!0)}}})})}function ly(t,e){var i="vertical"===e?"x":"y";f(t,function(t){t.outEdges.sort(function(t,e){return t.node2.getLayout()[i]-e.node2.getLayout()[i]}),t.inEdges.sort(function(t,e){return t.node1.getLayout()[i]-e.node1.getLayout()[i]})}),f(t,function(t){var e=0,i=0;f(t.outEdges,function(t){t.setLayout({sy:e},!0),e+=t.getLayout().dy}),f(t.inEdges,function(t){t.setLayout({ty:i},!0),i+=t.getLayout().dy})})}function uy(t,e,i){this.dimension="single",this.dimensions=["single"],this._axis=null,this._rect,this._init(t,e,i),this.model=t}function hy(t,e){var i=[];return t.eachComponent("singleAxis",function(n,a){var o=new uy(n,t,e);o.name="single_"+a,o.resize(n,e),n.coordinateSystem=o,i.push(o)}),t.eachSeries(function(e){if("singleAxis"===e.get("coordinateSystem")){var i=t.queryComponents({mainType:"singleAxis",index:e.get("singleAxisIndex"),id:e.get("singleAxisId")})[0];e.coordinateSystem=i&&i.coordinateSystem}}),i}function cy(t,e){e=e||{};var i=t.coordinateSystem,n=t.axis,a={},o=n.position,r=n.orient,s=i.getRect(),l=[s.x,s.x+s.width,s.y,s.y+s.height],u={horizontal:{top:l[2],bottom:l[3]},vertical:{left:l[0],right:l[1]}};a.position=["vertical"===r?u.vertical[o]:l[0],"horizontal"===r?u.horizontal[o]:l[3]];var h={horizontal:0,vertical:1};a.rotation=Math.PI/2*h[r];var c={top:-1,bottom:1,right:1,left:-1};a.labelDirection=a.tickDirection=a.nameDirection=c[o],t.get("axisTick.inside")&&(a.tickDirection=-a.tickDirection),D(e.labelInside,t.get("axisLabel.inside"))&&(a.labelDirection=-a.labelDirection);var d=e.rotate;return null==d&&(d=t.get("axisLabel.rotate")),a.labelRotation="top"===o?-d:d,a.z2=1,a}function dy(t,e){return e.type||(e.data?"category":"value")}function fy(t,e,i,n,a){var o=t.axis;if(!o.scale.isBlank()&&o.containData(e)){if(!t.involveSeries)return void i.showPointer(t,e);var s=py(e,t),l=s.payloadBatch,u=s.snapToValue;l[0]&&null==a.seriesIndex&&r(a,l[0]),!n&&t.snap&&o.containData(u)&&null!=u&&(e=u),i.showPointer(t,e,l,a),i.showTooltip(t,s,u)}}function py(t,e){var i=e.axis,n=i.dim,a=t,o=[],r=Number.MAX_VALUE,s=-1;return pz(e.seriesModels,function(e){var l,u,h=e.getData().mapDimension(n,!0);if(e.getAxisTooltipData){var c=e.getAxisTooltipData(h,t,i);u=c.dataIndices,l=c.nestestValue}else{if(u=e.getData().indicesOfNearest(h[0],t,"category"===i.type?.5:null),!u.length)return;l=e.getData().get(h[0],u[0])}if(null!=l&&isFinite(l)){var d=t-l,f=Math.abs(d);r>=f&&((r>f||d>=0&&0>s)&&(r=f,s=d,a=l,o.length=0),pz(u,function(t){o.push({seriesIndex:e.seriesIndex,dataIndexInside:t,dataIndex:e.getData().getRawIndex(t)})}))}}),{payloadBatch:o,snapToValue:a}}function gy(t,e,i,n){t[e.key]={value:i,payloadBatch:n}}function my(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=yd(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 vy(t,e,i){var n=i.axesInfo=[];pz(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 yy(t,e,i,n){if(by(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 xy(t,e,i){var n=i.getZr(),a="axisPointerLastHighlights",o=mz(n)[a]||{},r=mz(n)[a]={};pz(t,function(t){var e=t.axisPointerModel.option;"show"===e.status&&pz(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 _y(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 wy(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 by(t){return!t||null==t[0]||isNaN(t[0])||null==t[1]||isNaN(t[1])}function Sy(t,e,i){if(!Zb.node){var n=e.getZr();yz(n).records||(yz(n).records={}),My(n,e);var a=yz(n).records[t]||(yz(n).records[t]={});a.handler=i}}function My(t,e){function i(i,n){t.on(i,function(i){var a=Dy(e);xz(yz(t).records,function(t){t&&n(t,i,a.dispatchAction)}),Iy(a.pendings,e)})}yz(t).initialized||(yz(t).initialized=!0,i("click",x(Ay,"click")),i("mousemove",x(Ay,"mousemove")),i("globalout",Ty))}function Iy(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 Ty(t,e,i){t.handler("leave",null,i)}function Ay(t,e,i,n){e.handler(t,i,n)}function Dy(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 Cy(t,e){if(!Zb.node){var i=e.getZr(),n=(yz(i).records||{})[t];n&&(yz(i).records[t]=null)}}function Ly(){}function ky(t,e,i,n){Py(wz(i).lastProp,n)||(wz(i).lastProp=n,e?nr(i,n,t):(i.stopAnimation(),i.attr(n)))}function Py(t,e){if(S(t)&&S(e)){var i=!0;return f(e,function(e,n){i=i&&Py(t[n],e)}),!!i}return t===e}function Oy(t,e){t[e.get("label.show")?"show":"hide"]()}function Ny(t){return{position:t.position.slice(),rotation:t.rotation||0}}function Ey(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 zy(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 Ry(t,e,i,n,a){var o=i.get("value"),r=Vy(o,e.axis,e.ecModel,i.get("seriesDataIndices"),{precision:i.get("label.precision"),formatter:i.get("label.formatter")}),s=i.getModel("label"),l=pA(s.get("padding")||0),u=s.getFont(),h=Xi(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),By(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 By(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 Vy(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:jh(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 Gy(t,e,i){var n=Oe();return Be(n,n,i.rotation),Re(n,n,i.position),rr([t.dataToCoord(e),(i.labelOffset||0)+(i.labelDirection||1)*(i.labelMargin||0)],n)}function Fy(t,e,i,n,a,o){var r=_k.innerTextLayout(i.rotation,0,i.labelDirection);i.labelMargin=a.get("label.margin"),Ry(e,n,a,o,{position:Gy(n.axis,t,i),align:r.textAlign,verticalAlign:r.textVerticalAlign})}function Wy(t,e,i){return i=i||0,{x1:t[i],y1:t[1-i],x2:e[i],y2:e[1-i]}}function Hy(t,e,i){return i=i||0,{x:t[i],y:t[1-i],width:e[i],height:e[1-i]}}function Zy(t,e,i,n,a,o){return{cx:t,cy:e,r0:i,r:n,startAngle:a,endAngle:o,clockwise:!0}}function Xy(t,e){var i={};return i[e.dim+"AxisIndex"]=e.index,t.getCartesian(i)}function Uy(t){return"x"===t.dim?0:1}function Yy(t){return t.isHorizontal()?0:1}function jy(t,e){var i=t.getRect();return[i[Tz[e]],i[Tz[e]]+i[Az[e]]]}function qy(t,e,i){var n=new kT({shape:{x:t.x-10,y:t.y-10,width:0,height:t.height+20}});return ar(n,{shape:{width:t.width+20,height:t.height+20}},e,i),n}function Ky(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=$y(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 $y(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 Jy(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};Qy(i,o,a,n,d),ex(t,e,a,o,r,d.boundingLength,d.pxSign,h,n,d),ix(i,d.symbolScale,u,n,d);var f=d.symbolSize,p=i.get("symbolOffset");return _(p)&&(p=[Mr(p[0],f[0]),Mr(p[1],f[1])]),nx(i,f,a,o,r,p,s,d.valueLineWidth,d.boundingLength,d.repeatCutLength,n,d),d}function Qy(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=[tx(l,s[0])-u,tx(l,s[1])-u];c[1]<c[0]&&c.reverse(),o=c[h]}else o=null!=s?tx(l,s)-u:e?n.coordSysExtent[r.index][h]-u:i[r.wh];a.boundingLength=o,e&&(a.repeatCutLength=i[r.wh]),a.pxSign=o>0?1:0>o?-1:0}function tx(t,e){return t.toGlobalCoord(t.dataToCoord(t.scale.parse(e)))}function ex(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]=Mr(f[c.index],d),f[h.index]=Mr(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 ix(t,e,i,n,a){var o=t.get(Ez)||0;o&&(Rz.attr({scale:e.slice(),rotation:i}),Rz.updateTransform(),o/=Rz.getLineScale(),o*=e[n.valueDim.index]),a.valueLineWidth=o}function nx(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=Mr(x,e[p.index]);var w=Math.max(m+2*x,0),b=_?0:2*x,S=Vr(n),M=S?n:_x((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?_x((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 ax(t){var e=t.symbolPatternSize,i=tc(t.symbolType,-e/2,-e/2,e,e,t.color);return i.attr({culling:!0}),"image"!==i.type&&i.setStyle({strokeNoScale:!0}),i}function ox(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(){vx(t,function(t){t.trigger("emphasis")})}function r(){vx(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(vx(t,function(t){t.__pictorialAnimationIndex=f,t.__pictorialRepeatTimes=d,d>f?yx(t,null,a(f),i,n):yx(t,null,{scale:[0,0]},i,n,function(){s.remove(t)}),dx(t,i),f++});d>f;f++){var g=ax(i);g.__pictorialAnimationIndex=f,g.__pictorialRepeatTimes=d,s.add(g);var m=a(f);yx(g,{position:m.position,scale:[0,0]},{scale:m.scale,rotation:m.rotation},i,n),g.on("mouseover",o).on("mouseout",r),dx(g,i)}}function rx(t,e,i,n){function a(){this.trigger("emphasis")}function o(){this.trigger("normal")}var r=t.__pictorialBundle,s=t.__pictorialMainPath;s?yx(s,null,{position:i.pathPosition.slice(),scale:i.symbolScale.slice(),rotation:i.rotation},i,n):(s=t.__pictorialMainPath=ax(i),r.add(s),yx(s,{position:i.pathPosition.slice(),scale:[0,0],rotation:i.rotation},{scale:i.symbolScale.slice()},i,n),s.on("mouseover",a).on("mouseout",o)),dx(s,i)}function sx(t,e,i){var n=r({},e.barRectShape),a=t.__pictorialBarRect;a?yx(a,null,{shape:n},e,i):(a=t.__pictorialBarRect=new kT({z2:2,shape:n,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),t.add(a))}function lx(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)nr(a,{shape:o},l,u);else{o[s.wh]=0,a=new kT({shape:o}),t.__pictorialBundle.setClipPath(a),t.__pictorialClipPath=a;var h={};h[s.wh]=i.clipShape[s.wh],iA[n?"updateProps":"initProps"](a,{shape:h},l,u)}}}function ux(t,e){var i=t.getItemModel(e);return i.getAnimationDelayParams=hx,i.isAnimationEnabled=cx,i}function hx(t){return{index:t.__pictorialAnimationIndex,count:t.__pictorialRepeatTimes}}function cx(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function dx(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 fx(t,e,i,n){var a=new aM,o=new aM;return a.add(o),a.__pictorialBundle=o,o.attr("position",i.bundlePosition.slice()),i.symbolRepeat?ox(a,e,i):rx(a,e,i),sx(a,i,n),lx(a,e,i,n),a.__pictorialShapeStr=mx(t,i),a.__pictorialSymbolMeta=i,a}function px(t,e,i){var n=i.animationModel,a=i.dataIndex,o=t.__pictorialBundle;nr(o,{position:i.bundlePosition.slice()},n,a),i.symbolRepeat?ox(t,e,i,!0):rx(t,e,i,!0),sx(t,i,!0),lx(t,e,i,!0)}function gx(t,e,i,n){var a=n.__pictorialBarRect;a&&(a.style.text=null);var o=[];vx(n,function(t){o.push(t)}),n.__pictorialMainPath&&o.push(n.__pictorialMainPath),n.__pictorialClipPath&&(i=null),f(o,function(t){nr(t,{scale:[0,0]},i,e,function(){n.parent&&n.parent.remove(n)})}),t.setItemGraphicEl(e,null)}function mx(t,e){return[t.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function vx(t,e,i){f(t.__pictorialBundle.children(),function(n){n!==t.__pictorialBarRect&&e.call(i,n)})}function yx(t,e,i,n,a,o){e&&t.attr(e),n.symbolClip&&!a?i&&t.attr(i):i&&iA[a?"updateProps":"initProps"](t,i,n.animationModel,n.dataIndex,o)}function xx(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");vx(t,function(t){t.setColor(n),t.setStyle(s({fill:n,opacity:i.opacity},r)),Fo(t,l),u&&(t.cursor=u),t.z2=i.z2});var h={},c=e.valueDim.posDesc[+(i.boundingLength>0)],d=t.__pictorialBarRect;zc(d.style,h,o,n,e.seriesModel,a,c),Fo(d,h)}function _x(t){var e=Math.round(t);return Math.abs(t-e)<1e-4?e:Math.ceil(t)}function bx(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 Sx(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 Mx(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 Ix(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 Tx(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=Gx(n);e=bo(o,null,a,n.layout||"center"),e.__customPathData=o}else if("image"===i)e=new Dn({}),e.__customImagePath=t.style.image;else if("text"===i)e=new xT({}),e.__customText=t.style.text;else if("group"===i)e=new aM;else{if("compoundPath"===i)throw new Error('"compoundPath" is not supported yet.');var r=wo(i);e=new r}return e.__customGraphicType=i,e.name=t.name,e}function Ax(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){Dx(e,h,u,t.style,r)})}if("text"===t.type&&i.style){var h=l.style={};f(["x","y"],function(e){Dx(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),ar(t,{style:{opacity:c}},a,e)}r?t.attr(l):nr(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;Eo(t,d),s&&Wo(t,d!==!1)}function Dx(t,e,i,n,a){null==i[t]||a||(e[t]=i[t],i[t]=n[t])}function Cx(t,e,i,n){function a(t){null==t&&(t=m),S&&(v=e.getItemModel(t),y=v.getModel(Uz),x=v.getModel(Yz),_=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(Zz).getItemStyle();null!=_&&(o.fill=_);var r=e.getItemVisual(n,"opacity");null!=r&&(o.opacity=r);var s=i?Rx(i,y):y;return Yo(o,s,null,{autoColor:_,isRectText:!0}),o.text=s.getShallow("show")?C(t.getFormattedLabel(n,"normal"),Ec(e,n)):null,i&&Bx(o,i),o}function l(i,n){null==n&&(n=m),a(n);var o=v.getModel(Xz).getItemStyle(),r=i?Rx(i,x):x;return Yo(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&&Bx(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 kh(s({axis:e},t),n)}}function c(){return i.getCurrentSeriesIndices()}function d(t){return er(t,i)}var f=t.get("renderItem"),p=t.coordinateSystem,g={};p&&(g=p.prepareCustoms?p.prepareCustoms():qz[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:Lx(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 Lx(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 kx(t,e,i,n,a,o){return t=Px(t,e,i,n,a,o,!0),t&&o.setItemGraphicEl(e,t),t}function Px(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&&Fx(u)&&Gx(u)!==t.__customPathData||"image"===l&&Wx(h,"image")&&h.image!==t.__customImagePath||"text"===l&&Wx(u,"text")&&h.text!==t.__customText)&&(a.remove(t),t=null),!s){var c=!t;return!t&&(t=Tx(i)),Ax(t,e,i,n,o,c,r),"group"===l&&Ox(t,e,i,n,o),a.add(t),t}}function Ox(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 Nx({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]&&Px(t.childAt(h),e,o[h],n,t,a)}}function Nx(t){new Hu(t.oldChildren,t.newChildren,Ex,Ex,t).add(zx).update(zx).remove(Vx).execute()}function Ex(t,e){var i=t&&t.name;return null!=i?i:jz+e}function zx(t,e){var i=this.context,n=null!=t?i.newChildren[t]:null,a=null!=e?i.oldChildren[e]:null;Px(a,i.dataIndex,n,i.animatableModel,i.group,i.data)}function Rx(t,e){var i=new mr({},e);return f(Hz,function(e,n){t.hasOwnProperty(e)&&(i.option[n]=t[e])}),i}function Bx(t,e){for(var i in e)(e.hasOwnProperty(i)||!Hz.hasOwnProperty(i))&&(t[i]=e[i])}function Vx(t){var e=this.context,i=e.oldChildren[t];i&&e.group.remove(i)}function Gx(t){return t&&(t.pathData||t.d)}function Fx(t){return t&&(t.hasOwnProperty("pathData")||t.hasOwnProperty("d"))}function Wx(t,e){return t&&t.hasOwnProperty(e)}function Hx(t){return t.get("stack")||"__ec_stack_"+t.seriesIndex}function Zx(t,e){return e.dim+t.model.componentIndex}function Xx(t,e){var i={},n=Ux(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=Zx(a,o),s=Hx(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=mh(e,m),x="radius"!==o.dim||!t.get("roundCap",!0),_=c.getExtent()[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)<p&&(k=(0>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)<g&&(O=(0>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 Ux(t){var e={};f(t,function(t){var i=t.getData(),n=t.coordinateSystem,a=n.getBaseAxis(),o=Zx(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=Hx(t);u[h]||l.autoWidthCount++,u[h]=u[h]||{width:0,maxWidth:0};var c=Mr(t.get("barWidth"),s),d=Mr(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=Mr(t.categoryGap,a),r=Mr(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 Yx(t,e){UL.call(this,"radius",t,e),this.type="category"}function jx(t,e){e=e||[0,360],UL.call(this,"angle",t,e),this.type="category"}function qx(t,e){return e.type||(e.data?"category":"value")}function Kx(t,e,i){var n=e.get("center"),a=i.getWidth(),o=i.getHeight();t.cx=Mr(n[0],a),t.cy=Mr(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=[Mr(l[0],s),Mr(l[1],s)],r.inverse?r.setExtent(l[1],l[0]):r.setExtent(l[0],l[1])}function $x(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,vh(a,t))}),f(a.mapDimension("angle",!0),function(t){i.scale.unionExtentFromData(a,vh(a,t))})}}),Zh(i.scale,i.model),Zh(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 Jx(t,e){if(t.type=e.get("type"),t.scale=Xh(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 Qx(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 t_(t){var e=t.getRadiusAxis();return e.inverse?0:1}function e_(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 i_(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 n_(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),Re(d,d,[n.cx,n.cy]),l=rr([r,-a],d);var f=e.getModel("axisLabel").get("rotate")||0,p=_k.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 a_(t,e){e.update="updateView",Du(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 o_(t){this._model=t}function r_(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 s_(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 es(e,t)&&(i[t]="auto"),null!=i[t]&&"auto"!==i[t]});is(t,e,{type:"box",ignoreSize:n})}function l_(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 u_(t,e,i){var n=e.getBoxLayoutParams(),a=e.get("padding"),o={width:i.getWidth(),height:i.getHeight()},r=Qr(n,o,a);MA(e.get("orient"),t,e.get("itemGap"),r.width,r.height),ts(t,n,o,a)
}function h_(t,e){var i=pA(e.get("padding")),n=e.getItemStyle(["color","opacity"]);n.fill=e.get("backgroundColor");var t=new kT({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 c_(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 d_(t,e,i,n){p_(t,e,i,n),i.dispatchAction({type:"legendToggleSelect",name:null!=t?t:e}),f_(t,e,i,n)}function f_(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 p_(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 g_(t,e,i){var n=t.getOrient(),a=[1,1];a[n.index]=0,is(e,i,{type:"box",ignoreSize:a})}function m_(t){var e="cubic-bezier(0.23, 1, 0.32, 1)",i="left "+t+"s "+e+",top "+t+"s "+e;return p(TR,function(t){return t+"transition:"+i}).join(";")}function v_(t){var e=[],i=t.get("fontSize"),n=t.getTextColor();return n&&e.push("color:"+n),e.push("font:"+t.getFont()),i&&e.push("line-height:"+Math.round(3*i/2)+"px"),MR(["decoration","align"],function(i){var n=t.get(i);n&&e.push("text-"+i+":"+n)}),e.join(";")}function y_(t){var e=[],i=t.get("transitionDuration"),n=t.get("backgroundColor"),a=t.getModel("textStyle"),o=t.get("padding");return i&&e.push(m_(i)),n&&(Zb.canvasSupported?e.push("background-Color:"+n):(e.push("background-Color:#"+ai(n)),e.push("filter:alpha(opacity=70)"))),MR(["width","color","radius"],function(i){var n="border-"+i,a=IR(n),o=t.get(a);null!=o&&e.push(n+":"+o+("color"===i?"":"px"))}),e.push(v_(a)),null!=o&&e.push("padding:"+pA(o).join("px ")+"px"),e.join(";")+";"}function x_(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)}}function __(t,e,i){if(Zb.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],x_(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 w_(t){this._zr=t.getZr(),this._show=!1,this._hideTimeout}function b_(t){for(var e=t.pop();t.length;){var i=t.pop();i&&(mr.isInstance(i)&&(i=i.get("tooltip",!0)),"string"==typeof i&&(i={formatter:i}),e=new mr(i,e,e.ecModel))}return e}function S_(t,e){return t.dispatchAction||y(e.dispatchAction,e)}function M_(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 I_(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 T_(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 A_(t){return"center"===t||"middle"===t}function D_(t){ea(t,"label",["show"])}function C_(t){return!(isNaN(parseFloat(t.x))&&isNaN(parseFloat(t.y)))}function L_(t){return!isNaN(parseFloat(t.x))&&!isNaN(parseFloat(t.y))}function k_(t,e,i,n,a,o){var r=[],s=mh(e,n),l=s?e.getCalculationInfo("stackResultDimension"):n,u=R_(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=Ar(e.get(n,h));return d=Math.min(d,20),d>=0&&(r[o]=+r[o].toFixed(d)),[r,c]}function P_(t,e){var i=t.getData(),a=t.coordinateSystem;if(e&&!L_(e)&&!_(e.coord)&&a){var o=a.dimensions,r=O_(e,i,a,t);if(e=n(e),e.type&&RR[e.type]&&r.baseAxis&&r.valueAxis){var s=ER(o,r.baseAxis.dim),l=ER(o,r.valueAxis.dim),u=RR[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++)RR[h[c]]&&(h[c]=R_(i,i.mapDimension(o[c]),h[c]));e.coord=h}}return e}function O_(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(N_(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 N_(t,e){var i=t.getData(),n=i.dimensions;e=i.getDimension(e);for(var a=0;a<n.length;a++){var o=i.getDimensionInfo(n[a]);if(o.name===e)return o.coordDim}}function E_(t,e){return t&&t.containData&&e.coord&&!C_(e)?t.containData(e.coord):!0}function z_(t,e,i,n){return 2>n?t.coord&&t.coord[n]:t.value}function R_(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 B_(t,e,i){var n=e.coordinateSystem;t.each(function(a){var o,r=t.getItemModel(a),s=Mr(r.get("x"),i.getWidth()),l=Mr(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 V_(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 $C(n,i),o=p(i.get("data"),x(P_,e));return t&&(o=m(o,x(E_,t))),a.initData(o,null,t?z_:function(t){return t.value}),a}function G_(t){return!isNaN(t)&&!isFinite(t)}function F_(t,e,i,n){var a=1-t,o=n.dimensions[t];return G_(e[a])&&G_(i[a])&&e[t]===i[t]&&n.getAxis(o).containData(e[t])}function W_(t,e){if("cartesian2d"===t.type){var i=e[0].coord,n=e[1].coord;if(i&&n&&(F_(1,i,n,t)||F_(0,i,n,t)))return!0}return E_(t,e[0])&&E_(t,e[1])}function H_(t,e,i,n,a){var o,r=n.coordinateSystem,s=t.getItemModel(e),l=Mr(s.get("x"),a.getWidth()),u=Mr(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;G_(t.get(h[0],e))?o[0]=f.toGlobalCoord(f.getExtent()[i?0:1]):G_(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 Z_(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 $C(n,i),o=new $C(n,i),r=new $C([],i),l=p(i.get("data"),x(VR,e,t,i));t&&(l=m(l,x(W_,t)));var u=t?z_: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 X_(t){return!isNaN(t)&&!isFinite(t)}function U_(t,e,i){var n=1-t;return X_(e[n])&&X_(i[n])}function Y_(t,e){var i=e.coord[0],n=e.coord[1];return"cartesian2d"===t.type&&i&&n&&(U_(1,i,n,t)||U_(0,i,n,t))?!0:E_(t,{coord:i,x:e.x0,y:e.y0})||E_(t,{coord:n,x:e.x1,y:e.y1})}function j_(t,e,i,n,a){var o,r=n.coordinateSystem,s=t.getItemModel(e),l=Mr(s.get(i[0]),a.getWidth()),u=Mr(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);X_(h)?o[0]=f.toGlobalCoord(f.getExtent()["x0"===i[0]?0:1]):X_(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 q_(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 $C(p(o,function(t,e){return{name:t,type:n[e%2].type}}),i)):(n=[{name:"value",type:"float"}],a=new $C(n,i));var r=p(i.get("data"),x(GR,e,t,i));t&&(r=m(r,x(Y_,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 K_(t){var e=t.type,i={number:"value",time:"time"};if(i[e]&&(t.axisType=i[e],delete t.type),$_(t),J_(t,"controlPosition")){var n=t.controlStyle||(t.controlStyle={});J_(n,"position")||(n.position=t.controlPosition),"none"!==n.position||J_(n,"show")||(n.show=!1,delete n.position),delete t.controlPosition}f(t.data||[],function(t){S(t)&&!_(t)&&(!J_(t,"value")&&J_(t,"name")&&(t.value=t.name),$_(t))})}function $_(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]||J_(a,e)||(a[e]=t)}),i.label&&!J_(n,"emphasis")&&(n.emphasis=i.label,delete i.label)}function J_(t,e){return t.hasOwnProperty(e)}function Q_(t,e){return Qr(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()},t.get("padding"))}function tw(t,e,i,a){var o=bo(t.get(e).replace(/^path:\/\//,""),n(a||{}),new Ti(i[0],i[1],i[2],i[3]),"center");return o}function ew(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=tc(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]+=Mr(c[0],h[0]),d[1]+=Mr(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 iw(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 nw(t){return u($R,t)>=0}function aw(t,e){t=t.slice();var i=p(t,jr);e=(e||[]).slice();var n=p(e,jr);return function(a,o){f(t,function(t,r){for(var s={name:t,capital:i[r]},l=0;l<e.length;l++)s[e[l]]=t+n[l];a.call(o,s)})}}function ow(t,e,i){function n(t,e){return u(e.nodes,t)>=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 rw(t,e,i){var n=[1/0,-1/0];return QR(i,function(t){var i=t.getData();i&&QR(i.mapDimension(e,!0),function(t){var e=i.getApproximateExtent(t);e[0]<n[0]&&(n[0]=e[0]),e[1]>n[1]&&(n[1]=e[1])})}),n[1]<n[0]&&(n=[0/0,0/0]),sw(t,n),n}function sw(t,e){var i=t.getAxisModel(),n=i.getMin(!0),a="category"===i.get("type"),o=a&&i.getCategories().length;null!=n&&"dataMin"!==n&&"function"!=typeof n?e[0]=n:a&&(e[0]=o>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 lw(t,e){var i=t.getAxisModel(),n=t._percentWindow,a=t._valueWindow;if(n){var o=Cr(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 uw(t){var e=t._minMaxSpan={},i=t._dataZoomModel,n=t._dataExtent;QR(["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=Sr(n[0]+r,n,[0,100],!0):null!=o&&(r=Sr(o,[0,100],n,!0)-n[0]),e[a+"Span"]=o,e[a+"ValueSpan"]=r})}function hw(t){var e={};return iB(["start","end","startValue","endValue","throttle"],function(i){t.hasOwnProperty(i)&&(e[i]=t[i])}),e}function cw(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 dw(t){var e={x:"y",y:"x",radius:"angle",angle:"radius"};return e[t]}function fw(t){return"vertical"===t?"ns-resize":"ew-resize"}function pw(t,e){var i=vw(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--)}),xw(i);var o=i[a];o||(o=i[a]={coordId:a,dataZoomInfos:{},count:0},o.controller=yw(t,o),o.dispatchAction=x(_w,t)),!o.dataZoomInfos[n]&&o.count++,o.dataZoomInfos[n]=e;var r=ww(o.dataZoomInfos);o.controller.enable(r.controlType,r.opt),o.controller.setPointerChecker(e.containsPoint),wl(o,"dispatchAction",e.dataZoomModel.get("throttle",!0),"fixRate")}function gw(t,e){var i=vw(t);f(i,function(t){t.controller.dispose();var i=t.dataZoomInfos;i[e]&&(delete i[e],t.count--)}),xw(i)}function mw(t){return t.type+"\x00_"+t.id}function vw(t){var e=t.getZr();return e[xB]||(e[xB]={})}function yw(t,e){var i=new ap(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 xw(t){f(t,function(e,i){e.count||(e.controller.dispose(),delete t[i])})}function _w(t,e){t.dispatchAction({type:"dataZoom",batch:e})}function ww(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 bw(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 fE(l,r,[0,100],"all"),this._range=r,o[0]!==r[0]||o[1]!==r[1]?r:void 0}}}function Sw(t){var e={};f(t,function(t){e[t]=1}),t.length=0,f(e,function(e,i){t.push(i)})}function Mw(t){if(t)for(var e in t)if(t.hasOwnProperty(e))return!0}function Iw(t,e,i){function a(){var t=function(){};t.prototype.__hidden=t.prototype;var e=new t;return e}var o={};return TB(e,function(e){var r=o[e]=a();TB(t[e],function(t,a){if(mO.isValidType(a)){var o={type:a,visual:t};i&&i(o,e),r[a]=new mO(o),"opacity"===a&&(o=n(o),o.type="colorAlpha",r.__hidden.__alphaForOpacity=new mO(o))}})}),o}function Tw(t,e,i){var a;f(i,function(t){e.hasOwnProperty(t)&&Mw(e[t])&&(a=!0)}),a&&f(i,function(i){e.hasOwnProperty(i)&&Mw(e[i])?t[i]=n(e[i]):delete t[i]})}function Aw(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=mO.prepareVisualTypes(e[t]);u[t]=i});var h;null==o?i.each(l):i.each([o],l)}function Dw(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=mO.prepareVisualTypes(e[t]);o[t]=i}),{progress:a}}function Cw(t){var e=["x","y"],i=["width","height"];return{point:function(e,i,n){if(e){var a=n.range,o=e[t];return Lw(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]<s[0]&&s.reverse(),Lw(s[0],r)||Lw(s[1],r)||Lw(r[0],s)||Lw(r[1],s)}}}}function Lw(t,e){return e[0]<=t&&t<=e[1]}function kw(t,e,i){var n=this._targetInfoList=[],a={},o=Ow(e,t);DB(NB,function(t,e){(!i||!i.include||CB(i.include,e)>=0)&&t(o,n,a)})}function Pw(t){return t[0]>t[1]&&t.reverse(),t}function Ow(t,e){return ca(t,e,{includeMainTypes:PB})}function Nw(t,e,i,n){var a=i.getAxis(["x","y"][t]),o=Pw(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 Ew(t,e,i,n){return[e[0]-n[t]*i[0],e[1]-n[t]*i[1]]}function zw(t,e){var i=Rw(t),n=Rw(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 Rw(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[0/0,0/0]}function Bw(t){t.eachComponent({mainType:"brush"},function(e){var i=e.brushTargetManager=new kw(e.option,t);i.setInputRanges(e.areas,t)})}function Vw(t,e,i,n,a){if(a){var o=t.getZr();if(!o[FB]){o[GB]||(o[GB]=Gw);var r=wl(o,GB,i,e);r(t,n)}}}function Gw(t,e){if(!t.isDisposed()){var i=t.getZr();i[FB]=!0,t.dispatchAction({type:"brushSelect",batch:e}),i[FB]=!1}}function Fw(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 Ww(t){var e=t.brushSelector;if(b(e)){var i=[];return f(AB,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(AB,function(t,i){n[i]=e}),n}return e}function Hw(t,e){var i=t.option.seriesIndex;return null!=i&&"all"!==i&&(_(i)?u(i,e)<0:e!==i)}function Zw(t){var e=t.selectors={};return f(AB[t.brushType],function(i,n){e[n]=function(n){return i(n,e,t)}}),t}function Xw(t){return new Ti(t[0][0],t[1][0],t[0][1]-t[0][0],t[1][1]-t[1][0])}function Uw(t,e){return a({brushType:t.brushType,brushMode:t.brushMode,transformable:t.transformable,brushStyle:new mr(t.brushStyle).getItemStyle(),removeOnClick:t.removeOnClick,z:t.z},e,!0)}function Yw(t,e,i,n){(!n||n.$from!==t.id)&&this._brushController.setPanels(t.brushTargetManager.makePanelOpts(i)).enableBrush(t.brushOption).updateCovers(t.areas.slice())}function jw(t,e){XB[t]=e}function qw(t){return XB[t]}function Kw(t,e,i){this.model=t,this.ecModel=e,this.api=i,this._brushType,this._brushMode}function $w(t,e){return t&&t.hasOwnProperty&&t.hasOwnProperty(e)}function Jw(t,e,i,n){function a(t){return l[t]}function o(t,e){l[t]=e}for(var r=e.targetVisuals[n],s=mO.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 Qw(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&&o<i[1];s++)r.push(o),o+=a;return r.push(i[1]),r}function tb(t,e,i){var n=t.option,a=n.align;if(null!=a&&"auto"!==a)return a;for(var o={width:e.getWidth(),height:e.getHeight()},r="horizontal"===n.orient?1:0,s=[["left","right","width"],["top","bottom","height"]],l=s[r],u=[0,null,10],h={},c=0;3>c;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=Qr(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 eb(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 ib(t,e,i,n){return new AT({shape:{points:t},draggable:!!i,cursor:e,drift:i,onmousemove:function(t){xS(t.event)},ondragend:n})}function nb(t,e){return 0===t?[[0,0],[e,0],[e,-e]]:[[0,0],[e,0],[e,e]]}function ab(t,e,i,n){return t?[[0,-dV(e,fV(i,0))],[gV,0],[0,dV(e,fV(n-i,0))]]:[[0,0],[5,-5],[5,5]]}function ob(t,e,i){var n=pV/2,a=t.get("hoverLinkDataSize");return a&&(n=hV(a,e,i,!0)/2),n}function rb(t){var e=t.get("hoverLinkOnHandle");return!!(null==e?t.get("realtime"):e)}function sb(t){return"vertical"===t?"ns-resize":"ew-resize"}function lb(t,e){var i=t.inverse;("vertical"===t.orient?!i:i)&&e.reverse()}function ub(t){return 0===t.indexOf("my")}function hb(t){this.model=t}function cb(t){this.model=t}function db(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 fb(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){r.push(t.getRawData().mapArray(a,function(t){return t}))});for(var s=[o.join(LV)],l=0;l<r[0].length;l++){for(var u=[],h=0;h<r.length;h++)u.push(r[h][l]);s.push(u.join(LV))}e.push(s.join("\n"))}),e.join("\n\n"+CV+"\n\n")}function pb(t){return p(t,function(t){var e=t.getRawData(),i=[t.name],n=[];return e.each(e.dimensions,function(){for(var t=arguments.length,a=arguments[t-1],o=e.getName(a),r=0;t-1>r;r++)n[r]=arguments[r];i.push((o?o+LV:"")+n.join(LV))}),i.join("\n")}).join("\n\n"+CV+"\n\n")}function gb(t){var e=db(t);return{value:m([fb(e.seriesGroupByCategoryAxis),pb(e.other)],function(t){return t.replace(/[\n\t\s]/g,"")}).join("\n\n"+CV+"\n\n"),meta:e.meta}}function mb(t){return t.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function vb(t){var e=t.slice(0,t.indexOf("\n"));return e.indexOf(LV)>=0?!0:void 0}function yb(t){for(var e=t.split(/\n+/g),i=mb(e.shift()).split(kV),n=[],a=p(i,function(t){return{name:t,data:[]}}),o=0;o<e.length;o++){var r=mb(e[o]).split(kV);n.push(r.shift());for(var s=0;s<r.length;s++)a[s]&&(a[s].data[o]=r[s])}return{series:a,categories:n}}function xb(t){for(var e=t.split(/\n+/g),i=mb(e.shift()),n=[],a=0;a<e.length;a++){var o,r=mb(e[a]).split(kV),s="",l=!1;isNaN(r[0])?(l=!0,s=r[0],r=r.slice(1),n[a]={name:s,value:[]},o=n[a].value):o=n[a]=[];for(var u=0;u<r.length;u++)o.push(+r[u]);1===o.length&&(l?n[a].value=o[0]:n[a]=o[0])}return{name:i,data:n}}function _b(t,e){var i=t.split(new RegExp("\n*"+CV+"\n*","g")),n={series:[]};return f(i,function(t,i){if(vb(t)){var a=yb(t),o=e[i],r=o.axisDim+"Axis";o&&(n[r]=n[r]||[],n[r][o.axisIndex]={data:a.categories},n.series=n.series.concat(a.series))}else{var a=xb(t);n.series.push(a)}}),n}function wb(t){this._dom=null,this.model=t}function bb(t,e){return p(t,function(t,i){var n=e&&e[i];return S(n)&&!_(n)?(S(t)&&!_(t)&&(t=t.value),s({value:t},n)):t})}function Sb(t,e){var i=Ab(t);PV(e,function(e,n){for(var a=i.length-1;a>=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 Mb(t){var e=Ab(t),i=e[e.length-1];e.length>1&&e.pop();var n={};return PV(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 Ib(t){t[OV]=null}function Tb(t){return Ab(t).length}function Ab(t){var e=t[OV];return e||(e=t[OV]=[{}]),e}function Db(t,e,i){(this._brushController=new Om(i.getZr())).on("brush",y(this._onBrush,this)).mount(),this._isZoomActive}function Cb(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 Lb(t,e){t.setIconStatus("back",Tb(e)>1?"emphasis":"normal")}function kb(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 kw(Cb(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:{lineWidth:0,fill:"rgba(0,0,0,0.2)"}}:!1)}function Pb(t){this.model=t}function Ob(t,e,i,n){var a=i.type,o=FV.hasOwnProperty(a)?FV[a]:wo(a),r=new o(i);e.add(r),n.set(t,r),r.__ecGraphicId=t}function Nb(t,e){var i=t&&t.parent;i&&("group"===t.type&&t.traverse(function(t){Nb(t,e)}),e.removeKey(t.__ecGraphicId),i.remove(t))}function Eb(t){return t=r({},t),f(["id","parentId","$action","hv","bounding"].concat(bA),function(e){delete t[e]}),t}function zb(t,e){var i;return f(e,function(e){null!=t[e]&&"auto"!==t[e]&&(i=!0)}),i}function Rb(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 Bb(t,e,i){var n=r({},i),o=t[e],s=i.$action||"merge";"merge"===s?o?(a(o,n,!0),is(o,n,{ignoreSize:!0}),as(i,o)):t[e]=n:"replace"===s?t[e]=n:"remove"===s&&o&&(t[e]=null)}function Vb(t,e){t&&(t.hv=e.hv=[zb(e,["left","right"]),zb(e,["top","bottom"])],"group"===t.type&&(null==t.width&&(t.width=e.width=0),null==t.height&&(t.height=e.height=0)))}function Gb(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)}var Fb=2311,Wb=function(){return Fb++},Hb={};Hb="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 Zb=Hb,Xb={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1,"[object Canvas]":1},Ub={"[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},Yb=Object.prototype.toString,jb=Array.prototype,qb=jb.forEach,Kb=jb.filter,$b=jb.slice,Jb=jb.map,Qb=jb.reduce,tS={},eS=function(){return tS.createCanvas()};tS.createCanvas=function(){return document.createElement("canvas")};var iS,nS="__ec_primitive__";R.prototype={constructor:R,get:function(t){return this.data.hasOwnProperty(t)?this.data[t]:null},set:function(t,e){return this.data[t]=e},each:function(t,e){void 0!==e&&(t=y(t,e));for(var i in this.data)this.data.hasOwnProperty(i)&&t(this.data[i],i)},removeKey:function(t){delete this.data[t]}};var aS=(Object.freeze||Object)({$override:i,clone:n,merge:a,mergeAll:o,extend:r,defaults:s,createCanvas:eS,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:E,isPrimitive:z,createHashMap:B,concatArray:V,noop:G}),oS="undefined"==typeof Float32Array?Array:Float32Array,rS=j,sS=q,lS=ee,uS=ie,hS=(Object.freeze||Object)({create:F,copy:W,clone:H,set:Z,add:X,scaleAndAdd:U,sub:Y,len:j,length:rS,lenSquare:q,lengthSquare:sS,mul:K,div:$,dot:J,scale:Q,normalize:te,distance:ee,dist:lS,distanceSquare:ie,distSquare:uS,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 cS=Array.prototype.slice,dS=function(t){this._$handlers={},this._$eventProcessor=t};dS.prototype={constructor:dS,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=cS.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=cS.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 fS=Math.log(2),pS="___zrEVENTSAVED",gS=[],mS="undefined"!=typeof window&&!!window.addEventListener,vS=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,yS=[],xS=mS?function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0}:function(t){t.returnValue=!1,t.cancelBubble=!0},_S=function(){this._track=[]};_S.prototype={constructor:_S,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 wS)if(wS.hasOwnProperty(e)){var i=wS[e](this._track,t);if(i)return i}}};var wS={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}}}}},bS="silent";Le.prototype.dispose=function(){};var SS=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],MS=function(t,e,i,n){dS.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)};MS.prototype={constructor:MS,setHandlerProxy:function(t){this.proxy&&this.proxy.dispose(),t&&(f(SS,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!==bS)){a.target=n[o];break}}return a},processGesture:function(t,e){this._gestureMgr||(this._gestureMgr=new _S);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){MS.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||lS(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(i,t,e)}}),c(MS,dS),c(MS,le);var IS="undefined"==typeof Float32Array?Array:Float32Array,TS=(Object.freeze||Object)({create:Oe,identity:Ne,copy:Ee,mul:ze,translate:Re,rotate:Be,scale:Ve,invert:Ge,clone:Fe}),AS=Ne,DS=5e-5,CS=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},LS=CS.prototype;LS.transform=null,LS.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 kS=[];LS.updateTransform=function(){var t=this.parent,e=t&&t.transform,i=this.needLocalTransform(),n=this.transform;if(!i&&!e)return void(n&&AS(n));n=n||Oe(),i?this.getLocalTransform(n):AS(n),e&&(i?ze(n,t.transform,n):Ee(n,t.transform)),this.transform=n;var a=this.globalScaleRatio;if(null!=a&&1!==a){this.getGlobalScale(kS);var o=kS[0]<0?-1:1,r=kS[1]<0?-1:1,s=((kS[0]-o)*a+o)/kS[0]||0,l=((kS[1]-r)*a+r)/kS[1]||0;n[0]*=s,n[1]*=s,n[2]*=l,n[3]*=l}this.invTransform=this.invTransform||Oe(),Ge(this.invTransform,n)},LS.getLocalTransform=function(t){return CS.getLocalTransform(this,t)},LS.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)},LS.restoreTransform=function(t){var e=t.dpr||1;t.setTransform(e,0,0,e,0,0)};var PS=[],OS=Oe();LS.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)}},LS.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(ze(PS,t.invTransform,e),e=PS);var i=this.origin;i&&(i[0]||i[1])&&(OS[4]=i[0],OS[5]=i[1],ze(PS,e,OS),PS[4]-=i[0],PS[5]-=i[1],e=PS),this.setLocalTransform(e)}},LS.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)},LS.transformCoordToLocal=function(t,e){var i=[t,e],n=this.invTransform;return n&&oe(i,i,n),i},LS.transformCoordToGlobal=function(t,e){var i=[t,e],n=this.transform;return n&&oe(i,i,n),i},CS.getLocalTransform=function(t,e){e=e||[],AS(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 NS={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-NS.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*NS.bounceIn(2*t):.5*NS.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?NS[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 ES=function(){this.head=null,this.tail=null,this._len=0},zS=ES.prototype;zS.insert=function(t){var e=new RS(t);return this.insertEntry(e),e},zS.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++},zS.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--},zS.len=function(){return this._len},zS.clear=function(){this.head=this.tail=null,this._len=0};var RS=function(t){this.value=t,this.next,this.prev},BS=function(t){this._list=new ES,this._map={},this._maxSize=t||10,this._lastRemovedEntry=null},VS=BS.prototype;VS.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 RS(e),r.key=t,i.insertEntry(r),n[t]=r}return a},VS.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},VS.clear=function(){this._list.clear(),this._map={}};var GS={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]},FS=new BS(20),WS=null,HS=oi,ZS=ri,XS=(Object.freeze||Object)({parse:ti,lift:ni,toHex:ai,fastLerp:oi,fastMapToColor:HS,lerp:ri,mapToColor:ZS,modifyHSL:si,modifyAlpha:li,stringify:ui}),US=Array.prototype.slice,YS=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=[]};YS.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;t<this._clipList.length;t++)this._clipList[t].pause();this._paused=!0},resume:function(){for(var t=0;t<this._clipList.length;t++)this._clipList[t].resume();this._paused=!1},isPaused:function(){return!!this._paused},_doneCallback:function(){this._tracks={},this._clipList.length=0;for(var t=this._doneList,e=t.length,i=0;e>i;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;i<n._onframeList.length;i++)n._onframeList[i](t,e)}}return a||this._doneCallback(),this},stop:function(t){for(var e=this._clipList,i=this.animation,n=0;n<e.length;n++){var a=e[n];t&&a.onframe(this._target,1),i&&i.removeClip(a)}e.length=0},delay:function(t){return this._delay=t,this},done:function(t){return t&&this._doneList.push(t),this},getClips:function(){return this._clipList}};var jS=1;"undefined"!=typeof window&&(jS=Math.max(window.devicePixelRatio||1,1));var qS=0,KS=jS,$S=function(){};1===qS&&($S=console.error);var JS=$S,QS=function(){this.animators=[]};QS.prototype={constructor:QS,animate:function(t,e){var i,n=!1,a=this,o=this.__zr;if(t){var r=t.split("."),s=a;n="shape"===r[0];for(var l=0,h=r.length;h>l;l++)s&&(s=s[r[l]]);s&&(i=s)}else i=a;if(!i)return void JS('Property "'+t+'" is not existed in element '+a.id);var c=a.animators,d=new YS(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 tM=function(t){CS.call(this,t),dS.call(this,t),QS.call(this,t),this.id=t.id||Wb()};tM.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;i<e.length;i++)t.animation.addAnimator(e[i]);this.clipPath&&this.clipPath.addSelfToZr(t)},removeSelfFromZr:function(t){this.__zr=null;var e=this.animators;if(e)for(var i=0;i<e.length;i++)t.animation.removeAnimator(e[i]);this.clipPath&&this.clipPath.removeSelfFromZr(t)}},c(tM,QS),c(tM,CS),c(tM,dS);var eM=oe,iM=Math.min,nM=Math.max;Ti.prototype={constructor:Ti,union:function(t){var e=iM(t.x,this.x),i=iM(t.y,this.y);this.width=nM(t.x+t.width,this.x+this.width)-e,this.height=nM(t.y+t.height,this.y+this.height)-i,this.x=e,this.y=i},applyTransform:function(){var t=[],e=[],i=[],n=[];return function(a){if(a){t[0]=i[0]=this.x,t[1]=n[1]=this.y,e[0]=n[0]=this.x+this.width,e[1]=i[1]=this.y+this.height,eM(t,t,a),eM(e,e,a),eM(i,i,a),eM(n,n,a),this.x=iM(t[0],e[0],i[0],n[0]),this.y=iM(t[1],e[1],i[1],n[1]);var o=nM(t[0],e[0],i[0],n[0]),r=nM(t[1],e[1],i[1],n[1]);this.width=o-this.x,this.height=r-this.y}}}(),calculateTransform:function(t){var e=this,i=t.width/e.width,n=t.height/e.height,a=Oe();return Re(a,a,[-e.x,-e.y]),Ve(a,a,[i,n]),Re(a,a,[t.x,t.y]),a},intersect:function(t){if(!t)return!1;t instanceof Ti||(t=Ti.create(t));var e=this,i=e.x,n=e.x+e.width,a=e.y,o=e.y+e.height,r=t.x,s=t.x+t.width,l=t.y,u=t.y+t.height;return!(r>n||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 aM=function(t){t=t||{},tM.call(this,t);for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);this._children=[],this.__storage=null,this.__dirty=!0};aM.prototype={constructor:aM,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<e.length;i++)if(e[i].name===t)return e[i]},childCount:function(){return this._children.length},add:function(t){return t&&t!==this&&t.parent!==this&&(this._children.push(t),this._doAdd(t)),this},addBefore:function(t,e){if(t&&t!==this&&t.parent!==this&&e&&e.parent===this){var i=this._children,n=i.indexOf(e);n>=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 aM&&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 aM&&t.delChildrenFromStorage(i)),e&&e.refresh(),this)},removeAll:function(){var t,e,i=this._children,n=this.__storage;for(e=0;e<i.length;e++)t=i[e],n&&(n.delFromStorage(t),t instanceof aM&&t.delChildrenFromStorage(n)),t.parent=null;return i.length=0,this},eachChild:function(t,e){for(var i=this._children,n=0;n<i.length;n++){var a=i[n];t.call(e,a,n)}return this},traverse:function(t,e){for(var i=0;i<this._children.length;i++){var n=this._children[i];t.call(e,n),"group"===n.type&&n.traverse(t,e)}return this},addChildrenToStorage:function(t){for(var e=0;e<this._children.length;e++){var i=this._children[e];t.addToStorage(i),i instanceof aM&&i.addChildrenToStorage(t)}},delChildrenFromStorage:function(t){for(var e=0;e<this._children.length;e++){var i=this._children[e];t.delFromStorage(i),i instanceof aM&&i.delChildrenFromStorage(t)}},dirty:function(){return this.__dirty=!0,this.__zr&&this.__zr.refresh(),this},getBoundingRect:function(t){for(var e=null,i=new Ti(0,0,0,0),n=t||this._children,a=[],o=0;o<n.length;o++){var r=n[o];if(!r.ignore&&!r.invisible){var s=r.getBoundingRect(),l=r.getLocalTransform(a);l?(i.copy(s),i.applyTransform(l),e=e||i.clone(),e.union(i)):(e=e||s.clone(),e.union(s))}}return e||i}},h(aM,tM);var oM=32,rM=7,sM=function(){this._roots=[],this._displayList=[],this._displayListLen=0};sM.prototype={constructor:sM,traverse:function(t,e){for(var i=0;i<this._roots.length;i++)this._roots[i].traverse(t,e)},getDisplayList:function(t,e){return e=e||!1,t&&this.updateDisplayList(e),this._displayList},updateDisplayList:function(t){this._displayListLen=0;for(var e=this._roots,i=this._displayList,n=0,a=e.length;a>n;n++)this._updateAndAddDisplayable(e[n],null,t);i.length=this._displayListLen,Zb.canvasSupported&&Ni(i,Ei)},_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;s<r.length;s++){var l=r[s];t.__dirty&&(l.__dirty=!0),this._updateAndAddDisplayable(l,e,i)}t.__dirty=!1}else t.__clipPaths=e,this._displayList[this._displayListLen++]=t}},addRoot:function(t){t.__storage!==this&&(t instanceof aM&&t.addChildrenToStorage(this),this.addToStorage(t),this._roots.push(t))},delRoot:function(t){if(null==t){for(var e=0;e<this._roots.length;e++){var i=this._roots[e];i instanceof aM&&i.delChildrenFromStorage(this)}return this._roots=[],this._displayList=[],void(this._displayListLen=0)}if(t instanceof Array)for(var e=0,n=t.length;n>e;e++)this.delRoot(t[e]);else{var a=u(this._roots,t);a>=0&&(this.delFromStorage(t),this._roots.splice(a,1),t instanceof aM&&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:Ei};var lM={shadowBlur:1,shadowOffsetX:1,shadowOffsetY:1,textShadowBlur:1,textShadowOffsetX:1,textShadowOffsetY:1,textBoxShadowBlur:1,textBoxShadowOffsetX:1,textBoxShadowOffsetY:1},uM=function(t,e,i){return lM.hasOwnProperty(e)?i*=t.dpr:i},hM={NONE:0,STYLE_BIND:1,PLAIN_TEXT:2},cM=9,dM=[["shadowBlur",0],["shadowOffsetX",0],["shadowOffsetY",0],["shadowColor","#000"],["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]],fM=function(t){this.extendFrom(t,!1)};fM.prototype={constructor:fM,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!==hM.STYLE_BIND;t.__attrCachedBy=hM.STYLE_BIND;for(var r=0;r<dM.length;r++){var s=dM[r],l=s[0];(o||n[l]!==a[l])&&(t[l]=uM(t,l,n[l]||s[1]))}if((o||n.fill!==a.fill)&&(t.fillStyle=n.fill),(o||n.stroke!==a.stroke)&&(t.strokeStyle=n.stroke),(o||n.opacity!==a.opacity)&&(t.globalAlpha=null==n.opacity?1:n.opacity),(o||n.blend!==a.blend)&&(t.globalCompositeOperation=n.blend||"source-over"),this.hasStroke()){var u=n.lineWidth;t.lineWidth=u/(this.strokeNoScale&&e&&e.getLineScale?e.getLineScale():1)}},hasFill:function(){var t=this.fill;return null!=t&&"none"!==t},hasStroke:function(){var t=this.stroke;return null!=t&&"none"!==t&&this.lineWidth>0},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?Ri:zi,a=n(t,e,i),o=e.colorStops,r=0;r<o.length;r++)a.addColorStop(o[r].offset,o[r].color);return a}};for(var pM=fM.prototype,gM=0;gM<dM.length;gM++){var mM=dM[gM];mM[0]in pM||(pM[mM[0]]=mM[1])}fM.getGradient=pM.getGradient;var vM=function(t,e){this.image=t,this.repeat=e,this.type="pattern"};vM.prototype.getCanvasPattern=function(t){return t.createPattern(this.image,this.repeat||"repeat")};var yM=function(t,e,i){var n;i=i||KS,"string"==typeof t?n=Vi(t,e,i):S(t)&&(n=t,t=n.id),this.id=t,this.dom=n;var a=n.style;a&&(n.onselectstart=Bi,a["-webkit-user-select"]="none",a["user-select"]="none",a["-webkit-touch-callout"]="none",a["-webkit-tap-highlight-color"]="rgba(0,0,0,0)",a.padding=0,a.margin=0,a["border-width"]=0),this.domBack=null,this.ctxBack=null,this.painter=e,this.config=null,this.clearColor=0,this.motionBlur=!1,this.lastFrameAlpha=.7,this.dpr=i};yM.prototype={constructor:yM,__dirty:!0,__used:!1,__drawIndex:0,__startIndex:0,__endIndex:0,incremental:!1,getElementCount:function(){return this.__endIndex-this.__startIndex},initContext:function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},createBackBuffer:function(){var t=this.dpr;this.domBack=Vi("back-"+this.id,this.painter,t),this.ctxBack=this.domBack.getContext("2d"),1!==t&&this.ctxBack.scale(t,t)},resize:function(t,e){var i=this.dpr,n=this.dom,a=n.style,o=this.domBack;a&&(a.width=t+"px",a.height=e+"px"),n.width=t*i,n.height=e*i,o&&(o.width=t*i,o.height=e*i,1!==i&&this.ctxBack.scale(i,i))},clear:function(t,e){var i=this.dom,n=this.ctx,a=i.width,o=i.height,e=e||this.clearColor,r=this.motionBlur&&!t,s=this.lastFrameAlpha,l=this.dpr;if(r&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(i,0,0,a/l,o/l)),n.clearRect(0,0,a,o),e&&"transparent"!==e){var u;e.colorStops?(u=e.__canvasGradient||fM.getGradient(n,e,{x:0,y:0,width:a,height:o}),e.__canvasGradient=u):e.image&&(u=vM.prototype.getCanvasPattern.call(e,n)),n.save(),n.fillStyle=u||e,n.fillRect(0,0,a,o),n.restore()}if(r){var h=this.domBack;n.save(),n.globalAlpha=s,n.drawImage(h,0,0,a,o),n.restore()}}};var xM="undefined"!=typeof window&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){setTimeout(t,16)},_M=new BS(50),wM={},bM=0,SM=5e3,MM=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g,IM="12px sans-serif",TM={};TM.measureText=function(t,e){var i=l();return i.font=e||IM,i.measureText(t)};var AM=IM,DM={left:1,right:1,center:1},CM={top:1,bottom:1,middle:1},LM=[["textShadowBlur","shadowBlur",0],["textShadowOffsetX","shadowOffsetX",0],["textShadowOffsetY","shadowOffsetY",0],["textShadowColor","shadowColor","transparent"]],kM={},PM={},OM=new Ti,NM=function(){};NM.prototype={constructor:NM,drawRectText:function(t,e){var i=this.style;e=i.textRect||e,this.__dirty&&un(i,!0);var n=i.text;if(null!=n&&(n+=""),Tn(n,i)){t.save();var a=this.transform;i.transformText?this.setTransform(t):a&&(OM.copy(e),OM.applyTransform(a),e=OM),cn(this,t,n,i,e,cM),t.restore()}}},An.prototype={constructor:An,type:"displayable",__dirty:!0,invisible:!1,z:0,z2:0,zlevel:0,draggable:!1,dragging:!1,silent:!1,culling:!1,cursor:"pointer",rectHover:!1,progressive:!1,incremental:!1,globalScaleRatio:1,beforeBrush:function(){},afterBrush:function(){},brush:function(){},getBoundingRect:function(){},contain:function(t,e){return this.rectContain(t,e)},traverse:function(t,e){t.call(e,this)},rectContain:function(t,e){var i=this.transformCoordToLocal(t,e),n=this.getBoundingRect();return n.contain(i[0],i[1])},dirty:function(){this.__dirty=this.__dirtyText=!0,this._rect=null,this.__zr&&this.__zr.refresh()},animateStyle:function(t){return this.animate("style",t)},attrKV:function(t,e){"style"!==t?tM.prototype.attrKV.call(this,t,e):this.style.set(e)},setStyle:function(t,e){return this.style.set(t,e),this.dirty(!1),this},useStyle:function(t){return this.style=new fM(t,this),this.dirty(!1),this},calculateTextPosition:null},h(An,tM),c(An,NM),Dn.prototype={constructor:Dn,type:"image",brush:function(t,e){var i=this.style,n=i.image;i.bind(t,this,e);var a=this._image=Fi(n,this._image,this,this.onload);if(a&&Hi(a)){var o=i.x||0,r=i.y||0,s=i.width,l=i.height,u=a.width/a.height;if(null==s&&null!=l?s=l*u:null==l&&null!=s?l=s/u:null==s&&null==l&&(s=a.width,l=a.height),this.setTransform(t),i.sWidth&&i.sHeight){var h=i.sx||0,c=i.sy||0;t.drawImage(a,h,c,i.sWidth,i.sHeight,o,r,s,l)}else if(i.sx&&i.sy){var h=i.sx,c=i.sy,d=s-h,f=l-c;t.drawImage(a,h,c,d,f,o,r,s,l)}else t.drawImage(a,o,r,s,l);null!=i.text&&(this.restoreTransform(t),this.drawRectText(t,this.getBoundingRect()))}},getBoundingRect:function(){var t=this.style;return this._rect||(this._rect=new Ti(t.x||0,t.y||0,t.width||0,t.height||0)),this._rect}},h(Dn,An);var EM=1e5,zM=314159,RM=.01,BM=.001,VM=new Ti(0,0,0,0),GM=new Ti(0,0,0,0),FM=function(t,e,i){this.type="canvas";var n=!t.nodeName||"CANVAS"===t.nodeName.toUpperCase();this._opts=i=r({},i||{}),this.dpr=i.devicePixelRatio||KS,this._singleCanvas=n,this.root=t;var a=t.style;a&&(a["-webkit-tap-highlight-color"]="transparent",a["-webkit-user-select"]=a["user-select"]=a["-webkit-touch-callout"]="none",t.innerHTML=""),this.storage=e;var o=this._zlevelList=[],s=this._layers={};if(this._layerConfig={},this._needsManuallyCompositing=!1,n){var l=t.width,u=t.height;null!=i.width&&(l=i.width),null!=i.height&&(u=i.height),this.dpr=i.devicePixelRatio||1,t.width=l*this.dpr,t.height=u*this.dpr,this._width=l,this._height=u;var h=new yM(t,this,this.dpr);h.__builtin__=!0,h.initContext(),s[zM]=h,h.zlevel=zM,o.push(zM),this._domRoot=t}else{this._width=this._getSize(0),this._height=this._getSize(1);var c=this._domRoot=Nn(this._width,this._height);t.appendChild(c)}this._hoverlayer=null,this._hoverElements=[]};FM.prototype={constructor:FM,getType:function(){return"canvas"},isSingleCanvas:function(){return this._singleCanvas},getViewportRoot:function(){return this._domRoot},getViewportRootOffset:function(){var t=this.getViewportRoot();return t?{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}:void 0},refresh:function(t){var e=this.storage.getDisplayList(!0),i=this._zlevelList;this._redrawId=Math.random(),this._paintList(e,t,this._redrawId);for(var n=0;n<i.length;n++){var a=i[n],o=this._layers[a];if(!o.__builtin__&&o.refresh){var r=0===n?this._backgroundColor:null;o.refresh(r)}}return this.refreshHover(),this},addHover:function(t,e){if(!t.__hoverMir){var i=new t.constructor({style:t.style,shape:t.shape,z:t.z,z2:t.z2,silent:t.silent});return i.__from=t,t.__hoverMir=i,e&&i.setStyle(e),this._hoverElements.push(i),i}},removeHover:function(t){var e=t.__hoverMir,i=this._hoverElements,n=u(i,e);n>=0&&i.splice(n,1),t.__hoverMir=null},clearHover:function(){for(var t=this._hoverElements,e=0;e<t.length;e++){var i=t[e].__from;i&&(i.__hoverMir=null)}t.length=0},refreshHover:function(){var t=this._hoverElements,e=t.length,i=this._hoverlayer;if(i&&i.clear(),e){Ni(t,this.storage.displayableSortFunc),i||(i=this._hoverlayer=this.getLayer(EM));var n={};i.ctx.save();for(var a=0;e>a;){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(EM)},_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;
xM(function(){a._paintList(t,e,i)})}}},_compositeManually:function(){var t=this.getLayer(zM).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;n<this._zlevelList.length;n++){var a=this._zlevelList[n],o=this._layers[a];o.__builtin__&&o!==this._hoverlayer&&(o.__dirty||e)&&i.push(o)}for(var r=!0,s=0;s<i.length;s++){var o=i[s],l=o.ctx,u={};l.save();var h=e?o.__startIndex:o.__drawIndex,c=!e&&o.incremental&&Date.now,d=c&&Date.now(),p=o.zlevel===this._zlevelList[0]?this._backgroundColor:null;if(o.__startIndex===o.__endIndex)o.clear(!1,p);else if(h===o.__startIndex){var g=t[h];g.incremental&&g.notClear&&!e||o.clear(!1,p)}-1===h&&(console.error("For some unknown reason. drawIndex is -1"),h=o.__startIndex);for(var m=h;m<o.__endIndex;m++){var v=t[m];if(this._doPaintEl(v,o,e,u),v.__dirty=v.__dirtyText=!1,c){var y=Date.now()-d;if(y>15)break}}o.__drawIndex=m,o.__drawIndex<o.__endIndex&&(r=!1),u.prevElClipPaths&&l.restore(),l.restore()}return Zb.wxa&&f(this._layers,function(t){t&&t.ctx&&t.ctx.draw&&t.ctx.draw()}),r},_doPaintEl:function(t,e,i,n){var a=e.ctx,o=t.transform;if(!(!e.__dirty&&!i||t.invisible||0===t.style.opacity||o&&!o[0]&&!o[3]||t.culling&&kn(t,this._width,this._height))){var r=t.__clipPaths,s=n.prevElClipPaths;(!s||Pn(r,s))&&(s&&(a.restore(),n.prevElClipPaths=null,n.prevEl=null),r&&(a.save(),On(r,a),n.prevElClipPaths=r)),t.beforeBrush&&t.beforeBrush(a),t.brush(a,n.prevEl||null),n.prevEl=t,t.afterBrush&&t.afterBrush(a)}},getLayer:function(t,e){this._singleCanvas&&!this._needsManuallyCompositing&&(t=zM);var i=this._layers[t];return i||(i=new yM("zr_"+t,this,this.dpr),i.zlevel=t,i.__builtin__=!0,this._layerConfig[t]&&a(i,this._layerConfig[t],!0),e&&(i.virtual=e),this.insertLayer(t,i),i.initContext()),i},insertLayer:function(t,e){var i=this._layers,n=this._zlevelList,a=n.length,o=null,r=-1,s=this._domRoot;if(i[t])return void JS("ZLevel "+t+" has been used already");if(!Ln(e))return void JS("Layer of zlevel "+t+" is not valid");if(a>0&&t>n[0]){for(r=0;a-1>r&&!(n[r]<t&&n[r+1]>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;n<a.length;n++)i=a[n],t.call(e,this._layers[i],i)},eachBuiltinLayer:function(t,e){var i,n,a,o=this._zlevelList;for(a=0;a<o.length;a++)n=o[a],i=this._layers[n],i.__builtin__&&t.call(e,i,n)},eachOtherLayer:function(t,e){var i,n,a,o=this._zlevelList;for(a=0;a<o.length;a++)n=o[a],i=this._layers[n],i.__builtin__||t.call(e,i,n)},getLayers:function(){return this._layers},_updateLayerStatus:function(t){function e(t){a&&(a.__endIndex!==t&&(a.__dirty=!0),a.__endIndex=t)}if(this.eachBuiltinLayer(function(t){t.__dirty=t.__used=!1}),this._singleCanvas)for(var i=1;i<t.length;i++){var n=t[i];if(n.zlevel!==t[i-1].zlevel||n.incremental){this._needsManuallyCompositing=!0;break}}for(var a=null,o=0,i=0;i<t.length;i++){var r,n=t[i],s=n.zlevel;n.incremental?(r=this.getLayer(s+BM,this._needsManuallyCompositing),r.incremental=!0,o=1):r=this.getLayer(s+(o>0?RM:0),this._needsManuallyCompositing),r.__builtin__||JS("ZLevel "+s+" has been used by unkown layer "+r.id),r!==a&&(r.__used=!0,r.__startIndex!==i&&(r.__dirty=!0),r.__startIndex=i,r.__drawIndex=r.incremental?-1:i,e(i),a=r),n.__dirty&&(r.__dirty=!0,r.incremental&&r.__drawIndex<0&&(r.__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<this._zlevelList.length;n++){var o=this._zlevelList[n];if(o===t||o===t+RM){var r=this._layers[o];a(r,i[t],!0)}}}},delLayer:function(t){var e=this._layers,i=this._zlevelList,n=e[t];n&&(n.dom.parentNode.removeChild(n.dom),delete e[t],i.splice(u(i,t),1))},resize:function(t,e){if(this._domRoot.style){var i=this._domRoot;i.style.display="none";var n=this._opts;if(null!=t&&(n.width=t),null!=e&&(n.height=e),t=this._getSize(0),e=this._getSize(1),i.style.display="",this._width!==t||e!==this._height){i.style.width=t+"px",i.style.height=e+"px";for(var a in this._layers)this._layers.hasOwnProperty(a)&&this._layers[a].resize(t,e);f(this._progressiveLayers,function(i){i.resize(t,e)}),this.refresh(!0)}this._width=t,this._height=e}else{if(null==t||null==e)return;this._width=t,this._height=e,this.getLayer(zM).resize(t,e)}return this},clearLayer:function(t){var e=this._layers[t];e&&e.clear()},dispose:function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},getRenderedCanvas:function(t){if(t=t||{},this._singleCanvas&&!this._compositeManually)return this._layers[zM].dom;var e=new yM("image",this,t.pixelRatio||this.dpr);if(e.initContext(),e.clear(!1,t.backgroundColor||this._backgroundColor),t.pixelRatio<=this.dpr){this.refresh();var i=e.dom.width,n=e.dom.height,a=e.ctx;this.eachLayer(function(t){t.__builtin__?a.drawImage(t.dom,0,0,i,n):t.renderToCanvas&&(e.ctx.save(),t.renderToCanvas(e.ctx),e.ctx.restore())})}else for(var o={},r=this.storage.getDisplayList(!0),s=0;s<r.length;s++){var l=r[s];this._doPaintEl(l,e,!0,o)}return e.dom},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(t){var e=this._opts,i=["width","height"][t],n=["clientWidth","clientHeight"][t],a=["paddingLeft","paddingTop"][t],o=["paddingRight","paddingBottom"][t];if(null!=e[i]&&"auto"!==e[i])return parseFloat(e[i]);var r=this.root,s=document.defaultView.getComputedStyle(r);return(r[n]||Cn(s[i])||Cn(r.style[i]))-(Cn(s[a])||0)-(Cn(s[o])||0)|0},pathToImage:function(t,e){e=e||this.dpr;var i=document.createElement("canvas"),n=i.getContext("2d"),a=t.getBoundingRect(),o=t.style,r=o.shadowBlur*e,s=o.shadowOffsetX*e,l=o.shadowOffsetY*e,u=o.hasStroke()?o.lineWidth:0,h=Math.max(u/2,-s+r),c=Math.max(u/2,s+r),d=Math.max(u/2,-l+r),f=Math.max(u/2,l+r),p=a.width+h+c,g=a.height+d+f;i.width=p*e,i.height=g*e,n.scale(e,e),n.clearRect(0,0,p,g),n.dpr=e;var m={position:t.position,rotation:t.rotation,scale:t.scale};t.position=[h-a.x,d-a.y],t.rotation=0,t.scale=[1,1],t.updateTransform(),t&&t.brush(n);var v=Dn,y=new v({style:{x:0,y:0,image:i}});return null!=m.position&&(y.position=t.position=m.position),null!=m.rotation&&(y.rotation=t.rotation=m.rotation),null!=m.scale&&(y.scale=t.scale=m.scale),y}};var WM=function(t){t=t||{},this.stage=t.stage||{},this.onframe=t.onframe||function(){},this._clips=[],this._running=!1,this._time,this._pausedTime,this._pauseStart,this._paused=!1,dS.call(this)};WM.prototype={constructor:WM,addClip:function(t){this._clips.push(t)},addAnimator:function(t){t.animation=this;for(var e=t.getClips(),i=0;i<e.length;i++)this.addClip(e[i])},removeClip:function(t){var e=u(this._clips,t);e>=0&&this._clips.splice(e,1)},removeAnimator:function(t){for(var e=t.getClips(),i=0;i<e.length;i++)this.removeClip(e[i]);t.animation=null},_update:function(){for(var t=(new Date).getTime()-this._pausedTime,e=t-this._time,i=this._clips,n=i.length,a=[],o=[],r=0;n>r;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&&(xM(t),!e._paused&&e._update())}var e=this;this._running=!0,xM(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 YS(t,e.loop,e.getter,e.setter);return this.addAnimator(i),i}},c(WM,dS);var HM=300,ZM=Zb.domSupported,XM=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}}(),UM={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},YM=Fn.prototype;YM.stopPropagation=YM.stopImmediatePropagation=YM.preventDefault=G;var jM={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]||Un(this,!0),this.trigger("mousemove",t)},mouseup:function(t){t=be(this.dom,t),Un(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=Gn(this,e),this.trigger("mouseout",t)},touchstart:function(t){t=be(this.dom,t),Bn(t),this._lastTouchMoment=new Date,this.handler.processGesture(t,"start"),jM.mousemove.call(this,t),jM.mousedown.call(this,t)},touchmove:function(t){t=be(this.dom,t),Bn(t),this.handler.processGesture(t,"change"),jM.mousemove.call(this,t)},touchend:function(t){t=be(this.dom,t),Bn(t),this.handler.processGesture(t,"end"),jM.mouseup.call(this,t),+new Date-this._lastTouchMoment<HM&&jM.click.call(this,t)},pointerdown:function(t){jM.mousedown.call(this,t)},pointermove:function(t){zn(t)||jM.mousemove.call(this,t)},pointerup:function(t){jM.mouseup.call(this,t)},pointerout:function(t){zn(t)||jM.mouseout.call(this,t)}};f(["click","mousewheel","dblclick","contextmenu"],function(t){jM[t]=function(e){e=be(this.dom,e),this.trigger(t,e)}});var qM={pointermove:function(t){zn(t)||qM.mousemove.call(this,t)},pointerup:function(t){qM.mouseup.call(this,t)},mousemove:function(t){this.trigger("mousemove",t)},mouseup:function(t){var e=this._pointerCapturing;Un(this,!1),this.trigger("mouseup",t),e&&(t.zrEventControl="only_globalout",this.trigger("mouseout",t))}},KM=jn.prototype;KM.dispose=function(){Xn(this._localHandlerScope),ZM&&Xn(this._globalHandlerScope)},KM.setCursor=function(t){this.dom.style&&(this.dom.style.cursor=t||"default")},c(jn,dS);var $M=!Zb.canvasSupported,JM={canvas:FM},QM={},tI="4.3.0",eI=function(t,e,i){i=i||{},this.dom=e,this.id=t;var n=this,a=new sM,o=i.renderer;if($M){if(!JM.vml)throw new Error("You need to require 'zrender/vml/vml' to support IE8");o="vml"}else o&&JM[o]||(o="canvas");var r=new JM[o](e,a,i,t);this.storage=a,this.painter=r;var s=Zb.node||Zb.worker?null:new jn(r.getViewportRoot(),r.root);this.handler=new MS(a,r,s,r.root),this.animation=new WM({stage:{update:y(this.flush,this)}}),this.animation.start(),this._needsRefresh;var l=a.delFromStorage,u=a.addToStorage;a.delFromStorage=function(t){l.call(a,t),t&&t.removeSelfFromZr(n)},a.addToStorage=function(t){u.call(a,t),t.addSelfToZr(n)}};eI.prototype={constructor:eI,getId:function(){return this.id},add:function(t){this.storage.addRoot(t),this._needsRefresh=!0},remove:function(t){this.storage.delRoot(t),this._needsRefresh=!0},configLayer:function(t,e){this.painter.configLayer&&this.painter.configLayer(t,e),this._needsRefresh=!0},setBackgroundColor:function(t){this.painter.setBackgroundColor&&this.painter.setBackgroundColor(t),this._needsRefresh=!0},refreshImmediately:function(){this._needsRefresh=this._needsRefreshHover=!1,this.painter.refresh(),this._needsRefresh=this._needsRefreshHover=!1},refresh:function(){this._needsRefresh=!0},flush:function(){var t;this._needsRefresh&&(t=!0,this.refreshImmediately()),this._needsRefreshHover&&(t=!0,this.refreshHoverImmediately()),t&&this.trigger("rendered")},addHover:function(t,e){if(this.painter.addHover){var i=this.painter.addHover(t,e);return this.refreshHover(),i}},removeHover:function(t){this.painter.removeHover&&(this.painter.removeHover(t),this.refreshHover())},clearHover:function(){this.painter.clearHover&&(this.painter.clearHover(),this.refreshHover())},refreshHover:function(){this._needsRefreshHover=!0},refreshHoverImmediately:function(){this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.refreshHover()},resize:function(t){t=t||{},this.painter.resize(t.width,t.height),this.handler.resize()},clearAnimation:function(){this.animation.clear()},getWidth:function(){return this.painter.getWidth()},getHeight:function(){return this.painter.getHeight()},pathToImage:function(t,e){return this.painter.pathToImage(t,e)},setCursorStyle:function(t){this.handler.setCursorStyle(t)},findHover:function(t,e){return this.handler.findHover(t,e)},on:function(t,e,i){this.handler.on(t,e,i)},off:function(t,e){this.handler.off(t,e)},trigger:function(t,e){this.handler.trigger(t,e)},clear:function(){this.storage.delRoot(),this.painter.clear()},dispose:function(){this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,Qn(this.id)}};var iI=(Object.freeze||Object)({version:tI,init:qn,dispose:Kn,getInstance:$n,registerPainter:Jn}),nI=f,aI=S,oI=_,rI="series\x00",sI=["fontStyle","fontWeight","fontSize","fontFamily","rich","tag","color","textBorderColor","textBorderWidth","width","height","lineHeight","align","verticalAlign","baseline","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY","backgroundColor","borderColor","borderWidth","borderRadius","padding"],lI=0,uI=".",hI="___EC__COMPONENT__CONTAINER___",cI=0,dI=function(t){for(var e=0;e<t.length;e++)t[e][1]||(t[e][1]=t[e][0]);return function(e,i,n){for(var a={},o=0;o<t.length;o++){var r=t[o][1];if(!(i&&u(i,r)>=0||n&&u(n,r)<0)){var s=e.getShallow(r);null!=s&&(a[t[o][0]]=s)}}return a}},fI=dI([["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),pI={getLineStyle:function(t){var e=fI(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]}},gI=dI([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),mI={getAreaStyle:function(t,e){return gI(this,t,e)}},vI=Math.pow,yI=Math.sqrt,xI=1e-8,_I=1e-4,wI=yI(3),bI=1/3,SI=F(),MI=F(),II=F(),TI=Math.min,AI=Math.max,DI=Math.sin,CI=Math.cos,LI=2*Math.PI,kI=F(),PI=F(),OI=F(),NI=[],EI=[],zI={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},RI=[],BI=[],VI=[],GI=[],FI=Math.min,WI=Math.max,HI=Math.cos,ZI=Math.sin,XI=Math.sqrt,UI=Math.abs,YI="undefined"!=typeof Float32Array,jI=function(t){this._saveData=!t,this._saveData&&(this.data=[]),this._ctx=null};jI.prototype={constructor:jI,_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=UI(i/KS/t)||0,this._uy=UI(i/KS/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(zI.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=UI(t-this._xi)>this._ux||UI(e-this._yi)>this._uy||this._len<5;return this.addData(zI.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(zI.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(zI.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(zI.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=HI(a)*i+t,this._yi=ZI(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(zI.R,t,e,i,n),this},closePath:function(){this.addData(zI.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;i<t.length;i++)e+=t[i];this._dashSum=e}return this},setLineDashOffset:function(t){return this._dashOffset=t,this},len:function(){return this._len},setData:function(t){var e=t.length;this.data&&this.data.length===e||!YI||(this.data=new Float32Array(e));for(var i=0;e>i;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();YI&&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;r<o.length;r++)this.data[n++]=o[r];this._len=n},addData:function(t){if(this._saveData){var e=this.data;this._len+arguments.length>e.length&&(this._expandData(),e=this.data);for(var i=0;i<arguments.length;i++)e[this._len++]=arguments[i];this._prevCmd=t}},_expandData:function(){if(!(this.data instanceof Array)){for(var t=[],e=0;e<this._len;e++)t[e]=this.data[e];this.data=t}},_needsDash:function(){return this._lineDash},_dashedLineTo:function(t,e){var i,n,a=this._dashSum,o=this._dashOffset,r=this._lineDash,s=this._ctx,l=this._xi,u=this._yi,h=t-l,c=e-u,d=XI(h*h+c*c),f=l,p=u,g=r.length;for(h/=d,c/=d,0>o&&(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?FI(f,t):WI(f,t),c>=0?FI(p,e):WI(p,e));h=f-t,c=p-e,this._dashOffset=-XI(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=Ta,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+=XI(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=-XI(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,YI&&(this.data=new Float32Array(t)))},getBoundingRect:function(){RI[0]=RI[1]=VI[0]=VI[1]=Number.MAX_VALUE,BI[0]=BI[1]=GI[0]=GI[1]=-Number.MAX_VALUE;for(var t=this.data,e=0,i=0,n=0,a=0,o=0;o<t.length;){var r=t[o++];switch(1===o&&(e=t[o],i=t[o+1],n=e,a=i),r){case zI.M:n=t[o++],a=t[o++],e=n,i=a,VI[0]=n,VI[1]=a,GI[0]=n,GI[1]=a;break;case zI.L:Va(e,i,t[o],t[o+1],VI,GI),e=t[o++],i=t[o++];break;case zI.C:Ga(e,i,t[o++],t[o++],t[o++],t[o++],t[o],t[o+1],VI,GI),e=t[o++],i=t[o++];break;case zI.Q:Fa(e,i,t[o++],t[o++],t[o],t[o+1],VI,GI),e=t[o++],i=t[o++];break;case zI.A:var s=t[o++],l=t[o++],u=t[o++],h=t[o++],c=t[o++],d=t[o++]+c;o+=1;var f=1-t[o++];1===o&&(n=HI(c)*u+s,a=ZI(c)*h+l),Wa(s,l,u,h,c,d,f,VI,GI),e=HI(d)*u+s,i=ZI(d)*h+l;break;case zI.R:n=e=t[o++],a=i=t[o++];var p=t[o++],g=t[o++];Va(n,a,n+p,a+g,VI,GI);break;case zI.Z:e=n,i=a}re(RI,RI,VI),se(BI,BI,GI)}return 0===o&&(RI[0]=RI[1]=BI[0]=BI[1]=0),new Ti(RI[0],RI[1],BI[0]-RI[0],BI[1]-RI[1])},rebuildPath:function(t){for(var e,i,n,a,o,r,s=this.data,l=this._ux,u=this._uy,h=this._len,c=0;h>c;){var d=s[c++];switch(1===c&&(n=s[c],a=s[c+1],e=n,i=a),d){case zI.M:e=n=s[c++],i=a=s[c++],t.moveTo(n,a);break;case zI.L:o=s[c++],r=s[c++],(UI(o-n)>l||UI(r-a)>u||c===h-1)&&(t.lineTo(o,r),n=o,a=r);break;case zI.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 zI.Q:t.quadraticCurveTo(s[c++],s[c++],s[c++],s[c++]),n=s[c-2],a=s[c-1];break;case zI.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=HI(v)*g+f,i=ZI(v)*m+p),n=HI(I)*g+f,a=ZI(I)*m+p;break;case zI.R:e=n=s[c],i=a=s[c+1],t.rect(s[c++],s[c++],s[c++],s[c++]);break;case zI.Z:t.closePath(),n=e,a=i}}}},jI.CMD=zI;var qI=2*Math.PI,KI=2*Math.PI,$I=jI.CMD,JI=2*Math.PI,QI=1e-4,tT=[-1,-1,-1],eT=[-1,-1],iT=vM.prototype.getCanvasPattern,nT=Math.abs,aT=new jI(!0);no.prototype={constructor:no,type:"path",__dirtyPath:!0,strokeContainThreshold:5,segmentIgnoreThreshold:0,subPixelOptimize:!1,brush:function(t,e){var i=this.style,n=this.path||aT,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=iT.call(r,t)),u?t.strokeStyle=this._strokeGradient:c&&(t.strokeStyle=iT.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 jI},getBoundingRect:function(){var t=this._rect,e=this.style,i=!t;if(i){var n=this.path;n||(n=this.path=new jI),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)),io(o,r/s,t,e)))return!0}if(a.hasFill())return eo(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):An.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&&nT(t[0]-1)>1e-10&&nT(t[3]-1)>1e-10?Math.sqrt(nT(t[0]*t[3]-t[2]*t[1])):1}},no.extend=function(t){var e=function(e){no.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,no);for(var i in t)"style"!==i&&"shape"!==i&&(e.prototype[i]=t[i]);return e},h(no,An);var oT=jI.CMD,rT=[[],[],[]],sT=Math.sqrt,lT=Math.atan2,uT=function(t,e){var i,n,a,o,r,s,l=t.data,u=oT.M,h=oT.C,c=oT.L,d=oT.R,f=oT.A,p=oT.Q;for(a=0,o=0;a<l.length;){switch(i=l[a++],o=a,n=0,i){case u:n=1;break;case c:n=1;break;case h:n=3;break;case p:n=2;break;case f:var g=e[4],m=e[5],v=sT(e[0]*e[0]+e[1]*e[1]),y=sT(e[2]*e[2]+e[3]*e[3]),x=lT(-e[1]/y,e[0]/v);l[a]*=v,l[a++]+=g,l[a]*=y,l[a++]+=m,l[a++]*=v,l[a++]*=y,l[a++]+=x,l[a++]+=x,a+=2,o=a;break;case d:s[0]=l[a++],s[1]=l[a++],oe(s,s,e),l[o++]=s[0],l[o++]=s[1],s[0]+=l[a++],s[1]+=l[a++],oe(s,s,e),l[o++]=s[0],l[o++]=s[1]}for(r=0;n>r;r++){var s=rT[r];s[0]=l[a++],s[1]=l[a++],oe(s,s,e),l[o++]=s[0],l[o++]=s[1]}}},hT=Math.sqrt,cT=Math.sin,dT=Math.cos,fT=Math.PI,pT=function(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])},gT=function(t,e){return(t[0]*e[0]+t[1]*e[1])/(pT(t)*pT(e))},mT=function(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(gT(t,e))},vT=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,yT=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g,xT=function(t){An.call(this,t)};xT.prototype={constructor:xT,type:"text",brush:function(t,e){var i=this.style;this.__dirty&&un(i,!0),i.fill=i.stroke=i.shadowBlur=i.shadowColor=i.shadowOffsetX=i.shadowOffsetY=null;var n=i.text;return null!=n&&(n+=""),Tn(n,i)?(this.setTransform(t),cn(this,t,n,i,null,e),void this.restoreTransform(t)):void(t.__attrCachedBy=hM.NONE)},getBoundingRect:function(){var t=this.style;if(this.__dirty&&un(t,!0),!this._rect){var e=t.text;null!=e?e+="":e="";var i=Xi(t.text+"",t.font,t.textAlign,t.textVerticalAlign,t.textPadding,t.textLineHeight,t.rich);if(i.x+=t.x||0,i.y+=t.y||0,bn(t.textStroke,t.textStrokeWidth)){var n=t.textStrokeWidth;i.x-=n/2,i.y-=n/2,i.width+=n,i.height+=n}this._rect=i}return this._rect}},h(xT,An);var _T=no.extend({type:"circle",shape:{cx:0,cy:0,r:0},buildPath:function(t,e,i){i&&t.moveTo(e.cx+e.r,e.cy),t.arc(e.cx,e.cy,e.r,0,2*Math.PI,!0)}}),wT=[["shadowBlur",0],["shadowColor","#000"],["shadowOffsetX",0],["shadowOffsetY",0]],bT=function(t){return Zb.browser.ie&&Zb.browser.version>=11?function(){var e,i=this.__clipPaths,n=this.style;if(i)for(var a=0;a<i.length;a++){var o=i[a],r=o&&o.shape,s=o&&o.type;if(r&&("sector"===s&&r.startAngle===r.endAngle||"rect"===s&&(!r.width||!r.height))){for(var l=0;l<wT.length;l++)wT[l][2]=n[wT[l][0]],n[wT[l][0]]=wT[l][1];e=!0;break}}if(t.apply(this,arguments),e)for(var l=0;l<wT.length;l++)n[wT[l][0]]=wT[l][2]}:t},ST=no.extend({type:"sector",shape:{cx:0,cy:0,r0:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},brush:bT(no.prototype.brush),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=e.startAngle,s=e.endAngle,l=e.clockwise,u=Math.cos(r),h=Math.sin(r);t.moveTo(u*a+i,h*a+n),t.lineTo(u*o+i,h*o+n),t.arc(i,n,o,r,s,!l),t.lineTo(Math.cos(s)*a+i,Math.sin(s)*a+n),0!==a&&t.arc(i,n,a,s,r,l),t.closePath()}}),MT=no.extend({type:"ring",shape:{cx:0,cy:0,r:0,r0:0},buildPath:function(t,e){var i=e.cx,n=e.cy,a=2*Math.PI;t.moveTo(i+e.r,n),t.arc(i,n,e.r,0,a,!1),t.moveTo(i+e.r0,n),t.arc(i,n,e.r0,0,a,!0)}}),IT=function(t,e){for(var i=t.length,n=[],a=0,o=1;i>o;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([ho(s[0],f[0],l[0],u[0],d,p,g),ho(s[1],f[1],l[1],u[1],d,p,g)])}return n},TT=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},AT=no.extend({type:"polygon",shape:{points:null,smooth:!1,smoothConstraint:null},buildPath:function(t,e){co(t,e,!0)}}),DT=no.extend({type:"polyline",shape:{points:null,smooth:!1,smoothConstraint:null},style:{stroke:"#000",fill:null},buildPath:function(t,e){co(t,e,!1)}}),CT=Math.round,LT={},kT=no.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?(po(LT,e,this.style),i=LT.x,n=LT.y,a=LT.width,o=LT.height,LT.r=e.r,e=LT):(i=e.x,n=e.y,a=e.width,o=e.height),e.r?ln(t,e):t.rect(i,n,a,o),t.closePath()}}),PT={},OT=no.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?(fo(PT,e,this.style),i=PT.x1,n=PT.y1,a=PT.x2,o=PT.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]}}),NT=[],ET=no.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&&(za(i,r,a,h,NT),r=NT[1],a=NT[2],za(n,s,o,h,NT),s=NT[1],o=NT[2]),t.quadraticCurveTo(r,s,a,o)):(1>h&&(La(i,r,l,a,h,NT),r=NT[1],l=NT[2],a=NT[3],La(n,s,u,o,h,NT),s=NT[1],u=NT[2],o=NT[3]),t.bezierCurveTo(r,s,l,u,a,o)))},pointAt:function(t){return mo(this.shape,t,!1)},tangentAt:function(t){var e=mo(this.shape,t,!0);return te(e,e)}}),zT=no.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)}}),RT=no.extend({type:"compound",shape:{paths:null},_updatePathDirty:function(){for(var t=this.__dirtyPath,e=this.shape.paths,i=0;i<e.length;i++)t=t||e[i].__dirtyPath;this.__dirtyPath=t,this.__dirty=this.__dirty||t},beforeBrush:function(){this._updatePathDirty();for(var t=this.shape.paths||[],e=this.getGlobalScale(),i=0;i<t.length;i++)t[i].path||t[i].createPathProxy(),t[i].path.setScale(e[0],e[1],t[i].segmentIgnoreThreshold)},buildPath:function(t,e){for(var i=e.paths||[],n=0;n<i.length;n++)i[n].buildPath(t,i[n].shape,!0)},afterBrush:function(){for(var t=this.shape.paths||[],e=0;e<t.length;e++)t[e].__dirtyPath=!1},getBoundingRect:function(){return this._updatePathDirty(),no.prototype.getBoundingRect.call(this)}}),BT=function(t){this.colorStops=t||[]};BT.prototype={constructor:BT,addColorStop:function(t,e){this.colorStops.push({offset:t,color:e})}};var VT=function(t,e,i,n,a,o){this.x=null==t?0:t,this.y=null==e?0:e,this.x2=null==i?1:i,this.y2=null==n?0:n,this.type="linear",this.global=o||!1,BT.call(this,a)};VT.prototype={constructor:VT},h(VT,BT);var GT=function(t,e,i,n,a){this.x=null==t?.5:t,this.y=null==e?.5:e,this.r=null==i?.5:i,this.type="radial",this.global=a||!1,BT.call(this,n)};GT.prototype={constructor:GT},h(GT,BT),vo.prototype.incremental=!0,vo.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.dirty(),this.notClear=!1},vo.prototype.addDisplayable=function(t,e){e?this._temporaryDisplayables.push(t):this._displayables.push(t),this.dirty()},vo.prototype.addDisplayables=function(t,e){e=e||!1;for(var i=0;i<t.length;i++)this.addDisplayable(t[i],e)},vo.prototype.eachPendingDisplayable=function(t){for(var e=this._cursor;e<this._displayables.length;e++)t&&t(this._displayables[e]);
for(var e=0;e<this._temporaryDisplayables.length;e++)t&&t(this._temporaryDisplayables[e])},vo.prototype.update=function(){this.updateTransform();for(var t=this._cursor;t<this._displayables.length;t++){var e=this._displayables[t];e.parent=this,e.update(),e.parent=null}for(var t=0;t<this._temporaryDisplayables.length;t++){var e=this._temporaryDisplayables[t];e.parent=this,e.update(),e.parent=null}},vo.prototype.brush=function(t){for(var e=this._cursor;e<this._displayables.length;e++){var i=this._displayables[e];i.beforeBrush&&i.beforeBrush(t),i.brush(t,e===this._cursor?null:this._displayables[e-1]),i.afterBrush&&i.afterBrush(t)}this._cursor=e;for(var e=0;e<this._temporaryDisplayables.length;e++){var i=this._temporaryDisplayables[e];i.beforeBrush&&i.beforeBrush(t),i.brush(t,0===e?null:this._temporaryDisplayables[e-1]),i.afterBrush&&i.afterBrush(t)}this._temporaryDisplayables=[],this.notClear=!0};var FT=[];vo.prototype.getBoundingRect=function(){if(!this._rect){for(var t=new Ti(1/0,1/0,-1/0,-1/0),e=0;e<this._displayables.length;e++){var i=this._displayables[e],n=i.getBoundingRect().clone();i.needLocalTransform()&&n.applyTransform(i.getLocalTransform(FT)),t.union(n)}this._rect=t}return this._rect},vo.prototype.contain=function(t,e){var i=this.transformCoordToLocal(t,e),n=this.getBoundingRect();if(n.contain(i[0],i[1]))for(var a=0;a<this._displayables.length;a++){var o=this._displayables[a];if(o.contain(t,e))return!0}return!1},h(vo,An);var WT=Math.max,HT=Math.min,ZT={},XT=1,UT={color:"textFill",textBorderColor:"textStroke",textBorderWidth:"textStrokeWidth"},YT="emphasis",jT="normal",qT=1,KT={},$T={},JT=uo,QT=go,tA=B(),eA=0;_o("circle",_T),_o("sector",ST),_o("ring",MT),_o("polygon",AT),_o("polyline",DT),_o("rect",kT),_o("line",OT),_o("bezierCurve",ET),_o("arc",zT);var iA=(Object.freeze||Object)({Z2_EMPHASIS_LIFT:XT,CACHED_LABEL_STYLE_PROPERTIES:UT,extendShape:yo,extendPath:xo,registerShape:_o,getShapeClass:wo,makePath:bo,makeImage:So,mergePath:JT,resizePath:Io,subPixelOptimizeLine:To,subPixelOptimizeRect:Ao,subPixelOptimize:QT,setElementHoverStyle:Eo,setHoverStyle:Fo,setAsHighDownDispatcher:Wo,isHighDownDispatcher:Ho,getHighlightDigit:Zo,setLabelStyle:Xo,modifyLabelStyle:Uo,setTextStyle:Yo,setText:jo,getFont:er,updateProps:nr,initProps:ar,getTransform:or,applyTransform:rr,transformDirection:sr,groupTransition:lr,clipPointsByRect:ur,clipRectByRect:hr,createIcon:cr,linePolygonIntersect:dr,lineLineIntersect:fr,Group:aM,Image:Dn,Text:xT,Circle:_T,Sector:ST,Ring:MT,Polygon:AT,Polyline:DT,Rect:kT,Line:OT,BezierCurve:ET,Arc:zT,IncrementalDisplayable:vo,CompoundPath:RT,LinearGradient:VT,RadialGradient:GT,BoundingRect:Ti}),nA=["textStyle","color"],aA={getTextColor:function(t){var e=this.ecModel;return this.getShallow("color")||(!t&&e?e.get(nA):null)},getFont:function(){return er({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},getTextRect:function(t){return Xi(t,this.getFont(),this.getShallow("align"),this.getShallow("verticalAlign")||this.getShallow("baseline"),this.getShallow("padding"),this.getShallow("lineHeight"),this.getShallow("rich"),this.getShallow("truncateText"))}},oA=dI([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["textPosition"],["textAlign"]]),rA={getItemStyle:function(t,e){var i=oA(this,t,e),n=this.getBorderLineDash();return n&&(i.lineDash=n),i},getBorderLineDash:function(){var t=this.get("borderType");return"solid"===t||null==t?null:"dashed"===t?[5,5]:[1,1]}},sA=c,lA=ha();mr.prototype={constructor:mr,init:null,mergeOption:function(t){a(this.option,t,!0)},get:function(t,e){return null==t?this.option:vr(this.option,this.parsePath(t),!e&&yr(this,t))},getShallow:function(t,e){var i=this.option,n=null==i?i:i[t],a=!e&&yr(this,t);return null==n&&a&&(n=a.getShallow(t)),n},getModel:function(t,e){var i,n=null==t?this.option:vr(this.option,t=this.parsePath(t));return e=e||(i=yr(this,t))&&i.getModel(t),new mr(n,e,this.ecModel)},isEmpty:function(){return null==this.option},restoreData:function(){},clone:function(){var t=this.constructor;return new t(n(this.option))},setReadOnly:function(){},parsePath:function(t){return"string"==typeof t&&(t=t.split(".")),t},customizeGetParent:function(t){lA(this).getParent=t},isAnimationEnabled:function(){if(!Zb.node){if(null!=this.option.animation)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}}},xa(mr),_a(mr),sA(mr,pI),sA(mr,mI),sA(mr,aA),sA(mr,rA);var uA=0,hA=1e-4,cA=9007199254740991,dA=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d\d)(?::(\d\d)(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/,fA=(Object.freeze||Object)({linearMap:Sr,parsePercent:Mr,round:Ir,asc:Tr,getPrecision:Ar,getPrecisionSafe:Dr,getPixelPrecision:Cr,getPercentWithPrecision:Lr,MAX_SAFE_INTEGER:cA,remRadian:kr,isRadianAroundZero:Pr,parseDate:Or,quantity:Nr,quantityExponent:Er,nice:zr,quantile:Rr,reformIntervals:Br,isNumeric:Vr}),pA=P,gA=/([&<>"'])/g,mA={"&":"&","<":"<",">":">",'"':""","'":"'"},vA=["a","b","c","d","e","f","g"],yA=function(t,e){return"{"+t+(null==e?"":e)+"}"},xA=$i,_A=(Object.freeze||Object)({addCommas:Gr,toCamelCase:Fr,normalizeCssArray:pA,encodeHTML:Wr,formatTpl:Hr,formatTplSimple:Zr,getTooltipMarker:Xr,formatTime:Yr,capitalFirst:jr,truncateText:xA,getTextBoundingRect:qr,getTextRect:Kr}),wA=f,bA=["left","right","top","bottom","width","height"],SA=[["width","left","right"],["height","top","bottom"]],MA=$r,IA=(x($r,"vertical"),x($r,"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")}}}),TA=ha(),AA=mr.extend({type:"component",id:"",name:"",mainType:"",subType:"",componentIndex:0,defaultOption:null,ecModel:null,dependentModels:[],uid:null,layoutMode:null,$constructor:function(t,e,i,n){mr.call(this,t,e,i,n),this.uid=xr("ec_cpt_model")},init:function(t,e,i){this.mergeDefaultAndTheme(t,i)},mergeDefaultAndTheme:function(t,e){var i=this.layoutMode,n=i?ns(t):{},o=e.getTheme();a(t,o.get(this.mainType)),a(t,this.getDefaultOption()),i&&is(t,n,i)},mergeOption:function(t){a(this.option,t,!0);var e=this.layoutMode;e&&is(this.option,t,e)},optionUpdated:function(){},getDefaultOption:function(){var t=TA(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)})}});Sa(AA,{registerWhenExtend:!0}),_r(AA),wr(AA,os),c(AA,IA);var DA="";"undefined"!=typeof navigator&&(DA=navigator.platform||"");var CA={color:["#c23531","#2f4554","#61a0a8","#d48265","#91c7ae","#749f83","#ca8622","#bda29a","#6e7074","#546570","#c4ccd3"],gradientColor:["#f6efa6","#d88273","#bf444c"],textStyle:{fontFamily:DA.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},LA=ha(),kA={clearColorPalette:function(){LA(this).colorIdx=0,LA(this).colorNameMap={}},getColorFromPalette:function(t,e,i){e=e||this;var n=LA(e),a=n.colorIdx||0,o=n.colorNameMap=n.colorNameMap||{};if(o.hasOwnProperty(t))return o[t];var r=ta(this.get("color",!0)),s=this.get("colorLayer",!0),l=null!=i&&s?rs(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}}},PA="original",OA="arrayRows",NA="objectRows",EA="keyedColumns",zA="unknown",RA="typedArray",BA="column",VA="row";ss.seriesDataToSource=function(t){return new ss({data:t,sourceFormat:I(t)?RA:PA,fromDataset:!1})},_a(ss);var GA={Must:1,Might:2,Not:3},FA=ha(),WA="\x00_ec_inner",HA=mr.extend({init:function(t,e,i,n){i=i||{},this.option=null,this._theme=new mr(i),this._optionManager=n},setOption:function(t,e){O(!(WA 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)):Ss.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=ta(t[e]),s=aa(o.get(e),a);oa(s),f(s,function(t){var i=t.option;S(i)&&(t.keyInfo.mainType=e,t.keyInfo.subType=Is(e,i,t.exist))});var l=Ms(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=AA.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&&Ts(this,o.get("series"))}var i=this.option,o=this._componentsMap,s=[];hs(this),f(t,function(t,e){null!=t&&(AA.hasClass(e)?e&&s.push(e):i[e]=null==i[e]?n(t):a(i[e],t,!0))}),AA.topologicalTravel(s,AA.getAllClassMainTypes(),e,this),this._seriesIndicesMap=B(this._seriesIndices=this._seriesIndices||[])},getOption:function(){var t=n(this.option);return f(t,function(e,i){if(AA.hasClass(i)){for(var e=ta(e),n=e.length-1;n>=0;n--)sa(e[n])&&e.splice(n,1);t[i]=e}}),delete t[WA],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 As(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(As(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);Ts(this,i)},restoreData:function(t){var e=this._componentsMap;Ts(this,e.get("series"));var i=[];e.each(function(t,e){i.push(e)}),AA.topologicalTravel(i,AA.getAllClassMainTypes(),function(i){f(e.get(i),function(e){("series"!==i||!ws(e,t))&&e.restoreData()})})}});c(HA,kA);var ZA=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isDisposed","on","off","getDataURL","getConnectedDataURL","getModel","getOption","getViewOfComponentModel","getViewOfSeriesModel"],XA={};Cs.prototype={constructor:Cs,create:function(t,e){var i=[];f(XA,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()}},Cs.register=function(t,e){XA[t]=e},Cs.get=function(t){return XA[t]};var UA=f,YA=n,jA=p,qA=a,KA=/^(min|max)?(.+)$/;Ls.prototype={constructor:Ls,setOption:function(t,e){t&&f(ta(t.series),function(t){t&&t.data&&I(t.data)&&E(t.data)}),t=YA(t);var i=this._optionBackup,n=ks.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=jA(e.timelineOptions,YA),this._mediaList=jA(e.mediaList,YA),this._mediaDefault=YA(e.mediaDefault),this._currentMediaIndices=[],YA(t?e.baseOption:this._newBaseOption)},getTimelineOption:function(t){var e,i=this._timelineOptions;if(i.length){var n=t.getComponent("timeline");n&&(e=YA(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++)Ps(i[r].query,t,e)&&a.push(r);return!a.length&&n&&(a=[-1]),a.length&&!Ns(a,this._currentMediaIndices)&&(o=jA(a,function(t){return YA(-1===t?n.option:i[t].option)})),this._currentMediaIndices=a,o}};var $A=f,JA=S,QA=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"],tD=function(t,e){$A(Ws(t.series),function(t){JA(t)&&Fs(t)});var i=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];e&&i.push("valueAxis","categoryAxis","logAxis","timeAxis"),$A(i,function(e){$A(Ws(t[e]),function(t){t&&(Vs(t,"axisLabel"),Vs(t.axisPointer,"label"))})}),$A(Ws(t.parallel),function(t){var e=t&&t.parallelAxisDefault;Vs(e,"axisLabel"),Vs(e&&e.axisPointer,"label")}),$A(Ws(t.calendar),function(t){Rs(t,"itemStyle"),Vs(t,"dayLabel"),Vs(t,"monthLabel"),Vs(t,"yearLabel")}),$A(Ws(t.radar),function(t){Vs(t,"name")}),$A(Ws(t.geo),function(t){JA(t)&&(Gs(t),$A(Ws(t.regions),function(t){Gs(t)}))}),$A(Ws(t.timeline),function(t){Gs(t),Rs(t,"label"),Rs(t,"itemStyle"),Rs(t,"controlStyle",!0);var e=t.data;_(e)&&f(e,function(t){S(t)&&(Rs(t,"label"),Rs(t,"itemStyle"))})}),$A(Ws(t.toolbox),function(t){Rs(t,"iconStyle"),$A(t.feature,function(t){Rs(t,"iconStyle")})}),Vs(Hs(t.axisPointer),"label"),Vs(Hs(t.tooltip).axisPointer,"label")},eD=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],iD=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],nD=function(t,e){tD(t,e),t.series=ta(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=Zs(t,"pointer.color");null!=i&&Xs(t,"itemStyle.color",i)}Us(t)}}),t.dataRange&&(t.visualMap=t.dataRange),f(iD,function(e){var i=t[e];i&&(_(i)||(i=[i]),f(i,function(t){Us(t)}))})},aD=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(Ys)},oD=js.prototype;oD.pure=!1,oD.persistent=!0,oD.getSource=function(){return this._source};var rD={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:$s},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<i.length;n++){var a=i[n];e.push(a?a[t]:null)}return e},appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},objectRows:{pure:!0,count:qs,getItem:Ks,appendData:$s},keyedColumns:{pure:!0,count:function(){var t=this._source.dimensionsDefine[0].name,e=this._data[t];return e?e.length:0},getItem:function(t){for(var e=[],i=this._source.dimensionsDefine,n=0;n<i.length;n++){var a=this._data[i[n].name];e.push(a?a[t]:null)}return e},appendData:function(t){var e=this._data;f(t,function(t,i){for(var n=e[i]||(e[i]=[]),a=0;a<(t||[]).length;a++)n.push(t[a])})}},original:{count:qs,getItem:Ks,appendData:$s},typedArray:{persistent:!1,pure:!0,count:function(){return this._data?this._data.length/this._dimSize:0},getItem:function(t,e){t-=this._offset,e=e||[];for(var i=this._dimSize*t,n=0;n<this._dimSize;n++)e[n]=this._data[i+n];return e},appendData:function(t){this._data=t},clean:function(){this._offset+=this.count(),this._data=null}}},sD={arrayRows:Js,objectRows:function(t,e,i,n){return null!=i?t[n]:t},keyedColumns:Js,original:function(t,e,i){var n=ia(t);return null!=i&&n instanceof Array?n[i]:n},typedArray:Js},lD={arrayRows:Qs,objectRows:function(t,e){return tl(t[e],this._dimensionInfos[e])},keyedColumns:Qs,original:function(t,e,i,n){var a=t&&(null==t.value?t:t.value);return!this._rawData.pure&&na(t)&&(this.hasItemOption=!0),tl(a instanceof Array?a[n]:a,this._dimensionInfos[e])},typedArray:function(t,e,i,n){return t[n]}},uD=/\{@(.+?)\}/g,hD={getDataParams:function(t,e){var i=this.getData(e),n=this.getRawValue(t,e),a=i.getRawIndex(t),o=i.getName(t),r=i.getRawDataItem(t),s=i.getItemVisual(t,"color"),l=i.getItemVisual(t,"borderColor"),u=this.ecModel.getComponent("tooltip"),h=u&&u.get("renderMode"),c=ga(h),d=this.mainType,f="series"===d,p=i.userOutput;return{componentType:d,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:f?this.subType:null,seriesIndex:this.seriesIndex,seriesId:f?this.id:null,seriesName:f?this.name:null,name:o,dataIndex:a,data:r,dataType:e,value:n,color:s,borderColor:l,dimensionNames:p?p.dimensionNames:null,encode:p?p.encode:null,marker:Xr({color:s,renderMode:c}),$vars:["seriesName","name","value"]}},getFormattedLabel:function(t,e,i,n,a){e=e||"normal";var o=this.getData(i),r=o.getItemModel(t),s=this.getDataParams(t,i);null!=n&&s.value instanceof Array&&(s.value=s.value[n]);var l=r.get("normal"===e?[a||"label","formatter"]:[e,a||"label","formatter"]);if("function"==typeof l)return s.status=e,s.dimensionIndex=n,l(s);if("string"==typeof l){var u=Hr(l,s);return u.replace(uD,function(e,i){var n=i.length;return"["===i.charAt(0)&&"]"===i.charAt(n-1)&&(i=+i.slice(1,n-1)),el(o,t,i)})}},getRawValue:function(t,e){return el(this.getData(e),t)},formatTooltip:function(){}},cD=al.prototype;cD.perform=function(t){function e(t){return!(t>=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=rl(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;g<p.length;g++)ol(this,p[g],d,f,l,u);else ol(this,p,d,f,l,u)}this._dueIndex=f;var m=null!=this._settedOutputEnd?this._settedOutputEnd:f;this._outputDueEnd=m}else this._dueIndex=this._outputDueEnd=null!=this._settedOutputEnd?this._settedOutputEnd:this._dueEnd;return this.unfinished()};var dD=function(){function t(){return i>n?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}();cD.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},cD.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},cD.pipe=function(t){(this._downstream!==t||this._dirty)&&(this._downstream=t,t._upstream=this,t.dirty())},cD.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},cD.getUpstream=function(){return this._upstream},cD.getDownstream=function(){return this._downstream},cD.setOutputEnd=function(t){this._outputDueEnd=this._settedOutputEnd=t};var fD=ha(),pD=AA.extend({type:"series.__base__",seriesIndex:0,coordinateSystem:null,defaultOption:null,legendVisualProvider:null,visualColorAccessPath:"itemStyle.color",visualBorderColorAccessPath:"itemStyle.borderColor",layoutMode:null,init:function(t,e,i){this.seriesIndex=this.componentIndex,this.dataTask=nl({count:ul,reset:hl}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,i),cs(this);var n=this.getInitialData(t,i);dl(n,this),this.dataTask.context.data=n,fD(this).dataBeforeProcessed=n,sl(this)},mergeDefaultAndTheme:function(t,e){var i=this.layoutMode,n=i?ns(t):{},o=this.subType;AA.hasClass(o)&&(o+="Series"),a(t,e.getTheme().get(this.subType)),a(t,this.getDefaultOption()),ea(t,"label",["show"]),this.fillDataTextStyle(t.data),i&&is(t,n,i)},mergeOption:function(t,e){t=a(this.option,t,!0),this.fillDataTextStyle(t.data);var i=this.layoutMode;i&&is(this.option,t,i),cs(this);var n=this.getInitialData(t,e);dl(n,this),this.dataTask.dirty(),this.dataTask.context.data=n,fD(this).dataBeforeProcessed=n,sl(this)},fillDataTextStyle:function(t){if(t&&!I(t))for(var e=["show"],i=0;i<t.length;i++)t[i]&&t[i].label&&ea(t[i],"label",e)},getInitialData:function(){},appendData:function(t){var e=this.getRawData();e.appendData(t.data)},getData:function(t){var e=pl(this);if(e){var i=e.context.data;return null==t?i:i.getLinkedData(t)}return fD(this).data},setData:function(t){var e=pl(this);if(e){var i=e.context;i.data!==t&&e.modifyOutputEnd&&e.setOutputEnd(t.count()),i.outputData=t,e!==this.dataTask&&(i.data=t)}fD(this).data=t},getSource:function(){return us(this)},getRawData:function(){return fD(this).dataBeforeProcessed},getBaseAxis:function(){var t=this.coordinateSystem;return t&&t.getBaseAxis&&t.getBaseAxis()},formatTooltip:function(t,e,i,n){function a(i){function a(t,i){var a=c.getDimensionInfo(i);if(a&&a.otherDims.tooltip!==!1){var d=a.type,f="sub"+r.seriesIndex+"at"+h,p=Xr({color:y,type:"subItem",renderMode:n,markerId:f}),g="string"==typeof p?p:p.content,m=(o?g+Wr(a.displayName||"-")+": ":"")+Wr("ordinal"===d?t+"":"time"===d?e?"":Yr("yyyy/MM/dd hh:mm:ss",t):Gr(t));m&&s.push(m),l&&(u[f]=y,++h)}}var o=g(i,function(t,e,i){var n=c.getDimensionInfo(i);return t|=n&&n.tooltip!==!1&&null!=n.displayName},0),s=[];d.length?f(d,function(e){a(el(c,t,e),e)}):f(i,a);var p=o?l?"\n":"<br/>":"",m=p+s.join(p||", ");return{renderMode:n,content:m,style:u}}function o(t){return{renderMode:n,content:Wr(Gr(t)),style:u}}var r=this;n=n||"html";var s="html"===n?"<br/>":"\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?el(c,t,d[0]):v?m[0]:m),w=x.content,b=r.seriesIndex+"at"+h,M=Xr({color:y,type:"item",renderMode:n,markerId:b});u[b]=y,++h;var I=c.getName(t),T=this.name;ra(this)||(T=""),T=T?Wr(T)+(e?": ":s):"";var A="string"==typeof M?M:M.content,D=e?A+T+w:T+A+(I?Wr(I)+": "+w:w);return{html:D,markers:u}},isAnimationEnabled:function(){if(Zb.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=kA.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(pD,hD),c(pD,kA);var gD=function(){this.group=new aM,this.uid=xr("viewComponent")};gD.prototype={constructor:gD,init:function(){},render:function(){},dispose:function(){},filterForExposedEvent:null};var mD=gD.prototype;mD.updateView=mD.updateLayout=mD.updateVisual=function(){},xa(gD),Sa(gD,{registerWhenExtend:!0});var vD=function(){var t=ha();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"}},yD=ha(),xD=vD();gl.prototype={type:"chart",init:function(){},render:function(){},highlight:function(t,e,i,n){vl(t.getData(),n,"emphasis")},downplay:function(t,e,i,n){vl(t.getData(),n,"normal")},remove:function(){this.group.removeAll()},dispose:function(){},incrementalPrepareRender:null,incrementalRender:null,updateTransform:null,filterForExposedEvent:null};var _D=gl.prototype;_D.updateView=_D.updateLayout=_D.updateVisual=function(t,e,i,n){this.render(t,e,i,n)},xa(gl,["dispose"]),Sa(gl,{registerWhenExtend:!0}),gl.markUpdateMethod=function(t,e){yD(t).updateMethod=e};var wD={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)}}},bD="\x00__throttleOriginMethod",SD="\x00__throttleRate",MD="\x00__throttleType",ID={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 BT?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}}}},TD={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:""}}}},AD=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=TD.aria,a=0;a<i.length;++a)n=n[i[a]];return n}return e}function a(){var t=e.getModel("title").option;return t&&t.length&&(t=t[0]),t&&t.text}function o(t){return TD.series.typeNames[t]||"自定义图"}var r=e.getModel("aria");if(r.get("show")){if(r.get("description"))return void t.setAttribute("aria-label",r.get("description"));var s=0;e.eachSeries(function(){++s},this);var l,u=r.get("data.maxCount")||10,h=r.get("series.maxCount")||10,c=Math.min(s,h);if(!(1>s)){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;f<h.count();f++)if(u>f){var g=h.getName(f),m=el(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)}}},DD=Math.PI,CD=function(t,e){e=e||{},s(e,{text:"loading",color:"#c23531",textColor:"#000",maskColor:"rgba(255, 255, 255, 0.8)",zlevel:0});var i=new kT({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4}),n=new zT({shape:{startAngle:-DD/2,endAngle:-DD/2+.1,r:10},style:{stroke:e.color,lineCap:"round",lineWidth:5},zlevel:e.zlevel,z:10001}),a=new kT({style:{fill:"none",text:e.text,textPosition:"right",textDistance:10,textFill:e.textColor},zlevel:e.zlevel,z:10001});n.animateShape(!0).when(1e3,{endAngle:3*DD/2}).start("circularInOut"),n.animateShape(!0).when(1e3,{startAngle:3*DD/2}).delay(300).start("circularInOut");var o=new aM;return o.add(n),o.add(a),o.add(i),o.resize=function(){var e=t.getWidth()/2,o=t.getHeight()/2;n.setShape({cx:e,cy:o});var r=n.shape.r;a.setShape({x:e-r,y:o-r,width:2*r,height:2*r}),i.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},o.resize(),o},LD=Sl.prototype;LD.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each(function(t){var e=t.overallTask;e&&e.dirty()})},LD.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}}},LD.getPipeline=function(t){return this._pipelineMap.get(t)},LD.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}},LD.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)})},LD.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&&Il(this,n,a,e,i),n.overallReset&&Tl(this,n,a,e,i)},this)},LD.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)},LD.performDataProcessorTasks=function(t,e){Ml(this,this._dataProcessorHandlers,t,e,{block:!0})},LD.performVisualTasks=function(t,e,i){Ml(this,this._visualHandlers,t,e,i)},LD.performSeriesTasks=function(t){var e;t.eachSeries(function(t){e|=t.dataTask.perform()}),this.unfinished|=e},LD.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 kD=LD.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)},PD=Ol(0);Sl.wrapStageHandler=function(t,e){return w(t)&&(t={overallReset:t,seriesType:zl(t)}),t.uid=xr("stageHandler"),e&&(t.visualType=e),t};var OD,ND={},ED={};Rl(ND,HA),Rl(ED,Ds),ND.eachSeriesByType=ND.eachRawSeriesByType=function(t){OD=t},ND.eachComponent=function(t){"series"===t.mainType&&t.subType&&(OD=t.subType)};var zD=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"],RD={color:zD,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],zD]},BD="#eee",VD=function(){return{axisLine:{lineStyle:{color:BD}},axisTick:{lineStyle:{color:BD}},axisLabel:{textStyle:{color:BD}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:BD}}}},GD=["#dd6b66","#759aa0","#e69d87","#8dc1a9","#ea7e53","#eedd78","#73a373","#73b9bc","#7289ab","#91ca8c","#f49f42"],FD={color:GD,backgroundColor:"#333",tooltip:{axisPointer:{lineStyle:{color:BD},crossStyle:{color:BD},label:{color:"#000"}}},legend:{textStyle:{color:BD}},textStyle:{color:BD},title:{textStyle:{color:BD}},toolbox:{iconStyle:{normal:{borderColor:BD}}},dataZoom:{textStyle:{color:BD}},visualMap:{textStyle:{color:BD}},timeline:{lineStyle:{color:BD},itemStyle:{normal:{color:GD[1]}},label:{normal:{textStyle:{color:BD}}},controlStyle:{normal:{color:BD,borderColor:BD}}},timeAxis:VD(),logAxis:VD(),valueAxis:VD(),categoryAxis:VD(),line:{symbol:"circle"},graph:{color:GD},gauge:{title:{textStyle:{color:BD}}},candlestick:{itemStyle:{normal:{color:"#FD1050",color0:"#0CF49B",borderColor:"#FD1050",borderColor0:"#0CF49B"}}}};FD.categoryAxis.splitLine.show=!1,AA.extend({type:"dataset",defaultOption:{seriesLayoutBy:BA,sourceHeader:null,dimensions:null,source:null},optionUpdated:function(){ls(this)}}),gD.extend({type:"dataset"});var WD=no.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()}}),HD=/[\s,]+/;Vl.prototype.parse=function(t,e){e=e||{};var i=Bl(t);if(!i)throw new Error("Illegal svg");var n=new aM;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),Hl(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(HD);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=Yl(l,o,r),!e.ignoreViewBox)){var c=n;n=new aM,n.add(c),c.scale=u.scale.slice(),c.position=u.position.slice()}return e.ignoreRootClip||null==o||null==r||n.setClipPath(new kT({shape:{x:0,y:0,width:o,height:r}})),{root:n,width:o,height:r,viewBoxRect:l,viewBoxTransform:u}},Vl.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=XD[i];if(a){var o=a.call(this,t),r=t.getAttribute("id");r&&(this._defs[r]=o)}}else{var a=ZD[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)},Vl.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 xT({style:{text:t.textContent,transformText:!0},position:[this._textX||0,this._textY||0]});Fl(e,a),Hl(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 ZD={g:function(t,e){var i=new aM;return Fl(e,i),Hl(t,i,this._defs),i},rect:function(t,e){var i=new kT;return Fl(e,i),Hl(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 _T;return Fl(e,i),Hl(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 OT;return Fl(e,i),Hl(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 WD;return Fl(e,i),Hl(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=Wl(i));var n=new AT({shape:{points:i||[]}});return Fl(e,n),Hl(t,n,this._defs),n},polyline:function(t,e){var i=new no;Fl(e,i),Hl(t,i,this._defs);var n=t.getAttribute("points");n&&(n=Wl(n));var a=new DT({shape:{points:n||[]}});return a},image:function(t,e){var i=new Dn;return Fl(e,i),Hl(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 aM;return Fl(e,r),Hl(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 aM;return Fl(e,r),Hl(t,r,this._defs),this._textX+=a,this._textY+=o,r},path:function(t,e){var i=t.getAttribute("d")||"",n=so(i);return Fl(e,n),Hl(t,n,this._defs),n}},XD={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 VT(e,i,n,a);return Gl(t,o),o},radialgradient:function(){}},UD={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"},YD=/url\(\s*#(.*?)\)/,jD=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.e,]*)\)/g,qD=/([^\s:;]+)\s*:\s*([^:;]+)/g,KD=B(),$D={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=JD[e];i(t)}),KD.set(t,n)},retrieveMap:function(t){return KD.get(t)}},JD={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=Bl(t.source)}},QD=O,tC=f,eC=w,iC=S,nC=AA.parseClassType,aC="4.7.0",oC={zrender:"4.3.0"},rC=1,sC=1e3,lC=800,uC=900,hC=5e3,cC=1e3,dC=1100,fC=2e3,pC=3e3,gC=3500,mC=4e3,vC=5e3,yC={PROCESSOR:{FILTER:sC,SERIES_FILTER:lC,STATISTIC:hC},VISUAL:{LAYOUT:cC,PROGRESSIVE_LAYOUT:dC,GLOBAL:fC,CHART:pC,POST_CHART_LAYOUT:gC,COMPONENT:mC,BRUSH:vC}},xC="__flagInMainProcess",_C="__optionUpdated",wC=/^[a-zA-Z0-9_]+$/;Kl.prototype.on=ql("on",!0),Kl.prototype.off=ql("off",!0),Kl.prototype.one=ql("one",!0),c(Kl,dS);var bC=$l.prototype;bC._onframe=function(){if(!this._disposed){var t=this._scheduler;if(this[_C]){var e=this[_C].silent;this[xC]=!0,Ql(this),SC.update.call(this),this[xC]=!1,this[_C]=!1,nu.call(this,e),au.call(this,e)}else if(t.unfinished){var i=rC,n=this._model,a=this._api;t.unfinished=!1;do{var o=+new Date;t.performSeriesTasks(n),t.performDataProcessorTasks(n),eu(this,n),t.performVisualTasks(n),hu(this,this._model,a,"remain"),i-=+new Date-o}while(i>0&&t.unfinished);t.unfinished||this._zr.flush()}}},bC.getDom=function(){return this._dom},bC.getZr=function(){return this._zr},bC.setOption=function(t,e,i){if(!this._disposed){var n;if(iC(e)&&(i=e.lazyUpdate,n=e.silent,e=e.notMerge),this[xC]=!0,!this._model||e){var a=new Ls(this._api),o=this._theme,r=this._model=new HA;r.scheduler=this._scheduler,r.init(null,null,o,a)}this._model.setOption(t,DC),i?(this[_C]={silent:n},this[xC]=!1):(Ql(this),SC.update.call(this),this._zr.flush(),this[_C]=!1,this[xC]=!1,nu.call(this,n),au.call(this,n))}},bC.setTheme=function(){console.error("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},bC.getModel=function(){return this._model},bC.getOption=function(){return this._model&&this._model.getOption()},bC.getWidth=function(){return this._zr.getWidth()},bC.getHeight=function(){return this._zr.getHeight()},bC.getDevicePixelRatio=function(){return this._zr.painter.dpr||window.devicePixelRatio||1},bC.getRenderedCanvas=function(t){if(Zb.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)}},bC.getSvgDataUrl=function(){if(Zb.svgSupported){var t=this._zr,e=t.storage.getDisplayList();return f(e,function(t){t.stopAnimation(!0)}),t.painter.pathToDataUrl()}},bC.getDataURL=function(t){if(!this._disposed){t=t||{};var e=t.excludeComponents,i=this._model,n=[],a=this;tC(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 tC(n,function(t){t.group.ignore=!1}),o}},bC.getConnectedDataURL=function(t){if(!this._disposed&&Zb.canvasSupported){var e=this.group,i=Math.min,a=Math.max,o=1/0;if(NC[e]){var r=o,s=o,l=-o,u=-o,h=[],c=t&&t.pixelRatio||1;f(OC,function(o){if(o.group===e){var c=o.getRenderedCanvas(n(t)),d=o.getDom().getBoundingClientRect();r=i(d.left,r),s=i(d.top,s),l=a(d.right,l),u=a(d.bottom,u),h.push({dom:c,left:d.left,top:d.top})}}),r*=c,s*=c,l*=c,u*=c;var d=l-r,p=u-s,g=eS();g.width=d,g.height=p;var m=qn(g);return t.connectedBackgroundColor&&m.add(new kT({shape:{x:0,y:0,width:d,height:p},style:{fill:t.connectedBackgroundColor}})),tC(h,function(t){var e=new Dn({style:{x:t.left*c-r,y:t.top*c-s,image:t.dom}});m.add(e)}),m.refreshImmediately(),g.toDataURL("image/"+(t&&t.type||"png"))}return this.getDataURL(t)}},bC.convertToPixel=x(Jl,"convertToPixel"),bC.convertFromPixel=x(Jl,"convertFromPixel"),bC.containPixel=function(t,e){if(!this._disposed){var i,n=this._model;return t=ca(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}},bC.getVisual=function(t,e){var i=this._model;t=ca(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)},bC.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},bC.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]};var SC={prepareAndUpdate:function(t){Ql(this),SC.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),eu(this,e),a.update(e,i),su(e),o.performVisualTasks(e,t),lu(this,e,i,t);var r=e.get("backgroundColor")||"transparent";if(Zb.canvasSupported)n.setBackgroundColor(r);else{var s=ti(r);r=ui(s,"rgb"),0===s[3]&&(r="transparent")}cu(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)}),su(e),this._scheduler.performVisualTasks(e,t,{setDirty:!0,dirtyMap:o}),hu(i,e,n,t,o),cu(e,this._api)}},updateView:function(t){var e=this._model;e&&(gl.markUpdateMethod(t,"updateView"),su(e),this._scheduler.performVisualTasks(e,t,{setDirty:!0}),lu(this,this._model,this._api,t),cu(e,this._api))},updateVisual:function(t){SC.update.call(this,t)},updateLayout:function(t){SC.update.call(this,t)}};bC.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[xC]=!0,i&&Ql(this),SC.update.call(this),this[xC]=!1,nu.call(this,n),au.call(this,n)}}},bC.showLoading=function(t,e){if(!this._disposed&&(iC(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),PC[t])){var i=PC[t](this._api,e),n=this._zr;this._loadingFX=i,n.add(i)}},bC.hideLoading=function(){this._disposed||(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},bC.makeActionFromEvent=function(t){var e=r({},t);return e.type=TC[t.type],e},bC.dispatchAction=function(t,e){if(!this._disposed&&(iC(e)||(e={silent:!!e}),IC[t.type]&&this._model)){if(this[xC])return void this._pendingActions.push(t);iu.call(this,t,e.silent),e.flush?this._zr.flush(!0):e.flush!==!1&&Zb.browser.weChat&&this._throttledZrFlush(),nu.call(this,e.silent),au.call(this,e.silent)}},bC.appendData=function(t){if(!this._disposed){var e=t.seriesIndex,i=this.getModel(),n=i.getSeriesByIndex(e);n.appendData(t),this._scheduler.unfinished=!0}},bC.on=ql("on",!1),bC.off=ql("off",!1),bC.one=ql("one",!1);var MC=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];bC._initEvents=function(){tC(MC,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),tC(TC,function(t,e){this._messageCenter.on(e,function(t){this.trigger(e,t)},this)},this)},bC.isDisposed=function(){return this._disposed},bC.clear=function(){this._disposed||this.setOption({series:[]},!0)},bC.dispose=function(){if(!this._disposed){this._disposed=!0,fa(this.getDom(),RC,"");var t=this._api,e=this._model;tC(this._componentsViews,function(i){i.dispose(e,t)}),tC(this._chartsViews,function(i){i.dispose(e,t)}),this._zr.dispose(),delete OC[this.id]}},c($l,dS),mu.prototype={constructor:mu,normalizeQuery:function(t){var e={},i={},n={};if(b(t)){var a=nC(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;l<o.length;l++){var u=o[l],h=a.lastIndexOf(u);if(h>0&&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 IC={},TC={},AC=[],DC=[],CC=[],LC=[],kC={},PC={},OC={},NC={},EC=new Date-0,zC=new Date-0,RC="_echarts_instance_",BC=_u;Pu(fC,ID),Iu(nD),Tu(uC,aD),Nu("default",CD),Du({type:"highlight",event:"highlight",update:"highlight"},G),Du({type:"downplay",event:"downplay",update:"downplay"},G),Mu("light",RD),Mu("dark",FD);var VC={};Hu.prototype={constructor:Hu,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(Zu(e,n,o,"_oldKeyGetter",this),Zu(i,a,r,"_newKeyGetter",this),t=0;t<e.length;t++){var s=o[t],l=a[s];if(null!=l){var u=l.length;u?(1===u&&(a[s]=null),l=l.shift()):a[s]=null,this._update&&this._update(l,t)}else this._remove&&this._remove(t)}for(var t=0;t<r.length;t++){var s=r[t];if(a.hasOwnProperty(s)){var l=a[s];if(null==l)continue;if(l.length)for(var h=0,u=l.length;u>h;h++)this._add&&this._add(l[h]);else this._add&&this._add(l)}}}};var GC=B(["tooltip","label","itemName","itemId","seriesName"]),FC=S,WC="undefined",HC=-1,ZC="e\x00\x00",XC={"float":typeof Float64Array===WC?Array:Float64Array,"int":typeof Int32Array===WC?Array:Int32Array,ordinal:Array,number:Array,time:Array},UC=typeof Uint32Array===WC?Array:Uint32Array,YC=typeof Int32Array===WC?Array:Int32Array,jC=typeof Uint16Array===WC?Array:Uint16Array,qC=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_rawData","_chunkSize","_chunkCount","_dimValueGetter","_count","_rawCount","_nameDimIdx","_idDimIdx"],KC=["_extent","_approximateExtent","_rawExtent"],$C=function(t,e){t=t||["x","y"];for(var i={},n=[],a={},o=0;o<t.length;o++){var r=t[o];b(r)?r=new qu({name:r}):r instanceof qu||(r=new qu(r));var s=r.name;r.type=r.type||"float",r.coordDim||(r.coordDim=s,r.coordDimIndex=0),r.otherDims=r.otherDims||{},n.push(s),i[s]=r,r.index=o,r.createInvertedIndices&&(a[s]=[])}this.dimensions=n,this._dimensionInfos=i,this.hostModel=e,this.dataType,this._indices=null,this._count=0,this._rawCount=0,this._storage={},this._nameList=[],this._idList=[],this._optionModels=[],this._visual={},this._layout={},this._itemVisuals=[],this.hasItemVisual={},this._itemLayouts=[],this._graphicEls=[],this._chunkSize=1e5,this._chunkCount=0,this._rawData,this._rawExtent={},this._extent={},this._approximateExtent={},this._dimensionsSummary=Xu(this),this._invertedIndicesMap=a,this._calculationInfo={},this.userOutput=this._dimensionsSummary.userOutput},JC=$C.prototype;JC.type="list",JC.hasItemOption=!0,JC.getDimension=function(t){return("number"==typeof t||!isNaN(t)&&!this._dimensionInfos.hasOwnProperty(t))&&(t=this.dimensions[t]),t},JC.getDimensionInfo=function(t){return this._dimensionInfos[this.getDimension(t)]},JC.getDimensionsOnCoord=function(){return this._dimensionsSummary.dataDimsOnCoord.slice()},JC.mapDimension=function(t,e){var i=this._dimensionsSummary;if(null==e)return i.encodeFirstDimNotExtra[t];var n=i.encode[t];return e===!0?(n||[]).slice():n&&n[e]},JC.initData=function(t,e,i){var n=ss.isInstance(t)||d(t);n&&(t=new js(t,this.dimensions.length)),this._rawData=t,this._storage={},this._indices=null,this._nameList=e||[],this._idList=[],this._nameRepeatCount={},i||(this.hasItemOption=!1),this.defaultDimValueGetter=lD[this._rawData.getSource().sourceFormat],this._dimValueGetter=i=i||this.defaultDimValueGetter,this._dimValueGetterArrayRows=lD.arrayRows,this._rawExtent={},this._initDataFromProvider(0,t.count()),t.pure&&(this.hasItemOption=!1)},JC.getProvider=function(){return this._rawData},JC.appendData=function(t){var e=this._rawData,i=this.count();e.appendData(t);var n=e.count();e.persistent||(n+=i),this._initDataFromProvider(i,n)},JC.appendValues=function(t,e){for(var i=this._chunkSize,n=this._storage,a=this.dimensions,o=a.length,r=this._rawExtent,s=this.count(),l=s+Math.max(t.length,e?e.length:0),u=this._chunkCount,h=0;o>h;h++){var c=a[h];r[c]||(r[c]=lh()),n[c]||(n[c]=[]),Qu(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];y<x[0]&&(x[0]=y),y>x[1]&&(x[1]=y)}e&&(this._nameList[f]=e[p])}this._rawCount=this._count=l,this._extent={},th(this)},JC._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]=lh());var m=l[g];0===m.otherDims.itemName&&(i=this._nameDimIdx=p),0===m.otherDims.itemId&&(this._idDimIdx=p),o[g]||(o[g]=[]),Qu(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];S<M[0]&&(M[0]=S),S>M[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={},th(this)}},JC.count=function(){return this._count},JC.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=Ku(this),t=new i(this.count()),a=0;a<t.length;a++)t[a]=a;return t},JC.get=function(t,e){if(!(e>=0&&e<this._count))return 0/0;var i=this._storage;if(!i[t])return 0/0;e=this.getRawIndex(e);var n=Math.floor(e/this._chunkSize),a=e%this._chunkSize,o=i[t][n],r=o[a];return r},JC.getByRawIndex=function(t,e){if(!(e>=0&&e<this._rawCount))return 0/0;var i=this._storage[t];if(!i)return 0/0;var n=Math.floor(e/this._chunkSize),a=e%this._chunkSize,o=i[n];return o[a]},JC._getFast=function(t,e){var i=Math.floor(e/this._chunkSize),n=e%this._chunkSize,a=this._storage[t][i];return a[n]},JC.getValues=function(t,e){var i=[];_(t)||(e=t,t=this.dimensions);for(var n=0,a=t.length;a>n;n++)i.push(this.get(t[n],e));return i},JC.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},JC.getDataExtent=function(t){t=this.getDimension(t);var e=this._storage[t],i=lh();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},JC.getApproximateExtent=function(t){return t=this.getDimension(t),this._approximateExtent[t]||this.getDataExtent(t)},JC.setApproximateExtent=function(t,e){e=this.getDimension(e),this._approximateExtent[e]=t.slice()},JC.getCalculationInfo=function(t){return this._calculationInfo[t]},JC.setCalculationInfo=function(t,e){FC(t)?r(this._calculationInfo,t):this._calculationInfo[t]=e},JC.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},JC.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},JC.rawIndexOf=function(t,e){var i=t&&this._invertedIndicesMap[t],n=i[e];return null==n||isNaN(n)?HC:n},JC.indexOfName=function(t){for(var e=0,i=this.count();i>e;e++)if(this.getName(e)===t)return e;return-1},JC.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<this._count&&i===t)return t;for(var n=0,a=this._count-1;a>=n;){var o=(n+a)/2|0;if(e[o]<t)n=o+1;else{if(!(e[o]>t))return o;a=o-1}}return-1},JC.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},JC.getRawIndex=ih,JC.getRawDataItem=function(t){if(this._rawData.persistent)return this._rawData.getItem(this.getRawIndex(t));for(var e=[],i=0;i<this.dimensions.length;i++){var n=this.dimensions[i];e.push(this.get(n,t))}return e},JC.getName=function(t){var e=this.getRawIndex(t);return this._nameList[e]||eh(this,this._nameDimIdx,e)||""},JC.getId=function(t){return ah(this,this.getRawIndex(t))},JC.each=function(t,e,i,n){if(this._count){"function"==typeof t&&(n=i,i=e,e=t,t=[]),i=i||n||this,t=p(oh(t),this.getDimension,this);for(var a=t.length,o=0;o<this.count();o++)switch(a){case 0:e.call(i,o);break;case 1:e.call(i,this.get(t[0],o),o);break;case 2:e.call(i,this.get(t[0],o),this.get(t[1],o),o);break;default:for(var r=0,s=[];a>r;r++)s[r]=this.get(t[r],o);s[r]=o,e.apply(i,s)}}},JC.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(oh(t),this.getDimension,this);for(var a=this.count(),o=Ku(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?nh:ih,this}},JC.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=Ku(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;p<this._chunkCount;p++)for(var g=f[p],m=Math.min(this._count-p*this._chunkSize,this._chunkSize),v=0;m>v;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;p<this._chunkCount;p++)for(var g=f[p],b=x[p],m=Math.min(this._count-p*this._chunkSize,this._chunkSize),v=0;m>v;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);(y<t[T][0]||y>t[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?nh:ih,this}}},JC.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},JC.map=function(t,e,i,n){i=i||n||this,t=p(oh(t),this.getDimension,this);var a=rh(this,t);a._indices=this._indices,a.getRawIndex=a._indices?nh:ih;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;x<g.length;x++){var _=t[x],w=g[x],b=c[_],S=o[_];S&&(S[v][y]=w),w<b[0]&&(b[0]=w),w>b[1]&&(b[1]=w)}}}return a},JC.downSample=function(t,e,i,n){for(var a=rh(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(Ku(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,x<c[0]&&(c[0]=x),x>c[1]&&(c[1]=x),d[f++]=_}return a._count=f,a._indices=d,a.getRawIndex=nh,a},JC.getItemModel=function(t){var e=this.hostModel;return new mr(this.getRawDataItem(t),e,e&&e.ecModel)},JC.diff=function(t){var e=this;return new Hu(t?t.getIndices():[],this.getIndices(),function(e){return ah(t,e)},function(t){return ah(e,t)})},JC.getVisual=function(t){var e=this._visual;return e&&e[t]},JC.setVisual=function(t,e){if(FC(t))for(var i in t)t.hasOwnProperty(i)&&this.setVisual(i,t[i]);else this._visual=this._visual||{},this._visual[t]=e},JC.setLayout=function(t,e){if(FC(t))for(var i in t)t.hasOwnProperty(i)&&this.setLayout(i,t[i]);else this._layout[t]=e},JC.getLayout=function(t){return this._layout[t]},JC.getItemLayout=function(t){return this._itemLayouts[t]},JC.setItemLayout=function(t,e,i){this._itemLayouts[t]=i?r(this._itemLayouts[t]||{},e):e},JC.clearItemLayouts=function(){this._itemLayouts.length=0},JC.getItemVisual=function(t,e,i){var n=this._itemVisuals[t],a=n&&n[e];return null!=a||i?a:this.getVisual(e)},JC.setItemVisual=function(t,e,i){var n=this._itemVisuals[t]||{},a=this.hasItemVisual;if(this._itemVisuals[t]=n,FC(e))for(var o in e)e.hasOwnProperty(o)&&(n[o]=e[o],a[o]=!0);else n[e]=i,a[e]=!0},JC.clearAllVisual=function(){this._visual={},this._itemVisuals=[],this.hasItemVisual={}};var QC=function(t){t.seriesIndex=this.seriesIndex,t.dataIndex=this.dataIndex,t.dataType=this.dataType};JC.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(QC,e)),this._graphicEls[t]=e},JC.getItemGraphicEl=function(t){return this._graphicEls[t]},JC.eachItemGraphicEl=function(t,e){f(this._graphicEls,function(i,n){i&&t&&t.call(e,i,n)})},JC.cloneShallow=function(t){if(!t){var e=p(this.dimensions,this.getDimensionInfo,this);t=new $C(e,this.hostModel)}if(t._storage=this._storage,Ju(t,this),this._indices){var i=this._indices.constructor;t._indices=new i(this._indices)}else t._indices=null;return t.getRawIndex=t._indices?nh:ih,t},JC.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)))})},JC.TRANSFERABLE_METHODS=["cloneShallow","downSample","map"],JC.CHANGABLE_METHODS=["filterSelf","selectRange"];var tL=function(t,e){return e=e||{},uh(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})
},eL={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),ph(a)&&(n.set("x",a),e.firstCategoryDimIndex=0),ph(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),ph(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),ph(o)&&(n.set("radius",o),e.firstCategoryDimIndex=0),ph(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),ph(s)&&null==e.firstCategoryDimIndex&&(n.set(l,s),e.firstCategoryDimIndex=o)})}};wh.prototype.parse=function(t){return t},wh.prototype.getSetting=function(t){return this._setting[t]},wh.prototype.contain=function(t){var e=this._extent;return t>=e[0]&&t<=e[1]},wh.prototype.normalize=function(t){var e=this._extent;return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])},wh.prototype.scale=function(t){var e=this._extent;return t*(e[1]-e[0])+e[0]},wh.prototype.unionExtent=function(t){var e=this._extent;t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1])},wh.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},wh.prototype.getExtent=function(){return this._extent.slice()},wh.prototype.setExtent=function(t,e){var i=this._extent;isNaN(t)||(i[0]=t),isNaN(e)||(i[1]=e)},wh.prototype.isBlank=function(){return this._isBlank},wh.prototype.setBlank=function(t){this._isBlank=t},wh.prototype.getLabel=null,xa(wh),Sa(wh,{registerWhenExtend:!0}),bh.createByAxisModel=function(t){var e=t.option,i=e.data,n=i&&p(i,Mh);return new bh({categories:n,needCollect:!n,deduplication:e.dedplication!==!1})};var iL=bh.prototype;iL.getOrdinal=function(t){return Sh(this).get(t)},iL.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=Sh(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 nL=wh.prototype,aL=wh.extend({type:"ordinal",init:function(t,e){(!t||_(t))&&(t=new bh({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),nL.contain.call(this,t)&&null!=this._ordinalMeta.categories[t]},normalize:function(t){return nL.normalize.call(this,this.parse(t))},scale:function(t){return Math.round(nL.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});aL.create=function(){return new aL};var oL=Ir,rL=Ir,sL=wh.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[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1]),sL.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=Th(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]<n[0]&&o.push(t?rL(n[0]-e,a):i[0]);for(var s=n[0];s<=n[1]&&(o.push(s),s=rL(s+e,a),s!==o[o.length-1]);)if(o.length>r)return[];var l=o.length?o[o.length-1]:n[1];return i[1]>l&&o.push(t?rL(l+e,a):i[1]),o},getMinorTicks:function(t){for(var e=this.getTicks(!0),i=[],n=this.getExtent(),a=1;a<e.length;a++){for(var o=e[a],r=e[a-1],s=0,l=[],u=o-r,h=u/t;t-1>s;){var c=Ir(r+(s+1)*h);c>n[0]&&c<n[1]&&l.push(c),s++}i.push(l)}return i},getLabel:function(t,e){if(null==t)return"";var i=e&&e.precision;return null==i?i=Dr(t)||0:"auto"===i&&(i=this._intervalPrecision),t=rL(t,i,!0),Gr(t)},niceTicks:function(t,e,i){t=t||5;var n=this._extent,a=n[1]-n[0];if(isFinite(a)){0>a&&(a=-a,n.reverse());var o=Ih(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]=rL(Math.floor(e[0]/a)*a)),t.fixMax||(e[1]=rL(Math.ceil(e[1]/a)*a))}});sL.create=function(){return new sL};var lL="__ec_stack_",uL=.5,hL="undefined"!=typeof Float32Array?Float32Array:Array,cL={seriesType:"bar",plan:vD(),reset:function(t){function e(t,e){for(var i,d=t.count,f=new hL(2*d),p=new hL(2*d),g=new hL(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:Gh(o,r,!1),backgroundStart:u?a.x:a.y,valueAxisHorizontal:u})}if(Bh(t)&&Vh(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=zh(Nh([t]),o,t).width;return c>uL||(c=uL),{progress:e}}}},dL=sL.prototype,fL=Math.ceil,pL=Math.floor,gL=1e3,mL=60*gL,vL=60*mL,yL=24*vL,xL=function(t,e,i,n){for(;n>i;){var a=i+n>>>1;t[a][1]<e?i=a+1:n=a}return i},_L=sL.extend({type:"time",getLabel:function(t){var e=this._stepLvl,i=new Date(t);return Yr(e[0],i,this.getSetting("useUTC"))},niceExtent:function(t){var e=this._extent;if(e[0]===e[1]&&(e[0]-=yL,e[1]+=yL),e[1]===-1/0&&1/0===e[0]){var i=new Date;e[1]=+new Date(i.getFullYear(),i.getMonth(),i.getDate()),e[0]=e[1]-yL}this.niceTicks(t.splitNumber,t.minInterval,t.maxInterval);var n=this._interval;t.fixMin||(e[0]=Ir(pL(e[0]/n)*n)),t.fixMax||(e[1]=Ir(fL(e[1]/n)*n))},niceTicks:function(t,e,i){t=t||10;var n=this._extent,a=n[1]-n[0],o=a/t;null!=e&&e>o&&(o=e),null!=i&&o>i&&(o=i);var r=wL.length,s=xL(wL,o,0,r),l=wL[Math.min(s,r-1)],u=l[1];if("year"===l[0]){var h=a/u,c=zr(h/t,!0);u*=c}var d=this.getSetting("useUTC")?0:60*new Date(+n[0]||+n[1]).getTimezoneOffset()*1e3,f=[Math.round(fL((n[0]-d)/u)*u+d),Math.round(pL((n[1]-d)/u)*u+d)];Dh(f,n),this._stepLvl=l,this._interval=u,this._niceExtent=f},parse:function(t){return+Or(t)}});f(["contain","normalize"],function(t){_L.prototype[t]=function(e){return dL[t].call(this,this.parse(e))}});var wL=[["hh:mm:ss",gL],["hh:mm:ss",5*gL],["hh:mm:ss",10*gL],["hh:mm:ss",15*gL],["hh:mm:ss",30*gL],["hh:mm\nMM-dd",mL],["hh:mm\nMM-dd",5*mL],["hh:mm\nMM-dd",10*mL],["hh:mm\nMM-dd",15*mL],["hh:mm\nMM-dd",30*mL],["hh:mm\nMM-dd",vL],["hh:mm\nMM-dd",2*vL],["hh:mm\nMM-dd",6*vL],["hh:mm\nMM-dd",12*vL],["MM-dd\nyyyy",yL],["MM-dd\nyyyy",2*yL],["MM-dd\nyyyy",3*yL],["MM-dd\nyyyy",4*yL],["MM-dd\nyyyy",5*yL],["MM-dd\nyyyy",6*yL],["week",7*yL],["MM-dd\nyyyy",10*yL],["week",14*yL],["week",21*yL],["month",31*yL],["week",42*yL],["month",62*yL],["week",70*yL],["quarter",95*yL],["month",31*yL*4],["month",31*yL*5],["half-year",380*yL/2],["month",31*yL*8],["month",31*yL*10],["year",380*yL]];_L.create=function(t){return new _L({useUTC:t.ecModel.get("useUTC")})};var bL=wh.prototype,SL=sL.prototype,ML=Dr,IL=Ir,TL=Math.floor,AL=Math.ceil,DL=Math.pow,CL=Math.log,LL=wh.extend({type:"log",base:10,$constructor:function(){wh.apply(this,arguments),this._originalScale=new sL},getTicks:function(t){var e=this._originalScale,i=this._extent,n=e.getExtent();return p(SL.getTicks.call(this,t),function(t){var a=Ir(DL(this.base,t));return a=t===i[0]&&e.__fixMin?Fh(a,n[0]):a,a=t===i[1]&&e.__fixMax?Fh(a,n[1]):a},this)},getMinorTicks:SL.getMinorTicks,getLabel:SL.getLabel,scale:function(t){return t=bL.scale.call(this,t),DL(this.base,t)},setExtent:function(t,e){var i=this.base;t=CL(t)/CL(i),e=CL(e)/CL(i),SL.setExtent.call(this,t,e)},getExtent:function(){var t=this.base,e=bL.getExtent.call(this);e[0]=DL(t,e[0]),e[1]=DL(t,e[1]);var i=this._originalScale,n=i.getExtent();return i.__fixMin&&(e[0]=Fh(e[0],n[0])),i.__fixMax&&(e[1]=Fh(e[1],n[1])),e},unionExtent:function(t){this._originalScale.unionExtent(t);var e=this.base;t[0]=CL(t[0])/CL(e),t[1]=CL(t[1])/CL(e),bL.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=Nr(i),a=t/i*n;for(.5>=a&&(n*=10);!isNaN(n)&&Math.abs(n)<1&&Math.abs(n)>0;)n*=10;var o=[Ir(AL(e[0]/n)*n),Ir(TL(e[1]/n)*n)];this._interval=n,this._niceExtent=o}},niceExtent:function(t){SL.niceExtent.call(this,t);var e=this._originalScale;e.__fixMin=t.fixMin,e.__fixMax=t.fixMax}});f(["contain","normalize"],function(t){LL.prototype[t]=function(e){return e=CL(e)/CL(this.base),bL[t].call(this,e)}}),LL.create=function(){return new LL};var kL={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}},PL=yo({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()}}),OL=yo({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()}}),NL=yo({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()}}),EL=yo({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()}}),zL={line:OT,rect:kT,roundRect:kT,square:kT,circle:_T,diamond:OL,pin:NL,arrow:EL,triangle:PL},RL={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}},BL={};f(zL,function(t,e){BL[e]=new t});var VL=yo({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(t,e,i){var n=Ki(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=BL[n];a||(n="rect",a=BL[n]),RL[n](e.x,e.y,e.width,e.height,a.shape),a.buildPath(t,a.shape,i)}}}),GL={isDimensionStacked:mh,enableDataStack:gh,getStackedDimension:vh},FL=(Object.freeze||Object)({createList:ec,getLayoutRect:Qr,dataStack:GL,createScale:ic,mixinAxisModelCommonMethods:nc,completeDimensions:uh,createDimensions:tL,createSymbol:tc}),WL=1e-8;rc.prototype={constructor:rc,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;s<r.length;s++)if("polygon"===r[s].type){var l=r[s].exterior;Ba(l,a,o),re(i,i,a),se(n,n,o)}return 0===s&&(i[0]=i[1]=n[0]=n[1]=0),this._rect=new Ti(i[0],i[1],n[0]-i[0],n[1]-i[1])},contain:function(t){var e=this.getBoundingRect(),i=this.geometries;if(!e.contain(t[0],t[1]))return!1;t:for(var n=0,a=i.length;a>n;n++)if("polygon"===i[n].type){var o=i[n].exterior,r=i[n].interiors;if(oc(o,t[0],t[1])){for(var s=0;s<(r?r.length:0);s++)if(oc(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;u<l.length;u++)if("polygon"===l[u].type){for(var h=l[u].exterior,c=l[u].interiors,d=0;d<h.length;d++)oe(h[d],h[d],s);for(var f=0;f<(c?c.length:0);f++)for(var d=0;d<c[f].length;d++)oe(c[f][d],c[f][d],s)}a=this._rect,a.copy(r),this.center=[a.x+a.width/2,a.y+a.height/2]},cloneShallow:function(t){null==t&&(t=this.name);var e=new rc(t,this.geometries,this.center);return e._rect=this._rect,e.transformTo=null,e}};var HL=function(t){return sc(t),p(m(t.features,function(t){return t.geometry&&t.properties&&t.geometry.coordinates.length>0}),function(t){var e=t.properties,i=t.geometry,n=i.coordinates,a=[];"Polygon"===i.type&&a.push({type:"polygon",exterior:n[0],interiors:n.slice(1)}),"MultiPolygon"===i.type&&f(n,function(t){t[0]&&a.push({type:"polygon",exterior:t[0],interiors:t.slice(1)})});var o=new rc(e.name,a,e.cp);return o.properties=e,o})},ZL=ha(),XL=[0,1],UL=function(t,e,i){this.dim=t,this.scale=e,this._extent=i||[0,0],this.inverse=!1,this.onBand=!1};UL.prototype={constructor:UL,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 Cr(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(),Sc(i,n.count())),Sr(t,XL,i,e)},coordToData:function(t,e){var i=this._extent,n=this.scale;this.onBand&&"ordinal"===n.type&&(i=i.slice(),Sc(i,n.count()));var a=Sr(t,i,XL,e);return this.scale.scale(a)},pointToData:function(){},getTicksCoords:function(t){t=t||{};var e=t.tickModel||this.getTickModel(),i=hc(this,e),n=i.ticks,a=p(n,function(t){return{coord:this.dataToCoord(t),tickValue:t}},this),o=e.get("alignWithLabel");return Mc(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 uc(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 xc(this)}};var YL=HL,jL={};f(["map","each","filter","indexOf","inherits","reduce","filter","bind","curry","isArray","isString","isObject","isFunction","extend","defaults","clone","merge"],function(t){jL[t]=aS[t]});var qL={};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){qL[t]=iA[t]});var KL=function(t){this._axes={},this._dimList=[],this.name=t||""};KL.prototype={constructor:KL,type:"cartesian",getAxis:function(t){return this._axes[t]},getAxes:function(){return p(this._dimList,Ic,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;a<i.length;a++){var o=i[a],r=this._axes[o];n[o]=r[e](t[o])}return n}},Tc.prototype={constructor:Tc,type:"cartesian2d",dimensions:["x","y"],getBaseAxis:function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},containPoint:function(t){var e=this.getAxis("x"),i=this.getAxis("y");return e.contain(e.toLocalCoord(t[0]))&&i.contain(i.toLocalCoord(t[1]))},containData:function(t){return this.getAxis("x").containData(t[0])&&this.getAxis("y").containData(t[1])},dataToPoint:function(t,e,i){var n=this.getAxis("x"),a=this.getAxis("y");return i=i||[],i[0]=n.toGlobalCoord(n.dataToCoord(t[0])),i[1]=a.toGlobalCoord(a.dataToCoord(t[1])),i},clampData:function(t,e){var i=this.getAxis("x").scale,n=this.getAxis("y").scale,a=i.getExtent(),o=n.getExtent(),r=i.parse(t[0]),s=n.parse(t[1]);return e=e||[],e[0]=Math.min(Math.max(Math.min(a[0],a[1]),r),Math.max(a[0],a[1])),e[1]=Math.min(Math.max(Math.min(o[0],o[1]),s),Math.max(o[0],o[1])),e},pointToData:function(t,e){var i=this.getAxis("x"),n=this.getAxis("y");return e=e||[],e[0]=i.coordToData(i.toLocalCoord(t[0])),e[1]=n.coordToData(n.toLocalCoord(t[1])),e},getOtherAxis:function(t){return this.getAxis("x"===t.dim?"y":"x")},getArea:function(){var t=this.getAxis("x").getGlobalExtent(),e=this.getAxis("y").getGlobalExtent(),i=Math.min(t[0],t[1]),n=Math.min(e[0],e[1]),a=Math.max(t[0],t[1])-i,o=Math.max(e[0],e[1])-n,r=new Ti(i,n,a,o);return r}},h(Tc,KL);var $L=function(t,e,i,n,a){UL.call(this,t,e,i),this.type=n||"value",this.position=a||"bottom"};$L.prototype={constructor:$L,index:0,getAxesOnZeroOf:null,model:null,isHorizontal:function(){var t=this.position;return"top"===t||"bottom"===t},getGlobalExtent:function(t){var e=this.getExtent();return e[0]=this.toGlobalCoord(e[0]),e[1]=this.toGlobalCoord(e[1]),t&&e[0]>e[1]&&e.reverse(),e},getOtherAxis:function(){this.grid.getOtherAxis()},pointToData:function(t,e){return this.coordToData(this.toLocalCoord(t["x"===this.dim?0:1]),e)},toLocalCoord:null,toGlobalCoord:null},h($L,UL);var JL={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)"]}}},QL={};QL.categoryAxis=a({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},JL),QL.valueAxis=a({boundaryGap:[0,0],splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#eee",width:1}}},JL),QL.timeAxis=s({scale:!0,min:"dataMin",max:"dataMax"},QL.valueAxis),QL.logAxis=s({scale:!0,logBase:10},QL.valueAxis);var tk=["value","category","time","log"],ek=function(t,e,i,n){f(tk,function(r){e.extend({type:t+"Axis."+r,mergeDefaultAndTheme:function(e,n){var o=this.layoutMode,s=o?ns(e):{},l=n.getTheme();a(e,l.get(r+"Axis")),a(e,this.getDefaultOption()),e.type=i(t,e),o&&is(e,s,o)},optionUpdated:function(){var t=this.option;"category"===t.type&&(this.__ordinalMeta=bh.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([{},QL[r+"Axis"],n],!0)})}),AA.registerSubTypeDefaulter(t+"Axis",x(i,t))},ik=AA.extend({type:"cartesian2dAxis",axis:null,init:function(){ik.superApply(this,"init",arguments),this.resetRange()},mergeOption:function(){ik.superApply(this,"mergeOption",arguments),this.resetRange()},restoreData:function(){ik.superApply(this,"restoreData",arguments),this.resetRange()},getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"grid",index:this.option.gridIndex,id:this.option.gridId})[0]}});a(ik.prototype,kL);var nk={offset:0};ek("x",ik,Ac,nk),ek("y",ik,Ac,nk),AA.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 ak=Cc.prototype;ak.type="grid",ak.axisPointerEnabled=!0,ak.getRect=function(){return this._rect},ak.update=function(t,e){var i=this._axesMap;this._updateScale(t,this.model),f(i.x,function(t){Zh(t.scale,t.model)}),f(i.y,function(t){Zh(t.scale,t.model)});var n={};f(i.x,function(t){Lc(i,"y",t,n)}),f(i.y,function(t){Lc(i,"x",t,n)}),this.resize(this.model,e)},ak.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]),Pc(t,e?a.x:a.y)})}var a=Qr(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=qh(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())},ak.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]}},ak.getAxes=function(){return this._axesList.slice()},ak.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;n<a.length;n++)if(a[n].getAxis("x").index===t||a[n].getAxis("y").index===e)return a[n]},ak.getCartesians=function(){return this._coordsList.slice()},ak.convertToPixel=function(t,e,i){var n=this._findConvertTarget(t,e);return n.cartesian?n.cartesian.dataToPoint(i):n.axis?n.axis.toGlobalCoord(n.axis.dataToCoord(i)):null},ak.convertFromPixel=function(t,e,i){var n=this._findConvertTarget(t,e);return n.cartesian?n.cartesian.pointToData(i):n.axis?n.axis.coordToData(n.axis.toLocalCoord(i)):null},ak._findConvertTarget=function(t,e){var i,n,a=e.seriesModel,o=e.xAxisModel||a&&a.getReferringComponents("xAxis")[0],r=e.yAxisModel||a&&a.getReferringComponents("yAxis")[0],s=e.gridModel,l=this._coordsList;if(a)i=a.coordinateSystem,u(l,i)<0&&(i=null);else if(o&&r)i=this.getCartesian(o.componentIndex,r.componentIndex);else if(o)n=this.getAxis("x",o.componentIndex);else if(r)n=this.getAxis("y",r.componentIndex);else if(s){var h=s.coordinateSystem;h===this&&(i=this._coordsList[0])}return{cartesian:i,axis:n}},ak.containPoint=function(t){var e=this._coordsList[0];return e?e.containPoint(t):void 0},ak._initCartesian=function(t,e){function i(i){return function(r,s){if(Dc(r,t,e)){var l=r.get("position");"x"===i?"top"!==l&&"bottom"!==l&&(l=n.bottom?"top":"bottom"):"left"!==l&&"right"!==l&&(l=n.left?"right":"left"),n[l]=!0;var u=new $L(i,Xh(r),[0,0],r.get("type"),l),h="category"===u.type;u.onBand=h&&r.get("boundaryGap"),u.inverse=r.get("inverse"),r.axis=u,u.model=r,u.grid=this,u.index=s,this._axesList.push(u),a[i][s]=u,o[i]++}}}var n={left:!1,right:!1,top:!1,bottom:!1},a={x:{},y:{}},o={x:0,y:0};return e.eachComponent("xAxis",i("x"),this),e.eachComponent("yAxis",i("y"),this),o.x&&o.y?(this._axesMap=a,void f(a.x,function(e,i){f(a.y,function(n,a){var o="x"+i+"y"+a,r=new Tc(o);r.grid=this,r.model=t,this._coordsMap[o]=r,this._coordsList.push(r),r.addAxis(e),r.addAxis(n)},this)},this)):(this._axesMap={},void(this._axesList=[]))},ak._updateScale=function(t,e){function i(t,e){f(t.mapDimension(e.dim,!0),function(i){e.scale.unionExtentFromData(t,vh(t,i))})}f(this._axesList,function(t){t.scale.setExtent(1/0,-1/0)}),t.eachSeries(function(n){if(Nc(n)){var a=Oc(n,t),o=a[0],r=a[1];if(!Dc(o,e,t)||!Dc(r,e,t))return;var s=this.getCartesian(o.componentIndex,r.componentIndex),l=n.getData(),u=s.getAxis("x"),h=s.getAxis("y");"list"===l.type&&(i(l,u,n),i(l,h,n))}},this)},ak.getTooltipAxes=function(t){var e=[],i=[];return f(this.getCartesians(),function(n){var a=null!=t&&"auto"!==t?n.getAxis(t):n.getBaseAxis(),o=n.getOtherAxis(a);u(e,a)<0&&e.push(a),u(i,o)<0&&i.push(o)}),{baseAxes:e,otherAxes:i}};var ok=["xAxis","yAxis"];Cc.create=function(t,e){var i=[];return t.eachComponent("grid",function(n,a){var o=new Cc(n,t,e);o.name="grid_"+a,o.resize(n,e,!0),n.coordinateSystem=o,i.push(o)}),t.eachSeries(function(e){if(Nc(e)){var i=Oc(e,t),n=i[0],a=i[1],o=n.getCoordSysModel(),r=o.coordinateSystem;e.coordinateSystem=r.getCartesian(n.componentIndex,a.componentIndex)}}),i},Cc.dimensions=Cc.prototype.dimensions=Tc.prototype.dimensions,Cs.register("cartesian2d",Cc);var rk=pD.extend({type:"series.__base_bar__",getInitialData:function(){return yh(this.getSource(),this,{useEncodeDefaulter:!0})},getMarkerPosition:function(t){var e=this.coordinateSystem;if(e){var i=e.dataToPoint(e.clampData(t)),n=this.getData(),a=n.getLayout("offset"),o=n.getLayout("size"),r=e.getBaseAxis().isHorizontal()?0:1;return i[r]+=a+o/2,i}return[0/0,0/0]},defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod",itemStyle:{},emphasis:{}}});rk.extend({type:"series.bar",dependencies:["grid","polar"],brushSelector:"rect",getProgressive:function(){return this.get("large")?this.get("progressive"):!1},getProgressiveThreshold:function(){var t=this.get("progressiveThreshold"),e=this.get("largeThreshold");return e>t&&(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 sk=dI([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["stroke","barBorderColor"],["lineWidth","barBorderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),lk={getBarItemStyle:function(t){var e=sk(this,t);if(this.getBorderLineDash){var i=this.getBorderLineDash();i&&(e.lineDash=i)}return e}},uk=yo({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()}}),hk=["itemStyle","barBorderWidth"],ck=[0,0];r(mr.prototype,lk),Bu({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=Fc(o,n);i.removeClipPath();var h=t.get("roundCap",!0),c=t.get("showBackground",!0),d=t.getModel("backgroundStyle"),f=[],p=this._backgroundEls||[];n.diff(a).add(function(a){var r=n.getItemModel(a),p=mk[o.type](n,a,r);if(c){var g=Jc(o,e,p);g.useStyle(d.getBarItemStyle()),f[a]=g}if(n.hasValue(a)){if(l){var m=pk[o.type](u,p);if(m)return void i.remove(v)}var v=gk[o.type](a,p,e,s,!1,h);n.setItemGraphicEl(a,v),i.add(v),Xc(v,n,a,r,p,t,e,"polar"===o.type)}}).update(function(r,g){var m=n.getItemModel(r),v=mk[o.type](n,r,m);if(c){var y=p[g];y.useStyle(d.getBarItemStyle()),f[r]=y;var x=$c(e,v,o);nr(y,{shape:x},s,r)}var _=a.getItemGraphicEl(g);if(!n.hasValue(r))return void i.remove(_);if(l){var w=pk[o.type](u,v);if(w)return void i.remove(_)}_?nr(_,{shape:v},s,r):_=gk[o.type](r,v,e,s,!0,h),n.setItemGraphicEl(r,_),i.add(_),Xc(_,n,r,m,v,t,e,"polar"===o.type)}).remove(function(t){var e=a.getItemGraphicEl(t);"cartesian2d"===o.type?e&&Wc(t,s,e):e&&Hc(t,s,e)}).execute();var g=this._backgroundGroup||(this._backgroundGroup=new aM);g.removeAll();for(var m=0;m<f.length;++m)g.add(f[m]);i.add(g),this._backgroundEls=f,this._data=n},_renderLarge:function(t){this._clear(),Yc(t,this.group);var e=t.get("clip",!0)?Gc(t.coordinateSystem,!1,t):null;e?this.group.setClipPath(e):this.group.removeClipPath()},_incrementalRenderLarge:function(t,e){this._removeBackground(),Yc(e,this.group,!0)},dispose:G,remove:function(t){this._clear(t)},_clear:function(t){var e=this.group,i=this._data;t&&t.get("animation")&&i&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],i.eachItemGraphicEl(function(e){"sector"===e.type?Hc(e.dataIndex,t,e):Wc(e.dataIndex,t,e)})):e.removeAll(),this._data=null},_removeBackground:function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null}});var dk=Math.max,fk=Math.min,pk={cartesian2d:function(t,e){var i=e.width<0?-1:1,n=e.height<0?-1:1;0>i&&(e.x+=e.width,e.width=-e.width),0>n&&(e.y+=e.height,e.height=-e.height);var a=dk(e.x,t.x),o=fk(e.x+e.width,t.x+t.width),r=dk(e.y,t.y),s=fk(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(){return!1}},gk={cartesian2d:function(t,e,i,n,a){var o=new kT({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],iA[a?"updateProps":"initProps"](o,{shape:u},n,t)}return o},polar:function(t,e,i,n,a,o){var r=e.startAngle<e.endAngle,l=!i&&o?uk:ST,u=new l({shape:s({clockwise:r},e),z2:1});if(u.name="item",n){var h=u.shape,c=i?"r":"endAngle",d={};h[c]=i?0:e.startAngle,d[c]=e[c],iA[a?"updateProps":"initProps"](u,{shape:d},n,t)}return u}},mk={cartesian2d:function(t,e,i){var n=t.getItemLayout(e),a=Uc(i,n),o=n.width>0?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}}},vk=no.extend({type:"largeBar",shape:{points:[]},buildPath:function(t,e){for(var i=e.points,n=this.__startPoint,a=this.__baseDimIdx,o=0;o<i.length;o+=2)n[a]=i[o+a],t.moveTo(n[0],n[1]),t.lineTo(i[o],i[o+1])}}),yk=_l(function(t){var e=this,i=jc(e,t.offsetX,t.offsetY);e.dataIndex=i>=0?i:null},30,!1),xk=Math.PI,_k=function(t,e){this.opt=e,this.axisModel=t,s(e,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0}),this.group=new aM;var i=new aM({position:e.position.slice(),rotation:e.rotation});i.updateTransform(),this._transform=i.transform,this._dumbGroup=i};_k.prototype={constructor:_k,hasBuilder:function(t){return!!wk[t]},add:function(t){wk[t].call(this)},getGroup:function(){return this.group}};var wk={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 OT({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=tc(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=od(this,t,e),n=sd(this,t,e);td(t,n,i),rd(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,nd(a)?t.labelOffset+o*l:0],d=e.get("nameRotate");null!=d&&(d=d*xk/180);var f;nd(a)?n=Sk(t.rotation,null!=d?d:t.rotation,o):(n=Qc(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?xA(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 xT({anid:"name",__fullText:i,__truncatedText:y,position:c,rotation:n.rotation,silent:Mk(e),z2:1,tooltip:x&&x.show?r({content:i,formatter:function(){return i},formatterParams:w},x):null});Yo(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=bk(e),b.eventData.targetType="axisName",b.eventData.name=i),this._dumbGroup.add(b),b.updateTransform(),this.group.add(b),b.decomposeTransform()}}},bk=_k.makeAxisEventDataBase=function(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e},Sk=_k.innerTextLayout=function(t,e,i){var n,a,o=kr(e-t);return Pr(o)?(a=i>0?"top":"bottom",n="center"):Pr(o-xk)?(a=i>0?"bottom":"top",n="center"):(a="middle",n=o>0&&xk>o?i>0?"right":"left":i>0?"left":"right"),{rotation:o,textAlign:n,textVerticalAlign:a}},Mk=_k.isLabelSilent=function(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)},Ik=f,Tk=x,Ak=zu({type:"axis",_axisPointer:null,axisPointerClass:null,render:function(t,e,i,n){this.axisPointerClass&&pd(t),Ak.superApply(this,"render",arguments),xd(this,t,e,i,n,!0)},updateAxisPointer:function(t,e,i,n){xd(this,t,e,i,n,!1)},remove:function(t,e){var i=this._axisPointer;i&&i.remove(e),Ak.superApply(this,"remove",arguments)},dispose:function(t,e){_d(this,e),Ak.superApply(this,"dispose",arguments)}}),Dk=[];Ak.registerAxisPointerClass=function(t,e){Dk[t]=e},Ak.getAxisPointerClass=function(t){return t&&Dk[t]};var Ck=["axisLine","axisTickLabel","axisName"],Lk=["splitArea","splitLine","minorSplitLine"],kk=Ak.extend({type:"cartesianAxis",axisPointerClass:"CartesianAxisPointer",render:function(t,e,i,n){this.group.removeAll();var a=this._axisGroup;if(this._axisGroup=new aM,this.group.add(this._axisGroup),t.get("show")){var o=t.getCoordSysModel(),r=wd(o,t),s=new _k(t,r);f(Ck,s.add,s),this._axisGroup.add(s.getGroup()),f(Lk,function(e){t.get(e+".show")&&this["_"+e](t,o)},this),lr(a,this._axisGroup,t),kk.superCall(this,"render",t,e,i,n)}},remove:function(){Sd(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;p<h.length;p++){var g=i.toGlobalCoord(h[p].coord);l?(c[0]=g,c[1]=r.y,d[0]=g,d[1]=r.y+r.height):(c[0]=r.x,c[1]=g,d[0]=r.x+r.width,d[1]=g);var m=u++%o.length,v=h[p].tickValue;this._axisGroup.add(new OT({anid:null!=v?"line_"+h[p].tickValue:null,subPixelOptimize:!0,shape:{x1:c[0],y1:c[1],x2:d[0],y2:d[1]},style:s({stroke:o[m]},f),silent:!0}))}}},_minorSplitLine:function(t,e){var i=t.axis,n=t.getModel("minorSplitLine"),a=n.getModel("lineStyle"),o=e.coordinateSystem.getRect(),r=i.isHorizontal(),s=i.getMinorTicksCoords();if(s.length)for(var l=[],u=[],h=a.getLineStyle(),c=0;c<s.length;c++)for(var d=0;d<s[c].length;d++){var f=i.toGlobalCoord(s[c][d].coord);r?(l[0]=f,l[1]=o.y,u[0]=f,u[1]=o.y+o.height):(l[0]=o.x,l[1]=f,u[0]=o.x+o.width,u[1]=f),this._axisGroup.add(new OT({anid:"minor_line_"+s[c][d].tickValue,subPixelOptimize:!0,shape:{x1:l[0],y1:l[1],x2:u[0],y2:u[1]},style:h,silent:!0}))}},_splitArea:function(t,e){bd(this,this._axisGroup,t,e)}});kk.extend({type:"xAxis"}),kk.extend({type:"yAxis"}),zu({type:"grid",render:function(t){this.group.removeAll(),t.get("show")&&this.group.add(new kT({shape:t.coordinateSystem.getRect(),style:s({fill:t.get("backgroundColor")},t.getItemStyle()),silent:!0,z2:-1}))}}),Iu(function(t){t.xAxis&&t.yAxis&&!t.grid&&(t.grid={})}),ku(yC.VISUAL.LAYOUT,x(Rh,"bar")),ku(yC.VISUAL.PROGRESSIVE_LAYOUT,cL),Pu({seriesType:"bar",reset:function(t){t.getData().setVisual("legendSymbol","roundRect")}}),pD.extend({type:"series.line",dependencies:["grid","polar"],getInitialData:function(){return yh(this.getSource(),this,{useEncodeDefaulter:!0})},defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,clip:!0,label:{position:"top"},lineStyle:{width:2,type:"solid"},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0}});var Pk=Md.prototype,Ok=Md.getSymbolSize=function(t,e){var i=t.getItemVisual(e,"symbolSize");return i instanceof Array?i.slice():[+i,+i]};Pk._createSymbol=function(t,e,i,n,a){this.removeAll();var o=e.getItemVisual(i,"color"),r=tc(t,-1,-1,2,2,o,a);r.attr({z2:100,culling:!0,scale:Id(n)}),r.drift=Td,this._symbolType=t,this.add(r)},Pk.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(t)},Pk.getSymbolPath=function(){return this.childAt(0)},Pk.getScale=function(){return this.childAt(0).scale},Pk.highlight=function(){this.childAt(0).trigger("emphasis")},Pk.downplay=function(){this.childAt(0).trigger("normal")},Pk.setZ=function(t,e){var i=this.childAt(0);i.zlevel=t,i.z=e},Pk.setDraggable=function(t){var e=this.childAt(0);e.draggable=t,e.cursor=t?"move":e.cursor},Pk.updateData=function(t,e,i){this.silent=!1;var n=t.getItemVisual(e,"symbol")||"circle",a=t.hostModel,o=Ok(t,e),r=n!==this._symbolType;if(r){var s=t.getItemVisual(e,"symbolKeepAspect");this._createSymbol(n,t,e,o,s)}else{var l=this.childAt(0);l.silent=!1,nr(l,{scale:Id(o)},a,e)}if(this._updateCommon(t,e,o,i),r){var l=this.childAt(0),u=i&&i.fadeIn,h={scale:l.scale.slice()};u&&(h.style={opacity:l.style.opacity}),l.scale=[0,0],u&&(l.style.opacity=0),ar(l,h,a,e)}this._seriesModel=a};var Nk=["itemStyle"],Ek=["emphasis","itemStyle"],zk=["label"],Rk=["emphasis","label"];Pk._updateCommon=function(t,e,i,n){function a(e){return b?t.getName(e):Ec(t,e)}var o=this.childAt(0),s=t.hostModel,l=t.getItemVisual(e,"color");"image"!==o.type?o.useStyle({strokeNoScale:!0}):o.setStyle({opacity:null,shadowBlur:null,shadowOffsetX:null,shadowOffsetY:null,shadowColor:null});var u=n&&n.itemStyle,h=n&&n.hoverItemStyle,c=n&&n.symbolRotate,d=n&&n.symbolOffset,f=n&&n.labelModel,p=n&&n.hoverLabelModel,g=n&&n.hoverAnimation,m=n&&n.cursorStyle;if(!n||t.hasItemOption){var v=n&&n.itemModel?n.itemModel:t.getItemModel(e);u=v.getModel(Nk).getItemStyle(["color"]),h=v.getModel(Ek).getItemStyle(),c=v.getShallow("symbolRotate"),d=v.getShallow("symbolOffset"),f=v.getModel(zk),p=v.getModel(Rk),g=v.getShallow("hoverAnimation"),m=v.getShallow("cursor")}else h=r({},h);var y=o.style;o.attr("rotation",(c||0)*Math.PI/180||0),d&&o.attr("position",[Mr(d[0],i[0]),Mr(d[1],i[1])]),m&&o.attr("cursor",m),o.setColor(l,n&&n.symbolInnerColor),o.setStyle(u);var x=t.getItemVisual(e,"opacity");null!=x&&(y.opacity=x);var _=t.getItemVisual(e,"liftZ"),w=o.__z2Origin;null!=_?null==w&&(o.__z2Origin=o.z2,o.z2+=_):null!=w&&(o.z2=w,o.__z2Origin=null);var b=n&&n.useNameLabel;Xo(y,h,f,p,{labelFetcher:s,labelDataIndex:e,defaultText:a,isRectText:!0,autoColor:l}),o.__symbolOriginalScale=Id(i),o.hoverStyle=h,o.highDownOnUpdate=g&&s.isAnimationEnabled()?Ad:null,Fo(o)},Pk.fadeOut=function(t,e){var i=this.childAt(0);this.silent=i.silent=!0,!(e&&e.keepLabel)&&(i.style.text=null),nr(i,{style:{opacity:0},scale:[0,0]},this._seriesModel,this.dataIndex,t)},h(Md,aM);var Bk=Dd.prototype;Bk.updateData=function(t,e){e=Ld(e);var i=this.group,n=t.hostModel,a=this._data,o=this._symbolCtor,r=kd(t);a||i.removeAll(),t.diff(a).add(function(n){var a=t.getItemLayout(n);if(Cd(t,a,n,e)){var s=new o(t,n,r);s.attr("position",a),t.setItemGraphicEl(n,s),i.add(s)}}).update(function(s,l){var u=a.getItemGraphicEl(l),h=t.getItemLayout(s);return Cd(t,h,s,e)?(u?(u.updateData(t,s,r),nr(u,{position:h},n)):(u=new o(t,s),u.attr("position",h)),i.add(u),void t.setItemGraphicEl(s,u)):void i.remove(u)}).remove(function(t){var e=a.getItemGraphicEl(t);e&&e.fadeOut(function(){i.remove(e)})}).execute(),this._data=t},Bk.isPersistent=function(){return!0},Bk.updateLayout=function(){var t=this._data;t&&t.eachItemGraphicEl(function(e,i){var n=t.getItemLayout(i);e.attr("position",n)})},Bk.incrementalPrepareUpdate=function(t){this._seriesScope=kd(t),this._data=null,this.group.removeAll()},Bk.incrementalUpdate=function(t,e,i){function n(t){t.isGroup||(t.incremental=t.useHoverLayer=!0)}i=Ld(i);for(var a=t.start;a<t.end;a++){var o=e.getItemLayout(a);if(Cd(e,o,a,i)){var r=new this._symbolCtor(e,a,this._seriesScope);r.traverse(n),r.attr("position",o),this.group.add(r),e.setItemGraphicEl(a,r)}}},Bk.remove=function(t){var e=this.group,i=this._data;i&&t?i.eachItemGraphicEl(function(t){t.fadeOut(function(){e.remove(t)})}):e.removeAll()};var Vk=function(t,e,i,n,a,o,r,s){for(var l=Ed(t,e),u=[],h=[],c=[],d=[],f=[],p=[],g=[],m=Pd(a,e,r),v=Pd(o,t,s),y=0;y<l.length;y++){var x=l[y],_=!0;switch(x.cmd){case"=":var w=t.getItemLayout(x.idx),b=e.getItemLayout(x.idx1);(isNaN(w[0])||isNaN(w[1]))&&(w=b.slice()),u.push(w),h.push(b),c.push(i[x.idx]),d.push(n[x.idx1]),g.push(e.getRawIndex(x.idx1));break;case"+":var S=x.idx;u.push(a.dataToPoint([e.get(m.dataDimsForPoint[0],S),e.get(m.dataDimsForPoint[1],S)])),h.push(e.getItemLayout(S).slice()),c.push(Nd(m,a,e,S)),d.push(n[S]),g.push(e.getRawIndex(S));break;case"-":var S=x.idx,M=t.getRawIndex(S);M!==S?(u.push(t.getItemLayout(S)),h.push(o.dataToPoint([t.get(v.dataDimsForPoint[0],S),t.get(v.dataDimsForPoint[1],S)])),c.push(i[S]),d.push(Nd(v,o,t,S)),g.push(M)):_=!1}_&&(f.push(x),p.push(p.length))}p.sort(function(t,e){return g[t]-g[e]});for(var I=[],T=[],A=[],D=[],C=[],y=0;y<p.length;y++){var S=p[y];I[y]=u[S],T[y]=h[S],A[y]=c[S],D[y]=d[S],C[y]=f[S]}return{current:I,next:T,stackedOnCurrent:A,stackedOnNext:D,status:C}},Gk=re,Fk=se,Wk=U,Hk=W,Zk=[],Xk=[],Uk=[],Yk=no.extend({type:"ec-polyline",shape:{points:[],smooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},style:{fill:null,stroke:"#000"},brush:bT(no.prototype.brush),buildPath:function(t,e){var i=e.points,n=0,a=i.length,o=Gd(i,e.smoothConstraint);if(e.connectNulls){for(;a>0&&zd(i[a-1]);a--);for(;a>n&&zd(i[n]);n++);}for(;a>n;)n+=Rd(t,i,n,a,a,1,o.min,o.max,e.smooth,e.smoothMonotone,e.connectNulls)+1}}),jk=no.extend({type:"ec-polygon",shape:{points:[],stackedOnPoints:[],smooth:0,stackedOnSmooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},brush:bT(no.prototype.brush),buildPath:function(t,e){var i=e.points,n=e.stackedOnPoints,a=0,o=i.length,r=e.smoothMonotone,s=Gd(i,e.smoothConstraint),l=Gd(n,e.smoothConstraint);if(e.connectNulls){for(;o>0&&zd(i[o-1]);o--);for(;o>a&&zd(i[a]);a++);}for(;o>a;){var u=Rd(t,i,a,o,o,1,s.min,s.max,e.smooth,r,e.connectNulls);Rd(t,n,a+u-1,u,o,-1,l.min,l.max,e.stackedOnSmooth,r,e.connectNulls),a+=u+1,t.closePath()}}});gl.extend({type:"line",init:function(){var t=new aM,e=new Dd;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=Pd(n,o,y),_=Hd(n,o,x),w=t.get("showSymbol"),b=w&&!h&&Ud(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(jd(n,!1,t)),w&&d.updateData(o,{isIgnore:b,clipShape:M}),o.eachItemGraphicEl(function(t){t.stopAnimation(!0)}),Fd(this._stackedOnPoints,_)&&Fd(this._points,u)||(m?this._updateAnimation(o,_,n,i,I,y):(I&&(u=Zd(u,n,I),_=Zd(_,n,I)),f.setShape({points:u}),p&&p.setShape({points:u,stackedOnPoints:_})))):(w&&d.updateData(o,{isIgnore:b,clipShape:M}),I&&(u=Zd(u,n,I),_=Zd(_,n,I)),f=this._newPolyline(u,n,m),v&&(p=this._newPolygon(u,_,n,m)),g.setClipPath(jd(n,!0,t)));var T=Xd(o,n)||o.getVisual("color");f.useStyle(s(r.getLineStyle(),{fill:"none",stroke:T,lineJoin:"bevel"}));var A=t.get("smooth");if(A=Wd(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=Wd(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=ua(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 Md(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 gl.prototype.highlight.call(this,t,e,i,n)},downplay:function(t,e,i,n){var a=t.getData(),o=ua(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 gl.prototype.downplay.call(this,t,e,i,n)},_newPolyline:function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new Yk({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 jk({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=Vk(this._data,t,this._stackedOnPoints,e,this._coordSys,i,this._valueOrigin,o),h=u.current,c=u.stackedOnCurrent,d=u.next,f=u.stackedOnNext;a&&(h=Zd(u.current,i,a),c=Zd(u.stackedOnCurrent,i,a),d=Zd(u.next,i,a),f=Zd(u.stackedOnNext,i,a)),r.shape.__points=u.current,r.shape.points=h,nr(r,{shape:{points:d}},l),s&&(s.setShape({points:h,stackedOnPoints:c}),nr(s,{shape:{points:d,stackedOnPoints:f}},l));for(var p=[],g=u.status,m=0;m<g.length;m++){var v=g[m].cmd;if("="===v){var y=t.getItemGraphicEl(g[m].idx1);y&&p.push({el:y,ptIdx:m})}}r.animators&&r.animators.length&&r.animators[0].during(function(){for(var t=0;t<p.length;t++){var e=p[t].el;e.attr("position",r.shape.__points[p[t].ptIdx])}})},remove:function(){var t=this.group,e=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),e&&e.eachItemGraphicEl(function(i,n){i.__temp&&(t.remove(i),e.setItemGraphicEl(n,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._data=null}});var qk=function(t,e,i){return{seriesType:t,performRawSeries:!0,reset:function(t,n){function a(e,i){if(c){var n=t.getRawValue(i),a=t.getDataParams(i);u&&e.setItemVisual(i,"symbol",r(n,a)),h&&e.setItemVisual(i,"symbolSize",s(n,a))}if(e.hasItemOption){var o=e.getItemModel(i),l=o.getShallow("symbol",!0),d=o.getShallow("symbolSize",!0),f=o.getShallow("symbolKeepAspect",!0);null!=l&&e.setItemVisual(i,"symbol",l),null!=d&&e.setItemVisual(i,"symbolSize",d),null!=f&&e.setItemVisual(i,"symbolKeepAspect",f)}}var o=t.getData(),r=t.get("symbol"),s=t.get("symbolSize"),l=t.get("symbolKeepAspect"),u=w(r),h=w(s),c=u||h,d=!u&&r?r:e,f=h?null:s;return o.setVisual({legendSymbol:i||d,symbol:d,symbolSize:f,symbolKeepAspect:l}),n.isSeriesFiltered(t)?void 0:{dataEach:o.hasItemOption||c?a:null}}}},Kk=function(t){return{seriesType:t,plan:vD(),reset:function(t){function e(t,e){for(var i=t.end-t.start,a=o&&new Float32Array(i*s),l=t.start,u=0,h=[],c=[];l<t.end;l++){var d;if(1===s){var f=e.get(r[0],l);d=!isNaN(f)&&n.dataToPoint(f,null,c)}else{var f=h[0]=e.get(r[0],l),p=h[1]=e.get(r[1],l);d=!isNaN(f)&&!isNaN(p)&&n.dataToPoint(h,null,c)}o?(a[u++]=d?d[0]:0/0,a[u++]=d?d[1]:0/0):e.setItemLayout(l,d&&d.slice()||[0/0,0/0])}o&&e.setLayout("symbolPoints",a)}var i=t.getData(),n=t.coordinateSystem,a=t.pipelineContext,o=a.large;if(n){var r=p(n.dimensions,function(t){return i.mapDimension(t)}).slice(0,2),s=r.length,l=i.getCalculationInfo("stackResultDimension");return mh(i,r[0])&&(r[0]=l),mh(i,r[1])&&(r[1]=l),s&&{progress:e}}}}},$k={average:function(t){for(var e=0,i=0,n=0;n<t.length;n++)isNaN(t[n])||(e+=t[n],i++);return 0===i?0/0:e/i},sum:function(t){for(var e=0,i=0;i<t.length;i++)e+=t[i]||0;return e},max:function(t){for(var e=-1/0,i=0;i<t.length;i++)t[i]>e&&(e=t[i]);return isFinite(e)?e:0/0},min:function(t){for(var e=1/0,i=0;i<t.length;i++)t[i]<e&&(e=t[i]);return isFinite(e)?e:0/0},nearest:function(t){return t[0]}},Jk=function(t){return Math.round(t.length/2)},Qk=function(t){return{seriesType:t,modifyOutputEnd:!0,reset:function(t){var e=t.getData(),i=t.get("sampling"),n=t.coordinateSystem;if("cartesian2d"===n.type&&i){var a=n.getBaseAxis(),o=n.getOtherAxis(a),r=a.getExtent(),s=r[1]-r[0],l=Math.round(e.count()/s);if(l>1){var u;"string"==typeof i?u=$k[i]:"function"==typeof i&&(u=i),u&&t.setData(e.downSample(e.mapDimension(o.dim),1/l,u,Jk))}}}}};Pu(qk("line","circle","line")),ku(Kk("line")),Tu(yC.PROCESSOR.STATISTIC,Qk("line"));var tP=function(t,e,i){e=_(e)&&{coordDimensions:e}||r({},e);var n=t.getSource(),a=tL(n,e),o=new $C(a,t);return o.initData(n,i),o},eP={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}},iP=Ru({type:"series.pie",init:function(t){iP.superApply(this,"init",arguments),this.legendVisualProvider=new qd(y(this.getData,this),y(this.getRawData,this)),this.updateSelectedMap(this._createSelectableList()),this._defaultLabelLine(t)},mergeOption:function(t){iP.superCall(this,"mergeOption",t),this.updateSelectedMap(this._createSelectableList())},getInitialData:function(){return tP(this,{coordDimensions:["value"],encodeDefaulter:x(vs,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:il(t,n,"selected")});return i},getDataParams:function(t){var e=this.getData(),i=iP.superCall(this,"getDataParams",t),n=[];return e.each(e.mapDimension("value"),function(t){n.push(t)}),i.percent=Lr(n,t,e.hostModel.get("percentPrecision")),i.$vars.push("percent"),i},_defaultLabelLine:function(t){ea(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(iP,eP);var nP=Jd.prototype;nP.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,ar(n,{shape:{r:h.r}},l,e)):(n.shape.endAngle=h.startAngle,nr(n,{shape:{endAngle:h.endAngle}},l,e))}else"expansion"===d?n.setShape(c):nr(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),$d(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=u.get("hoverAnimation")&&l.isAnimationEnabled()?function(t,e){"emphasis"===e?(a.ignore=a.hoverIgnore,o.ignore=o.hoverIgnore,n.stopAnimation(!0),n.animateTo({shape:{r:h.r+l.get("hoverOffset")}},300,"elasticOut")):(a.ignore=a.normalIgnore,o.ignore=o.normalIgnore,n.stopAnimation(!0),n.animateTo({shape:{r:h.r}},300,"elasticOut"))}:null,Fo(this)},nP._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?(nr(n,{shape:h},o,e),nr(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");Xo(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(Jd,aM);var aP=(gl.extend({type:"pie",init:function(){var t=new aM;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(Kd,this.uid,t,s,i),d=t.get("selectedMode");if(a.diff(o).add(function(t){var e=new Jd(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<a.count();++p)f=a.getItemLayout(p);var g=Math.max(i.getWidth(),i.getHeight())/2,m=y(r.removeClipPath,r);r.setClipPath(this._createClipPath(f.cx,f.cy,g,f.startAngle,f.clockwise,m,t,l))}else r.removeClipPath();this._data=a}},dispose:function(){},_createClipPath:function(t,e,i,n,a,o,r,s){var l=new ST({shape:{cx:t,cy:e,r0:0,r:i,startAngle:n,endAngle:n,clockwise:a}}),u=s?ar:nr;return u(l,{shape:{endAngle:n+(a?1:-1)*Math.PI*2}},r,o),l},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}}}),function(t,e){f(e,function(e){e.update="updateView",Du(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}})})}),oP=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)}})}}},rP=Math.PI/180,sP=function(t,e,i,n,a,o){var r,s,l=t.getData(),u=[],h=!1,c=(t.get("minShowLabelAngle")||0)*rP;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=Mr(f.get("margin"),i),y=f.get("bleedMargin"),x=f.getFont(),_=d.getModel("labelLine"),w=_.get("length");w=Mr(w,i);var b=_.get("length2");if(b=Mr(b,i),!(o.angle<c)){var S,M,I,T,A=(o.startAngle+o.endAngle)/2,D=Math.cos(A),C=Math.sin(A);r=o.cx,s=o.cy;var L=t.getFormattedLabel(n,"normal")||l.getName(n),k=Xi(L,x,T,"top"),P="inside"===p||"inner"===p;if("center"===p)S=o.cx,M=o.cy,T="center";else{var O=(P?(o.r+o.r0)/2*D:o.r*D)+r,N=(P?(o.r+o.r0)/2*C:o.r*C)+s;if(S=O+3*D,M=N+3*C,!P){var E=O+D*(w+e-o.r),z=N+C*(w+e-o.r),R=E+(0>D?-1:1)*b,B=z;S="edge"===m?0>D?a+v:a+i-v:R+(0>D?-g:g),M=B,I=[[O,N],[E,z],[R,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")&&tf(u,r,s,e,i,n,a,o)},lP=2*Math.PI,uP=Math.PI/180,hP=function(t,e,i){e.eachSeriesByType(t,function(t){var e=t.getData(),n=e.mapDimension("value"),a=nf(t,i),o=t.get("center"),r=t.get("radius");_(r)||(r=[0,r]),_(o)||(o=[o,o]);var s=Mr(a.width,i.getWidth()),l=Mr(a.height,i.getHeight()),u=Math.min(s,l),h=Mr(o[0],s)+a.x,c=Mr(o[1],l)+a.y,d=Mr(r[0],u/2),f=Mr(r[1],u/2),p=-t.get("startAngle")*uP,g=t.get("minAngle")*uP,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=lP,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:lP/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?Sr(t,S,[d,f]):f,viewRect:a}),T=o}),lP>M&&m)if(.001>=M){var D=lP/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}});sP(t,f,a.width,a.height,a.x,a.y)})},cP=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<i.length;a++)if(!i[a].isSelected(e))return!1;return!0})}}}};aP("pie",[{type:"pieToggleSelect",event:"pieselectchanged",method:"toggleSelected"},{type:"pieSelect",event:"pieselected",method:"select"},{type:"pieUnSelect",event:"pieunselected",method:"unSelect"}]),Pu(oP("pie")),ku(x(hP,"pie")),Tu(cP("pie")),pD.extend({type:"series.scatter",dependencies:["grid","polar","geo","singleAxis","calendar"],getInitialData:function(){return yh(this.getSource(),this,{useEncodeDefaulter:!0})},brushSelector:"point",getProgressive:function(){var t=this.option.progressive;return null==t?this.option.large?5e3:this.get("progressive"):t},getProgressiveThreshold:function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?1e4:this.get("progressiveThreshold"):t},defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},clip:!0}});var dP=4,fP=yo({shape:{points:null},symbolProxy:null,softClipShape:null,buildPath:function(t,e){var i=e.points,n=e.size,a=this.symbolProxy,o=a.shape,r=t.getContext?t.getContext():t,s=r&&n[0]<dP;if(!s)for(var l=0;l<i.length;){var u=i[l++],h=i[l++];isNaN(u)||isNaN(h)||(!this.softClipShape||this.softClipShape.contain(u,h))&&(o.x=u-n[0]/2,o.y=h-n[1]/2,o.width=n[0],o.height=n[1],a.buildPath(t,o,!0))}},afterBrush:function(t){var e=this.shape,i=e.points,n=e.size,a=n[0]<dP;if(a){this.setTransform(t);for(var o=0;o<i.length;){var r=i[o++],s=i[o++];isNaN(r)||isNaN(s)||(!this.softClipShape||this.softClipShape.contain(r,s))&&t.fillRect(r-n[0]/2,s-n[1]/2,n[0],n[1])}this.restoreTransform(t)}},findDataIndex:function(t,e){for(var i=this.shape,n=i.points,a=i.size,o=Math.max(a[0],4),r=Math.max(a[1],4),s=n.length/2-1;s>=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}}),pP=af.prototype;pP.isPersistent=function(){return!this._incremental},pP.updateData=function(t,e){this.group.removeAll();var i=new fP({rectHover:!0,cursor:"default"});i.setShape({points:t.getLayout("symbolPoints")}),this._setCommon(i,t,!1,e),this.group.add(i),this._incremental=null},pP.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)})}},pP.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clearIncremental(),t.count()>2e6?(this._incremental||(this._incremental=new vo({silent:!0})),this.group.add(this._incremental)):this._incremental=null},pP.incrementalUpdate=function(t,e,i){var n;this._incremental?(n=new fP,this._incremental.addDisplayable(n,!0)):(n=new fP({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)},pP._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=tc(e.getVisual("symbol"),0,0,0,0),t.setColor=t.symbolProxy.setColor;var r=t.shape.size[0]<dP;t.useStyle(a.getModel("itemStyle").getItemStyle(r?["color","shadowBlur","shadowColor"]:["color"]));var s=e.getVisual("color");s&&t.setColor(s),i||(t.seriesIndex=a.seriesIndex,t.on("mousemove",function(e){t.dataIndex=null;var i=t.findDataIndex(e.offsetX,e.offsetY);i>=0&&(t.dataIndex=i+(t.startIndex||0))}))},pP.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},pP._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()},Bu({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=Kk().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 af:new Dd,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(){}}),Pu(qk("scatter","circle")),ku(Kk("scatter")),pD.extend({type:"series.effectScatter",dependencies:["grid","polar"],getInitialData:function(){return yh(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 gP=3,mP=sf.prototype;mP.stopEffectAnimation=function(){this.childAt(1).removeAll()},mP.startEffectAnimation=function(t){for(var e=t.symbolType,i=t.color,n=this.childAt(1),a=0;gP>a;a++){var o=tc(e,-1,-1,2,2,i);o.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scale:[.5,.5]});var r=-a/gP*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)}rf(n,t)},mP.updateEffectAnimation=function(t){for(var e=this._effectCfg,i=this.childAt(1),n=["symbolType","period","rippleScale"],a=0;a<n.length;a++){var o=n[a];if(e[o]!==t[o])return this.stopEffectAnimation(),void this.startEffectAnimation(t)}rf(i,t)},mP.highlight=function(){this.trigger("emphasis")},mP.downplay=function(){this.trigger("normal")},mP.updateData=function(t,e){var i=t.hostModel;this.childAt(0).updateData(t,e);var n=this.childAt(1),a=t.getItemModel(e),o=t.getItemVisual(e,"symbol"),r=of(t.getItemVisual(e,"symbolSize")),s=t.getItemVisual(e,"color");n.attr("scale",r),n.traverse(function(t){t.attr({fill:s})});var l=a.getShallow("symbolOffset");if(l){var u=n.position;u[0]=Mr(l[0],r[0]),u[1]=Mr(l[1],r[1])}n.rotation=(a.getShallow("symbolRotate")||0)*Math.PI/180||0;var h={};if(h.showEffectOn=i.get("showEffectOn"),h.rippleScale=a.get("rippleEffect.scale"),h.brushType=a.get("rippleEffect.brushType"),h.period=1e3*a.get("rippleEffect.period"),h.effectOffset=e/t.count(),h.z=a.getShallow("z")||0,h.zlevel=a.getShallow("zlevel")||0,h.symbolType=o,h.color=s,h.rippleEffectColor=a.get("rippleEffect.color"),this.off("mouseover").off("mouseout").off("emphasis").off("normal"),"render"===h.showEffectOn)this._effectCfg?this.updateEffectAnimation(h):this.startEffectAnimation(h),this._effectCfg=h;else{this._effectCfg=null,this.stopEffectAnimation();var c=this.childAt(0),d=function(){c.highlight(),"render"!==h.showEffectOn&&this.startEffectAnimation(h)},f=function(){c.downplay(),"render"!==h.showEffectOn&&this.stopEffectAnimation()};this.on("mouseover",d,this).on("mouseout",f,this).on("emphasis",d,this).on("normal",f,this)}this._effectCfg=h},mP.fadeOut=function(t){this.off("mouseover").off("mouseout").off("emphasis").off("normal"),t&&t()},h(sf,aM),Bu({type:"effectScatter",init:function(){this._symbolDraw=new Dd(sf)},render:function(t){var e=t.getData(),i=this._symbolDraw;i.updateData(e),this.group.add(i.group)},updateTransform:function(t){var e=t.getData();this.group.dirty();var i=Kk().reset(t);i.progress&&i.progress({start:0,end:e.count()},e),this._symbolDraw.updateLayout(e)},_updateGroupTransform:function(t){var e=t.coordinateSystem;e&&e.getRoamTransform&&(this.group.transform=Fe(e.getRoamTransform()),this.group.decomposeTransform())},remove:function(t,e){this._symbolDraw&&this._symbolDraw.remove(e)},dispose:function(){}}),Pu(qk("effectScatter","circle")),ku(Kk("effectScatter"));var vP={_baseAxisDim:null,getInitialData:function(t,e){var i,n,a=e.getComponent("xAxis",this.get("xAxisIndex")),o=e.getComponent("yAxis",this.get("yAxisIndex")),r=a.get("type"),s=o.get("type");"category"===r?(t.layout="horizontal",i=a.getOrdinalMeta(),n=!0):"category"===s?(t.layout="vertical",i=o.getOrdinalMeta(),n=!0):t.layout=t.layout||"horizontal";var l=["x","y"],u="horizontal"===t.layout?0:1,h=this._baseAxisDim=l[u],c=l[1-u],d=[a,o],p=d[u].get("type"),g=d[1-u].get("type"),m=t.data;if(m&&n){var v=[];f(m,function(t,e){var i;t.value&&_(t.value)?(i=t.value.slice(),t.value.unshift(e)):_(t)?(i=t.slice(),t.unshift(e)):i=t,v.push(i)}),t.data=v}var y=this.defaultValueDimensions,w=[{name:h,type:Yu(p),ordinalMeta:i,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:c,type:Yu(g),dimsDef:y.slice()}];return tP(this,{coordDimensions:w,dimensionsCount:y.length+1,encodeDefaulter:x(ms,w,this)})},getBaseAxis:function(){var t=this._baseAxisDim;return this.ecModel.getComponent(t+"Axis",this.get(t+"AxisIndex")).axis}},yP=pD.extend({type:"series.candlestick",dependencies:["xAxis","yAxis","grid"],defaultValueDimensions:[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],dimensions:null,defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,layout:null,clip:!0,itemStyle:{color:"#c23531",color0:"#314656",borderWidth:1,borderColor:"#c23531",borderColor0:"#314656"},emphasis:{itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationUpdate:!1,animationEasing:"linear",animationDuration:300},getShadowDim:function(){return"open"},brushSelector:function(t,e,i){var n=e.getItemLayout(t);return n&&i.rect(n.brushRect)}});c(yP,vP,!0);var xP=["itemStyle"],_P=["emphasis","itemStyle"],wP=["color","color0","borderColor","borderColor0"],bP=(gl.extend({type:"candlestick",render:function(t){this.group.removeClipPath(),this._updateDrawMode(t),this._isLargeDraw?this._renderLarge(t):this._renderNormal(t)},incrementalPrepareRender:function(t){this._clear(),this._updateDrawMode(t)},incrementalRender:function(t,e){this._isLargeDraw?this._incrementalRenderLarge(t,e):this._incrementalRenderNormal(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=t.getData(),i=this._data,n=this.group,a=e.getLayout("isSimpleBox"),o=t.get("clip",!0),r=t.coordinateSystem,s=r.getArea&&r.getArea();this._data||n.removeAll(),e.diff(i).add(function(i){if(e.hasValue(i)){var r,l=e.getItemLayout(i);if(o&&uf(s,l))return;r=lf(l,i,!0),ar(r,{shape:{points:l.ends}},t,i),hf(r,e,i,a),n.add(r),e.setItemGraphicEl(i,r)}}).update(function(r,l){var u=i.getItemGraphicEl(l);if(!e.hasValue(r))return void n.remove(u);var h=e.getItemLayout(r);return o&&uf(s,h)?void n.remove(u):(u?nr(u,{shape:{points:h.ends}},t,r):u=lf(h,r),hf(u,e,r,a),n.add(u),void e.setItemGraphicEl(r,u))}).remove(function(t){var e=i.getItemGraphicEl(t);e&&n.remove(e)}).execute(),this._data=e},_renderLarge:function(t){this._clear(),df(t,this.group);var e=t.get("clip",!0)?Gc(t.coordinateSystem,!1,t):null;e?this.group.setClipPath(e):this.group.removeClipPath()},_incrementalRenderNormal:function(t,e){for(var i,n=e.getData(),a=n.getLayout("isSimpleBox");null!=(i=t.next());){var o,r=n.getItemLayout(i);o=lf(r,i),hf(o,n,i,a),o.incremental=!0,this.group.add(o)}},_incrementalRenderLarge:function(t,e){df(e,this.group,!0)},remove:function(){this._clear()},_clear:function(){this.group.removeAll(),this._data=null},dispose:G}),no.extend({type:"normalCandlestickBox",shape:{},buildPath:function(t,e){var i=e.points;this.__simpleBox?(t.moveTo(i[4][0],i[4][1]),t.lineTo(i[6][0],i[6][1])):(t.moveTo(i[0][0],i[0][1]),t.lineTo(i[1][0],i[1][1]),t.lineTo(i[2][0],i[2][1]),t.lineTo(i[3][0],i[3][1]),t.closePath(),t.moveTo(i[4][0],i[4][1]),t.lineTo(i[5][0],i[5][1]),t.moveTo(i[6][0],i[6][1]),t.lineTo(i[7][0],i[7][1]))}})),SP=no.extend({type:"largeCandlestickBox",shape:{},buildPath:function(t,e){for(var i=e.points,n=0;n<i.length;)if(this.__sign===i[n++]){var a=i[n++];t.moveTo(a,i[n++]),t.lineTo(a,i[n++])}else n+=3}}),MP=function(t){t&&_(t.series)&&f(t.series,function(t){S(t)&&"k"===t.type&&(t.type="candlestick")})},IP=["itemStyle","borderColor"],TP=["itemStyle","borderColor0"],AP=["itemStyle","color"],DP=["itemStyle","color0"],CP={seriesType:"candlestick",plan:vD(),performRawSeries:!0,reset:function(t,e){function i(t,e){for(var i;null!=(i=t.next());){var o=e.getItemModel(i),r=e.getItemLayout(i).sign;e.setItemVisual(i,{color:n(r,o),borderColor:a(r,o)})}}function n(t,e){return e.get(t>0?AP:DP)}function a(t,e){return e.get(t>0?IP:TP)}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}}}},LP="undefined"!=typeof Float32Array?Float32Array:Array,kP={seriesType:"candlestick",plan:vD(),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]=QT(n[r]+o/2,1,!1),a[r]=QT(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]=QT(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:pf(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 LP(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++]=pf(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=gf(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}}};Iu(MP),Pu(CP),ku(kP),h(mf,UL),vf.prototype.getIndicatorAxes=function(){return this._indicatorAxes},vf.prototype.dataToPoint=function(t,e){var i=this._indicatorAxes[e];return this.coordToPoint(i.dataToCoord(t),e)},vf.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]},vf.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;l<this._indicatorAxes.length;l++){var u=this._indicatorAxes[l],h=Math.abs(o-u.angle);r>h&&(a=u,s=l,r=h)}return[s,+(a&&a.coordToData(n))]},vf.prototype.resize=function(t,e){var i=t.get("center"),n=e.getWidth(),a=e.getHeight(),o=Math.min(n,a)/2;this.cx=Mr(i[0],n),this.cy=Mr(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=Mr(r[0],o),this.r=Mr(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)},vf.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=Wh(t.scale,t.model);Zh(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(u<i[1]&&isFinite(u)&&isFinite(i[1]))}else if(null!=s){var h;do h=s-l*a,o.setExtent(h,+s),o.setInterval(l),l=e(l);while(h>i[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=Ir(u-l*a);o.setExtent(h,u),o.setInterval(l)}})},vf.dimensions=[],vf.create=function(t,e){var i=[];return t.eachComponent("radar",function(n){var a=new vf(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},Cs.register("radar",vf);var PP=QL.valueAxis,OP=(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 mr(p,null,this.ecModel),kL);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"}},PP.axisLine),axisLabel:yf(PP.axisLabel,!1),axisTick:yf(PP.axisTick,!1),axisType:"interval",splitLine:yf(PP.splitLine,!0),splitArea:yf(PP.splitArea,!0),indicator:[]}}),["axisLine","axisTickLabel","axisName"]);zu({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 _k(t.model,{position:[e.cx,e.cy],rotation:t.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return i});f(n,function(t){f(OP,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<y.length;b++){if(h){var S=e(m,d,b);m[S].push(new _T({shape:{cx:x,cy:w,r:y[b].coord}}))}if(c&&b<y.length-1){var S=e(v,g,b);v[S].push(new MT({shape:{cx:x,cy:w,r0:y[b].coord,r:y[b+1].coord}}))}}else for(var M,I=p(n,function(t,e){var n=t.getTicksCoords();return M=null==M?n.length-1:Math.min(n.length-1,M),p(n,function(t){return i.coordToPoint(t.coord,e)})}),T=[],b=0;M>=b;b++){for(var A=[],D=0;D<n.length;D++)A.push(I[D][b]);if(A[0]&&A.push(A[0].slice()),h){var S=e(m,d,b);m[S].push(new DT({shape:{points:A}}))}if(c&&T){var S=e(v,g,b-1);v[S].push(new AT({shape:{points:A.concat(T)}}))}T=A.slice().reverse()}var C=l.getLineStyle(),L=u.getAreaStyle();f(v,function(t,e){this.group.add(JT(t,{style:s({stroke:"none",fill:g[e%g.length]},L),silent:!0}))},this),f(m,function(t,e){this.group.add(JT(t,{style:s({fill:"none",stroke:d[e%d.length]},C),silent:!0}))},this)}}});var NP=pD.extend({type:"series.radar",dependencies:["radar"],init:function(){NP.superApply(this,"init",arguments),this.legendVisualProvider=new qd(y(this.getData,this),y(this.getRawData,this))},getInitialData:function(){return tP(this,{generateCoord:"indicator_",generateCoordCount:1/0})},formatTooltip:function(t){var e=this.getData(),i=this.coordinateSystem,n=i.getIndicatorAxes(),a=this.getData().getName(t);return Wr(""===a?this.name:a)+"<br/>"+p(n,function(i){var n=e.get(e.mapDimension(i.dim),t);return Wr(i.name+" : "+n)}).join("<br />")},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}});Bu({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=xf(t.getItemVisual(e,"symbolSize")),o=tc(i,-1,-1,2,2,n);return o.attr({style:{strokeNoScale:!0},z2:100,scale:[a[0]/2,a[1]/2]}),o}}function i(i,n,a,o,r,s){a.removeAll();for(var l=0;l<n.length-1;l++){var u=e(o,r);u&&(u.__dimIdx=l,i[l]?(u.attr("position",i[l]),iA[s?"initProps":"updateProps"](u,{position:n[l]},t,r)):u.attr("position",n[l]),a.add(u))}}function a(t){return p(t,function(){return[o.cx,o.cy]})}var o=t.coordinateSystem,r=this.group,l=t.getData(),u=this._data;l.diff(u).add(function(e){var n=l.getItemLayout(e);if(n){var o=new AT,r=new DT,s={shape:{points:n}};o.shape.points=a(n),r.shape.points=a(n),ar(o,s,t,e),ar(r,s,t,e);var u=new aM,h=new aM;u.add(r),u.add(o),u.add(h),i(r.shape.points,n,h,l,e,!0),l.setItemGraphicEl(e,u)}}).update(function(e,n){var a=u.getItemGraphicEl(n),o=a.childAt(0),r=a.childAt(1),s=a.childAt(2),h={shape:{points:l.getItemLayout(e)}};h.shape.points&&(i(o.shape.points,h.shape.points,s,l,e,!1),nr(o,h,t),nr(r,h,t),l.setItemGraphicEl(e,a))}).remove(function(t){r.remove(u.getItemGraphicEl(t))}).execute(),l.eachItemGraphicEl(function(t,e){var i=l.getItemModel(e),a=t.childAt(0),o=t.childAt(1),u=t.childAt(2),h=l.getItemVisual(e,"color");r.add(t),a.useStyle(s(i.getModel("lineStyle").getLineStyle(),{fill:"none",stroke:h})),a.hoverStyle=i.getModel("emphasis.lineStyle").getLineStyle();var c=i.getModel("areaStyle"),d=i.getModel("emphasis.areaStyle"),f=c.isEmpty()&&c.parentModel.isEmpty(),p=d.isEmpty()&&d.parentModel.isEmpty();p=p&&f,o.ignore=f,o.useStyle(s(c.getAreaStyle(),{fill:h,opacity:.7})),o.hoverStyle=d.getAreaStyle();var g=i.getModel("itemStyle").getItemStyle(["color"]),m=i.getModel("emphasis.itemStyle").getItemStyle(),v=i.getModel("label"),y=i.getModel("emphasis.label");u.eachChild(function(t){t.setStyle(g),t.hoverStyle=n(m);var i=l.get(l.dimensions[t.__dimIdx],e);(null==i||isNaN(i))&&(i=""),Xo(t.style,t.hoverStyle,v,y,{labelFetcher:l.hostModel,labelDataIndex:e,labelDimIndex:t.__dimIdx,defaultText:i,autoColor:h,isRectText:!0})}),t.highDownOnUpdate=function(t,e){o.attr("ignore","emphasis"===e?p:f)},Fo(t)}),this._data=l},remove:function(){this.group.removeAll(),this._data=null},dispose:function(){}});var EP=function(t){t.eachSeriesByType("radar",function(t){var e=t.getData(),i=[],n=t.coordinateSystem;if(n){var a=n.getIndicatorAxes();f(a,function(t,o){e.each(e.mapDimension(a[o].dim),function(t,e){i[e]=i[e]||[];var a=n.dataToPoint(t,o);i[e][o]=_f(a)?a:wf(n)})}),e.each(function(t){var a=v(i[t],function(t){return _f(t)})||wf(n);i[t].push(a.slice()),e.setItemLayout(t,i[t])})}})},zP=function(t){var e=t.polar;if(e){_(e)||(e=[e]);var i=[];f(e,function(e){e.indicator?(e.type&&!e.shape&&(e.shape=e.type),t.radar=t.radar||[],_(t.radar)||(t.radar=[t.radar]),t.radar.push(e)):i.push(e)}),t.polar=i}f(t.series,function(t){t&&"radar"===t.type&&t.polarIndex&&(t.radarIndex=t.polarIndex)})};Pu(oP("radar")),Pu(qk("radar","circle")),ku(EP),Tu(cP("radar")),Iu(zP),pD.extend({type:"series.heatmap",getInitialData:function(){return yh(this.getSource(),this,{generateCoord:"value"})},preventIncremental:function(){var t=Cs.get(this.get("coordinateSystem"));return t&&t.dimensions?"lng"===t.dimensions[0]&&"lat"===t.dimensions[1]:void 0},defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0}});var RP=256;bf.prototype={update:function(t,e,i,n,a,o){var r=this._getBrush(),s=this._getGradient(t,a,"inRange"),l=this._getGradient(t,a,"outOfRange"),u=this.pointSize+this.blurSize,h=this.canvas,c=h.getContext("2d"),d=t.length;h.width=e,h.height=i;for(var f=0;d>f;++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*(RP-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=eS()),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}},Bu({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()):If(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 kT({shape:{x:Math.floor(I[0]-o/2),y:Math.floor(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 kT({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]),Xo(v,y,x,_,{labelFetcher:t,labelDataIndex:S,defaultText:D,isRectText:!0}),M.setStyle(v),Fo(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 bf;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?Mf(y,i.option.range):Sf(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 Dn({style:{width:p,height:g,x:h,y:c,image:s.canvas},silent:!0});this.group.add(_)},dispose:function(){}});var BP=f,VP="\x00__link_datas",GP="\x00__link_mainData",FP=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};FP.prototype={constructor:FP,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&&r<o.length;r++)o[r].eachNode(t,e,i);"postorder"===a&&e.call(i,this)},updateDepthAndHeight:function(t){var e=0;this.depth=t;for(var i=0;i<this.children.length;i++){var n=this.children[i];n.updateDepthAndHeight(t+1),n.height>e&&(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,i=this.hostTree,n=i.data.getItemModel(this.dataIndex),a=this.getLevelModel();return a||0!==this.children.length&&(0===this.children.length||this.isExpand!==!1)||(e=this.getLeavesModel()),n.getModel(t,(a||e||i.hostModel).getModel(t))}},getLevelModel:function(){return(this.hostTree.levelModels||[])[this.depth]},getLeavesModel:function(){return this.hostTree.leavesModel},setVisual:function(t,e){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,t,e)},getVisual:function(t,e){return this.hostTree.data.getItemVisual(this.dataIndex,t,e)},getRawIndex:function(){return this.hostTree.data.getRawIndex(this.dataIndex)},getId:function(){return this.hostTree.data.getId(this.dataIndex)},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)}},Nf.prototype={constructor:Nf,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()}},Nf.createTree=function(t,e,i,n){function a(t,e){var i=t.value;s=Math.max(s,_(i)?i.length:1),r.push(t);var n=new FP(t.name,o);e?Ef(n,e):o.root=n,o._nodes.push(n);var l=t.children;if(l)for(var u=0;u<l.length;u++)a(l[u],n)}var o=new Nf(e,i.levels,i.leaves),r=[],s=1;a(t),o.root.updateDepthAndHeight(0);var l=tL(r,{coordDimensions:["value"],dimensionsCount:s}),u=new $C(l,e);return u.initData(r),Tf({mainData:u,struct:o,structAttr:"tree"}),o.update(),n&&n(u),o},pD.extend({type:"series.tree",layoutInfo:null,layoutMode:"box",getInitialData:function(t){function e(t){t.wrapMethod("getItemModel",function(t,e){var i=o.getNodeByDataIndex(e),n=i.getLeavesModel();return i.children.length&&i.isExpand||(t.parentModel=n),t})}var i={name:t.name,children:t.data},n=t.leaves||{},a={};a.leaves=n;var o=Nf.createTree(i,this,a,e),r=0;o.eachNode("preorder",function(t){t.depth>r&&(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 Wr(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 WP=oe;c(qf,CS),Kf.prototype={constructor:Kf,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(),Ee(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?WP(i,t,n):W(i,t)},pointToData:function(t){var e=this.invTransform;return e?WP([],t,e):[t[0],t[1]]},convertToPixel:x($f,"dataToPoint"),convertFromPixel:x($f,"pointToData"),containPoint:function(t){return this.getViewRectAfterRoam().contain(t[0],t[1])}},c(Kf,CS);var HP="\x00_ec_interaction_mutex";Du({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},function(){}),c(ap,dS);var ZP={axisPointer:1,tooltip:1,brush:1},XP=yo({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=Mr(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])}}});Bu({type:"tree",init:function(t,e){this._oldTree,this._mainGroup=new aM,this._controller=new ap(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){pp(n,e)&&mp(n,e,null,o,t,l)}).update(function(e,i){var a=s.getItemGraphicEl(i);return pp(n,e)?void mp(n,e,a,o,t,l):void(a&&yp(s,i,a,o,t,l))}).remove(function(e){var i=s.getItemGraphicEl(e);i&&yp(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=[];Ba(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 Kf;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)&&!fp(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){Jf(a,e.dx,e.dy),i.dispatchAction({seriesId:t.id,type:"treeRoam",dx:e.dx,dy:e.dy})},this).on("zoom",function(e){Qf(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}}),Du({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})}),Du({type:"treeRoam",event:"treeRoam",update:"none"},function(t,e){e.eachComponent({mainType:"series",subType:"tree",query:t},function(e){var i=e.coordinateSystem,n=_p(i,t);e.setCenter&&e.setCenter(n.center),e.setZoom&&e.setZoom(n.zoom)})});var UP=function(t,e){t.eachSeriesByType("tree",function(t){Sp(t,e)})};Pu(qk("tree","circle")),ku(UP),pD.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){var i={name:t.name,children:t.data};Dp(i);var n=t.levels||[];n=t.levels=Cp(n,e);var a={};return a.levels=n,Nf.createTree(i,this,a).data},optionUpdated:function(){this.resetViewRoot()},formatTooltip:function(t){var e=this.getData(),i=this.getRawValue(t),n=Gr(_(i)?i[0]:i),a=e.getName(t);return Wr(a+": "+n)},getDataParams:function(t){var e=pD.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(t);return e.treePathInfo=Ap(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 YP=8,jP=8,qP=5;Lp.prototype={constructor:Lp,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),ts(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*YP,e.emptyItemWidth);e.totalWidth+=r+jP,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=Jr(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 AT({shape:{points:kp(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),Pp(v,t,p),o+=g+jP}},remove:function(){this.group.removeAll()}};var KP=y,$P=aM,JP=kT,QP=f,tO=3,eO=["label"],iO=["emphasis","label"],nO=["upperLabel"],aO=["emphasis","upperLabel"],oO=10,rO=1,sO=2,lO=dI([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),uO=function(t){var e=lO(t);return e.stroke=e.fill=e.lineWidth=null,e};Bu({type:"treemap",init:function(){this._containerGroup,this._storage=Np(),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=Mp(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 $P,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,QP(t,function(t,e){!t.isRemoved()&&s(e,e)})):new Hu(e,t,r,r).add(s).update(s).remove(x(s,null)).execute()}function a(t){var e=Np();return t&&QP(t,function(t,i){var n=e[i];QP(t,function(t){t&&(n.push(t),t.__tmWillDelete=1)})}),e}function o(){QP(f,function(t){QP(t,function(t){t.parent&&t.parent.remove(t)})}),QP(c,function(t){t.invisible=!0,t.dirty()})}var r=e.getData().tree,s=this._oldTree,l=Np(),u=Np(),h=this._storage,c=[],d=x(Ep,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=Op();QP(e.willDeleteEls,function(t,e){QP(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)}})}),QP(this._storage,function(t,i){QP(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(KP(function(){this._state="ready",e.renderFinally()},this)).start()}},_resetController:function(t){var e=this._controller;e||(e=this._controller=new ap(t.getZr()),e.enable(this.seriesModel.get("roam")),e.on("pan",KP(this._onPan,this)),e.on("zoom",KP(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)>tO||Math.abs(t.dy)>tO)){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();Re(s,s,[-e,-i]),Ve(s,s,[t.scale,t.scale]),Re(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&&window.open(o,r)}}}}},this)},_renderBreadcrumb:function(t,e,i){function n(e){"animating"!==this._state&&(Tp(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 Lp(this.group))).render(t,e,i.node,KP(n,this))},remove:function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=Np(),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 hO=function(){},cO=["treemapZoomToNode","treemapRender","treemapMove"],dO=0;dO<cO.length;dO++)Du({type:cO[dO],update:"updateView"},hO);Du({type:"treemapRootToNode",update:"updateView"},function(t,e){function i(e){var i=["treemapZoomToNode","treemapRootToNode"],n=Mp(t,i,e);if(n){var a=e.getViewRoot();a&&(t.direction=Tp(a,n.node)?"rollUp":"drillDown"),e.resetViewRoot(n.node)}}e.eachComponent({mainType:"series",subType:"treemap",query:t},i)});var fO=f,pO=S,gO=-1,mO=function(t){var e=t.mappingMethod,i=t.type,a=this.option=n(t);this.type=i,this.mappingMethod=e,this._normalizeData=yO[e];var o=vO[i];this.applyVisual=o.applyVisual,this.getColorMapper=o.getColorMapper,this._doMap=o._doMap[e],"piecewise"===e?(Vp(a),Rp(a)):"category"===e?a.categories?Bp(a):Vp(a,!0):(O("linear"!==e||a.dataExtent),Vp(a))};mO.prototype={constructor:mO,mapValueToVisual:function(t){var e=this._normalizeData(t);return this._doMap(e,t)},getNormalizer:function(){return y(this._normalizeData,this)}};var vO=mO.visualHandlers={color:{applyVisual:Wp("color"),getColorMapper:function(){var t=this.option;return y("category"===t.mappingMethod?function(t,e){return!e&&(t=this._normalizeData(t)),Hp.call(this,t)}:function(e,i,n){var a=!!n;return!i&&(e=this._normalizeData(e)),n=oi(e,t.parsedVisual,n),a?n:ui(n,"rgba")},this)},_doMap:{linear:function(t){return ui(oi(t,this.option.parsedVisual),"rgba")},category:Hp,piecewise:function(t,e){var i=Up.call(this,e);return null==i&&(i=ui(oi(t,this.option.parsedVisual),"rgba")),i},fixed:Zp}},colorHue:Gp(function(t,e){return si(t,e)}),colorSaturation:Gp(function(t,e){return si(t,null,e)}),colorLightness:Gp(function(t,e){return si(t,null,null,e)}),colorAlpha:Gp(function(t,e){return li(t,e)}),opacity:{applyVisual:Wp("opacity"),_doMap:Xp([0,1])},liftZ:{applyVisual:Wp("liftZ"),_doMap:{linear:Zp,category:Zp,piecewise:Zp,fixed:Zp}},symbol:{applyVisual:function(t,e,i){var n=this.mapValueToVisual(t);if(b(n))i("symbol",n);else if(pO(n))for(var a in n)n.hasOwnProperty(a)&&i(a,n[a])},_doMap:{linear:Fp,category:Hp,piecewise:function(t,e){var i=Up.call(this,e);return null==i&&(i=Fp.call(this,t)),i},fixed:Zp}},symbolSize:{applyVisual:Wp("symbolSize"),_doMap:Xp([0,1])}},yO={linear:function(t){return Sr(t,this.option.dataExtent,[0,1],!0)},piecewise:function(t){var e=this.option.pieceList,i=mO.findPieceIndex(t,e,!0);return null!=i?Sr(i,[0,e.length-1],[0,1],!0):void 0},category:function(t){var e=this.option.categories?this.option.categoryMap[t]:t;return null==e?gO:e},fixed:G};mO.listVisualTypes=function(){var t=[];return f(vO,function(e,i){t.push(i)}),t},mO.addVisualHandler=function(t,e){vO[t]=e},mO.isValidType=function(t){return vO.hasOwnProperty(t)},mO.eachVisual=function(t,e,i){S(t)?f(t,e,i):e.call(i,t)},mO.mapVisual=function(t,e,i){var n,a=_(t)?[]:S(t)?{}:(n=!0,null);return mO.eachVisual(t,function(t,o){var r=e.call(i,t,o);n?a=r:a[o]=r}),a},mO.retrieveVisuals=function(t){var e,i={};return t&&fO(vO,function(n,a){t.hasOwnProperty(a)&&(i[a]=t[a],e=!0)}),e?i:null},mO.prepareVisualTypes=function(t){if(pO(t)){var e=[];fO(t,function(t,i){e.push(i)}),t=e}else{if(!_(t))return[];t=t.slice()}return t.sort(function(t,e){return"color"===e&&"color"!==t&&0===t.indexOf("color")?1:-1}),t},mO.dependsOn=function(t,e){return"color"===e?!(!t||0!==t.indexOf(e)):t===e},mO.findPieceIndex=function(t,e,i){function n(e,i){var n=Math.abs(e-t);o>n&&(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(jp(c[1],t,h[1]))return r}else if(1/0===h[1]){if(jp(c[0],h[0],t))return r}else if(jp(c[0],h[0],t)&&jp(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 xO=_,_O="itemStyle",wO={seriesType:"treemap",reset:function(t){var e=t.getData().tree,i=e.root,n=t.getModel(_O);if(!i.isRemoved()){var a=p(e.levelModels,function(t){return t?t.get(_O):null});qp(i,{},a,n,t.getViewRoot().getAncestors(),t)}}},bO=Math.max,SO=Math.min,MO=D,IO=f,TO=["itemStyle","borderWidth"],AO=["itemStyle","gapWidth"],DO=["upperLabel","show"],CO=["upperLabel","height"],LO={seriesType:"treemap",reset:function(t,e,i,n){var a=i.getWidth(),o=i.getHeight(),s=t.option,l=Qr(t.getBoxLayoutParams(),{width:i.getWidth(),height:i.getHeight()}),u=s.size||[],h=Mr(MO(l.width,u[0]),a),c=Mr(MO(l.height,u[1]),o),d=n&&n.type,f=["treemapZoomToNode","treemapRootToNode"],p=Mp(n,f,t),g="treemapRender"===d||"treemapMove"===d?n.rootRect:null,m=t.getViewRoot(),v=Ip(m);if("treemapMove"!==d){var y="treemapZoomToNode"===d?hg(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),ng(m,_,!1,0);var w=m.getLayout();IO(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(cg(l,g,p),!0),t.setLayoutInfo(l),dg(b,new Ti(-l.x,-l.y,a,o),v,m,0)}};Pu(wO),ku(LO),pD.extend({type:"series.sunburst",_viewRoot:null,getInitialData:function(t){var e={name:t.name,children:t.data};pg(e);var i=t.levels||[],n={};return n.levels=i,Nf.createTree(e,this,n).data},optionUpdated:function(){this.resetViewRoot()},getDataParams:function(t){var e=pD.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(t);return e.treePathInfo=Ap(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,emphasis:{}},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1,emphasis:{},highlight:{opacity:1},downplay:{opacity:.9}},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 kO={NONE:"none",DESCENDANT:"descendant",ANCESTOR:"ancestor",SELF:"self"},PO=2,OO=4,NO=gg.prototype;NO.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=mg(e,n,o);xg(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,nr(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?(nr(l,{shape:c},n),l.useStyle(f)):nr(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},NO.onEmphasis=function(t){var e=this;this.node.hostTree.root.eachNode(function(i){i.piece&&(e.node===i?i.piece.updateData(!1,i,"emphasis"):yg(i,e.node,t)?i.piece.childAt(0).trigger("highlight"):t!==kO.NONE&&i.piece.childAt(0).trigger("downplay"))})},NO.onNormal=function(){this.node.hostTree.root.eachNode(function(t){t.piece&&t.piece.updateData(!1,t,"normal")})},NO.onHighlight=function(){this.updateData(!1,this.node,"highlight")},NO.onDownplay=function(){this.updateData(!1,this.node,"downplay")},NO._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=D(t.getFormattedLabel(this.node.dataIndex,i,null,null,"label"),this.node.name);n("show")===!1&&(l="");var u=this.node.getLayout(),h=r.get("minAngle");null==h&&(h=o.get("minAngle")),h=h/180*Math.PI;var c=u.endAngle-u.startAngle;null!=h&&Math.abs(c)<h&&(l="");var d=this.childAt(1);Xo(d.style,d.hoverStyle||{},o,s,{defaultText:r.getShallow("show")?l:null,autoColor:e,useInsideStyle:!0});var f,p=(u.startAngle+u.endAngle)/2,g=Math.cos(p),m=Math.sin(p),v=n("position"),y=n("distance")||0,x=n("align");"outside"===v?(f=u.r+y,x=p>Math.PI/2?"right":"left"):x&&"center"!==x?"left"===x?(f=u.r0+y,p>Math.PI/2&&(x="right")):"right"===x&&(f=u.r-y,p>Math.PI/2&&(x="left")):(f=(u.r+u.r0)/2,x="center"),d.attr("style",{text:l,textAlign:x,textVerticalAlign:n("verticalAlign")||"middle",opacity:n("opacity")});var _=f*g+u.cx,w=f*m+u.cy;d.attr("position",[_,w]);var b=n("rotate"),S=0;"radial"===b?(S=-p,S<-Math.PI/2&&(S+=Math.PI)):"tangential"===b?(S=Math.PI/2-p,S>Math.PI/2?S-=Math.PI:S<-Math.PI/2&&(S+=Math.PI)):"number"==typeof b&&(S=b*Math.PI/180),d.attr("rotation",S)},NO._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(gg,aM);var EO="sunburstRootToNode",zO=(gl.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 Hu(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 gg(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 gg(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";window.open(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:EO,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");Du({type:zO,update:"updateView"},function(t,e){function i(e){var i=Mp(t,[zO],e);if(i){var n=e.getViewRoot();n&&(t.direction=Tp(n,i.node)?"rollUp":"drillDown"),e.resetViewRoot(i.node)}}e.eachComponent({mainType:"series",subType:"sunburst",query:t},i)});var RO="sunburstHighlight";Du({type:RO,update:"updateView"},function(t,e){function i(e){var i=Mp(t,[RO],e);i&&(t.highlight=i.node)}e.eachComponent({mainType:"series",subType:"sunburst",query:t},i)});var BO="sunburstUnhighlight";Du({type:BO,update:"updateView"},function(t,e){function i(){t.unhighlight=!0}e.eachComponent({mainType:"series",subType:"sunburst",query:t},i)});var VO=Math.PI/180,GO=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=Mr(e[0],a),l=Mr(e[1],o),u=Mr(n[0],r/2),h=Mr(n[1],r/2),c=-t.get("startAngle")*VO,d=t.get("minAngle")*VO,p=t.getData().tree.root,g=t.getViewRoot(),m=g.depth,v=t.get("sort");null!=v&&_g(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=Mr(g.get("r0"),r/2)),null!=g.get("r")&&(c=Mr(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)})};Pu(x(oP,"sunburst")),ku(x(GO,"sunburst")),Tu(x(cP,"sunburst"));for(var FO=[126,25],WO=[[[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]]],HO=0;HO<WO.length;HO++)for(var ZO=0;ZO<WO[HO].length;ZO++)WO[HO][ZO][0]/=10.5,WO[HO][ZO][1]/=-14,WO[HO][ZO][0]+=FO[0],WO[HO][ZO][1]+=FO[1];var XO=function(t,e){"china"===t&&e.push(new rc("南海诸岛",p(WO,function(t){return{type:"polygon",exterior:t}}),FO))},UO={"南海诸岛":[32,80],"广东":[0,-10],"香港":[10,5],"澳门":[-10,10],"天津":[5,5]},YO=function(t,e){if("china"===t){var i=UO[e.name];if(i){var n=e.center;n[0]+=i[0]/10.5,n[1]+=-i[1]/14}}},jO={Russia:[100,60],"United States":[-99,38],"United States of America":[-99,38]},qO=function(t,e){if("world"===t){var i=jO[e.name];if(i){var n=e.center;n[0]=i[0],n[1]=i[1]}}},KO=[[[123.45165252685547,25.73527164402261],[123.49731445312499,25.73527164402261],[123.49731445312499,25.750734064600884],[123.45165252685547,25.750734064600884],[123.45165252685547,25.73527164402261]]],$O=function(t,e){"china"===t&&"台湾"===e.name&&e.geometries.push({type:"polygon",exterior:KO[0]})},JO=ha(),QO={load:function(t,e){var i=JO(e).parsed;if(i)return i;var n,a=e.specialAreas||{},o=e.geoJSON;try{n=o?HL(o):[]}catch(r){throw new Error("Invalid geoJson format\n"+r.message)}return XO(t,n),f(n,function(e){var i=e.name;YO(t,e),qO(t,e),$O(t,e);var n=a[i];n&&e.transformTo(n.left,n.top,n.width,n.height)}),JO(e).parsed={regions:n,boundingRect:bg(n)}}},tN=ha(),eN={load:function(t,e){var i=tN(e).originRoot;if(i)return{root:i,boundingRect:tN(e).boundingRect};var n=Sg(e);return tN(e).originRoot=n.root,tN(e).boundingRect=n.boundingRect,n},makeGraphic:function(t,e,i){var n=tN(e),a=n.rootMap||(n.rootMap=B()),o=a.get(i);if(o)return o;var r=n.originRoot,s=n.boundingRect;return n.originRootHostKey?o=Sg(e,s).root:(n.originRootHostKey=i,o=r),a.set(i,o)},removeGraphic:function(t,e,i){var n=tN(e),a=n.rootMap;a&&a.removeKey(i),i===n.originRootHostKey&&(n.originRootHostKey=null)}},iN={geoJSON:QO,svg:eN},nN={load:function(t,e){var i,n=[],a=B(),o=B(),r=Ig(t);
return f(r,function(r){var s=iN[r.type].load(t,r);f(s.regions,function(t){var i=t.name;e&&e.hasOwnProperty(i)&&(t=t.cloneShallow(i=e[i])),n.push(t),a.set(i,t),o.set(i,t.center)});var l=s.boundingRect;l&&(i?i.union(l):i=l.clone())}),{regions:n,regionsMap:a,nameCoordMap:o,boundingRect:i||new Ti(0,0,0,0)}},makeGraphic:Mg("makeGraphic"),removeGraphic:Mg("removeGraphic")},aN=pD.extend({type:"series.map",dependencies:["geo"],layoutMode:"box",needsDrawMap:!1,seriesGroup:[],getInitialData:function(){for(var t=tP(this,{coordDimensions:["value"],encodeDefaulter:x(vs,this)}),e=t.mapDimension("value"),i=B(),n=[],a=[],o=0,r=t.count();r>o;o++){var s=t.getName(o);i.set(s,!0),n.push({name:s,value:t.get(e,o),selected:il(t,o,"selected")})}var l=nN.load(this.getMapType(),this.option.nameMap);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){for(var e=this.getData(),i=Gr(this.getRawValue(t)),n=e.getName(t),a=this.seriesGroup,o=[],r=0;r<a.length;r++){var s=a[r].originalData.indexOfName(n),l=e.mapDimension("value");isNaN(a[r].originalData.get(l,s))||o.push(Wr(a[r].name))}return o.join(", ")+"<br />"+Wr(n+" : "+i)},getTooltipPosition:function(t){if(null!=t){var e=this.getData().getName(t),i=this.coordinateSystem,n=i.getRegion(e);return n&&i.dataToPoint(n.center)}},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},defaultOption:{zlevel:0,z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:.75,showLegendSymbol:!0,dataRangeHoverLink:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{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)"}}}});c(aN,eP),Cg.prototype={constructor:Cg,draw:function(t,e,i,n){var a="geo"===t.mainType,o=t.getData&&t.getData();a&&e.eachComponent({mainType:"series",subType:"map"},function(e){o||e.getHostGeoModel()!==t||(o=e.getData())});var r=t.coordinateSystem;this._updateBackground(r);var s=this._regionsGroup,l=this.group,u=r.getTransformInfo();l.transform=u.roamTransform,l.decomposeTransform(),l.dirty();var h=u.rawScale,c=u.rawPosition;s.removeAll();var d=["itemStyle"],p=["emphasis","itemStyle"],g=["label"],m=["emphasis","label"],v=B();f(r.regions,function(e){var i=v.get(e.name)||v.set(e.name,new aM),n=new RT({segmentIgnoreThreshold:1,shape:{paths:[]}});i.add(n);var r,u=t.getRegionModel(e.name)||t,y=u.getModel(d),x=u.getModel(p),_=Tg(y),w=Tg(x),b=u.getModel(g),S=u.getModel(m);if(o){r=o.indexOfName(e.name);var M=o.getItemVisual(r,"color",!0);M&&(_.fill=M)}var I=function(t){return[t[0]*h[0]+c[0],t[1]*h[1]+c[1]]};f(e.geometries,function(t){if("polygon"===t.type){for(var e=[],i=0;i<t.exterior.length;++i)e.push(I(t.exterior[i]));n.shape.paths.push(new AT({segmentIgnoreThreshold:1,shape:{points:e}}));for(var i=0;i<(t.interiors?t.interiors.length:0);++i){for(var a=t.interiors[i],e=[],o=0;o<a.length;++o)e.push(I(a[o]));n.shape.paths.push(new AT({segmentIgnoreThreshold:1,shape:{points:e}}))}}}),n.setStyle(_),n.style.strokeNoScale=!0,n.culling=!0;var T=b.get("show"),A=S.get("show"),D=o&&isNaN(o.get(o.mapDimension("value"),r)),C=o&&o.getItemLayout(r);if(a||D&&(T||A)||C&&C.showLabel){var L,k=a?e.name:r;(!o||r>=0)&&(L=t);var P=new xT({position:I(e.center.slice()),scale:[1/l.scale[0],1/l.scale[1]],z2:10,silent:!0});Xo(P.style,P.hoverStyle={},b,S,{labelFetcher:L,labelDataIndex:k,defaultText:e.name,useInsideStyle:!1},{textAlign:"center",textVerticalAlign:"middle"}),i.add(P)}if(o)o.setItemGraphicEl(r,i);else{var u=t.getRegionModel(e.name);n.eventData={componentType:"geo",componentIndex:t.componentIndex,geoIndex:t.componentIndex,name:e.name,region:u&&u.option||{}}}var O=i.__regions||(i.__regions=[]);O.push(e),i.highDownSilentOnTouch=!!t.get("selectedMode"),Fo(i,w),s.add(i)}),this._updateController(t,e,i),Ag(this,t,s,i,n),Dg(t,s)},remove:function(){this._regionsGroup.removeAll(),this._backgroundGroup.removeAll(),this._controller.dispose(),this._mapName&&nN.removeGraphic(this._mapName,this.uid),this._mapName=null,this._controllerHost={}},_updateBackground:function(t){var e=t.map;this._mapName!==e&&f(nN.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,Jf(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,Qf(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)&&!fp(e,i,t)})}};var oN="__seriesMapHighDown",rN="__seriesMapCallKey";Bu({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 Cg(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 _T({style:{fill:t.getData().getVisual("color")},shape:{cx:s[0]+9*l,cy:s[1],r:3},silent:!0,z2:8+(l?0:XT+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[oN],w=Math.random();if(!_){_=m[oN]={};var b=x(Lg,!0),S=x(Lg,!1);m.on("mouseover",b).on("mouseout",S).on("emphasis",b).on("normal",S)}m[rN]=w,r(_,{recordVersion:w,circle:u,labelModel:p,hoverLabelModel:g,emphasisText:y,normalText:v}),kg(_,!1)}i.add(u)}}})}}),Du({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=_p(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)})}})}),Pg.prototype={constructor:Pg,type:"geo",dimensions:["lng","lat"],containCoord:function(t){for(var e=this.regions,i=0;i<e.length;i++)if(e[i].contain(t))return!0;return!1},transformTo:function(t,e,i,n){var a=this.getBoundingRect(),o=this._invertLongitute;a=a.clone(),o&&(a.y=-a.y-a.height);var r=this._rawTransformable;if(r.transform=a.calculateTransform(new Ti(t,e,i,n)),r.decomposeTransform(),o){var s=r.scale;s[1]=-s[1]}r.updateTransform(),this._updateTransform()},getRegion:function(t){return this._regionsMap.get(t)},getRegionByCoord:function(t){for(var e=this.regions,i=0;i<e.length;i++)if(e[i].contain(t))return e[i]},addGeoCoord:function(t,e){this._nameCoordMap.set(t,e)},getGeoCoord:function(t){return this._nameCoordMap.get(t)},getBoundingRect:function(){return this._rect},dataToPoint:function(t,e,i){return"string"==typeof t&&(t=this.getGeoCoord(t)),t?Kf.prototype.dataToPoint.call(this,t,e,i):void 0},convertToPixel:x(Og,"dataToPoint"),convertFromPixel:x(Og,"pointToData")},c(Pg,Kf);var sN={dimensions:Pg.prototype.dimensions,create:function(t,e){var i=[];t.eachComponent("geo",function(t,n){var a=t.get("map"),o=t.get("aspectScale"),r=!0,s=$D.retrieveMap(a);s&&s[0]&&"svg"===s[0].type?(null==o&&(o=1),r=!1):null==o&&(o=.75);var l=new Pg(a+n,a,t.get("nameMap"),r);l.aspectScale=o,l.zoomLimit=t.get("scaleLimit"),i.push(l),Eg(l,t),t.coordinateSystem=l,l.model=t,l.resize=Ng,l.resize(t,e)}),t.eachSeries(function(t){var e=t.get("coordinateSystem");if("geo"===e){var n=t.get("geoIndex")||0;t.coordinateSystem=i[n]}});var n={};return t.eachSeriesByType("map",function(t){if(!t.getHostGeoModel()){var e=t.getMapType();n[e]=n[e]||[],n[e].push(t)}}),f(n,function(t,n){var a=p(t,function(t){return t.get("nameMap")}),r=new Pg(n,n,o(a));r.zoomLimit=D.apply(null,p(t,function(t){return t.get("scaleLimit")})),i.push(r),r.resize=Ng,r.aspectScale=t[0].get("aspectScale"),r.resize(t[0],e),f(t,function(t){t.coordinateSystem=r,Eg(r,t)})}),i},getFilledRegions:function(t,e,i){for(var n=(t||[]).slice(),a=B(),o=0;o<n.length;o++)a.set(n[o].name,n[o]);var r=nN.load(e,i);return f(r.regions,function(t){var e=t.name;!a.get(e)&&n.push({name:e})}),n}};Cu("geo",sN);var lN=function(t){var e={};t.eachSeriesByType("map",function(i){var n=i.getMapType();if(!i.getHostGeoModel()&&!e[n]){var a={};f(i.seriesGroup,function(e){var i=e.coordinateSystem,n=e.originalData;e.get("showLegendSymbol")&&t.getComponent("legend")&&n.each(n.mapDimension("value"),function(t,e){var o=n.getName(e),r=i.getRegion(o);if(r&&!isNaN(t)){var s=a[o]||0,l=i.dataToPoint(r.center);a[o]=s+1,n.setItemLayout(e,{point:l,offset:s})}})});var o=i.getData();o.each(function(t){var e=o.getName(t),i=o.getItemLayout(t)||{};i.showLabel=!a[e],o.setItemLayout(t,i)}),e[n]=!0}})},uN=function(t){t.eachSeriesByType("map",function(t){var e=t.get("color"),i=t.getModel("itemStyle"),n=i.get("areaColor"),a=i.get("color")||e[t.seriesIndex%e.length];t.getData().setVisual({areaColor:n,color:a})})},hN=function(t){var e={};t.eachSeriesByType("map",function(t){var i=t.getHostGeoModel(),n=i?"o"+i.id:"i"+t.getMapType();(e[n]=e[n]||[]).push(t)}),f(e,function(t){for(var e=zg(p(t,function(t){return t.getData()}),t[0].get("mapValueCalculation")),i=0;i<t.length;i++)t[i].originalData=t[i].getData();for(var i=0;i<t.length;i++)t[i].seriesGroup=t,t[i].needsDrawMap=0===i&&!t[i].getHostGeoModel(),t[i].setData(e.cloneShallow()),t[i].mainSeries=t[0]})},cN=function(t){var e=[];f(t.series,function(t){t&&"map"===t.type&&(e.push(t),t.map=t.map||t.mapType,s(t,t.mapLocation))})};ku(lN),Pu(uN),Tu(yC.PROCESSOR.STATISTIC,hN),Iu(cN),aP("map",[{type:"mapToggleSelect",event:"mapselectchanged",method:"toggleSelected"},{type:"mapSelect",event:"mapselected",method:"select"},{type:"mapUnSelect",event:"mapunselected",method:"unSelect"}]);var dN="undefined"==typeof Uint32Array?Array:Uint32Array,fN="undefined"==typeof Float64Array?Array:Float64Array,pN=pD.extend({type:"series.lines",dependencies:["grid","polar"],visualColorAccessPath:"lineStyle.color",init:function(t){t.data=t.data||[],Rg(t);var e=this._processFlatCoordsArray(t.data);this._flatCoords=e.flatCoords,this._flatCoordsOffset=e.flatCoordsOffset,e.flatCoords&&(t.data=new Float32Array(e.count)),pN.superApply(this,"init",arguments)},mergeOption:function(t){if(t.data=t.data||[],Rg(t),t.data){var e=this._processFlatCoordsArray(t.data);this._flatCoords=e.flatCoords,this._flatCoordsOffset=e.flatCoordsOffset,e.flatCoords&&(t.data=new Float32Array(e.count))}pN.superApply(this,"mergeOption",arguments)},appendData:function(t){var e=this._processFlatCoordsArray(t.data);e.flatCoords&&(this._flatCoords?(this._flatCoords=V(this._flatCoords,e.flatCoords),this._flatCoordsOffset=V(this._flatCoordsOffset,e.flatCoordsOffset)):(this._flatCoords=e.flatCoords,this._flatCoordsOffset=e.flatCoordsOffset),t.data=new Float32Array(e.count)),this.getRawData().appendData(t.data)},_getCoordsFromItemModel:function(t){var e=this.getData().getItemModel(t),i=e.option instanceof Array?e.option:e.getShallow("coords");return i},getLineCoordsCount:function(t){return this._flatCoordsOffset?this._flatCoordsOffset[2*t+1]:this._getCoordsFromItemModel(t).length},getLineCoords:function(t,e){if(this._flatCoordsOffset){for(var i=this._flatCoordsOffset[2*t],n=this._flatCoordsOffset[2*t+1],a=0;n>a;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;a<o.length;a++)e[a]=e[a]||[],e[a][0]=o[a][0],e[a][1]=o[a][1];return o.length},_processFlatCoordsArray:function(t){var e=0;if(this._flatCoords&&(e=this._flatCoords.length),"number"==typeof t[0]){for(var i=t.length,n=new dN(i),a=new fN(i),o=0,r=0,s=0,l=0;i>l;){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 $C(["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),Wr(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}}}),gN=OT.prototype,mN=ET.prototype,vN=yo({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[Bg(e)?"_buildPathLine":"_buildPathCurve"](t,e)},_buildPathLine:gN.buildPath,_buildPathCurve:mN.buildPath,pointAt:function(t){return this[Bg(this.shape)?"_pointAtLine":"_pointAtCurve"](t)},_pointAtLine:gN.pointAt,_pointAtCurve:mN.pointAt,tangentAt:function(t){var e=this.shape,i=Bg(e)?[e.x2-e.x1,e.y2-e.y1]:this._tangentAtCurve(t);return te(i,i)},_tangentAtCurve:mN.tangentAt}),yN=["fromSymbol","toSymbol"],xN=Zg.prototype;xN.beforeUpdate=Hg,xN._createLine=function(t,e,i){var n=t.hostModel,a=t.getItemLayout(e),o=Fg(a);o.shape.percent=0,ar(o,{shape:{percent:1}},n,e),this.add(o);var r=new xT({name:"label",lineLabelOriginalOpacity:1});this.add(r),f(yN,function(i){var n=Gg(i,t,e);this.add(n),this[Vg(i)]=t.getItemVisual(e,i)},this),this._updateCommonStl(t,e,i)},xN.updateData=function(t,e,i){var n=t.hostModel,a=this.childOfName("line"),o=t.getItemLayout(e),r={shape:{}};Wg(r.shape,o),nr(a,r,n,e),f(yN,function(i){var n=t.getItemVisual(e,i),a=Vg(i);if(this[a]!==n){this.remove(this.childOfName(i));var o=Gg(i,t,e);this.add(o)}this[a]=n},this),this._updateCommonStl(t,e,i)},xN._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(yN,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)?Ir(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){Yo(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,Fo(this)},xN.highlight=function(){this.trigger("emphasis")},xN.downplay=function(){this.trigger("normal")},xN.updateLayout=function(t,e){this.setLinePoints(t.getItemLayout(e))},xN.setLinePoints=function(t){var e=this.childOfName("line");Wg(e.shape,t),e.dirty()},h(Zg,aM);var _N=Xg.prototype;_N.isPersistent=function(){return!0},_N.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){Ug(e,t,i,a)}).update(function(i,o){Yg(e,n,t,o,i,a)}).remove(function(t){i.remove(n.getItemGraphicEl(t))}).execute()},_N.updateLayout=function(){var t=this._lineData;t&&t.eachItemGraphicEl(function(e,i){e.updateLayout(t,i)},this)},_N.incrementalPrepareUpdate=function(t){this._seriesScope=jg(t),this._lineData=null,this.group.removeAll()},_N.incrementalUpdate=function(t,e){function i(t){t.isGroup||(t.incremental=t.useHoverLayer=!0)}for(var n=t.start;n<t.end;n++){var a=e.getItemLayout(n);if(Kg(a)){var o=new this._ctor(e,n,this._seriesScope);o.traverse(i),this.group.add(o),e.setItemGraphicEl(n,o)}}},_N.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},_N._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()};var wN=$g.prototype;wN.createLine=function(t,e,i){return new Zg(t,e,i)},wN._updateEffectSymbol=function(t,e){var i=t.getItemModel(e),n=i.getModel("effect"),a=n.get("symbolSize"),o=n.get("symbol");_(a)||(a=[a,a]);var r=n.get("color")||t.getItemVisual(e,"color"),s=this.childAt(1);this._symbolType!==o&&(this.remove(s),s=tc(o,-.5,-.5,1,1,r),s.z2=100,s.culling=!0,this.add(s)),s&&(s.setStyle("shadowColor",r),s.setStyle(n.getItemStyle(["color"])),s.attr("scale",a),s.setColor(r),s.attr("scale",a),this._symbolType=o,this._symbolScale=a,this._updateEffectAnimation(t,n,e))},wN._updateEffectAnimation=function(t,e,i){var n=this.childAt(1);if(n){var a=this,o=t.getItemLayout(i),r=1e3*e.get("period"),s=e.get("loop"),l=e.get("constantSpeed"),u=D(e.get("delay"),function(e){return e/t.count()*r/3}),h="function"==typeof u;if(n.ignore=!0,this.updateAnimationPoints(n,o),l>0&&(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}},wN.getLineLength=function(t){return lS(t.__p1,t.__cp1)+lS(t.__cp1,t.__p2)},wN.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]},wN.updateData=function(t,e,i){this.childAt(0).updateData(t,e,i),this._updateEffectSymbol(t,e)},wN.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=Pa,l=Oa;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<t.__t){var c=1.05*lS(r,o);t.attr("scale",[t.scale[0],c]),1===a&&(o[0]=r[0]+(o[0]-r[0])/2,o[1]=r[1]+(o[1]-r[1])/2)}else if(1===t.__lastT){var c=2*lS(e,o);t.attr("scale",[t.scale[0],c])}else t.attr("scale",this._symbolScale);t.__lastT=t.__t,t.ignore=!1},wN.updateLayout=function(t,e){this.childAt(0).updateLayout(t,e);var i=t.getItemModel(e).getModel("effect");this._updateEffectAnimation(t,i,e)},h($g,aM);var bN=Jg.prototype;bN._createPolyline=function(t,e,i){var n=t.getItemLayout(e),a=new DT({shape:{points:n}});this.add(a),this._updateCommonStl(t,e,i)},bN.updateData=function(t,e,i){var n=t.hostModel,a=this.childAt(0),o={shape:{points:t.getItemLayout(e)}};nr(a,o,n,e),this._updateCommonStl(t,e,i)},bN._updateCommonStl=function(t,e,i){var n=this.childAt(0),a=t.getItemModel(e),o=t.getItemVisual(e,"color"),r=i&&i.lineStyle,l=i&&i.hoverLineStyle;(!i||t.hasItemOption)&&(r=a.getModel("lineStyle").getLineStyle(),l=a.getModel("emphasis.lineStyle").getLineStyle()),n.useStyle(s({strokeNoScale:!0,fill:"none",stroke:o},r)),n.hoverStyle=l,Fo(this)},bN.updateLayout=function(t,e){var i=this.childAt(0);i.setShape("points",t.getItemLayout(e))},h(Jg,aM);var SN=Qg.prototype;SN.createLine=function(t,e,i){return new Jg(t,e,i)},SN.updateAnimationPoints=function(t,e){this._points=e;for(var i=[0],n=0,a=1;a<e.length;a++){var o=e[a-1],r=e[a];n+=lS(o,r),i.push(n)}if(0!==n){for(var a=0;a<i.length;a++)i[a]/=n;this._offsets=i,this._length=n}},SN.getLineLength=function(){return this._length},SN.updateSymbolPosition=function(t){var e=t.__t,i=this._points,n=this._offsets,a=i.length;if(n){var o,r=this._lastFrame;if(e<this._lastFramePercent){var s=Math.min(r+1,a-1);for(o=s;o>=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(Qg,$g);var MN=yo({shape:{polyline:!1,curveness:0,segs:[]},buildPath:function(t,e){var i=e.segs,n=e.curveness;if(e.polyline)for(var a=0;a<i.length;){var o=i[a++];if(o>0){t.moveTo(i[a++],i[a++]);for(var r=1;o>r;r++)t.lineTo(i[a++],i[a++])}}else for(var a=0;a<i.length;){var s=i[a++],l=i[a++],u=i[a++],h=i[a++];if(t.moveTo(s,l),n>0){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;a<e.length;){var o=e[a++];if(o>0)for(var r=e[a++],s=e[a++],l=1;o>l;l++){var u=e[a++],h=e[a++];if(Ha(r,s,u,h))return n}n++}else for(var n=0,a=0;a<e.length;){var r=e[a++],s=e[a++],u=e[a++],h=e[a++];if(i>0){var c=(r+u)/2-(s-h)*i,d=(s+h)/2-(u-r)*i;if(Xa(r,s,c,d,u,h))return n}else if(Ha(r,s,u,h))return n;n++}return-1}}),IN=tm.prototype;IN.isPersistent=function(){return!this._incremental},IN.updateData=function(t){this.group.removeAll();var e=new MN({rectHover:!0,cursor:"default"});e.setShape({segs:t.getLayout("linesPoints")}),this._setCommon(e,t),this.group.add(e),this._incremental=null},IN.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clearIncremental(),t.count()>5e5?(this._incremental||(this._incremental=new vo({silent:!0})),this.group.add(this._incremental)):this._incremental=null},IN.incrementalUpdate=function(t,e){var i=new MN;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))},IN.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},IN._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)}))},IN._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()};var TN={seriesType:"lines",plan:vD(),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;h<e.end;h++)u+=t.getLineCoordsCount(h);s=new Float32Array(l+2*u)}else s=new Float32Array(4*l);for(var c=0,d=[],h=e.start;h<e.end;h++){var f=t.getLineCoords(h,r);n&&(s[c++]=f);for(var p=0;f>p;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;h<e.end;h++){var g=o.getItemModel(h),f=t.getLineCoords(h,r),m=[];if(n)for(var v=0;f>v;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}}};Bu({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)&&Gc(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=TN.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 tm:new Xg(a?n?Qg:Jg:n?$g:Zg),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 AN="lineStyle.opacity".split("."),DN={seriesType:"lines",reset:function(t){function e(t,e){var i=t.getItemModel(e),n=em(i.getShallow("symbol",!0)),a=em(i.getShallow("symbolSize",!0)),o=i.get(AN);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=em(t.get("symbol")),n=em(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(AN)),{dataEach:a.hasItemOption?e:null}}};ku(TN),Pu(DN);var CN=function(t){this._directed=t||!1,this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this.data,this.edgeData},LN=CN.prototype;LN.type="graph",LN.isDirected=function(){return this._directed},LN.addNode=function(t,e){t=null==t?""+e:""+t;var i=this._nodesMap;if(!i[im(t)]){var n=new nm(t,e);return n.hostGraph=this,this.nodes.push(n),i[im(t)]=n,n}},LN.getNodeByIndex=function(t){var e=this.data.getRawIndex(t);return this.nodes[e]},LN.getNodeById=function(t){return this._nodesMap[im(t)]},LN.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]),nm.isInstance(t)||(t=n[im(t)]),nm.isInstance(e)||(e=n[im(e)]),t&&e){var o=t.id+"-"+e.id;if(!a[o]){var r=new am(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}}},LN.getEdgeByIndex=function(t){var e=this.edgeData.getRawIndex(t);return this.edges[e]},LN.getEdge=function(t,e){nm.isInstance(t)&&(t=t.id),nm.isInstance(e)&&(e=e.id);var i=this._edgesMap;return this._directed?i[t+"-"+e]:i[t+"-"+e]||i[e+"-"+t]},LN.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)},LN.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)},LN.breadthFirstTraverse=function(t,e,i,n){if(nm.isInstance(e)||(e=this._nodesMap[im(e)]),e){for(var a="out"===i?"outEdges":"in"===i?"inEdges":"edges",o=0;o<this.nodes.length;o++)this.nodes[o].__visited=!1;if(!t.call(n,e,null))for(var r=[e];r.length;)for(var s=r.shift(),l=s[a],o=0;o<l.length;o++){var u=l[o],h=u.node1===s?u.node2:u.node1;if(!h.__visited){if(t.call(n,h,s))return;r.push(h),h.__visited=!0}}}},LN.update=function(){for(var t=this.data,e=this.edgeData,i=this.nodes,n=this.edges,a=0,o=i.length;o>a;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},LN.clone=function(){for(var t=new CN(this._directed),e=this.nodes,i=this.edges,n=0;n<e.length;n++)t.addNode(e[n].id,e[n].dataIndex);for(var n=0;n<i.length;n++){var a=i[n];t.addEdge(a.node1.id,a.node2.id,a.dataIndex)}return t},nm.prototype={constructor:nm,degree:function(){return this.edges.length},inDegree:function(){return this.inEdges.length},outDegree:function(){return this.outEdges.length},getModel:function(t){if(!(this.dataIndex<0)){var e=this.hostGraph,i=e.data.getItemModel(this.dataIndex);return i.getModel(t)}}},am.prototype.getModel=function(t){if(!(this.dataIndex<0)){var e=this.hostGraph,i=e.edgeData.getItemModel(this.dataIndex);return i.getModel(t)}};var kN=function(t,e){return{getValue:function(i){var n=this[t][e];return n.get(n.getDimension(i||"value"),this.dataIndex)},setVisual:function(i,n){this.dataIndex>=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(nm,kN("hostGraph","data")),c(am,kN("hostGraph","edgeData")),CN.Node=nm,CN.Edge=am,_a(nm),_a(am);var PN=function(t,e,i,n,a){for(var o=new CN(n),r=0;r<t.length;r++)o.addNode(D(t[r].id,t[r].name,r),r);for(var s=[],l=[],h=0,r=0;r<e.length;r++){var c=e[r],d=c.source,f=c.target;o.addEdge(d,f,h)&&(l.push(c),s.push(D(c.id,d+" > "+f)),h++)}var p,g=i.get("coordinateSystem");if("cartesian2d"===g||"polar"===g)p=yh(t,i);else{var m=Cs.get(g),v=m&&"view"!==m.type?m.dimensions||[]:[];u(v,"value")<0&&v.concat(["value"]);var y=tL(t,{coordDimensions:v});p=new $C(y,i),p.initData(t)}var x=new $C(["value"],i);return x.initData(l,s),a&&a(p,x),Tf({mainData:p,struct:o,structAttr:"graph",datas:{node:p,edge:x},datasAttr:{node:"data",edge:"edgeData"}}),o.update(),o},ON=Ru({type:"series.graph",init:function(t){function e(){return i._categoriesData
}ON.superApply(this,"init",arguments);var i=this;this.legendVisualProvider=new qd(e,e),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},mergeOption:function(t){ON.superApply(this,"mergeOption",arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},mergeDefaultAndTheme:function(t){ON.superApply(this,"mergeDefaultAndTheme",arguments),ea(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 mr({label:a.option},a.parentModel,e),s=o.getModel("emphasis.edgeLabel"),l=new mr({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;return a&&n?PN(a,n,this,!0,i).data:void 0},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=Wr(l.join(" > ")),a.value&&(l+=" : "+Wr(a.value)),l}return ON.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 $C(["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 ON.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,curveness:0,opacity:.5},emphasis:{label:{show:!0}}}}),NN=[],EN=[],zN=[],RN=Pa,BN=uS,VN=Math.abs,GN=function(t,e){var i=[],n=za,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=rm(t.node1),d=sm(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=rm(t.node2),d=sm(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=rm(t.node1);U(o[0],o[0],r,c*e)}if(u&&"none"!==u){var c=rm(t.node2);U(o[1],o[1],r,-c*e)}W(s[0],o[0]),W(s[1],o[1])}})},FN="__focusNodeAdjacency",WN="__unfocusNodeAdjacency",HN=["itemStyle","opacity"],ZN=["lineStyle","opacity"];Bu({type:"graph",init:function(t,e){var i=new Dd,n=new Xg,a=this.group;this._controller=new ap(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):nr(s,l,t)}GN(t.getGraph(),om(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[FN]&&e.off("mouseover",e[FN]),e[WN]&&e.off("mouseout",e[WN]),o.get("focusNodeAdjacency")&&(e.on("mouseover",e[FN]=function(){n._clearTimer(),i.dispatchAction({type:"focusNodeAdjacency",seriesId:t.id,dataIndex:e.dataIndex})}),e.on("mouseout",e[WN]=function(){n._dispatchUnfocus(i)}))},this),u.graph.eachEdge(function(e){var a=e.getGraphicEl();a[FN]&&a.off("mouseover",a[FN]),a[WN]&&a.off("mouseout",a[WN]),e.getModel().get("focusNodeAdjacency")&&(a.on("mouseover",a[FN]=function(){n._clearTimer(),i.dispatchAction({type:"focusNodeAdjacency",seriesId:t.id,edgeDataIndex:e.dataIndex})}),a.on("mouseout",a[WN]=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]<p;s&&(r-=Math.PI);var l=s?"left":"right";Uo(a,{textRotation:-r,textPosition:l,textOrigin:"center"},{textPosition:l})}else Uo(a,{textRotation:n*=Math.PI/180})}),this._firstRender=!1},dispose:function(){this._controller&&this._controller.dispose(),this._controllerHost={},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=n.edgeDataIndex,l=o.getNodeByIndex(r),u=o.getEdgeByIndex(s);(l||u)&&(o.eachNode(function(t){um(t,HN,.1)}),o.eachEdge(function(t){um(t,ZN,.1)}),l&&(hm(l,HN),f(l.edges,function(t){t.dataIndex<0||(hm(t,ZN),hm(t.node1,HN),hm(t.node2,HN))})),u&&(hm(u,ZN),hm(u.node1,HN),hm(u.node2,HN)))},unfocusNodeAdjacency:function(t){var e=t.getData().graph;e.eachNode(function(t){um(t,HN)}),e.eachEdge(function(t){um(t,ZN)})},_startForceLayoutIteration:function(t,e){var i=this;!function n(){t.step(function(t){i.updateLayout(i._model),(i._layouting=!t)&&(e?i._layoutTimeout=setTimeout(n,16):n())})}()},_updateController:function(t,e,i){var n=this._controller,a=this._controllerHost,o=this.group;return n.setPointerChecker(function(e,n,a){var r=o.getBoundingRect();return r.applyTransform(o.transform),r.contain(n,a)&&!fp(e,i,t)}),"view"!==t.coordinateSystem.type?void n.disable():(n.enable(t.get("roam")),a.zoomLimit=t.get("scaleLimit"),a.zoom=t.coordinateSystem.getZoom(),void n.off("pan").off("zoom").on("pan",function(e){Jf(a,e.dx,e.dy),i.dispatchAction({seriesId:t.id,type:"graphRoam",dx:e.dx,dy:e.dy})}).on("zoom",function(e){Qf(a,e.scale,e.originX,e.originY),i.dispatchAction({seriesId:t.id,type:"graphRoam",zoom:e.scale,originX:e.originX,originY:e.originY}),this._updateNodeAndLinkScale(),GN(t.getGraph(),om(t)),this._lineDraw.updateLayout()},this))},_updateNodeAndLinkScale:function(){var t=this._model,e=t.getData(),i=om(t),n=[i,i];e.eachItemGraphicEl(function(t){t.attr("scale",n)})},updateLayout:function(t){GN(t.getGraph(),om(t)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},remove:function(){this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()}}),Du({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},function(){}),Du({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},function(){});var XN={type:"graphRoam",event:"graphRoam",update:"none"};Du(XN,function(t,e){e.eachComponent({mainType:"series",query:t},function(e){var i=e.coordinateSystem,n=_p(i,t);e.setCenter&&e.setCenter(n.center),e.setZoom&&e.setZoom(n.zoom)})});var UN=function(t){var e=t.findComponents({mainType:"legend"});e&&e.length&&t.eachSeriesByType("graph",function(t){var i=t.getCategoriesData(),n=t.getGraph(),a=n.data,o=i.mapArray(i.getName);a.filterSelf(function(t){var i=a.getItemModel(t),n=i.getShallow("category");if(null!=n){"number"==typeof n&&(n=o[n]);for(var r=0;r<e.length;r++)if(!e[r].isSelected(n))return!1}return!0})},this)},YN=function(t){var e={};t.eachSeriesByType("graph",function(t){var i=t.getCategoriesData(),n=t.getData(),a={};i.each(function(n){var o=i.getName(n);a["ec-"+o]=n;var r=i.getItemModel(n),s=r.get("itemStyle.color")||t.getColorFromPalette(o,e);i.setItemVisual(n,"color",s);for(var l=["opacity","symbol","symbolSize","symbolKeepAspect"],u=0;u<l.length;u++){var h=r.getShallow(l[u],!0);null!=h&&i.setItemVisual(n,l[u],h)}}),i.count()&&n.each(function(t){var e=n.getItemModel(t),o=e.getShallow("category");if(null!=o){"string"==typeof o&&(o=a["ec-"+o]);for(var r=["color","opacity","symbol","symbolSize","symbolKeepAspect"],s=0;s<r.length;s++)null==n.getItemVisual(t,r[s],!0)&&n.setItemVisual(t,r[s],i.getItemVisual(o,r[s]))}})})},jN=function(t){t.eachSeriesByType("graph",function(t){var e=t.getGraph(),i=t.getEdgeData(),n=cm(t.get("edgeSymbol")),a=cm(t.get("edgeSymbolSize")),o="lineStyle.color".split("."),r="lineStyle.opacity".split(".");i.setVisual("fromSymbol",n&&n[0]),i.setVisual("toSymbol",n&&n[1]),i.setVisual("fromSymbolSize",a&&a[0]),i.setVisual("toSymbolSize",a&&a[1]),i.setVisual("color",t.get(o)),i.setVisual("opacity",t.get(r)),i.each(function(t){var n=i.getItemModel(t),a=e.getEdgeByIndex(t),s=cm(n.getShallow("symbol",!0)),l=cm(n.getShallow("symbolSize",!0)),u=n.get(o),h=n.get(r);switch(u){case"source":u=a.node1.getVisual("color");break;case"target":u=a.node2.getVisual("color")}s[0]&&a.setVisual("fromSymbol",s[0]),s[1]&&a.setVisual("toSymbol",s[1]),l[0]&&a.setVisual("fromSymbolSize",l[0]),l[1]&&a.setVisual("toSymbolSize",l[1]),a.setVisual("color",u),a.setVisual("opacity",h)})})},qN=function(t){t.eachSeriesByType("graph",function(t){var e=t.get("layout"),i=t.coordinateSystem;if(i&&"view"!==i.type){var n=t.getData(),a=[];f(i.dimensions,function(t){a=a.concat(n.mapDimension(t,!0))});for(var o=0;o<n.count();o++){for(var r=[],s=!1,l=0;l<a.length;l++){var u=n.get(a[l],o);isNaN(u)||(s=!0),r.push(u)}s?n.setItemLayout(o,i.dataToPoint(r)):n.setItemLayout(o,[0/0,0/0])}fm(n.graph)}else e&&"none"!==e||dm(t)})},KN=Math.PI,$N=[],JN={value:function(t,e,i,n,a,o,r,s){var l=0,u=n.getSum("value"),h=2*Math.PI/(u||s);i.eachNode(function(t){var e=t.getValue("value"),i=h*(u?e:1)/2;l+=i,t.setLayout([a*Math.cos(l)+o,a*Math.sin(l)+r]),l+=i})},symbolSize:function(t,e,i,n,a,o,r,s){var l=0;$N.length=s;var u=om(t);i.eachNode(function(t){var e=rm(t);isNaN(e)&&(e=2),0>e&&(e=0),e*=u;var i=Math.asin(e/2/a);isNaN(i)&&(i=KN/2),$N[t.dataIndex]=i,l+=2*i});var h=(2*KN-l)/s/2,c=0;i.eachNode(function(t){var e=h+$N[t.dataIndex];c+=e,t.setLayout([a*Math.cos(c)+o,a*Math.sin(c)+r]),c+=e})}},QN=function(t){t.eachSeriesByType("graph",function(t){"circular"===t.get("layout")&&pm(t,"symbolSize")})},tE=U,eE=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&&pm(t,"value"):dm(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=Sr(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(t,e){var i=n.getEdgeByIndex(e),a=Sr(t,u,c);isNaN(a)&&(a=(c[0]+c[1])/2);var o=i.getModel();return{n1:d[i.node1.dataIndex],n2:d[i.node2.dataIndex],d:a,curveness:o.get("lineStyle.curveness")||0,ignoreForceLayout:o.get("ignoreForceLayout")}}),e=t.coordinateSystem,p=e.getBoundingRect(),g=gm(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})},iE=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=[];Ba(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=mm(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 Kf;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};Tu(UN),Pu(qk("graph","circle",null)),Pu(YN),Pu(jN),ku(qN),ku(yC.VISUAL.POST_CHART_LAYOUT,QN),ku(eE),Cu("graphView",{create:iE});var nE=pD.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(nE,vP,!0);var aE=["itemStyle"],oE=["emphasis","itemStyle"],rE=(gl.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=vm(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?ym(s,r,e,t):r=vm(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}),no.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();n<i.length;n++)t.moveTo(i[n][0],i[n][1]),n++,t.lineTo(i[n][0],i[n][1])}})),sE=["itemStyle","borderColor"],lE=function(t){var e=t.get("color");t.eachRawSeriesByType("boxplot",function(i){var n=e[i.seriesIndex%e.length],a=i.getData();a.setVisual({legendSymbol:"roundRect",color:i.get(sE)||n}),t.isSeriesFiltered(i)||a.each(function(t){var e=a.getItemModel(t);a.setItemVisual(t,{color:e.get(sE,!0)})})})},uE=f,hE=function(t){var e=_m(t);uE(e,function(t){var e=t.seriesModels;e.length&&(wm(t),uE(e,function(e,i){bm(e,t.boxOffsetList[i],t.boxWidthList[i])}))})};Pu(lE),ku(hE);var cE=function(t){Sm(t),Mm(t)},dE=function(t,e,i,n,a){UL.call(this,t,e,i),this.type=n||"value",this.axisIndex=a};dE.prototype={constructor:dE,model:null,isHorizontal:function(){return"horizontal"!==this.coordinateSystem.getModel().get("layout")}},h(dE,UL);var fE=function(t,e,i,n,a,o){t=t||0;var r=i[1]-i[0];if(null!=a&&(a=Tm(a,[0,r])),null!=o&&(o=Math.max(o,null!=a?a:0)),"all"===n){var s=Math.abs(e[1]-e[0]);s=Tm(s,[0,r]),a=o=Tm(s,[a,o]),n=0}e[0]=Tm(e[0],i),e[1]=Tm(e[1],i);var l=Im(e,n);e[n]+=t;var u=a||0,h=i.slice();l.sign<0?h[0]+=u:h[1]-=u,e[n]=Tm(e[n],h);var c=Im(e,n);null!=a&&(c.sign!==l.sign||c.span<a)&&(e[1-n]=e[n]+l.sign*a);var c=Im(e,n);return null!=o&&c.span>o&&(e[1-n]=e[n]+c.sign*o),e},pE=f,gE=Math.min,mE=Math.max,vE=Math.floor,yE=Math.ceil,xE=Ir,_E=Math.PI;Am.prototype={type:"parallel",constructor:Am,_init:function(t,e){var i=t.dimensions,n=t.parallelAxisIndex;pE(i,function(t,i){var a=n[i],o=e.getComponent("parallelAxis",a),r=this._axesMap.set(t,new dE(t,Xh(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();pE(this.dimensions,function(t){var e=this._axesMap.get(t);e.scale.unionExtentFromData(n,n.mapDimension(t)),Zh(e.scale,e.model)},this)}},this)},resize:function(t,e){this._rect=Qr(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=Dm(e.get("axisExpandWidth"),l),c=Dm(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=Dm(f[1]-f[0],l),f[1]=f[0]+t;else{t=Dm(h*(c-1),l);var p=e.get("axisExpandCenter")||vE(u/2);f=[h*p-t/2],f[1]=f[0]+t}var g=(s-t)/(u-c);3>g&&(g=0);var m=[vE(xE(f[0]/h,1))+1,yE(xE(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])}),pE(i,function(e,i){var o=(n.axisExpandable?Lm:Cm)(i,n),r={horizontal:{x:o.position,y:n.axisLength},vertical:{x:0,y:o.position}},s={horizontal:_E/2,vertical:0},l=[r[a].x+t.x,r[a].y+t.y],u=s[a],h=Oe();Be(h,h,u),Re(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 rr([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&&s<a*h[0]?(l="jump",r=s-a*h[2]):c&&u&&s>a*(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?fE(r,n,o,"all"):l="none";else{var a=n[1]-n[0],d=o[1]*s/a;n=[mE(0,d-a/2)],n[1]=gE(o[1],n[0]+a),n[0]=n[1]-a}return{axisExpandWindow:n,behavior:l}}},Cs.register("parallel",{create:km});var wE=AA.extend({type:"baseParallelAxis",axis:null,activeIntervals:[],getAreaSelectStyle:function(){return dI([["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--)Tr(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"}}),bE={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(wE.prototype,kL),ek("parallel",wE,Pm,bE),AA.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(){AA.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 SE={type:"axisAreaSelect",event:"axisAreaSelected"};Du(SE,function(t,e){e.eachComponent({mainType:"parallelAxis",query:t},function(e){e.axis.model.setActiveIntervals(t.intervals)})}),Du("parallelAxisExpand",function(t,e){e.eachComponent({mainType:"parallel",query:t},function(e){e.setAxisExpand(t)})});var ME=x,IE=f,TE=p,AE=Math.min,DE=Math.max,CE=Math.pow,LE=1e4,kE=6,PE=6,OE="globalPan",NE={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},EE={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},zE={brushStyle:{lineWidth:2,stroke:"rgba(0,0,0,0.3)",fill:"rgba(0,0,0,0.1)"},transformable:!0,brushMode:"single",removeOnClick:!1},RE=0;Om.prototype={constructor:Om,enableBrush:function(t){return this._brushType&&Em(this),t.brushType&&Nm(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){IE(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]):Vm(h,Bm(h,n));Wm(h,a)}}function r(t){l[t]!==c&&h.group.remove(l[t])}t=p(t,function(t){return a(n(zE),t,!0)});var s="\x00-brush-index-",l=this._covers,u=this._covers=[],h=this,c=this._creatingCover;return new Hu(l,t,i,e).add(o).update(o).remove(r).execute(),this},unmount:function(){return this.enableBrush(!1),Um(this),this._zr.remove(this.group),this},dispose:function(){this.unmount(),this.off()}},c(Om,dS);var BE={mousedown:function(t){if(this._dragging)pv(this,t);else if(!t.target||!t.target.draggable){hv(t);var e=this.group.transformCoordToLocal(t.offsetX,t.offsetY);this._creatingCover=null;var i=this._creatingPanel=Zm(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(uv(this,t,n),this._dragging){hv(t);var a=dv(this,t,n,!1);a&&Ym(this,a)}},mouseup:function(t){pv(this,t)}},VE={lineX:mv(0),lineY:mv(1),rect:{createCover:function(t,e){return Km(ME(av,function(t){return t},function(t){return t}),t,e,["w","e","n","s","se","sw","ne","nw"])},getCreatingRange:function(t){var e=qm(t);return ev(e[1][0],e[1][1],e[0][0],e[0][1])},updateCoverShape:function(t,e,i,n){$m(t,e,i,n)},updateCommon:Jm,contain:cv},polygon:{createCover:function(t,e){var i=new aM;return i.add(new DT({name:"main",style:tv(e),silent:!0})),i},getCreatingRange:function(t){return t},endCreating:function(t,e){e.remove(e.childAt(0)),e.add(new AT({name:"main",draggable:!0,drift:ME(ov,t,e),ondragend:ME(Ym,t,{isEnd:!0})}))},updateCoverShape:function(t,e,i){e.childAt(0).setShape({points:sv(t,e,i)})},updateCommon:Jm,contain:cv}},GE=["axisLine","axisTickLabel","axisName"],FE=zu({type:"parallelAxis",init:function(t,e){FE.superApply(this,"init",arguments),(this._brushController=new Om(e.getZr())).on("brush",y(this._onBrush,this))},render:function(t,e,i,n){if(!wv(t,e,n)){this.axisModel=t,this.api=i,this.group.removeAll();var a=this._axisGroup;if(this._axisGroup=new aM,this.group.add(this._axisGroup),t.get("show")){var o=Sv(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 _k(t,d);f(GE,p.add,p),this._axisGroup.add(p.getGroup()),this._refreshBrushController(d,l,t,o,u,i);var g=n&&n.animation===!1?null:t;lr(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:vv(u),isTargetByCursor:xv(u,o,n),getLinearBrushOtherExtent:yv(u,0)}]).enableBrush({brushType:"lineX",brushStyle:e,removeOnClick:!0}).updateCovers(bv(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()}}),WE=5;zu({type:"parallel",render:function(t,e,i){this._model=t,this._api=i,this._handlers||(this._handlers={},f(HE,function(t,e){i.getZr().on(e,this._handlers[e]=y(t,this))},this)),wl(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 HE={mousedown:function(t){Mv(this,"click")&&(this._mouseDownPoint=[t.offsetX,t.offsetY])},mouseup:function(t){var e=this._mouseDownPoint;if(Mv(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>WE)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&&Mv(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})}}};Iu(cE),pD.extend({type:"series.parallel",dependencies:["parallel"],visualColorAccessPath:"lineStyle.color",getInitialData:function(){var t=this.getSource();return Iv(t,this),yh(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 ZE=.3,XE=(gl.extend({type:"parallel",init:function(){this._dataGroup=new aM,this.group.add(this._dataGroup),this._data,this._initialized},render:function(t,e,i,n){function a(t){var e=Cv(l,s,t,c,h);kv(e,l,t,d)}function o(e,i){var a=u.getItemGraphicEl(i),o=Dv(l,e,c,h);l.setItemGraphicEl(e,a);var r=n&&n.animation===!1?null:t;nr(a,{shape:{points:o}},r,e),kv(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=Lv(t);if(l.diff(u).add(a).update(o).remove(r).execute(),!this._initialized){this._initialized=!0;var f=Av(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=Lv(e),r=t.start;r<t.end;r++){var s=Cv(i,this._dataGroup,r,a,n);s.incremental=!0,kv(s,i,r,o)}},dispose:function(){},remove:function(){this._dataGroup&&this._dataGroup.removeAll(),this._data=null}}),["lineStyle","normal","opacity"]),UE={seriesType:"parallel",reset:function(t,e){function i(t,e){h.eachActiveState(e,function(t,i){var n=d[t];if("normal"===t&&e.hasItemOption){var a=e.getItemModel(i).get(XE,!0);null!=a&&(n=a)}e.setItemVisual(i,"opacity",n)},t.start,t.end)}var n=t.getModel("itemStyle"),a=t.getModel("lineStyle"),o=e.get("color"),r=a.get("color")||n.get("color")||o[t.seriesIndex%o.length],s=t.get("inactiveOpacity"),l=t.get("activeOpacity"),u=t.getModel("lineStyle").getLineStyle(),h=t.coordinateSystem,c=t.getData(),d={normal:u.opacity,active:l,inactive:s};return c.setVisual("color",r),{progress:i}}};Pu(UE);var YE=(pD.extend({type:"series.gauge",getInitialData:function(){return tP(this,["value"])},defaultOption:{zlevel:0,z:2,center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,lineStyle:{color:[[.2,"#91c7ae"],[.8,"#63869e"],[1,"#c23531"]],width:30}},splitLine:{show:!0,length:30,lineStyle:{color:"#eee",width:2,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:8,lineStyle:{color:"#eee",width:1,type:"solid"}},axisLabel:{show:!0,distance:5,color:"auto"},pointer:{show:!0,length:"80%",width:8},itemStyle:{color:"auto"},title:{show:!0,offsetCenter:[0,"-40%"],color:"#333",fontSize:15},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"auto",fontSize:30}}}),no.extend({type:"echartsGaugePointer",shape:{angle:0,width:10,r:10,x:0,y:0},buildPath:function(t,e){var i=Math.cos,n=Math.sin,a=e.r,o=e.width,r=e.angle,s=e.x-i(r)*o*(o>=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)}})),jE=2*Math.PI,qE=(gl.extend({type:"gauge",render:function(t,e,i){this.group.removeAll();var n=t.get("axisLine.lineStyle.color"),a=Ov(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)%jE,d=u,f=s.get("width"),p=r.get("show"),g=0;p&&g<n.length;g++){var m=Math.min(Math.max(n[g][0],0),1),h=u+c*m,v=new ST({shape:{startAngle:d,endAngle:h,cx:a.cx,cy:a.cy,clockwise:l,r0:a.r-f,r:a.r},silent:!0});v.setStyle({fill:n[g][1]}),v.setStyle(s.getLineStyle(["color","borderWidth","borderColor"])),o.add(v),d=h}var y=function(t){if(0>=t)return n[0][1];for(var e=0;e<n.length;e++)if(n[e][0]>=t&&(0===e?0:n[e-1][0])<t)return n[e][1];return n[e-1][1]};if(!l){var x=u;u=h,h=x}this._renderTicks(t,e,i,y,a,u,h,l),this._renderPointer(t,e,i,y,a,u,h,l),this._renderTitle(t,e,i,y,a),this._renderDetail(t,e,i,y,a)},_renderTicks:function(t,e,i,n,a,o,r){for(var s=this.group,l=a.cx,u=a.cy,h=a.r,c=+t.get("min"),d=+t.get("max"),f=t.getModel("splitLine"),p=t.getModel("axisTick"),g=t.getModel("axisLabel"),m=t.get("splitNumber"),v=p.get("splitNumber"),y=Mr(f.get("length"),h),x=Mr(p.get("length"),h),_=o,w=(r-o)/m,b=w/v,S=f.getModel("lineStyle").getLineStyle(),M=p.getModel("lineStyle").getLineStyle(),I=0;m>=I;I++){var T=Math.cos(_),A=Math.sin(_);if(f.get("show")){var D=new OT({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=Nv(Ir(I/m*(d-c)+c),g.get("formatter")),L=g.get("distance"),k=n(I/m);s.add(new xT({style:Yo({},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 OT({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 YE({shape:{angle:o}});ar(i,{shape:{angle:Sr(c.get(d,e),u,h,!0)}},t),s.add(i),c.setItemGraphicEl(e,i)}).update(function(e,i){var n=l.getItemGraphicEl(i);nr(n,{shape:{angle:Sr(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:Mr(o.get("width"),a.r),r:Mr(o.get("length"),a.r)}),t.useStyle(i.getModel("itemStyle").getItemStyle()),"auto"===t.style.fill&&t.setStyle("fill",n(Sr(c.get(d,e),u,[0,1],!0))),Fo(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+Mr(l[0],a.r),h=a.cy+Mr(l[1],a.r),c=+t.get("min"),d=+t.get("max"),f=t.getData().get(r,0),p=n(Sr(f,[c,d],[0,1],!0));this.group.add(new xT({silent:!0,style:Yo({},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+Mr(l[0],a.r),h=a.cy+Mr(l[1],a.r),c=Mr(o.get("width"),a.r),d=Mr(o.get("height"),a.r),f=t.getData(),p=f.get(f.mapDimension("value"),0),g=n(Sr(p,[r,s],[0,1],!0));this.group.add(new xT({silent:!0,style:Yo({},o,{x:u,y:h,text:Nv(p,o.get("formatter")),textWidth:isNaN(c)?null:c,textHeight:isNaN(d)?null:d,textAlign:"center",textVerticalAlign:"middle"},{autoColor:g,forceRich:!0})}))}}}),Ru({type:"series.funnel",init:function(t){qE.superApply(this,"init",arguments),this.legendVisualProvider=new qd(y(this.getData,this),y(this.getRawData,this)),this._defaultLabelLine(t)},getInitialData:function(){return tP(this,{coordDimensions:["value"],encodeDefaulter:x(vs,this)})},_defaultLabelLine:function(t){ea(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=qE.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",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}}}})),KE=Ev.prototype,$E=["itemStyle","opacity"];KE.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($E);l=null==l?1:l,n.useStyle({}),i?(n.setShape({points:r.points}),n.setStyle({opacity:0}),ar(n,{style:{opacity:l}},a,e)):nr(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),Fo(this)},KE._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");nr(i,{shape:{points:s.linePoints||s.linePoints}},a,e),nr(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");Xo(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(Ev,aM);var JE=(gl.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 Ev(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=zv(t,e),r=Rv(i,a),s=[Mr(t.get("minSize"),o.width),Mr(t.get("maxSize"),o.width)],l=i.getDataExtent(n),u=t.get("min"),h=t.get("max");null==u&&(u=Math.min(l[0],0)),null==h&&(h=l[1]);var c=t.get("funnelAlign"),d=t.get("gap"),f=(o.height-d*(i.count()-1))/i.count(),p=o.y,g=function(t,e){var a,r=i.get(n,t)||0,l=Sr(r,[u,h],s,!0);switch(c){case"left":a=o.x;break;case"center":a=o.x+(o.width-l)/2;break;case"right":a=o.x+o.width-l}return[[a,e],[a+l,e]]};"ascending"===a&&(f=-f,d=-d,p+=o.height,r=r.reverse());for(var m=0;m<r.length;m++){var v=r[m],y=r[m+1],x=i.getItemModel(v),_=x.get("itemStyle.height");null==_?_=f:(_=Mr(_,o.height),"ascending"===a&&(_=-_));var w=g(v,p),b=g(y,p+_);p+=_+d,i.setItemLayout(v,{points:w.concat(b.slice().reverse())})}Bv(i)})});Pu(oP("funnel")),ku(JE),Tu(cP("funnel"));var QE=pD.extend({type:"series.sankey",layoutInfo:null,levelModels:null,getInitialData:function(t,e){function i(t,e){t.wrapMethod("getItemModel",function(t,e){return t.customizeGetParent(function(){var t=this.parentModel,i=t.getData().getItemLayout(e).depth,n=t.levelModels[i];return n||this.parentModel}),t}),e.wrapMethod("getItemModel",function(t,e){return t.customizeGetParent(function(){var t=this.parentModel,i=t.getGraph().getEdgeByIndex(e),n=i.node1.getLayout().depth,a=t.levelModels[n];return a||this.parentModel}),t})}for(var n=t.edges||t.links,a=t.data||t.nodes,o=t.levels,r=this.levelModels={},s=0;s<o.length;s++)null!=o[s].depth&&o[s].depth>=0&&(r[o[s].depth]=new mr(o[s],this,e));if(a&&n){var l=PN(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),Wr(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 Wr(o)}return QE.superCall(this,"formatTooltip",t,e)},optionUpdated:function(){var t=this.option;t.focusNodeAdjacency===!0&&(t.focusNodeAdjacency="allEdges")},getDataParams:function(t,e){var i=QE.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}}),tz=["itemStyle","opacity"],ez=["emphasis","itemStyle","opacity"],iz=["lineStyle","opacity"],nz=["emphasis","lineStyle","opacity"],az=yo({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")}});Bu({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 az;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")}Fo(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 kT({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();Xo(d.style,f,h,c,{labelFetcher:t,labelDataIndex:e.dataIndex,defaultText:e.id,isRectText:!0}),d.setStyle("fill",e.getVisual("color")),Fo(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(Wv(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){Gv(t,tz,.1)}),o.eachEdge(function(t){Gv(t,iz,.1)}),u){Fv(u,ez);var c=s.get("focusNodeAdjacency");"outEdges"===c?f(u.outEdges,function(t){t.dataIndex<0||(Fv(t,nz),Fv(t.node2,ez))}):"inEdges"===c?f(u.inEdges,function(t){t.dataIndex<0||(Fv(t,nz),Fv(t.node1,ez))}):"allEdges"===c&&f(u.edges,function(t){t.dataIndex<0||(Fv(t,nz),t.node1!==u&&Fv(t.node1,ez),t.node2!==u&&Fv(t.node2,ez))})}h&&(Fv(h,nz),Fv(h.node1,ez),Fv(h.node2,ez))}},unfocusNodeAdjacency:function(t){var e=t.getGraph();e.eachNode(function(t){Gv(t,tz)}),e.eachEdge(function(t){Gv(t,iz)})}}),Du({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 oz=function(t,e){t.eachSeriesByType("sankey",function(t){var i=t.get("nodeWidth"),n=t.get("nodeGap"),a=Hv(t,e);t.layoutInfo=a;var o=a.width,r=a.height,s=t.getGraph(),l=s.nodes,u=s.edges;Xv(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");Zv(l,u,i,n,o,r,c,d,f)})},rz=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 mO({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)})}})};ku(oz),Pu(rz);var sz=function(t,e,i,n,a){UL.call(this,t,e,i),this.type=n||"value",this.position=a||"bottom",this.orient=null};sz.prototype={constructor:sz,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(sz,UL),uy.prototype={type:"singleAxis",axisPointerEnabled:!0,constructor:uy,_init:function(t){var e=this.dimension,i=new sz(e,Xh(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),Zh(this._axis.scale,this._axis.model)}},this)},resize:function(t,e){this._rect=Qr({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}},Cs.register("single",{create:hy,dimensions:uy.prototype.dimensions});var lz=["axisLine","axisTickLabel","axisName"],uz=["splitArea","splitLine"],hz=Ak.extend({type:"singleAxis",axisPointerClass:"SingleAxisPointer",render:function(t,e,i,n){var a=this.group;a.removeAll();var o=this._axisGroup;this._axisGroup=new aM;var r=cy(t),s=new _k(t,r);f(lz,s.add,s),a.add(this._axisGroup),a.add(s.getGroup()),f(uz,function(e){t.get(e+".show")&&this["_"+e](t)},this),lr(o,this._axisGroup,t),hz.superCall(this,"render",t,e,i,n)},remove:function(){Sd(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;f<h.length;++f){var p=e.toGlobalCoord(h[f].coord);s?(c[0]=p,c[1]=r.y,d[0]=p,d[1]=r.y+r.height):(c[0]=r.x,c[1]=p,d[0]=r.x+r.width,d[1]=p);var g=u++%o.length;l[g]=l[g]||[],l[g].push(new OT({subPixelOptimize:!0,shape:{x1:c[0],y1:c[1],x2:d[0],y2:d[1]},style:{lineWidth:a},silent:!0}))}for(var f=0;f<l.length;++f)this.group.add(JT(l[f],{style:{stroke:o[f%o.length],lineDash:n.getLineDash(a),lineWidth:a},silent:!0}))}},_splitArea:function(t){bd(this,this._axisGroup,t,t)}}),cz=AA.extend({type:"singleAxis",layoutMode:"box",axis:null,coordinateSystem:null,getCoordSysModel:function(){return this}}),dz={left:"5%",top:"5%",right:"5%",bottom:"5%",type:"value",position:"bottom",orient:"horizontal",axisLine:{show:!0,lineStyle:{width:1,type:"solid"}},tooltip:{show:!0},axisTick:{show:!0,length:6,lineStyle:{width:1}},axisLabel:{show:!0,interval:"auto"},splitLine:{show:!0,lineStyle:{type:"dashed",opacity:.2}}};a(cz.prototype,kL),ek("single",cz,dy,dz);var fz=function(t,e){var i,n=[],a=t.seriesIndex;if(null==a||!(i=e.getSeriesByIndex(a)))return{point:[]};var o=i.getData(),r=ua(o,t);if(null==r||0>r||_(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}},pz=f,gz=x,mz=ha(),vz=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){by(a)&&(a=fz({seriesIndex:o.seriesIndex,dataIndex:o.dataIndex},e).point);var l=by(a),u=o.axesInfo,h=s.axesInfo,c="leave"===n||by(a),d={},f={},p={list:[],map:{}},g={showPointer:gz(gy,f),showTooltip:gz(my,p)};pz(s.coordSysMap,function(t,e){var i=l||t.containPoint(a);pz(s.coordSysAxesInfo[e],function(t){var e=t.axis,n=_y(u,t);if(!c&&i&&(!u||n)){var o=n&&n.value;null!=o||l||(o=e.pointToData(a)),null!=o&&fy(t,o,g,!1,d)}})});var m={};return pz(h,function(t,e){var i=t.linkGroup;i&&!f[e]&&pz(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,wy(e),wy(t)))),m[t.key]=o}})}),pz(m,function(t,e){fy(h[e],t,g,!0,d)}),vy(f,h,d),yy(p,a,t,r),xy(h,r,i),d}},yz=(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}}}),ha()),xz=f,_z=zu({type:"axisPointer",render:function(t,e,i){var n=e.getComponent("tooltip"),a=t.get("triggerOn")||n&&n.get("triggerOn")||"mousemove|click";Sy("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){Cy(e.getZr(),"axisPointer"),_z.superApply(this._model,"remove",arguments)},dispose:function(t,e){Cy("axisPointer",e),_z.superApply(this._model,"dispose",arguments)}}),wz=ha(),bz=n,Sz=y;Ly.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(ky,e,h);this.updatePointerEl(r,l,c,e),this.updateLabelEl(r,l,c,e)}else r=this._group=new aM,this.createPointerEl(r,l,t,e),this.createLabelEl(r,l,t,e),i.getZr().add(r);Ey(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=gd(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=wz(t).pointerEl=new iA[i.type](bz(e.pointer));t.add(n)}},createLabelEl:function(t,e,i,n){if(e.label){var a=wz(t).labelEl=new kT(bz(e.label));t.add(a),Oy(a,n)}},updatePointerEl:function(t,e,i){var n=wz(t).pointerEl;n&&e.pointer&&(n.setStyle(e.pointer.style),i(n,{shape:e.pointer.shape}))},updateLabelEl:function(t,e,i,n){var a=wz(t).labelEl;a&&(a.setStyle(e.label.style),i(a,{shape:e.label.shape,position:e.label.position}),Oy(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=cr(a.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){xS(t.event)},onmousedown:Sz(this._onHandleDragMove,this,0,0),drift:Sz(this._onHandleDragMove,this),ondragend:Sz(this._onHandleDragEnd,this)}),i.add(n)),Ey(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]),wl(this,"_doDispatchAxisPointer",a.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,r)}},_moveHandleToValue:function(t,e){ky(this._axisPointerModel,!e&&this._moveAnimation,this._handle,Ny(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},_onHandleDragMove:function(t,e){var i=this._handle;if(i){this._dragging=!0;var n=this.updateHandleTransform(Ny(i),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=n,i.stopAnimation(),i.attr(Ny(n)),wz(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]}}},Ly.prototype.constructor=Ly,xa(Ly);var Mz=Ly.extend({makeElOption:function(t,e,i,n,a){var o=i.axis,r=o.grid,s=n.get("type"),l=Xy(r,o).getOtherAxis(o).getGlobalExtent(),u=o.toGlobalCoord(o.dataToCoord(e,!0));if(s&&"none"!==s){var h=zy(n),c=Iz[s](o,u,l);c.style=h,t.graphicKey=c.type,t.pointer=c}var d=wd(r.model,i);Fy(e,t,d,i,n,a)},getHandleTransform:function(t,e,i){var n=wd(e.axis.grid.model,e,{labelInside:!1});return n.labelMargin=i.get("handle.margin"),{position:Gy(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=Xy(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]}}}),Iz={line:function(t,e,i){var n=Wy([e,i[0]],[e,i[1]],Uy(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:Hy([e-n/2,i[0]],[n,a],Uy(t))}}};Ak.registerAxisPointerClass("CartesianAxisPointer",Mz),Iu(function(t){if(t){(!t.axisPointer||0===t.axisPointer.length)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!_(e)&&(t.axisPointer.link=[e])}}),Tu(yC.PROCESSOR.STATISTIC,function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=ld(t,e)}),Du({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},vz);var Tz=["x","y"],Az=["width","height"],Dz=Ly.extend({makeElOption:function(t,e,i,n,a){var o=i.axis,r=o.coordinateSystem,s=jy(r,1-Yy(o)),l=r.dataToPoint(e)[0],u=n.get("type");if(u&&"none"!==u){var h=zy(n),c=Cz[u](o,l,s);c.style=h,t.graphicKey=c.type,t.pointer=c}var d=cy(i);Fy(e,t,d,i,n,a)},getHandleTransform:function(t,e,i){var n=cy(e,{labelInside:!1});return n.labelMargin=i.get("handle.margin"),{position:Gy(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=Yy(n),r=jy(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=jy(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"}}}}),Cz={line:function(t,e,i){var n=Wy([e,i[0]],[e,i[1]],Yy(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:Hy([e-n/2,i[0]],[n,a],Yy(t))}}};Ak.registerAxisPointerClass("SingleAxisPointer",Dz),zu({type:"single"});var Lz=2,kz=pD.extend({type:"series.themeRiver",dependencies:["singleAxis"],nameMap:null,init:function(){kz.superApply(this,"init",arguments),this.legendVisualProvider=new qd(y(this.getData,this),y(this.getRawData,this))},fixData:function(t){var e=t.length,i=ma(t,function(t){return t[2]}),n=[];i.buckets.each(function(t,e){n.push({name:e,dataList:t})});for(var a=n.length,o=-1,r=-1,s=0;a>s;++s){var l=n[s].dataList.length;l>o&&(o=l,r=s)}for(var u=0;a>u;++u)if(u!==r)for(var h=n[u].name,c=0;o>c;++c){for(var d=n[r].dataList[c][0],f=n[u].dataList.length,p=-1,g=0;f>g;++g){var m=n[u].dataList[g][0];if(m===d){p=g;break}}-1===p&&(t[e]=[],t[e][0]=d,t[e][1]=0,t[e][2]=h,e++)}return t},getInitialData:function(t,e){for(var i=e.queryComponents({mainType:"singleAxis",index:this.get("singleAxisIndex"),id:this.get("singleAxisId")})[0],n=i.get("type"),a=m(t.data,function(t){return void 0!==t[2]}),o=this.fixData(a||[]),r=[],s=this.nameMap=B(),l=0,u=0;u<o.length;++u)r.push(o[u][Lz]),s.get(o[u][Lz])||(s.set(o[u][Lz],l),l++);var h=tL(o,{coordDimensions:["single"],dimensionsDefine:[{name:"time",type:Yu(n)},{name:"value",type:"float"},{name:"name",type:"ordinal"}],encodeDefine:{single:0,value:1,itemName:2}}),c=new $C(h,this);return c.initData(o),c},getLayerSeries:function(){for(var t=this.getData(),e=t.count(),i=[],n=0;e>n;++n)i[n]=n;var a=t.mapDimension("single"),o=ma(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="-"),Wr(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}}}});Bu({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;p<f.length;p++){var g=n.getItemLayout(f[p]),m=g.x,v=g.y0,y=g.y;h.push([m,v]),d.push([m,v+y]),u=n.getItemVisual(f[p],"color")
}var x,_,w=n.getItemLayout(f[0]),b=n.getItemModel(f[p-1]),S=b.getModel("label"),M=S.get("margin");if("add"===e){var I=c[i]=new aM;x=new jk({shape:{points:h,stackedOnPoints:d,smooth:.4,stackedOnSmooth:.4,smoothConstraint:!1},z2:0}),_=new xT({style:{x:w.x-M,y:w.y0+w.y/2}}),I.add(x),I.add(_),a.add(I),x.setClipPath(qy(x.getBoundingRect(),t,function(){x.removeClipPath()}))}else{var I=l[s];x=I.childAt(0),_=I.childAt(1),a.add(I),c[i]=I,nr(x,{shape:{points:h,stackedOnPoints:d}},t),nr(_,{style:{x:w.x-M,y:w.y0+w.y/2}},t)}var T=b.getModel("emphasis.itemStyle"),A=b.getModel("itemStyle");Yo(_.style,S,{text:S.get("show")?t.getFormattedLabel(f[p-1],"normal")||n.getName(f[p-1]):null,textVerticalAlign:"middle"}),x.setStyle(r({fill:u},A.getItemStyle(["color"]))),Fo(x,T.getItemStyle())}var n=t.getData(),a=this.group,o=t.getLayerSeries(),s=n.getLayout("layoutInfo"),l=s.rect,u=s.boundaryGap;a.attr("position",[0,l.y+u[0]]);var h=new Hu(this._layersSeries||[],o,e,e),c={};h.add(y(i,this,"add")).update(y(i,this,"update")).remove(y(i,this,"remove")).execute(),this._layersSeries=o,this._layers=c},dispose:function(){}});var Pz=function(t){t.eachSeriesByType("themeRiver",function(t){var e=t.getData(),i=t.coordinateSystem,n={},a=i.getRect();n.rect=a;var o=t.get("boundaryGap"),r=i.getAxis();if(n.boundaryGap=o,"horizontal"===r.orient){o[0]=Mr(o[0],a.height),o[1]=Mr(o[1],a.height);var s=a.height-o[0]-o[1];Ky(e,t,s)}else{o[0]=Mr(o[0],a.width),o[1]=Mr(o[1],a.width);var l=a.width-o[0]-o[1];Ky(e,t,l)}e.setLayout("layoutInfo",n)})},Oz=function(t){t.eachSeriesByType("themeRiver",function(t){var e=t.getData(),i=t.getRawData(),n=t.get("color"),a=B();e.each(function(t){a.set(e.getRawIndex(t),t)}),i.each(function(o){var r=i.getName(o),s=n[(t.nameMap.get(r)-1)%n.length];i.setItemVisual(o,"color",s);var l=a.get(o);null!=l&&e.setItemVisual(l,"color",s)})})};ku(Pz),Pu(Oz),Tu(cP("themeRiver"));{var Nz=rk.extend({type:"series.pictorialBar",dependencies:["grid"],defaultOption:{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",progressive:0,hoverAnimation:!1},getInitialData:function(t){return t.stack=null,Nz.superApply(this,"getInitialData",arguments)}}),Ez=["itemStyle","borderWidth"],zz=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],Rz=new _T;Bu({type:"pictorialBar",render:function(t,e,i){var n=this.group,a=t.getData(),o=this._data,r=t.coordinateSystem,s=r.getBaseAxis(),l=!!s.isHorizontal(),u=r.grid.getRect(),h={ecSize:{width:i.getWidth(),height:i.getHeight()},seriesModel:t,coordSys:r,coordSysExtent:[[u.x,u.x+u.width],[u.y,u.y+u.height]],isHorizontal:l,valueDim:zz[+l],categoryDim:zz[1-l]};return a.diff(o).add(function(t){if(a.hasValue(t)){var e=ux(a,t),i=Jy(a,t,e,h),o=fx(a,h,i);a.setItemGraphicEl(t,o),n.add(o),xx(o,h,i)}}).update(function(t,e){var i=o.getItemGraphicEl(e);if(!a.hasValue(t))return void n.remove(i);var r=ux(a,t),s=Jy(a,t,r,h),l=mx(a,s);i&&l!==i.__pictorialShapeStr&&(n.remove(i),a.setItemGraphicEl(t,null),i=null),i?px(i,h,s):i=fx(a,h,s,!0),a.setItemGraphicEl(t,i),i.__pictorialSymbolMeta=s,n.add(i),xx(i,h,s)}).remove(function(t){var e=o.getItemGraphicEl(t);e&&gx(o,t,e.__pictorialSymbolMeta.animationModel,e)}).execute(),this._data=a,this.group},dispose:G,remove:function(t){var e=this.group,i=this._data;t.get("animation")?i&&i.eachItemGraphicEl(function(e){gx(i,e.dataIndex,t,e)}):e.removeAll()}})}ku(x(Rh,"pictorialBar")),Pu(qk("pictorialBar","roundRect"));var Bz=function(t){var e=t.grid.getRect();return{coordSys:{type:"cartesian2d",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(e){return t.dataToPoint(e)},size:y(bx,t)}}},Vz=function(t){var e=t.getBoundingRect();return{coordSys:{type:"geo",x:e.x,y:e.y,width:e.width,height:e.height,zoom:t.getZoom()},api:{coord:function(e){return t.dataToPoint(e)},size:y(Sx,t)}}},Gz=function(t){var e=t.getRect();return{coordSys:{type:"singleAxis",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(e){return t.dataToPoint(e)},size:y(Mx,t)}}},Fz=function(t){var e=t.getRadiusAxis(),i=t.getAngleAxis(),n=e.getExtent();return n[0]>n[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(Ix,t)}}},Wz=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)}}}},Hz=UT,Zz=["itemStyle"],Xz=["emphasis","itemStyle"],Uz=["label"],Yz=["emphasis","label"],jz="e\x00\x00",qz={cartesian2d:Bz,geo:Vz,singleAxis:Gz,polar:Fz,calendar:Wz};pD.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 yh(this.getSource(),this)},getDataParams:function(t,e,i){var n=pD.prototype.getDataParams.apply(this,arguments);return i&&(n.info=i.info),n}}),gl.extend({type:"custom",_data:null,render:function(t,e,i,n){var a=this._data,o=t.getData(),r=this.group,s=Cx(t,o,e,i);o.diff(a).add(function(e){kx(null,e,s(e,n),t,r,o)}).update(function(e,i){var l=a.getItemGraphicEl(i);kx(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)?Gc(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=Cx(e,r,i,n),l=t.start;l<t.end;l++){var u=kx(null,l,s(l,a),e,this.group,r);u.traverse(o)}},dispose:G,filterForExposedEvent:function(t,e,i){var n=e.element;if(null==n||i.name===n)return!0;for(;(i=i.parent)&&i!==this.group;)if(i.name===n)return!0;return!1}}),Yx.prototype={constructor:Yx,pointToData:function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},dataToRadius:UL.prototype.dataToCoord,radiusToData:UL.prototype.coordToData},h(Yx,UL);var Kz=ha();jx.prototype={constructor:jx,pointToData:function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},dataToAngle:UL.prototype.dataToCoord,angleToData:UL.prototype.coordToData,calculateCategoryInterval:function(){var t=this,e=t.getLabelModel(),i=t.scale,n=i.getExtent(),a=i.count();if(n[1]-n[0]<1)return 0;var o=n[0],r=t.dataToCoord(o+1)-t.dataToCoord(o),s=Math.abs(r),l=Xi(o,e.getFont(),"center","top"),u=Math.max(l.height,7),h=u/s;isNaN(h)&&(h=1/0);var c=Math.max(0,Math.floor(h)),d=Kz(t.model),f=d.lastAutoInterval,p=d.lastTickCount;return null!=f&&null!=p&&Math.abs(f-c)<=1&&Math.abs(p-a)<=1&&f>c?c=f:(d.lastTickCount=a,d.lastAutoInterval=c),c}},h(jx,UL);var $z=function(t){this.name=t||"",this.cx=0,this.cy=0,this._radiusAxis=new Yx,this._angleAxis=new jx,this._radiusAxis.polar=this._angleAxis.polar=this};$z.prototype={type:"polar",axisPointerEnabled:!0,constructor:$z,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 Jz=AA.extend({type:"polarAxis",axis:null,getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"polar",index:this.option.polarIndex,id:this.option.polarId})[0]}});a(Jz.prototype,kL);var Qz={angle:{startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:!1}},radius:{splitNumber:5}};ek("angle",Jz,qx,Qz.angle),ek("radius",Jz,qx,Qz.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 tR={dimensions:$z.prototype.dimensions,create:function(t,e){var i=[];return t.eachComponent("polar",function(t,n){var a=new $z(n);a.update=$x;var o=a.getRadiusAxis(),r=a.getAngleAxis(),s=t.findAxisModel("radiusAxis"),l=t.findAxisModel("angleAxis");Jx(o,s),Jx(r,l),Kx(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}};Cs.register("polar",tR);var eR=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];Ak.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});e_(s),e_(o),f(eR,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=t_(e),l=s?0:1;o=0===a[l]?new _T({shape:{cx:e.cx,cy:e.cy,r:a[s]},style:r.getLineStyle(),z2:1,silent:!0}):new MT({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[t_(e)],u=p(i,function(t){return new OT({shape:Qx(e,[l,l+r],t.coord)})});this.group.add(JT(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[t_(e)],h=[],c=0;c<n.length;c++)for(var d=0;d<n[c].length;d++)h.push(new OT({shape:Qx(e,[u,u+l],n[c][d].coord)}));this.group.add(JT(h,{style:s(r.getModel("lineStyle").getLineStyle(),s(o.getLineStyle(),{stroke:t.get("axisLine.lineStyle.color")}))}))}},_axisLabel:function(t,e,i,n,a,o){var r=t.getCategories(!0),s=t.getModel("axisLabel"),l=s.get("margin"),u=t.get("triggerEvent");f(o,function(i){var n=s,o=i.tickValue,h=a[t_(e)],c=e.coordToPoint([h+l,i.coord]),d=e.cx,f=e.cy,p=Math.abs(c[0]-d)/h<.3?"center":c[0]>d?"left":"right",g=Math.abs(c[1]-f)/h<.3?"middle":c[1]>f?"top":"bottom";r&&r[o]&&r[o].textStyle&&(n=new mr(r[o].textStyle,s,s.ecModel));var m=new xT({silent:_k.isLabelSilent(t)});this.group.add(m),Yo(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=_k.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;c<i.length;c++){var d=u++%l.length;h[d]=h[d]||[],h[d].push(new OT({shape:Qx(e,a,i[c].coord)}))}for(var c=0;c<h.length;c++)this.group.add(JT(h[c],{style:s({stroke:l[c%l.length]},r.getLineStyle()),silent:!0,z:t.get("z")}))},_minorSplitLine:function(t,e,i,n,a){if(n.length){for(var o=t.getModel("minorSplitLine"),r=o.getModel("lineStyle"),s=[],l=0;l<n.length;l++)for(var u=0;u<n[l].length;u++)s.push(new OT({shape:Qx(e,a,n[l][u].coord)}));this.group.add(JT(s,{style:r.getLineStyle(),silent:!0,z:t.get("z")}))}},_splitArea:function(t,e,i,n,a){if(i.length){var o=t.getModel("splitArea"),r=o.getModel("areaStyle"),l=r.get("color"),u=0;l=l instanceof Array?l:[l];for(var h=[],c=Math.PI/180,d=-i[0].coord*c,f=Math.min(a[0],a[1]),p=Math.max(a[0],a[1]),g=t.get("clockwise"),m=1;m<i.length;m++){var v=u++%l.length;h[v]=h[v]||[],h[v].push(new ST({shape:{cx:e.cx,cy:e.cy,r0:f,r:p,startAngle:d,endAngle:-i[m].coord*c,clockwise:g},silent:!0})),d=-i[m].coord*c}for(var m=0;m<h.length;m++)this.group.add(JT(h[m],{style:s({fill:l[m%l.length]},r.getAreaStyle()),silent:!0}))}}});var iR=["axisLine","axisTickLabel","axisName"],nR=["splitLine","splitArea","minorSplitLine"];Ak.extend({type:"radiusAxis",axisPointerClass:"PolarAxisPointer",render:function(t){if(this.group.removeAll(),t.get("show")){var e=t.axis,i=e.polar,n=i.getAngleAxis(),a=e.getTicksCoords(),o=e.getMinorTicksCoords(),r=n.getExtent()[0],s=e.getExtent(),l=i_(i,t,r),u=new _k(t,l);f(iR,u.add,u),this.group.add(u.getGroup()),f(nR,function(n){t.get(n+".show")&&!e.scale.isBlank()&&this["_"+n](t,i,r,s,a,o)},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;c<a.length;c++){var d=u++%l.length;h[d]=h[d]||[],h[d].push(new _T({shape:{cx:e.cx,cy:e.cy,r:a[c].coord}}))}for(var c=0;c<h.length;c++)this.group.add(JT(h[c],{style:s({stroke:l[c%l.length],fill:null},r.getLineStyle()),silent:!0}))},_minorSplitLine:function(t,e,i,n,a,o){if(o.length){for(var r=t.getModel("minorSplitLine"),l=r.getModel("lineStyle"),u=[],h=0;h<o.length;h++)for(var c=0;c<o[h].length;c++)u.push(new _T({shape:{cx:e.cx,cy:e.cy,r:o[h][c].coord}}));this.group.add(JT(u,{style:s({fill:null},l.getLineStyle()),silent:!0}))}},_splitArea:function(t,e,i,n,a){if(a.length){var o=t.getModel("splitArea"),r=o.getModel("areaStyle"),l=r.get("color"),u=0;l=l instanceof Array?l:[l];for(var h=[],c=a[0].coord,d=1;d<a.length;d++){var f=u++%l.length;h[f]=h[f]||[],h[f].push(new ST({shape:{cx:e.cx,cy:e.cy,r0:c,r:a[d].coord,startAngle:0,endAngle:2*Math.PI},silent:!0})),c=a[d].coord}for(var d=0;d<h.length;d++)this.group.add(JT(h[d],{style:s({fill:l[d%l.length]},r.getAreaStyle()),silent:!0}))}}});var aR=Ly.extend({makeElOption:function(t,e,i,n,a){var o=i.axis;"angle"===o.dim&&(this.animationThreshold=Math.PI/18);var r,s=o.polar,l=s.getOtherAxis(o),u=l.getExtent();r=o["dataTo"+jr(o.dim)](e);var h=n.get("type");if(h&&"none"!==h){var c=zy(n),d=oR[h](o,s,r,u,c);d.style=c,t.graphicKey=d.type,t.pointer=d}var f=n.get("label.margin"),p=n_(e,i,n,s,f);Ry(t,i,n,a,p)}}),oR={line:function(t,e,i,n){return"angle"===t.dim?{type:"Line",shape:Wy(e.coordToPoint([n[0],i]),e.coordToPoint([n[1],i]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r:i}}},shadow:function(t,e,i,n){var a=Math.max(1,t.getBandWidth()),o=Math.PI/180;return"angle"===t.dim?{type:"Sector",shape:Zy(e.cx,e.cy,n[0],n[1],(-i-a/2)*o,(-i+a/2)*o)}:{type:"Sector",shape:Zy(e.cx,e.cy,i-a/2,i+a/2,0,2*Math.PI)}}};Ak.registerAxisPointerClass("PolarAxisPointer",aR),ku(x(Xx,"bar")),zu({type:"polar"});var rR=AA.extend({type:"geo",coordinateSystem:null,layoutMode:"box",init:function(t){AA.prototype.init.apply(this,arguments),ea(t,"label",["show"])},optionUpdated:function(){var t=this.option,e=this;t.regions=sN.getFilledRegions(t.regions,t.map,t.nameMap),this._optionModelMap=g(t.regions||[],function(t,i){return i.name&&t.set(i.name,new mr(i,e)),t},B()),this.updateSelectedMap(t.regions)},defaultOption:{zlevel:0,z:0,show:!0,left:"center",top:"center",aspectScale:null,silent:!1,map:"",boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",color:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},regions:[]},getRegionModel:function(t){return this._optionModelMap.get(t)||new mr(null,this,this.ecModel)},getFormattedLabel:function(t,e){var i=this.getRegionModel(t),n=i.get("label"+("normal"===e?".":e+".")+"formatter"),a={name:t};return"function"==typeof n?(a.status=e,n(a)):"string"==typeof n?n.replace("{a}",null!=t?t:""):void 0},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t}});c(rR,eP),zu({type:"geo",init:function(t,e){var i=new Cg(e,!0);this._mapDraw=i,this.group.add(i.group)},render:function(t,e,i,n){if(!n||"geoToggleSelect"!==n.type||n.from!==this.uid){var a=this._mapDraw;t.get("show")?a.draw(t,e,i,this,n):this._mapDraw.group.removeAll(),this.group.silent=t.get("silent")}},dispose:function(){this._mapDraw&&this._mapDraw.remove()}}),a_("toggleSelected",{type:"geoToggleSelect",event:"geoselectchanged"}),a_("select",{type:"geoSelect",event:"geoselected"}),a_("unSelect",{type:"geoUnSelect",event:"geounselected"});var sR=864e5;o_.prototype={constructor:o_,type:"calendar",dimensions:["time","value"],getDimensionsInfo:function(){return[{name:"time",type:"time"},"value"]},getRangeInfo:function(){return this._rangeInfo},getModel:function(){return this._model},getRect:function(){return this._rect},getCellWidth:function(){return this._sw},getCellHeight:function(){return this._sh},getOrient:function(){return this._orient},getFirstDayOfWeek:function(){return this._firstDayOfWeek},getDateInfo:function(t){t=Or(t);var e=t.getFullYear(),i=t.getMonth()+1;i=10>i?"0"+i:i;var n=t.getDate();n=10>n?"0"+n:n;var 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=Qr(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.time<n.end.time+sR))return[0/0,0/0];var o=i.day,r=this._getRangeInfo([n.start.time,a]).nthWeek;return"vertical"===this._orient?[this._rect.x+o*this._sw+this._sw/2,this._rect.y+r*this._sh+this._sh/2]:[this._rect.x+r*this._sw+this._sw/2,this._rect.y+o*this._sh+this._sh/2]},pointToData:function(t){var e=this.pointToDate(t);return e&&e.time},dataToRect:function(t,e){var i=this.dataToPoint(t,e);return{contentShape:{x:i[0]-(this._sw-this._lineWidth)/2,y:i[1]-(this._sh-this._lineWidth)/2,width:this._sw-this._lineWidth,height:this._sh-this._lineWidth},center:i,tl:[i[0]-this._sw/2,i[1]-this._sh/2],tr:[i[0]+this._sw/2,i[1]-this._sh/2],br:[i[0]+this._sw/2,i[1]+this._sh/2],bl:[i[0]-this._sw/2,i[1]+this._sh/2]}},pointToDate:function(t){var e=Math.floor((t[0]-this._rect.x)/this._sw)+1,i=Math.floor((t[1]-this._rect.y)/this._sh)+1,n=this._rangeInfo.range;return"vertical"===this._orient?this._getDateByWeeksAndDay(i,e-1,n):this._getDateByWeeksAndDay(e,i-1,n)},convertToPixel:x(r_,"dataToPoint"),convertFromPixel:x(r_,"pointToData"),_initRangeOption:function(){var t=this._model.get("range"),e=t;if(_(e)&&1===e.length&&(e=e[0]),/^\d{4}$/.test(e)&&(t=[e+"-01-01",e+"-12-31"]),/^\d{4}[\/|-]\d{1,2}$/.test(e)){var i=this.getDateInfo(e),n=i.date;n.setMonth(n.getMonth()+1);var a=this.getNextNDay(n,-1);t=[i.formatedDate,a.formatedDate]}/^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(e)&&(t=[e,e]);var o=this._getRangeInfo(t);return o.start.time>o.end.time&&t.reverse(),t},_getRangeInfo:function(t){t=[this.getDateInfo(t[0]),this.getDateInfo(t[1])];var e;t[0].time>t[1].time&&(e=!0,t.reverse());var i=Math.floor(t[1].time/sR)-Math.floor(t[0].time/sR)+1,n=new Date(t[0].time),a=n.getDate(),o=t[1].date.getDate();if(n.setDate(a+i-1),n.getDate()!==o)for(var r=n.getTime()-t[1].time>0?1:-1;n.getDate()!==o&&(n.getTime()-t[1].time)*r>0;)i-=r,n.setDate(a+i-1);var s=Math.floor((i+t[0].day+6)/7),l=e?-s+1:s-1;return e&&t.reverse(),{range:[t[0].formatedDate,t[1].formatedDate],start:t[0],end:t[1],allDay:i,weeks:s,nthWeek:l,fweek:t[0].day,lweek:t[1].day}},_getDateByWeeksAndDay:function(t,e,i){var n=this._getRangeInfo(i);if(t>n.weeks||0===t&&e<n.fweek||t===n.weeks&&e>n.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)}},o_.dimensions=o_.prototype.dimensions,o_.getDimensionsInfo=o_.prototype.getDimensionsInfo,o_.create=function(t,e){var i=[];return t.eachComponent("calendar",function(n){var a=new o_(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},Cs.register("calendar",o_);var lR=AA.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=ns(t);lR.superApply(this,"init",arguments),s_(t,e)},mergeOption:function(t){lR.superApply(this,"mergeOption",arguments),s_(this.option,t)}}),uR={EN:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],CN:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},hR={EN:["S","M","T","W","T","F","S"],CN:["日","一","二","三","四","五","六"]};zu({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 kT({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 DT({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?Zr(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 xT({z2:30});Yo(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=uR[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;f<u[h].length-1;f++){var p=u[h][f].slice(),g=this._firstDayOfMonth[f];if(d){var m=this._firstDayPoints[f];p[c]=(m[c]+u[0][f+1][c])/2}var v=n.get("formatter"),y=a[+g.m-1],x={yyyy:g.y,yy:(g.y+"").slice(2),MM:g.m,M:+g.m,nameMap:y},_=this._formatterLabel(v,x),w=new xT({z2:30});r(Yo(w.style,n,{text:_}),this._monthTextPositionControl(p,d,e,s,o)),i.add(w)}}},_weekTextPositionControl:function(t,e,i,n,a){var o="center",r="middle",s=t[0],l=t[1],u="start"===i;return"horizontal"===e?(s=s+n+(u?1:-1)*a[0]/2,o=u?"right":"left"):(l=l+n+(u?1:-1)*a[1]/2,r=u?"bottom":"top"),{x:s,y:l,textAlign:o,textVerticalAlign:r}},_renderWeekText:function(t,e,i,n){var a=t.getModel("dayLabel");if(a.get("show")){var o=t.coordinateSystem,s=a.get("position"),l=a.get("nameMap"),u=a.get("margin"),h=o.getFirstDayOfWeek();b(l)&&(l=hR[l.toUpperCase()]||[]);var c=o.getNextNDay(e.end.time,7-e.lweek).time,d=[o.getCellWidth(),o.getCellHeight()];u=Mr(u,d["horizontal"===i?0:1]),"start"===s&&(c=o.getNextNDay(e.start.time,-(7+e.fweek)).time,u=-u);for(var f=0;7>f;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 xT({z2:30});r(Yo(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"}}}),zu({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 xT({style:Yo({},a,{text:t.get("text"),textFill:a.getTextColor()},{disableBox:!0}),z2:10}),u=l.getBoundingRect(),h=t.get("subtext"),c=new xT({style:Yo({},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(){window.open(d,"_"+t.get("target"))}),f&&c.on("click",function(){window.open(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=Qr(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 kT({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 cR=TD.legend.selector,dR={all:{type:"all",title:n(cR.all)},inverse:{type:"inverse",title:n(cR.inverse)}},fR=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){fR.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,dR[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<t.length;i++){var n=t[i].get("name");if(this.isSelected(n)){this.select(n),e=!0;break}}!e&&this.select(t[0].get("name"))}},_updateData:function(t){var e=[],i=[];t.eachRawSeries(function(n){var a=n.name;i.push(a);var o;if(n.legendVisualProvider){var r=n.legendVisualProvider,s=r.getAllNames();t.isSeriesFiltered(n)||(i=i.concat(s)),s.length?e=e.concat(s):o=!0}else o=!0;o&&ra(n)&&e.push(n.name)}),this._availableNames=i;var n=this.get("data")||e,a=p(n,function(t){return("string"==typeof t||"number"==typeof t)&&(t={name:t}),new mr(t,this,this.ecModel)},this);this._data=a},getData:function(){return this._data},select:function(t){var e=this.option.selected,i=this.get("selectedMode");if("single"===i){var n=this._data;f(n,function(t){e[t.get("name")]=!1})}e[t]=!0},unSelect:function(t){"single"!==this.get("selectedMode")&&(this.option.selected[t]=!1)},toggleSelected:function(t){var e=this.option.selected;e.hasOwnProperty(t)||(e[t]=!0),this[e[t]?"unSelect":"select"](t)},allSelect:function(){var t=this._data,e=this.option.selected;f(t,function(t){e[t.get("name",!0)]=!0})},inverseSelect:function(){var t=this._data,e=this.option.selected;f(t,function(t){var i=t.get("name",!0);e.hasOwnProperty(i)||(e[i]=!0),e[i]=!e[i]
})},isSelected:function(t){var e=this.option.selected;return!(e.hasOwnProperty(t)&&!e[t])&&u(this._availableNames,t)>=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}}});Du("legendToggleSelect","legendselectchanged",x(l_,"toggleSelected")),Du("legendAllSelect","legendselectall",x(l_,"allSelect")),Du("legendInverseSelect","legendinverseselect",x(l_,"inverseSelect")),Du("legendSelect","legendselected",x(l_,"select")),Du("legendUnSelect","legendunselected",x(l_,"unSelect"));var pR=x,gR=f,mR=aM,vR=zu({type:"legend.plain",newlineDisabled:!1,init:function(){this.group.add(this._contentGroup=new mR),this._backgroundEl,this.group.add(this._selectorGroup=new mR),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=Qr(u,h,c),f=this.layoutInner(t,a,d,n,r,l),p=Qr(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=h_(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)}),gR(e.getData(),function(a,o){var r=a.get("name");if(!this.newlineDisabled&&(""===r||"\n"===r))return void s.add(new mR({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",pR(d_,r,null,n,h)).on("mouseover",pR(f_,c.name,null,n,h)).on("mouseout",pR(p_,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",pR(d_,null,r,n,h)).on("mouseover",pR(f_,null,r,n,h)).on("mouseout",pR(p_,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 xT({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");Xo(o.style,o.hoverStyle={},r,s,{defaultText:t.title,isRectText:!1}),Fo(o)}var a=this.getSelectorGroup();gR(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 mR,x=i.getModel("textStyle"),_=i.get("icon"),w=i.getModel("tooltip"),b=w.parentModel;a=_||a;var S=tc(a,0,0,c,d,v?l:f,null==g?!0:g);if(y.add(c_(S,a,m,u,p,v)),!_&&o&&(o!==a||"none"===o)){var M=.8*d;"none"===o&&(o="circle");var I=tc(o,(c-M)/2,(d-M)/2,M,M,v?l:f,null==g?!0:g);y.add(c_(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 xT({style:Yo({},x,{text:C,x:T,y:d/2,textFill:v?x.getTextColor():f,textAlign:A,textVerticalAlign:"middle"})}));var L=new kT({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),Fo(y),y.__legendDataIndex=e,y},layoutInner:function(t,e,i,n,a,o){var r=this.getContentGroup(),s=this.getSelectorGroup();MA(t.get("orient"),r,t.get("itemGap"),i.width,i.height);var l=r.getBoundingRect(),u=[-l.x,-l.y];if(a){MA("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}}),yR=function(t){var e=t.findComponents({mainType:"legend"});e&&e.length&&t.filterSeries(function(t){for(var i=0;i<e.length;i++)if(!e[i].isSelected(t.name))return!1;return!0})};Tu(yC.PROCESSOR.SERIES_FILTER,yR),AA.registerSubTypeDefaulter("legend",function(){return"plain"});var xR=fR.extend({type:"legend.scroll",setScrollDataIndex:function(t){this.option.scrollDataIndex=t},defaultOption:{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:"end",pageFormatter:"{current}/{total}",pageIcons:{horizontal:["M0,0L12,-10L12,10z","M0,0L-12,-10L-12,10z"],vertical:["M0,0L20,0L10,-20z","M0,0L20,0L10,20z"]},pageIconColor:"#2f4554",pageIconInactiveColor:"#aaa",pageIconSize:15,pageTextStyle:{color:"#333"},animationDurationUpdate:800},init:function(t,e,i,n){var a=ns(t);xR.superCall(this,"init",t,e,i,n),g_(this,t,a)},mergeOption:function(t,e){xR.superCall(this,"mergeOption",t,e),g_(this,this.option,t)}}),_R=aM,wR=["width","height"],bR=["x","y"],SR=vR.extend({type:"legend.scroll",newlineDisabled:!0,init:function(){SR.superCall(this,"init"),this._currentIndex=0,this.group.add(this._containerGroup=new _R),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new _R),this._showController},resetInner:function(){SR.superCall(this,"resetInner"),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},renderInner:function(t,e,i,n,a,o,r){function s(t,i){var a=t+"DataIndex",o=cr(e.get("pageIcons",!0)[e.getOrient().name][i],{onclick:y(l._pageGo,l,a,e,n)},{x:-h[0]/2,y:-h[1]/2,width:h[0],height:h[1]});o.name=t,u.add(o)}var l=this;SR.superCall(this,"renderInner",t,e,i,n,a,o,r);var u=this._controllerGroup,h=e.get("pageIconSize",!0);_(h)||(h=[h,h]),s("pagePrev",0);var c=e.getModel("pageTextStyle");u.add(new xT({name:"pageText",style:{textFill:c.getTextColor(),font:c.getFont(),textVerticalAlign:"middle",textAlign:"center"},silent:!0})),s("pageNext",1)},layoutInner:function(t,e,i,a,o,r){var s=this.getSelectorGroup(),l=t.getOrient().index,u=wR[l],h=bR[l],c=wR[1-l],d=bR[1-l];o&&MA("horizontal",s,t.get("selectorItemGap",!0));var f=t.get("selectorButtonGap",!0),p=s.getBoundingRect(),g=[-p.x,-p.y],m=n(i);o&&(m[u]=i[u]-p[u]-f);var v=this._layoutContentAndController(t,a,m,l,u,c,d);if(o){if("end"===r)g[l]+=v[u]+f;else{var y=p[u]+f;g[l]-=y,v[h]-=y}v[u]+=p[u]+f,g[1-l]+=v[d]+v[c]/2-p[c]/2,v[c]=Math.max(v[c],p[c]),v[d]=Math.min(v[d],p[d]+g[1-l]),s.attr("position",g)}return v},_layoutContentAndController:function(t,e,i,n,a,o,r){var s=this.getContentGroup(),l=this._containerGroup,u=this._controllerGroup;MA(t.get("orient"),s,t.get("itemGap"),n?i.width:null,n?null:i.height),MA("horizontal",u,t.get("pageButtonItemGap",!0));var h=s.getBoundingRect(),c=u.getBoundingRect(),d=this._showController=h[a]>i[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 kT({shape:x})),l.__rectSize=x[a]}else u.eachChild(function(t){t.attr({invisible:!0,silent:!0})});var _=this._getPageInfo(t);return null!=_.pageIndex&&nr(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=wR[r],l=bR[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<y.i)||(y=v,null==p.pagePrevDataIndex&&(p.pagePrevDataIndex=v.i),++p.pageCount,++p.pageIndex),v=x;return p},_findTargetItemIndex:function(t){if(!this._showController)return 0;var e,i,n=this.getContentGroup();return n.eachChild(function(n,a){var o=n.__legendDataIndex;null==i&&null!=o&&(i=a),o===t&&(e=a)}),null!=e?e:i}});Du("legendScroll","legendscroll",function(t,e){var i=t.scrollDataIndex;null!=i&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},function(t){t.setScrollDataIndex(i)})}),Eu({type:"tooltip",dependencies:["axisPointer"],defaultOption:{zlevel:0,z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:!1,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"rgba(50,50,50,0.7)",borderColor:"#333",borderRadius:4,borderWidth:0,padding:5,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#fff",fontSize:14}}});var MR=f,IR=Fr,TR=["","-webkit-","-moz-","-o-"],AR="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;";__.prototype={constructor:__,_enterable:!0,update:function(){var t=this._container,e=t.currentStyle||document.defaultView.getComputedStyle(t),i=t.style;"absolute"!==i.position&&"absolute"!==e.position&&(i.position="relative")},show:function(t){clearTimeout(this._hideTimeout);var e=this.el,i=this._styleCoord;e.style.cssText=AR+y_(t)+";left:"+i[0]+"px;top:"+i[1]+"px;"+(t.get("extraCssText")||""),e.style.display=e.innerHTML?"block":"none",e.style.pointerEvents=this._enterable?"auto":"none",this._show=!0},setContent:function(t){this.el.innerHTML=null==t?"":t},setEnterable:function(t){this._enterable=t},getSize:function(){var t=this.el;return[t.clientWidth,t.clientHeight]},moveTo:function(t,e){var i=this._styleCoord;x_(i,this._zr,this._appendToBody,t,e);var n=this.el.style;n.left=i[0]+"px",n.top=i[1]+"px"},hide:function(){this.el.style.display="none",this._show=!1},hideLater:function(t){!this._show||this._inContent&&this._enterable||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(y(this.hide,this),t)):this.hide())},isShow:function(){return this._show},dispose:function(){this.el.parentNode.removeChild(this.el)},getOuterSize:function(){var t=this.el.clientWidth,e=this.el.clientHeight;if(document.defaultView&&document.defaultView.getComputedStyle){var i=document.defaultView.getComputedStyle(this.el);i&&(t+=parseInt(i.borderLeftWidth,10)+parseInt(i.borderRightWidth,10),e+=parseInt(i.borderTopWidth,10)+parseInt(i.borderBottomWidth,10))}return{width:t,height:e}}},w_.prototype={constructor:w_,_enterable:!0,update:function(){},show:function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.attr("show",!0),this._show=!0},setContent:function(t,e,i){this.el&&this._zr.remove(this.el);for(var n={},a=t,o="{marker",r="|}",s=a.indexOf(o);s>=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")}this.el=new xT({style:{rich:n,text:t,textLineHeight:20,textBackgroundColor:i.get("backgroundColor"),textBorderRadius:i.get("borderRadius"),textFill:i.get("textStyle.color"),textPadding:i.get("padding")},z:i.get("z")}),this._zr.add(this.el);var h=this;this.el.on("mouseover",function(){h._enterable&&(clearTimeout(h._hideTimeout),h._show=!0),h._inContent=!0}),this.el.on("mouseout",function(){h._enterable&&h._show&&h.hideLater(h._hideDelay),h._inContent=!1})},setEnterable:function(t){this._enterable=t},getSize:function(){var t=this.el.getBoundingRect();return[t.width,t.height]},moveTo:function(t,e){this.el&&this.el.attr("position",[t,e])},hide:function(){this.el&&this.el.hide(),this._show=!1},hideLater:function(t){!this._show||this._inContent&&this._enterable||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(y(this.hide,this),t)):this.hide())},isShow:function(){return this._show},getOuterSize:function(){var t=this.getSize();return{width:t[0],height:t[1]}}};var DR=y,CR=f,LR=Mr,kR=new kT({shape:{x:-1,y:-1,width:2,height:2}});zu({type:"tooltip",init:function(t,e){if(!Zb.node){var i=t.getComponent("tooltip"),n=i.get("renderMode");this._renderMode=ga(n);var a;"html"===this._renderMode?(a=new __(e.getDom(),e,{appendToBody:i.get("appendToBody",!0)}),this._newLine="<br/>"):(a=new w_(e),this._newLine="\n"),this._tooltipContent=a}},render:function(t,e,i){if(!Zb.node){this.group.removeAll(),this._tooltipModel=t,this._ecModel=e,this._api=i,this._lastDataByCoordSys=null,this._alwaysShowContent=t.get("alwaysShowContent");var n=this._tooltipContent;n.update(),n.setEnterable(t.get("enterable")),this._initGlobalListener(),this._keepShow()}},_initGlobalListener:function(){var t=this._tooltipModel,e=t.get("triggerOn");Sy("itemTooltip",this._api,DR(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&&!Zb.node){var a=S_(n,i);this._ticket="";var o=n.dataByCoordSys;if(n.tooltip&&null!=n.x&&null!=n.y){var r=kR;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=fz(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(S_(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=b_([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=b_([e.tooltipOption,n]),u=this._renderMode,h=this._newLine,c={};CR(t,function(t){CR(t.dataByAxis,function(t){var e=i.getComponent(t.axisDim+"Axis",t.axisIndex),n=t.value,o=[];if(e&&null!=n){var l=Vy(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=jh(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?Wr(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(),h=b_([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 mr(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=Hr(h,i,!0);else if("function"==typeof h){var d=DR(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=LR(e[0],s),n=LR(e[1],l);else if(S(e)){e.width=u[0],e.height=u[1];var f=Qr(e,{width:s,height:l});i=f.x,n=f.y,h=null,c=null}else if("string"==typeof e&&r){var p=T_(e,d,u);i=p[0],n=p[1]}else{var p=M_(i,n,a,s,l,h?null:20,c?null:20);i=p[0],n=p[1]}if(h&&(i-=A_(h)?u[0]/2:"right"===h?u[0]:0),c&&(n-=A_(c)?u[1]/2:"bottom"===c?u[1]:0),t.get("confine")){var p=I_(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&&CR(e,function(e,n){var a=e.dataByAxis||{},o=t[n]||{},r=o.dataByAxis||[];i&=a.length===r.length,i&&CR(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&&CR(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){Zb.node||(this._tooltipContent.dispose(),Cy("itemTooltip",e))}}),Du({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},function(){}),Du({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},function(){});var PR=Gr,OR=Wr,NR=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(Zb.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&&D_(i),f(i.data,function(t){t instanceof Array?(D_(t[0]),D_(t[1])):D_(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){var e=this.getData(),i=this.getRawValue(t),n=_(i)?p(i,PR).join(", "):PR(i),a=e.getName(t),o=OR(this.name);return(null!=i||a)&&(o+="<br />"),a&&(o+=OR(a),null!=i&&(o+=" : ")),null!=i&&(o+=OR(n)),o},getData:function(){return this._data},setData:function(t){this._data=t}});c(NR,hD),NR.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 ER=u,zR=x,RR={min:zR(k_,"min"),max:zR(k_,"max"),average:zR(k_,"average")},BR=zu({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(){}});BR.extend({type:"markPoint",updateTransform:function(t,e,i){e.eachSeries(function(t){var e=t.markPointModel;e&&(B_(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 Dd),u=V_(a,t,e);e.setData(u),B_(e.getData(),t,n),u.each(function(t){var i=u.getItemModel(t),n=i.getShallow("symbol"),a=i.getShallow("symbolSize"),o=w(n),s=w(a);if(o||s){var l=e.getRawValue(t),h=e.getDataParams(t);o&&(n=n(l,h)),s&&(a=a(l,h))}u.setItemVisual(t,{symbol:n,symbolSize:a,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")}}),Iu(function(t){t.markPoint=t.markPoint||{}}),NR.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 VR=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=O_(o,s,e,t);u=c.valueAxis;var d=vh(s,c.valueDataDim);h=R_(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=[P_(t,o[0]),P_(t,o[1]),r({},o[2])],o[2].type=o[2].type||"",a(o[2],o[0]),a(o[2],o[1]),o};BR.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){H_(a,e,!0,t,i),H_(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);H_(e,i,a,t,n),e.setItemVisual(i,{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 Xg);this.group.add(u.group);var h=Z_(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,{fromSymbolSize:c.getItemVisual(t,"symbolSize"),fromSymbol:c.getItemVisual(t,"symbol"),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")}}),Iu(function(t){t.markLine=t.markLine||{}}),NR.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 GR=function(t,e,i,n){var a=P_(t,n[0]),r=P_(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},FR=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]];BR.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(FR,function(a){return j_(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 aM});this.group.add(u.group),u.__keep=!0;var h=q_(a,t,e);e.setData(h),h.each(function(e){h.setItemLayout(e,p(FR,function(i){return j_(h,e,i,t,n)})),h.setItemVisual(e,{color:r.getVisual("color")})}),h.diff(u.__data).add(function(t){var e=new AT({shape:{points:h.getItemLayout(t)}});h.setItemGraphicEl(t,e),u.group.add(e)}).update(function(t,i){var n=u.__data.getItemGraphicEl(i);nr(n,{shape:{points:h.getItemLayout(t)}},e,t),u.group.add(n),h.setItemGraphicEl(t,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(),Xo(t.style,t.hoverStyle,a,o,{labelFetcher:e,labelDataIndex:i,defaultText:h.getName(i)||"",isRectText:!0,autoColor:r}),Fo(t,{}),t.dataModel=e}),u.__data=h,u.group.silent=e.get("silent")||t.get("silent")}}),Iu(function(t){t.markArea=t.markArea||{}});var WR=function(t){var e=t&&t.timeline;_(e)||(e=e?[e]:[]),f(e,function(t){t&&K_(t)})};AA.registerSubTypeDefaulter("timeline",function(){return"slider"}),Du({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)}),Du({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},function(t,e){var i=e.getComponent("timeline");i&&null!=t.playState&&i.setPlayState(t.playState)});var HR=AA.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(){HR.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=ia(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 $C([{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}}),ZR=HR.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(ZR,hD);var XR=gD.extend({type:"timeline"}),UR=function(t,e,i,n){UL.call(this,t,e,i),this.type=n||"value",this.model=null};UR.prototype={constructor:UR,getLabelModel:function(){return this.model.getModel("label")},isHorizontal:function(){return"horizontal"===this.model.get("orient")}},h(UR,UL);var YR=y,jR=f,qR=Math.PI;XR.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 Wr(r.scale.getLabel(t))},jR(["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=Q_(t,e);null==i||"auto"===i?i="horizontal"===n?a.y+a.height/2<e.getHeight()/2?"-":"+":a.x+a.width/2<e.getWidth()/2?"+":"-":isNaN(i)&&(i={horizontal:{top:"-",bottom:"+"},vertical:{left:"-",right:"+"}}[n][i]);var o={horizontal:"center",vertical:i>=0||"+"===i?"left":"right"},r={horizontal:i>=0||"+"===i?"top":"bottom",vertical:"middle"},s={horizontal:0,vertical:qR/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*qR/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;Re(s,s,[-l,-u]),Be(s,s,-qR/2),Re(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=Xh(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 UR("value",a,t.axisExtent,n);return r.model=e,r},_createGroup:function(t){var e=this["_"+t]=new aM;return this.group.add(e),e},_renderAxisLine:function(t,e,i,n){var a=i.getExtent();n.get("lineStyle.show")&&e.add(new OT({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();jR(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:YR(this._changeTimeline,this,t)},h=ew(r,s,e,u);Fo(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();jR(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 xT({position:[u,0],rotation:t.labelRotation-t.rotation,onclick:YR(this._changeTimeline,this,a),silent:!1});Yo(h.style,s,{text:n.formattedLabel,textAlign:t.labelAlign,textVerticalAlign:t.labelBaseline}),e.add(h),Fo(h,Yo({},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=tw(n,i,u,c);e.add(d),Fo(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",YR(this._changeTimeline,this,c?"-":"+")),a(t.prevBtnPosition,"controlStyle.prevIcon",YR(this._changeTimeline,this,c?"+":"-")),a(t.playPosition,"controlStyle."+(h?"stopIcon":"playIcon"),YR(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=YR(s._handlePointerDrag,s),t.ondragend=YR(s._handlePointerDragend,s),iw(t,o,i,n,!0)},onUpdate:function(t){iw(t,o,i,n)}};this._currentPointer=ew(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=Tr(n.getExtent().slice());i>a[1]&&(i=a[1]),i<a[0]&&(i=a[0]),this._currentPointer.position[0]=i,this._currentPointer.dirty();var o=this._findNearestTick(i),r=this.model;(e||o!==r.getCurrentIndex()&&r.get("realtime"))&&this._changeTimeline(o)},_doPlayStop:function(){function t(){var t=this.model;this._changeTimeline(t.getCurrentIndex()+(t.get("rewind",!0)?-1:1))}this._clearTimer(),this.model.getPlayState()&&(this._timer=setTimeout(YR(t,this),this.model.get("playInterval")))},_toAxisCoord:function(t){var e=this._mainGroup.getLocalTransform();return rr(t,e,!0)},_findNearestTick:function(t){var e,i=this.model.getData(),n=1/0,a=this._axis;return i.each(["value"],function(i,o){var r=a.dataToCoord(i),s=Math.abs(r-t);n>s&&(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})}}),Iu(WR),AA.registerSubTypeDefaulter("dataZoom",function(){return"slider"});var KR=["x","y","z","radius","angle","single"],$R=["cartesian2d","polar","singleAxis"],JR=aw(KR,["axisIndex","axis","index","id"]),QR=f,tB=Tr,eB=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};eB.prototype={constructor:eB,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(nw(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";fE(0,t,i,"all",h["min"+r],h["max"+r]);for(var s=0;2>s;s++)e[s]=Sr(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=[];QR(["start","end"],function(e,a){var h=t[e],c=t[e+"Value"];"percent"===r[a]?(null==h&&(h=s[a]),c=o.parse(Sr(h,s,n))):(i=!0,c=null==c?n[a]:o.parse(c),h=Sr(c,n,s)),u[a]=c,l[a]=h}),tB(u),tB(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=rw(this,this._dimName,e),uw(this);var i=this.calculateDataWindow(t.settledOption);this._valueWindow=i.valueWindow,this._percentWindow=i.percentWindow,lw(this)}},restore:function(t){t===this._dataZoomModel&&(this._valueWindow=this._percentWindow=null,lw(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&&QR(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;s<r.length;s++){var l=n.get(r[s],t),u=!isNaN(l),h=l<o[0],c=l>o[1];if(u&&!h&&!c)return!0;u&&(a=!0),h&&(e=!0),c&&(i=!0)}return a&&e&&i}):QR(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)}}),QR(r,function(t){n.setApproximateExtent(o,t)}))})}}};var iB=f,nB=JR,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=hw(t);this.settledOption=n,this.mergeDefaultAndTheme(t,i),this.doInit(n)},mergeOption:function(t){var e=hw(t);a(this.option,t,!0),a(this.settledOption,e,!0),this.doInit(e)},doInit:function(t){var e=this.option;Zb.canvasSupported||(e.realtime=!1),this._setDefaultThrottle(t),cw(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 eB(e.name,i,this,a));t[e.name+"_"+i]=r},this)},_resetTarget:function(){var t=this.option,e=this._judgeAutoMode();nB(function(e){var i=e.axisIndex;t[i]=ta(t[i])},this),"axisIndex"===e?this._autoSetAxisIndex():"orient"===e&&this._autoSetOrient()},_judgeAutoMode:function(){var t=this.option,e=!1;nB(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&&nB(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")&&nB(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 nB(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 nB(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;nB(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),cw(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()}}),oB=gD.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;o<i.length;o++)if(i[o].model===t){a=i[o];break}a||i.push(a={model:t,axisModels:[],coordIndex:n}),a.axisModels.push(e)}var e=this.dataZoomModel,i=this.ecModel,n={};return e.eachTargetAxis(function(e,a){var o=i.getComponent(e.axis,a);if(o){var r=o.getCoordSysModel();r&&t(r,o,n[r.mainType]||(n[r.mainType]=[]),r.componentIndex)}},this),n}}),rB=(aB.extend({type:"dataZoom.slider",layoutMode:"box",defaultOption:{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#2f4554",width:.5,opacity:.3},areaStyle:{color:"rgba(47,69,84,0.3)",opacity:.3}},borderColor:"#ddd",fillerColor:"rgba(167,183,204,0.4)",handleIcon:"M8.2,13.6V3.9H6.3v9.7H3.1v14.9h3.3v9.7h1.8v-9.7h3.3V13.6H8.2z M9.7,24.4H4.8v-1.4h4.9V24.4z M9.7,19.1H4.8v-1.4h4.9V19.1z",handleSize:"100%",handleStyle:{color:"#a7b7cc"},labelPrecision:null,labelFormatter:null,showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#333"}}}),kT),sB=Sr,lB=Tr,uB=y,hB=f,cB=7,dB=1,fB=30,pB="horizontal",gB="vertical",mB=5,vB=["line","bar","candlestick","scatter"],yB=oB.extend({type:"dataZoom.slider",init:function(t,e){this._displayables={},this._orient,this._range,this._handleEnds,this._size,this._handleWidth,this._handleHeight,this._location,this._dragging,this._dataShadowInfo,this.api=e},render:function(t,e,i,n){return yB.superApply(this,"render",arguments),wl(this,"_dispatchZoomAction",this.dataZoomModel.get("throttle"),"fixRate"),this._orient=t.get("orient"),this.dataZoomModel.get("show")===!1?void this.group.removeAll():(n&&"dataZoom"===n.type&&n.from===this.uid||this._buildView(),void this._updateView())},remove:function(){yB.superApply(this,"remove",arguments),bl(this,"_dispatchZoomAction")},dispose:function(){yB.superApply(this,"dispose",arguments),bl(this,"_dispatchZoomAction")},_buildView:function(){var t=this.group;t.removeAll(),this._resetLocation(),this._resetInterval();var e=this._displayables.barGroup=new aM;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(e),this._positionGroup()},_resetLocation:function(){var t=this.dataZoomModel,e=this.api,i=this._findCoordRect(),n={width:e.getWidth(),height:e.getHeight()},a=this._orient===pB?{right:n.width-i.x-i.width,top:n.height-fB-cB,width:i.width,height:fB}:{right:cB,top:i.y,width:fB,height:i.height},o=ns(t.option);f(["right","top","width","height"],function(t){"ph"===o[t]&&(o[t]=a[t])});var r=Qr(o,n,t.padding);this._location={x:r.x,y:r.y},this._size=[r.width,r.height],this._orient===gB&&this._size.reverse()},_positionGroup:function(){var t=this.group,e=this._location,i=this._orient,n=this.dataZoomModel.getFirstTargetAxisModel(),a=n&&n.get("inverse"),o=this._displayables.barGroup,r=(this._dataShadowInfo||{}).otherAxisInverse;o.attr(i!==pB||a?i===pB&&a?{scale:r?[-1,1]:[-1,-1]}:i!==gB||a?{scale:r?[-1,-1]:[-1,1],rotation:Math.PI/2}:{scale:r?[1,-1]:[1,1],rotation:Math.PI/2}:{scale:r?[1,1]:[1,-1]});var s=t.getBoundingRect([o]);t.attr("position",[e.x-s.x,e.y-s.y])},_getViewExtent:function(){return[0,this._size[0]]},_renderBackground:function(){var t=this.dataZoomModel,e=this._size,i=this._displayables.barGroup;i.add(new rB({silent:!0,shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:t.get("backgroundColor")},z2:-40})),i.add(new rB({shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:"transparent"},z2:0,onclick:y(this._onClickPanelClick,this)}))},_renderDataShadow:function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(t){var e=this._size,i=t.series,n=i.getRawData(),a=i.getShadowDim?i.getShadowDim():t.otherDim;if(null!=a){var o=n.getDataExtent(a),r=.3*(o[1]-o[0]);o=[o[0]-r,o[1]+r];var l,u=[0,e[1]],h=[0,e[0]],c=[[e[0],0],[0,0]],d=[],f=h[1]/(n.count()-1),p=0,g=Math.round(n.count()/e[0]);n.each([a],function(t,e){if(g>0&&e%g)return void(p+=f);var i=null==t||isNaN(t)||""===t,n=i?0:sB(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 AT({shape:{points:c},style:s({fill:m.get("dataBackgroundColor")},m.getModel("dataBackground.areaStyle").getAreaStyle()),silent:!0,z2:-20})),this._displayables.barGroup.add(new DT({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(vB,t.get("type"))<0)){var r,s=n.getComponent(a.axis,o).axis,l=dw(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 rB({draggable:!0,cursor:fw(this._orient),drift:uB(this._onDragMove,this,"all"),ondragstart:uB(this._showDataInfo,this,!0),ondragend:uB(this._onDragEnd,this),onmouseover:uB(this._showDataInfo,this,!0),onmouseout:uB(this._showDataInfo,this,!1),style:{fill:o.get("fillerColor"),textPosition:"inside"}})),n.add(new rB({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:a[0],height:a[1]},style:{stroke:o.get("dataBackgroundColor")||o.get("borderColor"),lineWidth:dB,fill:"rgba(0,0,0,0)"}})),hB([0,1],function(t){var a=cr(o.get("handleIcon"),{cursor:fw(this._orient),draggable:!0,drift:uB(this._onDragMove,this,t),ondragend:uB(this._onDragEnd,this),onmouseover:uB(this._showDataInfo,this,!0),onmouseout:uB(this._showDataInfo,this,!1)},{x:-1,y:0,width:2,height:2}),r=a.getBoundingRect();this._handleHeight=Mr(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 xT({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=[sB(t[0],[0,100],e,!0),sB(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];fE(e,n,a,i.get("zoomLock")?"all":t,null!=o.minSpan?sB(o.minSpan,r,a,!0):null,null!=o.maxSpan?sB(o.maxSpan,r,a,!0):null);var s=this._range,l=this._range=lB([sB(n[0],a,r,!0),sB(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=lB(i.slice()),a=this._size;hB([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=or(n.handles[t].parent,this.group),i=sr(0===t?"right":"left",e),s=this._handleWidth/2+mB,l=rr([c[t]+(0===t?-s:s),this._size[1]/2],e);a[t].setStyle({x:l[0],y:l[1],textVerticalAlign:o===pB?"middle":i,textAlign:o===pB?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=lB(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,xS(n.event);var a=this._displayables.barGroup.getLocalTransform(),o=rr([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(hB(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}});Tu({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]})})}}),Du("dataZoom",function(t,e){var i=ow(y(e.eachComponent,e,"dataZoom"),JR,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 xB="\x00_ec_dataZoom_roams",_B=y,wB=oB.extend({type:"dataZoom.inside",init:function(){this._range},render:function(t,e,i){wB.superApply(this,"render",arguments),this._range=t.getPercentRange(),f(this.getTargetCoordInfo(),function(e,n){var a=p(e,function(t){return mw(t.model)});f(e,function(e){var o=e.model,r={};f(["pan","zoom","scrollMove"],function(t){r[t]=_B(bB[t],this,e,n)},this),pw(i,{coordId:mw(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(){gw(this.api,this.dataZoomModel.id),wB.superApply(this,"dispose",arguments),this._range=null}}),bB={zoom:function(t,e,i,n){var a=this._range,o=a.slice(),r=t.axisModels[0];if(r){var s=SB[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 fE(0,o,[0,100],0,h.minSpan,h.maxSpan),this._range=o,a[0]!==o[0]||a[1]!==o[1]?o:void 0}},pan:bw(function(t,e,i,n,a,o){var r=SB[n]([o.oldX,o.oldY],[o.newX,o.newY],e,a,i);return r.signal*(t[1]-t[0])*r.pixel/r.pixelLength}),scrollMove:bw(function(t,e,i,n,a,o){var r=SB[n]([0,0],[o.scrollDelta,o.scrollDelta],e,a,i);return r.signal*(t[1]-t[0])*o.scrollDelta})},SB={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}},MB=["rect","polygon","keep","clear"],IB=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),Sw(s),e&&!s.length&&s.push.apply(s,MB)}},TB=f,AB={lineX:Cw(0),lineY:Cw(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])&&oc(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 oc(n,a,o)||oc(n,a+r,o)||oc(n,a,o+s)||oc(n,a+r,o+s)||Ti.create(t).contain(l[0],l[1])||dr(a,o,a+r,o,n)||dr(a,o,a,o+s,n)||dr(a+r,o,a+r,o+s,n)||dr(a,o+s,a+r,o+s,n)?!0:void 0}}},DB=f,CB=u,LB=x,kB=["dataToPoint","pointToData"],PB=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],OB=kw.prototype;OB.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=RB[t.brushType](0,i,e);t.__rangeOffset={offset:BB[t.brushType](n.values,t.range,[1,1]),xyMinMax:n.xyMinMax}}})},OB.matchOutputRanges=function(t,e,i){DB(t,function(t){var n=this.findTargetInfo(t,e);n&&n!==!0&&f(n.coordSyses,function(n){var a=RB[t.brushType](1,n,t.range);i(t,a.values,n,e)})},this)},OB.setInputRanges=function(t,e){DB(t,function(t){var i=this.findTargetInfo(t,e);if(t.range=t.range||[],i&&i!==!0){t.panelId=i.panelId;var n=RB[t.brushType](0,i.coordSys,t.coordRange),a=t.__rangeOffset;t.range=a?BB[t.brushType](n.values,a.offset,zw(n.xyMinMax,a.xyMinMax)):n.values}},this)},OB.makePanelOpts=function(t,e){return p(this._targetInfoList,function(i){var n=i.getPanelRect();return{panelId:i.panelId,defaultBrushType:e&&e(i),clipPath:vv(n),isTargetByCursor:xv(n,t,i.coordSysModel),getLinearBrushOtherExtent:yv(n)}})},OB.controlSeries=function(t,e,i){var n=this.findTargetInfo(t,i);return n===!0||n&&CB(n.coordSyses,e.coordinateSystem)>=0},OB.findTargetInfo=function(t,e){for(var i=this._targetInfoList,n=Ow(e,t),a=0;a<i.length;a++){var o=i[a],r=t.panelId;if(r){if(o.panelId===r)return o}else for(var a=0;a<EB.length;a++)if(EB[a](n,o))return o}return!0};var NB={grid:function(t,e){var i=t.xAxisModels,n=t.yAxisModels,a=t.gridModels,o=B(),r={},s={};(i||n||a)&&(DB(i,function(t){var e=t.axis.grid.model;o.set(e.id,e),r[e.id]=!0}),DB(n,function(t){var e=t.axis.grid.model;o.set(e.id,e),s[e.id]=!0}),DB(a,function(t){o.set(t.id,t),r[t.id]=!0,s[t.id]=!0}),o.each(function(t){var a=t.coordinateSystem,o=[];DB(a.getCartesians(),function(t){(CB(i,t.getAxis("x").model)>=0||CB(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:zB.grid,xAxisDeclared:r[t.id],yAxisDeclared:s[t.id]})}))},geo:function(t,e){DB(t.geoModels,function(t){var i=t.coordinateSystem;e.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:i,coordSyses:[i],getPanelRect:zB.geo})})}},EB=[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}],zB={grid:function(){return this.coordSys.grid.getRect().clone()},geo:function(){var t=this.coordSys,e=t.getBoundingRect().clone();return e.applyTransform(or(t)),e}},RB={lineX:LB(Nw,0),lineY:LB(Nw,1),rect:function(t,e,i){var n=e[kB[t]]([i[0][0],i[1][0]]),a=e[kB[t]]([i[0][1],i[1][1]]),o=[Pw([n[0],a[0]]),Pw([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[kB[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}}},BB={lineX:LB(Ew,0),lineY:LB(Ew,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]]})}},VB=["inBrush","outOfBrush"],GB="__ecBrushSelect",FB="__ecInBrushSelectEvent",WB=yC.VISUAL.BRUSH;ku(WB,function(t,e,i){t.eachComponent({mainType:"brush"},function(t){i&&"takeGlobalCursor"===i.type&&t.setBrushOption("brush"===i.key?i.brushOption:{brushType:!1})}),Bw(t)}),Pu(WB,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=Ww(i);if(o&&!Hw(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){Fw(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 Zw(s({boundingRect:HB[t.brushType](t)},t))}),S=Iw(e.option,VB,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=Ww(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 Fw(n,a,o,t)?(i.dataIndex.push(o.getRawIndex(t)),"inBrush"):"outOfBrush"};(l(e)?w:u(a))&&Aw(VB,S,o,r)})}),Vw(e,a,o,r,i)});{var HB={lineX:G,lineY:G,rect:function(t){return Xw(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][0]&&(e[0][0]=o[0]),o[0]>e[0][1]&&(e[0][1]=o[0]),o[1]<e[1][0]&&(e[1][0]=o[1]),o[1]>e[1][1]&&(e[1][1]=o[1])}return e&&Xw(e)}},ZB=["#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&&Tw(i,t,["inBrush","outOfBrush"]);var n=i.inBrush=i.inBrush||{};i.outOfBrush=i.outOfBrush||{color:ZB},n.hasOwnProperty("liftZ")||(n.liftZ=5)},setAreas:function(t){t&&(this.areas=p(t,function(t){return Uw(this.option,t)},this))},setBrushOption:function(t){this.brushOption=Uw(this.option,t),this.brushType=this.brushOption.brushType}})}zu({type:"brush",init:function(t,e){this.ecModel=t,this.api=e,this.model,(this._brushController=new Om(e.getZr())).on("brush",y(this._onBrush,this)).mount()},render:function(t){return this.model=t,Yw.apply(this,arguments)},updateTransform:function(t,e){return Bw(e),Yw.apply(this,arguments)},updateView:Yw,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})}}),Du({type:"brush",event:"brush"},function(t,e){e.eachComponent({mainType:"brush",query:t},function(e){e.setAreas(t.areas)})}),Du({type:"brushSelect",event:"brushSelected",update:"none"},function(){}),Du({type:"brushEnd",event:"brushEnd",update:"none"},function(){});var XB={},UB=TD.toolbox.brush;Kw.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(UB.title)};var YB=Kw.prototype;YB.render=YB.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")})},YB.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},YB.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}})},jw("brush",Kw),Iu(IB);var jB=f,qB=function(t){var e=t&&t.visualMap;_(e)||(e=e?[e]:[]),jB(e,function(t){if(t){$w(t,"splitList")&&!$w(t,"pieces")&&(t.pieces=t.splitList,delete t.splitList);var e=t.pieces;e&&_(e)&&jB(e,function(t){S(t)&&($w(t,"start")&&!$w(t,"min")&&(t.min=t.start),$w(t,"end")&&!$w(t,"max")&&(t.max=t.end))})}})};AA.registerSubTypeDefaulter("visualMap",function(t){return t.categories||(t.pieces?t.pieces.length>0:t.splitNumber>0)&&!t.calculable?"piecewise":"continuous"});var KB=yC.VISUAL.COMPONENT;Pu(KB,{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(Dw(e.stateList,e.targetVisuals,y(e.getValueState,e),e.getDataDimension(t.getData())))}),i}}),Pu(KB,{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(Jw,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 $B={get:function(t,e,i){var a=n((JB[t]||{})[e]);return i&&_(a)?a[a.length-1]:a}},JB={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]}},QB=mO.mapVisual,tV=mO.eachVisual,eV=_,iV=f,nV=Tr,aV=Sr,oV=G,rV=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;Zb.canvasSupported||(i.realtime=!1),!e&&Tw(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=Iw(this.option.controller,e,t),this.targetVisuals=Iw(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=ta(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=nV([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){eV(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=$B.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(mO.isValidType(e)){var i=$B.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=QB(s.symbol,function(t){return"none"===t||"square"===t?"roundRect":t});var l=s.symbolSize;if(null!=l){var u=-1/0;tV(l,function(t){t>u&&(u=t)}),s.symbolSize=QB(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:oV,getValueState:oV,getVisualMeta:oV}),sV=[20,140],lV=rV.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(){lV.superApply(this,"optionUpdated",arguments),this.resetExtent(),this.resetVisual(function(t){t.mappingMethod="linear",t.dataExtent=this.getExtent()}),this._resetRange()},resetItemSize:function(){lV.superApply(this,"resetItemSize",arguments);var t=this.itemSize;"horizontal"===this._orient&&t.reverse(),(null==t[0]||isNaN(t[0]))&&(t[0]=sV[0]),(null==t[1]||isNaN(t[1]))&&(t[1]=sV[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(){rV.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=Tr((this.get("range")||[]).slice());return e[0]>t[1]&&(e[0]=t[1]),e[1]>t[1]&&(e[1]=t[1]),e[0]<t[0]&&(e[0]=t[0]),e[1]<t[0]&&(e[1]=t[0]),e},getValueState:function(t){var e=this.option.range,i=this.getExtent();return(e[0]<=i[0]||e[0]<=t)&&(e[1]>=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=Qw(this,"outOfRange",this.getExtent()),n=Qw(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]<n[o]&&e(i[r],"outOfRange");for(var u=1;s>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]<i[r])&&(u&&(a.length&&e(a[a.length-1].value,"outOfRange"),u=0),e(i[r],"outOfRange"));var h=a.length;return{stops:a,outerColors:[h?a[0].color:"transparent",h?a[h-1].color:"transparent"]}}}),uV=zu({type:"visualMap",autoPositionValues:{left:1,right:1,top:1,bottom:1},init:function(t,e){this.ecModel=t,this.api=e,this.visualMapModel},render:function(t){return this.visualMapModel=t,t.get("show")===!1?void this.group.removeAll():void this.doRender.apply(this,arguments)},renderBackground:function(t){var e=this.visualMapModel,i=pA(e.get("padding")||0),n=t.getBoundingRect();t.add(new kT({z2:-1,silent:!0,shape:{x:n.x-i[3],y:n.y-i[0],width:n.width+i[3]+i[1],height:n.height+i[0]+i[2]},style:{fill:e.get("backgroundColor"),stroke:e.get("borderColor"),lineWidth:e.get("borderWidth")}}))},getControllerVisual:function(t,e,i){function n(t){return s[t]}function a(t,e){s[t]=e}i=i||{};var o=i.forceState,r=this.visualMapModel,s={};if("symbol"===e&&(s.symbol=r.get("itemSymbol")),"color"===e){var l=r.get("contentColor");s.color=l}var u=r.controllerVisuals[o||r.getValueState(t)],h=mO.prepareVisualTypes(u);return f(h,function(o){var r=u[o];i.convertOpacityToAlpha&&"opacity"===o&&(o="colorAlpha",r=u.__alphaForOpacity),mO.dependsOn(o,e)&&r&&r.applyVisual(t,n,a)}),s[e]},positionGroup:function(t){var e=this.visualMapModel,i=this.api;ts(t,e.getBoxLayoutParams(),{width:i.getWidth(),height:i.getHeight()})},doRender:G}),hV=Sr,cV=f,dV=Math.min,fV=Math.max,pV=12,gV=6,mV=uV.extend({type:"visualMap.continuous",init:function(){mV.superApply(this,"init",arguments),this._shapes={},this._dataInterval=[],this._handleEnds=[],this._orient,this._useHandle,this._hoverLinkDataIndices=[],this._dragging,this._hovering},doRender:function(t,e,i,n){n&&"selectDataRange"===n.type&&n.from===this.uid||this._buildView()},_buildView:function(){this.group.removeAll();var t=this.visualMapModel,e=this.group;this._orient=t.get("orient"),this._useHandle=t.get("calculable"),this._resetInterval(),this._renderBar(e);var i=t.get("text");this._renderEndsText(e,i,0),this._renderEndsText(e,i,1),this._updateView(!0),this.renderBackground(e),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(e)},_renderEndsText:function(t,e,i){if(e){var n=e[1-i];n=null!=n?n+"":"";var a=this.visualMapModel,o=a.get("textGap"),r=a.itemSize,s=this._shapes.barGroup,l=this._applyTransform([r[0]/2,0===i?-o:r[1]+o],s),u=this._applyTransform(0===i?"bottom":"top",s),h=this._orient,c=this.visualMapModel.textStyleModel;this.group.add(new xT({style:{x:l[0],y:l[1],textVerticalAlign:"horizontal"===h?"middle":u,textAlign:"horizontal"===h?u:"center",text:n,textFont:c.getFont(),textFill:c.getTextColor()}}))}},_renderBar:function(t){var e=this.visualMapModel,i=this._shapes,n=e.itemSize,a=this._orient,o=this._useHandle,r=tb(e,this.api,n),s=i.barGroup=this._createBarGroup(r);s.add(i.outOfRange=ib()),s.add(i.inRange=ib(null,o?sb(this._orient):null,y(this._dragHandle,this,"all",!1),y(this._dragHandle,this,"all",!0)));var l=e.textStyleModel.getTextRect("国"),u=fV(l.width,l.height);o&&(i.handleThumbs=[],i.handleLabels=[],i.handleLabelPoints=[],this._createHandle(s,0,n,u,a,r),this._createHandle(s,1,n,u,a,r)),this._createIndicator(s,n,u,a),t.add(s)},_createHandle:function(t,e,i,n,a){var o=y(this._dragHandle,this,e,!1),r=y(this._dragHandle,this,e,!0),s=ib(nb(e,n),sb(this._orient),o,r);s.position[0]=i[0],t.add(s);var l=this.visualMapModel.textStyleModel,u=new xT({draggable:!0,drift:o,onmousemove:function(t){xS(t.event)},ondragend:r,style:{x:0,y:0,text:"",textFont:l.getFont(),textFill:l.getTextColor()}});this.group.add(u);var h=["horizontal"===a?n/2:1.5*n,"horizontal"===a?0===e?-(1.5*n):1.5*n:0===e?-n/2:n/2],c=this._shapes;c.handleThumbs[e]=s,c.handleLabelPoints[e]=h,c.handleLabels[e]=u},_createIndicator:function(t,e,i,n){var a=ib([[0,0]],"move");a.position[0]=e[0],a.attr({invisible:!0,silent:!0}),t.add(a);var o=this.visualMapModel.textStyleModel,r=new xT({silent:!0,invisible:!0,style:{x:0,y:0,text:"",textFont:o.getFont(),textFill:o.getTextColor()}});this.group.add(r);var s=["horizontal"===n?i/2:gV+3,0],l=this._shapes;l.indicator=a,l.indicatorLabel=r,l.indicatorLabelPoint=s},_dragHandle:function(t,e,i,n){if(this._useHandle){if(this._dragging=!e,!e){var a=this._applyTransform([i,n],this._shapes.barGroup,!0);this._updateInterval(t,a[1]),this._updateView()}e===!this.visualMapModel.get("realtime")&&this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),e?!this._hovering&&this._clearHoverLinkToSeries():rb(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[t],!1)}},_resetInterval:function(){var t=this.visualMapModel,e=this._dataInterval=t.getSelected(),i=t.getExtent(),n=[0,t.itemSize[1]];this._handleEnds=[hV(e[0],i,n,!0),hV(e[1],i,n,!0)]},_updateInterval:function(t,e){e=e||0;var i=this.visualMapModel,n=this._handleEnds,a=[0,i.itemSize[1]];fE(e,n,a,t,0);var o=i.getExtent();this._dataInterval=[hV(n[0],a,o,!0),hV(n[1],a,o,!0)]},_updateView:function(t){var e=this.visualMapModel,i=e.getExtent(),n=this._shapes,a=[0,e.itemSize[1]],o=t?a:this._handleEnds,r=this._createBarVisual(this._dataInterval,i,o,"inRange"),s=this._createBarVisual(i,i,a,"outOfRange");n.inRange.setStyle({fill:r.barColor,opacity:r.opacity}).setShape("points",r.barPoints),n.outOfRange.setStyle({fill:s.barColor,opacity:s.opacity}).setShape("points",s.barPoints),this._updateHandle(o,r)},_createBarVisual:function(t,e,i,n){var a={forceState:n,convertOpacityToAlpha:!0},o=this._makeColorGradient(t,a),r=[this.getControllerVisual(t[0],"symbolSize",a),this.getControllerVisual(t[1],"symbolSize",a)],s=this._createBarPoints(i,r);return{barColor:new VT(0,0,0,1,o),barPoints:s,handlesColor:[o[0].color,o[o.length-1].color]}},_makeColorGradient:function(t,e){var i=100,n=[],a=(t[1]-t[0])/i;n.push({color:this.getControllerVisual(t[0],"color",e),offset:0});for(var o=1;i>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 aM("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;cV([0,1],function(r){var s=a[r];s.setStyle("fill",e.handlesColor[r]),s.position[1]=t[r];var l=rr(i.handleLabelPoints[r],or(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=hV(t,o,s,!0),u=this._shapes,h=u.indicator;if(h){h.position[1]=l,h.attr("invisible",!1),h.setShape("points",ab(!!i,n,l,r[1]));var c={convertOpacityToAlpha:!0},d=this.getControllerVisual(t,"color",c);h.setStyle("fill",d);var f=rr(u.indicatorLabelPoint,or(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]=dV(fV(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=dV(fV(a[0],t),a[1]);var r=ob(i,o,a),s=[t-r,t+r],l=hV(t,a,o,!0),u=[hV(s[0],a,o,!0),hV(s[1],a,o,!0)];s[0]<a[0]&&(u[0]=-1/0),s[1]>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||rb(i))&&(c=this._hoverLinkDataIndices=i.findTargetDataIndices(u));var d=la(h,c);this._dispatchHighDown("downplay",eb(d[0],i)),this._dispatchHighDown("highlight",eb(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",eb(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=or(e,n?null:this.group);return iA[_(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()}}),vV={type:"selectDataRange",event:"dataRangeSelected",update:"update"};Du(vV,function(t,e){e.eachComponent({mainType:"visualMap",query:t},function(e){e.setSelected(t.selected)})}),Iu(qB);{var yV=rV.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){yV.superApply(this,"optionUpdated",arguments),this._pieceList=[],this.resetExtent();var i=this._mode=this._determineMode();xV[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=mO.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]=$B.get(n,"inRange"===t?"active":"inactive",a)})},this),rV.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=mO.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=mO.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}}}}),xV={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);var r=0;t.minOpen&&e.push({index:r++,interval:[-1/0,n[0]],close:[0,0]});for(var s=n[0],l=r+a;l>r;s+=o){var u=r===a-1?n[1]:s+o;e.push({index:r++,interval:[s,u],close:[1,1]})}t.maxOpen&&e.push({index:r++,interval:[n[1],1/0],close:[0,0]}),Br(e),f(e,function(t){t.text=this.formatValueText(t.interval)},this)},categories:function(){var t=this.option;f(t.categories,function(t){this._pieceList.push({text:this.formatValueText(t,!0),value:t})},this),lb(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=mO.retrieveVisuals(t),e.push(n)},this),lb(t,e),Br(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)}};uV.extend({type:"visualMap.piecewise",doRender:function(){function t(t){var a=t.piece,u=new aM;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 xT({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),MA(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:eb(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 tb(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 aM,r=this.visualMapModel.textStyleModel;o.add(new xT({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(tc(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})}})}Iu(qB);var _V=Eu({type:"toolbox",layoutMode:{type:"box",ignoreSize:!0},optionUpdated:function(){_V.superApply(this,"optionUpdated",arguments),f(this.option.feature,function(t,e){var i=qw(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}}});zu({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 mr(f,t,t.ecModel);if(n&&null!=n.newTitle&&(f.title=n.newTitle),l&&!d){if(ub(l))s={model:p,onclick:p.option.onclick,featureName:l};else{var g=qw(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=cr(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)),Fo(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 Hu(this._featureNames||[],c).add(a).update(a).remove(x(a,null)).execute(),this._featureNames=c,u_(s,t,i),s.add(h_(s.getBoundingRect(),t)),s.eachChild(function(t){var e=t.__title,n=t.hoverStyle;if(n&&e){var a=Xi(e,sn(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 wV=TD.toolbox.saveAsImage;hb.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:wV.title,type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],pixelRatio:1,lang:wV.lang.slice()},hb.prototype.unusable=!Zb.canvasSupported;var bV=hb.prototype;bV.onclick=function(t,e){var i=this.model,n=i.get("name")||t.get("title.0.text")||"echarts",a=i.get("type",!0)||"png",o=e.getConnectedDataURL({type:a,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||Zb.browser.ie||Zb.browser.edge)if(window.navigator.msSaveOrOpenBlob){for(var r=atob(o.split(",")[1]),s=r.length,l=new Uint8Array(s);s--;)l[s]=r.charCodeAt(s);var u=new Blob([l]);window.navigator.msSaveOrOpenBlob(u,n+"."+a)}else{var h=i.get("lang"),c='<body style="margin:0;"><img src="'+o+'" style="max-width:100%;" title="'+(h&&h[0]||"")+'" /></body>',d=window.open();d.document.write(c)}else{var f=document.createElement("a");f.download=n+"."+a,f.target="_blank",f.href=o;var p=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!1});f.dispatchEvent(p)}},jw("saveAsImage",hb);var SV=TD.toolbox.magicType,MV="__ec_magicType_stack__";cb.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(SV.title),option:{},seriesIndex:{}};var IV=cb.prototype;IV.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 TV={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")===MV;return"line"===t||"bar"===t?(n.setIconStatus("stack",o?"normal":"emphasis"),a({id:e,stack:o?"":MV},n.get("option.stack")||{},!0)):void 0}},AV=[["line","bar"],["stack"]];IV.onclick=function(t,e,i){var o=this.model,r=o.get("seriesIndex."+i);if(TV[i]){var l={series:[]},h=function(e){var n=e.subType,a=e.id,r=TV[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(AV,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===MV;c=d?a({stack:SV.title.tiled},SV.title):n(SV.title)}e.dispatchAction({type:"changeMagicType",currentType:i,newOption:l,newTitle:c})}},Du({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(t,e){e.mergeOption(t.newOption)}),jw("magicType",cb);var DV=TD.toolbox.dataView,CV=new Array(60).join("-"),LV=" ",kV=new RegExp("["+LV+"]+","g");wb.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(DV.title),lang:n(DV.lang),backgroundColor:"#fff",textColor:"#000",textareaColor:"#fff",textareaBorderColor:"#333",buttonColor:"#c23531",buttonTextColor:"#fff"},wb.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=gb(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()):_b(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},wb.prototype.remove=function(t,e){this._dom&&e.getDom().removeChild(this._dom)},wb.prototype.dispose=function(t,e){this.remove(t,e)},jw("dataView",wb),Du({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:bb(t.data,a)})}else i.push(r({type:"scatter"},t))}),e.mergeOption(s({series:i},t.newOption))});var PV=f,OV="\x00_ec_hist_store";aB.extend({type:"dataZoom.select"}),oB.extend({type:"dataZoom.select"});var NV=TD.toolbox.dataZoom,EV=f,zV="\x00_ec_\x00toolbox-dataZoom_";Db.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(NV.title)};var RV=Db.prototype;RV.render=function(t,e,i,n){this.model=t,this.ecModel=e,this.api=i,kb(t,e,this,n,i),Lb(t,e)},RV.onclick=function(t,e,i){BV[i].call(this)},RV.remove=function(){this._brushController.unmount()},RV.dispose=function(){this._brushController.dispose()};var BV={zoom:function(){var t=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:t})},back:function(){this._dispatchZoomAction(Mb(this.ecModel))}};RV._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=fE(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 kw(Cb(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)}}),Sb(o,a),this._dispatchZoomAction(a)}},RV._dispatchZoomAction=function(t){var e=[];EV(t,function(t){e.push(n(t))}),e.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:e})},jw("dataZoom",Db),Iu(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:zV+t+r};s[a]=r,n.push(s)}})}}function i(e,i){var n=t[e];_(n)||(n=n?[n]:[]),EV(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 VV=TD.toolbox.restore;Pb.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:VV.title};var GV=Pb.prototype;GV.onclick=function(t,e){Ib(t),e.dispatchAction({type:"restore",from:this.uid})},jw("restore",Pb),Du({type:"restore",event:"restore",update:"prepareAndUpdate"},function(t,e){e.resetOption("recreate")});var FV={path:null,compoundPath:null,group:aM,image:Dn,text:xT};Iu(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 WV=Eu({type:"graphic",defaultOption:{elements:[],parentId:null},_elOptionsToUpdate:null,mergeOption:function(){var t=this.option.elements;this.option.elements=null,WV.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=aa(a,o);oa(r);var s=this._elOptionsToUpdate=[];f(r,function(t,e){var i=t.option;i&&(s.push(i),Rb(t,i),Bb(a,e,i),Vb(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}});zu({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=Eb(e);a&&"merge"!==a?"replace"===a?(Nb(r,i),Ob(o,l,h,i)):"remove"===a&&Nb(r,i):r?r.attr(h):Ob(o,l,h,i);var c=i.get(o);c&&(c.__ecGraphicWidthOption=e.width,c.__ecGraphicHeightOption=e.height,Gb(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<i.length;s++){var l=i[s],u=a.get(l.id);if(u&&u.isGroup){var h=u.parent,c=h===n;u.__ecGraphicWidth=Mr(u.__ecGraphicWidthOption,c?o:h.__ecGraphicWidth)||0,u.__ecGraphicHeight=Mr(u.__ecGraphicHeightOption,c?r:h.__ecGraphicHeight)||0}}for(var s=i.length-1;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};ts(u,l,d,null,{hv:l.hv,boundingMode:l.bounding})}}},_clear:function(){var t=this._elMap;t.each(function(e){Nb(e,t)}),this._elMap=B()},dispose:function(){this._clear()}}),t.version=aC,t.dependencies=oC,t.PRIORITY=yC,t.init=yu,t.connect=xu,t.disConnect=_u,t.disconnect=BC,t.dispose=wu,t.getInstanceByDom=bu,t.getInstanceById=Su,t.registerTheme=Mu,t.registerPreprocessor=Iu,t.registerProcessor=Tu,t.registerPostUpdate=Au,t.registerAction=Du,t.registerCoordinateSystem=Cu,t.getCoordinateSystemDimensions=Lu,t.registerLayout=ku,t.registerVisual=Pu,t.registerLoading=Nu,t.extendComponentModel=Eu,t.extendComponentView=zu,t.extendSeriesModel=Ru,t.extendChartView=Bu,t.setCanvasCreator=Vu,t.registerMap=Gu,t.getMap=Fu,t.dataTool=VC,t.zrender=iI,t.number=fA,t.format=_A,t.throttle=_l,t.helper=FL,t.matrix=TS,t.vector=hS,t.color=XS,t.parseGeoJSON=HL,t.parseGeoJson=YL,t.util=jL,t.graphic=qL,t.List=$C,t.Model=mr,t.Axis=UL,t.env=Zb});