echarts.min.js 349 KB

123456789101112
  1. !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.echarts={})}(this,function(t){"use strict";function e(t){var e={},n={},i=t.match(/Firefox\/([\d.]+)/),r=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),o=t.match(/Edge\/([\d.]+)/),a=/micromessenger/i.test(t);return i&&(n.firefox=!0,n.version=i[1]),r&&(n.ie=!0,n.version=r[1]),o&&(n.edge=!0,n.version=o[1]),a&&(n.weChat=!0),{browser:n,os:e,node:!1,canvasSupported:!!document.createElement("canvas").getContext,svgSupported:"undefined"!=typeof SVGRect,touchEventsSupported:"ontouchstart"in window&&!n.ie&&!n.edge,pointerEventsSupported:"onpointerdown"in window&&(n.edge||n.ie&&n.version>=11),domSupported:"undefined"!=typeof document}}function n(t,e){"createCanvas"===t&&(zf=null),Bf[t]=e}function i(t){if(null==t||"object"!=typeof t)return t;var e=t,n=If.call(t);if("[object Array]"===n){if(!z(t)){e=[];for(var r=0,o=t.length;o>r;r++)e[r]=i(t[r])}}else if(Tf[n]){if(!z(t)){var a=t.constructor;if(t.constructor.from)e=a.from(t);else{e=new a(t.length);for(var r=0,o=t.length;o>r;r++)e[r]=i(t[r])}}}else if(!Cf[n]&&!z(t)&&!T(t)){e={};for(var s in t)t.hasOwnProperty(s)&&(e[s]=i(t[s]))}return e}function r(t,e,n){if(!S(e)||!S(t))return n?i(e):t;for(var o in e)if(e.hasOwnProperty(o)){var a=t[o],s=e[o];!S(s)||!S(a)||x(s)||x(a)||T(s)||T(a)||M(s)||M(a)||z(s)||z(a)?!n&&o in t||(t[o]=i(e[o],!0)):r(a,s,n)}return t}function o(t,e){for(var n=t[0],i=1,o=t.length;o>i;i++)n=r(n,t[i],e);return n}function a(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function s(t,e,n){for(var i in e)e.hasOwnProperty(i)&&(n?null!=e[i]:null==t[i])&&(t[i]=e[i]);return t}function l(){return zf||(zf=Ef().getContext("2d")),zf}function u(t,e){if(t){if(t.indexOf)return t.indexOf(e);for(var n=0,i=t.length;i>n;n++)if(t[n]===e)return n}return-1}function h(t,e){function n(){}var i=t.prototype;n.prototype=e.prototype,t.prototype=new n;for(var r in i)i.hasOwnProperty(r)&&(t.prototype[r]=i[r]);t.prototype.constructor=t,t.superClass=e}function c(t,e,n){t="prototype"in t?t.prototype:t,e="prototype"in e?e.prototype:e,s(t,e,n)}function d(t){return t?"string"==typeof t?!1:"number"==typeof t.length:void 0}function f(t,e,n){if(t&&e)if(t.forEach&&t.forEach===Df)t.forEach(e,n);else if(t.length===+t.length)for(var i=0,r=t.length;r>i;i++)e.call(n,t[i],i,t);else for(var o in t)t.hasOwnProperty(o)&&e.call(n,t[o],o,t)}function p(t,e,n){if(t&&e){if(t.map&&t.map===Of)return t.map(e,n);for(var i=[],r=0,o=t.length;o>r;r++)i.push(e.call(n,t[r],r,t));return i}}function g(t,e,n,i){if(t&&e){if(t.reduce&&t.reduce===Lf)return t.reduce(e,n,i);for(var r=0,o=t.length;o>r;r++)n=e.call(i,n,t[r],r,t);return n}}function v(t,e,n){if(t&&e){if(t.filter&&t.filter===Af)return t.filter(e,n);for(var i=[],r=0,o=t.length;o>r;r++)e.call(n,t[r],r,t)&&i.push(t[r]);return i}}function m(t,e,n){if(t&&e)for(var i=0,r=t.length;r>i;i++)if(e.call(n,t[i],i,t))return t[i]}function y(t,e){var n=Pf.call(arguments,2);return function(){return t.apply(e,n.concat(Pf.call(arguments)))}}function _(t){var e=Pf.call(arguments,1);return function(){return t.apply(this,e.concat(Pf.call(arguments)))}}function x(t){return"[object Array]"===If.call(t)}function w(t){return"function"==typeof t}function b(t){return"[object String]"===If.call(t)}function S(t){var e=typeof t;return"function"===e||!!t&&"object"===e}function M(t){return!!Cf[If.call(t)]}function C(t){return!!Tf[If.call(t)]}function T(t){return"object"==typeof t&&"number"==typeof t.nodeType&&"object"==typeof t.ownerDocument}function I(t){return t!==t}function k(){for(var t=0,e=arguments.length;e>t;t++)if(null!=arguments[t])return arguments[t]}function D(t,e){return null!=t?t:e}function A(t,e,n){return null!=t?t:null!=e?e:n}function P(){return Function.call.apply(Pf,arguments)}function O(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 L(t,e){if(!t)throw new Error(e)}function B(t){return null==t?null:"function"==typeof t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}function E(t){t[Rf]=!0}function z(t){return t[Rf]}function R(t){function e(t,e){n?i.set(t,e):i.set(e,t)}var n=x(t);this.data={};var i=this;t instanceof R?t.each(e):t&&f(t,e)}function N(t){return new R(t)}function F(t,e){for(var n=new t.constructor(t.length+e.length),i=0;i<t.length;i++)n[i]=t[i];var r=t.length;for(i=0;i<e.length;i++)n[i+r]=e[i];return n}function H(){}function V(t,e){var n=new Ff(2);return null==t&&(t=0),null==e&&(e=0),n[0]=t,n[1]=e,n}function G(t,e){return t[0]=e[0],t[1]=e[1],t}function W(t){var e=new Ff(2);return e[0]=t[0],e[1]=t[1],e}function X(t,e,n){return t[0]=e,t[1]=n,t}function Y(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t}function U(t,e,n,i){return t[0]=e[0]+n[0]*i,t[1]=e[1]+n[1]*i,t}function j(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t}function q(t){return Math.sqrt(Z(t))}function Z(t){return t[0]*t[0]+t[1]*t[1]}function K(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t}function $(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t}function Q(t,e){return t[0]*e[0]+t[1]*e[1]}function J(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t}function te(t,e){var n=q(e);return 0===n?(t[0]=0,t[1]=0):(t[0]=e[0]/n,t[1]=e[1]/n),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 ne(t,e){return(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[1]=-e[1],t}function re(t,e,n,i){return t[0]=e[0]+i*(n[0]-e[0]),t[1]=e[1]+i*(n[1]-e[1]),t}function oe(t,e,n){var i=e[0],r=e[1];return t[0]=n[0]*i+n[2]*r+n[4],t[1]=n[1]*i+n[3]*r+n[5],t}function ae(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t}function se(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[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 n=t._$eventProcessor;return null!=e&&n&&n.normalizeQuery&&(e=n.normalizeQuery(e)),e}function ce(t,e,n,i,r,o){var a=t._$handlers;if("function"==typeof n&&(r=i,i=n,n=null),!i||!e)return t;n=he(t,n),a[e]||(a[e]=[]);for(var s=0;s<a[e].length;s++)if(a[e][s].h===i)return t;var l={h:i,one:o,query:n,ctx:r||t,callAtLast:i.zrEventfulCallAtLast},u=a[e].length-1,h=a[e][u];return h&&h.callAtLast?a[e].splice(u,0,l):a[e].push(l),t}function de(t,e,n,i,r,o){var a=i+"-"+r,s=t.length;if(o.hasOwnProperty(a))return o[a];if(1===e){var l=Math.round(Math.log((1<<s)-1&~r)/jf);return t[n][l]}for(var u=i|1<<n,h=n+1;i&1<<h;)h++;for(var c=0,d=0,f=0;s>d;d++){var p=1<<d;p&r||(c+=(f%2?-1:1)*t[n][d]*de(t,e-1,h,u,r|p,o),f++)}return o[a]=c,c}function fe(t,e){var n=[[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]]],i={},r=de(n,8,0,0,0,i);if(0!==r){for(var o=[],a=0;8>a;a++)for(var s=0;8>s;s++)null==o[s]&&(o[s]=0),o[s]+=((a+s)%2?-1:1)*de(n,7,0===a?1:0,1<<a,1<<s,i)/r*e[a];return function(t,e,n){var i=e*o[6]+n*o[7]+1;t[0]=(e*o[0]+n*o[1]+o[2])/i,t[1]=(e*o[3]+n*o[4]+o[5])/i}}}function pe(t,e,n,i,r){return ge(Zf,e,i,r,!0)&&ge(t,n,Zf[0],Zf[1])}function ge(t,e,n,i,r){if(e.getBoundingClientRect&&Mf.domSupported&&!ye(e)){var o=e[qf]||(e[qf]={}),a=ve(e,o),s=me(a,o,r);if(s)return s(t,n,i),!0}return!1}function ve(t,e){var n=e.markers;if(n)return n;n=e.markers=[];for(var i=["left","right"],r=["top","bottom"],o=0;4>o;o++){var a=document.createElement("div"),s=a.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",i[l]+":0",r[u]+":0",i[1-l]+":auto",r[1-u]+":auto",""].join("!important;"),t.appendChild(a),n.push(a)}return n}function me(t,e,n){for(var i=n?"invTrans":"trans",r=e[i],o=e.srcCoords,a=!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),a=a&&o&&d===o[c]&&f===o[c+1],l.push(t[u].offsetLeft,t[u].offsetTop)}return a&&r?r:(e.srcCoords=s,e[i]=n?fe(l,s):fe(s,l))}function ye(t){return"CANVAS"===t.nodeName.toUpperCase()}function _e(t,e,n,i){return n=n||{},i||!Mf.canvasSupported?xe(t,e,n):Mf.browser.firefox&&null!=e.layerX&&e.layerX!==e.offsetX?(n.zrX=e.layerX,n.zrY=e.layerY):null!=e.offsetX?(n.zrX=e.offsetX,n.zrY=e.offsetY):xe(t,e,n),n}function xe(t,e,n){if(Mf.domSupported&&t.getBoundingClientRect){var i=e.clientX,r=e.clientY;if(ye(t)){var o=t.getBoundingClientRect();return n.zrX=i-o.left,void(n.zrY=r-o.top)}if(ge(Qf,t,i,r))return n.zrX=Qf[0],void(n.zrY=Qf[1])}n.zrX=n.zrY=0}function we(t){return t||window.event}function be(t,e,n){if(e=we(e),null!=e.zrX)return e;var i=e.type,r=i&&i.indexOf("touch")>=0;if(r){var o="touchend"!==i?e.targetTouches[0]:e.changedTouches[0];o&&_e(t,o,e,n)}else _e(t,e,e,n),e.zrDelta=e.wheelDelta?e.wheelDelta/120:-(e.detail||0)/3;var a=e.button;return null==e.which&&void 0!==a&&$f.test(e.type)&&(e.which=1&a?1:2&a?3:4&a?2:0),e}function Se(t,e,n,i){Kf?t.addEventListener(e,n,i):t.attachEvent("on"+e,n)}function Me(t,e,n,i){Kf?t.removeEventListener(e,n,i):t.detachEvent("on"+e,n)}function Ce(t){var e=t[1][0]-t[0][0],n=t[1][1]-t[0][1];return Math.sqrt(e*e+n*n)}function Te(t){return[(t[0][0]+t[1][0])/2,(t[0][1]+t[1][1])/2]}function Ie(t,e,n){return{type:t,event:n,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:ke}}function ke(){Jf(this.event)}function De(){}function Ae(t,e,n){if(t[t.rectHover?"rectContain":"contain"](e,n)){for(var i,r=t;r;){if(r.clipPath&&!r.clipPath.contain(e,n))return!1;r.silent&&(i=!0),r=r.parent}return i?np:!0}return!1}function Pe(t,e,n){var i=t.painter;return 0>e||e>i.getWidth()||0>n||n>i.getHeight()}function Oe(){var t=new op(6);return Le(t),t}function Le(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function Be(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 Ee(t,e,n){var i=e[0]*n[0]+e[2]*n[1],r=e[1]*n[0]+e[3]*n[1],o=e[0]*n[2]+e[2]*n[3],a=e[1]*n[2]+e[3]*n[3],s=e[0]*n[4]+e[2]*n[5]+e[4],l=e[1]*n[4]+e[3]*n[5]+e[5];return t[0]=i,t[1]=r,t[2]=o,t[3]=a,t[4]=s,t[5]=l,t}function ze(t,e,n){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+n[0],t[5]=e[5]+n[1],t}function Re(t,e,n){var i=e[0],r=e[2],o=e[4],a=e[1],s=e[3],l=e[5],u=Math.sin(n),h=Math.cos(n);return t[0]=i*h+a*u,t[1]=-i*u+a*h,t[2]=r*h+s*u,t[3]=-r*u+h*s,t[4]=h*o+u*l,t[5]=h*l-u*o,t}function Ne(t,e,n){var i=n[0],r=n[1];return t[0]=e[0]*i,t[1]=e[1]*r,t[2]=e[2]*i,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*r,t}function Fe(t,e){var n=e[0],i=e[2],r=e[4],o=e[1],a=e[3],s=e[5],l=n*a-o*i;return l?(l=1/l,t[0]=a*l,t[1]=-o*l,t[2]=-i*l,t[3]=n*l,t[4]=(i*s-a*r)*l,t[5]=(o*r-n*s)*l,t):null}function He(t){var e=Oe();return Be(e,t),e}function Ve(t){return t>lp||-lp>t}function Ge(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 We(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 Ye(t){return 0>t?0:t>1?1:t}function Ue(t){return We(t.length&&"%"===t.charAt(t.length-1)?parseFloat(t)/100*255:parseInt(t,10))}function je(t){return Ye(t.length&&"%"===t.charAt(t.length-1)?parseFloat(t)/100:parseFloat(t))}function qe(t,e,n){return 0>n?n+=1:n>1&&(n-=1),1>6*n?t+(e-t)*n*6:1>2*n?e:2>3*n?t+(e-t)*(2/3-n)*6:t}function Ze(t,e,n){return t+(e-t)*n}function Ke(t,e,n,i,r){return t[0]=e,t[1]=n,t[2]=i,t[3]=r,t}function $e(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function Qe(t,e){bp&&$e(bp,e),bp=wp.put(t,bp||e.slice())}function Je(t,e){if(t){e=e||[];var n=wp.get(t);if(n)return $e(e,n);t+="";var i=t.replace(/ /g,"").toLowerCase();if(i in xp)return $e(e,xp[i]),Qe(t,e),e;if("#"!==i.charAt(0)){var r=i.indexOf("("),o=i.indexOf(")");if(-1!==r&&o+1===i.length){var a=i.substr(0,r),s=i.substr(r+1,o-(r+1)).split(","),l=1;switch(a){case"rgba":if(4!==s.length)return void Ke(e,0,0,0,1);l=je(s.pop());case"rgb":return 3!==s.length?void Ke(e,0,0,0,1):(Ke(e,Ue(s[0]),Ue(s[1]),Ue(s[2]),l),Qe(t,e),e);case"hsla":return 4!==s.length?void Ke(e,0,0,0,1):(s[3]=je(s[3]),tn(s,e),Qe(t,e),e);case"hsl":return 3!==s.length?void Ke(e,0,0,0,1):(tn(s,e),Qe(t,e),e);default:return}}Ke(e,0,0,0,1)}else{if(4===i.length){var u=parseInt(i.substr(1),16);return u>=0&&4095>=u?(Ke(e,(3840&u)>>4|(3840&u)>>8,240&u|(240&u)>>4,15&u|(15&u)<<4,1),Qe(t,e),e):void Ke(e,0,0,0,1)}if(7===i.length){var u=parseInt(i.substr(1),16);return u>=0&&16777215>=u?(Ke(e,(16711680&u)>>16,(65280&u)>>8,255&u,1),Qe(t,e),e):void Ke(e,0,0,0,1)}}}}function tn(t,e){var n=(parseFloat(t[0])%360+360)%360/360,i=je(t[1]),r=je(t[2]),o=.5>=r?r*(i+1):r+i-r*i,a=2*r-o;return e=e||[],Ke(e,We(255*qe(a,o,n+1/3)),We(255*qe(a,o,n)),We(255*qe(a,o,n-1/3)),1),4===t.length&&(e[3]=t[3]),e}function en(t){if(t){var e,n,i=t[0]/255,r=t[1]/255,o=t[2]/255,a=Math.min(i,r,o),s=Math.max(i,r,o),l=s-a,u=(s+a)/2;if(0===l)e=0,n=0;else{n=.5>u?l/(s+a):l/(2-s-a);var h=((s-i)/6+l/2)/l,c=((s-r)/6+l/2)/l,d=((s-o)/6+l/2)/l;i===s?e=d-c:r===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,n,u];return null!=t[3]&&f.push(t[3]),f}}function nn(t,e){var n=Je(t);if(n){for(var i=0;3>i;i++)n[i]=0>e?n[i]*(1-e)|0:(255-n[i])*e+n[i]|0,n[i]>255?n[i]=255:t[i]<0&&(n[i]=0);return un(n,4===n.length?"rgba":"rgb")}}function rn(t){var e=Je(t);return e?((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1):void 0}function on(t,e,n){if(e&&e.length&&t>=0&&1>=t){n=n||[];var i=t*(e.length-1),r=Math.floor(i),o=Math.ceil(i),a=e[r],s=e[o],l=i-r;return n[0]=We(Ze(a[0],s[0],l)),n[1]=We(Ze(a[1],s[1],l)),n[2]=We(Ze(a[2],s[2],l)),n[3]=Ye(Ze(a[3],s[3],l)),n}}function an(t,e,n){if(e&&e.length&&t>=0&&1>=t){var i=t*(e.length-1),r=Math.floor(i),o=Math.ceil(i),a=Je(e[r]),s=Je(e[o]),l=i-r,u=un([We(Ze(a[0],s[0],l)),We(Ze(a[1],s[1],l)),We(Ze(a[2],s[2],l)),Ye(Ze(a[3],s[3],l))],"rgba");return n?{color:u,leftIndex:r,rightIndex:o,value:i}:u}}function sn(t,e,n,i){return t=Je(t),t?(t=en(t),null!=e&&(t[0]=Xe(e)),null!=n&&(t[1]=je(n)),null!=i&&(t[2]=je(i)),un(tn(t),"rgba")):void 0}function ln(t,e){return t=Je(t),t&&null!=e?(t[3]=Ye(e),un(t,"rgba")):void 0}function un(t,e){if(t&&t.length){var n=t[0]+","+t[1]+","+t[2];return("rgba"===e||"hsva"===e||"hsla"===e)&&(n+=","+t[3]),e+"("+n+")"}}function hn(t,e){return t[e]}function cn(t,e,n){t[e]=n}function dn(t,e,n){return(e-t)*n+t}function fn(t,e,n){return n>.5?e:t}function pn(t,e,n,i,r){var o=t.length;if(1===r)for(var a=0;o>a;a++)i[a]=dn(t[a],e[a],n);else for(var s=o&&t[0].length,a=0;o>a;a++)for(var l=0;s>l;l++)i[a][l]=dn(t[a][l],e[a][l],n)}function gn(t,e,n){var i=t.length,r=e.length;if(i!==r){var o=i>r;if(o)t.length=r;else for(var a=i;r>a;a++)t.push(1===n?e[a]:Tp.call(e[a]))}for(var s=t[0]&&t[0].length,a=0;a<t.length;a++)if(1===n)isNaN(t[a])&&(t[a]=e[a]);else for(var l=0;s>l;l++)isNaN(t[a][l])&&(t[a][l]=e[a][l])}function vn(t,e,n){if(t===e)return!0;var i=t.length;if(i!==e.length)return!1;if(1===n){for(var r=0;i>r;r++)if(t[r]!==e[r])return!1}else for(var o=t[0].length,r=0;i>r;r++)for(var a=0;o>a;a++)if(t[r][a]!==e[r][a])return!1;return!0}function mn(t,e,n,i,r,o,a,s,l){var u=t.length;if(1===l)for(var h=0;u>h;h++)s[h]=yn(t[h],e[h],n[h],i[h],r,o,a);else for(var c=t[0].length,h=0;u>h;h++)for(var d=0;c>d;d++)s[h][d]=yn(t[h][d],e[h][d],n[h][d],i[h][d],r,o,a)}function yn(t,e,n,i,r,o,a){var s=.5*(n-t),l=.5*(i-e);return(2*(e-n)+s+l)*a+(-3*(e-n)-2*s-l)*o+s*r+e}function _n(t){if(d(t)){var e=t.length;if(d(t[0])){for(var n=[],i=0;e>i;i++)n.push(Tp.call(t[i]));return n}return Tp.call(t)}return t}function xn(t){return t[0]=Math.floor(t[0]),t[1]=Math.floor(t[1]),t[2]=Math.floor(t[2]),"rgba("+t.join(",")+")"}function wn(t){var e=t[t.length-1].value;return d(e&&e[0])?2:1}function bn(t,e,n,i,r,o){var a=t._getter,s=t._setter,l="spline"===e,u=i.length;if(u){var h,c=i[0].value,f=d(c),p=!1,g=!1,v=f?wn(i):0;i.sort(function(t,e){return t.time-e.time}),h=i[u-1].time;for(var m=[],y=[],_=i[0].value,x=!0,w=0;u>w;w++){m.push(i[w].time/h);var b=i[w].value;if(f&&vn(b,_,v)||!f&&b===_||(x=!1),_=b,"string"==typeof b){var S=Je(b);S?(b=S,p=!0):g=!0}y.push(b)}if(o||!x){for(var M=y[u-1],w=0;u-1>w;w++)f?gn(y[w],M,v):!isNaN(y[w])||isNaN(M)||g||p||(y[w]=M);f&&gn(a(t._target,r),M,v);var C,T,I,k,D,A,P=0,O=0;if(p)var L=[0,0,0,0];var B=function(t,e){var n;if(0>e)n=0;else if(O>e){for(C=Math.min(P+1,u-1),n=C;n>=0&&!(m[n]<=e);n--);n=Math.min(n,u-2)}else{for(n=P;u>n&&!(m[n]>e);n++);n=Math.min(n-1,u-2)}P=n,O=e;var i=m[n+1]-m[n];if(0!==i)if(T=(e-m[n])/i,l)if(k=y[n],I=y[0===n?n:n-1],D=y[n>u-2?u-1:n+1],A=y[n>u-3?u-1:n+2],f)mn(I,k,D,A,T,T*T,T*T*T,a(t,r),v);else{var o;if(p)o=mn(I,k,D,A,T,T*T,T*T*T,L,1),o=xn(L);else{if(g)return fn(k,D,T);o=yn(I,k,D,A,T,T*T,T*T*T)}s(t,r,o)}else if(f)pn(y[n],y[n+1],T,a(t,r),v);else{var o;if(p)pn(y[n],y[n+1],T,L,1),o=xn(L);else{if(g)return fn(y[n],y[n+1],T);o=dn(y[n],y[n+1],T)}s(t,r,o)}},E=new Ge({target:t._target,life:h,loop:t._loop,delay:t._delay,onframe:B,ondestroy:n});return e&&"spline"!==e&&(E.easing=e),E}}}function Sn(t,e,n,i,r,o,a,s){function l(){h--,h||o&&o()}b(i)?(o=r,r=i,i=0):w(r)?(o=r,r="linear",i=0):w(i)?(o=i,i=0):w(n)?(o=n,n=500):n||(n=500),t.stopAnimation(),Mn(t,"",t,e,n,i,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(r,a)}function Mn(t,e,n,i,r,o,a){var s={},l=0;for(var u in i)i.hasOwnProperty(u)&&(null!=n[u]?S(i[u])&&!d(i[u])?Mn(t,e?e+"."+u:u,n[u],i[u],r,o,a):(a?(s[u]=n[u],Cn(t,e,u,i[u])):s[u]=i[u],l++):null==i[u]||a||Cn(t,e,u,i[u]));l>0&&t.animate(e,!1).when(null==r?500:r,s).delay(o||0)}function Cn(t,e,n,i){if(e){var r={};r[e]={},r[e][n]=i,t.attr(r)}else t.attr(n,i)}function Tn(t,e,n,i){0>n&&(t+=n,n=-n),0>i&&(e+=i,i=-i),this.x=t,this.y=e,this.width=n,this.height=i}function In(t){for(var e=0;t>=Fp;)e|=1&t,t>>=1;return t+e}function kn(t,e,n,i){var r=e+1;if(r===n)return 1;if(i(t[r++],t[e])<0){for(;n>r&&i(t[r],t[r-1])<0;)r++;Dn(t,e,r)}else for(;n>r&&i(t[r],t[r-1])>=0;)r++;return r-e}function Dn(t,e,n){for(n--;n>e;){var i=t[e];t[e++]=t[n],t[n--]=i}}function An(t,e,n,i,r){for(i===e&&i++;n>i;i++){for(var o,a=t[i],s=e,l=i;l>s;)o=s+l>>>1,r(a,t[o])<0?l=o:s=o+1;var u=i-s;switch(u){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;u>0;)t[s+u]=t[s+u-1],u--}t[s]=a}}function Pn(t,e,n,i,r,o){var a=0,s=0,l=1;if(o(t,e[n+r])>0){for(s=i-r;s>l&&o(t,e[n+r+l])>0;)a=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s),a+=r,l+=r}else{for(s=r+1;s>l&&o(t,e[n+r-l])<=0;)a=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s);var u=a;a=r-l,l=r-u}for(a++;l>a;){var h=a+(l-a>>>1);o(t,e[n+h])>0?a=h+1:l=h}return l}function On(t,e,n,i,r,o){var a=0,s=0,l=1;if(o(t,e[n+r])<0){for(s=r+1;s>l&&o(t,e[n+r-l])<0;)a=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s);var u=a;a=r-l,l=r-u}else{for(s=i-r;s>l&&o(t,e[n+r+l])>=0;)a=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s),a+=r,l+=r}for(a++;l>a;){var h=a+(l-a>>>1);o(t,e[n+h])<0?l=h:a=h+1}return l}function Ln(t,e){function n(t,e){l[c]=t,u[c]=e,c+=1}function i(){for(;c>1;){var t=c-2;if(t>=1&&u[t-1]<=u[t]+u[t+1]||t>=2&&u[t-2]<=u[t]+u[t-1])u[t-1]<u[t+1]&&t--;else if(u[t]>u[t+1])break;o(t)}}function r(){for(;c>1;){var t=c-2;t>0&&u[t-1]<u[t+1]&&t--,o(t)}}function o(n){var i=l[n],r=u[n],o=l[n+1],h=u[n+1];u[n]=r+h,n===c-3&&(l[n+1]=l[n+2],u[n+1]=u[n+2]),c--;var d=On(t[o],t,i,r,0,e);i+=d,r-=d,0!==r&&(h=Pn(t[i+r-1],t,o,h,h-1,e),0!==h&&(h>=r?a(i,r,o,h):s(i,r,o,h)))}function a(n,i,r,o){var a=0;for(a=0;i>a;a++)d[a]=t[n+a];var s=0,l=r,u=n;if(t[u++]=t[l++],0!==--o){if(1===i){for(a=0;o>a;a++)t[u+a]=t[l+a];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===--i){p=!0;break}while(g>(c|f));if(p)break;do{if(c=On(t[l],d,s,i,0,e),0!==c){for(a=0;c>a;a++)t[u+a]=d[s+a];if(u+=c,s+=c,i-=c,1>=i){p=!0;break}}if(t[u++]=t[l++],0===--o){p=!0;break}if(f=Pn(d[s],t,l,o,0,e),0!==f){for(a=0;f>a;a++)t[u+a]=t[l+a];if(u+=f,l+=f,o-=f,0===o){p=!0;break}}if(t[u++]=d[s++],1===--i){p=!0;break}g--}while(c>=Hp||f>=Hp);if(p)break;0>g&&(g=0),g+=2}if(h=g,1>h&&(h=1),1===i){for(a=0;o>a;a++)t[u+a]=t[l+a];t[u+o]=d[s]}else{if(0===i)throw new Error;for(a=0;i>a;a++)t[u+a]=d[s+a]}}else for(a=0;i>a;a++)t[u+a]=d[s+a]}function s(n,i,r,o){var a=0;for(a=0;o>a;a++)d[a]=t[r+a];var s=n+i-1,l=o-1,u=r+o-1,c=0,f=0;if(t[u--]=t[s--],0!==--i){if(1===o){for(u-=i,s-=i,f=u+1,c=s+1,a=i-1;a>=0;a--)t[f+a]=t[c+a];return void(t[u]=d[l])}for(var p=h;;){var g=0,v=0,m=!1;do if(e(d[l],t[s])<0){if(t[u--]=t[s--],g++,v=0,0===--i){m=!0;break}}else if(t[u--]=d[l--],v++,g=0,1===--o){m=!0;break}while(p>(g|v));if(m)break;do{if(g=i-On(d[l],t,n,i,i-1,e),0!==g){for(u-=g,s-=g,i-=g,f=u+1,c=s+1,a=g-1;a>=0;a--)t[f+a]=t[c+a];if(0===i){m=!0;break}}if(t[u--]=d[l--],1===--o){m=!0;break}if(v=o-Pn(t[s],d,0,o,o-1,e),0!==v){for(u-=v,l-=v,o-=v,f=u+1,c=l+1,a=0;v>a;a++)t[f+a]=d[c+a];if(1>=o){m=!0;break}}if(t[u--]=t[s--],0===--i){m=!0;break}p--}while(g>=Hp||v>=Hp);if(m)break;0>p&&(p=0),p+=2}if(h=p,1>h&&(h=1),1===o){for(u-=i,s-=i,f=u+1,c=s+1,a=i-1;a>=0;a--)t[f+a]=t[c+a];t[u]=d[l]}else{if(0===o)throw new Error;for(c=u-(o-1),a=0;o>a;a++)t[c+a]=d[a]}}else for(c=u-(o-1),a=0;o>a;a++)t[c+a]=d[a]}var l,u,h=Hp,c=0,d=[];l=[],u=[],this.mergeRuns=i,this.forceMergeRuns=r,this.pushRun=n}function Bn(t,e,n,i){n||(n=0),i||(i=t.length);var r=i-n;if(!(2>r)){var o=0;if(Fp>r)return o=kn(t,n,i,e),void An(t,n,i,n+o,e);var a=new Ln(t,e),s=In(r);do{if(o=kn(t,n,i,e),s>o){var l=r;l>s&&(l=s),An(t,n,n+l,n+o,e),o=l}a.pushRun(n,o),a.mergeRuns(),r-=o,n+=o}while(0!==r);a.forceMergeRuns()}}function En(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}function zn(t,e,n){var i=null==e.x?0:e.x,r=null==e.x2?1:e.x2,o=null==e.y?0:e.y,a=null==e.y2?0:e.y2;e.global||(i=i*n.width+n.x,r=r*n.width+n.x,o=o*n.height+n.y,a=a*n.height+n.y),i=isNaN(i)?0:i,r=isNaN(r)?1:r,o=isNaN(o)?0:o,a=isNaN(a)?0:a;var s=t.createLinearGradient(i,o,r,a);return s}function Rn(t,e,n){var i=n.width,r=n.height,o=Math.min(i,r),a=null==e.x?.5:e.x,s=null==e.y?.5:e.y,l=null==e.r?.5:e.r;e.global||(a=a*i+n.x,s=s*r+n.y,l*=o);var u=t.createRadialGradient(a,s,0,a,s,l);return u}function Nn(){return!1}function Fn(t,e,n){var i=Ef(),r=e.getWidth(),o=e.getHeight(),a=i.style;return a&&(a.position="absolute",a.left=0,a.top=0,a.width=r+"px",a.height=o+"px",i.setAttribute("data-zr-dom-id",t)),i.width=r*n,i.height=o*n,i}function Hn(t){if("string"==typeof t){var e=tg.get(t);return e&&e.image}return t}function Vn(t,e,n,i,r){if(t){if("string"==typeof t){if(e&&e.__zrImageSrc===t||!n)return e;var o=tg.get(t),a={hostEl:n,cb:i,cbPayload:r};return o?(e=o.image,!Wn(e)&&o.pending.push(a)):(e=new Image,e.onload=e.onerror=Gn,tg.put(t,e.__cachedImgObj={image:e,pending:[a]}),e.src=e.__zrImageSrc=t),e}return t}return e}function Gn(){var t=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e<t.pending.length;e++){var n=t.pending[e],i=n.cb;i&&i(this,n.cbPayload),n.hostEl.dirty()}t.pending.length=0}function Wn(t){return t&&t.width&&t.height}function Xn(t,e){e=e||og;var n=t+":"+e;if(eg[n])return eg[n];for(var i=(t+"").split("\n"),r=0,o=0,a=i.length;a>o;o++)r=Math.max(ni(i[o],e).width,r);return ng>ig&&(ng=0,eg={}),ng++,eg[n]=r,r}function Yn(t,e,n,i,r,o,a,s){return a?jn(t,e,n,i,r,o,a,s):Un(t,e,n,i,r,o,s)}function Un(t,e,n,i,r,o,a){var s=ii(t,e,r,o,a),l=Xn(t,e);r&&(l+=r[1]+r[3]);var u=s.outerHeight,h=qn(0,l,n),c=Zn(0,u,i),d=new Tn(h,c,l,u);return d.lineHeight=s.lineHeight,d}function jn(t,e,n,i,r,o,a,s){var l=ri(t,{rich:a,truncate:s,font:e,textAlign:n,textPadding:r,textLineHeight:o}),u=l.outerWidth,h=l.outerHeight,c=qn(0,u,n),d=Zn(0,h,i);return new Tn(c,d,u,h)}function qn(t,e,n){return"right"===n?t-=e:"center"===n&&(t-=e/2),t}function Zn(t,e,n){return"middle"===n?t-=e/2:"bottom"===n&&(t-=e),t}function Kn(t,e,n){var i=e.textPosition,r=e.textDistance,o=n.x,a=n.y;r=r||0;var s=n.height,l=n.width,u=s/2,h="left",c="top";switch(i){case"left":o-=r,a+=u,h="right",c="middle";break;case"right":o+=r+l,a+=u,c="middle";break;case"top":o+=l/2,a-=r,h="center",c="bottom";break;case"bottom":o+=l/2,a+=s+r,h="center";break;case"inside":o+=l/2,a+=u,h="center",c="middle";break;case"insideLeft":o+=r,a+=u,c="middle";break;case"insideRight":o+=l-r,a+=u,h="right",c="middle";break;case"insideTop":o+=l/2,a+=r,h="center";break;case"insideBottom":o+=l/2,a+=s-r,h="center",c="bottom";break;case"insideTopLeft":o+=r,a+=r;break;case"insideTopRight":o+=l-r,a+=r,h="right";break;case"insideBottomLeft":o+=r,a+=s-r,c="bottom";break;case"insideBottomRight":o+=l-r,a+=s-r,h="right",c="bottom"}return t=t||{},t.x=o,t.y=a,t.textAlign=h,t.textVerticalAlign=c,t}function $n(t,e,n,i,r){if(!e)return"";var o=(t+"").split("\n");r=Qn(e,n,i,r);for(var a=0,s=o.length;s>a;a++)o[a]=Jn(o[a],r);return o.join("\n")}function Qn(t,e,n,i){i=a({},i),i.font=e;var n=D(n,"...");i.maxIterations=D(i.maxIterations,2);var r=i.minChar=D(i.minChar,0);i.cnCharWidth=Xn("国",e);var o=i.ascCharWidth=Xn("a",e);i.placeholder=D(i.placeholder,"");for(var s=t=Math.max(0,t-1),l=0;r>l&&s>=o;l++)s-=o;var u=Xn(n,e);return u>s&&(n="",u=0),s=t-u,i.ellipsis=n,i.ellipsisWidth=u,i.contentWidth=s,i.containerWidth=t,i}function Jn(t,e){var n=e.containerWidth,i=e.font,r=e.contentWidth;if(!n)return"";var o=Xn(t,i);if(n>=o)return t;for(var a=0;;a++){if(r>=o||a>=e.maxIterations){t+=e.ellipsis;break}var s=0===a?ti(t,r,e.ascCharWidth,e.cnCharWidth):o>0?Math.floor(t.length*r/o):0;t=t.substr(0,s),o=Xn(t,i)}return""===t&&(t=e.placeholder),t}function ti(t,e,n,i){for(var r=0,o=0,a=t.length;a>o&&e>r;o++){var s=t.charCodeAt(o);r+=s>=0&&127>=s?n:i}return o}function ei(t){return Xn("国",t)}function ni(t,e){return ag.measureText(t,e)}function ii(t,e,n,i,r){null!=t&&(t+="");var o=D(i,ei(e)),a=t?t.split("\n"):[],s=a.length*o,l=s,u=!0;if(n&&(l+=n[0]+n[2]),t&&r){u=!1;var h=r.outerHeight,c=r.outerWidth;if(null!=h&&l>h)t="",a=[];else if(null!=c)for(var d=Qn(c-(n?n[1]+n[3]:0),e,r.ellipsis,{minChar:r.minChar,placeholder:r.placeholder}),f=0,p=a.length;p>f;f++)a[f]=Jn(a[f],d)}return{lines:a,height:s,outerHeight:l,lineHeight:o,canCacheByTextString:u}}function ri(t,e){var n={lines:[],width:0,height:0};if(null!=t&&(t+=""),!t)return n;for(var i,r=rg.lastIndex=0;null!=(i=rg.exec(t));){var o=i.index;o>r&&oi(n,t.substring(r,o)),oi(n,i[2],i[1]),r=rg.lastIndex}r<t.length&&oi(n,t.substring(r,t.length));var a=n.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<a.length;p++){for(var g=a[p],v=0,m=0,y=0;y<g.tokens.length;y++){var _=g.tokens[y],x=_.styleName&&e.rich[_.styleName]||{},w=_.textPadding=x.textPadding,b=_.font=x.font||e.font,S=_.textHeight=D(x.textHeight,ei(b));if(w&&(S+=w[0]+w[2]),_.height=S,_.lineHeight=A(x.textLineHeight,e.textLineHeight,S),_.textAlign=x&&x.textAlign||e.textAlign,_.textVerticalAlign=x&&x.textVerticalAlign||"middle",null!=f&&s+_.lineHeight>f)return{lines:[],width:0,height:0};_.textWidth=Xn(_.text,b);var M=x.textWidth,C=null==M||"auto"===M;if("string"==typeof M&&"%"===M.charAt(M.length-1))_.percentWidth=M,u.push(_),M=0;else{if(C){M=_.textWidth;var T=x.textBackgroundColor,I=T&&T.image;I&&(I=Hn(I),Wn(I)&&(M=Math.max(M,I.width*S/I.height)))}var k=w?w[1]+w[3]:0;M+=k;var P=null!=d?d-m:null;null!=P&&M>P&&(!C||k>P?(_.text="",_.textWidth=M=0):(_.text=$n(_.text,P-k,b,c.ellipsis,{minChar:c.minChar}),_.textWidth=Xn(_.text,b),M=_.textWidth+k))}m+=_.width=M,x&&(v=Math.max(v,_.lineHeight))}g.width=m,g.lineHeight=v,s+=v,l=Math.max(l,m)}n.outerWidth=n.width=D(e.textWidth,l),n.outerHeight=n.height=D(e.textHeight,s),h&&(n.outerWidth+=h[1]+h[3],n.outerHeight+=h[0]+h[2]);for(var p=0;p<u.length;p++){var _=u[p],O=_.percentWidth;_.width=parseInt(O,10)/100*l}return n}function oi(t,e,n){for(var i=""===e,r=e.split("\n"),o=t.lines,a=0;a<r.length;a++){var s=r[a],l={styleName:n,text:s,isLineHolder:!s&&!i};if(a)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||i)&&u.push(l)}}}function ai(t){var e=(t.fontSize||t.fontFamily)&&[t.fontStyle,t.fontWeight,(t.fontSize||12)+"px",t.fontFamily||"sans-serif"].join(" ");return e&&B(e)||t.textFont||t.font}function si(t,e){var n,i,r,o,a=e.x,s=e.y,l=e.width,u=e.height,h=e.r;0>l&&(a+=l,l=-l),0>u&&(s+=u,u=-u),"number"==typeof h?n=i=r=o=h:h instanceof Array?1===h.length?n=i=r=o=h[0]:2===h.length?(n=r=h[0],i=o=h[1]):3===h.length?(n=h[0],i=o=h[1],r=h[2]):(n=h[0],i=h[1],r=h[2],o=h[3]):n=i=r=o=0;var c;n+i>l&&(c=n+i,n*=l/c,i*=l/c),r+o>l&&(c=r+o,r*=l/c,o*=l/c),i+r>u&&(c=i+r,i*=u/c,r*=u/c),n+o>u&&(c=n+o,n*=u/c,o*=u/c),t.moveTo(a+n,s),t.lineTo(a+l-i,s),0!==i&&t.arc(a+l-i,s+i,i,-Math.PI/2,0),t.lineTo(a+l,s+u-r),0!==r&&t.arc(a+l-r,s+u-r,r,0,Math.PI/2),t.lineTo(a+o,s+u),0!==o&&t.arc(a+o,s+u-o,o,Math.PI/2,Math.PI),t.lineTo(a,s+n),0!==n&&t.arc(a+n,s+n,n,Math.PI,1.5*Math.PI)}function li(t){return ui(t),f(t.rich,ui),t}function ui(t){if(t){t.font=ai(t);var e=t.textAlign;"middle"===e&&(e="center"),t.textAlign=null==e||lg[e]?e:"left";var n=t.textVerticalAlign||t.textBaseline;"center"===n&&(n="middle"),t.textVerticalAlign=null==n||ug[n]?n:"top";var i=t.textPadding;i&&(t.textPadding=O(t.textPadding))}}function hi(t,e,n,i,r,o){i.rich?di(t,e,n,i,r,o):ci(t,e,n,i,r,o)}function ci(t,e,n,i,r,o){var a,s=vi(i),l=!1,u=e.__attrCachedBy===Xp.PLAIN_TEXT;o!==Yp?(o&&(a=o.style,l=!s&&u&&a),e.__attrCachedBy=s?Xp.NONE:Xp.PLAIN_TEXT):u&&(e.__attrCachedBy=Xp.NONE);var h=i.font||sg;l&&h===(a.font||sg)||(e.font=h);var c=t.__computedFont;t.__styleFont!==h&&(t.__styleFont=h,c=t.__computedFont=e.font);var d=i.textPadding,f=i.textLineHeight,p=t.__textCotentBlock;(!p||t.__dirtyText)&&(p=t.__textCotentBlock=ii(n,c,d,f,i.truncate));var g=p.outerHeight,v=p.lines,m=p.lineHeight,y=_i(dg,t,i,r),_=y.baseX,x=y.baseY,w=y.textAlign||"left",b=y.textVerticalAlign;pi(e,i,r,_,x);var S=Zn(x,g,b),M=_,C=S;if(s||d){var T=Xn(n,c),I=T;d&&(I+=d[1]+d[3]);var k=qn(_,I,w);s&&mi(t,e,i,k,S,I,g),d&&(M=Mi(_,w,d),C+=d[0])}e.textAlign=w,e.textBaseline="middle",e.globalAlpha=i.opacity||1;for(var D=0;D<hg.length;D++){var A=hg[D],P=A[0],O=A[1],L=i[P];l&&L===a[P]||(e[O]=Wp(e,O,L||A[2]))}C+=m/2;var B=i.textStrokeWidth,E=l?a.textStrokeWidth:null,z=!l||B!==E,R=!l||z||i.textStroke!==a.textStroke,N=wi(i.textStroke,B),F=bi(i.textFill);if(N&&(z&&(e.lineWidth=B),R&&(e.strokeStyle=N)),F&&(l&&i.textFill===a.textFill||(e.fillStyle=F)),1===v.length)N&&e.strokeText(v[0],M,C),F&&e.fillText(v[0],M,C);else for(var D=0;D<v.length;D++)N&&e.strokeText(v[D],M,C),F&&e.fillText(v[D],M,C),C+=m}function di(t,e,n,i,r,o){o!==Yp&&(e.__attrCachedBy=Xp.NONE);var a=t.__textCotentBlock;(!a||t.__dirtyText)&&(a=t.__textCotentBlock=ri(n,i)),fi(t,e,a,i,r)}function fi(t,e,n,i,r){var o=n.width,a=n.outerWidth,s=n.outerHeight,l=i.textPadding,u=_i(dg,t,i,r),h=u.baseX,c=u.baseY,d=u.textAlign,f=u.textVerticalAlign;pi(e,i,r,h,c);var p=qn(h,a,d),g=Zn(c,s,f),v=p,m=g;l&&(v+=l[3],m+=l[0]);var y=v+o;vi(i)&&mi(t,e,i,p,g,a,s);for(var _=0;_<n.lines.length;_++){for(var x,w=n.lines[_],b=w.tokens,S=b.length,M=w.lineHeight,C=w.width,T=0,I=v,k=y,D=S-1;S>T&&(x=b[T],!x.textAlign||"left"===x.textAlign);)gi(t,e,x,i,M,m,I,"left"),C-=x.width,I+=x.width,T++;for(;D>=0&&(x=b[D],"right"===x.textAlign);)gi(t,e,x,i,M,m,k,"right"),C-=x.width,k-=x.width,D--;for(I+=(o-(I-v)-(y-k)-C)/2;D>=T;)x=b[T],gi(t,e,x,i,M,m,I+x.width/2,"center"),I+=x.width,T++;m+=M}}function pi(t,e,n,i,r){if(n&&e.textRotation){var o=e.textOrigin;"center"===o?(i=n.width/2+n.x,r=n.height/2+n.y):o&&(i=o[0]+n.x,r=o[1]+n.y),t.translate(i,r),t.rotate(-e.textRotation),t.translate(-i,-r)}}function gi(t,e,n,i,r,o,a,s){var l=i.rich[n.styleName]||{};l.text=n.text;var u=n.textVerticalAlign,h=o+r/2;
  2. "top"===u?h=o+n.height/2:"bottom"===u&&(h=o+r-n.height/2),!n.isLineHolder&&vi(l)&&mi(t,e,l,"right"===s?a-n.width:"center"===s?a-n.width/2:a,h-n.height/2,n.width,n.height);var c=n.textPadding;c&&(a=Mi(a,s,c),h-=n.height/2-c[2]-n.textHeight/2),xi(e,"shadowBlur",A(l.textShadowBlur,i.textShadowBlur,0)),xi(e,"shadowColor",l.textShadowColor||i.textShadowColor||"transparent"),xi(e,"shadowOffsetX",A(l.textShadowOffsetX,i.textShadowOffsetX,0)),xi(e,"shadowOffsetY",A(l.textShadowOffsetY,i.textShadowOffsetY,0)),xi(e,"textAlign",s),xi(e,"textBaseline","middle"),xi(e,"font",n.font||sg);var d=wi(l.textStroke||i.textStroke,p),f=bi(l.textFill||i.textFill),p=D(l.textStrokeWidth,i.textStrokeWidth);d&&(xi(e,"lineWidth",p),xi(e,"strokeStyle",d),e.strokeText(n.text,a,h)),f&&(xi(e,"fillStyle",f),e.fillText(n.text,a,h))}function vi(t){return!!(t.textBackgroundColor||t.textBorderWidth&&t.textBorderColor)}function mi(t,e,n,i,r,o,a){var s=n.textBackgroundColor,l=n.textBorderWidth,u=n.textBorderColor,h=b(s);if(xi(e,"shadowBlur",n.textBoxShadowBlur||0),xi(e,"shadowColor",n.textBoxShadowColor||"transparent"),xi(e,"shadowOffsetX",n.textBoxShadowOffsetX||0),xi(e,"shadowOffsetY",n.textBoxShadowOffsetY||0),h||l&&u){e.beginPath();var c=n.textBorderRadius;c?si(e,{x:i,y:r,width:o,height:a,r:c}):e.rect(i,r,o,a),e.closePath()}if(h)if(xi(e,"fillStyle",s),null!=n.fillOpacity){var d=e.globalAlpha;e.globalAlpha=n.fillOpacity*n.opacity,e.fill(),e.globalAlpha=d}else e.fill();else if(S(s)){var f=s.image;f=Vn(f,null,t,yi,s),f&&Wn(f)&&e.drawImage(f,i,r,o,a)}if(l&&u)if(xi(e,"lineWidth",l),xi(e,"strokeStyle",u),null!=n.strokeOpacity){var d=e.globalAlpha;e.globalAlpha=n.strokeOpacity*n.opacity,e.stroke(),e.globalAlpha=d}else e.stroke()}function yi(t,e){e.image=t}function _i(t,e,n,i){var r=n.x||0,o=n.y||0,a=n.textAlign,s=n.textVerticalAlign;if(i){var l=n.textPosition;if(l instanceof Array)r=i.x+Si(l[0],i.width),o=i.y+Si(l[1],i.height);else{var u=e&&e.calculateTextPosition?e.calculateTextPosition(cg,n,i):Kn(cg,n,i);r=u.x,o=u.y,a=a||u.textAlign,s=s||u.textVerticalAlign}var h=n.textOffset;h&&(r+=h[0],o+=h[1])}return t=t||{},t.baseX=r,t.baseY=o,t.textAlign=a,t.textVerticalAlign=s,t}function xi(t,e,n){return t[e]=Wp(t,e,n),t[e]}function wi(t,e){return null==t||0>=e||"transparent"===t||"none"===t?null:t.image||t.colorStops?"#000":t}function bi(t){return null==t||"none"===t?null:t.image||t.colorStops?"#000":t}function Si(t,e){return"string"==typeof t?t.lastIndexOf("%")>=0?parseFloat(t)/100*e:parseFloat(t):t}function Mi(t,e,n){return"right"===e?t-n[1]:"center"===e?t+n[3]/2-n[1]/2:t+n[3]}function Ci(t,e){return null!=t&&(t||e.textBackgroundColor||e.textBorderWidth&&e.textBorderColor||e.textPadding)}function Ti(t){t=t||{},Bp.call(this,t);for(var e in t)t.hasOwnProperty(e)&&"style"!==e&&(this[e]=t[e]);this.style=new jp(t.style,this),this._rect=null,this.__clipPaths=null}function Ii(t){Ti.call(this,t)}function ki(t){return parseInt(t,10)}function Di(t){return t?t.__builtin__?!0:"function"!=typeof t.resize||"function"!=typeof t.refresh?!1:!0:!1}function Ai(t,e,n){return _g.copy(t.getBoundingRect()),t.transform&&_g.applyTransform(t.transform),xg.width=e,xg.height=n,!_g.intersect(xg)}function Pi(t,e){if(t===e)return!1;if(!t||!e||t.length!==e.length)return!0;for(var n=0;n<t.length;n++)if(t[n]!==e[n])return!0;return!1}function Oi(t,e){for(var n=0;n<t.length;n++){var i=t[n];i.setTransform(e),e.beginPath(),i.buildPath(e,i.shape),e.clip(),i.restoreTransform(e)}}function Li(t,e){var n=document.createElement("div");return n.style.cssText=["position:relative","width:"+t+"px","height:"+e+"px","padding:0","margin:0","border-width:0"].join(";")+";",n}function Bi(t){return"mousewheel"===t&&Mf.browser.firefox?"DOMMouseScroll":t}function Ei(t){var e=t.pointerType;return"pen"===e||"touch"===e}function zi(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 Ri(t){t&&(t.zrByTouch=!0)}function Ni(t,e){return be(t.dom,new Hi(t,e),!0)}function Fi(t,e){for(var n=e,i=!1;n&&9!==n.nodeType&&!(i=n.domBelongToZr||n!==e&&n===t.painterRoot);)n=n.parentNode;return i}function Hi(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 Vi(t,e){var n=e.domHandlers;Mf.pointerEventsSupported?f(Cg.pointer,function(i){Wi(e,i,function(e){n[i].call(t,e)})}):(Mf.touchEventsSupported&&f(Cg.touch,function(i){Wi(e,i,function(r){n[i].call(t,r),zi(e)})}),f(Cg.mouse,function(i){Wi(e,i,function(r){r=we(r),e.touching||n[i].call(t,r)})}))}function Gi(t,e){function n(n){function i(i){i=we(i),Fi(t,i.target)||(i=Ni(t,i),e.domHandlers[n].call(t,i))}Wi(e,n,i,{capture:!0})}Mf.pointerEventsSupported?f(Tg.pointer,n):Mf.touchEventsSupported||f(Tg.mouse,n)}function Wi(t,e,n,i){t.mounted[e]=n,t.listenerOpts[e]=i,Se(t.domTarget,Bi(e),n,i)}function Xi(t){var e=t.mounted;for(var n in e)e.hasOwnProperty(n)&&Me(t.domTarget,Bi(n),e[n],t.listenerOpts[n]);t.mounted={}}function Yi(t,e){if(t._mayPointerCapture=null,Mg&&t._pointerCapturing^e){t._pointerCapturing=e;var n=t._globalHandlerScope;e?Gi(t,n):Xi(n)}}function Ui(t,e){this.domTarget=t,this.domHandlers=e,this.mounted={},this.listenerOpts={},this.touchTimer=null,this.touching=!1}function ji(t,e){Uf.call(this),this.dom=t,this.painterRoot=e,this._localHandlerScope=new Ui(t,kg),Mg&&(this._globalHandlerScope=new Ui(document,Dg)),this._pointerCapturing=!1,this._mayPointerCapture=null,Vi(this,this._localHandlerScope)}function qi(t,e){var n=new Eg(bf(),t,e);return Lg[n.id]=n,n}function Zi(t){if(t)t.dispose();else{for(var e in Lg)Lg.hasOwnProperty(e)&&Lg[e].dispose();Lg={}}return this}function Ki(t){return Lg[t]}function $i(t,e){Og[t]=e}function Qi(t){delete Lg[t]}function Ji(t){return t instanceof Array?t:null==t?[]:[t]}function tr(t,e,n){if(t){t[e]=t[e]||{},t.emphasis=t.emphasis||{},t.emphasis[e]=t.emphasis[e]||{};for(var i=0,r=n.length;r>i;i++){var o=n[i];!t.emphasis[e].hasOwnProperty(o)&&t[e].hasOwnProperty(o)&&(t.emphasis[e][o]=t[e][o])}}}function er(t){return!Ng(t)||Fg(t)||t instanceof Date?t:t.value}function nr(t){return Ng(t)&&!(t instanceof Array)}function ir(t,e){e=(e||[]).slice();var n=p(t||[],function(t){return{exist:t}});return Rg(e,function(t,i){if(Ng(t)){for(var r=0;r<n.length;r++)if(!n[r].option&&null!=t.id&&n[r].exist.id===t.id+"")return n[r].option=t,void(e[i]=null);for(var r=0;r<n.length;r++){var o=n[r].exist;if(!(n[r].option||null!=o.id&&null!=t.id||null==t.name||ar(t)||ar(o)||o.name!==t.name+""))return n[r].option=t,void(e[i]=null)}}}),Rg(e,function(t){if(Ng(t)){for(var e=0;e<n.length;e++){var i=n[e].exist;if(!n[e].option&&!ar(i)&&null==t.id){n[e].option=t;break}}e>=n.length&&n.push({option:t})}}),n}function rr(t){var e=N();Rg(t,function(t){var n=t.exist;n&&e.set(n.id,t)}),Rg(t,function(t){var n=t.option;L(!n||null==n.id||!e.get(n.id)||e.get(n.id)===t,"id duplicates: "+(n&&n.id)),n&&null!=n.id&&e.set(n.id,t),!t.keyInfo&&(t.keyInfo={})}),Rg(t,function(t,n){var i=t.exist,r=t.option,o=t.keyInfo;if(Ng(r)){if(o.name=null!=r.name?r.name+"":i?i.name:Hg+n,i)o.id=i.id;else if(null!=r.id)o.id=r.id+"";else{var a=0;do o.id="\x00"+o.name+"\x00"+a++;while(e.get(o.id))}e.set(o.id,t)}})}function or(t){var e=t.name;return!(!e||!e.indexOf(Hg))}function ar(t){return Ng(t)&&t.id&&0===(t.id+"").indexOf("\x00_ec_\x00")}function sr(t,e){return null!=e.dataIndexInside?e.dataIndexInside:null!=e.dataIndex?x(e.dataIndex)?p(e.dataIndex,function(e){return t.indexOfRawIndex(e)}):t.indexOfRawIndex(e.dataIndex):null!=e.name?x(e.name)?p(e.name,function(e){return t.indexOfName(e)}):t.indexOfName(e.name):void 0}function lr(){var t="__\x00ec_inner_"+Gg++ +"_"+Math.random().toFixed(5);return function(e){return e[t]||(e[t]={})}}function ur(t,e,n){if(b(e)){var i={};i[e+"Index"]=0,e=i}var r=n&&n.defaultMainType;!r||hr(e,r+"Index")||hr(e,r+"Id")||hr(e,r+"Name")||(e[r+"Index"]=0);var o={};return Rg(e,function(i,r){var i=e[r];if("dataIndex"===r||"dataIndexInside"===r)return void(o[r]=i);var a=r.match(/^(\w+)(Index|Id|Name)$/)||[],s=a[1],l=(a[2]||"").toLowerCase();if(!(!s||!l||null==i||"index"===l&&"none"===i||n&&n.includeMainTypes&&u(n.includeMainTypes,s)<0)){var h={mainType:s};("index"!==l||"all"!==i)&&(h[l]=i);var c=t.queryComponents(h);o[s+"Models"]=c,o[s+"Model"]=c[0]}}),o}function hr(t,e){return t&&t.hasOwnProperty(e)}function cr(t,e,n){t.setAttribute?t.setAttribute(e,n):t[e]=n}function dr(t,e){return t.getAttribute?t.getAttribute(e):t[e]}function fr(t){return"auto"===t?Mf.domSupported?"html":"richText":t||"html"}function pr(t){var e={main:"",sub:""};return t&&(t=t.split(Wg),e.main=t[0]||"",e.sub=t[1]||""),e}function gr(t){L(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(t),'componentType "'+t+'" illegal')}function vr(t){t.$constructor=t,t.extend=function(t){var e=this,n=function(){t.$constructor?t.$constructor.apply(this,arguments):e.apply(this,arguments)};return a(n.prototype,t),n.extend=this.extend,n.superCall=yr,n.superApply=_r,h(n,this),n.superClass=e,n}}function mr(t){var e=["__\x00is_clz",Yg++,Math.random().toFixed(3)].join("_");t.prototype[e]=!0,t.isInstance=function(t){return!(!t||!t[e])}}function yr(t,e){var n=P(arguments,2);return this.superClass.prototype[e].apply(t,n)}function _r(t,e,n){return this.superClass.prototype[e].apply(t,n)}function xr(t,e){function n(t){var e=i[t.main];return e&&e[Xg]||(e=i[t.main]={},e[Xg]=!0),e}e=e||{};var i={};if(t.registerClass=function(t,e){if(e)if(gr(e),e=pr(e),e.sub){if(e.sub!==Xg){var r=n(e);r[e.sub]=t}}else i[e.main]=t;return t},t.getClass=function(t,e,n){var r=i[t];if(r&&r[Xg]&&(r=e?r[e]:null),n&&!r)throw new Error(e?"Component "+t+"."+(e||"")+" not exists. Load it first.":t+".type should be specified.");return r},t.getClassesByMainType=function(t){t=pr(t);var e=[],n=i[t.main];return n&&n[Xg]?f(n,function(t,n){n!==Xg&&e.push(t)}):e.push(n),e},t.hasClass=function(t){return t=pr(t),!!i[t.main]},t.getAllClassMainTypes=function(){var t=[];return f(i,function(e,n){t.push(n)}),t},t.hasSubTypes=function(t){t=pr(t);var e=i[t.main];return e&&e[Xg]},t.parseClassType=pr,e.registerWhenExtend){var r=t.extend;r&&(t.extend=function(e){var n=r.call(this,e);return t.registerClass(n,e.type)})}return t}function wr(t){return t>-Jg&&Jg>t}function br(t){return t>Jg||-Jg>t}function Sr(t,e,n,i,r){var o=1-r;return o*o*(o*t+3*r*e)+r*r*(r*i+3*o*n)}function Mr(t,e,n,i,r){var o=1-r;return 3*(((e-t)*o+2*(n-e)*r)*o+(i-n)*r*r)}function Cr(t,e,n,i,r,o){var a=i+3*(e-n)-t,s=3*(n-2*e+t),l=3*(e-t),u=t-r,h=s*s-3*a*l,c=s*l-9*a*u,d=l*l-3*s*u,f=0;if(wr(h)&&wr(c))if(wr(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(wr(g)){var v=c/h,p=-s/a+v,m=-v/2;p>=0&&1>=p&&(o[f++]=p),m>=0&&1>=m&&(o[f++]=m)}else if(g>0){var y=Qg(g),_=h*s+1.5*a*(-c+y),x=h*s+1.5*a*(-c-y);_=0>_?-$g(-_,nv):$g(_,nv),x=0>x?-$g(-x,nv):$g(x,nv);var p=(-s-(_+x))/(3*a);p>=0&&1>=p&&(o[f++]=p)}else{var w=(2*h*s-3*a*c)/(2*Qg(h*h*h)),b=Math.acos(w)/3,S=Qg(h),M=Math.cos(b),p=(-s-2*S*M)/(3*a),m=(-s+S*(M+ev*Math.sin(b)))/(3*a),C=(-s+S*(M-ev*Math.sin(b)))/(3*a);p>=0&&1>=p&&(o[f++]=p),m>=0&&1>=m&&(o[f++]=m),C>=0&&1>=C&&(o[f++]=C)}}return f}function Tr(t,e,n,i,r){var o=6*n-12*e+6*t,a=9*e+3*i-3*t-9*n,s=3*e-3*t,l=0;if(wr(a)){if(br(o)){var u=-s/o;u>=0&&1>=u&&(r[l++]=u)}}else{var h=o*o-4*a*s;if(wr(h))r[0]=-o/(2*a);else if(h>0){var c=Qg(h),u=(-o+c)/(2*a),d=(-o-c)/(2*a);u>=0&&1>=u&&(r[l++]=u),d>=0&&1>=d&&(r[l++]=d)}}return l}function Ir(t,e,n,i,r,o){var a=(e-t)*r+t,s=(n-e)*r+e,l=(i-n)*r+n,u=(s-a)*r+a,h=(l-s)*r+s,c=(h-u)*r+u;o[0]=t,o[1]=a,o[2]=u,o[3]=c,o[4]=c,o[5]=h,o[6]=l,o[7]=i}function kr(t,e,n,i,r,o,a,s,l,u,h){var c,d,f,p,g,v=.005,m=1/0;iv[0]=l,iv[1]=u;for(var y=0;1>y;y+=.05)rv[0]=Sr(t,n,r,a,y),rv[1]=Sr(e,i,o,s,y),p=Wf(iv,rv),m>p&&(c=y,m=p);m=1/0;for(var _=0;32>_&&!(tv>v);_++)d=c-v,f=c+v,rv[0]=Sr(t,n,r,a,d),rv[1]=Sr(e,i,o,s,d),p=Wf(rv,iv),d>=0&&m>p?(c=d,m=p):(ov[0]=Sr(t,n,r,a,f),ov[1]=Sr(e,i,o,s,f),g=Wf(ov,iv),1>=f&&m>g?(c=f,m=g):v*=.5);return h&&(h[0]=Sr(t,n,r,a,c),h[1]=Sr(e,i,o,s,c)),Qg(m)}function Dr(t,e,n,i){var r=1-i;return r*(r*t+2*i*e)+i*i*n}function Ar(t,e,n,i){return 2*((1-i)*(e-t)+i*(n-e))}function Pr(t,e,n,i,r){var o=t-2*e+n,a=2*(e-t),s=t-i,l=0;if(wr(o)){if(br(a)){var u=-s/a;u>=0&&1>=u&&(r[l++]=u)}}else{var h=a*a-4*o*s;if(wr(h)){var u=-a/(2*o);u>=0&&1>=u&&(r[l++]=u)}else if(h>0){var c=Qg(h),u=(-a+c)/(2*o),d=(-a-c)/(2*o);u>=0&&1>=u&&(r[l++]=u),d>=0&&1>=d&&(r[l++]=d)}}return l}function Or(t,e,n){var i=t+n-2*e;return 0===i?.5:(t-e)/i}function Lr(t,e,n,i,r){var o=(e-t)*i+t,a=(n-e)*i+e,s=(a-o)*i+o;r[0]=t,r[1]=o,r[2]=s,r[3]=s,r[4]=a,r[5]=n}function Br(t,e,n,i,r,o,a,s,l){var u,h=.005,c=1/0;iv[0]=a,iv[1]=s;for(var d=0;1>d;d+=.05){rv[0]=Dr(t,n,r,d),rv[1]=Dr(e,i,o,d);var f=Wf(iv,rv);c>f&&(u=d,c=f)}c=1/0;for(var p=0;32>p&&!(tv>h);p++){var g=u-h,v=u+h;rv[0]=Dr(t,n,r,g),rv[1]=Dr(e,i,o,g);var f=Wf(rv,iv);if(g>=0&&c>f)u=g,c=f;else{ov[0]=Dr(t,n,r,v),ov[1]=Dr(e,i,o,v);var m=Wf(ov,iv);1>=v&&c>m?(u=v,c=m):h*=.5}}return l&&(l[0]=Dr(t,n,r,u),l[1]=Dr(e,i,o,u)),Qg(c)}function Er(t,e,n){if(0!==t.length){var i,r=t[0],o=r[0],a=r[0],s=r[1],l=r[1];for(i=1;i<t.length;i++)r=t[i],o=av(o,r[0]),a=sv(a,r[0]),s=av(s,r[1]),l=sv(l,r[1]);e[0]=o,e[1]=s,n[0]=a,n[1]=l}}function zr(t,e,n,i,r,o){r[0]=av(t,n),r[1]=av(e,i),o[0]=sv(t,n),o[1]=sv(e,i)}function Rr(t,e,n,i,r,o,a,s,l,u){var h,c=Tr,d=Sr,f=c(t,n,r,a,pv);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,n,r,a,pv[h]);l[0]=av(p,l[0]),u[0]=sv(p,u[0])}for(f=c(e,i,o,s,gv),h=0;f>h;h++){var g=d(e,i,o,s,gv[h]);l[1]=av(g,l[1]),u[1]=sv(g,u[1])}l[0]=av(t,l[0]),u[0]=sv(t,u[0]),l[0]=av(a,l[0]),u[0]=sv(a,u[0]),l[1]=av(e,l[1]),u[1]=sv(e,u[1]),l[1]=av(s,l[1]),u[1]=sv(s,u[1])}function Nr(t,e,n,i,r,o,a,s){var l=Or,u=Dr,h=sv(av(l(t,n,r),1),0),c=sv(av(l(e,i,o),1),0),d=u(t,n,r,h),f=u(e,i,o,c);a[0]=av(t,r,d),a[1]=av(e,o,f),s[0]=sv(t,r,d),s[1]=sv(e,o,f)}function Fr(t,e,n,i,r,o,a,s,l){var u=ae,h=se,c=Math.abs(r-o);if(1e-4>c%hv&&c>1e-4)return s[0]=t-n,s[1]=e-i,l[0]=t+n,void(l[1]=e+i);if(cv[0]=uv(r)*n+t,cv[1]=lv(r)*i+e,dv[0]=uv(o)*n+t,dv[1]=lv(o)*i+e,u(s,cv,dv),h(l,cv,dv),r%=hv,0>r&&(r+=hv),o%=hv,0>o&&(o+=hv),r>o&&!a?o+=hv:o>r&&a&&(r+=hv),a){var d=o;o=r,r=d}for(var f=0;o>f;f+=Math.PI/2)f>r&&(fv[0]=uv(f)*n+t,fv[1]=lv(f)*i+e,u(s,fv,s),h(l,fv,l))}function Hr(t,e,n,i,r,o,a){if(0===r)return!1;var s=r,l=0,u=t;if(a>e+s&&a>i+s||e-s>a&&i-s>a||o>t+s&&o>n+s||t-s>o&&n-s>o)return!1;if(t===n)return Math.abs(o-t)<=s/2;l=(e-i)/(t-n),u=(t*i-n*e)/(t-n);var h=l*o-a+u,c=h*h/(l*l+1);return s/2*s/2>=c}function Vr(t,e,n,i,r,o,a,s,l,u,h){if(0===l)return!1;var c=l;if(h>e+c&&h>i+c&&h>o+c&&h>s+c||e-c>h&&i-c>h&&o-c>h&&s-c>h||u>t+c&&u>n+c&&u>r+c&&u>a+c||t-c>u&&n-c>u&&r-c>u&&a-c>u)return!1;var d=kr(t,e,n,i,r,o,a,s,u,h,null);return c/2>=d}function Gr(t,e,n,i,r,o,a,s,l){if(0===a)return!1;var u=a;if(l>e+u&&l>i+u&&l>o+u||e-u>l&&i-u>l&&o-u>l||s>t+u&&s>n+u&&s>r+u||t-u>s&&n-u>s&&r-u>s)return!1;var h=Br(t,e,n,i,r,o,s,l,null);return u/2>=h}function Wr(t){return t%=Dv,0>t&&(t+=Dv),t}function Xr(t,e,n,i,r,o,a,s,l){if(0===a)return!1;var u=a;s-=t,l-=e;var h=Math.sqrt(s*s+l*l);if(h-u>n||n>h+u)return!1;if(Math.abs(i-r)%Av<1e-4)return!0;if(o){var c=i;i=Wr(r),r=Wr(c)}else i=Wr(i),r=Wr(r);i>r&&(r+=Av);var d=Math.atan2(l,s);return 0>d&&(d+=Av),d>=i&&r>=d||d+Av>=i&&r>=d+Av}function Yr(t,e,n,i,r,o){if(o>e&&o>i||e>o&&i>o)return 0;if(i===e)return 0;var a=e>i?1:-1,s=(o-e)/(i-e);(1===s||0===s)&&(a=e>i?.5:-.5);var l=s*(n-t)+t;return l===r?1/0:l>r?a:0}function Ur(t,e){return Math.abs(t-e)<Lv}function jr(){var t=Ev[0];Ev[0]=Ev[1],Ev[1]=t}function qr(t,e,n,i,r,o,a,s,l,u){if(u>e&&u>i&&u>o&&u>s||e>u&&i>u&&o>u&&s>u)return 0;var h=Cr(e,i,o,s,u,Bv);if(0===h)return 0;for(var c,d,f=0,p=-1,g=0;h>g;g++){var v=Bv[g],m=0===v||1===v?.5:1,y=Sr(t,n,r,a,v);l>y||(0>p&&(p=Tr(e,i,o,s,Ev),Ev[1]<Ev[0]&&p>1&&jr(),c=Sr(e,i,o,s,Ev[0]),p>1&&(d=Sr(e,i,o,s,Ev[1]))),f+=2===p?v<Ev[0]?e>c?m:-m:v<Ev[1]?c>d?m:-m:d>s?m:-m:v<Ev[0]?e>c?m:-m:c>s?m:-m)}return f}function Zr(t,e,n,i,r,o,a,s){if(s>e&&s>i&&s>o||e>s&&i>s&&o>s)return 0;var l=Pr(e,i,o,s,Bv);if(0===l)return 0;var u=Or(e,i,o);if(u>=0&&1>=u){for(var h=0,c=Dr(e,i,o,u),d=0;l>d;d++){var f=0===Bv[d]||1===Bv[d]?.5:1,p=Dr(t,n,r,Bv[d]);a>p||(h+=Bv[d]<u?e>c?f:-f:c>o?f:-f)}return h}var f=0===Bv[0]||1===Bv[0]?.5:1,p=Dr(t,n,r,Bv[0]);return a>p?0:e>o?f:-f}function Kr(t,e,n,i,r,o,a,s){if(s-=e,s>n||-n>s)return 0;var l=Math.sqrt(n*n-s*s);Bv[0]=-l,Bv[1]=l;var u=Math.abs(i-r);if(1e-4>u)return 0;if(1e-4>u%Ov){i=0,r=Ov;var h=o?1:-1;return a>=Bv[0]+t&&a<=Bv[1]+t?h:0}if(o){var l=i;i=Wr(r),r=Wr(l)}else i=Wr(i),r=Wr(r);i>r&&(r+=Ov);for(var c=0,d=0;2>d;d++){var f=Bv[d];if(f+t>a){var p=Math.atan2(s,f),h=o?1:-1;0>p&&(p=Ov+p),(p>=i&&r>=p||p+Ov>=i&&r>=p+Ov)&&(p>Math.PI/2&&p<1.5*Math.PI&&(h=-h),c+=h)}}return c}function $r(t,e,n,i,r){for(var o=0,a=0,s=0,l=0,u=0,h=0;h<t.length;){var c=t[h++];switch(c===Pv.M&&h>1&&(n||(o+=Yr(a,s,l,u,i,r))),1===h&&(a=t[h],s=t[h+1],l=a,u=s),c){case Pv.M:l=t[h++],u=t[h++],a=l,s=u;break;case Pv.L:if(n){if(Hr(a,s,t[h],t[h+1],e,i,r))return!0}else o+=Yr(a,s,t[h],t[h+1],i,r)||0;a=t[h++],s=t[h++];break;case Pv.C:if(n){if(Vr(a,s,t[h++],t[h++],t[h++],t[h++],t[h],t[h+1],e,i,r))return!0}else o+=qr(a,s,t[h++],t[h++],t[h++],t[h++],t[h],t[h+1],i,r)||0;a=t[h++],s=t[h++];break;case Pv.Q:if(n){if(Gr(a,s,t[h++],t[h++],t[h],t[h+1],e,i,r))return!0}else o+=Zr(a,s,t[h++],t[h++],t[h],t[h+1],i,r)||0;a=t[h++],s=t[h++];break;case Pv.A:var d=t[h++],f=t[h++],p=t[h++],g=t[h++],v=t[h++],m=t[h++];h+=1;var y=1-t[h++],_=Math.cos(v)*p+d,x=Math.sin(v)*g+f;h>1?o+=Yr(a,s,_,x,i,r):(l=_,u=x);var w=(i-d)*g/p+d;if(n){if(Xr(d,f,g,v,v+m,y,e,w,r))return!0}else o+=Kr(d,f,g,v,v+m,y,w,r);a=Math.cos(v+m)*p+d,s=Math.sin(v+m)*g+f;break;case Pv.R:l=a=t[h++],u=s=t[h++];var b=t[h++],S=t[h++],_=l+b,x=u+S;if(n){if(Hr(l,u,_,u,e,i,r)||Hr(_,u,_,x,e,i,r)||Hr(_,x,l,x,e,i,r)||Hr(l,x,l,u,e,i,r))return!0}else o+=Yr(_,u,_,x,i,r),o+=Yr(l,x,l,u,i,r);break;case Pv.Z:if(n){if(Hr(a,s,l,u,e,i,r))return!0}else o+=Yr(a,s,l,u,i,r);a=l,s=u}}return n||Ur(s,u)||(o+=Yr(a,s,l,u,i,r)||0),0!==o}function Qr(t,e,n){return $r(t,0,!1,e,n)}function Jr(t,e,n,i){return $r(t,e,!0,n,i)}function to(t){Ti.call(this,t),this.path=null}function eo(t,e,n,i,r,o,a,s,l,u,h){var c=l*(jv/180),d=Uv(c)*(t-n)/2+Yv(c)*(e-i)/2,f=-1*Yv(c)*(t-n)/2+Uv(c)*(e-i)/2,p=d*d/(a*a)+f*f/(s*s);p>1&&(a*=Xv(p),s*=Xv(p));var g=(r===o?-1:1)*Xv((a*a*s*s-a*a*f*f-s*s*d*d)/(a*a*f*f+s*s*d*d))||0,v=g*a*f/s,m=g*-s*d/a,y=(t+n)/2+Uv(c)*v-Yv(c)*m,_=(e+i)/2+Yv(c)*v+Uv(c)*m,x=Kv([1,0],[(d-v)/a,(f-m)/s]),w=[(d-v)/a,(f-m)/s],b=[(-1*d-v)/a,(-1*f-m)/s],S=Kv(w,b);Zv(w,b)<=-1&&(S=jv),Zv(w,b)>=1&&(S=0),0===o&&S>0&&(S-=2*jv),1===o&&0>S&&(S+=2*jv),h.addData(u,y,_,a,s,x,S,c,o)}function no(t){if(!t)return new kv;for(var e,n=0,i=0,r=n,o=i,a=new kv,s=kv.CMD,l=t.match($v),u=0;u<l.length;u++){for(var h,c=l[u],d=c.charAt(0),f=c.match(Qv)||[],p=f.length,g=0;p>g;g++)f[g]=parseFloat(f[g]);for(var v=0;p>v;){var m,y,_,x,w,b,S,M=n,C=i;switch(d){case"l":n+=f[v++],i+=f[v++],h=s.L,a.addData(h,n,i);break;case"L":n=f[v++],i=f[v++],h=s.L,a.addData(h,n,i);break;case"m":n+=f[v++],i+=f[v++],h=s.M,a.addData(h,n,i),r=n,o=i,d="l";break;case"M":n=f[v++],i=f[v++],h=s.M,a.addData(h,n,i),r=n,o=i,d="L";break;case"h":n+=f[v++],h=s.L,a.addData(h,n,i);break;case"H":n=f[v++],h=s.L,a.addData(h,n,i);break;case"v":i+=f[v++],h=s.L,a.addData(h,n,i);break;case"V":i=f[v++],h=s.L,a.addData(h,n,i);break;case"C":h=s.C,a.addData(h,f[v++],f[v++],f[v++],f[v++],f[v++],f[v++]),n=f[v-2],i=f[v-1];break;case"c":h=s.C,a.addData(h,f[v++]+n,f[v++]+i,f[v++]+n,f[v++]+i,f[v++]+n,f[v++]+i),n+=f[v-2],i+=f[v-1];break;case"S":m=n,y=i;var T=a.len(),I=a.data;e===s.C&&(m+=n-I[T-4],y+=i-I[T-3]),h=s.C,M=f[v++],C=f[v++],n=f[v++],i=f[v++],a.addData(h,m,y,M,C,n,i);break;case"s":m=n,y=i;var T=a.len(),I=a.data;e===s.C&&(m+=n-I[T-4],y+=i-I[T-3]),h=s.C,M=n+f[v++],C=i+f[v++],n+=f[v++],i+=f[v++],a.addData(h,m,y,M,C,n,i);break;case"Q":M=f[v++],C=f[v++],n=f[v++],i=f[v++],h=s.Q,a.addData(h,M,C,n,i);break;case"q":M=f[v++]+n,C=f[v++]+i,n+=f[v++],i+=f[v++],h=s.Q,a.addData(h,M,C,n,i);break;case"T":m=n,y=i;var T=a.len(),I=a.data;e===s.Q&&(m+=n-I[T-4],y+=i-I[T-3]),n=f[v++],i=f[v++],h=s.Q,a.addData(h,m,y,n,i);break;case"t":m=n,y=i;var T=a.len(),I=a.data;e===s.Q&&(m+=n-I[T-4],y+=i-I[T-3]),n+=f[v++],i+=f[v++],h=s.Q,a.addData(h,m,y,n,i);break;case"A":_=f[v++],x=f[v++],w=f[v++],b=f[v++],S=f[v++],M=n,C=i,n=f[v++],i=f[v++],h=s.A,eo(M,C,n,i,b,S,_,x,w,h,a);break;case"a":_=f[v++],x=f[v++],w=f[v++],b=f[v++],S=f[v++],M=n,C=i,n+=f[v++],i+=f[v++],h=s.A,eo(M,C,n,i,b,S,_,x,w,h,a)}}("z"===d||"Z"===d)&&(h=s.Z,a.addData(h),n=r,i=o),e=h}return a.toStatic(),a}function io(t,e){var n=no(t);return e=e||{},e.buildPath=function(t){if(t.setData){t.setData(n.data);var e=t.getContext();e&&t.rebuildPath(e)}else{var e=t;n.rebuildPath(e)}},e.applyTransform=function(t){Wv(n,t),this.dirty(!0)},e}function ro(t,e){return new to(io(t,e))}function oo(t,e){return to.extend(io(t,e))}function ao(t,e){for(var n=[],i=t.length,r=0;i>r;r++){var o=t[r];o.path||o.createPathProxy(),o.__dirtyPath&&o.buildPath(o.path,o.shape,!0),n.push(o.path)}var a=new to(e);return a.createPathProxy(),a.buildPath=function(t){t.appendPath(n);var e=t.getContext();e&&t.rebuildPath(e)},a}function so(t,e,n,i,r,o,a){var s=.5*(n-t),l=.5*(i-e);return(2*(e-n)+s+l)*a+(-3*(e-n)-2*s-l)*o+s*r+e}function lo(t,e,n){var i=e.points,r=e.smooth;if(i&&i.length>=2){if(r&&"spline"!==r){var o=am(i,r,n,e.smoothConstraint);t.moveTo(i[0][0],i[0][1]);for(var a=i.length,s=0;(n?a:a-1)>s;s++){var l=o[2*s],u=o[2*s+1],h=i[(s+1)%a];t.bezierCurveTo(l[0],l[1],u[0],u[1],h[0],h[1])}}else{"spline"===r&&(i=om(i,n)),t.moveTo(i[0][0],i[0][1]);for(var s=1,c=i.length;c>s;s++)t.lineTo(i[s][0],i[s][1])}n&&t.closePath()}}function uo(t,e,n){if(e){var i=e.x1,r=e.x2,o=e.y1,a=e.y2;t.x1=i,t.x2=r,t.y1=o,t.y2=a;var s=n&&n.lineWidth;s&&(um(2*i)===um(2*r)&&(t.x1=t.x2=co(i,s,!0)),um(2*o)===um(2*a)&&(t.y1=t.y2=co(o,s,!0)))}}function ho(t,e,n){if(e){var i=e.x,r=e.y,o=e.width,a=e.height;t.x=i,t.y=r,t.width=o,t.height=a;var s=n&&n.lineWidth;s&&(t.x=co(i,s,!0),t.y=co(r,s,!0),t.width=Math.max(co(i+o,s,!1)-t.x,0===o?0:1),t.height=Math.max(co(r+a,s,!1)-t.y,0===a?0:1))}}function co(t,e,n){if(!e)return t;var i=um(2*t);return(i+um(e))%2===0?i/2:(i+(n?1:-1))/2}function fo(t,e,n){var i=t.cpx2,r=t.cpy2;return null===i||null===r?[(n?Mr:Sr)(t.x1,t.cpx1,t.cpx2,t.x2,e),(n?Mr:Sr)(t.y1,t.cpy1,t.cpy2,t.y2,e)]:[(n?Ar:Dr)(t.x1,t.cpx1,t.x2,e),(n?Ar:Dr)(t.y1,t.cpy1,t.y2,e)]}function po(t){Ti.call(this,t),this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.notClear=!0}function go(t){return to.extend(t)}function vo(t,e){return oo(t,e)}function mo(t,e){Pm[t]=e}function yo(t){return Pm.hasOwnProperty(t)?Pm[t]:void 0}function _o(t,e,n,i){var r=ro(t,e);return n&&("center"===i&&(n=wo(n,r.getBoundingRect())),bo(r,n)),r}function xo(t,e,n){var i=new Ii({style:{image:t,x:e.x,y:e.y,width:e.width,height:e.height},onload:function(t){if("center"===n){var r={width:t.width,height:t.height};i.setStyle(wo(e,r))}}});return i}function wo(t,e){var n,i=e.width/e.height,r=t.height*i;r<=t.width?n=t.height:(r=t.width,n=r/i);var o=t.x+t.width/2,a=t.y+t.height/2;return{x:o-r/2,y:a-n/2,width:r,height:n}}function bo(t,e){if(t.applyTransform){var n=t.getBoundingRect(),i=n.calculateTransform(e);t.applyTransform(i)}}function So(t){return uo(t.shape,t.shape,t.style),t}function Mo(t){return ho(t.shape,t.shape,t.style),t}function Co(t){return null!=t&&"none"!==t}function To(t){if("string"!=typeof t)return t;var e=Bm.get(t);return e||(e=nn(t,-.1),1e4>Em&&(Bm.set(t,e),Em++)),e}function Io(t){if(t.__hoverStlDirty){t.__hoverStlDirty=!1;var e=t.__hoverStl;if(!e)return void(t.__cachedNormalStl=t.__cachedNormalZ2=null);var n=t.__cachedNormalStl={};t.__cachedNormalZ2=t.z2;var i=t.style;for(var r in e)null!=e[r]&&(n[r]=i[r]);n.fill=i.fill,n.stroke=i.stroke}}function ko(t){var e=t.__hoverStl;if(e&&!t.__highlighted){var n=t.__zr,i=t.useHoverLayer&&n&&"canvas"===n.painter.type;if(t.__highlighted=i?"layer":"plain",!(t.isGroup||!n&&t.useHoverLayer)){var r=t,o=t.style;i&&(r=n.addHover(t),o=r.style),$o(o),i||Io(r),o.extendFrom(e),Do(o,e,"fill"),Do(o,e,"stroke"),Ko(o),i||(t.dirty(!1),t.z2+=Cm)}}}function Do(t,e,n){!Co(e[n])&&Co(t[n])&&(t[n]=To(t[n]))}function Ao(t){var e=t.__highlighted;if(e&&(t.__highlighted=!1,!t.isGroup))if("layer"===e)t.__zr&&t.__zr.removeHover(t);else{var n=t.style,i=t.__cachedNormalStl;i&&($o(n),t.setStyle(i),Ko(n));var r=t.__cachedNormalZ2;null!=r&&t.z2-r===Cm&&(t.z2=r)}}function Po(t,e,n){var i,r=km,o=km;t.__highlighted&&(r=Im,i=!0),e(t,n),t.__highlighted&&(o=Im,i=!0),t.isGroup&&t.traverse(function(t){!t.isGroup&&e(t,n)}),i&&t.__highDownOnUpdate&&t.__highDownOnUpdate(r,o)}function Oo(t,e){e=t.__hoverStl=e!==!1&&(t.hoverStyle||e||{}),t.__hoverStlDirty=!0,t.__highlighted&&(t.__cachedNormalStl=null,Ao(t),ko(t))}function Lo(t){!Ro(this,t)&&!this.__highByOuter&&Po(this,ko)}function Bo(t){!Ro(this,t)&&!this.__highByOuter&&Po(this,Ao)}function Eo(t){this.__highByOuter|=1<<(t||0),Po(this,ko)}function zo(t){!(this.__highByOuter&=~(1<<(t||0)))&&Po(this,Ao)}function Ro(t,e){return t.__highDownSilentOnTouch&&e.zrByTouch}function No(t,e){Fo(t,!0),Po(t,Oo,e)}function Fo(t,e){var n=e===!1;if(t.__highDownSilentOnTouch=t.highDownSilentOnTouch,t.__highDownOnUpdate=t.highDownOnUpdate,!n||t.__highDownDispatcher){var i=n?"off":"on";t[i]("mouseover",Lo)[i]("mouseout",Bo),t[i]("emphasis",Eo)[i]("normal",zo),t.__highByOuter=t.__highByOuter||0,t.__highDownDispatcher=!n}}function Ho(t){return!(!t||!t.__highDownDispatcher)}function Vo(t){var e=Am[t];return null==e&&32>=Dm&&(e=Am[t]=Dm++),e}function Go(t,e,n,i,r,o,a){r=r||Mm;var s,l=r.labelFetcher,u=r.labelDataIndex,h=r.labelDimIndex,c=n.getShallow("show"),d=i.getShallow("show");(c||d)&&(l&&(s=l.getFormattedLabel(u,"normal",null,h)),null==s&&(s=w(r.defaultText)?r.defaultText(u,r):r.defaultText));var f=c?s:null,p=d?D(l?l.getFormattedLabel(u,"emphasis",null,h):null,s):null;(null!=f||null!=p)&&(Xo(t,n,o,r),Xo(e,i,a,r,!0)),t.text=f,e.text=p}function Wo(t,e,n){var i=t.style;e&&($o(i),t.setStyle(e),Ko(i)),i=t.__hoverStl,n&&i&&($o(i),a(i,n),Ko(i))}function Xo(t,e,n,i,r){return Uo(t,e,i,r),n&&a(t,n),t}function Yo(t,e,n){var i,r={isRectText:!0};n===!1?i=!0:r.autoColor=n,Uo(t,e,r,i)}function Uo(t,e,n,i){if(n=n||Mm,n.isRectText){var r;n.getTextPosition?r=n.getTextPosition(e,i):(r=e.getShallow("position")||(i?null:"inside"),"outside"===r&&(r="top")),t.textPosition=r,t.textOffset=e.getShallow("offset");var o=e.getShallow("rotate");null!=o&&(o*=Math.PI/180),t.textRotation=o,t.textDistance=D(e.getShallow("distance"),i?null:5)}var a,s=e.ecModel,l=s&&s.option.textStyle,u=jo(e);if(u){a={};for(var h in u)if(u.hasOwnProperty(h)){var c=e.getModel(["rich",h]);qo(a[h]={},c,l,n,i)}}return t.rich=a,qo(t,e,l,n,i,!0),n.forceRich&&!n.textStyle&&(n.textStyle={}),t}function jo(t){for(var e;t&&t!==t.ecModel;){var n=(t.option||Mm).rich;if(n){e=e||{};for(var i in n)n.hasOwnProperty(i)&&(e[i]=1)}t=t.parentModel}return e}function qo(t,e,n,i,r,o){n=!r&&n||Mm,t.textFill=Zo(e.getShallow("color"),i)||n.color,t.textStroke=Zo(e.getShallow("textBorderColor"),i)||n.textBorderColor,t.textStrokeWidth=D(e.getShallow("textBorderWidth"),n.textBorderWidth),r||(o&&(t.insideRollbackOpt=i,Ko(t)),null==t.textFill&&(t.textFill=i.autoColor)),t.fontStyle=e.getShallow("fontStyle")||n.fontStyle,t.fontWeight=e.getShallow("fontWeight")||n.fontWeight,t.fontSize=e.getShallow("fontSize")||n.fontSize,t.fontFamily=e.getShallow("fontFamily")||n.fontFamily,t.textAlign=e.getShallow("align"),t.textVerticalAlign=e.getShallow("verticalAlign")||e.getShallow("baseline"),t.textLineHeight=e.getShallow("lineHeight"),t.textWidth=e.getShallow("width"),t.textHeight=e.getShallow("height"),t.textTag=e.getShallow("tag"),o&&i.disableBox||(t.textBackgroundColor=Zo(e.getShallow("backgroundColor"),i),t.textPadding=e.getShallow("padding"),t.textBorderColor=Zo(e.getShallow("borderColor"),i),t.textBorderWidth=e.getShallow("borderWidth"),t.textBorderRadius=e.getShallow("borderRadius"),t.textBoxShadowColor=e.getShallow("shadowColor"),t.textBoxShadowBlur=e.getShallow("shadowBlur"),t.textBoxShadowOffsetX=e.getShallow("shadowOffsetX"),t.textBoxShadowOffsetY=e.getShallow("shadowOffsetY")),t.textShadowColor=e.getShallow("textShadowColor")||n.textShadowColor,t.textShadowBlur=e.getShallow("textShadowBlur")||n.textShadowBlur,t.textShadowOffsetX=e.getShallow("textShadowOffsetX")||n.textShadowOffsetX,t.textShadowOffsetY=e.getShallow("textShadowOffsetY")||n.textShadowOffsetY}function Zo(t,e){return"auto"!==t?t:e&&e.autoColor?e.autoColor:null}function Ko(t){var e,n=t.textPosition,i=t.insideRollbackOpt;if(i&&null==t.textFill){var r=i.autoColor,o=i.isRectText,a=i.useInsideStyle,s=a!==!1&&(a===!0||o&&n&&"string"==typeof n&&n.indexOf("inside")>=0),l=!s&&null!=r;(s||l)&&(e={textFill:t.textFill,textStroke:t.textStroke,textStrokeWidth:t.textStrokeWidth}),s&&(t.textFill="#fff",null==t.textStroke&&(t.textStroke=r,null==t.textStrokeWidth&&(t.textStrokeWidth=2))),l&&(t.textFill=r)}t.insideRollback=e}function $o(t){var e=t.insideRollback;e&&(t.textFill=e.textFill,t.textStroke=e.textStroke,t.textStrokeWidth=e.textStrokeWidth,t.insideRollback=null)}function Qo(t,e){var n=e&&e.getModel("textStyle");return B([t.fontStyle||n&&n.getShallow("fontStyle")||"",t.fontWeight||n&&n.getShallow("fontWeight")||"",(t.fontSize||n&&n.getShallow("fontSize")||12)+"px",t.fontFamily||n&&n.getShallow("fontFamily")||"sans-serif"].join(" "))}function Jo(t,e,n,i,r,o){"function"==typeof r&&(o=r,r=null);var a=i&&i.isAnimationEnabled();if(a){var s=t?"Update":"",l=i.getShallow("animationDuration"+s),u=i.getShallow("animationEasing"+s),h=i.getShallow("animationDelay"+s);"function"==typeof h&&(h=h(r,i.getAnimationDelayParams?i.getAnimationDelayParams(e,r):null)),"function"==typeof l&&(l=l(r)),l>0?e.animateTo(n,l,h||0,u,o,!!o):(e.stopAnimation(),e.attr(n),o&&o())}else e.stopAnimation(),e.attr(n),o&&o()}function ta(t,e,n,i,r){Jo(!0,t,e,n,i,r)}function ea(t,e,n,i,r){Jo(!1,t,e,n,i,r)}function na(t,e){for(var n=Le([]);t&&t!==e;)Ee(n,t.getLocalTransform(),n),t=t.parent;return n}function ia(t,e,n){return e&&!d(e)&&(e=up.getLocalTransform(e)),n&&(e=Fe([],e)),oe([],t,e)}function ra(t,e,n){var i=0===e[4]||0===e[5]||0===e[0]?1:Math.abs(2*e[4]/e[0]),r=0===e[4]||0===e[5]||0===e[2]?1:Math.abs(2*e[4]/e[2]),o=["left"===t?-i:"right"===t?i:0,"top"===t?-r:"bottom"===t?r:0];return o=ia(o,e,n),Math.abs(o[0])>Math.abs(o[1])?o[0]>0?"right":"left":o[1]>0?"bottom":"top"}function oa(t,e,n){function i(t){var e={};return t.traverse(function(t){!t.isGroup&&t.anid&&(e[t.anid]=t)}),e}function r(t){var e={position:W(t.position),rotation:t.rotation};return t.shape&&(e.shape=a({},t.shape)),e}if(t&&e){var o=i(t);e.traverse(function(t){if(!t.isGroup&&t.anid){var e=o[t.anid];if(e){var i=r(t);t.attr(r(e)),ta(t,i,n,t.dataIndex)}}})}}function aa(t,e){return p(t,function(t){var n=t[0];n=bm(n,e.x),n=Sm(n,e.x+e.width);var i=t[1];return i=bm(i,e.y),i=Sm(i,e.y+e.height),[n,i]})}function sa(t,e){var n=bm(t.x,e.x),i=Sm(t.x+t.width,e.x+e.width),r=bm(t.y,e.y),o=Sm(t.y+t.height,e.y+e.height);return i>=n&&o>=r?{x:n,y:r,width:i-n,height:o-r}:void 0}function la(t,e,n){e=a({rectHover:!0},e);var i=e.style={strokeNoScale:!0};return n=n||{x:-1,y:-1,width:2,height:2},t?0===t.indexOf("image://")?(i.image=t.slice(8),s(i,n),new Ii(e)):_o(t.replace("path://",""),e,n,"center"):void 0}function ua(t,e,n,i,r){for(var o=0,a=r[r.length-1];o<r.length;o++){var s=r[o];if(ha(t,e,n,i,s[0],s[1],a[0],a[1]))return!0;a=s}}function ha(t,e,n,i,r,o,a,s){var l=n-t,u=i-e,h=a-r,c=s-o,d=ca(h,c,l,u);if(da(d))return!1;var f=t-r,p=e-o,g=ca(f,p,l,u)/d;if(0>g||g>1)return!1;var v=ca(f,p,h,c)/d;return 0>v||v>1?!1:!0}function ca(t,e,n,i){return t*i-n*e}function da(t){return 1e-6>=t&&t>=-1e-6}function fa(t,e,n){this.parentModel=e,this.ecModel=n,this.option=t}function pa(t,e,n){for(var i=0;i<e.length&&(!e[i]||(t=t&&"object"==typeof t?t[e[i]]:null,null!=t));i++);return null==t&&n&&(t=n.get(e)),t}function ga(t,e){var n=Gm(t).getParent;return n?n.call(t,e):t.parentModel}function va(t){return[t||"",Wm++,Math.random().toFixed(5)].join("_")}function ma(t){var e={};return t.registerSubTypeDefaulter=function(t,n){t=pr(t),e[t.main]=n
  3. },t.determineSubType=function(n,i){var r=i.type;if(!r){var o=pr(n).main;t.hasSubTypes(n)&&e[o]&&(r=e[o](i))}return r},t}function ya(t,e){function n(t){var n={},o=[];return f(t,function(a){var s=i(n,a),l=s.originalDeps=e(a),h=r(l,t);s.entryCount=h.length,0===s.entryCount&&o.push(a),f(h,function(t){u(s.predecessor,t)<0&&s.predecessor.push(t);var e=i(n,t);u(e.successor,t)<0&&e.successor.push(a)})}),{graph:n,noEntryList:o}}function i(t,e){return t[e]||(t[e]={predecessor:[],successor:[]}),t[e]}function r(t,e){var n=[];return f(t,function(t){u(e,t)>=0&&n.push(t)}),n}t.topologicalTravel=function(t,e,i,r){function o(t){l[t].entryCount--,0===l[t].entryCount&&u.push(t)}function a(t){h[t]=!0,o(t)}if(t.length){var s=n(e),l=s.graph,u=s.noEntryList,h={};for(f(t,function(t){h[t]=!0});u.length;){var c=u.pop(),d=l[c],p=!!h[c];p&&(i.call(r,c,d.originalDeps.slice()),delete h[c]),f(d.successor,p?a:o)}f(h,function(){throw new Error("Circle dependency may exists")})}}}function _a(t){return t.replace(/^\s+|\s+$/g,"")}function xa(t,e,n,i){var r=e[1]-e[0],o=n[1]-n[0];if(0===r)return 0===o?n[0]:(n[0]+n[1])/2;if(i)if(r>0){if(t<=e[0])return n[0];if(t>=e[1])return n[1]}else{if(t>=e[0])return n[0];if(t<=e[1])return n[1]}else{if(t===e[0])return n[0];if(t===e[1])return n[1]}return(t-e[0])/r*o+n[0]}function wa(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?_a(t).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?0/0:+t}function ba(t,e,n){return null==e&&(e=10),e=Math.min(Math.max(0,e),20),t=(+t).toFixed(e),n?t:+t}function Sa(t){return t.sort(function(t,e){return t-e}),t}function Ma(t){if(t=+t,isNaN(t))return 0;for(var e=1,n=0;Math.round(t*e)/e!==t;)e*=10,n++;return n}function Ca(t){var e=t.toString(),n=e.indexOf("e");if(n>0){var i=+e.slice(n+1);return 0>i?-i:0}var r=e.indexOf(".");return 0>r?0:e.length-1-r}function Ta(t,e){var n=Math.log,i=Math.LN10,r=Math.floor(n(t[1]-t[0])/i),o=Math.round(n(Math.abs(e[1]-e[0]))/i),a=Math.min(Math.max(-r+o,0),20);return isFinite(a)?a:20}function Ia(t,e,n){if(!t[e])return 0;var i=g(t,function(t,e){return t+(isNaN(e)?0:e)},0);if(0===i)return 0;for(var r=Math.pow(10,n),o=p(t,function(t){return(isNaN(t)?0:t)/i*r*100}),a=100*r,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]});a>l;){for(var h=Number.NEGATIVE_INFINITY,c=null,d=0,f=u.length;f>d;++d)u[d]>h&&(h=u[d],c=d);++s[c],u[c]=0,++l}return s[e]/r}function ka(t){var e=2*Math.PI;return(t%e+e)%e}function Da(t){return t>-Xm&&Xm>t}function Aa(t){if(t instanceof Date)return t;if("string"==typeof t){var e=Um.exec(t);if(!e)return new Date(0/0);if(e[8]){var n=+e[4]||0;return"Z"!==e[8].toUpperCase()&&(n-=e[8].slice(0,3)),new Date(Date.UTC(+e[1],+(e[2]||1)-1,+e[3]||1,n,+(e[5]||0),+e[6]||0,+e[7]||0))}return new Date(+e[1],+(e[2]||1)-1,+e[3]||1,+e[4]||0,+(e[5]||0),+e[6]||0,+e[7]||0)}return new Date(null==t?0/0:Math.round(t))}function Pa(t){return Math.pow(10,Oa(t))}function Oa(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 La(t,e){var n,i=Oa(t),r=Math.pow(10,i),o=t/r;return n=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=n*r,i>=-20?+t.toFixed(0>i?-i:0):t}function Ba(t,e){var n=(t.length-1)*e+1,i=Math.floor(n),r=+t[i-1],o=n-i;return o?r+o*(t[i]-r):r}function Ea(t){function e(t,n,i){return t.interval[i]<n.interval[i]||t.interval[i]===n.interval[i]&&(t.close[i]-n.close[i]===(i?-1:1)||!i&&e(t,n,1))}t.sort(function(t,n){return e(t,n,0)?-1:1});for(var n=-1/0,i=1,r=0;r<t.length;){for(var o=t[r].interval,a=t[r].close,s=0;2>s;s++)o[s]<=n&&(o[s]=n,a[s]=s?1:1-i),n=o[s],i=a[s];o[0]===o[1]&&a[0]*a[1]!==1?t.splice(r,1):r++}return t}function za(t){return t-parseFloat(t)>=0}function Ra(t){return isNaN(t)?"-":(t=(t+"").split("."),t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:""))}function Na(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 Fa(t){return null==t?"":(t+"").replace(Zm,function(t,e){return Km[e]})}function Ha(t,e,n){x(e)||(e=[e]);var i=e.length;if(!i)return"";for(var r=e[0].$vars||[],o=0;o<r.length;o++){var a=$m[o];t=t.replace(Qm(a),Qm(a,0))}for(var s=0;i>s;s++)for(var l=0;l<r.length;l++){var u=e[s][r[l]];t=t.replace(Qm($m[l],s),n?Fa(u):u)}return t}function Va(t,e,n){return f(e,function(e,i){t=t.replace("{"+i+"}",n?Fa(e):e)}),t}function Ga(t,e){t=b(t)?{color:t,extraCssText:e}:t||{};var n=t.color,i=t.type,e=t.extraCssText,r=t.renderMode||"html",o=t.markerId||"X";return n?"html"===r?"subItem"===i?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+Fa(n)+";"+(e||"")+'"></span>':'<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:'+Fa(n)+";"+(e||"")+'"></span>':{renderMode:r,content:"{marker"+o+"|} ",style:{color:n}}:""}function Wa(t,e){return t+="","0000".substr(0,e-t.length)+t}function Xa(t,e,n){("week"===t||"month"===t||"quarter"===t||"half-year"===t||"year"===t)&&(t="MM-dd\nyyyy");var i=Aa(e),r=n?"UTC":"",o=i["get"+r+"FullYear"](),a=i["get"+r+"Month"]()+1,s=i["get"+r+"Date"](),l=i["get"+r+"Hours"](),u=i["get"+r+"Minutes"](),h=i["get"+r+"Seconds"](),c=i["get"+r+"Milliseconds"]();return t=t.replace("MM",Wa(a,2)).replace("M",a).replace("yyyy",o).replace("yy",o%100).replace("dd",Wa(s,2)).replace("d",s).replace("hh",Wa(l,2)).replace("h",l).replace("mm",Wa(u,2)).replace("m",u).replace("ss",Wa(h,2)).replace("s",h).replace("SSS",Wa(c,3))}function Ya(t){return t?t.charAt(0).toUpperCase()+t.substr(1):t}function Ua(t){return Yn(t.text,t.font,t.textAlign,t.textVerticalAlign,t.textPadding,t.textLineHeight,t.rich,t.truncate)}function ja(t,e,n,i,r,o,a,s){return Yn(t,e,n,i,r,s,o,a)}function qa(t,e,n,i,r){var o=0,a=0;null==i&&(i=1/0),null==r&&(r=1/0);var s=0;e.eachChild(function(l,u){var h,c,d=l.position,f=l.getBoundingRect(),p=e.childAt(u+1),g=p&&p.getBoundingRect();if("horizontal"===t){var v=f.width+(g?-g.x+f.x:0);h=o+v,h>i||l.newline?(o=0,h=v,a+=s+n,s=f.height):s=Math.max(s,f.height)}else{var m=f.height+(g?-g.y+f.y:0);c=a+m,c>r||l.newline?(o+=s+n,a=0,c=m,s=f.width):s=Math.max(s,f.width)}l.newline||(d[0]=o,d[1]=a,"horizontal"===t?o=h+n:a=c+n)})}function Za(t,e,n){n=qm(n||0);var i=e.width,r=e.height,o=wa(t.left,i),a=wa(t.top,r),s=wa(t.right,i),l=wa(t.bottom,r),u=wa(t.width,i),h=wa(t.height,r),c=n[2]+n[0],d=n[1]+n[3],f=t.aspect;switch(isNaN(u)&&(u=i-s-d-o),isNaN(h)&&(h=r-l-c-a),null!=f&&(isNaN(u)&&isNaN(h)&&(f>i/r?u=.8*i:h=.8*r),isNaN(u)&&(u=f*h),isNaN(h)&&(h=u/f)),isNaN(o)&&(o=i-s-u-d),isNaN(a)&&(a=r-l-h-c),t.left||t.right){case"center":o=i/2-u/2-n[3];break;case"right":o=i-u-d}switch(t.top||t.bottom){case"middle":case"center":a=r/2-h/2-n[0];break;case"bottom":a=r-h-c}o=o||0,a=a||0,isNaN(u)&&(u=i-d-o-(s||0)),isNaN(h)&&(h=r-c-a-(l||0));var p=new Tn(o+n[3],a+n[0],u,h);return p.margin=n,p}function Ka(t,e,n){function i(n,i){var a={},l=0,u={},h=0,c=2;if(ey(n,function(e){u[e]=t[e]}),ey(n,function(t){r(e,t)&&(a[t]=u[t]=e[t]),o(a,t)&&l++,o(u,t)&&h++}),s[i])return o(e,n[1])?u[n[2]]=null:o(e,n[2])&&(u[n[1]]=null),u;if(h!==c&&l){if(l>=c)return a;for(var d=0;d<n.length;d++){var f=n[d];if(!r(a,f)&&r(t,f)){a[f]=t[f];break}}return a}return u}function r(t,e){return t.hasOwnProperty(e)}function o(t,e){return null!=t[e]&&"auto"!==t[e]}function a(t,e,n){ey(t,function(t){e[t]=n[t]})}!S(n)&&(n={});var s=n.ignoreSize;!x(s)&&(s=[s,s]);var l=i(iy[0],0),u=i(iy[1],1);a(iy[0],t,l),a(iy[1],t,u)}function $a(t){return Qa({},t)}function Qa(t,e){return e&&t&&ey(ny,function(n){e.hasOwnProperty(n)&&(t[n]=e[n])}),t}function Ja(t){var e=[];return f(sy.getClassesByMainType(t),function(t){e=e.concat(t.prototype.dependencies||[])}),e=p(e,function(t){return pr(t).main}),"dataset"!==t&&u(e,"dataset")<=0&&e.unshift("dataset"),e}function ts(t,e){for(var n=t.length,i=0;n>i;i++)if(t[i].length>e)return t[i];return t[n-1]}function es(t){this.fromDataset=t.fromDataset,this.data=t.data||(t.sourceFormat===gy?{}:[]),this.sourceFormat=t.sourceFormat||vy,this.seriesLayoutBy=t.seriesLayoutBy||yy,this.dimensionsDefine=t.dimensionsDefine,this.encodeDefine=t.encodeDefine&&N(t.encodeDefine),this.startIndex=t.startIndex||0,this.dimensionsDetectCount=t.dimensionsDetectCount}function ns(t){var e=t.option.source,n=vy;if(C(e))n=my;else if(x(e)){0===e.length&&(n=fy);for(var i=0,r=e.length;r>i;i++){var o=e[i];if(null!=o){if(x(o)){n=fy;break}if(S(o)){n=py;break}}}}else if(S(e)){for(var a in e)if(e.hasOwnProperty(a)&&d(e[a])){n=gy;break}}else if(null!=e)throw new Error("Invalid data");wy(t).sourceFormat=n}function is(t){return wy(t).source}function rs(t){wy(t).datasetMap=N()}function os(t){var e=t.option,n=e.data,i=C(n)?my:dy,r=!1,o=e.seriesLayoutBy,a=e.sourceHeader,s=e.dimensions,l=cs(t);if(l){var u=l.option;n=u.source,i=wy(l).sourceFormat,r=!0,o=o||u.seriesLayoutBy,null==a&&(a=u.sourceHeader),s=s||u.dimensions}var h=as(n,i,o,a,s);wy(t).source=new es({data:n,fromDataset:r,seriesLayoutBy:o,sourceFormat:i,dimensionsDefine:h.dimensionsDefine,startIndex:h.startIndex,dimensionsDetectCount:h.dimensionsDetectCount,encodeDefine:e.encode})}function as(t,e,n,i,r){if(!t)return{dimensionsDefine:ss(r)};var o,a;if(e===fy)"auto"===i||null==i?ls(function(t){null!=t&&"-"!==t&&(b(t)?null==a&&(a=1):a=0)},n,t,10):a=i?1:0,r||1!==a||(r=[],ls(function(t,e){r[e]=null!=t?t:""},n,t)),o=r?r.length:n===_y?t.length:t[0]?t[0].length:null;else if(e===py)r||(r=us(t));else if(e===gy)r||(r=[],f(t,function(t,e){r.push(e)}));else if(e===dy){var s=er(t[0]);o=x(s)&&s.length||1}return{startIndex:a,dimensionsDefine:ss(r),dimensionsDetectCount:o}}function ss(t){if(t){var e=N();return p(t,function(t){if(t=a({},S(t)?t:{name:t}),null==t.name)return t;t.name+="",null==t.displayName&&(t.displayName=t.name);var n=e.get(t.name);return n?t.name+="-"+n.count++:e.set(t.name,{count:1}),t})}}function ls(t,e,n,i){if(null==i&&(i=1/0),e===_y)for(var r=0;r<n.length&&i>r;r++)t(n[r]?n[r][0]:null,r);else for(var o=n[0]||[],r=0;r<o.length&&i>r;r++)t(o[r],r)}function us(t){for(var e,n=0;n<t.length&&!(e=t[n++]););if(e){var i=[];return f(e,function(t,e){i.push(e)}),i}}function hs(t,e,n){function i(t,e,n){for(var i=0;n>i;i++)t.push(e+i)}function r(t){var e=t.dimsDef;return e?e.length:1}var o={},a=cs(e);if(!a||!t)return o;var s,l,u=[],h=[],c=e.ecModel,d=wy(c).datasetMap,p=a.uid+"_"+n.seriesLayoutBy;t=t.slice(),f(t,function(e,n){!S(e)&&(t[n]={name:e}),"ordinal"===e.type&&null==s&&(s=n,l=r(t[n])),o[e.name]=[]});var g=d.get(p)||d.set(p,{categoryWayDim:l,valueWayDim:0});return f(t,function(t,e){var n=t.name,a=r(t);if(null==s){var l=g.valueWayDim;i(o[n],l,a),i(h,l,a),g.valueWayDim+=a}else if(s===e)i(o[n],0,a),i(u,0,a);else{var l=g.categoryWayDim;i(o[n],l,a),i(h,l,a),g.categoryWayDim+=a}}),u.length&&(o.itemName=u),h.length&&(o.seriesName=h),o}function cs(t){var e=t.option,n=e.data;return n?void 0:t.ecModel.getComponent("dataset",e.datasetIndex||0)}function ds(t,e){return fs(t.data,t.sourceFormat,t.seriesLayoutBy,t.dimensionsDefine,t.startIndex,e)}function fs(t,e,n,i,r,o){function a(t){var e=b(t);return null!=t&&isFinite(t)&&""!==t?e?xy.Might:xy.Not:e&&"-"!==t?xy.Must:void 0}var s,l=5;if(C(t))return xy.Not;var u,h;if(i){var c=i[o];S(c)?(u=c.name,h=c.type):b(c)&&(u=c)}if(null!=h)return"ordinal"===h?xy.Must:xy.Not;if(e===fy)if(n===_y){for(var d=t[o],f=0;f<(d||[]).length&&l>f;f++)if(null!=(s=a(d[r+f])))return s}else for(var f=0;f<t.length&&l>f;f++){var p=t[r+f];if(p&&null!=(s=a(p[o])))return s}else if(e===py){if(!u)return xy.Not;for(var f=0;f<t.length&&l>f;f++){var g=t[f];if(g&&null!=(s=a(g[u])))return s}}else if(e===gy){if(!u)return xy.Not;var d=t[u];if(!d||C(d))return xy.Not;for(var f=0;f<d.length&&l>f;f++)if(null!=(s=a(d[f])))return s}else if(e===dy)for(var f=0;f<t.length&&l>f;f++){var g=t[f],v=er(g);if(!x(v))return xy.Not;if(null!=(s=a(v[o])))return s}return xy.Not}function ps(t,e){if(e){var n=e.seiresIndex,i=e.seriesId,r=e.seriesName;return null!=n&&t.componentIndex!==n||null!=i&&t.id!==i||null!=r&&t.name!==r}}function gs(t,e){var n=t.color&&!t.colorLayer;f(e,function(e,o){"colorLayer"===o&&n||sy.hasClass(o)||("object"==typeof e?t[o]=t[o]?r(t[o],e,!1):i(e):null==t[o]&&(t[o]=e))})}function vs(t){t=t,this.option={},this.option[by]=1,this._componentsMap=N({series:[]}),this._seriesIndices,this._seriesIndicesMap,gs(t,this._theme.option),r(t,uy,!1),this.mergeOption(t)}function ms(t,e){x(e)||(e=e?[e]:[]);var n={};return f(e,function(e){n[e]=(t.get(e)||[]).slice()}),n}function ys(t,e,n){var i=e.type?e.type:n?n.subType:sy.determineSubType(t,e);return i}function _s(t,e){t._seriesIndicesMap=N(t._seriesIndices=p(e,function(t){return t.componentIndex})||[])}function xs(t,e){return e.hasOwnProperty("subType")?v(t,function(t){return t.subType===e.subType}):t}function ws(t){f(My,function(e){this[e]=y(t[e],t)},this)}function bs(){this._coordinateSystems=[]}function Ss(t){this._api=t,this._timelineOptions=[],this._mediaList=[],this._mediaDefault,this._currentMediaIndices=[],this._optionBackup,this._newBaseOption}function Ms(t,e,n){var i,r,o=[],a=[],s=t.timeline;if(t.baseOption&&(r=t.baseOption),(s||t.options)&&(r=r||{},o=(t.options||[]).slice()),t.media){r=r||{};var l=t.media;Ty(l,function(t){t&&t.option&&(t.query?a.push(t):i||(i=t))})}return r||(r=t),r.timeline||(r.timeline=s),Ty([r].concat(o).concat(p(a,function(t){return t.option})),function(t){Ty(e,function(e){e(t,n)})}),{baseOption:r,timelineOptions:o,mediaDefault:i,mediaList:a}}function Cs(t,e,n){var i={width:e,height:n,aspectratio:e/n},r=!0;return f(t,function(t,e){var n=e.match(Ay);if(n&&n[1]&&n[2]){var o=n[1],a=n[2].toLowerCase();Ts(i[a],t,o)||(r=!1)}}),r}function Ts(t,e,n){return"min"===n?t>=e:"max"===n?e>=t:t===e}function Is(t,e){return t.join(",")===e.join(",")}function ks(t,e){e=e||{},Ty(e,function(e,n){if(null!=e){var i=t[n];if(sy.hasClass(n)){e=Ji(e),i=Ji(i);var r=ir(i,e);t[n]=ky(r,function(t){return t.option&&t.exist?Dy(t.exist,t.option,!0):t.exist||t.option})}else t[n]=Dy(i,e,!0)}})}function Ds(t){var e=t&&t.itemStyle;if(e)for(var n=0,i=Ly.length;i>n;n++){var o=Ly[n],a=e.normal,s=e.emphasis;a&&a[o]&&(t[o]=t[o]||{},t[o].normal?r(t[o].normal,a[o]):t[o].normal=a[o],a[o]=null),s&&s[o]&&(t[o]=t[o]||{},t[o].emphasis?r(t[o].emphasis,s[o]):t[o].emphasis=s[o],s[o]=null)}}function As(t,e,n){if(t&&t[e]&&(t[e].normal||t[e].emphasis)){var i=t[e].normal,r=t[e].emphasis;i&&(n?(t[e].normal=t[e].emphasis=null,s(t[e],i)):t[e]=i),r&&(t.emphasis=t.emphasis||{},t.emphasis[e]=r)}}function Ps(t){As(t,"itemStyle"),As(t,"lineStyle"),As(t,"areaStyle"),As(t,"label"),As(t,"labelLine"),As(t,"upperLabel"),As(t,"edgeLabel")}function Os(t,e){var n=Oy(t)&&t[e],i=Oy(n)&&n.textStyle;if(i)for(var r=0,o=Vg.length;o>r;r++){var e=Vg[r];i.hasOwnProperty(e)&&(n[e]=i[e])}}function Ls(t){t&&(Ps(t),Os(t,"label"),t.emphasis&&Os(t.emphasis,"label"))}function Bs(t){if(Oy(t)){Ds(t),Ps(t),Os(t,"label"),Os(t,"upperLabel"),Os(t,"edgeLabel"),t.emphasis&&(Os(t.emphasis,"label"),Os(t.emphasis,"upperLabel"),Os(t.emphasis,"edgeLabel"));var e=t.markPoint;e&&(Ds(e),Ls(e));var n=t.markLine;n&&(Ds(n),Ls(n));var i=t.markArea;i&&Ls(i);var r=t.data;if("graph"===t.type){r=r||t.nodes;var o=t.links||t.edges;if(o&&!C(o))for(var a=0;a<o.length;a++)Ls(o[a]);f(t.categories,function(t){Ps(t)})}if(r&&!C(r))for(var a=0;a<r.length;a++)Ls(r[a]);var e=t.markPoint;if(e&&e.data)for(var s=e.data,a=0;a<s.length;a++)Ls(s[a]);var n=t.markLine;if(n&&n.data)for(var l=n.data,a=0;a<l.length;a++)x(l[a])?(Ls(l[a][0]),Ls(l[a][1])):Ls(l[a]);"gauge"===t.type?(Os(t,"axisLabel"),Os(t,"title"),Os(t,"detail")):"treemap"===t.type?(As(t.breadcrumb,"itemStyle"),f(t.levels,function(t){Ps(t)})):"tree"===t.type&&Ps(t.leaves)}}function Es(t){return x(t)?t:t?[t]:[]}function zs(t){return(x(t)?t[0]:t)||{}}function Rs(t,e){e=e.split(",");for(var n=t,i=0;i<e.length&&(n=n&&n[e[i]],null!=n);i++);return n}function Ns(t,e,n,i){e=e.split(",");for(var r,o=t,a=0;a<e.length-1;a++)r=e[a],null==o[r]&&(o[r]={}),o=o[r];(i||null==o[e[a]])&&(o[e[a]]=n)}function Fs(t){f(Ey,function(e){e[0]in t&&!(e[1]in t)&&(t[e[1]]=t[e[0]])})}function Hs(t){f(t,function(e,n){var i=[],r=[0/0,0/0],o=[e.stackResultDimension,e.stackedOverDimension],a=e.data,s=e.isStackedByIndex,l=a.map(o,function(o,l,u){var h=a.get(e.stackedDimension,u);if(isNaN(h))return r;var c,d;s?d=a.getRawIndex(u):c=a.get(e.stackedByDimension,u);for(var f=0/0,p=n-1;p>=0;p--){var g=t[p];if(s||(d=g.data.rawIndexOf(g.stackedByDimension,c)),d>=0){var v=g.data.getByRawIndex(g.stackResultDimension,d);if(h>=0&&v>0||0>=h&&0>v){h+=v,f=v;break}}}return i[0]=h,i[1]=f,i});a.hostModel.setData(l),e.data=l})}function Vs(t,e){es.isInstance(t)||(t=es.seriesDataToSource(t)),this._source=t;var n=this._data=t.data,i=t.sourceFormat;i===my&&(this._offset=0,this._dimSize=e,this._data=n);var r=Hy[i===fy?i+"_"+t.seriesLayoutBy:i];a(this,r)}function Gs(){return this._data.length}function Ws(t){return this._data[t]}function Xs(t){for(var e=0;e<t.length;e++)this._data.push(t[e])}function Ys(t,e,n){return null!=n?t[n]:t}function Us(t,e,n,i){return js(t[i],this._dimensionInfos[e])}function js(t,e){var n=e&&e.type;if("ordinal"===n){var i=e&&e.ordinalMeta;return i?i.parseAndCollect(t):t}return"time"===n&&"number"!=typeof t&&null!=t&&"-"!==t&&(t=+Aa(t)),null==t||""===t?0/0:+t}function qs(t,e,n){if(t){var i=t.getRawDataItem(e);if(null!=i){var r,o,a=t.getProvider().getSource().sourceFormat,s=t.getDimensionInfo(n);return s&&(r=s.name,o=s.index),Vy[a](i,e,o,r)}}}function Zs(t){return new Ks(t)}function Ks(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 $s(t,e,n,i,r,o){Uy.reset(n,i,r,o),t._callingProgress=e,t._callingProgress({start:n,end:i,count:i-n,next:Uy.next},t.context)}function Qs(t,e){t._dueIndex=t._outputDueEnd=t._dueEnd=0,t._settedOutputEnd=null;var n,i;!e&&t._reset&&(n=t._reset(t.context),n&&n.progress&&(i=n.forceFirstProgress,n=n.progress),x(n)&&!n.length&&(n=null)),t._progress=n,t._modBy=t._modDataCount=null;var r=t._downstream;return r&&r.dirty(),i}function Js(t){var e=t.name;or(t)||(t.name=tl(t)||e)}function tl(t){var e=t.getRawData(),n=e.mapDimension("seriesName",!0),i=[];return f(n,function(t){var n=e.getDimensionInfo(t);n.displayName&&i.push(n.displayName)}),i.join(" ")}function el(t){return t.model.getRawData().count()}function nl(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),il}function il(t,e){t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function rl(t,e){f(t.CHANGABLE_METHODS,function(n){t.wrapMethod(n,_(ol,e))})}function ol(t){var e=al(t);e&&e.setOutputEnd(this.count())}function al(t){var e=(t.ecModel||{}).scheduler,n=e&&e.getPipeline(t.uid);if(n){var i=n.currentTask;if(i){var r=i.agentStubMap;r&&(i=r.get(t.uid))}return i}}function sl(){this.group=new Np,this.uid=va("viewChart"),this.renderTask=Zs({plan:hl,reset:cl}),this.renderTask.context={view:this}}function ll(t,e,n){if(t&&(t.trigger(e,n),t.isGroup&&!Ho(t)))for(var i=0,r=t.childCount();r>i;i++)ll(t.childAt(i),e,n)}function ul(t,e,n){var i=sr(t,e),r=e&&null!=e.highlightKey?Vo(e.highlightKey):null;null!=i?f(Ji(i),function(e){ll(t.getItemGraphicEl(e),n,r)}):t.eachItemGraphicEl(function(t){ll(t,n,r)})}function hl(t){return Jy(t.model)}function cl(t){var e=t.model,n=t.ecModel,i=t.api,r=t.payload,o=e.pipelineContext.progressiveRender,a=t.view,s=r&&Qy(r).updateMethod,l=o?"incrementalPrepareRender":s&&a[s]?s:"render";return"render"!==l&&a[l](e,n,i,r),e_[l]}function dl(t,e,n){function i(){h=(new Date).getTime(),c=null,t.apply(a,s||[])}var r,o,a,s,l,u=0,h=0,c=null;e=e||0;var d=function(){r=(new Date).getTime(),a=this,s=arguments;var t=l||e,d=l||n;l=null,o=r-(d?u:h)-t,clearTimeout(c),d?c=setTimeout(i,t):o>=0?i():c=setTimeout(i,-o),u=r};return d.clear=function(){c&&(clearTimeout(c),c=null)},d.debounceNextCall=function(t){l=t},d}function fl(t,e,n,i){var r=t[e];if(r){var o=r[n_]||r,a=r[r_],s=r[i_];if(s!==n||a!==i){if(null==n||!i)return t[e]=o;r=t[e]=dl(o,n,"debounce"===i),r[n_]=o,r[r_]=i,r[i_]=n}return r}}function pl(t,e,n,i){this.ecInstance=t,this.api=e,this.unfinished;var n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice();this._allHandlers=n.concat(i),this._stageTaskMap=N()}function gl(t,e,n,i,r){function o(t,e){return t.setDirty&&(!t.dirtyMap||t.dirtyMap.get(e.__pipeline.id))}r=r||{};var a;f(e,function(e){if(!r.visualType||r.visualType===e.visualType){var s=t._stageTaskMap.get(e.uid),l=s.seriesTaskMap,u=s.overallTask;if(u){var h,c=u.agentStubMap;c.each(function(t){o(r,t)&&(t.dirty(),h=!0)}),h&&u.dirty(),c_(u,i);var d=t.getPerformArgs(u,r.block);c.each(function(t){t.perform(d)}),a|=u.perform(d)}else l&&l.each(function(s){o(r,s)&&s.dirty();var l=t.getPerformArgs(s,r.block);l.skip=!e.performRawSeries&&n.isSeriesFiltered(s.context.model),c_(s,i),a|=s.perform(l)})}}),t.unfinished|=a}function vl(t,e,n,i,r){function o(n){var o=n.uid,s=a.get(o)||a.set(o,Zs({plan:bl,reset:Sl,count:Cl}));s.context={model:n,ecModel:i,api:r,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:t},Tl(t,n,s)}var a=n.seriesTaskMap||(n.seriesTaskMap=N()),s=e.seriesType,l=e.getTargetSeries;e.createOnAllSeries?i.eachRawSeries(o):s?i.eachRawSeriesByType(s,o):l&&l(i,r).each(o);var u=t._pipelineMap;a.each(function(t,e){u.get(e)||(t.dispose(),a.removeKey(e))})}function ml(t,e,n,i,r){function o(e){var n=e.uid,i=s.get(n);i||(i=s.set(n,Zs({reset:_l,onDirty:wl})),a.dirty()),i.context={model:e,overallProgress:h,modifyOutputEnd:c},i.agent=a,i.__block=h,Tl(t,e,i)}var a=n.overallTask=n.overallTask||Zs({reset:yl});a.context={ecModel:i,api:r,overallReset:e.overallReset,scheduler:t};var s=a.agentStubMap=a.agentStubMap||N(),l=e.seriesType,u=e.getTargetSeries,h=!0,c=e.modifyOutputEnd;l?i.eachRawSeriesByType(l,o):u?u(i,r).each(o):(h=!1,f(i.getSeries(),o));var d=t._pipelineMap;s.each(function(t,e){d.get(e)||(t.dispose(),a.dirty(),s.removeKey(e))})}function yl(t){t.overallReset(t.ecModel,t.api,t.payload)}function _l(t){return t.overallProgress&&xl}function xl(){this.agent.dirty(),this.getDownstream().dirty()}function wl(){this.agent&&this.agent.dirty()}function bl(t){return t.plan&&t.plan(t.model,t.ecModel,t.api,t.payload)}function Sl(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=Ji(t.reset(t.model,t.ecModel,t.api,t.payload));return e.length>1?p(e,function(t,e){return Ml(e)}):d_}function Ml(t){return function(e,n){var i=n.data,r=n.resetDefines[t];if(r&&r.dataEach)for(var o=e.start;o<e.end;o++)r.dataEach(i,o);else r&&r.progress&&r.progress(e,i)}}function Cl(t){return t.data.count()}function Tl(t,e,n){var i=e.uid,r=t._pipelineMap.get(i);!r.head&&(r.head=n),r.tail&&r.tail.pipe(n),r.tail=n,n.__idxInPipeline=r.count++,n.__pipeline=r}function Il(t){f_=null;try{t(p_,g_)}catch(e){}return f_}function kl(t,e){for(var n in e.prototype)t[n]=H}function Dl(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 Al(){this._defs={},this._root=null,this._isDefine=!1,this._isText=!1}function Pl(t,e){for(var n=t.firstChild;n;){if(1===n.nodeType){var i=n.getAttribute("offset");i=i.indexOf("%")>0?parseInt(i,10)/100:i?parseFloat(i):0;var r=n.getAttribute("stop-color")||"#000000";e.addColorStop(i,r)}n=n.nextSibling}}function Ol(t,e){t&&t.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),s(e.__inheritedStyle,t.__inheritedStyle))}function Ll(t){for(var e=B(t).split(S_),n=[],i=0;i<e.length;i+=2){var r=parseFloat(e[i]),o=parseFloat(e[i+1]);n.push([r,o])}return n}function Bl(t,e,n,i){var r=e.__inheritedStyle||{},o="text"===e.type;if(1===t.nodeType&&(zl(t,e),a(r,Rl(t)),!i))for(var s in T_)if(T_.hasOwnProperty(s)){var l=t.getAttribute(s);null!=l&&(r[T_[s]]=l)}var u=o?"textFill":"fill",h=o?"textStroke":"stroke";e.style=e.style||new jp;var c=e.style;null!=r.fill&&c.set(u,El(r.fill,n)),null!=r.stroke&&c.set(h,El(r.stroke,n)),f(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],function(t){var e="lineWidth"===t&&o?"textStrokeWidth":t;null!=r[t]&&c.set(e,parseFloat(r[t]))}),r.textBaseline&&"auto"!==r.textBaseline||(r.textBaseline="alphabetic"),"alphabetic"===r.textBaseline&&(r.textBaseline="bottom"),"start"===r.textAlign&&(r.textAlign="left"),"end"===r.textAlign&&(r.textAlign="right"),f(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign","textBaseline"],function(t){null!=r[t]&&c.set(t,r[t])}),r.lineDash&&(e.style.lineDash=B(r.lineDash).split(S_)),c[h]&&"none"!==c[h]&&(e[h]=!0),e.__inheritedStyle=r}function El(t,e){var n=e&&t&&t.match(I_);if(n){var i=B(n[1]),r=e[i];return r}return t}function zl(t,e){var n=t.getAttribute("transform");if(n){n=n.replace(/,/g," ");var i=null,r=[];n.replace(k_,function(t,e,n){r.push(e,n)});for(var o=r.length-1;o>0;o-=2){var a=r[o],s=r[o-1];switch(i=i||Oe(),s){case"translate":a=B(a).split(S_),ze(i,i,[parseFloat(a[0]),parseFloat(a[1]||0)]);break;case"scale":a=B(a).split(S_),Ne(i,i,[parseFloat(a[0]),parseFloat(a[1]||a[0])]);break;case"rotate":a=B(a).split(S_),Re(i,i,parseFloat(a[0]));break;case"skew":a=B(a).split(S_),console.warn("Skew transform is not supported yet");break;case"matrix":var a=B(a).split(S_);i[0]=parseFloat(a[0]),i[1]=parseFloat(a[1]),i[2]=parseFloat(a[2]),i[3]=parseFloat(a[3]),i[4]=parseFloat(a[4]),i[5]=parseFloat(a[5])}}e.setLocalTransform(i)}}function Rl(t){var e=t.getAttribute("style"),n={};if(!e)return n;var i={};D_.lastIndex=0;for(var r;null!=(r=D_.exec(e));)i[r[1]]=r[2];for(var o in T_)T_.hasOwnProperty(o)&&null!=i[o]&&(n[T_[o]]=i[o]);return n}function Nl(t,e,n){var i=e/t.width,r=n/t.height,o=Math.min(i,r),a=[o,o],s=[-(t.x+t.width/2)*o+e/2,-(t.y+t.height/2)*o+n/2];return{scale:a,position:s}}function Fl(t,e){return function(n,i,r){(e||!this._disposed)&&(n=n&&n.toLowerCase(),Uf.prototype[t].call(this,n,i,r))}}function Hl(){Uf.call(this)}function Vl(t,e,n){function r(t,e){return t.__prio-e.__prio}n=n||{},"string"==typeof e&&(e=cx[e]),this.id,this.group,this._dom=t;var o="canvas",a=this._zr=qi(t,{renderer:n.renderer||o,devicePixelRatio:n.devicePixelRatio,width:n.width,height:n.height});this._throttledZrFlush=dl(y(a.flush,a),17);var e=i(e);e&&Ry(e,!0),this._theme=e,this._chartsViews=[],this._chartsMap={},this._componentsViews=[],this._componentsMap={},this._coordSysMgr=new bs;var s=this._api=ou(this);Bn(hx,r),Bn(sx,r),this._scheduler=new pl(this,s,sx,hx),Uf.call(this,this._ecEventProcessor=new au),this._messageCenter=new Hl,this._initEvents(),this.resize=y(this.resize,this),this._pendingActions=[],a.animation.on("frame",this._onframe,this),Zl(a,this),E(this)}function Gl(t,e,n){if(!this._disposed){var i,r=this._model,o=this._coordSysMgr.getCoordinateSystems();e=ur(r,e);for(var a=0;a<o.length;a++){var s=o[a];if(s[t]&&null!=(i=s[t](r,e,n)))return i}}}function Wl(t){var e=t._model,n=t._scheduler;n.restorePipelines(e),n.prepareStageTasks(),Kl(t,"component",e,n),Kl(t,"chart",e,n),n.plan()}function Xl(t,e,n,i,r){function o(i){i&&i.__alive&&i[e]&&i[e](i.__model,a,t._api,n)}var a=t._model;if(!i)return void B_(t._componentsViews.concat(t._chartsViews),o);var s={};s[i+"Id"]=n[i+"Id"],s[i+"Index"]=n[i+"Index"],s[i+"Name"]=n[i+"Name"];var l={mainType:i,query:s};r&&(l.subType=r);var u=n.excludeSeriesId;null!=u&&(u=N(Ji(u))),a&&a.eachComponent(l,function(e){u&&null!=u.get(e.id)||o(t["series"===i?"_chartsMap":"_componentsMap"][e.__viewId])},t)}function Yl(t,e){var n=t._chartsMap,i=t._scheduler;e.eachSeries(function(t){i.updateStreamModes(t,n[t.__viewId])})}function Ul(t,e){var n=t.type,i=t.escapeConnect,r=ox[n],o=r.actionInfo,l=(o.update||"update").split(":"),u=l.pop();l=null!=l[0]&&R_(l[0]),this[J_]=!0;var h=[t],c=!1;t.batch&&(c=!0,h=p(t.batch,function(e){return e=s(a({},e),t),e.batch=null,e}));var d,f=[],g="highlight"===n||"downplay"===n;B_(h,function(t){d=r.action(t,this._model,this._api),d=d||a({},t),d.type=o.event||d.type,f.push(d),g?Xl(this,u,t,"series"):l&&Xl(this,u,t,l.main,l.sub)},this),"none"===u||g||l||(this[tx]?(Wl(this),ix.update.call(this,t),this[tx]=!1):ix[u].call(this,t)),d=c?{type:o.event||n,escapeConnect:i,batch:f}:f[0],this[J_]=!1,!e&&this._messageCenter.trigger(d.type,d)}function jl(t){for(var e=this._pendingActions;e.length;){var n=e.shift();Ul.call(this,n,t)}}function ql(t){!t&&this.trigger("updated")}function Zl(t,e){t.on("rendered",function(){e.trigger("rendered"),!t.animation.isFinished()||e[tx]||e._scheduler.unfinished||e._pendingActions.length||e.trigger("finished")})}function Kl(t,e,n,i){function r(t){var e="_ec_"+t.id+"_"+t.type,r=s[e];if(!r){var h=R_(t.type),c=o?Zy.getClass(h.main,h.sub):sl.getClass(h.sub);r=new c,r.init(n,u),s[e]=r,a.push(r),l.add(r.group)}t.__viewId=r.__id=e,r.__alive=!0,r.__model=t,r.group.__ecComponentInfo={mainType:t.mainType,index:t.componentIndex},!o&&i.prepareView(r,t,n,u)}for(var o="component"===e,a=o?t._componentsViews:t._chartsViews,s=o?t._componentsMap:t._chartsMap,l=t._zr,u=t._api,h=0;h<a.length;h++)a[h].__alive=!1;o?n.eachComponent(function(t,e){"series"!==t&&r(e)}):n.eachSeries(r);for(var h=0;h<a.length;){var c=a[h];c.__alive?h++:(!o&&c.renderTask.dispose(),l.remove(c.group),c.dispose(n,u),a.splice(h,1),delete s[c.__id],c.__id=c.group.__ecComponentInfo=null)}}function $l(t){t.clearColorPalette(),t.eachSeries(function(t){t.clearColorPalette()})}function Ql(t,e,n,i){Jl(t,e,n,i),B_(t._chartsViews,function(t){t.__alive=!1}),tu(t,e,n,i),B_(t._chartsViews,function(t){t.__alive||t.remove(e,n)})}function Jl(t,e,n,i,r){B_(r||t._componentsViews,function(t){var r=t.__model;t.render(r,e,n,i),ru(r,t)})}function tu(t,e,n,i,r){var o,a=t._scheduler;e.eachSeries(function(e){var n=t._chartsMap[e.__viewId];n.__alive=!0;var s=n.renderTask;a.updatePayload(s,i),r&&r.get(e.uid)&&s.dirty(),o|=s.perform(a.getPerformArgs(s)),n.group.silent=!!e.get("silent"),ru(e,n),iu(e,n)}),a.unfinished|=o,nu(t,e),s_(t._zr.dom,e)}function eu(t,e){B_(ux,function(n){n(t,e)})}function nu(t,e){var n=t._zr,i=n.storage,r=0;i.traverse(function(){r++}),r>e.get("hoverLayerThreshold")&&!Mf.node&&e.eachSeries(function(e){if(!e.preventUsingHoverLayer){var n=t._chartsMap[e.__viewId];n.__alive&&n.group.traverse(function(t){t.useHoverLayer=!0})}})}function iu(t,e){var n=t.get("blendMode")||null;e.group.traverse(function(t){t.isGroup||t.style.blend!==n&&t.setStyle("blend",n),t.eachPendingDisplayable&&t.eachPendingDisplayable(function(t){t.setStyle("blend",n)})})}function ru(t,e){var n=t.get("z"),i=t.get("zlevel");e.group.traverse(function(t){"group"!==t.type&&(null!=n&&(t.z=n),null!=i&&(t.zlevel=i))})}function ou(t){var e=t._coordSysMgr;return a(new ws(t),{getCoordinateSystems:y(e.getCoordinateSystems,e),getComponentByElement:function(e){for(;e;){var n=e.__ecComponentInfo;if(null!=n)return t._model.getComponent(n.mainType,n.index);e=e.parent}}})}function au(){this.eventInfo}function su(t){function e(t,e){for(var n=0;n<t.length;n++){var i=t[n];i[o]=e}}var n=0,i=1,r=2,o="__connectUpdateStatus";B_(ax,function(a,s){t._messageCenter.on(s,function(a){if(px[t.group]&&t[o]!==n){if(a&&a.escapeConnect)return;var s=t.makeActionFromEvent(a),l=[];B_(fx,function(e){e!==t&&e.group===t.group&&l.push(e)}),e(l,n),B_(l,function(t){t[o]!==i&&t.dispatchAction(s)}),e(l,r)}})})}function lu(t,e,n){var i=du(t);if(i)return i;var r=new Vl(t,e,n);return r.id="ec_"+gx++,fx[r.id]=r,cr(t,mx,r.id),su(r),r}function uu(t){if(x(t)){var e=t;t=null,B_(e,function(e){null!=e.group&&(t=e.group)}),t=t||"g_"+vx++,B_(e,function(e){e.group=t})}return px[t]=!0,t}function hu(t){px[t]=!1}function cu(t){"string"==typeof t?t=fx[t]:t instanceof Vl||(t=du(t)),t instanceof Vl&&!t.isDisposed()&&t.dispose()}function du(t){return fx[dr(t,mx)]}function fu(t){return fx[t]}function pu(t,e){cx[t]=e}function gu(t){lx.push(t)}function vu(t,e){Su(sx,t,e,V_)}function mu(t){ux.push(t)}function yu(t,e,n){"function"==typeof e&&(n=e,e="");var i=z_(t)?t.type:[t,t={event:e}][0];t.event=(t.event||i).toLowerCase(),e=t.event,L_(ex.test(i)&&ex.test(e)),ox[i]||(ox[i]={action:n,actionInfo:t}),ax[e]=i
  4. }function _u(t,e){bs.register(t,e)}function xu(t){var e=bs.get(t);return e?e.getDimensionsInfo?e.getDimensionsInfo():e.dimensions.slice():void 0}function wu(t,e){Su(hx,t,e,Y_,"layout")}function bu(t,e){Su(hx,t,e,q_,"visual")}function Su(t,e,n,i,r){(E_(e)||z_(e))&&(n=e,e=i);var o=pl.wrapStageHandler(n,r);return o.__prio=e,o.__raw=n,t.push(o),o}function Mu(t,e){dx[t]=e}function Cu(t){return sy.extend(t)}function Tu(t){return Zy.extend(t)}function Iu(t){return qy.extend(t)}function ku(t){return sl.extend(t)}function Du(t){n("createCanvas",t)}function Au(t,e,n){P_.registerMap(t,e,n)}function Pu(t){var e=P_.retrieveMap(t);return e&&e[0]&&{geoJson:e[0].geoJSON,specialAreas:e[0].specialAreas}}function Ou(t){return t}function Lu(t,e,n,i,r){this._old=t,this._new=e,this._oldKeyGetter=n||Ou,this._newKeyGetter=i||Ou,this.context=r}function Bu(t,e,n,i,r){for(var o=0;o<t.length;o++){var a="_ec_"+r[i](t[o],o),s=e[a];null==s?(n.push(a),e[a]=o):(s.length||(e[a]=s=[s]),s.push(o))}}function Eu(t){var e={},n=e.encode={},i=N(),r=[],o=[],a=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;zu(n,l)[u]=e,s.isExtraCoord||(i.set(l,1),Nu(s.type)&&(r[0]=e),zu(a.encode,l)[u]=s.index),s.defaultTooltip&&o.push(e)}xx.each(function(t,e){var i=zu(n,e),r=s.otherDims[e];null!=r&&r!==!1&&(i[r]=s.name)})});var s=[],l={};i.each(function(t,e){var i=n[e];l[e]=i[0],s=s.concat(i)}),e.dataDimsOnCoord=s,e.encodeFirstDimNotExtra=l;var u=n.label;u&&u.length&&(r=u.slice());var h=n.tooltip;return h&&h.length?o=h.slice():o.length||(o=r.slice()),n.defaultedLabel=r,n.defaultedTooltip=o,e}function zu(t,e){return t.hasOwnProperty(e)||(t[e]=[]),t[e]}function Ru(t){return"category"===t?"ordinal":"time"===t?"time":"float"}function Nu(t){return!("ordinal"===t||"time"===t)}function Fu(t){null!=t&&a(this,t),this.otherDims={}}function Hu(t){return t._rawCount>65535?Ix:Dx}function Vu(t){var e=t.constructor;return e===Array?t.slice():new e(t)}function Gu(t,e){f(Ax.concat(e.__wrappedMethods||[]),function(n){e.hasOwnProperty(n)&&(t[n]=e[n])}),t.__wrappedMethods=e.__wrappedMethods,f(Px,function(n){t[n]=i(e[n])}),t._calculationInfo=a(e._calculationInfo)}function Wu(t,e,n,i,r){var o=Tx[e.type],a=i-1,s=e.name,l=t[s][a];if(l&&l.length<n){for(var u=new o(Math.min(r-a*n,n)),h=0;h<l.length;h++)u[h]=l[h];t[s][a]=u}for(var c=i*n;r>c;c+=n)t[s].push(new o(Math.min(r-c,n)))}function Xu(t){var e=t._invertedIndicesMap;f(e,function(n,i){var r=t._dimensionInfos[i],o=r.ordinalMeta;if(o){n=e[i]=new kx(o.categories.length);for(var a=0;a<n.length;a++)n[a]=Mx;for(var a=0;a<t._count;a++)n[t.get(i,a)]=a}})}function Yu(t,e,n){var i;if(null!=e){var r=t._chunkSize,o=Math.floor(n/r),a=n%r,s=t.dimensions[e],l=t._storage[s][o];if(l){i=l[a];var u=t._dimensionInfos[s].ordinalMeta;u&&u.categories.length&&(i=u.categories[i])}}return i}function Uu(t){return t}function ju(t){return t<this._count&&t>=0?this._indices[t]:-1}function qu(t,e){var n=t._idList[e];return null==n&&(n=Yu(t,t._idDimIdx,e)),null==n&&(n=Cx+e),n}function Zu(t){return x(t)||(t=[t]),t}function Ku(t,e){var n=t.dimensions,i=new Ox(p(n,t.getDimensionInfo,t),t.hostModel);Gu(i,t);for(var r=i._storage={},o=t._storage,a=0;a<n.length;a++){var s=n[a];o[s]&&(u(e,s)>=0?(r[s]=$u(o[s]),i._rawExtent[s]=Qu(),i._extent[s]=null):r[s]=o[s])}return i}function $u(t){for(var e=new Array(t.length),n=0;n<t.length;n++)e[n]=Vu(t[n]);return e}function Qu(){return[1/0,-1/0]}function Ju(t,e,n){function r(t,e,n){null!=xx.get(e)?t.otherDims[e]=n:(t.coordDim=e,t.coordDimIndex=n,u.set(e,!0))}es.isInstance(e)||(e=es.seriesDataToSource(e)),n=n||{},t=(t||[]).slice();for(var o=(n.dimsDef||[]).slice(),l=N(),u=N(),h=[],c=th(e,t,o,n.dimCount),d=0;c>d;d++){var p=o[d]=a({},S(o[d])?o[d]:{name:o[d]}),g=p.name,v=h[d]=new Fu;null!=g&&null==l.get(g)&&(v.name=v.displayName=g,l.set(g,d)),null!=p.type&&(v.type=p.type),null!=p.displayName&&(v.displayName=p.displayName)}var m=n.encodeDef;!m&&n.encodeDefaulter&&(m=n.encodeDefaulter(e,c)),m=N(m),m.each(function(t,e){if(t=Ji(t).slice(),1===t.length&&!b(t[0])&&t[0]<0)return void m.set(e,!1);var n=m.set(e,[]);f(t,function(t,i){b(t)&&(t=l.get(t)),null!=t&&c>t&&(n[i]=t,r(h[t],e,i))})});var y=0;f(t,function(t){var e,t,n,o;if(b(t))e=t,t={};else{e=t.name;var a=t.ordinalMeta;t.ordinalMeta=null,t=i(t),t.ordinalMeta=a,n=t.dimsDef,o=t.otherDims,t.name=t.coordDim=t.coordDimIndex=t.dimsDef=t.otherDims=null}var l=m.get(e);if(l!==!1){var l=Ji(l);if(!l.length)for(var u=0;u<(n&&n.length||1);u++){for(;y<h.length&&null!=h[y].coordDim;)y++;y<h.length&&l.push(y++)}f(l,function(i,a){var l=h[i];if(r(s(l,t),e,a),null==l.name&&n){var u=n[a];!S(u)&&(u={name:u}),l.name=l.displayName=u.name,l.defaultTooltip=u.defaultTooltip}o&&s(l.otherDims,o)})}});var _=n.generateCoord,x=n.generateCoordCount,w=null!=x;x=_?x||1:0;for(var M=_||"value",C=0;c>C;C++){var v=h[C]=h[C]||new Fu,T=v.coordDim;null==T&&(v.coordDim=eh(M,u,w),v.coordDimIndex=0,(!_||0>=x)&&(v.isExtraCoord=!0),x--),null==v.name&&(v.name=eh(v.coordDim,l)),null!=v.type||ds(e,C,v.name)!==xy.Must&&(!v.isExtraCoord||null==v.otherDims.itemName&&null==v.otherDims.seriesName)||(v.type="ordinal")}return h}function th(t,e,n,i){var r=Math.max(t.dimensionsDetectCount||1,e.length,n.length,i||0);return f(e,function(t){var e=t.dimsDef;e&&(r=Math.max(r,e.length))}),r}function eh(t,e,n){if(n||null!=e.get(t)){for(var i=0;null!=e.get(t+i);)i++;t+=i}return e.set(t,!0),t}function nh(t){this.coordSysName=t,this.coordSysDims=[],this.axisMap=N(),this.categoryAxisMap=N(),this.firstCategoryDimIndex=null}function ih(t){var e=t.get("coordinateSystem"),n=new nh(e),i=zx[e];return i?(i(t,n,n.axisMap,n.categoryAxisMap),n):void 0}function rh(t){return"category"===t.get("type")}function oh(t,e,n){n=n||{};var i,r,o,a,s=n.byIndex,l=n.stackedCoordDimension,u=!(!t||!t.get("stack"));if(f(e,function(t,n){b(t)&&(e[n]=t={name:t}),u&&!t.isExtraCoord&&(s||i||!t.ordinalMeta||(i=t),r||"ordinal"===t.type||"time"===t.type||l&&l!==t.coordDim||(r=t))}),!r||s||i||(s=!0),r){o="__\x00ecstackresult",a="__\x00ecstackedover",i&&(i.createInvertedIndices=!0);var h=r.coordDim,c=r.type,d=0;f(e,function(t){t.coordDim===h&&d++}),e.push({name:o,coordDim:h,coordDimIndex:d,type:c,isExtraCoord:!0,isCalculationCoord:!0}),d++,e.push({name:a,coordDim:a,coordDimIndex:d,type:c,isExtraCoord:!0,isCalculationCoord:!0})}return{stackedDimension:r&&r.name,stackedByDimension:i&&i.name,isStackedByIndex:s,stackedOverDimension:a,stackResultDimension:o}}function ah(t,e){return!!e&&e===t.getCalculationInfo("stackedDimension")}function sh(t,e){return ah(t,e)?t.getCalculationInfo("stackResultDimension"):e}function lh(t,e,n){n=n||{},es.isInstance(t)||(t=es.seriesDataToSource(t));var i,r=e.get("coordinateSystem"),o=bs.get(r),a=ih(e);a&&(i=p(a.coordSysDims,function(t){var e={name:t},n=a.axisMap.get(t);if(n){var i=n.get("type");e.type=Ru(i)}return e})),i||(i=o&&(o.getDimensionsInfo?o.getDimensionsInfo():o.dimensions.slice())||["x","y"]);var s,l,u=Ex(t,{coordDimensions:i,generateCoord:n.generateCoord,encodeDefaulter:n.useEncodeDefaulter?_(hs,i,e):null});a&&f(u,function(t,e){var n=t.coordDim,i=a.categoryAxisMap.get(n);i&&(null==s&&(s=e),t.ordinalMeta=i.getOrdinalMeta()),null!=t.otherDims.itemName&&(l=!0)}),l||null==s||(u[s].otherDims.itemName=0);var h=oh(e,u),c=new Ox(u,e);c.setCalculationInfo(h);var d=null!=s&&uh(t)?function(t,e,n,i){return i===s?n:this.defaultDimValueGetter(t,e,n,i)}:null;return c.hasItemOption=!1,c.initData(t,null,d),c}function uh(t){if(t.sourceFormat===dy){var e=hh(t.data||[]);return null!=e&&!x(er(e))}}function hh(t){for(var e=0;e<t.length&&null==t[e];)e++;return t[e]}function ch(t){this._setting=t||{},this._extent=[1/0,-1/0],this._interval=0,this.init&&this.init.apply(this,arguments)}function dh(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this._map}function fh(t){return t._map||(t._map=N(t.categories))}function ph(t){return S(t)&&null!=t.value?t.value:t+""}function gh(t,e,n,i){var r={},o=t[1]-t[0],a=r.interval=La(o/e,!0);null!=n&&n>a&&(a=r.interval=n),null!=i&&a>i&&(a=r.interval=i);var s=r.intervalPrecision=vh(a),l=r.niceTickExtent=[Hx(Math.ceil(t[0]/a)*a,s),Hx(Math.floor(t[1]/a)*a,s)];return yh(l,t),r}function vh(t){return Ca(t)+2}function mh(t,e,n){t[e]=Math.max(Math.min(t[e],n[1]),n[0])}function yh(t,e){!isFinite(t[0])&&(t[0]=e[0]),!isFinite(t[1])&&(t[1]=e[1]),mh(t,0,e),mh(t,1,e),t[0]>t[1]&&(t[0]=t[1])}function _h(t){return t.get("stack")||Wx+t.seriesIndex}function xh(t){return t.dim+t.index}function wh(t,e){var n=[];return e.eachSeriesByType(t,function(t){Th(t)&&!Ih(t)&&n.push(t)}),n}function bh(t){var e={};f(t,function(t){var n=t.coordinateSystem,i=n.getBaseAxis();if("time"===i.type||"value"===i.type)for(var r=t.getData(),o=i.dim+"_"+i.index,a=r.mapDimension(i.dim),s=0,l=r.count();l>s;++s){var u=r.get(a,s);e[o]?e[o].push(u):e[o]=[u]}});var n=[];for(var i in e)if(e.hasOwnProperty(i)){var r=e[i];if(r){r.sort(function(t,e){return t-e});for(var o=null,a=1;a<r.length;++a){var s=r[a]-r[a-1];s>0&&(o=null===o?s:Math.min(o,s))}n[i]=o}}return n}function Sh(t){var e=bh(t),n=[];return f(t,function(t){var i,r=t.coordinateSystem,o=r.getBaseAxis(),a=o.getExtent();if("category"===o.type)i=o.getBandWidth();else if("value"===o.type||"time"===o.type){var s=o.dim+"_"+o.index,l=e[s],u=Math.abs(a[1]-a[0]),h=o.scale.getExtent(),c=Math.abs(h[1]-h[0]);i=l?u/c*l:u}else{var d=t.getData();i=Math.abs(a[1]-a[0])/d.count()}var f=wa(t.get("barWidth"),i),p=wa(t.get("barMaxWidth"),i),g=wa(t.get("barMinWidth")||1,i),v=t.get("barGap"),m=t.get("barCategoryGap");n.push({bandWidth:i,barWidth:f,barMaxWidth:p,barMinWidth:g,barGap:v,barCategoryGap:m,axisKey:xh(o),stackId:_h(t)})}),Mh(n)}function Mh(t){var e={};f(t,function(t){var n=t.axisKey,i=t.bandWidth,r=e[n]||{bandWidth:i,remainedWidth:i,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},o=r.stacks;e[n]=r;var a=t.stackId;o[a]||r.autoWidthCount++,o[a]=o[a]||{width:0,maxWidth:0};var s=t.barWidth;s&&!o[a].width&&(o[a].width=s,s=Math.min(r.remainedWidth,s),r.remainedWidth-=s);var l=t.barMaxWidth;l&&(o[a].maxWidth=l);var u=t.barMinWidth;u&&(o[a].minWidth=u);var h=t.barGap;null!=h&&(r.gap=h);var c=t.barCategoryGap;null!=c&&(r.categoryGap=c)});var n={};return f(e,function(t,e){n[e]={};var i=t.stacks,r=t.bandWidth,o=wa(t.categoryGap,r),a=wa(t.gap,1),s=t.remainedWidth,l=t.autoWidthCount,u=(s-o)/(l+(l-1)*a);u=Math.max(u,0),f(i,function(t){var e=t.maxWidth,n=t.minWidth;if(t.width){var i=t.width;e&&(i=Math.min(i,e)),n&&(i=Math.max(i,n)),t.width=i,s-=i+a*i,l--}else{var i=u;e&&i>e&&(i=Math.min(e,s)),n&&n>i&&(i=n),i!==u&&(t.width=i,s-=i+a*i,l--)}}),u=(s-o)/(l+(l-1)*a),u=Math.max(u,0);var h,c=0;f(i,function(t){t.width||(t.width=u),h=t,c+=t.width*(1+a)}),h&&(c-=h.width*a);var d=-c/2;f(i,function(t,i){n[e][i]=n[e][i]||{bandWidth:r,offset:d,width:t.width},d+=t.width*(1+a)})}),n}function Ch(t,e,n){if(t&&e){var i=t[xh(e)];return null!=i&&null!=n&&(i=i[_h(n)]),i}}function Th(t){return t.coordinateSystem&&"cartesian2d"===t.coordinateSystem.type}function Ih(t){return t.pipelineContext&&t.pipelineContext.large}function kh(t,e){return e.toGlobalCoord(e.dataToCoord("log"===e.type?1:0))}function Dh(t,e){return ow(t,rw(e))}function Ah(t,e){var n,i,r,o=t.type,a=e.getMin(),s=e.getMax(),l=null!=a,u=null!=s,h=t.getExtent();"ordinal"===o?n=e.getCategories().length:(i=e.get("boundaryGap"),x(i)||(i=[i||0,i||0]),"boolean"==typeof i[0]&&(i=[0,0]),i[0]=wa(i[0],1),i[1]=wa(i[1],1),r=h[1]-h[0]||Math.abs(h[0])),null==a&&(a="ordinal"===o?n?0:0/0:h[0]-i[0]*r),null==s&&(s="ordinal"===o?n?n-1:0/0:h[1]+i[1]*r),"dataMin"===a?a=h[0]:"function"==typeof a&&(a=a({min:h[0],max:h[1]})),"dataMax"===s?s=h[1]:"function"==typeof s&&(s=s({min:h[0],max:h[1]})),(null==a||!isFinite(a))&&(a=0/0),(null==s||!isFinite(s))&&(s=0/0),t.setBlank(I(a)||I(s)||"ordinal"===o&&!t.getOrdinalMeta().categories.length),e.getNeedCrossZero()&&(a>0&&s>0&&!l&&(a=0),0>a&&0>s&&!u&&(s=0));var c=e.ecModel;if(c&&"time"===o){var d,p=wh("bar",c);if(f(p,function(t){d|=t.getBaseAxis()===e.axis}),d){var g=Sh(p),v=Ph(a,s,e,g);a=v.min,s=v.max}}return[a,s]}function Ph(t,e,n,i){var r=n.axis.getExtent(),o=r[1]-r[0],a=Ch(i,n.axis);if(void 0===a)return{min:t,max:e};var s=1/0;f(a,function(t){s=Math.min(t.offset,s)});var l=-1/0;f(a,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 Oh(t,e){var n=Ah(t,e),i=null!=e.getMin(),r=null!=e.getMax(),o=e.get("splitNumber");"log"===t.type&&(t.base=e.get("logBase"));var a=t.type;t.setExtent(n[0],n[1]),t.niceExtent({splitNumber:o,fixMin:i,fixMax:r,minInterval:"interval"===a||"time"===a?e.get("minInterval"):null,maxInterval:"interval"===a||"time"===a?e.get("maxInterval"):null});var s=e.get("interval");null!=s&&t.setInterval&&t.setInterval(s)}function Lh(t,e){if(e=e||t.get("type"))switch(e){case"category":return new Fx(t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),[1/0,-1/0]);case"value":return new Gx;default:return(ch.getClass(e)||Gx).create(t)}}function Bh(t){var e=t.scale.getExtent(),n=e[0],i=e[1];return!(n>0&&i>0||0>n&&0>i)}function Eh(t){var e=t.getLabelModel().get("formatter"),n="category"===t.type?t.scale.getExtent()[0]:null;return"string"==typeof e?e=function(e){return function(n){return n=t.scale.getLabel(n),e.replace("{value}",null!=n?n:"")}}(e):"function"==typeof e?function(i,r){return null!=n&&(r=i-n),e(zh(t,i),r)}:function(e){return t.scale.getLabel(e)}}function zh(t,e){return"category"===t.type?t.scale.getLabel(e):e}function Rh(t){var e=t.model,n=t.scale;if(e.get("axisLabel.show")&&!n.isBlank()){var i,r,o="category"===t.type,a=n.getExtent();o?r=n.count():(i=n.getTicks(),r=i.length);var s,l=t.getLabelModel(),u=Eh(t),h=1;r>40&&(h=Math.ceil(r/40));for(var c=0;r>c;c+=h){var d=i?i[c]:a[0]+c,f=u(d),p=l.getTextRect(f),g=Nh(p,l.get("rotate")||0);s?s.union(g):s=g}return s}}function Nh(t,e){var n=e*Math.PI/180,i=t.plain(),r=i.width,o=i.height,a=r*Math.cos(n)+o*Math.sin(n),s=r*Math.sin(n)+o*Math.cos(n),l=new Tn(i.x,i.y,a,s);return l}function Fh(t){var e=t.get("interval");return null==e?"auto":e}function Hh(t){return"category"===t.type&&0===Fh(t.getLabelModel())}function Vh(t,e){if("image"!==this.type){var n=this.style,i=this.shape;i&&"line"===i.symbolType?n.stroke=t:this.__isEmptyBrush?(n.stroke=t,n.fill=e||"#fff"):(n.fill&&(n.fill=t),n.stroke&&(n.stroke=t)),this.dirty(!1)}}function Gh(t,e,n,i,r,o,a){var s=0===t.indexOf("empty");s&&(t=t.substr(5,1).toLowerCase()+t.substr(6));var l;return l=0===t.indexOf("image://")?xo(t.slice(8),new Tn(e,n,i,r),a?"center":"cover"):0===t.indexOf("path://")?_o(t.slice(7),{},new Tn(e,n,i,r),a?"center":"cover"):new _w({shape:{symbolType:t,x:e,y:n,width:i,height:r}}),l.__isEmptyBrush=s,l.setColor=Vh,l.setColor(o),l}function Wh(t){return lh(t.getSource(),t)}function Xh(t,e){var n=e;fa.isInstance(e)||(n=new fa(e),c(n,cw));var i=Lh(n);return i.setExtent(t[0],t[1]),Oh(i,n),i}function Yh(t){c(t,cw)}function Uh(t,e){return Math.abs(t-e)<bw}function jh(t,e,n){var i=0,r=t[0];if(!r)return!1;for(var o=1;o<t.length;o++){var a=t[o];i+=Yr(r[0],r[1],a[0],a[1],e,n),r=a}var s=t[0];return Uh(r[0],s[0])&&Uh(r[1],s[1])||(i+=Yr(r[0],r[1],s[0],s[1],e,n)),0!==i}function qh(t,e,n){if(this.name=t,this.geometries=e,n)n=[n[0],n[1]];else{var i=this.getBoundingRect();n=[i.x+i.width/2,i.y+i.height/2]}this.center=n}function Zh(t){if(!t.UTF8Encoding)return t;var e=t.UTF8Scale;null==e&&(e=1024);for(var n=t.features,i=0;i<n.length;i++)for(var r=n[i],o=r.geometry,a=o.coordinates,s=o.encodeOffsets,l=0;l<a.length;l++){var u=a[l];if("Polygon"===o.type)a[l]=Kh(u,s[l],e);else if("MultiPolygon"===o.type)for(var h=0;h<u.length;h++){var c=u[h];u[h]=Kh(c,s[l][h],e)}}return t.UTF8Encoding=!1,t}function Kh(t,e,n){for(var i=[],r=e[0],o=e[1],a=0;a<t.length;a+=2){var s=t.charCodeAt(a)-64,l=t.charCodeAt(a+1)-64;s=s>>1^-(1&s),l=l>>1^-(1&l),s+=r,l+=o,r=s,o=l,i.push([s/n,l/n])}return i}function $h(t){return"category"===t.type?Jh(t):nc(t)}function Qh(t,e){return"category"===t.type?ec(t,e):{ticks:t.scale.getTicks()}}function Jh(t){var e=t.getLabelModel(),n=tc(t,e);return!e.get("show")||t.scale.isBlank()?{labels:[],labelCategoryInterval:n.labelCategoryInterval}:n}function tc(t,e){var n=ic(t,"labels"),i=Fh(e),r=rc(n,i);if(r)return r;var o,a;return w(i)?o=hc(t,i):(a="auto"===i?ac(t):i,o=uc(t,a)),oc(n,i,{labels:o,labelCategoryInterval:a})}function ec(t,e){var n=ic(t,"ticks"),i=Fh(e),r=rc(n,i);if(r)return r;var o,a;if((!e.get("show")||t.scale.isBlank())&&(o=[]),w(i))o=hc(t,i,!0);else if("auto"===i){var s=tc(t,t.getLabelModel());a=s.labelCategoryInterval,o=p(s.labels,function(t){return t.tickValue})}else a=i,o=uc(t,a,!0);return oc(n,i,{ticks:o,tickCategoryInterval:a})}function nc(t){var e=t.scale.getTicks(),n=Eh(t);return{labels:p(e,function(e,i){return{formattedLabel:n(e,i),rawLabel:t.scale.getLabel(e),tickValue:e}})}}function ic(t,e){return Mw(t)[e]||(Mw(t)[e]=[])}function rc(t,e){for(var n=0;n<t.length;n++)if(t[n].key===e)return t[n].value}function oc(t,e,n){return t.push({key:e,value:n}),n}function ac(t){var e=Mw(t).autoInterval;return null!=e?e:Mw(t).autoInterval=t.calculateCategoryInterval()}function sc(t){var e=lc(t),n=Eh(t),i=(e.axisRotate-e.labelRotate)/180*Math.PI,r=t.scale,o=r.getExtent(),a=r.count();if(o[1]-o[0]<1)return 0;var s=1;a>40&&(s=Math.max(1,Math.floor(a/40)));for(var l=o[0],u=t.dataToCoord(l+1)-t.dataToCoord(l),h=Math.abs(u*Math.cos(i)),c=Math.abs(u*Math.sin(i)),d=0,f=0;l<=o[1];l+=s){var p=0,g=0,v=Yn(n(l),e.font,"center","top");p=1.3*v.width,g=1.3*v.height,d=Math.max(d,p,7),f=Math.max(f,g,7)}var m=d/h,y=f/c;isNaN(m)&&(m=1/0),isNaN(y)&&(y=1/0);var _=Math.max(0,Math.floor(Math.min(m,y))),x=Mw(t.model),w=t.getExtent(),b=x.lastAutoInterval,S=x.lastTickCount;return null!=b&&null!=S&&Math.abs(b-_)<=1&&Math.abs(S-a)<=1&&b>_&&x.axisExtend0===w[0]&&x.axisExtend1===w[1]?_=b:(x.lastTickCount=a,x.lastAutoInterval=_,x.axisExtend0=w[0],x.axisExtend1=w[1]),_}function lc(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 uc(t,e,n){function i(t){l.push(n?t:{formattedLabel:r(t),rawLabel:o.getLabel(t),tickValue:t})}var r=Eh(t),o=t.scale,a=o.getExtent(),s=t.getLabelModel(),l=[],u=Math.max((e||0)+1,1),h=a[0],c=o.count();0!==h&&u>1&&c/u>2&&(h=Math.round(Math.ceil(h/u)*u));var d=Hh(t),f=s.get("showMinLabel")||d,p=s.get("showMaxLabel")||d;f&&h!==a[0]&&i(a[0]);for(var g=h;g<=a[1];g+=u)i(g);return p&&g-u!==a[1]&&i(a[1]),l}function hc(t,e,n){var i=t.scale,r=Eh(t),o=[];return f(i.getTicks(),function(t){var a=i.getLabel(t);e(t,a)&&o.push(n?t:{formattedLabel:r(t),rawLabel:a,tickValue:t})}),o}function cc(t,e){var n=t[1]-t[0],i=e,r=n/i/2;t[0]+=r,t[1]-=r}function dc(t,e,n,i){function r(t,e){return t=ba(t),e=ba(e),d?t>e:e>t}var o=e.length;if(t.onBand&&!n&&o){var a,s,l=t.getExtent();if(1===o)e[0].coord=l[0],a=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,a={coord:e[o-1].coord+h*s},e.push(a)}var d=l[0]>l[1];r(e[0].coord,l[0])&&(i?e[0].coord=l[0]:e.shift()),i&&r(l[0],e[0].coord)&&e.unshift({coord:l[0]}),r(l[1],a.coord)&&(i?a.coord=l[1]:e.pop()),i&&r(a.coord,l[1])&&e.push({coord:l[1]})}}function fc(t,e){var n=t.mapDimension("defaultedLabel",!0),i=n.length;if(1===i)return qs(t,e,n[0]);if(i){for(var r=[],o=0;o<n.length;o++){var a=qs(t,e,n[o]);r.push(a)}return r.join(" ")}}function pc(t,e,n){Np.call(this),this.updateData(t,e,n)}function gc(t){return[t[0]/2,t[1]/2]}function vc(t,e){this.parent.drift(t,e)}function mc(t,e){if(!this.incremental&&!this.useHoverLayer)if("emphasis"===e){var n=this.__symbolOriginalScale,i=n[1]/n[0],r={scale:[Math.max(1.1*n[0],n[0]+3),Math.max(1.1*n[1],n[1]+3*i)]};this.animateTo(r,400,"elasticOut")}else"normal"===e&&this.animateTo({scale:this.__symbolOriginalScale},400,"elasticOut")}function yc(t){this.group=new Np,this._symbolCtor=t||pc}function _c(t,e,n,i){return!(!e||isNaN(e[0])||isNaN(e[1])||i.isIgnore&&i.isIgnore(n)||i.clipShape&&!i.clipShape.contain(e[0],e[1])||"none"===t.getItemVisual(n,"symbol"))}function xc(t){return null==t||S(t)||(t={isIgnore:t}),t||{}}function wc(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 bc(t,e,n){var i,r=t.getBaseAxis(),o=t.getOtherAxis(r),a=Sc(o,n),s=r.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(i|=ah(e,d[0]))&&(d[0]=f),(i|=ah(e,d[1]))&&(d[1]=f),{dataDimsForPoint:d,valueStart:a,valueAxisDim:l,baseAxisDim:s,stacked:!!i,valueDim:u,baseDim:h,baseDataOffset:c,stackedOverDimension:e.getCalculationInfo("stackedOverDimension")}}function Sc(t,e){var n=0,i=t.scale.getExtent();return"start"===e?n=i[0]:"end"===e?n=i[1]:i[0]>0?n=i[0]:i[1]<0&&(n=i[1]),n}function Mc(t,e,n,i){var r=0/0;t.stacked&&(r=n.get(n.getCalculationInfo("stackedOverDimension"),i)),isNaN(r)&&(r=t.valueStart);var o=t.baseDataOffset,a=[];return a[o]=n.get(t.baseDim,i),a[1-o]=r,e.dataToPoint(a)}function Cc(t,e){var n=[];return e.diff(t).add(function(t){n.push({cmd:"+",idx:t})}).update(function(t,e){n.push({cmd:"=",idx:e,idx1:t})}).remove(function(t){n.push({cmd:"-",idx:t})}).execute(),n}function Tc(t){return isNaN(t[0])||isNaN(t[1])}function Ic(t,e,n,i,r,o,a,s,l,u){return"none"!==u&&u?kc.apply(this,arguments):Dc.apply(this,arguments)}function kc(t,e,n,i,r,o,a,s,l,u,h){for(var c=0,d=n,f=0;i>f;f++){var p=e[d];if(d>=r||0>d)break;if(Tc(p)){if(h){d+=o;continue}break}if(d===n)t[o>0?"moveTo":"lineTo"](p[0],p[1]);else if(l>0){var g=e[c],v="y"===u?1:0,m=(p[v]-g[v])*l;Vw(Ww,g),Ww[v]=g[v]+m,Vw(Xw,p),Xw[v]=p[v]-m,t.bezierCurveTo(Ww[0],Ww[1],Xw[0],Xw[1],p[0],p[1])}else t.lineTo(p[0],p[1]);c=d,d+=o}return f}function Dc(t,e,n,i,r,o,a,s,l,u,h){for(var c=0,d=n,f=0;i>f;f++){var p=e[d];if(d>=r||0>d)break;if(Tc(p)){if(h){d+=o;continue}break}if(d===n)t[o>0?"moveTo":"lineTo"](p[0],p[1]),Vw(Ww,p);else if(l>0){var g=d+o,v=e[g];if(h)for(;v&&Tc(e[g]);)g+=o,v=e[g];var m=.5,y=e[c],v=e[g];if(!v||Tc(v))Vw(Xw,p);else{Tc(v)&&!h&&(v=p),j(Gw,v,y);var _,x;if("x"===u||"y"===u){var w="x"===u?0:1;_=Math.abs(p[w]-y[w]),x=Math.abs(p[w]-v[w])}else _=Gf(p,y),x=Gf(p,v);m=x/(x+_),Hw(Xw,p,Gw,-l*(1-m))}Nw(Ww,Ww,s),Fw(Ww,Ww,a),Nw(Xw,Xw,s),Fw(Xw,Xw,a),t.bezierCurveTo(Ww[0],Ww[1],Xw[0],Xw[1],p[0],p[1]),Hw(Ww,p,Gw,l*m)}else t.lineTo(p[0],p[1]);c=d,d+=o}return f}function Ac(t,e){var n=[1/0,1/0],i=[-1/0,-1/0];if(e)for(var r=0;r<t.length;r++){var o=t[r];o[0]<n[0]&&(n[0]=o[0]),o[1]<n[1]&&(n[1]=o[1]),o[0]>i[0]&&(i[0]=o[0]),o[1]>i[1]&&(i[1]=o[1])}return{min:e?n:i,max:e?i:n}}function Pc(t,e,n){var i=t.getArea(),r=t.getBaseAxis().isHorizontal(),o=i.x,a=i.y,s=i.width,l=i.height,u=n.get("lineStyle.width")||2;o-=u/2,a-=u/2,s+=u,l+=u;var h=new cm({shape:{x:o,y:a,width:s,height:l}});return e&&(h.shape[r?"width":"height"]=0,ea(h,{shape:{width:s,height:l}},n)),h}function Oc(t,e,n){var i=t.getArea(),r=new im({shape:{cx:ba(t.cx,1),cy:ba(t.cy,1),r0:ba(i.r0,1),r:ba(i.r,1),startAngle:i.startAngle,endAngle:i.endAngle,clockwise:i.clockwise}});return e&&(r.shape.endAngle=i.startAngle,ea(r,{shape:{endAngle:i.endAngle}},n)),r}function Lc(t,e){if(t.length===e.length){for(var n=0;n<t.length;n++){var i=t[n],r=e[n];if(i[0]!==r[0]||i[1]!==r[1])return}return!0}}function Bc(t){return"number"==typeof t?t:t?.5:0}function Ec(t,e,n){if(!n.valueDim)return[];for(var i=[],r=0,o=e.count();o>r;r++)i.push(Mc(n,t,e,r));return i}function zc(t,e,n){for(var i=e.getBaseAxis(),r="x"===i.dim||"radius"===i.dim?0:1,o=[],a=0;a<t.length-1;a++){var s=t[a+1],l=t[a];o.push(l);var u=[];switch(n){case"end":u[r]=s[r],u[1-r]=l[1-r],o.push(u);break;case"middle":var h=(l[r]+s[r])/2,c=[];u[r]=c[r]=h,u[1-r]=l[1-r],c[1-r]=s[1-r],o.push(u),o.push(c);break;default:u[r]=l[r],u[1-r]=s[1-r],o.push(u)}}return t[a]&&o.push(t[a]),o}function Rc(t,e){var n=t.getVisual("visualMeta");if(n&&n.length&&t.count()&&"cartesian2d"===e.type){for(var i,r,o=n.length-1;o>=0;o--){var a=n[o].dimension,s=t.dimensions[a],l=t.getDimensionInfo(s);if(i=l&&l.coordDim,"x"===i||"y"===i){r=n[o];break}}if(r){var u=e.getAxis(i),h=p(r.stops,function(t){return{coord:u.toGlobalCoord(u.dataToCoord(t.value)),color:t.color}}),c=h.length,d=r.outerColors.slice();c&&h[0].coord>h[c-1].coord&&(h.reverse(),d.reverse());var g=10,v=h[0].coord-g,m=h[c-1].coord+g,y=m-v;if(.001>y)return"transparent";f(h,function(t){t.offset=(t.coord-v)/y}),h.push({offset:c?h[c-1].offset:.5,color:d[1]||"transparent"}),h.unshift({offset:c?h[0].offset:.5,color:d[0]||"transparent"});var _=new _m(0,0,0,0,h,!0);return _[i]=v,_[i+"2"]=m,_}}}function Nc(t,e,n){var i=t.get("showAllSymbol"),r="auto"===i;if(!i||r){var o=n.getAxesByScale("ordinal")[0];if(o&&(!r||!Fc(o,e))){var a=e.mapDimension(o.dim),s={};return f(o.getViewLabels(),function(t){s[t.tickValue]=1}),function(t){return!s.hasOwnProperty(e.get(a,t))}}}}function Fc(t,e){var n=t.getExtent(),i=Math.abs(n[1]-n[0])/t.scale.count();isNaN(i)&&(i=0);for(var r=e.count(),o=Math.max(1,Math.round(r/5)),a=0;r>a;a+=o)if(1.5*pc.getSymbolSize(e,a)[t.isHorizontal()?1:0]>i)return!1;return!0}function Hc(t,e,n){if("cartesian2d"===t.type){var i=t.getBaseAxis().isHorizontal(),r=Pc(t,e,n);if(!n.get("clip",!0)){var o=r.shape,a=Math.max(o.width,o.height);i?(o.y-=a,o.height+=2*a):(o.x-=a,o.width+=2*a)}return r}return Oc(t,e,n)}function Vc(t){return this._axes[t]}function Gc(t){Qw.call(this,t)}function Wc(t,e){return e.type||(e.data?"category":"value")}function Xc(t,e){return t.getCoordSysModel()===e}function Yc(t,e,n){this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this._initCartesian(t,e,n),this.model=t}function Uc(t,e,n,i){function r(t){return t.dim+"_"+t.index}n.getAxesOnZeroOf=function(){return o?[o]:[]};var o,a=t[e],s=n.model,l=s.get("axisLine.onZero"),u=s.get("axisLine.onZeroAxisIndex");if(l){if(null!=u)jc(a[u])&&(o=a[u]);else for(var h in a)if(a.hasOwnProperty(h)&&jc(a[h])&&!i[r(a[h])]){o=a[h];break}o&&(i[r(o)]=!0)}}function jc(t){return t&&"category"!==t.type&&"time"!==t.type&&Bh(t)}function qc(t,e){var n=t.getExtent(),i=n[0]+n[1];t.toGlobalCoord="x"===t.dim?function(t){return t+e}:function(t){return i-t+e},t.toLocalCoord="x"===t.dim?function(t){return t-e}:function(t){return i-t+e}}function Zc(t){return p(sb,function(e){var n=t.getReferringComponents(e)[0];return n})}function Kc(t){return"cartesian2d"===t.get("coordinateSystem")}function $c(t,e,n,i){var r,o,a=ka(n-t.rotation),s=i[0]>i[1],l="start"===e&&!s||"start"!==e&&s;return Da(a-lb/2)?(o=l?"bottom":"top",r="center"):Da(a-1.5*lb)?(o=l?"top":"bottom",r="center"):(o="middle",r=1.5*lb>a&&a>lb/2?l?"left":"right":l?"right":"left"),{rotation:a,textAlign:r,textVerticalAlign:o}}function Qc(t,e,n){if(!Hh(t.axis)){var i=t.get("axisLabel.showMinLabel"),r=t.get("axisLabel.showMaxLabel");e=e||[],n=n||[];var o=e[0],a=e[1],s=e[e.length-1],l=e[e.length-2],u=n[0],h=n[1],c=n[n.length-1],d=n[n.length-2];i===!1?(Jc(o),Jc(u)):td(o,a)&&(i?(Jc(a),Jc(h)):(Jc(o),Jc(u))),r===!1?(Jc(s),Jc(c)):td(l,s)&&(r?(Jc(l),Jc(d)):(Jc(s),Jc(c)))}}function Jc(t){t&&(t.ignore=!0)}function td(t,e){var n=t&&t.getBoundingRect().clone(),i=e&&e.getBoundingRect().clone();if(n&&i){var r=Le([]);return Re(r,r,-t.rotation),n.applyTransform(Ee([],r,t.getLocalTransform())),i.applyTransform(Ee([],r,e.getLocalTransform())),n.intersect(i)}}function ed(t){return"middle"===t||"center"===t}function nd(t,e,n,i,r){for(var o=[],a=[],s=[],l=0;l<t.length;l++){var u=t[l].coord;a[0]=u,a[1]=0,s[0]=u,s[1]=n,e&&(oe(a,a,e),oe(s,s,e));var h=new fm({anid:r+"_"+t[l].tickValue,subPixelOptimize:!0,shape:{x1:a[0],y1:a[1],x2:s[0],y2:s[1]},style:i,z2:2,silent:!0});o.push(h)}return o}function id(t,e,n){var i=e.axis,r=e.getModel("axisTick");if(r.get("show")&&!i.scale.isBlank()){for(var o=r.getModel("lineStyle"),a=n.tickDirection*r.get("length"),l=i.getTicksCoords(),u=nd(l,t._transform,a,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,n){var i=e.axis,r=e.getModel("minorTick");if(r.get("show")&&!i.scale.isBlank()){var o=i.getMinorTicksCoords();if(o.length)for(var a=r.getModel("lineStyle"),l=n.tickDirection*r.get("length"),u=s(a.getLineStyle(),s(e.getModel("axisTick").getLineStyle(),{stroke:e.get("axisLine.lineStyle.color")})),h=0;h<o.length;h++)for(var c=nd(o[h],t._transform,l,u,"minorticks_"+h),d=0;d<c.length;d++)t.group.add(c[d])}}function od(t,e,n){var i=e.axis,r=k(n.axisLabelShow,e.get("axisLabel.show"));if(r&&!i.scale.isBlank()){var o=e.getModel("axisLabel"),a=o.get("margin"),s=i.getViewLabels(),l=(k(n.labelRotate,o.get("rotate"))||0)*lb/180,u=db(n.rotation,l,n.labelDirection),h=e.getCategories&&e.getCategories(!0),c=[],d=fb(e),p=e.get("triggerEvent");return f(s,function(r,s){var l=r.tickValue,f=r.formattedLabel,g=r.rawLabel,v=o;h&&h[l]&&h[l].textStyle&&(v=new fa(h[l].textStyle,o,e.ecModel));var m=v.getTextColor()||e.get("axisLine.lineStyle.color"),y=i.dataToCoord(l),_=[y,n.labelOffset+n.labelDirection*a],x=new Jv({anid:"label_"+l,position:_,rotation:u.rotation,silent:d,z2:10});Xo(x.style,v,{text:f,textAlign:v.getShallow("align",!0)||u.textAlign,textVerticalAlign:v.getShallow("verticalAlign",!0)||v.getShallow("baseline",!0)||u.textVerticalAlign,textFill:"function"==typeof m?m("category"===i.type?g:"value"===i.type?l+"":l,s):m}),p&&(x.eventData=cb(e),x.eventData.targetType="axisLabel",x.eventData.value=g),t._dumbGroup.add(x),x.updateTransform(),c.push(x),t.group.add(x),x.decomposeTransform()}),c}}function ad(t,e){var n={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return sd(n,t,e),n.seriesInvolved&&ud(n,t),n}function sd(t,e,n){var i=e.getComponent("tooltip"),r=e.getComponent("axisPointer"),o=r.get("link",!0)||[],a=[];pb(n.getCoordinateSystems(),function(n){function s(i,s,l){var h=l.model.getModel("axisPointer",r),d=h.get("show");if(d&&("auto"!==d||i||gd(h))){null==s&&(s=h.get("triggerTooltip")),h=i?ld(l,c,r,e,i,s):h;var f=h.get("snap"),p=vd(l.model),g=s||f||"category"===l.type,v=t.axesInfo[p]={key:p,axis:l,coordSys:n,axisPointerModel:h,triggerTooltip:s,involveSeries:g,snap:f,useHandle:gd(h),seriesModels:[]};u[p]=v,t.seriesInvolved|=g;var m=hd(o,l);if(null!=m){var y=a[m]||(a[m]={axesInfo:{}});y.axesInfo[p]=v,y.mapper=o[m].mapper,v.linkGroup=y}}}if(n.axisPointerEnabled){var l=vd(n.model),u=t.coordSysAxesInfo[l]={};t.coordSysMap[l]=n;var h=n.model,c=h.getModel("tooltip",i);if(pb(n.getAxes(),gb(s,!1,null)),n.getTooltipAxes&&i&&c.get("show")){var d="axis"===c.get("trigger"),f="cross"===c.get("axisPointer.type"),p=n.getTooltipAxes(c.get("axisPointer.axis"));(d||f)&&pb(p.baseAxes,gb(s,f?"cross":!0,d)),f&&pb(p.otherAxes,gb(s,"cross",!1))}}})}function ld(t,e,n,r,o,a){var l=e.getModel("axisPointer"),u={};pb(["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],function(t){u[t]=i(l.get(t))}),u.snap="category"!==t.type&&!!a,"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,!a){var d=u.lineStyle=l.get("crossStyle");d&&s(h,d.textStyle)}}return t.model.getModel("axisPointer",new fa(u,n,r))}function ud(t,e){e.eachSeries(function(e){var n=e.coordinateSystem,i=e.get("tooltip.trigger",!0),r=e.get("tooltip.show",!0);n&&"none"!==i&&i!==!1&&"item"!==i&&r!==!1&&e.get("axisPointer.show",!0)!==!1&&pb(t.coordSysAxesInfo[vd(n.model)],function(t){var i=t.axis;n.getAxis(i.dim)===i&&(t.seriesModels.push(e),null==t.seriesDataCount&&(t.seriesDataCount=0),t.seriesDataCount+=e.getData().count())})},this)}function hd(t,e){for(var n=e.model,i=e.dim,r=0;r<t.length;r++){var o=t[r]||{};
  5. if(cd(o[i+"AxisId"],n.id)||cd(o[i+"AxisIndex"],n.componentIndex)||cd(o[i+"AxisName"],n.name))return r}}function cd(t,e){return"all"===t||x(t)&&u(t,e)>=0||t===e}function dd(t){var e=fd(t);if(e){var n=e.axisPointerModel,i=e.axis.scale,r=n.option,o=n.get("status"),a=n.get("value");null!=a&&(a=i.parse(a));var s=gd(n);null==o&&(r.status=s?"show":"hide");var l=i.getExtent().slice();l[0]>l[1]&&l.reverse(),(null==a||a>l[1])&&(a=l[1]),a<l[0]&&(a=l[0]),r.value=a,s&&(r.status=e.axis.scale.isBlank()?"hide":"show")}}function fd(t){var e=(t.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return e&&e.axesInfo[vd(t)]}function pd(t){var e=fd(t);return e&&e.axisPointerModel}function gd(t){return!!t.get("handle.show")}function vd(t){return t.type+"||"+t.id}function md(t,e,n,i,r,o){var a=vb.getAxisPointerClass(t.axisPointerClass);if(a){var s=pd(e);s?(t._axisPointer||(t._axisPointer=new a)).render(e,s,i,o):yd(t,i)}}function yd(t,e,n){var i=t._axisPointer;i&&i.dispose(e,n),t._axisPointer=null}function _d(t,e,n){n=n||{};var i=t.coordinateSystem,r=e.axis,o={},a=r.getAxesOnZeroOf()[0],s=r.position,l=a?"onZero":s,u=r.dim,h=i.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(a){var g=a.toGlobalCoord(a.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 v={top:-1,bottom:1,left:-1,right:1};o.labelDirection=o.tickDirection=o.nameDirection=v[s],o.labelOffset=a?p[d[s]]-p[d.onZero]:0,e.get("axisTick.inside")&&(o.tickDirection=-o.tickDirection),k(n.labelInside,e.get("axisLabel.inside"))&&(o.labelDirection=-o.labelDirection);var m=e.get("axisLabel.rotate");return o.labelRotate="top"===l?-m:m,o.z2=1,o}function xd(t,e,n,i){var r=n.axis;if(!r.scale.isBlank()){var o=n.getModel("splitArea"),a=o.getModel("areaStyle"),l=a.get("color"),u=i.coordinateSystem.getRect(),h=r.getTicksCoords({tickModel:o,clamp:!0});if(h.length){var c=l.length,d=t.__splitAreaColors,f=N(),p=0;if(d)for(var g=0;g<h.length;g++){var v=d.get(h[g].tickValue);if(null!=v){p=(v+(c-1)*g)%c;break}}var m=r.toGlobalCoord(h[0].coord),y=a.getAreaStyle();l=x(l)?l:[l];for(var g=1;g<h.length;g++){var _,w,b,S,M=r.toGlobalCoord(h[g].coord);r.isHorizontal()?(_=m,w=u.y,b=M-_,S=u.height,m=_+b):(_=u.x,w=m,b=u.width,S=M-w,m=w+S);var C=h[g-1].tickValue;null!=C&&f.set(C,p),e.add(new cm({anid:null!=C?"area_"+C:null,shape:{x:_,y:w,width:b,height:S},style:s({fill:l[p]},y),silent:!0})),p=(p+1)%c}t.__splitAreaColors=f}}}function wd(t){t.__splitAreaColors=null}function bd(t,e,n){var i,r={},o="toggleSelected"===t;return n.eachComponent("legend",function(n){o&&null!=i?n[i?"select":"unSelect"](e.name):"allSelect"===t||"inverseSelect"===t?n[t]():(n[t](e.name),i=n.isSelected(e.name));var a=n.getData();f(a,function(t){var e=t.get("name");if("\n"!==e&&""!==e){var i=n.isSelected(e);r[e]=r.hasOwnProperty(e)?r[e]&&i:i}})}),"allSelect"===t||"inverseSelect"===t?{selected:r}:{name:e.name,selected:r}}function Sd(t,e){var n=qm(e.get("padding")),i=e.getItemStyle(["color","opacity"]);i.fill=e.get("backgroundColor");var t=new cm({shape:{x:t.x-n[3],y:t.y-n[0],width:t.width+n[1]+n[3],height:t.height+n[0]+n[2],r:e.get("borderRadius")},style:i,silent:!0,z2:-1});return t}function Md(t,e,n,i,r,o){var a;return"line"!==e&&e.indexOf("empty")<0?(a=n.getItemStyle(),t.style.stroke=i,o||(a.stroke=r)):a=n.getItemStyle(["borderWidth","borderColor"]),t.setStyle(a)}function Cd(t,e,n,i){Id(t,e,n,i),n.dispatchAction({type:"legendToggleSelect",name:null!=t?t:e}),Td(t,e,n,i)}function Td(t,e,n,i){var r=n.getZr().storage.getDisplayList()[0];r&&r.useHoverLayer||n.dispatchAction({type:"highlight",seriesName:t,name:e,excludeSeriesId:i})}function Id(t,e,n,i){var r=n.getZr().storage.getDisplayList()[0];r&&r.useHoverLayer||n.dispatchAction({type:"downplay",seriesName:t,name:e,excludeSeriesId:i})}function kd(t,e,n){var i=t.getOrient(),r=[1,1];r[i.index]=0,Ka(e,n,{type:"box",ignoreSize:r})}function Dd(t,e,n,i,r){var o=t.axis;if(!o.scale.isBlank()&&o.containData(e)){if(!t.involveSeries)return void n.showPointer(t,e);var s=Ad(e,t),l=s.payloadBatch,u=s.snapToValue;l[0]&&null==r.seriesIndex&&a(r,l[0]),!i&&t.snap&&o.containData(u)&&null!=u&&(e=u),n.showPointer(t,e,l,r),n.showTooltip(t,s,u)}}function Ad(t,e){var n=e.axis,i=n.dim,r=t,o=[],a=Number.MAX_VALUE,s=-1;return Eb(e.seriesModels,function(e){var l,u,h=e.getData().mapDimension(i,!0);if(e.getAxisTooltipData){var c=e.getAxisTooltipData(h,t,n);u=c.dataIndices,l=c.nestestValue}else{if(u=e.getData().indicesOfNearest(h[0],t,"category"===n.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);a>=f&&((a>f||d>=0&&0>s)&&(a=f,s=d,r=l,o.length=0),Eb(u,function(t){o.push({seriesIndex:e.seriesIndex,dataIndexInside:t,dataIndex:e.getData().getRawIndex(t)})}))}}),{payloadBatch:o,snapToValue:r}}function Pd(t,e,n,i){t[e.key]={value:n,payloadBatch:i}}function Od(t,e,n,i){var r=n.payloadBatch,o=e.axis,a=o.model,s=e.axisPointerModel;if(e.triggerTooltip&&r.length){var l=e.coordSys.model,u=vd(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:a.componentIndex,axisType:a.type,axisId:a.id,value:i,valueLabelOpt:{precision:s.get("label.precision"),formatter:s.get("label.formatter")},seriesDataIndices:r.slice()})}}function Ld(t,e,n){var i=n.axesInfo=[];Eb(e,function(e,n){var r=e.axisPointerModel.option,o=t[n];o?(!e.useHandle&&(r.status="show"),r.value=o.value,r.seriesDataIndices=(o.payloadBatch||[]).slice()):!e.useHandle&&(r.status="hide"),"show"===r.status&&i.push({axisDim:e.axis.dim,axisIndex:e.axis.model.componentIndex,value:r.value})})}function Bd(t,e,n,i){if(Nd(e)||!t.list.length)return void i({type:"hideTip"});var r=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};i({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:r.dataIndexInside,dataIndex:r.dataIndex,seriesIndex:r.seriesIndex,dataByCoordSys:t.list})}function Ed(t,e,n){var i=n.getZr(),r="axisPointerLastHighlights",o=Rb(i)[r]||{},a=Rb(i)[r]={};Eb(t,function(t){var e=t.axisPointerModel.option;"show"===e.status&&Eb(e.seriesDataIndices,function(t){var e=t.seriesIndex+" | "+t.dataIndex;a[e]=t})});var s=[],l=[];f(o,function(t,e){!a[e]&&l.push(t)}),f(a,function(t,e){!o[e]&&s.push(t)}),l.length&&n.dispatchAction({type:"downplay",escapeConnect:!0,batch:l}),s.length&&n.dispatchAction({type:"highlight",escapeConnect:!0,batch:s})}function zd(t,e){for(var n=0;n<(t||[]).length;n++){var i=t[n];if(e.axis.dim===i.axisDim&&e.axis.model.componentIndex===i.axisIndex)return i}}function Rd(t){var e=t.axis.model,n={},i=n.axisDim=t.axis.dim;return n.axisIndex=n[i+"AxisIndex"]=e.componentIndex,n.axisName=n[i+"AxisName"]=e.name,n.axisId=n[i+"AxisId"]=e.id,n}function Nd(t){return!t||null==t[0]||isNaN(t[0])||null==t[1]||isNaN(t[1])}function Fd(t,e,n){if(!Mf.node){var i=e.getZr();Fb(i).records||(Fb(i).records={}),Hd(i,e);var r=Fb(i).records[t]||(Fb(i).records[t]={});r.handler=n}}function Hd(t,e){function n(n,i){t.on(n,function(n){var r=Xd(e);Hb(Fb(t).records,function(t){t&&i(t,n,r.dispatchAction)}),Vd(r.pendings,e)})}Fb(t).initialized||(Fb(t).initialized=!0,n("click",_(Wd,"click")),n("mousemove",_(Wd,"mousemove")),n("globalout",Gd))}function Vd(t,e){var n,i=t.showTip.length,r=t.hideTip.length;i?n=t.showTip[i-1]:r&&(n=t.hideTip[r-1]),n&&(n.dispatchAction=null,e.dispatchAction(n))}function Gd(t,e,n){t.handler("leave",null,n)}function Wd(t,e,n,i){e.handler(t,n,i)}function Xd(t){var e={showTip:[],hideTip:[]},n=function(i){var r=e[i.type];r?r.push(i):(i.dispatchAction=n,t.dispatchAction(i))};return{dispatchAction:n,pendings:e}}function Yd(t,e){if(!Mf.node){var n=e.getZr(),i=(Fb(n).records||{})[t];i&&(Fb(n).records[t]=null)}}function Ud(){}function jd(t,e,n,i){qd(Gb(n).lastProp,i)||(Gb(n).lastProp=i,e?ta(n,i,t):(n.stopAnimation(),n.attr(i)))}function qd(t,e){if(S(t)&&S(e)){var n=!0;return f(e,function(e,i){n=n&&qd(t[i],e)}),!!n}return t===e}function Zd(t,e){t[e.get("label.show")?"show":"hide"]()}function Kd(t){return{position:t.position.slice(),rotation:t.rotation||0}}function $d(t,e,n){var i=e.get("z"),r=e.get("zlevel");t&&t.traverse(function(t){"group"!==t.type&&(null!=i&&(t.z=i),null!=r&&(t.zlevel=r),t.silent=n)})}function Qd(t){var e,n=t.get("type"),i=t.getModel(n+"Style");return"line"===n?(e=i.getLineStyle(),e.fill=null):"shadow"===n&&(e=i.getAreaStyle(),e.stroke=null),e}function Jd(t,e,n,i,r){var o=n.get("value"),a=ef(o,e.axis,e.ecModel,n.get("seriesDataIndices"),{precision:n.get("label.precision"),formatter:n.get("label.formatter")}),s=n.getModel("label"),l=qm(s.get("padding")||0),u=s.getFont(),h=Yn(a,u),c=r.position,d=h.width+l[1]+l[3],f=h.height+l[0]+l[2],p=r.align;"right"===p&&(c[0]-=d),"center"===p&&(c[0]-=d/2);var g=r.verticalAlign;"bottom"===g&&(c[1]-=f),"middle"===g&&(c[1]-=f/2),tf(c,d,f,i);var v=s.get("backgroundColor");v&&"auto"!==v||(v=e.get("axisLine.lineStyle.color")),t.label={shape:{x:0,y:0,width:d,height:f,r:s.get("borderRadius")},position:c.slice(),style:{text:a,textFont:u,textFill:s.getTextColor(),textPosition:"inside",textPadding:l,fill:v,stroke:s.get("borderColor")||"transparent",lineWidth:s.get("borderWidth")||0,shadowBlur:s.get("shadowBlur"),shadowColor:s.get("shadowColor"),shadowOffsetX:s.get("shadowOffsetX"),shadowOffsetY:s.get("shadowOffsetY")},z2:10}}function tf(t,e,n,i){var r=i.getWidth(),o=i.getHeight();t[0]=Math.min(t[0]+e,r)-e,t[1]=Math.min(t[1]+n,o)-n,t[0]=Math.max(t[0],0),t[1]=Math.max(t[1],0)}function ef(t,e,n,i,r){t=e.scale.parse(t);var o=e.scale.getLabel(t,{precision:r.precision}),a=r.formatter;if(a){var s={value:zh(e,t),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};f(i,function(t){var e=n.getSeriesByIndex(t.seriesIndex),i=t.dataIndexInside,r=e&&e.getDataParams(i);r&&s.seriesData.push(r)}),b(a)?o=a.replace("{value}",o):w(a)&&(o=a(s))}return o}function nf(t,e,n){var i=Oe();return Re(i,i,n.rotation),ze(i,i,n.position),ia([t.dataToCoord(e),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],i)}function rf(t,e,n,i,r,o){var a=ub.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=r.get("label.margin"),Jd(e,i,r,o,{position:nf(i.axis,t,n),align:a.textAlign,verticalAlign:a.textVerticalAlign})}function of(t,e,n){return n=n||0,{x1:t[n],y1:t[1-n],x2:e[n],y2:e[1-n]}}function af(t,e,n){return n=n||0,{x:t[n],y:t[1-n],width:e[n],height:e[1-n]}}function sf(t,e){var n={};return n[e.dim+"AxisIndex"]=e.index,t.getCartesian(n)}function lf(t){return"x"===t.dim?0:1}function uf(t){var e="cubic-bezier(0.23, 1, 0.32, 1)",n="left "+t+"s "+e+",top "+t+"s "+e;return p(Zb,function(t){return t+"transition:"+n}).join(";")}function hf(t){var e=[],n=t.get("fontSize"),i=t.getTextColor();return i&&e.push("color:"+i),e.push("font:"+t.getFont()),n&&e.push("line-height:"+Math.round(3*n/2)+"px"),jb(["decoration","align"],function(n){var i=t.get(n);i&&e.push("text-"+n+":"+i)}),e.join(";")}function cf(t){var e=[],n=t.get("transitionDuration"),i=t.get("backgroundColor"),r=t.getModel("textStyle"),o=t.get("padding");return n&&e.push(uf(n)),i&&(Mf.canvasSupported?e.push("background-Color:"+i):(e.push("background-Color:#"+rn(i)),e.push("filter:alpha(opacity=70)"))),jb(["width","color","radius"],function(n){var i="border-"+n,r=qb(i),o=t.get(r);null!=o&&e.push(i+":"+o+("color"===n?"":"px"))}),e.push(hf(r)),null!=o&&e.push("padding:"+qm(o).join("px ")+"px"),e.join(";")+";"}function df(t,e,n,i,r){var o=e&&e.painter;if(n){var a=o&&o.getViewportRoot();a&&pe(t,a,document.body,i,r)}else{t[0]=i,t[1]=r;var s=o&&o.getViewportRootOffset();s&&(t[0]+=s.offsetLeft,t[1]+=s.offsetTop)}}function ff(t,e,n){if(Mf.wxa)return null;var i=document.createElement("div");i.domBelongToZr=!0,this.el=i;var r=this._zr=e.getZr(),o=this._appendToBody=n&&n.appendToBody;this._styleCoord=[0,0],df(this._styleCoord,r,o,e.getWidth()/2,e.getHeight()/2),o?document.body.appendChild(i):t.appendChild(i),this._container=t,this._show=!1,this._hideTimeout;var a=this;i.onmouseenter=function(){a._enterable&&(clearTimeout(a._hideTimeout),a._show=!0),a._inContent=!0},i.onmousemove=function(t){if(t=t||window.event,!a._enterable){var e=r.handler,n=r.painter.getViewportRoot();be(n,t,!0),e.dispatch("mousemove",t)}},i.onmouseleave=function(){a._enterable&&a._show&&a.hideLater(a._hideDelay),a._inContent=!1}}function pf(t){this._zr=t.getZr(),this._show=!1,this._hideTimeout}function gf(t){for(var e=t.pop();t.length;){var n=t.pop();n&&(fa.isInstance(n)&&(n=n.get("tooltip",!0)),"string"==typeof n&&(n={formatter:n}),e=new fa(n,e,e.ecModel))}return e}function vf(t,e){return t.dispatchAction||y(e.dispatchAction,e)}function mf(t,e,n,i,r,o,a){var s=n.getOuterSize(),l=s.width,u=s.height;return null!=o&&(t+l+o>i?t-=l+o:t+=o),null!=a&&(e+u+a>r?e-=u+a:e+=a),[t,e]}function yf(t,e,n,i,r){var o=n.getOuterSize(),a=o.width,s=o.height;return t=Math.min(t+a,i)-a,e=Math.min(e+s,r)-s,t=Math.max(t,0),e=Math.max(e,0),[t,e]}function _f(t,e,n){var i=n[0],r=n[1],o=5,a=0,s=0,l=e.width,u=e.height;switch(t){case"inside":a=e.x+l/2-i/2,s=e.y+u/2-r/2;break;case"top":a=e.x+l/2-i/2,s=e.y-r-o;break;case"bottom":a=e.x+l/2-i/2,s=e.y+u+o;break;case"left":a=e.x-i-o,s=e.y+u/2-r/2;break;case"right":a=e.x+l+o,s=e.y+u/2-r/2}return[a,s]}function xf(t){return"center"===t||"middle"===t}var wf=2311,bf=function(){return wf++},Sf={};Sf="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 Mf=Sf,Cf={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1,"[object Canvas]":1},Tf={"[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},If=Object.prototype.toString,kf=Array.prototype,Df=kf.forEach,Af=kf.filter,Pf=kf.slice,Of=kf.map,Lf=kf.reduce,Bf={},Ef=function(){return Bf.createCanvas()};Bf.createCanvas=function(){return document.createElement("canvas")};var zf,Rf="__ec_primitive__";R.prototype={constructor:R,get:function(t){return this.data.hasOwnProperty(t)?this.data[t]:null},set:function(t,e){return this.data[t]=e},each:function(t,e){void 0!==e&&(t=y(t,e));for(var n in this.data)this.data.hasOwnProperty(n)&&t(this.data[n],n)},removeKey:function(t){delete this.data[t]}};var Nf=(Object.freeze||Object)({$override:n,clone:i,merge:r,mergeAll:o,extend:a,defaults:s,createCanvas:Ef,getContext:l,indexOf:u,inherits:h,mixin:c,isArrayLike:d,each:f,map:p,reduce:g,filter:v,find:m,bind:y,curry:_,isArray:x,isFunction:w,isString:b,isObject:S,isBuiltInObject:M,isTypedArray:C,isDom:T,eqNaN:I,retrieve:k,retrieve2:D,retrieve3:A,slice:P,normalizeCssArray:O,assert:L,trim:B,setAsPrimitive:E,isPrimitive:z,createHashMap:N,concatArray:F,noop:H}),Ff="undefined"==typeof Float32Array?Array:Float32Array,Hf=q,Vf=Z,Gf=ee,Wf=ne,Xf=(Object.freeze||Object)({create:V,copy:G,clone:W,set:X,add:Y,scaleAndAdd:U,sub:j,len:q,length:Hf,lenSquare:Z,lengthSquare:Vf,mul:K,div:$,dot:Q,scale:J,normalize:te,distance:ee,dist:Gf,distanceSquare:ne,distSquare:Wf,negate:ie,lerp:re,applyTransform:oe,min:ae,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 n=t.offsetX,i=t.offsetY,r=n-this._x,o=i-this._y;this._x=n,this._y=i,e.drift(r,o,t),this.dispatchToElement(ue(e,t),"drag",t.event);var a=this.findHover(n,i,e).target,s=this._dropTarget;this._dropTarget=a,e!==a&&(s&&a!==s&&this.dispatchToElement(ue(s,t),"dragleave",t.event),a&&a!==s&&this.dispatchToElement(ue(a,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 Yf=Array.prototype.slice,Uf=function(t){this._$handlers={},this._$eventProcessor=t};Uf.prototype={constructor:Uf,one:function(t,e,n,i){return ce(this,t,e,n,i,!0)},on:function(t,e,n,i){return ce(this,t,e,n,i,!1)},isSilent:function(t){var e=this._$handlers;return!e[t]||!e[t].length},off:function(t,e){var n=this._$handlers;if(!t)return this._$handlers={},this;if(e){if(n[t]){for(var i=[],r=0,o=n[t].length;o>r;r++)n[t][r].h!==e&&i.push(n[t][r]);n[t]=i}n[t]&&0===n[t].length&&delete n[t]}else delete n[t];return this},trigger:function(t){var e=this._$handlers[t],n=this._$eventProcessor;if(e){var i=arguments,r=i.length;r>3&&(i=Yf.call(i,1));for(var o=e.length,a=0;o>a;){var s=e[a];if(n&&n.filter&&null!=s.query&&!n.filter(t,s.query))a++;else{switch(r){case 1:s.h.call(s.ctx);break;case 2:s.h.call(s.ctx,i[1]);break;case 3:s.h.call(s.ctx,i[1],i[2]);break;default:s.h.apply(s.ctx,i)}s.one?(e.splice(a,1),o--):a++}}}return n&&n.afterTrigger&&n.afterTrigger(t),this},triggerWithContext:function(t){var e=this._$handlers[t],n=this._$eventProcessor;if(e){var i=arguments,r=i.length;r>4&&(i=Yf.call(i,1,i.length-1));for(var o=i[i.length-1],a=e.length,s=0;a>s;){var l=e[s];if(n&&n.filter&&null!=l.query&&!n.filter(t,l.query))s++;else{switch(r){case 1:l.h.call(o);break;case 2:l.h.call(o,i[1]);break;case 3:l.h.call(o,i[1],i[2]);break;default:l.h.apply(o,i)}l.one?(e.splice(s,1),a--):s++}}}return n&&n.afterTrigger&&n.afterTrigger(t),this}};var jf=Math.log(2),qf="___zrEVENTSAVED",Zf=[],Kf="undefined"!=typeof window&&!!window.addEventListener,$f=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Qf=[],Jf=Kf?function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0}:function(t){t.returnValue=!1,t.cancelBubble=!0},tp=function(){this._track=[]};tp.prototype={constructor:tp,recognize:function(t,e,n){return this._doTrack(t,e,n),this._recognize(t)},clear:function(){return this._track.length=0,this},_doTrack:function(t,e,n){var i=t.touches;if(i){for(var r={points:[],touches:[],target:e,event:t},o=0,a=i.length;a>o;o++){var s=i[o],l=_e(n,s,{});r.points.push([l.zrX,l.zrY]),r.touches.push(s)}this._track.push(r)}},_recognize:function(t){for(var e in ep)if(ep.hasOwnProperty(e)){var n=ep[e](this._track,t);if(n)return n}}};var ep={pinch:function(t,e){var n=t.length;if(n){var i=(t[n-1]||{}).points,r=(t[n-2]||{}).points||i;if(r&&r.length>1&&i&&i.length>1){var o=Ce(i)/Ce(r);!isFinite(o)&&(o=1),e.pinchScale=o;var a=Te(i);return e.pinchX=a[0],e.pinchY=a[1],{type:"pinch",target:t[0].target,event:e}}}}},np="silent";De.prototype.dispose=function(){};var ip=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],rp=function(t,e,n,i){Uf.call(this),this.storage=t,this.painter=e,this.painterRoot=i,n=n||new De,this.proxy=null,this._hovered={},this._lastTouchMoment,this._lastX,this._lastY,this._gestureMgr,le.call(this),this.setHandlerProxy(n)};rp.prototype={constructor:rp,setHandlerProxy:function(t){this.proxy&&this.proxy.dispose(),t&&(f(ip,function(e){t.on&&t.on(e,this[e],this)},this),t.handler=this),this.proxy=t},mousemove:function(t){var e=t.zrX,n=t.zrY,i=Pe(this,e,n),r=this._hovered,o=r.target;o&&!o.__zr&&(r=this.findHover(r.x,r.y),o=r.target);var a=this._hovered=i?{x:e,y:n}:this.findHover(e,n),s=a.target,l=this.proxy;l.setCursor&&l.setCursor(s?s.cursor:"default"),o&&s!==o&&this.dispatchToElement(r,"mouseout",t),this.dispatchToElement(a,"mousemove",t),s&&s!==o&&this.dispatchToElement(a,"mouseover",t)},mouseout:function(t){var e=t.zrEventControl,n=t.zrIsToLocalDOM;"only_globalout"!==e&&this.dispatchToElement(this._hovered,"mouseout",t),"no_globalout"!==e&&!n&&this.trigger("globalout",{type:"globalout",event:t})},resize:function(){this._hovered={}},dispatch:function(t,e){var n=this[t];n&&n.call(this,e)},dispose:function(){this.proxy.dispose(),this.storage=this.proxy=this.painter=null},setCursorStyle:function(t){var e=this.proxy;e.setCursor&&e.setCursor(t)},dispatchToElement:function(t,e,n){t=t||{};var i=t.target;if(!i||!i.silent){for(var r="on"+e,o=Ie(e,t,n);i&&(i[r]&&(o.cancelBubble=i[r].call(i,o)),i.trigger(e,o),i=i.parent,!o.cancelBubble););o.cancelBubble||(this.trigger(e,o),this.painter&&this.painter.eachOtherLayer(function(t){"function"==typeof t[r]&&t[r].call(t,o),t.trigger&&t.trigger(e,o)}))}},findHover:function(t,e,n){for(var i=this.storage.getDisplayList(),r={x:t,y:e},o=i.length-1;o>=0;o--){var a;if(i[o]!==n&&!i[o].ignore&&(a=Ae(i[o],t,e))&&(!r.topTarget&&(r.topTarget=i[o]),a!==np)){r.target=i[o];break}}return r},processGesture:function(t,e){this._gestureMgr||(this._gestureMgr=new tp);var n=this._gestureMgr;"start"===e&&n.clear();var i=n.recognize(t,this.findHover(t.zrX,t.zrY,null).target,this.proxy.dom);if("end"===e&&n.clear(),i){var r=i.type;t.gestureEvent=r,this.dispatchToElement({target:i.target},r,i.event)}}},f(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(t){rp.prototype[t]=function(e){var n,i,r=e.zrX,o=e.zrY,a=Pe(this,r,o);if("mouseup"===t&&a||(n=this.findHover(r,o),i=n.target),"mousedown"===t)this._downEl=i,this._downPoint=[e.zrX,e.zrY],this._upEl=i;else if("mouseup"===t)this._upEl=i;else if("click"===t){if(this._downEl!==this._upEl||!this._downPoint||Gf(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(n,t,e)}}),c(rp,Uf),c(rp,le);var op="undefined"==typeof Float32Array?Array:Float32Array,ap=(Object.freeze||Object)({create:Oe,identity:Le,copy:Be,mul:Ee,translate:ze,rotate:Re,scale:Ne,invert:Fe,clone:He}),sp=Le,lp=5e-5,up=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},hp=up.prototype;hp.transform=null,hp.needLocalTransform=function(){return Ve(this.rotation)||Ve(this.position[0])||Ve(this.position[1])||Ve(this.scale[0]-1)||Ve(this.scale[1]-1)};var cp=[];hp.updateTransform=function(){var t=this.parent,e=t&&t.transform,n=this.needLocalTransform(),i=this.transform;if(!n&&!e)return void(i&&sp(i));i=i||Oe(),n?this.getLocalTransform(i):sp(i),e&&(n?Ee(i,t.transform,i):Be(i,t.transform)),this.transform=i;var r=this.globalScaleRatio;if(null!=r&&1!==r){this.getGlobalScale(cp);var o=cp[0]<0?-1:1,a=cp[1]<0?-1:1,s=((cp[0]-o)*r+o)/cp[0]||0,l=((cp[1]-a)*r+a)/cp[1]||0;i[0]*=s,i[1]*=s,i[2]*=l,i[3]*=l}this.invTransform=this.invTransform||Oe(),Fe(this.invTransform,i)},hp.getLocalTransform=function(t){return up.getLocalTransform(this,t)},hp.setTransform=function(t){var e=this.transform,n=t.dpr||1;e?t.setTransform(n*e[0],n*e[1],n*e[2],n*e[3],n*e[4],n*e[5]):t.setTransform(n,0,0,n,0,0)},hp.restoreTransform=function(t){var e=t.dpr||1;t.setTransform(e,0,0,e,0,0)};var dp=[],fp=Oe();hp.setLocalTransform=function(t){if(t){var e=t[0]*t[0]+t[1]*t[1],n=t[2]*t[2]+t[3]*t[3],i=this.position,r=this.scale;Ve(e-1)&&(e=Math.sqrt(e)),Ve(n-1)&&(n=Math.sqrt(n)),t[0]<0&&(e=-e),t[3]<0&&(n=-n),i[0]=t[4],i[1]=t[5],r[0]=e,r[1]=n,this.rotation=Math.atan2(-t[1]/n,t[0]/e)}},hp.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(Ee(dp,t.invTransform,e),e=dp);var n=this.origin;n&&(n[0]||n[1])&&(fp[4]=n[0],fp[5]=n[1],Ee(dp,e,fp),dp[4]-=n[0],dp[5]-=n[1],e=dp),this.setLocalTransform(e)}},hp.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)},hp.transformCoordToLocal=function(t,e){var n=[t,e],i=this.invTransform;return i&&oe(n,n,i),n},hp.transformCoordToGlobal=function(t,e){var n=[t,e],i=this.transform;return i&&oe(n,n,i),n},up.getLocalTransform=function(t,e){e=e||[],sp(e);var n=t.origin,i=t.scale||[1,1],r=t.rotation||0,o=t.position||[0,0];return n&&(e[4]-=n[0],e[5]-=n[1]),Ne(e,e,i),r&&Re(e,e,r),n&&(e[4]+=n[0],e[5]+=n[1]),e[4]+=o[0],e[5]+=o[1],e};var pp={linear:function(t){return t},quadraticIn:function(t){return t*t},quadraticOut:function(t){return t*(2-t)},quadraticInOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},quarticIn:function(t){return t*t*t*t},quarticOut:function(t){return 1- --t*t*t*t},quarticInOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},quinticIn:function(t){return t*t*t*t*t},quinticOut:function(t){return--t*t*t*t*t+1},quinticInOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},sinusoidalIn:function(t){return 1-Math.cos(t*Math.PI/2)},sinusoidalOut:function(t){return Math.sin(t*Math.PI/2)},sinusoidalInOut:function(t){return.5*(1-Math.cos(Math.PI*t))},exponentialIn:function(t){return 0===t?0:Math.pow(1024,t-1)},exponentialOut:function(t){return 1===t?1:1-Math.pow(2,-10*t)},exponentialInOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(-Math.pow(2,-10*(t-1))+2)},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var e,n=.1,i=.4;return 0===t?0:1===t?1:(!n||1>n?(n=1,e=i/4):e=i*Math.asin(1/n)/(2*Math.PI),-(n*Math.pow(2,10*(t-=1))*Math.sin(2*(t-e)*Math.PI/i)))},elasticOut:function(t){var e,n=.1,i=.4;return 0===t?0:1===t?1:(!n||1>n?(n=1,e=i/4):e=i*Math.asin(1/n)/(2*Math.PI),n*Math.pow(2,-10*t)*Math.sin(2*(t-e)*Math.PI/i)+1)},elasticInOut:function(t){var e,n=.1,i=.4;return 0===t?0:1===t?1:(!n||1>n?(n=1,e=i/4):e=i*Math.asin(1/n)/(2*Math.PI),(t*=2)<1?-.5*n*Math.pow(2,10*(t-=1))*Math.sin(2*(t-e)*Math.PI/i):n*Math.pow(2,-10*(t-=1))*Math.sin(2*(t-e)*Math.PI/i)*.5+1)},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},backInOut:function(t){var e=2.5949095;return(t*=2)<1?.5*t*t*((e+1)*t-e):.5*((t-=2)*t*((e+1)*t+e)+2)},bounceIn:function(t){return 1-pp.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*pp.bounceIn(2*t):.5*pp.bounceOut(2*t-1)+.5}};Ge.prototype={constructor:Ge,step:function(t,e){if(this._initialized||(this._startTime=t+this._delay,this._initialized=!0),this._paused)return void(this._pausedTime+=e);var n=(t-this._startTime-this._pausedTime)/this._life;if(!(0>n)){n=Math.min(n,1);var i=this.easing,r="string"==typeof i?pp[i]:i,o="function"==typeof r?r(n):n;return this.fire("frame",o),1===n?this.loop?(this.restart(t),"restart"):(this._needsRemove=!0,"destroy"):null}},restart:function(t){var e=(t-this._startTime-this._pausedTime)%this._life;this._startTime=t-e+this.gap,this._pausedTime=0,this._needsRemove=!1},fire:function(t,e){t="on"+t,this[t]&&this[t](this._target,e)},pause:function(){this._paused=!0},resume:function(){this._paused=!1}};var gp=function(){this.head=null,this.tail=null,this._len=0},vp=gp.prototype;vp.insert=function(t){var e=new mp(t);return this.insertEntry(e),e},vp.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++},vp.remove=function(t){var e=t.prev,n=t.next;e?e.next=n:this.head=n,n?n.prev=e:this.tail=e,t.next=t.prev=null,this._len--},vp.len=function(){return this._len},vp.clear=function(){this.head=this.tail=null,this._len=0};var mp=function(t){this.value=t,this.next,this.prev},yp=function(t){this._list=new gp,this._map={},this._maxSize=t||10,this._lastRemovedEntry=null},_p=yp.prototype;_p.put=function(t,e){var n=this._list,i=this._map,r=null;if(null==i[t]){var o=n.len(),a=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var s=n.head;n.remove(s),delete i[s.key],r=s.value,this._lastRemovedEntry=s}a?a.value=e:a=new mp(e),a.key=t,n.insertEntry(a),i[t]=a}return r},_p.get=function(t){var e=this._map[t],n=this._list;return null!=e?(e!==n.tail&&(n.remove(e),n.insertEntry(e)),e.value):void 0},_p.clear=function(){this._list.clear(),this._map={}};var xp={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]},wp=new yp(20),bp=null,Sp=on,Mp=an,Cp=(Object.freeze||Object)({parse:Je,lift:nn,toHex:rn,fastLerp:on,fastMapToColor:Sp,lerp:an,mapToColor:Mp,modifyHSL:sn,modifyAlpha:ln,stringify:un}),Tp=Array.prototype.slice,Ip=function(t,e,n,i){this._tracks={},this._target=t,this._loop=e||!1,this._getter=n||hn,this._setter=i||cn,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]
  6. };Ip.prototype={when:function(t,e){var n=this._tracks;for(var i in e)if(e.hasOwnProperty(i)){if(!n[i]){n[i]=[];var r=this._getter(this._target,i);if(null==r)continue;0!==t&&n[i].push({time:0,value:_n(r)})}n[i].push({time:t,value:e[i]})}return this},during:function(t){return this._onframeList.push(t),this},pause:function(){for(var t=0;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,n=0;e>n;n++)t[n].call(this)},start:function(t,e){var n,i=this,r=0,o=function(){r--,r||i._doneCallback()};for(var a in this._tracks)if(this._tracks.hasOwnProperty(a)){var s=bn(this,t,o,this._tracks[a],a,e);s&&(this._clipList.push(s),r++,this.animation&&this.animation.addClip(s),n=s)}if(n){var l=n.onframe;n.onframe=function(t,e){l(t,e);for(var n=0;n<i._onframeList.length;n++)i._onframeList[n](t,e)}}return r||this._doneCallback(),this},stop:function(t){for(var e=this._clipList,n=this.animation,i=0;i<e.length;i++){var r=e[i];t&&r.onframe(this._target,1),n&&n.removeClip(r)}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 kp=1;"undefined"!=typeof window&&(kp=Math.max(window.devicePixelRatio||1,1));var Dp=0,Ap=kp,Pp=function(){};1===Dp&&(Pp=console.error);var Op=Pp,Lp=function(){this.animators=[]};Lp.prototype={constructor:Lp,animate:function(t,e){var n,i=!1,r=this,o=this.__zr;if(t){var a=t.split("."),s=r;i="shape"===a[0];for(var l=0,h=a.length;h>l;l++)s&&(s=s[a[l]]);s&&(n=s)}else n=r;if(!n)return void Op('Property "'+t+'" is not existed in element '+r.id);var c=r.animators,d=new Ip(n,e);return d.during(function(){r.dirty(i)}).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,n=e.length,i=0;n>i;i++)e[i].stop(t);return e.length=0,this},animateTo:function(t,e,n,i,r,o){Sn(this,t,e,n,i,r,o)},animateFrom:function(t,e,n,i,r,o){Sn(this,t,e,n,i,r,o,!0)}};var Bp=function(t){up.call(this,t),Uf.call(this,t),Lp.call(this,t),this.id=t.id||bf()};Bp.prototype={type:"element",name:"",__zr:null,ignore:!1,clipPath:null,isGroup:!1,drift:function(t,e){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0}var n=this.transform;n||(n=this.transform=[1,0,0,1,0,0]),n[4]+=t,n[5]+=e,this.decomposeTransform(),this.dirty(!1)},beforeUpdate:function(){},afterUpdate:function(){},update:function(){this.updateTransform()},traverse:function(){},attrKV:function(t,e){if("position"===t||"scale"===t||"origin"===t){if(e){var n=this[t];n||(n=this[t]=[]),n[0]=e[0],n[1]=e[1]}}else this[t]=e},hide:function(){this.ignore=!0,this.__zr&&this.__zr.refresh()},show:function(){this.ignore=!1,this.__zr&&this.__zr.refresh()},attr:function(t,e){if("string"==typeof t)this.attrKV(t,e);else if(S(t))for(var n in t)t.hasOwnProperty(n)&&this.attrKV(n,t[n]);return this.dirty(!1),this},setClipPath:function(t){var e=this.__zr;e&&t.addSelfToZr(e),this.clipPath&&this.clipPath!==t&&this.removeClipPath(),this.clipPath=t,t.__zr=e,t.__clipTarget=this,this.dirty(!1)},removeClipPath:function(){var t=this.clipPath;t&&(t.__zr&&t.removeSelfFromZr(t.__zr),t.__zr=null,t.__clipTarget=null,this.clipPath=null,this.dirty(!1))},addSelfToZr:function(t){this.__zr=t;var e=this.animators;if(e)for(var n=0;n<e.length;n++)t.animation.addAnimator(e[n]);this.clipPath&&this.clipPath.addSelfToZr(t)},removeSelfFromZr:function(t){this.__zr=null;var e=this.animators;if(e)for(var n=0;n<e.length;n++)t.animation.removeAnimator(e[n]);this.clipPath&&this.clipPath.removeSelfFromZr(t)}},c(Bp,Lp),c(Bp,up),c(Bp,Uf);var Ep=oe,zp=Math.min,Rp=Math.max;Tn.prototype={constructor:Tn,union:function(t){var e=zp(t.x,this.x),n=zp(t.y,this.y);this.width=Rp(t.x+t.width,this.x+this.width)-e,this.height=Rp(t.y+t.height,this.y+this.height)-n,this.x=e,this.y=n},applyTransform:function(){var t=[],e=[],n=[],i=[];return function(r){if(r){t[0]=n[0]=this.x,t[1]=i[1]=this.y,e[0]=i[0]=this.x+this.width,e[1]=n[1]=this.y+this.height,Ep(t,t,r),Ep(e,e,r),Ep(n,n,r),Ep(i,i,r),this.x=zp(t[0],e[0],n[0],i[0]),this.y=zp(t[1],e[1],n[1],i[1]);var o=Rp(t[0],e[0],n[0],i[0]),a=Rp(t[1],e[1],n[1],i[1]);this.width=o-this.x,this.height=a-this.y}}}(),calculateTransform:function(t){var e=this,n=t.width/e.width,i=t.height/e.height,r=Oe();return ze(r,r,[-e.x,-e.y]),Ne(r,r,[n,i]),ze(r,r,[t.x,t.y]),r},intersect:function(t){if(!t)return!1;t instanceof Tn||(t=Tn.create(t));var e=this,n=e.x,i=e.x+e.width,r=e.y,o=e.y+e.height,a=t.x,s=t.x+t.width,l=t.y,u=t.y+t.height;return!(a>i||n>s||l>o||r>u)},contain:function(t,e){var n=this;return t>=n.x&&t<=n.x+n.width&&e>=n.y&&e<=n.y+n.height},clone:function(){return new Tn(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}}},Tn.create=function(t){return new Tn(t.x,t.y,t.width,t.height)};var Np=function(t){t=t||{},Bp.call(this,t);for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);this._children=[],this.__storage=null,this.__dirty=!0};Np.prototype={constructor:Np,isGroup:!0,type:"group",silent:!1,children:function(){return this._children.slice()},childAt:function(t){return this._children[t]},childOfName:function(t){for(var e=this._children,n=0;n<e.length;n++)if(e[n].name===t)return e[n]},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 n=this._children,i=n.indexOf(e);i>=0&&(n.splice(i,0,t),this._doAdd(t))}return this},_doAdd:function(t){t.parent&&t.parent.remove(t),t.parent=this;var e=this.__storage,n=this.__zr;e&&e!==t.__storage&&(e.addToStorage(t),t instanceof Np&&t.addChildrenToStorage(e)),n&&n.refresh()},remove:function(t){var e=this.__zr,n=this.__storage,i=this._children,r=u(i,t);return 0>r?this:(i.splice(r,1),t.parent=null,n&&(n.delFromStorage(t),t instanceof Np&&t.delChildrenFromStorage(n)),e&&e.refresh(),this)},removeAll:function(){var t,e,n=this._children,i=this.__storage;for(e=0;e<n.length;e++)t=n[e],i&&(i.delFromStorage(t),t instanceof Np&&t.delChildrenFromStorage(i)),t.parent=null;return n.length=0,this},eachChild:function(t,e){for(var n=this._children,i=0;i<n.length;i++){var r=n[i];t.call(e,r,i)}return this},traverse:function(t,e){for(var n=0;n<this._children.length;n++){var i=this._children[n];t.call(e,i),"group"===i.type&&i.traverse(t,e)}return this},addChildrenToStorage:function(t){for(var e=0;e<this._children.length;e++){var n=this._children[e];t.addToStorage(n),n instanceof Np&&n.addChildrenToStorage(t)}},delChildrenFromStorage:function(t){for(var e=0;e<this._children.length;e++){var n=this._children[e];t.delFromStorage(n),n instanceof Np&&n.delChildrenFromStorage(t)}},dirty:function(){return this.__dirty=!0,this.__zr&&this.__zr.refresh(),this},getBoundingRect:function(t){for(var e=null,n=new Tn(0,0,0,0),i=t||this._children,r=[],o=0;o<i.length;o++){var a=i[o];if(!a.ignore&&!a.invisible){var s=a.getBoundingRect(),l=a.getLocalTransform(r);l?(n.copy(s),n.applyTransform(l),e=e||n.clone(),e.union(n)):(e=e||s.clone(),e.union(s))}}return e||n}},h(Np,Bp);var Fp=32,Hp=7,Vp=function(){this._roots=[],this._displayList=[],this._displayListLen=0};Vp.prototype={constructor:Vp,traverse:function(t,e){for(var n=0;n<this._roots.length;n++)this._roots[n].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,n=this._displayList,i=0,r=e.length;r>i;i++)this._updateAndAddDisplayable(e[i],null,t);n.length=this._displayListLen,Mf.canvasSupported&&Bn(n,En)},_updateAndAddDisplayable:function(t,e,n){if(!t.ignore||n){t.beforeUpdate(),t.__dirty&&t.update(),t.afterUpdate();var i=t.clipPath;if(i){e=e?e.slice():[];for(var r=i,o=t;r;)r.parent=o,r.updateTransform(),e.push(r),o=r,r=r.clipPath}if(t.isGroup){for(var a=t._children,s=0;s<a.length;s++){var l=a[s];t.__dirty&&(l.__dirty=!0),this._updateAndAddDisplayable(l,e,n)}t.__dirty=!1}else t.__clipPaths=e,this._displayList[this._displayListLen++]=t}},addRoot:function(t){t.__storage!==this&&(t instanceof Np&&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 n=this._roots[e];n instanceof Np&&n.delChildrenFromStorage(this)}return this._roots=[],this._displayList=[],void(this._displayListLen=0)}if(t instanceof Array)for(var e=0,i=t.length;i>e;e++)this.delRoot(t[e]);else{var r=u(this._roots,t);r>=0&&(this.delFromStorage(t),this._roots.splice(r,1),t instanceof Np&&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:En};var Gp={shadowBlur:1,shadowOffsetX:1,shadowOffsetY:1,textShadowBlur:1,textShadowOffsetX:1,textShadowOffsetY:1,textBoxShadowBlur:1,textBoxShadowOffsetX:1,textBoxShadowOffsetY:1},Wp=function(t,e,n){return Gp.hasOwnProperty(e)?n*=t.dpr:n},Xp={NONE:0,STYLE_BIND:1,PLAIN_TEXT:2},Yp=9,Up=[["shadowBlur",0],["shadowOffsetX",0],["shadowOffsetY",0],["shadowColor","#000"],["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]],jp=function(t){this.extendFrom(t,!1)};jp.prototype={constructor:jp,fill:"#000",stroke:null,opacity:1,fillOpacity:null,strokeOpacity:null,lineDash:null,lineDashOffset:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,lineWidth:1,strokeNoScale:!1,text:null,font:null,textFont:null,fontStyle:null,fontWeight:null,fontSize:null,fontFamily:null,textTag:null,textFill:"#000",textStroke:null,textWidth:null,textHeight:null,textStrokeWidth:0,textLineHeight:null,textPosition:"inside",textRect:null,textOffset:null,textAlign:null,textVerticalAlign:null,textDistance:5,textShadowColor:"transparent",textShadowBlur:0,textShadowOffsetX:0,textShadowOffsetY:0,textBoxShadowColor:"transparent",textBoxShadowBlur:0,textBoxShadowOffsetX:0,textBoxShadowOffsetY:0,transformText:!1,textRotation:0,textOrigin:null,textBackgroundColor:null,textBorderColor:null,textBorderWidth:0,textBorderRadius:0,textPadding:null,rich:null,truncate:null,blend:null,bind:function(t,e,n){var i=this,r=n&&n.style,o=!r||t.__attrCachedBy!==Xp.STYLE_BIND;t.__attrCachedBy=Xp.STYLE_BIND;for(var a=0;a<Up.length;a++){var s=Up[a],l=s[0];(o||i[l]!==r[l])&&(t[l]=Wp(t,l,i[l]||s[1]))}if((o||i.fill!==r.fill)&&(t.fillStyle=i.fill),(o||i.stroke!==r.stroke)&&(t.strokeStyle=i.stroke),(o||i.opacity!==r.opacity)&&(t.globalAlpha=null==i.opacity?1:i.opacity),(o||i.blend!==r.blend)&&(t.globalCompositeOperation=i.blend||"source-over"),this.hasStroke()){var u=i.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 n in t)!t.hasOwnProperty(n)||e!==!0&&(e===!1?this.hasOwnProperty(n):null==t[n])||(this[n]=t[n])},set:function(t,e){"string"==typeof t?this[t]=e:this.extendFrom(t,!0)},clone:function(){var t=new this.constructor;return t.extendFrom(this,!0),t},getGradient:function(t,e,n){for(var i="radial"===e.type?Rn:zn,r=i(t,e,n),o=e.colorStops,a=0;a<o.length;a++)r.addColorStop(o[a].offset,o[a].color);return r}};for(var qp=jp.prototype,Zp=0;Zp<Up.length;Zp++){var Kp=Up[Zp];Kp[0]in qp||(qp[Kp[0]]=Kp[1])}jp.getGradient=qp.getGradient;var $p=function(t,e){this.image=t,this.repeat=e,this.type="pattern"};$p.prototype.getCanvasPattern=function(t){return t.createPattern(this.image,this.repeat||"repeat")};var Qp=function(t,e,n){var i;n=n||Ap,"string"==typeof t?i=Fn(t,e,n):S(t)&&(i=t,t=i.id),this.id=t,this.dom=i;var r=i.style;r&&(i.onselectstart=Nn,r["-webkit-user-select"]="none",r["user-select"]="none",r["-webkit-touch-callout"]="none",r["-webkit-tap-highlight-color"]="rgba(0,0,0,0)",r.padding=0,r.margin=0,r["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=n};Qp.prototype={constructor:Qp,__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=Fn("back-"+this.id,this.painter,t),this.ctxBack=this.domBack.getContext("2d"),1!==t&&this.ctxBack.scale(t,t)},resize:function(t,e){var n=this.dpr,i=this.dom,r=i.style,o=this.domBack;r&&(r.width=t+"px",r.height=e+"px"),i.width=t*n,i.height=e*n,o&&(o.width=t*n,o.height=e*n,1!==n&&this.ctxBack.scale(n,n))},clear:function(t,e){var n=this.dom,i=this.ctx,r=n.width,o=n.height,e=e||this.clearColor,a=this.motionBlur&&!t,s=this.lastFrameAlpha,l=this.dpr;if(a&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(n,0,0,r/l,o/l)),i.clearRect(0,0,r,o),e&&"transparent"!==e){var u;e.colorStops?(u=e.__canvasGradient||jp.getGradient(i,e,{x:0,y:0,width:r,height:o}),e.__canvasGradient=u):e.image&&(u=$p.prototype.getCanvasPattern.call(e,i)),i.save(),i.fillStyle=u||e,i.fillRect(0,0,r,o),i.restore()}if(a){var h=this.domBack;i.save(),i.globalAlpha=s,i.drawImage(h,0,0,r,o),i.restore()}}};var Jp="undefined"!=typeof window&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){setTimeout(t,16)},tg=new yp(50),eg={},ng=0,ig=5e3,rg=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g,og="12px sans-serif",ag={};ag.measureText=function(t,e){var n=l();return n.font=e||og,n.measureText(t)};var sg=og,lg={left:1,right:1,center:1},ug={top:1,bottom:1,middle:1},hg=[["textShadowBlur","shadowBlur",0],["textShadowOffsetX","shadowOffsetX",0],["textShadowOffsetY","shadowOffsetY",0],["textShadowColor","shadowColor","transparent"]],cg={},dg={},fg=new Tn,pg=function(){};pg.prototype={constructor:pg,drawRectText:function(t,e){var n=this.style;e=n.textRect||e,this.__dirty&&li(n,!0);var i=n.text;if(null!=i&&(i+=""),Ci(i,n)){t.save();var r=this.transform;n.transformText?this.setTransform(t):r&&(fg.copy(e),fg.applyTransform(r),e=fg),hi(this,t,i,n,e,Yp),t.restore()}}},Ti.prototype={constructor:Ti,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 n=this.transformCoordToLocal(t,e),i=this.getBoundingRect();return i.contain(n[0],n[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?Bp.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 jp(t,this),this.dirty(!1),this},calculateTextPosition:null},h(Ti,Bp),c(Ti,pg),Ii.prototype={constructor:Ii,type:"image",brush:function(t,e){var n=this.style,i=n.image;n.bind(t,this,e);var r=this._image=Vn(i,this._image,this,this.onload);if(r&&Wn(r)){var o=n.x||0,a=n.y||0,s=n.width,l=n.height,u=r.width/r.height;if(null==s&&null!=l?s=l*u:null==l&&null!=s?l=s/u:null==s&&null==l&&(s=r.width,l=r.height),this.setTransform(t),n.sWidth&&n.sHeight){var h=n.sx||0,c=n.sy||0;t.drawImage(r,h,c,n.sWidth,n.sHeight,o,a,s,l)}else if(n.sx&&n.sy){var h=n.sx,c=n.sy,d=s-h,f=l-c;t.drawImage(r,h,c,d,f,o,a,s,l)}else t.drawImage(r,o,a,s,l);null!=n.text&&(this.restoreTransform(t),this.drawRectText(t,this.getBoundingRect()))}},getBoundingRect:function(){var t=this.style;return this._rect||(this._rect=new Tn(t.x||0,t.y||0,t.width||0,t.height||0)),this._rect}},h(Ii,Ti);var gg=1e5,vg=314159,mg=.01,yg=.001,_g=new Tn(0,0,0,0),xg=new Tn(0,0,0,0),wg=function(t,e,n){this.type="canvas";var i=!t.nodeName||"CANVAS"===t.nodeName.toUpperCase();this._opts=n=a({},n||{}),this.dpr=n.devicePixelRatio||Ap,this._singleCanvas=i,this.root=t;var r=t.style;r&&(r["-webkit-tap-highlight-color"]="transparent",r["-webkit-user-select"]=r["user-select"]=r["-webkit-touch-callout"]="none",t.innerHTML=""),this.storage=e;var o=this._zlevelList=[],s=this._layers={};if(this._layerConfig={},this._needsManuallyCompositing=!1,i){var l=t.width,u=t.height;null!=n.width&&(l=n.width),null!=n.height&&(u=n.height),this.dpr=n.devicePixelRatio||1,t.width=l*this.dpr,t.height=u*this.dpr,this._width=l,this._height=u;var h=new Qp(t,this,this.dpr);h.__builtin__=!0,h.initContext(),s[vg]=h,h.zlevel=vg,o.push(vg),this._domRoot=t}else{this._width=this._getSize(0),this._height=this._getSize(1);var c=this._domRoot=Li(this._width,this._height);t.appendChild(c)}this._hoverlayer=null,this._hoverElements=[]};wg.prototype={constructor:wg,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),n=this._zlevelList;this._redrawId=Math.random(),this._paintList(e,t,this._redrawId);for(var i=0;i<n.length;i++){var r=n[i],o=this._layers[r];if(!o.__builtin__&&o.refresh){var a=0===i?this._backgroundColor:null;o.refresh(a)}}return this.refreshHover(),this},addHover:function(t,e){if(!t.__hoverMir){var n=new t.constructor({style:t.style,shape:t.shape,z:t.z,z2:t.z2,silent:t.silent});return n.__from=t,t.__hoverMir=n,e&&n.setStyle(e),this._hoverElements.push(n),n}},removeHover:function(t){var e=t.__hoverMir,n=this._hoverElements,i=u(n,e);i>=0&&n.splice(i,1),t.__hoverMir=null},clearHover:function(){for(var t=this._hoverElements,e=0;e<t.length;e++){var n=t[e].__from;n&&(n.__hoverMir=null)}t.length=0},refreshHover:function(){var t=this._hoverElements,e=t.length,n=this._hoverlayer;if(n&&n.clear(),e){Bn(t,this.storage.displayableSortFunc),n||(n=this._hoverlayer=this.getLayer(gg));var i={};n.ctx.save();for(var r=0;e>r;){var o=t[r],a=o.__from;a&&a.__zr?(r++,a.invisible||(o.transform=a.transform,o.invTransform=a.invTransform,o.__clipPaths=a.__clipPaths,this._doPaintEl(o,n,!0,i))):(t.splice(r,1),a.__hoverMir=null,e--)}n.ctx.restore()}},getHoverLayer:function(){return this.getLayer(gg)},_paintList:function(t,e,n){if(this._redrawId===n){e=e||!1,this._updateLayerStatus(t);var i=this._doPaintList(t,e);if(this._needsManuallyCompositing&&this._compositeManually(),!i){var r=this;Jp(function(){r._paintList(t,e,n)})}}},_compositeManually:function(){var t=this.getLayer(vg).ctx,e=this._domRoot.width,n=this._domRoot.height;t.clearRect(0,0,e,n),this.eachBuiltinLayer(function(i){i.virtual&&t.drawImage(i.dom,0,0,e,n)})},_doPaintList:function(t,e){for(var n=[],i=0;i<this._zlevelList.length;i++){var r=this._zlevelList[i],o=this._layers[r];o.__builtin__&&o!==this._hoverlayer&&(o.__dirty||e)&&n.push(o)}for(var a=!0,s=0;s<n.length;s++){var o=n[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 v=h;v<o.__endIndex;v++){var m=t[v];if(this._doPaintEl(m,o,e,u),m.__dirty=m.__dirtyText=!1,c){var y=Date.now()-d;if(y>15)break}}o.__drawIndex=v,o.__drawIndex<o.__endIndex&&(a=!1),u.prevElClipPaths&&l.restore(),l.restore()}return Mf.wxa&&f(this._layers,function(t){t&&t.ctx&&t.ctx.draw&&t.ctx.draw()}),a},_doPaintEl:function(t,e,n,i){var r=e.ctx,o=t.transform;if(!(!e.__dirty&&!n||t.invisible||0===t.style.opacity||o&&!o[0]&&!o[3]||t.culling&&Ai(t,this._width,this._height))){var a=t.__clipPaths,s=i.prevElClipPaths;(!s||Pi(a,s))&&(s&&(r.restore(),i.prevElClipPaths=null,i.prevEl=null),a&&(r.save(),Oi(a,r),i.prevElClipPaths=a)),t.beforeBrush&&t.beforeBrush(r),t.brush(r,i.prevEl||null),i.prevEl=t,t.afterBrush&&t.afterBrush(r)}},getLayer:function(t,e){this._singleCanvas&&!this._needsManuallyCompositing&&(t=vg);var n=this._layers[t];return n||(n=new Qp("zr_"+t,this,this.dpr),n.zlevel=t,n.__builtin__=!0,this._layerConfig[t]&&r(n,this._layerConfig[t],!0),e&&(n.virtual=e),this.insertLayer(t,n),n.initContext()),n},insertLayer:function(t,e){var n=this._layers,i=this._zlevelList,r=i.length,o=null,a=-1,s=this._domRoot;if(n[t])return void Op("ZLevel "+t+" has been used already");if(!Di(e))return void Op("Layer of zlevel "+t+" is not valid");if(r>0&&t>i[0]){for(a=0;r-1>a&&!(i[a]<t&&i[a+1]>t);a++);o=n[i[a]]}if(i.splice(a+1,0,t),n[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 n,i,r=this._zlevelList;for(i=0;i<r.length;i++)n=r[i],t.call(e,this._layers[n],n)},eachBuiltinLayer:function(t,e){var n,i,r,o=this._zlevelList;for(r=0;r<o.length;r++)i=o[r],n=this._layers[i],n.__builtin__&&t.call(e,n,i)},eachOtherLayer:function(t,e){var n,i,r,o=this._zlevelList;for(r=0;r<o.length;r++)i=o[r],n=this._layers[i],n.__builtin__||t.call(e,n,i)},getLayers:function(){return this._layers},_updateLayerStatus:function(t){function e(t){r&&(r.__endIndex!==t&&(r.__dirty=!0),r.__endIndex=t)}if(this.eachBuiltinLayer(function(t){t.__dirty=t.__used=!1}),this._singleCanvas)for(var n=1;n<t.length;n++){var i=t[n];if(i.zlevel!==t[n-1].zlevel||i.incremental){this._needsManuallyCompositing=!0;break}}for(var r=null,o=0,n=0;n<t.length;n++){var a,i=t[n],s=i.zlevel;i.incremental?(a=this.getLayer(s+yg,this._needsManuallyCompositing),a.incremental=!0,o=1):a=this.getLayer(s+(o>0?mg:0),this._needsManuallyCompositing),a.__builtin__||Op("ZLevel "+s+" has been used by unkown layer "+a.id),a!==r&&(a.__used=!0,a.__startIndex!==n&&(a.__dirty=!0),a.__startIndex=n,a.__drawIndex=a.incremental?-1:n,e(n),r=a),i.__dirty&&(a.__dirty=!0,a.incremental&&a.__drawIndex<0&&(a.__drawIndex=n))}e(n),this.eachBuiltinLayer(function(t){!t.__used&&t.getElementCount()>0&&(t.__dirty=!0,t.__startIndex=t.__endIndex=t.__drawIndex=0),t.__dirty&&t.__drawIndex<0&&(t.__drawIndex=t.__startIndex)})},clear:function(){return this.eachBuiltinLayer(this._clearLayer),this},_clearLayer:function(t){t.clear()},setBackgroundColor:function(t){this._backgroundColor=t},configLayer:function(t,e){if(e){var n=this._layerConfig;n[t]?r(n[t],e,!0):n[t]=e;for(var i=0;i<this._zlevelList.length;i++){var o=this._zlevelList[i];if(o===t||o===t+mg){var a=this._layers[o];r(a,n[t],!0)}}}},delLayer:function(t){var e=this._layers,n=this._zlevelList,i=e[t];i&&(i.dom.parentNode.removeChild(i.dom),delete e[t],n.splice(u(n,t),1))},resize:function(t,e){if(this._domRoot.style){var n=this._domRoot;n.style.display="none";var i=this._opts;if(null!=t&&(i.width=t),null!=e&&(i.height=e),t=this._getSize(0),e=this._getSize(1),n.style.display="",this._width!==t||e!==this._height){n.style.width=t+"px",n.style.height=e+"px";for(var r in this._layers)this._layers.hasOwnProperty(r)&&this._layers[r].resize(t,e);f(this._progressiveLayers,function(n){n.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(vg).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[vg].dom;var e=new Qp("image",this,t.pixelRatio||this.dpr);if(e.initContext(),e.clear(!1,t.backgroundColor||this._backgroundColor),t.pixelRatio<=this.dpr){this.refresh();var n=e.dom.width,i=e.dom.height,r=e.ctx;this.eachLayer(function(t){t.__builtin__?r.drawImage(t.dom,0,0,n,i):t.renderToCanvas&&(e.ctx.save(),t.renderToCanvas(e.ctx),e.ctx.restore())})}else for(var o={},a=this.storage.getDisplayList(!0),s=0;s<a.length;s++){var l=a[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,n=["width","height"][t],i=["clientWidth","clientHeight"][t],r=["paddingLeft","paddingTop"][t],o=["paddingRight","paddingBottom"][t];if(null!=e[n]&&"auto"!==e[n])return parseFloat(e[n]);var a=this.root,s=document.defaultView.getComputedStyle(a);return(a[i]||ki(s[n])||ki(a.style[n]))-(ki(s[r])||0)-(ki(s[o])||0)|0},pathToImage:function(t,e){e=e||this.dpr;var n=document.createElement("canvas"),i=n.getContext("2d"),r=t.getBoundingRect(),o=t.style,a=o.shadowBlur*e,s=o.shadowOffsetX*e,l=o.shadowOffsetY*e,u=o.hasStroke()?o.lineWidth:0,h=Math.max(u/2,-s+a),c=Math.max(u/2,s+a),d=Math.max(u/2,-l+a),f=Math.max(u/2,l+a),p=r.width+h+c,g=r.height+d+f;n.width=p*e,n.height=g*e,i.scale(e,e),i.clearRect(0,0,p,g),i.dpr=e;var v={position:t.position,rotation:t.rotation,scale:t.scale};t.position=[h-r.x,d-r.y],t.rotation=0,t.scale=[1,1],t.updateTransform(),t&&t.brush(i);var m=Ii,y=new m({style:{x:0,y:0,image:n}});return null!=v.position&&(y.position=t.position=v.position),null!=v.rotation&&(y.rotation=t.rotation=v.rotation),null!=v.scale&&(y.scale=t.scale=v.scale),y}};var bg=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,Uf.call(this)};bg.prototype={constructor:bg,addClip:function(t){this._clips.push(t)},addAnimator:function(t){t.animation=this;for(var e=t.getClips(),n=0;n<e.length;n++)this.addClip(e[n])},removeClip:function(t){var e=u(this._clips,t);e>=0&&this._clips.splice(e,1)},removeAnimator:function(t){for(var e=t.getClips(),n=0;n<e.length;n++)this.removeClip(e[n]);t.animation=null},_update:function(){for(var t=(new Date).getTime()-this._pausedTime,e=t-this._time,n=this._clips,i=n.length,r=[],o=[],a=0;i>a;a++){var s=n[a],l=s.step(t,e);l&&(r.push(l),o.push(s))}for(var a=0;i>a;)n[a]._needsRemove?(n[a]=n[i-1],n.pop(),i--):a++;i=r.length;for(var a=0;i>a;a++)o[a].fire(r[a]);this._time=t,this.onframe(e),this.trigger("frame",e),this.stage.update&&this.stage.update()},_startLoop:function(){function t(){e._running&&(Jp(t),!e._paused&&e._update())}var e=this;this._running=!0,Jp(t)},start:function(){this._time=(new Date).getTime(),this._pausedTime=0,this._startLoop()},stop:function(){this._running=!1},pause:function(){this._paused||(this._pauseStart=(new Date).getTime(),this._paused=!0)},resume:function(){this._paused&&(this._pausedTime+=(new Date).getTime()-this._pauseStart,this._paused=!1)},clear:function(){this._clips=[]},isFinished:function(){return!this._clips.length},animate:function(t,e){e=e||{};var n=new Ip(t,e.loop,e.getter,e.setter);return this.addAnimator(n),n}},c(bg,Uf);var Sg=300,Mg=Mf.domSupported,Cg=function(){var t=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],e=["touchstart","touchend","touchmove"],n={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},i=p(t,function(t){var e=t.replace("mouse","pointer");return n.hasOwnProperty(e)?e:t});return{mouse:t,touch:e,pointer:i}}(),Tg={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},Ig=Hi.prototype;Ig.stopPropagation=Ig.stopImmediatePropagation=Ig.preventDefault=H;var kg={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]||Yi(this,!0),this.trigger("mousemove",t)},mouseup:function(t){t=be(this.dom,t),Yi(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=Fi(this,e),this.trigger("mouseout",t)},touchstart:function(t){t=be(this.dom,t),Ri(t),this._lastTouchMoment=new Date,this.handler.processGesture(t,"start"),kg.mousemove.call(this,t),kg.mousedown.call(this,t)},touchmove:function(t){t=be(this.dom,t),Ri(t),this.handler.processGesture(t,"change"),kg.mousemove.call(this,t)},touchend:function(t){t=be(this.dom,t),Ri(t),this.handler.processGesture(t,"end"),kg.mouseup.call(this,t),+new Date-this._lastTouchMoment<Sg&&kg.click.call(this,t)},pointerdown:function(t){kg.mousedown.call(this,t)},pointermove:function(t){Ei(t)||kg.mousemove.call(this,t)},pointerup:function(t){kg.mouseup.call(this,t)},pointerout:function(t){Ei(t)||kg.mouseout.call(this,t)}};f(["click","mousewheel","dblclick","contextmenu"],function(t){kg[t]=function(e){e=be(this.dom,e),this.trigger(t,e)}});var Dg={pointermove:function(t){Ei(t)||Dg.mousemove.call(this,t)},pointerup:function(t){Dg.mouseup.call(this,t)},mousemove:function(t){this.trigger("mousemove",t)},mouseup:function(t){var e=this._pointerCapturing;Yi(this,!1),this.trigger("mouseup",t),e&&(t.zrEventControl="only_globalout",this.trigger("mouseout",t))}},Ag=ji.prototype;Ag.dispose=function(){Xi(this._localHandlerScope),Mg&&Xi(this._globalHandlerScope)},Ag.setCursor=function(t){this.dom.style&&(this.dom.style.cursor=t||"default")},c(ji,Uf);var Pg=!Mf.canvasSupported,Og={canvas:wg},Lg={},Bg="4.3.0",Eg=function(t,e,n){n=n||{},this.dom=e,this.id=t;var i=this,r=new Vp,o=n.renderer;if(Pg){if(!Og.vml)throw new Error("You need to require 'zrender/vml/vml' to support IE8");o="vml"}else o&&Og[o]||(o="canvas");var a=new Og[o](e,r,n,t);this.storage=r,this.painter=a;var s=Mf.node||Mf.worker?null:new ji(a.getViewportRoot(),a.root);this.handler=new rp(r,a,s,a.root),this.animation=new bg({stage:{update:y(this.flush,this)}}),this.animation.start(),this._needsRefresh;var l=r.delFromStorage,u=r.addToStorage;r.delFromStorage=function(t){l.call(r,t),t&&t.removeSelfFromZr(i)},r.addToStorage=function(t){u.call(r,t),t.addSelfToZr(i)}};Eg.prototype={constructor:Eg,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 n=this.painter.addHover(t,e);return this.refreshHover(),n}},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)
  7. },setCursorStyle:function(t){this.handler.setCursorStyle(t)},findHover:function(t,e){return this.handler.findHover(t,e)},on:function(t,e,n){this.handler.on(t,e,n)},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,Qi(this.id)}};var zg=(Object.freeze||Object)({version:Bg,init:qi,dispose:Zi,getInstance:Ki,registerPainter:$i}),Rg=f,Ng=S,Fg=x,Hg="series\x00",Vg=["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"],Gg=0,Wg=".",Xg="___EC__COMPONENT__CONTAINER___",Yg=0,Ug=function(t){for(var e=0;e<t.length;e++)t[e][1]||(t[e][1]=t[e][0]);return function(e,n,i){for(var r={},o=0;o<t.length;o++){var a=t[o][1];if(!(n&&u(n,a)>=0||i&&u(i,a)<0)){var s=e.getShallow(a);null!=s&&(r[t[o][0]]=s)}}return r}},jg=Ug([["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),qg={getLineStyle:function(t){var e=jg(this,t);return e.lineDash=this.getLineDash(e.lineWidth),e},getLineDash:function(t){null==t&&(t=1);var e=this.get("type"),n=Math.max(t,2),i=4*t;return"solid"===e||null==e?!1:"dashed"===e?[i,i]:[n,n]}},Zg=Ug([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),Kg={getAreaStyle:function(t,e){return Zg(this,t,e)}},$g=Math.pow,Qg=Math.sqrt,Jg=1e-8,tv=1e-4,ev=Qg(3),nv=1/3,iv=V(),rv=V(),ov=V(),av=Math.min,sv=Math.max,lv=Math.sin,uv=Math.cos,hv=2*Math.PI,cv=V(),dv=V(),fv=V(),pv=[],gv=[],vv={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},mv=[],yv=[],_v=[],xv=[],wv=Math.min,bv=Math.max,Sv=Math.cos,Mv=Math.sin,Cv=Math.sqrt,Tv=Math.abs,Iv="undefined"!=typeof Float32Array,kv=function(t){this._saveData=!t,this._saveData&&(this.data=[]),this._ctx=null};kv.prototype={constructor:kv,_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,n){n=n||0,this._ux=Tv(n/Ap/t)||0,this._uy=Tv(n/Ap/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(vv.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},lineTo:function(t,e){var n=Tv(t-this._xi)>this._ux||Tv(e-this._yi)>this._uy||this._len<5;return this.addData(vv.L,t,e),this._ctx&&n&&(this._needsDash()?this._dashedLineTo(t,e):this._ctx.lineTo(t,e)),n&&(this._xi=t,this._yi=e),this},bezierCurveTo:function(t,e,n,i,r,o){return this.addData(vv.C,t,e,n,i,r,o),this._ctx&&(this._needsDash()?this._dashedBezierTo(t,e,n,i,r,o):this._ctx.bezierCurveTo(t,e,n,i,r,o)),this._xi=r,this._yi=o,this},quadraticCurveTo:function(t,e,n,i){return this.addData(vv.Q,t,e,n,i),this._ctx&&(this._needsDash()?this._dashedQuadraticTo(t,e,n,i):this._ctx.quadraticCurveTo(t,e,n,i)),this._xi=n,this._yi=i,this},arc:function(t,e,n,i,r,o){return this.addData(vv.A,t,e,n,n,i,r-i,0,o?0:1),this._ctx&&this._ctx.arc(t,e,n,i,r,o),this._xi=Sv(r)*n+t,this._yi=Mv(r)*n+e,this},arcTo:function(t,e,n,i,r){return this._ctx&&this._ctx.arcTo(t,e,n,i,r),this},rect:function(t,e,n,i){return this._ctx&&this._ctx.rect(t,e,n,i),this.addData(vv.R,t,e,n,i),this},closePath:function(){this.addData(vv.Z);var t=this._ctx,e=this._x0,n=this._y0;return t&&(this._needsDash()&&this._dashedLineTo(e,n),t.closePath()),this._xi=e,this._yi=n,this},fill:function(t){t&&t.fill(),this.toStatic()},stroke:function(t){t&&t.stroke(),this.toStatic()},setLineDash:function(t){if(t instanceof Array){this._lineDash=t,this._dashIdx=0;for(var e=0,n=0;n<t.length;n++)e+=t[n];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||!Iv||(this.data=new Float32Array(e));for(var n=0;e>n;n++)this.data[n]=t[n];this._len=e},appendPath:function(t){t instanceof Array||(t=[t]);for(var e=t.length,n=0,i=this._len,r=0;e>r;r++)n+=t[r].len();Iv&&this.data instanceof Float32Array&&(this.data=new Float32Array(i+n));for(var r=0;e>r;r++)for(var o=t[r].data,a=0;a<o.length;a++)this.data[i++]=o[a];this._len=i},addData:function(t){if(this._saveData){var e=this.data;this._len+arguments.length>e.length&&(this._expandData(),e=this.data);for(var n=0;n<arguments.length;n++)e[this._len++]=arguments[n];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 n,i,r=this._dashSum,o=this._dashOffset,a=this._lineDash,s=this._ctx,l=this._xi,u=this._yi,h=t-l,c=e-u,d=Cv(h*h+c*c),f=l,p=u,g=a.length;for(h/=d,c/=d,0>o&&(o=r+o),o%=r,f-=o*h,p-=o*c;h>0&&t>=f||0>h&&f>=t||0===h&&(c>0&&e>=p||0>c&&p>=e);)i=this._dashIdx,n=a[i],f+=h*n,p+=c*n,this._dashIdx=(i+1)%g,h>0&&l>f||0>h&&f>l||c>0&&u>p||0>c&&p>u||s[i%2?"moveTo":"lineTo"](h>=0?wv(f,t):bv(f,t),c>=0?wv(p,e):bv(p,e));h=f-t,c=p-e,this._dashOffset=-Cv(h*h+c*c)},_dashedBezierTo:function(t,e,n,i,r,o){var a,s,l,u,h,c=this._dashSum,d=this._dashOffset,f=this._lineDash,p=this._ctx,g=this._xi,v=this._yi,m=Sr,y=0,_=this._dashIdx,x=f.length,w=0;for(0>d&&(d=c+d),d%=c,a=0;1>a;a+=.1)s=m(g,t,n,r,a+.1)-m(g,t,n,r,a),l=m(v,e,i,o,a+.1)-m(v,e,i,o,a),y+=Cv(s*s+l*l);for(;x>_&&(w+=f[_],!(w>d));_++);for(a=(w-d)/y;1>=a;)u=m(g,t,n,r,a),h=m(v,e,i,o,a),_%2?p.moveTo(u,h):p.lineTo(u,h),a+=f[_]/y,_=(_+1)%x;_%2!==0&&p.lineTo(r,o),s=r-u,l=o-h,this._dashOffset=-Cv(s*s+l*l)},_dashedQuadraticTo:function(t,e,n,i){var r=n,o=i;n=(n+2*t)/3,i=(i+2*e)/3,t=(this._xi+2*t)/3,e=(this._yi+2*e)/3,this._dashedBezierTo(t,e,n,i,r,o)},toStatic:function(){var t=this.data;t instanceof Array&&(t.length=this._len,Iv&&(this.data=new Float32Array(t)))},getBoundingRect:function(){mv[0]=mv[1]=_v[0]=_v[1]=Number.MAX_VALUE,yv[0]=yv[1]=xv[0]=xv[1]=-Number.MAX_VALUE;for(var t=this.data,e=0,n=0,i=0,r=0,o=0;o<t.length;){var a=t[o++];switch(1===o&&(e=t[o],n=t[o+1],i=e,r=n),a){case vv.M:i=t[o++],r=t[o++],e=i,n=r,_v[0]=i,_v[1]=r,xv[0]=i,xv[1]=r;break;case vv.L:zr(e,n,t[o],t[o+1],_v,xv),e=t[o++],n=t[o++];break;case vv.C:Rr(e,n,t[o++],t[o++],t[o++],t[o++],t[o],t[o+1],_v,xv),e=t[o++],n=t[o++];break;case vv.Q:Nr(e,n,t[o++],t[o++],t[o],t[o+1],_v,xv),e=t[o++],n=t[o++];break;case vv.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&&(i=Sv(c)*u+s,r=Mv(c)*h+l),Fr(s,l,u,h,c,d,f,_v,xv),e=Sv(d)*u+s,n=Mv(d)*h+l;break;case vv.R:i=e=t[o++],r=n=t[o++];var p=t[o++],g=t[o++];zr(i,r,i+p,r+g,_v,xv);break;case vv.Z:e=i,n=r}ae(mv,mv,_v),se(yv,yv,xv)}return 0===o&&(mv[0]=mv[1]=yv[0]=yv[1]=0),new Tn(mv[0],mv[1],yv[0]-mv[0],yv[1]-mv[1])},rebuildPath:function(t){for(var e,n,i,r,o,a,s=this.data,l=this._ux,u=this._uy,h=this._len,c=0;h>c;){var d=s[c++];switch(1===c&&(i=s[c],r=s[c+1],e=i,n=r),d){case vv.M:e=i=s[c++],n=r=s[c++],t.moveTo(i,r);break;case vv.L:o=s[c++],a=s[c++],(Tv(o-i)>l||Tv(a-r)>u||c===h-1)&&(t.lineTo(o,a),i=o,r=a);break;case vv.C:t.bezierCurveTo(s[c++],s[c++],s[c++],s[c++],s[c++],s[c++]),i=s[c-2],r=s[c-1];break;case vv.Q:t.quadraticCurveTo(s[c++],s[c++],s[c++],s[c++]),i=s[c-2],r=s[c-1];break;case vv.A:var f=s[c++],p=s[c++],g=s[c++],v=s[c++],m=s[c++],y=s[c++],_=s[c++],x=s[c++],w=g>v?g:v,b=g>v?1:g/v,S=g>v?v/g:1,M=Math.abs(g-v)>.001,C=m+y;M?(t.translate(f,p),t.rotate(_),t.scale(b,S),t.arc(0,0,w,m,C,1-x),t.scale(1/b,1/S),t.rotate(-_),t.translate(-f,-p)):t.arc(f,p,w,m,C,1-x),1===c&&(e=Sv(m)*g+f,n=Mv(m)*v+p),i=Sv(C)*g+f,r=Mv(C)*v+p;break;case vv.R:e=i=s[c],n=r=s[c+1],t.rect(s[c++],s[c++],s[c++],s[c++]);break;case vv.Z:t.closePath(),i=e,r=n}}}},kv.CMD=vv;var Dv=2*Math.PI,Av=2*Math.PI,Pv=kv.CMD,Ov=2*Math.PI,Lv=1e-4,Bv=[-1,-1,-1],Ev=[-1,-1],zv=$p.prototype.getCanvasPattern,Rv=Math.abs,Nv=new kv(!0);to.prototype={constructor:to,type:"path",__dirtyPath:!0,strokeContainThreshold:5,segmentIgnoreThreshold:0,subPixelOptimize:!1,brush:function(t,e){var n=this.style,i=this.path||Nv,r=n.hasStroke(),o=n.hasFill(),a=n.fill,s=n.stroke,l=o&&!!a.colorStops,u=r&&!!s.colorStops,h=o&&!!a.image,c=r&&!!s.image;if(n.bind(t,this,e),this.setTransform(t),this.__dirty){var d;l&&(d=d||this.getBoundingRect(),this._fillGradient=n.getGradient(t,a,d)),u&&(d=d||this.getBoundingRect(),this._strokeGradient=n.getGradient(t,s,d))}l?t.fillStyle=this._fillGradient:h&&(t.fillStyle=zv.call(a,t)),u?t.strokeStyle=this._strokeGradient:c&&(t.strokeStyle=zv.call(s,t));var f=n.lineDash,p=n.lineDashOffset,g=!!t.setLineDash,v=this.getGlobalScale();if(i.setScale(v[0],v[1],this.segmentIgnoreThreshold),this.__dirtyPath||f&&!g&&r?(i.beginPath(t),f&&!g&&(i.setLineDash(f),i.setLineDashOffset(p)),this.buildPath(i,this.shape,!1),this.path&&(this.__dirtyPath=!1)):(t.beginPath(),this.path.rebuildPath(t)),o)if(null!=n.fillOpacity){var m=t.globalAlpha;t.globalAlpha=n.fillOpacity*n.opacity,i.fill(t),t.globalAlpha=m}else i.fill(t);if(f&&g&&(t.setLineDash(f),t.lineDashOffset=p),r)if(null!=n.strokeOpacity){var m=t.globalAlpha;t.globalAlpha=n.strokeOpacity*n.opacity,i.stroke(t),t.globalAlpha=m}else i.stroke(t);f&&g&&t.setLineDash([]),null!=n.text&&(this.restoreTransform(t),this.drawRectText(t,this.getBoundingRect()))},buildPath:function(){},createPathProxy:function(){this.path=new kv},getBoundingRect:function(){var t=this._rect,e=this.style,n=!t;if(n){var i=this.path;i||(i=this.path=new kv),this.__dirtyPath&&(i.beginPath(),this.buildPath(i,this.shape,!1)),t=i.getBoundingRect()}if(this._rect=t,e.hasStroke()){var r=this._rectWithStroke||(this._rectWithStroke=t.clone());if(this.__dirty||n){r.copy(t);var o=e.lineWidth,a=e.strokeNoScale?this.getLineScale():1;e.hasFill()||(o=Math.max(o,this.strokeContainThreshold||4)),a>1e-10&&(r.width+=o/a,r.height+=o/a,r.x-=o/a/2,r.y-=o/a/2)}return r}return t},contain:function(t,e){var n=this.transformCoordToLocal(t,e),i=this.getBoundingRect(),r=this.style;if(t=n[0],e=n[1],i.contain(t,e)){var o=this.path.data;if(r.hasStroke()){var a=r.lineWidth,s=r.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(r.hasFill()||(a=Math.max(a,this.strokeContainThreshold)),Jr(o,a/s,t,e)))return!0}if(r.hasFill())return Qr(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):Ti.prototype.attrKV.call(this,t,e)},setShape:function(t,e){var n=this.shape;if(n){if(S(t))for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);else n[t]=e;this.dirty(!0)}return this},getLineScale:function(){var t=this.transform;return t&&Rv(t[0]-1)>1e-10&&Rv(t[3]-1)>1e-10?Math.sqrt(Rv(t[0]*t[3]-t[2]*t[1])):1}},to.extend=function(t){var e=function(e){to.call(this,e),t.style&&this.style.extendFrom(t.style,!1);var n=t.shape;if(n){this.shape=this.shape||{};var i=this.shape;for(var r in n)!i.hasOwnProperty(r)&&n.hasOwnProperty(r)&&(i[r]=n[r])}t.init&&t.init.call(this,e)};h(e,to);for(var n in t)"style"!==n&&"shape"!==n&&(e.prototype[n]=t[n]);return e},h(to,Ti);var Fv=kv.CMD,Hv=[[],[],[]],Vv=Math.sqrt,Gv=Math.atan2,Wv=function(t,e){var n,i,r,o,a,s,l=t.data,u=Fv.M,h=Fv.C,c=Fv.L,d=Fv.R,f=Fv.A,p=Fv.Q;for(r=0,o=0;r<l.length;){switch(n=l[r++],o=r,i=0,n){case u:i=1;break;case c:i=1;break;case h:i=3;break;case p:i=2;break;case f:var g=e[4],v=e[5],m=Vv(e[0]*e[0]+e[1]*e[1]),y=Vv(e[2]*e[2]+e[3]*e[3]),_=Gv(-e[1]/y,e[0]/m);l[r]*=m,l[r++]+=g,l[r]*=y,l[r++]+=v,l[r++]*=m,l[r++]*=y,l[r++]+=_,l[r++]+=_,r+=2,o=r;break;case d:s[0]=l[r++],s[1]=l[r++],oe(s,s,e),l[o++]=s[0],l[o++]=s[1],s[0]+=l[r++],s[1]+=l[r++],oe(s,s,e),l[o++]=s[0],l[o++]=s[1]}for(a=0;i>a;a++){var s=Hv[a];s[0]=l[r++],s[1]=l[r++],oe(s,s,e),l[o++]=s[0],l[o++]=s[1]}}},Xv=Math.sqrt,Yv=Math.sin,Uv=Math.cos,jv=Math.PI,qv=function(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])},Zv=function(t,e){return(t[0]*e[0]+t[1]*e[1])/(qv(t)*qv(e))},Kv=function(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(Zv(t,e))},$v=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,Qv=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g,Jv=function(t){Ti.call(this,t)};Jv.prototype={constructor:Jv,type:"text",brush:function(t,e){var n=this.style;this.__dirty&&li(n,!0),n.fill=n.stroke=n.shadowBlur=n.shadowColor=n.shadowOffsetX=n.shadowOffsetY=null;var i=n.text;return null!=i&&(i+=""),Ci(i,n)?(this.setTransform(t),hi(this,t,i,n,null,e),void this.restoreTransform(t)):void(t.__attrCachedBy=Xp.NONE)},getBoundingRect:function(){var t=this.style;if(this.__dirty&&li(t,!0),!this._rect){var e=t.text;null!=e?e+="":e="";var n=Yn(t.text+"",t.font,t.textAlign,t.textVerticalAlign,t.textPadding,t.textLineHeight,t.rich);if(n.x+=t.x||0,n.y+=t.y||0,wi(t.textStroke,t.textStrokeWidth)){var i=t.textStrokeWidth;n.x-=i/2,n.y-=i/2,n.width+=i,n.height+=i}this._rect=n}return this._rect}},h(Jv,Ti);var tm=to.extend({type:"circle",shape:{cx:0,cy:0,r:0},buildPath:function(t,e,n){n&&t.moveTo(e.cx+e.r,e.cy),t.arc(e.cx,e.cy,e.r,0,2*Math.PI,!0)}}),em=[["shadowBlur",0],["shadowColor","#000"],["shadowOffsetX",0],["shadowOffsetY",0]],nm=function(t){return Mf.browser.ie&&Mf.browser.version>=11?function(){var e,n=this.__clipPaths,i=this.style;if(n)for(var r=0;r<n.length;r++){var o=n[r],a=o&&o.shape,s=o&&o.type;if(a&&("sector"===s&&a.startAngle===a.endAngle||"rect"===s&&(!a.width||!a.height))){for(var l=0;l<em.length;l++)em[l][2]=i[em[l][0]],i[em[l][0]]=em[l][1];e=!0;break}}if(t.apply(this,arguments),e)for(var l=0;l<em.length;l++)i[em[l][0]]=em[l][2]}:t},im=to.extend({type:"sector",shape:{cx:0,cy:0,r0:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},brush:nm(to.prototype.brush),buildPath:function(t,e){var n=e.cx,i=e.cy,r=Math.max(e.r0||0,0),o=Math.max(e.r,0),a=e.startAngle,s=e.endAngle,l=e.clockwise,u=Math.cos(a),h=Math.sin(a);t.moveTo(u*r+n,h*r+i),t.lineTo(u*o+n,h*o+i),t.arc(n,i,o,a,s,!l),t.lineTo(Math.cos(s)*r+n,Math.sin(s)*r+i),0!==r&&t.arc(n,i,r,s,a,l),t.closePath()}}),rm=to.extend({type:"ring",shape:{cx:0,cy:0,r:0,r0:0},buildPath:function(t,e){var n=e.cx,i=e.cy,r=2*Math.PI;t.moveTo(n+e.r,i),t.arc(n,i,e.r,0,r,!1),t.moveTo(n+e.r0,i),t.arc(n,i,e.r0,0,r,!0)}}),om=function(t,e){for(var n=t.length,i=[],r=0,o=1;n>o;o++)r+=ee(t[o-1],t[o]);var a=r/2;a=n>a?n:a;for(var o=0;a>o;o++){var s,l,u,h=o/(a-1)*(e?n:n-1),c=Math.floor(h),d=h-c,f=t[c%n];e?(s=t[(c-1+n)%n],l=t[(c+1)%n],u=t[(c+2)%n]):(s=t[0===c?c:c-1],l=t[c>n-2?n-1:c+1],u=t[c>n-3?n-1:c+2]);var p=d*d,g=d*p;i.push([so(s[0],f[0],l[0],u[0],d,p,g),so(s[1],f[1],l[1],u[1],d,p,g)])}return i},am=function(t,e,n,i){var r,o,a,s,l=[],u=[],h=[],c=[];if(i){a=[1/0,1/0],s=[-1/0,-1/0];for(var d=0,f=t.length;f>d;d++)ae(a,a,t[d]),se(s,s,t[d]);ae(a,a,i[0]),se(s,s,i[1])}for(var d=0,f=t.length;f>d;d++){var p=t[d];if(n)r=t[d?d-1:f-1],o=t[(d+1)%f];else{if(0===d||d===f-1){l.push(W(t[d]));continue}r=t[d-1],o=t[d+1]}j(u,o,r),J(u,u,e);var g=ee(p,r),v=ee(p,o),m=g+v;0!==m&&(g/=m,v/=m),J(h,u,-g),J(c,u,v);var y=Y([],p,h),_=Y([],p,c);i&&(se(y,y,a),ae(y,y,s),se(_,_,a),ae(_,_,s)),l.push(y),l.push(_)}return n&&l.push(l.shift()),l},sm=to.extend({type:"polygon",shape:{points:null,smooth:!1,smoothConstraint:null},buildPath:function(t,e){lo(t,e,!0)}}),lm=to.extend({type:"polyline",shape:{points:null,smooth:!1,smoothConstraint:null},style:{stroke:"#000",fill:null},buildPath:function(t,e){lo(t,e,!1)}}),um=Math.round,hm={},cm=to.extend({type:"rect",shape:{r:0,x:0,y:0,width:0,height:0},buildPath:function(t,e){var n,i,r,o;this.subPixelOptimize?(ho(hm,e,this.style),n=hm.x,i=hm.y,r=hm.width,o=hm.height,hm.r=e.r,e=hm):(n=e.x,i=e.y,r=e.width,o=e.height),e.r?si(t,e):t.rect(n,i,r,o),t.closePath()}}),dm={},fm=to.extend({type:"line",shape:{x1:0,y1:0,x2:0,y2:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(t,e){var n,i,r,o;this.subPixelOptimize?(uo(dm,e,this.style),n=dm.x1,i=dm.y1,r=dm.x2,o=dm.y2):(n=e.x1,i=e.y1,r=e.x2,o=e.y2);var a=e.percent;0!==a&&(t.moveTo(n,i),1>a&&(r=n*(1-a)+r*a,o=i*(1-a)+o*a),t.lineTo(r,o))},pointAt:function(t){var e=this.shape;return[e.x1*(1-t)+e.x2*t,e.y1*(1-t)+e.y2*t]}}),pm=[],gm=to.extend({type:"bezier-curve",shape:{x1:0,y1:0,x2:0,y2:0,cpx1:0,cpy1:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(t,e){var n=e.x1,i=e.y1,r=e.x2,o=e.y2,a=e.cpx1,s=e.cpy1,l=e.cpx2,u=e.cpy2,h=e.percent;0!==h&&(t.moveTo(n,i),null==l||null==u?(1>h&&(Lr(n,a,r,h,pm),a=pm[1],r=pm[2],Lr(i,s,o,h,pm),s=pm[1],o=pm[2]),t.quadraticCurveTo(a,s,r,o)):(1>h&&(Ir(n,a,l,r,h,pm),a=pm[1],l=pm[2],r=pm[3],Ir(i,s,u,o,h,pm),s=pm[1],u=pm[2],o=pm[3]),t.bezierCurveTo(a,s,l,u,r,o)))},pointAt:function(t){return fo(this.shape,t,!1)},tangentAt:function(t){var e=fo(this.shape,t,!0);return te(e,e)}}),vm=to.extend({type:"arc",shape:{cx:0,cy:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},style:{stroke:"#000",fill:null},buildPath:function(t,e){var n=e.cx,i=e.cy,r=Math.max(e.r,0),o=e.startAngle,a=e.endAngle,s=e.clockwise,l=Math.cos(o),u=Math.sin(o);t.moveTo(l*r+n,u*r+i),t.arc(n,i,r,o,a,!s)}}),mm=to.extend({type:"compound",shape:{paths:null},_updatePathDirty:function(){for(var t=this.__dirtyPath,e=this.shape.paths,n=0;n<e.length;n++)t=t||e[n].__dirtyPath;this.__dirtyPath=t,this.__dirty=this.__dirty||t},beforeBrush:function(){this._updatePathDirty();for(var t=this.shape.paths||[],e=this.getGlobalScale(),n=0;n<t.length;n++)t[n].path||t[n].createPathProxy(),t[n].path.setScale(e[0],e[1],t[n].segmentIgnoreThreshold)},buildPath:function(t,e){for(var n=e.paths||[],i=0;i<n.length;i++)n[i].buildPath(t,n[i].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(),to.prototype.getBoundingRect.call(this)}}),ym=function(t){this.colorStops=t||[]};ym.prototype={constructor:ym,addColorStop:function(t,e){this.colorStops.push({offset:t,color:e})}};var _m=function(t,e,n,i,r,o){this.x=null==t?0:t,this.y=null==e?0:e,this.x2=null==n?1:n,this.y2=null==i?0:i,this.type="linear",this.global=o||!1,ym.call(this,r)};_m.prototype={constructor:_m},h(_m,ym);var xm=function(t,e,n,i,r){this.x=null==t?.5:t,this.y=null==e?.5:e,this.r=null==n?.5:n,this.type="radial",this.global=r||!1,ym.call(this,i)};xm.prototype={constructor:xm},h(xm,ym),po.prototype.incremental=!0,po.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.dirty(),this.notClear=!1},po.prototype.addDisplayable=function(t,e){e?this._temporaryDisplayables.push(t):this._displayables.push(t),this.dirty()},po.prototype.addDisplayables=function(t,e){e=e||!1;for(var n=0;n<t.length;n++)this.addDisplayable(t[n],e)},po.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])},po.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}},po.prototype.brush=function(t){for(var e=this._cursor;e<this._displayables.length;e++){var n=this._displayables[e];n.beforeBrush&&n.beforeBrush(t),n.brush(t,e===this._cursor?null:this._displayables[e-1]),n.afterBrush&&n.afterBrush(t)}this._cursor=e;for(var e=0;e<this._temporaryDisplayables.length;e++){var n=this._temporaryDisplayables[e];n.beforeBrush&&n.beforeBrush(t),n.brush(t,0===e?null:this._temporaryDisplayables[e-1]),n.afterBrush&&n.afterBrush(t)}this._temporaryDisplayables=[],this.notClear=!0};var wm=[];po.prototype.getBoundingRect=function(){if(!this._rect){for(var t=new Tn(1/0,1/0,-1/0,-1/0),e=0;e<this._displayables.length;e++){var n=this._displayables[e],i=n.getBoundingRect().clone();n.needLocalTransform()&&i.applyTransform(n.getLocalTransform(wm)),t.union(i)}this._rect=t}return this._rect},po.prototype.contain=function(t,e){var n=this.transformCoordToLocal(t,e),i=this.getBoundingRect();if(i.contain(n[0],n[1]))for(var r=0;r<this._displayables.length;r++){var o=this._displayables[r];if(o.contain(t,e))return!0}return!1},h(po,Ti);var bm=Math.max,Sm=Math.min,Mm={},Cm=1,Tm={color:"textFill",textBorderColor:"textStroke",textBorderWidth:"textStrokeWidth"},Im="emphasis",km="normal",Dm=1,Am={},Pm={},Om=ao,Lm=co,Bm=N(),Em=0;mo("circle",tm),mo("sector",im),mo("ring",rm),mo("polygon",sm),mo("polyline",lm),mo("rect",cm),mo("line",fm),mo("bezierCurve",gm),mo("arc",vm);var zm=(Object.freeze||Object)({Z2_EMPHASIS_LIFT:Cm,CACHED_LABEL_STYLE_PROPERTIES:Tm,extendShape:go,extendPath:vo,registerShape:mo,getShapeClass:yo,makePath:_o,makeImage:xo,mergePath:Om,resizePath:bo,subPixelOptimizeLine:So,subPixelOptimizeRect:Mo,subPixelOptimize:Lm,setElementHoverStyle:Oo,setHoverStyle:No,setAsHighDownDispatcher:Fo,isHighDownDispatcher:Ho,getHighlightDigit:Vo,setLabelStyle:Go,modifyLabelStyle:Wo,setTextStyle:Xo,setText:Yo,getFont:Qo,updateProps:ta,initProps:ea,getTransform:na,applyTransform:ia,transformDirection:ra,groupTransition:oa,clipPointsByRect:aa,clipRectByRect:sa,createIcon:la,linePolygonIntersect:ua,lineLineIntersect:ha,Group:Np,Image:Ii,Text:Jv,Circle:tm,Sector:im,Ring:rm,Polygon:sm,Polyline:lm,Rect:cm,Line:fm,BezierCurve:gm,Arc:vm,IncrementalDisplayable:po,CompoundPath:mm,LinearGradient:_m,RadialGradient:xm,BoundingRect:Tn}),Rm=["textStyle","color"],Nm={getTextColor:function(t){var e=this.ecModel;return this.getShallow("color")||(!t&&e?e.get(Rm):null)},getFont:function(){return Qo({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},getTextRect:function(t){return Yn(t,this.getFont(),this.getShallow("align"),this.getShallow("verticalAlign")||this.getShallow("baseline"),this.getShallow("padding"),this.getShallow("lineHeight"),this.getShallow("rich"),this.getShallow("truncateText"))}},Fm=Ug([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["textPosition"],["textAlign"]]),Hm={getItemStyle:function(t,e){var n=Fm(this,t,e),i=this.getBorderLineDash();return i&&(n.lineDash=i),n},getBorderLineDash:function(){var t=this.get("borderType");return"solid"===t||null==t?null:"dashed"===t?[5,5]:[1,1]}},Vm=c,Gm=lr();fa.prototype={constructor:fa,init:null,mergeOption:function(t){r(this.option,t,!0)},get:function(t,e){return null==t?this.option:pa(this.option,this.parsePath(t),!e&&ga(this,t))},getShallow:function(t,e){var n=this.option,i=null==n?n:n[t],r=!e&&ga(this,t);return null==i&&r&&(i=r.getShallow(t)),i},getModel:function(t,e){var n,i=null==t?this.option:pa(this.option,t=this.parsePath(t));return e=e||(n=ga(this,t))&&n.getModel(t),new fa(i,e,this.ecModel)},isEmpty:function(){return null==this.option},restoreData:function(){},clone:function(){var t=this.constructor;return new t(i(this.option))},setReadOnly:function(){},parsePath:function(t){return"string"==typeof t&&(t=t.split(".")),t},customizeGetParent:function(t){Gm(this).getParent=t},isAnimationEnabled:function(){if(!Mf.node){if(null!=this.option.animation)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}}},vr(fa),mr(fa),Vm(fa,qg),Vm(fa,Kg),Vm(fa,Nm),Vm(fa,Hm);var Wm=0,Xm=1e-4,Ym=9007199254740991,Um=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d\d)(?::(\d\d)(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/,jm=(Object.freeze||Object)({linearMap:xa,parsePercent:wa,round:ba,asc:Sa,getPrecision:Ma,getPrecisionSafe:Ca,getPixelPrecision:Ta,getPercentWithPrecision:Ia,MAX_SAFE_INTEGER:Ym,remRadian:ka,isRadianAroundZero:Da,parseDate:Aa,quantity:Pa,quantityExponent:Oa,nice:La,quantile:Ba,reformIntervals:Ea,isNumeric:za}),qm=O,Zm=/([&<>"'])/g,Km={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},$m=["a","b","c","d","e","f","g"],Qm=function(t,e){return"{"+t+(null==e?"":e)+"}"},Jm=$n,ty=(Object.freeze||Object)({addCommas:Ra,toCamelCase:Na,normalizeCssArray:qm,encodeHTML:Fa,formatTpl:Ha,formatTplSimple:Va,getTooltipMarker:Ga,formatTime:Xa,capitalFirst:Ya,truncateText:Jm,getTextBoundingRect:Ua,getTextRect:ja}),ey=f,ny=["left","right","top","bottom","width","height"],iy=[["width","left","right"],["height","top","bottom"]],ry=qa,oy=(_(qa,"vertical"),_(qa,"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")}}}),ay=lr(),sy=fa.extend({type:"component",id:"",name:"",mainType:"",subType:"",componentIndex:0,defaultOption:null,ecModel:null,dependentModels:[],uid:null,layoutMode:null,$constructor:function(t,e,n,i){fa.call(this,t,e,n,i),this.uid=va("ec_cpt_model")},init:function(t,e,n){this.mergeDefaultAndTheme(t,n)},mergeDefaultAndTheme:function(t,e){var n=this.layoutMode,i=n?$a(t):{},o=e.getTheme();r(t,o.get(this.mainType)),r(t,this.getDefaultOption()),n&&Ka(t,i,n)},mergeOption:function(t){r(this.option,t,!0);var e=this.layoutMode;e&&Ka(this.option,t,e)},optionUpdated:function(){},getDefaultOption:function(){var t=ay(this);if(!t.defaultOption){for(var e=[],n=this.constructor;n;){var i=n.prototype.defaultOption;i&&e.push(i),n=n.superClass}for(var o={},a=e.length-1;a>=0;a--)o=r(o,e[a],!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)})}});xr(sy,{registerWhenExtend:!0}),ma(sy),ya(sy,Ja),c(sy,oy);var ly="";"undefined"!=typeof navigator&&(ly=navigator.platform||"");var uy={color:["#c23531","#2f4554","#61a0a8","#d48265","#91c7ae","#749f83","#ca8622","#bda29a","#6e7074","#546570","#c4ccd3"],gradientColor:["#f6efa6","#d88273","#bf444c"],textStyle:{fontFamily:ly.match(/^Win/)?"Microsoft sans-serif":"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},hy=lr(),cy={clearColorPalette:function(){hy(this).colorIdx=0,hy(this).colorNameMap={}},getColorFromPalette:function(t,e,n){e=e||this;var i=hy(e),r=i.colorIdx||0,o=i.colorNameMap=i.colorNameMap||{};if(o.hasOwnProperty(t))return o[t];var a=Ji(this.get("color",!0)),s=this.get("colorLayer",!0),l=null!=n&&s?ts(s,n):a;if(l=l||a,l&&l.length){var u=l[r];return t&&(o[t]=u),i.colorIdx=(r+1)%l.length,u}}},dy="original",fy="arrayRows",py="objectRows",gy="keyedColumns",vy="unknown",my="typedArray",yy="column",_y="row";es.seriesDataToSource=function(t){return new es({data:t,sourceFormat:C(t)?my:dy,fromDataset:!1})},mr(es);var xy={Must:1,Might:2,Not:3},wy=lr(),by="\x00_ec_inner",Sy=fa.extend({init:function(t,e,n,i){n=n||{},this.option=null,this._theme=new fa(n),this._optionManager=i},setOption:function(t,e){L(!(by in t),"please use chart.getOption()"),this._optionManager.setOption(t,e),this.resetOption(null)},resetOption:function(t){var e=!1,n=this._optionManager;if(!t||"recreate"===t){var i=n.mountOption("recreate"===t);this.option&&"recreate"!==t?(this.restoreData(),this.mergeOption(i)):vs.call(this,i),e=!0}if(("timeline"===t||"media"===t)&&this.restoreData(),!t||"recreate"===t||"timeline"===t){var r=n.getTimelineOption(this);r&&(this.mergeOption(r),e=!0)}if(!t||"recreate"===t||"media"===t){var o=n.getMediaOption(this,this._api);o.length&&f(o,function(t){this.mergeOption(t,e=!0)},this)}return e},mergeOption:function(t){function e(e,i){var r=Ji(t[e]),s=ir(o.get(e),r);rr(s),f(s,function(t){var n=t.option;S(n)&&(t.keyInfo.mainType=e,t.keyInfo.subType=ys(e,n,t.exist))});var l=ms(o,i);n[e]=[],o.set(e,[]),f(s,function(t,i){var r=t.exist,s=t.option;if(L(S(s)||r,"Empty component definition"),s){var u=sy.getClass(e,t.keyInfo.subType,!0);if(r&&r.constructor===u)r.name=t.keyInfo.name,r.mergeOption(s,this),r.optionUpdated(s,!1);else{var h=a({dependentModels:l,componentIndex:i},t.keyInfo);r=new u(s,this,this,h),a(r,h),r.init(s,this,this,h),r.optionUpdated(null,!0)}}else r.mergeOption({},this),r.optionUpdated({},!1);o.get(e)[i]=r,n[e][i]=r.option},this),"series"===e&&_s(this,o.get("series"))}var n=this.option,o=this._componentsMap,s=[];rs(this),f(t,function(t,e){null!=t&&(sy.hasClass(e)?e&&s.push(e):n[e]=null==n[e]?i(t):r(n[e],t,!0))}),sy.topologicalTravel(s,sy.getAllClassMainTypes(),e,this),this._seriesIndicesMap=N(this._seriesIndices=this._seriesIndices||[])},getOption:function(){var t=i(this.option);return f(t,function(e,n){if(sy.hasClass(n)){for(var e=Ji(e),i=e.length-1;i>=0;i--)ar(e[i])&&e.splice(i,1);t[n]=e}}),delete t[by],t},getTheme:function(){return this._theme},getComponent:function(t,e){var n=this._componentsMap.get(t);return n?n[e||0]:void 0},queryComponents:function(t){var e=t.mainType;if(!e)return[];var n=t.index,i=t.id,r=t.name,o=this._componentsMap.get(e);if(!o||!o.length)return[];var a;if(null!=n)x(n)||(n=[n]),a=v(p(n,function(t){return o[t]}),function(t){return!!t});else if(null!=i){var s=x(i);a=v(o,function(t){return s&&u(i,t.id)>=0||!s&&t.id===i})}else if(null!=r){var l=x(r);a=v(o,function(t){return l&&u(r,t.name)>=0||!l&&t.name===r})}else a=o.slice();return xs(a,t)},findComponents:function(t){function e(t){var e=r+"Index",n=r+"Id",i=r+"Name";return!t||null==t[e]&&null==t[n]&&null==t[i]?null:{mainType:r,index:t[e],id:t[n],name:t[i]}}function n(e){return t.filter?v(e,t.filter):e}var i=t.query,r=t.mainType,o=e(i),a=o?this.queryComponents(o):this._componentsMap.get(r);return n(xs(a,t))},eachComponent:function(t,e,n){var i=this._componentsMap;if("function"==typeof t)n=e,e=t,i.each(function(t,i){f(t,function(t,r){e.call(n,i,t,r)})});else if(b(t))f(i.get(t),e,n);else if(S(t)){var r=this.findComponents(t);f(r,e,n)}},getSeriesByName:function(t){var e=this._componentsMap.get("series");return v(e,function(e){return e.name===t})},getSeriesByIndex:function(t){return this._componentsMap.get("series")[t]},getSeriesByType:function(t){var e=this._componentsMap.get("series");return v(e,function(e){return e.subType===t})},getSeries:function(){return this._componentsMap.get("series").slice()},getSeriesCount:function(){return this._componentsMap.get("series").length},eachSeries:function(t,e){f(this._seriesIndices,function(n){var i=this._componentsMap.get("series")[n];t.call(e,i,n)},this)},eachRawSeries:function(t,e){f(this._componentsMap.get("series"),t,e)},eachSeriesByType:function(t,e,n){f(this._seriesIndices,function(i){var r=this._componentsMap.get("series")[i];r.subType===t&&e.call(n,r,i)},this)},eachRawSeriesByType:function(t,e,n){return f(this.getSeriesByType(t),e,n)},isSeriesFiltered:function(t){return null==this._seriesIndicesMap.get(t.componentIndex)},getCurrentSeriesIndices:function(){return(this._seriesIndices||[]).slice()},filterSeries:function(t,e){var n=v(this._componentsMap.get("series"),t,e);_s(this,n)},restoreData:function(t){var e=this._componentsMap;_s(this,e.get("series"));var n=[];e.each(function(t,e){n.push(e)}),sy.topologicalTravel(n,sy.getAllClassMainTypes(),function(n){f(e.get(n),function(e){("series"!==n||!ps(e,t))&&e.restoreData()})})}});c(Sy,cy);var My=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isDisposed","on","off","getDataURL","getConnectedDataURL","getModel","getOption","getViewOfComponentModel","getViewOfSeriesModel"],Cy={};bs.prototype={constructor:bs,create:function(t,e){var n=[];f(Cy,function(i){var r=i.create(t,e);
  8. n=n.concat(r||[])}),this._coordinateSystems=n},update:function(t,e){f(this._coordinateSystems,function(n){n.update&&n.update(t,e)})},getCoordinateSystems:function(){return this._coordinateSystems.slice()}},bs.register=function(t,e){Cy[t]=e},bs.get=function(t){return Cy[t]};var Ty=f,Iy=i,ky=p,Dy=r,Ay=/^(min|max)?(.+)$/;Ss.prototype={constructor:Ss,setOption:function(t,e){t&&f(Ji(t.series),function(t){t&&t.data&&C(t.data)&&E(t.data)}),t=Iy(t);var n=this._optionBackup,i=Ms.call(this,t,e,!n);this._newBaseOption=i.baseOption,n?(ks(n.baseOption,i.baseOption),i.timelineOptions.length&&(n.timelineOptions=i.timelineOptions),i.mediaList.length&&(n.mediaList=i.mediaList),i.mediaDefault&&(n.mediaDefault=i.mediaDefault)):this._optionBackup=i},mountOption:function(t){var e=this._optionBackup;return this._timelineOptions=ky(e.timelineOptions,Iy),this._mediaList=ky(e.mediaList,Iy),this._mediaDefault=Iy(e.mediaDefault),this._currentMediaIndices=[],Iy(t?e.baseOption:this._newBaseOption)},getTimelineOption:function(t){var e,n=this._timelineOptions;if(n.length){var i=t.getComponent("timeline");i&&(e=Iy(n[i.getCurrentIndex()],!0))}return e},getMediaOption:function(){var t=this._api.getWidth(),e=this._api.getHeight(),n=this._mediaList,i=this._mediaDefault,r=[],o=[];if(!n.length&&!i)return o;for(var a=0,s=n.length;s>a;a++)Cs(n[a].query,t,e)&&r.push(a);return!r.length&&i&&(r=[-1]),r.length&&!Is(r,this._currentMediaIndices)&&(o=ky(r,function(t){return Iy(-1===t?i.option:n[t].option)})),this._currentMediaIndices=r,o}};var Py=f,Oy=S,Ly=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"],By=function(t,e){Py(Es(t.series),function(t){Oy(t)&&Bs(t)});var n=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];e&&n.push("valueAxis","categoryAxis","logAxis","timeAxis"),Py(n,function(e){Py(Es(t[e]),function(t){t&&(Os(t,"axisLabel"),Os(t.axisPointer,"label"))})}),Py(Es(t.parallel),function(t){var e=t&&t.parallelAxisDefault;Os(e,"axisLabel"),Os(e&&e.axisPointer,"label")}),Py(Es(t.calendar),function(t){As(t,"itemStyle"),Os(t,"dayLabel"),Os(t,"monthLabel"),Os(t,"yearLabel")}),Py(Es(t.radar),function(t){Os(t,"name")}),Py(Es(t.geo),function(t){Oy(t)&&(Ls(t),Py(Es(t.regions),function(t){Ls(t)}))}),Py(Es(t.timeline),function(t){Ls(t),As(t,"label"),As(t,"itemStyle"),As(t,"controlStyle",!0);var e=t.data;x(e)&&f(e,function(t){S(t)&&(As(t,"label"),As(t,"itemStyle"))})}),Py(Es(t.toolbox),function(t){As(t,"iconStyle"),Py(t.feature,function(t){As(t,"iconStyle")})}),Os(zs(t.axisPointer),"label"),Os(zs(t.tooltip).axisPointer,"label")},Ey=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],zy=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],Ry=function(t,e){By(t,e),t.series=Ji(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 n=Rs(t,"pointer.color");null!=n&&Ns(t,"itemStyle.color",n)}Fs(t)}}),t.dataRange&&(t.visualMap=t.dataRange),f(zy,function(e){var n=t[e];n&&(x(n)||(n=[n]),f(n,function(t){Fs(t)}))})},Ny=function(t){var e=N();t.eachSeries(function(t){var n=t.get("stack");if(n){var i=e.get(n)||e.set(n,[]),r=t.getData(),o={stackResultDimension:r.getCalculationInfo("stackResultDimension"),stackedOverDimension:r.getCalculationInfo("stackedOverDimension"),stackedDimension:r.getCalculationInfo("stackedDimension"),stackedByDimension:r.getCalculationInfo("stackedByDimension"),isStackedByIndex:r.getCalculationInfo("isStackedByIndex"),data:r,seriesModel:t};if(!o.stackedDimension||!o.isStackedByIndex&&!o.stackedByDimension)return;i.length&&r.setCalculationInfo("stackedOnSeries",i[i.length-1].seriesModel),i.push(o)}}),e.each(Hs)},Fy=Vs.prototype;Fy.pure=!1,Fy.persistent=!0,Fy.getSource=function(){return this._source};var Hy={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:Xs},arrayRows_row:{pure:!0,count:function(){var t=this._data[0];return t?Math.max(0,t.length-this._source.startIndex):0},getItem:function(t){t+=this._source.startIndex;for(var e=[],n=this._data,i=0;i<n.length;i++){var r=n[i];e.push(r?r[t]:null)}return e},appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},objectRows:{pure:!0,count:Gs,getItem:Ws,appendData:Xs},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=[],n=this._source.dimensionsDefine,i=0;i<n.length;i++){var r=this._data[n[i].name];e.push(r?r[t]:null)}return e},appendData:function(t){var e=this._data;f(t,function(t,n){for(var i=e[n]||(e[n]=[]),r=0;r<(t||[]).length;r++)i.push(t[r])})}},original:{count:Gs,getItem:Ws,appendData:Xs},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 n=this._dimSize*t,i=0;i<this._dimSize;i++)e[i]=this._data[n+i];return e},appendData:function(t){this._data=t},clean:function(){this._offset+=this.count(),this._data=null}}},Vy={arrayRows:Ys,objectRows:function(t,e,n,i){return null!=n?t[i]:t},keyedColumns:Ys,original:function(t,e,n){var i=er(t);return null!=n&&i instanceof Array?i[n]:i},typedArray:Ys},Gy={arrayRows:Us,objectRows:function(t,e){return js(t[e],this._dimensionInfos[e])},keyedColumns:Us,original:function(t,e,n,i){var r=t&&(null==t.value?t:t.value);return!this._rawData.pure&&nr(t)&&(this.hasItemOption=!0),js(r instanceof Array?r[i]:r,this._dimensionInfos[e])},typedArray:function(t,e,n,i){return t[i]}},Wy=/\{@(.+?)\}/g,Xy={getDataParams:function(t,e){var n=this.getData(e),i=this.getRawValue(t,e),r=n.getRawIndex(t),o=n.getName(t),a=n.getRawDataItem(t),s=n.getItemVisual(t,"color"),l=n.getItemVisual(t,"borderColor"),u=this.ecModel.getComponent("tooltip"),h=u&&u.get("renderMode"),c=fr(h),d=this.mainType,f="series"===d,p=n.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:r,data:a,dataType:e,value:i,color:s,borderColor:l,dimensionNames:p?p.dimensionNames:null,encode:p?p.encode:null,marker:Ga({color:s,renderMode:c}),$vars:["seriesName","name","value"]}},getFormattedLabel:function(t,e,n,i,r){e=e||"normal";var o=this.getData(n),a=o.getItemModel(t),s=this.getDataParams(t,n);null!=i&&s.value instanceof Array&&(s.value=s.value[i]);var l=a.get("normal"===e?[r||"label","formatter"]:[e,r||"label","formatter"]);if("function"==typeof l)return s.status=e,s.dimensionIndex=i,l(s);if("string"==typeof l){var u=Ha(l,s);return u.replace(Wy,function(e,n){var i=n.length;return"["===n.charAt(0)&&"]"===n.charAt(i-1)&&(n=+n.slice(1,i-1)),qs(o,t,n)})}},getRawValue:function(t,e){return qs(this.getData(e),t)},formatTooltip:function(){}},Yy=Ks.prototype;Yy.perform=function(t){function e(t){return!(t>=1)&&(t=1),t}var n=this._upstream,i=t&&t.skip;if(this._dirty&&n){var r=this.context;r.data=r.outputData=n.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var o;this._plan&&!i&&(o=this._plan(this.context));var a=e(this._modBy),s=this._modDataCount||0,l=e(t&&t.modBy),u=t&&t.modDataCount||0;(a!==l||s!==u)&&(o="reset");var h;(this._dirty||"reset"===o)&&(this._dirty=!1,h=Qs(this,i)),this._modBy=l,this._modDataCount=u;var c=t&&t.step;if(this._dueEnd=n?n._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var d=this._dueIndex,f=Math.min(null!=c?this._dueIndex+c:1/0,this._dueEnd);if(!i&&(h||f>d)){var p=this._progress;if(x(p))for(var g=0;g<p.length;g++)$s(this,p[g],d,f,l,u);else $s(this,p,d,f,l,u)}this._dueIndex=f;var v=null!=this._settedOutputEnd?this._settedOutputEnd:f;this._outputDueEnd=v}else this._dueIndex=this._outputDueEnd=null!=this._settedOutputEnd?this._settedOutputEnd:this._dueEnd;return this.unfinished()};var Uy=function(){function t(){return n>i?i++:null}function e(){var t=i%a*r+Math.ceil(i/a),e=i>=n?null:o>t?t:i;return i++,e}var n,i,r,o,a,s={reset:function(l,u,h,c){i=l,n=u,r=h,o=c,a=Math.ceil(o/r),s.next=r>1&&o>0?e:t}};return s}();Yy.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},Yy.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},Yy.pipe=function(t){(this._downstream!==t||this._dirty)&&(this._downstream=t,t._upstream=this,t.dirty())},Yy.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},Yy.getUpstream=function(){return this._upstream},Yy.getDownstream=function(){return this._downstream},Yy.setOutputEnd=function(t){this._outputDueEnd=this._settedOutputEnd=t};var jy=lr(),qy=sy.extend({type:"series.__base__",seriesIndex:0,coordinateSystem:null,defaultOption:null,legendVisualProvider:null,visualColorAccessPath:"itemStyle.color",visualBorderColorAccessPath:"itemStyle.borderColor",layoutMode:null,init:function(t,e,n){this.seriesIndex=this.componentIndex,this.dataTask=Zs({count:el,reset:nl}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,n),os(this);var i=this.getInitialData(t,n);rl(i,this),this.dataTask.context.data=i,jy(this).dataBeforeProcessed=i,Js(this)},mergeDefaultAndTheme:function(t,e){var n=this.layoutMode,i=n?$a(t):{},o=this.subType;sy.hasClass(o)&&(o+="Series"),r(t,e.getTheme().get(this.subType)),r(t,this.getDefaultOption()),tr(t,"label",["show"]),this.fillDataTextStyle(t.data),n&&Ka(t,i,n)},mergeOption:function(t,e){t=r(this.option,t,!0),this.fillDataTextStyle(t.data);var n=this.layoutMode;n&&Ka(this.option,t,n),os(this);var i=this.getInitialData(t,e);rl(i,this),this.dataTask.dirty(),this.dataTask.context.data=i,jy(this).dataBeforeProcessed=i,Js(this)},fillDataTextStyle:function(t){if(t&&!C(t))for(var e=["show"],n=0;n<t.length;n++)t[n]&&t[n].label&&tr(t[n],"label",e)},getInitialData:function(){},appendData:function(t){var e=this.getRawData();e.appendData(t.data)},getData:function(t){var e=al(this);if(e){var n=e.context.data;return null==t?n:n.getLinkedData(t)}return jy(this).data},setData:function(t){var e=al(this);if(e){var n=e.context;n.data!==t&&e.modifyOutputEnd&&e.setOutputEnd(t.count()),n.outputData=t,e!==this.dataTask&&(n.data=t)}jy(this).data=t},getSource:function(){return is(this)},getRawData:function(){return jy(this).dataBeforeProcessed},getBaseAxis:function(){var t=this.coordinateSystem;return t&&t.getBaseAxis&&t.getBaseAxis()},formatTooltip:function(t,e,n,i){function r(n){function r(t,n){var r=c.getDimensionInfo(n);if(r&&r.otherDims.tooltip!==!1){var d=r.type,f="sub"+a.seriesIndex+"at"+h,p=Ga({color:y,type:"subItem",renderMode:i,markerId:f}),g="string"==typeof p?p:p.content,v=(o?g+Fa(r.displayName||"-")+": ":"")+Fa("ordinal"===d?t+"":"time"===d?e?"":Xa("yyyy/MM/dd hh:mm:ss",t):Ra(t));v&&s.push(v),l&&(u[f]=y,++h)}}var o=g(n,function(t,e,n){var i=c.getDimensionInfo(n);return t|=i&&i.tooltip!==!1&&null!=i.displayName},0),s=[];d.length?f(d,function(e){r(qs(c,t,e),e)}):f(n,r);var p=o?l?"\n":"<br/>":"",v=p+s.join(p||", ");return{renderMode:i,content:v,style:u}}function o(t){return{renderMode:i,content:Fa(Ra(t)),style:u}}var a=this;i=i||"html";var s="html"===i?"<br/>":"\n",l="richText"===i,u={},h=0,c=this.getData(),d=c.mapDimension("defaultedTooltip",!0),p=d.length,v=this.getRawValue(t),m=x(v),y=c.getItemVisual(t,"color");S(y)&&y.colorStops&&(y=(y.colorStops[0]||{}).color),y=y||"transparent";var _=p>1||m&&!p?r(v):o(p?qs(c,t,d[0]):m?v[0]:v),w=_.content,b=a.seriesIndex+"at"+h,M=Ga({color:y,type:"item",renderMode:i,markerId:b});u[b]=y,++h;var C=c.getName(t),T=this.name;or(this)||(T=""),T=T?Fa(T)+(e?": ":s):"";var I="string"==typeof M?M:M.content,k=e?I+T+w:T+I+(C?Fa(C)+": "+w:w);return{html:k,markers:u}},isAnimationEnabled:function(){if(Mf.node)return!1;var t=this.getShallow("animation");return t&&this.getData().count()>this.getShallow("animationThreshold")&&(t=!1),t},restoreData:function(){this.dataTask.dirty()},getColorFromPalette:function(t,e,n){var i=this.ecModel,r=cy.getColorFromPalette.call(this,t,e,n);return r||(r=i.getColorFromPalette(t,e,n)),r},coordDimToDataDim:function(t){return this.getRawData().mapDimension(t,!0)},getProgressive:function(){return this.get("progressive")},getProgressiveThreshold:function(){return this.get("progressiveThreshold")},getAxisTooltipData:null,getTooltipPosition:null,pipeTask:null,preventIncremental:null,pipelineContext:null});c(qy,Xy),c(qy,cy);var Zy=function(){this.group=new Np,this.uid=va("viewComponent")};Zy.prototype={constructor:Zy,init:function(){},render:function(){},dispose:function(){},filterForExposedEvent:null};var Ky=Zy.prototype;Ky.updateView=Ky.updateLayout=Ky.updateVisual=function(){},vr(Zy),xr(Zy,{registerWhenExtend:!0});var $y=function(){var t=lr();return function(e){var n=t(e),i=e.pipelineContext,r=n.large,o=n.progressiveRender,a=n.large=i&&i.large,s=n.progressiveRender=i&&i.progressiveRender;return!!(r^a||o^s)&&"reset"}},Qy=lr(),Jy=$y();sl.prototype={type:"chart",init:function(){},render:function(){},highlight:function(t,e,n,i){ul(t.getData(),i,"emphasis")},downplay:function(t,e,n,i){ul(t.getData(),i,"normal")},remove:function(){this.group.removeAll()},dispose:function(){},incrementalPrepareRender:null,incrementalRender:null,updateTransform:null,filterForExposedEvent:null};var t_=sl.prototype;t_.updateView=t_.updateLayout=t_.updateVisual=function(t,e,n,i){this.render(t,e,n,i)},vr(sl,["dispose"]),xr(sl,{registerWhenExtend:!0}),sl.markUpdateMethod=function(t,e){Qy(t).updateMethod=e};var e_={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)}}},n_="\x00__throttleOriginMethod",i_="\x00__throttleRate",r_="\x00__throttleType",o_={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var n=t.getData(),i=(t.visualColorAccessPath||"itemStyle.color").split("."),r=t.get(i),o=!w(r)||r instanceof ym?null:r;(!r||o)&&(r=t.getColorFromPalette(t.name,null,e.getSeriesCount())),n.setVisual("color",r);var a=(t.visualBorderColorAccessPath||"itemStyle.borderColor").split("."),s=t.get(a);if(n.setVisual("borderColor",s),!e.isSeriesFiltered(t)){o&&n.each(function(e){n.setItemVisual(e,"color",o(t.getDataParams(e)))});var l=function(t,e){var n=t.getItemModel(e),r=n.get(i,!0),o=n.get(a,!0);null!=r&&t.setItemVisual(e,"color",r),null!=o&&t.setItemVisual(e,"borderColor",o)};return{dataEach:n.hasItemOption?l:null}}}},a_={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:""}}}},s_=function(t,e){function n(t,e){if("string"!=typeof t)return t;var n=t;return f(e,function(t,e){n=n.replace(new RegExp("\\{\\s*"+e+"\\s*\\}","g"),t)}),n}function i(t){var e=a.get(t);if(null==e){for(var n=t.split("."),i=a_.aria,r=0;r<n.length;++r)i=i[n[r]];return i}return e}function r(){var t=e.getModel("title").option;return t&&t.length&&(t=t[0]),t&&t.text}function o(t){return a_.series.typeNames[t]||"自定义图"}var a=e.getModel("aria");if(a.get("show")){if(a.get("description"))return void t.setAttribute("aria-label",a.get("description"));var s=0;e.eachSeries(function(){++s},this);var l,u=a.get("data.maxCount")||10,h=a.get("series.maxCount")||10,c=Math.min(s,h);if(!(1>s)){var d=r();l=d?n(i("general.withTitle"),{title:d}):i("general.withoutTitle");var p=[],g=s>1?"series.multiple.prefix":"series.single.prefix";l+=n(i(g),{seriesCount:s}),e.eachSeries(function(t,e){if(c>e){var r,a=t.get("name"),l="series."+(s>1?"multiple":"single")+".";r=i(a?l+"withName":l+"withoutName"),r=n(r,{seriesId:t.seriesIndex,seriesName:t.get("name"),seriesType:o(t.subType)});var h=t.getData();window.data=h,r+=h.count()>u?n(i("data.partialData"),{displayCnt:u}):i("data.allData");for(var d=[],f=0;f<h.count();f++)if(u>f){var g=h.getName(f),v=qs(h,f);d.push(n(i(g?"data.withName":"data.withoutName"),{name:g,value:v}))}r+=d.join(i("data.separator.middle"))+i("data.separator.end"),p.push(r)}}),l+=p.join(i("series.multiple.separator.middle"))+i("series.multiple.separator.end"),t.setAttribute("aria-label",l)}}},l_=Math.PI,u_=function(t,e){e=e||{},s(e,{text:"loading",color:"#c23531",textColor:"#000",maskColor:"rgba(255, 255, 255, 0.8)",zlevel:0});var n=new cm({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4}),i=new vm({shape:{startAngle:-l_/2,endAngle:-l_/2+.1,r:10},style:{stroke:e.color,lineCap:"round",lineWidth:5},zlevel:e.zlevel,z:10001}),r=new cm({style:{fill:"none",text:e.text,textPosition:"right",textDistance:10,textFill:e.textColor},zlevel:e.zlevel,z:10001});i.animateShape(!0).when(1e3,{endAngle:3*l_/2}).start("circularInOut"),i.animateShape(!0).when(1e3,{startAngle:3*l_/2}).delay(300).start("circularInOut");var o=new Np;return o.add(i),o.add(r),o.add(n),o.resize=function(){var e=t.getWidth()/2,o=t.getHeight()/2;i.setShape({cx:e,cy:o});var a=i.shape.r;r.setShape({x:e-a,y:o-a,width:2*a,height:2*a}),n.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},o.resize(),o},h_=pl.prototype;h_.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each(function(t){var e=t.overallTask;e&&e.dirty()})},h_.getPerformArgs=function(t,e){if(t.__pipeline){var n=this._pipelineMap.get(t.__pipeline.id),i=n.context,r=!e&&n.progressiveEnabled&&(!i||i.progressiveRender)&&t.__idxInPipeline>n.blockIndex,o=r?n.step:null,a=i&&i.modDataCount,s=null!=a?Math.ceil(a/o):null;return{step:o,modBy:s,modDataCount:a}}},h_.getPipeline=function(t){return this._pipelineMap.get(t)},h_.updateStreamModes=function(t,e){var n=this._pipelineMap.get(t.uid),i=t.getData(),r=i.count(),o=n.progressiveEnabled&&e.incrementalPrepareRender&&r>=n.threshold,a=t.get("large")&&r>=t.get("largeThreshold"),s="mod"===t.get("progressiveChunkMode")?r:null;t.pipelineContext=n.context={progressiveRender:o,modDataCount:s,large:a}},h_.restorePipelines=function(t){var e=this,n=e._pipelineMap=N();t.eachSeries(function(t){var i=t.getProgressive(),r=t.uid;n.set(r,{id:r,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:i&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),Tl(e,t,t.dataTask)})},h_.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.ecInstance.getModel(),n=this.api;f(this._allHandlers,function(i){var r=t.get(i.uid)||t.set(i.uid,[]);i.reset&&vl(this,i,r,e,n),i.overallReset&&ml(this,i,r,e,n)},this)},h_.prepareView=function(t,e,n,i){var r=t.renderTask,o=r.context;o.model=e,o.ecModel=n,o.api=i,r.__block=!t.incrementalPrepareRender,Tl(this,e,r)},h_.performDataProcessorTasks=function(t,e){gl(this,this._dataProcessorHandlers,t,e,{block:!0})},h_.performVisualTasks=function(t,e,n){gl(this,this._visualHandlers,t,e,n)},h_.performSeriesTasks=function(t){var e;t.eachSeries(function(t){e|=t.dataTask.perform()}),this.unfinished|=e},h_.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 c_=h_.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)},d_=Ml(0);pl.wrapStageHandler=function(t,e){return w(t)&&(t={overallReset:t,seriesType:Il(t)}),t.uid=va("stageHandler"),e&&(t.visualType=e),t};var f_,p_={},g_={};kl(p_,Sy),kl(g_,ws),p_.eachSeriesByType=p_.eachRawSeriesByType=function(t){f_=t},p_.eachComponent=function(t){"series"===t.mainType&&t.subType&&(f_=t.subType)};var v_=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"],m_={color:v_,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],v_]},y_="#eee",__=function(){return{axisLine:{lineStyle:{color:y_}},axisTick:{lineStyle:{color:y_}},axisLabel:{textStyle:{color:y_}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:y_}}}},x_=["#dd6b66","#759aa0","#e69d87","#8dc1a9","#ea7e53","#eedd78","#73a373","#73b9bc","#7289ab","#91ca8c","#f49f42"],w_={color:x_,backgroundColor:"#333",tooltip:{axisPointer:{lineStyle:{color:y_},crossStyle:{color:y_},label:{color:"#000"}}},legend:{textStyle:{color:y_}},textStyle:{color:y_},title:{textStyle:{color:y_}},toolbox:{iconStyle:{normal:{borderColor:y_}}},dataZoom:{textStyle:{color:y_}},visualMap:{textStyle:{color:y_}},timeline:{lineStyle:{color:y_},itemStyle:{normal:{color:x_[1]}},label:{normal:{textStyle:{color:y_}}},controlStyle:{normal:{color:y_,borderColor:y_}}},timeAxis:__(),logAxis:__(),valueAxis:__(),categoryAxis:__(),line:{symbol:"circle"},graph:{color:x_},gauge:{title:{textStyle:{color:y_}}},candlestick:{itemStyle:{normal:{color:"#FD1050",color0:"#0CF49B",borderColor:"#FD1050",borderColor0:"#0CF49B"}}}};w_.categoryAxis.splitLine.show=!1,sy.extend({type:"dataset",defaultOption:{seriesLayoutBy:yy,sourceHeader:null,dimensions:null,source:null},optionUpdated:function(){ns(this)}}),Zy.extend({type:"dataset"});var b_=to.extend({type:"ellipse",shape:{cx:0,cy:0,rx:0,ry:0},buildPath:function(t,e){var n=.5522848,i=e.cx,r=e.cy,o=e.rx,a=e.ry,s=o*n,l=a*n;t.moveTo(i-o,r),t.bezierCurveTo(i-o,r-l,i-s,r-a,i,r-a),t.bezierCurveTo(i+s,r-a,i+o,r-l,i+o,r),t.bezierCurveTo(i+o,r+l,i+s,r+a,i,r+a),t.bezierCurveTo(i-s,r+a,i-o,r+l,i-o,r),t.closePath()}}),S_=/[\s,]+/;Al.prototype.parse=function(t,e){e=e||{};var n=Dl(t);if(!n)throw new Error("Illegal svg");var i=new Np;this._root=i;var r=n.getAttribute("viewBox")||"",o=parseFloat(n.getAttribute("width")||e.width),a=parseFloat(n.getAttribute("height")||e.height);isNaN(o)&&(o=null),isNaN(a)&&(a=null),Bl(n,i,null,!0);for(var s=n.firstChild;s;)this._parseNode(s,i),s=s.nextSibling;var l,u;if(r){var h=B(r).split(S_);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!=a&&(u=Nl(l,o,a),!e.ignoreViewBox)){var c=i;i=new Np,i.add(c),c.scale=u.scale.slice(),c.position=u.position.slice()}return e.ignoreRootClip||null==o||null==a||i.setClipPath(new cm({shape:{x:0,y:0,width:o,height:a}})),{root:i,width:o,height:a,viewBoxRect:l,viewBoxTransform:u}},Al.prototype._parseNode=function(t,e){var n=t.nodeName.toLowerCase();"defs"===n?this._isDefine=!0:"text"===n&&(this._isText=!0);var i;if(this._isDefine){var r=C_[n];if(r){var o=r.call(this,t),a=t.getAttribute("id");a&&(this._defs[a]=o)}}else{var r=M_[n];r&&(i=r.call(this,t,e),e.add(i))}for(var s=t.firstChild;s;)1===s.nodeType&&this._parseNode(s,i),3===s.nodeType&&this._isText&&this._parseText(s,i),s=s.nextSibling;"defs"===n?this._isDefine=!1:"text"===n&&(this._isText=!1)},Al.prototype._parseText=function(t,e){if(1===t.nodeType){var n=t.getAttribute("dx")||0,i=t.getAttribute("dy")||0;this._textX+=parseFloat(n),this._textY+=parseFloat(i)}var r=new Jv({style:{text:t.textContent,transformText:!0},position:[this._textX||0,this._textY||0]});Ol(e,r),Bl(t,r,this._defs);var o=r.style.fontSize;o&&9>o&&(r.style.fontSize=9,r.scale=r.scale||[1,1],r.scale[0]*=o/9,r.scale[1]*=o/9);var a=r.getBoundingRect();return this._textX+=a.width,e.add(r),r};var M_={g:function(t,e){var n=new Np;return Ol(e,n),Bl(t,n,this._defs),n},rect:function(t,e){var n=new cm;return Ol(e,n),Bl(t,n,this._defs),n.setShape({x:parseFloat(t.getAttribute("x")||0),y:parseFloat(t.getAttribute("y")||0),width:parseFloat(t.getAttribute("width")||0),height:parseFloat(t.getAttribute("height")||0)}),n},circle:function(t,e){var n=new tm;return Ol(e,n),Bl(t,n,this._defs),n.setShape({cx:parseFloat(t.getAttribute("cx")||0),cy:parseFloat(t.getAttribute("cy")||0),r:parseFloat(t.getAttribute("r")||0)}),n},line:function(t,e){var n=new fm;return Ol(e,n),Bl(t,n,this._defs),n.setShape({x1:parseFloat(t.getAttribute("x1")||0),y1:parseFloat(t.getAttribute("y1")||0),x2:parseFloat(t.getAttribute("x2")||0),y2:parseFloat(t.getAttribute("y2")||0)}),n},ellipse:function(t,e){var n=new b_;return Ol(e,n),Bl(t,n,this._defs),n.setShape({cx:parseFloat(t.getAttribute("cx")||0),cy:parseFloat(t.getAttribute("cy")||0),rx:parseFloat(t.getAttribute("rx")||0),ry:parseFloat(t.getAttribute("ry")||0)}),n},polygon:function(t,e){var n=t.getAttribute("points");n&&(n=Ll(n));var i=new sm({shape:{points:n||[]}});return Ol(e,i),Bl(t,i,this._defs),i},polyline:function(t,e){var n=new to;Ol(e,n),Bl(t,n,this._defs);var i=t.getAttribute("points");i&&(i=Ll(i));var r=new lm({shape:{points:i||[]}});return r},image:function(t,e){var n=new Ii;return Ol(e,n),Bl(t,n,this._defs),n.setStyle({image:t.getAttribute("xlink:href"),x:t.getAttribute("x"),y:t.getAttribute("y"),width:t.getAttribute("width"),height:t.getAttribute("height")}),n},text:function(t,e){var n=t.getAttribute("x")||0,i=t.getAttribute("y")||0,r=t.getAttribute("dx")||0,o=t.getAttribute("dy")||0;this._textX=parseFloat(n)+parseFloat(r),this._textY=parseFloat(i)+parseFloat(o);var a=new Np;return Ol(e,a),Bl(t,a,this._defs),a},tspan:function(t,e){var n=t.getAttribute("x"),i=t.getAttribute("y");null!=n&&(this._textX=parseFloat(n)),null!=i&&(this._textY=parseFloat(i));var r=t.getAttribute("dx")||0,o=t.getAttribute("dy")||0,a=new Np;return Ol(e,a),Bl(t,a,this._defs),this._textX+=r,this._textY+=o,a},path:function(t,e){var n=t.getAttribute("d")||"",i=ro(n);return Ol(e,i),Bl(t,i,this._defs),i}},C_={lineargradient:function(t){var e=parseInt(t.getAttribute("x1")||0,10),n=parseInt(t.getAttribute("y1")||0,10),i=parseInt(t.getAttribute("x2")||10,10),r=parseInt(t.getAttribute("y2")||0,10),o=new _m(e,n,i,r);return Pl(t,o),o},radialgradient:function(){}},T_={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"},I_=/url\(\s*#(.*?)\)/,k_=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.e,]*)\)/g,D_=/([^\s:;]+)\s*:\s*([^:;]+)/g,A_=N(),P_={registerMap:function(t,e,n){var i;return x(e)?i=e:e.svg?i=[{type:"svg",source:e.svg,specialAreas:e.specialAreas}]:(e.geoJson&&!e.features&&(n=e.specialAreas,e=e.geoJson),i=[{type:"geoJSON",source:e,specialAreas:n}]),f(i,function(t){var e=t.type;"geoJson"===e&&(e=t.type="geoJSON");var n=O_[e];n(t)}),A_.set(t,i)},retrieveMap:function(t){return A_.get(t)}},O_={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=Dl(t.source)}},L_=L,B_=f,E_=w,z_=S,R_=sy.parseClassType,N_="4.7.0",F_={zrender:"4.3.0"},H_=1,V_=1e3,G_=800,W_=900,X_=5e3,Y_=1e3,U_=1100,j_=2e3,q_=3e3,Z_=3500,K_=4e3,$_=5e3,Q_={PROCESSOR:{FILTER:V_,SERIES_FILTER:G_,STATISTIC:X_},VISUAL:{LAYOUT:Y_,PROGRESSIVE_LAYOUT:U_,GLOBAL:j_,CHART:q_,POST_CHART_LAYOUT:Z_,COMPONENT:K_,BRUSH:$_}},J_="__flagInMainProcess",tx="__optionUpdated",ex=/^[a-zA-Z0-9_]+$/;Hl.prototype.on=Fl("on",!0),Hl.prototype.off=Fl("off",!0),Hl.prototype.one=Fl("one",!0),c(Hl,Uf);var nx=Vl.prototype;nx._onframe=function(){if(!this._disposed){var t=this._scheduler;if(this[tx]){var e=this[tx].silent;this[J_]=!0,Wl(this),ix.update.call(this),this[J_]=!1,this[tx]=!1,jl.call(this,e),ql.call(this,e)}else if(t.unfinished){var n=H_,i=this._model,r=this._api;t.unfinished=!1;do{var o=+new Date;t.performSeriesTasks(i),t.performDataProcessorTasks(i),Yl(this,i),t.performVisualTasks(i),tu(this,this._model,r,"remain"),n-=+new Date-o}while(n>0&&t.unfinished);t.unfinished||this._zr.flush()}}},nx.getDom=function(){return this._dom},nx.getZr=function(){return this._zr},nx.setOption=function(t,e,n){if(!this._disposed){var i;if(z_(e)&&(n=e.lazyUpdate,i=e.silent,e=e.notMerge),this[J_]=!0,!this._model||e){var r=new Ss(this._api),o=this._theme,a=this._model=new Sy;a.scheduler=this._scheduler,a.init(null,null,o,r)}this._model.setOption(t,lx),n?(this[tx]={silent:i},this[J_]=!1):(Wl(this),ix.update.call(this),this._zr.flush(),this[tx]=!1,this[J_]=!1,jl.call(this,i),ql.call(this,i))}},nx.setTheme=function(){console.error("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},nx.getModel=function(){return this._model},nx.getOption=function(){return this._model&&this._model.getOption()},nx.getWidth=function(){return this._zr.getWidth()},nx.getHeight=function(){return this._zr.getHeight()},nx.getDevicePixelRatio=function(){return this._zr.painter.dpr||window.devicePixelRatio||1},nx.getRenderedCanvas=function(t){if(Mf.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)}},nx.getSvgDataUrl=function(){if(Mf.svgSupported){var t=this._zr,e=t.storage.getDisplayList();return f(e,function(t){t.stopAnimation(!0)}),t.painter.pathToDataUrl()}},nx.getDataURL=function(t){if(!this._disposed){t=t||{};var e=t.excludeComponents,n=this._model,i=[],r=this;B_(e,function(t){n.eachComponent({mainType:t},function(t){var e=r._componentsMap[t.__viewId];e.group.ignore||(i.push(e),e.group.ignore=!0)})});var o="svg"===this._zr.painter.getType()?this.getSvgDataUrl():this.getRenderedCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return B_(i,function(t){t.group.ignore=!1}),o}},nx.getConnectedDataURL=function(t){if(!this._disposed&&Mf.canvasSupported){var e=this.group,n=Math.min,r=Math.max,o=1/0;if(px[e]){var a=o,s=o,l=-o,u=-o,h=[],c=t&&t.pixelRatio||1;f(fx,function(o){if(o.group===e){var c=o.getRenderedCanvas(i(t)),d=o.getDom().getBoundingClientRect();a=n(d.left,a),s=n(d.top,s),l=r(d.right,l),u=r(d.bottom,u),h.push({dom:c,left:d.left,top:d.top})}}),a*=c,s*=c,l*=c,u*=c;var d=l-a,p=u-s,g=Ef();g.width=d,g.height=p;var v=qi(g);return t.connectedBackgroundColor&&v.add(new cm({shape:{x:0,y:0,width:d,height:p},style:{fill:t.connectedBackgroundColor}})),B_(h,function(t){var e=new Ii({style:{x:t.left*c-a,y:t.top*c-s,image:t.dom}});v.add(e)}),v.refreshImmediately(),g.toDataURL("image/"+(t&&t.type||"png"))}return this.getDataURL(t)}},nx.convertToPixel=_(Gl,"convertToPixel"),nx.convertFromPixel=_(Gl,"convertFromPixel"),nx.containPixel=function(t,e){if(!this._disposed){var n,i=this._model;return t=ur(i,t),f(t,function(t,i){i.indexOf("Models")>=0&&f(t,function(t){var r=t.coordinateSystem;if(r&&r.containPoint)n|=!!r.containPoint(e);else if("seriesModels"===i){var o=this._chartsMap[t.__viewId];o&&o.containPoint&&(n|=o.containPoint(e,t))}},this)},this),!!n}},nx.getVisual=function(t,e){var n=this._model;t=ur(n,t,{defaultMainType:"series"});var i=t.seriesModel,r=i.getData(),o=t.hasOwnProperty("dataIndexInside")?t.dataIndexInside:t.hasOwnProperty("dataIndex")?r.indexOfRawIndex(t.dataIndex):null;return null!=o?r.getItemVisual(o,e):r.getVisual(e)
  9. },nx.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},nx.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]};var ix={prepareAndUpdate:function(t){Wl(this),ix.update.call(this,t)},update:function(t){var e=this._model,n=this._api,i=this._zr,r=this._coordSysMgr,o=this._scheduler;if(e){o.restoreData(e,t),o.performSeriesTasks(e),r.create(e,n),o.performDataProcessorTasks(e,t),Yl(this,e),r.update(e,n),$l(e),o.performVisualTasks(e,t),Ql(this,e,n,t);var a=e.get("backgroundColor")||"transparent";if(Mf.canvasSupported)i.setBackgroundColor(a);else{var s=Je(a);a=un(s,"rgb"),0===s[3]&&(a="transparent")}eu(e,n)}},updateTransform:function(t){var e=this._model,n=this,i=this._api;if(e){var r=[];e.eachComponent(function(o,a){var s=n.getViewOfComponentModel(a);if(s&&s.__alive)if(s.updateTransform){var l=s.updateTransform(a,e,i,t);l&&l.update&&r.push(s)}else r.push(s)});var o=N();e.eachSeries(function(r){var a=n._chartsMap[r.__viewId];if(a.updateTransform){var s=a.updateTransform(r,e,i,t);s&&s.update&&o.set(r.uid,1)}else o.set(r.uid,1)}),$l(e),this._scheduler.performVisualTasks(e,t,{setDirty:!0,dirtyMap:o}),tu(n,e,i,t,o),eu(e,this._api)}},updateView:function(t){var e=this._model;e&&(sl.markUpdateMethod(t,"updateView"),$l(e),this._scheduler.performVisualTasks(e,t,{setDirty:!0}),Ql(this,this._model,this._api,t),eu(e,this._api))},updateVisual:function(t){ix.update.call(this,t)},updateLayout:function(t){ix.update.call(this,t)}};nx.resize=function(t){if(!this._disposed){this._zr.resize(t);var e=this._model;if(this._loadingFX&&this._loadingFX.resize(),e){var n=e.resetOption("media"),i=t&&t.silent;this[J_]=!0,n&&Wl(this),ix.update.call(this),this[J_]=!1,jl.call(this,i),ql.call(this,i)}}},nx.showLoading=function(t,e){if(!this._disposed&&(z_(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),dx[t])){var n=dx[t](this._api,e),i=this._zr;this._loadingFX=n,i.add(n)}},nx.hideLoading=function(){this._disposed||(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},nx.makeActionFromEvent=function(t){var e=a({},t);return e.type=ax[t.type],e},nx.dispatchAction=function(t,e){if(!this._disposed&&(z_(e)||(e={silent:!!e}),ox[t.type]&&this._model)){if(this[J_])return void this._pendingActions.push(t);Ul.call(this,t,e.silent),e.flush?this._zr.flush(!0):e.flush!==!1&&Mf.browser.weChat&&this._throttledZrFlush(),jl.call(this,e.silent),ql.call(this,e.silent)}},nx.appendData=function(t){if(!this._disposed){var e=t.seriesIndex,n=this.getModel(),i=n.getSeriesByIndex(e);i.appendData(t),this._scheduler.unfinished=!0}},nx.on=Fl("on",!1),nx.off=Fl("off",!1),nx.one=Fl("one",!1);var rx=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];nx._initEvents=function(){B_(rx,function(t){var e=function(e){var n,i=this.getModel(),r=e.target,o="globalout"===t;if(o)n={};else if(r&&null!=r.dataIndex){var s=r.dataModel||i.getSeriesByIndex(r.seriesIndex);n=s&&s.getDataParams(r.dataIndex,r.dataType,r)||{}}else r&&r.eventData&&(n=a({},r.eventData));if(n){var l=n.componentType,u=n.componentIndex;("markLine"===l||"markPoint"===l||"markArea"===l)&&(l="series",u=n.seriesIndex);var h=l&&null!=u&&i.getComponent(l,u),c=h&&this["series"===h.mainType?"_chartsMap":"_componentsMap"][h.__viewId];n.event=e,n.type=t,this._ecEventProcessor.eventInfo={targetEl:r,packedEvent:n,model:h,view:c},this.trigger(t,n)}};e.zrEventfulCallAtLast=!0,this._zr.on(t,e,this)},this),B_(ax,function(t,e){this._messageCenter.on(e,function(t){this.trigger(e,t)},this)},this)},nx.isDisposed=function(){return this._disposed},nx.clear=function(){this._disposed||this.setOption({series:[]},!0)},nx.dispose=function(){if(!this._disposed){this._disposed=!0,cr(this.getDom(),mx,"");var t=this._api,e=this._model;B_(this._componentsViews,function(n){n.dispose(e,t)}),B_(this._chartsViews,function(n){n.dispose(e,t)}),this._zr.dispose(),delete fx[this.id]}},c(Vl,Uf),au.prototype={constructor:au,normalizeQuery:function(t){var e={},n={},i={};if(b(t)){var r=R_(t);e.mainType=r.main||null,e.subType=r.sub||null}else{var o=["Index","Name","Id"],a={name:1,dataIndex:1,dataType:1};f(t,function(t,r){for(var s=!1,l=0;l<o.length;l++){var u=o[l],h=r.lastIndexOf(u);if(h>0&&h===r.length-u.length){var c=r.slice(0,h);"data"!==c&&(e.mainType=c,e[u.toLowerCase()]=t,s=!0)}}a.hasOwnProperty(r)&&(n[r]=t,s=!0),s||(i[r]=t)})}return{cptQuery:e,dataQuery:n,otherQuery:i}},filter:function(t,e){function n(t,e,n,i){return null==t[n]||e[i||n]===t[n]}var i=this.eventInfo;if(!i)return!0;var r=i.targetEl,o=i.packedEvent,a=i.model,s=i.view;if(!a||!s)return!0;var l=e.cptQuery,u=e.dataQuery;return n(l,a,"mainType")&&n(l,a,"subType")&&n(l,a,"index","componentIndex")&&n(l,a,"name")&&n(l,a,"id")&&n(u,o,"name")&&n(u,o,"dataIndex")&&n(u,o,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(t,e.otherQuery,r,o))},afterTrigger:function(){this.eventInfo=null}};var ox={},ax={},sx=[],lx=[],ux=[],hx=[],cx={},dx={},fx={},px={},gx=new Date-0,vx=new Date-0,mx="_echarts_instance_",yx=hu;bu(j_,o_),gu(Ry),vu(W_,Ny),Mu("default",u_),yu({type:"highlight",event:"highlight",update:"highlight"},H),yu({type:"downplay",event:"downplay",update:"downplay"},H),pu("light",m_),pu("dark",w_);var _x={};Lu.prototype={constructor:Lu,add:function(t){return this._add=t,this},update:function(t){return this._update=t,this},remove:function(t){return this._remove=t,this},execute:function(){var t,e=this._old,n=this._new,i={},r={},o=[],a=[];for(Bu(e,i,o,"_oldKeyGetter",this),Bu(n,r,a,"_newKeyGetter",this),t=0;t<e.length;t++){var s=o[t],l=r[s];if(null!=l){var u=l.length;u?(1===u&&(r[s]=null),l=l.shift()):r[s]=null,this._update&&this._update(l,t)}else this._remove&&this._remove(t)}for(var t=0;t<a.length;t++){var s=a[t];if(r.hasOwnProperty(s)){var l=r[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 xx=N(["tooltip","label","itemName","itemId","seriesName"]),bx=S,Sx="undefined",Mx=-1,Cx="e\x00\x00",Tx={"float":typeof Float64Array===Sx?Array:Float64Array,"int":typeof Int32Array===Sx?Array:Int32Array,ordinal:Array,number:Array,time:Array},Ix=typeof Uint32Array===Sx?Array:Uint32Array,kx=typeof Int32Array===Sx?Array:Int32Array,Dx=typeof Uint16Array===Sx?Array:Uint16Array,Ax=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_rawData","_chunkSize","_chunkCount","_dimValueGetter","_count","_rawCount","_nameDimIdx","_idDimIdx"],Px=["_extent","_approximateExtent","_rawExtent"],Ox=function(t,e){t=t||["x","y"];for(var n={},i=[],r={},o=0;o<t.length;o++){var a=t[o];b(a)?a=new Fu({name:a}):a instanceof Fu||(a=new Fu(a));var s=a.name;a.type=a.type||"float",a.coordDim||(a.coordDim=s,a.coordDimIndex=0),a.otherDims=a.otherDims||{},i.push(s),n[s]=a,a.index=o,a.createInvertedIndices&&(r[s]=[])}this.dimensions=i,this._dimensionInfos=n,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=Eu(this),this._invertedIndicesMap=r,this._calculationInfo={},this.userOutput=this._dimensionsSummary.userOutput},Lx=Ox.prototype;Lx.type="list",Lx.hasItemOption=!0,Lx.getDimension=function(t){return("number"==typeof t||!isNaN(t)&&!this._dimensionInfos.hasOwnProperty(t))&&(t=this.dimensions[t]),t},Lx.getDimensionInfo=function(t){return this._dimensionInfos[this.getDimension(t)]},Lx.getDimensionsOnCoord=function(){return this._dimensionsSummary.dataDimsOnCoord.slice()},Lx.mapDimension=function(t,e){var n=this._dimensionsSummary;if(null==e)return n.encodeFirstDimNotExtra[t];var i=n.encode[t];return e===!0?(i||[]).slice():i&&i[e]},Lx.initData=function(t,e,n){var i=es.isInstance(t)||d(t);i&&(t=new Vs(t,this.dimensions.length)),this._rawData=t,this._storage={},this._indices=null,this._nameList=e||[],this._idList=[],this._nameRepeatCount={},n||(this.hasItemOption=!1),this.defaultDimValueGetter=Gy[this._rawData.getSource().sourceFormat],this._dimValueGetter=n=n||this.defaultDimValueGetter,this._dimValueGetterArrayRows=Gy.arrayRows,this._rawExtent={},this._initDataFromProvider(0,t.count()),t.pure&&(this.hasItemOption=!1)},Lx.getProvider=function(){return this._rawData},Lx.appendData=function(t){var e=this._rawData,n=this.count();e.appendData(t);var i=e.count();e.persistent||(i+=n),this._initDataFromProvider(n,i)},Lx.appendValues=function(t,e){for(var n=this._chunkSize,i=this._storage,r=this.dimensions,o=r.length,a=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=r[h];a[c]||(a[c]=Qu()),i[c]||(i[c]=[]),Wu(i,this._dimensionInfos[c],n,u,l),this._chunkCount=i[c].length}for(var d=new Array(o),f=s;l>f;f++){for(var p=f-s,g=Math.floor(f/n),v=f%n,m=0;o>m;m++){var c=r[m],y=this._dimValueGetterArrayRows(t[p]||d,c,p,m);i[c][g][v]=y;var _=a[c];y<_[0]&&(_[0]=y),y>_[1]&&(_[1]=y)}e&&(this._nameList[f]=e[p])}this._rawCount=this._count=l,this._extent={},Xu(this)},Lx._initDataFromProvider=function(t,e){if(!(t>=e)){for(var n,i=this._chunkSize,r=this._rawData,o=this._storage,a=this.dimensions,s=a.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=a[p];c[g]||(c[g]=Qu());var v=l[g];0===v.otherDims.itemName&&(n=this._nameDimIdx=p),0===v.otherDims.itemId&&(this._idDimIdx=p),o[g]||(o[g]=[]),Wu(o,v,i,f,e),this._chunkCount=o[g].length}for(var m=new Array(s),y=t;e>y;y++){m=r.getItem(y,m);for(var _=Math.floor(y/i),x=y%i,w=0;s>w;w++){var g=a[w],b=o[g][_],S=this._dimValueGetter(m,g,y,w);b[x]=S;var M=c[g];S<M[0]&&(M[0]=S),S>M[1]&&(M[1]=S)}if(!r.pure){var C=u[y];if(m&&null==C)if(null!=m.name)u[y]=C=m.name;else if(null!=n){var T=a[n],I=o[T][_];if(I){C=I[x];var k=l[T].ordinalMeta;k&&k.categories.length&&(C=k.categories[C])}}var D=null==m?null:m.id;null==D&&null!=C&&(d[C]=d[C]||0,D=C,d[C]>0&&(D+="__ec__"+d[C]),d[C]++),null!=D&&(h[y]=D)}}!r.persistent&&r.clean&&r.clean(),this._rawCount=this._count=e,this._extent={},Xu(this)}},Lx.count=function(){return this._count},Lx.getIndices=function(){var t,e=this._indices;if(e){var n=e.constructor,i=this._count;if(n===Array){t=new n(i);for(var r=0;i>r;r++)t[r]=e[r]}else t=new n(e.buffer,0,i)}else for(var n=Hu(this),t=new n(this.count()),r=0;r<t.length;r++)t[r]=r;return t},Lx.get=function(t,e){if(!(e>=0&&e<this._count))return 0/0;var n=this._storage;if(!n[t])return 0/0;e=this.getRawIndex(e);var i=Math.floor(e/this._chunkSize),r=e%this._chunkSize,o=n[t][i],a=o[r];return a},Lx.getByRawIndex=function(t,e){if(!(e>=0&&e<this._rawCount))return 0/0;var n=this._storage[t];if(!n)return 0/0;var i=Math.floor(e/this._chunkSize),r=e%this._chunkSize,o=n[i];return o[r]},Lx._getFast=function(t,e){var n=Math.floor(e/this._chunkSize),i=e%this._chunkSize,r=this._storage[t][n];return r[i]},Lx.getValues=function(t,e){var n=[];x(t)||(e=t,t=this.dimensions);for(var i=0,r=t.length;r>i;i++)n.push(this.get(t[i],e));return n},Lx.hasValue=function(t){for(var e=this._dimensionsSummary.dataDimsOnCoord,n=0,i=e.length;i>n;n++)if(isNaN(this.get(e[n],t)))return!1;return!0},Lx.getDataExtent=function(t){t=this.getDimension(t);var e=this._storage[t],n=Qu();if(!e)return n;var i,r=this.count(),o=!this._indices;if(o)return this._rawExtent[t].slice();if(i=this._extent[t])return i.slice();i=n;for(var a=i[0],s=i[1],l=0;r>l;l++){var u=this._getFast(t,this.getRawIndex(l));a>u&&(a=u),u>s&&(s=u)}return i=[a,s],this._extent[t]=i,i},Lx.getApproximateExtent=function(t){return t=this.getDimension(t),this._approximateExtent[t]||this.getDataExtent(t)},Lx.setApproximateExtent=function(t,e){e=this.getDimension(e),this._approximateExtent[e]=t.slice()},Lx.getCalculationInfo=function(t){return this._calculationInfo[t]},Lx.setCalculationInfo=function(t,e){bx(t)?a(this._calculationInfo,t):this._calculationInfo[t]=e},Lx.getSum=function(t){var e=this._storage[t],n=0;if(e)for(var i=0,r=this.count();r>i;i++){var o=this.get(t,i);isNaN(o)||(n+=o)}return n},Lx.getMedian=function(t){var e=[];this.each(t,function(t){isNaN(t)||e.push(t)});var n=[].concat(e).sort(function(t,e){return t-e}),i=this.count();return 0===i?0:i%2===1?n[(i-1)/2]:(n[i/2]+n[i/2-1])/2},Lx.rawIndexOf=function(t,e){var n=t&&this._invertedIndicesMap[t],i=n[e];return null==i||isNaN(i)?Mx:i},Lx.indexOfName=function(t){for(var e=0,n=this.count();n>e;e++)if(this.getName(e)===t)return e;return-1},Lx.indexOfRawIndex=function(t){if(t>=this._rawCount||0>t)return-1;if(!this._indices)return t;var e=this._indices,n=e[t];if(null!=n&&n<this._count&&n===t)return t;for(var i=0,r=this._count-1;r>=i;){var o=(i+r)/2|0;if(e[o]<t)i=o+1;else{if(!(e[o]>t))return o;r=o-1}}return-1},Lx.indicesOfNearest=function(t,e,n){var i=this._storage,r=i[t],o=[];if(!r)return o;null==n&&(n=1/0);for(var a=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);n>=d&&((a>d||d===a&&c>=0&&0>s)&&(a=d,s=c,l=0),c===s&&(o[l++]=u))}return o.length=l,o},Lx.getRawIndex=Uu,Lx.getRawDataItem=function(t){if(this._rawData.persistent)return this._rawData.getItem(this.getRawIndex(t));for(var e=[],n=0;n<this.dimensions.length;n++){var i=this.dimensions[n];e.push(this.get(i,t))}return e},Lx.getName=function(t){var e=this.getRawIndex(t);return this._nameList[e]||Yu(this,this._nameDimIdx,e)||""},Lx.getId=function(t){return qu(this,this.getRawIndex(t))},Lx.each=function(t,e,n,i){if(this._count){"function"==typeof t&&(i=n,n=e,e=t,t=[]),n=n||i||this,t=p(Zu(t),this.getDimension,this);for(var r=t.length,o=0;o<this.count();o++)switch(r){case 0:e.call(n,o);break;case 1:e.call(n,this.get(t[0],o),o);break;case 2:e.call(n,this.get(t[0],o),this.get(t[1],o),o);break;default:for(var a=0,s=[];r>a;a++)s[a]=this.get(t[a],o);s[a]=o,e.apply(n,s)}}},Lx.filterSelf=function(t,e,n,i){if(this._count){"function"==typeof t&&(i=n,n=e,e=t,t=[]),n=n||i||this,t=p(Zu(t),this.getDimension,this);for(var r=this.count(),o=Hu(this),a=new o(r),s=[],l=t.length,u=0,h=t[0],c=0;r>c;c++){var d,f=this.getRawIndex(c);if(0===l)d=e.call(n,c);else if(1===l){var g=this._getFast(h,f);d=e.call(n,g,c)}else{for(var v=0;l>v;v++)s[v]=this._getFast(h,f);s[v]=c,d=e.apply(n,s)}d&&(a[u++]=f)}return r>u&&(this._indices=a),this._count=u,this._extent={},this.getRawIndex=this._indices?ju:Uu,this}},Lx.selectRange=function(t){if(this._count){var e=[];for(var n in t)t.hasOwnProperty(n)&&e.push(n);var i=e.length;if(i){var r=this.count(),o=Hu(this),a=new o(r),s=0,l=e[0],u=t[l][0],h=t[l][1],c=!1;if(!this._indices){var d=0;if(1===i){for(var f=this._storage[e[0]],p=0;p<this._chunkCount;p++)for(var g=f[p],v=Math.min(this._count-p*this._chunkSize,this._chunkSize),m=0;v>m;m++){var y=g[m];(y>=u&&h>=y||isNaN(y))&&(a[s++]=d),d++}c=!0}else if(2===i){for(var f=this._storage[l],_=this._storage[e[1]],x=t[e[1]][0],w=t[e[1]][1],p=0;p<this._chunkCount;p++)for(var g=f[p],b=_[p],v=Math.min(this._count-p*this._chunkSize,this._chunkSize),m=0;v>m;m++){var y=g[m],S=b[m];(y>=u&&h>=y||isNaN(y))&&(S>=x&&w>=S||isNaN(S))&&(a[s++]=d),d++}c=!0}}if(!c)if(1===i)for(var m=0;r>m;m++){var M=this.getRawIndex(m),y=this._getFast(l,M);(y>=u&&h>=y||isNaN(y))&&(a[s++]=M)}else for(var m=0;r>m;m++){for(var C=!0,M=this.getRawIndex(m),p=0;i>p;p++){var T=e[p],y=this._getFast(n,M);(y<t[T][0]||y>t[T][1])&&(C=!1)}C&&(a[s++]=this.getRawIndex(m))}return r>s&&(this._indices=a),this._count=s,this._extent={},this.getRawIndex=this._indices?ju:Uu,this}}},Lx.mapArray=function(t,e,n,i){"function"==typeof t&&(i=n,n=e,e=t,t=[]),n=n||i||this;var r=[];return this.each(t,function(){r.push(e&&e.apply(this,arguments))},n),r},Lx.map=function(t,e,n,i){n=n||i||this,t=p(Zu(t),this.getDimension,this);var r=Ku(this,t);r._indices=this._indices,r.getRawIndex=r._indices?ju:Uu;for(var o=r._storage,a=[],s=this._chunkSize,l=t.length,u=this.count(),h=[],c=r._rawExtent,d=0;u>d;d++){for(var f=0;l>f;f++)h[f]=this.get(t[f],d);h[l]=d;var g=e&&e.apply(n,h);if(null!=g){"object"!=typeof g&&(a[0]=g,g=a);for(var v=this.getRawIndex(d),m=Math.floor(v/s),y=v%s,_=0;_<g.length;_++){var x=t[_],w=g[_],b=c[x],S=o[x];S&&(S[m][y]=w),w<b[0]&&(b[0]=w),w>b[1]&&(b[1]=w)}}}return r},Lx.downSample=function(t,e,n,i){for(var r=Ku(this,[t]),o=r._storage,a=[],s=Math.floor(1/e),l=o[t],u=this.count(),h=this._chunkSize,c=r._rawExtent[t],d=new(Hu(this))(u),f=0,p=0;u>p;p+=s){s>u-p&&(s=u-p,a.length=s);for(var g=0;s>g;g++){var v=this.getRawIndex(p+g),m=Math.floor(v/h),y=v%h;a[g]=l[m][y]}var _=n(a),x=this.getRawIndex(Math.min(p+i(a,_)||0,u-1)),w=Math.floor(x/h),b=x%h;l[w][b]=_,_<c[0]&&(c[0]=_),_>c[1]&&(c[1]=_),d[f++]=x}return r._count=f,r._indices=d,r.getRawIndex=ju,r},Lx.getItemModel=function(t){var e=this.hostModel;return new fa(this.getRawDataItem(t),e,e&&e.ecModel)},Lx.diff=function(t){var e=this;return new Lu(t?t.getIndices():[],this.getIndices(),function(e){return qu(t,e)},function(t){return qu(e,t)})},Lx.getVisual=function(t){var e=this._visual;return e&&e[t]},Lx.setVisual=function(t,e){if(bx(t))for(var n in t)t.hasOwnProperty(n)&&this.setVisual(n,t[n]);else this._visual=this._visual||{},this._visual[t]=e},Lx.setLayout=function(t,e){if(bx(t))for(var n in t)t.hasOwnProperty(n)&&this.setLayout(n,t[n]);else this._layout[t]=e},Lx.getLayout=function(t){return this._layout[t]},Lx.getItemLayout=function(t){return this._itemLayouts[t]},Lx.setItemLayout=function(t,e,n){this._itemLayouts[t]=n?a(this._itemLayouts[t]||{},e):e},Lx.clearItemLayouts=function(){this._itemLayouts.length=0},Lx.getItemVisual=function(t,e,n){var i=this._itemVisuals[t],r=i&&i[e];return null!=r||n?r:this.getVisual(e)},Lx.setItemVisual=function(t,e,n){var i=this._itemVisuals[t]||{},r=this.hasItemVisual;if(this._itemVisuals[t]=i,bx(e))for(var o in e)e.hasOwnProperty(o)&&(i[o]=e[o],r[o]=!0);else i[e]=n,r[e]=!0},Lx.clearAllVisual=function(){this._visual={},this._itemVisuals=[],this.hasItemVisual={}};var Bx=function(t){t.seriesIndex=this.seriesIndex,t.dataIndex=this.dataIndex,t.dataType=this.dataType};Lx.setItemGraphicEl=function(t,e){var n=this.hostModel;e&&(e.dataIndex=t,e.dataType=this.dataType,e.seriesIndex=n&&n.seriesIndex,"group"===e.type&&e.traverse(Bx,e)),this._graphicEls[t]=e},Lx.getItemGraphicEl=function(t){return this._graphicEls[t]},Lx.eachItemGraphicEl=function(t,e){f(this._graphicEls,function(n,i){n&&t&&t.call(e,n,i)})},Lx.cloneShallow=function(t){if(!t){var e=p(this.dimensions,this.getDimensionInfo,this);t=new Ox(e,this.hostModel)}if(t._storage=this._storage,Gu(t,this),this._indices){var n=this._indices.constructor;t._indices=new n(this._indices)}else t._indices=null;return t.getRawIndex=t._indices?ju:Uu,t},Lx.wrapMethod=function(t,e){var n=this[t];"function"==typeof n&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var t=n.apply(this,arguments);return e.apply(this,[t].concat(P(arguments)))})},Lx.TRANSFERABLE_METHODS=["cloneShallow","downSample","map"],Lx.CHANGABLE_METHODS=["filterSelf","selectRange"];var Ex=function(t,e){return e=e||{},Ju(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})},zx={cartesian2d:function(t,e,n,i){var r=t.getReferringComponents("xAxis")[0],o=t.getReferringComponents("yAxis")[0];e.coordSysDims=["x","y"],n.set("x",r),n.set("y",o),rh(r)&&(i.set("x",r),e.firstCategoryDimIndex=0),rh(o)&&(i.set("y",o),null==e.firstCategoryDimIndex&(e.firstCategoryDimIndex=1))},singleAxis:function(t,e,n,i){var r=t.getReferringComponents("singleAxis")[0];e.coordSysDims=["single"],n.set("single",r),rh(r)&&(i.set("single",r),e.firstCategoryDimIndex=0)},polar:function(t,e,n,i){var r=t.getReferringComponents("polar")[0],o=r.findAxisModel("radiusAxis"),a=r.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],n.set("radius",o),n.set("angle",a),rh(o)&&(i.set("radius",o),e.firstCategoryDimIndex=0),rh(a)&&(i.set("angle",a),null==e.firstCategoryDimIndex&&(e.firstCategoryDimIndex=1))},geo:function(t,e){e.coordSysDims=["lng","lat"]},parallel:function(t,e,n,i){var r=t.ecModel,o=r.getComponent("parallel",t.get("parallelIndex")),a=e.coordSysDims=o.dimensions.slice();f(o.parallelAxisIndex,function(t,o){var s=r.getComponent("parallelAxis",t),l=a[o];n.set(l,s),rh(s)&&null==e.firstCategoryDimIndex&&(i.set(l,s),e.firstCategoryDimIndex=o)})}};ch.prototype.parse=function(t){return t},ch.prototype.getSetting=function(t){return this._setting[t]},ch.prototype.contain=function(t){var e=this._extent;return t>=e[0]&&t<=e[1]},ch.prototype.normalize=function(t){var e=this._extent;return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])},ch.prototype.scale=function(t){var e=this._extent;return t*(e[1]-e[0])+e[0]},ch.prototype.unionExtent=function(t){var e=this._extent;t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1])},ch.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},ch.prototype.getExtent=function(){return this._extent.slice()},ch.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=t),isNaN(e)||(n[1]=e)},ch.prototype.isBlank=function(){return this._isBlank},ch.prototype.setBlank=function(t){this._isBlank=t},ch.prototype.getLabel=null,vr(ch),xr(ch,{registerWhenExtend:!0}),dh.createByAxisModel=function(t){var e=t.option,n=e.data,i=n&&p(n,ph);return new dh({categories:i,needCollect:!i,deduplication:e.dedplication!==!1})};var Rx=dh.prototype;Rx.getOrdinal=function(t){return fh(this).get(t)},Rx.parseAndCollect=function(t){var e,n=this._needCollect;if("string"!=typeof t&&!n)return t;if(n&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,e;var i=fh(this);return e=i.get(t),null==e&&(n?(e=this.categories.length,this.categories[e]=t,i.set(t,e)):e=0/0),e};var Nx=ch.prototype,Fx=ch.extend({type:"ordinal",init:function(t,e){(!t||x(t))&&(t=new dh({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),Nx.contain.call(this,t)&&null!=this._ordinalMeta.categories[t]},normalize:function(t){return Nx.normalize.call(this,this.parse(t))},scale:function(t){return Math.round(Nx.scale.call(this,t))},getTicks:function(){for(var t=[],e=this._extent,n=e[0];n<=e[1];)t.push(n),n++;return t},getLabel:function(t){return this.isBlank()?void 0:this._ordinalMeta.categories[t]},count:function(){return this._extent[1]-this._extent[0]+1},unionExtentFromData:function(t,e){this.unionExtent(t.getApproximateExtent(e))},getOrdinalMeta:function(){return this._ordinalMeta},niceTicks:H,niceExtent:H});Fx.create=function(){return new Fx};var Hx=ba,Vx=ba,Gx=ch.extend({type:"interval",_interval:0,_intervalPrecision:2,setExtent:function(t,e){var n=this._extent;isNaN(t)||(n[0]=parseFloat(t)),isNaN(e)||(n[1]=parseFloat(e))},unionExtent:function(t){var e=this._extent;t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1]),Gx.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=vh(t)},getTicks:function(t){var e=this._interval,n=this._extent,i=this._niceExtent,r=this._intervalPrecision,o=[];if(!e)return o;var a=1e4;n[0]<i[0]&&o.push(t?Vx(i[0]-e,r):n[0]);for(var s=i[0];s<=i[1]&&(o.push(s),s=Vx(s+e,r),s!==o[o.length-1]);)if(o.length>a)return[];var l=o.length?o[o.length-1]:i[1];return n[1]>l&&o.push(t?Vx(l+e,r):n[1]),o},getMinorTicks:function(t){for(var e=this.getTicks(!0),n=[],i=this.getExtent(),r=1;r<e.length;r++){for(var o=e[r],a=e[r-1],s=0,l=[],u=o-a,h=u/t;t-1>s;){var c=ba(a+(s+1)*h);c>i[0]&&c<i[1]&&l.push(c),s++}n.push(l)}return n},getLabel:function(t,e){if(null==t)return"";var n=e&&e.precision;return null==n?n=Ca(t)||0:"auto"===n&&(n=this._intervalPrecision),t=Vx(t,n,!0),Ra(t)},niceTicks:function(t,e,n){t=t||5;var i=this._extent,r=i[1]-i[0];if(isFinite(r)){0>r&&(r=-r,i.reverse());var o=gh(i,t,e,n);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 n=e[0];t.fixMax?e[0]-=n/2:(e[1]+=n/2,e[0]-=n/2)}else e[1]=1;var i=e[1]-e[0];isFinite(i)||(e[0]=0,e[1]=1),this.niceTicks(t.splitNumber,t.minInterval,t.maxInterval);var r=this._interval;t.fixMin||(e[0]=Vx(Math.floor(e[0]/r)*r)),t.fixMax||(e[1]=Vx(Math.ceil(e[1]/r)*r))}});Gx.create=function(){return new Gx};var Wx="__ec_stack_",Xx=.5,Yx="undefined"!=typeof Float32Array?Float32Array:Array,Ux=({seriesType:"bar",plan:$y(),reset:function(t){function e(t,e){for(var n,d=t.count,f=new Yx(2*d),p=new Yx(2*d),g=new Yx(d),v=[],m=[],y=0,_=0;null!=(n=t.next());)m[h]=e.get(s,n),m[1-h]=e.get(l,n),v=i.dataToPoint(m,null,v),p[y]=u?r.x+r.width:v[0],f[y++]=v[0],p[y]=u?v[1]:r.y+r.height,f[y++]=v[1],g[_++]=n;e.setLayout({largePoints:f,largeDataIndices:g,largeBackgroundPoints:p,barWidth:c,valueAxisStart:kh(o,a,!1),backgroundStart:u?r.x:r.y,valueAxisHorizontal:u})}if(Th(t)&&Ih(t)){var n=t.getData(),i=t.coordinateSystem,r=i.grid.getRect(),o=i.getBaseAxis(),a=i.getOtherAxis(o),s=n.mapDimension(a.dim),l=n.mapDimension(o.dim),u=a.isHorizontal(),h=u?0:1,c=Ch(Sh([t]),o,t).width;return c>Xx||(c=Xx),{progress:e}}}},Gx.prototype),jx=Math.ceil,qx=Math.floor,Zx=1e3,Kx=60*Zx,$x=60*Kx,Qx=24*$x,Jx=function(t,e,n,i){for(;i>n;){var r=n+i>>>1;t[r][1]<e?n=r+1:i=r}return n},tw=Gx.extend({type:"time",getLabel:function(t){var e=this._stepLvl,n=new Date(t);return Xa(e[0],n,this.getSetting("useUTC"))},niceExtent:function(t){var e=this._extent;if(e[0]===e[1]&&(e[0]-=Qx,e[1]+=Qx),e[1]===-1/0&&1/0===e[0]){var n=new Date;e[1]=+new Date(n.getFullYear(),n.getMonth(),n.getDate()),e[0]=e[1]-Qx}this.niceTicks(t.splitNumber,t.minInterval,t.maxInterval);var i=this._interval;t.fixMin||(e[0]=ba(qx(e[0]/i)*i)),t.fixMax||(e[1]=ba(jx(e[1]/i)*i))},niceTicks:function(t,e,n){t=t||10;var i=this._extent,r=i[1]-i[0],o=r/t;null!=e&&e>o&&(o=e),null!=n&&o>n&&(o=n);var a=ew.length,s=Jx(ew,o,0,a),l=ew[Math.min(s,a-1)],u=l[1];if("year"===l[0]){var h=r/u,c=La(h/t,!0);u*=c}var d=this.getSetting("useUTC")?0:60*new Date(+i[0]||+i[1]).getTimezoneOffset()*1e3,f=[Math.round(jx((i[0]-d)/u)*u+d),Math.round(qx((i[1]-d)/u)*u+d)];yh(f,i),this._stepLvl=l,this._interval=u,this._niceExtent=f},parse:function(t){return+Aa(t)}});f(["contain","normalize"],function(t){tw.prototype[t]=function(e){return Ux[t].call(this,this.parse(e))}});var ew=[["hh:mm:ss",Zx],["hh:mm:ss",5*Zx],["hh:mm:ss",10*Zx],["hh:mm:ss",15*Zx],["hh:mm:ss",30*Zx],["hh:mm\nMM-dd",Kx],["hh:mm\nMM-dd",5*Kx],["hh:mm\nMM-dd",10*Kx],["hh:mm\nMM-dd",15*Kx],["hh:mm\nMM-dd",30*Kx],["hh:mm\nMM-dd",$x],["hh:mm\nMM-dd",2*$x],["hh:mm\nMM-dd",6*$x],["hh:mm\nMM-dd",12*$x],["MM-dd\nyyyy",Qx],["MM-dd\nyyyy",2*Qx],["MM-dd\nyyyy",3*Qx],["MM-dd\nyyyy",4*Qx],["MM-dd\nyyyy",5*Qx],["MM-dd\nyyyy",6*Qx],["week",7*Qx],["MM-dd\nyyyy",10*Qx],["week",14*Qx],["week",21*Qx],["month",31*Qx],["week",42*Qx],["month",62*Qx],["week",70*Qx],["quarter",95*Qx],["month",31*Qx*4],["month",31*Qx*5],["half-year",380*Qx/2],["month",31*Qx*8],["month",31*Qx*10],["year",380*Qx]];tw.create=function(t){return new tw({useUTC:t.ecModel.get("useUTC")})};var nw=ch.prototype,iw=Gx.prototype,rw=Ca,ow=ba,aw=Math.floor,sw=Math.ceil,lw=Math.pow,uw=Math.log,hw=ch.extend({type:"log",base:10,$constructor:function(){ch.apply(this,arguments),this._originalScale=new Gx},getTicks:function(t){var e=this._originalScale,n=this._extent,i=e.getExtent();return p(iw.getTicks.call(this,t),function(t){var r=ba(lw(this.base,t));return r=t===n[0]&&e.__fixMin?Dh(r,i[0]):r,r=t===n[1]&&e.__fixMax?Dh(r,i[1]):r},this)},getMinorTicks:iw.getMinorTicks,getLabel:iw.getLabel,scale:function(t){return t=nw.scale.call(this,t),lw(this.base,t)},setExtent:function(t,e){var n=this.base;t=uw(t)/uw(n),e=uw(e)/uw(n),iw.setExtent.call(this,t,e)},getExtent:function(){var t=this.base,e=nw.getExtent.call(this);e[0]=lw(t,e[0]),e[1]=lw(t,e[1]);var n=this._originalScale,i=n.getExtent();return n.__fixMin&&(e[0]=Dh(e[0],i[0])),n.__fixMax&&(e[1]=Dh(e[1],i[1])),e},unionExtent:function(t){this._originalScale.unionExtent(t);var e=this.base;t[0]=uw(t[0])/uw(e),t[1]=uw(t[1])/uw(e),nw.unionExtent.call(this,t)},unionExtentFromData:function(t,e){this.unionExtent(t.getApproximateExtent(e))},niceTicks:function(t){t=t||10;var e=this._extent,n=e[1]-e[0];if(!(1/0===n||0>=n)){var i=Pa(n),r=t/n*i;for(.5>=r&&(i*=10);!isNaN(i)&&Math.abs(i)<1&&Math.abs(i)>0;)i*=10;var o=[ba(sw(e[0]/i)*i),ba(aw(e[1]/i)*i)];this._interval=i,this._niceExtent=o}},niceExtent:function(t){iw.niceExtent.call(this,t);var e=this._originalScale;e.__fixMin=t.fixMin,e.__fixMax=t.fixMax}});f(["contain","normalize"],function(t){hw.prototype[t]=function(e){return e=uw(e)/uw(this.base),nw[t].call(this,e)}}),hw.create=function(){return new hw};var cw={getMin:function(t){var e=this.option,n=t||null==e.rangeStart?e.min:e.rangeStart;return this.axis&&null!=n&&"dataMin"!==n&&"function"!=typeof n&&!I(n)&&(n=this.axis.scale.parse(n)),n},getMax:function(t){var e=this.option,n=t||null==e.rangeEnd?e.max:e.rangeEnd;return this.axis&&null!=n&&"dataMax"!==n&&"function"!=typeof n&&!I(n)&&(n=this.axis.scale.parse(n)),n},getNeedCrossZero:function(){var t=this.option;return null!=t.rangeStart||null!=t.rangeEnd?!1:!t.scale},getCoordSysModel:H,setRange:function(t,e){this.option.rangeStart=t,this.option.rangeEnd=e},resetRange:function(){this.option.rangeStart=this.option.rangeEnd=null}},dw=go({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var n=e.cx,i=e.cy,r=e.width/2,o=e.height/2;t.moveTo(n,i-o),t.lineTo(n+r,i+o),t.lineTo(n-r,i+o),t.closePath()}}),fw=go({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var n=e.cx,i=e.cy,r=e.width/2,o=e.height/2;t.moveTo(n,i-o),t.lineTo(n+r,i),t.lineTo(n,i+o),t.lineTo(n-r,i),t.closePath()}}),pw=go({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var n=e.x,i=e.y,r=e.width/5*3,o=Math.max(r,e.height),a=r/2,s=a*a/(o-a),l=i-o+a+s,u=Math.asin(s/a),h=Math.cos(u)*a,c=Math.sin(u),d=Math.cos(u),f=.6*a,p=.7*a;t.moveTo(n-h,l+s),t.arc(n,l,a,Math.PI-u,2*Math.PI+u),t.bezierCurveTo(n+h-c*f,l+s+d*f,n,i-p,n,i),t.bezierCurveTo(n,i-p,n-h+c*f,l+s+d*f,n-h,l+s),t.closePath()}}),gw=go({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var n=e.height,i=e.width,r=e.x,o=e.y,a=i/3*2;t.moveTo(r,o),t.lineTo(r+a,o+n),t.lineTo(r,o+n/4*3),t.lineTo(r-a,o+n),t.lineTo(r,o),t.closePath()}}),vw={line:fm,rect:cm,roundRect:cm,square:cm,circle:tm,diamond:fw,pin:pw,arrow:gw,triangle:dw},mw={line:function(t,e,n,i,r){r.x1=t,r.y1=e+i/2,r.x2=t+n,r.y2=e+i/2},rect:function(t,e,n,i,r){r.x=t,r.y=e,r.width=n,r.height=i},roundRect:function(t,e,n,i,r){r.x=t,r.y=e,r.width=n,r.height=i,r.r=Math.min(n,i)/4},square:function(t,e,n,i,r){var o=Math.min(n,i);r.x=t,r.y=e,r.width=o,r.height=o},circle:function(t,e,n,i,r){r.cx=t+n/2,r.cy=e+i/2,r.r=Math.min(n,i)/2},diamond:function(t,e,n,i,r){r.cx=t+n/2,r.cy=e+i/2,r.width=n,r.height=i},pin:function(t,e,n,i,r){r.x=t+n/2,r.y=e+i/2,r.width=n,r.height=i},arrow:function(t,e,n,i,r){r.x=t+n/2,r.y=e+i/2,r.width=n,r.height=i},triangle:function(t,e,n,i,r){r.cx=t+n/2,r.cy=e+i/2,r.width=n,r.height=i}},yw={};f(vw,function(t,e){yw[e]=new t});var _w=go({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(t,e,n){var i=Kn(t,e,n),r=this.shape;return r&&"pin"===r.symbolType&&"inside"===e.textPosition&&(i.y=n.y+.4*n.height),i},buildPath:function(t,e,n){var i=e.symbolType;if("none"!==i){var r=yw[i];r||(i="rect",r=yw[i]),mw[i](e.x,e.y,e.width,e.height,r.shape),r.buildPath(t,r.shape,n)}}}),xw={isDimensionStacked:ah,enableDataStack:oh,getStackedDimension:sh},ww=(Object.freeze||Object)({createList:Wh,getLayoutRect:Za,dataStack:xw,createScale:Xh,mixinAxisModelCommonMethods:Yh,completeDimensions:Ju,createDimensions:Ex,createSymbol:Gh}),bw=1e-8;qh.prototype={constructor:qh,properties:null,getBoundingRect:function(){var t=this._rect;
  10. if(t)return t;for(var e=Number.MAX_VALUE,n=[e,e],i=[-e,-e],r=[],o=[],a=this.geometries,s=0;s<a.length;s++)if("polygon"===a[s].type){var l=a[s].exterior;Er(l,r,o),ae(n,n,r),se(i,i,o)}return 0===s&&(n[0]=n[1]=i[0]=i[1]=0),this._rect=new Tn(n[0],n[1],i[0]-n[0],i[1]-n[1])},contain:function(t){var e=this.getBoundingRect(),n=this.geometries;if(!e.contain(t[0],t[1]))return!1;t:for(var i=0,r=n.length;r>i;i++)if("polygon"===n[i].type){var o=n[i].exterior,a=n[i].interiors;if(jh(o,t[0],t[1])){for(var s=0;s<(a?a.length:0);s++)if(jh(a[s]))continue t;return!0}}return!1},transformTo:function(t,e,n,i){var r=this.getBoundingRect(),o=r.width/r.height;n?i||(i=n/o):n=o*i;for(var a=new Tn(t,e,n,i),s=r.calculateTransform(a),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)}r=this._rect,r.copy(a),this.center=[r.x+r.width/2,r.y+r.height/2]},cloneShallow:function(t){null==t&&(t=this.name);var e=new qh(t,this.geometries,this.center);return e._rect=this._rect,e.transformTo=null,e}};var Sw=function(t){return Zh(t),p(v(t.features,function(t){return t.geometry&&t.properties&&t.geometry.coordinates.length>0}),function(t){var e=t.properties,n=t.geometry,i=n.coordinates,r=[];"Polygon"===n.type&&r.push({type:"polygon",exterior:i[0],interiors:i.slice(1)}),"MultiPolygon"===n.type&&f(i,function(t){t[0]&&r.push({type:"polygon",exterior:t[0],interiors:t.slice(1)})});var o=new qh(e.name,r,e.cp);return o.properties=e,o})},Mw=lr(),Cw=[0,1],Tw=function(t,e,n){this.dim=t,this.scale=e,this._extent=n||[0,0],this.inverse=!1,this.onBand=!1};Tw.prototype={constructor:Tw,contain:function(t){var e=this._extent,n=Math.min(e[0],e[1]),i=Math.max(e[0],e[1]);return t>=n&&i>=t},containData:function(t){return this.scale.contain(t)},getExtent:function(){return this._extent.slice()},getPixelPrecision:function(t){return Ta(t||this.scale.getExtent(),this._extent)},setExtent:function(t,e){var n=this._extent;n[0]=t,n[1]=e},dataToCoord:function(t,e){var n=this._extent,i=this.scale;return t=i.normalize(t),this.onBand&&"ordinal"===i.type&&(n=n.slice(),cc(n,i.count())),xa(t,Cw,n,e)},coordToData:function(t,e){var n=this._extent,i=this.scale;this.onBand&&"ordinal"===i.type&&(n=n.slice(),cc(n,i.count()));var r=xa(t,n,Cw,e);return this.scale.scale(r)},pointToData:function(){},getTicksCoords:function(t){t=t||{};var e=t.tickModel||this.getTickModel(),n=Qh(this,e),i=n.ticks,r=p(i,function(t){return{coord:this.dataToCoord(t),tickValue:t}},this),o=e.get("alignWithLabel");return dc(this,r,o,t.clamp),r},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 n=this.scale.getMinorTicks(e),i=p(n,function(t){return p(t,function(t){return{coord:this.dataToCoord(t),tickValue:t}},this)},this);return i},getViewLabels:function(){return $h(this).labels},getLabelModel:function(){return this.model.getModel("axisLabel")},getTickModel:function(){return this.model.getModel("axisTick")},getBandWidth:function(){var t=this._extent,e=this.scale.getExtent(),n=e[1]-e[0]+(this.onBand?1:0);0===n&&(n=1);var i=Math.abs(t[1]-t[0]);return Math.abs(i)/n},isHorizontal:null,getRotate:null,calculateCategoryInterval:function(){return sc(this)}};var Iw=Sw,kw={};f(["map","each","filter","indexOf","inherits","reduce","filter","bind","curry","isArray","isString","isObject","isFunction","extend","defaults","clone","merge"],function(t){kw[t]=Nf[t]});var Dw={};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){Dw[t]=zm[t]}),qy.extend({type:"series.line",dependencies:["grid","polar"],getInitialData:function(){return lh(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 Aw=pc.prototype,Pw=pc.getSymbolSize=function(t,e){var n=t.getItemVisual(e,"symbolSize");return n instanceof Array?n.slice():[+n,+n]};Aw._createSymbol=function(t,e,n,i,r){this.removeAll();var o=e.getItemVisual(n,"color"),a=Gh(t,-1,-1,2,2,o,r);a.attr({z2:100,culling:!0,scale:gc(i)}),a.drift=vc,this._symbolType=t,this.add(a)},Aw.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(t)},Aw.getSymbolPath=function(){return this.childAt(0)},Aw.getScale=function(){return this.childAt(0).scale},Aw.highlight=function(){this.childAt(0).trigger("emphasis")},Aw.downplay=function(){this.childAt(0).trigger("normal")},Aw.setZ=function(t,e){var n=this.childAt(0);n.zlevel=t,n.z=e},Aw.setDraggable=function(t){var e=this.childAt(0);e.draggable=t,e.cursor=t?"move":e.cursor},Aw.updateData=function(t,e,n){this.silent=!1;var i=t.getItemVisual(e,"symbol")||"circle",r=t.hostModel,o=Pw(t,e),a=i!==this._symbolType;if(a){var s=t.getItemVisual(e,"symbolKeepAspect");this._createSymbol(i,t,e,o,s)}else{var l=this.childAt(0);l.silent=!1,ta(l,{scale:gc(o)},r,e)}if(this._updateCommon(t,e,o,n),a){var l=this.childAt(0),u=n&&n.fadeIn,h={scale:l.scale.slice()};u&&(h.style={opacity:l.style.opacity}),l.scale=[0,0],u&&(l.style.opacity=0),ea(l,h,r,e)}this._seriesModel=r};var Ow=["itemStyle"],Lw=["emphasis","itemStyle"],Bw=["label"],Ew=["emphasis","label"];Aw._updateCommon=function(t,e,n,i){function r(e){return b?t.getName(e):fc(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=i&&i.itemStyle,h=i&&i.hoverItemStyle,c=i&&i.symbolRotate,d=i&&i.symbolOffset,f=i&&i.labelModel,p=i&&i.hoverLabelModel,g=i&&i.hoverAnimation,v=i&&i.cursorStyle;if(!i||t.hasItemOption){var m=i&&i.itemModel?i.itemModel:t.getItemModel(e);u=m.getModel(Ow).getItemStyle(["color"]),h=m.getModel(Lw).getItemStyle(),c=m.getShallow("symbolRotate"),d=m.getShallow("symbolOffset"),f=m.getModel(Bw),p=m.getModel(Ew),g=m.getShallow("hoverAnimation"),v=m.getShallow("cursor")}else h=a({},h);var y=o.style;o.attr("rotation",(c||0)*Math.PI/180||0),d&&o.attr("position",[wa(d[0],n[0]),wa(d[1],n[1])]),v&&o.attr("cursor",v),o.setColor(l,i&&i.symbolInnerColor),o.setStyle(u);var _=t.getItemVisual(e,"opacity");null!=_&&(y.opacity=_);var x=t.getItemVisual(e,"liftZ"),w=o.__z2Origin;null!=x?null==w&&(o.__z2Origin=o.z2,o.z2+=x):null!=w&&(o.z2=w,o.__z2Origin=null);var b=i&&i.useNameLabel;Go(y,h,f,p,{labelFetcher:s,labelDataIndex:e,defaultText:r,isRectText:!0,autoColor:l}),o.__symbolOriginalScale=gc(n),o.hoverStyle=h,o.highDownOnUpdate=g&&s.isAnimationEnabled()?mc:null,No(o)},Aw.fadeOut=function(t,e){var n=this.childAt(0);this.silent=n.silent=!0,!(e&&e.keepLabel)&&(n.style.text=null),ta(n,{style:{opacity:0},scale:[0,0]},this._seriesModel,this.dataIndex,t)},h(pc,Np);var zw=yc.prototype;zw.updateData=function(t,e){e=xc(e);var n=this.group,i=t.hostModel,r=this._data,o=this._symbolCtor,a=wc(t);r||n.removeAll(),t.diff(r).add(function(i){var r=t.getItemLayout(i);if(_c(t,r,i,e)){var s=new o(t,i,a);s.attr("position",r),t.setItemGraphicEl(i,s),n.add(s)}}).update(function(s,l){var u=r.getItemGraphicEl(l),h=t.getItemLayout(s);return _c(t,h,s,e)?(u?(u.updateData(t,s,a),ta(u,{position:h},i)):(u=new o(t,s),u.attr("position",h)),n.add(u),void t.setItemGraphicEl(s,u)):void n.remove(u)}).remove(function(t){var e=r.getItemGraphicEl(t);e&&e.fadeOut(function(){n.remove(e)})}).execute(),this._data=t},zw.isPersistent=function(){return!0},zw.updateLayout=function(){var t=this._data;t&&t.eachItemGraphicEl(function(e,n){var i=t.getItemLayout(n);e.attr("position",i)})},zw.incrementalPrepareUpdate=function(t){this._seriesScope=wc(t),this._data=null,this.group.removeAll()},zw.incrementalUpdate=function(t,e,n){function i(t){t.isGroup||(t.incremental=t.useHoverLayer=!0)}n=xc(n);for(var r=t.start;r<t.end;r++){var o=e.getItemLayout(r);if(_c(e,o,r,n)){var a=new this._symbolCtor(e,r,this._seriesScope);a.traverse(i),a.attr("position",o),this.group.add(a),e.setItemGraphicEl(r,a)}}},zw.remove=function(t){var e=this.group,n=this._data;n&&t?n.eachItemGraphicEl(function(t){t.fadeOut(function(){e.remove(t)})}):e.removeAll()};var Rw=function(t,e,n,i,r,o,a,s){for(var l=Cc(t,e),u=[],h=[],c=[],d=[],f=[],p=[],g=[],v=bc(r,e,a),m=bc(o,t,s),y=0;y<l.length;y++){var _=l[y],x=!0;switch(_.cmd){case"=":var w=t.getItemLayout(_.idx),b=e.getItemLayout(_.idx1);(isNaN(w[0])||isNaN(w[1]))&&(w=b.slice()),u.push(w),h.push(b),c.push(n[_.idx]),d.push(i[_.idx1]),g.push(e.getRawIndex(_.idx1));break;case"+":var S=_.idx;u.push(r.dataToPoint([e.get(v.dataDimsForPoint[0],S),e.get(v.dataDimsForPoint[1],S)])),h.push(e.getItemLayout(S).slice()),c.push(Mc(v,r,e,S)),d.push(i[S]),g.push(e.getRawIndex(S));break;case"-":var S=_.idx,M=t.getRawIndex(S);M!==S?(u.push(t.getItemLayout(S)),h.push(o.dataToPoint([t.get(m.dataDimsForPoint[0],S),t.get(m.dataDimsForPoint[1],S)])),c.push(n[S]),d.push(Mc(m,o,t,S)),g.push(M)):x=!1}x&&(f.push(_),p.push(p.length))}p.sort(function(t,e){return g[t]-g[e]});for(var C=[],T=[],I=[],k=[],D=[],y=0;y<p.length;y++){var S=p[y];C[y]=u[S],T[y]=h[S],I[y]=c[S],k[y]=d[S],D[y]=f[S]}return{current:C,next:T,stackedOnCurrent:I,stackedOnNext:k,status:D}},Nw=ae,Fw=se,Hw=U,Vw=G,Gw=[],Ww=[],Xw=[],Yw=to.extend({type:"ec-polyline",shape:{points:[],smooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},style:{fill:null,stroke:"#000"},brush:nm(to.prototype.brush),buildPath:function(t,e){var n=e.points,i=0,r=n.length,o=Ac(n,e.smoothConstraint);if(e.connectNulls){for(;r>0&&Tc(n[r-1]);r--);for(;r>i&&Tc(n[i]);i++);}for(;r>i;)i+=Ic(t,n,i,r,r,1,o.min,o.max,e.smooth,e.smoothMonotone,e.connectNulls)+1}}),Uw=to.extend({type:"ec-polygon",shape:{points:[],stackedOnPoints:[],smooth:0,stackedOnSmooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},brush:nm(to.prototype.brush),buildPath:function(t,e){var n=e.points,i=e.stackedOnPoints,r=0,o=n.length,a=e.smoothMonotone,s=Ac(n,e.smoothConstraint),l=Ac(i,e.smoothConstraint);if(e.connectNulls){for(;o>0&&Tc(n[o-1]);o--);for(;o>r&&Tc(n[r]);r++);}for(;o>r;){var u=Ic(t,n,r,o,o,1,s.min,s.max,e.smooth,a,e.connectNulls);Ic(t,i,r+u-1,u,o,-1,l.min,l.max,e.stackedOnSmooth,a,e.connectNulls),r+=u+1,t.closePath()}}});sl.extend({type:"line",init:function(){var t=new Np,e=new yc;this.group.add(e.group),this._symbolDraw=e,this._lineGroup=t},render:function(t,e,n){var i=t.coordinateSystem,r=this.group,o=t.getData(),a=t.getModel("lineStyle"),l=t.getModel("areaStyle"),u=o.mapArray(o.getItemLayout),h="polar"===i.type,c=this._coordSys,d=this._symbolDraw,f=this._polyline,p=this._polygon,g=this._lineGroup,v=t.get("animation"),m=!l.isEmpty(),y=l.get("origin"),_=bc(i,o,y),x=Ec(i,o,_),w=t.get("showSymbol"),b=w&&!h&&Nc(t,o,i),S=this._data;S&&S.eachItemGraphicEl(function(t,e){t.__temp&&(r.remove(t),S.setItemGraphicEl(e,null))}),w||d.remove(),r.add(g);var M,C=!h&&t.get("step");i&&i.getArea&&t.get("clip",!0)&&(M=i.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===i.type&&C===this._step?(m&&!p?p=this._newPolygon(u,x,i,v):p&&!m&&(g.remove(p),p=this._polygon=null),g.setClipPath(Hc(i,!1,t)),w&&d.updateData(o,{isIgnore:b,clipShape:M}),o.eachItemGraphicEl(function(t){t.stopAnimation(!0)}),Lc(this._stackedOnPoints,x)&&Lc(this._points,u)||(v?this._updateAnimation(o,x,i,n,C,y):(C&&(u=zc(u,i,C),x=zc(x,i,C)),f.setShape({points:u}),p&&p.setShape({points:u,stackedOnPoints:x})))):(w&&d.updateData(o,{isIgnore:b,clipShape:M}),C&&(u=zc(u,i,C),x=zc(x,i,C)),f=this._newPolyline(u,i,v),m&&(p=this._newPolygon(u,x,i,v)),g.setClipPath(Hc(i,!0,t)));var T=Rc(o,i)||o.getVisual("color");f.useStyle(s(a.getLineStyle(),{fill:"none",stroke:T,lineJoin:"bevel"}));var I=t.get("smooth");if(I=Bc(t.get("smooth")),f.setShape({smooth:I,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")}),p){var k=o.getCalculationInfo("stackedOnSeries"),D=0;p.useStyle(s(l.getAreaStyle(),{fill:T,opacity:.7,lineJoin:"bevel"})),k&&(D=Bc(k.get("smooth"))),p.setShape({smooth:I,stackedOnSmooth:D,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")})}this._data=o,this._coordSys=i,this._stackedOnPoints=x,this._points=u,this._step=C,this._valueOrigin=y},dispose:function(){},highlight:function(t,e,n,i){var r=t.getData(),o=sr(r,i);if(!(o instanceof Array)&&null!=o&&o>=0){var a=r.getItemGraphicEl(o);if(!a){var s=r.getItemLayout(o);if(!s)return;if(this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(s[0],s[1]))return;a=new pc(r,o),a.position=s,a.setZ(t.get("zlevel"),t.get("z")),a.ignore=isNaN(s[0])||isNaN(s[1]),a.__temp=!0,r.setItemGraphicEl(o,a),a.stopSymbolAnimation(!0),this.group.add(a)}a.highlight()}else sl.prototype.highlight.call(this,t,e,n,i)},downplay:function(t,e,n,i){var r=t.getData(),o=sr(r,i);if(null!=o&&o>=0){var a=r.getItemGraphicEl(o);a&&(a.__temp?(r.setItemGraphicEl(o,null),this.group.remove(a)):a.downplay())}else sl.prototype.downplay.call(this,t,e,n,i)},_newPolyline:function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new Yw({shape:{points:t},silent:!0,z2:10}),this._lineGroup.add(e),this._polyline=e,e},_newPolygon:function(t,e){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new Uw({shape:{points:t,stackedOnPoints:e},silent:!0}),this._lineGroup.add(n),this._polygon=n,n},_updateAnimation:function(t,e,n,i,r,o){var a=this._polyline,s=this._polygon,l=t.hostModel,u=Rw(this._data,t,this._stackedOnPoints,e,this._coordSys,n,this._valueOrigin,o),h=u.current,c=u.stackedOnCurrent,d=u.next,f=u.stackedOnNext;r&&(h=zc(u.current,n,r),c=zc(u.stackedOnCurrent,n,r),d=zc(u.next,n,r),f=zc(u.stackedOnNext,n,r)),a.shape.__points=u.current,a.shape.points=h,ta(a,{shape:{points:d}},l),s&&(s.setShape({points:h,stackedOnPoints:c}),ta(s,{shape:{points:d,stackedOnPoints:f}},l));for(var p=[],g=u.status,v=0;v<g.length;v++){var m=g[v].cmd;if("="===m){var y=t.getItemGraphicEl(g[v].idx1);y&&p.push({el:y,ptIdx:v})}}a.animators&&a.animators.length&&a.animators[0].during(function(){for(var t=0;t<p.length;t++){var e=p[t].el;e.attr("position",a.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(n,i){n.__temp&&(t.remove(n),e.setItemGraphicEl(i,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._data=null}});var jw=function(t,e,n){return{seriesType:t,performRawSeries:!0,reset:function(t,i){function r(e,n){if(c){var i=t.getRawValue(n),r=t.getDataParams(n);u&&e.setItemVisual(n,"symbol",a(i,r)),h&&e.setItemVisual(n,"symbolSize",s(i,r))}if(e.hasItemOption){var o=e.getItemModel(n),l=o.getShallow("symbol",!0),d=o.getShallow("symbolSize",!0),f=o.getShallow("symbolKeepAspect",!0);null!=l&&e.setItemVisual(n,"symbol",l),null!=d&&e.setItemVisual(n,"symbolSize",d),null!=f&&e.setItemVisual(n,"symbolKeepAspect",f)}}var o=t.getData(),a=t.get("symbol"),s=t.get("symbolSize"),l=t.get("symbolKeepAspect"),u=w(a),h=w(s),c=u||h,d=!u&&a?a:e,f=h?null:s;return o.setVisual({legendSymbol:n||d,symbol:d,symbolSize:f,symbolKeepAspect:l}),i.isSeriesFiltered(t)?void 0:{dataEach:o.hasItemOption||c?r:null}}}},qw=function(t){return{seriesType:t,plan:$y(),reset:function(t){function e(t,e){for(var n=t.end-t.start,r=o&&new Float32Array(n*s),l=t.start,u=0,h=[],c=[];l<t.end;l++){var d;if(1===s){var f=e.get(a[0],l);d=!isNaN(f)&&i.dataToPoint(f,null,c)}else{var f=h[0]=e.get(a[0],l),p=h[1]=e.get(a[1],l);d=!isNaN(f)&&!isNaN(p)&&i.dataToPoint(h,null,c)}o?(r[u++]=d?d[0]:0/0,r[u++]=d?d[1]:0/0):e.setItemLayout(l,d&&d.slice()||[0/0,0/0])}o&&e.setLayout("symbolPoints",r)}var n=t.getData(),i=t.coordinateSystem,r=t.pipelineContext,o=r.large;if(i){var a=p(i.dimensions,function(t){return n.mapDimension(t)}).slice(0,2),s=a.length,l=n.getCalculationInfo("stackResultDimension");return ah(n,a[0])&&(a[0]=l),ah(n,a[1])&&(a[1]=l),s&&{progress:e}}}}},Zw={average:function(t){for(var e=0,n=0,i=0;i<t.length;i++)isNaN(t[i])||(e+=t[i],n++);return 0===n?0/0:e/n},sum:function(t){for(var e=0,n=0;n<t.length;n++)e+=t[n]||0;return e},max:function(t){for(var e=-1/0,n=0;n<t.length;n++)t[n]>e&&(e=t[n]);return isFinite(e)?e:0/0},min:function(t){for(var e=1/0,n=0;n<t.length;n++)t[n]<e&&(e=t[n]);return isFinite(e)?e:0/0},nearest:function(t){return t[0]}},Kw=function(t){return Math.round(t.length/2)},$w=function(t){return{seriesType:t,modifyOutputEnd:!0,reset:function(t){var e=t.getData(),n=t.get("sampling"),i=t.coordinateSystem;if("cartesian2d"===i.type&&n){var r=i.getBaseAxis(),o=i.getOtherAxis(r),a=r.getExtent(),s=a[1]-a[0],l=Math.round(e.count()/s);if(l>1){var u;"string"==typeof n?u=Zw[n]:"function"==typeof n&&(u=n),u&&t.setData(e.downSample(e.mapDimension(o.dim),1/l,u,Kw))}}}}},Qw=function(t){this._axes={},this._dimList=[],this.name=t||""};Qw.prototype={constructor:Qw,type:"cartesian",getAxis:function(t){return this._axes[t]},getAxes:function(){return p(this._dimList,Vc,this)},getAxesByScale:function(t){return t=t.toLowerCase(),v(this.getAxes(),function(e){return e.scale.type===t})},addAxis:function(t){var e=t.dim;this._axes[e]=t,this._dimList.push(e)},dataToCoord:function(t){return this._dataCoordConvert(t,"dataToCoord")},coordToData:function(t){return this._dataCoordConvert(t,"coordToData")},_dataCoordConvert:function(t,e){for(var n=this._dimList,i=t instanceof Array?[]:{},r=0;r<n.length;r++){var o=n[r],a=this._axes[o];i[o]=a[e](t[o])}return i}},Gc.prototype={constructor:Gc,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"),n=this.getAxis("y");return e.contain(e.toLocalCoord(t[0]))&&n.contain(n.toLocalCoord(t[1]))},containData:function(t){return this.getAxis("x").containData(t[0])&&this.getAxis("y").containData(t[1])},dataToPoint:function(t,e,n){var i=this.getAxis("x"),r=this.getAxis("y");return n=n||[],n[0]=i.toGlobalCoord(i.dataToCoord(t[0])),n[1]=r.toGlobalCoord(r.dataToCoord(t[1])),n},clampData:function(t,e){var n=this.getAxis("x").scale,i=this.getAxis("y").scale,r=n.getExtent(),o=i.getExtent(),a=n.parse(t[0]),s=i.parse(t[1]);return e=e||[],e[0]=Math.min(Math.max(Math.min(r[0],r[1]),a),Math.max(r[0],r[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 n=this.getAxis("x"),i=this.getAxis("y");return e=e||[],e[0]=n.coordToData(n.toLocalCoord(t[0])),e[1]=i.coordToData(i.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(),n=Math.min(t[0],t[1]),i=Math.min(e[0],e[1]),r=Math.max(t[0],t[1])-n,o=Math.max(e[0],e[1])-i,a=new Tn(n,i,r,o);return a}},h(Gc,Qw);var Jw=function(t,e,n,i,r){Tw.call(this,t,e,n),this.type=i||"value",this.position=r||"bottom"};Jw.prototype={constructor:Jw,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(Jw,Tw);var tb={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)"]}}},eb={};eb.categoryAxis=r({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},tb),eb.valueAxis=r({boundaryGap:[0,0],splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#eee",width:1}}},tb),eb.timeAxis=s({scale:!0,min:"dataMin",max:"dataMax"},eb.valueAxis),eb.logAxis=s({scale:!0,logBase:10},eb.valueAxis);var nb=["value","category","time","log"],ib=function(t,e,n,i){f(nb,function(a){e.extend({type:t+"Axis."+a,mergeDefaultAndTheme:function(e,i){var o=this.layoutMode,s=o?$a(e):{},l=i.getTheme();r(e,l.get(a+"Axis")),r(e,this.getDefaultOption()),e.type=n(t,e),o&&Ka(e,s,o)},optionUpdated:function(){var t=this.option;"category"===t.type&&(this.__ordinalMeta=dh.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([{},eb[a+"Axis"],i],!0)})}),sy.registerSubTypeDefaulter(t+"Axis",_(n,t))},rb=sy.extend({type:"cartesian2dAxis",axis:null,init:function(){rb.superApply(this,"init",arguments),this.resetRange()},mergeOption:function(){rb.superApply(this,"mergeOption",arguments),this.resetRange()},restoreData:function(){rb.superApply(this,"restoreData",arguments),this.resetRange()},getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"grid",index:this.option.gridIndex,id:this.option.gridId})[0]}});r(rb.prototype,cw);var ob={offset:0};ib("x",rb,Wc,ob),ib("y",rb,Wc,ob),sy.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 ab=Yc.prototype;ab.type="grid",ab.axisPointerEnabled=!0,ab.getRect=function(){return this._rect},ab.update=function(t,e){var n=this._axesMap;this._updateScale(t,this.model),f(n.x,function(t){Oh(t.scale,t.model)}),f(n.y,function(t){Oh(t.scale,t.model)});var i={};f(n.x,function(t){Uc(n,"y",t,i)}),f(n.y,function(t){Uc(n,"x",t,i)}),this.resize(this.model,e)},ab.resize=function(t,e,n){function i(){f(o,function(t){var e=t.isHorizontal(),n=e?[0,r.width]:[0,r.height],i=t.inverse?1:0;t.setExtent(n[i],n[1-i]),qc(t,e?r.x:r.y)})}var r=Za(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()});this._rect=r;var o=this._axesList;i(),!n&&t.get("containLabel")&&(f(o,function(t){if(!t.model.get("axisLabel.inside")){var e=Rh(t);if(e){var n=t.isHorizontal()?"height":"width",i=t.model.get("axisLabel.margin");r[n]-=e[n]+i,"top"===t.position?r.y+=e.height+i:"left"===t.position&&(r.x+=e.width+i)}}}),i())},ab.getAxis=function(t,e){var n=this._axesMap[t];if(null!=n){if(null==e)for(var i in n)if(n.hasOwnProperty(i))return n[i];return n[e]}},ab.getAxes=function(){return this._axesList.slice()},ab.getCartesian=function(t,e){if(null!=t&&null!=e){var n="x"+t+"y"+e;return this._coordsMap[n]}S(t)&&(e=t.yAxisIndex,t=t.xAxisIndex);for(var i=0,r=this._coordsList;i<r.length;i++)if(r[i].getAxis("x").index===t||r[i].getAxis("y").index===e)return r[i]},ab.getCartesians=function(){return this._coordsList.slice()},ab.convertToPixel=function(t,e,n){var i=this._findConvertTarget(t,e);return i.cartesian?i.cartesian.dataToPoint(n):i.axis?i.axis.toGlobalCoord(i.axis.dataToCoord(n)):null},ab.convertFromPixel=function(t,e,n){var i=this._findConvertTarget(t,e);return i.cartesian?i.cartesian.pointToData(n):i.axis?i.axis.coordToData(i.axis.toLocalCoord(n)):null},ab._findConvertTarget=function(t,e){var n,i,r=e.seriesModel,o=e.xAxisModel||r&&r.getReferringComponents("xAxis")[0],a=e.yAxisModel||r&&r.getReferringComponents("yAxis")[0],s=e.gridModel,l=this._coordsList;if(r)n=r.coordinateSystem,u(l,n)<0&&(n=null);else if(o&&a)n=this.getCartesian(o.componentIndex,a.componentIndex);else if(o)i=this.getAxis("x",o.componentIndex);else if(a)i=this.getAxis("y",a.componentIndex);else if(s){var h=s.coordinateSystem;h===this&&(n=this._coordsList[0])}return{cartesian:n,axis:i}},ab.containPoint=function(t){var e=this._coordsList[0];return e?e.containPoint(t):void 0},ab._initCartesian=function(t,e){function n(n){return function(a,s){if(Xc(a,t,e)){var l=a.get("position");"x"===n?"top"!==l&&"bottom"!==l&&(l=i.bottom?"top":"bottom"):"left"!==l&&"right"!==l&&(l=i.left?"right":"left"),i[l]=!0;var u=new Jw(n,Lh(a),[0,0],a.get("type"),l),h="category"===u.type;u.onBand=h&&a.get("boundaryGap"),u.inverse=a.get("inverse"),a.axis=u,u.model=a,u.grid=this,u.index=s,this._axesList.push(u),r[n][s]=u,o[n]++}}}var i={left:!1,right:!1,top:!1,bottom:!1},r={x:{},y:{}},o={x:0,y:0};return e.eachComponent("xAxis",n("x"),this),e.eachComponent("yAxis",n("y"),this),o.x&&o.y?(this._axesMap=r,void f(r.x,function(e,n){f(r.y,function(i,r){var o="x"+n+"y"+r,a=new Gc(o);a.grid=this,a.model=t,this._coordsMap[o]=a,this._coordsList.push(a),a.addAxis(e),a.addAxis(i)},this)},this)):(this._axesMap={},void(this._axesList=[]))},ab._updateScale=function(t,e){function n(t,e){f(t.mapDimension(e.dim,!0),function(n){e.scale.unionExtentFromData(t,sh(t,n))})}f(this._axesList,function(t){t.scale.setExtent(1/0,-1/0)}),t.eachSeries(function(i){if(Kc(i)){var r=Zc(i,t),o=r[0],a=r[1];if(!Xc(o,e,t)||!Xc(a,e,t))return;var s=this.getCartesian(o.componentIndex,a.componentIndex),l=i.getData(),u=s.getAxis("x"),h=s.getAxis("y");"list"===l.type&&(n(l,u,i),n(l,h,i))}},this)},ab.getTooltipAxes=function(t){var e=[],n=[];return f(this.getCartesians(),function(i){var r=null!=t&&"auto"!==t?i.getAxis(t):i.getBaseAxis(),o=i.getOtherAxis(r);u(e,r)<0&&e.push(r),u(n,o)<0&&n.push(o)}),{baseAxes:e,otherAxes:n}};var sb=["xAxis","yAxis"];Yc.create=function(t,e){var n=[];return t.eachComponent("grid",function(i,r){var o=new Yc(i,t,e);o.name="grid_"+r,o.resize(i,e,!0),i.coordinateSystem=o,n.push(o)}),t.eachSeries(function(e){if(Kc(e)){var n=Zc(e,t),i=n[0],r=n[1],o=i.getCoordSysModel(),a=o.coordinateSystem;e.coordinateSystem=a.getCartesian(i.componentIndex,r.componentIndex)}}),n},Yc.dimensions=Yc.prototype.dimensions=Gc.prototype.dimensions,bs.register("cartesian2d",Yc);var lb=Math.PI,ub=function(t,e){this.opt=e,this.axisModel=t,s(e,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0}),this.group=new Np;var n=new Np({position:e.position.slice(),rotation:e.rotation});n.updateTransform(),this._transform=n.transform,this._dumbGroup=n};ub.prototype={constructor:ub,hasBuilder:function(t){return!!hb[t]},add:function(t){hb[t].call(this)},getGroup:function(){return this.group}};var hb={axisLine:function(){var t=this.opt,e=this.axisModel;if(e.get("axisLine.show")){var n=this.axisModel.axis.getExtent(),i=this._transform,r=[n[0],0],o=[n[1],0];i&&(oe(r,r,i),oe(o,o,i));var s=a({lineCap:"round"},e.getModel("axisLine.lineStyle").getLineStyle());this.group.add(new fm({anid:"line",subPixelOptimize:!0,shape:{x1:r[0],y1:r[1],x2:o[0],y2:o[1]},style:s,strokeContainThreshold:t.strokeContainThreshold||5,silent:!0,z2:1}));var l=e.get("axisLine.symbol"),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((r[0]-o[0])*(r[0]-o[0])+(r[1]-o[1])*(r[1]-o[1]))}],function(e,n){if("none"!==l[n]&&null!=l[n]){var i=Gh(l[n],-c/2,-d/2,c,d,s.stroke,!0),o=e.r+e.offset,a=[r[0]+o*Math.cos(t.rotation),r[1]-o*Math.sin(t.rotation)];i.attr({rotation:e.rotate,position:a,silent:!0,z2:11}),this.group.add(i)}},this)}}},axisTickLabel:function(){var t=this.axisModel,e=this.opt,n=id(this,t,e),i=od(this,t,e);Qc(t,i,n),rd(this,t,e)},axisName:function(){var t=this.opt,e=this.axisModel,n=k(t.axisName,e.get("name"));if(n){var i,r=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"===r?u[0]-h*l:"end"===r?u[1]+h*l:(u[0]+u[1])/2,ed(r)?t.labelOffset+o*l:0],d=e.get("nameRotate");null!=d&&(d=d*lb/180);var f;ed(r)?i=db(t.rotation,null!=d?d:t.rotation,o):(i=$c(t,r,d||0,u),f=t.axisNameAvailableWidth,null!=f&&(f=Math.abs(f/Math.sin(i.rotation)),!isFinite(f)&&(f=null)));var p=s.getFont(),g=e.get("nameTruncate",!0)||{},v=g.ellipsis,m=k(t.nameTruncateMaxWidth,g.maxWidth,f),y=null!=v&&null!=m?Jm(n,m,p,v,{minChar:2,placeholder:g.placeholder}):n,_=e.get("tooltip",!0),x=e.mainType,w={componentType:x,name:n,$vars:["name"]};w[x+"Index"]=e.componentIndex;var b=new Jv({anid:"name",__fullText:n,__truncatedText:y,position:c,rotation:i.rotation,silent:fb(e),z2:1,tooltip:_&&_.show?a({content:n,formatter:function(){return n},formatterParams:w},_):null});Xo(b.style,s,{text:y,textFont:p,textFill:s.getTextColor()||e.get("axisLine.lineStyle.color"),textAlign:s.get("align")||i.textAlign,textVerticalAlign:s.get("verticalAlign")||i.textVerticalAlign}),e.get("triggerEvent")&&(b.eventData=cb(e),b.eventData.targetType="axisName",b.eventData.name=n),this._dumbGroup.add(b),b.updateTransform(),this.group.add(b),b.decomposeTransform()}}},cb=ub.makeAxisEventDataBase=function(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e},db=ub.innerTextLayout=function(t,e,n){var i,r,o=ka(e-t);return Da(o)?(r=n>0?"top":"bottom",i="center"):Da(o-lb)?(r=n>0?"bottom":"top",i="center"):(r="middle",i=o>0&&lb>o?n>0?"right":"left":n>0?"left":"right"),{rotation:o,textAlign:i,textVerticalAlign:r}},fb=ub.isLabelSilent=function(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)},pb=f,gb=_,vb=Tu({type:"axis",_axisPointer:null,axisPointerClass:null,render:function(t,e,n,i){this.axisPointerClass&&dd(t),vb.superApply(this,"render",arguments),md(this,t,e,n,i,!0)},updateAxisPointer:function(t,e,n,i){md(this,t,e,n,i,!1)},remove:function(t,e){var n=this._axisPointer;n&&n.remove(e),vb.superApply(this,"remove",arguments)},dispose:function(t,e){yd(this,e),vb.superApply(this,"dispose",arguments)}}),mb=[];vb.registerAxisPointerClass=function(t,e){mb[t]=e},vb.getAxisPointerClass=function(t){return t&&mb[t]};var yb=["axisLine","axisTickLabel","axisName"],_b=["splitArea","splitLine","minorSplitLine"],xb=vb.extend({type:"cartesianAxis",axisPointerClass:"CartesianAxisPointer",render:function(t,e,n,i){this.group.removeAll();var r=this._axisGroup;if(this._axisGroup=new Np,this.group.add(this._axisGroup),t.get("show")){var o=t.getCoordSysModel(),a=_d(o,t),s=new ub(t,a);f(yb,s.add,s),this._axisGroup.add(s.getGroup()),f(_b,function(e){t.get(e+".show")&&this["_"+e](t,o)},this),oa(r,this._axisGroup,t),xb.superCall(this,"render",t,e,n,i)}},remove:function(){wd(this)},_splitLine:function(t,e){var n=t.axis;if(!n.scale.isBlank()){var i=t.getModel("splitLine"),r=i.getModel("lineStyle"),o=r.get("color");o=x(o)?o:[o];for(var a=e.coordinateSystem.getRect(),l=n.isHorizontal(),u=0,h=n.getTicksCoords({tickModel:i}),c=[],d=[],f=r.getLineStyle(),p=0;p<h.length;p++){var g=n.toGlobalCoord(h[p].coord);l?(c[0]=g,c[1]=a.y,d[0]=g,d[1]=a.y+a.height):(c[0]=a.x,c[1]=g,d[0]=a.x+a.width,d[1]=g);var v=u++%o.length,m=h[p].tickValue;this._axisGroup.add(new fm({anid:null!=m?"line_"+h[p].tickValue:null,subPixelOptimize:!0,shape:{x1:c[0],y1:c[1],x2:d[0],y2:d[1]},style:s({stroke:o[v]},f),silent:!0}))
  11. }}},_minorSplitLine:function(t,e){var n=t.axis,i=t.getModel("minorSplitLine"),r=i.getModel("lineStyle"),o=e.coordinateSystem.getRect(),a=n.isHorizontal(),s=n.getMinorTicksCoords();if(s.length)for(var l=[],u=[],h=r.getLineStyle(),c=0;c<s.length;c++)for(var d=0;d<s[c].length;d++){var f=n.toGlobalCoord(s[c][d].coord);a?(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 fm({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){xd(this,this._axisGroup,t,e)}});xb.extend({type:"xAxis"}),xb.extend({type:"yAxis"}),Tu({type:"grid",render:function(t){this.group.removeAll(),t.get("show")&&this.group.add(new cm({shape:t.coordinateSystem.getRect(),style:s({fill:t.get("backgroundColor")},t.getItemStyle()),silent:!0,z2:-1}))}}),gu(function(t){t.xAxis&&t.yAxis&&!t.grid&&(t.grid={})}),bu(jw("line","circle","line")),wu(qw("line")),vu(Q_.PROCESSOR.STATISTIC,$w("line")),Cu({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"}}}),Tu({type:"title",render:function(t,e,n){if(this.group.removeAll(),t.get("show")){var i=this.group,r=t.getModel("textStyle"),o=t.getModel("subtextStyle"),a=t.get("textAlign"),s=D(t.get("textBaseline"),t.get("textVerticalAlign")),l=new Jv({style:Xo({},r,{text:t.get("text"),textFill:r.getTextColor()},{disableBox:!0}),z2:10}),u=l.getBoundingRect(),h=t.get("subtext"),c=new Jv({style:Xo({},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,i.add(l),h&&i.add(c);var g=i.getBoundingRect(),v=t.getBoxLayoutParams();v.width=g.width,v.height=g.height;var m=Za(v,{width:n.getWidth(),height:n.getHeight()},t.get("padding"));a||(a=t.get("left")||t.get("right"),"middle"===a&&(a="center"),"right"===a?m.x+=m.width:"center"===a&&(m.x+=m.width/2)),s||(s=t.get("top")||t.get("bottom"),"center"===s&&(s="middle"),"bottom"===s?m.y+=m.height:"middle"===s&&(m.y+=m.height/2),s=s||"top"),i.attr("position",[m.x,m.y]);var y={textAlign:a,textVerticalAlign:s};l.setStyle(y),c.setStyle(y),g=i.getBoundingRect();var _=m.margin,x=t.getItemStyle(["color","opacity"]);x.fill=t.get("backgroundColor");var w=new cm({shape:{x:g.x-_[3],y:g.y-_[0],width:g.width+_[1]+_[3],height:g.height+_[0]+_[2],r:t.get("borderRadius")},style:x,subPixelOptimize:!0,silent:!0});i.add(w)}}});var wb=a_.legend.selector,bb={all:{type:"all",title:i(wb.all)},inverse:{type:"inverse",title:i(wb.inverse)}},Sb=Cu({type:"legend.plain",dependencies:["series"],layoutMode:{type:"box",ignoreSize:!0},init:function(t,e,n){this.mergeDefaultAndTheme(t,n),t.selected=t.selected||{},this._updateSelector(t)},mergeOption:function(t){Sb.superCall(this,"mergeOption",t),this._updateSelector(t)},_updateSelector:function(t){var e=t.selector;e===!0&&(e=t.selector=["all","inverse"]),x(e)&&f(e,function(t,n){b(t)&&(t={type:t}),e[n]=r(t,bb[t.type])})},optionUpdated:function(){this._updateData(this.ecModel);var t=this._data;if(t[0]&&"single"===this.get("selectedMode")){for(var e=!1,n=0;n<t.length;n++){var i=t[n].get("name");if(this.isSelected(i)){this.select(i),e=!0;break}}!e&&this.select(t[0].get("name"))}},_updateData:function(t){var e=[],n=[];t.eachRawSeries(function(i){var r=i.name;n.push(r);var o;if(i.legendVisualProvider){var a=i.legendVisualProvider,s=a.getAllNames();t.isSeriesFiltered(i)||(n=n.concat(s)),s.length?e=e.concat(s):o=!0}else o=!0;o&&or(i)&&e.push(i.name)}),this._availableNames=n;var i=this.get("data")||e,r=p(i,function(t){return("string"==typeof t||"number"==typeof t)&&(t={name:t}),new fa(t,this,this.ecModel)},this);this._data=r},getData:function(){return this._data},select:function(t){var e=this.option.selected,n=this.get("selectedMode");if("single"===n){var i=this._data;f(i,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 n=t.get("name",!0);e.hasOwnProperty(n)||(e[n]=!0),e[n]=!e[n]})},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}}});yu("legendToggleSelect","legendselectchanged",_(bd,"toggleSelected")),yu("legendAllSelect","legendselectall",_(bd,"allSelect")),yu("legendInverseSelect","legendinverseselect",_(bd,"inverseSelect")),yu("legendSelect","legendselected",_(bd,"select")),yu("legendUnSelect","legendunselected",_(bd,"unSelect"));var Mb=_,Cb=f,Tb=Np,Ib=Tu({type:"legend.plain",newlineDisabled:!1,init:function(){this.group.add(this._contentGroup=new Tb),this._backgroundEl,this.group.add(this._selectorGroup=new Tb),this._isFirstRender=!0},getContentGroup:function(){return this._contentGroup},getSelectorGroup:function(){return this._selectorGroup},render:function(t,e,n){var i=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),t.get("show",!0)){var r=t.get("align"),o=t.get("orient");r&&"auto"!==r||(r="right"===t.get("left")&&"vertical"===o?"right":"left");var a=t.get("selector",!0),l=t.get("selectorPosition",!0);!a||l&&"auto"!==l||(l="horizontal"===o?"end":"start"),this.renderInner(r,t,e,n,a,o,l);var u=t.getBoxLayoutParams(),h={width:n.getWidth(),height:n.getHeight()},c=t.get("padding"),d=Za(u,h,c),f=this.layoutInner(t,r,d,i,a,l),p=Za(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=Sd(f,t))}},resetInner:function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},renderInner:function(t,e,n,i,r,o,a){var s=this.getContentGroup(),l=N(),u=e.get("selectedMode"),h=[];n.eachRawSeries(function(t){!t.get("legendHoverLink")&&h.push(t.id)}),Cb(e.getData(),function(r,o){var a=r.get("name");if(!this.newlineDisabled&&(""===a||"\n"===a))return void s.add(new Tb({newline:!0}));var c=n.getSeriesByName(a)[0];if(!l.get(a))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",v=d.getVisual("symbol"),m=this._createItem(a,o,r,e,g,v,t,f,p,u);m.on("click",Mb(Cd,a,null,i,h)).on("mouseover",Mb(Td,c.name,null,i,h)).on("mouseout",Mb(Id,c.name,null,i,h)),l.set(a,!0)}else n.eachRawSeries(function(n){if(!l.get(a)&&n.legendVisualProvider){var s=n.legendVisualProvider;if(!s.containName(a))return;var c=s.indexOfName(a),d=s.getItemVisual(c,"color"),f=s.getItemVisual(c,"borderColor"),p="roundRect",g=this._createItem(a,o,r,e,p,null,t,d,f,u);g.on("click",Mb(Cd,null,a,i,h)).on("mouseover",Mb(Td,null,a,i,h)).on("mouseout",Mb(Id,null,a,i,h)),l.set(a,!0)}},this)},this),r&&this._createSelector(r,e,i,o,a)},_createSelector:function(t,e,n){function i(t){var i=t.type,o=new Jv({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){n.dispatchAction({type:"all"===i?"legendAllSelect":"legendInverseSelect"})}});r.add(o);var a=e.getModel("selectorLabel"),s=e.getModel("emphasis.selectorLabel");Go(o.style,o.hoverStyle={},a,s,{defaultText:t.title,isRectText:!1}),No(o)}var r=this.getSelectorGroup();Cb(t,function(t){i(t)})},_createItem:function(t,e,n,i,r,o,s,l,u,h){var c=i.get("itemWidth"),d=i.get("itemHeight"),f=i.get("inactiveColor"),p=i.get("inactiveBorderColor"),g=i.get("symbolKeepAspect"),v=i.getModel("itemStyle"),m=i.isSelected(t),y=new Tb,_=n.getModel("textStyle"),x=n.get("icon"),w=n.getModel("tooltip"),b=w.parentModel;r=x||r;var S=Gh(r,0,0,c,d,m?l:f,null==g?!0:g);if(y.add(Md(S,r,v,u,p,m)),!x&&o&&(o!==r||"none"===o)){var M=.8*d;"none"===o&&(o="circle");var C=Gh(o,(c-M)/2,(d-M)/2,M,M,m?l:f,null==g?!0:g);y.add(Md(C,o,v,u,p,m))}var T="left"===s?c+5:-5,I=s,k=i.get("formatter"),D=t;"string"==typeof k&&k?D=k.replace("{name}",null!=t?t:""):"function"==typeof k&&(D=k(t)),y.add(new Jv({style:Xo({},_,{text:D,x:T,y:d/2,textFill:m?_.getTextColor():f,textAlign:I,textVerticalAlign:"middle"})}));var A=new cm({shape:y.getBoundingRect(),invisible:!0,tooltip:w.get("show")?a({content:t,formatter:b.get("formatter",!0)||function(){return t},formatterParams:{componentType:"legend",legendIndex:i.componentIndex,name:t,$vars:["name"]}},w.option):null});return y.add(A),y.eachChild(function(t){t.silent=!0}),A.silent=!h,this.getContentGroup().add(y),No(y),y.__legendDataIndex=e,y},layoutInner:function(t,e,n,i,r,o){var a=this.getContentGroup(),s=this.getSelectorGroup();ry(t.get("orient"),a,t.get("itemGap"),n.width,n.height);var l=a.getBoundingRect(),u=[-l.x,-l.y];if(r){ry("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",v=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),a.attr("position",u);var m={x:0,y:0};return m[p]=l[p]+d+h[p],m[g]=Math.max(l[g],h[g]),m[v]=Math.min(0,h[v]+c[1-f]),m}return a.attr("position",u),this.group.getBoundingRect()},remove:function(){this.getContentGroup().removeAll(),this._isFirstRender=!0}}),kb=function(t){var e=t.findComponents({mainType:"legend"});e&&e.length&&t.filterSeries(function(t){for(var n=0;n<e.length;n++)if(!e[n].isSelected(t.name))return!1;return!0})};vu(Q_.PROCESSOR.SERIES_FILTER,kb),sy.registerSubTypeDefaulter("legend",function(){return"plain"});var Db=Sb.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,n,i){var r=$a(t);Db.superCall(this,"init",t,e,n,i),kd(this,t,r)},mergeOption:function(t,e){Db.superCall(this,"mergeOption",t,e),kd(this,this.option,t)}}),Ab=Np,Pb=["width","height"],Ob=["x","y"],Lb=Ib.extend({type:"legend.scroll",newlineDisabled:!0,init:function(){Lb.superCall(this,"init"),this._currentIndex=0,this.group.add(this._containerGroup=new Ab),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new Ab),this._showController},resetInner:function(){Lb.superCall(this,"resetInner"),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},renderInner:function(t,e,n,i,r,o,a){function s(t,n){var r=t+"DataIndex",o=la(e.get("pageIcons",!0)[e.getOrient().name][n],{onclick:y(l._pageGo,l,r,e,i)},{x:-h[0]/2,y:-h[1]/2,width:h[0],height:h[1]});o.name=t,u.add(o)}var l=this;Lb.superCall(this,"renderInner",t,e,n,i,r,o,a);var u=this._controllerGroup,h=e.get("pageIconSize",!0);x(h)||(h=[h,h]),s("pagePrev",0);var c=e.getModel("pageTextStyle");u.add(new Jv({name:"pageText",style:{textFill:c.getTextColor(),font:c.getFont(),textVerticalAlign:"middle",textAlign:"center"},silent:!0})),s("pageNext",1)},layoutInner:function(t,e,n,r,o,a){var s=this.getSelectorGroup(),l=t.getOrient().index,u=Pb[l],h=Ob[l],c=Pb[1-l],d=Ob[1-l];o&&ry("horizontal",s,t.get("selectorItemGap",!0));var f=t.get("selectorButtonGap",!0),p=s.getBoundingRect(),g=[-p.x,-p.y],v=i(n);o&&(v[u]=n[u]-p[u]-f);var m=this._layoutContentAndController(t,r,v,l,u,c,d);if(o){if("end"===a)g[l]+=m[u]+f;else{var y=p[u]+f;g[l]-=y,m[h]-=y}m[u]+=p[u]+f,g[1-l]+=m[d]+m[c]/2-p[c]/2,m[c]=Math.max(m[c],p[c]),m[d]=Math.min(m[d],p[d]+g[1-l]),s.attr("position",g)}return m},_layoutContentAndController:function(t,e,n,i,r,o,a){var s=this.getContentGroup(),l=this._containerGroup,u=this._controllerGroup;ry(t.get("orient"),s,t.get("itemGap"),i?n.width:null,i?null:n.height),ry("horizontal",u,t.get("pageButtonItemGap",!0));var h=s.getBoundingRect(),c=u.getBoundingRect(),d=this._showController=h[r]>n[r],f=[-h.x,-h.y];e||(f[i]=s.position[i]);var p=[0,0],g=[-c.x,-c.y],v=D(t.get("pageButtonGap",!0),t.get("itemGap",!0));if(d){var m=t.get("pageButtonPosition",!0);"end"===m?g[i]+=n[r]-c[r]:p[i]+=c[r]+v}g[1-i]+=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[r]=d?n[r]:h[r],y[o]=Math.max(h[o],c[o]),y[a]=Math.min(0,c[a]+g[1-i]),l.__rectSize=n[r],d){var _={x:0,y:0};_[r]=Math.max(n[r]-c[r]-v,0),_[o]=y[o],l.setClipPath(new cm({shape:_})),l.__rectSize=_[r]}else u.eachChild(function(t){t.attr({invisible:!0,silent:!0})});var x=this._getPageInfo(t);return null!=x.pageIndex&&ta(s,{position:x.contentPosition},d?t:!1),this._updatePageInfoView(t,x),y},_pageGo:function(t,e,n){var i=this._getPageInfo(e)[t];null!=i&&n.dispatchAction({type:"legendScroll",scrollDataIndex:i,legendId:e.id})},_updatePageInfoView:function(t,e){var n=this._controllerGroup;f(["pagePrev","pageNext"],function(i){var r=null!=e[i+"DataIndex"],o=n.childOfName(i);o&&(o.setStyle("fill",r?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),o.cursor=r?"pointer":"default")});var i=n.childOfName("pageText"),r=t.get("pageFormatter"),o=e.pageIndex,a=null!=o?o+1:0,s=e.pageCount;i&&r&&i.setStyle("text",b(r)?r.replace("{current}",a).replace("{total}",s):r({current:a,total:s}))},_getPageInfo:function(t){function e(t){if(t){var e=t.getBoundingRect(),n=e[l]+t.position[a];return{s:n,e:n+e[s],i:t.__legendDataIndex}}}function n(t,e){return t.e>=e&&t.s<=e+o}var i=t.get("scrollDataIndex",!0),r=this.getContentGroup(),o=this._containerGroup.__rectSize,a=t.getOrient().index,s=Pb[a],l=Ob[a],u=this._findTargetItemIndex(i),h=r.children(),c=h[u],d=h.length,f=d?1:0,p={contentPosition:r.position.slice(),pageCount:f,pageIndex:f-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!c)return p;var g=e(c);p.contentPosition[a]=-g.s;for(var v=u+1,m=g,y=g,_=null;d>=v;++v)_=e(h[v]),(!_&&y.e>m.s+o||_&&!n(_,m.s))&&(m=y.i>m.i?y:_,m&&(null==p.pageNextDataIndex&&(p.pageNextDataIndex=m.i),++p.pageCount)),y=_;for(var v=u-1,m=g,y=g,_=null;v>=-1;--v)_=e(h[v]),_&&n(y,_.s)||!(m.i<y.i)||(y=m,null==p.pagePrevDataIndex&&(p.pagePrevDataIndex=m.i),++p.pageCount,++p.pageIndex),m=_;return p},_findTargetItemIndex:function(t){if(!this._showController)return 0;var e,n,i=this.getContentGroup();return i.eachChild(function(i,r){var o=i.__legendDataIndex;null==n&&null!=o&&(n=r),o===t&&(e=r)}),null!=e?e:n}});yu("legendScroll","legendscroll",function(t,e){var n=t.scrollDataIndex;null!=n&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},function(t){t.setScrollDataIndex(n)})});var Bb=function(t,e){var n,i=[],r=t.seriesIndex;if(null==r||!(n=e.getSeriesByIndex(r)))return{point:[]};var o=n.getData(),a=sr(o,t);if(null==a||0>a||x(a))return{point:[]};var s=o.getItemGraphicEl(a),l=n.coordinateSystem;if(n.getTooltipPosition)i=n.getTooltipPosition(a)||[];else if(l&&l.dataToPoint)i=l.dataToPoint(o.getValues(p(l.dimensions,function(t){return o.mapDimension(t)}),a,!0))||[];else if(s){var u=s.getBoundingRect().clone();u.applyTransform(s.transform),i=[u.x+u.width/2,u.y+u.height/2]}return{point:i,el:s}},Eb=f,zb=_,Rb=lr(),Nb=function(t,e,n){var i=t.currTrigger,r=[t.x,t.y],o=t,a=t.dispatchAction||y(n.dispatchAction,n),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){Nd(r)&&(r=Bb({seriesIndex:o.seriesIndex,dataIndex:o.dataIndex},e).point);var l=Nd(r),u=o.axesInfo,h=s.axesInfo,c="leave"===i||Nd(r),d={},f={},p={list:[],map:{}},g={showPointer:zb(Pd,f),showTooltip:zb(Od,p)};Eb(s.coordSysMap,function(t,e){var n=l||t.containPoint(r);Eb(s.coordSysAxesInfo[e],function(t){var e=t.axis,i=zd(u,t);if(!c&&n&&(!u||i)){var o=i&&i.value;null!=o||l||(o=e.pointToData(r)),null!=o&&Dd(t,o,g,!1,d)}})});var v={};return Eb(h,function(t,e){var n=t.linkGroup;n&&!f[e]&&Eb(n.axesInfo,function(e,i){var r=f[i];if(e!==t&&r){var o=r.value;n.mapper&&(o=t.axis.scale.parse(n.mapper(o,Rd(e),Rd(t)))),v[t.key]=o}})}),Eb(v,function(t,e){Dd(h[e],t,g,!0,d)}),Ld(f,h,d),Bd(p,r,t,a),Ed(h,a,n),d}},Fb=(Cu({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}}}),lr()),Hb=f,Vb=Tu({type:"axisPointer",render:function(t,e,n){var i=e.getComponent("tooltip"),r=t.get("triggerOn")||i&&i.get("triggerOn")||"mousemove|click";Fd("axisPointer",n,function(t,e,n){"none"!==r&&("leave"===t||r.indexOf(t)>=0)&&n({type:"updateAxisPointer",currTrigger:t,x:e&&e.offsetX,y:e&&e.offsetY})})},remove:function(t,e){Yd(e.getZr(),"axisPointer"),Vb.superApply(this._model,"remove",arguments)},dispose:function(t,e){Yd("axisPointer",e),Vb.superApply(this._model,"dispose",arguments)}}),Gb=lr(),Wb=i,Xb=y;Ud.prototype={_group:null,_lastGraphicKey:null,_handle:null,_dragging:!1,_lastValue:null,_lastStatus:null,_payloadInfo:null,animationThreshold:15,render:function(t,e,n,i){var r=e.get("value"),o=e.get("status");if(this._axisModel=t,this._axisPointerModel=e,this._api=n,i||this._lastValue!==r||this._lastStatus!==o){this._lastValue=r,this._lastStatus=o;var a=this._group,s=this._handle;if(!o||"hide"===o)return a&&a.hide(),void(s&&s.hide());a&&a.show(),s&&s.show();var l={};this.makeElOption(l,r,t,e,n);var u=l.graphicKey;u!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=u;var h=this._moveAnimation=this.determineAnimation(t,e);if(a){var c=_(jd,e,h);this.updatePointerEl(a,l,c,e),this.updateLabelEl(a,l,c,e)}else a=this._group=new Np,this.createPointerEl(a,l,t,e),this.createLabelEl(a,l,t,e),n.getZr().add(a);$d(a,e,!0),this._renderHandle(r)}},remove:function(t){this.clear(t)},dispose:function(t){this.clear(t)},determineAnimation:function(t,e){var n=e.get("animation"),i=t.axis,r="category"===i.type,o=e.get("snap");if(!o&&!r)return!1;if("auto"===n||null==n){var a=this.animationThreshold;if(r&&i.getBandWidth()>a)return!0;if(o){var s=fd(t).seriesDataCount,l=i.getExtent();return Math.abs(l[0]-l[1])/s>a}return!1}return n===!0},makeElOption:function(){},createPointerEl:function(t,e){var n=e.pointer;if(n){var i=Gb(t).pointerEl=new zm[n.type](Wb(e.pointer));t.add(i)}},createLabelEl:function(t,e,n,i){if(e.label){var r=Gb(t).labelEl=new cm(Wb(e.label));t.add(r),Zd(r,i)}},updatePointerEl:function(t,e,n){var i=Gb(t).pointerEl;i&&e.pointer&&(i.setStyle(e.pointer.style),n(i,{shape:e.pointer.shape}))},updateLabelEl:function(t,e,n,i){var r=Gb(t).labelEl;r&&(r.setStyle(e.label.style),n(r,{shape:e.label.shape,position:e.label.position}),Zd(r,i))},_renderHandle:function(t){if(!this._dragging&&this.updateHandleTransform){var e=this._axisPointerModel,n=this._api.getZr(),i=this._handle,r=e.getModel("handle"),o=e.get("status");if(!r.get("show")||!o||"hide"===o)return i&&n.remove(i),void(this._handle=null);var a;this._handle||(a=!0,i=this._handle=la(r.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){Jf(t.event)},onmousedown:Xb(this._onHandleDragMove,this,0,0),drift:Xb(this._onHandleDragMove,this),ondragend:Xb(this._onHandleDragEnd,this)}),n.add(i)),$d(i,e,!1);var s=["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];i.setStyle(r.getItemStyle(null,s));var l=r.get("size");x(l)||(l=[l,l]),i.attr("scale",[l[0]/2,l[1]/2]),fl(this,"_doDispatchAxisPointer",r.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,a)}},_moveHandleToValue:function(t,e){jd(this._axisPointerModel,!e&&this._moveAnimation,this._handle,Kd(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},_onHandleDragMove:function(t,e){var n=this._handle;if(n){this._dragging=!0;var i=this.updateHandleTransform(Kd(n),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=i,n.stopAnimation(),n.attr(Kd(i)),Gb(n).lastProp=null,this._doDispatchAxisPointer()}},_doDispatchAxisPointer:function(){var t=this._handle;if(t){var e=this._payloadInfo,n=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:n.axis.dim,axisIndex:n.componentIndex}]})}},_onHandleDragEnd:function(){this._dragging=!1;var t=this._handle;if(t){var e=this._axisPointerModel.get("value");this._moveHandleToValue(e),this._api.dispatchAction({type:"hideTip"})}},getHandleTransform:null,updateHandleTransform:null,clear:function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),n=this._group,i=this._handle;e&&n&&(this._lastGraphicKey=null,n&&e.remove(n),i&&e.remove(i),this._group=null,this._handle=null,this._payloadInfo=null)},doClear:function(){},buildLabel:function(t,e,n){return n=n||0,{x:t[n],y:t[1-n],width:e[n],height:e[1-n]}}},Ud.prototype.constructor=Ud,vr(Ud);var Yb=Ud.extend({makeElOption:function(t,e,n,i,r){var o=n.axis,a=o.grid,s=i.get("type"),l=sf(a,o).getOtherAxis(o).getGlobalExtent(),u=o.toGlobalCoord(o.dataToCoord(e,!0));if(s&&"none"!==s){var h=Qd(i),c=Ub[s](o,u,l);c.style=h,t.graphicKey=c.type,t.pointer=c}var d=_d(a.model,n);rf(e,t,d,n,i,r)},getHandleTransform:function(t,e,n){var i=_d(e.axis.grid.model,e,{labelInside:!1});return i.labelMargin=n.get("handle.margin"),{position:nf(e.axis,t,i),rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(t,e,n){var i=n.axis,r=i.grid,o=i.getGlobalExtent(!0),a=sf(r,i).getOtherAxis(i).getGlobalExtent(),s="x"===i.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=(a[1]+a[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]}}}),Ub={line:function(t,e,n){var i=of([e,n[0]],[e,n[1]],lf(t));return{type:"Line",subPixelOptimize:!0,shape:i}},shadow:function(t,e,n){var i=Math.max(1,t.getBandWidth()),r=n[1]-n[0];return{type:"Rect",shape:af([e-i/2,n[0]],[i,r],lf(t))}}};vb.registerAxisPointerClass("CartesianAxisPointer",Yb),gu(function(t){if(t){(!t.axisPointer||0===t.axisPointer.length)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!x(e)&&(t.axisPointer.link=[e])}}),vu(Q_.PROCESSOR.STATISTIC,function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=ad(t,e)}),yu({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},Nb),Cu({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 jb=f,qb=Na,Zb=["","-webkit-","-moz-","-o-"],Kb="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;";ff.prototype={constructor:ff,_enterable:!0,update:function(){var t=this._container,e=t.currentStyle||document.defaultView.getComputedStyle(t),n=t.style;"absolute"!==n.position&&"absolute"!==e.position&&(n.position="relative")},show:function(t){clearTimeout(this._hideTimeout);var e=this.el,n=this._styleCoord;e.style.cssText=Kb+cf(t)+";left:"+n[0]+"px;top:"+n[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 n=this._styleCoord;df(n,this._zr,this._appendToBody,t,e);var i=this.el.style;i.left=n[0]+"px",i.top=n[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 n=document.defaultView.getComputedStyle(this.el);n&&(t+=parseInt(n.borderLeftWidth,10)+parseInt(n.borderRightWidth,10),e+=parseInt(n.borderTopWidth,10)+parseInt(n.borderBottomWidth,10))}return{width:t,height:e}}},pf.prototype={constructor:pf,_enterable:!0,update:function(){},show:function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.attr("show",!0),this._show=!0},setContent:function(t,e,n){this.el&&this._zr.remove(this.el);for(var i={},r=t,o="{marker",a="|}",s=r.indexOf(o);s>=0;){var l=r.indexOf(a),u=r.substr(s+o.length,l-s-o.length);i["marker"+u]=u.indexOf("sub")>-1?{textWidth:4,textHeight:4,textBorderRadius:2,textBackgroundColor:e[u],textOffset:[3,0]}:{textWidth:10,textHeight:10,textBorderRadius:5,textBackgroundColor:e[u]},r=r.substr(l+1),s=r.indexOf("{marker")}this.el=new Jv({style:{rich:i,text:t,textLineHeight:20,textBackgroundColor:n.get("backgroundColor"),textBorderRadius:n.get("borderRadius"),textFill:n.get("textStyle.color"),textPadding:n.get("padding")},z:n.get("z")}),this._zr.add(this.el);var h=this;this.el.on("mouseover",function(){h._enterable&&(clearTimeout(h._hideTimeout),h._show=!0),h._inContent=!0}),this.el.on("mouseout",function(){h._enterable&&h._show&&h.hideLater(h._hideDelay),h._inContent=!1})},setEnterable:function(t){this._enterable=t},getSize:function(){var t=this.el.getBoundingRect();return[t.width,t.height]},moveTo:function(t,e){this.el&&this.el.attr("position",[t,e])},hide:function(){this.el&&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 $b=y,Qb=f,Jb=wa,tS=new cm({shape:{x:-1,y:-1,width:2,height:2}});Tu({type:"tooltip",init:function(t,e){if(!Mf.node){var n=t.getComponent("tooltip"),i=n.get("renderMode");this._renderMode=fr(i);var r;"html"===this._renderMode?(r=new ff(e.getDom(),e,{appendToBody:n.get("appendToBody",!0)}),this._newLine="<br/>"):(r=new pf(e),this._newLine="\n"),this._tooltipContent=r}},render:function(t,e,n){if(!Mf.node){this.group.removeAll(),this._tooltipModel=t,this._ecModel=e,this._api=n,this._lastDataByCoordSys=null,this._alwaysShowContent=t.get("alwaysShowContent");var i=this._tooltipContent;i.update(),i.setEnterable(t.get("enterable")),this._initGlobalListener(),this._keepShow()}},_initGlobalListener:function(){var t=this._tooltipModel,e=t.get("triggerOn");Fd("itemTooltip",this._api,$b(function(t,n,i){"none"!==e&&(e.indexOf(t)>=0?this._tryShow(n,i):"leave"===t&&this._hide(i))},this))},_keepShow:function(){var t=this._tooltipModel,e=this._ecModel,n=this._api;if(null!=this._lastX&&null!=this._lastY&&"none"!==t.get("triggerOn")){var i=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!n.isDisposed()&&i.manuallyShowTip(t,e,n,{x:i._lastX,y:i._lastY})})}},manuallyShowTip:function(t,e,n,i){if(i.from!==this.uid&&!Mf.node){var r=vf(i,n);this._ticket="";var o=i.dataByCoordSys;if(i.tooltip&&null!=i.x&&null!=i.y){var a=tS;a.position=[i.x,i.y],a.update(),a.tooltip=i.tooltip,this._tryShow({offsetX:i.x,offsetY:i.y,target:a},r)}else if(o)this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,dataByCoordSys:i.dataByCoordSys,tooltipOption:i.tooltipOption},r);else if(null!=i.seriesIndex){if(this._manuallyAxisShowTip(t,e,n,i))return;var s=Bb(i,e),l=s.point[0],u=s.point[1];null!=l&&null!=u&&this._tryShow({offsetX:l,offsetY:u,position:i.position,target:s.el},r)}else null!=i.x&&null!=i.y&&(n.dispatchAction({type:"updateAxisPointer",x:i.x,y:i.y}),this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,target:n.getZr().findHover(i.x,i.y).target},r))}},manuallyHideTip:function(t,e,n,i){var r=this._tooltipContent;!this._alwaysShowContent&&this._tooltipModel&&r.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=null,i.from!==this.uid&&this._hide(vf(i,n))},_manuallyAxisShowTip:function(t,e,n,i){var r=i.seriesIndex,o=i.dataIndex,a=e.getComponent("axisPointer").coordSysAxesInfo;if(null!=r&&null!=o&&null!=a){var s=e.getSeriesByIndex(r);if(s){var l=s.getData(),t=gf([l.getItemModel(o),s,(s.coordinateSystem||{}).model,t]);if("axis"===t.get("trigger"))return n.dispatchAction({type:"updateAxisPointer",seriesIndex:r,dataIndex:o,position:i.position}),!0}}},_tryShow:function(t,e){var n=t.target,i=this._tooltipModel;if(i){this._lastX=t.offsetX,this._lastY=t.offsetY;var r=t.dataByCoordSys;r&&r.length?this._showAxisTooltip(r,t):n&&null!=n.dataIndex?(this._lastDataByCoordSys=null,this._showSeriesItemTooltip(t,n,e)):n&&n.tooltip?(this._lastDataByCoordSys=null,this._showComponentItemTooltip(t,n,e)):(this._lastDataByCoordSys=null,this._hide(e))}},_showOrMove:function(t,e){var n=t.get("showDelay");e=y(e,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(e,n):e()},_showAxisTooltip:function(t,e){var n=this._ecModel,i=this._tooltipModel,o=[e.offsetX,e.offsetY],a=[],s=[],l=gf([e.tooltipOption,i]),u=this._renderMode,h=this._newLine,c={};Qb(t,function(t){Qb(t.dataByAxis,function(t){var e=n.getComponent(t.axisDim+"Axis",t.axisIndex),i=t.value,o=[];if(e&&null!=i){var l=ef(i,e.axis,n,t.seriesDataIndices,t.valueLabelOpt);f(t.seriesDataIndices,function(a){var h=n.getSeriesByIndex(a.seriesIndex),d=a.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=zh(e.axis,i),f.axisValueLabel=l,f){s.push(f);var p,g=h.formatTooltip(d,!0,null,u);if(S(g)){p=g.html;var v=g.markers;r(c,v)}else p=g;o.push(p)}});var d=l;a.push("html"!==u?o.join(h):(d?Fa(d)+h:"")+o.join(h))}})},this),a.reverse(),a=a.join(this._newLine+this._newLine);var d=e.position;
  12. this._showOrMove(l,function(){this._updateContentNotChangedOnAxis(t)?this._updatePosition(l,d,o[0],o[1],this._tooltipContent,s):this._showTooltipContent(l,a,s,Math.random(),o[0],o[1],d,void 0,c)})},_showSeriesItemTooltip:function(t,e,n){var i=this._ecModel,r=e.seriesIndex,o=i.getSeriesByIndex(r),a=e.dataModel||o,s=e.dataIndex,l=e.dataType,u=a.getData(),h=gf([u.getItemModel(s),a,o&&(o.coordinateSystem||{}).model,this._tooltipModel]),c=h.get("trigger");if(null==c||"item"===c){var d,f,p=a.getDataParams(s,l),g=a.formatTooltip(s,!1,l,this._renderMode);S(g)?(d=g.html,f=g.markers):(d=g,f=null);var v="item_"+a.name+"_"+s;this._showOrMove(h,function(){this._showTooltipContent(h,d,p,v,t.offsetX,t.offsetY,t.position,t.target,f)}),n({type:"showTip",dataIndexInside:s,dataIndex:u.getRawIndex(s),seriesIndex:r,from:this.uid})}},_showComponentItemTooltip:function(t,e,n){var i=e.tooltip;if("string"==typeof i){var r=i;i={content:r,formatter:r}}var o=new fa(i,this._tooltipModel,this._ecModel),a=o.get("content"),s=Math.random();this._showOrMove(o,function(){this._showTooltipContent(o,a,o.get("formatterParams")||{},s,t.offsetX,t.offsetY,t.position,e)}),n({type:"showTip",from:this.uid})},_showTooltipContent:function(t,e,n,i,r,o,a,s,l){if(this._ticket="",t.get("showContent")&&t.get("show")){var u=this._tooltipContent,h=t.get("formatter");a=a||t.get("position");var c=e;if(h&&"string"==typeof h)c=Ha(h,n,!0);else if("function"==typeof h){var d=$b(function(e,i){e===this._ticket&&(u.setContent(i,l,t),this._updatePosition(t,a,r,o,u,n,s))},this);this._ticket=i,c=h(n,i,d)}u.setContent(c,l,t),u.show(t),this._updatePosition(t,a,r,o,u,n,s)}},_updatePosition:function(t,e,n,i,r,o,a){var s=this._api.getWidth(),l=this._api.getHeight();e=e||t.get("position");var u=r.getSize(),h=t.get("align"),c=t.get("verticalAlign"),d=a&&a.getBoundingRect().clone();if(a&&d.applyTransform(a.transform),"function"==typeof e&&(e=e([n,i],o,r.el,d,{viewSize:[s,l],contentSize:u.slice()})),x(e))n=Jb(e[0],s),i=Jb(e[1],l);else if(S(e)){e.width=u[0],e.height=u[1];var f=Za(e,{width:s,height:l});n=f.x,i=f.y,h=null,c=null}else if("string"==typeof e&&a){var p=_f(e,d,u);n=p[0],i=p[1]}else{var p=mf(n,i,r,s,l,h?null:20,c?null:20);n=p[0],i=p[1]}if(h&&(n-=xf(h)?u[0]/2:"right"===h?u[0]:0),c&&(i-=xf(c)?u[1]/2:"bottom"===c?u[1]:0),t.get("confine")){var p=yf(n,i,r,s,l);n=p[0],i=p[1]}r.moveTo(n,i)},_updateContentNotChangedOnAxis:function(t){var e=this._lastDataByCoordSys,n=!!e&&e.length===t.length;return n&&Qb(e,function(e,i){var r=e.dataByAxis||{},o=t[i]||{},a=o.dataByAxis||[];n&=r.length===a.length,n&&Qb(r,function(t,e){var i=a[e]||{},r=t.seriesDataIndices||[],o=i.seriesDataIndices||[];n&=t.value===i.value&&t.axisType===i.axisType&&t.axisId===i.axisId&&r.length===o.length,n&&Qb(r,function(t,e){var i=o[e];n&=t.seriesIndex===i.seriesIndex&&t.dataIndex===i.dataIndex})})}),this._lastDataByCoordSys=t,!!n},_hide:function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},dispose:function(t,e){Mf.node||(this._tooltipContent.dispose(),Yd("itemTooltip",e))}}),yu({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},function(){}),yu({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},function(){}),t.version=N_,t.dependencies=F_,t.PRIORITY=Q_,t.init=lu,t.connect=uu,t.disConnect=hu,t.disconnect=yx,t.dispose=cu,t.getInstanceByDom=du,t.getInstanceById=fu,t.registerTheme=pu,t.registerPreprocessor=gu,t.registerProcessor=vu,t.registerPostUpdate=mu,t.registerAction=yu,t.registerCoordinateSystem=_u,t.getCoordinateSystemDimensions=xu,t.registerLayout=wu,t.registerVisual=bu,t.registerLoading=Mu,t.extendComponentModel=Cu,t.extendComponentView=Tu,t.extendSeriesModel=Iu,t.extendChartView=ku,t.setCanvasCreator=Du,t.registerMap=Au,t.getMap=Pu,t.dataTool=_x,t.zrender=zg,t.number=jm,t.format=ty,t.throttle=dl,t.helper=ww,t.matrix=ap,t.vector=Xf,t.color=Cp,t.parseGeoJSON=Sw,t.parseGeoJson=Iw,t.util=kw,t.graphic=Dw,t.List=Ox,t.Model=fa,t.Axis=Tw,t.env=Mf});