!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.echarts={})}(this,function(t){"use strict";function e(t){var e={},i={},n=t.match(/firefox\/([\d.]+)/),a=t.match(/msie\s([\d.]+)/)||t.match(/trident\/.+?rv:(([\d.]+))/),o=t.match(/edge\/([\d.]+)/),r=/micromessenger/i.test(t);return n&&(i.firefox=!0,i.version=n[1]),a&&(i.ie=!0,i.version=a[1]),o&&(i.edge=!0,i.version=o[1]),r&&(i.wechat=!0),{browser:i,os:e,node:!1,canvassupported:!!document.createelement("canvas").getcontext,svgsupported:"undefined"!=typeof svgrect,toucheventssupported:"ontouchstart"in window&&!i.ie&&!i.edge,pointereventssupported:"onpointerdown"in window&&(i.edge||i.ie&&i.version>=11),domsupported:"undefined"!=typeof document}}function i(t,e){"createcanvas"===t&&(bb=null),_b[t]=e}function n(t){if(null==t||"object"!=typeof t)return t;var e=t,i=fb.call(t);if("[object array]"===i){if(!r(t)){e=[];for(var a=0,o=t.length;o>a;a++)e[a]=n(t[a])}}else if(db[i]){if(!r(t)){var r=t.constructor;if(t.constructor.from)e=r.from(t);else{e=new r(t.length);for(var a=0,o=t.length;o>a;a++)e[a]=n(t[a])}}}else if(!cb[i]&&!r(t)&&!a(t)){e={};for(var s in t)t.hasownproperty(s)&&(e[s]=n(t[s]))}return e}function a(t,e,i){if(!s(e)||!s(t))return i?n(e):t;for(var o in e)if(e.hasownproperty(o)){var r=t[o],s=e[o];!s(s)||!s(r)||_(s)||_(r)||a(s)||a(r)||m(s)||m(r)||r(s)||r(r)?!i&&o in t||(t[o]=n(e[o],!0)):a(r,s,i)}return t}function o(t,e){for(var i=t[0],n=1,o=t.length;o>n;n++)i=a(i,t[n],e);return i}function r(t,e){for(var i in e)e.hasownproperty(i)&&(t[i]=e[i]);return t}function s(t,e,i){for(var n in e)e.hasownproperty(n)&&(i?null!=e[n]:null==t[n])&&(t[n]=e[n]);return t}function l(){return bb||(bb=wb().getcontext("2d")),bb}function u(t,e){if(t){if(t.indexof)return t.indexof(e);for(var i=0,n=t.length;n>i;i++)if(t[i]===e)return i}return-1}function h(t,e){function i(){}var n=t.prototype;i.prototype=e.prototype,t.prototype=new i;for(var a in n)n.hasownproperty(a)&&(t.prototype[a]=n[a]);t.prototype.constructor=t,t.superclass=e}function c(t,e,i){t="prototype"in t?t.prototype:t,e="prototype"in e?e.prototype:e,s(t,e,i)}function d(t){return t?"string"==typeof t?!1:"number"==typeof t.length:void 0}function f(t,e,i){if(t&&e)if(t.foreach&&t.foreach===gb)t.foreach(e,i);else if(t.length===+t.length)for(var n=0,a=t.length;a>n;n++)e.call(i,t[n],n,t);else for(var o in t)t.hasownproperty(o)&&e.call(i,t[o],o,t)}function p(t,e,i){if(t&&e){if(t.map&&t.map===yb)return t.map(e,i);for(var n=[],a=0,o=t.length;o>a;a++)n.push(e.call(i,t[a],a,t));return n}}function g(t,e,i,n){if(t&&e){if(t.reduce&&t.reduce===xb)return t.reduce(e,i,n);for(var a=0,o=t.length;o>a;a++)i=e.call(n,i,t[a],a,t);return i}}function m(t,e,i){if(t&&e){if(t.filter&&t.filter===mb)return t.filter(e,i);for(var n=[],a=0,o=t.length;o>a;a++)e.call(i,t[a],a,t)&&n.push(t[a]);return n}}function v(t,e,i){if(t&&e)for(var n=0,a=t.length;a>n;n++)if(e.call(i,t[n],n,t))return t[n]}function y(t,e){var i=vb.call(arguments,2);return function(){return t.apply(e,i.concat(vb.call(arguments)))}}function x(t){var e=vb.call(arguments,1);return function(){return t.apply(this,e.concat(vb.call(arguments)))}}function _(t){return"[object array]"===fb.call(t)}function w(t){return"function"==typeof t}function b(t){return"[object string]"===fb.call(t)}function s(t){var e=typeof t;return"function"===e||!!t&&"object"===e}function m(t){return!!cb[fb.call(t)]}function i(t){return!!db[fb.call(t)]}function a(t){return"object"==typeof t&&"number"==typeof t.nodetype&&"object"==typeof t.ownerdocument}function t(t){return t!==t}function d(){for(var t=0,e=arguments.length;e>t;t++)if(null!=arguments[t])return arguments[t]}function c(t,e){return null!=t?t:e}function l(t,e,i){return null!=t?t:null!=e?e:i}function k(){return function.call.apply(vb,arguments)}function p(t){if("number"==typeof t)return[t,t,t,t];var e=t.length;return 2===e?[t[0],t[1],t[0],t[1]]:3===e?[t[0],t[1],t[2],t[1]]:t}function o(t,e){if(!t)throw new error(e)}function n(t){return null==t?null:"function"==typeof t.trim?t.trim():t.replace(/^[\s\ufeff\xa0]+|[\s\ufeff\xa0]+$/g,"")}function z(t){t[sb]=!0}function r(t){return t[sb]}function e(t){function e(t,e){i?n.set(t,e):n.set(e,t)}var i=_(t);this.data={};var n=this;t instanceof e?t.each(e):t&&f(t,e)}function b(t){return new e(t)}function v(t,e){for(var i=new t.constructor(t.length+e.length),n=0;nd;d++){var p=1<r;r++)for(var s=0;8>s;s++)null==o[s]&&(o[s]=0),o[s]+=((r+s)%2?-1:1)*de(i,7,0===r?1:0,1<o;o++){var r=document.createelement("div"),s=r.style,l=o%2,u=(o>>1)%2;s.csstext=["position:absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","width:0","height:0",n[l]+":0",a[u]+":0",n[1-l]+":auto",a[1-u]+":auto",""].join("!important;"),t.appendchild(r),i.push(r)}return i}function ve(t,e){for(var i=e.transformer,n=e.srccoords,a=!0,o=[],r=[],s=0;4>s;s++){var l=t[s].getboundingclientrect(),u=2*s,h=l.left,c=l.top;o.push(h,c),a&=n&&h===n[u]&&c===n[u+1],r.push(t[s].offsetleft,t[s].offsettop)}return a?i:(e.srccoords=o,e.transformer=fe(o,r))}function ye(t,e,i){if(e=e||window.event,null!=e.zrx)return e;var n=e.type,a=n&&n.indexof("touch")>=0;if(a){var o="touchend"!==n?e.targettouches[0]:e.changedtouches[0];o&&pe(t,o,e,i)}else pe(t,e,e,i),e.zrdelta=e.wheeldelta?e.wheeldelta/120:-(e.detail||0)/3;var r=e.button;return null==e.which&&void 0!==r&&zb.test(e.type)&&(e.which=1&r?1:2&r?3:4&r?2:0),e}function xe(t,e,i){nb?t.addeventlistener(e,i):t.attachevent("on"+e,i)}function _e(t,e,i){nb?t.removeeventlistener(e,i):t.detachevent("on"+e,i)}function we(t){return 2===t.which||3===t.which}function be(t){var e=t[1][0]-t[0][0],i=t[1][1]-t[0][1];return math.sqrt(e*e+i*i)}function se(t){return[(t[0][0]+t[1][0])/2,(t[0][1]+t[1][1])/2]}function me(t,e,i){return{type:t,event:i,target:e.target,toptarget:e.toptarget,cancelbubble:!1,offsetx:i.zrx,offsety:i.zry,gestureevent:i.gestureevent,pinchx:i.pinchx,pinchy:i.pinchy,pinchscale:i.pinchscale,wheeldelta:i.zrdelta,zrbytouch:i.zrbytouch,which:i.which,stop:ie}}function ie(){bb(this.event)}function ae(){}function te(t,e,i){if(t[t.recthover?"rectcontain":"contain"](e,i)){for(var n,a=t;a;){if(a.clippath&&!a.clippath.contain(e,i))return!1;a.silent&&(n=!0),a=a.parent}return n?fb:!0}return!1}function de(){var t=new zb(6);return ce(t),t}function ce(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function le(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 ke(t,e,i){var n=e[0]*i[0]+e[2]*i[1],a=e[1]*i[0]+e[3]*i[1],o=e[0]*i[2]+e[2]*i[3],r=e[1]*i[2]+e[3]*i[3],s=e[0]*i[4]+e[2]*i[5]+e[4],l=e[1]*i[4]+e[3]*i[5]+e[5];return t[0]=n,t[1]=a,t[2]=o,t[3]=r,t[4]=s,t[5]=l,t}function pe(t,e,i){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+i[0],t[5]=e[5]+i[1],t}function oe(t,e,i){var n=e[0],a=e[2],o=e[4],r=e[1],s=e[3],l=e[5],u=math.sin(i),h=math.cos(i);return t[0]=n*h+r*u,t[1]=-n*u+r*h,t[2]=a*h+s*u,t[3]=-a*u+h*s,t[4]=h*o+u*l,t[5]=h*l-u*o,t}function ne(t,e,i){var n=i[0],a=i[1];return t[0]=e[0]*n,t[1]=e[1]*a,t[2]=e[2]*n,t[3]=e[3]*a,t[4]=e[4]*n,t[5]=e[5]*a,t}function ze(t,e){var i=e[0],n=e[2],a=e[4],o=e[1],r=e[3],s=e[5],l=i*r-o*n;return l?(l=1/l,t[0]=r*l,t[1]=-o*l,t[2]=-n*l,t[3]=i*l,t[4]=(n*s-r*a)*l,t[5]=(o*a-i*s)*l,t):null}function re(t){var e=de();return le(e,t),e}function ee(t){return t>yb||-yb>t}function be(t){this._target=t.target,this._life=t.life||1e3,this._delay=t.delay||0,this._initialized=!1,this.loop=null==t.loop?!1:t.loop,this.gap=t.gap||0,this.easing=t.easing||"linear",this.onframe=t.onframe,this.ondestroy=t.ondestroy,this.onrestart=t.onrestart,this._pausedtime=0,this._paused=!1}function ve(t){return t=math.round(t),0>t?0:t>255?255:t}function ge(t){return t=math.round(t),0>t?0:t>360?360:t}function fe(t){return 0>t?0:t>1?1:t}function we(t){return ve(t.length&&"%"===t.charat(t.length-1)?parsefloat(t)/100*255:parseint(t,10))}function he(t){return fe(t.length&&"%"===t.charat(t.length-1)?parsefloat(t)/100:parsefloat(t))}function ze(t,e,i){return 0>i?i+=1:i>1&&(i-=1),1>6*i?t+(e-t)*i*6:1>2*i?e:2>3*i?t+(e-t)*(2/3-i)*6:t}function xe(t,e,i){return t+(e-t)*i}function ue(t,e,i,n,a){return t[0]=e,t[1]=i,t[2]=n,t[3]=a,t}function ye(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function je(t,e){ss&&ye(ss,e),ss=rs.put(t,ss||e.slice())}function qe(t,e){if(t){e=e||[];var i=rs.get(t);if(i)return ye(e,i);t+="";var n=t.replace(/ /g,"").tolowercase();if(n in os)return ye(e,os[n]),je(t,e),e;if("#"!==n.charat(0)){var a=n.indexof("("),o=n.indexof(")");if(-1!==a&&o+1===n.length){var r=n.substr(0,a),s=n.substr(a+1,o-(a+1)).split(","),l=1;switch(r){case"rgba":if(4!==s.length)return void ue(e,0,0,0,1);l=he(s.pop());case"rgb":return 3!==s.length?void ue(e,0,0,0,1):(ue(e,we(s[0]),we(s[1]),we(s[2]),l),je(t,e),e);case"hsla":return 4!==s.length?void ue(e,0,0,0,1):(s[3]=he(s[3]),ke(s,e),je(t,e),e);case"hsl":return 3!==s.length?void ue(e,0,0,0,1):(ke(s,e),je(t,e),e);default:return}}ue(e,0,0,0,1)}else{if(4===n.length){var u=parseint(n.substr(1),16);return u>=0&&4095>=u?(ue(e,(3840&u)>>4|(3840&u)>>8,240&u|(240&u)>>4,15&u|(15&u)<<4,1),je(t,e),e):void ue(e,0,0,0,1)}if(7===n.length){var u=parseint(n.substr(1),16);return u>=0&&16777215>=u?(ue(e,(16711680&u)>>16,(65280&u)>>8,255&u,1),je(t,e),e):void ue(e,0,0,0,1)}}}}function ke(t,e){var i=(parsefloat(t[0])%360+360)%360/360,n=he(t[1]),a=he(t[2]),o=.5>=a?a*(n+1):a+n-a*n,r=2*a-o;return e=e||[],ue(e,ve(255*ze(r,o,i+1/3)),ve(255*ze(r,o,i)),ve(255*ze(r,o,i-1/3)),1),4===t.length&&(e[3]=t[3]),e}function $e(t){if(t){var e,i,n=t[0]/255,a=t[1]/255,o=t[2]/255,r=math.min(n,a,o),s=math.max(n,a,o),l=s-r,u=(s+r)/2;if(0===l)e=0,i=0;else{i=.5>u?l/(s+r):l/(2-s-r);var h=((s-n)/6+l/2)/l,c=((s-a)/6+l/2)/l,d=((s-o)/6+l/2)/l;n===s?e=d-c:a===s?e=1/3+h-d:o===s&&(e=2/3+c-h),0>e&&(e+=1),e>1&&(e-=1)}var f=[360*e,i,u];return null!=t[3]&&f.push(t[3]),f}}function je(t,e){var i=qe(t);if(i){for(var n=0;3>n;n++)i[n]=0>e?i[n]*(1-e)|0:(255-i[n])*e+i[n]|0,i[n]>255?i[n]=255:t[n]<0&&(i[n]=0);return ai(i,4===i.length?"rgba":"rgb")}}function qe(t){var e=qe(t);return e?((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).tostring(16).slice(1):void 0}function ti(t,e,i){if(e&&e.length&&t>=0&&1>=t){i=i||[];var n=t*(e.length-1),a=math.floor(n),o=math.ceil(n),r=e[a],s=e[o],l=n-a;return i[0]=ve(xe(r[0],s[0],l)),i[1]=ve(xe(r[1],s[1],l)),i[2]=ve(xe(r[2],s[2],l)),i[3]=fe(xe(r[3],s[3],l)),i}}function ei(t,e,i){if(e&&e.length&&t>=0&&1>=t){var n=t*(e.length-1),a=math.floor(n),o=math.ceil(n),r=qe(e[a]),s=qe(e[o]),l=n-a,u=ai([ve(xe(r[0],s[0],l)),ve(xe(r[1],s[1],l)),ve(xe(r[2],s[2],l)),fe(xe(r[3],s[3],l))],"rgba");return i?{color:u,leftindex:a,rightindex:o,value:n}:u}}function ii(t,e,i,n){return t=qe(t),t?(t=$e(t),null!=e&&(t[0]=ge(e)),null!=i&&(t[1]=he(i)),null!=n&&(t[2]=he(n)),ai(ke(t),"rgba")):void 0}function ni(t,e){return t=qe(t),t&&null!=e?(t[3]=fe(e),ai(t,"rgba")):void 0}function ai(t,e){if(t&&t.length){var i=t[0]+","+t[1]+","+t[2];return("rgba"===e||"hsva"===e||"hsla"===e)&&(i+=","+t[3]),e+"("+i+")"}}function oi(t,e){return t[e]}function ri(t,e,i){t[e]=i}function si(t,e,i){return(e-t)*i+t}function li(t,e,i){return i>.5?e:t}function ui(t,e,i,n,a){var o=t.length;if(1===a)for(var r=0;o>r;r++)n[r]=si(t[r],e[r],i);else for(var s=o&&t[0].length,r=0;o>r;r++)for(var l=0;s>l;l++)n[r][l]=si(t[r][l],e[r][l],i)}function hi(t,e,i){var n=t.length,a=e.length;if(n!==a){var o=n>a;if(o)t.length=a;else for(var r=n;a>r;r++)t.push(1===i?e[r]:cs.call(e[r]))}for(var s=t[0]&&t[0].length,r=0;rl;l++)isnan(t[r][l])&&(t[r][l]=e[r][l])}function ci(t,e,i){if(t===e)return!0;var n=t.length;if(n!==e.length)return!1;if(1===i){for(var a=0;n>a;a++)if(t[a]!==e[a])return!1}else for(var o=t[0].length,a=0;n>a;a++)for(var r=0;o>r;r++)if(t[a][r]!==e[a][r])return!1;return!0}function di(t,e,i,n,a,o,r,s,l){var u=t.length;if(1===l)for(var h=0;u>h;h++)s[h]=fi(t[h],e[h],i[h],n[h],a,o,r);else for(var c=t[0].length,h=0;u>h;h++)for(var d=0;c>d;d++)s[h][d]=fi(t[h][d],e[h][d],i[h][d],n[h][d],a,o,r)}function fi(t,e,i,n,a,o,r){var s=.5*(i-t),l=.5*(n-e);return(2*(e-i)+s+l)*r+(-3*(e-i)-2*s-l)*o+s*a+e}function pi(t){if(d(t)){var e=t.length;if(d(t[0])){for(var i=[],n=0;e>n;n++)i.push(cs.call(t[n]));return i}return cs.call(t)}return t}function gi(t){return t[0]=math.floor(t[0]),t[1]=math.floor(t[1]),t[2]=math.floor(t[2]),"rgba("+t.join(",")+")"}function mi(t){var e=t[t.length-1].value;return d(e&&e[0])?2:1}function vi(t,e,i,n,a,o){var r=t._getter,s=t._setter,l="spline"===e,u=n.length;if(u){var h,c=n[0].value,f=d(c),p=!1,g=!1,m=f?mi(n):0;n.sort(function(t,e){return t.time-e.time}),h=n[u-1].time;for(var v=[],y=[],x=n[0].value,_=!0,w=0;u>w;w++){v.push(n[w].time/h);var b=n[w].value;if(f&&ci(b,x,m)||!f&&b===x||(_=!1),x=b,"string"==typeof b){var s=qe(b);s?(b=s,p=!0):g=!0}y.push(b)}if(o||!_){for(var m=y[u-1],w=0;u-1>w;w++)f?hi(y[w],m,m):!isnan(y[w])||isnan(m)||g||p||(y[w]=m);f&&hi(r(t._target,a),m,m);var i,a,t,d,c,l,k=0,p=0;if(p)var o=[0,0,0,0];var n=function(t,e){var i;if(0>e)i=0;else if(p>e){for(i=math.min(k+1,u-1),i=i;i>=0&&!(v[i]<=e);i--);i=math.min(i,u-2)}else{for(i=k;u>i&&!(v[i]>e);i++);i=math.min(i-1,u-2)}k=i,p=e;var n=v[i+1]-v[i];if(0!==n)if(a=(e-v[i])/n,l)if(d=y[i],t=y[0===i?i:i-1],c=y[i>u-2?u-1:i+1],l=y[i>u-3?u-1:i+2],f)di(t,d,c,l,a,a*a,a*a*a,r(t,a),m);else{var o;if(p)o=di(t,d,c,l,a,a*a,a*a*a,o,1),o=gi(o);else{if(g)return li(d,c,a);o=fi(t,d,c,l,a,a*a,a*a*a)}s(t,a,o)}else if(f)ui(y[i],y[i+1],a,r(t,a),m);else{var o;if(p)ui(y[i],y[i+1],a,o,1),o=gi(o);else{if(g)return li(y[i],y[i+1],a);o=si(y[i],y[i+1],a)}s(t,a,o)}},z=new be({target:t._target,life:h,loop:t._loop,delay:t._delay,onframe:n,ondestroy:i});return e&&"spline"!==e&&(z.easing=e),z}}}function yi(t,e,i,n,a,o,r,s){function l(){h--,h||o&&o()}b(n)?(o=a,a=n,n=0):w(a)?(o=a,a="linear",n=0):w(n)?(o=n,n=0):w(i)?(o=i,i=500):i||(i=500),t.stopanimation(),xi(t,"",t,e,i,n,s);var u=t.animators.slice(),h=u.length;h||o&&o();for(var c=0;c0&&t.animate(e,!1).when(null==a?500:a,s).delay(o||0)}function _i(t,e,i,n){if(e){var a={};a[e]={},a[e][i]=n,t.attr(a)}else t.attr(i,n)}function wi(t,e,i,n){0>i&&(t+=i,i=-i),0>n&&(e+=n,n=-n),this.x=t,this.y=e,this.width=i,this.height=n}function bi(t){for(var e=0;t>=ms;)e|=1&t,t>>=1;return t+e}function si(t,e,i,n){var a=e+1;if(a===i)return 1;if(n(t[a++],t[e])<0){for(;i>a&&n(t[a],t[a-1])<0;)a++;mi(t,e,a)}else for(;i>a&&n(t[a],t[a-1])>=0;)a++;return a-e}function mi(t,e,i){for(i--;i>e;){var n=t[e];t[e++]=t[i],t[i--]=n}}function ii(t,e,i,n,a){for(n===e&&n++;i>n;n++){for(var o,r=t[n],s=e,l=n;l>s;)o=s+l>>>1,a(r,t[o])<0?l=o:s=o+1;var u=n-s;switch(u){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;u>0;)t[s+u]=t[s+u-1],u--}t[s]=r}}function ai(t,e,i,n,a,o){var r=0,s=0,l=1;if(o(t,e[i+a])>0){for(s=n-a;s>l&&o(t,e[i+a+l])>0;)r=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s),r+=a,l+=a}else{for(s=a+1;s>l&&o(t,e[i+a-l])<=0;)r=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s);var u=r;r=a-l,l=a-u}for(r++;l>r;){var h=r+(l-r>>>1);o(t,e[i+h])>0?r=h+1:l=h}return l}function ti(t,e,i,n,a,o){var r=0,s=0,l=1;if(o(t,e[i+a])<0){for(s=a+1;s>l&&o(t,e[i+a-l])<0;)r=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s);var u=r;r=a-l,l=a-u}else{for(s=n-a;s>l&&o(t,e[i+a+l])>=0;)r=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s),r+=a,l+=a}for(r++;l>r;){var h=r+(l-r>>>1);o(t,e[i+h])<0?l=h:r=h+1}return l}function di(t,e){function i(t,e){l[c]=t,u[c]=e,c+=1}function n(){for(;c>1;){var t=c-2;if(t>=1&&u[t-1]<=u[t]+u[t+1]||t>=2&&u[t-2]<=u[t]+u[t-1])u[t-1]u[t+1])break;o(t)}}function a(){for(;c>1;){var t=c-2;t>0&&u[t-1]=a?r(n,a,o,h):s(n,a,o,h)))}function r(i,n,a,o){var r=0;for(r=0;n>r;r++)d[r]=t[i+r];var s=0,l=a,u=i;if(t[u++]=t[l++],0!==--o){if(1===n){for(r=0;o>r;r++)t[u+r]=t[l+r];return void(t[u+o]=d[s])}for(var c,f,p,g=h;;){c=0,f=0,p=!1;do if(e(t[l],d[s])<0){if(t[u++]=t[l++],f++,c=0,0===--o){p=!0;break}}else if(t[u++]=d[s++],c++,f=0,1===--n){p=!0;break}while(g>(c|f));if(p)break;do{if(c=ti(t[l],d,s,n,0,e),0!==c){for(r=0;c>r;r++)t[u+r]=d[s+r];if(u+=c,s+=c,n-=c,1>=n){p=!0;break}}if(t[u++]=t[l++],0===--o){p=!0;break}if(f=ai(d[s],t,l,o,0,e),0!==f){for(r=0;f>r;r++)t[u+r]=t[l+r];if(u+=f,l+=f,o-=f,0===o){p=!0;break}}if(t[u++]=d[s++],1===--n){p=!0;break}g--}while(c>=is||f>=is);if(p)break;0>g&&(g=0),g+=2}if(h=g,1>h&&(h=1),1===n){for(r=0;o>r;r++)t[u+r]=t[l+r];t[u+o]=d[s]}else{if(0===n)throw new error;for(r=0;n>r;r++)t[u+r]=d[s+r]}}else for(r=0;n>r;r++)t[u+r]=d[s+r]}function s(i,n,a,o){var r=0;for(r=0;o>r;r++)d[r]=t[a+r];var s=i+n-1,l=o-1,u=a+o-1,c=0,f=0;if(t[u--]=t[s--],0!==--n){if(1===o){for(u-=n,s-=n,f=u+1,c=s+1,r=n-1;r>=0;r--)t[f+r]=t[c+r];return void(t[u]=d[l])}for(var p=h;;){var g=0,m=0,v=!1;do if(e(d[l],t[s])<0){if(t[u--]=t[s--],g++,m=0,0===--n){v=!0;break}}else if(t[u--]=d[l--],m++,g=0,1===--o){v=!0;break}while(p>(g|m));if(v)break;do{if(g=n-ti(d[l],t,i,n,n-1,e),0!==g){for(u-=g,s-=g,n-=g,f=u+1,c=s+1,r=g-1;r>=0;r--)t[f+r]=t[c+r];if(0===n){v=!0;break}}if(t[u--]=d[l--],1===--o){v=!0;break}if(m=o-ai(t[s],d,0,o,o-1,e),0!==m){for(u-=m,l-=m,o-=m,f=u+1,c=l+1,r=0;m>r;r++)t[f+r]=d[c+r];if(1>=o){v=!0;break}}if(t[u--]=t[s--],0===--n){v=!0;break}p--}while(g>=is||m>=is);if(v)break;0>p&&(p=0),p+=2}if(h=p,1>h&&(h=1),1===o){for(u-=n,s-=n,f=u+1,c=s+1,r=n-1;r>=0;r--)t[f+r]=t[c+r];t[u]=d[l]}else{if(0===o)throw new error;for(c=u-(o-1),r=0;o>r;r++)t[c+r]=d[r]}}else for(c=u-(o-1),r=0;o>r;r++)t[c+r]=d[r]}var l,u,h=is,c=0,d=[];l=[],u=[],this.mergeruns=n,this.forcemergeruns=a,this.pushrun=i}function ci(t,e,i,n){i||(i=0),n||(n=t.length);var a=n-i;if(!(2>a)){var o=0;if(ms>a)return o=si(t,i,n,e),void ii(t,i,n,i+o,e);var r=new di(t,e),s=bi(a);do{if(o=si(t,i,n,e),s>o){var l=a;l>s&&(l=s),ii(t,i,i+l,i+o,e),o=l}r.pushrun(i,o),r.mergeruns(),a-=o,i+=o}while(0!==a);r.forcemergeruns()}}function li(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}function ki(t,e,i){var n=null==e.x?0:e.x,a=null==e.x2?1:e.x2,o=null==e.y?0:e.y,r=null==e.y2?0:e.y2;e.global||(n=n*i.width+i.x,a=a*i.width+i.x,o=o*i.height+i.y,r=r*i.height+i.y),n=isnan(n)?0:n,a=isnan(a)?1:a,o=isnan(o)?0:o,r=isnan(r)?0:r;var s=t.createlineargradient(n,o,a,r);return s}function pi(t,e,i){var n=i.width,a=i.height,o=math.min(n,a),r=null==e.x?.5:e.x,s=null==e.y?.5:e.y,l=null==e.r?.5:e.r;e.global||(r=r*n+i.x,s=s*a+i.y,l*=o);var u=t.createradialgradient(r,s,0,r,s,l);return u}function oi(){return!1}function ni(t,e,i){var n=wb(),a=e.getwidth(),o=e.getheight(),r=n.style;return r&&(r.position="absolute",r.left=0,r.top=0,r.width=a+"px",r.height=o+"px",n.setattribute("data-zr-dom-id",t)),n.width=a*i,n.height=o*i,n}function zi(t){if("string"==typeof t){var e=vs.get(t);return e&&e.image}return t}function ri(t,e,i,n,a){if(t){if("string"==typeof t){if(e&&e.__zrimagesrc===t||!i)return e;var o=vs.get(t),r={hostel:i,cb:n,cbpayload:a};return o?(e=o.image,!bi(e)&&o.pending.push(r)):(e=new image,e.onload=e.onerror=ei,vs.put(t,e.__cachedimgobj={image:e,pending:[r]}),e.src=e.__zrimagesrc=t),e}return t}return e}function ei(){var t=this.__cachedimgobj;this.onload=this.onerror=this.__cachedimgobj=null;for(var e=0;eo;o++)a=math.max($i(n[o],e).width,a);return fs>ws&&(fs=0,gs={}),fs++,gs[i]=a,a}function gi(t,e,i,n,a,o,r,s){return r?wi(t,e,i,n,a,o,r,s):fi(t,e,i,n,a,o,s)}function fi(t,e,i,n,a,o,r){var s=ji(t,e,a,o,r),l=vi(t,e);a&&(l+=a[1]+a[3]);var u=s.outerheight,h=hi(0,l,i),c=zi(0,u,n),d=new wi(h,c,l,u);return d.lineheight=s.lineheight,d}function wi(t,e,i,n,a,o,r,s){var l=qi(t,{rich:r,truncate:s,font:e,textalign:i,textpadding:a,textlineheight:o}),u=l.outerwidth,h=l.outerheight,c=hi(0,u,i),d=zi(0,h,n);return new wi(c,d,u,h)}function hi(t,e,i){return"right"===i?t-=e:"center"===i&&(t-=e/2),t}function zi(t,e,i){return"middle"===i?t-=e/2:"bottom"===i&&(t-=e),t}function xi(t,e,i){var n=e.textposition,a=e.textdistance,o=i.x,r=i.y,s=i.height,l=i.width,u=s/2,h="left",c="top";switch(n){case"left":o-=a,r+=u,h="right",c="middle";break;case"right":o+=a+l,r+=u,c="middle";break;case"top":o+=l/2,r-=a,h="center",c="bottom";break;case"bottom":o+=l/2,r+=s+a,h="center";break;case"inside":o+=l/2,r+=u,h="center",c="middle";break;case"insideleft":o+=a,r+=u,c="middle";break;case"insideright":o+=l-a,r+=u,h="right",c="middle";break;case"insidetop":o+=l/2,r+=a,h="center";break;case"insidebottom":o+=l/2,r+=s-a,h="center",c="bottom";break;case"insidetopleft":o+=a,r+=a;break;case"insidetopright":o+=l-a,r+=a,h="right";break;case"insidebottomleft":o+=a,r+=s-a,c="bottom";break;case"insidebottomright":o+=l-a,r+=s-a,h="right",c="bottom"}return t=t||{},t.x=o,t.y=r,t.textalign=h,t.textverticalalign=c,t}function ui(t,e,i,n,a){if(!e)return"";var o=(t+"").split("\n");a=yi(e,i,n,a);for(var r=0,s=o.length;s>r;r++)o[r]=ji(o[r],a);return o.join("\n")}function yi(t,e,i,n){n=r({},n),n.font=e;var i=c(i,"...");n.maxiterations=c(n.maxiterations,2);var a=n.minchar=c(n.minchar,0);n.cncharwidth=vi("国",e);var o=n.asccharwidth=vi("a",e);n.placeholder=c(n.placeholder,"");for(var s=t=math.max(0,t-1),l=0;a>l&&s>=o;l++)s-=o;var u=vi(i,e);return u>s&&(i="",u=0),s=t-u,n.ellipsis=i,n.ellipsiswidth=u,n.contentwidth=s,n.containerwidth=t,n}function ji(t,e){var i=e.containerwidth,n=e.font,a=e.contentwidth;if(!i)return"";var o=vi(t,n);if(i>=o)return t;for(var r=0;;r++){if(a>=o||r>=e.maxiterations){t+=e.ellipsis;break}var s=0===r?qi(t,a,e.asccharwidth,e.cncharwidth):o>0?math.floor(t.length*a/o):0;t=t.substr(0,s),o=vi(t,n)}return""===t&&(t=e.placeholder),t}function qi(t,e,i,n){for(var a=0,o=0,r=t.length;r>o&&e>a;o++){var s=t.charcodeat(o);a+=s>=0&&127>=s?i:n}return o}function ki(t){return vi("国",t)}function $i(t,e){return xs.measuretext(t,e)}function ji(t,e,i,n,a){null!=t&&(t+="");var o=c(n,ki(e)),r=t?t.split("\n"):[],s=r.length*o,l=s;if(i&&(l+=i[0]+i[2]),t&&a){var u=a.outerheight,h=a.outerwidth;if(null!=u&&l>u)t="",r=[];else if(null!=h)for(var c=yi(h-(i?i[1]+i[3]:0),e,a.ellipsis,{minchar:a.minchar,placeholder:a.placeholder}),d=0,f=r.length;f>d;d++)r[d]=ji(r[d],c)}return{lines:r,height:s,outerheight:l,lineheight:o}}function qi(t,e){var i={lines:[],width:0,height:0};if(null!=t&&(t+=""),!t)return i;for(var n,a=hs.lastindex=0;null!=(n=hs.exec(t));){var o=n.index;o>a&&tn(i,t.substring(a,o)),tn(i,n[2],n[1]),a=hs.lastindex}af)return{lines:[],width:0,height:0};x.textwidth=vi(x.text,b);var m=_.textwidth,i=null==m||"auto"===m;if("string"==typeof m&&"%"===m.charat(m.length-1))x.percentwidth=m,u.push(x),m=0;else{if(i){m=x.textwidth;var a=_.textbackgroundcolor,t=a&&a.image;t&&(t=zi(t),bi(t)&&(m=math.max(m,t.width*s/t.height)))}var d=w?w[1]+w[3]:0;m+=d;var k=null!=d?d-v:null;null!=k&&m>k&&(!i||d>k?(x.text="",x.textwidth=m=0):(x.text=ui(x.text,k-d,b,c.ellipsis,{minchar:c.minchar}),x.textwidth=vi(x.text,b),m=x.textwidth+d))}v+=x.width=m,_&&(m=math.max(m,x.lineheight))}g.width=v,g.lineheight=m,s+=m,l=math.max(l,v)}i.outerwidth=i.width=c(e.textwidth,l),i.outerheight=i.height=c(e.textheight,s),h&&(i.outerwidth+=h[1]+h[3],i.outerheight+=h[0]+h[2]);for(var p=0;pl&&(r+=l,l=-l),0>u&&(s+=u,u=-u),"number"==typeof h?i=n=a=o=h:h instanceof array?1===h.length?i=n=a=o=h[0]:2===h.length?(i=a=h[0],n=o=h[1]):3===h.length?(i=h[0],n=o=h[1],a=h[2]):(i=h[0],n=h[1],a=h[2],o=h[3]):i=n=a=o=0;var c;i+n>l&&(c=i+n,i*=l/c,n*=l/c),a+o>l&&(c=a+o,a*=l/c,o*=l/c),n+a>u&&(c=n+a,n*=u/c,a*=u/c),i+o>u&&(c=i+o,i*=u/c,o*=u/c),t.moveto(r+i,s),t.lineto(r+l-n,s),0!==n&&t.arc(r+l-n,s+n,n,-math.pi/2,0),t.lineto(r+l,s+u-a),0!==a&&t.arc(r+l-a,s+u-a,a,0,math.pi/2),t.lineto(r+o,s+u),0!==o&&t.arc(r+o,s+u-o,o,math.pi/2,math.pi),t.lineto(r,s+i),0!==i&&t.arc(r+i,s+i,i,math.pi,1.5*math.pi)}function an(t){return on(t),f(t.rich,on),t}function on(t){if(t){t.font=en(t);var e=t.textalign;"middle"===e&&(e="center"),t.textalign=null==e||ys[e]?e:"left";var i=t.textverticalalign||t.textbaseline;"center"===i&&(i="middle"),t.textverticalalign=null==i||js[i]?i:"top";var n=t.textpadding;n&&(t.textpadding=p(t.textpadding))}}function rn(t,e,i,n,a,o){n.rich?ln(t,e,i,n,a,o):sn(t,e,i,n,a,o)}function sn(t,e,i,n,a,o){var r,s=dn(n),l=!1,u=e.__attrcachedby===cs.plain_text;o!==ls?(o&&(r=o.style,l=!s&&u&&r),e.__attrcachedby=s?cs.none:cs.plain_text):u&&(e.__attrcachedby=cs.none);var h=n.font||us;l&&h===(r.font||us)||(e.font=h);var c=t.__computedfont;t.__stylefont!==h&&(t.__stylefont=h,c=t.__computedfont=e.font);var d=n.textpadding,f=n.textlineheight,p=t.__textcotentblock;(!p||t.__dirtytext)&&(p=t.__textcotentblock=ji(i,c,d,f,n.truncate));var g=p.outerheight,m=p.lines,v=p.lineheight,y=gn($s,t,n,a),x=y.basex,_=y.basey,w=y.textalign||"left",b=y.textverticalalign;hn(e,n,a,x,_);var s=zi(_,g,b),m=x,i=s;if(s||d){var a=vi(i,c),t=a;d&&(t+=d[1]+d[3]);var d=hi(x,t,w);s&&fn(t,e,n,d,s,t,g),d&&(m=_n(x,w,d),i+=d[0])}e.textalign=w,e.textbaseline="middle",e.globalalpha=n.opacity||1;for(var c=0;ca&&(_=b[a],!_.textalign||"left"===_.textalign);)cn(t,e,_,n,m,v,t,"left"),i-=_.width,t+=_.width,a++;for(;c>=0&&(_=b[c],"right"===_.textalign);)cn(t,e,_,n,m,v,d,"right"),i-=_.width,d-=_.width,c--;for(t+=(o-(t-m)-(y-d)-i)/2;c>=a;)_=b[a],cn(t,e,_,n,m,v,t+_.width/2,"center"),t+=_.width,a++;v+=m}}function hn(t,e,i,n,a){if(i&&e.textrotation){var o=e.textorigin;"center"===o?(n=i.width/2+i.x,a=i.height/2+i.y):o&&(n=o[0]+i.x,a=o[1]+i.y),t.translate(n,a),t.rotate(-e.textrotation),t.translate(-n,-a)}}function cn(t,e,i,n,a,o,r,s){var l=n.rich[i.stylename]||{};l.text=i.text;var u=i.textverticalalign,h=o+a/2;"top"===u?h=o+i.height/2:"bottom"===u&&(h=o+a-i.height/2),!i.islineholder&&dn(l)&&fn(t,e,l,"right"===s?r-i.width:"center"===s?r-i.width/2:r,h-i.height/2,i.width,i.height);var c=i.textpadding;c&&(r=_n(r,s,c),h-=i.height/2-c[2]-i.textheight/2),mn(e,"shadowblur",l(l.textshadowblur,n.textshadowblur,0)),mn(e,"shadowcolor",l.textshadowcolor||n.textshadowcolor||"transparent"),mn(e,"shadowoffsetx",l(l.textshadowoffsetx,n.textshadowoffsetx,0)),mn(e,"shadowoffsety",l(l.textshadowoffsety,n.textshadowoffsety,0)),mn(e,"textalign",s),mn(e,"textbaseline","middle"),mn(e,"font",i.font||us); var d=vn(l.textstroke||n.textstroke,p),f=yn(l.textfill||n.textfill),p=c(l.textstrokewidth,n.textstrokewidth);d&&(mn(e,"linewidth",p),mn(e,"strokestyle",d),e.stroketext(i.text,r,h)),f&&(mn(e,"fillstyle",f),e.filltext(i.text,r,h))}function dn(t){return!!(t.textbackgroundcolor||t.textborderwidth&&t.textbordercolor)}function fn(t,e,i,n,a,o,r){var s=i.textbackgroundcolor,l=i.textborderwidth,u=i.textbordercolor,h=b(s);if(mn(e,"shadowblur",i.textboxshadowblur||0),mn(e,"shadowcolor",i.textboxshadowcolor||"transparent"),mn(e,"shadowoffsetx",i.textboxshadowoffsetx||0),mn(e,"shadowoffsety",i.textboxshadowoffsety||0),h||l&&u){e.beginpath();var c=i.textborderradius;c?nn(e,{x:n,y:a,width:o,height:r,r:c}):e.rect(n,a,o,r),e.closepath()}if(h)if(mn(e,"fillstyle",s),null!=i.fillopacity){var d=e.globalalpha;e.globalalpha=i.fillopacity*i.opacity,e.fill(),e.globalalpha=d}else e.fill();else if(s(s)){var f=s.image;f=ri(f,null,t,pn,s),f&&bi(f)&&e.drawimage(f,n,a,o,r)}if(l&&u)if(mn(e,"linewidth",l),mn(e,"strokestyle",u),null!=i.strokeopacity){var d=e.globalalpha;e.globalalpha=i.strokeopacity*i.opacity,e.stroke(),e.globalalpha=d}else e.stroke()}function pn(t,e){e.image=t}function gn(t,e,i,n){var a=i.x||0,o=i.y||0,r=i.textalign,s=i.textverticalalign;if(n){var l=i.textposition;if(l instanceof array)a=n.x+xn(l[0],n.width),o=n.y+xn(l[1],n.height);else{var u=e&&e.calculatetextposition?e.calculatetextposition(ks,i,n):xi(ks,i,n);a=u.x,o=u.y,r=r||u.textalign,s=s||u.textverticalalign}var h=i.textoffset;h&&(a+=h[0],o+=h[1])}return t=t||{},t.basex=a,t.basey=o,t.textalign=r,t.textverticalalign=s,t}function mn(t,e,i){return t[e]=ds(t,e,i),t[e]}function vn(t,e){return null==t||0>=e||"transparent"===t||"none"===t?null:t.image||t.colorstops?"#000":t}function yn(t){return null==t||"none"===t?null:t.image||t.colorstops?"#000":t}function xn(t,e){return"string"==typeof t?t.lastindexof("%")>=0?parsefloat(t)/100*e:parsefloat(t):t}function _n(t,e,i){return"right"===e?t-i[1]:"center"===e?t+i[3]/2-i[1]/2:t+i[3]}function wn(t,e){return null!=t&&(t||e.textbackgroundcolor||e.textborderwidth&&e.textbordercolor||e.textpadding)}function bn(t){t=t||{},xs.call(this,t);for(var e in t)t.hasownproperty(e)&&"style"!==e&&(this[e]=t[e]);this.style=new ps(t.style,this),this._rect=null,this.__clippaths=null}function sn(t){bn.call(this,t)}function mn(t){return parseint(t,10)}function in(t){return t?t.__builtin__?!0:"function"!=typeof t.resize||"function"!=typeof t.refresh?!1:!0:!1}function an(t,e,i){return am.copy(t.getboundingrect()),t.transform&&am.applytransform(t.transform),om.width=e,om.height=i,!am.intersect(om)}function tn(t,e){if(t===e)return!1;if(!t||!e||t.length!==e.length)return!0;for(var i=0;in;n++){var o=i[n];!t.emphasis[e].hasownproperty(o)&&t[e].hasownproperty(o)&&(t.emphasis[e][o]=t[e][o])}}}function wn(t){return!bm(t)||sm(t)||t instanceof date?t:t.value}function hn(t){return bm(t)&&!(t instanceof array)}function zn(t,e){e=(e||[]).slice();var i=p(t||[],function(t){return{exist:t}});return wm(e,function(t,n){if(bm(t)){for(var a=0;a=i.length&&i.push({option:t})}}),i}function xn(t){var e=b();wm(t,function(t){var i=t.exist;i&&e.set(i.id,t)}),wm(t,function(t){var i=t.option;o(!i||null==i.id||!e.get(i.id)||e.get(i.id)===t,"id duplicates: "+(i&&i.id)),i&&null!=i.id&&e.set(i.id,t),!t.keyinfo&&(t.keyinfo={})}),wm(t,function(t,i){var n=t.exist,a=t.option,o=t.keyinfo;if(bm(a)){if(o.name=null!=a.name?a.name+"":n?n.name:mm+i,n)o.id=n.id;else if(null!=a.id)o.id=a.id+"";else{var r=0;do o.id="\x00"+o.name+"\x00"+r++;while(e.get(o.id))}e.set(o.id,t)}})}function un(t){var e=t.name;return!(!e||!e.indexof(mm))}function yn(t){return bm(t)&&t.id&&0===(t.id+"").indexof("\x00_ec_\x00")}function jn(t,e){function i(t,e,i){for(var n=0,a=t.length;a>n;n++)for(var o=t[n].seriesid,r=gn(t[n].dataindex),s=i&&i[o],l=0,u=r.length;u>l;l++){var h=r[l];s&&s[h]?s[h]=null:(e[o]||(e[o]={}))[h]=1}}function n(t,e){var i=[];for(var a in t)if(t.hasownproperty(a)&&null!=t[a])if(e)i.push(+a);else{var o=n(t[a],!0);o.length&&i.push({seriesid:a,dataindex:o})}return i}var a={},o={};return i(t||[],a),i(e||[],o,a),[n(a),n(o)]}function qn(t,e){return null!=e.dataindexinside?e.dataindexinside:null!=e.dataindex?_(e.dataindex)?p(e.dataindex,function(e){return t.indexofrawindex(e)}):t.indexofrawindex(e.dataindex):null!=e.name?_(e.name)?p(e.name,function(e){return t.indexofname(e)}):t.indexofname(e.name):void 0}function kn(){var t="__\x00ec_inner_"+am++ +"_"+math.random().tofixed(5);return function(e){return e[t]||(e[t]={})}}function $n(t,e,i){if(b(e)){var n={};n[e+"index"]=0,e=n}var a=i&&i.defaultmaintype;!a||jn(e,a+"index")||jn(e,a+"id")||jn(e,a+"name")||(e[a+"index"]=0);var o={};return wm(e,function(n,a){var n=e[a];if("dataindex"===a||"dataindexinside"===a)return void(o[a]=n);var r=a.match(/^(\w+)(index|id|name)$/)||[],s=r[1],l=(r[2]||"").tolowercase();if(!(!s||!l||null==n||"index"===l&&"none"===n||i&&i.includemaintypes&&u(i.includemaintypes,s)<0)){var h={maintype:s};("index"!==l||"all"!==n)&&(h[l]=n);var c=t.querycomponents(h);o[s+"models"]=c,o[s+"model"]=c[0]}}),o}function jn(t,e){return t&&t.hasownproperty(e)}function qn(t,e,i){t.setattribute?t.setattribute(e,i):t[e]=i}function ta(t,e){return t.getattribute?t.getattribute(e):t[e]}function ea(t){return"auto"===t?hb.domsupported?"html":"richtext":t||"html"}function ia(t,e){var i=b(),n=[];return f(t,function(t){var a=e(t);(i.get(a)||(n.push(a),i.set(a,[]))).push(t)}),{keys:n,buckets:i}}function na(t){var e={main:"",sub:""};return t&&(t=t.split(tm),e.main=t[0]||"",e.sub=t[1]||""),e}function aa(t){o(/^[a-za-z0-9_]+([.][a-za-z0-9_]+)?$/.test(t),'componenttype "'+t+'" illegal')}function oa(t){t.$constructor=t,t.extend=function(t){var e=this,i=function(){t.$constructor?t.$constructor.apply(this,arguments):e.apply(this,arguments)};return r(i.prototype,t),i.extend=this.extend,i.supercall=sa,i.superapply=la,h(i,this),i.superclass=e,i}}function ra(t){var e=["__\x00is_clz",cm++,math.random().tofixed(3)].join("_");t.prototype[e]=!0,t.isinstance=function(t){return!(!t||!t[e])}}function sa(t,e){var i=k(arguments,2);return this.superclass.prototype[e].apply(t,i)}function la(t,e,i){return this.superclass.prototype[e].apply(t,i)}function ua(t,e){function i(t){var e=n[t.main];return e&&e[dm]||(e=n[t.main]={},e[dm]=!0),e}e=e||{};var n={};if(t.registerclass=function(t,e){if(e)if(aa(e),e=na(e),e.sub){if(e.sub!==dm){var a=i(e);a[e.sub]=t}}else n[e.main]=t;return t},t.getclass=function(t,e,i){var a=n[t];if(a&&a[dm]&&(a=e?a[e]:null),i&&!a)throw new error(e?"component "+t+"."+(e||"")+" not exists. load it first.":t+".type should be specified.");return a},t.getclassesbymaintype=function(t){t=na(t);var e=[],i=n[t.main];return i&&i[dm]?f(i,function(t,i){i!==dm&&e.push(t)}):e.push(i),e},t.hasclass=function(t){return t=na(t),!!n[t.main]},t.getallclassmaintypes=function(){var t=[];return f(n,function(e,i){t.push(i)}),t},t.hassubtypes=function(t){t=na(t);var e=n[t.main];return e&&e[dm]},t.parseclasstype=na,e.registerwhenextend){var a=t.extend;a&&(t.extend=function(e){var i=a.call(this,e);return t.registerclass(i,e.type)})}return t}function ha(t){return t>-em&&em>t}function ca(t){return t>em||-em>t}function da(t,e,i,n,a){var o=1-a;return o*o*(o*t+3*a*e)+a*a*(a*n+3*o*i)}function fa(t,e,i,n,a){var o=1-a;return 3*(((e-t)*o+2*(i-e)*a)*o+(n-i)*a*a)}function pa(t,e,i,n,a,o){var r=n+3*(e-i)-t,s=3*(i-2*e+t),l=3*(e-t),u=t-a,h=s*s-3*r*l,c=s*l-9*r*u,d=l*l-3*s*u,f=0;if(ha(h)&&ha(c))if(ha(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(ha(g)){var m=c/h,p=-s/r+m,v=-m/2;p>=0&&1>=p&&(o[f++]=p),v>=0&&1>=v&&(o[f++]=v)}else if(g>0){var y=rm(g),x=h*s+1.5*r*(-c+y),_=h*s+1.5*r*(-c-y);x=0>x?-zm(-x,gm):zm(x,gm),_=0>_?-zm(-_,gm):zm(_,gm);var p=(-s-(x+_))/(3*r);p>=0&&1>=p&&(o[f++]=p)}else{var w=(2*h*s-3*r*c)/(2*rm(h*h*h)),b=math.acos(w)/3,s=rm(h),m=math.cos(b),p=(-s-2*s*m)/(3*r),v=(-s+s*(m+vm*math.sin(b)))/(3*r),i=(-s+s*(m-vm*math.sin(b)))/(3*r);p>=0&&1>=p&&(o[f++]=p),v>=0&&1>=v&&(o[f++]=v),i>=0&&1>=i&&(o[f++]=i)}}return f}function ga(t,e,i,n,a){var o=6*i-12*e+6*t,r=9*e+3*n-3*t-9*i,s=3*e-3*t,l=0;if(ha(r)){if(ca(o)){var u=-s/o;u>=0&&1>=u&&(a[l++]=u)}}else{var h=o*o-4*r*s;if(ha(h))a[0]=-o/(2*r);else if(h>0){var c=rm(h),u=(-o+c)/(2*r),d=(-o-c)/(2*r);u>=0&&1>=u&&(a[l++]=u),d>=0&&1>=d&&(a[l++]=d)}}return l}function ma(t,e,i,n,a,o){var r=(e-t)*a+t,s=(i-e)*a+e,l=(n-i)*a+i,u=(s-r)*a+r,h=(l-s)*a+s,c=(h-u)*a+u;o[0]=t,o[1]=r,o[2]=u,o[3]=c,o[4]=c,o[5]=h,o[6]=l,o[7]=n}function va(t,e,i,n,a,o,r,s,l,u,h){var c,d,f,p,g,m=.005,v=1/0;fm[0]=l,fm[1]=u;for(var y=0;1>y;y+=.05)wm[0]=da(t,i,a,r,y),wm[1]=da(e,n,o,s,y),p=cb(fm,wm),v>p&&(c=y,v=p);v=1/0;for(var x=0;32>x&&!(bm>m);x++)d=c-m,f=c+m,wm[0]=da(t,i,a,r,d),wm[1]=da(e,n,o,s,d),p=cb(wm,fm),d>=0&&v>p?(c=d,v=p):(hm[0]=da(t,i,a,r,f),hm[1]=da(e,n,o,s,f),g=cb(hm,fm),1>=f&&v>g?(c=f,v=g):m*=.5);return h&&(h[0]=da(t,i,a,r,c),h[1]=da(e,n,o,s,c)),rm(v)}function ya(t,e,i,n){var a=1-n;return a*(a*t+2*n*e)+n*n*i}function xa(t,e,i,n){return 2*((1-n)*(e-t)+n*(i-e))}function _a(t,e,i,n,a){var o=t-2*e+i,r=2*(e-t),s=t-n,l=0;if(ha(o)){if(ca(r)){var u=-s/r;u>=0&&1>=u&&(a[l++]=u)}}else{var h=r*r-4*o*s;if(ha(h)){var u=-r/(2*o);u>=0&&1>=u&&(a[l++]=u)}else if(h>0){var c=rm(h),u=(-r+c)/(2*o),d=(-r-c)/(2*o);u>=0&&1>=u&&(a[l++]=u),d>=0&&1>=d&&(a[l++]=d)}}return l}function wa(t,e,i){var n=t+i-2*e;return 0===n?.5:(t-e)/n}function ba(t,e,i,n,a){var o=(e-t)*n+t,r=(i-e)*n+e,s=(r-o)*n+o;a[0]=t,a[1]=o,a[2]=s,a[3]=s,a[4]=r,a[5]=i}function sa(t,e,i,n,a,o,r,s,l){var u,h=.005,c=1/0;fm[0]=r,fm[1]=s;for(var d=0;1>d;d+=.05){wm[0]=ya(t,i,a,d),wm[1]=ya(e,n,o,d);var f=cb(fm,wm);c>f&&(u=d,c=f)}c=1/0;for(var p=0;32>p&&!(bm>h);p++){var g=u-h,m=u+h;wm[0]=ya(t,i,a,g),wm[1]=ya(e,n,o,g);var f=cb(wm,fm);if(g>=0&&c>f)u=g,c=f;else{hm[0]=ya(t,i,a,m),hm[1]=ya(e,n,o,m);var v=cb(hm,fm);1>=m&&c>v?(u=m,c=v):h*=.5}}return l&&(l[0]=ya(t,i,a,u),l[1]=ya(e,n,o,u)),rm(c)}function ma(t,e,i){if(0!==t.length){var n,a=t[0],o=a[0],r=a[0],s=a[1],l=a[1];for(n=1;nh;h++){var p=d(t,i,a,r,jm[h]);l[0]=zm(p,l[0]),u[0]=xm(p,u[0])}for(f=c(e,n,o,s,qm),h=0;f>h;h++){var g=d(e,n,o,s,qm[h]);l[1]=zm(g,l[1]),u[1]=xm(g,u[1])}l[0]=zm(t,l[0]),u[0]=xm(t,u[0]),l[0]=zm(r,l[0]),u[0]=xm(r,u[0]),l[1]=zm(e,l[1]),u[1]=xm(e,u[1]),l[1]=zm(s,l[1]),u[1]=xm(s,u[1])}function ta(t,e,i,n,a,o,r,s){var l=wa,u=ya,h=xm(zm(l(t,i,a),1),0),c=xm(zm(l(e,n,o),1),0),d=u(t,i,a,h),f=u(e,n,o,c);r[0]=zm(t,a,d),r[1]=zm(e,o,f),s[0]=xm(t,a,d),s[1]=xm(e,o,f)}function da(t,e,i,n,a,o,r,s,l){var u=re,h=se,c=math.abs(a-o);if(1e-4>c%jm&&c>1e-4)return s[0]=t-i,s[1]=e-n,l[0]=t+i,void(l[1]=e+n);if(qm[0]=ym(a)*i+t,qm[1]=um(a)*n+e,km[0]=ym(o)*i+t,km[1]=um(o)*n+e,u(s,qm,km),h(l,qm,km),a%=jm,0>a&&(a+=jm),o%=jm,0>o&&(o+=jm),a>o&&!r?o+=jm:o>a&&r&&(a+=jm),r){var d=o;o=a,a=d}for(var f=0;o>f;f+=math.pi/2)f>a&&($m[0]=ym(f)*i+t,$m[1]=um(f)*n+e,u(s,$m,s),h(l,$m,l))}function ca(t,e,i,n,a,o,r){if(0===a)return!1;var s=a,l=0,u=t;if(r>e+s&&r>n+s||e-s>r&&n-s>r||o>t+s&&o>i+s||t-s>o&&i-s>o)return!1;if(t===i)return math.abs(o-t)<=s/2;l=(e-n)/(t-i),u=(t*n-i*e)/(t-i);var h=l*o-r+u,c=h*h/(l*l+1);return s/2*s/2>=c}function la(t,e,i,n,a,o,r,s,l,u,h){if(0===l)return!1;var c=l;if(h>e+c&&h>n+c&&h>o+c&&h>s+c||e-c>h&&n-c>h&&o-c>h&&s-c>h||u>t+c&&u>i+c&&u>a+c&&u>r+c||t-c>u&&i-c>u&&a-c>u&&r-c>u)return!1;var d=va(t,e,i,n,a,o,r,s,u,h,null);return c/2>=d}function ka(t,e,i,n,a,o,r,s,l){if(0===r)return!1;var u=r;if(l>e+u&&l>n+u&&l>o+u||e-u>l&&n-u>l&&o-u>l||s>t+u&&s>i+u&&s>a+u||t-u>s&&i-u>s&&a-u>s)return!1;var h=sa(t,e,i,n,a,o,s,l,null);return u/2>=h}function pa(t){return t%=fi,0>t&&(t+=fi),t}function oa(t,e,i,n,a,o,r,s,l){if(0===r)return!1;var u=r;s-=t,l-=e;var h=math.sqrt(s*s+l*l);if(h-u>i||i>h+u)return!1;if(math.abs(n-a)%pi<1e-4)return!0;if(o){var c=n;n=pa(a),a=pa(c)}else n=pa(n),a=pa(a);n>a&&(a+=pi);var d=math.atan2(l,s);return 0>d&&(d+=pi),d>=n&&a>=d||d+pi>=n&&a>=d+pi}function na(t,e,i,n,a,o){if(o>e&&o>n||e>o&&n>o)return 0;if(n===e)return 0;var r=e>n?1:-1,s=(o-e)/(n-e);(1===s||0===s)&&(r=e>n?.5:-.5);var l=s*(i-t)+t;return l===a?1/0:l>a?r:0}function za(t,e){return math.abs(t-e)e&&u>n&&u>o&&u>s||e>u&&n>u&&o>u&&s>u)return 0;var h=pa(e,n,o,s,u,yi);if(0===h)return 0;for(var c,d,f=0,p=-1,g=0;h>g;g++){var m=yi[g],v=0===m||1===m?.5:1,y=da(t,i,a,r,m);l>y||(0>p&&(p=ga(e,n,o,s,xi),xi[1]1&&ra(),c=da(e,n,o,s,xi[0]),p>1&&(d=da(e,n,o,s,xi[1]))),f+=2===p?mc?v:-v:md?v:-v:d>s?v:-v:mc?v:-v:c>s?v:-v)}return f}function ba(t,e,i,n,a,o,r,s){if(s>e&&s>n&&s>o||e>s&&n>s&&o>s)return 0;var l=_a(e,n,o,s,yi);if(0===l)return 0;var u=wa(e,n,o);if(u>=0&&1>=u){for(var h=0,c=ya(e,n,o,u),d=0;l>d;d++){var f=0===yi[d]||1===yi[d]?.5:1,p=ya(t,i,a,yi[d]);r>p||(h+=yi[d]c?f:-f:c>o?f:-f)}return h}var f=0===yi[0]||1===yi[0]?.5:1,p=ya(t,i,a,yi[0]);return r>p?0:e>o?f:-f}function va(t,e,i,n,a,o,r,s){if(s-=e,s>i||-i>s)return 0;var l=math.sqrt(i*i-s*s);yi[0]=-l,yi[1]=l;var u=math.abs(n-a);if(1e-4>u)return 0;if(1e-4>u%mi){n=0,a=mi;var h=o?1:-1;return r>=yi[0]+t&&r<=yi[1]+t?h:0}if(o){var l=n;n=pa(a),a=pa(l)}else n=pa(n),a=pa(a);n>a&&(a+=mi);for(var c=0,d=0;2>d;d++){var f=yi[d];if(f+t>r){var p=math.atan2(s,f),h=o?1:-1;0>p&&(p=mi+p),(p>=n&&a>=p||p+mi>=n&&a>=p+mi)&&(p>math.pi/2&&p<1.5*math.pi&&(h=-h),c+=h)}}return c}function ga(t,e,i,n,a){for(var o=0,r=0,s=0,l=0,u=0,h=0;h1&&(i||(o+=na(r,s,l,u,n,a))),1===h&&(r=t[h],s=t[h+1],l=r,u=s),c){case gi.m:l=t[h++],u=t[h++],r=l,s=u;break;case gi.l:if(i){if(ca(r,s,t[h],t[h+1],e,n,a))return!0}else o+=na(r,s,t[h],t[h+1],n,a)||0;r=t[h++],s=t[h++];break;case gi.c:if(i){if(la(r,s,t[h++],t[h++],t[h++],t[h++],t[h],t[h+1],e,n,a))return!0}else o+=ea(r,s,t[h++],t[h++],t[h++],t[h++],t[h],t[h+1],n,a)||0;r=t[h++],s=t[h++];break;case gi.q:if(i){if(ka(r,s,t[h++],t[h++],t[h],t[h+1],e,n,a))return!0}else o+=ba(r,s,t[h++],t[h++],t[h],t[h+1],n,a)||0;r=t[h++],s=t[h++];break;case gi.a:var d=t[h++],f=t[h++],p=t[h++],g=t[h++],m=t[h++],v=t[h++];h+=1;var y=1-t[h++],x=math.cos(m)*p+d,_=math.sin(m)*g+f;h>1?o+=na(r,s,x,_,n,a):(l=x,u=_);var w=(n-d)*g/p+d;if(i){if(oa(d,f,g,m,m+v,y,e,w,a))return!0}else o+=va(d,f,g,m,m+v,y,w,a);r=math.cos(m+v)*p+d,s=math.sin(m+v)*g+f;break;case gi.r:l=r=t[h++],u=s=t[h++];var b=t[h++],s=t[h++],x=l+b,_=u+s;if(i){if(ca(l,u,x,u,e,n,a)||ca(x,u,x,_,e,n,a)||ca(x,_,l,_,e,n,a)||ca(l,_,l,u,e,n,a))return!0}else o+=na(x,u,x,_,n,a),o+=na(l,_,l,u,n,a);break;case gi.z:if(i){if(ca(r,s,l,u,e,n,a))return!0}else o+=na(r,s,l,u,n,a);r=l,s=u}}return i||za(s,u)||(o+=na(r,s,l,u,n,a)||0),0!==o}function fa(t,e,i){return ga(t,0,!1,e,i)}function wa(t,e,i,n){return ga(t,e,!0,i,n)}function ha(t){bn.call(this,t),this.path=null}function za(t,e,i,n,a,o,r,s,l,u,h){var c=l*(ki/180),d=li(c)*(t-i)/2+ci(c)*(e-n)/2,f=-1*ci(c)*(t-i)/2+li(c)*(e-n)/2,p=d*d/(r*r)+f*f/(s*s);p>1&&(r*=di(p),s*=di(p));var g=(a===o?-1:1)*di((r*r*s*s-r*r*f*f-s*s*d*d)/(r*r*f*f+s*s*d*d))||0,m=g*r*f/s,v=g*-s*d/r,y=(t+i)/2+li(c)*m-ci(c)*v,x=(e+n)/2+ci(c)*m+li(c)*v,_=ni([1,0],[(d-m)/r,(f-v)/s]),w=[(d-m)/r,(f-v)/s],b=[(-1*d-m)/r,(-1*f-v)/s],s=ni(w,b);oi(w,b)<=-1&&(s=ki),oi(w,b)>=1&&(s=0),0===o&&s>0&&(s-=2*ki),1===o&&0>s&&(s+=2*ki),h.adddata(u,y,x,r,s,_,s,c,o)}function xa(t){if(!t)return new di;for(var e,i=0,n=0,a=i,o=n,r=new di,s=di.cmd,l=t.match(zi),u=0;ug;g++)f[g]=parsefloat(f[g]);for(var m=0;p>m;){var v,y,x,_,w,b,s,m=i,i=n;switch(d){case"l":i+=f[m++],n+=f[m++],h=s.l,r.adddata(h,i,n);break;case"l":i=f[m++],n=f[m++],h=s.l,r.adddata(h,i,n);break;case"m":i+=f[m++],n+=f[m++],h=s.m,r.adddata(h,i,n),a=i,o=n,d="l";break;case"m":i=f[m++],n=f[m++],h=s.m,r.adddata(h,i,n),a=i,o=n,d="l";break;case"h":i+=f[m++],h=s.l,r.adddata(h,i,n);break;case"h":i=f[m++],h=s.l,r.adddata(h,i,n);break;case"v":n+=f[m++],h=s.l,r.adddata(h,i,n);break;case"v":n=f[m++],h=s.l,r.adddata(h,i,n);break;case"c":h=s.c,r.adddata(h,f[m++],f[m++],f[m++],f[m++],f[m++],f[m++]),i=f[m-2],n=f[m-1];break;case"c":h=s.c,r.adddata(h,f[m++]+i,f[m++]+n,f[m++]+i,f[m++]+n,f[m++]+i,f[m++]+n),i+=f[m-2],n+=f[m-1];break;case"s":v=i,y=n;var a=r.len(),t=r.data;e===s.c&&(v+=i-t[a-4],y+=n-t[a-3]),h=s.c,m=f[m++],i=f[m++],i=f[m++],n=f[m++],r.adddata(h,v,y,m,i,i,n);break;case"s":v=i,y=n;var a=r.len(),t=r.data;e===s.c&&(v+=i-t[a-4],y+=n-t[a-3]),h=s.c,m=i+f[m++],i=n+f[m++],i+=f[m++],n+=f[m++],r.adddata(h,v,y,m,i,i,n);break;case"q":m=f[m++],i=f[m++],i=f[m++],n=f[m++],h=s.q,r.adddata(h,m,i,i,n);break;case"q":m=f[m++]+i,i=f[m++]+n,i+=f[m++],n+=f[m++],h=s.q,r.adddata(h,m,i,i,n);break;case"t":v=i,y=n;var a=r.len(),t=r.data;e===s.q&&(v+=i-t[a-4],y+=n-t[a-3]),i=f[m++],n=f[m++],h=s.q,r.adddata(h,v,y,i,n);break;case"t":v=i,y=n;var a=r.len(),t=r.data;e===s.q&&(v+=i-t[a-4],y+=n-t[a-3]),i+=f[m++],n+=f[m++],h=s.q,r.adddata(h,v,y,i,n);break;case"a":x=f[m++],_=f[m++],w=f[m++],b=f[m++],s=f[m++],m=i,i=n,i=f[m++],n=f[m++],h=s.a,za(m,i,i,n,b,s,x,_,w,h,r);break;case"a":x=f[m++],_=f[m++],w=f[m++],b=f[m++],s=f[m++],m=i,i=n,i+=f[m++],n+=f[m++],h=s.a,za(m,i,i,n,b,s,x,_,w,h,r)}}("z"===d||"z"===d)&&(h=s.z,r.adddata(h),i=a,n=o),e=h}return r.tostatic(),r}function ua(t,e){var i=xa(t);return e=e||{},e.buildpath=function(t){if(t.setdata){t.setdata(i.data);var e=t.getcontext();e&&t.rebuildpath(e)}else{var e=t;i.rebuildpath(e)}},e.applytransform=function(t){ti(i,t),this.dirty(!0)},e}function ya(t,e){return new ha(ua(t,e))}function ja(t,e){return ha.extend(ua(t,e))}function qa(t,e){for(var i=[],n=t.length,a=0;n>a;a++){var o=t[a];o.path||o.createpathproxy(),o.__dirtypath&&o.buildpath(o.path,o.shape,!0),i.push(o.path)}var r=new ha(e);return r.createpathproxy(),r.buildpath=function(t){t.appendpath(i);var e=t.getcontext();e&&t.rebuildpath(e)},r}function ka(t,e,i,n,a,o,r){var s=.5*(i-t),l=.5*(n-e);return(2*(e-i)+s+l)*r+(-3*(e-i)-2*s-l)*o+s*a+e}function $a(t,e,i){var n=e.points,a=e.smooth;if(n&&n.length>=2){if(a&&"spline"!==a){var o=zi(n,a,i,e.smoothconstraint);t.moveto(n[0][0],n[0][1]);for(var r=n.length,s=0;(i?r:r-1)>s;s++){var l=o[2*s],u=o[2*s+1],h=n[(s+1)%r];t.beziercurveto(l[0],l[1],u[0],u[1],h[0],h[1])}}else{"spline"===a&&(n=hi(n,i)),t.moveto(n[0][0],n[0][1]);for(var s=1,c=n.length;c>s;s++)t.lineto(n[s][0],n[s][1])}i&&t.closepath()}}function ja(t,e,i){var n=i&&i.linewidth;if(e&&n){var a=e.x1,o=e.x2,r=e.y1,s=e.y2;yi(2*a)===yi(2*o)?t.x1=t.x2=to(a,n,!0):(t.x1=a,t.x2=o),yi(2*r)===yi(2*s)?t.y1=t.y2=to(r,n,!0):(t.y1=r,t.y2=s)}}function qa(t,e,i){var n=i&&i.linewidth;if(e&&n){var a=e.x,o=e.y,r=e.width,s=e.height;t.x=to(a,n,!0),t.y=to(o,n,!0),t.width=math.max(to(a+r,n,!1)-t.x,0===r?0:1),t.height=math.max(to(o+s,n,!1)-t.y,0===s?0:1)}}function to(t,e,i){var n=yi(2*t);return(n+yi(e))%2===0?n/2:(n+(i?1:-1))/2}function eo(t,e,i){var n=t.cpx2,a=t.cpy2;return null===n||null===a?[(i?fa:da)(t.x1,t.cpx1,t.cpx2,t.x2,e),(i?fa:da)(t.y1,t.cpy1,t.cpy2,t.y2,e)]:[(i?xa:ya)(t.x1,t.cpx1,t.x2,e),(i?xa:ya)(t.y1,t.cpy1,t.y2,e)]}function io(t){bn.call(this,t),this._displayables=[],this._temporarydisplayables=[],this._cursor=0,this.notclear=!0}function no(t){return ha.extend(t)}function ao(t,e){return ja(t,e)}function oo(t,e){ga[t]=e}function ro(t){return ga.hasownproperty(t)?ga[t]:void 0}function so(t,e,i,n){var a=ya(t,e);return i&&("center"===n&&(i=uo(i,a.getboundingrect())),ho(a,i)),a}function lo(t,e,i){var n=new sn({style:{image:t,x:e.x,y:e.y,width:e.width,height:e.height},onload:function(t){if("center"===i){var a={width:t.width,height:t.height};n.setstyle(uo(e,a))}}});return n}function uo(t,e){var i,n=e.width/e.height,a=t.height*n;a<=t.width?i=t.height:(a=t.width,i=a/n);var o=t.x+t.width/2,r=t.y+t.height/2;return{x:o-a/2,y:r-i/2,width:a,height:i}}function ho(t,e){if(t.applytransform){var i=t.getboundingrect(),n=i.calculatetransform(e);t.applytransform(n)}}function co(t){return ja(t.shape,t.shape,t.style),t}function fo(t){return qa(t.shape,t.shape,t.style),t}function po(t){return null!=t&&"none"!==t}function go(t){if("string"!=typeof t)return t;var e=ya.get(t);return e||(e=je(t,-.1),1e4>xa&&(ya.set(t,e),xa++)),e}function mo(t){if(t.__hoverstldirty){t.__hoverstldirty=!1;var e=t.__hoverstl;if(!e)return void(t.__cachednormalstl=t.__cachednormalz2=null);var i=t.__cachednormalstl={};t.__cachednormalz2=t.z2;var n=t.style;for(var a in e)null!=e[a]&&(i[a]=n[a]);i.fill=n.fill,i.stroke=n.stroke}}function vo(t){var e=t.__hoverstl;if(e&&!t.__highlighted){var i=t.__zr,n=t.usehoverlayer&&i&&"canvas"===i.painter.type;if(t.__highlighted=n?"layer":"plain",!(t.isgroup||!i&&t.usehoverlayer)){var a=t,o=t.style;n&&(a=i.addhover(t),o=a.style),go(o),n||mo(a),o.extendfrom(e),yo(o,e,"fill"),yo(o,e,"stroke"),vo(o),n||(t.dirty(!1),t.z2+=ua)}}}function yo(t,e,i){!po(e[i])&&po(t[i])&&(t[i]=go(t[i]))}function xo(t){var e=t.__highlighted;if(e&&(t.__highlighted=!1,!t.isgroup))if("layer"===e)t.__zr&&t.__zr.removehover(t);else{var i=t.style,n=t.__cachednormalstl;n&&(go(i),t.setstyle(n),vo(i));var a=t.__cachednormalz2;null!=a&&t.z2-a===ua&&(t.z2=a)}}function _o(t,e,i){var n,a=da,o=da;t.__highlighted&&(a=ca,n=!0),e(t,i),t.__highlighted&&(o=ca,n=!0),t.isgroup&&t.traverse(function(t){!t.isgroup&&e(t,i)}),n&&t.__highdownonupdate&&t.__highdownonupdate(a,o)}function wo(t,e){e=t.__hoverstl=e!==!1&&(t.hoverstyle||e||{}),t.__hoverstldirty=!0,t.__highlighted&&(t.__cachednormalstl=null,xo(t),vo(t))}function bo(t){!ao(this,t)&&!this.__highbyouter&&_o(this,vo)}function so(t){!ao(this,t)&&!this.__highbyouter&&_o(this,xo)}function mo(t){this.__highbyouter|=1<<(t||0),_o(this,vo)}function io(t){!(this.__highbyouter&=~(1<<(t||0)))&&_o(this,xo)}function ao(t,e){return t.__highdownsilentontouch&&e.zrbytouch}function to(t,e){do(t,!0),_o(t,wo,e)}function do(t,e){var i=e===!1;if(t.__highdownsilentontouch=t.highdownsilentontouch,t.__highdownonupdate=t.highdownonupdate,!i||t.__highdowndispatcher){var n=i?"off":"on";t[n]("mouseover",bo)[n]("mouseout",so),t[n]("emphasis",mo)[n]("normal",io),t.__highbyouter=t.__highbyouter||0,t.__highdowndispatcher=!i}}function co(t){return!(!t||!t.__highdowndispatcher)}function lo(t){var e=pa[t];return null==e&&32>=fa&&(e=pa[t]=fa++),e}function ko(t,e,i,n,a,o,r){a=a||la;var s,l=a.labelfetcher,u=a.labeldataindex,h=a.labeldimindex,c=i.getshallow("show"),d=n.getshallow("show");(c||d)&&(l&&(s=l.getformattedlabel(u,"normal",null,h)),null==s&&(s=w(a.defaulttext)?a.defaulttext(u,a):a.defaulttext));var f=c?s:null,p=d?c(l?l.getformattedlabel(u,"emphasis",null,h):null,s):null;(null!=f||null!=p)&&(oo(t,i,o,a),oo(e,n,r,a,!0)),t.text=f,e.text=p}function po(t,e,i){var n=t.style;e&&(go(n),t.setstyle(e),vo(n)),n=t.__hoverstl,i&&n&&(go(n),r(n,i),vo(n))}function oo(t,e,i,n,a){return zo(t,e,n,a),i&&r(t,i),t}function no(t,e,i){var n,a={isrecttext:!0};i===!1?n=!0:a.autocolor=i,zo(t,e,a,n)}function zo(t,e,i,n){if(i=i||la,i.isrecttext){var a;i.gettextposition?a=i.gettextposition(e,n):(a=e.getshallow("position")||(n?null:"inside"),"outside"===a&&(a="top")),t.textposition=a,t.textoffset=e.getshallow("offset");var o=e.getshallow("rotate");null!=o&&(o*=math.pi/180),t.textrotation=o,t.textdistance=c(e.getshallow("distance"),n?null:5)}var r,s=e.ecmodel,l=s&&s.option.textstyle,u=ro(e);if(u){r={};for(var h in u)if(u.hasownproperty(h)){var c=e.getmodel(["rich",h]);eo(r[h]={},c,l,i,n)}}return t.rich=r,eo(t,e,l,i,n,!0),i.forcerich&&!i.textstyle&&(i.textstyle={}),t}function ro(t){for(var e;t&&t!==t.ecmodel;){var i=(t.option||la).rich;if(i){e=e||{};for(var n in i)i.hasownproperty(n)&&(e[n]=1)}t=t.parentmodel}return e}function eo(t,e,i,n,a,o){i=!a&&i||la,t.textfill=bo(e.getshallow("color"),n)||i.color,t.textstroke=bo(e.getshallow("textbordercolor"),n)||i.textbordercolor,t.textstrokewidth=c(e.getshallow("textborderwidth"),i.textborderwidth),a||(o&&(t.insiderollbackopt=n,vo(t)),null==t.textfill&&(t.textfill=n.autocolor)),t.fontstyle=e.getshallow("fontstyle")||i.fontstyle,t.fontweight=e.getshallow("fontweight")||i.fontweight,t.fontsize=e.getshallow("fontsize")||i.fontsize,t.fontfamily=e.getshallow("fontfamily")||i.fontfamily,t.textalign=e.getshallow("align"),t.textverticalalign=e.getshallow("verticalalign")||e.getshallow("baseline"),t.textlineheight=e.getshallow("lineheight"),t.textwidth=e.getshallow("width"),t.textheight=e.getshallow("height"),t.texttag=e.getshallow("tag"),o&&n.disablebox||(t.textbackgroundcolor=bo(e.getshallow("backgroundcolor"),n),t.textpadding=e.getshallow("padding"),t.textbordercolor=bo(e.getshallow("bordercolor"),n),t.textborderwidth=e.getshallow("borderwidth"),t.textborderradius=e.getshallow("borderradius"),t.textboxshadowcolor=e.getshallow("shadowcolor"),t.textboxshadowblur=e.getshallow("shadowblur"),t.textboxshadowoffsetx=e.getshallow("shadowoffsetx"),t.textboxshadowoffsety=e.getshallow("shadowoffsety")),t.textshadowcolor=e.getshallow("textshadowcolor")||i.textshadowcolor,t.textshadowblur=e.getshallow("textshadowblur")||i.textshadowblur,t.textshadowoffsetx=e.getshallow("textshadowoffsetx")||i.textshadowoffsetx,t.textshadowoffsety=e.getshallow("textshadowoffsety")||i.textshadowoffsety}function bo(t,e){return"auto"!==t?t:e&&e.autocolor?e.autocolor:null}function vo(t){var e,i=t.textposition,n=t.insiderollbackopt;if(n&&null==t.textfill){var a=n.autocolor,o=n.isrecttext,r=n.useinsidestyle,s=r!==!1&&(r===!0||o&&i&&"string"==typeof i&&i.indexof("inside")>=0),l=!s&&null!=a;(s||l)&&(e={textfill:t.textfill,textstroke:t.textstroke,textstrokewidth:t.textstrokewidth}),s&&(t.textfill="#fff",null==t.textstroke&&(t.textstroke=a,null==t.textstrokewidth&&(t.textstrokewidth=2))),l&&(t.textfill=a)}t.insiderollback=e}function go(t){var e=t.insiderollback;e&&(t.textfill=e.textfill,t.textstroke=e.textstroke,t.textstrokewidth=e.textstrokewidth,t.insiderollback=null)}function fo(t,e){var i=e||e.getmodel("textstyle");return n([t.fontstyle||i&&i.getshallow("fontstyle")||"",t.fontweight||i&&i.getshallow("fontweight")||"",(t.fontsize||i&&i.getshallow("fontsize")||12)+"px",t.fontfamily||i&&i.getshallow("fontfamily")||"sans-serif"].join(" "))}function wo(t,e,i,n,a,o){"function"==typeof a&&(o=a,a=null);var r=n&&n.isanimationenabled();if(r){var s=t?"update":"",l=n.getshallow("animationduration"+s),u=n.getshallow("animationeasing"+s),h=n.getshallow("animationdelay"+s);"function"==typeof h&&(h=h(a,n.getanimationdelayparams?n.getanimationdelayparams(e,a):null)),"function"==typeof l&&(l=l(a)),l>0?e.animateto(i,l,h||0,u,o,!!o):(e.stopanimation(),e.attr(i),o&&o())}else e.stopanimation(),e.attr(i),o&&o()}function ho(t,e,i,n,a){wo(!0,t,e,i,n,a)}function zo(t,e,i,n,a){wo(!1,t,e,i,n,a)}function xo(t,e){for(var i=ce([]);t&&t!==e;)ke(i,t.getlocaltransform(),i),t=t.parent;return i}function uo(t,e,i){return e&&!d(e)&&(e=jb.getlocaltransform(e)),i&&(e=ze([],e)),oe([],t,e)}function yo(t,e,i){var n=0===e[4]||0===e[5]||0===e[0]?1:math.abs(2*e[4]/e[0]),a=0===e[4]||0===e[5]||0===e[2]?1:math.abs(2*e[4]/e[2]),o=["left"===t?-n:"right"===t?n:0,"top"===t?-a:"bottom"===t?a:0];return o=uo(o,e,i),math.abs(o[0])>math.abs(o[1])?o[0]>0?"right":"left":o[1]>0?"bottom":"top"}function jo(t,e,i){function n(t){var e={};return t.traverse(function(t){!t.isgroup&&t.anid&&(e[t.anid]=t)}),e}function a(t){var e={position:h(t.position),rotation:t.rotation};return t.shape&&(e.shape=r({},t.shape)),e}if(t&&e){var o=n(t);e.traverse(function(t){if(!t.isgroup&&t.anid){var e=o[t.anid];if(e){var n=a(t);t.attr(a(e)),ho(t,n,i,t.dataindex)}}})}}function qo(t,e){return p(t,function(t){var i=t[0];i=ra(i,e.x),i=sa(i,e.x+e.width);var n=t[1];return n=ra(n,e.y),n=sa(n,e.y+e.height),[i,n]})}function ko(t,e){var i=ra(t.x,e.x),n=sa(t.x+t.width,e.x+e.width),a=ra(t.y,e.y),o=sa(t.y+t.height,e.y+e.height);return n>=i&&o>=a?{x:i,y:a,width:n-i,height:o-a}:void 0}function $o(t,e,i){e=r({recthover:!0},e);var n=e.style={strokenoscale:!0};return i=i||{x:-1,y:-1,width:2,height:2},t?0===t.indexof("image://")?(n.image=t.slice(8),s(n,i),new sn(e)):so(t.replace("path://",""),e,i,"center"):void 0}function jo(t,e,i,n,a){for(var o=0,r=a[a.length-1];og||g>1)return!1;var m=tr(f,p,h,c)/d;return 0>m||m>1?!1:!0}function tr(t,e,i,n){return t*n-i*e}function er(t){return 1e-6>=t&&t>=-1e-6}function ir(t,e,i){this.parentmodel=e,this.ecmodel=i,this.option=t}function nr(t,e,i){for(var n=0;n=0&&i.push(t)}),i}t.topologicaltravel=function(t,e,n,a){function o(t){l[t].entrycount--,0===l[t].entrycount&&u.push(t)}function r(t){h[t]=!0,o(t)}if(t.length){var s=i(e),l=s.graph,u=s.noentrylist,h={};for(f(t,function(t){h[t]=!0});u.length;){var c=u.pop(),d=l[c],p=!!h[c];p&&(n.call(a,c,d.originaldeps.slice()),delete h[c]),f(d.successor,p?r:o)}f(h,function(){throw new error("circle dependency may exists")})}}}function lr(t){return t.replace(/^\s+|\s+$/g,"")}function ur(t,e,i,n){var a=e[1]-e[0],o=i[1]-i[0];if(0===a)return 0===o?i[0]:(i[0]+i[1])/2;if(n)if(a>0){if(t<=e[0])return i[0];if(t>=e[1])return i[1]}else{if(t>=e[0])return i[0];if(t<=e[1])return i[1]}else{if(t===e[0])return i[0]; if(t===e[1])return i[1]}return(t-e[0])/a*o+i[0]}function hr(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?lr(t).match(/%$/)?parsefloat(t)/100*e:parsefloat(t):null==t?0/0:+t}function cr(t,e,i){return null==e&&(e=10),e=math.min(math.max(0,e),20),t=(+t).tofixed(e),i?t:+t}function dr(t){return t.sort(function(t,e){return t-e}),t}function fr(t){if(t=+t,isnan(t))return 0;for(var e=1,i=0;math.round(t*e)/e!==t;)e*=10,i++;return i}function pr(t){var e=t.tostring(),i=e.indexof("e");if(i>0){var n=+e.slice(i+1);return 0>n?-n:0}var a=e.indexof(".");return 0>a?0:e.length-1-a}function gr(t,e){var i=math.log,n=math.ln10,a=math.floor(i(t[1]-t[0])/n),o=math.round(i(math.abs(e[1]-e[0]))/n),r=math.min(math.max(-a+o,0),20);return isfinite(r)?r:20}function mr(t,e,i){if(!t[e])return 0;var n=g(t,function(t,e){return t+(isnan(e)?0:e)},0);if(0===n)return 0;for(var a=math.pow(10,i),o=p(t,function(t){return(isnan(t)?0:t)/n*a*100}),r=100*a,s=p(o,function(t){return math.floor(t)}),l=g(s,function(t,e){return t+e},0),u=p(o,function(t,e){return t-s[e]});r>l;){for(var h=number.negative_infinity,c=null,d=0,f=u.length;f>d;++d)u[d]>h&&(h=u[d],c=d);++s[c],u[c]=0,++l}return s[e]/a}function vr(t){var e=2*math.pi;return(t%e+e)%e}function yr(t){return t>-da&&da>t}function xr(t){if(t instanceof date)return t;if("string"==typeof t){var e=la.exec(t);if(!e)return new date(0/0);if(e[8]){var i=+e[4]||0;return"z"!==e[8].touppercase()&&(i-=e[8].slice(0,3)),new date(date.utc(+e[1],+(e[2]||1)-1,+e[3]||1,i,+(e[5]||0),+e[6]||0,+e[7]||0))}return new date(+e[1],+(e[2]||1)-1,+e[3]||1,+e[4]||0,+(e[5]||0),+e[6]||0,+e[7]||0)}return new date(null==t?0/0:math.round(t))}function _r(t){return math.pow(10,wr(t))}function wr(t){return math.floor(math.log(t)/math.ln10)}function br(t,e){var i,n=wr(t),a=math.pow(10,n),o=t/a;return i=e?1.5>o?1:2.5>o?2:4>o?3:7>o?5:10:1>o?1:2>o?2:3>o?3:5>o?5:10,t=i*a,n>=-20?+t.tofixed(0>n?-n:0):t}function sr(t,e){var i=(t.length-1)*e+1,n=math.floor(i),a=+t[n-1],o=i-n;return o?a+o*(t[n]-a):a}function mr(t){function e(t,i,n){return t.interval[n]s;s++)o[s]<=i&&(o[s]=i,r[s]=s?1:1-n),i=o[s],n=r[s];o[0]===o[1]&&r[0]*r[1]!==1?t.splice(a,1):a++}return t}function ir(t){return t-parsefloat(t)>=0}function ar(t){return isnan(t)?"-":(t=(t+"").split("."),t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:""))}function tr(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 dr(t){return null==t?"":(t+"").replace(oa,function(t,e){return na[e]})}function cr(t,e,i){_(e)||(e=[e]);var n=e.length;if(!n)return"";for(var a=e[0].$vars||[],o=0;os;s++)for(var l=0;l':'':{rendermode:a,content:"{marker"+o+"|} ",style:{color:i}}:""}function pr(t,e){return t+="","0000".substr(0,e-t.length)+t}function or(t,e,i){("week"===t||"month"===t||"quarter"===t||"half-year"===t||"year"===t)&&(t="mm-dd\nyyyy");var n=xr(e),a=i?"utc":"",o=n["get"+a+"fullyear"](),r=n["get"+a+"month"]()+1,s=n["get"+a+"date"](),l=n["get"+a+"hours"](),u=n["get"+a+"minutes"](),h=n["get"+a+"seconds"](),c=n["get"+a+"milliseconds"]();return t=t.replace("mm",pr(r,2)).replace("m",r).replace("yyyy",o).replace("yy",o%100).replace("dd",pr(s,2)).replace("d",s).replace("hh",pr(l,2)).replace("h",l).replace("mm",pr(u,2)).replace("m",u).replace("ss",pr(h,2)).replace("s",h).replace("sss",pr(c,3))}function nr(t){return t?t.charat(0).touppercase()+t.substr(1):t}function zr(t){return gi(t.text,t.font,t.textalign,t.textverticalalign,t.textpadding,t.textlineheight,t.rich,t.truncate)}function rr(t,e,i,n,a,o,r,s){return gi(t,e,i,n,a,s,o,r)}function er(t,e,i,n,a){var o=0,r=0;null==n&&(n=1/0),null==a&&(a=1/0);var s=0;e.eachchild(function(l,u){var h,c,d=l.position,f=l.getboundingrect(),p=e.childat(u+1),g=p&&p.getboundingrect();if("horizontal"===t){var m=f.width+(g?-g.x+f.x:0);h=o+m,h>n||l.newline?(o=0,h=m,r+=s+i,s=f.height):s=math.max(s,f.height)}else{var v=f.height+(g?-g.y+f.y:0);c=r+v,c>a||l.newline?(o+=s+i,r=0,c=v,s=f.width):s=math.max(s,f.width)}l.newline||(d[0]=o,d[1]=r,"horizontal"===t?o=h+i:r=c+i)})}function br(t,e,i){var n=e.width,a=e.height,o=hr(t.x,n),r=hr(t.y,a),s=hr(t.x2,n),l=hr(t.y2,a);return(isnan(o)||isnan(parsefloat(t.x)))&&(o=0),(isnan(s)||isnan(parsefloat(t.x2)))&&(s=n),(isnan(r)||isnan(parsefloat(t.y)))&&(r=0),(isnan(l)||isnan(parsefloat(t.y2)))&&(l=a),i=pa(i||0),{width:math.max(s-o-i[1]-i[3],0),height:math.max(l-r-i[0]-i[2],0)}}function vr(t,e,i){i=pa(i||0);var n=e.width,a=e.height,o=hr(t.left,n),r=hr(t.top,a),s=hr(t.right,n),l=hr(t.bottom,a),u=hr(t.width,n),h=hr(t.height,a),c=i[2]+i[0],d=i[1]+i[3],f=t.aspect;switch(isnan(u)&&(u=n-s-d-o),isnan(h)&&(h=a-l-c-r),null!=f&&(isnan(u)&&isnan(h)&&(f>n/a?u=.8*n:h=.8*a),isnan(u)&&(u=f*h),isnan(h)&&(h=u/f)),isnan(o)&&(o=n-s-u-d),isnan(r)&&(r=a-l-h-c),t.left||t.right){case"center":o=n/2-u/2-i[3];break;case"right":o=n-u-d}switch(t.top||t.bottom){case"middle":case"center":r=a/2-h/2-i[0];break;case"bottom":r=a-h-c}o=o||0,r=r||0,isnan(u)&&(u=n-d-o-(s||0)),isnan(h)&&(h=a-c-r-(l||0));var p=new wi(o+i[3],r+i[0],u,h);return p.margin=i,p}function gr(t,e,i,n,a){var o=!a||!a.hv||a.hv[0],r=!a||!a.hv||a.hv[1],l=a&&a.boundingmode||"all";if(o||r){var u;if("raw"===l)u="group"===t.type?new wi(0,0,+e.width||0,+e.height||0):t.getboundingrect();else if(u=t.getboundingrect(),t.needlocaltransform()){var h=t.getlocaltransform();u=u.clone(),u.applytransform(h)}e=vr(s({width:u.width,height:u.height},e),i,n);var c=t.position,d=o?e.x-u.x:0,f=r?e.y-u.y:0;t.attr("position","raw"===l?[d,f]:[c[0]+d,c[1]+f])}}function fr(t,e){return null!=t[fa[e][0]]||null!=t[fa[e][1]]&&null!=t[fa[e][2]]}function wr(t,e,i){function n(i,n){var r={},l=0,u={},h=0,c=2;if(va(i,function(e){u[e]=t[e]}),va(i,function(t){a(e,t)&&(r[t]=u[t]=e[t]),o(r,t)&&l++,o(u,t)&&h++}),s[n])return o(e,i[1])?u[i[2]]=null:o(e,i[2])&&(u[i[1]]=null),u;if(h!==c&&l){if(l>=c)return r;for(var d=0;dn;n++)if(t[n].length>e)return t[n];return t[i-1]}function yr(t){var e=t.get("coordinatesystem"),i={coordsysname:e,coordsysdims:[],axismap:b(),categoryaxismap:b()},n=ka[e];return n?(n(t,i,i.axismap,i.categoryaxismap),i):void 0}function jr(t){return"category"===t.get("type")}function qr(t){this.fromdataset=t.fromdataset,this.data=t.data||(t.sourceformat===tt?{}:[]),this.sourceformat=t.sourceformat||et,this.serieslayoutby=t.serieslayoutby||nt,this.dimensionsdefine=t.dimensionsdefine,this.encodedefine=t.encodedefine&&b(t.encodedefine),this.startindex=t.startindex||0,this.dimensionsdetectcount=t.dimensionsdetectcount}function kr(t){var e=t.option.source,i=et;if(i(e))i=it;else if(_(e)){0===e.length&&(i=ja);for(var n=0,a=e.length;a>n;n++){var o=e[n];if(null!=o){if(_(o)){i=ja;break}if(s(o)){i=qa;break}}}}else if(s(e)){for(var r in e)if(e.hasownproperty(r)&&d(e[r])){i=tt;break}}else if(null!=e)throw new error("invalid data");ot(t).sourceformat=i}function $r(t){return ot(t).source}function jr(t){ot(t).datasetmap=b()}function qr(t){var e=t.option,i=e.data,n=i(i)?it:$a,a=!1,o=e.serieslayoutby,r=e.sourceheader,s=e.dimensions,l=os(t);if(l){var u=l.option;i=u.source,n=ot(l).sourceformat,a=!0,o=o||u.serieslayoutby,null==r&&(r=u.sourceheader),s=s||u.dimensions}var h=ts(i,n,o,r,s),c=e.encode;!c&&l&&(c=as(t,l,i,n,o,h)),ot(t).source=new qr({data:i,fromdataset:a,serieslayoutby:o,sourceformat:n,dimensionsdefine:h.dimensionsdefine,startindex:h.startindex,dimensionsdetectcount:h.dimensionsdetectcount,encodedefine:c})}function ts(t,e,i,n,a){if(!t)return{dimensionsdefine:es(a)};var o,r,s;if(e===ja)"auto"===n||null==n?is(function(t){null!=t&&"-"!==t&&(b(t)?null==r&&(r=1):r=0)},i,t,10):r=n?1:0,a||1!==r||(a=[],is(function(t,e){a[e]=null!=t?t:""},i,t)),o=a?a.length:i===at?t.length:t[0]?t[0].length:null;else if(e===qa)a||(a=ns(t),s=!0);else if(e===tt)a||(a=[],s=!0,f(t,function(t,e){a.push(e)}));else if(e===$a){var l=wn(t[0]);o=_(l)&&l.length||1}var u;return s&&f(a,function(t,e){"name"===(s(t)?t.name:t)&&(u=e)}),{startindex:r,dimensionsdefine:es(a),dimensionsdetectcount:o,potentialnamedimindex:u}}function es(t){if(t){var e=b();return p(t,function(t){if(t=r({},s(t)?t:{name:t}),null==t.name)return t;t.name+="",null==t.displayname&&(t.displayname=t.name);var i=e.get(t.name);return i?t.name+="-"+i.count++:e.set(t.name,{count:1}),t})}}function is(t,e,i,n){if(null==n&&(n=1/0),e===at)for(var a=0;aa;a++)t(i[a]?i[a][0]:null,a);else for(var o=i[0]||[],a=0;aa;a++)t(o[a],a)}function ns(t){for(var e,i=0;ix&&null==y;x++)ss(i,n,a,o.dimensionsdefine,o.startindex,x)||(y=x);if(null!=y){s.value=y;var _=o.potentialnamedimindex||math.max(y-1,0);u.push(_),l.push(_)}}return l.length&&(s.itemname=l),u.length&&(s.seriesname=u),s}function os(t){var e=t.option,i=e.data;return i?void 0:t.ecmodel.getcomponent("dataset",e.datasetindex||0)}function rs(t,e){return ss(t.data,t.sourceformat,t.serieslayoutby,t.dimensionsdefine,t.startindex,e)}function ss(t,e,i,n,a,o){function r(t){return null!=t&&isfinite(t)&&""!==t?!1:b(t)&&"-"!==t?!0:void 0}var s,l=5;if(i(t))return!1;var u;if(n&&(u=n[o],u=s(u)?u.name:u),e===ja)if(i===at){for(var h=t[o],c=0;c<(h||[]).length&&l>c;c++)if(null!=(s=r(h[a+c])))return s}else for(var c=0;cc;c++){var d=t[a+c];if(d&&null!=(s=r(d[o])))return s}else if(e===qa){if(!u)return;for(var c=0;cc;c++){var f=t[c];if(f&&null!=(s=r(f[u])))return s}}else if(e===tt){if(!u)return;var h=t[u];if(!h||i(h))return!1;for(var c=0;cc;c++)if(null!=(s=r(h[c])))return s}else if(e===$a)for(var c=0;cc;c++){var f=t[c],p=wn(f);if(!_(p))return!1;if(null!=(s=r(p[o])))return s}return!1}function ls(t,e){if(e){var i=e.seiresindex,n=e.seriesid,a=e.seriesname;return null!=i&&t.componentindex!==i||null!=n&&t.id!==n||null!=a&&t.name!==a}}function us(t,e){var i=t.color&&!t.colorlayer;f(e,function(e,o){"colorlayer"===o&&i||xa.hasclass(o)||("object"==typeof e?t[o]=t[o]?a(t[o],e,!1):n(e):null==t[o]&&(t[o]=e))})}function hs(t){t=t,this.option={},this.option[rt]=1,this._componentsmap=b({series:[]}),this._seriesindices,this._seriesindicesmap,us(t,this._theme.option),a(t,ya,!1),this.mergeoption(t)}function cs(t,e){_(e)||(e=e?[e]:[]);var i={};return f(e,function(e){i[e]=(t.get(e)||[]).slice()}),i}function ds(t,e,i){var n=e.type?e.type:i?i.subtype:xa.determinesubtype(t,e);return n}function fs(t,e){t._seriesindicesmap=b(t._seriesindices=p(e,function(t){return t.componentindex})||[])}function ps(t,e){return e.hasownproperty("subtype")?m(t,function(t){return t.subtype===e.subtype}):t}function gs(t){f(lt,function(e){this[e]=y(t[e],t)},this)}function ms(){this._coordinatesystems=[]}function vs(t){this._api=t,this._timelineoptions=[],this._medialist=[],this._mediadefault,this._currentmediaindices=[],this._optionbackup,this._newbaseoption}function ys(t,e,i){var n,a,o=[],r=[],s=t.timeline;if(t.baseoption&&(a=t.baseoption),(s||t.options)&&(a=a||{},o=(t.options||[]).slice()),t.media){a=a||{};var l=t.media;ht(l,function(t){t&&t.option&&(t.query?r.push(t):n||(n=t))})}return a||(a=t),a.timeline||(a.timeline=s),ht([a].concat(o).concat(p(r,function(t){return t.option})),function(t){ht(e,function(e){e(t,i)})}),{baseoption:a,timelineoptions:o,mediadefault:n,medialist:r}}function xs(t,e,i){var n={width:e,height:i,aspectratio:e/i},a=!0;return f(t,function(t,e){var i=e.match(pt);if(i&&i[1]&&i[2]){var o=i[1],r=i[2].tolowercase();_s(n[r],t,o)||(a=!1)}}),a}function _s(t,e,i){return"min"===i?t>=e:"max"===i?e>=t:t===e}function ws(t,e){return t.join(",")===e.join(",")}function bs(t,e){e=e||{},ht(e,function(e,i){if(null!=e){var n=t[i];if(xa.hasclass(i)){e=gn(e),n=gn(n);var a=zn(n,e);t[i]=dt(a,function(t){return t.option&&t.exist?ft(t.exist,t.option,!0):t.exist||t.option})}else t[i]=ft(n,e,!0)}})}function ss(t){var e=t&&t.itemstyle;if(e)for(var i=0,n=vt.length;n>i;i++){var o=vt[i],r=e.normal,s=e.emphasis;r&&r[o]&&(t[o]=t[o]||{},t[o].normal?a(t[o].normal,r[o]):t[o].normal=r[o],r[o]=null),s&&s[o]&&(t[o]=t[o]||{},t[o].emphasis?a(t[o].emphasis,s[o]):t[o].emphasis=s[o],s[o]=null)}}function ms(t,e,i){if(t&&t[e]&&(t[e].normal||t[e].emphasis)){var n=t[e].normal,a=t[e].emphasis;n&&(i?(t[e].normal=t[e].emphasis=null,s(t[e],n)):t[e]=n),a&&(t.emphasis=t.emphasis||{},t.emphasis[e]=a)}}function is(t){ms(t,"itemstyle"),ms(t,"linestyle"),ms(t,"areastyle"),ms(t,"label"),ms(t,"labelline"),ms(t,"upperlabel"),ms(t,"edgelabel")}function as(t,e){var i=mt(t)&&t[e],n=mt(i)&&i.textstyle;if(n)for(var a=0,o=im.length;o>a;a++){var e=im[a];n.hasownproperty(e)&&(i[e]=n[e])}}function ts(t){t&&(is(t),as(t,"label"),t.emphasis&&as(t.emphasis,"label"))}function ds(t){if(mt(t)){ss(t),is(t),as(t,"label"),as(t,"upperlabel"),as(t,"edgelabel"),t.emphasis&&(as(t.emphasis,"label"),as(t.emphasis,"upperlabel"),as(t.emphasis,"edgelabel"));var e=t.markpoint;e&&(ss(e),ts(e));var i=t.markline;i&&(ss(i),ts(i));var n=t.markarea;n&&ts(n);var a=t.data;if("graph"===t.type){a=a||t.nodes;var o=t.links||t.edges;if(o&&!i(o))for(var r=0;r=0;p--){var g=t[p];if(s||(d=g.data.rawindexof(g.stackedbydimension,c)),d>=0){var m=g.data.getbyrawindex(g.stackresultdimension,d);if(h>=0&&m>0||0>=h&&0>m){h+=m,f=m;break}}}return n[0]=h,n[1]=f,n});r.hostmodel.setdata(l),e.data=l})}function zs(t,e){qr.isinstance(t)||(t=qr.seriesdatatosource(t)),this._source=t;var i=this._data=t.data,n=t.sourceformat;n===it&&(this._offset=0,this._dimsize=e,this._data=i);var a=mt[n===ja?n+"_"+t.serieslayoutby:n];r(this,a)}function rs(){return this._data.length}function es(t){return this._data[t]}function bs(t){for(var e=0;ee.outputdata.count()&&e.model.getrawdata().cloneshallow(e.outputdata)}function qs(t,e){f(t.changable_methods,function(i){t.wrapmethod(i,x(tl,e))})}function tl(t){var e=el(t);e&&e.setoutputend(this.count())}function el(t){var e=(t.ecmodel||{}).scheduler,i=e&&e.getpipeline(t.uid);if(i){var n=i.currenttask;if(n){var a=n.agentstubmap;a&&(n=a.get(t.uid))}return n}}function il(){this.group=new ss,this.uid=or("viewchart"),this.rendertask=zs({plan:ol,reset:rl}),this.rendertask.context={view:this}}function nl(t,e,i){if(t&&(t.trigger(e,i),t.isgroup&&!co(t)))for(var n=0,a=t.childcount();a>n;n++)nl(t.childat(n),e,i)}function al(t,e,i){var n=qn(t,e),a=e&&null!=e.highlightkey?lo(e.highlightkey):null;null!=n?f(gn(n),function(e){nl(t.getitemgraphicel(e),i,a)}):t.eachitemgraphicel(function(t){nl(t,i,a)})}function ol(t){return et(t.model)}function rl(t){var e=t.model,i=t.ecmodel,n=t.api,a=t.payload,o=e.pipelinecontext.progressiverender,r=t.view,s=a&&rt(a).updatemethod,l=o?"incrementalpreparerender":s&&r[s]?s:"render";return"render"!==l&&r[l](e,i,n,a),vt[l]}function sl(t,e,i){function n(){h=(new date).gettime(),c=null,t.apply(r,s||[])}var a,o,r,s,l,u=0,h=0,c=null;e=e||0;var d=function(){a=(new date).gettime(),r=this,s=arguments;var t=l||e,d=l||i;l=null,o=a-(d?u:h)-t,cleartimeout(c),d?c=settimeout(n,t):o>=0?n():c=settimeout(n,-o),u=a};return d.clear=function(){c&&(cleartimeout(c),c=null)},d.debouncenextcall=function(t){l=t},d}function ll(t,e,i,n){var a=t[e];if(a){var o=a[gt]||a,r=a[wt],s=a[ft];if(s!==i||r!==n){if(null==i||!n)return t[e]=o;a=t[e]=sl(o,i,"debounce"===n),a[gt]=o,a[wt]=n,a[ft]=i}return a}}function ul(t,e){var i=t[e];i&&i[gt]&&(t[e]=i[gt])}function hl(t,e,i,n){this.ecinstance=t,this.api=e,this.unfinished;var i=this._dataprocessorhandlers=i.slice(),n=this._visualhandlers=n.slice();this._allhandlers=i.concat(n),this._stagetaskmap=b()}function cl(t,e,i,n,a){function o(t,e){return t.setdirty&&(!t.dirtymap||t.dirtymap.get(e.__pipeline.id))}a=a||{};var r;f(e,function(e){if(!a.visualtype||a.visualtype===e.visualtype){var s=t._stagetaskmap.get(e.uid),l=s.seriestaskmap,u=s.overalltask;if(u){var h,c=u.agentstubmap;c.each(function(t){o(a,t)&&(t.dirty(),h=!0)}),h&&u.dirty(),qt(u,n);var d=t.getperformargs(u,a.block);c.each(function(t){t.perform(d)}),r|=u.perform(d)}else l&&l.each(function(s){o(a,s)&&s.dirty();var l=t.getperformargs(s,a.block);l.skip=!e.performrawseries&&i.isseriesfiltered(s.context.model),qt(s,n),r|=s.perform(l)})}}),t.unfinished|=r}function dl(t,e,i,n,a){function o(i){var o=i.uid,s=r.get(o)||r.set(o,zs({plan:yl,reset:xl,count:wl}));s.context={model:i,ecmodel:n,api:a,useclearvisual:e.isvisual&&!e.islayout,plan:e.plan,reset:e.reset,scheduler:t},bl(t,i,s)}var r=i.seriestaskmap||(i.seriestaskmap=b()),s=e.seriestype,l=e.gettargetseries;e.createonallseries?n.eachrawseries(o):s?n.eachrawseriesbytype(s,o):l&&l(n,a).each(o);var u=t._pipelinemap;r.each(function(t,e){u.get(e)||(t.dispose(),r.removekey(e))})}function fl(t,e,i,n,a){function o(e){var i=e.uid,n=s.get(i);n||(n=s.set(i,zs({reset:gl,ondirty:vl})),r.dirty()),n.context={model:e,overallprogress:h,modifyoutputend:c},n.agent=r,n.__block=h,bl(t,e,n)}var r=i.overalltask=i.overalltask||zs({reset:pl});r.context={ecmodel:n,api:a,overallreset:e.overallreset,scheduler:t};var s=r.agentstubmap=r.agentstubmap||b(),l=e.seriestype,u=e.gettargetseries,h=!0,c=e.modifyoutputend;l?n.eachrawseriesbytype(l,o):u?u(n,a).each(o):(h=!1,f(n.getseries(),o));var d=t._pipelinemap;s.each(function(t,e){d.get(e)||(t.dispose(),r.dirty(),s.removekey(e))})}function pl(t){t.overallreset(t.ecmodel,t.api,t.payload)}function gl(t){return t.overallprogress&&ml}function ml(){this.agent.dirty(),this.getdownstream().dirty()}function vl(){this.agent&&this.agent.dirty()}function yl(t){return t.plan&&t.plan(t.model,t.ecmodel,t.api,t.payload)}function xl(t){t.useclearvisual&&t.data.clearallvisual();var e=t.resetdefines=gn(t.reset(t.model,t.ecmodel,t.api,t.payload));return e.length>1?p(e,function(t,e){return _l(e)}):kt}function _l(t){return function(e,i){var n=i.data,a=i.resetdefines[t];if(a&&a.dataeach)for(var o=e.start;o0?parseint(n,10)/100:n?parsefloat(n):0;var a=i.getattribute("stop-color")||"#000000";e.addcolorstop(n,a)}i=i.nextsibling}}function dl(t,e){t&&t.__inheritedstyle&&(e.__inheritedstyle||(e.__inheritedstyle={}),s(e.__inheritedstyle,t.__inheritedstyle))}function cl(t){for(var e=n(t).split(sd),i=[],n=0;n0;o-=2){var r=a[o],s=a[o-1];switch(n=n||de(),s){case"translate":r=n(r).split(sd),pe(n,n,[parsefloat(r[0]),parsefloat(r[1]||0)]);break;case"scale":r=n(r).split(sd),ne(n,n,[parsefloat(r[0]),parsefloat(r[1]||r[0])]);break;case"rotate":r=n(r).split(sd),oe(n,n,parsefloat(r[0]));break;case"skew":r=n(r).split(sd),console.warn("skew transform is not supported yet");break;case"matrix":var r=n(r).split(sd);n[0]=parsefloat(r[0]),n[1]=parsefloat(r[1]),n[2]=parsefloat(r[2]),n[3]=parsefloat(r[3]),n[4]=parsefloat(r[4]),n[5]=parsefloat(r[5])}}e.setlocaltransform(n)}}function ol(t){var e=t.getattribute("style"),i={};if(!e)return i;var n={};fd.lastindex=0;for(var a;null!=(a=fd.exec(e));)n[a[1]]=a[2];for(var o in hd)hd.hasownproperty(o)&&null!=n[o]&&(i[hd[o]]=n[o]);return i}function nl(t,e,i){var n=e/t.width,a=i/t.height,o=math.min(n,a),r=[o,o],s=[-(t.x+t.width/2)*o+e/2,-(t.y+t.height/2)*o+i/2];return{scale:r,position:s}}function zl(t,e){var i=new al;return i.parse(t,e)}function rl(t,e){return function(i,n,a){(e||!this._disposed)&&(i=i&&i.tolowercase(),pb.prototype[t].call(this,i,n,a))}}function el(){pb.call(this)}function bl(t,e,i){function a(t,e){return t.__prio-e.__prio}i=i||{},"string"==typeof e&&(e=qd[e]),this.id,this.group,this._dom=t;var o="canvas",r=this._zr=zn(t,{renderer:i.renderer||o,devicepixelratio:i.devicepixelratio,width:i.width,height:i.height});this._throttledzrflush=sl(y(r.flush,r),17);var e=n(e);e&&wt(e,!0),this._theme=e,this._chartsviews=[],this._chartsmap={},this._componentsviews=[],this._componentsmap={},this._coordsysmgr=new ms;var s=this._api=iu(this);ci(jd,a),ci(xd,a),this._scheduler=new hl(this,s,xd,jd),pb.call(this,this._eceventprocessor=new nu),this._messagecenter=new el,this._initevents(),this.resize=y(this.resize,this),this._pendingactions=[],r.animation.on("frame",this._onframe,this),ul(r,this),z(this)}function vl(t,e,i){if(!this._disposed){var n,a=this._model,o=this._coordsysmgr.getcoordinatesystems();e=$n(a,e);for(var r=0;re.get("hoverlayerthreshold")&&!hb.node&&e.eachseries(function(e){if(!e.preventusinghoverlayer){var i=t._chartsmap[e.__viewid];i.__alive&&i.group.traverse(function(t){t.usehoverlayer=!0})}})}function tu(t,e){var i=t.get("blendmode")||null;e.group.traverse(function(t){t.isgroup||t.style.blend!==i&&t.setstyle("blend",i),t.eachpendingdisplayable&&t.eachpendingdisplayable(function(t){t.setstyle("blend",i)})})}function eu(t,e){var i=t.get("z"),n=t.get("zlevel");e.group.traverse(function(t){"group"!==t.type&&(null!=i&&(t.z=i),null!=n&&(t.zlevel=n))})}function iu(t){var e=t._coordsysmgr;return r(new gs(t),{getcoordinatesystems:y(e.getcoordinatesystems,e),getcomponentbyelement:function(e){for(;e;){var i=e.__eccomponentinfo;if(null!=i)return t._model.getcomponent(i.maintype,i.index);e=e.parent}}})}function nu(){this.eventinfo}function au(t){function e(t,e){for(var i=0;i65535?hc:dc}function eu(t){var e=t.constructor;return e===array?t.slice():new e(t)}function bu(t,e){f(fc.concat(e.__wrappedmethods||[]),function(i){e.hasownproperty(i)&&(t[i]=e[i])}),t.__wrappedmethods=e.__wrappedmethods,f(pc,function(i){t[i]=n(e[i])}),t._calculationinfo=r(e._calculationinfo)}function vu(t,e,i,n,a){var o=uc[e.type],r=n-1,s=e.name,l=t[s][r];if(l&&l.lengthc;c+=i)t[s].push(new o(math.min(a-c,i)))}function gu(t){var e=t._invertedindicesmap;f(e,function(i,n){var a=t._dimensioninfos[n],o=a.ordinalmeta;if(o){i=e[n]=new cc(o.categories.length);for(var r=0;r=0?this._indices[t]:-1}function zu(t,e){var i=t._idlist[e];return null==i&&(i=fu(t,t._iddimidx,e)),null==i&&(i=lc+e),i}function xu(t){return _(t)||(t=[t]),t}function uu(t,e){var i=t.dimensions,n=new gc(p(i,t.getdimensioninfo,t),t.hostmodel);bu(n,t);for(var a=n._storage={},o=t._storage,r=0;r=0?(a[s]=yu(o[s]),n._rawextent[s]=ju(),n._extent[s]=null):a[s]=o[s])}return n}function yu(t){for(var e=new array(t.length),i=0;ip;p++){var g=o[p]=r({},s(o[p])?o[p]:{name:o[p]}),m=g.name,v=c[p]={otherdims:{}};null!=m&&null==u.get(m)&&(v.name=v.displayname=m,u.set(m,p)),null!=g.type&&(v.type=g.type),null!=g.displayname&&(v.displayname=g.displayname)}l.each(function(t,e){if(t=gn(t).slice(),1===t.length&&!b(t[0])&&t[0]<0)return void l.set(e,!1);var i=l.set(e,[]);f(t,function(t,n){b(t)&&(t=u.get(t)),null!=t&&d>t&&(i[n]=t,a(c[t],e,n))})});var y=0;f(t,function(t){var e,t,i,o;if(b(t))e=t,t={};else{e=t.name;var r=t.ordinalmeta;t.ordinalmeta=null,t=n(t),t.ordinalmeta=r,i=t.dimsdef,o=t.otherdims,t.name=t.coorddim=t.coorddimindex=t.dimsdef=t.otherdims=null}var u=l.get(e);if(u!==!1){var u=gn(u);if(!u.length)for(var h=0;h<(i&&i.length||1);h++){for(;yi;i++){var v=c[i]=c[i]||{},a=v.coorddim;null==a&&(v.coorddim=$u(m,h,w),v.coorddimindex=0,(!x||0>=_)&&(v.isextracoord=!0),_--),null==v.name&&(v.name=$u(v.coorddim,u)),null==v.type&&rs(e,i,v.name)&&(v.type="ordinal")}return c}function ku(t,e,i,n){var a=math.max(t.dimensionsdetectcount||1,e.length,i.length,n||0);return f(e,function(t){var e=t.dimsdef;e&&(a=math.max(a,e.length))}),a}function $u(t,e,i){if(i||null!=e.get(t)){for(var n=0;null!=e.get(t+n);)n++;t+=n}return e.set(t,!0),t}function ju(t,e,i){i=i||{};var n,a,o,r,s=i.byindex,l=i.stackedcoorddimension,u=!(!t||!t.get("stack"));if(f(e,function(t,i){b(t)&&(e[i]=t={name:t}),u&&!t.isextracoord&&(s||n||!t.ordinalmeta||(n=t),a||"ordinal"===t.type||"time"===t.type||l&&l!==t.coorddim||(a=t))}),!a||s||n||(s=!0),a){o="__\x00ecstackresult",r="__\x00ecstackedover",n&&(n.createinvertedindices=!0);var h=a.coorddim,c=a.type,d=0;f(e,function(t){t.coorddim===h&&d++}),e.push({name:o,coorddim:h,coorddimindex:d,type:c,isextracoord:!0,iscalculationcoord:!0}),d++,e.push({name:r,coorddim:r,coorddimindex:d,type:c,isextracoord:!0,iscalculationcoord:!0})}return{stackeddimension:a&&a.name,stackedbydimension:n&&n.name,isstackedbyindex:s,stackedoverdimension:r,stackresultdimension:o}}function qu(t,e){return!!e&&e===t.getcalculationinfo("stackeddimension")}function th(t,e){return qu(t,e)?t.getcalculationinfo("stackresultdimension"):e}function eh(t,e,i){i=i||{},qr.isinstance(t)||(t=qr.seriesdatatosource(t));var n,a=e.get("coordinatesystem"),o=ms.get(a),r=yr(e);r&&(n=p(r.coordsysdims,function(t){var e={name:t},i=r.axismap.get(t);if(i){var n=i.get("type");e.type=nu(n)}return e})),n||(n=o&&(o.getdimensionsinfo?o.getdimensionsinfo():o.dimensions.slice())||["x","y"]);var s,l,u=yc(t,{coorddimensions:n,generatecoord:i.generatecoord});r&&f(u,function(t,e){var i=t.coorddim,n=r.categoryaxismap.get(i);n&&(null==s&&(s=e),t.ordinalmeta=n.getordinalmeta()),null!=t.otherdims.itemname&&(l=!0)}),l||null==s||(u[s].otherdims.itemname=0);var h=ju(e,u),c=new gc(u,e);c.setcalculationinfo(h);var d=null!=s&&ih(t)?function(t,e,i,n){return n===s?i:this.defaultdimvaluegetter(t,e,i,n)}:null;return c.hasitemoption=!1,c.initdata(t,null,d),c}function ih(t){if(t.sourceformat===$a){var e=nh(t.data||[]);return null!=e&&!_(wn(e))}}function nh(t){for(var e=0;er&&(r=a.interval=i),null!=n&&r>n&&(r=a.interval=n);var s=a.intervalprecision=uh(r),l=a.nicetickextent=[bc(math.ceil(t[0]/r)*r,s),bc(math.floor(t[1]/r)*r,s)];return ch(l,t),a}function uh(t){return pr(t)+2}function hh(t,e,i){t[e]=math.max(math.min(t[e],i[1]),i[0])}function ch(t,e){!isfinite(t[0])&&(t[0]=e[0]),!isfinite(t[1])&&(t[1]=e[1]),hh(t,0,e),hh(t,1,e),t[0]>t[1]&&(t[0]=t[1])}function dh(t,e,i,n){var a=[];if(!t)return a;var o=1e4;e[0]o)return[];return e[1]>(a.length?a[a.length-1]:i[1])&&a.push(e[1]),a}function fh(t){return t.get("stack")||ic+t.seriesindex}function ph(t){return t.dim+t.index}function gh(t){var e=[],i=t.axis,n="axis0";if("category"===i.type){for(var a=i.getbandwidth(),o=0;oe&&(e=math.min(e,s),t.width&&(e=math.min(e,t.width)),s-=e,t.width=e,l--)}),u=(s-o)/(l+(l-1)*r),u=math.max(u,0);var h,c=0;f(n,function(t){t.width||(t.width=u),h=t,c+=t.width*(1+r)}),h&&(c-=h.width*r);var d=-c/2;f(n,function(t,n){i[e][n]=i[e][n]||{bandwidth:a,offset:d,width:t.width},d+=t.width*(1+r)})}),i}function xh(t,e,i){if(t&&e){var n=t[ph(e)];return null!=n&&null!=i&&(n=n[fh(i)]),n}}function _h(t,e){var i=mh(t,e),n=vh(i),a={};f(i,function(t){var e=t.getdata(),i=t.coordinatesystem,o=i.getbaseaxis(),r=fh(t),s=n[ph(o)][r],l=s.offset,u=s.width,h=i.getotheraxis(o),c=t.get("barminheight")||0;a[r]=a[r]||[],e.setlayout({bandwidth:s.bandwidth,offset:l,size:u});for(var d=e.mapdimension(h.dim),f=e.mapdimension(o.dim),p=qu(e,d),g=h.ishorizontal(),m=sh(o,h,p),v=0,y=e.count();y>v;v++){var x=e.get(d,v),_=e.get(f,v);if(!isnan(x)&&!isnan(_)){var w=x>=0?"p":"n",b=m;p&&(a[r][_]||(a[r][_]={p:m,n:m}),b=a[r][_][w]);var s,m,i,a;if(g){var t=i.datatopoint([x,_]);s=b,m=t[1]+l,i=t[0]-m,a=u,math.abs(i)i?-1:1)*c),p&&(a[r][_][w]+=i)}else{var t=i.datatopoint([_,x]);s=t[0]+l,m=b,i=u,a=t[1]-m,math.abs(a)=a?-1:1)*c),p&&(a[r][_][w]+=a)}e.setitemlayout(v,{x:s,y:m,width:i,height:a})}}},this)}function wh(t){return t.coordinatesystem&&"cartesian2d"===t.coordinatesystem.type}function bh(t){return t.pipelinecontext&&t.pipelinecontext.large}function sh(t,e){return e.toglobalcoord(e.datatocoord(0))}function mh(t,e){return wc(t,fc(e))}function ih(t,e){var i,n,a,o=t.type,r=e.getmin(),s=e.getmax(),l=null!=r,u=null!=s,h=t.getextent();"ordinal"===o?i=e.getcategories().length:(n=e.get("boundarygap"),_(n)||(n=[n||0,n||0]),"boolean"==typeof n[0]&&(n=[0,0]),n[0]=hr(n[0],1),n[1]=hr(n[1],1),a=h[1]-h[0]||math.abs(h[0])),null==r&&(r="ordinal"===o?i?0:0/0:h[0]-n[0]*a),null==s&&(s="ordinal"===o?i?i-1:0/0:h[1]+n[1]*a),"datamin"===r?r=h[0]:"function"==typeof r&&(r=r({min:h[0],max:h[1]})),"datamax"===s?s=h[1]:"function"==typeof s&&(s=s({min:h[0],max:h[1]})),(null==r||!isfinite(r))&&(r=0/0),(null==s||!isfinite(s))&&(s=0/0),t.setblank(t(r)||t(s)||"ordinal"===o&&!t.getordinalmeta().categories.length),e.getneedcrosszero()&&(r>0&&s>0&&!l&&(r=0),0>r&&0>s&&!u&&(s=0));var c=e.ecmodel;if(c&&"time"===o){var d,p=mh("bar",c);if(f(p,function(t){d|=t.getbaseaxis()===e.axis}),d){var g=vh(p),m=ah(r,s,e,g);r=m.min,s=m.max}}return[r,s]}function ah(t,e,i,n){var a=i.axis.getextent(),o=a[1]-a[0],r=xh(n,i.axis);if(void 0===r)return{min:t,max:e};var s=1/0;f(r,function(t){s=math.min(t.offset,s)});var l=-1/0;f(r,function(t){l=math.max(t.offset+t.width,l)}),s=math.abs(s),l=math.abs(l);var u=s+l,h=e-t,c=1-(s+l)/o,d=h/c-h;return e+=d*(l/u),t-=d*(s/u),{min:t,max:e}}function th(t,e){var i=ih(t,e),n=null!=e.getmin(),a=null!=e.getmax(),o=e.get("splitnumber");"log"===t.type&&(t.base=e.get("logbase"));var r=t.type;t.setextent(i[0],i[1]),t.niceextent({splitnumber:o,fixmin:n,fixmax:a,mininterval:"interval"===r||"time"===r?e.get("mininterval"):null,maxinterval:"interval"===r||"time"===r?e.get("maxinterval"):null});var s=e.get("interval");null!=s&&t.setinterval&&t.setinterval(s)}function dh(t,e){if(e=e||t.get("type"))switch(e){case"category":return new wc(t.getordinalmeta?t.getordinalmeta():t.getcategories(),[1/0,-1/0]);case"value":return new mc;default:return(ah.getclass(e)||mc).create(t)}}function ch(t){var e=t.scale.getextent(),i=e[0],n=e[1];return!(i>0&&n>0||0>i&&0>n)}function lh(t){var e=t.getlabelmodel().get("formatter"),i="category"===t.type?t.scale.getextent()[0]:null;return"string"==typeof e?e=function(e){return function(i){return i=t.scale.getlabel(i),e.replace("{value}",null!=i?i:"")}}(e):"function"==typeof e?function(n,a){return null!=i&&(a=n-i),e(kh(t,n),a)}:function(e){return t.scale.getlabel(e)}}function kh(t,e){return"category"===t.type?t.scale.getlabel(e):e}function ph(t){var e=t.model,i=t.scale;if(e.get("axislabel.show")&&!i.isblank()){var n,a,o="category"===t.type,r=i.getextent();o?a=i.count():(n=i.getticks(),a=n.length);var s,l=t.getlabelmodel(),u=lh(t),h=1;a>40&&(h=math.ceil(a/40));for(var c=0;a>c;c+=h){var d=n?n[c]:r[0]+c,f=u(d),p=l.gettextrect(f),g=oh(p,l.get("rotate")||0);s?s.union(g):s=g}return s}}function oh(t,e){var i=e*math.pi/180,n=t.plain(),a=n.width,o=n.height,r=a*math.cos(i)+o*math.sin(i),s=a*math.sin(i)+o*math.cos(i),l=new wi(n.x,n.y,r,s);return l}function nh(t){var e=t.get("interval");return null==e?"auto":e}function zh(t){return"category"===t.type&&0===nh(t.getlabelmodel())}function rh(t,e){if("image"!==this.type){var i=this.style,n=this.shape;n&&"line"===n.symboltype?i.stroke=t:this.__isemptybrush?(i.stroke=t,i.fill=e||"#fff"):(i.fill&&(i.fill=t),i.stroke&&(i.stroke=t)),this.dirty(!1)}}function eh(t,e,i,n,a,o,r){var s=0===t.indexof("empty");s&&(t=t.substr(5,1).tolowercase()+t.substr(6));var l;return l=0===t.indexof("image://")?lo(t.slice(8),new wi(e,i,n,a),r?"center":"cover"):0===t.indexof("path://")?so(t.slice(7),{},new wi(e,i,n,a),r?"center":"cover"):new il({shape:{symboltype:t,x:e,y:i,width:n,height:a}}),l.__isemptybrush=s,l.setcolor=rh,l.setcolor(o),l}function bh(t){return eh(t.getsource(),t)}function vh(t,e){var i=e;ir.isinstance(e)||(i=new ir(e),c(i,jc));var n=dh(i);return n.setextent(t[0],t[1]),th(n,i),n}function gh(t){c(t,jc)}function fh(t,e){return math.abs(t-e)>1^-(1&s),l=l>>1^-(1&l),s+=a,l+=o,a=s,o=l,n.push([s/i,l/i])}return n}function uh(t){return"category"===t.type?jh(t):$h(t)}function yh(t,e){return"category"===t.type?kh(t,e):{ticks:t.scale.getticks()}}function jh(t){var e=t.getlabelmodel(),i=qh(t,e);return!e.get("show")||t.scale.isblank()?{labels:[],labelcategoryinterval:i.labelcategoryinterval}:i}function qh(t,e){var i=jh(t,"labels"),n=nh(e),a=qh(i,n);if(a)return a;var o,r;return w(n)?o=oc(t,n):(r="auto"===n?ec(t):n,o=ac(t,r)),tc(i,n,{labels:o,labelcategoryinterval:r})}function kh(t,e){var i=jh(t,"ticks"),n=nh(e),a=qh(i,n);if(a)return a;var o,r;if((!e.get("show")||t.scale.isblank())&&(o=[]),w(n))o=oc(t,n,!0);else if("auto"===n){var s=qh(t,t.getlabelmodel());r=s.labelcategoryinterval,o=p(s.labels,function(t){return t.tickvalue})}else r=n,o=ac(t,r,!0);return tc(i,n,{ticks:o,tickcategoryinterval:r})}function $h(t){var e=t.scale.getticks(),i=lh(t);return{labels:p(e,function(e,n){return{formattedlabel:i(e,n),rawlabel:t.scale.getlabel(e),tickvalue:e}})}}function jh(t,e){return sl(t)[e]||(sl(t)[e]=[])}function qh(t,e){for(var i=0;i40&&(s=math.max(1,math.floor(r/40)));for(var l=o[0],u=t.datatocoord(l+1)-t.datatocoord(l),h=math.abs(u*math.cos(n)),c=math.abs(u*math.sin(n)),d=0,f=0;l<=o[1];l+=s){var p=0,g=0,m=gi(i(l),e.font,"center","top");p=1.3*m.width,g=1.3*m.height,d=math.max(d,p,7),f=math.max(f,g,7)}var v=d/h,y=f/c;isnan(v)&&(v=1/0),isnan(y)&&(y=1/0);var x=math.max(0,math.floor(math.min(v,y))),_=sl(t.model),w=_.lastautointerval,b=_.lasttickcount;return null!=w&&null!=b&&math.abs(w-x)<=1&&math.abs(b-r)<=1&&w>x?x=w:(_.lasttickcount=r,_.lastautointerval=x),x}function nc(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 ac(t,e,i){function n(t){l.push(i?t:{formattedlabel:a(t),rawlabel:o.getlabel(t),tickvalue:t})}var a=lh(t),o=t.scale,r=o.getextent(),s=t.getlabelmodel(),l=[],u=math.max((e||0)+1,1),h=r[0],c=o.count();0!==h&&u>1&&c/u>2&&(h=math.round(math.ceil(h/u)*u));var d=zh(t),f=s.get("showminlabel")||d,p=s.get("showmaxlabel")||d;f&&h!==r[0]&&n(r[0]);for(var g=h;g<=r[1];g+=u)n(g);return p&&g-u!==r[1]&&n(r[1]),l}function oc(t,e,i){var n=t.scale,a=lh(t),o=[];return f(n.getticks(),function(t){var r=n.getlabel(t);e(t,r)&&o.push(i?t:{formattedlabel:a(t),rawlabel:r,tickvalue:t})}),o}function rc(t,e){var i=t[1]-t[0],n=e,a=i/n/2;t[0]+=a,t[1]-=a}function sc(t,e,i,n,a){function o(t,e){return h?t>e:e>t}var r=e.length;if(t.onband&&!n&&r){var s,l=t.getextent();if(1===r)e[0].coord=l[0],s=e[1]={coord:l[0]};else{var u=e[1].coord-e[0].coord;f(e,function(t){t.coord-=u/2;var e=e||0;e%2>0&&(t.coord-=u/(2*(e+1)))}),s={coord:e[r-1].coord+u},e.push(s)}var h=l[0]>l[1];o(e[0].coord,l[0])&&(a?e[0].coord=l[0]:e.shift()),a&&o(l[0],e[0].coord)&&e.unshift({coord:l[0]}),o(l[1],s.coord)&&(a?s.coord=l[1]:e.pop()),a&&o(s.coord,l[1])&&e.push({coord:l[1]})}}function lc(t){return this._axes[t]}function uc(t){fl.call(this,t)}function hc(t,e){return e.type||(e.data?"category":"value")}function cc(t,e){return t.getcoordsysmodel()===e}function dc(t,e,i){this._coordsmap={},this._coordslist=[],this._axesmap={},this._axeslist=[],this._initcartesian(t,e,i),this.model=t}function fc(t,e,i,n){function a(t){return t.dim+"_"+t.index}i.getaxesonzeroof=function(){return o?[o]:[]};var o,r=t[e],s=i.model,l=s.get("axisline.onzero"),u=s.get("axisline.onzeroaxisindex");if(l){if(null!=u)pc(r[u])&&(o=r[u]);else for(var h in r)if(r.hasownproperty(h)&&pc(r[h])&&!n[a(r[h])]){o=r[h];break}o&&(n[a(o)]=!0)}}function pc(t){return t&&"category"!==t.type&&"time"!==t.type&&ch(t)}function gc(t,e){var i=t.getextent(),n=i[0]+i[1];t.toglobalcoord="x"===t.dim?function(t){return t+e}:function(t){return n-t+e},t.tolocalcoord="x"===t.dim?function(t){return t-e}:function(t){return n-t+e}}function mc(t){return p(bl,function(e){var i=t.getreferringcomponents(e)[0];return i})}function vc(t){return"cartesian2d"===t.get("coordinatesystem")}function yc(t,e){var i=t.mapdimension("defaultedlabel",!0),n=i.length;if(1===n)return ws(t,e,i[0]);if(n){for(var a=[],o=0;o0?"bottom":"top":a.width>0?"left":"right";l||xc(t.style,d,n,u,o,i,p),to(t,d)}function dc(t,e){var i=t.get(al)||0;return math.min(i,math.abs(e.width),math.abs(e.height))}function cc(t,e,i){var n=t.getdata(),a=[],o=n.getlayout("valueaxishorizontal")?1:0;a[1-o]=n.getlayout("valueaxisstart");var r=new ol({shape:{points:n.getlayout("largepoints")},incremental:!!i,__startpoint:a,__basedimidx:o,__largedataindices:n.getlayout("largedataindices"),__barwidth:n.getlayout("barwidth")});e.add(r),kc(r,t,n),r.seriesindex=t.seriesindex,t.get("silent")||(r.on("mousedown",nl),r.on("mousemove",nl))}function lc(t,e,i){var n=t.__basedimidx,a=1-n,o=t.shape.points,r=t.__largedataindices,s=math.abs(t.__barwidth/2),l=t.__startpoint[a];tl[0]=e,tl[1]=i;for(var u=tl[n],h=tl[1-n],c=u-s,d=u+s,f=0,p=o.length/2;p>f;f++){var g=2*f,m=o[g+n],v=o[g+a];if(m>=c&&d>=m&&(v>=l?h>=l&&v>=h:h>=v&&l>=h))return r[f]}return-1}function kc(t,e,i){var n=i.getvisual("bordercolor")||i.getvisual("color"),a=e.getmodel("itemstyle").getitemstyle(["color","bordercolor"]);t.usestyle(a),t.style.fill=null,t.style.stroke=n,t.style.linewidth=i.getlayout("barwidth")}function pc(t,e,i,n){var a,o,r=vr(i-t.rotation),s=n[0]>n[1],l="start"===e&&!s||"start"!==e&&s;return yr(r-zl/2)?(o=l?"bottom":"top",a="center"):yr(r-1.5*zl)?(o=l?"top":"bottom",a="center"):(o="middle",a=1.5*zl>r&&r>zl/2?l?"left":"right":l?"right":"left"),{rotation:r,textalign:a,textverticalalign:o}}function oc(t,e,i){if(!zh(t.axis)){var n=t.get("axislabel.showminlabel"),a=t.get("axislabel.showmaxlabel");e=e||[],i=i||[];var o=e[0],r=e[1],s=e[e.length-1],l=e[e.length-2],u=i[0],h=i[1],c=i[i.length-1],d=i[i.length-2];n===!1?(nc(o),nc(u)):zc(o,r)&&(n?(nc(r),nc(h)):(nc(o),nc(u))),a===!1?(nc(s),nc(c)):zc(l,s)&&(a?(nc(l),nc(d)):(nc(s),nc(c)))}}function nc(t){t&&(t.ignore=!0)}function zc(t,e){var i=t&&t.getboundingrect().clone(),n=e&&e.getboundingrect().clone();if(i&&n){var a=ce([]);return oe(a,a,-t.rotation),i.applytransform(ke([],a,t.getlocaltransform())),n.applytransform(ke([],a,e.getlocaltransform())),i.intersect(n)}}function rc(t){return"middle"===t||"center"===t}function ec(t,e,i){var n=e.axis;if(e.get("axistick.show")&&!n.scale.isblank()){for(var a=e.getmodel("axistick"),o=a.getmodel("linestyle"),r=a.get("length"),l=n.gettickscoords(),u=[],h=[],c=t._transform,d=[],f=0;f=0||t===e}function xc(t){var e=uc(t);if(e){var i=e.axispointermodel,n=e.axis.scale,a=i.option,o=i.get("status"),r=i.get("value");null!=r&&(r=n.parse(r));var s=jc(i);null==o&&(a.status=s?"show":"hide");var l=n.getextent().slice();l[0]>l[1]&&l.reverse(),(null==r||r>l[1])&&(r=l[1]),r0?i=n[0]:n[1]<0&&(i=n[1]),i}function ud(t,e,i,n){var a=0/0;t.stacked&&(a=i.get(i.getcalculationinfo("stackedoverdimension"),n)),isnan(a)&&(a=t.valuestart);var o=t.basedataoffset,r=[];return r[o]=i.get(t.basedim,n),r[1-o]=a,e.datatopoint(r)}function hd(t,e){var i=[];return e.diff(t).add(function(t){i.push({cmd:"+",idx:t})}).update(function(t,e){i.push({cmd:"=",idx:e,idx1:t}) }).remove(function(t){i.push({cmd:"-",idx:t})}).execute(),i}function cd(t){return isnan(t[0])||isnan(t[1])}function dd(t,e,i,n,a,o,r,s,l,u){return"none"!==u&&u?fd.apply(this,arguments):pd.apply(this,arguments)}function fd(t,e,i,n,a,o,r,s,l,u,h){for(var c=0,d=i,f=0;n>f;f++){var p=e[d];if(d>=a||0>d)break;if(cd(p)){if(h){d+=o;continue}break}if(d===i)t[o>0?"moveto":"lineto"](p[0],p[1]);else if(l>0){var g=e[c],m="y"===u?1:0,v=(p[m]-g[m])*l;ok(sk,g),sk[m]=g[m]+v,ok(lk,p),lk[m]=p[m]-v,t.beziercurveto(sk[0],sk[1],lk[0],lk[1],p[0],p[1])}else t.lineto(p[0],p[1]);c=d,d+=o}return f}function pd(t,e,i,n,a,o,r,s,l,u,h){for(var c=0,d=i,f=0;n>f;f++){var p=e[d];if(d>=a||0>d)break;if(cd(p)){if(h){d+=o;continue}break}if(d===i)t[o>0?"moveto":"lineto"](p[0],p[1]),ok(sk,p);else if(l>0){var g=d+o,m=e[g];if(h)for(;m&&cd(e[g]);)g+=o,m=e[g];var v=.5,y=e[c],m=e[g];if(!m||cd(m))ok(lk,p);else{cd(m)&&!h&&(m=p),y(rk,m,y);var x,_;if("x"===u||"y"===u){var w="x"===u?0:1;x=math.abs(p[w]-y[w]),_=math.abs(p[w]-m[w])}else x=db(p,y),_=db(p,m);v=_/(_+x),ak(lk,p,rk,-l*(1-v))}ik(sk,sk,s),nk(sk,sk,r),ik(lk,lk,s),nk(lk,lk,r),t.beziercurveto(sk[0],sk[1],lk[0],lk[1],p[0],p[1]),ak(sk,p,rk,l*v)}else t.lineto(p[0],p[1]);c=d,d+=o}return f}function gd(t,e){var i=[1/0,1/0],n=[-1/0,-1/0];if(e)for(var a=0;an[0]&&(n[0]=o[0]),o[1]>n[1]&&(n[1]=o[1])}return{min:e?i:n,max:e?n:i}}function md(t,e){if(t.length===e.length){for(var i=0;ia;a++)n.push(ud(i,t,e,a));return n}function xd(t,e,i){for(var n=e.getbaseaxis(),a="x"===n.dim||"radius"===n.dim?0:1,o=[],r=0;r=0;o--){var r=i[o].dimension,s=t.dimensions[r],l=t.getdimensioninfo(s);if(n=l&&l.coorddim,"x"===n||"y"===n){a=i[o];break}}if(a){var u=e.getaxis(n),h=p(a.stops,function(t){return{coord:u.toglobalcoord(u.datatocoord(t.value)),color:t.color}}),c=h.length,d=a.outercolors.slice();c&&h[0].coord>h[c-1].coord&&(h.reverse(),d.reverse());var g=10,m=h[0].coord-g,v=h[c-1].coord+g,y=v-m;if(.001>y)return"transparent";f(h,function(t){t.offset=(t.coord-m)/y}),h.push({offset:c?h[c-1].offset:.5,color:d[1]||"transparent"}),h.unshift({offset:c?h[0].offset:.5,color:d[0]||"transparent"});var x=new na(0,0,0,0,h,!0);return x[n]=m,x[n+"2"]=v,x}}}function wd(t,e,i){var n=t.get("showallsymbol"),a="auto"===n;if(!n||a){var o=i.getaxesbyscale("ordinal")[0];if(o&&(!a||!bd(o,e))){var r=e.mapdimension(o.dim),s={};return f(o.getviewlabels(),function(t){s[t.tickvalue]=1}),function(t){return!s.hasownproperty(e.get(r,t))}}}}function bd(t,e){var i=t.getextent(),n=math.abs(i[1]-i[0])/t.scale.count();isnan(n)&&(n=0);for(var a=e.count(),o=math.max(1,math.round(a/5)),r=0;a>r;r+=o)if(1.5*qc.getsymbolsize(e,r)[t.ishorizontal()?1:0]>n)return!1;return!0}function sd(t,e,i){if("cartesian2d"===t.type){var n=t.getbaseaxis().ishorizontal(),a=wc(t,e,i);if(!i.get("clip",!0)){var o=a.shape,r=math.max(o.width,o.height);n?(o.y-=r,o.height+=2*r):(o.x-=r,o.width+=2*r)}return a}return bc(t,e,i)}function md(t,e,i,n){var a=e.getdata(),o=this.dataindex,r=a.getname(o),s=e.get("selectedoffset");n.dispatchaction({type:"pietoggleselect",from:t,name:r,seriesid:e.id}),a.each(function(t){id(a.getitemgraphicel(t),a.getitemlayout(t),e.isselected(a.getname(t)),s,i)})}function id(t,e,i,n,a){var o=(e.startangle+e.endangle)/2,r=math.cos(o),s=math.sin(o),l=i?n:0,u=[r*l,s*l];a?t.animate().when(200,{position:u}).start("bounceout"):t.attr("position",u)}function ad(t,e){ss.call(this);var i=new fi({z2:2}),n=new ui,a=new ei;this.add(i),this.add(n),this.add(a),this.updatedata(t,e,!0)}function td(t,e,i,n,a,o,r){function s(e,i,n){for(var a=e;i>a;a++)if(t[a].y+=n,a>e&&i>a+1&&t[a+1].y>t[a].y+t[a].height)return void l(a,n/2);l(i-1,n/2)}function l(e,i){for(var n=e;n>=0&&(t[n].y-=i,!(n>0&&t[n].y>t[n-1].y+t[n-1].height));n--);}function u(t,e,i,n,a,o){for(var r=o>0?e?number.max_value:0:e?number.max_value:0,s=0,l=t.length;l>s;s++){var u=math.abs(t[s].y-n),h=t[s].len,c=t[s].len2,d=a+h>u?math.sqrt((a+h+c)*(a+h+c)-u*u):math.abs(t[s].x-i);e&&d>=r&&(d=r-10),!e&&r>=d&&(d=r+10),t[s].x=i+d*o,r=d}}t.sort(function(t,e){return t.y-e.y});for(var h,c=0,d=t.length,f=[],p=[],g=0;d>g;g++)h=t[g].y-c,0>h&&s(g,d,-h,a),c=t[g].y+t[g].height;0>r-c&&l(d-1,c-r);for(var g=0;d>g;g++)t[g].y>=i?p.push(t[g]):f.push(t[g]);u(f,!1,e,i,n,a),u(p,!0,e,i,n,a)}function dd(t,e,i,n,a,o){for(var r=[],s=[],l=0;l0?"p":"n",o=n.getvisual("bordercolor"+a)||n.getvisual("color"+a),r=i.getmodel(zk).getitemstyle(ek);e.usestyle(r),e.style.fill=null,e.style.stroke=o}function vd(t,e,i,n,a){var o;return o=i>n?-1:n>i?1:e>0?t.get(a,e-1)<=n?1:-1:1}function gd(t,e){var i,n=t.getbaseaxis(),a="category"===n.type?n.getbandwidth():(i=n.getextent(),math.abs(i[1]-i[0])/e.count()),o=hr(c(t.get("barmaxwidth"),a),a),r=hr(c(t.get("barminwidth"),1),a),s=t.get("barwidth");return null!=s?hr(s,a):math.max(math.min(a/2,o),r)}function fd(t,e,i){ul.call(this,t,e,i),this.type="value",this.angle=0,this.name="",this.model}function wd(t,e,i){this._model=t,this.dimensions=[],this._indicatoraxes=p(t.getindicatormodels(),function(t,e){var i="indicator_"+e,n=new fd(i,new mc);return n.name=t.get("name"),n.model=t,t.axis=n,this.dimensions.push(i),n},this),this.resize(t,i),this.cx,this.cy,this.r,this.r0,this.startangle}function hd(t,e){return s({show:e},t)}function zd(t){return _(t)||(t=[+t,+t]),t}function xd(t){return!isnan(t[0])&&!isnan(t[1])}function ud(t){return[t.cx,t.cy]}function yd(){var t=wb();this.canvas=t,this.blursize=30,this.pointsize=20,this.maxopacity=1,this.minopacity=0,this._gradientpixels={}}function jd(t,e,i){var n=t[1]-t[0];e=p(e,function(e){return{interval:[(e.interval[0]-t[0])/n,(e.interval[1]-t[0])/n]}});var a=e.length,o=0;return function(t){for(var n=o;a>n;n++){var r=e[n].interval;if(r[0]<=t&&t<=r[1]){o=n;break}}if(n===a)for(var n=o-1;n>=0;n--){var r=e[n].interval;if(r[0]<=t&&t<=r[1]){o=n;break}}return n>=0&&a>n&&i[n]}}function qd(t,e){var i=t[1]-t[0];return e=[(e[0]-t[0])/i,(e[1]-t[0])/i],function(t){return t>=e[0]&&t<=e[1]}}function kd(t){var e=t.dimensions;return"lng"===e[0]&&"lat"===e[1]}function $d(t){var e=t.maindata,i=t.datas;i||(i={main:e},t.datasattr={main:"data"}),t.datas=t.maindata=null,af(e,i,t),tp(i,function(i){tp(e.transferable_methods,function(e){i.wrapmethod(e,x(jd,t))})}),e.wrapmethod("cloneshallow",x(tf,t)),tp(e.changable_methods,function(i){e.wrapmethod(i,x(qd,t))}),o(i[e.datatype]===e)}function jd(t,e){if(nf(this)){var i=r({},this[ep]);i[this.datatype]=e,af(e,i,t)}else of(e,this.datatype,this[ip],t);return e}function qd(t,e){return t.struct&&t.struct.update(this),e}function tf(t,e){return tp(e[ep],function(i,n){i!==e&&of(i.cloneshallow(),n,e,t)}),e}function ef(t){var e=this[ip];return null==t||null==e?e:e[ep][t]}function nf(t){return t[ip]===t}function af(t,e,i){t[ep]={},tp(e,function(e,n){of(e,n,t,i)})}function of(t,e,i,n){i[ep][e]=t,t[ip]=i,t.datatype=e,n.struct&&(t[n.structattr]=n.struct,n.struct[n.datasattr[e]]=t),t.getlinkeddata=ef}function rf(t,e,i){this.root,this.data,this._nodes=[],this.hostmodel=t,this.levelmodels=p(e||[],function(e){return new ir(e,t,t.ecmodel)}),this.leavesmodel=new ir(i||{},t,t.ecmodel)}function sf(t,e){var i=e.children;t.parentnode!==e&&(i.push(t),t.parentnode=e)}function lf(t){t.hiernode={defaultancestor:null,ancestor:t,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var e,i,n=[t];e=n.pop();)if(i=e.children,e.isexpand&&i.length)for(var a=i.length,o=a-1;o>=0;o--){var r=i[o];r.hiernode={defaultancestor:null,ancestor:r,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},n.push(r)}}function uf(t,e){var i=t.isexpand?t.children:[],n=t.parentnode.children,a=t.hiernode.i?n[t.hiernode.i-1]:null;if(i.length){pf(t);var o=(i[0].hiernode.prelim+i[i.length-1].hiernode.prelim)/2;a?(t.hiernode.prelim=a.hiernode.prelim+e(t,a),t.hiernode.modifier=t.hiernode.prelim-o):t.hiernode.prelim=o}else a&&(t.hiernode.prelim=a.hiernode.prelim+e(t,a));t.parentnode.hiernode.defaultancestor=gf(t,a,t.parentnode.hiernode.defaultancestor||n[0],e)}function hf(t){var e=t.hiernode.prelim+t.parentnode.hiernode.modifier;t.setlayout({x:e},!0),t.hiernode.modifier+=t.parentnode.hiernode.modifier}function cf(t){return arguments.length?t:_f}function df(t,e){var i={};return t-=math.pi/2,i.x=e*math.cos(t),i.y=e*math.sin(t),i}function ff(t,e){return vr(t.getboxlayoutparams(),{width:e.getwidth(),height:e.getheight()})}function pf(t){for(var e=t.children,i=e.length,n=0,a=0;--i>=0;){var o=e[i];o.hiernode.prelim+=n,o.hiernode.modifier+=n,a+=o.hiernode.change,n+=o.hiernode.shift+a}}function gf(t,e,i,n){if(e){for(var a=t,o=t,r=o.parentnode.children[0],s=e,l=a.hiernode.modifier,u=o.hiernode.modifier,h=r.hiernode.modifier,c=s.hiernode.modifier;s=mf(s),o=vf(o),s&&o;){a=mf(a),r=vf(r),a.hiernode.ancestor=t;var d=s.hiernode.prelim+c-o.hiernode.prelim-u+n(s,o);d>0&&(xf(yf(s,t,i),t,d),u+=d,l+=d),c+=s.hiernode.modifier,u+=o.hiernode.modifier,l+=a.hiernode.modifier,h+=r.hiernode.modifier}s&&!mf(a)&&(a.hiernode.thread=s,a.hiernode.modifier+=c-l),o&&!vf(r)&&(r.hiernode.thread=o,r.hiernode.modifier+=u-h,i=t)}return i}function mf(t){var e=t.children;return e.length&&t.isexpand?e[e.length-1]:t.hiernode.thread}function vf(t){var e=t.children;return e.length&&t.isexpand?e[0]:t.hiernode.thread}function yf(t,e,i){return t.hiernode.ancestor.parentnode===e.parentnode?t.hiernode.ancestor:i}function xf(t,e,i){var n=i/(e.hiernode.i-t.hiernode.i);e.hiernode.change-=n,e.hiernode.shift+=i,e.hiernode.modifier+=i,e.hiernode.prelim+=i,t.hiernode.change+=n}function _f(t,e){return t.parentnode===e.parentnode?1:2}function wf(){jb.call(this)}function bf(t){this.name=t,this.zoomlimit,jb.call(this),this._roamtransformable=new wf,this._rawtransformable=new wf,this._center,this._zoom}function sf(t,e,i,n){var a=i.seriesmodel,o=a?a.coordinatesystem:null;return o===this?o[t](n):null}function mf(t,e,i){var n=t.target,a=n.position;a[0]+=e,a[1]+=i,n.dirty()}function if(t,e,i,n){var a=t.target,o=t.zoomlimit,r=a.position,s=a.scale,l=t.zoom=t.zoom||1;if(l*=e,o){var u=o.min||0,h=o.max||1/0;l=math.max(math.min(h,l),u)}var c=l/t.zoom;t.zoom=l,r[0]-=(i-r[0])*(c-1),r[1]-=(n-r[1])*(c-1),s[0]*=c,s[1]*=c,a.dirty()}function af(t,e,i){var n=cf(t);n[e]=i}function tf(t,e,i){var n=cf(t),a=n[e];a===i&&(n[e]=null)}function df(t,e){return!!cf(t)[e]}function cf(t){return t[op]||(t[op]={})}function lf(t){this.pointerchecker,this._zr=t,this._opt={};var e=y,i=e(kf,this),a=e(pf,this),o=e(of,this),r=e(nf,this),l=e(zf,this);pb.call(this),this.setpointerchecker=function(t){this.pointerchecker=t},this.enable=function(e,u){this.disable(),this._opt=s(n(u)||{},{zoomonmousewheel:!0,moveonmousemove:!0,moveonmousewheel:!1,preventdefaultmousemove:!0}),null==e&&(e=!0),(e===!0||"move"===e||"pan"===e)&&(t.on("mousedown",i),t.on("mousemove",a),t.on("mouseup",o)),(e===!0||"scale"===e||"zoom"===e)&&(t.on("mousewheel",r),t.on("pinch",l))},this.disable=function(){t.off("mousedown",i),t.off("mousemove",a),t.off("mouseup",o),t.off("mousewheel",r),t.off("pinch",l)},this.dispose=this.disable,this.isdragging=function(){return this._dragging},this.ispinching=function(){return this._pinching}}function kf(t){if(!(we(t)||t.target&&t.target.draggable)){var e=t.offsetx,i=t.offsety;this.pointerchecker&&this.pointerchecker(t,e,i)&&(this._x=e,this._y=i,this._dragging=!0)}}function pf(t){if(this._dragging&&bf("moveonmousemove",t,this._opt)&&"pinch"!==t.gestureevent&&!df(this._zr,"globalpan")){var e=t.offsetx,i=t.offsety,n=this._x,a=this._y,o=e-n,r=i-a;this._x=e,this._y=i,this._opt.preventdefaultmousemove&&bb(t.event),ef(this,"pan","moveonmousemove",t,{dx:o,dy:r,oldx:n,oldy:a,newx:e,newy:i})}}function of(t){we(t)||(this._dragging=!1)}function nf(t){var e=bf("zoomonmousewheel",t,this._opt),i=bf("moveonmousewheel",t,this._opt),n=t.wheeldelta,a=math.abs(n),o=t.offsetx,r=t.offsety;if(0!==n&&(e||i)){if(e){var s=a>3?1.4:a>1?1.2:1.1,l=n>0?s:1/s;rf(this,"zoom","zoomonmousewheel",t,{scale:l,originx:o,originy:r})}if(i){var u=math.abs(n),h=(n>0?1:-1)*(u>3?.4:u>1?.15:.05);rf(this,"scrollmove","moveonmousewheel",t,{scrolldelta:h,originx:o,originy:r})}}}function zf(t){if(!df(this._zr,"globalpan")){var e=t.pinchscale>1?1.1:1/1.1;rf(this,"zoom",null,t,{scale:e,originx:t.pinchx,originy:t.pinchy})}}function rf(t,e,i,n,a){t.pointerchecker&&t.pointerchecker(n,a.originx,a.originy)&&(bb(n.event),ef(t,e,i,n,a))}function ef(t,e,i,n,a){a.isavailablebehavior=y(bf,null,i,n),t.trigger(e,a)}function bf(t,e,i){var n=i[t];return!t||n&&(!b(n)||e.event[n+"key"])}function vf(t,e,i){var n=e.getcomponentbyelement(t.toptarget),a=n&&n.coordinatesystem;return n&&n!==i&&!rp[n.maintype]&&a&&a.model!==i}function gf(t,e){var i=t.getitemlayout(e);return i&&!isnan(i.x)&&!isnan(i.y)&&"none"!==t.getitemvisual(e,"symbol")}function ff(t,e,i){return i.itemmodel=e,i.itemstyle=e.getmodel("itemstyle").getitemstyle(),i.hoveritemstyle=e.getmodel("emphasis.itemstyle").getitemstyle(),i.linestyle=e.getmodel("linestyle").getlinestyle(),i.labelmodel=e.getmodel("label"),i.hoverlabelmodel=e.getmodel("emphasis.label"),i.symbolinnercolor=t.isexpand===!1&&0!==t.children.length?i.itemstyle.fill:"#fff",i}function wf(t,e,i,n,a,o){var r=!i,l=t.tree.getnodebydataindex(e),u=l.getmodel(),o=ff(l,u,o),h=t.tree.root,c=l.parentnode===h?l:l.parentnode||l,d=t.getitemgraphicel(c.dataindex),f=c.getlayout(),p=d?{x:d.position[0],y:d.position[1],rawx:d.__radialoldrawx,rawy:d.__radialoldrawy}:f,g=l.getlayout();r?(i=new qc(t,e,o),i.attr("position",[p.x,p.y])):i.updatedata(t,e,o),i.__radialoldrawx=i.__radialrawx,i.__radialoldrawy=i.__radialrawy,i.__radialrawx=g.rawx,i.__radialrawy=g.rawy,n.add(i),t.setitemgraphicel(e,i),ho(i,{position:[g.x,g.y]},a);var m=i.getsymbolpath();if("radial"===o.layout){var v,y,x=h.children[0],_=x.getlayout(),w=x.children.length;if(g.x===_.x&&l.isexpand===!0){var b={};b.x=(x.children[0].getlayout().x+x.children[w-1].getlayout().x)/2,b.y=(x.children[0].getlayout().y+x.children[w-1].getlayout().y)/2,v=math.atan2(b.y-_.y,b.x-_.x),0>v&&(v=2*math.pi+v),y=b.x<_.x,y&&(v-=math.pi)}else v=math.atan2(g.y-_.y,g.x-_.x),0>v&&(v=2*math.pi+v),0===l.children.length||0!==l.children.length&&l.isexpand===!1?(y=g.x<_.x,y&&(v-=math.pi)):(y=g.x>_.x,y||(v-=math.pi));var s=y?"left":"right";m.setstyle({textposition:s,textrotation:-v,textorigin:"center",verticalalign:"middle"})}if(l.parentnode&&l.parentnode!==h){var m=i.__edge;m||(m=i.__edge=new qi({shape:zf(o,p,p),style:s({opacity:0,strokenoscale:!0},o.linestyle)})),ho(m,{shape:zf(o,f,g),style:{opacity:1}},a),n.add(m)}}function hf(t,e,i,n,a,o){for(var r,s=t.tree.getnodebydataindex(e),l=t.tree.root,u=s.getmodel(),o=ff(s,u,o),h=s.parentnode===l?s:s.parentnode||s;r=h.getlayout(),null==r;)h=h.parentnode===l?h:h.parentnode||h;ho(i,{position:[r.x+1,r.y+1]},a,function(){n.remove(i),t.setitemgraphicel(e,null)}),i.fadeout(null,{keeplabel:!0});var c=i.__edge;c&&ho(c,{shape:zf(o,r,r),style:{opacity:0}},a,function(){n.remove(c)})}function zf(t,e,i){var n,a,o,r,s,l,u,h,c=t.orient;if("radial"===t.layout){s=e.rawx,u=e.rawy,l=i.rawx,h=i.rawy;var d=df(s,u),f=df(s,u+(h-u)*t.curvature),p=df(l,h+(u-h)*t.curvature),g=df(l,h);return{x1:d.x,y1:d.y,x2:g.x,y2:g.y,cpx1:f.x,cpy1:f.y,cpx2:p.x,cpy2:p.y}}return s=e.x,u=e.y,l=i.x,h=i.y,("lr"===c||"rl"===c)&&(n=s+(l-s)*t.curvature,a=u,o=l+(s-l)*t.curvature,r=h),("tb"===c||"bt"===c)&&(n=s,a=u+(h-u)*t.curvature,o=l,r=h+(u-h)*t.curvature),{x1:s,y1:u,x2:l,y2:h,cpx1:n,cpy1:a,cpx2:o,cpy2:r}}function xf(t,e,i){var n=t.getzoom(),a=t.getcenter(),o=e.zoom,r=t.datatopoint(a);if(null!=e.dx&&null!=e.dy){r[0]-=e.dx,r[1]-=e.dy;var a=t.pointtodata(r);t.setcenter(a)}if(null!=o){if(i){var s=i.min||0,l=i.max||1/0;o=math.max(math.min(n*o,l),s)/n}t.scale[0]*=o,t.scale[1]*=o;var u=t.position,h=(e.originx-u[0])*(o-1),c=(e.originy-u[1])*(o-1);u[0]-=h,u[1]-=c,t.updatetransform();var a=t.pointtodata(r);t.setcenter(a),t.setzoom(o*n)}return{center:t.getcenter(),zoom:t.getzoom()}}function uf(t,e,i){for(var n,a=[t],o=[];n=a.pop();)if(o.push(n),n.isexpand){var r=n.children;if(r.length)for(var s=0;s=0;o--)n.push(a[o])}}function jf(t,e){var i=ff(t,e);t.layoutinfo=i;var n=t.get("layout"),a=0,o=0,r=null;"radial"===n?(a=2*math.pi,o=math.min(i.height,i.width)/2,r=cf(function(t,e){return(t.parentnode===e.parentnode?1:2)/t.depth})):(a=i.width,o=i.height,r=cf());var s=t.getdata().tree.root,l=s.children[0];if(l){lf(s),uf(l,uf,r),s.hiernode.modifier=-l.hiernode.prelim,yf(l,hf);var u=l,h=l,c=l;yf(l,function(t){var e=t.getlayout().x;eh.getlayout().x&&(h=t),t.depth>c.depth&&(c=t)});var d=u===h?1:r(u,h)/2,f=d-u.getlayout().x,p=0,g=0,m=0,v=0;if("radial"===n)p=a/(h.getlayout().x+d+f),g=o/(c.depth-1||1),yf(l,function(t){m=(t.getlayout().x+f)*p,v=(t.depth-1)*g;var e=df(m,v);t.setlayout({x:e.x,y:e.y,rawx:m,rawy:v},!0)});else{var y=t.getorient();"rl"===y||"lr"===y?(g=o/(h.getlayout().x+d+f),p=a/(c.depth-1||1),yf(l,function(t){v=(t.getlayout().x+f)*g,m="lr"===y?(t.depth-1)*p:a-(t.depth-1)*p,t.setlayout({x:m,y:v},!0)})):("tb"===y||"bt"===y)&&(p=a/(h.getlayout().x+d+f),g=o/(c.depth-1||1),yf(l,function(t){m=(t.getlayout().x+f)*p,v="tb"===y?(t.depth-1)*g:o-(t.depth-1)*g,t.setlayout({x:m,y:v},!0)}))}}}function qf(t,e,i){if(t&&u(e,t.type)>=0){var n=i.getdata().tree.root,a=t.targetnode;if("string"==typeof a&&(a=n.getnodebyid(a)),a&&n.contains(a))return{node:a};var o=t.targetnodeid;if(null!=o&&(a=n.getnodebyid(o)))return{node:a}}}function kf(t){for(var e=[];t;)t=t.parentnode,t&&e.push(t);return e.reverse()}function $f(t,e){var i=kf(t);return u(i,e)>=0}function jf(t,e){for(var i=[];t;){var n=t.dataindex;i.push({name:t.name,dataindex:n,value:e.getrawvalue(n)}),t=t.parentnode}return i.reverse(),i}function qf(t){var e=0;f(t.children,function(t){qf(t);var i=t.value;_(i)&&(i=i[0]),e+=i});var i=t.value;_(i)&&(i=i[0]),(null==i||isnan(i))&&(i=e),0>i&&(i=0),_(t.value)?t.value[0]=i:t.value=i}function tp(t,e){var i=e.get("color");if(i){t=t||[];var n;if(f(t,function(t){var e=new ir(t),i=e.get("color");(e.get("itemstyle.color")||i&&"none"!==i)&&(n=!0)}),!n){var a=t[0]||(t[0]={});a.color=i.slice()}return t}}function ep(t){this.group=new ss,t.add(this.group)}function ip(t,e,i,n,a,o){var r=[[a?t:t-hp,e],[t+i,e],[t+i,e+n],[a?t:t-hp,e+n]];return!o&&r.splice(2,0,[t+i+hp,e+n/2]),!a&&r.push([t,e+n/2]),r}function np(t,e,i){t.eventdata={componenttype:"series",componentsubtype:"treemap",componentindex:e.componentindex,seriesindex:e.componentindex,seriesname:e.name,seriestype:"treemap",selftype:"breadcrumb",nodedata:{dataindex:i&&i.dataindex,name:i&&i.name},treepathinfo:i&&jf(i,e)}}function ap(){var t,e=[],i={};return{add:function(t,n,a,o,r){return b(o)&&(r=o,o=0),i[t.id]?!1:(i[t.id]=1,e.push({el:t,target:n,time:a,delay:o,easing:r}),!0)},done:function(e){return t=e,this},start:function(){function n(){a--,a||(e.length=0,i={},t&&t())}for(var a=e.length,o=0,r=e.length;r>o;o++){var s=e[o];s.el.animateto(s.target,s.time,s.delay,s.easing,n)}return this}}}function op(){return{nodegroup:[],background:[],content:[]}}function rp(t,e,i,a,o,s,l,u,h,c){function d(e,i,n){i.dataindex=l.dataindex,i.seriesindex=t.seriesindex,i.setshape({x:0,y:0,width:_,height:w});var a=l.getvisual("bordercolor",!0),o=k.get("bordercolor");p(i,function(){var t=mp(l);t.fill=a;var e=sp(k);if(e.fill=o,n){var r=_-2*b;g(t,e,a,r,t,{x:b,y:0,width:r,height:t})}else t.text=e.text=null;i.setstyle(t),to(i,e)}),e.add(i)}function f(e,i){i.dataindex=l.dataindex,i.seriesindex=t.seriesindex;var n=math.max(_-2*b,0),a=math.max(w-2*b,0);i.culling=!0,i.setshape({x:b,y:b,width:n,height:a});var o=l.getvisual("color",!0);p(i,function(){var t=mp(l);t.fill=o;var e=sp(k);g(t,e,o,n,a),i.setstyle(t),to(i,e)}),e.add(i)}function p(t,e){s?!t.invisible&&s.push(t):(e(),t.__tmwillvisible||(t.invisible=!1))}function g(e,i,a,o,r,s){var u=l.getmodel(),h=d(t.getformattedlabel(l.dataindex,"normal",null,null,s?"upperlabel":"label"),u.get("name"));if(!s&&x.isleafroot){var c=t.get("drilldownicon",!0);h=c?c+" "+h:h}var d=u.getmodel(s?yp:mp),f=u.getmodel(s?xp:vp),p=d.getshallow("show");ko(e,i,d,f,{defaulttext:p?h:null,autocolor:a,isrecttext:!0}),s&&(e.textrect=n(s)),e.truncate=p&&d.get("ellipsis")?{outerwidth:o,outerheight:r,minchar:2}:null}function m(t,n,a,r){var s=null!=i&&i[t][i],l=o[t];return s?(i[t][i]=null,v(l,s,t)):s||(s=new n({z:sp(a,r)}),s.__tmdepth=a,s.__tmstoragename=t,y(l,s,t)),e[t][m]=s}function v(t,e,i){var n=t[m]={};n.old="nodegroup"===i?e.position.slice():r({},e.shape)}function y(t,e,i){var n=t[m]={},r=l.parentnode;if(r&&(!a||"drilldown"===a.direction)){var s=0,u=0,h=o.background[r.getrawindex()];!a&&h&&h.old&&(s=h.old.width,u=h.old.height),n.old="nodegroup"===i?[0,u]:{x:s,y:u,width:0,height:0}}n.fadein="nodegroup"!==i}if(l){var x=l.getlayout();if(x&&x.isinview){var _=x.width,w=x.height,b=x.borderwidth,s=x.invisible,m=l.getrawindex(),i=u&&u.getrawindex(),a=l.viewchildren,t=x.upperheight,c=a&&a.length,l=l.getmodel("itemstyle"),k=l.getmodel("emphasis.itemstyle"),p=m("nodegroup",dp);if(p){if(h.add(p),p.attr("position",[x.x||0,x.y||0]),p.__tmnodewidth=_,p.__tmnodeheight=w,x.isaboveviewroot)return p;var o=m("background",fp,c,wp);if(o&&d(p,o,c&&x.upperheight),!c){var n=m("content",fp,c,bp);n&&f(p,n)}return p}}}}function sp(t,e){var i=t*_p+e;return(i-1)/i}function lp(t){var e=t.piecelist;t.hasspecialvisual=!1,f(e,function(e,i){e.originindex=i,null!=e.visual&&(t.hasspecialvisual=!0)})}function up(t){var e=t.categories,i=t.visual,n=t.categorymap={};if(dp(e,function(t,e){n[t]=e}),!_(i)){var a=[];s(i)?dp(i,function(t,e){var i=n[e];a[null!=i?i:lp]=t}):a[lp]=i,i=yp(t,a)}for(var o=e.length-1;o>=0;o--)null==i[o]&&(delete n[e[o]],e.pop())}function hp(t,e){var i=t.visual,n=[];s(i)?dp(i,function(t){n.push(t)}):null!=i&&n.push(i);var a={color:1,symbol:1};e||1!==n.length||a.hasownproperty(t.type)||(n[1]=n[0]),yp(t,n)}function cp(t){return{applyvisual:function(e,i,n){e=this.mapvaluetovisual(e),n("color",t(i("color"),e))},_domap:mp([0,1])}}function dp(t){var e=this.option.visual;return e[math.round(ur(t,[0,1],[0,e.length-1],!0))]||{}}function fp(t){return function(e,i,n){n(t,this.mapvaluetovisual(e))}}function pp(t){var e=this.option.visual;return e[this.option.loop&&t!==lp?t%e.length:t]}function gp(){return this.option.visual[0]}function mp(t){return{linear:function(e){return ur(e,t,this.option.visual,!0)},category:pp,piecewise:function(e,i){var n=vp.call(this,i);return null==n&&(n=ur(e,t,this.option.visual,!0)),n},fixed:gp}}function vp(t){var e=this.option,i=e.piecelist;if(e.hasspecialvisual){var n=kp.findpieceindex(t,i),a=i[n];if(a&&a.visual)return a.visual[this.type]}}function yp(t,e){return t.visual=e,"color"===t.type&&(t.parsedvisual=p(e,function(t){return qe(t)})),e}function xp(t,e,i){return t?i>=e:i>e}function _p(t,e,i,n,a,o){var r=t.getmodel(),s=t.getlayout();if(s&&!s.invisible&&s.isinview){var l,u=t.getmodel(zp),h=i[t.depth],c=wp(u,e,h,n),d=u.get("bordercolor"),p=u.get("bordercolorsaturation");null!=p&&(l=bp(c,t),d=sp(p,l)),t.setvisual("bordercolor",d);var g=t.viewchildren;if(g&&g.length){var m=ip(t,r,s,u,c,g);f(g,function(t,e){if(t.depth>=a.length||t===a[t.depth]){var s=tp(r,c,t,e,m,o);_p(t,s,i,n,a,o)}})}else l=bp(c,t),t.setvisual("color",l)}}function wp(t,e,i,n){var a=r({},e);return f(["color","coloralpha","colorsaturation"],function(o){var r=t.get(o,!0);null==r&&i&&(r=i[o]),null==r&&(r=e[o]),null==r&&(r=n.get(o)),null!=r&&(a[o]=r)}),a}function bp(t){var e=mp(t,"color");if(e){var i=mp(t,"coloralpha"),n=mp(t,"colorsaturation");return n&&(e=ii(e,null,null,n)),i&&(e=ni(e,i)),e}}function sp(t,e){return null!=e?ii(e,null,null,t):null}function mp(t,e){var i=t[e];return null!=i&&"none"!==i?i:void 0}function ip(t,e,i,n,a,o){if(o&&o.length){var r=ap(e,"color")||null!=a.color&&"none"!==a.color&&(ap(e,"coloralpha")||ap(e,"colorsaturation"));if(r){var s=e.get("visualmin"),l=e.get("visualmax"),u=i.dataextent.slice();null!=s&&su[1]&&(u[1]=l);var h=e.get("colormappingby"),c={type:r.name,dataextent:u,visual:r.range};"color"!==c.type||"index"!==h&&"id"!==h?c.mappingmethod="linear":(c.mappingmethod="category",c.loop=!0);var d=new kp(c);return d.__drcolormappingby=h,d}}}function ap(t,e){var i=t.get(e);return np(i)&&i.length?{name:e,range:i}:null}function tp(t,e,i,n,a,o){var s=r({},e);if(a){var l=a.type,u="color"===l&&a.__drcolormappingby,h="index"===u?n:"id"===u?o.mapidtoindex(i.getid()):i.getvalue(t.get("visualdimension"));s[l]=a.mapvaluetovisual(h)}return s}function dp(t,e,i,n){var a,o;if(!t.isremoved()){var r=t.getlayout();a=r.width,o=r.height;var s=t.getmodel(),l=s.get(fp),u=s.get(wp)/2,h=bp(s),c=math.max(l,h),d=l-u,f=c-u,s=t.getmodel();t.setlayout({borderwidth:l,upperheight:c,upperlabelheight:h},!0),a=ep(a-2*d,0),o=ep(o-d-f,0);var p=a*o,g=cp(t,s,p,e,i,n);if(g.length){var m={x:d,y:f,width:a,height:o},v=bp(a,o),y=1/0,x=[];x.area=0;for(var _=0,w=g.length;w>_;){var b=g[_];x.push(b),x.area+=b.getlayout().area;var s=op(x,v,e.squareratio);y>=s?(_++,y=s):(x.area-=x.pop().getlayout().area,np(x,v,m,u,!1),v=bp(m.width,m.height),x.length=x.area=0,y=1/0)}if(x.length&&np(x,v,m,u,!0),!i){var m=s.get("childrenvisiblemin");null!=m&&m>p&&(i=!0)}for(var _=0,w=g.length;w>_;_++)dp(g[_],e,i,n+1)}}}function cp(t,e,i,n,a,o){var r=t.children||[],s=n.sort;"asc"!==s&&"desc"!==s&&(s=null);var l=null!=n.leafdepth&&n.leafdepth<=o;if(a&&!l)return t.viewchildren=[];r=m(r,function(t){return!t.isremoved()}),kp(r,s);var u=pp(e,r,s);if(0===u.sum)return t.viewchildren=[];if(u.sum=lp(e,i,u.sum,s,r),0===u.sum)return t.viewchildren=[];for(var h=0,c=r.length;c>h;h++){var d=r[h].getvalue()/u.sum*i;r[h].setlayout({area:d})}return l&&(r.length&&t.setlayout({isleafroot:!0},!0),r.length=0),t.viewchildren=r,t.setlayout({dataextent:u.dataextent},!0),r}function lp(t,e,i,n,a){if(!n)return i;for(var o=t.get("visiblemin"),r=a.length,s=r,l=r-1;l>=0;l--){var u=a["asc"===n?r-l-1:l].getvalue();o>u/i*e&&(s=l,i-=u)}return"asc"===n?a.splice(0,r-s):a.splice(s,r-s),i}function kp(t,e){return e&&t.sort(function(t,i){var n="asc"===e?t.getvalue()-i.getvalue():i.getvalue()-t.getvalue();return 0===n?"asc"===e?t.dataindex-i.dataindex:i.dataindex-t.dataindex:n}),t}function pp(t,e,i){for(var n=0,a=0,o=e.length;o>a;a++)n+=e[a].getvalue();var r,s=t.get("visualdimension");if(e&&e.length)if("value"===s&&i)r=[e[e.length-1].getvalue(),e[0].getvalue()],"asc"===i&&r.reverse();else{var r=[1/0,-1/0];gp(e,function(t){var e=t.getvalue(s);er[1]&&(r[1]=e)})}else r=[0/0,0/0];return{sum:n,dataextent:r}}function op(t,e,i){for(var n,a=0,o=1/0,r=0,s=t.length;s>r;r++)n=t[r].getlayout().area,n&&(o>n&&(o=n),n>a&&(a=n));var l=t.area*t.area,u=e*e*i;return l?ep(u*a/l,l/(u*o)):1/0}function np(t,e,i,n,a){var o=e===i.width?0:1,r=1-o,s=["x","y"],l=["width","height"],u=i[s[o]],h=e?t.area/e:0;(a||h>i[l[r]])&&(h=i[l[r]]);for(var c=0,d=t.length;d>c;c++){var f=t[c],p={},g=h?f.getlayout().area/h:0,m=p[l[r]]=ep(h-2*n,0),v=i[s[o]]+i[l[o]]-u,y=c===d-1||g>v?v:g,x=p[l[o]]=ep(y-2*n,0);p[s[r]]=i[s[r]]+bp(n,m/2),p[s[o]]=u+bp(n,x/2),u+=y,f.setlayout(p,!0)}i[s[r]]+=h,i[l[r]]-=h}function zp(t,e,i,n,a){var o=(e||{}).node,r=[n,a];if(!o||o===i)return r;for(var s,l=n*a,u=l*t.option.zoomtonoderatio;s=o.parentnode;){for(var h=0,c=s.children,d=0,f=c.length;f>d;d++)h+=c[d].getvalue();var p=o.getvalue();if(0===p)return r;u*=h/p;var g=s.getmodel(),m=g.get(fp),v=math.max(m,bp(g,m));u+=4*m*m+(3*m+v)*math.pow(u,.5),u>ca&&(u=ca),o=s}l>u&&(u=l);var y=math.pow(u/l,.5);return[n*y,a*y]}function rp(t,e,i){if(e)return{x:e.x,y:e.y};var n={x:0,y:0};if(!i)return n;var a=i.node,o=a.getlayout();if(!o)return n;for(var r=[o.width/2,o.height/2],s=a;s;){var l=s.getlayout();r[0]+=l.x,r[1]+=l.y,s=s.parentnode}return{x:t.width/2-r[0],y:t.height/2-r[1]}}function ep(t,e,i,n,a){var o=t.getlayout(),r=i[a],s=r&&r===t;if(!(r&&!s||a===i.length&&t!==n)){t.setlayout({isinview:!0,invisible:!s&&!e.intersect(o),isaboveviewroot:s},!0);var l=new wi(e.x-o.x,e.y-o.y,e.width,e.height);gp(t.viewchildren||[],function(t){ep(t,l,i,n,a+1)})}}function bp(t){return t.get(hp)?t.get(zp):0}function vp(t){var e=0;f(t.children,function(t){vp(t);var i=t.value;_(i)&&(i=i[0]),e+=i});var i=t.value;_(i)&&(i=i[0]),(null==i||isnan(i))&&(i=e),0>i&&(i=0),_(t.value)?t.value[0]=i:t.value=i}function gp(t,e,i){function n(){r.ignore=r.hoverignore}function a(){r.ignore=r.normalignore}ss.call(this);var o=new fi({z2:yp});o.seriesindex=e.seriesindex;var r=new ei({z2:jp,silent:t.getmodel("label").get("silent")});this.add(o),this.add(r),this.updatedata(!0,t,"normal",e,i),this.on("emphasis",n).on("normal",a).on("mouseover",n).on("mouseout",a)}function fp(t,e,i){var n=t.getvisual("color"),a=t.getvisual("visualmeta");a&&0!==a.length||(n=null);var o=t.getmodel("itemstyle").get("color");if(o)return o;if(n)return n;if(0===t.depth)return i.option.color[0];var r=i.option.color.length;return o=i.option.color[wp(t)%r]}function wp(t){for(var e=t;e.depth>1;)e=e.parentnode;var i=t.getancestors()[0];return u(i.children,e)}function hp(t,e,i){return i===up.none?!1:i===up.self?t===e:i===up.ancestor?t===e||t.isancestorof(e):t===e||t.isdescendantof(e)}function zp(t,e,i){var n=e.getdata();n.setitemvisual(t.dataindex,"color",i)}function xp(t,e){var i=t.children||[];t.children=up(i,e),i.length&&f(t.children,function(t){xp(t,e)})}function up(t,e){if("function"==typeof e)return t.sort(e);var i="asc"===e;return t.sort(function(t,e){var n=(t.getvalue()-e.getvalue())*(i?1:-1);return 0===n?(t.dataindex-e.dataindex)*(i?-1:1):n})}function yp(t){for(var e,i=0;i1?(f.width=l,f.height=l/c):(f.height=l,f.width=l*c),f.y=s[1]-f.height/2,f.x=s[0]-f.width/2}else o=t.getboxlayoutparams(),o.aspect=c,f=vr(o,{width:u,height:h});this.setviewrect(f.x,f.y,f.width,f.height),this.setcenter(t.get("center")),this.setzoom(t.get("zoom"))}function rg(t,e){f(e.get("geocoord"),function(e,i){t.addgeocoord(i,e)})}function sg(t,e){var i={};return f(t,function(t){t.each(t.mapdimension("value"),function(e,n){var a="ec-"+t.getname(n);i[a]=i[a]||[],isnan(e)||i[a].push(e)})}),t[0].map(t[0].mapdimension("value"),function(n,a){for(var o="ec-"+t[0].getname(a),r=0,s=1/0,l=-1/0,u=i[o].length,h=0;u>h;h++)s=math.min(s,i[o][h]),l=math.max(l,i[o][h]),r+=i[o][h];var c;return c="min"===e?s:"max"===e?l:"average"===e?r/u:r,0===u?0/0:c})}function lg(t){var e=t.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(t.data=p(e,function(t){var e=[t[0].coord,t[1].coord],i={coords:e};return t[0].name&&(i.fromname=t[0].name),t[1].name&&(i.toname=t[1].name),o([i,t[0],t[1]])}))}function ug(t){return isnan(+t.cpx1)||isnan(+t.cpy1)}function hg(t){return"_"+t+"type"}function cg(t,e,i){var n=e.getitemvisual(i,"color"),a=e.getitemvisual(i,t),o=e.getitemvisual(i,t+"size");if(a&&"none"!==a){_(o)||(o=[o,o]);var r=eh(a,-o[0]/2,-o[1]/2,o[0],o[1],n);return r.name=t,r}}function dg(t){var e=new po({name:"line",subpixeloptimize:!0});return fg(e.shape,t),e}function fg(t,e){t.x1=e[0][0],t.y1=e[0][1],t.x2=e[1][0],t.y2=e[1][1],t.percent=1;var i=e[2];i?(t.cpx1=i[0],t.cpy1=i[1]):(t.cpx1=0/0,t.cpy1=0/0)}function pg(){var t=this,e=t.childofname("fromsymbol"),i=t.childofname("tosymbol"),n=t.childofname("label");if(e||i||!n.ignore){for(var a=1,o=this.parent;o;)o.scale&&(a/=o.scale[0]),o=o.parent;var r=t.childofname("line");if(this.__dirty||r.__dirty){var s=r.shape.percent,l=r.pointat(0),u=r.pointat(s),h=y([],u,l);if(te(h,h),e){e.attr("position",l);var c=r.tangentat(0);e.attr("rotation",math.pi/2-math.atan2(c[1],c[0])),e.attr("scale",[a*s,a*s])}if(i){i.attr("position",u);var c=r.tangentat(1);i.attr("rotation",-math.pi/2-math.atan2(c[1],c[0])),i.attr("scale",[a*s,a*s])}if(!n.ignore){n.attr("position",u);var d,f,p,g=5*a;if("end"===n.__position)d=[h[0]*g+u[0],h[1]*g+u[1]],f=h[0]>.8?"left":h[0]<-.8?"right":"center",p=h[1]>.8?"top":h[1]<-.8?"bottom":"middle";else if("middle"===n.__position){var m=s/2,c=r.tangentat(m),v=[c[1],-c[0]],y=r.pointat(m);v[1]>0&&(v[0]=-v[0],v[1]=-v[1]),d=[y[0]+v[0]*g,y[1]+v[1]*g],f="center",p="bottom";var x=-math.atan2(c[1],c[0]);u[0].8?"right":h[0]<-.8?"left":"center",p=h[1]>.8?"bottom":h[1]<-.8?"top":"middle";n.attr({style:{textverticalalign:n.__verticalalign||p,textalign:n.__textalign||f},position:d,scale:[a,a]})}}}}function gg(t,e,i){ss.call(this),this._createline(t,e,i)}function mg(t){this._ctor=t||gg,this.group=new ss}function vg(t,e,i,n){var a=e.getitemlayout(i);if(wg(a)){var o=new t._ctor(e,i,n);e.setitemgraphicel(i,o),t.group.add(o)}}function yg(t,e,i,n,a,o){var r=e.getitemgraphicel(n);return wg(i.getitemlayout(a))?(r?r.updatedata(i,a,o):r=new t._ctor(i,a,o),i.setitemgraphicel(a,r),void t.group.add(r)):void t.group.remove(r)}function xg(t){var e=t.hostmodel;return{linestyle:e.getmodel("linestyle").getlinestyle(),hoverlinestyle:e.getmodel("emphasis.linestyle").getlinestyle(),labelmodel:e.getmodel("label"),hoverlabelmodel:e.getmodel("emphasis.label")}}function _g(t){return isnan(t[0])||isnan(t[1])}function wg(t){return!_g(t[0])&&!_g(t[1])}function bg(t,e,i){ss.call(this),this.add(this.createline(t,e,i)),this._updateeffectsymbol(t,e)}function sg(t,e,i){ss.call(this),this._createpolyline(t,e,i)}function mg(t,e,i){bg.call(this,t,e,i),this._lastframe=0,this._lastframepercent=0}function ig(){this.group=new ss}function ag(t){return t instanceof array||(t=[t,t]),t}function tg(t){return"_ec_"+t}function dg(t,e){this.id=null==t?"":t,this.inedges=[],this.outedges=[],this.edges=[],this.hostgraph,this.dataindex=null==e?-1:e}function cg(t,e,i){this.node1=t,this.node2=e,this.dataindex=null==i?-1:i}function lg(t){var e=t.coordinatesystem;if("view"!==e.type)return 1;var i=t.option.nodescaleratio,n=e.scale,a=n&&n[0]||1,o=e.getzoom(),r=(o-1)*i+1;return r/a}function kg(t){var e=t.getvisual("symbolsize");return e instanceof array&&(e=(e[0]+e[1])/2),+e}function pg(t,e,i){for(var n,a=t[0],o=t[1],r=t[2],s=1/0,l=i*i,u=.1,h=.1;.9>=h;h+=.1){qo[0]=jo(a[0],o[0],r[0],h),qo[1]=jo(a[1],o[1],r[1],h);var c=tn(qo(qo,e)-l);s>c&&(s=c,n=h)}for(var d=0;32>d;d++){var f=n+u;ko[0]=jo(a[0],o[0],r[0],n),ko[1]=jo(a[1],o[1],r[1],n),$o[0]=jo(a[0],o[0],r[0],f),$o[1]=jo(a[1],o[1],r[1],f);var c=qo(ko,e)-l;if(tn(c)<.01)break;var p=qo($o,e)-l;u/=2,0>c?p>=0?n+=u:n-=u:p>=0?n-=u:n+=u}return n}function og(t,e){var i=t.getvisual("opacity");return null!=i?i:t.getmodel().get(e)}function ng(t,e,i){var n=t.getgraphicel(),a=og(t,e);null!=i&&(null==a&&(a=1),a*=i),n.downplay&&n.downplay(),n.traverse(function(t){if(!t.isgroup){var e=t.linelabeloriginalopacity;(null==e||null!=i)&&(e=a),t.setstyle("opacity",e)}})}function zg(t,e){var i=og(t,e),n=t.getgraphicel();n.traverse(function(t){!t.isgroup&&t.setstyle("opacity",i)}),n.highlight&&n.highlight()}function rg(t){return t instanceof array||(t=[t,t]),t}function eg(t){var e=t.coordinatesystem;if(!e||"view"===e.type){var i=t.getgraph();i.eachnode(function(t){var e=t.getmodel();t.setlayout([+e.get("x"),+e.get("y")])}),bg(i)}}function bg(t){t.eachedge(function(t){var e=t.getmodel().get("linestyle.curveness")||0,i=h(t.node1.getlayout()),n=h(t.node2.getlayout()),a=[i,n];+e&&a.push([(i[0]+n[0])/2-(i[1]-n[1])*e,(i[1]+n[1])/2-(n[0]-i[0])*e]),t.setlayout(a)})}function vg(t,e){var i=t.coordinatesystem;if(!i||"view"===i.type){var n=i.getboundingrect(),a=t.getdata(),o=a.graph,r=n.width/2+n.x,s=n.height/2+n.y,l=math.min(n.width,n.height)/2,u=a.count();a.setlayout({cx:r,cy:s}),u&&(fn[e](t,i,o,a,l,r,s,u),o.eachedge(function(t){var e,i=t.getmodel().get("linestyle.curveness")||0,n=h(t.node1.getlayout()),a=h(t.node2.getlayout()),o=(n[0]+a[0])/2,l=(n[1]+a[1])/2;+i&&(i*=3,e=[r*i+o*(1-i),s*i+l*(1-i)]),t.setlayout([n,a,e])}))}}function gg(t,e,i){for(var n=i.rect,a=n.width,o=n.height,r=[n.x+a/2,n.y+o/2],s=null==i.gravity?.1:i.gravity,l=0;lo;o++){var p=t[o];p.fixed||(y(n,r,p.p),gn(p.p,p.p,n,s*h))}for(var o=0;a>o;o++)for(var u=t[o],g=o+1;a>g;g++){var c=t[g];y(n,c.p,u.p);var d=j(n);0===d&&(z(n,math.random()-.5,math.random()-.5),d=1);var m=(u.rep+c.rep)/d/d;!u.fixed&&gn(u.pp,u.pp,n,m),!c.fixed&&gn(c.pp,c.pp,n,-m)}for(var v=[],o=0;a>o;o++){var p=t[o];p.fixed||(y(v,p.p,p.pp),gn(p.p,p.p,v,h),w(p.pp,p.p))}h=.992*h,i&&i(t,e,.01>h)}}}function fg(t,e,i){var n=t.getboxlayoutparams();return n.aspect=i,vr(n,{width:e.getwidth(),height:e.getheight()})}function wg(t,e,i,n,a){var o=t.ends,r=new wn({shape:{points:a?zg(o,n,t):o}});return hg(t,r,e,i,a),r}function hg(t,e,i,n,a){var o=i.hostmodel,r=_a[a?"initprops":"updateprops"];r(e,{shape:{points:t.ends}},o,n);var s=i.getitemmodel(n),l=s.getmodel(xn),u=i.getitemvisual(n,"color"),h=l.getitemstyle(["bordercolor"]);h.stroke=u,h.strokenoscale=!0,e.usestyle(h),e.z2=100;var c=s.getmodel(_n).getitemstyle();to(e,c)}function zg(t,e,i){return p(t,function(t){return t=t.slice(),t[e]=i.initbaseline,t})}function xg(t){var e=[],i=[];return t.eachseriesbytype("boxplot",function(t){var n=t.getbaseaxis(),a=u(i,n);0>a&&(a=i.length,i[a]=n,e[a]={axis:n,seriesmodels:[]}),e[a].seriesmodels.push(t)}),e}function ug(t){var e,i,n=t.axis,a=t.seriesmodels,o=a.length,r=t.boxwidthlist=[],s=t.boxoffsetlist=[],l=[];if("category"===n.type)i=n.getbandwidth();else{var u=0;mn(a,function(t){u=math.max(u,t.getdata().count())}),e=n.getextent(),math.abs(e[1]-e[0])/u}mn(a,function(t){var e=t.get("boxwidth");_(e)||(e=[e,e]),l.push([hr(e[0],i)||0,hr(e[1],i)||0])});var h=.8*i-2,c=h/o*.3,d=(h-c*(o-1))/o,f=d/2-h/2;mn(a,function(t,e){s.push(f),f+=c+d,r.push(math.min(math.max(d,l[e][0]),l[e][1]))})}function yg(t,e,i){function n(t,i,n){var a=s.get(i,n),o=[];o[u]=t,o[h]=a;var l;return isnan(t)||isnan(a)?l=[0/0,0/0]:(l=r.datatopoint(o),l[u]+=e),l}function a(t,e,i){var n=e.slice(),a=e.slice();n[u]+=l,a[u]-=l,i?t.push(n,a):t.push(a,n)}function o(t,e){var i=e.slice(),n=e.slice();i[u]-=l,n[u]+=l,t.push(i,n)}var r=t.coordinatesystem,s=t.getdata(),l=i/2,u="horizontal"===t.get("layout")?0:1,h=1-u,c=["x","y"],d=s.mapdimension(c[u]),f=s.mapdimension(c[h],!0);if(!(null==d||f.length<5))for(var p=0;p0?-1:0>i?1:e?-1:1}}function $g(t,e){return math.min(null!=e[1]?e[1]:1/0,math.max(null!=e[0]?e[0]:-1/0,t))}function jg(t,e,i){this._axesmap=b(),this._axeslayout={},this.dimensions=t.dimensions,this._rect,this._model=t,this._init(t,e,i)}function qg(t,e){return ln(kn(t,e[0]),e[1])}function tm(t,e){var i=e.layoutlength/(e.axiscount-1);return{position:i*t,axisnameavailablewidth:i,axislabelshow:!0}}function em(t,e){var i,n,a=e.layoutlength,o=e.axisexpandwidth,r=e.axiscount,s=e.axiscollapsewidth,l=e.wininnerindices,u=s,h=!1;return tun}function ym(t){var e=t.length-1;return 0>e&&(e=0),[t[0],t[e]]}function xm(t,e,i,n){var a=new ss;return a.add(new qi({name:"main",style:sm(i),silent:!0,draggable:!0,cursor:"move",drift:vn(t,e,a,"nswe"),ondragend:vn(mm,e,{isend:!0})})),gn(n,function(i){a.add(new qi({name:i,style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:vn(t,e,a,i),ondragend:vn(mm,e,{isend:!0})}))}),a}function _m(t,e,i,n){var a=n.brushstyle.linewidth||0,o=hn(a,yn),r=i[0][0],s=i[1][0],l=r-a/2,u=s-a/2,h=i[0][1],c=i[1][1],d=h-o+a/2,f=c-o+a/2,p=h-r,g=c-s,m=p+a,v=g+a;bm(t,e,"main",r,s,p,g),n.transformable&&(bm(t,e,"w",l,u,o,v),bm(t,e,"e",d,u,o,v),bm(t,e,"n",l,u,m,o),bm(t,e,"s",l,f,m,o),bm(t,e,"nw",l,u,o,o),bm(t,e,"ne",d,u,o,o),bm(t,e,"sw",l,f,o,o),bm(t,e,"se",d,f,o,o))}function wm(t,e){var i=e.__brushoption,n=i.transformable,a=e.childat(0);a.usestyle(sm(i)),a.attr({silent:!n,cursor:n?"move":"default"}),gn(["w","e","n","s","se","sw","ne","nw"],function(i){var a=e.childofname(i),o=am(t,i);a&&a.attr({silent:!n,invisible:!n,cursor:n?kn[o]+"-resize":null})})}function bm(t,e,i,n,a,o,r){var s=e.childofname(i);s&&s.setshape(km(lm(t,e,[[n,a],[n+o,a+r]])))}function sm(t){return s({strokenoscale:!0},t.brushstyle)}function mm(t,e,i,n){var a=[wn(t,i),wn(e,n)],o=[hn(t,i),hn(e,n)];return[[a[0],o[0]],[a[1],o[1]]]}function im(t){return xo(t.group)}function am(t,e){if(e.length>1){e=e.split("");var i=[am(t,e[0]),am(t,e[1])];return("e"===i[0]||"w"===i[0])&&i.reverse(),i.join("")}var n={w:"left",e:"right",n:"top",s:"bottom"},a={left:"w",right:"e",top:"n",bottom:"s"},i=yo(n[e],im(t));return a[i]}function tm(t,e,i,n,a,o,r){var s=n.__brushoption,l=t(s.range),u=cm(i,o,r);gn(a.split(""),function(t){var e=qn[t];l[e[0]][e[1]]+=u[e[0]]}),s.range=e(mm(l[0][0],l[1][0],l[0][1],l[1][1])),cm(i,n),mm(i,{isend:!1})}function dm(t,e,i,n){var a=e.__brushoption.range,o=cm(t,i,n);gn(a,function(t){t[0]+=o[0],t[1]+=o[1]}),cm(t,e),mm(t,{isend:!1})}function cm(t,e,i){var n=t.group,a=n.transformcoordtolocal(e,i),o=n.transformcoordtolocal(0,0);return[a[0]-o[0],a[1]-o[1]]}function lm(t,e,i){var a=pm(t,e);return a&&a!==!0?a.clippath(i,t._transform):n(i)}function km(t){var e=wn(t[0][0],t[1][0]),i=wn(t[0][1],t[1][1]),n=hn(t[0][0],t[1][0]),a=hn(t[0][1],t[1][1]);return{x:e,y:i,width:n-e,height:a-i}}function pm(t,e,i){if(t._brushtype){var n=t._zr,a=t._covers,o=fm(t,e,i);if(!t._dragging)for(var r=0;rr;r++)a[r]=r;return"function"==typeof e?a.sort(e):"none"!==e&&a.sort(function(t,e){return o?n[t]-n[e]:n[e]-n[t]}),a}function rv(t){t.each(function(e){var i,n,a,o,r=t.getitemmodel(e),s=r.getmodel("label"),l=s.get("position"),u=r.getmodel("labelline"),h=t.getitemlayout(e),c=h.points,d="inner"===l||"inside"===l||"center"===l||"insideleft"===l||"insideright"===l;if(d)"insideleft"===l?(n=(c[0][0]+c[3][0])/2+5,a=(c[0][1]+c[3][1])/2,i="left"):"insideright"===l?(n=(c[1][0]+c[2][0])/2-5,a=(c[1][1]+c[2][1])/2,i="right"):(n=(c[0][0]+c[1][0]+c[2][0]+c[3][0])/4,a=(c[0][1]+c[1][1]+c[2][1]+c[3][1])/4,i="center"),o=[[n,a],[n,a]];else{var f,p,g,m=u.get("length");"left"===l?(f=(c[3][0]+c[0][0])/2,p=(c[3][1]+c[0][1])/2,g=f-m,n=g-5,i="right"):"right"===l?(f=(c[1][0]+c[2][0])/2,p=(c[1][1]+c[2][1])/2,g=f+m,n=g+5,i="left"):"righttop"===l?(f=c[1][0],p=c[1][1],g=f+m,n=g+5,i="top"):"rightbottom"===l?(f=c[2][0],p=c[2][1],g=f+m,n=g+5,i="bottom"):"lefttop"===l?(f=c[0][0],p=c[1][1],g=f-m,n=g-5,i="right"):"leftbottom"===l?(f=c[3][0],p=c[2][1],g=f-m,n=g-5,i="right"):(f=(c[1][0]+c[2][0])/2,p=(c[1][1]+c[2][1])/2,g=f+m,n=g+5,i="left");var v=p;o=[[f,p],[g,v]],a=v}h.label={linepoints:o,x:n,y:a,verticalalign:"middle",textalign:i,inside:d}})}function sv(t,e){return t.getvisual("opacity")||t.getmodel().get(e)}function lv(t,e,i){var n=t.getgraphicel(),a=sv(t,e);null!=i&&(null==a&&(a=1),a*=i),n.downplay&&n.downplay(),n.traverse(function(t){"group"!==t.type&&t.setstyle("opacity",a)})}function uv(t,e){var i=sv(t,e),n=t.getgraphicel();n.highlight&&n.highlight(),n.traverse(function(t){"group"!==t.type&&t.setstyle("opacity",i)})}function hv(t,e,i){var n=new qi({shape:{x:t.x-10,y:t.y-10,width:0,height:t.height+20}});return zo(n,{shape:{width:t.width+20,height:t.height+20}},e,i),n}function cv(t,e){return vr(t.getboxlayoutparams(),{width:e.getwidth(),height:e.getheight()})}function dv(t,e,i,n,a,o,r,s,l){pv(t,e,i,a,o,s,l),xv(t,e,o,a,n,r,s),lv(t,s)}function fv(t){f(t,function(t){var e=dv(t.outedges,tv),i=dv(t.inedges,tv),n=math.max(e,i);t.setlayout({value:n},!0)})}function pv(t,e,i,n,a,o,r){for(var s=[],l=[],u=[],h=[],c=0,d=0,f=0;f=0;y&&v.depth>p&&(p=v.depth),m.setlayout({depth:y?v.depth:c},!0),"vertical"===o?m.setlayout({dy:i},!0):m.setlayout({dx:i},!0);for(var x=0;xc-1?p:c-1;r&&"left"!==r&&mv(t,r,o,m);var d="vertical"===o?(a-i)/m:(n-i)/m;yv(t,d,o)}function gv(t){var e=t.hostgraph.data.getrawdataitem(t.dataindex);return null!=e.depth&&e.depth>=0}function mv(t,e,i,n){if("right"===e){for(var a=[],o=t,r=0;o.length;){for(var s=0;s0;o--)l*=.99,sv(s,l,r),bv(s,a,i,n,r),cv(s,l,r),bv(s,a,i,n,r)}function _v(t,e){var i=[],n="vertical"===e?"y":"x",a=ia(t,function(t){return t.getlayout()[n]});return a.keys.sort(function(t,e){return t-e}),f(a.keys,function(t){i.push(a.buckets.get(t))}),i}function wv(t,e,i,n,a,o){var r=1/0;f(t,function(t){var e=t.length,s=0;f(t,function(t){s+=t.getlayout().value});var l="vertical"===o?(n-(e-1)*a)/s:(i-(e-1)*a)/s;r>l&&(r=l)}),f(t,function(t){f(t,function(t,e){var i=t.getlayout().value*r;"vertical"===o?(t.setlayout({x:e},!0),t.setlayout({dx:i},!0)):(t.setlayout({y:e},!0),t.setlayout({dy:i},!0))})}),f(e,function(t){var e=+t.getvalue()*r;t.setlayout({dy:e},!0)})}function bv(t,e,i,n,a){var o="vertical"===a?"x":"y";f(t,function(t){t.sort(function(t,e){return t.getlayout()[o]-e.getlayout()[o]});for(var r,s,l,u=0,h=t.length,c="vertical"===a?"dx":"dy",d=0;h>d;d++)s=t[d],l=u-s.getlayout()[o],l>0&&(r=s.getlayout()[o]+l,"vertical"===a?s.setlayout({x:r},!0):s.setlayout({y:r},!0)),u=s.getlayout()[o]+s.getlayout()[c]+e;var f="vertical"===a?n:i;if(l=u-e-f,l>0)for(r=s.getlayout()[o]-l,"vertical"===a?s.setlayout({x:r},!0):s.setlayout({y:r},!0),u=r,d=h-2;d>=0;--d)s=t[d],l=s.getlayout()[o]+s.getlayout()[c]+e-u,l>0&&(r=s.getlayout()[o]-l,"vertical"===a?s.setlayout({x:r},!0):s.setlayout({y:r},!0)),u=s.getlayout()[o]})}function sv(t,e,i){f(t.slice().reverse(),function(t){f(t,function(t){if(t.outedges.length){var n=dv(t.outedges,mv,i)/dv(t.outedges,tv,i);if("vertical"===i){var a=t.getlayout().x+(n-av(t,i))*e;t.setlayout({x:a},!0)}else{var o=t.getlayout().y+(n-av(t,i))*e;t.setlayout({y:o},!0)}}})})}function mv(t,e){return av(t.node2,e)*t.getvalue()}function iv(t,e){return av(t.node1,e)*t.getvalue()}function av(t,e){return"vertical"===e?t.getlayout().x+t.getlayout().dx/2:t.getlayout().y+t.getlayout().dy/2}function tv(t){return t.getvalue()}function dv(t,e,i){for(var n=0,a=t.length,o=-1;++o=f&&((r>f||d>=0&&0>s)&&(r=f,s=d,a=l,o.length=0),tz(u,function(t){o.push({seriesindex:e.seriesindex,dataindexinside:t,dataindex:e.getdata().getrawindex(t)})}))}}),{payloadbatch:o,snaptovalue:a}}function ev(t,e,i,n){t[e.key]={value:i,payloadbatch:n}}function bv(t,e,i,n){var a=i.payloadbatch,o=e.axis,r=o.model,s=e.axispointermodel;if(e.triggertooltip&&a.length){var l=e.coordsys.model,u=qc(l),h=t.map[u];h||(h=t.map[u]={coordsysid:l.id,coordsysindex:l.componentindex,coordsystype:l.type,coordsysmaintype:l.maintype,databyaxis:[]},t.list.push(h)),h.databyaxis.push({axisdim:o.dim,axisindex:r.componentindex,axistype:r.type,axisid:r.id,value:n,valuelabelopt:{precision:s.get("label.precision"),formatter:s.get("label.formatter")},seriesdataindices:a.slice()})}}function vv(t,e,i){var n=i.axesinfo=[];tz(e,function(e,i){var a=e.axispointermodel.option,o=t[i];o?(!e.usehandle&&(a.status="show"),a.value=o.value,a.seriesdataindices=(o.payloadbatch||[]).slice()):!e.usehandle&&(a.status="hide"),"show"===a.status&&n.push({axisdim:e.axis.dim,axisindex:e.axis.model.componentindex,value:a.value})})}function gv(t,e,i,n){if(zv(e)||!t.list.length)return void n({type:"hidetip"});var a=((t.list[0].databyaxis[0]||{}).seriesdataindices||[])[0]||{};n({type:"showtip",escapeconnect:!0,x:e[0],y:e[1],tooltipoption:i.tooltipoption,position:i.position,dataindexinside:a.dataindexinside,dataindex:a.dataindex,seriesindex:a.seriesindex,databycoordsys:t.list})}function fv(t,e,i){var n=i.getzr(),a="axispointerlasthighlights",o=cz(n)[a]||{},r=cz(n)[a]={};tz(t,function(t){var e=t.axispointermodel.option;"show"===e.status&&tz(e.seriesdataindices,function(t){var e=t.seriesindex+" | "+t.dataindex;r[e]=t})});var s=[],l=[];f(o,function(t,e){!r[e]&&l.push(t)}),f(r,function(t,e){!o[e]&&s.push(t)}),l.length&&i.dispatchaction({type:"downplay",escapeconnect:!0,batch:l}),s.length&&i.dispatchaction({type:"highlight",escapeconnect:!0,batch:s})}function wv(t,e){for(var i=0;i<(t||[]).length;i++){var n=t[i];if(e.axis.dim===n.axisdim&&e.axis.model.componentindex===n.axisindex)return n}}function hv(t){var e=t.axis.model,i={},n=i.axisdim=t.axis.dim;return i.axisindex=i[n+"axisindex"]=e.componentindex,i.axisname=i[n+"axisname"]=e.name,i.axisid=i[n+"axisid"]=e.id,i}function zv(t){return!t||null==t[0]||isnan(t[0])||null==t[1]||isnan(t[1])}function xv(t,e,i){if(!hb.node){var n=e.getzr();kz(n).records||(kz(n).records={}),uv(n,e);var a=kz(n).records[t]||(kz(n).records[t]={}); a.handler=i}}function uv(t,e){function i(i,n){t.on(i,function(i){var a=kv(e);pz(kz(t).records,function(t){t&&n(t,i,a.dispatchaction)}),yv(a.pendings,e)})}kz(t).initialized||(kz(t).initialized=!0,i("click",x(qv,"click")),i("mousemove",x(qv,"mousemove")),i("globalout",jv))}function yv(t,e){var i,n=t.showtip.length,a=t.hidetip.length;n?i=t.showtip[n-1]:a&&(i=t.hidetip[a-1]),i&&(i.dispatchaction=null,e.dispatchaction(i))}function jv(t,e,i){t.handler("leave",null,i)}function qv(t,e,i,n){e.handler(t,i,n)}function kv(t){var e={showtip:[],hidetip:[]},i=function(n){var a=e[n.type];a?a.push(n):(n.dispatchaction=i,t.dispatchaction(n))};return{dispatchaction:i,pendings:e}}function $v(t,e){if(!hb.node){var i=e.getzr(),n=(kz(i).records||{})[t];n&&(kz(i).records[t]=null)}}function jv(){}function qv(t,e,i,n){ty(nz(i).lastprop,n)||(nz(i).lastprop=n,e?ho(i,n,t):(i.stopanimation(),i.attr(n)))}function ty(t,e){if(s(t)&&s(e)){var i=!0;return f(e,function(e,n){i=i&&ty(t[n],e)}),!!i}return t===e}function ey(t,e){t[e.get("label.show")?"show":"hide"]()}function iy(t){return{position:t.position.slice(),rotation:t.rotation||0}}function ny(t,e,i){var n=e.get("z"),a=e.get("zlevel");t&&t.traverse(function(t){"group"!==t.type&&(null!=n&&(t.z=n),null!=a&&(t.zlevel=a),t.silent=i)})}function ay(t){var e,i=t.get("type"),n=t.getmodel(i+"style");return"line"===i?(e=n.getlinestyle(),e.fill=null):"shadow"===i&&(e=n.getareastyle(),e.stroke=null),e}function oy(t,e,i,n,a){var o=i.get("value"),r=sy(o,e.axis,e.ecmodel,i.get("seriesdataindices"),{precision:i.get("label.precision"),formatter:i.get("label.formatter")}),s=i.getmodel("label"),l=pa(s.get("padding")||0),u=s.getfont(),h=gi(r,u),c=a.position,d=h.width+l[1]+l[3],f=h.height+l[0]+l[2],p=a.align;"right"===p&&(c[0]-=d),"center"===p&&(c[0]-=d/2);var g=a.verticalalign;"bottom"===g&&(c[1]-=f),"middle"===g&&(c[1]-=f/2),ry(c,d,f,n);var m=s.get("backgroundcolor");m&&"auto"!==m||(m=e.get("axisline.linestyle.color")),t.label={shape:{x:0,y:0,width:d,height:f,r:s.get("borderradius")},position:c.slice(),style:{text:r,textfont:u,textfill:s.gettextcolor(),textposition:"inside",textpadding:l,fill:m,stroke:s.get("bordercolor")||"transparent",linewidth:s.get("borderwidth")||0,shadowblur:s.get("shadowblur"),shadowcolor:s.get("shadowcolor"),shadowoffsetx:s.get("shadowoffsetx"),shadowoffsety:s.get("shadowoffsety")},z2:10}}function ry(t,e,i,n){var a=n.getwidth(),o=n.getheight();t[0]=math.min(t[0]+e,a)-e,t[1]=math.min(t[1]+i,o)-i,t[0]=math.max(t[0],0),t[1]=math.max(t[1],0)}function sy(t,e,i,n,a){t=e.scale.parse(t);var o=e.scale.getlabel(t,{precision:a.precision}),r=a.formatter;if(r){var s={value:kh(e,t),axisdimension:e.dim,axisindex:e.index,seriesdata:[]};f(n,function(t){var e=i.getseriesbyindex(t.seriesindex),n=t.dataindexinside,a=e&&e.getdataparams(n);a&&s.seriesdata.push(a)}),b(r)?o=r.replace("{value}",o):w(r)&&(o=r(s))}return o}function ly(t,e,i){var n=de();return oe(n,n,i.rotation),pe(n,n,i.position),uo([t.datatocoord(e),(i.labeloffset||0)+(i.labeldirection||1)*(i.labelmargin||0)],n)}function uy(t,e,i,n,a,o){var r=rl.innertextlayout(i.rotation,0,i.labeldirection);i.labelmargin=a.get("label.margin"),oy(e,n,a,o,{position:ly(n.axis,t,i),align:r.textalign,verticalalign:r.textverticalalign})}function hy(t,e,i){return i=i||0,{x1:t[i],y1:t[1-i],x2:e[i],y2:e[1-i]}}function cy(t,e,i){return i=i||0,{x:t[i],y:t[1-i],width:e[i],height:e[1-i]}}function dy(t,e,i,n,a,o){return{cx:t,cy:e,r0:i,r:n,startangle:a,endangle:o,clockwise:!0}}function fy(t,e){var i={};return i[e.dim+"axisindex"]=e.index,t.getcartesian(i)}function py(t){return"x"===t.dim?0:1}function gy(t){return t.ishorizontal()?0:1}function my(t,e){var i=t.getrect();return[i[vz[e]],i[vz[e]]+i[gz[e]]]}function vy(t,e,i){var n=new qi({shape:{x:t.x-10,y:t.y-10,width:0,height:t.height+20}});return zo(n,{shape:{width:t.width+20,height:t.height+20}},e,i),n}function yy(t,e,i){if(t.count())for(var n,a=e.coordinatesystem,o=e.getlayerseries(),r=t.mapdimension("single"),s=t.mapdimension("value"),l=p(o,function(e){return p(e.indices,function(e){var i=a.datatopoint(t.get(r,e));return i[1]=t.get(s,e),i})}),u=xy(l),h=u.y0,c=i/u.max,d=o.length,f=o[0].indices.length,g=0;f>g;++g){n=h[g]*c,t.setitemlayout(o[0].indices[g],{layerindex:0,x:l[0][g][0],y0:n,y:l[0][g][1]*c});for(var m=1;d>m;++m)n+=l[m-1][g][1]*c,t.setitemlayout(o[m].indices[g],{layerindex:m,x:l[m][g][0],y0:n,y:l[m][g][1]*c})}}function xy(t){for(var e,i=t.length,n=t[0].length,a=[],o=[],r=0,s={},l=0;n>l;++l){for(var u=0,e=0;i>u;++u)e+=t[u][l][1];e>r&&(r=e),a.push(e)}for(var h=0;n>h;++h)o[h]=(r-a[h])/2;r=0;for(var c=0;n>c;++c){var d=a[c]+o[c];d>r&&(r=d)}return s.y0=o,s.max=r,s}function _y(t,e,i,n){var a=t.getitemlayout(e),o=i.get("symbolrepeat"),r=i.get("symbolclip"),s=i.get("symbolposition")||"start",l=i.get("symbolrotate"),u=(l||0)*math.pi/180||0,h=i.get("symbolpatternsize")||2,c=i.isanimationenabled(),d={dataindex:e,layout:a,itemmodel:i,symboltype:t.getitemvisual(e,"symbol")||"circle",color:t.getitemvisual(e,"color"),symbolclip:r,symbolrepeat:o,symbolrepeatdirection:i.get("symbolrepeatdirection"),symbolpatternsize:h,rotation:u,animationmodel:c?i:null,hoveranimation:c&&i.get("hoveranimation"),z2:i.getshallow("z",!0)||0};wy(i,o,a,n,d),sy(t,e,a,o,r,d.boundinglength,d.pxsign,h,n,d),my(i,d.symbolscale,u,n,d);var f=d.symbolsize,p=i.get("symboloffset");return _(p)&&(p=[hr(p[0],f[0]),hr(p[1],f[1])]),iy(i,f,a,o,r,p,s,d.valuelinewidth,d.boundinglength,d.repeatcutlength,n,d),d}function wy(t,e,i,n,a){var o,r=n.valuedim,s=t.get("symbolboundingdata"),l=n.coordsys.getotheraxis(n.coordsys.getbaseaxis()),u=l.toglobalcoord(l.datatocoord(0)),h=1-+(i[r.wh]<=0);if(_(s)){var c=[by(l,s[0])-u,by(l,s[1])-u];c[1]0?1:0>o?-1:0}function by(t,e){return t.toglobalcoord(t.datatocoord(t.scale.parse(e)))}function sy(t,e,i,n,a,o,r,s,l,u){var h=l.valuedim,c=l.categorydim,d=math.abs(i[c.wh]),f=t.getitemvisual(e,"symbolsize");_(f)?f=f.slice():(null==f&&(f="100%"),f=[f,f]),f[c.index]=hr(f[c.index],d),f[h.index]=hr(f[h.index],n?d:math.abs(o)),u.symbolsize=f;var p=u.symbolscale=[f[0]/s,f[1]/s];p[h.index]*=(l.ishorizontal?-1:1)*r}function my(t,e,i,n,a){var o=t.get(jz)||0;o&&(kz.attr({scale:e.slice(),rotation:i}),kz.updatetransform(),o/=kz.getlinescale(),o*=e[n.valuedim.index]),a.valuelinewidth=o}function iy(t,e,i,n,a,o,s,l,u,h,c,d){var f=c.categorydim,p=c.valuedim,g=d.pxsign,m=math.max(e[p.index]+l,0),v=m;if(n){var y=math.abs(u),x=d(t.get("symbolmargin"),"15%")+"",_=!1;x.lastindexof("!")===x.length-1&&(_=!0,x=x.slice(0,x.length-1)),x=hr(x,e[p.index]);var w=math.max(m+2*x,0),b=_?0:2*x,s=ir(n),m=s?n:wy((y+b)/w),i=y-m*m;x=i/2/(_?m:m-1),w=m+2*x,b=_?0:2*x,s||"fixed"===n||(m=h?wy((math.abs(h)+b)/w):0),v=m*w-b,d.repeattimes=m,d.symbolmargin=x}var a=g*(v/2),t=d.pathposition=[];t[f.index]=i[f.wh]/2,t[p.index]="start"===s?a:"end"===s?u-a:u/2,o&&(t[0]+=o[0],t[1]+=o[1]);var c=d.bundleposition=[];c[f.index]=i[f.xy],c[p.index]=i[p.xy];var l=d.barrectshape=r({},i);l[p.wh]=g*math.max(math.abs(i[p.wh]),math.abs(t[p.index]+a)),l[f.wh]=i[f.wh];var k=d.clipshape={};k[f.xy]=-i[f.xy],k[f.wh]=c.ecsize[f.wh],k[p.xy]=0,k[p.wh]=i[p.wh]}function ay(t){var e=t.symbolpatternsize,i=eh(t.symboltype,-e/2,-e/2,e,e,t.color);return i.attr({culling:!0}),"image"!==i.type&&i.setstyle({strokenoscale:!0}),i}function ty(t,e,i,n){function a(t){var e=h.slice(),n=i.pxsign,a=t;return("start"===i.symbolrepeatdirection?n>0:0>n)&&(a=d-1-t),e[c.index]=p*(a-d/2+.5)+h[c.index],{position:e,scale:i.symbolscale.slice(),rotation:i.rotation}}function o(){vy(t,function(t){t.trigger("emphasis")})}function r(){vy(t,function(t){t.trigger("normal")})}var s=t.__pictorialbundle,l=i.symbolsize,u=i.valuelinewidth,h=i.pathposition,c=e.valuedim,d=i.repeattimes||0,f=0,p=l[e.valuedim.index]+u+2*i.symbolmargin;for(vy(t,function(t){t.__pictorialanimationindex=f,t.__pictorialrepeattimes=d,d>f?gy(t,null,a(f),i,n):gy(t,null,{scale:[0,0]},i,n,function(){s.remove(t)}),ny(t,i),f++});d>f;f++){var g=ay(i);g.__pictorialanimationindex=f,g.__pictorialrepeattimes=d,s.add(g);var m=a(f);gy(g,{position:m.position,scale:[0,0]},{scale:m.scale,rotation:m.rotation},i,n),g.on("mouseover",o).on("mouseout",r),ny(g,i)}}function dy(t,e,i,n){function a(){this.trigger("emphasis")}function o(){this.trigger("normal")}var r=t.__pictorialbundle,s=t.__pictorialmainpath;s?gy(s,null,{position:i.pathposition.slice(),scale:i.symbolscale.slice(),rotation:i.rotation},i,n):(s=t.__pictorialmainpath=ay(i),r.add(s),gy(s,{position:i.pathposition.slice(),scale:[0,0],rotation:i.rotation},{scale:i.symbolscale.slice()},i,n),s.on("mouseover",a).on("mouseout",o)),ny(s,i)}function cy(t,e,i){var n=r({},e.barrectshape),a=t.__pictorialbarrect;a?gy(a,null,{shape:n},e,i):(a=t.__pictorialbarrect=new qi({z2:2,shape:n,silent:!0,style:{stroke:"transparent",fill:"transparent",linewidth:0}}),t.add(a))}function ly(t,e,i,n){if(i.symbolclip){var a=t.__pictorialclippath,o=r({},i.clipshape),s=e.valuedim,l=i.animationmodel,u=i.dataindex;if(a)ho(a,{shape:o},l,u);else{o[s.wh]=0,a=new qi({shape:o}),t.__pictorialbundle.setclippath(a),t.__pictorialclippath=a;var h={};h[s.wh]=i.clipshape[s.wh],_a[n?"updateprops":"initprops"](a,{shape:h},l,u)}}}function ky(t,e){var i=t.getitemmodel(e);return i.getanimationdelayparams=py,i.isanimationenabled=oy,i}function py(t){return{index:t.__pictorialanimationindex,count:t.__pictorialrepeattimes}}function oy(){return this.parentmodel.isanimationenabled()&&!!this.getshallow("animation")}function ny(t,e){t.off("emphasis").off("normal");var i=e.symbolscale.slice();e.hoveranimation&&t.on("emphasis",function(){this.animateto({scale:[1.1*i[0],1.1*i[1]]},400,"elasticout")}).on("normal",function(){this.animateto({scale:i.slice()},400,"elasticout")})}function zy(t,e,i,n){var a=new ss,o=new ss;return a.add(o),a.__pictorialbundle=o,o.attr("position",i.bundleposition.slice()),i.symbolrepeat?ty(a,e,i):dy(a,e,i),cy(a,i,n),ly(a,e,i,n),a.__pictorialshapestr=by(t,i),a.__pictorialsymbolmeta=i,a}function ry(t,e,i){var n=i.animationmodel,a=i.dataindex,o=t.__pictorialbundle;ho(o,{position:i.bundleposition.slice()},n,a),i.symbolrepeat?ty(t,e,i,!0):dy(t,e,i,!0),cy(t,i,!0),ly(t,e,i,!0)}function ey(t,e,i,n){var a=n.__pictorialbarrect;a&&(a.style.text=null);var o=[];vy(n,function(t){o.push(t)}),n.__pictorialmainpath&&o.push(n.__pictorialmainpath),n.__pictorialclippath&&(i=null),f(o,function(t){ho(t,{scale:[0,0]},i,e,function(){n.parent&&n.parent.remove(n)})}),t.setitemgraphicel(e,null)}function by(t,e){return[t.getitemvisual(e.dataindex,"symbol")||"none",!!e.symbolrepeat,!!e.symbolclip].join(":")}function vy(t,e,i){f(t.__pictorialbundle.children(),function(n){n!==t.__pictorialbarrect&&e.call(i,n)})}function gy(t,e,i,n,a,o){e&&t.attr(e),n.symbolclip&&!a?i&&t.attr(i):i&&_a[a?"updateprops":"initprops"](t,i,n.animationmodel,n.dataindex,o)}function fy(t,e,i){var n=i.color,a=i.dataindex,o=i.itemmodel,r=o.getmodel("itemstyle").getitemstyle(["color"]),l=o.getmodel("emphasis.itemstyle").getitemstyle(),u=o.getshallow("cursor");vy(t,function(t){t.setcolor(n),t.setstyle(s({fill:n,opacity:i.opacity},r)),to(t,l),u&&(t.cursor=u),t.z2=i.z2});var h={},c=e.valuedim.posdesc[+(i.boundinglength>0)],d=t.__pictorialbarrect;xc(d.style,h,o,n,e.seriesmodel,a,c),to(d,h)}function wy(t){var e=math.round(t);return math.abs(t-e)<1e-4?e:math.ceil(t)}function hy(t,e){return e=e||[0,0],p(["x","y"],function(i,n){var a=this.getaxis(i),o=e[n],r=t[n]/2;return"category"===a.type?a.getbandwidth():math.abs(a.datatocoord(o-r)-a.datatocoord(o+r))},this)}function zy(t,e){return e=e||[0,0],p([0,1],function(i){var n=e[i],a=t[i]/2,o=[],r=[];return o[i]=n-a,r[i]=n+a,o[1-i]=r[1-i]=e[1-i],math.abs(this.datatopoint(o)[i]-this.datatopoint(r)[i])},this)}function xy(t,e){var i=this.getaxis(),n=e instanceof array?e[0]:e,a=(t instanceof array?t[0]:t)/2;return"category"===i.type?i.getbandwidth():math.abs(i.datatocoord(n-a)-i.datatocoord(n+a))}function uy(t,e){return p(["radius","angle"],function(i,n){var a=this["get"+i+"axis"](),o=e[n],r=t[n]/2,s="datato"+i,l="category"===a.type?a.getbandwidth():math.abs(a[s](o-r)-a[s](o+r));return"angle"===i&&(l=l*math.pi/180),l},this)}function yy(t){var e,i=t.type;if("path"===i){var n=t.shape,a=null!=n.width&&null!=n.height?{x:n.x||0,y:n.y||0,width:n.width,height:n.height}:null,o=sx(n);e=so(o,null,a,n.layout||"center"),e.__custompathdata=o}else if("image"===i)e=new sn({}),e.__customimagepath=t.style.image;else if("text"===i)e=new ei({}),e.__customtext=t.style.text;else if("group"===i)e=new ss;else{if("compoundpath"===i)throw new error('"compoundpath" is not supported yet.');var r=ro(i);e=new r}return e.__customgraphictype=i,e.name=t.name,e}function jy(t,e,i,a,o,r,s){var l={},u=i.style||{};if(i.shape&&(l.shape=n(i.shape)),i.position&&(l.position=i.position.slice()),i.scale&&(l.scale=i.scale.slice()),i.origin&&(l.origin=i.origin.slice()),i.rotation&&(l.rotation=i.rotation),"image"===t.type&&i.style){var h=l.style={};f(["x","y","width","height"],function(e){qy(e,h,u,t.style,r)})}if("text"===t.type&&i.style){var h=l.style={};f(["x","y"],function(e){qy(e,h,u,t.style,r)}),!u.hasownproperty("textfill")&&u.fill&&(u.textfill=u.fill),!u.hasownproperty("textstroke")&&u.stroke&&(u.textstroke=u.stroke)}if("group"!==t.type&&(t.usestyle(u),r)){t.style.opacity=0;var c=u.opacity;null==c&&(c=1),zo(t,{style:{opacity:c}},a,e)}r?t.attr(l):ho(t,l,a,e),i.hasownproperty("z2")&&t.attr("z2",i.z2||0),i.hasownproperty("silent")&&t.attr("silent",i.silent),i.hasownproperty("invisible")&&t.attr("invisible",i.invisible),i.hasownproperty("ignore")&&t.attr("ignore",i.ignore),i.hasownproperty("info")&&t.attr("info",i.info);var d=i.styleemphasis;wo(t,d),s&&do(t,d!==!1)}function qy(t,e,i,n,a){null==i[t]||a||(e[t]=i[t],i[t]=n[t])}function ky(t,e,i,n){function a(t){null==t&&(t=m),s&&(v=e.getitemmodel(t),y=v.getmodel(or),x=v.getmodel(rr),_=e.getitemvisual(t,"color"),s=!1)}function o(t,i){return null==i&&(i=m),e.get(e.getdimension(t||0),i)}function r(i,n){null==n&&(n=m),a(n);var o=v.getmodel(nr).getitemstyle();null!=_&&(o.fill=_);var r=e.getitemvisual(n,"opacity");null!=r&&(o.opacity=r);var s=i?ax(i,y):y;return oo(o,s,null,{autocolor:_,isrecttext:!0}),o.text=s.getshallow("show")?c(t.getformattedlabel(n,"normal"),yc(e,n)):null,i&&ox(o,i),o}function l(i,n){null==n&&(n=m),a(n);var o=v.getmodel(ar).getitemstyle(),r=i?ax(i,x):x;return oo(o,r,null,{isrecttext:!0},!0),o.text=r.getshallow("show")?l(t.getformattedlabel(n,"emphasis"),t.getformattedlabel(n,"normal"),yc(e,n)):null,i&&ox(o,i),o}function u(t,i){return null==i&&(i=m),e.getitemvisual(i,t)}function h(t){if(p.getbaseaxis){var e=p.getbaseaxis();return gh(s({axis:e},t),n)}}function c(){return i.getcurrentseriesindices()}function d(t){return fo(t,i)}var f=t.get("renderitem"),p=t.coordinatesystem,g={};p&&(g=p.preparecustoms?p.preparecustoms():lr[p.type](p));var m,v,y,x,_,w=s({getwidth:n.getwidth,getheight:n.getheight,getzr:n.getzr,getdevicepixelratio:n.getdevicepixelratio,value:o,style:r,styleemphasis:l,visual:u,barlayout:h,currentseriesindices:c,font:d},g.api||{}),b={context:{},seriesid:t.id,seriesname:t.name,seriesindex:t.seriesindex,coordsys:g.coordsys,datainsidelength:e.count(),encode:$y(t.getdata())},s=!0;return function(t,i){return m=t,s=!0,f&&f(s({dataindexinside:t,dataindex:e.getrawindex(t),actiontype:i?i.type:null},b),w)}}function $y(t){var e={};return f(t.dimensions,function(i,n){var a=t.getdimensioninfo(i);if(!a.isextracoord){var o=a.coorddim,r=e[o]=e[o]||[];r[a.coorddimindex]=n}}),e}function jy(t,e,i,n,a,o){return t=qy(t,e,i,n,a,o,!0),t&&o.setitemgraphicel(e,t),t}function qy(t,e,i,n,a,o,r){var s=!i;i=i||{};var l=i.type,u=i.shape,h=i.style;if(t&&(s||null!=l&&l!==t.__customgraphictype||"path"===l&&lx(u)&&sx(u)!==t.__custompathdata||"image"===l&&ux(h,"image")&&h.image!==t.__customimagepath||"text"===l&&ux(u,"text")&&h.text!==t.__customtext)&&(a.remove(t),t=null),!s){var c=!t;return!t&&(t=yy(i)),jy(t,e,i,n,o,c,r),"group"===l&&tx(t,e,i,n,o),a.add(t),t}}function tx(t,e,i,n,a){var o=i.children,r=o?o.length:0,s=i.$mergechildren,l="byname"===s||i.diffchildrenbyname,u=s===!1;if(r||l||u){if(l)return void ex({oldchildren:t.children()||[],newchildren:o||[],dataindex:e,animatablemodel:n,group:t,data:a});u&&t.removeall();for(var h=0;r>h;h++)o[h]&&qy(t.childat(h),e,o[h],n,t,a)}}function ex(t){new lu(t.oldchildren,t.newchildren,ix,ix,t).add(nx).update(nx).remove(rx).execute()}function ix(t,e){var i=t&&t.name;return null!=i?i:sr+e}function nx(t,e){var i=this.context,n=null!=t?i.newchildren[t]:null,a=null!=e?i.oldchildren[e]:null;qy(a,i.dataindex,n,i.animatablemodel,i.group,i.data)}function ax(t,e){var i=new ir({},e);return f(ir,function(e,n){t.hasownproperty(e)&&(i.option[n]=t[e])}),i}function ox(t,e){for(var i in e)(e.hasownproperty(i)||!ir.hasownproperty(i))&&(t[i]=e[i])}function rx(t){var e=this.context,i=e.oldchildren[t];i&&e.group.remove(i)}function sx(t){return t&&(t.pathdata||t.d)}function lx(t){return t&&(t.hasownproperty("pathdata")||t.hasownproperty("d"))}function ux(t,e){return t&&t.hasownproperty(e)}function hx(t){return t.get("stack")||"__ec_stack_"+t.seriesindex}function cx(t,e){return e.dim+t.model.componentindex}function dx(t,e){var i={},n=fx(m(e.getseriesbytype(t),function(t){return!e.isseriesfiltered(t)&&t.coordinatesystem&&"polar"===t.coordinatesystem.type}));e.eachseriesbytype(t,function(t){if("polar"===t.coordinatesystem.type){var e=t.getdata(),a=t.coordinatesystem,o=a.getbaseaxis(),r=cx(a,o),s=hx(t),l=n[r][s],u=l.offset,h=l.width,c=a.getotheraxis(o),d=t.coordinatesystem.cx,f=t.coordinatesystem.cy,p=t.get("barminheight")||0,g=t.get("barminangle")||0;i[s]=i[s]||[];for(var m=e.mapdimension(c.dim),v=e.mapdimension(o.dim),y=qu(e,m),x=c.getextent()[0],_=0,w=e.count();w>_;_++){var b=e.get(m,_),s=e.get(v,_);if(!isnan(b)){var m=b>=0?"p":"n",i=x;y&&(i[s][s]||(i[s][s]={p:x,n:x}),i=i[s][s][m]);var a,t,d,c;if("radius"===c.dim){var l=c.datatoradius(b)-x,k=o.datatoangle(s);math.abs(l)l?-1:1)*p),a=i,t=i+l,d=k-u,c=d-h,y&&(i[s][s][m]=t)}else{var p=c.datatoangle(b,!0)-x,o=o.datatoradius(s);math.abs(p)p?-1:1)*g),a=o+u,t=a+h,d=i,c=i+p,y&&(i[s][s][m]=c)}e.setitemlayout(_,{cx:d,cy:f,r0:a,r:t,startangle:-d*math.pi/180,endangle:-c*math.pi/180})}}}},this)}function fx(t){var e={};f(t,function(t){var i=t.getdata(),n=t.coordinatesystem,a=n.getbaseaxis(),o=cx(n,a),r=a.getextent(),s="category"===a.type?a.getbandwidth():math.abs(r[1]-r[0])/i.count(),l=e[o]||{bandwidth:s,remainedwidth:s,autowidthcount:0,categorygap:"20%",gap:"30%",stacks:{}},u=l.stacks;e[o]=l;var h=hx(t);u[h]||l.autowidthcount++,u[h]=u[h]||{width:0,maxwidth:0};var c=hr(t.get("barwidth"),s),d=hr(t.get("barmaxwidth"),s),f=t.get("bargap"),p=t.get("barcategorygap");c&&!u[h].width&&(c=math.min(l.remainedwidth,c),u[h].width=c,l.remainedwidth-=c),d&&(u[h].maxwidth=d),null!=f&&(l.gap=f),null!=p&&(l.categorygap=p)});var i={};return f(e,function(t,e){i[e]={};var n=t.stacks,a=t.bandwidth,o=hr(t.categorygap,a),r=hr(t.gap,1),s=t.remainedwidth,l=t.autowidthcount,u=(s-o)/(l+(l-1)*r);u=math.max(u,0),f(n,function(t){var e=t.maxwidth;e&&u>e&&(e=math.min(e,s),t.width&&(e=math.min(e,t.width)),s-=e,t.width=e,l--)}),u=(s-o)/(l+(l-1)*r),u=math.max(u,0);var h,c=0;f(n,function(t){t.width||(t.width=u),h=t,c+=t.width*(1+r)}),h&&(c-=h.width*r);var d=-c/2;f(n,function(t,n){i[e][n]=i[e][n]||{offset:d,width:t.width},d+=t.width*(1+r)})}),i}function px(t,e){ul.call(this,"radius",t,e),this.type="category"}function gx(t,e){e=e||[0,360],ul.call(this,"angle",t,e),this.type="category"}function mx(t,e){return e.type||(e.data?"category":"value")}function vx(t,e,i){var n=e.get("center"),a=i.getwidth(),o=i.getheight();t.cx=hr(n[0],a),t.cy=hr(n[1],o);var r=t.getradiusaxis(),s=math.min(a,o)/2,l=hr(e.get("radius"),s);r.inverse?r.setextent(l,0):r.setextent(0,l)}function yx(t){var e=this,i=e.getangleaxis(),n=e.getradiusaxis();if(i.scale.setextent(1/0,-1/0),n.scale.setextent(1/0,-1/0),t.eachseries(function(t){if(t.coordinatesystem===e){var a=t.getdata();f(a.mapdimension("radius",!0),function(t){n.scale.unionextentfromdata(a,th(a,t))}),f(a.mapdimension("angle",!0),function(t){i.scale.unionextentfromdata(a,th(a,t))})}}),th(i.scale,i.model),th(n.scale,n.model),"category"===i.type&&!i.onband){var a=i.getextent(),o=360/i.scale.count();i.inverse?a[1]+=o:a[1]-=o,i.setextent(a[0],a[1])}}function xx(t,e){if(t.type=e.get("type"),t.scale=dh(e),t.onband=e.get("boundarygap")&&"category"===t.type,t.inverse=e.get("inverse"),"angleaxis"===e.maintype){t.inverse^=e.get("clockwise");var i=e.get("startangle");t.setextent(i,i+(t.inverse?-360:360))}e.axis=t,t.model=e}function _x(t,e,i){e[1]>e[0]&&(e=e.slice().reverse());var n=t.coordtopoint([e[0],i]),a=t.coordtopoint([e[1],i]);return{x1:n[0],y1:n[1],x2:a[0],y2:a[1]}}function bx(t){var e=t.getradiusaxis();return e.inverse?0:1}function sx(t){var e=t[0],i=t[t.length-1];e&&i&&math.abs(math.abs(e.coord-i.coord)-360)<1e-4&&t.pop()}function mx(t,e,i){return{position:[t.cx,t.cy],rotation:i/180*math.pi,labeldirection:-1,tickdirection:-1,namedirection:1,labelrotate:e.getmodel("axislabel").get("rotate"),z2:1}}function ix(t,e,i,n,a){var o=e.axis,r=o.datatocoord(t),s=n.getangleaxis().getextent()[0];s=s/180*math.pi;var l,u,h,c=n.getradiusaxis().getextent();if("radius"===o.dim){var d=de();oe(d,d,s),pe(d,d,[n.cx,n.cy]),l=uo([r,-a],d);var f=e.getmodel("axislabel").get("rotate")||0,p=rl.innertextlayout(s,f*math.pi/180,-1);u=p.textalign,h=p.textverticalalign}else{var g=c[1];l=n.coordtopoint([g+a,r]);var m=n.cx,v=n.cy;u=math.abs(l[0]-m)/g<.3?"center":l[0]>m?"left":"right",h=math.abs(l[1]-v)/g<.3?"middle":l[1]>v?"top":"bottom"}return{position:l,align:u,verticalalign:h}}function ax(t,e){e.update="updateview",gu(e,function(e,i){var n={};return i.eachcomponent({maintype:"geo",query:e},function(i){i[t](e.name);var a=i.coordinatesystem;f(a.regions,function(t){n[t.name]=i.isselected(t.name)||!1})}),{selected:n,name:e.name}})}function tx(t){this._model=t}function dx(t,e,i,n){var a=i.calendarmodel,o=i.seriesmodel,r=a?a.coordinatesystem:o?o.coordinatesystem:null;return r===this?r[t](n):null}function cx(t,e){var i=t.cellsize;_(i)?1===i.length&&(i[1]=i[0]):i=t.cellsize=[i,i];var n=p([0,1],function(t){return fr(e,t)&&(i[t]="auto"),null!=i[t]&&"auto"!==i[t]});wr(t,e,{type:"box",ignoresize:n})}function lx(t,e,i){var n,a={},o="toggleselected"===t;return i.eachcomponent("legend",function(i){o&&null!=n?i[n?"select":"unselect"](e.name):"allselect"===t||"inverseselect"===t?i[t]():(i[t](e.name),n=i.isselected(e.name));var r=i.getdata();f(r,function(t){var e=t.get("name");if("\n"!==e&&""!==e){var n=i.isselected(e);a[e]=a.hasownproperty(e)?a[e]&&n:n}})}),"allselect"===t||"inverseselect"===t?{selected:a}:{name:e.name,selected:a}}function kx(t,e,i){var n=e.getboxlayoutparams(),a=e.get("padding"),o={width:i.getwidth(),height:i.getheight()},r=vr(n,o,a);wa(e.get("orient"),t,e.get("itemgap"),r.width,r.height),gr(t,n,o,a)}function px(t,e){var i=pa(e.get("padding")),n=e.getitemstyle(["color","opacity"]);n.fill=e.get("backgroundcolor");var t=new qi({shape:{x:t.x-i[3],y:t.y-i[0],width:t.width+i[1]+i[3],height:t.height+i[0]+i[2],r:e.get("borderradius")},style:n,silent:!0,z2:-1});return t}function ox(t,e,i,n,a,o){var r;return"line"!==e&&e.indexof("empty")<0?(r=i.getitemstyle(),t.style.stroke=n,o||(r.stroke=a)):r=i.getitemstyle(["borderwidth","bordercolor"]),t.setstyle(r)}function nx(t,e){e.dispatchaction({type:"legendtoggleselect",name:t})}function zx(t,e,i,n){var a=i.getzr().storage.getdisplaylist()[0];a&&a.usehoverlayer||i.dispatchaction({type:"highlight",seriesname:t,name:e,excludeseriesid:n})}function rx(t,e,i,n){var a=i.getzr().storage.getdisplaylist()[0];a&&a.usehoverlayer||i.dispatchaction({type:"downplay",seriesname:t,name:e,excludeseriesid:n})}function ex(t,e,i){var n=t.getorient(),a=[1,1];a[n.index]=0,wr(e,i,{type:"box",ignoresize:a})}function bx(t){var e="cubic-bezier(0.23, 1, 0.32, 1)",i="left "+t+"s "+e+",top "+t+"s "+e;return p(vr,function(t){return t+"transition:"+i}).join(";")}function vx(t){var e=[],i=t.get("fontsize"),n=t.gettextcolor();return n&&e.push("color:"+n),e.push("font:"+t.getfont()),i&&e.push("line-height:"+math.round(3*i/2)+"px"),er(["decoration","align"],function(i){var n=t.get(i);n&&e.push("text-"+i+":"+n)}),e.join(";")}function gx(t){var e=[],i=t.get("transitionduration"),n=t.get("backgroundcolor"),a=t.getmodel("textstyle"),o=t.get("padding");return i&&e.push(bx(i)),n&&(hb.canvassupported?e.push("background-color:"+n):(e.push("background-color:#"+qe(n)),e.push("filter:alpha(opacity=70)"))),er(["width","color","radius"],function(i){var n="border-"+i,a=br(n),o=t.get(a);null!=o&&e.push(n+":"+o+("color"===i?"":"px"))}),e.push(vx(a)),null!=o&&e.push("padding:"+pa(o).join("px ")+"px"),e.join(";")+";"}function fx(t,e){if(hb.wxa)return null;var i=document.createelement("div"),n=this._zr=e.getzr();this.el=i,this._x=e.getwidth()/2,this._y=e.getheight()/2,t.appendchild(i),this._container=t,this._show=!1,this._hidetimeout;var a=this;i.onmouseenter=function(){a._enterable&&(cleartimeout(a._hidetimeout),a._show=!0),a._incontent=!0},i.onmousemove=function(e){if(e=e||window.event,!a._enterable){var i=n.handler;ye(t,e,!0),i.dispatch("mousemove",e)}},i.onmouseleave=function(){a._enterable&&a._show&&a.hidelater(a._hidedelay),a._incontent=!1}}function wx(t){this._zr=t.getzr(),this._show=!1,this._hidetimeout}function hx(t){for(var e=t.pop();t.length;){var i=t.pop();i&&(ir.isinstance(i)&&(i=i.get("tooltip",!0)),"string"==typeof i&&(i={formatter:i}),e=new ir(i,e,e.ecmodel))}return e}function zx(t,e){return t.dispatchaction||y(e.dispatchaction,e)}function xx(t,e,i,n,a,o,r){var s=i.getoutersize(),l=s.width,u=s.height;return null!=o&&(t+l+o>n?t-=l+o:t+=o),null!=r&&(e+u+r>a?e-=u+r:e+=r),[t,e]}function ux(t,e,i,n,a){var o=i.getoutersize(),r=o.width,s=o.height;return t=math.min(t+r,n)-r,e=math.min(e+s,a)-s,t=math.max(t,0),e=math.max(e,0),[t,e]}function yx(t,e,i){var n=i[0],a=i[1],o=5,r=0,s=0,l=e.width,u=e.height;switch(t){case"inside":r=e.x+l/2-n/2,s=e.y+u/2-a/2;break;case"top":r=e.x+l/2-n/2,s=e.y-a-o;break;case"bottom":r=e.x+l/2-n/2,s=e.y+u+o;break;case"left":r=e.x-n-o,s=e.y+u/2-a/2;break;case"right":r=e.x+l+o,s=e.y+u/2-a/2}return[r,s]}function jx(t){return"center"===t||"middle"===t}function qx(t){fn(t,"label",["show"])}function kx(t){return!(isnan(parsefloat(t.x))&&isnan(parsefloat(t.y)))}function $x(t){return!isnan(parsefloat(t.x))&&!isnan(parsefloat(t.y))}function jx(t,e,i,n,a,o){var r=[],s=qu(e,n),l=s?e.getcalculationinfo("stackresultdimension"):n,u=a_(e,l,t),h=e.indicesofnearest(l,u)[0];r[a]=e.get(i,h),r[o]=e.get(n,h);var c=fr(e.get(n,h));return c=math.min(c,20),c>=0&&(r[o]=+r[o].tofixed(c)),r}function qx(t,e){var i=t.getdata(),a=t.coordinatesystem;if(e&&!$x(e)&&!_(e.coord)&&a){var o=a.dimensions,r=t_(e,i,a,t);if(e=n(e),e.type&&kr[e.type]&&r.baseaxis&&r.valueaxis){var s=jr(o,r.baseaxis.dim),l=jr(o,r.valueaxis.dim);e.coord=kr[e.type](i,r.basedatadim,r.valuedatadim,s,l),e.value=e.coord[l]}else{for(var u=[null!=e.xaxis?e.xaxis:e.radiusaxis,null!=e.yaxis?e.yaxis:e.angleaxis],h=0;2>h;h++)kr[u[h]]&&(u[h]=a_(i,i.mapdimension(o[h]),u[h]));e.coord=u}}return e}function t_(t,e,i,n){var a={};return null!=t.valueindex||null!=t.valuedim?(a.valuedatadim=null!=t.valueindex?e.getdimension(t.valueindex):t.valuedim,a.valueaxis=i.getaxis(e_(n,a.valuedatadim)),a.baseaxis=i.getotheraxis(a.valueaxis),a.basedatadim=e.mapdimension(a.baseaxis.dim)):(a.baseaxis=n.getbaseaxis(),a.valueaxis=i.getotheraxis(a.baseaxis),a.basedatadim=e.mapdimension(a.baseaxis.dim),a.valuedatadim=e.mapdimension(a.valueaxis.dim)),a}function e_(t,e){var i=t.getdata(),n=i.dimensions;e=i.getdimension(e);for(var a=0;an?t.coord&&t.coord[n]:t.value}function a_(t,e,i){if("average"===i){var n=0,a=0;return t.each(e,function(t){isnan(t)||(n+=t,a++)}),n/a}return"median"===i?t.getmedian(e):t.getdataextent(e,!0)["max"===i?1:0]}function o_(t,e,i){var n=e.coordinatesystem;t.each(function(a){var o,r=t.getitemmodel(a),s=hr(r.get("x"),i.getwidth()),l=hr(r.get("y"),i.getheight());if(isnan(s)||isnan(l)){if(e.getmarkerposition)o=e.getmarkerposition(t.getvalues(t.dimensions,a));else if(n){var u=t.get(n.dimensions[0],a),h=t.get(n.dimensions[1],a);o=n.datatopoint([u,h])}}else o=[s,l];isnan(s)||(o[0]=s),isnan(l)||(o[1]=l),t.setitemlayout(a,o)})}function r_(t,e,i){var n;n=t?p(t&&t.dimensions,function(t){var i=e.getdata().getdimensioninfo(e.getdata().mapdimension(t))||{};return s({name:t},i)}):[{name:"value",type:"float"}];var a=new gc(n,i),o=p(i.get("data"),x(qx,e));return t&&(o=m(o,x(i_,t))),a.initdata(o,null,t?n_:function(t){return t.value}),a}function s_(t){return!isnan(t)&&!isfinite(t)}function l_(t,e,i,n){var a=1-t,o=n.dimensions[t];return s_(e[a])&&s_(i[a])&&e[t]===i[t]&&n.getaxis(o).containdata(e[t])}function u_(t,e){if("cartesian2d"===t.type){var i=e[0].coord,n=e[1].coord;if(i&&n&&(l_(1,i,n,t)||l_(0,i,n,t)))return!0}return i_(t,e[0])&&i_(t,e[1])}function h_(t,e,i,n,a){var o,r=n.coordinatesystem,s=t.getitemmodel(e),l=hr(s.get("x"),a.getwidth()),u=hr(s.get("y"),a.getheight());if(isnan(l)||isnan(u)){if(n.getmarkerposition)o=n.getmarkerposition(t.getvalues(t.dimensions,e));else{var h=r.dimensions,c=t.get(h[0],e),d=t.get(h[1],e);o=r.datatopoint([c,d])}if("cartesian2d"===r.type){var f=r.getaxis("x"),p=r.getaxis("y"),h=r.dimensions;s_(t.get(h[0],e))?o[0]=f.toglobalcoord(f.getextent()[i?0:1]):s_(t.get(h[1],e))&&(o[1]=p.toglobalcoord(p.getextent()[i?0:1]))}isnan(l)||(o[0]=l),isnan(u)||(o[1]=u)}else o=[l,u];t.setitemlayout(e,o)}function c_(t,e,i){var n;n=t?p(t&&t.dimensions,function(t){var i=e.getdata().getdimensioninfo(e.getdata().mapdimension(t))||{};return s({name:t},i)}):[{name:"value",type:"float"}];var a=new gc(n,i),o=new gc(n,i),r=new gc([],i),l=p(i.get("data"),x(jr,e,t,i));t&&(l=m(l,x(u_,t)));var u=t?n_:function(t){return t.value};return a.initdata(p(l,function(t){return t[0]}),null,u),o.initdata(p(l,function(t){return t[1]}),null,u),r.initdata(p(l,function(t){return t[2]})),r.hasitemoption=!0,{from:a,to:o,line:r}}function d_(t){return!isnan(t)&&!isfinite(t)}function f_(t,e,i){var n=1-t;return d_(e[n])&&d_(i[n])}function p_(t,e){var i=e.coord[0],n=e.coord[1];return"cartesian2d"===t.type&&i&&n&&(f_(1,i,n,t)||f_(0,i,n,t))?!0:i_(t,{coord:i,x:e.x0,y:e.y0})||i_(t,{coord:n,x:e.x1,y:e.y1})}function g_(t,e,i,n,a){var o,r=n.coordinatesystem,s=t.getitemmodel(e),l=hr(s.get(i[0]),a.getwidth()),u=hr(s.get(i[1]),a.getheight());if(isnan(l)||isnan(u)){if(n.getmarkerposition)o=n.getmarkerposition(t.getvalues(i,e));else{var h=t.get(i[0],e),c=t.get(i[1],e),d=[h,c];r.clampdata&&r.clampdata(d,d),o=r.datatopoint(d,!0)}if("cartesian2d"===r.type){var f=r.getaxis("x"),p=r.getaxis("y"),h=t.get(i[0],e),c=t.get(i[1],e);d_(h)?o[0]=f.toglobalcoord(f.getextent()["x0"===i[0]?0:1]):d_(c)&&(o[1]=p.toglobalcoord(p.getextent()["y0"===i[1]?0:1]))}isnan(l)||(o[0]=l),isnan(u)||(o[1]=u)}else o=[l,u];return o}function m_(t,e,i){var n,a,o=["x0","y0","x1","y1"];t?(n=p(t&&t.dimensions,function(t){var i=e.getdata(),n=i.getdimensioninfo(i.mapdimension(t))||{};return s({name:t},n)}),a=new gc(p(o,function(t,e){return{name:t,type:n[e%2].type}}),i)):(n=[{name:"value",type:"float"}],a=new gc(n,i));var r=p(i.get("data"),x(qr,e,t,i));t&&(r=m(r,x(p_,t)));var l=t?function(t,e,i,n){return t.coord[math.floor(n/2)][n%2]}:function(t){return t.value};return a.initdata(r,null,l),a.hasitemoption=!0,a}function v_(t){var e=t.type,i={number:"value",time:"time"};if(i[e]&&(t.axistype=i[e],delete t.type),y_(t),x_(t,"controlposition")){var n=t.controlstyle||(t.controlstyle={});x_(n,"position")||(n.position=t.controlposition),"none"!==n.position||x_(n,"show")||(n.show=!1,delete n.position),delete t.controlposition}f(t.data||[],function(t){s(t)&&!_(t)&&(!x_(t,"value")&&x_(t,"name")&&(t.value=t.name),y_(t))})}function y_(t){var e=t.itemstyle||(t.itemstyle={}),i=e.emphasis||(e.emphasis={}),n=t.label||t.label||{},a=n.normal||(n.normal={}),o={normal:1,emphasis:1}; f(n,function(t,e){o[e]||x_(a,e)||(a[e]=t)}),i.label&&!x_(n,"emphasis")&&(n.emphasis=i.label,delete i.label)}function x_(t,e){return t.hasownproperty(e)}function __(t,e){return vr(t.getboxlayoutparams(),{width:e.getwidth(),height:e.getheight()},t.get("padding"))}function w_(t,e,i,a){var o=so(t.get(e).replace(/^path:\/\//,""),n(a||{}),new wi(i[0],i[1],i[2],i[3]),"center");return o}function b_(t,e,i,n,o,r){var s=e.get("color");if(o)o.setcolor(s),i.add(o),r&&r.onupdate(o);else{var l=t.get("symbol");o=eh(l,-1,-1,2,2,s),o.setstyle("strokenoscale",!0),i.add(o),r&&r.oncreate(o)}var u=e.getitemstyle(["color","symbol","symbolsize"]);o.setstyle(u),n=a({recthover:!0,z2:100},n,!0);var h=t.get("symbolsize");h=h instanceof array?h.slice():[+h,+h],h[0]/=2,h[1]/=2,n.scale=h;var c=t.get("symboloffset");if(c){var d=n.position=n.position||[0,0];d[0]+=hr(c[0],h[0]),d[1]+=hr(c[1],h[1])}var f=t.get("symbolrotate");return n.rotation=(f||0)*math.pi/180||0,o.attr(n),o.updatetransform(),o}function s_(t,e,i,n,a){if(!t.dragging){var o=n.getmodel("checkpointstyle"),r=i.datatocoord(n.getdata().get(["value"],e));a||!o.get("animation",!0)?t.attr({position:[r,0]}):(t.stopanimation(!0),t.animateto({position:[r,0]},o.get("animationduration",!0),o.get("animationeasing",!0)))}}function m_(t){return u(he,t)>=0}function i_(t,e){t=t.slice();var i=p(t,nr);e=(e||[]).slice();var n=p(e,nr);return function(a,o){f(t,function(t,r){for(var s={name:t,capital:i[r]},l=0;l=0}function a(t,n){var a=!1;return e(function(e){f(i(t,e)||[],function(t){n.records[e.name][t]&&(a=!0)})}),a}function o(t,n){n.nodes.push(t),e(function(e){f(i(t,e)||[],function(t){n.records[e.name][t]=!0})})}return function(i){function r(t){!n(t,s)&&a(t,s)&&(o(t,s),l=!0)}var s={nodes:[],records:{}};if(e(function(t){s.records[t.name]={}}),!i)return s;o(i,s);var l;do l=!1,t(r);while(l);return s}}function t_(t,e,i){var n=[1/0,-1/0];return de(i,function(t){var i=t.getdata();i&&de(i.mapdimension(e,!0),function(t){var e=i.getapproximateextent(t);e[0]n[1]&&(n[1]=e[1])})}),n[1]0?0:0/0);var r=i.getmax(!0);return null!=r&&"datamax"!==r&&"function"!=typeof r?e[1]=r:a&&(e[1]=o>0?o-1:0/0),i.get("scale",!0)||(e[0]>0&&(e[0]=0),e[1]<0&&(e[1]=0)),e}function c_(t,e){var i=t.getaxismodel(),n=t._percentwindow,a=t._valuewindow;if(n){var o=gr(a,[0,500]);o=math.min(o,20);var r=e||0===n[0]&&100===n[1];i.setrange(r?null:+a[0].tofixed(o),r?null:+a[1].tofixed(o))}}function l_(t){var e=t._minmaxspan={},i=t._datazoommodel,n=t._dataextent;de(["min","max"],function(a){var o=i.get(a+"span"),r=i.get(a+"valuespan");null!=r&&(r=t.getaxismodel().axis.scale.parse(r)),null!=r?o=ur(n[0]+r,n,[0,100],!0):null!=o&&(r=ur(o,[0,100],n,!0)-n[0]),e[a+"span"]=o,e[a+"valuespan"]=r})}function k_(t){var e={};return ge(["start","end","startvalue","endvalue","throttle"],function(i){t.hasownproperty(i)&&(e[i]=t[i])}),e}function p_(t,e){var i=t._rangepropmode,n=t.get("rangemode");ge([["start","startvalue"],["end","endvalue"]],function(t,a){var o=null!=e[t[0]],r=null!=e[t[1]];o&&!r?i[a]="percent":!o&&r?i[a]="value":n?i[a]=n[a]:o&&(i[a]="percent")})}function o_(t){var e={x:"y",y:"x",radius:"angle",angle:"radius"};return e[t]}function n_(t){return"vertical"===t?"ns-resize":"ew-resize"}function z_(t,e){var i=b_(t),n=e.datazoomid,a=e.coordid;f(i,function(t){var i=t.datazoominfos;i[n]&&u(e.allcoordids,a)<0&&(delete i[n],t.count--)}),g_(i);var o=i[a];o||(o=i[a]={coordid:a,datazoominfos:{},count:0},o.controller=v_(t,o),o.dispatchaction=x(f_,t)),!o.datazoominfos[n]&&o.count++,o.datazoominfos[n]=e;var r=w_(o.datazoominfos);o.controller.enable(r.controltype,r.opt),o.controller.setpointerchecker(e.containspoint),ll(o,"dispatchaction",e.datazoommodel.get("throttle",!0),"fixrate")}function r_(t,e){var i=b_(t);f(i,function(t){t.controller.dispose();var i=t.datazoominfos;i[e]&&(delete i[e],t.count--)}),g_(i)}function e_(t){return t.type+"\x00_"+t.id}function b_(t){var e=t.getzr();return e[pe]||(e[pe]={})}function v_(t,e){var i=new lf(t.getzr());return f(["pan","zoom","scrollmove"],function(t){i.on(t,function(i){var n=[];f(e.datazoominfos,function(a){if(i.isavailablebehavior(a.datazoommodel.option)){var o=(a.getrange||{})[t],r=o&&o(e.controller,i);!a.datazoommodel.get("disabled",!0)&&r&&n.push({datazoomid:a.datazoomid,start:r[0],end:r[1]})}}),n.length&&e.dispatchaction(n)})}),i}function g_(t){f(t,function(e,i){e.count||(e.controller.dispose(),delete t[i])})}function f_(t,e){t.dispatchaction({type:"datazoom",batch:e})}function w_(t){var e,i="type_",n={type_true:2,type_move:1,type_false:0,type_undefined:-1},a=!0;return f(t,function(t){var o=t.datazoommodel,r=o.get("disabled",!0)?!1:o.get("zoomlock",!0)?"move":!0;n[i+r]>n[i+e]&&(e=r),a&=o.get("preventdefaultmousemove",!0)}),{controltype:e,opt:{zoomonmousewheel:!0,moveonmousemove:!0,moveonmousewheel:!0,preventdefaultmousemove:!!a}}}function h_(t){return function(e,i,n,a){var o=this._range,r=o.slice(),s=e.axismodels[0];if(s){var l=t(r,s,e,i,n,a);return dn(l,r,[0,100],"all"),this._range=r,o[0]!==r[0]||o[1]!==r[1]?r:void 0}}}function z_(t){var e={};f(t,function(t){e[t]=1}),t.length=0,f(e,function(e,i){t.push(i)})}function x_(t){if(t)for(var e in t)if(t.hasownproperty(e))return!0}function u_(t,e,i){function a(){var t=function(){};t.prototype.__hidden=t.prototype;var e=new t;return e}var o={};return ve(e,function(e){var r=o[e]=a();ve(t[e],function(t,a){if(kp.isvalidtype(a)){var o={type:a,visual:t};i&&i(o,e),r[a]=new kp(o),"opacity"===a&&(o=n(o),o.type="coloralpha",r.__hidden.__alphaforopacity=new kp(o))}})}),o}function y_(t,e,i){var a;f(i,function(t){e.hasownproperty(t)&&x_(e[t])&&(a=!0)}),a&&f(i,function(i){e.hasownproperty(i)&&x_(e[i])?t[i]=n(e[i]):delete t[i]})}function j_(t,e,i,n,a,o){function r(t){return i.getitemvisual(h,t)}function s(t,e){i.setitemvisual(h,t,e)}function l(t,l){h=null==o?t:l;var c=i.getrawdataitem(h);if(!c||c.visualmap!==!1)for(var d=n.call(a,t),f=e[d],p=u[d],g=0,m=p.length;m>g;g++){var v=p[g];f[v]&&f[v].applyvisual(t,r,s)}}var u={};f(t,function(t){var i=kp.preparevisualtypes(e[t]);u[t]=i});var h;null==o?i.each(l):i.each([o],l)}function q_(t,e,i,n){function a(t,a){function r(t){return a.getitemvisual(l,t)}function s(t,e){a.setitemvisual(l,t,e)}null!=n&&(n=a.getdimension(n));for(var l;null!=(l=t.next());){var u=a.getrawdataitem(l);if(!u||u.visualmap!==!1)for(var h=null!=n?a.get(n,l,!0):l,c=i(h),d=e[c],f=o[c],p=0,g=f.length;g>p;p++){var m=f[p];d[m]&&d[m].applyvisual(h,r,s)}}}var o={};return f(t,function(t){var i=kp.preparevisualtypes(e[t]);o[t]=i}),{progress:a}}function k_(t){var e=["x","y"],i=["width","height"];return{point:function(e,i,n){if(e){var a=n.range,o=e[t];return $_(o,a)}},rect:function(n,a,o){if(n){var r=o.range,s=[n[e[t]],n[e[t]]+n[i[t]]];return s[1]=0)&&t(o,n,a)})}function q_(t){return t[0]>t[1]&&t.reverse(),t}function tw(t,e){return $n(t,e,{includemaintypes:xe})}function ew(t,e,i,n){var a=i.getaxis(["x","y"][t]),o=q_(p([0,1],function(t){return e?a.coordtodata(a.tolocalcoord(n[t])):a.toglobalcoord(a.datatocoord(n[t]))})),r=[];return r[t]=o,r[1-t]=[0/0,0/0],{values:o,xyminmax:r}}function iw(t,e,i,n){return[e[0]-n[t]*i[0],e[1]-n[t]*i[1]]}function nw(t,e){var i=aw(t),n=aw(e),a=[i[0]/n[0],i[1]/n[1]];return isnan(a[0])&&(a[0]=1),isnan(a[1])&&(a[1]=1),a}function aw(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[0/0,0/0]}function ow(t,e,i,n,a){if(a){var o=t.getzr();if(!o[tb]){o[qe]||(o[qe]=rw);var r=ll(o,qe,i,e);r(t,n)}}}function rw(t,e){if(!t.isdisposed()){var i=t.getzr();i[tb]=!0,t.dispatchaction({type:"brushselect",batch:e}),i[tb]=!1}}function sw(t,e,i,n){for(var a=0,o=e.length;o>a;a++){var r=e[a];if(t[r.brushtype](n,i,r.selectors,r))return!0}}function lw(t){var e=t.brushselector;if(b(e)){var i=[];return f(ge,function(t,n){i[n]=function(i,n,a,o){var r=n.getitemlayout(i);return t[e](r,a,o)}}),i}if(w(e)){var n={};return f(ge,function(t,i){n[i]=e}),n}return e}function uw(t,e){var i=t.option.seriesindex;return null!=i&&"all"!==i&&(_(i)?u(i,e)<0:e!==i)}function hw(t){var e=t.selectors={};return f(ge[t.brushtype],function(i,n){e[n]=function(n){return i(n,e,t)}}),t}function cw(t){return new wi(t[0][0],t[1][0],t[0][1]-t[0][0],t[1][1]-t[1][0])}function dw(t,e){return a({brushtype:t.brushtype,brushmode:t.brushmode,transformable:t.transformable,brushstyle:new ir(t.brushstyle).getitemstyle(),removeonclick:t.removeonclick,z:t.z},e,!0)}function fw(t,e,i,n){(!n||n.$from!==t.id)&&this._brushcontroller.setpanels(t.brushtargetmanager.makepanelopts(i)).enablebrush(t.brushoption).updatecovers(t.areas.slice())}function pw(t,e){ab[t]=e}function gw(t){return ab[t]}function mw(t,e,i){this.model=t,this.ecmodel=e,this.api=i,this._brushtype,this._brushmode}function vw(t,e){return t&&t.hasownproperty&&t.hasownproperty(e)}function yw(t,e,i,n){function a(t){return l[t]}function o(t,e){l[t]=e}for(var r=e.targetvisuals[n],s=kp.preparevisualtypes(r),l={color:t.getdata().getvisual("color")},u=0,h=s.length;h>u;u++){var c=s[u],d=r["opacity"===c?"__alphaforopacity":c];d&&d.applyvisual(i,a,o)}return l.color}function xw(t,e,i){if(i[0]===i[1])return i.slice();for(var n=200,a=(i[1]-i[0])/n,o=i[0],r=[],s=0;n>=s&&oc;c++)h[s[1-r][c]]=u[c],h[l[c]]=2===c?i[0]:n[l[c]];var d=[["x","width",3],["y","height",0]][r],f=vr(h,o,n.padding);return l[(f.margin[d[2]]||0)+f[d[0]]+.5*f[d[1]]<.5*o[d[1]]?0:1]}function ww(t,e){return f(t||[],function(t){null!=t.dataindex&&(t.dataindexinside=t.dataindex,t.dataindex=null),t.highlightkey="visualmap"+(e?e.componentindex:"")}),t}function bw(t,e,i,n){return new xi({shape:{points:t},draggable:!!i,cursor:e,drift:i,onmousemove:function(t){bb(t.event)},ondragend:n})}function sw(t,e){return 0===t?[[0,0],[e,0],[e,-e]]:[[0,0],[e,0],[e,e]]}function mw(t,e,i,n){return t?[[0,-ib(e,ab(i,0))],[db,0],[0,ib(e,ab(n-i,0))]]:[[0,0],[5,-5],[5,5]]}function iw(t,e,i){var n=tb/2,a=t.get("hoverlinkdatasize");return a&&(n=sb(a,e,i,!0)/2),n}function aw(t){var e=t.get("hoverlinkonhandle");return!!(null==e?t.get("realtime"):e)}function tw(t){return"vertical"===t?"ns-resize":"ew-resize"}function dw(t,e){var i=t.inverse;("vertical"===t.orient?!i:i)&&e.reverse()}function cw(t){return 0===t.indexof("my")}function lw(t){this.model=t}function kw(t){this.model=t}function pw(t){var e={},i=[],n=[];return t.eachrawseries(function(t){var a=t.coordinatesystem;if(!a||"cartesian2d"!==a.type&&"polar"!==a.type)i.push(t);else{var o=a.getbaseaxis();if("category"===o.type){var r=o.dim+"_"+o.index;e[r]||(e[r]={categoryaxis:o,valueaxis:a.getotheraxis(o),series:[]},n.push({axisdim:o.dim,axisindex:o.index})),e[r].series.push(t)}else i.push(t)}}),{seriesgroupbycategoryaxis:e,other:i,meta:n}}function ow(t){var e=[];return f(t,function(t){var i=t.categoryaxis,n=t.valueaxis,a=n.dim,o=[" "].concat(p(t.series,function(t){return t.name})),r=[i.model.getcategories()];f(t.series,function(t){r.push(t.getrawdata().maparray(a,function(t){return t}))});for(var s=[o.join(wb)],l=0;lr;r++)n[r]=arguments[r];i.push((o?o+wb:"")+n.join(wb))}),i.join("\n")}).join("\n\n"+fb+"\n\n")}function zw(t){var e=pw(t);return{value:m([ow(e.seriesgroupbycategoryaxis),nw(e.other)],function(t){return t.replace(/[\n\t\s]/g,"")}).join("\n\n"+fb+"\n\n"),meta:e.meta}}function rw(t){return t.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function ew(t){var e=t.slice(0,t.indexof("\n"));return e.indexof(wb)>=0?!0:void 0}function bw(t){for(var e=t.split(/\n+/g),i=rw(e.shift()).split(hb),n=[],a=p(i,function(t){return{name:t,data:[]}}),o=0;o=0;a--){var o=i[a];if(o[n])break}if(0>a){var r=t.querycomponents({maintype:"datazoom",subtype:"select",id:n})[0];if(r){var s=r.getpercentrange();i[0][n]={datazoomid:n,start:s[0],end:s[1]}}}}),i.push(e)}function zw(t){var e=yw(t),i=e[e.length-1];e.length>1&&e.pop();var n={};return zb(i,function(t,i){for(var a=e.length-1;a>=0;a--){var t=e[a][i];if(t){n[i]=t;break}}}),n}function xw(t){t[xb]=null}function uw(t){return yw(t).length}function yw(t){var e=t[xb];return e||(e=t[xb]=[{}]),e}function jw(t,e,i){(this._brushcontroller=new am(i.getzr())).on("brush",y(this._onbrush,this)).mount(),this._iszoomactive}function qw(t){var e={};return f(["xaxisindex","yaxisindex"],function(i){e[i]=t[i],null==e[i]&&(e[i]="all"),(e[i]===!1||"none"===e[i])&&(e[i]=[])}),e}function kw(t,e){t.seticonstatus("back",uw(e)>1?"emphasis":"normal")}function $w(t,e,i,n,a){var o=i._iszoomactive;n&&"takeglobalcursor"===n.type&&(o="datazoomselect"===n.key?n.datazoomselectactive:!1),i._iszoomactive=o,t.seticonstatus("zoom",o?"emphasis":"normal");var r=new j_(qw(t.option),e,{include:["grid"]});i._brushcontroller.setpanels(r.makepanelopts(a,function(t){return t.xaxisdeclared&&!t.yaxisdeclared?"linex":!t.xaxisdeclared&&t.yaxisdeclared?"liney":"rect"})).enablebrush(o?{brushtype:"auto",brushstyle:{linewidth:0,fill:"rgba(0,0,0,0.2)"}}:!1)}function jw(t){this.model=t}function qw(t,e,i,n){var a=i.type,o=qb.hasownproperty(a)?qb[a]:ro(a),r=new o(i);e.add(r),n.set(t,r),r.__ecgraphicid=t}function tb(t,e){var i=t&&t.parent;i&&("group"===t.type&&t.traverse(function(t){tb(t,e)}),e.removekey(t.__ecgraphicid),i.remove(t))}function eb(t){return t=r({},t),f(["id","parentid","$action","hv","bounding"].concat(ga),function(e){delete t[e]}),t}function ib(t,e){var i;return f(e,function(e){null!=t[e]&&"auto"!==t[e]&&(i=!0)}),i}function nb(t,e){var i=t.exist;if(e.id=t.keyinfo.id,!e.type&&i&&(e.type=i.type),null==e.parentid){var n=e.parentoption;n?e.parentid=n.id:i&&(e.parentid=i.parentid)}e.parentoption=null}function ab(t,e,i){var n=r({},i),o=t[e],s=i.$action||"merge";"merge"===s?o?(a(o,n,!0),wr(o,n,{ignoresize:!0}),zr(i,o)):t[e]=n:"replace"===s?t[e]=n:"remove"===s&&o&&(t[e]=null)}function ob(t,e){t&&(t.hv=e.hv=[ib(e,["left","right"]),ib(e,["top","bottom"])],"group"===t.type&&(null==t.width&&(t.width=e.width=0),null==t.height&&(t.height=e.height=0)))}function rb(t,e){var i=t.eventdata;t.silent||t.ignore||i||(i=t.eventdata={componenttype:"graphic",componentindex:e.componentindex,name:t.name}),i&&(i.info=t.info)}var sb=2311,lb=function(){return sb++},ub={};ub="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 hb=ub,cb={"[object function]":1,"[object regexp]":1,"[object date]":1,"[object error]":1,"[object canvasgradient]":1,"[object canvaspattern]":1,"[object image]":1,"[object canvas]":1},db={"[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},fb=object.prototype.tostring,pb=array.prototype,gb=pb.foreach,mb=pb.filter,vb=pb.slice,yb=pb.map,xb=pb.reduce,_b={},wb=function(){return _b.createcanvas()};_b.createcanvas=function(){return document.createelement("canvas")};var bb,sb="__ec_primitive__";e.prototype={constructor:e,get:function(t){return this.data.hasownproperty(t)?this.data[t]:null},set:function(t,e){return this.data[t]=e},each:function(t,e){void 0!==e&&(t=y(t,e));for(var i in this.data)this.data.hasownproperty(i)&&t(this.data[i],i)},removekey:function(t){delete this.data[t]}};var mb=(object.freeze||object)({$override:i,clone:n,merge:a,mergeall:o,extend:r,defaults:s,createcanvas:wb,getcontext:l,indexof:u,inherits:h,mixin:c,isarraylike:d,each:f,map:p,reduce:g,filter:m,find:v,bind:y,curry:x,isarray:_,isfunction:w,isstring:b,isobject:s,isbuiltinobject:m,istypedarray:i,isdom:a,eqnan:t,retrieve:d,retrieve2:c,retrieve3:l,slice:k,normalizecssarray:p,assert:o,trim:n,setasprimitive:z,isprimitive:r,createhashmap:b,concatarray:v,noop:g}),ib="undefined"==typeof float32array?array:float32array,ab=j,tb=q,db=ee,cb=ie,lb=(object.freeze||object)({create:f,copy:w,clone:h,set:z,add:x,scaleandadd:u,sub:y,len:j,length:ab,lensquare:q,lengthsquare:tb,mul:k,div:$,dot:j,scale:q,normalize:te,distance:ee,dist:db,distancesquare:ie,distsquare:cb,negate:ne,lerp:ae,applytransform:oe,min:re,max:se});le.prototype={constructor:le,_dragstart:function(t){var e=t.target;e&&e.draggable&&(this._draggingtarget=e,e.dragging=!0,this._x=t.offsetx,this._y=t.offsety,this.dispatchtoelement(ue(e,t),"dragstart",t.event))},_drag:function(t){var e=this._draggingtarget;if(e){var i=t.offsetx,n=t.offsety,a=i-this._x,o=n-this._y;this._x=i,this._y=n,e.drift(a,o,t),this.dispatchtoelement(ue(e,t),"drag",t.event);var r=this.findhover(i,n,e).target,s=this._droptarget;this._droptarget=r,e!==r&&(s&&r!==s&&this.dispatchtoelement(ue(s,t),"dragleave",t.event),r&&r!==s&&this.dispatchtoelement(ue(r,t),"dragenter",t.event))}},_dragend:function(t){var e=this._draggingtarget;e&&(e.dragging=!1),this.dispatchtoelement(ue(e,t),"dragend",t.event),this._droptarget&&this.dispatchtoelement(ue(this._droptarget,t),"drop",t.event),this._draggingtarget=null,this._droptarget=null}};var kb=array.prototype.slice,pb=function(t){this._$handlers={},this._$eventprocessor=t};pb.prototype={constructor:pb,one:function(t,e,i,n){return ce(this,t,e,i,n,!0)},on:function(t,e,i,n){return ce(this,t,e,i,n,!1)},issilent:function(t){var e=this._$handlers;return!e[t]||!e[t].length},off:function(t,e){var i=this._$handlers;if(!t)return this._$handlers={},this;if(e){if(i[t]){for(var n=[],a=0,o=i[t].length;o>a;a++)i[t][a].h!==e&&n.push(i[t][a]);i[t]=n}i[t]&&0===i[t].length&&delete i[t]}else delete i[t];return this},trigger:function(t){var e=this._$handlers[t],i=this._$eventprocessor;if(e){var n=arguments,a=n.length;a>3&&(n=kb.call(n,1));for(var o=e.length,r=0;o>r;){var s=e[r];if(i&&i.filter&&null!=s.query&&!i.filter(t,s.query))r++;else{switch(a){case 1:s.h.call(s.ctx);break;case 2:s.h.call(s.ctx,n[1]);break;case 3:s.h.call(s.ctx,n[1],n[2]);break;default:s.h.apply(s.ctx,n)}s.one?(e.splice(r,1),o--):r++}}}return i&&i.aftertrigger&&i.aftertrigger(t),this},triggerwithcontext:function(t){var e=this._$handlers[t],i=this._$eventprocessor;if(e){var n=arguments,a=n.length;a>4&&(n=kb.call(n,1,n.length-1));for(var o=n[n.length-1],r=e.length,s=0;r>s;){var l=e[s];if(i&&i.filter&&null!=l.query&&!i.filter(t,l.query))s++;else{switch(a){case 1:l.h.call(o);break;case 2:l.h.call(o,n[1]);break;case 3:l.h.call(o,n[1],n[2]);break;default:l.h.apply(o,n)}l.one?(e.splice(s,1),r--):s++}}}return i&&i.aftertrigger&&i.aftertrigger(t),this}};var ob=math.log(2),nb="undefined"!=typeof window&&!!window.addeventlistener,zb=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,rb="___zreventsaved",eb=[],bb=nb?function(t){t.preventdefault(),t.stoppropagation(),t.cancelbubble=!0}:function(t){t.returnvalue=!1,t.cancelbubble=!0},vb=function(){this._track=[]};vb.prototype={constructor:vb,recognize:function(t,e,i){return this._dotrack(t,e,i),this._recognize(t)},clear:function(){return this._track.length=0,this},_dotrack:function(t,e,i){var n=t.touches;if(n){for(var a={points:[],touches:[],target:e,event:t},o=0,r=n.length;r>o;o++){var s=n[o],l=pe(i,s,{});a.points.push([l.zrx,l.zry]),a.touches.push(s)}this._track.push(a)}},_recognize:function(t){for(var e in gb)if(gb.hasownproperty(e)){var i=gb[e](this._track,t);if(i)return i}}};var gb={pinch:function(t,e){var i=t.length;if(i){var n=(t[i-1]||{}).points,a=(t[i-2]||{}).points||n;if(a&&a.length>1&&n&&n.length>1){var o=be(n)/be(a);!isfinite(o)&&(o=1),e.pinchscale=o;var r=se(n);return e.pinchx=r[0],e.pinchy=r[1],{type:"pinch",target:t[0].target,event:e}}}}},fb="silent";ae.prototype.dispose=function(){};var wb=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],hb=function(t,e,i,n){pb.call(this),this.storage=t,this.painter=e,this.painterroot=n,i=i||new ae,this.proxy=null,this._hovered={},this._lasttouchmoment,this._lastx,this._lasty,this._gesturemgr,le.call(this),this.sethandlerproxy(i)};hb.prototype={constructor:hb,sethandlerproxy:function(t){this.proxy&&this.proxy.dispose(),t&&(f(wb,function(e){t.on&&t.on(e,this[e],this)},this),t.handler=this),this.proxy=t},mousemove:function(t){var e=t.zrx,i=t.zry,n=this._hovered,a=n.target;a&&!a.__zr&&(n=this.findhover(n.x,n.y),a=n.target);var o=this._hovered=this.findhover(e,i),r=o.target,s=this.proxy;s.setcursor&&s.setcursor(r?r.cursor:"default"),a&&r!==a&&this.dispatchtoelement(n,"mouseout",t),this.dispatchtoelement(o,"mousemove",t),r&&r!==a&&this.dispatchtoelement(o,"mouseover",t)},mouseout:function(t){this.dispatchtoelement(this._hovered,"mouseout",t);var e,i=t.toelement||t.relatedtarget;do i=i&&i.parentnode;while(i&&9!==i.nodetype&&!(e=i===this.painterroot));!e&&this.trigger("globalout",{event:t})},resize:function(){this._hovered={}},dispatch:function(t,e){var i=this[t];i&&i.call(this,e)},dispose:function(){this.proxy.dispose(),this.storage=this.proxy=this.painter=null},setcursorstyle:function(t){var e=this.proxy;e.setcursor&&e.setcursor(t)},dispatchtoelement:function(t,e,i){t=t||{};var n=t.target;if(!n||!n.silent){for(var a="on"+e,o=me(e,t,i);n&&(n[a]&&(o.cancelbubble=n[a].call(n,o)),n.trigger(e,o),n=n.parent,!o.cancelbubble););o.cancelbubble||(this.trigger(e,o),this.painter&&this.painter.eachotherlayer(function(t){"function"==typeof t[a]&&t[a].call(t,o),t.trigger&&t.trigger(e,o)}))}},findhover:function(t,e,i){for(var n=this.storage.getdisplaylist(),a={x:t,y:e},o=n.length-1;o>=0;o--){var r;if(n[o]!==i&&!n[o].ignore&&(r=te(n[o],t,e))&&(!a.toptarget&&(a.toptarget=n[o]),r!==fb)){a.target=n[o];break}}return a},processgesture:function(t,e){this._gesturemgr||(this._gesturemgr=new vb);var i=this._gesturemgr;"start"===e&&i.clear();var n=i.recognize(t,this.findhover(t.zrx,t.zry,null).target,this.proxy.dom);if("end"===e&&i.clear(),n){var a=n.type;t.gestureevent=a,this.dispatchtoelement({target:n.target},a,n.event)}}},f(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(t){hb.prototype[t]=function(e){var i=this.findhover(e.zrx,e.zry),n=i.target;if("mousedown"===t)this._downel=n,this._downpoint=[e.zrx,e.zry],this._upel=n;else if("mouseup"===t)this._upel=n;else if("click"===t){if(this._downel!==this._upel||!this._downpoint||db(this._downpoint,[e.zrx,e.zry])>4)return;this._downpoint=null}this.dispatchtoelement(i,t,e)}}),c(hb,pb),c(hb,le);var zb="undefined"==typeof float32array?array:float32array,xb=(object.freeze||object)({create:de,identity:ce,copy:le,mul:ke,translate:pe,rotate:oe,scale:ne,invert:ze,clone:re}),ub=ce,yb=5e-5,jb=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},qb=jb.prototype;qb.transform=null,qb.needlocaltransform=function(){return ee(this.rotation)||ee(this.position[0])||ee(this.position[1])||ee(this.scale[0]-1)||ee(this.scale[1]-1)};var kb=[];qb.updatetransform=function(){var t=this.parent,e=t&&t.transform,i=this.needlocaltransform(),n=this.transform;if(!i&&!e)return void(n&&ub(n));n=n||de(),i?this.getlocaltransform(n):ub(n),e&&(i?ke(n,t.transform,n):le(n,t.transform)),this.transform=n;var a=this.globalscaleratio;if(null!=a&&1!==a){this.getglobalscale(kb);var o=kb[0]<0?-1:1,r=kb[1]<0?-1:1,s=((kb[0]-o)*a+o)/kb[0]||0,l=((kb[1]-r)*a+r)/kb[1]||0;n[0]*=s,n[1]*=s,n[2]*=l,n[3]*=l}this.invtransform=this.invtransform||de(),ze(this.invtransform,n)},qb.getlocaltransform=function(t){return jb.getlocaltransform(this,t)},qb.settransform=function(t){var e=this.transform,i=t.dpr||1;e?t.settransform(i*e[0],i*e[1],i*e[2],i*e[3],i*e[4],i*e[5]):t.settransform(i,0,0,i,0,0)},qb.restoretransform=function(t){var e=t.dpr||1;t.settransform(e,0,0,e,0,0)};var $b=[],jb=de();qb.setlocaltransform=function(t){if(t){var e=t[0]*t[0]+t[1]*t[1],i=t[2]*t[2]+t[3]*t[3],n=this.position,a=this.scale;ee(e-1)&&(e=math.sqrt(e)),ee(i-1)&&(i=math.sqrt(i)),t[0]<0&&(e=-e),t[3]<0&&(i=-i),n[0]=t[4],n[1]=t[5],a[0]=e,a[1]=i,this.rotation=math.atan2(-t[1]/i,t[0]/e)}},qb.decomposetransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(ke($b,t.invtransform,e),e=$b);var i=this.origin;i&&(i[0]||i[1])&&(jb[4]=i[0],jb[5]=i[1],ke($b,e,jb),$b[4]-=i[0],$b[5]-=i[1],e=$b),this.setlocaltransform(e)}},qb.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)},qb.transformcoordtolocal=function(t,e){var i=[t,e],n=this.invtransform;return n&&oe(i,i,n),i},qb.transformcoordtoglobal=function(t,e){var i=[t,e],n=this.transform;return n&&oe(i,i,n),i},jb.getlocaltransform=function(t,e){e=e||[],ub(e);var i=t.origin,n=t.scale||[1,1],a=t.rotation||0,o=t.position||[0,0];return i&&(e[4]-=i[0],e[5]-=i[1]),ne(e,e,n),a&&oe(e,e,a),i&&(e[4]+=i[0],e[5]+=i[1]),e[4]+=o[0],e[5]+=o[1],e};var qb={linear:function(t){return t},quadraticin:function(t){return t*t},quadraticout:function(t){return t*(2-t)},quadraticinout:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicin:function(t){return t*t*t},cubicout:function(t){return--t*t*t+1},cubicinout:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},quarticin:function(t){return t*t*t*t},quarticout:function(t){return 1- --t*t*t*t},quarticinout:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},quinticin:function(t){return t*t*t*t*t},quinticout:function(t){return--t*t*t*t*t+1},quinticinout:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},sinusoidalin:function(t){return 1-math.cos(t*math.pi/2)},sinusoidalout:function(t){return math.sin(t*math.pi/2)},sinusoidalinout:function(t){return.5*(1-math.cos(math.pi*t))},exponentialin:function(t){return 0===t?0:math.pow(1024,t-1)},exponentialout:function(t){return 1===t?1:1-math.pow(2,-10*t)},exponentialinout:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*math.pow(1024,t-1):.5*(-math.pow(2,-10*(t-1))+2)},circularin:function(t){return 1-math.sqrt(1-t*t)},circularout:function(t){return math.sqrt(1- --t*t)},circularinout:function(t){return(t*=2)<1?-.5*(math.sqrt(1-t*t)-1):.5*(math.sqrt(1-(t-=2)*t)+1)},elasticin:function(t){var e,i=.1,n=.4;return 0===t?0:1===t?1:(!i||1>i?(i=1,e=n/4):e=n*math.asin(1/i)/(2*math.pi),-(i*math.pow(2,10*(t-=1))*math.sin(2*(t-e)*math.pi/n)))},elasticout:function(t){var e,i=.1,n=.4;return 0===t?0:1===t?1:(!i||1>i?(i=1,e=n/4):e=n*math.asin(1/i)/(2*math.pi),i*math.pow(2,-10*t)*math.sin(2*(t-e)*math.pi/n)+1)},elasticinout:function(t){var e,i=.1,n=.4;return 0===t?0:1===t?1:(!i||1>i?(i=1,e=n/4):e=n*math.asin(1/i)/(2*math.pi),(t*=2)<1?-.5*i*math.pow(2,10*(t-=1))*math.sin(2*(t-e)*math.pi/n):i*math.pow(2,-10*(t-=1))*math.sin(2*(t-e)*math.pi/n)*.5+1)},backin:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backout:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},backinout:function(t){var e=2.5949095;return(t*=2)<1?.5*t*t*((e+1)*t-e):.5*((t-=2)*t*((e+1)*t+e)+2)},bouncein:function(t){return 1-qb.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*qb.bouncein(2*t):.5*qb.bounceout(2*t-1)+.5}};be.prototype={constructor:be,step:function(t,e){if(this._initialized||(this._starttime=t+this._delay,this._initialized=!0),this._paused)return void(this._pausedtime+=e);var i=(t-this._starttime-this._pausedtime)/this._life;if(!(0>i)){i=math.min(i,1);var n=this.easing,a="string"==typeof n?qb[n]:n,o="function"==typeof a?a(i):i;return this.fire("frame",o),1===i?this.loop?(this.restart(t),"restart"):(this._needsremove=!0,"destroy"):null}},restart:function(t){var e=(t-this._starttime-this._pausedtime)%this._life;this._starttime=t-e+this.gap,this._pausedtime=0,this._needsremove=!1},fire:function(t,e){t="on"+t,this[t]&&this[t](this._target,e)},pause:function(){this._paused=!0},resume:function(){this._paused=!1}};var ts=function(){this.head=null,this.tail=null,this._len=0},es=ts.prototype;es.insert=function(t){var e=new is(t);return this.insertentry(e),e},es.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++},es.remove=function(t){var e=t.prev,i=t.next;e?e.next=i:this.head=i,i?i.prev=e:this.tail=e,t.next=t.prev=null,this._len--},es.len=function(){return this._len},es.clear=function(){this.head=this.tail=null,this._len=0};var is=function(t){this.value=t,this.next,this.prev},ns=function(t){this._list=new ts,this._map={},this._maxsize=t||10,this._lastremovedentry=null},as=ns.prototype;as.put=function(t,e){var i=this._list,n=this._map,a=null;if(null==n[t]){var o=i.len(),r=this._lastremovedentry;if(o>=this._maxsize&&o>0){var s=i.head;i.remove(s),delete n[s.key],a=s.value,this._lastremovedentry=s}r?r.value=e:r=new is(e),r.key=t,i.insertentry(r),n[t]=r}return a},as.get=function(t){var e=this._map[t],i=this._list;return null!=e?(e!==i.tail&&(i.remove(e),i.insertentry(e)),e.value):void 0},as.clear=function(){this._list.clear(),this._map={}};var os={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]},rs=new ns(20),ss=null,ls=ti,us=ei,hs=(object.freeze||object)({parse:qe,lift:je,tohex:qe,fastlerp:ti,fastmaptocolor:ls,lerp:ei,maptocolor:us,modifyhsl:ii,modifyalpha:ni,stringify:ai}),cs=array.prototype.slice,ds=function(t,e,i,n){this._tracks={},this._target=t,this._loop=e||!1,this._getter=i||oi,this._setter=n||ri,this._clipcount=0,this._delay=0,this._donelist=[],this._onframelist=[],this._cliplist=[] };ds.prototype={when:function(t,e){var i=this._tracks;for(var n in e)if(e.hasownproperty(n)){if(!i[n]){i[n]=[];var a=this._getter(this._target,n);if(null==a)continue;0!==t&&i[n].push({time:0,value:pi(a)})}i[n].push({time:t,value:e[n]})}return this},during:function(t){return this._onframelist.push(t),this},pause:function(){for(var t=0;ti;i++)t[i].call(this)},start:function(t,e){var i,n=this,a=0,o=function(){a--,a||n._donecallback()};for(var r in this._tracks)if(this._tracks.hasownproperty(r)){var s=vi(this,t,o,this._tracks[r],r,e);s&&(this._cliplist.push(s),a++,this.animation&&this.animation.addclip(s),i=s)}if(i){var l=i.onframe;i.onframe=function(t,e){l(t,e);for(var i=0;il;l++)s&&(s=s[r[l]]);s&&(i=s)}else i=a;if(!i)return void vs('property "'+t+'" is not existed in element '+a.id);var c=a.animators,d=new ds(i,e);return d.during(function(){a.dirty(n)}).done(function(){c.splice(u(c,d),1)}),c.push(d),o&&o.animation.addanimator(d),d},stopanimation:function(t){for(var e=this.animators,i=e.length,n=0;i>n;n++)e[n].stop(t);return e.length=0,this},animateto:function(t,e,i,n,a,o){yi(this,t,e,i,n,a,o)},animatefrom:function(t,e,i,n,a,o){yi(this,t,e,i,n,a,o,!0)}};var xs=function(t){jb.call(this,t),pb.call(this,t),ys.call(this,t),this.id=t.id||lb()};xs.prototype={type:"element",name:"",__zr:null,ignore:!1,clippath:null,isgroup:!1,drift:function(t,e){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0}var i=this.transform;i||(i=this.transform=[1,0,0,1,0,0]),i[4]+=t,i[5]+=e,this.decomposetransform(),this.dirty(!1)},beforeupdate:function(){},afterupdate:function(){},update:function(){this.updatetransform()},traverse:function(){},attrkv:function(t,e){if("position"===t||"scale"===t||"origin"===t){if(e){var i=this[t];i||(i=this[t]=[]),i[0]=e[0],i[1]=e[1]}}else this[t]=e},hide:function(){this.ignore=!0,this.__zr&&this.__zr.refresh()},show:function(){this.ignore=!1,this.__zr&&this.__zr.refresh()},attr:function(t,e){if("string"==typeof t)this.attrkv(t,e);else if(s(t))for(var i in t)t.hasownproperty(i)&&this.attrkv(i,t[i]);return this.dirty(!1),this},setclippath:function(t){var e=this.__zr;e&&t.addselftozr(e),this.clippath&&this.clippath!==t&&this.removeclippath(),this.clippath=t,t.__zr=e,t.__cliptarget=this,this.dirty(!1)},removeclippath:function(){var t=this.clippath;t&&(t.__zr&&t.removeselffromzr(t.__zr),t.__zr=null,t.__cliptarget=null,this.clippath=null,this.dirty(!1))},addselftozr:function(t){this.__zr=t;var e=this.animators;if(e)for(var i=0;in||i>s||l>o||a>u)},contain:function(t,e){var i=this;return t>=i.x&&t<=i.x+i.width&&e>=i.y&&e<=i.y+i.height},clone:function(){return new wi(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}}},wi.create=function(t){return new wi(t.x,t.y,t.width,t.height)};var ss=function(t){t=t||{},xs.call(this,t);for(var e in t)t.hasownproperty(e)&&(this[e]=t[e]);this._children=[],this.__storage=null,this.__dirty=!0};ss.prototype={constructor:ss,isgroup:!0,type:"group",silent:!1,children:function(){return this._children.slice()},childat:function(t){return this._children[t]},childofname:function(t){for(var e=this._children,i=0;i=0&&(i.splice(n,0,t),this._doadd(t))}return this},_doadd:function(t){t.parent&&t.parent.remove(t),t.parent=this;var e=this.__storage,i=this.__zr;e&&e!==t.__storage&&(e.addtostorage(t),t instanceof ss&&t.addchildrentostorage(e)),i&&i.refresh()},remove:function(t){var e=this.__zr,i=this.__storage,n=this._children,a=u(n,t);return 0>a?this:(n.splice(a,1),t.parent=null,i&&(i.delfromstorage(t),t instanceof ss&&t.delchildrenfromstorage(i)),e&&e.refresh(),this)},removeall:function(){var t,e,i=this._children,n=this.__storage;for(e=0;en;n++)this._updateandadddisplayable(e[n],null,t);i.length=this._displaylistlen,hb.canvassupported&&ci(i,li)},_updateandadddisplayable:function(t,e,i){if(!t.ignore||i){t.beforeupdate(),t.__dirty&&t.update(),t.afterupdate();var n=t.clippath;if(n){e=e?e.slice():[];for(var a=n,o=t;a;)a.parent=o,a.updatetransform(),e.push(a),o=a,a=a.clippath}if(t.isgroup){for(var r=t._children,s=0;se;e++)this.delroot(t[e]);else{var a=u(this._roots,t);a>=0&&(this.delfromstorage(t),this._roots.splice(a,1),t instanceof ss&&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:li};var ts={shadowblur:1,shadowoffsetx:1,shadowoffsety:1,textshadowblur:1,textshadowoffsetx:1,textshadowoffsety:1,textboxshadowblur:1,textboxshadowoffsetx:1,textboxshadowoffsety:1},ds=function(t,e,i){return ts.hasownproperty(e)?i*=t.dpr:i},cs={none:0,style_bind:1,plain_text:2},ls=9,ks=[["shadowblur",0],["shadowoffsetx",0],["shadowoffsety",0],["shadowcolor","#000"],["linecap","butt"],["linejoin","miter"],["miterlimit",10]],ps=function(t){this.extendfrom(t,!1)};ps.prototype={constructor:ps,fill:"#000",stroke:null,opacity:1,fillopacity:null,strokeopacity:null,linedash:null,linedashoffset:0,shadowblur:0,shadowoffsetx:0,shadowoffsety:0,linewidth:1,strokenoscale:!1,text:null,font:null,textfont:null,fontstyle:null,fontweight:null,fontsize:null,fontfamily:null,texttag:null,textfill:"#000",textstroke:null,textwidth:null,textheight:null,textstrokewidth:0,textlineheight:null,textposition:"inside",textrect:null,textoffset:null,textalign:null,textverticalalign:null,textdistance:5,textshadowcolor:"transparent",textshadowblur:0,textshadowoffsetx:0,textshadowoffsety:0,textboxshadowcolor:"transparent",textboxshadowblur:0,textboxshadowoffsetx:0,textboxshadowoffsety:0,transformtext:!1,textrotation:0,textorigin:null,textbackgroundcolor:null,textbordercolor:null,textborderwidth:0,textborderradius:0,textpadding:null,rich:null,truncate:null,blend:null,bind:function(t,e,i){var n=this,a=i&&i.style,o=!a||t.__attrcachedby!==cs.style_bind;t.__attrcachedby=cs.style_bind;for(var r=0;r0},extendfrom:function(t,e){if(t)for(var i in t)!t.hasownproperty(i)||e!==!0&&(e===!1?this.hasownproperty(i):null==t[i])||(this[i]=t[i])},set:function(t,e){"string"==typeof t?this[t]=e:this.extendfrom(t,!0)},clone:function(){var t=new this.constructor;return t.extendfrom(this,!0),t},getgradient:function(t,e,i){for(var n="radial"===e.type?pi:ki,a=n(t,e,i),o=e.colorstops,r=0;r=0&&i.splice(n,1),t.__hovermir=null},clearhover:function(){for(var t=this._hoverelements,e=0;ea;){var o=t[a],r=o.__from;r&&r.__zr?(a++,r.invisible||(o.transform=r.transform,o.invtransform=r.invtransform,o.__clippaths=r.__clippaths,this._dopaintel(o,i,!0,n))):(t.splice(a,1),r.__hovermir=null,e--)}i.ctx.restore()}},gethoverlayer:function(){return this.getlayer(tm)},_paintlist:function(t,e,i){if(this._redrawid===i){e=e||!1,this._updatelayerstatus(t);var n=this._dopaintlist(t,e);if(this._needsmanuallycompositing&&this._compositemanually(),!n){var a=this;bs(function(){a._paintlist(t,e,i)})}}},_compositemanually:function(){var t=this.getlayer(em).ctx,e=this._domroot.width,i=this._domroot.height;t.clearrect(0,0,e,i),this.eachbuiltinlayer(function(n){n.virtual&&t.drawimage(n.dom,0,0,e,i)})},_dopaintlist:function(t,e){for(var i=[],n=0;n15)break}}o.__drawindex=m,o.__drawindex0&&t>n[0]){for(r=0;a-1>r&&!(n[r]t);r++);o=i[n[r]]}if(n.splice(r+1,0,t),i[t]=e,!e.virtual)if(o){var l=o.dom;l.nextsibling?s.insertbefore(e.dom,l.nextsibling):s.appendchild(e.dom)}else s.firstchild?s.insertbefore(e.dom,s.firstchild):s.appendchild(e.dom)},eachlayer:function(t,e){var i,n,a=this._zlevellist;for(n=0;n0?im:0),this._needsmanuallycompositing),r.__builtin__||vs("zlevel "+s+" has been used by unkown layer "+r.id),r!==a&&(r.__used=!0,r.__startindex!==i&&(r.__dirty=!0),r.__startindex=i,r.__drawindex=r.incremental?-1:i,e(i),a=r),n.__dirty&&(r.__dirty=!0,r.incremental&&r.__drawindex<0&&(r.__drawindex=i))}e(i),this.eachbuiltinlayer(function(t){!t.__used&&t.getelementcount()>0&&(t.__dirty=!0,t.__startindex=t.__endindex=t.__drawindex=0),t.__dirty&&t.__drawindex<0&&(t.__drawindex=t.__startindex)})},clear:function(){return this.eachbuiltinlayer(this._clearlayer),this},_clearlayer:function(t){t.clear()},setbackgroundcolor:function(t){this._backgroundcolor=t},configlayer:function(t,e){if(e){var i=this._layerconfig;i[t]?a(i[t],e,!0):i[t]=e;for(var n=0;n=0&&this._clips.splice(e,1)},removeanimator:function(t){for(var e=t.getclips(),i=0;ir;r++){var s=i[r],l=s.step(t,e);l&&(a.push(l),o.push(s))}for(var r=0;n>r;)i[r]._needsremove?(i[r]=i[n-1],i.pop(),n--):r++;n=a.length;for(var r=0;n>r;r++)o[r].fire(a[r]);this._time=t,this.onframe(e),this.trigger("frame",e),this.stage.update&&this.stage.update()},_startloop:function(){function t(){e._running&&(bs(t),!e._paused&&e._update())}var e=this;this._running=!0,bs(t)},start:function(){this._time=(new date).gettime(),this._pausedtime=0,this._startloop()},stop:function(){this._running=!1},pause:function(){this._paused||(this._pausestart=(new date).gettime(),this._paused=!0)},resume:function(){this._paused&&(this._pausedtime+=(new date).gettime()-this._pausestart,this._paused=!1)},clear:function(){this._clips=[]},isfinished:function(){return!this._clips.length},animate:function(t,e){e=e||{};var i=new ds(t,e.loop,e.getter,e.setter);return this.addanimator(i),i}},c(sm,pb);var lm=300,um=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],hm=["touchstart","touchend","touchmove"],cm={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},dm=p(um,function(t){var e=t.replace("mouse","pointer");return cm[e]?e:t}),fm={mousemove:function(t){t=ye(this.dom,t),this.trigger("mousemove",t)},mouseout:function(t){t=ye(this.dom,t);var e=t.toelement||t.relatedtarget;if(e!==this.dom)for(;e&&9!==e.nodetype;){if(e===this.dom)return;e=e.parentnode}this.trigger("mouseout",t)},touchstart:function(t){t=ye(this.dom,t),t.zrbytouch=!0,this._lasttouchmoment=new date,this.handler.processgesture(this,t,"start"),fm.mousemove.call(this,t),fm.mousedown.call(this,t),kn(this)},touchmove:function(t){t=ye(this.dom,t),t.zrbytouch=!0,this.handler.processgesture(this,t,"change"),fm.mousemove.call(this,t),kn(this)},touchend:function(t){t=ye(this.dom,t),t.zrbytouch=!0,this.handler.processgesture(this,t,"end"),fm.mouseup.call(this,t),+new date-this._lasttouchmoment=0||n&&u(n,r)<0)){var s=e.getshallow(r);null!=s&&(a[t[o][0]]=s)}}return a}},km=lm([["linewidth","width"],["stroke","color"],["opacity"],["shadowblur"],["shadowoffsetx"],["shadowoffsety"],["shadowcolor"]]),pm={getlinestyle:function(t){var e=km(this,t);return e.linedash=this.getlinedash(e.linewidth),e},getlinedash:function(t){null==t&&(t=1);var e=this.get("type"),i=math.max(t,2),n=4*t;return"solid"===e||null==e?!1:"dashed"===e?[n,n]:[i,i]}},om=lm([["fill","color"],["shadowblur"],["shadowoffsetx"],["shadowoffsety"],["opacity"],["shadowcolor"]]),nm={getareastyle:function(t,e){return om(this,t,e)}},zm=math.pow,rm=math.sqrt,em=1e-8,bm=1e-4,vm=rm(3),gm=1/3,fm=f(),wm=f(),hm=f(),zm=math.min,xm=math.max,um=math.sin,ym=math.cos,jm=2*math.pi,qm=f(),km=f(),$m=f(),jm=[],qm=[],ti={m:1,l:2,c:3,q:4,a:5,z:6,r:7},ei=[],ii=[],ni=[],ai=[],oi=math.min,ri=math.max,si=math.cos,li=math.sin,ui=math.sqrt,hi=math.abs,ci="undefined"!=typeof float32array,di=function(t){this._savedata=!t,this._savedata&&(this.data=[]),this._ctx=null};di.prototype={constructor:di,_xi:0,_yi:0,_x0:0,_y0:0,_ux:0,_uy:0,_len:0,_linedash:null,_dashoffset:0,_dashidx:0,_dashsum:0,setscale:function(t,e,i){i=i||0,this._ux=hi(i/gs/t)||0,this._uy=hi(i/gs/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(ti.m,t,e),this._ctx&&this._ctx.moveto(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},lineto:function(t,e){var i=hi(t-this._xi)>this._ux||hi(e-this._yi)>this._uy||this._len<5;return this.adddata(ti.l,t,e),this._ctx&&i&&(this._needsdash()?this._dashedlineto(t,e):this._ctx.lineto(t,e)),i&&(this._xi=t,this._yi=e),this},beziercurveto:function(t,e,i,n,a,o){return this.adddata(ti.c,t,e,i,n,a,o),this._ctx&&(this._needsdash()?this._dashedbezierto(t,e,i,n,a,o):this._ctx.beziercurveto(t,e,i,n,a,o)),this._xi=a,this._yi=o,this},quadraticcurveto:function(t,e,i,n){return this.adddata(ti.q,t,e,i,n),this._ctx&&(this._needsdash()?this._dashedquadraticto(t,e,i,n):this._ctx.quadraticcurveto(t,e,i,n)),this._xi=i,this._yi=n,this},arc:function(t,e,i,n,a,o){return this.adddata(ti.a,t,e,i,i,n,a-n,0,o?0:1),this._ctx&&this._ctx.arc(t,e,i,n,a,o),this._xi=si(a)*i+t,this._yi=li(a)*i+e,this},arcto:function(t,e,i,n,a){return this._ctx&&this._ctx.arcto(t,e,i,n,a),this},rect:function(t,e,i,n){return this._ctx&&this._ctx.rect(t,e,i,n),this.adddata(ti.r,t,e,i,n),this},closepath:function(){this.adddata(ti.z);var t=this._ctx,e=this._x0,i=this._y0;return t&&(this._needsdash()&&this._dashedlineto(e,i),t.closepath()),this._xi=e,this._yi=i,this},fill:function(t){t&&t.fill(),this.tostatic()},stroke:function(t){t&&t.stroke(),this.tostatic()},setlinedash:function(t){if(t instanceof array){this._linedash=t,this._dashidx=0;for(var e=0,i=0;ii;i++)this.data[i]=t[i];this._len=e},appendpath:function(t){t instanceof array||(t=[t]);for(var e=t.length,i=0,n=this._len,a=0;e>a;a++)i+=t[a].len();ci&&this.data instanceof float32array&&(this.data=new float32array(n+i));for(var a=0;e>a;a++)for(var o=t[a].data,r=0;re.length&&(this._expanddata(),e=this.data);for(var i=0;io&&(o=a+o),o%=a,f-=o*h,p-=o*c;h>0&&t>=f||0>h&&f>=t||0===h&&(c>0&&e>=p||0>c&&p>=e);)n=this._dashidx,i=r[n],f+=h*i,p+=c*i,this._dashidx=(n+1)%g,h>0&&l>f||0>h&&f>l||c>0&&u>p||0>c&&p>u||s[n%2?"moveto":"lineto"](h>=0?oi(f,t):ri(f,t),c>=0?oi(p,e):ri(p,e));h=f-t,c=p-e,this._dashoffset=-ui(h*h+c*c)},_dashedbezierto:function(t,e,i,n,a,o){var r,s,l,u,h,c=this._dashsum,d=this._dashoffset,f=this._linedash,p=this._ctx,g=this._xi,m=this._yi,v=da,y=0,x=this._dashidx,_=f.length,w=0;for(0>d&&(d=c+d),d%=c,r=0;1>r;r+=.1)s=v(g,t,i,a,r+.1)-v(g,t,i,a,r),l=v(m,e,n,o,r+.1)-v(m,e,n,o,r),y+=ui(s*s+l*l);for(;_>x&&(w+=f[x],!(w>d));x++);for(r=(w-d)/y;1>=r;)u=v(g,t,i,a,r),h=v(m,e,n,o,r),x%2?p.moveto(u,h):p.lineto(u,h),r+=f[x]/y,x=(x+1)%_;x%2!==0&&p.lineto(a,o),s=a-u,l=o-h,this._dashoffset=-ui(s*s+l*l)},_dashedquadraticto:function(t,e,i,n){var a=i,o=n;i=(i+2*t)/3,n=(n+2*e)/3,t=(this._xi+2*t)/3,e=(this._yi+2*e)/3,this._dashedbezierto(t,e,i,n,a,o)},tostatic:function(){var t=this.data;t instanceof array&&(t.length=this._len,ci&&(this.data=new float32array(t)))},getboundingrect:function(){ei[0]=ei[1]=ni[0]=ni[1]=number.max_value,ii[0]=ii[1]=ai[0]=ai[1]=-number.max_value;for(var t=this.data,e=0,i=0,n=0,a=0,o=0;oc;){var d=s[c++];switch(1===c&&(n=s[c],a=s[c+1],e=n,i=a),d){case ti.m:e=n=s[c++],i=a=s[c++],t.moveto(n,a);break;case ti.l:o=s[c++],r=s[c++],(hi(o-n)>l||hi(r-a)>u||c===h-1)&&(t.lineto(o,r),n=o,a=r);break;case ti.c:t.beziercurveto(s[c++],s[c++],s[c++],s[c++],s[c++],s[c++]),n=s[c-2],a=s[c-1];break;case ti.q:t.quadraticcurveto(s[c++],s[c++],s[c++],s[c++]),n=s[c-2],a=s[c-1];break;case ti.a:var f=s[c++],p=s[c++],g=s[c++],m=s[c++],v=s[c++],y=s[c++],x=s[c++],_=s[c++],w=g>m?g:m,b=g>m?1:g/m,s=g>m?m/g:1,m=math.abs(g-m)>.001,i=v+y;m?(t.translate(f,p),t.rotate(x),t.scale(b,s),t.arc(0,0,w,v,i,1-_),t.scale(1/b,1/s),t.rotate(-x),t.translate(-f,-p)):t.arc(f,p,w,v,i,1-_),1===c&&(e=si(v)*g+f,i=li(v)*m+p),n=si(i)*g+f,a=li(i)*m+p;break;case ti.r:e=n=s[c],i=a=s[c+1],t.rect(s[c++],s[c++],s[c++],s[c++]);break;case ti.z:t.closepath(),n=e,a=i}}}},di.cmd=ti;var fi=2*math.pi,pi=2*math.pi,gi=di.cmd,mi=2*math.pi,vi=1e-4,yi=[-1,-1,-1],xi=[-1,-1],_i=rs.prototype.getcanvaspattern,wi=math.abs,bi=new di(!0);ha.prototype={constructor:ha,type:"path",__dirtypath:!0,strokecontainthreshold:5,segmentignorethreshold:0,subpixeloptimize:!1,brush:function(t,e){var i=this.style,n=this.path||bi,a=i.hasstroke(),o=i.hasfill(),r=i.fill,s=i.stroke,l=o&&!!r.colorstops,u=a&&!!s.colorstops,h=o&&!!r.image,c=a&&!!s.image;if(i.bind(t,this,e),this.settransform(t),this.__dirty){var d;l&&(d=d||this.getboundingrect(),this._fillgradient=i.getgradient(t,r,d)),u&&(d=d||this.getboundingrect(),this._strokegradient=i.getgradient(t,s,d))}l?t.fillstyle=this._fillgradient:h&&(t.fillstyle=_i.call(r,t)),u?t.strokestyle=this._strokegradient:c&&(t.strokestyle=_i.call(s,t));var f=i.linedash,p=i.linedashoffset,g=!!t.setlinedash,m=this.getglobalscale();if(n.setscale(m[0],m[1],this.segmentignorethreshold),this.__dirtypath||f&&!g&&a?(n.beginpath(t),f&&!g&&(n.setlinedash(f),n.setlinedashoffset(p)),this.buildpath(n,this.shape,!1),this.path&&(this.__dirtypath=!1)):(t.beginpath(),this.path.rebuildpath(t)),o)if(null!=i.fillopacity){var v=t.globalalpha;t.globalalpha=i.fillopacity*i.opacity,n.fill(t),t.globalalpha=v}else n.fill(t);if(f&&g&&(t.setlinedash(f),t.linedashoffset=p),a)if(null!=i.strokeopacity){var v=t.globalalpha;t.globalalpha=i.strokeopacity*i.opacity,n.stroke(t),t.globalalpha=v}else n.stroke(t);f&&g&&t.setlinedash([]),null!=i.text&&(this.restoretransform(t),this.drawrecttext(t,this.getboundingrect()))},buildpath:function(){},createpathproxy:function(){this.path=new di},getboundingrect:function(){var t=this._rect,e=this.style,i=!t;if(i){var n=this.path;n||(n=this.path=new di),this.__dirtypath&&(n.beginpath(),this.buildpath(n,this.shape,!1)),t=n.getboundingrect()}if(this._rect=t,e.hasstroke()){var a=this._rectwithstroke||(this._rectwithstroke=t.clone());if(this.__dirty||i){a.copy(t);var o=e.linewidth,r=e.strokenoscale?this.getlinescale():1;e.hasfill()||(o=math.max(o,this.strokecontainthreshold||4)),r>1e-10&&(a.width+=o/r,a.height+=o/r,a.x-=o/r/2,a.y-=o/r/2)}return a}return t},contain:function(t,e){var i=this.transformcoordtolocal(t,e),n=this.getboundingrect(),a=this.style;if(t=i[0],e=i[1],n.contain(t,e)){var o=this.path.data;if(a.hasstroke()){var r=a.linewidth,s=a.strokenoscale?this.getlinescale():1;if(s>1e-10&&(a.hasfill()||(r=math.max(r,this.strokecontainthreshold)),wa(o,r/s,t,e)))return!0}if(a.hasfill())return fa(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):bn.prototype.attrkv.call(this,t,e)},setshape:function(t,e){var i=this.shape;if(i){if(s(t))for(var n in t)t.hasownproperty(n)&&(i[n]=t[n]);else i[t]=e;this.dirty(!0)}return this},getlinescale:function(){var t=this.transform;return t&&wi(t[0]-1)>1e-10&&wi(t[3]-1)>1e-10?math.sqrt(wi(t[0]*t[3]-t[2]*t[1])):1}},ha.extend=function(t){var e=function(e){ha.call(this,e),t.style&&this.style.extendfrom(t.style,!1);var i=t.shape;if(i){this.shape=this.shape||{};var n=this.shape;for(var a in i)!n.hasownproperty(a)&&i.hasownproperty(a)&&(n[a]=i[a])}t.init&&t.init.call(this,e)};h(e,ha);for(var i in t)"style"!==i&&"shape"!==i&&(e.prototype[i]=t[i]);return e},h(ha,bn);var si=di.cmd,mi=[[],[],[]],ii=math.sqrt,ai=math.atan2,ti=function(t,e){var i,n,a,o,r,s,l=t.data,u=si.m,h=si.c,c=si.l,d=si.r,f=si.a,p=si.q;for(a=0,o=0;ar;r++){var s=mi[r];s[0]=l[a++],s[1]=l[a++],oe(s,s,e),l[o++]=s[0],l[o++]=s[1]}}},di=math.sqrt,ci=math.sin,li=math.cos,ki=math.pi,pi=function(t){return math.sqrt(t[0]*t[0]+t[1]*t[1])},oi=function(t,e){return(t[0]*e[0]+t[1]*e[1])/(pi(t)*pi(e))},ni=function(t,e){return(t[0]*e[1]=11?function(){var e,i=this.__clippaths,n=this.style;if(i)for(var a=0;ao;o++)a+=ee(t[o-1],t[o]);var r=a/2;r=i>r?i:r;for(var o=0;r>o;o++){var s,l,u,h=o/(r-1)*(e?i:i-1),c=math.floor(h),d=h-c,f=t[c%i];e?(s=t[(c-1+i)%i],l=t[(c+1)%i],u=t[(c+2)%i]):(s=t[0===c?c:c-1],l=t[c>i-2?i-1:c+1],u=t[c>i-3?i-1:c+2]);var p=d*d,g=d*p;n.push([ka(s[0],f[0],l[0],u[0],d,p,g),ka(s[1],f[1],l[1],u[1],d,p,g)])}return n},zi=function(t,e,i,n){var a,o,r,s,l=[],u=[],h=[],c=[];if(n){r=[1/0,1/0],s=[-1/0,-1/0];for(var d=0,f=t.length;f>d;d++)re(r,r,t[d]),se(s,s,t[d]);re(r,r,n[0]),se(s,s,n[1])}for(var d=0,f=t.length;f>d;d++){var p=t[d];if(i)a=t[d?d-1:f-1],o=t[(d+1)%f];else{if(0===d||d===f-1){l.push(h(t[d]));continue}a=t[d-1],o=t[d+1]}y(u,o,a),q(u,u,e);var g=ee(p,a),m=ee(p,o),v=g+m;0!==v&&(g/=v,m/=v),q(h,u,-g),q(c,u,m);var y=x([],p,h),x=x([],p,c);n&&(se(y,y,r),re(y,y,s),se(x,x,r),re(x,x,s)),l.push(y),l.push(x)}return i&&l.push(l.shift()),l},xi=ha.extend({type:"polygon",shape:{points:null,smooth:!1,smoothconstraint:null},buildpath:function(t,e){$a(t,e,!0)}}),ui=ha.extend({type:"polyline",shape:{points:null,smooth:!1,smoothconstraint:null},style:{stroke:"#000",fill:null},buildpath:function(t,e){$a(t,e,!1)}}),yi=math.round,ji={},qi=ha.extend({type:"rect",shape:{r:0,x:0,y:0,width:0,height:0},buildpath:function(t,e){var i,n,a,o;this.subpixeloptimize?(qa(ji,e,this.style),i=ji.x,n=ji.y,a=ji.width,o=ji.height,ji.r=e.r,e=ji):(i=e.x,n=e.y,a=e.width,o=e.height),e.r?nn(t,e):t.rect(i,n,a,o),t.closepath()}}),ki={},$i=ha.extend({type:"line",shape:{x1:0,y1:0,x2:0,y2:0,percent:1},style:{stroke:"#000",fill:null},buildpath:function(t,e){var i,n,a,o;this.subpixeloptimize?(ja(ki,e,this.style),i=ki.x1,n=ki.y1,a=ki.x2,o=ki.y2):(i=e.x1,n=e.y1,a=e.x2,o=e.y2);var r=e.percent;0!==r&&(t.moveto(i,n),1>r&&(a=i*(1-r)+a*r,o=n*(1-r)+o*r),t.lineto(a,o))},pointat:function(t){var e=this.shape;return[e.x1*(1-t)+e.x2*t,e.y1*(1-t)+e.y2*t]}}),ji=[],qi=ha.extend({type:"bezier-curve",shape:{x1:0,y1:0,x2:0,y2:0,cpx1:0,cpy1:0,percent:1},style:{stroke:"#000",fill:null},buildpath:function(t,e){var i=e.x1,n=e.y1,a=e.x2,o=e.y2,r=e.cpx1,s=e.cpy1,l=e.cpx2,u=e.cpy2,h=e.percent;0!==h&&(t.moveto(i,n),null==l||null==u?(1>h&&(ba(i,r,a,h,ji),r=ji[1],a=ji[2],ba(n,s,o,h,ji),s=ji[1],o=ji[2]),t.quadraticcurveto(r,s,a,o)):(1>h&&(ma(i,r,l,a,h,ji),r=ji[1],l=ji[2],a=ji[3],ma(n,s,u,o,h,ji),s=ji[1],u=ji[2],o=ji[3]),t.beziercurveto(r,s,l,u,a,o)))},pointat:function(t){return eo(this.shape,t,!1)},tangentat:function(t){var e=eo(this.shape,t,!0);return te(e,e)}}),ta=ha.extend({type:"arc",shape:{cx:0,cy:0,r:0,startangle:0,endangle:2*math.pi,clockwise:!0},style:{stroke:"#000",fill:null},buildpath:function(t,e){var i=e.cx,n=e.cy,a=math.max(e.r,0),o=e.startangle,r=e.endangle,s=e.clockwise,l=math.cos(o),u=math.sin(o);t.moveto(l*a+i,u*a+n),t.arc(i,n,a,o,r,!s)}}),ea=ha.extend({type:"compound",shape:{paths:null},_updatepathdirty:function(){for(var t=this.__dirtypath,e=this.shape.paths,i=0;i"'])/g,na={"&":"&","<":"<",">":">",'"':""","'":"'"},za=["a","b","c","d","e","f","g"],ra=function(t,e){return"{"+t+(null==e?"":e)+"}"},ea=ui,ba=(object.freeze||object)({addcommas:ar,tocamelcase:tr,normalizecssarray:pa,encodehtml:dr,formattpl:cr,formattplsimple:lr,gettooltipmarker:kr,formattime:or,capitalfirst:nr,truncatetext:ea,gettextboundingrect:zr,gettextrect:rr}),va=f,ga=["left","right","top","bottom","width","height"],fa=[["width","left","right"],["height","top","bottom"]],wa=er,ha=(x(er,"vertical"),x(er,"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")}}}),za=kn(),xa=ir.extend({type:"component",id:"",name:"",maintype:"",subtype:"",componentindex:0,defaultoption:null,ecmodel:null,dependentmodels:[],uid:null,layoutmode:null,$constructor:function(t,e,i,n){ir.call(this,t,e,i,n),this.uid=or("ec_cpt_model")},init:function(t,e,i){this.mergedefaultandtheme(t,i)},mergedefaultandtheme:function(t,e){var i=this.layoutmode,n=i?hr(t):{},o=e.gettheme();a(t,o.get(this.maintype)),a(t,this.getdefaultoption()),i&&wr(t,n,i)},mergeoption:function(t){a(this.option,t,!0);var e=this.layoutmode;e&&wr(this.option,t,e)},optionupdated:function(){},getdefaultoption:function(){var t=za(this);if(!t.defaultoption){for(var e=[],i=this.constructor;i;){var n=i.prototype.defaultoption;n&&e.push(n),i=i.superclass}for(var o={},r=e.length-1;r>=0;r--)o=a(o,e[r],!0);t.defaultoption=o}return t.defaultoption},getreferringcomponents:function(t){return this.ecmodel.querycomponents({maintype:t,index:this.get(t+"index",!0),id:this.get(t+"id",!0)})}});ua(xa,{registerwhenextend:!0}),rr(xa),sr(xa,xr),c(xa,ha);var ua="";"undefined"!=typeof navigator&&(ua=navigator.platform||"");var ya={color:["#c23531","#2f4554","#61a0a8","#d48265","#91c7ae","#749f83","#ca8622","#bda29a","#6e7074","#546570","#c4ccd3"],gradientcolor:["#f6efa6","#d88273","#bf444c"],textstyle:{fontfamily:ua.match(/^win/)?"microsoft yahei":"sans-serif",fontsize:12,fontstyle:"normal",fontweight:"normal"},blendmode:null,animation:"auto",animationduration:1e3,animationdurationupdate:300,animationeasing:"exponentialout",animationeasingupdate:"cubicout",animationthreshold:2e3,progressivethreshold:3e3,progressive:400,hoverlayerthreshold:3e3,useutc:!1},ja=kn(),qa={clearcolorpalette:function(){ja(this).coloridx=0,ja(this).colornamemap={}},getcolorfrompalette:function(t,e,i){e=e||this;var n=ja(e),a=n.coloridx||0,o=n.colornamemap=n.colornamemap||{};if(o.hasownproperty(t))return o[t];var r=gn(this.get("color",!0)),s=this.get("colorlayer",!0),l=null!=i&&s?ur(s,i):r;if(l=l||r,l&&l.length){var u=l[a];return t&&(o[t]=u),n.coloridx=(a+1)%l.length,u}}},ka={cartesian2d:function(t,e,i,n){var a=t.getreferringcomponents("xaxis")[0],o=t.getreferringcomponents("yaxis")[0];e.coordsysdims=["x","y"],i.set("x",a),i.set("y",o),jr(a)&&(n.set("x",a),e.firstcategorydimindex=0),jr(o)&&(n.set("y",o),e.firstcategorydimindex=1)},singleaxis:function(t,e,i,n){var a=t.getreferringcomponents("singleaxis")[0];e.coordsysdims=["single"],i.set("single",a),jr(a)&&(n.set("single",a),e.firstcategorydimindex=0)},polar:function(t,e,i,n){var a=t.getreferringcomponents("polar")[0],o=a.findaxismodel("radiusaxis"),r=a.findaxismodel("angleaxis");e.coordsysdims=["radius","angle"],i.set("radius",o),i.set("angle",r),jr(o)&&(n.set("radius",o),e.firstcategorydimindex=0),jr(r)&&(n.set("angle",r),e.firstcategorydimindex=1)},geo:function(t,e){e.coordsysdims=["lng","lat"]},parallel:function(t,e,i,n){var a=t.ecmodel,o=a.getcomponent("parallel",t.get("parallelindex")),r=e.coordsysdims=o.dimensions.slice();f(o.parallelaxisindex,function(t,o){var s=a.getcomponent("parallelaxis",t),l=r[o];i.set(l,s),jr(s)&&null==e.firstcategorydimindex&&(n.set(l,s),e.firstcategorydimindex=o)})}},$a="original",ja="arrayrows",qa="objectrows",tt="keyedcolumns",et="unknown",it="typedarray",nt="column",at="row";qr.seriesdatatosource=function(t){return new qr({data:t,sourceformat:i(t)?it:$a,fromdataset:!1})},ra(qr);var ot=kn(),rt="\x00_ec_inner",st=ir.extend({init:function(t,e,i,n){i=i||{},this.option=null,this._theme=new ir(i),this._optionmanager=n},setoption:function(t,e){o(!(rt in t),"please use chart.getoption()"),this._optionmanager.setoption(t,e),this.resetoption(null)},resetoption:function(t){var e=!1,i=this._optionmanager;if(!t||"recreate"===t){var n=i.mountoption("recreate"===t);this.option&&"recreate"!==t?(this.restoredata(),this.mergeoption(n)):hs.call(this,n),e=!0}if(("timeline"===t||"media"===t)&&this.restoredata(),!t||"recreate"===t||"timeline"===t){var a=i.gettimelineoption(this);a&&(this.mergeoption(a),e=!0)}if(!t||"recreate"===t||"media"===t){var o=i.getmediaoption(this,this._api);o.length&&f(o,function(t){this.mergeoption(t,e=!0)},this)}return e},mergeoption:function(t){function e(e,n){var a=gn(t[e]),s=zn(o.get(e),a);xn(s),f(s,function(t){var i=t.option;s(i)&&(t.keyinfo.maintype=e,t.keyinfo.subtype=ds(e,i,t.exist))});var l=cs(o,n);i[e]=[],o.set(e,[]),f(s,function(t,n){var a=t.exist,s=t.option;if(o(s(s)||a,"empty component definition"),s){var u=xa.getclass(e,t.keyinfo.subtype,!0);if(a&&a instanceof u)a.name=t.keyinfo.name,a.mergeoption(s,this),a.optionupdated(s,!1);else{var h=r({dependentmodels:l,componentindex:n},t.keyinfo);a=new u(s,this,this,h),r(a,h),a.init(s,this,this,h),a.optionupdated(null,!0)}}else a.mergeoption({},this),a.optionupdated({},!1);o.get(e)[n]=a,i[e][n]=a.option},this),"series"===e&&fs(this,o.get("series"))}var i=this.option,o=this._componentsmap,s=[];jr(this),f(t,function(t,e){null!=t&&(xa.hasclass(e)?e&&s.push(e):i[e]=null==i[e]?n(t):a(i[e],t,!0))}),xa.topologicaltravel(s,xa.getallclassmaintypes(),e,this),this._seriesindicesmap=b(this._seriesindices=this._seriesindices||[])},getoption:function(){var t=n(this.option);return f(t,function(e,i){if(xa.hasclass(i)){for(var e=gn(e),n=e.length-1;n>=0;n--)yn(e[n])&&e.splice(n,1);t[i]=e}}),delete t[rt],t},gettheme:function(){return this._theme},getcomponent:function(t,e){var i=this._componentsmap.get(t);return i?i[e||0]:void 0},querycomponents:function(t){var e=t.maintype;if(!e)return[];var i=t.index,n=t.id,a=t.name,o=this._componentsmap.get(e);if(!o||!o.length)return[];var r;if(null!=i)_(i)||(i=[i]),r=m(p(i,function(t){return o[t]}),function(t){return!!t});else if(null!=n){var s=_(n);r=m(o,function(t){return s&&u(n,t.id)>=0||!s&&t.id===n})}else if(null!=a){var l=_(a);r=m(o,function(t){return l&&u(a,t.name)>=0||!l&&t.name===a})}else r=o.slice();return ps(r,t)},findcomponents:function(t){function e(t){var e=a+"index",i=a+"id",n=a+"name";return!t||null==t[e]&&null==t[i]&&null==t[n]?null:{maintype:a,index:t[e],id:t[i],name:t[n]}}function i(e){return t.filter?m(e,t.filter):e}var n=t.query,a=t.maintype,o=e(n),r=o?this.querycomponents(o):this._componentsmap.get(a);return i(ps(r,t))},eachcomponent:function(t,e,i){var n=this._componentsmap;if("function"==typeof t)i=e,e=t,n.each(function(t,n){f(t,function(t,a){e.call(i,n,t,a)})});else if(b(t))f(n.get(t),e,i);else if(s(t)){var a=this.findcomponents(t);f(a,e,i)}},getseriesbyname:function(t){var e=this._componentsmap.get("series");return m(e,function(e){return e.name===t})},getseriesbyindex:function(t){return this._componentsmap.get("series")[t]},getseriesbytype:function(t){var e=this._componentsmap.get("series");return m(e,function(e){return e.subtype===t})},getseries:function(){return this._componentsmap.get("series").slice()},getseriescount:function(){return this._componentsmap.get("series").length},eachseries:function(t,e){f(this._seriesindices,function(i){var n=this._componentsmap.get("series")[i];t.call(e,n,i)},this)},eachrawseries:function(t,e){f(this._componentsmap.get("series"),t,e)},eachseriesbytype:function(t,e,i){f(this._seriesindices,function(n){var a=this._componentsmap.get("series")[n];a.subtype===t&&e.call(i,a,n)},this)},eachrawseriesbytype:function(t,e,i){return f(this.getseriesbytype(t),e,i)},isseriesfiltered:function(t){return null==this._seriesindicesmap.get(t.componentindex)},getcurrentseriesindices:function(){return(this._seriesindices||[]).slice()},filterseries:function(t,e){var i=m(this._componentsmap.get("series"),t,e);fs(this,i)},restoredata:function(t){var e=this._componentsmap;fs(this,e.get("series"));var i=[];e.each(function(t,e){i.push(e)}),xa.topologicaltravel(i,xa.getallclassmaintypes(),function(i){f(e.get(i),function(e){("series"!==i||!ls(e,t))&&e.restoredata()})})}});c(st,qa);var lt=["getdom","getzr","getwidth","getheight","getdevicepixelratio","dispatchaction","isdisposed","on","off","getdataurl","getconnecteddataurl","getmodel","getoption","getviewofcomponentmodel","getviewofseriesmodel"],ut={};ms.prototype={constructor:ms,create:function(t,e){var i=[];f(ut,function(n){var a=n.create(t,e);i=i.concat(a||[])}),this._coordinatesystems=i},update:function(t,e){f(this._coordinatesystems,function(i){i.update&&i.update(t,e) })},getcoordinatesystems:function(){return this._coordinatesystems.slice()}},ms.register=function(t,e){ut[t]=e},ms.get=function(t){return ut[t]};var ht=f,ct=n,dt=p,ft=a,pt=/^(min|max)?(.+)$/;vs.prototype={constructor:vs,setoption:function(t,e){t&&f(gn(t.series),function(t){t&&t.data&&i(t.data)&&z(t.data)}),t=ct(t);var i=this._optionbackup,n=ys.call(this,t,e,!i);this._newbaseoption=n.baseoption,i?(bs(i.baseoption,n.baseoption),n.timelineoptions.length&&(i.timelineoptions=n.timelineoptions),n.medialist.length&&(i.medialist=n.medialist),n.mediadefault&&(i.mediadefault=n.mediadefault)):this._optionbackup=n},mountoption:function(t){var e=this._optionbackup;return this._timelineoptions=dt(e.timelineoptions,ct),this._medialist=dt(e.medialist,ct),this._mediadefault=ct(e.mediadefault),this._currentmediaindices=[],ct(t?e.baseoption:this._newbaseoption)},gettimelineoption:function(t){var e,i=this._timelineoptions;if(i.length){var n=t.getcomponent("timeline");n&&(e=ct(i[n.getcurrentindex()],!0))}return e},getmediaoption:function(){var t=this._api.getwidth(),e=this._api.getheight(),i=this._medialist,n=this._mediadefault,a=[],o=[];if(!i.length&&!n)return o;for(var r=0,s=i.length;s>r;r++)xs(i[r].query,t,e)&&a.push(r);return!a.length&&n&&(a=[-1]),a.length&&!ws(a,this._currentmediaindices)&&(o=dt(a,function(t){return ct(-1===t?n.option:i[t].option)})),this._currentmediaindices=a,o}};var gt=f,mt=s,vt=["areastyle","linestyle","nodestyle","linkstyle","chordstyle","label","labelline"],yt=function(t,e){gt(cs(t.series),function(t){mt(t)&&ds(t)});var i=["xaxis","yaxis","radiusaxis","angleaxis","singleaxis","parallelaxis","radar"];e&&i.push("valueaxis","categoryaxis","logaxis","timeaxis"),gt(i,function(e){gt(cs(t[e]),function(t){t&&(as(t,"axislabel"),as(t.axispointer,"label"))})}),gt(cs(t.parallel),function(t){var e=t&&t.parallelaxisdefault;as(e,"axislabel"),as(e&&e.axispointer,"label")}),gt(cs(t.calendar),function(t){ms(t,"itemstyle"),as(t,"daylabel"),as(t,"monthlabel"),as(t,"yearlabel")}),gt(cs(t.radar),function(t){as(t,"name")}),gt(cs(t.geo),function(t){mt(t)&&(ts(t),gt(cs(t.regions),function(t){ts(t)}))}),gt(cs(t.timeline),function(t){ts(t),ms(t,"label"),ms(t,"itemstyle"),ms(t,"controlstyle",!0);var e=t.data;_(e)&&f(e,function(t){s(t)&&(ms(t,"label"),ms(t,"itemstyle"))})}),gt(cs(t.toolbox),function(t){ms(t,"iconstyle"),gt(t.feature,function(t){ms(t,"iconstyle")})}),as(ls(t.axispointer),"label"),as(ls(t.tooltip).axispointer,"label")},xt=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],_t=["grid","geo","parallel","legend","toolbox","title","visualmap","datazoom","timeline"],wt=function(t,e){yt(t,e),t.series=gn(t.series),f(t.series,function(t){if(s(t)){var e=t.type;if("line"===e)null!=t.clipoverflow&&(t.clip=t.clipoverflow);else if("pie"===e||"gauge"===e)null!=t.clockwise&&(t.clockwise=t.clockwise);else if("gauge"===e){var i=ks(t,"pointer.color");null!=i&&ps(t,"itemstyle.color",i)}os(t)}}),t.datarange&&(t.visualmap=t.datarange),f(_t,function(e){var i=t[e];i&&(_(i)||(i=[i]),f(i,function(t){os(t)}))})},bt=function(t){var e=b();t.eachseries(function(t){var i=t.get("stack");if(i){var n=e.get(i)||e.set(i,[]),a=t.getdata(),o={stackresultdimension:a.getcalculationinfo("stackresultdimension"),stackedoverdimension:a.getcalculationinfo("stackedoverdimension"),stackeddimension:a.getcalculationinfo("stackeddimension"),stackedbydimension:a.getcalculationinfo("stackedbydimension"),isstackedbyindex:a.getcalculationinfo("isstackedbyindex"),data:a,seriesmodel:t};if(!o.stackeddimension||!o.isstackedbyindex&&!o.stackedbydimension)return;n.length&&a.setcalculationinfo("stackedonseries",n[n.length-1].seriesmodel),n.push(o)}}),e.each(ns)},st=zs.prototype;st.pure=!1,st.persistent=!0,st.getsource=function(){return this._source};var mt={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:bs},arrayrows_row:{pure:!0,count:function(){var t=this._data[0];return t?math.max(0,t.length-this._source.startindex):0},getitem:function(t){t+=this._source.startindex;for(var e=[],i=this._data,n=0;n=1)&&(t=1),t}var i=this._upstream,n=t&&t.skip;if(this._dirty&&i){var a=this.context;a.data=a.outputdata=i.context.outputdata}this.__pipeline&&(this.__pipeline.currenttask=this);var o;this._plan&&!n&&(o=this._plan(this.context));var r=e(this._modby),s=this._moddatacount||0,l=e(t&&t.modby),u=t&&t.moddatacount||0;(r!==l||s!==u)&&(o="reset");var h;(this._dirty||"reset"===o)&&(this._dirty=!1,h=ys(this,n)),this._modby=l,this._moddatacount=u;var c=t&&t.step;if(this._dueend=i?i._outputdueend:this._count?this._count(this.context):1/0,this._progress){var d=this._dueindex,f=math.min(null!=c?this._dueindex+c:1/0,this._dueend);if(!n&&(h||f>d)){var p=this._progress;if(_(p))for(var g=0;gn?n++:null}function e(){var t=n%r*a+math.ceil(n/r),e=n>=i?null:o>t?t:n;return n++,e}var i,n,a,o,r,s={reset:function(l,u,h,c){n=l,i=u,a=h,o=c,r=math.ceil(o/a),s.next=a>1&&o>0?e:t}};return s}();ct.dirty=function(){this._dirty=!0,this._ondirty&&this._ondirty(this.context)},ct.unfinished=function(){return this._progress&&this._dueindex":"",m=p+s.join(p||", ");return{rendermode:n,content:m,style:u}}function o(t){return{rendermode:n,content:dr(ar(t)),style:u}}var r=this;n=n||"html";var s="html"===n?"
":"\n",l="richtext"===n,u={},h=0,c=this.getdata(),d=c.mapdimension("defaultedtooltip",!0),p=d.length,m=this.getrawvalue(t),v=_(m),y=c.getitemvisual(t,"color");s(y)&&y.colorstops&&(y=(y.colorstops[0]||{}).color),y=y||"transparent";var x=p>1||v&&!p?a(m):o(p?ws(c,t,d[0]):v?m[0]:m),w=x.content,b=r.seriesindex+"at"+h,m=kr({color:y,type:"item",rendermode:n,markerid:b});u[b]=y,++h;var i=c.getname(t),a=this.name;un(this)||(a=""),a=a?dr(a)+(e?": ":s):"";var t="string"==typeof m?m:m.content,d=e?t+a+w:a+t+(i?dr(i)+": "+w:w);return{html:d,markers:u}},isanimationenabled:function(){if(hb.node)return!1;var t=this.getshallow("animation");return t&&this.getdata().count()>this.getshallow("animationthreshold")&&(t=!1),t},restoredata:function(){this.datatask.dirty()},getcolorfrompalette:function(t,e,i){var n=this.ecmodel,a=qa.getcolorfrompalette.call(this,t,e,i);return a||(a=n.getcolorfrompalette(t,e,i)),a},coorddimtodatadim:function(t){return this.getrawdata().mapdimension(t,!0)},getprogressive:function(){return this.get("progressive")},getprogressivethreshold:function(){return this.get("progressivethreshold")},getaxistooltipdata:null,gettooltipposition:null,pipetask:null,preventincremental:null,pipelinecontext:null});c(pt,dt),c(pt,qa);var ot=function(){this.group=new ss,this.uid=or("viewcomponent")};ot.prototype={constructor:ot,init:function(){},render:function(){},dispose:function(){},filterforexposedevent:null};var nt=ot.prototype;nt.updateview=nt.updatelayout=nt.updatevisual=function(){},oa(ot),ua(ot,{registerwhenextend:!0});var zt=function(){var t=kn();return function(e){var i=t(e),n=e.pipelinecontext,a=i.large,o=i.progressiverender,r=i.large=n.large,s=i.progressiverender=n.progressiverender;return!!(a^r||o^s)&&"reset"}},rt=kn(),et=zt();il.prototype={type:"chart",init:function(){},render:function(){},highlight:function(t,e,i,n){al(t.getdata(),n,"emphasis")},downplay:function(t,e,i,n){al(t.getdata(),n,"normal")},remove:function(){this.group.removeall()},dispose:function(){},incrementalpreparerender:null,incrementalrender:null,updatetransform:null,filterforexposedevent:null};var bt=il.prototype;bt.updateview=bt.updatelayout=bt.updatevisual=function(t,e,i,n){this.render(t,e,i,n)},oa(il,["dispose"]),ua(il,{registerwhenextend:!0}),il.markupdatemethod=function(t,e){rt(t).updatemethod=e};var vt={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)}}},gt="\x00__throttleoriginmethod",ft="\x00__throttlerate",wt="\x00__throttletype",ht={createonallseries:!0,performrawseries:!0,reset:function(t,e){var i=t.getdata(),n=(t.visualcoloraccesspath||"itemstyle.color").split("."),a=t.get(n)||t.getcolorfrompalette(t.name,null,e.getseriescount());i.setvisual("color",a);var o=(t.visualbordercoloraccesspath||"itemstyle.bordercolor").split("."),r=t.get(o);if(i.setvisual("bordercolor",r),!e.isseriesfiltered(t)){"function"!=typeof a||a instanceof ia||i.each(function(e){i.setitemvisual(e,"color",a(t.getdataparams(e)))});var s=function(t,e){var i=t.getitemmodel(e),a=i.get(n,!0),r=i.get(o,!0);null!=a&&t.setitemvisual(e,"color",a),null!=r&&t.setitemvisual(e,"bordercolor",r)};return{dataeach:i.hasitemoption?s:null}}}},zt={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:""}}}},xt=function(t,e){function i(t,e){if("string"!=typeof t)return t;var i=t;return f(e,function(t,e){i=i.replace(new regexp("\\{\\s*"+e+"\\s*\\}","g"),t)}),i}function n(t){var e=r.get(t);if(null==e){for(var i=t.split("."),n=zt.aria,a=0;as)){var d=a();l=d?i(n("general.withtitle"),{title:d}):n("general.withouttitle");var p=[],g=s>1?"series.multiple.prefix":"series.single.prefix";l+=i(n(g),{seriescount:s}),e.eachseries(function(t,e){if(c>e){var a,r=t.get("name"),l="series."+(s>1?"multiple":"single")+".";a=n(r?l+"withname":l+"withoutname"),a=i(a,{seriesid:t.seriesindex,seriesname:t.get("name"),seriestype:o(t.subtype)});var h=t.getdata();window.data=h,a+=h.count()>u?i(n("data.partialdata"),{displaycnt:u}):n("data.alldata");for(var d=[],f=0;ff){var g=h.getname(f),m=ws(h,f);d.push(i(n(g?"data.withname":"data.withoutname"),{name:g,value:m}))}a+=d.join(n("data.separator.middle"))+n("data.separator.end"),p.push(a)}}),l+=p.join(n("series.multiple.separator.middle"))+n("series.multiple.separator.end"),t.setattribute("aria-label",l)}}},ut=math.pi,yt=function(t,e){e=e||{},s(e,{text:"loading",color:"#c23531",textcolor:"#000",maskcolor:"rgba(255, 255, 255, 0.8)",zlevel:0});var i=new qi({style:{fill:e.maskcolor},zlevel:e.zlevel,z:1e4}),n=new ta({shape:{startangle:-ut/2,endangle:-ut/2+.1,r:10},style:{stroke:e.color,linecap:"round",linewidth:5},zlevel:e.zlevel,z:10001}),a=new qi({style:{fill:"none",text:e.text,textposition:"right",textdistance:10,textfill:e.textcolor},zlevel:e.zlevel,z:10001});n.animateshape(!0).when(1e3,{endangle:3*ut/2}).start("circularinout"),n.animateshape(!0).when(1e3,{startangle:3*ut/2}).delay(300).start("circularinout");var o=new ss;return o.add(n),o.add(a),o.add(i),o.resize=function(){var e=t.getwidth()/2,o=t.getheight()/2;n.setshape({cx:e,cy:o});var r=n.shape.r;a.setshape({x:e-r,y:o-r,width:2*r,height:2*r}),i.setshape({x:0,y:0,width:t.getwidth(),height:t.getheight()})},o.resize(),o},jt=hl.prototype;jt.restoredata=function(t,e){t.restoredata(e),this._stagetaskmap.each(function(t){var e=t.overalltask;e&&e.dirty()})},jt.getperformargs=function(t,e){if(t.__pipeline){var i=this._pipelinemap.get(t.__pipeline.id),n=i.context,a=!e&&i.progressiveenabled&&(!n||n.progressiverender)&&t.__idxinpipeline>i.blockindex,o=a?i.step:null,r=n&&n.moddatacount,s=null!=r?math.ceil(r/o):null;return{step:o,modby:s,moddatacount:r}}},jt.getpipeline=function(t){return this._pipelinemap.get(t)},jt.updatestreammodes=function(t,e){var i=this._pipelinemap.get(t.uid),n=t.getdata(),a=n.count(),o=i.progressiveenabled&&e.incrementalpreparerender&&a>=i.threshold,r=t.get("large")&&a>=t.get("largethreshold"),s="mod"===t.get("progressivechunkmode")?a:null;t.pipelinecontext=i.context={progressiverender:o,moddatacount:s,large:r}},jt.restorepipelines=function(t){var e=this,i=e._pipelinemap=b();t.eachseries(function(t){var n=t.getprogressive(),a=t.uid;i.set(a,{id:a,head:null,tail:null,threshold:t.getprogressivethreshold(),progressiveenabled:n&&!(t.preventincremental&&t.preventincremental()),blockindex:-1,step:math.round(n||700),count:0}),bl(e,t,t.datatask)})},jt.preparestagetasks=function(){var t=this._stagetaskmap,e=this.ecinstance.getmodel(),i=this.api;f(this._allhandlers,function(n){var a=t.get(n.uid)||t.set(n.uid,[]);n.reset&&dl(this,n,a,e,i),n.overallreset&&fl(this,n,a,e,i)},this)},jt.prepareview=function(t,e,i,n){var a=t.rendertask,o=a.context;o.model=e,o.ecmodel=i,o.api=n,a.__block=!t.incrementalpreparerender,bl(this,e,a)},jt.performdataprocessortasks=function(t,e){cl(this,this._dataprocessorhandlers,t,e,{block:!0})},jt.performvisualtasks=function(t,e,i){cl(this,this._visualhandlers,t,e,i)},jt.performseriestasks=function(t){var e;t.eachseries(function(t){e|=t.datatask.perform()}),this.unfinished|=e},jt.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 qt=jt.updatepayload=function(t,e){"remain"!==e&&(t.context.payload=e)},kt=_l(0);hl.wrapstagehandler=function(t,e){return w(t)&&(t={overallreset:t,seriestype:sl(t)}),t.uid=or("stagehandler"),e&&(t.visualtype=e),t};var $t,jt={},qt={};ml(jt,st),ml(qt,gs),jt.eachseriesbytype=jt.eachrawseriesbytype=function(t){$t=t},jt.eachcomponent=function(t){"series"===t.maintype&&t.subtype&&($t=t.subtype)};var td=["#37a2da","#32c5e9","#67e0e3","#9fe6b8","#ffdb5c","#ff9f7f","#fb7293","#e062ae","#e690d1","#e7bcf3","#9d96f5","#8378ea","#96bfff"],ed={color:td,colorlayer:[["#37a2da","#ffd85c","#fd7b5f"],["#37a2da","#67e0e3","#ffdb5c","#ff9f7f","#e062ae","#9d96f5"],["#37a2da","#32c5e9","#9fe6b8","#ffdb5c","#ff9f7f","#fb7293","#e7bcf3","#8378ea","#96bfff"],td]},id="#eee",nd=function(){return{axisline:{linestyle:{color:id}},axistick:{linestyle:{color:id}},axislabel:{textstyle:{color:id}},splitline:{linestyle:{type:"dashed",color:"#aaa"}},splitarea:{areastyle:{color:id}}}},ad=["#dd6b66","#759aa0","#e69d87","#8dc1a9","#ea7e53","#eedd78","#73a373","#73b9bc","#7289ab","#91ca8c","#f49f42"],od={color:ad,backgroundcolor:"#333",tooltip:{axispointer:{linestyle:{color:id},crossstyle:{color:id}}},legend:{textstyle:{color:id}},textstyle:{color:id},title:{textstyle:{color:id}},toolbox:{iconstyle:{normal:{bordercolor:id}}},datazoom:{textstyle:{color:id}},visualmap:{textstyle:{color:id}},timeline:{linestyle:{color:id},itemstyle:{normal:{color:ad[1]}},label:{normal:{textstyle:{color:id}}},controlstyle:{normal:{color:id,bordercolor:id}}},timeaxis:nd(),logaxis:nd(),valueaxis:nd(),categoryaxis:nd(),line:{symbol:"circle"},graph:{color:ad},gauge:{title:{textstyle:{color:id}}},candlestick:{itemstyle:{normal:{color:"#fd1050",color0:"#0cf49b",bordercolor:"#fd1050",bordercolor0:"#0cf49b"}}}};od.categoryaxis.splitline.show=!1,xa.extend({type:"dataset",defaultoption:{serieslayoutby:nt,sourceheader:null,dimensions:null,source:null},optionupdated:function(){kr(this)}}),ot.extend({type:"dataset"});var rd=ha.extend({type:"ellipse",shape:{cx:0,cy:0,rx:0,ry:0},buildpath:function(t,e){var i=.5522848,n=e.cx,a=e.cy,o=e.rx,r=e.ry,s=o*i,l=r*i;t.moveto(n-o,a),t.beziercurveto(n-o,a-l,n-s,a-r,n,a-r),t.beziercurveto(n+s,a-r,n+o,a-l,n+o,a),t.beziercurveto(n+o,a+l,n+s,a+r,n,a+r),t.beziercurveto(n-s,a+r,n-o,a+l,n-o,a),t.closepath()}}),sd=/[\s,]+/;al.prototype.parse=function(t,e){e=e||{};var i=il(t);if(!i)throw new error("illegal svg");var n=new ss;this._root=n;var a=i.getattribute("viewbox")||"",o=parsefloat(i.getattribute("width")||e.width),r=parsefloat(i.getattribute("height")||e.height);isnan(o)&&(o=null),isnan(r)&&(r=null),ll(i,n,null,!0);for(var s=i.firstchild;s;)this._parsenode(s,n),s=s.nextsibling;var l,u;if(a){var h=n(a).split(sd);h.length>=4&&(l={x:parsefloat(h[0]||0),y:parsefloat(h[1]||0),width:parsefloat(h[2]),height:parsefloat(h[3])})}if(l&&null!=o&&null!=r&&(u=nl(l,o,r),!e.ignoreviewbox)){var c=n;n=new ss,n.add(c),c.scale=u.scale.slice(),c.position=u.position.slice()}return e.ignorerootclip||null==o||null==r||n.setclippath(new qi({shape:{x:0,y:0,width:o,height:r}})),{root:n,width:o,height:r,viewboxrect:l,viewboxtransform:u}},al.prototype._parsenode=function(t,e){var i=t.nodename.tolowercase();"defs"===i?this._isdefine=!0:"text"===i&&(this._istext=!0);var n;if(this._isdefine){var a=ud[i];if(a){var o=a.call(this,t),r=t.getattribute("id");r&&(this._defs[r]=o)}}else{var a=ld[i];a&&(n=a.call(this,t,e),e.add(n))}for(var s=t.firstchild;s;)1===s.nodetype&&this._parsenode(s,n),3===s.nodetype&&this._istext&&this._parsetext(s,n),s=s.nextsibling;"defs"===i?this._isdefine=!1:"text"===i&&(this._istext=!1)},al.prototype._parsetext=function(t,e){if(1===t.nodetype){var i=t.getattribute("dx")||0,n=t.getattribute("dy")||0;this._textx+=parsefloat(i),this._texty+=parsefloat(n)}var a=new ei({style:{text:t.textcontent,transformtext:!0},position:[this._textx||0,this._texty||0]});dl(e,a),ll(t,a,this._defs);var o=a.style.fontsize;o&&9>o&&(a.style.fontsize=9,a.scale=a.scale||[1,1],a.scale[0]*=o/9,a.scale[1]*=o/9);var r=a.getboundingrect();return this._textx+=r.width,e.add(a),a};var ld={g:function(t,e){var i=new ss;return dl(e,i),ll(t,i,this._defs),i},rect:function(t,e){var i=new qi;return dl(e,i),ll(t,i,this._defs),i.setshape({x:parsefloat(t.getattribute("x")||0),y:parsefloat(t.getattribute("y")||0),width:parsefloat(t.getattribute("width")||0),height:parsefloat(t.getattribute("height")||0)}),i},circle:function(t,e){var i=new bi;return dl(e,i),ll(t,i,this._defs),i.setshape({cx:parsefloat(t.getattribute("cx")||0),cy:parsefloat(t.getattribute("cy")||0),r:parsefloat(t.getattribute("r")||0)}),i},line:function(t,e){var i=new $i;return dl(e,i),ll(t,i,this._defs),i.setshape({x1:parsefloat(t.getattribute("x1")||0),y1:parsefloat(t.getattribute("y1")||0),x2:parsefloat(t.getattribute("x2")||0),y2:parsefloat(t.getattribute("y2")||0)}),i},ellipse:function(t,e){var i=new rd;return dl(e,i),ll(t,i,this._defs),i.setshape({cx:parsefloat(t.getattribute("cx")||0),cy:parsefloat(t.getattribute("cy")||0),rx:parsefloat(t.getattribute("rx")||0),ry:parsefloat(t.getattribute("ry")||0)}),i},polygon:function(t,e){var i=t.getattribute("points");i&&(i=cl(i));var n=new xi({shape:{points:i||[]}});return dl(e,n),ll(t,n,this._defs),n},polyline:function(t,e){var i=new ha;dl(e,i),ll(t,i,this._defs);var n=t.getattribute("points");n&&(n=cl(n));var a=new ui({shape:{points:n||[]}});return a},image:function(t,e){var i=new sn;return dl(e,i),ll(t,i,this._defs),i.setstyle({image:t.getattribute("xlink:href"),x:t.getattribute("x"),y:t.getattribute("y"),width:t.getattribute("width"),height:t.getattribute("height")}),i},text:function(t,e){var i=t.getattribute("x")||0,n=t.getattribute("y")||0,a=t.getattribute("dx")||0,o=t.getattribute("dy")||0;this._textx=parsefloat(i)+parsefloat(a),this._texty=parsefloat(n)+parsefloat(o);var r=new ss;return dl(e,r),ll(t,r,this._defs),r},tspan:function(t,e){var i=t.getattribute("x"),n=t.getattribute("y");null!=i&&(this._textx=parsefloat(i)),null!=n&&(this._texty=parsefloat(n));var a=t.getattribute("dx")||0,o=t.getattribute("dy")||0,r=new ss;return dl(e,r),ll(t,r,this._defs),this._textx+=a,this._texty+=o,r},path:function(t,e){var i=t.getattribute("d")||"",n=ya(i);return dl(e,n),ll(t,n,this._defs),n}},ud={lineargradient:function(t){var e=parseint(t.getattribute("x1")||0,10),i=parseint(t.getattribute("y1")||0,10),n=parseint(t.getattribute("x2")||10,10),a=parseint(t.getattribute("y2")||0,10),o=new na(e,i,n,a);return tl(t,o),o},radialgradient:function(){}},hd={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"},cd=/url\(\s*#(.*?)\)/,dd=/(translate|scale|rotate|skewx|skewy|matrix)\(([\-\s0-9\.e,]*)\)/g,fd=/([^\s:;]+)\s*:\s*([^:;]+)/g,pd=b(),gd={registermap:function(t,e,i){var n;return _(e)?n=e:e.svg?n=[{type:"svg",source:e.svg,specialareas:e.specialareas}]:(e.geojson&&!e.features&&(i=e.specialareas,e=e.geojson),n=[{type:"geojson",source:e,specialareas:i}]),f(n,function(t){var e=t.type;"geojson"===e&&(e=t.type="geojson");var i=md[e];i(t)}),pd.set(t,n)},retrievemap:function(t){return pd.get(t)}},md={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=il(t.source)}},vd=o,yd=f,xd=w,_d=s,wd=xa.parseclasstype,bd="4.4.0",sd={zrender:"4.1.1"},md=1,id=1e3,ad=800,td=900,dd=5e3,cd=1e3,ld=1100,kd=2e3,pd=3e3,od=3500,nd=4e3,zd=5e3,rd={processor:{filter:id,series_filter:ad,statistic:dd},visual:{layout:cd,progressive_layout:ld,global:kd,chart:pd,post_chart_layout:od,component:nd,brush:zd}},ed="__flaginmainprocess",bd="__optionupdated",vd=/^[a-za-z0-9_]+$/;el.prototype.on=rl("on",!0),el.prototype.off=rl("off",!0),el.prototype.one=rl("one",!0),c(el,pb);var gd=bl.prototype;gd._onframe=function(){if(!this._disposed){var t=this._scheduler;if(this[bd]){var e=this[bd].silent;this[ed]=!0,gl(this),fd.update.call(this),this[ed]=!1,this[bd]=!1,zl.call(this,e),xl.call(this,e)}else if(t.unfinished){var i=md,n=this._model,a=this._api;t.unfinished=!1;do{var o=+new date;t.performseriestasks(n),t.performdataprocessortasks(n),wl(this,n),t.performvisualtasks(n),$l(this,this._model,a,"remain"),i-=+new date-o}while(i>0&&t.unfinished);t.unfinished||this._zr.flush()}}},gd.getdom=function(){return this._dom},gd.getzr=function(){return this._zr},gd.setoption=function(t,e,i){if(!this._disposed){var n;if(_d(e)&&(i=e.lazyupdate,n=e.silent,e=e.notmerge),this[ed]=!0,!this._model||e){var a=new vs(this._api),o=this._theme,r=this._model=new st;r.scheduler=this._scheduler,r.init(null,null,o,a)}this._model.setoption(t,ud),i?(this[bd]={silent:n},this[ed]=!1):(gl(this),fd.update.call(this),this._zr.flush(),this[bd]=!1,this[ed]=!1,zl.call(this,n),xl.call(this,n))}},gd.settheme=function(){console.error("echarts#settheme() is deprecated in echarts 3.0")},gd.getmodel=function(){return this._model},gd.getoption=function(){return this._model&&this._model.getoption()},gd.getwidth=function(){return this._zr.getwidth()},gd.getheight=function(){return this._zr.getheight()},gd.getdevicepixelratio=function(){return this._zr.painter.dpr||window.devicepixelratio||1},gd.getrenderedcanvas=function(t){if(hb.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)}},gd.getsvgdataurl=function(){if(hb.svgsupported){var t=this._zr,e=t.storage.getdisplaylist();return f(e,function(t){t.stopanimation(!0)}),t.painter.pathtodataurl()}},gd.getdataurl=function(t){if(!this._disposed){t=t||{};var e=t.excludecomponents,i=this._model,n=[],a=this;yd(e,function(t){i.eachcomponent({maintype:t},function(t){var e=a._componentsmap[t.__viewid];e.group.ignore||(n.push(e),e.group.ignore=!0)})});var o="svg"===this._zr.painter.gettype()?this.getsvgdataurl():this.getrenderedcanvas(t).todataurl("image/"+(t&&t.type||"png"));return yd(n,function(t){t.group.ignore=!1}),o}},gd.getconnecteddataurl=function(t){if(!this._disposed&&hb.canvassupported){var e=this.group,i=math.min,a=math.max,o=1/0;if(jd[e]){var r=o,s=o,l=-o,u=-o,h=[],c=t&&t.pixelratio||1;f($d,function(o){if(o.group===e){var c=o.getrenderedcanvas(n(t)),d=o.getdom().getboundingclientrect();r=i(d.left,r),s=i(d.top,s),l=a(d.right,l),u=a(d.bottom,u),h.push({dom:c,left:d.left,top:d.top})}}),r*=c,s*=c,l*=c,u*=c;var d=l-r,p=u-s,g=wb();g.width=d,g.height=p;var m=zn(g);return t.connectedbackgroundcolor&&m.add(new qi({shape:{x:0,y:0,width:d,height:p},style:{fill:t.connectedbackgroundcolor}})),yd(h,function(t){var e=new sn({style:{x:t.left*c-r,y:t.top*c-s,image:t.dom}});m.add(e)}),m.refreshimmediately(),g.todataurl("image/"+(t&&t.type||"png"))}return this.getdataurl(t)}},gd.converttopixel=x(vl,"converttopixel"),gd.convertfrompixel=x(vl,"convertfrompixel"),gd.containpixel=function(t,e){if(!this._disposed){var i,n=this._model;return t=$n(n,t),f(t,function(t,n){n.indexof("models")>=0&&f(t,function(t){var a=t.coordinatesystem;if(a&&a.containpoint)i|=!!a.containpoint(e);else if("seriesmodels"===n){var o=this._chartsmap[t.__viewid];o&&o.containpoint&&(i|=o.containpoint(e,t))}},this)},this),!!i}},gd.getvisual=function(t,e){var i=this._model;t=$n(i,t,{defaultmaintype:"series"});var n=t.seriesmodel,a=n.getdata(),o=t.hasownproperty("dataindexinside")?t.dataindexinside:t.hasownproperty("dataindex")?a.indexofrawindex(t.dataindex):null;return null!=o?a.getitemvisual(o,e):a.getvisual(e)},gd.getviewofcomponentmodel=function(t){return this._componentsmap[t.__viewid]},gd.getviewofseriesmodel=function(t){return this._chartsmap[t.__viewid] };var fd={prepareandupdate:function(t){gl(this),fd.update.call(this,t)},update:function(t){var e=this._model,i=this._api,n=this._zr,a=this._coordsysmgr,o=this._scheduler;if(e){o.restoredata(e,t),o.performseriestasks(e),a.create(e,i),o.performdataprocessortasks(e,t),wl(this,e),a.update(e,i),jl(e),o.performvisualtasks(e,t),ql(this,e,i,t);var r=e.get("backgroundcolor")||"transparent";if(hb.canvassupported)n.setbackgroundcolor(r);else{var s=qe(r);r=ai(s,"rgb"),0===s[3]&&(r="transparent")}jl(e,i)}},updatetransform:function(t){var e=this._model,i=this,n=this._api;if(e){var a=[];e.eachcomponent(function(o,r){var s=i.getviewofcomponentmodel(r);if(s&&s.__alive)if(s.updatetransform){var l=s.updatetransform(r,e,n,t);l&&l.update&&a.push(s)}else a.push(s)});var o=b();e.eachseries(function(a){var r=i._chartsmap[a.__viewid];if(r.updatetransform){var s=r.updatetransform(a,e,n,t);s&&s.update&&o.set(a.uid,1)}else o.set(a.uid,1)}),jl(e),this._scheduler.performvisualtasks(e,t,{setdirty:!0,dirtymap:o}),$l(i,e,n,t,o),jl(e,this._api)}},updateview:function(t){var e=this._model;e&&(il.markupdatemethod(t,"updateview"),jl(e),this._scheduler.performvisualtasks(e,t,{setdirty:!0}),ql(this,this._model,this._api,t),jl(e,this._api))},updatevisual:function(t){fd.update.call(this,t)},updatelayout:function(t){fd.update.call(this,t)}};gd.resize=function(t){if(!this._disposed){this._zr.resize(t);var e=this._model;if(this._loadingfx&&this._loadingfx.resize(),e){var i=e.resetoption("media"),n=t&&t.silent;this[ed]=!0,i&&gl(this),fd.update.call(this),this[ed]=!1,zl.call(this,n),xl.call(this,n)}}},gd.showloading=function(t,e){if(!this._disposed&&(_d(t)&&(e=t,t=""),t=t||"default",this.hideloading(),kd[t])){var i=kd[t](this._api,e),n=this._zr;this._loadingfx=i,n.add(i)}},gd.hideloading=function(){this._disposed||(this._loadingfx&&this._zr.remove(this._loadingfx),this._loadingfx=null)},gd.makeactionfromevent=function(t){var e=r({},t);return e.type=zd[t.type],e},gd.dispatchaction=function(t,e){if(!this._disposed&&(_d(e)||(e={silent:!!e}),hd[t.type]&&this._model)){if(this[ed])return void this._pendingactions.push(t);hl.call(this,t,e.silent),e.flush?this._zr.flush(!0):e.flush!==!1&&hb.browser.wechat&&this._throttledzrflush(),zl.call(this,e.silent),xl.call(this,e.silent)}},gd.appenddata=function(t){if(!this._disposed){var e=t.seriesindex,i=this.getmodel(),n=i.getseriesbyindex(e);n.appenddata(t),this._scheduler.unfinished=!0}},gd.on=rl("on",!1),gd.off=rl("off",!1),gd.one=rl("one",!1);var wd=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];gd._initevents=function(){yd(wd,function(t){var e=function(e){var i,n=this.getmodel(),a=e.target,o="globalout"===t;if(o)i={};else if(a&&null!=a.dataindex){var s=a.datamodel||n.getseriesbyindex(a.seriesindex);i=s&&s.getdataparams(a.dataindex,a.datatype,a)||{}}else a&&a.eventdata&&(i=r({},a.eventdata));if(i){var l=i.componenttype,u=i.componentindex;("markline"===l||"markpoint"===l||"markarea"===l)&&(l="series",u=i.seriesindex);var h=l&&null!=u&&n.getcomponent(l,u),c=h&&this["series"===h.maintype?"_chartsmap":"_componentsmap"][h.__viewid];i.event=e,i.type=t,this._eceventprocessor.eventinfo={targetel:a,packedevent:i,model:h,view:c},this.trigger(t,i)}};e.zreventfulcallatlast=!0,this._zr.on(t,e,this)},this),yd(zd,function(t,e){this._messagecenter.on(e,function(t){this.trigger(e,t)},this)},this)},gd.isdisposed=function(){return this._disposed},gd.clear=function(){this._disposed||this.setoption({series:[]},!0)},gd.dispose=function(){if(!this._disposed){this._disposed=!0,qn(this.getdom(),ec,"");var t=this._api,e=this._model;yd(this._componentsviews,function(i){i.dispose(e,t)}),yd(this._chartsviews,function(i){i.dispose(e,t)}),this._zr.dispose(),delete $d[this.id]}},c(bl,pb),nu.prototype={constructor:nu,normalizequery:function(t){var e={},i={},n={};if(b(t)){var a=wd(t);e.maintype=a.main||null,e.subtype=a.sub||null}else{var o=["index","name","id"],r={name:1,dataindex:1,datatype:1};f(t,function(t,a){for(var s=!1,l=0;l0&&h===a.length-u.length){var c=a.slice(0,h);"data"!==c&&(e.maintype=c,e[u.tolowercase()]=t,s=!0)}}r.hasownproperty(a)&&(i[a]=t,s=!0),s||(n[a]=t)})}return{cptquery:e,dataquery:i,otherquery:n}},filter:function(t,e){function i(t,e,i,n){return null==t[i]||e[n||i]===t[i]}var n=this.eventinfo;if(!n)return!0;var a=n.targetel,o=n.packedevent,r=n.model,s=n.view;if(!r||!s)return!0;var l=e.cptquery,u=e.dataquery;return i(l,r,"maintype")&&i(l,r,"subtype")&&i(l,r,"index","componentindex")&&i(l,r,"name")&&i(l,r,"id")&&i(u,o,"name")&&i(u,o,"dataindex")&&i(u,o,"datatype")&&(!s.filterforexposedevent||s.filterforexposedevent(t,e.otherquery,a,o))},aftertrigger:function(){this.eventinfo=null}};var hd={},zd={},xd=[],ud=[],yd=[],jd=[],qd={},kd={},$d={},jd={},qd=new date-0,tc=new date-0,ec="_echarts_instance_",ic=su;xu(kd,ht),du(wt),fu(td,bt),wu("default",yt),gu({type:"highlight",event:"highlight",update:"highlight"},g),gu({type:"downplay",event:"downplay",update:"downplay"},g),cu("light",ed),cu("dark",od);var nc={};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,i=this._new,n={},a={},o=[],r=[];for(ku(e,n,o,"_oldkeygetter",this),ku(i,a,r,"_newkeygetter",this),t=0;th;h++)this._add&&this._add(l[h]);else this._add&&this._add(l)}}}};var ac=b(["tooltip","label","itemname","itemid","seriesname"]),oc=s,rc="undefined",sc=-1,lc="e\x00\x00",uc={"float":typeof float64array===rc?array:float64array,"int":typeof int32array===rc?array:int32array,ordinal:array,number:array,time:array},hc=typeof uint32array===rc?array:uint32array,cc=typeof int32array===rc?array:int32array,dc=typeof uint16array===rc?array:uint16array,fc=["hasitemoption","_namelist","_idlist","_invertedindicesmap","_rawdata","_chunksize","_chunkcount","_dimvaluegetter","_count","_rawcount","_namedimidx","_iddimidx"],pc=["_extent","_approximateextent","_rawextent"],gc=function(t,e){t=t||["x","y"];for(var i={},n=[],a={},o=0;oh;h++){var c=a[h];r[c]||(r[c]=ju()),n[c]||(n[c]=[]),vu(n,this._dimensioninfos[c],i,u,l),this._chunkcount=n[c].length}for(var d=new array(o),f=s;l>f;f++){for(var p=f-s,g=math.floor(f/i),m=f%i,v=0;o>v;v++){var c=a[v],y=this._dimvaluegetterarrayrows(t[p]||d,c,p,v);n[c][g][m]=y;var x=r[c];yx[1]&&(x[1]=y)}e&&(this._namelist[f]=e[p])}this._rawcount=this._count=l,this._extent={},gu(this)},mc._initdatafromprovider=function(t,e){if(!(t>=e)){for(var i,n=this._chunksize,a=this._rawdata,o=this._storage,r=this.dimensions,s=r.length,l=this._dimensioninfos,u=this._namelist,h=this._idlist,c=this._rawextent,d=this._namerepeatcount={},f=this._chunkcount,p=0;s>p;p++){var g=r[p];c[g]||(c[g]=ju());var m=l[g];0===m.otherdims.itemname&&(i=this._namedimidx=p),0===m.otherdims.itemid&&(this._iddimidx=p),o[g]||(o[g]=[]),vu(o,m,n,f,e),this._chunkcount=o[g].length}for(var v=new array(s),y=t;e>y;y++){v=a.getitem(y,v);for(var x=math.floor(y/n),_=y%n,w=0;s>w;w++){var g=r[w],b=o[g][x],s=this._dimvaluegetter(v,g,y,w);b[_]=s;var m=c[g];sm[1]&&(m[1]=s)}if(!a.pure){var i=u[y];if(v&&null==i)if(null!=v.name)u[y]=i=v.name;else if(null!=i){var a=r[i],t=o[a][x];if(t){i=t[_];var d=l[a].ordinalmeta;d&&d.categories.length&&(i=d.categories[i])}}var c=null==v?null:v.id;null==c&&null!=i&&(d[i]=d[i]||0,c=i,d[i]>0&&(c+="__ec__"+d[i]),d[i]++),null!=c&&(h[y]=c)}}!a.persistent&&a.clean&&a.clean(),this._rawcount=this._count=e,this._extent={},gu(this)}},mc.count=function(){return this._count},mc.getindices=function(){var t,e=this._indices;if(e){var i=e.constructor,n=this._count;if(i===array){t=new i(n);for(var a=0;n>a;a++)t[a]=e[a]}else t=new i(e.buffer,0,n)}else for(var i=ru(this),t=new i(this.count()),a=0;a=0&&e=0&&en;n++)i.push(this.get(t[n],e));return i},mc.hasvalue=function(t){for(var e=this._dimensionssummary.datadimsoncoord,i=0,n=e.length;n>i;i++)if(isnan(this.get(e[i],t)))return!1;return!0},mc.getdataextent=function(t){t=this.getdimension(t);var e=this._storage[t],i=ju();if(!e)return i;var n,a=this.count(),o=!this._indices;if(o)return this._rawextent[t].slice();if(n=this._extent[t])return n.slice();n=i;for(var r=n[0],s=n[1],l=0;a>l;l++){var u=this._getfast(t,this.getrawindex(l));r>u&&(r=u),u>s&&(s=u)}return n=[r,s],this._extent[t]=n,n},mc.getapproximateextent=function(t){return t=this.getdimension(t),this._approximateextent[t]||this.getdataextent(t)},mc.setapproximateextent=function(t,e){e=this.getdimension(e),this._approximateextent[e]=t.slice()},mc.getcalculationinfo=function(t){return this._calculationinfo[t]},mc.setcalculationinfo=function(t,e){oc(t)?r(this._calculationinfo,t):this._calculationinfo[t]=e},mc.getsum=function(t){var e=this._storage[t],i=0;if(e)for(var n=0,a=this.count();a>n;n++){var o=this.get(t,n);isnan(o)||(i+=o)}return i},mc.getmedian=function(t){var e=[];this.each(t,function(t){isnan(t)||e.push(t)});var i=[].concat(e).sort(function(t,e){return t-e}),n=this.count();return 0===n?0:n%2===1?i[(n-1)/2]:(i[n/2]+i[n/2-1])/2},mc.rawindexof=function(t,e){var i=t&&this._invertedindicesmap[t],n=i[e];return null==n||isnan(n)?sc:n},mc.indexofname=function(t){for(var e=0,i=this.count();i>e;e++)if(this.getname(e)===t)return e;return-1},mc.indexofrawindex=function(t){if(!this._indices)return t;if(t>=this._rawcount||0>t)return-1;var e=this._indices,i=e[t];if(null!=i&&i=n;){var o=(n+a)/2|0;if(e[o]t))return o;a=o-1}}return-1},mc.indicesofnearest=function(t,e,i){var n=this._storage,a=n[t],o=[];if(!a)return o;null==i&&(i=1/0);for(var r=number.max_value,s=-1,l=0,u=this.count();u>l;l++){var h=e-this.get(t,l),c=math.abs(h);i>=h&&r>=c&&((r>c||h>=0&&0>s)&&(r=c,s=h,o.length=0),o.push(l))}return o},mc.getrawindex=wu,mc.getrawdataitem=function(t){if(this._rawdata.persistent)return this._rawdata.getitem(this.getrawindex(t));for(var e=[],i=0;ir;r++)s[r]=this.get(t[r],o);s[r]=o,e.apply(i,s)}}},mc.filterself=function(t,e,i,n){if(this._count){"function"==typeof t&&(n=i,i=e,e=t,t=[]),i=i||n||this,t=p(xu(t),this.getdimension,this);for(var a=this.count(),o=ru(this),r=new o(a),s=[],l=t.length,u=0,h=t[0],c=0;a>c;c++){var d,f=this.getrawindex(c);if(0===l)d=e.call(i,c);else if(1===l){var g=this._getfast(h,f);d=e.call(i,g,c)}else{for(var m=0;l>m;m++)s[m]=this._getfast(h,f);s[m]=c,d=e.apply(i,s)}d&&(r[u++]=f)}return a>u&&(this._indices=r),this._count=u,this._extent={},this.getrawindex=this._indices?hu:wu,this}},mc.selectrange=function(t){if(this._count){var e=[];for(var i in t)t.hasownproperty(i)&&e.push(i);var n=e.length;if(n){var a=this.count(),o=ru(this),r=new o(a),s=0,l=e[0],u=t[l][0],h=t[l][1],c=!1;if(!this._indices){var d=0;if(1===n){for(var f=this._storage[e[0]],p=0;pv;v++){var y=g[v];(y>=u&&h>=y||isnan(y))&&(r[s++]=d),d++}c=!0}else if(2===n){for(var f=this._storage[l],x=this._storage[e[1]],_=t[e[1]][0],w=t[e[1]][1],p=0;pv;v++){var y=g[v],s=b[v];(y>=u&&h>=y||isnan(y))&&(s>=_&&w>=s||isnan(s))&&(r[s++]=d),d++}c=!0}}if(!c)if(1===n)for(var v=0;a>v;v++){var m=this.getrawindex(v),y=this._getfast(l,m);(y>=u&&h>=y||isnan(y))&&(r[s++]=m)}else for(var v=0;a>v;v++){for(var i=!0,m=this.getrawindex(v),p=0;n>p;p++){var a=e[p],y=this._getfast(i,m);(yt[a][1])&&(i=!1)}i&&(r[s++]=this.getrawindex(v))}return a>s&&(this._indices=r),this._count=s,this._extent={},this.getrawindex=this._indices?hu:wu,this}}},mc.maparray=function(t,e,i,n){"function"==typeof t&&(n=i,i=e,e=t,t=[]),i=i||n||this;var a=[];return this.each(t,function(){a.push(e&&e.apply(this,arguments))},i),a},mc.map=function(t,e,i,n){i=i||n||this,t=p(xu(t),this.getdimension,this);var a=uu(this,t);a._indices=this._indices,a.getrawindex=a._indices?hu:wu;for(var o=a._storage,r=[],s=this._chunksize,l=t.length,u=this.count(),h=[],c=a._rawextent,d=0;u>d;d++){for(var f=0;l>f;f++)h[f]=this.get(t[f],d);h[l]=d;var g=e&&e.apply(i,h);if(null!=g){"object"!=typeof g&&(r[0]=g,g=r);for(var m=this.getrawindex(d),v=math.floor(m/s),y=m%s,x=0;xb[1]&&(b[1]=w)}}}return a},mc.downsample=function(t,e,i,n){for(var a=uu(this,[t]),o=a._storage,r=[],s=math.floor(1/e),l=o[t],u=this.count(),h=this._chunksize,c=a._rawextent[t],d=new(ru(this))(u),f=0,p=0;u>p;p+=s){s>u-p&&(s=u-p,r.length=s);for(var g=0;s>g;g++){var m=this.getrawindex(p+g),v=math.floor(m/h),y=m%h;r[g]=l[v][y]}var x=i(r),_=this.getrawindex(math.min(p+n(r,x)||0,u-1)),w=math.floor(_/h),b=_%h;l[w][b]=x,xc[1]&&(c[1]=x),d[f++]=_}return a._count=f,a._indices=d,a.getrawindex=hu,a},mc.getitemmodel=function(t){var e=this.hostmodel;return new ir(this.getrawdataitem(t),e,e&&e.ecmodel)},mc.diff=function(t){var e=this;return new lu(t?t.getindices():[],this.getindices(),function(e){return zu(t,e)},function(t){return zu(e,t)})},mc.getvisual=function(t){var e=this._visual;return e&&e[t]},mc.setvisual=function(t,e){if(oc(t))for(var i in t)t.hasownproperty(i)&&this.setvisual(i,t[i]);else this._visual=this._visual||{},this._visual[t]=e},mc.setlayout=function(t,e){if(oc(t))for(var i in t)t.hasownproperty(i)&&this.setlayout(i,t[i]);else this._layout[t]=e},mc.getlayout=function(t){return this._layout[t]},mc.getitemlayout=function(t){return this._itemlayouts[t]},mc.setitemlayout=function(t,e,i){this._itemlayouts[t]=i?r(this._itemlayouts[t]||{},e):e},mc.clearitemlayouts=function(){this._itemlayouts.length=0},mc.getitemvisual=function(t,e,i){var n=this._itemvisuals[t],a=n&&n[e];return null!=a||i?a:this.getvisual(e)},mc.setitemvisual=function(t,e,i){var n=this._itemvisuals[t]||{},a=this.hasitemvisual;if(this._itemvisuals[t]=n,oc(e))for(var o in e)e.hasownproperty(o)&&(n[o]=e[o],a[o]=!0);else n[e]=i,a[e]=!0},mc.clearallvisual=function(){this._visual={},this._itemvisuals=[],this.hasitemvisual={}};var vc=function(t){t.seriesindex=this.seriesindex,t.dataindex=this.dataindex,t.datatype=this.datatype};mc.setitemgraphicel=function(t,e){var i=this.hostmodel;e&&(e.dataindex=t,e.datatype=this.datatype,e.seriesindex=i&&i.seriesindex,"group"===e.type&&e.traverse(vc,e)),this._graphicels[t]=e},mc.getitemgraphicel=function(t){return this._graphicels[t]},mc.eachitemgraphicel=function(t,e){f(this._graphicels,function(i,n){i&&t&&t.call(e,i,n)})},mc.cloneshallow=function(t){if(!t){var e=p(this.dimensions,this.getdimensioninfo,this);t=new gc(e,this.hostmodel)}if(t._storage=this._storage,bu(t,this),this._indices){var i=this._indices.constructor;t._indices=new i(this._indices)}else t._indices=null;return t.getrawindex=t._indices?hu:wu,t},mc.wrapmethod=function(t,e){var i=this[t];"function"==typeof i&&(this.__wrappedmethods=this.__wrappedmethods||[],this.__wrappedmethods.push(t),this[t]=function(){var t=i.apply(this,arguments);return e.apply(this,[t].concat(k(arguments)))})},mc.transferable_methods=["cloneshallow","downsample","map"],mc.changable_methods=["filterself","selectrange"];var yc=function(t,e){return e=e||{},qu(e.coorddimensions||[],t,{dimsdef:e.dimensionsdefine||t.dimensionsdefine,encodedef:e.encodedefine||t.encodedefine,dimcount:e.dimensionscount,generatecoord:e.generatecoord,generatecoordcount:e.generatecoordcount})};ah.prototype.parse=function(t){return t},ah.prototype.getsetting=function(t){return this._setting[t]},ah.prototype.contain=function(t){var e=this._extent;return t>=e[0]&&t<=e[1]},ah.prototype.normalize=function(t){var e=this._extent;return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])},ah.prototype.scale=function(t){var e=this._extent;return t*(e[1]-e[0])+e[0]},ah.prototype.unionextent=function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1])},ah.prototype.unionextentfromdata=function(t,e){this.unionextent(t.getapproximateextent(e))},ah.prototype.getextent=function(){return this._extent.slice()},ah.prototype.setextent=function(t,e){var i=this._extent;isnan(t)||(i[0]=t),isnan(e)||(i[1]=e)},ah.prototype.isblank=function(){return this._isblank},ah.prototype.setblank=function(t){this._isblank=t},ah.prototype.getlabel=null,oa(ah),ua(ah,{registerwhenextend:!0}),oh.createbyaxismodel=function(t){var e=t.option,i=e.data,n=i&&p(i,sh);return new oh({categories:n,needcollect:!n,deduplication:e.dedplication!==!1})};var xc=oh.prototype;xc.getordinal=function(t){return rh(this).get(t)},xc.parseandcollect=function(t){var e,i=this._needcollect;if("string"!=typeof t&&!i)return t;if(i&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,e;var n=rh(this);return e=n.get(t),null==e&&(i?(e=this.categories.length,this.categories[e]=t,n.set(t,e)):e=0/0),e};var _c=ah.prototype,wc=ah.extend({type:"ordinal",init:function(t,e){(!t||_(t))&&(t=new oh({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),_c.contain.call(this,t)&&null!=this._ordinalmeta.categories[t]},normalize:function(t){return _c.normalize.call(this,this.parse(t))},scale:function(t){return math.round(_c.scale.call(this,t))},getticks:function(){for(var t=[],e=this._extent,i=e[0];i<=e[1];)t.push(i),i++;return t},getlabel:function(t){return this.isblank()?void 0:this._ordinalmeta.categories[t]},count:function(){return this._extent[1]-this._extent[0]+1},unionextentfromdata:function(t,e){this.unionextent(t.getapproximateextent(e))},getordinalmeta:function(){return this._ordinalmeta},niceticks:g,niceextent:g});wc.create=function(){return new wc};var bc=cr,sc=cr,mc=ah.extend({type:"interval",_interval:0,_intervalprecision:2,setextent:function(t,e){var i=this._extent;isnan(t)||(i[0]=parsefloat(t)),isnan(e)||(i[1]=parsefloat(e))},unionextent:function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1]),mc.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=uh(t)},getticks:function(){return dh(this._interval,this._extent,this._niceextent,this._intervalprecision)},getlabel:function(t,e){if(null==t)return"";var i=e&&e.precision;return null==i?i=pr(t)||0:"auto"===i&&(i=this._intervalprecision),t=sc(t,i,!0),ar(t)},niceticks:function(t,e,i){t=t||5;var n=this._extent,a=n[1]-n[0];if(isfinite(a)){0>a&&(a=-a,n.reverse());var o=lh(n,t,e,i);this._intervalprecision=o.intervalprecision,this._interval=o.interval,this._niceextent=o.nicetickextent}},niceextent:function(t){var e=this._extent;if(e[0]===e[1])if(0!==e[0]){var i=e[0];t.fixmax?e[0]-=i/2:(e[1]+=i/2,e[0]-=i/2)}else e[1]=1;var n=e[1]-e[0];isfinite(n)||(e[0]=0,e[1]=1),this.niceticks(t.splitnumber,t.mininterval,t.maxinterval);var a=this._interval;t.fixmin||(e[0]=sc(math.floor(e[0]/a)*a)),t.fixmax||(e[1]=sc(math.ceil(e[1]/a)*a))}});mc.create=function(){return new mc};var ic="__ec_stack_",ac=.5,tc="undefined"!=typeof float32array?float32array:array,dc={seriestype:"bar",plan:zt(),reset:function(t){function e(t,e){for(var i,c=t.count,d=new tc(2*c),f=new tc(c),p=[],g=[],m=0,v=0;null!=(i=t.next());)g[u]=e.get(r,i),g[1-u]=e.get(s,i),p=n.datatopoint(g,null,p),d[m++]=p[0],d[m++]=p[1],f[v++]=i;e.setlayout({largepoints:d,largedataindices:f,barwidth:h,valueaxisstart:sh(a,o,!1),valueaxishorizontal:l})}if(wh(t)&&bh(t)){var i=t.getdata(),n=t.coordinatesystem,a=n.getbaseaxis(),o=n.getotheraxis(a),r=i.mapdimension(o.dim),s=i.mapdimension(a.dim),l=o.ishorizontal(),u=l?0:1,h=xh(vh([t]),a,t).width;return h>ac||(h=ac),{progress:e}}}},cc=mc.prototype,lc=math.ceil,kc=math.floor,pc=1e3,oc=60*pc,nc=60*oc,zc=24*nc,rc=function(t,e,i,n){for(;n>i;){var a=i+n>>>1;t[a][1]o&&(o=e),null!=i&&o>i&&(o=i);var r=bc.length,s=rc(bc,o,0,r),l=bc[math.min(s,r-1)],u=l[1];if("year"===l[0]){var h=a/u,c=br(h/t,!0);u*=c}var d=this.getsetting("useutc")?0:60*new date(+n[0]||+n[1]).gettimezoneoffset()*1e3,f=[math.round(lc((n[0]-d)/u)*u+d),math.round(kc((n[1]-d)/u)*u+d)];ch(f,n),this._steplvl=l,this._interval=u,this._niceextent=f},parse:function(t){return+xr(t)}});f(["contain","normalize"],function(t){ec.prototype[t]=function(e){return cc[t].call(this,this.parse(e))}});var bc=[["hh:mm:ss",pc],["hh:mm:ss",5*pc],["hh:mm:ss",10*pc],["hh:mm:ss",15*pc],["hh:mm:ss",30*pc],["hh:mm\nmm-dd",oc],["hh:mm\nmm-dd",5*oc],["hh:mm\nmm-dd",10*oc],["hh:mm\nmm-dd",15*oc],["hh:mm\nmm-dd",30*oc],["hh:mm\nmm-dd",nc],["hh:mm\nmm-dd",2*nc],["hh:mm\nmm-dd",6*nc],["hh:mm\nmm-dd",12*nc],["mm-dd\nyyyy",zc],["mm-dd\nyyyy",2*zc],["mm-dd\nyyyy",3*zc],["mm-dd\nyyyy",4*zc],["mm-dd\nyyyy",5*zc],["mm-dd\nyyyy",6*zc],["week",7*zc],["mm-dd\nyyyy",10*zc],["week",14*zc],["week",21*zc],["month",31*zc],["week",42*zc],["month",62*zc],["week",70*zc],["quarter",95*zc],["month",31*zc*4],["month",31*zc*5],["half-year",380*zc/2],["month",31*zc*8],["month",31*zc*10],["year",380*zc]];ec.create=function(t){return new ec({useutc:t.ecmodel.get("useutc")})};var vc=ah.prototype,gc=mc.prototype,fc=pr,wc=cr,hc=math.floor,zc=math.ceil,xc=math.pow,uc=math.log,yc=ah.extend({type:"log",base:10,$constructor:function(){ah.apply(this,arguments),this._originalscale=new mc},getticks:function(){var t=this._originalscale,e=this._extent,i=t.getextent();return p(gc.getticks.call(this),function(n){var a=cr(xc(this.base,n));return a=n===e[0]&&t.__fixmin?mh(a,i[0]):a,a=n===e[1]&&t.__fixmax?mh(a,i[1]):a},this)},getlabel:gc.getlabel,scale:function(t){return t=vc.scale.call(this,t),xc(this.base,t)},setextent:function(t,e){var i=this.base;t=uc(t)/uc(i),e=uc(e)/uc(i),gc.setextent.call(this,t,e)},getextent:function(){var t=this.base,e=vc.getextent.call(this);e[0]=xc(t,e[0]),e[1]=xc(t,e[1]);var i=this._originalscale,n=i.getextent();return i.__fixmin&&(e[0]=mh(e[0],n[0])),i.__fixmax&&(e[1]=mh(e[1],n[1])),e},unionextent:function(t){this._originalscale.unionextent(t);var e=this.base;t[0]=uc(t[0])/uc(e),t[1]=uc(t[1])/uc(e),vc.unionextent.call(this,t)},unionextentfromdata:function(t,e){this.unionextent(t.getapproximateextent(e))},niceticks:function(t){t=t||10;var e=this._extent,i=e[1]-e[0];if(!(1/0===i||0>=i)){var n=_r(i),a=t/i*n;for(.5>=a&&(n*=10);!isnan(n)&&math.abs(n)<1&&math.abs(n)>0;)n*=10;var o=[cr(zc(e[0]/n)*n),cr(hc(e[1]/n)*n)];this._interval=n,this._niceextent=o}},niceextent:function(t){gc.niceextent.call(this,t);var e=this._originalscale;e.__fixmin=t.fixmin,e.__fixmax=t.fixmax}});f(["contain","normalize"],function(t){yc.prototype[t]=function(e){return e=uc(e)/uc(this.base),vc[t].call(this,e)}}),yc.create=function(){return new yc};var jc={getmin:function(t){var e=this.option,i=t||null==e.rangestart?e.min:e.rangestart;return this.axis&&null!=i&&"datamin"!==i&&"function"!=typeof i&&!t(i)&&(i=this.axis.scale.parse(i)),i},getmax:function(t){var e=this.option,i=t||null==e.rangeend?e.max:e.rangeend;return this.axis&&null!=i&&"datamax"!==i&&"function"!=typeof i&&!t(i)&&(i=this.axis.scale.parse(i)),i},getneedcrosszero:function(){var t=this.option;return null!=t.rangestart||null!=t.rangeend?!1:!t.scale},getcoordsysmodel:g,setrange:function(t,e){this.option.rangestart=t,this.option.rangeend=e},resetrange:function(){this.option.rangestart=this.option.rangeend=null}},qc=no({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildpath:function(t,e){var i=e.cx,n=e.cy,a=e.width/2,o=e.height/2;t.moveto(i,n-o),t.lineto(i+a,n+o),t.lineto(i-a,n+o),t.closepath()}}),kc=no({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildpath:function(t,e){var i=e.cx,n=e.cy,a=e.width/2,o=e.height/2;t.moveto(i,n-o),t.lineto(i+a,n),t.lineto(i,n+o),t.lineto(i-a,n),t.closepath()}}),$c=no({type:"pin",shape:{x:0,y:0,width:0,height:0},buildpath:function(t,e){var i=e.x,n=e.y,a=e.width/5*3,o=math.max(a,e.height),r=a/2,s=r*r/(o-r),l=n-o+r+s,u=math.asin(s/r),h=math.cos(u)*r,c=math.sin(u),d=math.cos(u),f=.6*r,p=.7*r;t.moveto(i-h,l+s),t.arc(i,l,r,math.pi-u,2*math.pi+u),t.beziercurveto(i+h-c*f,l+s+d*f,i,n-p,i,n),t.beziercurveto(i,n-p,i-h+c*f,l+s+d*f,i-h,l+s),t.closepath()}}),jc=no({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildpath:function(t,e){var i=e.height,n=e.width,a=e.x,o=e.y,r=n/3*2;t.moveto(a,o),t.lineto(a+r,o+i),t.lineto(a,o+i/4*3),t.lineto(a-r,o+i),t.lineto(a,o),t.closepath()}}),qc={line:$i,rect:qi,roundrect:qi,square:qi,circle:bi,diamond:kc,pin:$c,arrow:jc,triangle:qc},tl={line:function(t,e,i,n,a){a.x1=t,a.y1=e+n/2,a.x2=t+i,a.y2=e+n/2},rect:function(t,e,i,n,a){a.x=t,a.y=e,a.width=i,a.height=n},roundrect:function(t,e,i,n,a){a.x=t,a.y=e,a.width=i,a.height=n,a.r=math.min(i,n)/4},square:function(t,e,i,n,a){var o=math.min(i,n);a.x=t,a.y=e,a.width=o,a.height=o},circle:function(t,e,i,n,a){a.cx=t+i/2,a.cy=e+n/2,a.r=math.min(i,n)/2},diamond:function(t,e,i,n,a){a.cx=t+i/2,a.cy=e+n/2,a.width=i,a.height=n},pin:function(t,e,i,n,a){a.x=t+i/2,a.y=e+n/2,a.width=i,a.height=n},arrow:function(t,e,i,n,a){a.x=t+i/2,a.y=e+n/2,a.width=i,a.height=n},triangle:function(t,e,i,n,a){a.cx=t+i/2,a.cy=e+n/2,a.width=i,a.height=n}},el={};f(qc,function(t,e){el[e]=new t});var il=no({type:"symbol",shape:{symboltype:"",x:0,y:0,width:0,height:0},calculatetextposition:function(t,e,i){var n=xi(t,e,i),a=this.shape;return a&&"pin"===a.symboltype&&"inside"===e.textposition&&(n.y=i.y+.4*i.height),n},buildpath:function(t,e,i){var n=e.symboltype;if("none"!==n){var a=el[n];a||(n="rect",a=el[n]),tl[n](e.x,e.y,e.width,e.height,a.shape),a.buildpath(t,a.shape,i)}}}),nl={isdimensionstacked:qu,enabledatastack:ju,getstackeddimension:th},al=(object.freeze||object)({createlist:bh,getlayoutrect:vr,datastack:nl,createscale:vh,mixinaxismodelcommonmethods:gh,completedimensions:qu,createdimensions:yc,createsymbol:eh}),ol=1e-8;hh.prototype={constructor:hh,properties:null,getboundingrect:function(){var t=this._rect;if(t)return t;for(var e=number.max_value,i=[e,e],n=[-e,-e],a=[],o=[],r=this.geometries,s=0;sn;n++)if("polygon"===i[n].type){var o=i[n].exterior,r=i[n].interiors;if(wh(o,t[0],t[1])){for(var s=0;s<(r?r.length:0);s++)if(wh(r[s]))continue t;return!0}}return!1},transformto:function(t,e,i,n){var a=this.getboundingrect(),o=a.width/a.height;i?n||(n=i/o):i=o*n;for(var r=new wi(t,e,i,n),s=a.calculatetransform(r),l=this.geometries,u=0;u0}),function(t){var e=t.properties,i=t.geometry,n=i.coordinates,a=[];"polygon"===i.type&&a.push({type:"polygon",exterior:n[0],interiors:n.slice(1)}),"multipolygon"===i.type&&f(n,function(t){t[0]&&a.push({type:"polygon",exterior:t[0],interiors:t.slice(1)})});var o=new hh(e.name,a,e.cp);return o.properties=e,o})},sl=kn(),ll=[0,1],ul=function(t,e,i){this.dim=t,this.scale=e,this._extent=i||[0,0],this.inverse=!1,this.onband=!1};ul.prototype={constructor:ul,contain:function(t){var e=this._extent,i=math.min(e[0],e[1]),n=math.max(e[0],e[1]);return t>=i&&n>=t},containdata:function(t){return this.contain(this.datatocoord(t))},getextent:function(){return this._extent.slice() },getpixelprecision:function(t){return gr(t||this.scale.getextent(),this._extent)},setextent:function(t,e){var i=this._extent;i[0]=t,i[1]=e},datatocoord:function(t,e){var i=this._extent,n=this.scale;return t=n.normalize(t),this.onband&&"ordinal"===n.type&&(i=i.slice(),rc(i,n.count())),ur(t,ll,i,e)},coordtodata:function(t,e){var i=this._extent,n=this.scale;this.onband&&"ordinal"===n.type&&(i=i.slice(),rc(i,n.count()));var a=ur(t,i,ll,e);return this.scale.scale(a)},pointtodata:function(){},gettickscoords:function(t){t=t||{};var e=t.tickmodel||this.gettickmodel(),i=yh(this,e),n=i.ticks,a=p(n,function(t){return{coord:this.datatocoord(t),tickvalue:t}},this),o=e.get("alignwithlabel");return sc(this,a,i.tickcategoryinterval,o,t.clamp),a},getviewlabels:function(){return uh(this).labels},getlabelmodel:function(){return this.model.getmodel("axislabel")},gettickmodel:function(){return this.model.getmodel("axistick")},getbandwidth:function(){var t=this._extent,e=this.scale.getextent(),i=e[1]-e[0]+(this.onband?1:0);0===i&&(i=1);var n=math.abs(t[1]-t[0]);return math.abs(n)/i},ishorizontal:null,getrotate:null,calculatecategoryinterval:function(){return ic(this)}};var hl=rl,cl={};f(["map","each","filter","indexof","inherits","reduce","filter","bind","curry","isarray","isstring","isobject","isfunction","extend","defaults","clone","merge"],function(t){cl[t]=mb[t]});var dl={};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){dl[t]=_a[t]});var fl=function(t){this._axes={},this._dimlist=[],this.name=t||""};fl.prototype={constructor:fl,type:"cartesian",getaxis:function(t){return this._axes[t]},getaxes:function(){return p(this._dimlist,lc,this)},getaxesbyscale:function(t){return t=t.tolowercase(),m(this.getaxes(),function(e){return e.scale.type===t})},addaxis:function(t){var e=t.dim;this._axes[e]=t,this._dimlist.push(e)},datatocoord:function(t){return this._datacoordconvert(t,"datatocoord")},coordtodata:function(t){return this._datacoordconvert(t,"coordtodata")},_datacoordconvert:function(t,e){for(var i=this._dimlist,n=t instanceof array?[]:{},a=0;ae[1]&&e.reverse(),e},getotheraxis:function(){this.grid.getotheraxis()},pointtodata:function(t,e){return this.coordtodata(this.tolocalcoord(t["x"===this.dim?0:1]),e)},tolocalcoord:null,toglobalcoord:null},h(pl,ul);var gl={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)"]}}},ml={};ml.categoryaxis=a({boundarygap:!0,deduplication:null,splitline:{show:!1},axistick:{alignwithlabel:!1,interval:"auto"},axislabel:{interval:"auto"}},gl),ml.valueaxis=a({boundarygap:[0,0],splitnumber:5},gl),ml.timeaxis=s({scale:!0,min:"datamin",max:"datamax"},ml.valueaxis),ml.logaxis=s({scale:!0,logbase:10},ml.valueaxis);var vl=["value","category","time","log"],yl=function(t,e,i,n){f(vl,function(r){e.extend({type:t+"axis."+r,mergedefaultandtheme:function(e,n){var o=this.layoutmode,s=o?hr(e):{},l=n.gettheme();a(e,l.get(r+"axis")),a(e,this.getdefaultoption()),e.type=i(t,e),o&&wr(e,s,o)},optionupdated:function(){var t=this.option;"category"===t.type&&(this.__ordinalmeta=oh.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([{},ml[r+"axis"],n],!0)})}),xa.registersubtypedefaulter(t+"axis",x(i,t))},xl=xa.extend({type:"cartesian2daxis",axis:null,init:function(){xl.superapply(this,"init",arguments),this.resetrange()},mergeoption:function(){xl.superapply(this,"mergeoption",arguments),this.resetrange()},restoredata:function(){xl.superapply(this,"restoredata",arguments),this.resetrange()},getcoordsysmodel:function(){return this.ecmodel.querycomponents({maintype:"grid",index:this.option.gridindex,id:this.option.gridid})[0]}});a(xl.prototype,jc);var _l={offset:0};yl("x",xl,hc,_l),yl("y",xl,hc,_l),xa.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 wl=dc.prototype;wl.type="grid",wl.axispointerenabled=!0,wl.getrect=function(){return this._rect},wl.update=function(t,e){var i=this._axesmap;this._updatescale(t,this.model),f(i.x,function(t){th(t.scale,t.model)}),f(i.y,function(t){th(t.scale,t.model)});var n={};f(i.x,function(t){fc(i,"y",t,n)}),f(i.y,function(t){fc(i,"x",t,n)}),this.resize(this.model,e)},wl.resize=function(t,e,i){function n(){f(o,function(t){var e=t.ishorizontal(),i=e?[0,a.width]:[0,a.height],n=t.inverse?1:0;t.setextent(i[n],i[1-n]),gc(t,e?a.x:a.y)})}var a=vr(t.getboxlayoutparams(),{width:e.getwidth(),height:e.getheight()});this._rect=a;var o=this._axeslist;n(),!i&&t.get("containlabel")&&(f(o,function(t){if(!t.model.get("axislabel.inside")){var e=ph(t);if(e){var i=t.ishorizontal()?"height":"width",n=t.model.get("axislabel.margin");a[i]-=e[i]+n,"top"===t.position?a.y+=e.height+n:"left"===t.position&&(a.x+=e.width+n)}}}),n())},wl.getaxis=function(t,e){var i=this._axesmap[t];if(null!=i){if(null==e)for(var n in i)if(i.hasownproperty(n))return i[n];return i[e]}},wl.getaxes=function(){return this._axeslist.slice()},wl.getcartesian=function(t,e){if(null!=t&&null!=e){var i="x"+t+"y"+e;return this._coordsmap[i]}s(t)&&(e=t.yaxisindex,t=t.xaxisindex);for(var n=0,a=this._coordslist;nt&&(t=e),t},defaultoption:{clip:!0}});var ml=lm([["fill","color"],["stroke","bordercolor"],["linewidth","borderwidth"],["stroke","barbordercolor"],["linewidth","barborderwidth"],["opacity"],["shadowblur"],["shadowoffsetx"],["shadowoffsety"],["shadowcolor"]]),il={getbaritemstyle:function(t){var e=ml(this,t);if(this.getborderlinedash){var i=this.getborderlinedash();i&&(e.linedash=i)}return e}},al=["itemstyle","barborderwidth"],tl=[0,0];r(ir.prototype,il),iu({type:"bar",render:function(t,e,i){this._updatedrawmode(t);var n=t.get("coordinatesystem");return("cartesian2d"===n||"polar"===n)&&(this._islargedraw?this._renderlarge(t,e,i):this._rendernormal(t,e,i)),this.group},incrementalpreparerender:function(t){this._clear(),this._updatedrawmode(t)},incrementalrender:function(t,e){this._incrementalrenderlarge(t,e)},_updatedrawmode:function(t){var e=t.pipelinecontext.large;(null==this._islargedraw||e^this._islargedraw)&&(this._islargedraw=e,this._clear())},_rendernormal:function(t){var e,i=this.group,n=t.getdata(),a=this._data,o=t.coordinatesystem,r=o.getbaseaxis();"cartesian2d"===o.type?e=r.ishorizontal():"polar"===o.type&&(e="angle"===r.dim);var s=t.isanimationenabled()?t:null,l=t.get("clip",!0),u=mc(o,n);i.removeclippath(),n.diff(a).add(function(a){if(n.hasvalue(a)){var r=n.getitemmodel(a),h=pl[o.type](n,a,r);if(l){var c=ll[o.type](u,h);if(c)return void i.remove(d)}var d=kl[o.type](n,a,r,h,e,s);n.setitemgraphicel(a,d),i.add(d),tc(d,n,a,r,h,t,e,"polar"===o.type)}}).update(function(r,h){var c=a.getitemgraphicel(h);if(!n.hasvalue(r))return void i.remove(c);var d=n.getitemmodel(r),f=pl[o.type](n,r,d);if(l){var p=ll[o.type](u,f);if(p)return void i.remove(c)}c?ho(c,{shape:f},s,r):c=kl[o.type](n,r,d,f,e,s,!0),n.setitemgraphicel(r,c),i.add(c),tc(c,n,r,d,f,t,e,"polar"===o.type)}).remove(function(t){var e=a.getitemgraphicel(t);"cartesian2d"===o.type?e&&ic(t,s,e):e&&ac(t,s,e)}).execute(),this._data=n},_renderlarge:function(t){this._clear(),cc(t,this.group);var e=t.get("clip",!0)?sc(t.coordinatesystem,!1,t):null;e?this.group.setclippath(e):this.group.removeclippath()},_incrementalrenderlarge:function(t,e){cc(e,this.group,!0)},dispose:g,remove:function(t){this._clear(t)},_clear:function(t){var e=this.group,i=this._data;t&&t.get("animation")&&i&&!this._islargedraw?i.eachitemgraphicel(function(e){"sector"===e.type?ac(e.dataindex,t,e):ic(e.dataindex,t,e)}):e.removeall(),this._data=null}});var dl=math.max,cl=math.min,ll={cartesian2d:function(t,e){var i=e.width<0?-1:1,n=e.height<0?-1:1;0>i&&(e.x+=e.width,e.width=-e.width),0>n&&(e.y+=e.height,e.height=-e.height);var a=dl(e.x,t.x),o=cl(e.x+e.width,t.x+t.width),r=dl(e.y,t.y),s=cl(e.y+e.height,t.y+t.height);e.x=a,e.y=r,e.width=o-a,e.height=s-r;var l=e.width<0||e.height<0;return 0>i&&(e.x+=e.width,e.width=-e.width),0>n&&(e.y+=e.height,e.height=-e.height),l},polar:function(){return!1}},kl={cartesian2d:function(t,e,i,n,a,o,s){var l=new qi({shape:r({},n)});if(o){var u=l.shape,h=a?"height":"width",c={};u[h]=0,c[h]=n[h],_a[s?"updateprops":"initprops"](l,{shape:c},o,e)}return l},polar:function(t,e,i,n,a,o,r){var l=n.startangle0?1:-1,r=n.height>0?1:-1;return{x:n.x+o*a/2,y:n.y+r*a/2,width:n.width-o*a,height:n.height-r*a}},polar:function(t,e){var i=t.getitemlayout(e);return{cx:i.cx,cy:i.cy,r0:i.r0,r:i.r,startangle:i.startangle,endangle:i.endangle}}},ol=ha.extend({type:"largebar",shape:{points:[]},buildpath:function(t,e){for(var i=e.points,n=this.__startpoint,a=this.__basedimidx,o=0;o=0?i:null},30,!1),zl=math.pi,rl=function(t,e){this.opt=e,this.axismodel=t,s(e,{labeloffset:0,namedirection:1,tickdirection:1,labeldirection:1,silent:!0}),this.group=new ss;var i=new ss({position:e.position.slice(),rotation:e.rotation});i.updatetransform(),this._transform=i.transform,this._dumbgroup=i};rl.prototype={constructor:rl,hasbuilder:function(t){return!!el[t]},add:function(t){el[t].call(this)},getgroup:function(){return this.group}};var el={axisline:function(){var t=this.opt,e=this.axismodel;if(e.get("axisline.show")){var i=this.axismodel.axis.getextent(),n=this._transform,a=[i[0],0],o=[i[1],0];n&&(oe(a,a,n),oe(o,o,n));var s=r({linecap:"round"},e.getmodel("axisline.linestyle").getlinestyle());this.group.add(new $i({anid:"line",subpixeloptimize:!0,shape:{x1:a[0],y1:a[1],x2:o[0],y2:o[1]},style:s,strokecontainthreshold:t.strokecontainthreshold||5,silent:!0,z2:1}));var l=e.get("axisline.symbol"),u=e.get("axisline.symbolsize"),h=e.get("axisline.symboloffset")||0;if("number"==typeof h&&(h=[h,h]),null!=l){"string"==typeof l&&(l=[l,l]),("string"==typeof u||"number"==typeof u)&&(u=[u,u]);var c=u[0],d=u[1];f([{rotate:t.rotation+math.pi/2,offset:h[0],r:0},{rotate:t.rotation-math.pi/2,offset:h[1],r:math.sqrt((a[0]-o[0])*(a[0]-o[0])+(a[1]-o[1])*(a[1]-o[1]))}],function(e,i){if("none"!==l[i]&&null!=l[i]){var n=eh(l[i],-c/2,-d/2,c,d,s.stroke,!0),o=e.r+e.offset,r=[a[0]+o*math.cos(t.rotation),a[1]-o*math.sin(t.rotation)];n.attr({rotation:e.rotate,position:r,silent:!0,z2:11}),this.group.add(n)}},this)}}},axisticklabel:function(){var t=this.axismodel,e=this.opt,i=ec(this,t,e),n=bc(this,t,e);oc(t,n,i)},axisname:function(){var t=this.opt,e=this.axismodel,i=d(t.axisname,e.get("name"));if(i){var n,a=e.get("namelocation"),o=t.namedirection,s=e.getmodel("nametextstyle"),l=e.get("namegap")||0,u=this.axismodel.axis.getextent(),h=u[0]>u[1]?-1:1,c=["start"===a?u[0]-h*l:"end"===a?u[1]+h*l:(u[0]+u[1])/2,rc(a)?t.labeloffset+o*l:0],d=e.get("namerotate");null!=d&&(d=d*zl/180);var f;rc(a)?n=vl(t.rotation,null!=d?d:t.rotation,o):(n=pc(t,a,d||0,u),f=t.axisnameavailablewidth,null!=f&&(f=math.abs(f/math.sin(n.rotation)),!isfinite(f)&&(f=null)));var p=s.getfont(),g=e.get("nametruncate",!0)||{},m=g.ellipsis,v=d(t.nametruncatemaxwidth,g.maxwidth,f),y=null!=m&&null!=v?ea(i,v,p,m,{minchar:2,placeholder:g.placeholder}):i,x=e.get("tooltip",!0),_=e.maintype,w={componenttype:_,name:i,$vars:["name"]};w[_+"index"]=e.componentindex;var b=new ei({anid:"name",__fulltext:i,__truncatedtext:y,position:c,rotation:n.rotation,silent:gl(e),z2:1,tooltip:x&&x.show?r({content:i,formatter:function(){return i},formatterparams:w},x):null});oo(b.style,s,{text:y,textfont:p,textfill:s.gettextcolor()||e.get("axisline.linestyle.color"),textalign:s.get("align")||n.textalign,textverticalalign:s.get("verticalalign")||n.textverticalalign}),e.get("triggerevent")&&(b.eventdata=bl(e),b.eventdata.targettype="axisname",b.eventdata.name=i),this._dumbgroup.add(b),b.updatetransform(),this.group.add(b),b.decomposetransform()}}},bl=rl.makeaxiseventdatabase=function(t){var e={componenttype:t.maintype,componentindex:t.componentindex};return e[t.maintype+"index"]=t.componentindex,e},vl=rl.innertextlayout=function(t,e,i){var n,a,o=vr(e-t);return yr(o)?(a=i>0?"top":"bottom",n="center"):yr(o-zl)?(a=i>0?"bottom":"top",n="center"):(a="middle",n=o>0&&zl>o?i>0?"right":"left":i>0?"left":"right"),{rotation:o,textalign:n,textverticalalign:a}},gl=rl.islabelsilent=function(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerevent")||e&&e.show)},fl=f,wl=x,hl=su({type:"axis",_axispointer:null,axispointerclass:null,render:function(t,e,i,n){this.axispointerclass&&xc(t),hl.superapply(this,"render",arguments),kc(this,t,e,i,n,!0)},updateaxispointer:function(t,e,i,n){kc(this,t,e,i,n,!1)},remove:function(t,e){var i=this._axispointer;i&&i.remove(e),hl.superapply(this,"remove",arguments)},dispose:function(t,e){$c(this,e),hl.superapply(this,"dispose",arguments)}}),zl=[];hl.registeraxispointerclass=function(t,e){zl[t]=e},hl.getaxispointerclass=function(t){return t&&zl[t]};var xl=["axisline","axisticklabel","axisname"],ul=["splitarea","splitline"],yl=hl.extend({type:"cartesianaxis",axispointerclass:"cartesianaxispointer",render:function(t,e,i,n){this.group.removeall();var a=this._axisgroup;if(this._axisgroup=new ss,this.group.add(this._axisgroup),t.get("show")){var o=t.getcoordsysmodel(),r=jc(o,t),s=new rl(t,r);f(xl,s.add,s),this._axisgroup.add(s.getgroup()),f(ul,function(e){t.get(e+".show")&&this["_"+e](t,o)},this),jo(a,this._axisgroup,t),yl.supercall(this,"render",t,e,i,n)}},remove:function(){this._splitareacolors=null},_splitline:function(t,e){var i=t.axis;if(!i.scale.isblank()){var n=t.getmodel("splitline"),a=n.getmodel("linestyle"),o=a.get("color");o=_(o)?o:[o];for(var r=e.coordinatesystem.getrect(),l=i.ishorizontal(),u=0,h=i.gettickscoords({tickmodel:n}),c=[],d=[],f=a.getlinestyle(),p=0;p0&&cd(i[a-1]);a--);for(;a>n&&cd(i[n]);n++);}for(;a>n;)n+=dd(t,i,n,a,a,1,o.min,o.max,e.smooth,e.smoothmonotone,e.connectnulls)+1}}),hk=ha.extend({type:"ec-polygon",shape:{points:[],stackedonpoints:[],smooth:0,stackedonsmooth:0,smoothconstraint:!0,smoothmonotone:null,connectnulls:!1},brush:gi(ha.prototype.brush),buildpath:function(t,e){var i=e.points,n=e.stackedonpoints,a=0,o=i.length,r=e.smoothmonotone,s=gd(i,e.smoothconstraint),l=gd(n,e.smoothconstraint);if(e.connectnulls){for(;o>0&&cd(i[o-1]);o--);for(;o>a&&cd(i[a]);a++);}for(;o>a;){var u=dd(t,i,a,o,o,1,s.min,s.max,e.smooth,r,e.connectnulls);dd(t,n,a+u-1,u,o,-1,l.min,l.max,e.stackedonsmooth,r,e.connectnulls),a+=u+1,t.closepath()}}});il.extend({type:"line",init:function(){var t=new ss,e=new nd;this.group.add(e.group),this._symboldraw=e,this._linegroup=t},render:function(t,e,i){var n=t.coordinatesystem,a=this.group,o=t.getdata(),r=t.getmodel("linestyle"),l=t.getmodel("areastyle"),u=o.maparray(o.getitemlayout),h="polar"===n.type,c=this._coordsys,d=this._symboldraw,f=this._polyline,p=this._polygon,g=this._linegroup,m=t.get("animation"),v=!l.isempty(),y=l.get("origin"),x=sd(n,o,y),_=yd(n,o,x),w=t.get("showsymbol"),b=w&&!h&&wd(t,o,n),s=this._data;s&&s.eachitemgraphicel(function(t,e){t.__temp&&(a.remove(t),s.setitemgraphicel(e,null))}),w||d.remove(),a.add(g);var m,i=!h&&t.get("step");n&&n.getarea&&(m=n.getarea(),null!=m.width?(m.x-=.1,m.y-=.1,m.width+=.2,m.height+=.2):m.r0&&(m.r0-=.5,m.r1+=.5)),f&&c.type===n.type&&i===this._step?(v&&!p?p=this._newpolygon(u,_,n,m):p&&!v&&(g.remove(p),p=this._polygon=null),g.setclippath(sd(n,!1,t)),w&&d.updatedata(o,{isignore:b,clipshape:m}),o.eachitemgraphicel(function(t){t.stopanimation(!0)}),md(this._stackedonpoints,_)&&md(this._points,u)||(m?this._updateanimation(o,_,n,i,i,y):(i&&(u=xd(u,n,i),_=xd(_,n,i)),f.setshape({points:u}),p&&p.setshape({points:u,stackedonpoints:_})))):(w&&d.updatedata(o,{isignore:b,clipshape:m}),i&&(u=xd(u,n,i),_=xd(_,n,i)),f=this._newpolyline(u,n,m),v&&(p=this._newpolygon(u,_,n,m)),g.setclippath(sd(n,!0,t)));var a=_d(o,n)||o.getvisual("color");f.usestyle(s(r.getlinestyle(),{fill:"none",stroke:a,linejoin:"bevel"}));var t=t.get("smooth");if(t=vd(t.get("smooth")),f.setshape({smooth:t,smoothmonotone:t.get("smoothmonotone"),connectnulls:t.get("connectnulls")}),p){var d=o.getcalculationinfo("stackedonseries"),c=0;p.usestyle(s(l.getareastyle(),{fill:a,opacity:.7,linejoin:"bevel"})),d&&(c=vd(d.get("smooth"))),p.setshape({smooth:t,stackedonsmooth:c,smoothmonotone:t.get("smoothmonotone"),connectnulls:t.get("connectnulls")})}this._data=o,this._coordsys=n,this._stackedonpoints=_,this._points=u,this._step=i,this._valueorigin=y},dispose:function(){},highlight:function(t,e,i,n){var a=t.getdata(),o=qn(a,n);if(!(o instanceof array)&&null!=o&&o>=0){var r=a.getitemgraphicel(o);if(!r){var s=a.getitemlayout(o);if(!s)return;r=new qc(a,o),r.position=s,r.setz(t.get("zlevel"),t.get("z")),r.ignore=isnan(s[0])||isnan(s[1]),r.__temp=!0,a.setitemgraphicel(o,r),r.stopsymbolanimation(!0),this.group.add(r)}r.highlight()}else il.prototype.highlight.call(this,t,e,i,n)},downplay:function(t,e,i,n){var a=t.getdata(),o=qn(a,n);if(null!=o&&o>=0){var r=a.getitemgraphicel(o);r&&(r.__temp?(a.setitemgraphicel(o,null),this.group.remove(r)):r.downplay())}else il.prototype.downplay.call(this,t,e,i,n)},_newpolyline:function(t){var e=this._polyline;return e&&this._linegroup.remove(e),e=new uk({shape:{points:t},silent:!0,z2:10}),this._linegroup.add(e),this._polyline=e,e},_newpolygon:function(t,e){var i=this._polygon;return i&&this._linegroup.remove(i),i=new hk({shape:{points:t,stackedonpoints:e},silent:!0}),this._linegroup.add(i),this._polygon=i,i },_updateanimation:function(t,e,i,n,a,o){var r=this._polyline,s=this._polygon,l=t.hostmodel,u=ek(this._data,t,this._stackedonpoints,e,this._coordsys,i,this._valueorigin,o),h=u.current,c=u.stackedoncurrent,d=u.next,f=u.stackedonnext;a&&(h=xd(u.current,i,a),c=xd(u.stackedoncurrent,i,a),d=xd(u.next,i,a),f=xd(u.stackedonnext,i,a)),r.shape.__points=u.current,r.shape.points=h,ho(r,{shape:{points:d}},l),s&&(s.setshape({points:h,stackedonpoints:c}),ho(s,{shape:{points:d,stackedonpoints:f}},l));for(var p=[],g=u.status,m=0;me&&(e=t[i]);return isfinite(e)?e:0/0},min:function(t){for(var e=1/0,i=0;i1){var u;"string"==typeof i?u=fk[i]:"function"==typeof i&&(u=i),u&&t.setdata(e.downsample(e.mapdimension(o.dim),1/l,u,pk))}}}}};xu(ck("line","circle","line")),yu(dk("line")),fu(rd.processor.statistic,gk("line"));var mk=function(t,e,i){e=_(e)&&{coorddimensions:e}||r({},e);var n=t.getsource(),a=yc(n,e),o=new gc(a,t);return o.initdata(n,i),o},vk={updateselectedmap:function(t){this._targetlist=_(t)?t.slice():[],this._selecttargetmap=g(t||[],function(t,e){return t.set(e.name,e),t},b())},select:function(t,e){var i=null!=e?this._targetlist[e]:this._selecttargetmap.get(t),n=this.get("selectedmode");"single"===n&&this._selecttargetmap.each(function(t){t.selected=!1}),i&&(i.selected=!0)},unselect:function(t,e){var i=null!=e?this._targetlist[e]:this._selecttargetmap.get(t);i&&(i.selected=!1)},toggleselected:function(t,e){var i=null!=e?this._targetlist[e]:this._selecttargetmap.get(t);return null!=i?(this[i.selected?"unselect":"select"](t,e),i.selected):void 0},isselected:function(t,e){var i=null!=e?this._targetlist[e]:this._selecttargetmap.get(t);return i&&i.selected}},yk=mu({type:"series.pie",init:function(t){yk.superapply(this,"init",arguments),this.legenddataprovider=function(){return this.getrawdata()},this.updateselectedmap(this._createselectablelist()),this._defaultlabelline(t)},mergeoption:function(t){yk.supercall(this,"mergeoption",t),this.updateselectedmap(this._createselectablelist())},getinitialdata:function(){return mk(this,["value"])},_createselectablelist:function(){for(var t=this.getrawdata(),e=t.mapdimension("value"),i=[],n=0,a=t.count();a>n;n++)i.push({name:t.getname(n),value:t.get(e,n),selected:hs(t,n,"selected")});return i},getdataparams:function(t){var e=this.getdata(),i=yk.supercall(this,"getdataparams",t),n=[];return e.each(e.mapdimension("value"),function(t){n.push(t)}),i.percent=mr(n,t,e.hostmodel.get("percentprecision")),i.$vars.push("percent"),i},_defaultlabelline:function(t){fn(t,"labelline",["show"]);var e=t.labelline,i=t.emphasis.labelline;e.show=e.show&&t.label.show,i.show=i.show&&t.emphasis.label.show},defaultoption:{zlevel:0,z:2,legendhoverlink:!0,hoveranimation:!0,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startangle:90,minangle:0,minshowlabelangle:0,selectedoffset:10,hoveroffset:10,avoidlabeloverlap:!0,percentprecision:2,stillshowzerosum:!0,label:{rotate:!1,show:!0,position:"outer"},labelline:{show:!0,length:15,length2:15,smooth:!1,linestyle:{width:1,type:"solid"}},itemstyle:{borderwidth:1},animationtype:"expansion",animationtypeupdate:"transition",animationeasing:"cubicout"}});c(yk,vk);var xk=ad.prototype;xk.updatedata=function(t,e,i){var n=this.childat(0),a=this.childat(1),o=this.childat(2),l=t.hostmodel,u=t.getitemmodel(e),h=t.getitemlayout(e),c=r({},h);c.label=null;var d=l.getshallow("animationtypeupdate");if(i){n.setshape(c);var f=l.getshallow("animationtype");"scale"===f?(n.shape.r=h.r0,zo(n,{shape:{r:h.r}},l,e)):(n.shape.endangle=h.startangle,ho(n,{shape:{endangle:h.endangle}},l,e))}else"expansion"===d?n.setshape(c):ho(n,{shape:c},l,e);var p=t.getitemvisual(e,"color");n.usestyle(s({linejoin:"bevel",fill:p},u.getmodel("itemstyle").getitemstyle())),n.hoverstyle=u.getmodel("emphasis.itemstyle").getitemstyle();var g=u.getshallow("cursor");g&&n.attr("cursor",g),id(this,t.getitemlayout(e),l.isselected(null,e),l.get("selectedoffset"),l.get("animation"));var m=!i&&"transition"===d;this._updatelabel(t,e,m),this.highdownonupdate=u.get("hoveranimation")&&l.isanimationenabled()?function(t,e){"emphasis"===e?(a.ignore=a.hoverignore,o.ignore=o.hoverignore,n.stopanimation(!0),n.animateto({shape:{r:h.r+l.get("hoveroffset")}},300,"elasticout")):(a.ignore=a.normalignore,o.ignore=o.normalignore,n.stopanimation(!0),n.animateto({shape:{r:h.r}},300,"elasticout"))}:null,to(this)},xk._updatelabel=function(t,e,i){var n=this.childat(1),a=this.childat(2),o=t.hostmodel,r=t.getitemmodel(e),s=t.getitemlayout(e),l=s.label,u=t.getitemvisual(e,"color");if(!l||isnan(l.x)||isnan(l.y))return void(a.ignore=a.normalignore=a.hoverignore=n.ignore=n.normalignore=n.hoverignore=!0);var h={points:l.linepoints||[[l.x,l.y],[l.x,l.y],[l.x,l.y]]},c={x:l.x,y:l.y};i?(ho(n,{shape:h},o,e),ho(a,{style:c},o,e)):(n.attr({shape:h}),a.attr({style:c})),a.attr({rotation:l.rotation,origin:[l.x,l.y],z2:10});var d=r.getmodel("label"),f=r.getmodel("emphasis.label"),p=r.getmodel("labelline"),g=r.getmodel("emphasis.labelline"),u=t.getitemvisual(e,"color");ko(a.style,a.hoverstyle={},d,f,{labelfetcher:t.hostmodel,labeldataindex:e,defaulttext:t.getname(e),autocolor:u,useinsidestyle:!!l.inside},{textalign:l.textalign,textverticalalign:l.verticalalign,opacity:t.getitemvisual(e,"opacity")}),a.ignore=a.normalignore=!d.get("show"),a.hoverignore=!f.get("show"),n.ignore=n.normalignore=!p.get("show"),n.hoverignore=!g.get("show"),n.setstyle({stroke:u,opacity:t.getitemvisual(e,"opacity")}),n.setstyle(p.getmodel("linestyle").getlinestyle()),n.hoverstyle=g.getmodel("linestyle").getlinestyle();var m=p.get("smooth");m&&m===!0&&(m=.4),n.setshape({smooth:m})},h(ad,ss);var _k=(il.extend({type:"pie",init:function(){var t=new ss;this._sectorgroup=t},render:function(t,e,i,n){if(!n||n.from!==this.uid){var a=t.getdata(),o=this._data,r=this.group,s=e.get("animation"),l=!o,u=t.get("animationtype"),h=t.get("animationtypeupdate"),c=x(md,this.uid,t,s,i),d=t.get("selectedmode");if(a.diff(o).add(function(t){var e=new ad(a,t);l&&"scale"!==u&&e.eachchild(function(t){t.stopanimation(!0)}),d&&e.on("click",c),a.setitemgraphicel(t,e),r.add(e)}).update(function(t,e){var i=o.getitemgraphicel(e);l||"transition"===h||i.eachchild(function(t){t.stopanimation(!0)}),i.updatedata(a,t),i.off("click"),d&&i.on("click",c),r.add(i),a.setitemgraphicel(t,i)}).remove(function(t){var e=o.getitemgraphicel(t);r.remove(e)}).execute(),s&&a.count()>0&&(l?"scale"!==u:"transition"!==h)){for(var f=a.getitemlayout(0),p=1;isnan(f.startangle)&&p=n.r0}}}),function(t,e){f(e,function(e){e.update="updateview",gu(e,function(i,n){var a={};return n.eachcomponent({maintype:"series",subtype:t,query:i},function(t){t[e.method]&&t[e.method](i.name,i.dataindex);var n=t.getdata();n.each(function(e){var i=n.getname(e);a[i]=t.isselected(i)||!1})}),{name:i.name,selected:a,seriesid:i.seriesid}})})}),wk=function(t){return{gettargetseries:function(e){var i={},n=b();return e.eachseriesbytype(t,function(t){t.__palettescope=i,n.set(t.uid,t)}),n},reset:function(t){var e=t.getrawdata(),i={},n=t.getdata();n.each(function(t){var e=n.getrawindex(t);i[e]=t}),e.each(function(a){var o,r=i[a],s=null!=r&&n.getitemvisual(r,"color",!0),l=null!=r&&n.getitemvisual(r,"bordercolor",!0);if(s&&l||(o=e.getitemmodel(a)),s)e.setitemvisual(a,"color",s);else{var u=o.get("itemstyle.color")||t.getcolorfrompalette(e.getname(a)||a+"",t.__palettescope,e.count());e.setitemvisual(a,"color",u),null!=r&&n.setitemvisual(r,"color",u)}if(l)e.setitemvisual(a,"bordercolor",l);else{var h=o.get("itemstyle.bordercolor");e.setitemvisual(a,"bordercolor",h),null!=r&&n.setitemvisual(r,"bordercolor",h)}})}}},bk=math.pi/180,sk=function(t,e,i,n){var a,o,r=t.getdata(),s=[],l=!1,u=(t.get("minshowlabelangle")||0)*bk;r.each(function(i){var n=r.getitemlayout(i),h=r.getitemmodel(i),c=h.getmodel("label"),d=c.get("position")||h.get("emphasis.label.position"),f=h.getmodel("labelline"),p=f.get("length"),g=f.get("length2");if(!(n.anglew?-1:1)*g,c=t;m=d+(0>w?-5:5),v=c,y=[[m,i],[a,t],[d,c]]}x=s?"center":w>0?"left":"right"}var l,k=c.getfont(),p=c.get("rotate");l="number"==typeof p?p*(math.pi/180):p?0>w?-_+math.pi:-_:0;var o=t.getformattedlabel(i,"normal")||r.getname(i),n=gi(o,k,x,"top");l=!!l,n.label={x:m,y:v,position:d,height:n.height,len:p,len2:g,linepoints:y,textalign:x,verticalalign:"middle",rotation:l,inside:s},s||s.push(n.label)}}),!l&&t.get("avoidlabeloverlap")&&dd(s,a,o,e,i,n)},mk=2*math.pi,ik=math.pi/180,ak=function(t,e,i){e.eachseriesbytype(t,function(t){var e=t.getdata(),n=e.mapdimension("value"),a=t.get("center"),o=t.get("radius");_(o)||(o=[0,o]),_(a)||(a=[a,a]);var r=i.getwidth(),s=i.getheight(),l=math.min(r,s),u=hr(a[0],r),h=hr(a[1],s),c=hr(o[0],l/2),d=hr(o[1],l/2),f=-t.get("startangle")*ik,p=t.get("minangle")*ik,g=0;e.each(n,function(t){!isnan(t)&&g++});var m=e.getsum(n),v=math.pi/(m||g)*2,y=t.get("clockwise"),x=t.get("rosetype"),w=t.get("stillshowzerosum"),b=e.getdataextent(n);b[0]=0;var s=mk,m=0,i=f,a=y?1:-1;if(e.each(n,function(t,i){var n;if(isnan(t))return void e.setitemlayout(i,{angle:0/0,startangle:0/0,endangle:0/0,clockwise:y,cx:u,cy:h,r0:c,r:x?0/0:d});n="area"!==x?0===m&&w?v:t*v:mk/g,p>n?(n=p,s-=p):m+=t;var a=i+a*n;e.setitemlayout(i,{angle:n,startangle:i,endangle:a,clockwise:y,cx:u,cy:h,r0:c,r:x?ur(t,b,[c,d]):d}),i=a}),mk>s&&g)if(.001>=s){var t=mk/g;e.each(n,function(t,i){if(!isnan(t)){var n=e.getitemlayout(i);n.angle=t,n.startangle=f+a*i*t,n.endangle=f+a*(i+1)*t}})}else v=s/m,i=f,e.each(n,function(t,i){if(!isnan(t)){var n=e.getitemlayout(i),a=n.angle===p?p:t*v;n.startangle=i,n.endangle=i+a*a,i+=a*a}});sk(t,d,r,s)})},tk=function(t){return{seriestype:t,reset:function(t,e){var i=e.findcomponents({maintype:"legend"});if(i&&i.length){var n=t.getdata();n.filterself(function(t){for(var e=n.getname(t),a=0;a=0;s--){var l=2*s,u=n[l]-o/2,h=n[l+1]-r/2;if(t>=u&&e>=h&&u+o>=t&&h+r>=e)return s}return-1}}),lk=ld.prototype;lk.ispersistent=function(){return!this._incremental},lk.updatedata=function(t,e){this.group.removeall();var i=new ck({recthover:!0,cursor:"default"});i.setshape({points:t.getlayout("symbolpoints")}),this._setcommon(i,t,!1,e),this.group.add(i),this._incremental=null},lk.updatelayout=function(t){if(!this._incremental){var e=t.getlayout("symbolpoints");this.group.eachchild(function(t){if(null!=t.startindex){var i=2*(t.endindex-t.startindex),n=4*t.startindex*2;e=new float32array(e.buffer,n,i)}t.setshape("points",e)})}},lk.incrementalprepareupdate=function(t){this.group.removeall(),this._clearincremental(),t.count()>2e6?(this._incremental||(this._incremental=new io({silent:!0})),this.group.add(this._incremental)):this._incremental=null},lk.incrementalupdate=function(t,e,i){var n;this._incremental?(n=new ck,this._incremental.adddisplayable(n,!0)):(n=new ck({recthover:!0,cursor:"default",startindex:t.start,endindex:t.end}),n.incremental=!0,this.group.add(n)),n.setshape({points:e.getlayout("symbolpoints")}),this._setcommon(n,e,!!this._incremental,i)},lk._setcommon=function(t,e,i,n){var a=e.hostmodel;n=n||{};var o=e.getvisual("symbolsize");t.setshape("size",o instanceof array?o:[o,o]),t.softclipshape=n.clipshape||null,t.symbolproxy=eh(e.getvisual("symbol"),0,0,0,0),t.setcolor=t.symbolproxy.setcolor;var r=t.shape.size[0]=0&&(t.dataindex=i+(t.startindex||0))}))},lk.remove=function(){this._clearincremental(),this._incremental=null,this.group.removeall()},lk._clearincremental=function(){var t=this._incremental;t&&t.cleardisplaybles()},iu({type:"scatter",render:function(t){var e=t.getdata(),i=this._updatesymboldraw(e,t);i.updatedata(e,{clipshape:this._getclipshape(t)}),this._finished=!0},incrementalpreparerender:function(t){var e=t.getdata(),i=this._updatesymboldraw(e,t);i.incrementalprepareupdate(e),this._finished=!1},incrementalrender:function(t,e){this._symboldraw.incrementalupdate(t,e.getdata(),{clipshape:this._getclipshape(e)}),this._finished=t.end===e.getdata().count()},updatetransform:function(t){var e=t.getdata();if(this.group.dirty(),!this._finished||e.count()>1e4||!this._symboldraw.ispersistent())return{update:!0};var i=dk().reset(t);i.progress&&i.progress({start:0,end:e.count()},e),this._symboldraw.updatelayout(e)},_getclipshape:function(t){var e=t.coordinatesystem,i=e&&e.getarea&&e.getarea();return t.get("clip",!0)?i:null},_updatesymboldraw:function(t,e){var i=this._symboldraw,n=e.pipelinecontext,a=n.large;return i&&a===this._islargedraw||(i&&i.remove(),i=this._symboldraw=a?new ld:new nd,this._islargedraw=a,this.group.removeall()),this.group.add(i.group),i},remove:function(){this._symboldraw&&this._symboldraw.remove(!0),this._symboldraw=null},dispose:function(){}}),xu(ck("scatter","circle")),yu(dk("scatter")),pt.extend({type:"series.effectscatter",dependencies:["grid","polar"],getinitialdata:function(){return eh(this.getsource(),this)},brushselector:"point",defaultoption:{coordinatesystem:"cartesian2d",zlevel:0,z:2,legendhoverlink:!0,effecttype:"ripple",progressive:0,showeffecton:"render",rippleeffect:{period:4,scale:2.5,brushtype:"fill"},symbolsize:10}});var kk=3,pk=od.prototype;pk.stopeffectanimation=function(){this.childat(1).removeall()},pk.starteffectanimation=function(t){for(var e=t.symboltype,i=t.color,n=this.childat(1),a=0;kk>a;a++){var o=eh(e,-1,-1,2,2,i);o.attr({style:{strokenoscale:!0},z2:99,silent:!0,scale:[.5,.5]});var r=-a/kk*t.period+t.effectoffset;o.animate("",!0).when(t.period,{scale:[t.ripplescale/2,t.ripplescale/2]}).delay(r).start(),o.animatestyle(!0).when(t.period,{opacity:0}).delay(r).start(),n.add(o)}pd(n,t)},pk.updateeffectanimation=function(t){for(var e=this._effectcfg,i=this.childat(1),n=["symboltype","period","ripplescale"],a=0;a0?hk:zk)}function a(t,e){return e.get(t>0?fk:wk)}var o=t.getdata(),r=t.pipelinecontext.large;return o.setvisual({legendsymbol:"roundrect",colorp:n(1,t),colorn:n(-1,t),bordercolorp:a(1,t),bordercolorn:a(-1,t)}),e.isseriesfiltered(t)?void 0:!r&&{progress:i}}},uk="undefined"!=typeof float32array?float32array:array,yk={seriestype:"candlestick",plan:zt(),reset:function(t){function e(t,e){function i(t,e){var i=[];return i[r]=e,i[s]=t,isnan(e)||isnan(t)?[0/0,0/0]:n.datatopoint(i)}function a(t,e,i){var n=e.slice(),a=e.slice();n[r]=va(n[r]+o/2,1,!1),a[r]=va(a[r]-o/2,1,!0),i?t.push(n,a):t.push(a,n)}function l(t,e,n){var a=i(t,n),l=i(e,n);return a[r]-=o/2,l[r]-=o/2,{x:a[0],y:a[1],width:s?o:l[0]-a[0],height:s?l[1]-a[1]:o}}function h(t){return t[r]=va(t[r],1),t}for(var g;null!=(g=t.next());){var m=e.get(u,g),v=e.get(c,g),y=e.get(d,g),x=e.get(f,g),_=e.get(p,g),w=math.min(v,y),b=math.max(v,y),s=i(w,m),m=i(b,m),i=i(x,m),a=i(_,m),t=[];a(t,m,0),a(t,s,1),t.push(h(a),h(m),h(i),h(s)),e.setitemlayout(g,{sign:vd(e,g,v,y,d),initbaseline:v>y?m[s]:s[s],ends:t,brushrect:l(x,_,m)})}}function i(t,e){for(var i,a,o=new uk(4*t.count),l=0,h=[],g=[];null!=(a=t.next());){var m=e.get(u,a),v=e.get(c,a),y=e.get(d,a),x=e.get(f,a),_=e.get(p,a);isnan(m)||isnan(x)||isnan(_)?(o[l++]=0/0,l+=3):(o[l++]=vd(e,a,v,y,d),h[r]=m,h[s]=x,i=n.datatopoint(h,null,g),o[l++]=i?i[0]:0/0,o[l++]=i?i[1]:0/0,h[s]=_,i=n.datatopoint(h,null,g),o[l++]=i?i[1]:0/0)}e.setlayout("largepoints",o)}var n=t.coordinatesystem,a=t.getdata(),o=gd(t,a),r=0,s=1,l=["x","y"],u=a.mapdimension(l[r]),h=a.mapdimension(l[s],!0),c=h[0],d=h[1],f=h[2],p=h[3];return a.setlayout({candlewidth:o,issimplebox:1.3>=o}),null==u||h.length<4?void 0:{progress:t.pipelinecontext.large?i:e}}};du(gk),xu(xk),yu(yk),h(fd,ul),wd.prototype.getindicatoraxes=function(){return this._indicatoraxes},wd.prototype.datatopoint=function(t,e){var i=this._indicatoraxes[e];return this.coordtopoint(i.datatocoord(t),e)},wd.prototype.coordtopoint=function(t,e){var i=this._indicatoraxes[e],n=i.angle,a=this.cx+t*math.cos(n),o=this.cy-t*math.sin(n);return[a,o]},wd.prototype.pointtodata=function(t){var e=t[0]-this.cx,i=t[1]-this.cy,n=math.sqrt(e*e+i*i);e/=n,i/=n;for(var a,o=math.atan2(-i,e),r=1/0,s=-1,l=0;lh&&(a=u,s=l,r=h)}return[s,+(a&&a.coordtodata(n))]},wd.prototype.resize=function(t,e){var i=t.get("center"),n=e.getwidth(),a=e.getheight(),o=math.min(n,a)/2;this.cx=hr(i[0],n),this.cy=hr(i[1],a),this.startangle=t.get("startangle")*math.pi/180;var r=t.get("radius");("string"==typeof r||"number"==typeof r)&&(r=[0,r]),this.r0=hr(r[0],o),this.r=hr(r[1],o),f(this._indicatoraxes,function(t,e){t.setextent(this.r0,this.r);var i=this.startangle+e*math.pi*2/this._indicatoraxes.length;i=math.atan2(math.sin(i),math.cos(i)),t.angle=i},this)},wd.prototype.update=function(t){function e(t){var e=math.pow(10,math.floor(math.log(t)/math.ln10)),i=t/e;return 2===i?i=5:i*=2,i*e}var i=this._indicatoraxes,n=this._model;f(i,function(t){t.scale.setextent(1/0,-1/0)}),t.eachseriesbytype("radar",function(e){if("radar"===e.get("coordinatesystem")&&t.getcomponent("radar",e.get("radarindex"))===n){var a=e.getdata();f(i,function(t){t.scale.unionextentfromdata(a,a.mapdimension(t.dim))})}},this);var a=n.get("splitnumber");f(i,function(t){var i=ih(t.scale,t.model);th(t.scale,t.model);var n=t.model,o=t.scale,r=n.getmin(),s=n.getmax(),l=o.getinterval();if(null!=r&&null!=s)o.setextent(+r,+s),o.setinterval((s-r)/a);else if(null!=r){var u;do u=r+l*a,o.setextent(+r,u),o.setinterval(l),l=e(l);while(ui[0]&&isfinite(h)&&isfinite(i[0]))}else{var c=o.getticks().length-1;c>a&&(l=e(l));var d=math.round((i[0]+i[1])/2/l)*l,f=math.round(a/2);o.setextent(cr(d-f*l),cr(d+(a-f)*l)),o.setinterval(l)}})},wd.dimensions=[],wd.create=function(t,e){var i=[];return t.eachcomponent("radar",function(n){var a=new wd(n,t,e);i.push(a),n.coordinatesystem=a}),t.eachseriesbytype("radar",function(t){"radar"===t.get("coordinatesystem")&&(t.coordinatesystem=i[t.get("radarindex")||0])}),i},ms.register("radar",wd);var jk=ml.valueaxis,qk=(bu({type:"radar",optionupdated:function(){var t=this.get("boundarygap"),e=this.get("splitnumber"),i=this.get("scale"),o=this.get("axisline"),l=this.get("axistick"),u=this.get("axislabel"),h=this.get("name"),c=this.get("name.show"),d=this.get("name.formatter"),f=this.get("namegap"),g=this.get("triggerevent"),m=p(this.get("indicator")||[],function(p){null!=p.max&&p.max>0&&!p.min?p.min=0:null!=p.min&&p.min<0&&!p.max&&(p.max=0);var m=h;if(null!=p.color&&(m=s({color:p.color},h)),p=a(n(p),{boundarygap:t,splitnumber:e,scale:i,axisline:o,axistick:l,axislabel:u,name:p.text,namelocation:"end",namegap:f,nametextstyle:m,triggerevent:g},!1),c||(p.name=""),"string"==typeof d){var v=p.name;p.name=d.replace("{value}",null!=v?v:"")}else"function"==typeof d&&(p.name=d(p.name,p));var y=r(new ir(p,null,this.ecmodel),jc);return y.maintype="radar",y.componentindex=this.componentindex,y},this);this.getindicatormodels=function(){return m}},defaultoption:{zlevel:0,z:0,center:["50%","50%"],radius:"75%",startangle:90,name:{show:!0},boundarygap:[0,0],splitnumber:5,namegap:15,scale:!1,shape:"polygon",axisline:a({linestyle:{color:"#bbb"}},jk.axisline),axislabel:hd(jk.axislabel,!1),axistick:hd(jk.axistick,!1),splitline:hd(jk.splitline,!0),splitarea:hd(jk.splitarea,!0),indicator:[]}}),["axisline","axisticklabel","axisname"]);su({type:"radar",render:function(t){var e=this.group;e.removeall(),this._buildaxes(t),this._buildsplitlineandarea(t)},_buildaxes:function(t){var e=t.coordinatesystem,i=e.getindicatoraxes(),n=p(i,function(t){var i=new rl(t.model,{position:[e.cx,e.cy],rotation:t.angle,labeldirection:-1,tickdirection:-1,namedirection:1});return i});f(n,function(t){f(qk,t.add,t),this.group.add(t.getgroup())},this)},_buildsplitlineandarea:function(t){function e(t,e,i){var n=i%e.length;return t[n]=t[n]||[],n}var i=t.coordinatesystem,n=i.getindicatoraxes();if(n.length){var a=t.get("shape"),o=t.getmodel("splitline"),r=t.getmodel("splitarea"),l=o.getmodel("linestyle"),u=r.getmodel("areastyle"),h=o.get("show"),c=r.get("show"),d=l.get("color"),g=u.get("color"); d=_(d)?d:[d],g=_(g)?g:[g];var m=[],v=[];if("circle"===a)for(var y=n[0].gettickscoords(),x=i.cx,w=i.cy,b=0;b=b;b++){for(var t=[],d=0;d"+p(n,function(i){var n=e.get(e.mapdimension(i.dim),t);return dr(i.name+" : "+n)}).join("
")},defaultoption:{zlevel:0,z:2,coordinatesystem:"radar",legendhoverlink:!0,radarindex:0,linestyle:{width:2,type:"solid"},label:{position:"top"},symbol:"emptycircle",symbolsize:4}});iu({type:"radar",render:function(t){function e(t,e){var i=t.getitemvisual(e,"symbol")||"circle",n=t.getitemvisual(e,"color");if("none"!==i){var a=zd(t.getitemvisual(e,"symbolsize")),o=eh(i,-1,-1,2,2,n);return o.attr({style:{strokenoscale:!0},z2:100,scale:[a[0]/2,a[1]/2]}),o}}function i(i,n,a,o,r,s){a.removeall();for(var l=0;lf;++f){var p=t[f],g=p[0],m=p[1],v=p[2],y=n(v);c.globalalpha=y,c.drawimage(r,g-u,m-u)}if(!h.width||!h.height)return h;for(var x=c.getimagedata(0,0,h.width,h.height),_=x.data,w=0,b=_.length,s=this.minopacity,m=this.maxopacity,i=m-s;b>w;){var y=_[w+3]/256,a=4*math.floor(y*(qk-1));if(y>0){var t=o(y)?s:l;y>0&&(y=y*i+s),_[w++]=t[a],_[w++]=t[a+1],_[w++]=t[a+2],_[w++]=t[a+3]*y*256}else w+=4}return c.putimagedata(x,0,0),h},_getbrush:function(){var t=this._brushcanvas||(this._brushcanvas=wb()),e=this.pointsize+this.blursize,i=2*e;t.width=i,t.height=i;var n=t.getcontext("2d");return n.clearrect(0,0,i,i),n.shadowoffsetx=i,n.shadowblur=this.blursize,n.shadowcolor="#000",n.beginpath(),n.arc(-e,e,this.pointsize,0,2*math.pi,!0),n.closepath(),n.fill(),t},_getgradient:function(t,e,i){for(var n=this._gradientpixels,a=n[i]||(n[i]=new uint8clampedarray(1024)),o=[0,0,0,0],r=0,s=0;256>s;s++)e[i](s/255,!0,o),a[r++]=o[0],a[r++]=o[1],a[r++]=o[2],a[r++]=o[3];return a}},iu({type:"heatmap",render:function(t,e,i){var n;e.eachcomponent("visualmap",function(e){e.eachtargetseries(function(i){i===t&&(n=e)})}),this.group.removeall(),this._incrementaldisplayable=null;var a=t.coordinatesystem;"cartesian2d"===a.type||"calendar"===a.type?this._renderoncartesianandcalendar(t,i,0,t.getdata().count()):kd(a)&&this._renderongeo(a,t,n,i)},incrementalpreparerender:function(){this.group.removeall()},incrementalrender:function(t,e,i,n){var a=e.coordinatesystem;a&&this._renderoncartesianandcalendar(e,n,t.start,t.end,!0)},_renderoncartesianandcalendar:function(t,e,i,n,a){var o,s,l=t.coordinatesystem;if("cartesian2d"===l.type){var u=l.getaxis("x"),h=l.getaxis("y");o=u.getbandwidth(),s=h.getbandwidth()}for(var c=this.group,d=t.getdata(),f="itemstyle",p="emphasis.itemstyle",g="label",m="emphasis.label",v=t.getmodel(f).getitemstyle(["color"]),y=t.getmodel(p).getitemstyle(),x=t.getmodel(g),_=t.getmodel(m),w=l.type,b="cartesian2d"===w?[d.mapdimension("x"),d.mapdimension("y"),d.mapdimension("value")]:[d.mapdimension("time"),d.mapdimension("value")],s=i;n>s;s++){var m;if("cartesian2d"===w){if(isnan(d.get(b[2],s)))continue;var i=l.datatopoint([d.get(b[0],s),d.get(b[1],s)]);m=new qi({shape:{x:i[0]-o/2,y:i[1]-s/2,width:o,height:s},style:{fill:d.getitemvisual(s,"color"),opacity:d.getitemvisual(s,"opacity")}})}else{if(isnan(d.get(b[1],s)))continue;m=new qi({z2:1,shape:l.datatorect([d.get(b[0],s)]).contentshape,style:{fill:d.getitemvisual(s,"color"),opacity:d.getitemvisual(s,"opacity")}})}var a=d.getitemmodel(s);d.hasitemoption&&(v=a.getmodel(f).getitemstyle(["color"]),y=a.getmodel(p).getitemstyle(),x=a.getmodel(g),_=a.getmodel(m));var t=t.getrawvalue(s),d="-";t&&null!=t[2]&&(d=t[2]),ko(v,y,x,_,{labelfetcher:t,labeldataindex:s,defaulttext:d,isrecttext:!0}),m.setstyle(v),to(m,d.hasitemoption?y:r({},y)),m.incremental=a,a&&(m.usehoverlayer=!0),c.add(m),d.setitemgraphicel(s,m)}},_renderongeo:function(t,e,i,n){var a=i.targetvisuals.inrange,o=i.targetvisuals.outofrange,r=e.getdata(),s=this._hmlayer||this._hmlayer||new yd;s.blursize=e.get("blursize"),s.pointsize=e.get("pointsize"),s.minopacity=e.get("minopacity"),s.maxopacity=e.get("maxopacity");var l=t.getviewrect().clone(),u=t.getroamtransform();l.applytransform(u);var h=math.max(l.x,0),c=math.max(l.y,0),d=math.min(l.width+l.x,n.getwidth()),f=math.min(l.height+l.y,n.getheight()),p=d-h,g=f-c,m=[r.mapdimension("lng"),r.mapdimension("lat"),r.mapdimension("value")],v=r.maparray(m,function(e,i,n){var a=t.datatopoint([e,i]);return a[0]-=h,a[1]-=c,a.push(n),a}),y=i.getextent(),x="visualmap.continuous"===i.type?qd(y,i.option.range):jd(y,i.getpiecelist(),i.option.selected);s.update(v,p,g,a.color.getnormalizer(),{inrange:a.color.getcolormapper(),outofrange:o.color.getcolormapper()},x);var _=new sn({style:{width:p,height:g,x:h,y:c,image:s.canvas},silent:!0});this.group.add(_)},dispose:function(){}});var tp=f,ep="\x00__link_datas",ip="\x00__link_maindata",np=function(t,e){this.name=t||"",this.depth=0,this.height=0,this.parentnode=null,this.dataindex=-1,this.children=[],this.viewchildren=[],this.hosttree=e};np.prototype={constructor:np,isremoved:function(){return this.dataindex<0},eachnode:function(t,e,i){"function"==typeof t&&(i=e,e=t,t=null),t=t||{},b(t)&&(t={order:t});var n,a=t.order||"preorder",o=this[t.attr||"children"];"preorder"===a&&(n=e.call(i,this));for(var r=0;!n&&re&&(e=n.height)}this.height=e+1},getnodebyid:function(t){if(this.getid()===t)return this;for(var e=0,i=this.children,n=i.length;n>e;e++){var a=i[e].getnodebyid(t);if(a)return a}},contains:function(t){if(t===this)return!0;for(var e=0,i=this.children,n=i.length;n>e;e++){var a=i[e].contains(t);if(a)return a}},getancestors:function(t){for(var e=[],i=t?this:this.parentnode;i;)e.push(i),i=i.parentnode;return e.reverse(),e},getvalue:function(t){var e=this.hosttree.data;return e.get(e.getdimension(t||"value"),this.dataindex)},setlayout:function(t,e){this.dataindex>=0&&this.hosttree.data.setitemlayout(this.dataindex,t,e)},getlayout:function(){return this.hosttree.data.getitemlayout(this.dataindex)},getmodel:function(t){if(!(this.dataindex<0)){var e,i=this.hosttree,n=i.data.getitemmodel(this.dataindex),a=this.getlevelmodel();return a||0!==this.children.length&&(0===this.children.length||this.isexpand!==!1)||(e=this.getleavesmodel()),n.getmodel(t,(a||e||i.hostmodel).getmodel(t))}},getlevelmodel:function(){return(this.hosttree.levelmodels||[])[this.depth]},getleavesmodel:function(){return this.hosttree.leavesmodel},setvisual:function(t,e){this.dataindex>=0&&this.hosttree.data.setitemvisual(this.dataindex,t,e)},getvisual:function(t,e){return this.hosttree.data.getitemvisual(this.dataindex,t,e)},getrawindex:function(){return this.hosttree.data.getrawindex(this.dataindex)},getid:function(){return this.hosttree.data.getid(this.dataindex)},isancestorof:function(t){for(var e=t.parentnode;e;){if(e===this)return!0;e=e.parentnode}return!1},isdescendantof:function(t){return t!==this&&t.isancestorof(this)}},rf.prototype={constructor:rf,type:"tree",eachnode:function(t,e,i){this.root.eachnode(t,e,i)},getnodebydataindex:function(t){var e=this.data.getrawindex(t);return this._nodes[e]},getnodebyname:function(t){return this.root.getnodebyname(t)},update:function(){for(var t=this.data,e=this._nodes,i=0,n=e.length;n>i;i++)e[i].dataindex=-1;for(var i=0,n=t.count();n>i;i++)e[t.getrawindex(i)].dataindex=i},clearlayouts:function(){this.data.clearitemlayouts()}},rf.createtree=function(t,e,i){function n(t,e){var i=t.value;r=math.max(r,_(i)?i.length:1),o.push(t);var s=new np(t.name,a);e?sf(s,e):a.root=s,a._nodes.push(s);var l=t.children;if(l)for(var u=0;uo&&(o=t.depth)});var r=t.expandandcollapse,s=r&&t.initialtreedepth>=0?t.initialtreedepth:o;return a.root.eachnode("preorder",function(t){var e=t.hosttree.data.getrawdataitem(t.dataindex);t.isexpand=e&&null!=e.collapsed?!e.collapsed:t.depth<=s}),a.data},getorient:function(){var t=this.get("orient");return"horizontal"===t?t="lr":"vertical"===t&&(t="tb"),t},setzoom:function(t){this.option.zoom=t},setcenter:function(t){this.option.center=t},formattooltip:function(t){for(var e=this.getdata().tree,i=e.root.children[0],n=e.getnodebydataindex(t),a=n.getvalue(),o=n.name;n&&n!==i;)o=n.parentnode.name+"."+o,n=n.parentnode;return dr(o+(isnan(a)||null==a?"":" : "+a))},defaultoption:{zlevel:0,z:2,coordinatesystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",roam:!1,nodescaleratio:.4,center:null,zoom:1,orient:"lr",symbol:"emptycircle",symbolsize:7,expandandcollapse:!0,initialtreedepth:2,linestyle:{color:"#ccc",width:1.5,curveness:.5},itemstyle:{color:"lightsteelblue",bordercolor:"#c23531",borderwidth:1.5},label:{show:!0,color:"#555"},leaves:{label:{show:!0}},animationeasing:"linear",animationduration:700,animationdurationupdate:1e3}});var ap=oe;c(wf,jb),bf.prototype={constructor:bf,type:"view",dimensions:["x","y"],setboundingrect:function(t,e,i,n){return this._rect=new wi(t,e,i,n),this._rect},getboundingrect:function(){return this._rect},setviewrect:function(t,e,i,n){this.transformto(t,e,i,n),this._viewrect=new wi(t,e,i,n)},transformto:function(t,e,i,n){var a=this.getboundingrect(),o=this._rawtransformable;o.transform=a.calculatetransform(new wi(t,e,i,n)),o.decomposetransform(),this._updatetransform()},setcenter:function(t){t&&(this._center=t,this._updatecenterandzoom())},setzoom:function(t){t=t||1;var e=this.zoomlimit;e&&(null!=e.max&&(t=math.min(e.max,t)),null!=e.min&&(t=math.max(e.min,t))),this._zoom=t,this._updatecenterandzoom()},getdefaultcenter:function(){var t=this.getboundingrect(),e=t.x+t.width/2,i=t.y+t.height/2;return[e,i]},getcenter:function(){return this._center||this.getdefaultcenter()},getzoom:function(){return this._zoom||1},getroamtransform:function(){return this._roamtransformable.getlocaltransform()},_updatecenterandzoom:function(){var t=this._rawtransformable.getlocaltransform(),e=this._roamtransformable,i=this.getdefaultcenter(),n=this.getcenter(),a=this.getzoom();n=oe([],n,t),i=oe([],i,t),e.origin=n,e.position=[i[0]-n[0],i[1]-n[1]],e.scale=[a,a],this._updatetransform()},_updatetransform:function(){var t=this._roamtransformable,e=this._rawtransformable;e.parent=t,t.updatetransform(),e.updatetransform(),le(this.transform||(this.transform=[]),e.transform||de()),this._rawtransform=e.getlocaltransform(),this.invtransform=this.invtransform||[],ze(this.invtransform,this.transform),this.decomposetransform()},getviewrect:function(){return this._viewrect},getviewrectafterroam:function(){var t=this.getboundingrect().clone();return t.applytransform(this.transform),t},datatopoint:function(t,e,i){var n=e?this._rawtransform:this.transform;return i=i||[],n?ap(i,t,n):w(i,t)},pointtodata:function(t){var e=this.invtransform;return e?ap([],t,e):[t[0],t[1]]},converttopixel:x(sf,"datatopoint"),convertfrompixel:x(sf,"pointtodata"),containpoint:function(t){return this.getviewrectafterroam().contain(t[0],t[1])}},c(bf,jb);var op="\x00_ec_interaction_mutex";gu({type:"takeglobalcursor",event:"globalcursortaken",update:"update"},function(){}),c(lf,pb);var rp={axispointer:1,tooltip:1,brush:1};iu({type:"tree",init:function(t,e){this._oldtree,this._maingroup=new ss,this._controller=new lf(e.getzr()),this._controllerhost={target:this.group},this.group.add(this._maingroup)},render:function(t,e,i){var n=t.getdata(),a=t.layoutinfo,o=this._maingroup,r=t.get("layout");"radial"===r?o.attr("position",[a.x+a.width/2,a.y+a.height/2]):o.attr("position",[a.x,a.y]),this._updateviewcoordsys(t,a,r),this._updatecontroller(t,e,i);var s=this._data,l={expandandcollapse:t.get("expandandcollapse"),layout:r,orient:t.getorient(),curvature:t.get("linestyle.curveness"),symbolrotate:t.get("symbolrotate"),symboloffset:t.get("symboloffset"),hoveranimation:t.get("hoveranimation"),usenamelabel:!0,fadein:!0};n.diff(s).add(function(e){gf(n,e)&&wf(n,e,null,o,t,l)}).update(function(e,i){var a=s.getitemgraphicel(i);return gf(n,e)?void wf(n,e,a,o,t,l):void(a&&hf(s,i,a,o,t,l))}).remove(function(e){var i=s.getitemgraphicel(e);i&&hf(s,e,i,o,t,l)}).execute(),this._nodescaleratio=t.get("nodescaleratio"),this._updatenodeandlinkscale(t),l.expandandcollapse===!0&&n.eachitemgraphicel(function(e,n){e.off("click").on("click",function(){i.dispatchaction({type:"treeexpandandcollapse",seriesid:t.id,dataindex:n})})}),this._data=n},_updateviewcoordsys:function(t){var e=t.getdata(),i=[];e.each(function(t){var n=e.getitemlayout(t);!n||isnan(n.x)||isnan(n.y)||i.push([+n.x,+n.y])});var n=[],a=[];ma(i,n,a);var o=this._min,r=this._max;a[0]-n[0]===0&&(n[0]=o?o[0]:n[0]-1,a[0]=r?r[0]:a[0]+1),a[1]-n[1]===0&&(n[1]=o?o[1]:n[1]-1,a[1]=r?r[1]:a[1]+1);var s=t.coordinatesystem=new bf;s.zoomlimit=t.get("scalelimit"),s.setboundingrect(n[0],n[1],a[0]-n[0],a[1]-n[1]),s.setcenter(t.get("center")),s.setzoom(t.get("zoom")),this.group.attr({position:s.position,scale:s.scale}),this._viewcoordsys=s,this._min=n,this._max=a},_updatecontroller:function(t,e,i){var n=this._controller,a=this._controllerhost,o=this.group;n.setpointerchecker(function(e,n,a){var r=o.getboundingrect();return r.applytransform(o.transform),r.contain(n,a)&&!vf(e,i,t)}),n.enable(t.get("roam")),a.zoomlimit=t.get("scalelimit"),a.zoom=t.coordinatesystem.getzoom(),n.off("pan").off("zoom").on("pan",function(e){mf(a,e.dx,e.dy),i.dispatchaction({seriesid:t.id,type:"treeroam",dx:e.dx,dy:e.dy})},this).on("zoom",function(e){if(a,e.scale,e.originx,e.originy),i.dispatchaction({seriesid:t.id,type:"treeroam",zoom:e.scale,originx:e.originx,originy:e.originy}),this._updatenodeandlinkscale(t)},this)},_updatenodeandlinkscale:function(t){var e=t.getdata(),i=this._getnodeglobalscale(t),n=[i,i];e.eachitemgraphicel(function(t){t.attr("scale",n)})},_getnodeglobalscale:function(t){var e=t.coordinatesystem;if("view"!==e.type)return 1;var i=this._nodescaleratio,n=e.scale,a=n&&n[0]||1,o=e.getzoom(),r=(o-1)*i+1;return r/a},dispose:function(){this._controller&&this._controller.dispose(),this._controllerhost={}},remove:function(){this._maingroup.removeall(),this._data=null}}),gu({type:"treeexpandandcollapse",event:"treeexpandandcollapse",update:"update"},function(t,e){e.eachcomponent({maintype:"series",subtype:"tree",query:t},function(e){var i=t.dataindex,n=e.getdata().tree,a=n.getnodebydataindex(i);a.isexpand=!a.isexpand})}),gu({type:"treeroam",event:"treeroam",update:"none"},function(t,e){e.eachcomponent({maintype:"series",subtype:"tree",query:t},function(e){var i=e.coordinatesystem,n=xf(i,t);e.setcenter&&e.setcenter(n.center),e.setzoom&&e.setzoom(n.zoom)})});var sp=function(t,e){t.eachseriesbytype("tree",function(t){jf(t,e)})};xu(ck("tree","circle")),yu(sp),pt.extend({type:"series.treemap",layoutmode:"box",dependencies:["grid","polar"],preventusinghoverlayer:!0,_viewroot:null,defaultoption:{progressive:0,left:"center",top:"middle",right:null,bottom:null,width:"80%",height:"80%",sort:!0,clipwindow:"origin",squareratio:.5*(1+math.sqrt(5)),leafdepth:null,drilldownicon:"▶",zoomtonoderatio:.1024,roam:!0,nodeclick:"zoomtonode",animation:!0,animationdurationupdate:900,animationeasing:"quinticinout",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyitemwidth:25,itemstyle:{color:"rgba(0,0,0,0.7)",bordercolor:"rgba(255,255,255,0.7)",borderwidth:1,shadowcolor:"rgba(150,150,150,1)",shadowblur:3,shadowoffsetx:0,shadowoffsety:0,textstyle:{color:"#fff"}},emphasis:{textstyle:{}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",ellipsis:!0},upperlabel:{show:!1,position:[0,"50%"],height:20,color:"#fff",ellipsis:!0,verticalalign:"middle"},itemstyle:{color:null,coloralpha:null,colorsaturation:null,borderwidth:0,gapwidth:0,bordercolor:"#fff",bordercolorsaturation:null},emphasis:{upperlabel:{show:!0,position:[0,"50%"],color:"#fff",ellipsis:!0,verticalalign:"middle"}},visualdimension:0,visualmin:null,visualmax:null,color:[],coloralpha:null,colorsaturation:null,colormappingby:"index",visiblemin:10,childrenvisiblemin:null,levels:[]},getinitialdata:function(t,e){var i={name:t.name,children:t.data};qf(i);var n=t.levels||[];n=t.levels=tp(n,e);var a={};return a.levels=n,rf.createtree(i,this,a).data},optionupdated:function(){this.resetviewroot()},formattooltip:function(t){var e=this.getdata(),i=this.getrawvalue(t),n=ar(_(i)?i[0]:i),a=e.getname(t);return dr(a+": "+n)},getdataparams:function(t){var e=pt.prototype.getdataparams.apply(this,arguments),i=this.getdata().tree.getnodebydataindex(t);return e.treepathinfo=jf(i,this),e},setlayoutinfo:function(t){this.layoutinfo=this.layoutinfo||{},r(this.layoutinfo,t)},mapidtoindex:function(t){var e=this._idindexmap;e||(e=this._idindexmap=b(),this._idindexmapcount=0);var i=e.get(t);return null==i&&e.set(t,i=this._idindexmapcount++),i},getviewroot:function(){return this._viewroot},resetviewroot:function(t){t?this._viewroot=t:t=this._viewroot;var e=this.getrawdata().tree.root;(!t||t!==e&&!e.contains(t))&&(this._viewroot=e)}});var lp=8,up=8,hp=5;ep.prototype={constructor:ep,render:function(t,e,i,n){var a=t.getmodel("breadcrumb"),o=this.group;if(o.removeall(),a.get("show")&&i){var r=a.getmodel("itemstyle"),s=r.getmodel("textstyle"),l={pos:{left:a.get("left"),right:a.get("right"),top:a.get("top"),bottom:a.get("bottom")},box:{width:e.getwidth(),height:e.getheight()},emptyitemwidth:a.get("emptyitemwidth"),totalwidth:0,renderlist:[]};this._prepare(i,l,s),this._rendercontent(t,l,r,s,n),gr(o,l.pos,l.box)}},_prepare:function(t,e,i){for(var n=t;n;n=n.parentnode){var a=n.getmodel().get("name"),o=i.gettextrect(a),r=math.max(o.width+2*lp,e.emptyitemwidth);e.totalwidth+=r+up,e.renderlist.push({node:n,text:a,width:r})}},_rendercontent:function(t,e,i,n,a){for(var o=0,r=e.emptyitemwidth,l=t.get("breadcrumb.height"),u=br(e.pos,e.box),h=e.totalwidth,c=e.renderlist,d=c.length-1;d>=0;d--){var f=c[d],p=f.node,g=f.width,m=f.text;h>u.width&&(h-=g-r,g=r,m=null);var v=new xi({shape:{points:ip(o,0,g,l,d===c.length-1,0===d)},style:s(i.getitemstyle(),{linejoin:"bevel",text:m,textfill:n.gettextcolor(),textfont:n.getfont()}),z:10,onclick:x(a,p)});this.group.add(v),np(v,t,p),o+=g+up}},remove:function(){this.group.removeall()}};var cp=y,dp=ss,fp=qi,pp=f,gp=3,mp=["label"],vp=["emphasis","label"],yp=["upperlabel"],xp=["emphasis","upperlabel"],_p=10,wp=1,bp=2,sp=lm([["fill","color"],["stroke","strokecolor"],["linewidth","strokewidth"],["shadowblur"],["shadowoffsetx"],["shadowoffsety"],["shadowcolor"]]),mp=function(t){var e=sp(t);return e.stroke=e.fill=e.linewidth=null,e};iu({type:"treemap",init:function(){this._containergroup,this._storage=op(),this._oldtree,this._breadcrumb,this._controller,this._state="ready"},render:function(t,e,i,n){var a=e.findcomponents({maintype:"series",subtype:"treemap",query:n});if(!(u(a,t)<0)){this.seriesmodel=t,this.api=i,this.ecmodel=e;var o=["treemapzoomtonode","treemaproottonode"],r=qf(n,o,t),s=n&&n.type,l=t.layoutinfo,h=!this._oldtree,c=this._storage,d="treemaproottonode"===s&&r&&c?{rootnodegroup:c.nodegroup[r.node.getrawindex()],direction:n.direction}:null,f=this._givecontainergroup(l),p=this._dorender(f,t,d);h||s&&"treemapzoomtonode"!==s&&"treemaproottonode"!==s?p.renderfinally():this._doanimation(f,p,t,d),this._resetcontroller(i),this._renderbreadcrumb(t,i,r)}},_givecontainergroup:function(t){var e=this._containergroup;return e||(e=this._containergroup=new dp,this._initevents(e),this.group.add(e)),e.attr("position",[t.x,t.y]),e},_dorender:function(t,e,i){function n(t,e,i,a,o){function r(t){return t.getid()}function s(r,s){var l=null!=r?t[r]:null,u=null!=s?e[s]:null,h=d(l,u,i,o);h&&n(l&&l.viewchildren||[],u&&u.viewchildren||[],h,a,o+1)}a?(e=t,pp(t,function(t,e){!t.isremoved()&&s(e,e)})):new lu(e,t,r,r).add(s).update(s).remove(x(s,null)).execute()}function a(t){var e=op();return t&&pp(t,function(t,i){var n=e[i];pp(t,function(t){t&&(n.push(t),t.__tmwilldelete=1)})}),e}function o(){pp(f,function(t){pp(t,function(t){t.parent&&t.parent.remove(t)})}),pp(c,function(t){t.invisible=!0,t.dirty()})}var r=e.getdata().tree,s=this._oldtree,l=op(),u=op(),h=this._storage,c=[],d=x(rp,e,u,h,i,l,c);n(r.root?[r.root]:[],s&&s.root?[s.root]:[],t,r===s||!s,0);var f=a(h);return this._oldtree=r,this._storage=u,{lastsforanimation:l,willdeleteels:f,renderfinally:o}},_doanimation:function(t,e,i,n){if(i.get("animation")){var a=i.get("animationdurationupdate"),o=i.get("animationeasing"),s=ap();pp(e.willdeleteels,function(t,e){pp(t,function(t){if(!t.invisible){var i,r=t.parent;if(n&&"drilldown"===n.direction)i=r===n.rootnodegroup?{shape:{x:0,y:0,width:r.__tmnodewidth,height:r.__tmnodeheight},style:{opacity:0}}:{style:{opacity:0}};else{var l=0,u=0;r.__tmwilldelete||(l=r.__tmnodewidth/2,u=r.__tmnodeheight/2),i="nodegroup"===e?{position:[l,u],style:{opacity:0}}:{shape:{x:l,y:u,width:0,height:0},style:{opacity:0}}}i&&s.add(t,i,a,o)}})}),pp(this._storage,function(t,i){pp(t,function(t,n){var l=e.lastsforanimation[i][n],u={};l&&("nodegroup"===i?l.old&&(u.position=t.position.slice(),t.attr("position",l.old)):(l.old&&(u.shape=r({},t.shape),t.setshape(l.old)),l.fadein?(t.setstyle("opacity",0),u.style={opacity:1}):1!==t.style.opacity&&(u.style={opacity:1})),s.add(t,u,a,o))})},this),this._state="animating",s.done(cp(function(){this._state="ready",e.renderfinally()},this)).start()}},_resetcontroller:function(t){var e=this._controller;e||(e=this._controller=new lf(t.getzr()),e.enable(this.seriesmodel.get("roam")),e.on("pan",cp(this._onpan,this)),e.on("zoom",cp(this._onzoom,this)));var i=new wi(0,0,t.getwidth(),t.getheight());e.setpointerchecker(function(t,e,n){return i.contain(e,n)})},_clearcontroller:function(){var t=this._controller;t&&(t.dispose(),t=null)},_onpan:function(t){if("animating"!==this._state&&(math.abs(t.dx)>gp||math.abs(t.dy)>gp)){var e=this.seriesmodel.getdata().tree.root;if(!e)return;var i=e.getlayout();if(!i)return;this.api.dispatchaction({type:"treemapmove",from:this.uid,seriesid:this.seriesmodel.id,rootrect:{x:i.x+t.dx,y:i.y+t.dy,width:i.width,height:i.height}})}},_onzoom:function(t){var e=t.originx,i=t.originy;if("animating"!==this._state){var n=this.seriesmodel.getdata().tree.root;if(!n)return;var a=n.getlayout();if(!a)return;var o=new wi(a.x,a.y,a.width,a.height),r=this.seriesmodel.layoutinfo;e-=r.x,i-=r.y;var s=de();pe(s,s,[-e,-i]),ne(s,s,[t.scale,t.scale]),pe(s,s,[e,i]),o.applytransform(s),this.api.dispatchaction({type:"treemaprender",from:this.uid,seriesid:this.seriesmodel.id,rootrect:{x:o.x,y:o.y,width:o.width,height:o.height}})}},_initevents:function(t){t.on("click",function(t){if("ready"===this._state){var e=this.seriesmodel.get("nodeclick",!0);if(e){var i=this.findtarget(t.offsetx,t.offsety);if(i){var n=i.node;if(n.getlayout().isleafroot)this._roottonode(i);else if("zoomtonode"===e)this._zoomtonode(i);else if("link"===e){var a=n.hosttree.data.getitemmodel(n.dataindex),o=a.get("link",!0),r=a.get("target",!0)||"blank";o&&window.open(o,r)}}}}},this)},_renderbreadcrumb:function(t,e,i){function n(e){"animating"!==this._state&&($f(t.getviewroot(),e)?this._roottonode({node:e}):this._zoomtonode({node:e}))}i||(i=null!=t.get("leafdepth",!0)?{node:t.getviewroot()}:this.findtarget(e.getwidth()/2,e.getheight()/2),i||(i={node:t.getdata().tree.root})),(this._breadcrumb||(this._breadcrumb=new ep(this.group))).render(t,e,i.node,cp(n,this))},remove:function(){this._clearcontroller(),this._containergroup&&this._containergroup.removeall(),this._storage=op(),this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},dispose:function(){this._clearcontroller()},_zoomtonode:function(t){this.api.dispatchaction({type:"treemapzoomtonode",from:this.uid,seriesid:this.seriesmodel.id,targetnode:t.node})},_roottonode:function(t){this.api.dispatchaction({type:"treemaproottonode",from:this.uid,seriesid:this.seriesmodel.id,targetnode:t.node})},findtarget:function(t,e){var i,n=this.seriesmodel.getviewroot();return n.eachnode({attr:"viewchildren",order:"preorder"},function(n){var a=this._storage.background[n.getrawindex()];if(a){var o=a.transformcoordtolocal(t,e),r=a.shape;if(!(r.x<=o[0]&&o[0]<=r.x+r.width&&r.y<=o[1]&&o[1]<=r.y+r.height))return!1;i={node:n,offsetx:o[0],offsety:o[1]}}},this),i}});for(var ip=function(){},ap=["treemapzoomtonode","treemaprender","treemapmove"],tp=0;tpn&&(o=n,a=i)}for(var a,o=1/0,r=0,s=e.length;s>r;r++){var l=e[r].value;if(null!=l){if(l===t||"string"==typeof l&&l===t+"")return r;i&&n(l,r)}}for(var r=0,s=e.length;s>r;r++){var u=e[r],h=u.interval,c=u.close;if(h){if(h[0]===-1/0){if(xp(c[1],t,h[1]))return r}else if(1/0===h[1]){if(xp(c[0],h[0],t))return r}else if(xp(c[0],h[0],t)&&xp(c[1],t,h[1]))return r;i&&n(h[0],r),i&&n(h[1],r)}}return i?1/0===t?e.length-1:t===-1/0?0:a:void 0};var np=_,zp="itemstyle",rp={seriestype:"treemap",reset:function(t){var e=t.getdata().tree,i=e.root,n=t.getmodel(zp);if(!i.isremoved()){var a=p(e.levelmodels,function(t){return t?t.get(zp):null});_p(i,{},a,n,t.getviewroot().getancestors(),t)}}},ep=math.max,bp=math.min,vp=d,gp=f,fp=["itemstyle","borderwidth"],wp=["itemstyle","gapwidth"],hp=["upperlabel","show"],zp=["upperlabel","height"],xp={seriestype:"treemap",reset:function(t,e,i,n){var a=i.getwidth(),o=i.getheight(),s=t.option,l=vr(t.getboxlayoutparams(),{width:i.getwidth(),height:i.getheight()}),u=s.size||[],h=hr(vp(l.width,u[0]),a),c=hr(vp(l.height,u[1]),o),d=n&&n.type,f=["treemapzoomtonode","treemaproottonode"],p=qf(n,f,t),g="treemaprender"===d||"treemapmove"===d?n.rootrect:null,m=t.getviewroot(),v=kf(m);if("treemapmove"!==d){var y="treemapzoomtonode"===d?zp(t,p,m,h,c):g?[g.width,g.height]:[h,c],x=s.sort;x&&"asc"!==x&&"desc"!==x&&(x="desc");var _={squareratio:s.squareratio,sort:x,leafdepth:s.leafdepth};m.hosttree.clearlayouts();var w={x:0,y:0,width:y[0],height:y[1],area:y[0]*y[1]};m.setlayout(w),dp(m,_,!1,0);var w=m.getlayout();gp(v,function(t,e){var i=(v[e+1]||m).getvalue();t.setlayout(r({dataextent:[i,i],borderwidth:0,upperheight:0},w))})}var b=t.getdata().tree.root;b.setlayout(rp(l,g,p),!0),t.setlayoutinfo(l),ep(b,new wi(-l.x,-l.y,a,o),v,m,0)}};xu(rp),yu(xp),pt.extend({type:"series.sunburst",_viewroot:null,getinitialdata:function(t){var e={name:t.name,children:t.data};vp(e);var i=t.levels||[],n={};return n.levels=i,rf.createtree(e,this,n).data},optionupdated:function(){this.resetviewroot()},getdataparams:function(t){var e=pt.prototype.getdataparams.apply(this,arguments),i=this.getdata().tree.getnodebydataindex(t);return e.treepathinfo=jf(i,this),e},defaultoption:{zlevel:0,z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startangle:90,minangle:0,percentprecision:2,stillshowzerosum:!0,highlightpolicy:"descendant",nodeclick:"roottonode",renderlabelforzerodata:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0,emphasis:{}},itemstyle:{borderwidth:1,bordercolor:"white",bordertype:"solid",shadowblur:0,shadowcolor:"rgba(0, 0, 0, 0.2)",shadowoffsetx:0,shadowoffsety:0,opacity:1,emphasis:{},highlight:{opacity:1},downplay:{opacity:.9}},animationtype:"expansion",animationduration:1e3,animationdurationupdate:500,animationeasing:"cubicout",data:[],levels:[],sort:"desc"},getviewroot:function(){return this._viewroot},resetviewroot:function(t){t?this._viewroot=t:t=this._viewroot;var e=this.getrawdata().tree.root;(!t||t!==e&&!e.contains(t))&&(this._viewroot=e)}});var up={none:"none",descendant:"descendant",ancestor:"ancestor",self:"self"},yp=2,jp=4,qp=gp.prototype;qp.updatedata=function(t,e,i,n,o){this.node=e,e.piece=this,n=n||this._seriesmodel,o=o||this._ecmodel;var l=this.childat(0);l.dataindex=e.dataindex;var u=e.getmodel(),h=e.getlayout(),c=r({},h);c.label=null;var d=fp(e,n,o);zp(e,n,d);var f,p=u.getmodel("itemstyle").getitemstyle();if("normal"===i)f=p;else{var g=u.getmodel(i+".itemstyle").getitemstyle();f=a(g,p)}f=s({linejoin:"bevel",fill:f.fill||d},f),t?(l.setshape(c),l.shape.r=h.r0,ho(l,{shape:{r:h.r}},n,e.dataindex),l.usestyle(f)):"object"==typeof f.fill&&f.fill.type||"object"==typeof l.style.fill&&l.style.fill.type?(ho(l,{shape:c},n),l.usestyle(f)):ho(l,{shape:c,style:f},n),this._updatelabel(n,d,i);var m=u.getshallow("cursor");if(m&&l.attr("cursor",m),t){var v=n.getshallow("highlightpolicy");this._initevents(l,e,n,v)}this._seriesmodel=n||this._seriesmodel,this._ecmodel=o||this._ecmodel},qp.onemphasis=function(t){var e=this;this.node.hosttree.root.eachnode(function(i){i.piece&&(e.node===i?i.piece.updatedata(!1,i,"emphasis"):hp(i,e.node,t)?i.piece.childat(0).trigger("highlight"):t!==up.none&&i.piece.childat(0).trigger("downplay"))})},qp.onnormal=function(){this.node.hosttree.root.eachnode(function(t){t.piece&&t.piece.updatedata(!1,t,"normal")})},qp.onhighlight=function(){this.updatedata(!1,this.node,"highlight")},qp.ondownplay=function(){this.updatedata(!1,this.node,"downplay")},qp._updatelabel=function(t,e,i){function n(t){var e=r.get(t);return null==e?o.get(t):e}var a=this.node.getmodel(),o=a.getmodel("label"),r="normal"===i||"emphasis"===i?o:a.getmodel(i+".label"),s=a.getmodel("emphasis.label"),l=d(t.getformattedlabel(this.node.dataindex,i,null,null,"label"),this.node.name);n("show")===!1&&(l="");var u=this.node.getlayout(),h=r.get("minangle");null==h&&(h=o.get("minangle")),h=h/180*math.pi;var c=u.endangle-u.startangle;null!=h&&math.abs(c)math.pi/2?"right":"left"):x&&"center"!==x?"left"===x?(f=u.r0+y,p>math.pi/2&&(x="right")):"right"===x&&(f=u.r-y,p>math.pi/2&&(x="left")):(f=(u.r+u.r0)/2,x="center"),d.attr("style",{text:l,textalign:x,textverticalalign:n("verticalalign")||"middle",opacity:n("opacity")});var _=f*g+u.cx,w=f*m+u.cy;d.attr("position",[_,w]);var b=n("rotate"),s=0;"radial"===b?(s=-p,s<-math.pi/2&&(s+=math.pi)):"tangential"===b?(s=math.pi/2-p,s>math.pi/2?s-=math.pi:s<-math.pi/2&&(s+=math.pi)):"number"==typeof b&&(s=b*math.pi/180),d.attr("rotation",s)},qp._initevents=function(t,e,i,n){t.off("mouseover").off("mouseout").off("emphasis").off("normal");var a=this,o=function(){a.onemphasis(n)},r=function(){a.onnormal()},s=function(){a.ondownplay()},l=function(){a.onhighlight()};i.isanimationenabled()&&t.on("mouseover",o).on("mouseout",r).on("emphasis",o).on("normal",r).on("downplay",s).on("highlight",l)},h(gp,ss);var kp="sunburstroottonode",$p=(il.extend({type:"sunburst",init:function(){},render:function(t,e,i,n){function a(t,e){function i(t){return t.getid()}function n(i,n){var a=null==i?null:t[i],r=null==n?null:e[n];o(a,r)}(0!==t.length||0!==e.length)&&new lu(e,t,i,i).add(n).update(n).remove(x(n,null)).execute()}function o(i,n){if(f||!i||i.getvalue()||(i=null),i!==h&&n!==h)if(n&&n.piece)i?(n.piece.updatedata(!1,i,"normal",t,e),u.setitemgraphicel(i.dataindex,n.piece)):r(n);else if(i){var a=new gp(i,t,e);d.add(a),u.setitemgraphicel(i.dataindex,a)}}function r(t){t&&t.piece&&(d.remove(t.piece),t.piece=null)}function s(i,n){if(n.depth>0){l.virtualpiece?l.virtualpiece.updatedata(!1,i,"normal",t,e):(l.virtualpiece=new gp(i,t,e),d.add(l.virtualpiece)),n.piece._onclickevent&&n.piece.off("click",n.piece._onclickevent);var a=function(){l._roottonode(n.parentnode)};n.piece._onclickevent=a,l.virtualpiece.on("click",a)}else l.virtualpiece&&(d.remove(l.virtualpiece),l.virtualpiece=null)}var l=this;this.seriesmodel=t,this.api=i,this.ecmodel=e;var u=t.getdata(),h=u.tree.root,c=t.getviewroot(),d=this.group,f=t.get("renderlabelforzerodata"),p=[];c.eachnode(function(t){p.push(t)});var g=this._oldchildren||[];if(a(p,g),s(h,c),n&&n.highlight&&n.highlight.piece){var m=t.getshallow("highlightpolicy");n.highlight.piece.onemphasis(m)}else if(n&&n.unhighlight){var v=this.virtualpiece;!v&&h.children.length&&(v=h.children[0].piece),v&&v.onnormal()}this._initevents(),this._oldchildren=p},dispose:function(){},_initevents:function(){var t=this,e=function(e){var i=!1,n=t.seriesmodel.getviewroot();n.eachnode(function(n){if(!i&&n.piece&&n.piece.childat(0)===e.target){var a=n.getmodel().get("nodeclick");if("roottonode"===a)t._roottonode(n);else if("link"===a){var o=n.getmodel(),r=o.get("link");if(r){var s=o.get("target",!0)||"_blank";window.open(r,s)}}i=!0}})};this.group._onclickevent&&this.group.off("click",this.group._onclickevent),this.group.on("click",e),this.group._onclickevent=e},_roottonode:function(t){t!==this.seriesmodel.getviewroot()&&this.api.dispatchaction({type:kp,from:this.uid,seriesid:this.seriesmodel.id,targetnode:t})},containpoint:function(t,e){var i=e.getdata(),n=i.getitemlayout(0);if(n){var a=t[0]-n.cx,o=t[1]-n.cy,r=math.sqrt(a*a+o*o);return r<=n.r&&r>=n.r0}}}),"sunburstroottonode");gu({type:$p,update:"updateview"},function(t,e){function i(e){var i=qf(t,[$p],e);if(i){var n=e.getviewroot();n&&(t.direction=$f(n,i.node)?"rollup":"drilldown"),e.resetviewroot(i.node)}}e.eachcomponent({maintype:"series",subtype:"sunburst",query:t},i)});var jp="sunbursthighlight";gu({type:jp,update:"updateview"},function(t,e){function i(e){var i=qf(t,[jp],e);i&&(t.highlight=i.node)}e.eachcomponent({maintype:"series",subtype:"sunburst",query:t},i)});var qp="sunburstunhighlight";gu({type:qp,update:"updateview"},function(t,e){function i(){t.unhighlight=!0}e.eachcomponent({maintype:"series",subtype:"sunburst",query:t},i)});var to=math.pi/180,eo=function(t,e,i){e.eachseriesbytype(t,function(t){var e=t.get("center"),n=t.get("radius");_(n)||(n=[0,n]),_(e)||(e=[e,e]);var a=i.getwidth(),o=i.getheight(),r=math.min(a,o),s=hr(e[0],a),l=hr(e[1],o),u=hr(n[0],r/2),h=hr(n[1],r/2),c=-t.get("startangle")*to,d=t.get("minangle")*to,p=t.getdata().tree.root,g=t.getviewroot(),m=g.depth,v=t.get("sort");null!=v&&xp(g,v);var y=0;f(g.children,function(t){!isnan(t.getvalue())&&y++});var x=g.getvalue(),w=math.pi/(x||y)*2,b=g.depth>0,s=g.height-(b?-1:1),m=(h-u)/(s||1),i=t.get("clockwise"),a=t.get("stillshowzerosum"),t=i?1:-1,d=function(t,e){if(t){var i=e;if(t!==p){var n=t.getvalue(),a=0===x&&a?w:n*w;d>a&&(a=d),i=e+t*a;var o=t.depth-m-(b?-1:1),h=u+m*o,c=u+m*(o+1),g=t.getmodel();null!=g.get("r0")&&(h=hr(g.get("r0"),r/2)),null!=g.get("r")&&(c=hr(g.get("r"),r/2)),t.setlayout({angle:a,startangle:e,endangle:i,clockwise:i,cx:s,cy:l,r0:h,r:c})}if(t.children&&t.children.length){var v=0;f(t.children,function(t){v+=d(t,e+v)})}return i-e}};if(b){var c=u,l=u+m,k=2*math.pi;p.setlayout({angle:k,startangle:c,endangle:c+k,clockwise:i,cx:s,cy:l,r0:c,r:l})}d(g,c)})};xu(x(wk,"sunburst")),yu(x(eo,"sunburst")),fu(x(tk,"sunburst"));for(var io=[126,25],no=[[[0,3.5],[7,11.2],[15,11.9],[30,7],[42,.7],[52,.7],[56,7.7],[59,.7],[64,.7],[64,0],[5,0],[0,3.5]],[[13,16.1],[19,14.7],[16,21.7],[11,23.1],[13,16.1]],[[12,32.2],[14,38.5],[15,38.5],[13,32.2],[12,32.2]],[[16,47.6],[12,53.2],[13,53.2],[18,47.6],[16,47.6]],[[6,64.4],[8,70],[9,70],[8,64.4],[6,64.4]],[[23,82.6],[29,79.8],[30,79.8],[25,82.6],[23,82.6]],[[37,70.7],[43,62.3],[44,62.3],[39,70.7],[37,70.7]],[[48,51.1],[51,45.5],[53,45.5],[50,51.1],[48,51.1]],[[51,35],[51,28.7],[53,28.7],[53,35],[51,35]],[[52,22.4],[55,17.5],[56,17.5],[53,22.4],[52,22.4]],[[58,12.6],[62,7],[63,7],[60,12.6],[58,12.6]],[[0,3.5],[0,93.1],[64,93.1],[64,0],[63,0],[63,92.4],[1,92.4],[1,3.5],[0,3.5]]],ao=0;aoo;o++){var s=t.getname(o);i.set(s,!0),n.push({name:s,value:t.get(e,o),selected:hs(t,o,"selected")})}var l=yo.load(this.getmaptype(),this.option.namemap);return f(l.regions,function(t){var e=t.name;i.get(e)||(n.push({name:e}),a.push(e))}),this.updateselectedmap(n),t.appendvalues([],a),t},gethostgeomodel:function(){var t=this.option.geoindex;return null!=t?this.dependentmodels.geo[t]:null},getmaptype:function(){return(this.gethostgeomodel()||this).option.map},getrawvalue:function(t){var e=this.getdata();return e.get(e.mapdimension("value"),t)},getregionmodel:function(t){var e=this.getdata();return e.getitemmodel(e.indexofname(t))},formattooltip:function(t){for(var e=this.getdata(),i=ar(this.getrawvalue(t)),n=e.getname(t),a=this.seriesgroup,o=[],r=0;r"+dr(n+" : "+i)},gettooltipposition:function(t){if(null!=t){var e=this.getdata().getname(t),i=this.coordinatesystem,n=i.getregion(e);return n&&i.datatopoint(n.center)}},setzoom:function(t){this.option.zoom=t},setcenter:function(t){this.option.center=t},defaultoption:{zlevel:0,z:2,coordinatesystem:"geo",map:"",left:"center",top:"center",aspectscale:.75,showlegendsymbol:!0,datarangehoverlink:!0,boundingcoords:null,center:null,zoom:1,scalelimit:null,label:{show:!1,color:"#000"},itemstyle:{borderwidth:.5,bordercolor:"#444",areacolor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemstyle:{areacolor:"rgba(255,215,0,0.8)"}}}});c(xo,vk),tg.prototype={constructor:tg,draw:function(t,e,i,n){var a="geo"===t.maintype,o=t.getdata&&t.getdata();a&&e.eachcomponent({maintype:"series",subtype:"map"},function(e){o||e.gethostgeomodel()!==t||(o=e.getdata())});var r=t.coordinatesystem;this._updatebackground(r);var s=this._regionsgroup,l=this.group;r._roamtransformable.transform&&(l.transform=r._roamtransformable.transform.slice(),l.decomposetransform());var u=r._rawtransformable.scale,h=r._rawtransformable.position;s.removeall();var c=["itemstyle"],d=["emphasis","itemstyle"],p=["label"],g=["emphasis","label"],m=b();f(r.regions,function(e){var i=m.get(e.name)||m.set(e.name,new ss),n=new ea({segmentignorethreshold:1,shape:{paths:[]}});i.add(n);var r,v=t.getregionmodel(e.name)||t,y=v.getmodel(c),x=v.getmodel(d),_=$p(y),w=$p(x),b=v.getmodel(p),s=v.getmodel(g);if(o){r=o.indexofname(e.name);var m=o.getitemvisual(r,"color",!0);m&&(_.fill=m)}var i=function(t){return[t[0]*u[0]+h[0],t[1]*u[1]+h[1]]};f(e.geometries,function(t){if("polygon"===t.type){for(var e=[],i=0;i=0)&&(l=t);var p=new ei({position:i(e.center.slice()),scale:[1/l.scale[0],1/l.scale[1]],z2:10,silent:!0});ko(p.style,p.hoverstyle={},b,s,{labelfetcher:l,labeldataindex:k,defaulttext:e.name,useinsidestyle:!1},{textalign:"center",textverticalalign:"middle"}),i.add(p)}if(o)o.setitemgraphicel(r,i);else{var v=t.getregionmodel(e.name);n.eventdata={componenttype:"geo",componentindex:t.componentindex,geoindex:t.componentindex,name:e.name,region:v&&v.option||{}}}var o=i.__regions||(i.__regions=[]);o.push(e),i.highdownsilentontouch=!!t.get("selectedmode"),to(i,w),s.add(i)}),this._updatecontroller(t,e,i),jp(this,t,s,i,n),qp(t,s)},remove:function(){this._regionsgroup.removeall(),this._backgroundgroup.removeall(),this._controller.dispose(),this._mapname&&yo.removegraphic(this._mapname,this.uid),this._mapname=null,this._controllerhost={}},_updatebackground:function(t){var e=t.map;this._mapname!==e&&f(yo.makegraphic(e,this.uid),function(t){this._backgroundgroup.add(t)},this),this._mapname=e},_updatecontroller:function(t,e,i){function n(){var e={type:"georoam",componenttype:l};return e[l+"id"]=t.id,e}var a=t.coordinatesystem,o=this._controller,s=this._controllerhost;s.zoomlimit=t.get("scalelimit"),s.zoom=a.getzoom(),o.enable(t.get("roam")||!1);var l=t.maintype;o.off("pan").on("pan",function(t){this._mousedownflag=!1,mf(s,t.dx,t.dy),i.dispatchaction(r(n(),{dx:t.dx,dy:t.dy}))},this),o.off("zoom").on("zoom",function(t){if(this._mousedownflag=!1,if(s,t.scale,t.originx,t.originy),i.dispatchaction(r(n(),{zoom:t.scale,originx:t.originx,originy:t.originy})),this._updategroup){var e=this.group.scale;this._regionsgroup.traverse(function(t){"text"===t.type&&t.attr("scale",[1/e[0],1/e[1]])})}},this),o.setpointerchecker(function(e,n,o){return a.getviewrectafterroam().contain(n,o)&&!vf(e,i,t)})}};var _o="__seriesmaphighdown",wo="__seriesmapcallkey";iu({type:"map",render:function(t,e,i,n){if(!n||"maptoggleselect"!==n.type||n.from!==this.uid){var a=this.group;if(a.removeall(),!t.gethostgeomodel()){if(n&&"georoam"===n.type&&"series"===n.componenttype&&n.seriesid===t.id){var o=this._mapdraw;o&&a.add(o.group)}else if(t.needsdrawmap){var o=this._mapdraw||new tg(i,!0);a.add(o.group),o.draw(t,e,i,this,n),this._mapdraw=o}else this._mapdraw&&this._mapdraw.remove(),this._mapdraw=null;t.get("showlegendsymbol")&&e.getcomponent("legend")&&this._rendersymbols(t,e,i)}}},remove:function(){this._mapdraw&&this._mapdraw.remove(),this._mapdraw=null,this.group.removeall()},dispose:function(){this._mapdraw&&this._mapdraw.remove(),this._mapdraw=null},_rendersymbols:function(t){var e=t.originaldata,i=this.group;e.each(e.mapdimension("value"),function(n,a){if(!isnan(n)){var o=e.getitemlayout(a);if(o&&o.point){var s=o.point,l=o.offset,u=new bi({style:{fill:t.getdata().getvisual("color")},shape:{cx:s[0]+9*l,cy:s[1],r:3},silent:!0,z2:8+(l?0:ua+1)});if(!l){var h=t.mainseries.getdata(),c=e.getname(a),d=h.indexofname(c),f=e.getitemmodel(a),p=f.getmodel("label"),g=f.getmodel("emphasis.label"),m=h.getitemgraphicel(d),v=c(t.getformattedlabel(d,"normal"),c),y=c(t.getformattedlabel(d,"emphasis"),v),_=m[_o],w=math.random();if(!_){_=m[_o]={};var b=x(eg,!0),s=x(eg,!1);m.on("mouseover",b).on("mouseout",s).on("emphasis",b).on("normal",s)}m[wo]=w,r(_,{recordversion:w,circle:u,labelmodel:p,hoverlabelmodel:g,emphasistext:y,normaltext:v}),ig(_,!1)}i.add(u)}}})}}),gu({type:"georoam",event:"georoam",update:"updatetransform"},function(t,e){var i=t.componenttype||"series";e.eachcomponent({maintype:i,query:t},function(e){var n=e.coordinatesystem;if("geo"===n.type){var a=xf(n,t,e.get("scalelimit"));e.setcenter&&e.setcenter(a.center),e.setzoom&&e.setzoom(a.zoom),"series"===i&&f(e.seriesgroup,function(t){t.setcenter(a.center),t.setzoom(a.zoom)})}})}),ng.prototype={constructor:ng,type:"geo",dimensions:["lng","lat"],containcoord:function(t){for(var e=this.regions,i=0;ia;a++)e[a]=e[a]||[],e[a][0]=this._flatcoords[i+2*a],e[a][1]=this._flatcoords[i+2*a+1];return n}for(var o=this._getcoordsfromitemmodel(t),a=0;al;){s++;var u=t[l++];n[r++]=o+e,n[r++]=u;for(var h=0;u>h;h++){var c=t[l++],d=t[l++];a[o++]=c,a[o++]=d}}return{flatcoordsoffset:new uint32array(n.buffer,0,r),flatcoords:a,count:s}}return{flatcoordsoffset:null,flatcoords:null,count:t.length}},getinitialdata:function(t){var e=new gc(["value"],this);return e.hasitemoption=!1,e.initdata(t.data,[],function(t,i,n,a){if(t instanceof array)return 0/0;e.hasitemoption=!0;var o=t.value;return null!=o?o instanceof array?o[a]:o:void 0}),e},formattooltip:function(t){var e=this.getdata(),i=e.getitemmodel(t),n=i.get("name");if(n)return n;var a=i.get("fromname"),o=i.get("toname"),r=[];return null!=a&&r.push(a),null!=o&&r.push(o),dr(r.join(" > "))},preventincremental:function(){return!!this.get("effect.show")},getprogressive:function(){var t=this.option.progressive;return null==t?this.option.large?1e4:this.get("progressive"):t},getprogressivethreshold:function(){var t=this.option.progressivethreshold;return null==t?this.option.large?2e4:this.get("progressivethreshold"):t},defaultoption:{coordinatesystem:"geo",zlevel:0,z:2,legendhoverlink:!0,hoveranimation:!0,xaxisindex:0,yaxisindex:0,symbol:["none","none"],symbolsize:[10,10],geoindex:0,effect:{show:!1,period:4,constantspeed:0,symbol:"circle",symbolsize:3,loop:!0,traillength:.2},large:!1,largethreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},linestyle:{opacity:.5}}}),lo=$i.prototype,ko=qi.prototype,po=no({type:"ec-line",style:{stroke:"#000",fill:null},shape:{x1:0,y1:0,x2:0,y2:0,percent:1,cpx1:null,cpy1:null},buildpath:function(t,e){this[ug(e)?"_buildpathline":"_buildpathcurve"](t,e)},_buildpathline:lo.buildpath,_buildpathcurve:ko.buildpath,pointat:function(t){return this[ug(this.shape)?"_pointatline":"_pointatcurve"](t)},_pointatline:lo.pointat,_pointatcurve:ko.pointat,tangentat:function(t){var e=this.shape,i=ug(e)?[e.x2-e.x1,e.y2-e.y1]:this._tangentatcurve(t);return te(i,i)},_tangentatcurve:ko.tangentat}),oo=["fromsymbol","tosymbol"],no=gg.prototype;no.beforeupdate=pg,no._createline=function(t,e,i){var n=t.hostmodel,a=t.getitemlayout(e),o=dg(a);o.shape.percent=0,zo(o,{shape:{percent:1}},n,e),this.add(o);var r=new ei({name:"label",linelabeloriginalopacity:1});this.add(r),f(oo,function(i){var n=cg(i,t,e);this.add(n),this[hg(i)]=t.getitemvisual(e,i)},this),this._updatecommonstl(t,e,i)},no.updatedata=function(t,e,i){var n=t.hostmodel,a=this.childofname("line"),o=t.getitemlayout(e),r={shape:{}};fg(r.shape,o),ho(a,r,n,e),f(oo,function(i){var n=t.getitemvisual(e,i),a=hg(i);if(this[a]!==n){this.remove(this.childofname(i));var o=cg(i,t,e);this.add(o)}this[a]=n},this),this._updatecommonstl(t,e,i)},no._updatecommonstl=function(t,e,i){var n=t.hostmodel,a=this.childofname("line"),o=i&&i.linestyle,r=i&&i.hoverlinestyle,l=i&&i.labelmodel,u=i&&i.hoverlabelmodel;if(!i||t.hasitemoption){var h=t.getitemmodel(e);o=h.getmodel("linestyle").getlinestyle(),r=h.getmodel("emphasis.linestyle").getlinestyle(),l=h.getmodel("label"),u=h.getmodel("emphasis.label")}var c=t.getitemvisual(e,"color"),d=l(t.getitemvisual(e,"opacity"),o.opacity,1);a.usestyle(s({strokenoscale:!0,fill:"none",stroke:c,opacity:d},o)),a.hoverstyle=r,f(oo,function(t){var e=this.childofname(t);e&&(e.setcolor(c),e.setstyle({opacity:d}))},this);var p,g,m=l.getshallow("show"),v=u.getshallow("show"),y=this.childofname("label");if((m||v)&&(p=c||"#000",g=n.getformattedlabel(e,"normal",t.datatype),null==g)){var x=n.getrawvalue(e);g=null==x?t.getname(e):isfinite(x)?cr(x):x}var _=m?g:null,w=v?c(n.getformattedlabel(e,"emphasis",t.datatype),g):null,b=y.style;(null!=_||null!=w)&&(oo(y.style,l,{text:_},{autocolor:p}),y.__textalign=b.textalign,y.__verticalalign=b.textverticalalign,y.__position=l.get("position")||"middle"),y.hoverstyle=null!=w?{text:w,textfill:u.gettextcolor(!0),fontstyle:u.getshallow("fontstyle"),fontweight:u.getshallow("fontweight"),fontsize:u.getshallow("fontsize"),fontfamily:u.getshallow("fontfamily")}:{text:null},y.ignore=!m&&!v,to(this)},no.highlight=function(){this.trigger("emphasis")},no.downplay=function(){this.trigger("normal")},no.updatelayout=function(t,e){this.setlinepoints(t.getitemlayout(e))},no.setlinepoints=function(t){var e=this.childofname("line");fg(e.shape,t),e.dirty()},h(gg,ss);var zo=mg.prototype;zo.ispersistent=function(){return!0},zo.updatedata=function(t){var e=this,i=e.group,n=e._linedata;e._linedata=t,n||i.removeall();var a=xg(t);t.diff(n).add(function(i){vg(e,t,i,a)}).update(function(i,o){yg(e,n,t,o,i,a)}).remove(function(t){i.remove(n.getitemgraphicel(t))}).execute()},zo.updatelayout=function(){var t=this._linedata;t&&t.eachitemgraphicel(function(e,i){e.updatelayout(t,i)},this)},zo.incrementalprepareupdate=function(t){this._seriesscope=xg(t),this._linedata=null,this.group.removeall()},zo.incrementalupdate=function(t,e){function i(t){t.isgroup||(t.incremental=t.usehoverlayer=!0)}for(var n=t.start;n0&&(r=this.getlinelength(n)/l*1e3),r!==this._period||s!==this._loop){n.stopanimation();var c=u;h&&(c=u(i)),n.__t>0&&(c=-r*n.__t),n.__t=0;var d=n.animate("",s).when(r,{__t:1}).delay(c).during(function(){a.updatesymbolposition(n)});s||d.done(function(){a.remove(n)}),d.start()}this._period=r,this._loop=s}},ro.getlinelength=function(t){return db(t.__p1,t.__cp1)+db(t.__cp1,t.__p2)},ro.updateanimationpoints=function(t,e){t.__p1=e[0],t.__p2=e[1],t.__cp1=e[2]||[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2]},ro.updatedata=function(t,e,i){this.childat(0).updatedata(t,e,i),this._updateeffectsymbol(t,e)},ro.updatesymbolposition=function(t){var e=t.__p1,i=t.__p2,n=t.__cp1,a=t.__t,o=t.position,r=ya,s=xa;o[0]=r(e[0],n[0],i[0],a),o[1]=r(e[1],n[1],i[1],a);var l=s(e[0],n[0],i[0],a),u=s(e[1],n[1],i[1],a);t.rotation=-math.atan2(u,l)-math.pi/2,t.ignore=!1},ro.updatelayout=function(t,e){this.childat(0).updatelayout(t,e);var i=t.getitemmodel(e).getmodel("effect");this._updateeffectanimation(t,i,e)},h(bg,ss);var eo=sg.prototype;eo._createpolyline=function(t,e,i){var n=t.getitemlayout(e),a=new ui({shape:{points:n}});this.add(a),this._updatecommonstl(t,e,i)},eo.updatedata=function(t,e,i){var n=t.hostmodel,a=this.childat(0),o={shape:{points:t.getitemlayout(e)}};ho(a,o,n,e),this._updatecommonstl(t,e,i)},eo._updatecommonstl=function(t,e,i){var n=this.childat(0),a=t.getitemmodel(e),o=t.getitemvisual(e,"color"),r=i&&i.linestyle,l=i&&i.hoverlinestyle;(!i||t.hasitemoption)&&(r=a.getmodel("linestyle").getlinestyle(),l=a.getmodel("emphasis.linestyle").getlinestyle()),n.usestyle(s({strokenoscale:!0,fill:"none",stroke:o},r)),n.hoverstyle=l,to(this)},eo.updatelayout=function(t,e){var i=this.childat(0);i.setshape("points",t.getitemlayout(e))},h(sg,ss);var bo=mg.prototype;bo.createline=function(t,e,i){return new sg(t,e,i)},bo.updateanimationpoints=function(t,e){this._points=e;for(var i=[0],n=0,a=1;a=0&&!(n[o]<=e);o--);o=math.min(o,a-2)}else{for(var o=r;a>o&&!(n[o]>e);o++);o=math.min(o-1,a-2)}ae(t.position,i[o],i[o+1],(e-n[o])/(n[o+1]-n[o]));var l=i[o+1][0]-i[o][0],u=i[o+1][1]-i[o][1];t.rotation=-math.atan2(u,l)-math.pi/2,this._lastframe=o,this._lastframepercent=e,t.ignore=!1}},h(mg,bg);var vo=no({shape:{polyline:!1,curveness:0,segs:[]},buildpath:function(t,e){var i=e.segs,n=e.curveness;if(e.polyline)for(var a=0;a0){t.moveto(i[a++],i[a++]);for(var r=1;o>r;r++)t.lineto(i[a++],i[a++])}}else for(var a=0;a0){var c=(s+u)/2-(l-h)*n,d=(l+h)/2-(u-s)*n;t.quadraticcurveto(c,d,u,h)}else t.lineto(u,h)}},finddataindex:function(){var t=this.shape,e=t.segs,i=t.curveness;if(t.polyline)for(var n=0,a=0;a0)for(var r=e[a++],s=e[a++],l=1;o>l;l++){var u=e[a++],h=e[a++];if(ca(r,s,u,h))return n}n++}else for(var n=0,a=0;a0){var c=(r+u)/2-(s-h)*i,d=(s+h)/2-(u-r)*i;if(ka(r,s,c,d,u,h))return n}else if(ca(r,s,u,h))return n;n++}return-1}}),go=ig.prototype;go.ispersistent=function(){return!this._incremental},go.updatedata=function(t){this.group.removeall();var e=new vo({recthover:!0,cursor:"default"});e.setshape({segs:t.getlayout("linespoints")}),this._setcommon(e,t),this.group.add(e),this._incremental=null},go.incrementalprepareupdate=function(t){this.group.removeall(),this._clearincremental(),t.count()>5e5?(this._incremental||(this._incremental=new io({silent:!0})),this.group.add(this._incremental)):this._incremental=null},go.incrementalupdate=function(t,e){var i=new vo;i.setshape({segs:e.getlayout("linespoints")}),this._setcommon(i,e,!!this._incremental),this._incremental?this._incremental.adddisplayable(i,!0):(i.recthover=!0,i.cursor="default",i.__startindex=t.start,this.group.add(i))},go.remove=function(){this._clearincremental(),this._incremental=null,this.group.removeall()},go._setcommon=function(t,e,i){var n=e.hostmodel;t.setshape({polyline:n.get("polyline"),curveness:n.get("linestyle.curveness")}),t.usestyle(n.getmodel("linestyle").getlinestyle()),t.style.strokenoscale=!0;var a=e.getvisual("color");a&&t.setstyle("stroke",a),t.setstyle("fill"),i||(t.seriesindex=n.seriesindex,t.on("mousemove",function(e){t.dataindex=null;var i=t.finddataindex(e.offsetx,e.offsety);i>0&&(t.dataindex=i+t.__startindex)}))},go._clearincremental=function(){var t=this._incremental;t&&t.cleardisplaybles()};var fo={seriestype:"lines",plan:zt(),reset:function(t){function e(e,o){var r=[];if(a){var s,l=e.end-e.start;if(n){for(var u=0,h=e.start;hp;p++)d=i.datatopoint(r[p],!1,d),s[c++]=d[0],s[c++]=d[1]}o.setlayout("linespoints",s)}else for(var h=e.start;hv;v++)m.push(i.datatopoint(r[v]));else{m[0]=i.datatopoint(r[0]),m[1]=i.datatopoint(r[1]);var y=g.get("linestyle.curveness");+y&&(m[2]=[(m[0][0]+m[1][0])/2-(m[0][1]-m[1][1])*y,(m[0][1]+m[1][1])/2-(m[1][0]-m[0][0])*y])}o.setitemlayout(h,m)}}var i=t.coordinatesystem,n=t.get("polyline"),a=t.pipelinecontext.large;return{progress:e}}};iu({type:"lines",init:function(){},render:function(t,e,i){var n=t.getdata(),a=this._updatelinedraw(n,t),o=t.get("zlevel"),r=t.get("effect.traillength"),s=i.getzr(),l="svg"===s.painter.gettype();l||s.painter.getlayer(o).clear(!0),null==this._lastzlevel||l||s.configlayer(this._lastzlevel,{motionblur:!1}),this._showeffect(t)&&r&&(l||s.configlayer(o,{motionblur:!0,lastframealpha:math.max(math.min(r/10+.9,1),0)})),a.updatedata(n);var u=t.get("clip",!0)&&sc(t.coordinatesystem,!1,t);u?this.group.setclippath(u):this.group.removeclippath(),this._lastzlevel=o,this._finished=!0},incrementalpreparerender:function(t,e,i){var n=t.getdata(),a=this._updatelinedraw(n,t);a.incrementalprepareupdate(n),this._clearlayer(i),this._finished=!1},incrementalrender:function(t,e){this._linedraw.incrementalupdate(t,e.getdata()),this._finished=t.end===e.getdata().count()},updatetransform:function(t,e,i){var n=t.getdata(),a=t.pipelinecontext;if(!this._finished||a.large||a.progressiverender)return{update:!0};var o=fo.reset(t);o.progress&&o.progress({start:0,end:n.count()},n),this._linedraw.updatelayout(),this._clearlayer(i)},_updatelinedraw:function(t,e){var i=this._linedraw,n=this._showeffect(e),a=!!e.get("polyline"),o=e.pipelinecontext,r=o.large;return i&&n===this._haseffet&&a===this._ispolyline&&r===this._islargedraw||(i&&i.remove(),i=this._linedraw=r?new ig:new mg(a?n?mg:sg:n?bg:gg),this._haseffet=n,this._ispolyline=a,this._islargedraw=r,this.group.removeall()),this.group.add(i.group),i},_showeffect:function(t){return!!t.get("effect.show")},_clearlayer:function(t){var e=t.getzr(),i="svg"===e.painter.gettype();i||null==this._lastzlevel||e.painter.getlayer(this._lastzlevel).clear(!0)},remove:function(t,e){this._linedraw&&this._linedraw.remove(),this._linedraw=null,this._clearlayer(e)},dispose:function(){}});var wo="linestyle.opacity".split("."),ho={seriestype:"lines",reset:function(t){function e(t,e){var i=t.getitemmodel(e),n=ag(i.getshallow("symbol",!0)),a=ag(i.getshallow("symbolsize",!0)),o=i.get(wo);n[0]&&t.setitemvisual(e,"fromsymbol",n[0]),n[1]&&t.setitemvisual(e,"tosymbol",n[1]),a[0]&&t.setitemvisual(e,"fromsymbolsize",a[0]),a[1]&&t.setitemvisual(e,"tosymbolsize",a[1]),t.setitemvisual(e,"opacity",o)}var i=ag(t.get("symbol")),n=ag(t.get("symbolsize")),a=t.getdata();return a.setvisual("fromsymbol",i&&i[0]),a.setvisual("tosymbol",i&&i[1]),a.setvisual("fromsymbolsize",n&&n[0]),a.setvisual("tosymbolsize",n&&n[1]),a.setvisual("opacity",t.get(wo)),{dataeach:a.hasitemoption?e:null}}};yu(fo),xu(ho);var zo=function(t){this._directed=t||!1,this.nodes=[],this.edges=[],this._nodesmap={},this._edgesmap={},this.data,this.edgedata},xo=zo.prototype;xo.type="graph",xo.isdirected=function(){return this._directed},xo.addnode=function(t,e){t=null==t?""+e:""+t;var i=this._nodesmap;if(!i[tg(t)]){var n=new dg(t,e);return n.hostgraph=this,this.nodes.push(n),i[tg(t)]=n,n}},xo.getnodebyindex=function(t){var e=this.data.getrawindex(t);return this.nodes[e]},xo.getnodebyid=function(t){return this._nodesmap[tg(t)]},xo.addedge=function(t,e,i){var n=this._nodesmap,a=this._edgesmap;if("number"==typeof t&&(t=this.nodes[t]),"number"==typeof e&&(e=this.nodes[e]),dg.isinstance(t)||(t=n[tg(t)]),dg.isinstance(e)||(e=n[tg(e)]),t&&e){var o=t.id+"-"+e.id;if(!a[o]){var r=new cg(t,e,i);return r.hostgraph=this,this._directed&&(t.outedges.push(r),e.inedges.push(r)),t.edges.push(r),t!==e&&e.edges.push(r),this.edges.push(r),a[o]=r,r}}},xo.getedgebyindex=function(t){var e=this.edgedata.getrawindex(t);return this.edges[e]},xo.getedge=function(t,e){dg.isinstance(t)&&(t=t.id),dg.isinstance(e)&&(e=e.id);var i=this._edgesmap;return this._directed?i[t+"-"+e]:i[t+"-"+e]||i[e+"-"+t]},xo.eachnode=function(t,e){for(var i=this.nodes,n=i.length,a=0;n>a;a++)i[a].dataindex>=0&&t.call(e,i[a],a)},xo.eachedge=function(t,e){for(var i=this.edges,n=i.length,a=0;n>a;a++)i[a].dataindex>=0&&i[a].node1.dataindex>=0&&i[a].node2.dataindex>=0&&t.call(e,i[a],a)},xo.breadthfirsttraverse=function(t,e,i,n){if(dg.isinstance(e)||(e=this._nodesmap[tg(e)]),e){for(var a="out"===i?"outedges":"in"===i?"inedges":"edges",o=0;oa;a++)i[a].dataindex=-1;for(var a=0,o=t.count();o>a;a++)i[t.getrawindex(a)].dataindex=a;e.filterself(function(t){var i=n[e.getrawindex(t)];return i.node1.dataindex>=0&&i.node2.dataindex>=0});for(var a=0,o=n.length;o>a;a++)n[a].dataindex=-1;for(var a=0,o=e.count();o>a;a++)n[e.getrawindex(a)].dataindex=a},xo.clone=function(){for(var t=new zo(this._directed),e=this.nodes,i=this.edges,n=0;n=0&&this[t][e].setitemvisual(this.dataindex,i,n)},getvisual:function(i,n){return this[t][e].getitemvisual(this.dataindex,i,n)},setlayout:function(i,n){this.dataindex>=0&&this[t][e].setitemlayout(this.dataindex,i,n)},getlayout:function(){return this[t][e].getitemlayout(this.dataindex)},getgraphicel:function(){return this[t][e].getitemgraphicel(this.dataindex)},getrawindex:function(){return this[t][e].getrawindex(this.dataindex)}}};c(dg,uo("hostgraph","data")),c(cg,uo("hostgraph","edgedata")),zo.node=dg,zo.edge=cg,ra(dg),ra(cg);var yo=function(t,e,i,n,a){for(var o=new zo(n),r=0;r "+f)),h++)}var p,g=i.get("coordinatesystem");if("cartesian2d"===g||"polar"===g)p=eh(t,i);else{var m=ms.get(g),v=m&&"view"!==m.type?m.dimensions||[]:[];u(v,"value")<0&&v.concat(["value"]);var y=yc(t,{coorddimensions:v});p=new gc(y,i),p.initdata(t)}var x=new gc(["value"],i);return x.initdata(l,s),a&&a(p,x),$d({maindata:p,struct:o,structattr:"graph",datas:{node:p,edge:x},datasattr:{node:"data",edge:"edgedata"}}),o.update(),o},jo=mu({type:"series.graph",init:function(t){jo.superapply(this,"init",arguments),this.legenddataprovider=function(){return this._categoriesdata},this.filldatatextstyle(t.edges||t.links),this._updatecategoriesdata()},mergeoption:function(t){jo.superapply(this,"mergeoption",arguments),this.filldatatextstyle(t.edges||t.links),this._updatecategoriesdata()},mergedefaultandtheme:function(t){jo.superapply(this,"mergedefaultandtheme",arguments),fn(t,["edgelabel"],["show"])},getinitialdata:function(t,e){function i(t,i){function n(t){return t=this.parsepath(t),t&&"label"===t[0]?r:t&&"emphasis"===t[0]&&"label"===t[1]?l:this.parentmodel}t.wrapmethod("getitemmodel",function(t){var e=o._categoriesmodels,i=t.getshallow("category"),n=e[i];return n&&(n.parentmodel=t.parentmodel,t.parentmodel=n),t});var a=o.getmodel("edgelabel"),r=new ir({label:a.option},a.parentmodel,e),s=o.getmodel("emphasis.edgelabel"),l=new ir({emphasis:{label:s.option}},s.parentmodel,e);i.wrapmethod("getitemmodel",function(t){return t.customizegetparent(n),t})}var n=t.edges||t.links||[],a=t.data||t.nodes||[],o=this;return a&&n?yo(a,n,this,!0,i).data:void 0},getgraph:function(){return this.getdata().graph},getedgedata:function(){return this.getgraph().edgedata},getcategoriesdata:function(){return this._categoriesdata},formattooltip:function(t,e,i){if("edge"===i){var n=this.getdata(),a=this.getdataparams(t,i),o=n.graph.getedgebyindex(t),r=n.getname(o.node1.dataindex),s=n.getname(o.node2.dataindex),l=[];return null!=r&&l.push(r),null!=s&&l.push(s),l=dr(l.join(" > ")),a.value&&(l+=" : "+dr(a.value)),l}return jo.superapply(this,"formattooltip",arguments)},_updatecategoriesdata:function(){var t=p(this.option.categories||[],function(t){return null!=t.value?t:r({value:0},t)}),e=new gc(["value"],this);e.initdata(t),this._categoriesdata=e,this._categoriesmodels=e.maparray(function(t){return e.getitemmodel(t,!0)})},setzoom:function(t){this.option.zoom=t},setcenter:function(t){this.option.center=t},isanimationenabled:function(){return jo.supercall(this,"isanimationenabled")&&!("force"===this.get("layout")&&this.get("force.layoutanimation"))},defaultoption:{zlevel:0,z:2,coordinatesystem:"view",legendhoverlink:!0,hoveranimation:!0,layout:null,focusnodeadjacency:!1,circular:{rotatelabel:!1},force:{initlayout:null,repulsion:[0,50],gravity:.1,edgelength:30,layoutanimation:!0},left:"center",top:"center",symbol:"circle",symbolsize:10,edgesymbol:["none","none"],edgesymbolsize:10,edgelabel:{position:"middle"},draggable:!1,roam:!1,center:null,zoom:1,nodescaleratio:.6,label:{show:!1,formatter:"{b}"},itemstyle:{},linestyle:{color:"#aaa",width:1,curveness:0,opacity:.5},emphasis:{label:{show:!0}}}}),qo=[],ko=[],$o=[],jo=ya,qo=cb,tn=math.abs,en=function(t,e){var i=[],n=ba,a=[[],[],[]],o=[[],[]],r=[];e/=2,t.eachedge(function(t){var s=t.getlayout(),l=t.getvisual("fromsymbol"),u=t.getvisual("tosymbol");s.__original||(s.__original=[h(s[0]),h(s[1])],s[2]&&s.__original.push(h(s[2])));var h=s.__original;if(null!=s[2]){if(w(a[0],h[0]),w(a[1],h[2]),w(a[2],h[1]),l&&"none"!==l){var c=kg(t.node1),d=pg(a,h[0],c*e);n(a[0][0],a[1][0],a[2][0],d,i),a[0][0]=i[3],a[1][0]=i[4],n(a[0][1],a[1][1],a[2][1],d,i),a[0][1]=i[3],a[1][1]=i[4]}if(u&&"none"!==u){var c=kg(t.node2),d=pg(a,h[1],c*e);n(a[0][0],a[1][0],a[2][0],d,i),a[1][0]=i[1],a[2][0]=i[2],n(a[0][1],a[1][1],a[2][1],d,i),a[1][1]=i[1],a[2][1]=i[2]}w(s[0],a[0]),w(s[1],a[2]),w(s[2],a[1])}else{if(w(o[0],h[0]),w(o[1],h[1]),y(r,o[1],o[0]),te(r,r),l&&"none"!==l){var c=kg(t.node1);u(o[0],o[0],r,c*e)}if(u&&"none"!==u){var c=kg(t.node2);u(o[1],o[1],r,-c*e)}w(s[0],o[0]),w(s[1],o[1])}})},in="__focusnodeadjacency",nn="__unfocusnodeadjacency",an=["itemstyle","opacity"],on=["linestyle","opacity"];iu({type:"graph",init:function(t,e){var i=new nd,n=new mg,a=this.group;this._controller=new lf(e.getzr()),this._controllerhost={target:a},a.add(i.group),a.add(n.group),this._symboldraw=i,this._linedraw=n,this._firstrender=!0},render:function(t,e,i){var n=t.coordinatesystem;this._model=t;var a=this._symboldraw,o=this._linedraw,r=this.group;if("view"===n.type){var s={position:n.position,scale:n.scale};this._firstrender?r.attr(s):ho(r,s,t)}en(t.getgraph(),lg(t));var l=t.getdata();a.updatedata(l);var u=t.getedgedata();o.updatedata(u),this._updatenodeandlinkscale(),this._updatecontroller(t,e,i),cleartimeout(this._layouttimeout);var h=t.forcelayout,c=t.get("force.layoutanimation");h&&this._startforcelayoutiteration(h,c),l.eachitemgraphicel(function(e,n){var a=l.getitemmodel(n);e.off("drag").off("dragend");var o=a.get("draggable");o&&e.on("drag",function(){h&&(h.warmup(),!this._layouting&&this._startforcelayoutiteration(h,c),h.setfixed(n),l.setitemlayout(n,e.position))},this).on("dragend",function(){h&&h.setunfixed(n)},this),e.setdraggable(o&&h),e[in]&&e.off("mouseover",e[in]),e[nn]&&e.off("mouseout",e[nn]),a.get("focusnodeadjacency")&&(e.on("mouseover",e[in]=function(){i.dispatchaction({type:"focusnodeadjacency",seriesid:t.id,dataindex:e.dataindex})}),e.on("mouseout",e[nn]=function(){i.dispatchaction({type:"unfocusnodeadjacency",seriesid:t.id})}))},this),l.graph.eachedge(function(e){var n=e.getgraphicel();n[in]&&n.off("mouseover",n[in]),n[nn]&&n.off("mouseout",n[nn]),e.getmodel().get("focusnodeadjacency")&&(n.on("mouseover",n[in]=function(){i.dispatchaction({type:"focusnodeadjacency",seriesid:t.id,edgedataindex:e.dataindex})}),n.on("mouseout",n[nn]=function(){i.dispatchaction({type:"unfocusnodeadjacency",seriesid:t.id})}))});var d="circular"===t.get("layout")&&t.get("circular.rotatelabel"),f=l.getlayout("cx"),p=l.getlayout("cy");l.eachitemgraphicel(function(t,e){var i=l.getitemmodel(e),n=i.get("label.rotate")||0,a=t.getsymbolpath();if(d){var o=l.getitemlayout(e),r=math.atan2(o[1]-p,o[0]-f);0>r&&(r=2*math.pi+r);var s=o[0]e&&(e=0),e*=u;var i=math.asin(e/2/a);isnan(i)&&(i=cn/2),dn[t.dataindex]=i,l+=2*i});var h=(2*cn-l)/s/2,c=0;i.eachnode(function(t){var e=h+dn[t.dataindex];c+=e,t.setlayout([a*math.cos(c)+o,a*math.sin(c)+r]),c+=e})}},pn=function(t){t.eachseriesbytype("graph",function(t){"circular"===t.get("layout")&&vg(t,"symbolsize")})},gn=u,mn=function(t){t.eachseriesbytype("graph",function(t){var e=t.coordinatesystem;if(!e||"view"===e.type)if("force"===t.get("layout")){var i=t.preservedpoints||{},n=t.getgraph(),a=n.data,o=n.edgedata,r=t.getmodel("force"),s=r.get("initlayout");t.preservedpoints?a.each(function(t){var e=a.getid(t);a.setitemlayout(t,i[e]||[0/0,0/0])}):s&&"none"!==s?"circular"===s&&vg(t,"value"):eg(t);var l=a.getdataextent("value"),u=o.getdataextent("value"),h=r.get("repulsion"),c=r.get("edgelength");_(h)||(h=[h,h]),_(c)||(c=[c,c]),c=[c[1],c[0]];var d=a.maparray("value",function(t,e){var i=a.getitemlayout(e),n=ur(t,l,h);return isnan(n)&&(n=(h[0]+h[1])/2),{w:n,rep:n,fixed:a.getitemmodel(e).get("fixed"),p:!i||isnan(i[0])||isnan(i[1])?null:i}}),f=o.maparray("value",function(t,e){var i=n.getedgebyindex(e),a=ur(t,u,c);return isnan(a)&&(a=(c[0]+c[1])/2),{n1:d[i.node1.dataindex],n2:d[i.node2.dataindex],d:a,curveness:i.getmodel().get("linestyle.curveness")||0}}),e=t.coordinatesystem,p=e.getboundingrect(),g=gg(d,f,{rect:p,gravity:r.get("gravity")}),m=g.step;g.step=function(t){for(var e=0,o=d.length;o>e;e++)d[e].fixed&&w(d[e].p,n.getnodebyindex(e).getlayout());m(function(e,o,r){for(var s=0,l=e.length;l>s;s++)e[s].fixed||n.getnodebyindex(s).setlayout(e[s].p),i[a.getid(s)]=e[s].p;for(var s=0,l=o.length;l>s;s++){var u=o[s],h=n.getedgebyindex(s),c=u.n1.p,d=u.n2.p,f=h.getlayout();f=f?f.slice():[],f[0]=f[0]||[],f[1]=f[1]||[],w(f[0],c),w(f[1],d),+u.curveness&&(f[2]=[(c[0]+d[0])/2-(c[1]-d[1])*u.curveness,(c[1]+d[1])/2-(d[0]-c[0])*u.curveness]),h.setlayout(f)}t&&t(r)})},t.forcelayout=g,t.preservedpoints=i,g.step()}else t.forcelayout=null})},vn=function(t,e){var i=[];return t.eachseriesbytype("graph",function(t){var n=t.get("coordinatesystem");if(!n||"view"===n){var a=t.getdata(),o=a.maparray(function(t){var e=a.getitemmodel(t);return[+e.get("x"),+e.get("y")]}),r=[],s=[];ma(o,r,s),s[0]-r[0]===0&&(s[0]+=1,r[0]-=1),s[1]-r[1]===0&&(s[1]+=1,r[1]-=1);var l=(s[0]-r[0])/(s[1]-r[1]),u=fg(t,e,l);isnan(l)&&(r=[u.x,u.y],s=[u.x+u.width,u.y+u.height]);var h=s[0]-r[0],c=s[1]-r[1],d=u.width,f=u.height,p=t.coordinatesystem=new bf;p.zoomlimit=t.get("scalelimit"),p.setboundingrect(r[0],r[1],h,c),p.setviewrect(u.x,u.y,d,f),p.setcenter(t.get("center")),p.setzoom(t.get("zoom")),i.push(p)}}),i};fu(sn),xu(ck("graph","circle",null)),xu(ln),xu(un),yu(hn),yu(rd.visual.post_chart_layout,pn),yu(mn),mu("graphview",{create:vn});var yn=pt.extend({type:"series.boxplot",dependencies:["xaxis","yaxis","grid"],defaultvaluedimensions:[{name:"min",defaulttooltip:!0},{name:"q1",defaulttooltip:!0},{name:"median",defaulttooltip:!0},{name:"q3",defaulttooltip:!0},{name:"max",defaulttooltip:!0}],dimensions:null,defaultoption:{zlevel:0,z:2,coordinatesystem:"cartesian2d",legendhoverlink:!0,hoveranimation:!0,layout:null,boxwidth:[7,50],itemstyle:{color:"#fff",borderwidth:1},emphasis:{itemstyle:{borderwidth:2,shadowblur:5,shadowoffsetx:2,shadowoffsety:2,shadowcolor:"rgba(0,0,0,0.4)"}},animationeasing:"elasticout",animationduration:800}});c(yn,ok,!0);var xn=["itemstyle"],_n=["emphasis","itemstyle"],wn=(il.extend({type:"boxplot",render:function(t){var e=t.getdata(),i=this.group,n=this._data;this._data||i.removeall();var a="horizontal"===t.get("layout")?1:0;e.diff(n).add(function(t){if(e.hasvalue(t)){var n=e.getitemlayout(t),o=wg(n,e,t,a,!0);e.setitemgraphicel(t,o),i.add(o)}}).update(function(t,o){var r=n.getitemgraphicel(o);if(!e.hasvalue(t))return void i.remove(r);var s=e.getitemlayout(t);r?hg(s,r,e,t):r=wg(s,e,t,a),i.add(r),e.setitemgraphicel(t,r)}).remove(function(t){var e=n.getitemgraphicel(t);e&&i.remove(e)}).execute(),this._data=e},remove:function(){var t=this.group,e=this._data;this._data=null,e&&e.eachitemgraphicel(function(e){e&&t.remove(e)})},dispose:g}),ha.extend({type:"boxplotboxpath",shape:{},buildpath:function(t,e){var i=e.points,n=0;for(t.moveto(i[n][0],i[n][1]),n++;4>n;n++)t.lineto(i[n][0],i[n][1]);for(t.closepath();no&&(e[1-n]=e[n]+c.sign*o),e},cn=f,ln=math.min,kn=math.max,pn=math.floor,on=math.ceil,nn=cr,zn=math.pi;jg.prototype={type:"parallel",constructor:jg,_init:function(t,e){var i=t.dimensions,n=t.parallelaxisindex;cn(i,function(t,i){var a=n[i],o=e.getcomponent("parallelaxis",a),r=this._axesmap.set(t,new tn(t,dh(o),[0,0],o.get("type"),a)),s="category"===r.type;r.onband=s&&o.get("boundarygap"),r.inverse=o.get("inverse"),o.axis=r,r.model=o,r.coordinatesystem=o.coordinatesystem=this},this)},update:function(t){this._updateaxesfromseries(this._model,t)},containpoint:function(t){var e=this._makelayoutinfo(),i=e.axisbase,n=e.layoutbase,a=e.pixeldimindex,o=t[1-a],r=t[a];return o>=i&&o<=i+e.axislength&&r>=n&&r<=n+e.layoutlength},getmodel:function(){return this._model},_updateaxesfromseries:function(t,e){e.eachseries(function(i){if(t.contains(i,e)){var n=i.getdata();cn(this.dimensions,function(t){var e=this._axesmap.get(t);e.scale.unionextentfromdata(n,n.mapdimension(t)),th(e.scale,e.model)},this)}},this)},resize:function(t,e){this._rect=vr(t.getboxlayoutparams(),{width:e.getwidth(),height:e.getheight()}),this._layoutaxes()},getrect:function(){return this._rect},_makelayoutinfo:function(){var t,e=this._model,i=this._rect,n=["x","y"],a=["width","height"],o=e.get("layout"),r="horizontal"===o?0:1,s=i[a[r]],l=[0,s],u=this.dimensions.length,h=qg(e.get("axisexpandwidth"),l),c=qg(e.get("axisexpandcount")||0,[0,u]),d=e.get("axisexpandable")&&u>3&&u>c&&c>1&&h>0&&s>0,f=e.get("axisexpandwindow");if(f)t=qg(f[1]-f[0],l),f[1]=f[0]+t;else{t=qg(h*(c-1),l);var p=e.get("axisexpandcenter")||pn(u/2);f=[h*p-t/2],f[1]=f[0]+t}var g=(s-t)/(u-c);3>g&&(g=0);var m=[pn(nn(f[0]/h,1))+1,on(nn(f[1]/h,1))-1],v=g/h*f[0];return{layout:o,pixeldimindex:r,layoutbase:i[n[r]],layoutlength:s,axisbase:i[n[1-r]],axislength:i[a[1-r]],axisexpandable:d,axisexpandwidth:h,axiscollapsewidth:g,axisexpandwindow:f,axiscount:u,wininnerindices:m,axisexpandwindow0pos:v}},_layoutaxes:function(){var t=this._rect,e=this._axesmap,i=this.dimensions,n=this._makelayoutinfo(),a=n.layout;e.each(function(t){var e=[0,n.axislength],i=t.inverse?1:0;t.setextent(e[i],e[1-i])}),cn(i,function(e,i){var o=(n.axisexpandable?em:tm)(i,n),r={horizontal:{x:o.position,y:n.axislength},vertical:{x:0,y:o.position}},s={horizontal:zn/2,vertical:0},l=[r[a].x+t.x,r[a].y+t.y],u=s[a],h=de();oe(h,h,u),pe(h,h,l),this._axeslayout[e]={position:l,rotation:u,transform:h,axisnameavailablewidth:o.axisnameavailablewidth,axislabelshow:o.axislabelshow,nametruncatemaxwidth:o.nametruncatemaxwidth,tickdirection:1,labeldirection:1}},this)},getaxis:function(t){return this._axesmap.get(t)},datatopoint:function(t,e){return this.axiscoordtopoint(this._axesmap.get(e).datatocoord(t),e)},eachactivestate:function(t,e,i,n){null==i&&(i=0),null==n&&(n=t.count());var a=this._axesmap,o=this.dimensions,r=[],s=[]; f(o,function(e){r.push(t.mapdimension(e)),s.push(a.get(e).model)});for(var l=this.hasaxisbrushed(),u=i;n>u;u++){var h;if(l){h="active";for(var c=t.getvalues(r,u),d=0,p=o.length;p>d;d++){var g=s[d].getactivestate(c[d]);if("inactive"===g){h="inactive";break}}}else h="normal";e(h,u)}},hasaxisbrushed:function(){for(var t=this.dimensions,e=this._axesmap,i=!1,n=0,a=t.length;a>n;n++)"normal"!==e.get(t[n]).model.getactivestate()&&(i=!0);return i},axiscoordtopoint:function(t,e){var i=this._axeslayout[e];return uo([t,0],i.transform)},getaxislayout:function(t){return n(this._axeslayout[t])},getslidedaxisexpandwindow:function(t){var e=this._makelayoutinfo(),i=e.pixeldimindex,n=e.axisexpandwindow.slice(),a=n[1]-n[0],o=[0,e.axisexpandwidth*(e.axiscount-1)];if(!this.containpoint(t))return{behavior:"none",axisexpandwindow:n};var r,s=t[i]-e.layoutbase-e.axisexpandwindow0pos,l="slide",u=e.axiscollapsewidth,h=this._model.get("axisexpandslidetriggerarea"),c=null!=h[0];if(u)c&&u&&sa*(1-h[0])?(l="jump",r=s-a*(1-h[2])):(r=s-a*h[1])>=0&&(r=s-a*(1-h[1]))<=0&&(r=0),r*=e.axisexpandwidth/u,r?dn(r,n,o,"all"):l="none";else{var a=n[1]-n[0],d=o[1]*s/a;n=[kn(0,d-a/2)],n[1]=ln(o[1],n[0]+a),n[0]=n[1]-a}return{axisexpandwindow:n,behavior:l}}},ms.register("parallel",{create:im});var rn=xa.extend({type:"baseparallelaxis",axis:null,activeintervals:[],getareaselectstyle:function(){return lm([["fill","color"],["linewidth","borderwidth"],["stroke","bordercolor"],["width","width"],["opacity","opacity"]])(this.getmodel("areaselectstyle"))},setactiveintervals:function(t){var e=this.activeintervals=n(t);if(e)for(var i=e.length-1;i>=0;i--)dr(e[i])},getactivestate:function(t){var e=this.activeintervals;if(!e.length)return"normal";if(null==t||isnan(t))return"inactive";if(1===e.length){var i=e[0];if(i[0]<=t&&t<=i[1])return"active"}else for(var n=0,a=e.length;a>n;n++)if(e[n][0]<=t&&t<=e[n][1])return"active";return"inactive"}}),en={type:"value",dim:null,areaselectstyle:{width:20,borderwidth:1,bordercolor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};a(rn.prototype,jc),yl("parallel",rn,nm,en),xa.extend({type:"parallel",dependencies:["parallelaxis"],coordinatesystem:null,dimensions:null,parallelaxisindex:null,layoutmode:"box",defaultoption:{zlevel:0,z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisexpandable:!1,axisexpandcenter:null,axisexpandcount:0,axisexpandwidth:50,axisexpandrate:17,axisexpanddebounce:50,axisexpandslidetriggerarea:[-.15,.05,.4],axisexpandtriggeron:"click",parallelaxisdefault:null},init:function(){xa.prototype.init.apply(this,arguments),this.mergeoption({})},mergeoption:function(t){var e=this.option;t&&a(e,t,!0),this._initdimensions()},contains:function(t,e){var i=t.get("parallelindex");return null!=i&&e.getcomponent("parallel",i)===this},setaxisexpand:function(t){f(["axisexpandable","axisexpandcenter","axisexpandcount","axisexpandwidth","axisexpandwindow"],function(e){t.hasownproperty(e)&&(this.option[e]=t[e])},this)},_initdimensions:function(){var t=this.dimensions=[],e=this.parallelaxisindex=[],i=m(this.dependentmodels.parallelaxis,function(t){return(t.get("parallelindex")||0)===this.componentindex},this);f(i,function(i){t.push("dim"+i.get("dim")),e.push(i.componentindex)})}});var bn={type:"axisareaselect",event:"axisareaselected"};gu(bn,function(t,e){e.eachcomponent({maintype:"parallelaxis",query:t},function(e){e.axis.model.setactiveintervals(t.intervals)})}),gu("parallelaxisexpand",function(t,e){e.eachcomponent({maintype:"parallel",query:t},function(e){e.setaxisexpand(t)})});var vn=x,gn=f,fn=p,wn=math.min,hn=math.max,zn=math.pow,xn=1e4,un=6,yn=6,jn="globalpan",qn={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},kn={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},$n={brushstyle:{linewidth:2,stroke:"rgba(0,0,0,0.3)",fill:"rgba(0,0,0,0.1)"},transformable:!0,brushmode:"single",removeonclick:!1},jn=0;am.prototype={constructor:am,enablebrush:function(t){return this._brushtype&&rm(this),t.brushtype&&om(this,t),this},setpanels:function(t){if(t&&t.length){var e=this._panels={};f(t,function(t){e[t.panelid]=n(t)})}else this._panels=null;return this},mount:function(t){t=t||{},this._enableglobalpan=t.enableglobalpan;var e=this.group;return this._zr.add(e),e.attr({position:t.position||[0,0],rotation:t.rotation||0,scale:t.scale||[1,1]}),this._transform=e.getlocaltransform(),this},eachcover:function(t,e){gn(this._covers,t,e)},updatecovers:function(t){function e(t,e){return(null!=t.id?t.id:s+e)+"-"+t.brushtype}function i(t,i){return e(t.__brushoption,i)}function o(e,i){var n=t[e];if(null!=i&&l[i]===c)u[e]=l[i];else{var a=u[e]=null!=i?(l[i].__brushoption=n,l[i]):lm(h,sm(h,n));cm(h,a)}}function r(t){l[t]!==c&&h.group.remove(l[t])}t=p(t,function(t){return a(n($n),t,!0)});var s="\x00-brush-index-",l=this._covers,u=this._covers=[],h=this,c=this._creatingcover;return new lu(l,t,i,e).add(o).update(o).remove(r).execute(),this},unmount:function(){return this.enablebrush(!1),gm(this),this._zr.remove(this.group),this},dispose:function(){this.unmount(),this.off()}},c(am,pb);var qn={mousedown:function(t){if(this._dragging)em.call(this,t);else if(!t.target||!t.target.draggable){om(t);var e=this.group.transformcoordtolocal(t.offsetx,t.offsety);this._creatingcover=null;var i=this._creatingpanel=fm(this,t,e);i&&(this._dragging=!0,this._track=[e.slice()])}},mousemove:function(t){var e=this.group.transformcoordtolocal(t.offsetx,t.offsety);if(pm(this,t,e),this._dragging){om(t);var i=zm(this,t,e,!1);i&&mm(this,i)}},mouseup:em},tz={linex:bm(0),liney:bm(1),rect:{createcover:function(t,e){return xm(vn(tm,function(t){return t},function(t){return t}),t,e,["w","e","n","s","se","sw","ne","nw"])},getcreatingrange:function(t){var e=ym(t);return mm(e[1][0],e[1][1],e[0][0],e[0][1])},updatecovershape:function(t,e,i,n){_m(t,e,i,n)},updatecommon:wm,contain:nm},polygon:{createcover:function(t,e){var i=new ss;return i.add(new ui({name:"main",style:sm(e),silent:!0})),i},getcreatingrange:function(t){return t},endcreating:function(t,e){e.remove(e.childat(0)),e.add(new xi({name:"main",draggable:!0,drift:vn(dm,t,e),ondragend:vn(mm,t,{isend:!0})}))},updatecovershape:function(t,e,i){e.childat(0).setshape({points:lm(t,e,i)})},updatecommon:wm,contain:nm}},ez=["axisline","axisticklabel","axisname"],iz=su({type:"parallelaxis",init:function(t,e){iz.superapply(this,"init",arguments),(this._brushcontroller=new am(e.getzr())).on("brush",y(this._onbrush,this))},render:function(t,e,i,n){if(!hm(t,e,n)){this.axismodel=t,this.api=i,this.group.removeall();var a=this._axisgroup;if(this._axisgroup=new ss,this.group.add(this._axisgroup),t.get("show")){var o=xm(t,e),s=o.coordinatesystem,l=t.getareaselectstyle(),u=l.width,h=t.axis.dim,c=s.getaxislayout(h),d=r({strokecontainthreshold:u},c),p=new rl(t,d);f(ez,p.add,p),this._axisgroup.add(p.getgroup()),this._refreshbrushcontroller(d,l,t,o,u,i);var g=n&&n.animation===!1?null:t;jo(a,this._axisgroup,g)}}},_refreshbrushcontroller:function(t,e,i,n,a,o){var r=i.axis.getextent(),s=r[1]-r[0],l=math.min(30,.1*math.abs(s)),u=wi.create({x:r[0],y:-a/2,width:s,height:a});u.x-=l,u.width+=2*l,this._brushcontroller.mount({enableglobalpan:!0,rotation:t.rotation,position:t.position}).setpanels([{panelid:"pl",clippath:vm(u),istargetbycursor:fm(u,o,n),getlinearbrushotherextent:gm(u,0)}]).enablebrush({brushtype:"linex",brushstyle:e,removeonclick:!0}).updatecovers(zm(i))},_onbrush:function(t,e){var i=this.axismodel,n=i.axis,a=p(t,function(t){return[n.coordtodata(t.range[0],!0),n.coordtodata(t.range[1],!0)]});(!i.option.realtime===e.isend||e.removeonclick)&&this.api.dispatchaction({type:"axisareaselect",parallelaxisid:i.id,intervals:a})},dispose:function(){this._brushcontroller.dispose()}}),nz=5;su({type:"parallel",render:function(t,e,i){this._model=t,this._api=i,this._handlers||(this._handlers={},f(az,function(t,e){i.getzr().on(e,this._handlers[e]=y(t,this))},this)),ll(this,"_throttleddispatchexpand",t.get("axisexpandrate"),"fixrate")},dispose:function(t,e){f(this._handlers,function(t,i){e.getzr().off(i,t)}),this._handlers=null},_throttleddispatchexpand:function(t){this._dispatchexpand(t)},_dispatchexpand:function(t){t&&this._api.dispatchaction(r({type:"parallelaxisexpand"},t))}});var az={mousedown:function(t){um(this,"click")&&(this._mousedownpoint=[t.offsetx,t.offsety])},mouseup:function(t){var e=this._mousedownpoint;if(um(this,"click")&&e){var i=[t.offsetx,t.offsety],n=math.pow(e[0]-i[0],2)+math.pow(e[1]-i[1],2);if(n>nz)return;var a=this._model.coordinatesystem.getslidedaxisexpandwindow([t.offsetx,t.offsety]);"none"!==a.behavior&&this._dispatchexpand({axisexpandwindow:a.axisexpandwindow})}this._mousedownpoint=null},mousemove:function(t){if(!this._mousedownpoint&&um(this,"mousemove")){var e=this._model,i=e.coordinatesystem.getslidedaxisexpandwindow([t.offsetx,t.offsety]),n=i.behavior;"jump"===n&&this._throttleddispatchexpand.debouncenextcall(e.get("axisexpanddebounce")),this._throttleddispatchexpand("none"===n?null:{axisexpandwindow:i.axisexpandwindow,animation:"jump"===n?null:!1})}}};du(an),pt.extend({type:"series.parallel",dependencies:["parallel"],visualcoloraccesspath:"linestyle.color",getinitialdata:function(){var t=this.getsource();return ym(t,this),eh(t,this)},getrawindicesbyactivestate:function(t){var e=this.coordinatesystem,i=this.getdata(),n=[];return e.eachactivestate(i,function(e,a){t===e&&n.push(i.getrawindex(a))}),n},defaultoption:{zlevel:0,z:2,coordinatesystem:"parallel",parallelindex:0,label:{show:!1},inactiveopacity:.05,activeopacity:1,linestyle:{width:1,opacity:.45,type:"solid"},emphasis:{label:{show:!1}},progressive:500,smooth:!1,animationeasing:"linear"}});var oz=.3,rz=(il.extend({type:"parallel",init:function(){this._datagroup=new ss,this.group.add(this._datagroup),this._data,this._initialized},render:function(t,e,i,n){function a(t){var e=$m(l,s,t,c,h);qm(e,l,t,d)}function o(e,i){var a=u.getitemgraphicel(i),o=km(l,e,c,h);l.setitemgraphicel(e,a);var r=n&&n.animation===!1?null:t;ho(a,{shape:{points:o}},r,e),qm(a,l,e,d)}function r(t){var e=u.getitemgraphicel(t);s.remove(e)}var s=this._datagroup,l=t.getdata(),u=this._data,h=t.coordinatesystem,c=h.dimensions,d=jm(t);if(l.diff(u).add(a).update(o).remove(r).execute(),!this._initialized){this._initialized=!0;var f=qm(h,t,function(){settimeout(function(){s.removeclippath()})});s.setclippath(f)}this._data=l},incrementalpreparerender:function(){this._initialized=!0,this._data=null,this._datagroup.removeall()},incrementalrender:function(t,e){for(var i=e.getdata(),n=e.coordinatesystem,a=n.dimensions,o=jm(e),r=t.start;r=a/3?1:2),l=e.y-n(r)*o*(o>=a/3?1:2);r=e.angle-math.pi/2,t.moveto(s,l),t.lineto(e.x+i(r)*o,e.y+n(r)*o),t.lineto(e.x+i(e.angle)*a,e.y+n(e.angle)*a),t.lineto(e.x-i(r)*o,e.y-n(r)*o),t.lineto(s,l)}})),uz=2*math.pi,hz=(il.extend({type:"gauge",render:function(t,e,i){this.group.removeall();var n=t.get("axisline.linestyle.color"),a=ev(t,i);this._rendermain(t,e,i,n,a)},dispose:function(){},_rendermain:function(t,e,i,n,a){for(var o=this.group,r=t.getmodel("axisline"),s=r.getmodel("linestyle"),l=t.get("clockwise"),u=-t.get("startangle")/180*math.pi,h=-t.get("endangle")/180*math.pi,c=(h-u)%uz,d=u,f=s.get("width"),p=r.get("show"),g=0;p&&g=t)return n[0][1];for(var e=0;e=t&&(0===e?0:n[e-1][0])=i;i++){var a=math.cos(_),t=math.sin(_);if(f.get("show")){var d=new $i({shape:{x1:a*h+l,y1:t*h+u,x2:a*(h-y)+l,y2:t*(h-y)+u},style:s,silent:!0});"auto"===s.stroke&&d.setstyle({stroke:n(i/m)}),s.add(d)}if(g.get("show")){var c=iv(cr(i/m*(d-c)+c),g.get("formatter")),l=g.get("distance"),k=n(i/m);s.add(new ei({style:oo({},g,{text:c,x:a*(h-y-l)+l,y:t*(h-y-l)+u,textverticalalign:-.4>t?"top":t>.4?"bottom":"middle",textalign:-.4>a?"left":a>.4?"right":"center"},{autocolor:k}),silent:!0}))}if(p.get("show")&&i!==m){for(var p=0;v>=p;p++){var a=math.cos(_),t=math.sin(_),o=new $i({shape:{x1:a*h+l,y1:t*h+u,x2:a*(h-x)+l,y2:t*(h-x)+u},silent:!0,style:m});"auto"===m.stroke&&o.setstyle({stroke:n((i+p/v)/m)}),s.add(o),_+=b}_-=b}else _+=w}},_renderpointer:function(t,e,i,n,a,o,r){var s=this.group,l=this._data;if(!t.get("pointer.show"))return void(l&&l.eachitemgraphicel(function(t){s.remove(t)}));var u=[+t.get("min"),+t.get("max")],h=[o,r],c=t.getdata(),d=c.mapdimension("value");c.diff(l).add(function(e){var i=new lz({shape:{angle:o}});zo(i,{shape:{angle:ur(c.get(d,e),u,h,!0)}},t),s.add(i),c.setitemgraphicel(e,i)}).update(function(e,i){var n=l.getitemgraphicel(i);ho(n,{shape:{angle:ur(c.get(d,e),u,h,!0)}},t),s.add(n),c.setitemgraphicel(e,n)}).remove(function(t){var e=l.getitemgraphicel(t);s.remove(e)}).execute(),c.eachitemgraphicel(function(t,e){var i=c.getitemmodel(e),o=i.getmodel("pointer");t.setshape({x:a.cx,y:a.cy,width:hr(o.get("width"),a.r),r:hr(o.get("length"),a.r)}),t.usestyle(i.getmodel("itemstyle").getitemstyle()),"auto"===t.style.fill&&t.setstyle("fill",n(ur(c.get(d,e),u,[0,1],!0))),to(t,i.getmodel("emphasis.itemstyle").getitemstyle())}),this._data=c},_rendertitle:function(t,e,i,n,a){var o=t.getdata(),r=o.mapdimension("value"),s=t.getmodel("title");if(s.get("show")){var l=s.get("offsetcenter"),u=a.cx+hr(l[0],a.r),h=a.cy+hr(l[1],a.r),c=+t.get("min"),d=+t.get("max"),f=t.getdata().get(r,0),p=n(ur(f,[c,d],[0,1],!0));this.group.add(new ei({silent:!0,style:oo({},s,{x:u,y:h,text:o.getname(0),textalign:"center",textverticalalign:"middle"},{autocolor:p,forcerich:!0})}))}},_renderdetail:function(t,e,i,n,a){var o=t.getmodel("detail"),r=+t.get("min"),s=+t.get("max");if(o.get("show")){var l=o.get("offsetcenter"),u=a.cx+hr(l[0],a.r),h=a.cy+hr(l[1],a.r),c=hr(o.get("width"),a.r),d=hr(o.get("height"),a.r),f=t.getdata(),p=f.get(f.mapdimension("value"),0),g=n(ur(p,[r,s],[0,1],!0));this.group.add(new ei({silent:!0,style:oo({},o,{x:u,y:h,text:iv(p,o.get("formatter")),textwidth:isnan(c)?null:c,textheight:isnan(d)?null:d,textalign:"center",textverticalalign:"middle"},{autocolor:g,forcerich:!0})}))}}}),mu({type:"series.funnel",init:function(t){hz.superapply(this,"init",arguments),this.legenddataprovider=function(){return this.getrawdata()},this._defaultlabelline(t)},getinitialdata:function(){return mk(this,["value"])},_defaultlabelline:function(t){fn(t,"labelline",["show"]);var e=t.labelline,i=t.emphasis.labelline;e.show=e.show&&t.label.show,i.show=i.show&&t.emphasis.label.show},getdataparams:function(t){var e=this.getdata(),i=hz.supercall(this,"getdataparams",t),n=e.mapdimension("value"),a=e.getsum(n);return i.percent=a?+(e.get(n,t)/a*100).tofixed(2):0,i.$vars.push("percent"),i},defaultoption:{zlevel:0,z:2,legendhoverlink:!0,left:80,top:60,right:80,bottom:60,minsize:"0%",maxsize:"100%",sort:"descending",gap:0,funnelalign:"center",label:{show:!0,position:"outer"},labelline:{show:!0,length:20,linestyle:{width:1,type:"solid"}},itemstyle:{bordercolor:"#fff",borderwidth:1},emphasis:{label:{show:!0}}}})),cz=nv.prototype,dz=["itemstyle","opacity"];cz.updatedata=function(t,e,i){var n=this.childat(0),a=t.hostmodel,o=t.getitemmodel(e),r=t.getitemlayout(e),l=t.getitemmodel(e).get(dz);l=null==l?1:l,n.usestyle({}),i?(n.setshape({points:r.points}),n.setstyle({opacity:0}),zo(n,{style:{opacity:l}},a,e)):ho(n,{style:{opacity:l},shape:{points:r.points}},a,e);var u=o.getmodel("itemstyle"),h=t.getitemvisual(e,"color");n.setstyle(s({linejoin:"round",fill:h},u.getitemstyle(["opacity"]))),n.hoverstyle=u.getmodel("emphasis").getitemstyle(),this._updatelabel(t,e),to(this)},cz._updatelabel=function(t,e){var i=this.childat(1),n=this.childat(2),a=t.hostmodel,o=t.getitemmodel(e),r=t.getitemlayout(e),s=r.label,l=t.getitemvisual(e,"color");ho(i,{shape:{points:s.linepoints||s.linepoints}},a,e),ho(n,{style:{x:s.x,y:s.y}},a,e),n.attr({rotation:s.rotation,origin:[s.x,s.y],z2:10});var u=o.getmodel("label"),h=o.getmodel("emphasis.label"),c=o.getmodel("labelline"),d=o.getmodel("emphasis.labelline"),l=t.getitemvisual(e,"color");ko(n.style,n.hoverstyle={},u,h,{labelfetcher:t.hostmodel,labeldataindex:e,defaulttext:t.getname(e),autocolor:l,useinsidestyle:!!s.inside},{textalign:s.textalign,textverticalalign:s.verticalalign}),n.ignore=n.normalignore=!u.get("show"),n.hoverignore=!h.get("show"),i.ignore=i.normalignore=!c.get("show"),i.hoverignore=!d.get("show"),i.setstyle({stroke:l}),i.setstyle(c.getmodel("linestyle").getlinestyle()),i.hoverstyle=d.getmodel("linestyle").getlinestyle()},h(nv,ss);var fz=(il.extend({type:"funnel",render:function(t){var e=t.getdata(),i=this._data,n=this.group;e.diff(i).add(function(t){var i=new nv(e,t);e.setitemgraphicel(t,i),n.add(i)}).update(function(t,a){var o=i.getitemgraphicel(a);o.updatedata(e,t),n.add(o),e.setitemgraphicel(t,o)}).remove(function(t){var e=i.getitemgraphicel(t);n.remove(e)}).execute(),this._data=e},remove:function(){this.group.removeall(),this._data=null},dispose:function(){}}),function(t,e){t.eachseriesbytype("funnel",function(t){var i=t.getdata(),n=i.mapdimension("value"),a=t.get("sort"),o=av(t,e),r=ov(i,a),s=[hr(t.get("minsize"),o.width),hr(t.get("maxsize"),o.width)],l=i.getdataextent(n),u=t.get("min"),h=t.get("max");null==u&&(u=math.min(l[0],0)),null==h&&(h=l[1]);var c=t.get("funnelalign"),d=t.get("gap"),f=(o.height-d*(i.count()-1))/i.count(),p=o.y,g=function(t,e){var a,r=i.get(n,t)||0,l=ur(r,[u,h],s,!0);switch(c){case"left":a=o.x;break;case"center":a=o.x+(o.width-l)/2;break;case"right":a=o.x+o.width-l}return[[a,e],[a+l,e]]};"ascending"===a&&(f=-f,d=-d,p+=o.height,r=r.reverse());for(var m=0;m=0&&(r[o[s].depth]=new ir(o[s],this,e));if(a&&n){var l=yo(a,n,this,!0,i);return l.data}},setnodeposition:function(t,e){var i=this.option.data[t];i.localx=e[0],i.localy=e[1]},getgraph:function(){return this.getdata().graph},getedgedata:function(){return this.getgraph().edgedata},formattooltip:function(t,e,i){if("edge"===i){var n=this.getdataparams(t,i),a=n.data,o=a.source+" -- "+a.target;return n.value&&(o+=" : "+n.value),dr(o)}if("node"===i){var r=this.getgraph().getnodebyindex(t),s=r.getlayout().value,l=this.getdataparams(t,i).data.name;if(s)var o=l+" : "+s;return dr(o)}return pz.supercall(this,"formattooltip",t,e)},optionupdated:function(){var t=this.option;t.focusnodeadjacency===!0&&(t.focusnodeadjacency="alledges")},defaultoption:{zlevel:0,z:2,coordinatesystem:"view",layout:null,left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodewidth:20,nodegap:8,draggable:!0,focusnodeadjacency:!1,layoutiterations:32,label:{show:!0,position:"right",color:"#000",fontsize:12},levels:[],nodealign:"justify",itemstyle:{borderwidth:1,bordercolor:"#333"},linestyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},linestyle:{opacity:.6}},animationeasing:"linear",animationduration:1e3}}),gz=["itemstyle","opacity"],mz=["linestyle","opacity"],vz=no({shape:{x1:0,y1:0,x2:0,y2:0,cpx1:0,cpy1:0,cpx2:0,cpy2:0,extent:0,orient:""},buildpath:function(t,e){var i=e.extent;t.moveto(e.x1,e.y1),t.beziercurveto(e.cpx1,e.cpy1,e.cpx2,e.cpy2,e.x2,e.y2),"vertical"===e.orient?(t.lineto(e.x2+i,e.y2),t.beziercurveto(e.cpx2+i,e.cpy2,e.cpx1+i,e.cpy1,e.x1+i,e.y1)):(t.lineto(e.x2,e.y2+i),t.beziercurveto(e.cpx2,e.cpy2+i,e.cpx1,e.cpy1+i,e.x1,e.y1+i)),t.closepath()}});iu({type:"sankey",_model:null,_focusadjacencydisabled:!1,render:function(t,e,i){var n=this,a=t.getgraph(),o=this.group,r=t.layoutinfo,s=r.width,l=r.height,u=t.getdata(),h=t.getdata("edge"),c=t.get("orient");this._model=t,o.removeall(),o.attr("position",[r.x,r.y]),a.eachedge(function(e){var i=new vz;i.dataindex=e.dataindex,i.seriesindex=t.seriesindex,i.datatype="edge";var n,a,r,u,d,f,p,g,m=e.getmodel("linestyle"),v=m.get("curveness"),y=e.node1.getlayout(),x=e.node1.getmodel(),_=x.get("localx"),w=x.get("localy"),b=e.node2.getlayout(),s=e.node2.getmodel(),m=s.get("localx"),i=s.get("localy"),a=e.getlayout();switch(i.shape.extent=math.max(1,a.dy),i.shape.orient=c,"vertical"===c?(n=(null!=_?_*s:y.x)+a.sy,a=(null!=w?w*l:y.y)+y.dy,r=(null!=m?m*s:b.x)+a.ty,u=null!=i?i*l:b.y,d=n,f=a*(1-v)+u*v,p=r,g=a*v+u*(1-v)):(n=(null!=_?_*s:y.x)+y.dx,a=(null!=w?w*l:y.y)+a.sy,r=null!=m?m*s:b.x,u=(null!=i?i*l:b.y)+a.ty,d=n*(1-v)+r*v,f=a,p=n*v+r*(1-v),g=u),i.setshape({x1:n,y1:a,x2:r,y2:u,cpx1:d,cpy1:f,cpx2:p,cpy2:g}),i.setstyle(m.getitemstyle()),i.style.fill){case"source":i.style.fill=e.node1.getvisual("color");break;case"target":i.style.fill=e.node2.getvisual("color")}to(i,e.getmodel("emphasis.linestyle").getitemstyle()),o.add(i),h.setitemgraphicel(e.dataindex,i)}),a.eachnode(function(e){var i=e.getlayout(),n=e.getmodel(),a=n.get("localx"),r=n.get("localy"),h=n.getmodel("label"),c=n.getmodel("emphasis.label"),d=new qi({shape:{x:null!=a?a*s:i.x,y:null!=r?r*l:i.y,width:i.dx,height:i.dy},style:n.getmodel("itemstyle").getitemstyle()}),f=e.getmodel("emphasis.itemstyle").getitemstyle();ko(d.style,f,h,c,{labelfetcher:t,labeldataindex:e.dataindex,defaulttext:e.id,isrecttext:!0}),d.setstyle("fill",e.getvisual("color")),to(d,f),o.add(d),u.setitemgraphicel(e.dataindex,d),d.datatype="node"}),u.eachitemgraphicel(function(e,a){var o=u.getitemmodel(a);o.get("draggable")&&(e.drift=function(e,o){n._focusadjacencydisabled=!0,this.shape.x+=e,this.shape.y+=o,this.dirty(),i.dispatchaction({type:"dragnode",seriesid:t.id,dataindex:u.getrawindex(a),localx:this.shape.x/s,localy:this.shape.y/l})},e.ondragend=function(){n._focusadjacencydisabled=!1},e.draggable=!0,e.cursor="move"),o.get("focusnodeadjacency")&&(e.off("mouseover").on("mouseover",function(){n._focusadjacencydisabled||i.dispatchaction({type:"focusnodeadjacency",seriesid:t.id,dataindex:e.dataindex})}),e.off("mouseout").on("mouseout",function(){n._focusadjacencydisabled||i.dispatchaction({type:"unfocusnodeadjacency",seriesid:t.id})}))}),h.eachitemgraphicel(function(e,a){var o=h.getitemmodel(a);o.get("focusnodeadjacency")&&(e.off("mouseover").on("mouseover",function(){n._focusadjacencydisabled||i.dispatchaction({type:"focusnodeadjacency",seriesid:t.id,edgedataindex:e.dataindex})}),e.off("mouseout").on("mouseout",function(){n._focusadjacencydisabled||i.dispatchaction({type:"unfocusnodeadjacency",seriesid:t.id})}))}),!this._data&&t.get("animation")&&o.setclippath(hv(o.getboundingrect(),t,function(){o.removeclippath()})),this._data=t.getdata()},dispose:function(){},focusnodeadjacency:function(t,e,i,n){var a=this._model.getdata(),o=a.graph,r=n.dataindex,s=a.getitemmodel(r),l=n.edgedataindex;if(null!=r||null!=l){var u=o.getnodebyindex(r),h=o.getedgebyindex(l);if(o.eachnode(function(t){lv(t,gz,.1)}),o.eachedge(function(t){lv(t,mz,.1)}),u){uv(u,gz);var c=s.get("focusnodeadjacency");"outedges"===c?f(u.outedges,function(t){t.dataindex<0||(uv(t,mz),uv(t.node2,gz))}):"inedges"===c?f(u.inedges,function(t){t.dataindex<0||(uv(t,mz),uv(t.node1,gz))}):"alledges"===c&&f(u.edges,function(t){t.dataindex<0||(uv(t,mz),uv(t.node1,gz),uv(t.node2,gz))})}h&&(uv(h,mz),uv(h.node1,gz),uv(h.node2,gz))}},unfocusnodeadjacency:function(){var t=this._model.getgraph();t.eachnode(function(t){lv(t,gz)}),t.eachedge(function(t){lv(t,mz)})}}),gu({type:"dragnode",event:"dragnode",update:"update"},function(t,e){e.eachcomponent({maintype:"series",subtype:"sankey",query:t},function(e){e.setnodeposition(t.dataindex,[t.localx,t.localy])})});var yz=function(t,e){t.eachseriesbytype("sankey",function(t){var i=t.get("nodewidth"),n=t.get("nodegap"),a=cv(t,e);t.layoutinfo=a;var o=a.width,r=a.height,s=t.getgraph(),l=s.nodes,u=s.edges;fv(l);var h=m(l,function(t){return 0===t.getlayout().value}),c=0!==h.length?0:t.get("layoutiterations"),d=t.get("orient"),f=t.get("nodealign");dv(l,u,i,n,o,r,c,d,f)})},xz=function(t){t.eachseriesbytype("sankey",function(t){var e=t.getgraph(),i=e.nodes;if(i.length){var n=1/0,a=-1/0;f(i,function(t){var e=t.getlayout().value;n>e&&(n=e),e>a&&(a=e)}),f(i,function(e){var i=new kp({type:"color",mappingmethod:"linear",dataextent:[n,a],visual:t.get("color")}),o=i.mapvaluetovisual(e.getlayout().value),r=e.getmodel().get("itemstyle.color");null!=r?e.setvisual("color",r):e.setvisual("color",o)})}})};yu(yz),xu(xz);var _z=function(t,e,i,n,a){ul.call(this,t,e,i),this.type=n||"value",this.position=a||"bottom",this.orient=null};_z.prototype={constructor:_z,model:null,ishorizontal:function(){var t=this.position;return"top"===t||"bottom"===t},pointtodata:function(t,e){return this.coordinatesystem.pointtodata(t,e)[0]},toglobalcoord:null,tolocalcoord:null},h(_z,ul),kv.prototype={type:"singleaxis",axispointerenabled:!0,constructor:kv,_init:function(t){var e=this.dimension,i=new _z(e,dh(t),[0,0],t.get("type"),t.get("position")),n="category"===i.type;i.onband=n&&t.get("boundarygap"),i.inverse=t.get("inverse"),i.orient=t.get("orient"),t.axis=i,i.model=t,i.coordinatesystem=this,this._axis=i},update:function(t){t.eachseries(function(t){if(t.coordinatesystem===this){var e=t.getdata();f(e.mapdimension(this.dimension,!0),function(t){this._axis.scale.unionextentfromdata(e,t)},this),th(this._axis.scale,this._axis.model)}},this)},resize:function(t,e){this._rect=vr({left:t.get("left"),top:t.get("top"),right:t.get("right"),bottom:t.get("bottom"),width:t.get("width"),height:t.get("height")},{width:e.getwidth(),height:e.getheight()}),this._adjustaxis()},getrect:function(){return this._rect},_adjustaxis:function(){var t=this._rect,e=this._axis,i=e.ishorizontal(),n=i?[0,t.width]:[0,t.height],a=e.reverse?1:0;e.setextent(n[a],n[1-a]),this._updateaxistransform(e,i?t.x:t.y)},_updateaxistransform:function(t,e){var i=t.getextent(),n=i[0]+i[1],a=t.ishorizontal();t.toglobalcoord=a?function(t){return t+e}:function(t){return n-t+e},t.tolocalcoord=a?function(t){return t-e}:function(t){return n-t+e}},getaxis:function(){return this._axis},getbaseaxis:function(){return this._axis},getaxes:function(){return[this._axis]},gettooltipaxes:function(){return{baseaxes:[this.getaxis()]}},containpoint:function(t){var e=this.getrect(),i=this.getaxis(),n=i.orient;return"horizontal"===n?i.contain(i.tolocalcoord(t[0]))&&t[1]>=e.y&&t[1]<=e.y+e.height:i.contain(i.tolocalcoord(t[1]))&&t[0]>=e.y&&t[0]<=e.y+e.height},pointtodata:function(t){var e=this.getaxis();return[e.coordtodata(e.tolocalcoord(t["horizontal"===e.orient?0:1]))]},datatopoint:function(t){var e=this.getaxis(),i=this.getrect(),n=[],a="horizontal"===e.orient?0:1;return t instanceof array&&(t=t[0]),n[a]=e.toglobalcoord(e.datatocoord(+t)),n[1-a]=0===a?i.y+i.height/2:i.x+i.width/2,n}},ms.register("single",{create:pv,dimensions:kv.prototype.dimensions});var wz=["axisline","axisticklabel","axisname"],bz="splitline",sz=hl.extend({type:"singleaxis",axispointerclass:"singleaxispointer",render:function(t,e,i,n){var a=this.group;a.removeall();var o=ov(t),r=new rl(t,o);f(wz,r.add,r),a.add(r.getgroup()),t.get(bz+".show")&&this["_"+bz](t),sz.supercall(this,"render",t,e,i,n)},_splitline:function(t){var e=t.axis;if(!e.scale.isblank()){var i=t.getmodel("splitline"),n=i.getmodel("linestyle"),a=n.get("width"),o=n.get("color");o=o instanceof array?o:[o];for(var r=t.coordinatesystem.getrect(),s=e.ishorizontal(),l=[],u=0,h=e.gettickscoords({tickmodel:i}),c=[],d=[],f=0;fr||_(r))return{point:[]};var s=o.getitemgraphicel(r),l=i.coordinatesystem;if(i.gettooltipposition)n=i.gettooltipposition(r)||[];else if(l&&l.datatopoint)n=l.datatopoint(o.getvalues(p(l.dimensions,function(t){return o.mapdimension(t)}),r,!0))||[];else if(s){var u=s.getboundingrect().clone();u.applytransform(s.transform),n=[u.x+u.width/2,u.y+u.height/2]}return{point:n,el:s}},tz=f,dz=x,cz=kn(),lz=function(t,e,i){var n=t.currtrigger,a=[t.x,t.y],o=t,r=t.dispatchaction||y(i.dispatchaction,i),s=e.getcomponent("axispointer").coordsysaxesinfo; if(s){zv(a)&&(a=az({seriesindex:o.seriesindex,dataindex:o.dataindex},e).point);var l=zv(a),u=o.axesinfo,h=s.axesinfo,c="leave"===n||zv(a),d={},f={},p={list:[],map:{}},g={showpointer:dz(ev,f),showtooltip:dz(bv,p)};tz(s.coordsysmap,function(t,e){var i=l||t.containpoint(a);tz(s.coordsysaxesinfo[e],function(t){var e=t.axis,n=wv(u,t);if(!c&&i&&(!u||n)){var o=n&&n.value;null!=o||l||(o=e.pointtodata(a)),null!=o&&zv(t,o,g,!1,d)}})});var m={};return tz(h,function(t,e){var i=t.linkgroup;i&&!f[e]&&tz(i.axesinfo,function(e,n){var a=f[n];if(e!==t&&a){var o=a.value;i.mapper&&(o=t.axis.scale.parse(i.mapper(o,hv(e),hv(t)))),m[t.key]=o}})}),tz(m,function(t,e){zv(h[e],t,g,!0,d)}),vv(f,h,d),gv(p,a,t,r),fv(h,r,i),d}},kz=(bu({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}}}),kn()),pz=f,oz=su({type:"axispointer",render:function(t,e,i){var n=e.getcomponent("tooltip"),a=t.get("triggeron")||n&&n.get("triggeron")||"mousemove|click";xv("axispointer",i,function(t,e,i){"none"!==a&&("leave"===t||a.indexof(t)>=0)&&i({type:"updateaxispointer",currtrigger:t,x:e&&e.offsetx,y:e&&e.offsety})})},remove:function(t,e){$v(e.getzr(),"axispointer"),oz.superapply(this._model,"remove",arguments)},dispose:function(t,e){$v("axispointer",e),oz.superapply(this._model,"dispose",arguments)}}),nz=kn(),zz=n,rz=y;jv.prototype={_group:null,_lastgraphickey:null,_handle:null,_dragging:!1,_lastvalue:null,_laststatus:null,_payloadinfo:null,animationthreshold:15,render:function(t,e,i,n){var a=e.get("value"),o=e.get("status");if(this._axismodel=t,this._axispointermodel=e,this._api=i,n||this._lastvalue!==a||this._laststatus!==o){this._lastvalue=a,this._laststatus=o;var r=this._group,s=this._handle;if(!o||"hide"===o)return r&&r.hide(),void(s&&s.hide());r&&r.show(),s&&s.show();var l={};this.makeeloption(l,a,t,e,i);var u=l.graphickey;u!==this._lastgraphickey&&this.clear(i),this._lastgraphickey=u;var h=this._moveanimation=this.determineanimation(t,e);if(r){var c=x(qv,e,h);this.updatepointerel(r,l,c,e),this.updatelabelel(r,l,c,e)}else r=this._group=new ss,this.createpointerel(r,l,t,e),this.createlabelel(r,l,t,e),i.getzr().add(r);ny(r,e,!0),this._renderhandle(a)}},remove:function(t){this.clear(t)},dispose:function(t){this.clear(t)},determineanimation:function(t,e){var i=e.get("animation"),n=t.axis,a="category"===n.type,o=e.get("snap");if(!o&&!a)return!1;if("auto"===i||null==i){var r=this.animationthreshold;if(a&&n.getbandwidth()>r)return!0;if(o){var s=uc(t).seriesdatacount,l=n.getextent();return math.abs(l[0]-l[1])/s>r}return!1}return i===!0},makeeloption:function(){},createpointerel:function(t,e){var i=e.pointer;if(i){var n=nz(t).pointerel=new _a[i.type](zz(e.pointer));t.add(n)}},createlabelel:function(t,e,i,n){if(e.label){var a=nz(t).labelel=new qi(zz(e.label));t.add(a),ey(a,n)}},updatepointerel:function(t,e,i){var n=nz(t).pointerel;n&&e.pointer&&(n.setstyle(e.pointer.style),i(n,{shape:e.pointer.shape}))},updatelabelel:function(t,e,i,n){var a=nz(t).labelel;a&&(a.setstyle(e.label.style),i(a,{shape:e.label.shape,position:e.label.position}),ey(a,n))},_renderhandle:function(t){if(!this._dragging&&this.updatehandletransform){var e=this._axispointermodel,i=this._api.getzr(),n=this._handle,a=e.getmodel("handle"),o=e.get("status");if(!a.get("show")||!o||"hide"===o)return n&&i.remove(n),void(this._handle=null);var r;this._handle||(r=!0,n=this._handle=$o(a.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){bb(t.event)},onmousedown:rz(this._onhandledragmove,this,0,0),drift:rz(this._onhandledragmove,this),ondragend:rz(this._onhandledragend,this)}),i.add(n)),ny(n,e,!1);var s=["color","bordercolor","borderwidth","opacity","shadowcolor","shadowblur","shadowoffsetx","shadowoffsety"];n.setstyle(a.getitemstyle(null,s));var l=a.get("size");_(l)||(l=[l,l]),n.attr("scale",[l[0]/2,l[1]/2]),ll(this,"_dodispatchaxispointer",a.get("throttle")||0,"fixrate"),this._movehandletovalue(t,r)}},_movehandletovalue:function(t,e){qv(this._axispointermodel,!e&&this._moveanimation,this._handle,iy(this.gethandletransform(t,this._axismodel,this._axispointermodel)))},_onhandledragmove:function(t,e){var i=this._handle;if(i){this._dragging=!0;var n=this.updatehandletransform(iy(i),[t,e],this._axismodel,this._axispointermodel);this._payloadinfo=n,i.stopanimation(),i.attr(iy(n)),nz(i).lastprop=null,this._dodispatchaxispointer()}},_dodispatchaxispointer:function(){var t=this._handle;if(t){var e=this._payloadinfo,i=this._axismodel;this._api.dispatchaction({type:"updateaxispointer",x:e.cursorpoint[0],y:e.cursorpoint[1],tooltipoption:e.tooltipoption,axesinfo:[{axisdim:i.axis.dim,axisindex:i.componentindex}]})}},_onhandledragend:function(){this._dragging=!1;var t=this._handle;if(t){var e=this._axispointermodel.get("value");this._movehandletovalue(e),this._api.dispatchaction({type:"hidetip"})}},gethandletransform:null,updatehandletransform:null,clear:function(t){this._lastvalue=null,this._laststatus=null;var e=t.getzr(),i=this._group,n=this._handle;e&&i&&(this._lastgraphickey=null,i&&e.remove(i),n&&e.remove(n),this._group=null,this._handle=null,this._payloadinfo=null)},doclear:function(){},buildlabel:function(t,e,i){return i=i||0,{x:t[i],y:t[1-i],width:e[i],height:e[1-i]}}},jv.prototype.constructor=jv,oa(jv);var ez=jv.extend({makeeloption:function(t,e,i,n,a){var o=i.axis,r=o.grid,s=n.get("type"),l=fy(r,o).getotheraxis(o).getglobalextent(),u=o.toglobalcoord(o.datatocoord(e,!0));if(s&&"none"!==s){var h=ay(n),c=bz[s](o,u,l);c.style=h,t.graphickey=c.type,t.pointer=c}var d=jc(r.model,i);uy(e,t,d,i,n,a)},gethandletransform:function(t,e,i){var n=jc(e.axis.grid.model,e,{labelinside:!1});return n.labelmargin=i.get("handle.margin"),{position:ly(e.axis,t,n),rotation:n.rotation+(n.labeldirection<0?math.pi:0)}},updatehandletransform:function(t,e,i){var n=i.axis,a=n.grid,o=n.getglobalextent(!0),r=fy(a,n).getotheraxis(n).getglobalextent(),s="x"===n.dim?0:1,l=t.position;l[s]+=e[s],l[s]=math.min(o[1],l[s]),l[s]=math.max(o[0],l[s]);var u=(r[1]+r[0])/2,h=[u,u];h[s]=l[s];var c=[{verticalalign:"middle"},{align:"center"}];return{position:l,rotation:t.rotation,cursorpoint:h,tooltipoption:c[s]}}}),bz={line:function(t,e,i){var n=hy([e,i[0]],[e,i[1]],py(t));return{type:"line",subpixeloptimize:!0,shape:n}},shadow:function(t,e,i){var n=math.max(1,t.getbandwidth()),a=i[1]-i[0];return{type:"rect",shape:cy([e-n/2,i[0]],[n,a],py(t))}}};hl.registeraxispointerclass("cartesianaxispointer",ez),du(function(t){if(t){(!t.axispointer||0===t.axispointer.length)&&(t.axispointer={});var e=t.axispointer.link;e&&!_(e)&&(t.axispointer.link=[e])}}),fu(rd.processor.statistic,function(t,e){t.getcomponent("axispointer").coordsysaxesinfo=vc(t,e)}),gu({type:"updateaxispointer",event:"updateaxispointer",update:":updateaxispointer"},lz);var vz=["x","y"],gz=["width","height"],fz=jv.extend({makeeloption:function(t,e,i,n,a){var o=i.axis,r=o.coordinatesystem,s=my(r,1-gy(o)),l=r.datatopoint(e)[0],u=n.get("type");if(u&&"none"!==u){var h=ay(n),c=wz[u](o,l,s);c.style=h,t.graphickey=c.type,t.pointer=c}var d=ov(i);uy(e,t,d,i,n,a)},gethandletransform:function(t,e,i){var n=ov(e,{labelinside:!1});return n.labelmargin=i.get("handle.margin"),{position:ly(e.axis,t,n),rotation:n.rotation+(n.labeldirection<0?math.pi:0)}},updatehandletransform:function(t,e,i){var n=i.axis,a=n.coordinatesystem,o=gy(n),r=my(a,o),s=t.position;s[o]+=e[o],s[o]=math.min(r[1],s[o]),s[o]=math.max(r[0],s[o]);var l=my(a,1-o),u=(l[1]+l[0])/2,h=[u,u];return h[o]=s[o],{position:s,rotation:t.rotation,cursorpoint:h,tooltipoption:{verticalalign:"middle"}}}}),wz={line:function(t,e,i){var n=hy([e,i[0]],[e,i[1]],gy(t));return{type:"line",subpixeloptimize:!0,shape:n}},shadow:function(t,e,i){var n=t.getbandwidth(),a=i[1]-i[0];return{type:"rect",shape:cy([e-n/2,i[0]],[n,a],gy(t))}}};hl.registeraxispointerclass("singleaxispointer",fz),su({type:"single"});var hz=2,zz=pt.extend({type:"series.themeriver",dependencies:["singleaxis"],namemap:null,init:function(){zz.superapply(this,"init",arguments),this.legenddataprovider=function(){return this.getrawdata()}},fixdata:function(t){var e=t.length,i=ia(t,function(t){return t[2]}),n=[];i.buckets.each(function(t,e){n.push({name:e,datalist:t})});for(var a=n.length,o=-1,r=-1,s=0;a>s;++s){var l=n[s].datalist.length;l>o&&(o=l,r=s)}for(var u=0;a>u;++u)if(u!==r)for(var h=n[u].name,c=0;o>c;++c){for(var d=n[r].datalist[c][0],f=n[u].datalist.length,p=-1,g=0;f>g;++g){var m=n[u].datalist[g][0];if(m===d){p=g;break}}-1===p&&(t[e]=[],t[e][0]=d,t[e][1]=0,t[e][2]=h,e++)}return t},getinitialdata:function(t,e){for(var i=e.querycomponents({maintype:"singleaxis",index:this.get("singleaxisindex"),id:this.get("singleaxisid")})[0],n=i.get("type"),a=m(t.data,function(t){return void 0!==t[2]}),o=this.fixdata(a||[]),r=[],s=this.namemap=b(),l=0,u=0;un;++n)i[n]=n;var a=t.mapdimension("single"),o=ia(i,function(e){return t.get("name",e)}),r=[];return o.buckets.each(function(e,i){e.sort(function(e,i){return t.get(a,e)-t.get(a,i)}),r.push({name:i,indices:e})}),r},getaxistooltipdata:function(t,e){_(t)||(t=t?[t]:[]);for(var i,n=this.getdata(),a=this.getlayerseries(),o=[],r=a.length,s=0;r>s;++s){for(var l=number.max_value,u=-1,h=a[s].indices.length,c=0;h>c;++c){var d=n.get(t[0],a[s].indices[c]),f=math.abs(d-e);l>=f&&(i=d,l=f,u=a[s].indices[c])}o.push(u)}return{dataindices:o,nestestvalue:i}},formattooltip:function(t){var e=this.getdata(),i=e.getname(t),n=e.get(e.mapdimension("value"),t);return(isnan(n)||null==n)&&(n="-"),dr(i+" : "+n)},defaultoption:{zlevel:0,z:2,coordinatesystem:"singleaxis",boundarygap:["10%","10%"],singleaxisindex:0,animationeasing:"linear",label:{margin:4,show:!0,position:"left",color:"#000",fontsize:11},emphasis:{label:{show:!0}}}});iu({type:"themeriver",init:function(){this._layers=[]},render:function(t){function e(t){return t.name}function i(e,i,s){var l=this._layers;if("remove"===e)return void a.remove(l[i]);for(var u,h=[],d=[],f=o[i].indices,p=0;pn[1]&&n.reverse(),{coordsys:{type:"polar",cx:t.cx,cy:t.cy,r:n[1],r0:n[0]},api:{coord:y(function(n){var a=e.datatoradius(n[0]),o=i.datatoangle(n[1]),r=t.coordtopoint([a,o]);return r.push(a,o*math.pi/180),r}),size:y(uy,t)}}},er=function(t){var e=t.getrect(),i=t.getrangeinfo();return{coordsys:{type:"calendar",x:e.x,y:e.y,width:e.width,height:e.height,cellwidth:t.getcellwidth(),cellheight:t.getcellheight(),rangeinfo:{start:i.start,end:i.end,weeks:i.weeks,daycount:i.allday}},api:{coord:function(e,i){return t.datatopoint(e,i)}}}},ir=ha,nr=["itemstyle"],ar=["emphasis","itemstyle"],or=["label"],rr=["emphasis","label"],sr="e\x00\x00",lr={cartesian2d:$z,geo:jz,singleaxis:qz,polar:tr,calendar:er};pt.extend({type:"series.custom",dependencies:["grid","polar","geo","singleaxis","calendar"],defaultoption:{coordinatesystem:"cartesian2d",zlevel:0,z:2,legendhoverlink:!0,usetransform:!0,clip:!1},getinitialdata:function(){return eh(this.getsource(),this)},getdataparams:function(t,e,i){var n=pt.prototype.getdataparams.apply(this,arguments);return i&&(n.info=i.info),n}}),il.extend({type:"custom",_data:null,render:function(t,e,i,n){var a=this._data,o=t.getdata(),r=this.group,s=ky(t,o,e,i);o.diff(a).add(function(e){jy(null,e,s(e,n),t,r,o)}).update(function(e,i){var l=a.getitemgraphicel(i);jy(l,e,s(e,n),t,r,o)}).remove(function(t){var e=a.getitemgraphicel(t);e&&r.remove(e)}).execute();var l=t.get("clip",!0)?sc(t.coordinatesystem,!1,t):null;l?r.setclippath(l):r.removeclippath(),this._data=o},incrementalpreparerender:function(){this.group.removeall(),this._data=null},incrementalrender:function(t,e,i,n,a){function o(t){t.isgroup||(t.incremental=!0,t.usehoverlayer=!0)}for(var r=e.getdata(),s=ky(e,r,i,n),l=t.start;lc?c=f:(d.lasttickcount=a,d.lastautointerval=c),c}},h(gx,ul);var hr=function(t){this.name=t||"",this.cx=0,this.cy=0,this._radiusaxis=new px,this._angleaxis=new gx,this._radiusaxis.polar=this._angleaxis.polar=this};hr.prototype={type:"polar",axispointerenabled:!0,constructor:hr,dimensions:["radius","angle"],model:null,containpoint:function(t){var e=this.pointtocoord(t);return this._radiusaxis.contain(e[0])&&this._angleaxis.contain(e[1])},containdata:function(t){return this._radiusaxis.containdata(t[0])&&this._angleaxis.containdata(t[1])},getaxis:function(t){return this["_"+t+"axis"]},getaxes:function(){return[this._radiusaxis,this._angleaxis]},getaxesbyscale:function(t){var e=[],i=this._angleaxis,n=this._radiusaxis;return i.scale.type===t&&e.push(i),n.scale.type===t&&e.push(n),e},getangleaxis:function(){return this._angleaxis},getradiusaxis:function(){return this._radiusaxis},getotheraxis:function(t){var e=this._angleaxis;return t===e?this._radiusaxis:e},getbaseaxis:function(){return this.getaxesbyscale("ordinal")[0]||this.getaxesbyscale("time")[0]||this.getangleaxis()},gettooltipaxes:function(t){var e=null!=t&&"auto"!==t?this.getaxis(t):this.getbaseaxis();return{baseaxes:[e],otheraxes:[this.getotheraxis(e)]}},datatopoint:function(t,e){return this.coordtopoint([this._radiusaxis.datatoradius(t[0],e),this._angleaxis.datatoangle(t[1],e)])},pointtodata:function(t,e){var i=this.pointtocoord(t);return[this._radiusaxis.radiustodata(i[0],e),this._angleaxis.angletodata(i[1],e)]},pointtocoord:function(t){var e=t[0]-this.cx,i=t[1]-this.cy,n=this.getangleaxis(),a=n.getextent(),o=math.min(a[0],a[1]),r=math.max(a[0],a[1]);n.inverse?o=r-360:r=o+360;var s=math.sqrt(e*e+i*i);e/=s,i/=s;for(var l=math.atan2(-i,e)/math.pi*180,u=o>l?1:-1;o>l||l>r;)l+=360*u;return[s,l]},coordtopoint:function(t){var e=t[0],i=t[1]/180*math.pi,n=math.cos(i)*e+this.cx,a=-math.sin(i)*e+this.cy;return[n,a]},getarea:function(){var t=this.getangleaxis(),e=this.getradiusaxis(),i=e.getextent().slice();i[0]>i[1]&&i.reverse();var n=t.getextent(),a=math.pi/180;return{cx:this.cx,cy:this.cy,r0:i[0],r:i[1],startangle:-n[0]*a,endangle:-n[1]*a,clockwise:t.inverse,contain:function(t,e){var i=t-this.cx,n=e-this.cy,a=i*i+n*n,o=this.r,r=this.r0;return o*o>=a&&a>=r*r}}}};var cr=xa.extend({type:"polaraxis",axis:null,getcoordsysmodel:function(){return this.ecmodel.querycomponents({maintype:"polar",index:this.option.polarindex,id:this.option.polarid})[0]}});a(cr.prototype,jc);var dr={angle:{startangle:90,clockwise:!0,splitnumber:12,axislabel:{rotate:!1}},radius:{splitnumber:5}};yl("angle",cr,mx,dr.angle),yl("radius",cr,mx,dr.radius),bu({type:"polar",dependencies:["polaraxis","angleaxis"],coordinatesystem:null,findaxismodel:function(t){var e,i=this.ecmodel;return i.eachcomponent(t,function(t){t.getcoordsysmodel()===this&&(e=t)},this),e},defaultoption:{zlevel:0,z:0,center:["50%","50%"],radius:"80%"}});var fr={dimensions:hr.prototype.dimensions,create:function(t,e){var i=[];return t.eachcomponent("polar",function(t,n){var a=new hr(n);a.update=yx;var o=a.getradiusaxis(),r=a.getangleaxis(),s=t.findaxismodel("radiusaxis"),l=t.findaxismodel("angleaxis");xx(o,s),xx(r,l),vx(a,t,e),i.push(a),t.coordinatesystem=a,a.model=t}),t.eachseries(function(e){if("polar"===e.get("coordinatesystem")){var i=t.querycomponents({maintype:"polar",index:e.get("polarindex"),id:e.get("polarid")})[0];e.coordinatesystem=i.coordinatesystem}}),i}};ms.register("polar",fr);var pr=["axisline","axislabel","axistick","splitline","splitarea"];hl.extend({type:"angleaxis",axispointerclass:"polaraxispointer",render:function(t){if(this.group.removeall(),t.get("show")){var e=t.axis,i=e.polar,a=i.getradiusaxis().getextent(),o=e.gettickscoords(),r=p(e.getviewlabels(),function(t){var t=n(t);return t.coord=e.datatocoord(t.tickvalue),t});sx(r),sx(o),f(pr,function(n){!t.get(n+".show")||e.scale.isblank()&&"axisline"!==n||this["_"+n](t,i,o,a,r)},this)}},_axisline:function(t,e,i,n){var a=t.getmodel("axisline.linestyle"),o=new bi({shape:{cx:e.cx,cy:e.cy,r:n[bx(e)]},style:a.getlinestyle(),z2:1,silent:!0});o.style.fill=null,this.group.add(o)},_axistick:function(t,e,i,n){var a=t.getmodel("axistick"),o=(a.get("inside")?-1:1)*a.get("length"),r=n[bx(e)],l=p(i,function(t){return new $i({shape:_x(e,[r,r+o],t.coord)})});this.group.add(ma(l,{style:s(a.getmodel("linestyle").getlinestyle(),{stroke:t.get("axisline.linestyle.color")})}))},_axislabel:function(t,e,i,n,a){var o=t.getcategories(!0),r=t.getmodel("axislabel"),s=r.get("margin"),l=t.get("triggerevent");f(a,function(i){var a=r,u=i.tickvalue,h=n[bx(e)],c=e.coordtopoint([h+s,i.coord]),d=e.cx,f=e.cy,p=math.abs(c[0]-d)/h<.3?"center":c[0]>d?"left":"right",g=math.abs(c[1]-f)/h<.3?"middle":c[1]>f?"top":"bottom";o&&o[u]&&o[u].textstyle&&(a=new ir(o[u].textstyle,r,r.ecmodel));var m=new ei({silent:rl.islabelsilent(t)});this.group.add(m),oo(m.style,a,{x:c[0],y:c[1],textfill:a.gettextcolor()||t.get("axisline.linestyle.color"),text:i.formattedlabel,textalign:p,textverticalalign:g}),l&&(m.eventdata=rl.makeaxiseventdatabase(t),m.eventdata.targettype="axislabel",m.eventdata.value=i.rawlabel)},this)},_splitline:function(t,e,i,n){var a=t.getmodel("splitline"),o=a.getmodel("linestyle"),r=o.get("color"),l=0;r=r instanceof array?r:[r];for(var u=[],h=0;hi?"0"+i:i;var n=t.getdate();n=10>n?"0"+n:n;var a=t.getday();return a=math.abs((a+7-this.getfirstdayofweek())%7),{y:e,m:i,d:n,day:a,time:t.gettime(),formateddate:e+"-"+i+"-"+n,date:t}},getnextnday:function(t,e){return e=e||0,0===e?this.getdateinfo(t):(t=new date(this.getdateinfo(t).time),t.setdate(t.getdate()+e),this.getdateinfo(t))},update:function(t,e){function i(t,e){return null!=t[e]&&"auto"!==t[e]}this._firstdayofweek=+this._model.getmodel("daylabel").get("firstday"),this._orient=this._model.get("orient"),this._linewidth=this._model.getmodel("itemstyle").getitemstyle().linewidth||0,this._rangeinfo=this._getrangeinfo(this._initrangeoption());var n=this._rangeinfo.weeks||1,a=["width","height"],o=this._model.get("cellsize").slice(),r=this._model.getboxlayoutparams(),s="horizontal"===this._orient?[n,7]:[7,n];f([0,1],function(t){i(o,t)&&(r[a[t]]=o[t]*s[t])});var l={width:e.getwidth(),height:e.getheight()},u=this._rect=vr(r,l);f([0,1],function(t){i(o,t)||(o[t]=u[a[t]]/s[t])}),this._sw=o[0],this._sh=o[1]},datatopoint:function(t,e){_(t)&&(t=t[0]),null==e&&(e=!0);var i=this.getdateinfo(t),n=this._rangeinfo,a=i.formateddate;if(e&&!(i.time>=n.start.time&&i.timeo.end.time&&t.reverse(),t},_getrangeinfo:function(t){t=[this.getdateinfo(t[0]),this.getdateinfo(t[1])];var e;t[0].time>t[1].time&&(e=!0,t.reverse());var i=math.floor(t[1].time/_r)-math.floor(t[0].time/_r)+1,n=new date(t[0].time),a=n.getdate(),o=t[1].date.getdate();if(n.setdate(a+i-1),n.getdate()!==o)for(var r=n.gettime()-t[1].time>0?1:-1;n.getdate()!==o&&(n.gettime()-t[1].time)*r>0;)i-=r,n.setdate(a+i-1);var s=math.floor((i+t[0].day+6)/7),l=e?-s+1:s-1;return e&&t.reverse(),{range:[t[0].formateddate,t[1].formateddate],start:t[0],end:t[1],allday:i,weeks:s,nthweek:l,fweek:t[0].day,lweek:t[1].day}},_getdatebyweeksandday:function(t,e,i){var n=this._getrangeinfo(i);if(t>n.weeks||0===t&&en.lweek)return!1;var a=7*(t-1)-n.fweek+e,o=new date(n.start.time);return o.setdate(n.start.d+a),this.getdateinfo(o)}},tx.dimensions=tx.prototype.dimensions,tx.getdimensionsinfo=tx.prototype.getdimensionsinfo,tx.create=function(t,e){var i=[]; return t.eachcomponent("calendar",function(n){var a=new tx(n,t,e);i.push(a),n.coordinatesystem=a}),t.eachseries(function(t){"calendar"===t.get("coordinatesystem")&&(t.coordinatesystem=i[t.get("calendarindex")||0])}),i},ms.register("calendar",tx);var wr=xa.extend({type:"calendar",coordinatesystem:null,defaultoption:{zlevel:0,z:2,left:80,top:60,cellsize:20,orient:"horizontal",splitline:{show:!0,linestyle:{color:"#000",width:1,type:"solid"}},itemstyle:{color:"#fff",borderwidth:1,bordercolor:"#ccc"},daylabel:{show:!0,firstday:0,position:"start",margin:"50%",namemap:"en",color:"#000"},monthlabel:{show:!0,position:"start",margin:5,align:"center",namemap:"en",formatter:null,color:"#000"},yearlabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontfamily:"sans-serif",fontweight:"bolder",fontsize:20}},init:function(t){var e=hr(t);wr.superapply(this,"init",arguments),cx(t,e)},mergeoption:function(t){wr.superapply(this,"mergeoption",arguments),cx(this.option,t)}}),br={en:["jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec"],cn:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},sr={en:["s","m","t","w","t","f","s"],cn:["日","一","二","三","四","五","六"]};su({type:"calendar",_tlpoints:null,_blpoints:null,_firstdayofmonth:null,_firstdaypoints:null,render:function(t){var e=this.group;e.removeall();var i=t.coordinatesystem,n=i.getrangeinfo(),a=i.getorient();this._renderdayrect(t,n,e),this._renderlines(t,n,a,e),this._renderyeartext(t,n,a,e),this._rendermonthtext(t,a,e),this._renderweektext(t,n,a,e)},_renderdayrect:function(t,e,i){for(var n=t.coordinatesystem,a=t.getmodel("itemstyle").getitemstyle(),o=n.getcellwidth(),r=n.getcellheight(),s=e.start.time;s<=e.end.time;s=n.getnextnday(s,1).time){var l=n.datatorect([s],!1).tl,u=new qi({shape:{x:l[0],y:l[1],width:o,height:r},cursor:"default",style:a});i.add(u)}},_renderlines:function(t,e,i,n){function a(e){o._firstdayofmonth.push(r.getdateinfo(e)),o._firstdaypoints.push(r.datatorect([e],!1).tl);var a=o._getlinepointsofoneweek(t,e,i);o._tlpoints.push(a[0]),o._blpoints.push(a[a.length-1]),l&&o._drawsplitline(a,s,n)}var o=this,r=t.coordinatesystem,s=t.getmodel("splitline.linestyle").getlinestyle(),l=t.get("splitline.show"),u=s.linewidth;this._tlpoints=[],this._blpoints=[],this._firstdayofmonth=[],this._firstdaypoints=[];for(var h=e.start,c=0;h.time<=e.end.time;c++){a(h.formateddate),0===c&&(h=r.getdateinfo(e.start.y+"-"+e.start.m));var d=h.date;d.setmonth(d.getmonth()+1),h=r.getdateinfo(d)}a(r.getnextnday(e.end.time,1).formateddate),l&&this._drawsplitline(o._getedgespoints(o._tlpoints,u,i),s,n),l&&this._drawsplitline(o._getedgespoints(o._blpoints,u,i),s,n)},_getedgespoints:function(t,e,i){var n=[t[0].slice(),t[t.length-1].slice()],a="horizontal"===i?0:1;return n[0][a]=n[0][a]-e/2,n[1][a]=n[1][a]+e/2,n},_drawsplitline:function(t,e,i){var n=new ui({z2:20,shape:{points:t},style:e});i.add(n)},_getlinepointsofoneweek:function(t,e,i){var n=t.coordinatesystem;e=n.getdateinfo(e);for(var a=[],o=0;7>o;o++){var r=n.getnextnday(e.time,o),s=n.datatorect([r.time],!1);a[2*r.day]=s.tl,a[2*r.day+1]=s["horizontal"===i?"bl":"tr"]}return a},_formatterlabel:function(t,e){return"string"==typeof t&&t?lr(t,e):"function"==typeof t?t(e):e.namemap},_yeartextpositioncontrol:function(t,e,i,n,a){e=e.slice();var o=["center","bottom"];"bottom"===n?(e[1]+=a,o=["center","top"]):"left"===n?e[0]-=a:"right"===n?(e[0]+=a,o=["center","top"]):e[1]-=a;var r=0;return("left"===n||"right"===n)&&(r=math.pi/2),{rotation:r,position:e,style:{textalign:o[0],textverticalalign:o[1]}}},_renderyeartext:function(t,e,i,n){var a=t.getmodel("yearlabel");if(a.get("show")){var o=a.get("margin"),r=a.get("position");r||(r="horizontal"!==i?"top":"left");var s=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],l=(s[0][0]+s[1][0])/2,u=(s[0][1]+s[1][1])/2,h="horizontal"===i?0:1,c={top:[l,s[h][1]],bottom:[l,s[1-h][1]],left:[s[1-h][0],u],right:[s[h][0],u]},d=e.start.y;+e.end.y>+e.start.y&&(d=d+"-"+e.end.y);var f=a.get("formatter"),p={start:e.start.y,end:e.end.y,namemap:d},g=this._formatterlabel(f,p),m=new ei({z2:30});oo(m.style,a,{text:g}),m.attr(this._yeartextpositioncontrol(m,c[r],i,r,o)),n.add(m)}},_monthtextpositioncontrol:function(t,e,i,n,a){var o="left",r="top",s=t[0],l=t[1];return"horizontal"===i?(l+=a,e&&(o="center"),"start"===n&&(r="bottom")):(s+=a,e&&(r="middle"),"start"===n&&(o="right")),{x:s,y:l,textalign:o,textverticalalign:r}},_rendermonthtext:function(t,e,i){var n=t.getmodel("monthlabel");if(n.get("show")){var a=n.get("namemap"),o=n.get("margin"),s=n.get("position"),l=n.get("align"),u=[this._tlpoints,this._blpoints];b(a)&&(a=br[a.touppercase()]||[]);var h="start"===s?0:1,c="horizontal"===e?0:1;o="start"===s?-o:o;for(var d="center"===l,f=0;ff;f++){var p=o.getnextnday(c,f),g=o.datatorect([p.time],!1).center,m=f;m=math.abs((f+h)%7);var v=new ei({z2:30});r(oo(v.style,a,{text:l[m]}),this._weektextpositioncontrol(g,i,s,u,d)),n.add(v)}}}}),bu({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"}}}),su({type:"title",render:function(t,e,i){if(this.group.removeall(),t.get("show")){var n=this.group,a=t.getmodel("textstyle"),o=t.getmodel("subtextstyle"),r=t.get("textalign"),s=c(t.get("textbaseline"),t.get("textverticalalign")),l=new ei({style:oo({},a,{text:t.get("text"),textfill:a.gettextcolor()},{disablebox:!0}),z2:10}),u=l.getboundingrect(),h=t.get("subtext"),c=new ei({style:oo({},o,{text:h,textfill:o.gettextcolor(),y:u.height+t.get("itemgap"),textverticalalign:"top"},{disablebox:!0}),z2:10}),d=t.get("link"),f=t.get("sublink"),p=t.get("triggerevent",!0);l.silent=!d&&!p,c.silent=!f&&!p,d&&l.on("click",function(){window.open(d,"_"+t.get("target"))}),f&&c.on("click",function(){window.open(f,"_"+t.get("subtarget"))}),l.eventdata=c.eventdata=p?{componenttype:"title",componentindex:t.componentindex}:null,n.add(l),h&&n.add(c);var g=n.getboundingrect(),m=t.getboxlayoutparams();m.width=g.width,m.height=g.height;var v=vr(m,{width:i.getwidth(),height:i.getheight()},t.get("padding"));r||(r=t.get("left")||t.get("right"),"middle"===r&&(r="center"),"right"===r?v.x+=v.width:"center"===r&&(v.x+=v.width/2)),s||(s=t.get("top")||t.get("bottom"),"center"===s&&(s="middle"),"bottom"===s?v.y+=v.height:"middle"===s&&(v.y+=v.height/2),s=s||"top"),n.attr("position",[v.x,v.y]);var y={textalign:r,textverticalalign:s};l.setstyle(y),c.setstyle(y),g=n.getboundingrect();var x=v.margin,_=t.getitemstyle(["color","opacity"]);_.fill=t.get("backgroundcolor");var w=new qi({shape:{x:g.x-x[3],y:g.y-x[0],width:g.width+x[1]+x[3],height:g.height+x[0]+x[2],r:t.get("borderradius")},style:_,subpixeloptimize:!0,silent:!0});n.add(w)}}});var mr=zt.legend.selector,ir={all:{type:"all",title:n(mr.all)},inverse:{type:"inverse",title:n(mr.inverse)}},ar=bu({type:"legend.plain",dependencies:["series"],layoutmode:{type:"box",ignoresize:!0},init:function(t,e,i){this.mergedefaultandtheme(t,i),t.selected=t.selected||{},this._updateselector(t)},mergeoption:function(t){ar.supercall(this,"mergeoption",t),this._updateselector(t)},_updateselector:function(t){var e=t.selector;e===!0&&(e=t.selector=["all","inverse"]),_(e)&&f(e,function(t,i){b(t)&&(t={type:t}),e[i]=a(t,ir[t.type])})},optionupdated:function(){this._updatedata(this.ecmodel);var t=this._data;if(t[0]&&"single"===this.get("selectedmode")){for(var e=!1,i=0;i=0},getorient:function(){return"vertical"===this.get("orient")?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},defaultoption:{zlevel:0,z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundcolor:"rgba(0,0,0,0)",bordercolor:"#ccc",borderradius:0,borderwidth:0,padding:5,itemgap:10,itemwidth:25,itemheight:14,inactivecolor:"#ccc",inactivebordercolor:"#ccc",itemstyle:{borderwidth:0},textstyle:{color:"#333"},selectedmode:!0,selector:!1,selectorlabel:{show:!0,borderradius:10,padding:[3,5,3,5],fontsize:12,fontfamily:" sans-serif",color:"#666",borderwidth:1,bordercolor:"#666"},emphasis:{selectorlabel:{show:!0,color:"#eee",backgroundcolor:"#666"}},selectorposition:"auto",selectoritemgap:7,selectorbuttongap:10,tooltip:{show:!1}}});gu("legendtoggleselect","legendselectchanged",x(lx,"toggleselected")),gu("legendallselect","legendselectall",x(lx,"allselect")),gu("legendinverseselect","legendinverseselect",x(lx,"inverseselect")),gu("legendselect","legendselected",x(lx,"select")),gu("legendunselect","legendunselected",x(lx,"unselect"));var tr=x,dr=f,cr=ss,lr=su({type:"legend.plain",newlinedisabled:!1,init:function(){this.group.add(this._contentgroup=new cr),this._backgroundel,this.group.add(this._selectorgroup=new cr),this._isfirstrender=!0},getcontentgroup:function(){return this._contentgroup},getselectorgroup:function(){return this._selectorgroup},render:function(t,e,i){var n=this._isfirstrender;if(this._isfirstrender=!1,this.resetinner(),t.get("show",!0)){var a=t.get("align"),o=t.get("orient");a&&"auto"!==a||(a="right"===t.get("left")&&"vertical"===o?"right":"left");var r=t.get("selector",!0),l=t.get("selectorposition",!0);!r||l&&"auto"!==l||(l="horizontal"===o?"end":"start"),this.renderinner(a,t,e,i,r,o,l);var u=t.getboxlayoutparams(),h={width:i.getwidth(),height:i.getheight()},c=t.get("padding"),d=vr(u,h,c),f=this.layoutinner(t,a,d,n,r,l),p=vr(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=px(f,t))}},resetinner:function(){this.getcontentgroup().removeall(),this._backgroundel&&this.group.remove(this._backgroundel),this.getselectorgroup().removeall()},renderinner:function(t,e,i,n,a,o,r){var s=this.getcontentgroup(),l=b(),u=e.get("selectedmode"),h=[];i.eachrawseries(function(t){!t.get("legendhoverlink")&&h.push(t.id)}),dr(e.getdata(),function(a,o){var r=a.get("name");if(!this.newlinedisabled&&(""===r||"\n"===r))return void s.add(new cr({newline:!0}));var c=i.getseriesbyname(r)[0];if(!l.get(r))if(c){var d=c.getdata(),f=d.getvisual("color"),p=d.getvisual("bordercolor");"function"==typeof f&&(f=f(c.getdataparams(0))),"function"==typeof p&&(p=p(c.getdataparams(0)));var g=d.getvisual("legendsymbol")||"roundrect",m=d.getvisual("symbol"),v=this._createitem(r,o,a,e,g,m,t,f,p,u);v.on("click",tr(nx,r,n)).on("mouseover",tr(zx,c.name,null,n,h)).on("mouseout",tr(rx,c.name,null,n,h)),l.set(r,!0)}else i.eachrawseries(function(i){if(!l.get(r)&&i.legenddataprovider){var s=i.legenddataprovider(),c=s.indexofname(r);if(0>c)return;var d=s.getitemvisual(c,"color"),f=s.getitemvisual(c,"bordercolor"),p="roundrect",g=this._createitem(r,o,a,e,p,null,t,d,f,u);g.on("click",tr(nx,r,n)).on("mouseover",tr(zx,null,r,n,h)).on("mouseout",tr(rx,null,r,n,h)),l.set(r,!0)}},this)},this),a&&this._createselector(a,e,n,o,r)},_createselector:function(t,e,i){function n(t){var n=t.type,o=new ei({style:{x:0,y:0,align:"center",verticalalign:"middle"},onclick:function(){i.dispatchaction({type:"all"===n?"legendallselect":"legendinverseselect"})}});a.add(o);var r=e.getmodel("selectorlabel"),s=e.getmodel("emphasis.selectorlabel");ko(o.style,o.hoverstyle={},r,s,{defaulttext:t.title,isrecttext:!1}),to(o)}var a=this.getselectorgroup();dr(t,function(t){n(t)})},_createitem:function(t,e,i,n,a,o,s,l,u,h){var c=n.get("itemwidth"),d=n.get("itemheight"),f=n.get("inactivecolor"),p=n.get("inactivebordercolor"),g=n.get("symbolkeepaspect"),m=n.getmodel("itemstyle"),v=n.isselected(t),y=new cr,x=i.getmodel("textstyle"),_=i.get("icon"),w=i.getmodel("tooltip"),b=w.parentmodel;a=_||a;var s=eh(a,0,0,c,d,v?l:f,null==g?!0:g);if(y.add(ox(s,a,m,u,p,v)),!_&&o&&(o!==a||"none"===o)){var m=.8*d;"none"===o&&(o="circle");var i=eh(o,(c-m)/2,(d-m)/2,m,m,v?l:f,null==g?!0:g);y.add(ox(i,o,m,u,p,v))}var a="left"===s?c+5:-5,t=s,d=n.get("formatter"),c=t;"string"==typeof d&&d?c=d.replace("{name}",null!=t?t:""):"function"==typeof d&&(c=d(t)),y.add(new ei({style:oo({},x,{text:c,x:a,y:d/2,textfill:v?x.gettextcolor():f,textalign:t,textverticalalign:"middle"})}));var l=new qi({shape:y.getboundingrect(),invisible:!0,tooltip:w.get("show")?r({content:t,formatter:b.get("formatter",!0)||function(){return t},formatterparams:{componenttype:"legend",legendindex:n.componentindex,name:t,$vars:["name"]}},w.option):null});return y.add(l),y.eachchild(function(t){t.silent=!0}),l.silent=!h,this.getcontentgroup().add(y),to(y),y.__legenddataindex=e,y},layoutinner:function(t,e,i,n,a,o){var r=this.getcontentgroup(),s=this.getselectorgroup();wa(t.get("orient"),r,t.get("itemgap"),i.width,i.height);var l=r.getboundingrect(),u=[-l.x,-l.y];if(a){wa("horizontal",s,t.get("selectoritemgap",!0));var h=s.getboundingrect(),c=[-h.x,-h.y],d=t.get("selectorbuttongap",!0),f=t.getorient().index,p=0===f?"width":"height",g=0===f?"height":"width",m=0===f?"y":"x";"end"===o?c[f]+=l[p]+d:u[f]+=h[p]+d,c[1-f]+=l[g]/2-h[g]/2,s.attr("position",c),r.attr("position",u);var v={x:0,y:0};return v[p]=l[p]+d+h[p],v[g]=math.max(l[g],h[g]),v[m]=math.min(0,h[m]+c[1-f]),v}return r.attr("position",u),this.group.getboundingrect()},remove:function(){this.getcontentgroup().removeall(),this._isfirstrender=!0}}),kr=function(t){var e=t.findcomponents({maintype:"legend"});e&&e.length&&t.filterseries(function(t){for(var i=0;ii[a],f=[-h.x,-h.y];e||(f[n]=s.position[n]);var p=[0,0],g=[-c.x,-c.y],m=c(t.get("pagebuttongap",!0),t.get("itemgap",!0));if(d){var v=t.get("pagebuttonposition",!0);"end"===v?g[n]+=i[a]-c[a]:p[n]+=c[a]+m}g[1-n]+=h[o]/2-c[o]/2,s.attr("position",f),l.attr("position",p),u.attr("position",g);var y={x:0,y:0};if(y[a]=d?i[a]:h[a],y[o]=math.max(h[o],c[o]),y[r]=math.min(0,c[r]+g[1-n]),l.__rectsize=i[a],d){var x={x:0,y:0};x[a]=math.max(i[a]-c[a]-m,0),x[o]=y[o],l.setclippath(new qi({shape:x})),l.__rectsize=x[a]}else u.eachchild(function(t){t.attr({invisible:!0,silent:!0})});var _=this._getpageinfo(t);return null!=_.pageindex&&ho(s,{position:_.contentposition},d?t:!1),this._updatepageinfoview(t,_),y},_pagego:function(t,e,i){var n=this._getpageinfo(e)[t];null!=n&&i.dispatchaction({type:"legendscroll",scrolldataindex:n,legendid:e.id})},_updatepageinfoview:function(t,e){var i=this._controllergroup;f(["pageprev","pagenext"],function(n){var a=null!=e[n+"dataindex"],o=i.childofname(n);o&&(o.setstyle("fill",a?t.get("pageiconcolor",!0):t.get("pageiconinactivecolor",!0)),o.cursor=a?"pointer":"default")});var n=i.childofname("pagetext"),a=t.get("pageformatter"),o=e.pageindex,r=null!=o?o+1:0,s=e.pagecount;n&&a&&n.setstyle("text",b(a)?a.replace("{current}",r).replace("{total}",s):a({current:r,total:s}))},_getpageinfo:function(t){function e(t){if(t){var e=t.getboundingrect(),i=e[l]+t.position[r];return{s:i,e:i+e[s],i:t.__legenddataindex}}}function i(t,e){return t.e>=e&&t.s<=e+o}var n=t.get("scrolldataindex",!0),a=this.getcontentgroup(),o=this._containergroup.__rectsize,r=t.getorient().index,s=nr[r],l=zr[r],u=this._findtargetitemindex(n),h=a.children(),c=h[u],d=h.length,f=d?1:0,p={contentposition:a.position.slice(),pagecount:f,pageindex:f-1,pageprevdataindex:null,pagenextdataindex:null};if(!c)return p;var g=e(c);p.contentposition[r]=-g.s;for(var m=u+1,v=g,y=g,x=null;d>=m;++m)x=e(h[m]),(!x&&y.e>v.s+o||x&&!i(x,v.s))&&(v=y.i>v.i?y:x,v&&(null==p.pagenextdataindex&&(p.pagenextdataindex=v.i),++p.pagecount)),y=x;for(var m=u-1,v=g,y=g,x=null;m>=-1;--m)x=e(h[m]),x&&i(y,x.s)||!(v.i=0;){var l=a.indexof(r),u=a.substr(s+o.length,l-s-o.length);n["marker"+u]=u.indexof("sub")>-1?{textwidth:4,textheight:4,textborderradius:2,textbackgroundcolor:e[u],textoffset:[3,0]}:{textwidth:10,textheight:10,textborderradius:5,textbackgroundcolor:e[u]},a=a.substr(l+1),s=a.indexof("{marker")}this.el=new ei({style:{rich:n,text:t,textlineheight:20,textbackgroundcolor:i.get("backgroundcolor"),textborderradius:i.get("borderradius"),textfill:i.get("textstyle.color"),textpadding:i.get("padding")},z:i.get("z")}),this._zr.add(this.el);var h=this;this.el.on("mouseover",function(){h._enterable&&(cleartimeout(h._hidetimeout),h._show=!0),h._incontent=!0}),this.el.on("mouseout",function(){h._enterable&&h._show&&h.hidelater(h._hidedelay),h._incontent=!1})},setenterable:function(t){this._enterable=t},getsize:function(){var t=this.el.getboundingrect();return[t.width,t.height]},moveto:function(t,e){this.el&&this.el.attr("position",[t,e])},hide:function(){this.el&&this.el.hide(),this._show=!1},hidelater:function(t){!this._show||this._incontent&&this._enterable||(t?(this._hidedelay=t,this._show=!1,this._hidetimeout=settimeout(y(this.hide,this),t)):this.hide())},isshow:function(){return this._show},getoutersize:function(){var t=this.getsize();return{width:t[0],height:t[1]}}};var fr=y,wr=f,hr=hr,zr=new qi({shape:{x:-1,y:-1,width:2,height:2}});su({type:"tooltip",init:function(t,e){if(!hb.node){var i=t.getcomponent("tooltip"),n=i.get("rendermode");this._rendermode=ea(n);var a;"html"===this._rendermode?(a=new fx(e.getdom(),e),this._newline="
"):(a=new wx(e),this._newline="\n"),this._tooltipcontent=a}},render:function(t,e,i){if(!hb.node){this.group.removeall(),this._tooltipmodel=t,this._ecmodel=e,this._api=i,this._lastdatabycoordsys=null,this._alwaysshowcontent=t.get("alwaysshowcontent");var n=this._tooltipcontent;n.update(),n.setenterable(t.get("enterable")),this._initgloballistener(),this._keepshow()}},_initgloballistener:function(){var t=this._tooltipmodel,e=t.get("triggeron");xv("itemtooltip",this._api,fr(function(t,i,n){"none"!==e&&(e.indexof(t)>=0?this._tryshow(i,n):"leave"===t&&this._hide(n))},this))},_keepshow:function(){var t=this._tooltipmodel,e=this._ecmodel,i=this._api;if(null!=this._lastx&&null!=this._lasty&&"none"!==t.get("triggeron")){var n=this;cleartimeout(this._refreshupdatetimeout),this._refreshupdatetimeout=settimeout(function(){!i.isdisposed()&&n.manuallyshowtip(t,e,i,{x:n._lastx,y:n._lasty})})}},manuallyshowtip:function(t,e,i,n){if(n.from!==this.uid&&!hb.node){var a=zx(n,i);this._ticket="";var o=n.databycoordsys;if(n.tooltip&&null!=n.x&&null!=n.y){var r=zr;r.position=[n.x,n.y],r.update(),r.tooltip=n.tooltip,this._tryshow({offsetx:n.x,offsety:n.y,target:r},a)}else if(o)this._tryshow({offsetx:n.x,offsety:n.y,position:n.position,event:{},databycoordsys:n.databycoordsys,tooltipoption:n.tooltipoption},a);else if(null!=n.seriesindex){if(this._manuallyaxisshowtip(t,e,i,n))return;var s=az(n,e),l=s.point[0],u=s.point[1];null!=l&&null!=u&&this._tryshow({offsetx:l,offsety:u,position:n.position,target:s.el,event:{}},a)}else null!=n.x&&null!=n.y&&(i.dispatchaction({type:"updateaxispointer",x:n.x,y:n.y}),this._tryshow({offsetx:n.x,offsety:n.y,position:n.position,target:i.getzr().findhover(n.x,n.y).target,event:{}},a))}},manuallyhidetip:function(t,e,i,n){var a=this._tooltipcontent;!this._alwaysshowcontent&&this._tooltipmodel&&a.hidelater(this._tooltipmodel.get("hidedelay")),this._lastx=this._lasty=null,n.from!==this.uid&&this._hide(zx(n,i))},_manuallyaxisshowtip:function(t,e,i,n){var a=n.seriesindex,o=n.dataindex,r=e.getcomponent("axispointer").coordsysaxesinfo;if(null!=a&&null!=o&&null!=r){var s=e.getseriesbyindex(a);if(s){var l=s.getdata(),t=hx([l.getitemmodel(o),s,(s.coordinatesystem||{}).model,t]);if("axis"===t.get("trigger"))return i.dispatchaction({type:"updateaxispointer",seriesindex:a,dataindex:o,position:n.position}),!0}}},_tryshow:function(t,e){var i=t.target,n=this._tooltipmodel;if(n){this._lastx=t.offsetx,this._lasty=t.offsety;var a=t.databycoordsys;a&&a.length?this._showaxistooltip(a,t):i&&null!=i.dataindex?(this._lastdatabycoordsys=null,this._showseriesitemtooltip(t,i,e)):i&&i.tooltip?(this._lastdatabycoordsys=null,this._showcomponentitemtooltip(t,i,e)):(this._lastdatabycoordsys=null,this._hide(e))}},_showormove:function(t,e){var i=t.get("showdelay");e=y(e,this),cleartimeout(this._showtimout),i>0?this._showtimout=settimeout(e,i):e()},_showaxistooltip:function(t,e){var i=this._ecmodel,n=this._tooltipmodel,o=[e.offsetx,e.offsety],r=[],s=[],l=hx([e.tooltipoption,n]),u=this._rendermode,h=this._newline,c={};wr(t,function(t){wr(t.databyaxis,function(t){var e=i.getcomponent(t.axisdim+"axis",t.axisindex),n=t.value,o=[];if(e&&null!=n){var l=sy(n,e.axis,i,t.seriesdataindices,t.valuelabelopt);f(t.seriesdataindices,function(r){var h=i.getseriesbyindex(r.seriesindex),d=r.dataindexinside,f=h&&h.getdataparams(d);if(f.axisdim=t.axisdim,f.axisindex=t.axisindex,f.axistype=t.axistype,f.axisid=t.axisid,f.axisvalue=kh(e.axis,n),f.axisvaluelabel=l,f){s.push(f);var p,g=h.formattooltip(d,!0,null,u);if(s(g)){p=g.html;var m=g.markers;a(c,m)}else p=g;o.push(p)}});var d=l;r.push("html"!==u?o.join(h):(d?dr(d)+h:"")+o.join(h))}})},this),r.reverse(),r=r.join(this._newline+this._newline);var d=e.position;this._showormove(l,function(){this._updatecontentnotchangedonaxis(t)?this._updateposition(l,d,o[0],o[1],this._tooltipcontent,s):this._showtooltipcontent(l,r,s,math.random(),o[0],o[1],d,void 0,c)})},_showseriesitemtooltip:function(t,e,i){var n=this._ecmodel,a=e.seriesindex,o=n.getseriesbyindex(a),r=e.datamodel||o,s=e.dataindex,l=e.datatype,u=r.getdata(),h=hx([u.getitemmodel(s),r,o&&(o.coordinatesystem||{}).model,this._tooltipmodel]),c=h.get("trigger");if(null==c||"item"===c){var d,f,p=r.getdataparams(s,l),g=r.formattooltip(s,!1,l,this._rendermode);s(g)?(d=g.html,f=g.markers):(d=g,f=null);var m="item_"+r.name+"_"+s;this._showormove(h,function(){this._showtooltipcontent(h,d,p,m,t.offsetx,t.offsety,t.position,t.target,f)}),i({type:"showtip",dataindexinside:s,dataindex:u.getrawindex(s),seriesindex:a,from:this.uid})}},_showcomponentitemtooltip:function(t,e,i){var n=e.tooltip;if("string"==typeof n){var a=n;n={content:a,formatter:a}}var o=new ir(n,this._tooltipmodel,this._ecmodel),r=o.get("content"),s=math.random();this._showormove(o,function(){this._showtooltipcontent(o,r,o.get("formatterparams")||{},s,t.offsetx,t.offsety,t.position,e)}),i({type:"showtip",from:this.uid})},_showtooltipcontent:function(t,e,i,n,a,o,r,s,l){if(this._ticket="",t.get("showcontent")&&t.get("show")){var u=this._tooltipcontent,h=t.get("formatter");r=r||t.get("position");var c=e;if(h&&"string"==typeof h)c=cr(h,i,!0);else if("function"==typeof h){var d=fr(function(e,n){e===this._ticket&&(u.setcontent(n,l,t),this._updateposition(t,r,a,o,u,i,s))},this);this._ticket=n,c=h(i,n,d)}u.setcontent(c,l,t),u.show(t),this._updateposition(t,r,a,o,u,i,s)}},_updateposition:function(t,e,i,n,a,o,r){var s=this._api.getwidth(),l=this._api.getheight();e=e||t.get("position");var u=a.getsize(),h=t.get("align"),c=t.get("verticalalign"),d=r&&r.getboundingrect().clone();if(r&&d.applytransform(r.transform),"function"==typeof e&&(e=e([i,n],o,a.el,d,{viewsize:[s,l],contentsize:u.slice()})),_(e))i=hr(e[0],s),n=hr(e[1],l);else if(s(e)){e.width=u[0],e.height=u[1];var f=vr(e,{width:s,height:l});i=f.x,n=f.y,h=null,c=null}else if("string"==typeof e&&r){var p=yx(e,d,u);i=p[0],n=p[1]}else{var p=xx(i,n,a,s,l,h?null:20,c?null:20);i=p[0],n=p[1]}if(h&&(i-=jx(h)?u[0]/2:"right"===h?u[0]:0),c&&(n-=jx(c)?u[1]/2:"bottom"===c?u[1]:0),t.get("confine")){var p=ux(i,n,a,s,l);i=p[0],n=p[1]}a.moveto(i,n)},_updatecontentnotchangedonaxis:function(t){var e=this._lastdatabycoordsys,i=!!e&&e.length===t.length;return i&&wr(e,function(e,n){var a=e.databyaxis||{},o=t[n]||{},r=o.databyaxis||[];i&=a.length===r.length,i&&wr(a,function(t,e){var n=r[e]||{},a=t.seriesdataindices||[],o=n.seriesdataindices||[];i&=t.value===n.value&&t.axistype===n.axistype&&t.axisid===n.axisid&&a.length===o.length,i&&wr(a,function(t,e){var n=o[e];i&=t.seriesindex===n.seriesindex&&t.dataindex===n.dataindex})})}),this._lastdatabycoordsys=t,!!i},_hide:function(t){this._lastdatabycoordsys=null,t({type:"hidetip",from:this.uid})},dispose:function(t,e){hb.node||(this._tooltipcontent.hide(),$v("itemtooltip",e))}}),gu({type:"showtip",event:"showtip",update:"tooltip:manuallyshowtip"},function(){}),gu({type:"hidetip",event:"hidetip",update:"tooltip:manuallyhidetip"},function(){});var xr=ar,ur=dr,yr=bu({type:"marker",dependencies:["series","grid","polar","geo"],init:function(t,e,i){this.mergedefaultandtheme(t,i),this._mergeoption(t,i,!1,!0) },isanimationenabled:function(){if(hb.node)return!1;var t=this.__hostseries;return this.getshallow("animation")&&t&&t.isanimationenabled()},mergeoption:function(t,e){this._mergeoption(t,e,!1,!1)},_mergeoption:function(t,e,i,n){var a=this.constructor,o=this.maintype+"model";i||e.eachseries(function(t){var i=t.get(this.maintype,!0),s=t[o];return i&&i.data?(s?s._mergeoption(i,e,!0):(n&&qx(i),f(i.data,function(t){t instanceof array?(qx(t[0]),qx(t[1])):qx(t)}),s=new a(i,this,e),r(s,{maintype:this.maintype,seriesindex:t.seriesindex,name:t.name,createdbyself:!0}),s.__hostseries=t),void(t[o]=s)):void(t[o]=null)},this)},formattooltip:function(t){var e=this.getdata(),i=this.getrawvalue(t),n=_(i)?p(i,xr).join(", "):xr(i),a=e.getname(t),o=ur(this.name);return(null!=i||a)&&(o+="
"),a&&(o+=ur(a),null!=i&&(o+=" : ")),null!=i&&(o+=ur(n)),o},getdata:function(){return this._data},setdata:function(t){this._data=t}});c(yr,dt),yr.extend({type:"markpoint",defaultoption:{zlevel:0,z:5,symbol:"pin",symbolsize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemstyle:{borderwidth:2},emphasis:{label:{show:!0}}}});var jr=u,qr=x,kr={min:qr(jx,"min"),max:qr(jx,"max"),average:qr(jx,"average")},$r=su({type:"marker",init:function(){this.markergroupmap=b()},render:function(t,e,i){var n=this.markergroupmap;n.each(function(t){t.__keep=!1});var a=this.type+"model";e.eachseries(function(t){var n=t[a];n&&this.renderseries(t,n,e,i)},this),n.each(function(t){!t.__keep&&this.group.remove(t.group)},this)},renderseries:function(){}});$r.extend({type:"markpoint",updatetransform:function(t,e,i){e.eachseries(function(t){var e=t.markpointmodel;e&&(o_(e.getdata(),t,i),this.markergroupmap.get(t.id).updatelayout(e))},this)},renderseries:function(t,e,i,n){var a=t.coordinatesystem,o=t.id,r=t.getdata(),s=this.markergroupmap,l=s.get(o)||s.set(o,new nd),u=r_(a,t,e);e.setdata(u),o_(e.getdata(),t,n),u.each(function(t){var i=u.getitemmodel(t),n=i.getshallow("symbol"),a=i.getshallow("symbolsize"),o=w(n),s=w(a);if(o||s){var l=e.getrawvalue(t),h=e.getdataparams(t);o&&(n=n(l,h)),s&&(a=a(l,h))}u.setitemvisual(t,{symbol:n,symbolsize:a,color:i.get("itemstyle.color")||r.getvisual("color")})}),l.updatedata(u),this.group.add(l.group),u.eachitemgraphicel(function(t){t.traverse(function(t){t.datamodel=e})}),l.__keep=!0,l.group.silent=e.get("silent")||t.get("silent")}}),du(function(t){t.markpoint=t.markpoint||{}}),yr.extend({type:"markline",defaultoption:{zlevel:0,z:5,symbol:["circle","arrow"],symbolsize:[8,16],precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end"},linestyle:{type:"dashed"},emphasis:{label:{show:!0},linestyle:{width:3}},animationeasing:"linear"}});var jr=function(t,e,i,o){var s=t.getdata(),l=o.type;if(!_(o)&&("min"===l||"max"===l||"average"===l||"median"===l||null!=o.xaxis||null!=o.yaxis)){var u,h;if(null!=o.yaxis||null!=o.xaxis)u=e.getaxis(null!=o.yaxis?"y":"x"),h=d(o.yaxis,o.xaxis);else{var c=t_(o,s,e,t);u=c.valueaxis;var d=th(s,c.valuedatadim);h=a_(s,d,l)}var f="x"===u.dim?0:1,p=1-f,g=n(o),m={};g.type=null,g.coord=[],m.coord=[],g.coord[p]=-1/0,m.coord[p]=1/0;var v=i.get("precision");v>=0&&"number"==typeof h&&(h=+h.tofixed(math.min(v,20))),g.coord[f]=m.coord[f]=h,o=[g,m,{type:l,valueindex:o.valueindex,value:h}]}return o=[qx(t,o[0]),qx(t,o[1]),r({},o[2])],o[2].type=o[2].type||"",a(o[2],o[0]),a(o[2],o[1]),o};$r.extend({type:"markline",updatetransform:function(t,e,i){e.eachseries(function(t){var e=t.marklinemodel;if(e){var n=e.getdata(),a=e.__from,o=e.__to;a.each(function(e){h_(a,e,!0,t,i),h_(o,e,!1,t,i)}),n.each(function(t){n.setitemlayout(t,[a.getitemlayout(t),o.getitemlayout(t)])}),this.markergroupmap.get(t.id).updatelayout()}},this)},renderseries:function(t,e,i,n){function a(e,i,a){var o=e.getitemmodel(i);h_(e,i,a,t,n),e.setitemvisual(i,{symbolsize:o.get("symbolsize")||g[a?0:1],symbol:o.get("symbol",!0)||p[a?0:1],color:o.get("itemstyle.color")||s.getvisual("color")})}var o=t.coordinatesystem,r=t.id,s=t.getdata(),l=this.markergroupmap,u=l.get(r)||l.set(r,new mg);this.group.add(u.group);var h=c_(o,t,e),c=h.from,d=h.to,f=h.line;e.__from=c,e.__to=d,e.setdata(f);var p=e.get("symbol"),g=e.get("symbolsize");_(p)||(p=[p,p]),"number"==typeof g&&(g=[g,g]),h.from.each(function(t){a(c,t,!0),a(d,t,!1)}),f.each(function(t){var e=f.getitemmodel(t).get("linestyle.color");f.setitemvisual(t,{color:e||c.getitemvisual(t,"color")}),f.setitemlayout(t,[c.getitemlayout(t),d.getitemlayout(t)]),f.setitemvisual(t,{fromsymbolsize:c.getitemvisual(t,"symbolsize"),fromsymbol:c.getitemvisual(t,"symbol"),tosymbolsize:d.getitemvisual(t,"symbolsize"),tosymbol:d.getitemvisual(t,"symbol")})}),u.updatedata(f),h.line.eachitemgraphicel(function(t){t.traverse(function(t){t.datamodel=e})}),u.__keep=!0,u.group.silent=e.get("silent")||t.get("silent")}}),du(function(t){t.markline=t.markline||{}}),yr.extend({type:"markarea",defaultoption:{zlevel:0,z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemstyle:{borderwidth:0},emphasis:{label:{show:!0,position:"top"}}}});var qr=function(t,e,i,n){var a=qx(t,n[0]),r=qx(t,n[1]),s=d,l=a.coord,u=r.coord;l[0]=s(l[0],-1/0),l[1]=s(l[1],-1/0),u[0]=s(u[0],1/0),u[1]=s(u[1],1/0);var h=o([{},a,r]);return h.coord=[a.coord,r.coord],h.x0=a.x,h.y0=a.y,h.x1=r.x,h.y1=r.y,h},te=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]];$r.extend({type:"markarea",updatetransform:function(t,e,i){e.eachseries(function(t){var e=t.markareamodel;if(e){var n=e.getdata();n.each(function(e){var a=p(te,function(a){return g_(n,e,a,t,i)});n.setitemlayout(e,a);var o=n.getitemgraphicel(e);o.setshape("points",a)})}},this)},renderseries:function(t,e,i,n){var a=t.coordinatesystem,o=t.id,r=t.getdata(),l=this.markergroupmap,u=l.get(o)||l.set(o,{group:new ss});this.group.add(u.group),u.__keep=!0;var h=m_(a,t,e);e.setdata(h),h.each(function(e){h.setitemlayout(e,p(te,function(i){return g_(h,e,i,t,n)})),h.setitemvisual(e,{color:r.getvisual("color")})}),h.diff(u.__data).add(function(t){var e=new xi({shape:{points:h.getitemlayout(t)}});h.setitemgraphicel(t,e),u.group.add(e)}).update(function(t,i){var n=u.__data.getitemgraphicel(i);ho(n,{shape:{points:h.getitemlayout(t)}},e,t),u.group.add(n),h.setitemgraphicel(t,n)}).remove(function(t){var e=u.__data.getitemgraphicel(t);u.group.remove(e)}).execute(),h.eachitemgraphicel(function(t,i){var n=h.getitemmodel(i),a=n.getmodel("label"),o=n.getmodel("emphasis.label"),r=h.getitemvisual(i,"color");t.usestyle(s(n.getmodel("itemstyle").getitemstyle(),{fill:ni(r,.4),stroke:r})),t.hoverstyle=n.getmodel("emphasis.itemstyle").getitemstyle(),ko(t.style,t.hoverstyle,a,o,{labelfetcher:e,labeldataindex:i,defaulttext:h.getname(i)||"",isrecttext:!0,autocolor:r}),to(t,{}),t.datamodel=e}),u.__data=h,u.group.silent=e.get("silent")||t.get("silent")}}),du(function(t){t.markarea=t.markarea||{}});var ee=function(t){var e=t&&t.timeline;_(e)||(e=e?[e]:[]),f(e,function(t){t&&v_(t)})};xa.registersubtypedefaulter("timeline",function(){return"slider"}),gu({type:"timelinechange",event:"timelinechanged",update:"prepareandupdate"},function(t,e){var i=e.getcomponent("timeline");return i&&null!=t.currentindex&&(i.setcurrentindex(t.currentindex),!i.get("loop",!0)&&i.isindexmax()&&i.setplaystate(!1)),e.resetoption("timeline"),s({currentindex:i.option.currentindex},t)}),gu({type:"timelineplaychange",event:"timelineplaychanged",update:"update"},function(t,e){var i=e.getcomponent("timeline");i&&null!=t.playstate&&i.setplaystate(t.playstate)});var ie=xa.extend({type:"timeline",layoutmode:"box",defaultoption:{zlevel:0,z:4,show:!0,axistype:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlposition:"left",autoplay:!1,rewind:!1,loop:!0,playinterval:2e3,currentindex:0,itemstyle:{},label:{color:"#000"},data:[]},init:function(t,e,i){this._data,this._names,this.mergedefaultandtheme(t,i),this._initdata()},mergeoption:function(){ie.superapply(this,"mergeoption",arguments),this._initdata()},setcurrentindex:function(t){null==t&&(t=this.option.currentindex);var e=this._data.count();this.option.loop?t=(t%e+e)%e:(t>=e&&(t=e-1),0>t&&(t=0)),this.option.currentindex=t},getcurrentindex:function(){return this.option.currentindex},isindexmax:function(){return this.getcurrentindex()>=this._data.count()-1},setplaystate:function(t){this.option.autoplay=!!t},getplaystate:function(){return!!this.option.autoplay},_initdata:function(){var t=this.option,e=t.data||[],i=t.axistype,a=this._names=[];if("category"===i){var o=[];f(e,function(t,e){var i,r=wn(t);s(t)?(i=n(t),i.value=e):i=e,o.push(i),b(r)||null!=r&&!isnan(r)||(r=""),a.push(r+"")}),e=o}var r={category:"ordinal",time:"time"}[i]||"number",s=this._data=new gc([{name:"value",type:r}],this);s.initdata(e,a)},getdata:function(){return this._data},getcategories:function(){return"category"===this.get("axistype")?this._names.slice():void 0}}),ne=ie.extend({type:"timeline.slider",defaultoption:{backgroundcolor:"rgba(0,0,0,0)",bordercolor:"#ccc",borderwidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"emptycircle",symbolsize:10,linestyle:{show:!0,width:2,color:"#304654"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#304654"},itemstyle:{color:"#304654",borderwidth:1},checkpointstyle:{symbol:"circle",symbolsize:13,color:"#c23531",borderwidth:5,bordercolor:"rgba(194,53,49, 0.5)",animation:!0,animationduration:300,animationeasing:"quinticinout"},controlstyle:{show:!0,showplaybtn:!0,showprevbtn:!0,shownextbtn:!0,itemsize:22,itemgap:12,position:"left",playicon:"path://m31.6,53c17.5,53,6,41.5,6,27.4s17.5,1.8,31.6,1.8c45.7,1.8,57.2,13.3,57.2,27.4s45.7,53,31.6,53z m31.6,3.3 c18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1c44.9,51.5,55.7,40.7,55.7,27.4c55.7,14.1,44.9,3.3,31.6,3.3z m24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2v21.3z",stopicon:"path://m30.9,53.2c16.8,53.2,5.3,41.7,5.3,27.6s16.8,2,30.9,2c45,2,56.4,13.5,56.4,27.6s45,53.2,30.9,53.2z m30.9,3.5c17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1c44.2,51.7,55,40.9,55,27.6c54.9,14.4,44.1,3.5,30.9,3.5z m36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1v19.5c0-0.6,0.4-1,0.9-1h36c0.5,0,0.9,0.4,0.9,1v35.8z m27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1v19.5c0-0.6,0.4-1,0.9-1h27c0.5,0,0.9,0.4,0.9,1l27.8,35.8l27.8,35.8z",nexticon:"path://m18.6,50.8l22.5-22.5c0.2-0.2,0.3-0.4,0.3-0.7c0-0.3-0.1-0.5-0.3-0.7l18.7,4.4c-0.1-0.1-0.2-0.3-0.2-0.5 c0-0.4,0.3-0.8,0.8-0.8c0.2,0,0.5,0.1,0.6,0.3l23.5,23.5l0,0c0.2,0.2,0.3,0.4,0.3,0.7c0,0.3-0.1,0.5-0.3,0.7l-0.1,0.1l19.7,52 c-0.1,0.1-0.3,0.2-0.5,0.2c-0.4,0-0.8-0.3-0.8-0.8c18.4,51.2,18.5,51,18.6,50.8z",previcon:"path://m43,52.8l20.4,30.3c-0.2-0.2-0.3-0.4-0.3-0.7c0-0.3,0.1-0.5,0.3-0.7l42.9,6.4c0.1-0.1,0.2-0.3,0.2-0.5 c0-0.4-0.3-0.8-0.8-0.8c-0.2,0-0.5,0.1-0.6,0.3l18.3,28.8l0,0c-0.2,0.2-0.3,0.4-0.3,0.7c0,0.3,0.1,0.5,0.3,0.7l0.1,0.1l41.9,54 c0.1,0.1,0.3,0.2,0.5,0.2c0.4,0,0.8-0.3,0.8-0.8c43.2,53.2,43.1,53,43,52.8z",color:"#304654",bordercolor:"#304654",borderwidth:1},emphasis:{label:{show:!0,color:"#c23531"},itemstyle:{color:"#c23531"},controlstyle:{color:"#c23531",bordercolor:"#c23531",borderwidth:2}},data:[]}});c(ne,dt);var ae=ot.extend({type:"timeline"}),oe=function(t,e,i,n){ul.call(this,t,e,i),this.type=n||"value",this.model=null};oe.prototype={constructor:oe,getlabelmodel:function(){return this.model.getmodel("label")},ishorizontal:function(){return"horizontal"===this.model.get("orient")}},h(oe,ul);var re=y,se=f,le=math.pi;ae.extend({type:"timeline.slider",init:function(t,e){this.api=e,this._axis,this._viewrect,this._timer,this._currentpointer,this._maingroup,this._labelgroup},render:function(t,e,i){if(this.model=t,this.api=i,this.ecmodel=e,this.group.removeall(),t.get("show",!0)){var n=this._layout(t,i),a=this._creategroup("maingroup"),o=this._creategroup("labelgroup"),r=this._axis=this._createaxis(n,t);t.formattooltip=function(t){return dr(r.scale.getlabel(t))},se(["axisline","axistick","control","currentpointer"],function(e){this["_render"+e](n,a,r,t)},this),this._renderaxislabel(n,o,r,t),this._position(n,t)}this._doplaystop()},remove:function(){this._cleartimer(),this.group.removeall()},dispose:function(){this._cleartimer()},_layout:function(t,e){var i=t.get("label.position"),n=t.get("orient"),a=__(t,e);null==i||"auto"===i?i="horizontal"===n?a.y+a.height/2=0||"+"===i?"left":"right"},r={horizontal:i>=0||"+"===i?"top":"bottom",vertical:"middle"},s={horizontal:0,vertical:le/2},l="vertical"===n?a.height:a.width,u=t.getmodel("controlstyle"),h=u.get("show",!0),c=h?u.get("itemsize"):0,d=h?u.get("itemgap"):0,f=c+d,p=t.get("label.rotate")||0;p=p*le/180;var g,m,v,y,x=u.get("position",!0),_=h&&u.get("showplaybtn",!0),w=h&&u.get("showprevbtn",!0),b=h&&u.get("shownextbtn",!0),s=0,m=l;return"left"===x||"bottom"===x?(_&&(g=[0,0],s+=f),w&&(m=[s,0],s+=f),b&&(v=[m-c,0],m-=f)):(_&&(g=[m-c,0],m-=f),w&&(m=[0,0],s+=f),b&&(v=[m-c,0],m-=f)),y=[s,m],t.get("inverse")&&y.reverse(),{viewrect:a,mainlength:l,orient:n,rotation:s[n],labelrotation:p,labelposopt:i,labelalign:t.get("label.align")||o[n],labelbaseline:t.get("label.verticalalign")||t.get("label.baseline")||r[n],playposition:g,prevbtnposition:m,nextbtnposition:v,axisextent:y,controlsize:c,controlgap:d}},_position:function(t){function e(t){var e=t.position;t.origin=[h[0][0]-e[0],h[1][0]-e[1]]}function i(t){return[[t.x,t.x+t.width],[t.y,t.y+t.height]]}function n(t,e,i,n,a){t[n]+=i[n][a]-e[n][a]}var a=this._maingroup,o=this._labelgroup,r=t.viewrect;if("vertical"===t.orient){var s=de(),l=r.x,u=r.y+r.height;pe(s,s,[-l,-u]),oe(s,s,-le/2),pe(s,s,[l,u]),r=r.clone(),r.applytransform(s)}var h=i(r),c=i(a.getboundingrect()),d=i(o.getboundingrect()),f=a.position,p=o.position;p[0]=f[0]=h[0][0];var g=t.labelposopt;if(isnan(g)){var m="+"===g?0:1;n(f,c,h,1,m),n(p,d,h,1,1-m)}else{var m=g>=0?0:1;n(f,c,h,1,m),p[1]=f[1]+g}a.attr("position",f),o.attr("position",p),a.rotation=o.rotation=t.rotation,e(a),e(o)},_createaxis:function(t,e){var i=e.getdata(),n=e.get("axistype"),a=dh(e,n);a.getticks=function(){return i.maparray(["value"],function(t){return t})};var o=i.getdataextent("value");a.setextent(o[0],o[1]),a.niceticks();var r=new oe("value",a,t.axisextent,n);return r.model=e,r},_creategroup:function(t){var e=this["_"+t]=new ss;return this.group.add(e),e},_renderaxisline:function(t,e,i,n){var a=i.getextent();n.get("linestyle.show")&&e.add(new $i({shape:{x1:a[0],y1:0,x2:a[1],y2:0},style:r({linecap:"round"},n.getmodel("linestyle").getlinestyle()),silent:!0,z2:1}))},_renderaxistick:function(t,e,i,n){var a=n.getdata(),o=i.scale.getticks();se(o,function(t){var o=i.datatocoord(t),r=a.getitemmodel(t),s=r.getmodel("itemstyle"),l=r.getmodel("emphasis.itemstyle"),u={position:[o,0],onclick:re(this._changetimeline,this,t)},h=b_(r,s,e,u);to(h,l.getitemstyle()),r.get("tooltip")?(h.dataindex=t,h.datamodel=n):h.dataindex=h.datamodel=null},this)},_renderaxislabel:function(t,e,i,n){var a=i.getlabelmodel();if(a.get("show")){var o=n.getdata(),r=i.getviewlabels();se(r,function(n){var a=n.tickvalue,r=o.getitemmodel(a),s=r.getmodel("label"),l=r.getmodel("emphasis.label"),u=i.datatocoord(n.tickvalue),h=new ei({position:[u,0],rotation:t.labelrotation-t.rotation,onclick:re(this._changetimeline,this,a),silent:!1});oo(h.style,s,{text:n.formattedlabel,textalign:t.labelalign,textverticalalign:t.labelbaseline}),e.add(h),to(h,oo({},l))},this)}},_rendercontrol:function(t,e,i,n){function a(t,i,a,h){if(t){var c={position:t,origin:[o/2,0],rotation:h?-r:0,recthover:!0,style:s,onclick:a},d=w_(n,i,u,c);e.add(d),to(d,l)}}var o=t.controlsize,r=t.rotation,s=n.getmodel("controlstyle").getitemstyle(),l=n.getmodel("emphasis.controlstyle").getitemstyle(),u=[0,-o/2,o,o],h=n.getplaystate(),c=n.get("inverse",!0);a(t.nextbtnposition,"controlstyle.nexticon",re(this._changetimeline,this,c?"-":"+")),a(t.prevbtnposition,"controlstyle.previcon",re(this._changetimeline,this,c?"+":"-")),a(t.playposition,"controlstyle."+(h?"stopicon":"playicon"),re(this._handleplayclick,this,!h),!0)},_rendercurrentpointer:function(t,e,i,n){var a=n.getdata(),o=n.getcurrentindex(),r=a.getitemmodel(o).getmodel("checkpointstyle"),s=this,l={oncreate:function(t){t.draggable=!0,t.drift=re(s._handlepointerdrag,s),t.ondragend=re(s._handlepointerdragend,s),s_(t,o,i,n,!0)},onupdate:function(t){s_(t,o,i,n)}};this._currentpointer=b_(r,r,this._maingroup,{},this._currentpointer,l)},_handleplayclick:function(t){this._cleartimer(),this.api.dispatchaction({type:"timelineplaychange",playstate:t,from:this.uid})},_handlepointerdrag:function(t,e,i){this._cleartimer(),this._pointerchangetimeline([i.offsetx,i.offsety])},_handlepointerdragend:function(t){this._pointerchangetimeline([t.offsetx,t.offsety],!0)},_pointerchangetimeline:function(t,e){var i=this._toaxiscoord(t)[0],n=this._axis,a=dr(n.getextent().slice());i>a[1]&&(i=a[1]),is&&(n=s,e=o)}),e},_cleartimer:function(){this._timer&&(cleartimeout(this._timer),this._timer=null)},_changetimeline:function(t){var e=this.model.getcurrentindex();"+"===t?t=e+1:"-"===t&&(t=e-1),this.api.dispatchaction({type:"timelinechange",currentindex:t,from:this.uid})}}),du(ee),xa.registersubtypedefaulter("datazoom",function(){return"slider"});var ue=["x","y","z","radius","angle","single"],he=["cartesian2d","polar","singleaxis"],ce=i_(ue,["axisindex","axis","index","id"]),de=f,fe=dr,pe=function(t,e,i,n){this._dimname=t,this._axisindex=e,this._valuewindow,this._percentwindow,this._dataextent,this._minmaxspan,this.ecmodel=n,this._datazoommodel=i};pe.prototype={constructor:pe,hostedby:function(t){return this._datazoommodel===t},getdatavaluewindow:function(){return this._valuewindow.slice()},getdatapercentwindow:function(){return this._percentwindow.slice()},gettargetseriesmodels:function(){var t=[],e=this.ecmodel;return e.eachseries(function(i){if(m_(i.get("coordinatesystem"))){var n=this._dimname,a=e.querycomponents({maintype:n+"axis",index:i.get(n+"axisindex"),id:i.get(n+"axisid")})[0];this._axisindex===(a&&a.componentindex)&&t.push(i)}},this),t},getaxismodel:function(){return this.ecmodel.getcomponent(this._dimname+"axis",this._axisindex)},getotheraxismodel:function(){var t,e,i=this._dimname,n=this.ecmodel,a=this.getaxismodel(),o="x"===i||"y"===i;o?(e="gridindex",t="x"===i?"y":"x"):(e="polarindex",t="angle"===i?"radius":"angle");var r;return n.eachcomponent(t+"axis",function(t){(t.get(e)||0)===(a.get(e)||0)&&(r=t)}),r},getminmaxspan:function(){return n(this._minmaxspan)},calculatedatawindow:function(t){function e(t,e,i,n,a){var r=a?"span":"valuespan";dn(0,t,i,"all",h["min"+r],h["max"+r]);for(var s=0;2>s;s++)e[s]=ur(t[s],i,n,!0),a&&(e[s]=o.parse(e[s]))}var i,n=this._dataextent,a=this.getaxismodel(),o=a.axis.scale,r=this._datazoommodel.getrangepropmode(),s=[0,100],l=[],u=[];de(["start","end"],function(e,a){var h=t[e],c=t[e+"value"];"percent"===r[a]?(null==h&&(h=s[a]),c=o.parse(ur(h,s,n))):(i=!0,c=null==c?n[a]:o.parse(c),h=ur(c,n,s)),u[a]=c,l[a]=h}),fe(u),fe(l);var h=this._minmaxspan;return i?e(u,l,n,s,!1):e(l,u,s,n,!0),{valuewindow:u,percentwindow:l}},reset:function(t){if(t===this._datazoommodel){var e=this.gettargetseriesmodels();this._dataextent=t_(this,this._dimname,e),l_(this);var i=this.calculatedatawindow(t.settledoption);this._valuewindow=i.valuewindow,this._percentwindow=i.percentwindow,c_(this)}},restore:function(t){t===this._datazoommodel&&(this._valuewindow=this._percentwindow=null,c_(this,!0))},filterdata:function(t){function e(t){return t>=o[0]&&t<=o[1]}if(t===this._datazoommodel){var i=this._dimname,n=this.gettargetseriesmodels(),a=t.get("filtermode"),o=this._valuewindow;"none"!==a&&de(n,function(t){var n=t.getdata(),r=n.mapdimension(i,!0);r.length&&("weakfilter"===a?n.filterself(function(t){for(var e,i,a,s=0;so[1];if(u&&!h&&!c)return!0;u&&(a=!0),h&&(e=!0),c&&(i=!0)}return a&&e&&i}):de(r,function(i){if("empty"===a)t.setdata(n=n.map(i,function(t){return e(t)?t:0/0}));else{var r={};r[i]=o,n.selectrange(r)}}),de(r,function(t){n.setapproximateextent(o,t)}))})}}};var ge=f,me=ce,ve=bu({type:"datazoom",dependencies:["xaxis","yaxis","zaxis","radiusaxis","angleaxis","singleaxis","series"],defaultoption:{zlevel:0,z:4,orient:null,xaxisindex:null,yaxisindex:null,filtermode:"filter",throttle:null,start:0,end:100,startvalue:null,endvalue:null,minspan:null,maxspan:null,minvaluespan:null,maxvaluespan:null,rangemode:null},init:function(t,e,i){this._dataintervalbyaxis={},this._datainfo={},this._axisproxies={},this.textstylemodel,this._autothrottle=!0,this._rangepropmode=["percent","percent"];var n=k_(t);this.settledoption=n,this.mergedefaultandtheme(t,i),this.doinit(n)},mergeoption:function(t){var e=k_(t);a(this.option,t,!0),a(this.settledoption,e,!0),this.doinit(e)},doinit:function(t){var e=this.option;hb.canvassupported||(e.realtime=!1),this._setdefaultthrottle(t),p_(this,t);var i=this.settledoption;ge([["start","startvalue"],["end","endvalue"]],function(t,n){"value"===this._rangepropmode[n]&&(e[t[0]]=i[t[0]]=null)},this),this.textstylemodel=this.getmodel("textstyle"),this._resettarget(),this._giveaxisproxies()},_giveaxisproxies:function(){var t=this._axisproxies;this.eachtargetaxis(function(e,i,n,a){var o=this.dependentmodels[e.axis][i],r=o.__dzaxisproxy||(o.__dzaxisproxy=new pe(e.name,i,this,a));t[e.name+"_"+i]=r},this)},_resettarget:function(){var t=this.option,e=this._judgeautomode();me(function(e){var i=e.axisindex;t[i]=gn(t[i])},this),"axisindex"===e?this._autosetaxisindex():"orient"===e&&this._autosetorient()},_judgeautomode:function(){var t=this.option,e=!1;me(function(i){null!=t[i.axisindex]&&(e=!0)},this);var i=t.orient;return null==i&&e?"orient":e?void 0:(null==i&&(t.orient="horizontal"),"axisindex")},_autosetaxisindex:function(){var t=!0,e=this.get("orient",!0),i=this.option,n=this.dependentmodels;if(t){var a="vertical"===e?"y":"x";n[a+"axis"].length?(i[a+"axisindex"]=[0],t=!1):ge(n.singleaxis,function(n){t&&n.get("orient",!0)===e&&(i.singleaxisindex=[n.componentindex],t=!1)})}t&&me(function(e){if(t){var n=[],a=this.dependentmodels[e.axis];if(a.length&&!n.length)for(var o=0,r=a.length;r>o;o++)"category"===a[o].get("type")&&n.push(o);i[e.axisindex]=n,n.length&&(t=!1)}},this),t&&this.ecmodel.eachseries(function(t){this._isserieshasallaxestypeof(t,"value")&&me(function(e){var n=i[e.axisindex],a=t.get(e.axisindex),o=t.get(e.axisid),r=t.ecmodel.querycomponents({maintype:e.axis,index:a,id:o})[0];a=r.componentindex,u(n,a)<0&&n.push(a)})},this)},_autosetorient:function(){var t;this.eachtargetaxis(function(e){!t&&(t=e.name)},this),this.option.orient="y"===t?"vertical":"horizontal"},_isserieshasallaxestypeof:function(t,e){var i=!0;return me(function(n){var a=t.get(n.axisindex),o=this.dependentmodels[n.axis][a];o&&o.get("type")===e||(i=!1)},this),i},_setdefaultthrottle:function(t){if(t.hasownproperty("throttle")&&(this._autothrottle=!1),this._autothrottle){var e=this.ecmodel.option;this.option.throttle=e.animation&&e.animationdurationupdate>0?100:20}},getfirsttargetaxismodel:function(){var t;return me(function(e){if(null==t){var i=this.get(e.axisindex);i.length&&(t=this.dependentmodels[e.axis][i[0]])}},this),t},eachtargetaxis:function(t,e){var i=this.ecmodel;me(function(n){ge(this.get(n.axisindex),function(a){t.call(e,n,a,this,i)},this)},this)},getaxisproxy:function(t,e){return this._axisproxies[t+"_"+e]},getaxismodel:function(t,e){var i=this.getaxisproxy(t,e);return i&&i.getaxismodel()},setrawrange:function(t){var e=this.option,i=this.settledoption;ge([["start","startvalue"],["end","endvalue"]],function(n){(null!=t[n[0]]||null!=t[n[1]])&&(e[n[0]]=i[n[0]]=t[n[0]],e[n[1]]=i[n[1]]=t[n[1]])},this),p_(this,t)},setcalculatedrange:function(t){var e=this.option;ge(["start","startvalue","end","endvalue"],function(i){e[i]=t[i]})},getpercentrange:function(){var t=this.findrepresentativeaxisproxy();return t?t.getdatapercentwindow():void 0},getvaluerange:function(t,e){if(null!=t||null!=e)return this.getaxisproxy(t,e).getdatavaluewindow();var i=this.findrepresentativeaxisproxy();return i?i.getdatavaluewindow():void 0},findrepresentativeaxisproxy:function(t){if(t)return t.__dzaxisproxy;var e=this._axisproxies;for(var i in e)if(e.hasownproperty(i)&&e[i].hostedby(this))return e[i];for(var i in e)if(e.hasownproperty(i)&&!e[i].hostedby(this))return e[i]},getrangepropmode:function(){return this._rangepropmode.slice()}}),ye=ot.extend({type:"datazoom",render:function(t,e,i){this.datazoommodel=t,this.ecmodel=e,this.api=i},gettargetcoordinfo:function(){function t(t,e,i,n){for(var a,o=0;o0&&e%g)return void(p+=f);var i=null==t||isnan(t)||""===t,n=i?0:_e(t,o,u,!0);i&&!l&&e?(c.push([c[c.length-1][0],0]),d.push([d[d.length-1][0],0])):!i&&l&&(c.push([p,0]),d.push([p,0])),c.push([p,n]),d.push([p,n]),p+=f,l=i});var m=this.datazoommodel;this._displayables.bargroup.add(new xi({shape:{points:c},style:s({fill:m.get("databackgroundcolor")},m.getmodel("databackground.areastyle").getareastyle()),silent:!0,z2:-20})),this._displayables.bargroup.add(new ui({shape:{points:d},style:m.getmodel("databackground.linestyle").getlinestyle(),silent:!0,z2:-19}))}}},_preparedatashadowinfo:function(){var t=this.datazoommodel,e=t.get("showdatashadow");if(e!==!1){var i,n=this.ecmodel;return t.eachtargetaxis(function(a,o){var r=t.getaxisproxy(a.name,o).gettargetseriesmodels();f(r,function(t){if(!(i||e!==!0&&u(le,t.get("type"))<0)){var r,s=n.getcomponent(a.axis,o).axis,l=o_(a.name),h=t.coordinatesystem;null!=l&&h.getotheraxis&&(r=h.getotheraxis(s).inverse),l=t.getdata().mapdimension(l),i={thisaxis:s,series:t,thisdim:a.name,otherdim:l,otheraxisinverse:r}}},this)},this),i}},_renderhandle:function(){var t=this._displayables,e=t.handles=[],i=t.handlelabels=[],n=this._displayables.bargroup,a=this._size,o=this.datazoommodel;n.add(t.filler=new xe({draggable:!0,cursor:n_(this._orient),drift:be(this._ondragmove,this,"all"),onmousemove:function(t){bb(t.event)},ondragstart:be(this._showdatainfo,this,!0),ondragend:be(this._ondragend,this),onmouseover:be(this._showdatainfo,this,!0),onmouseout:be(this._showdatainfo,this,!1),style:{fill:o.get("fillercolor"),textposition:"inside"}})),n.add(new xe({silent:!0,subpixeloptimize:!0,shape:{x:0,y:0,width:a[0],height:a[1]},style:{stroke:o.get("databackgroundcolor")||o.get("bordercolor"),linewidth:ie,fill:"rgba(0,0,0,0)"}})),se([0,1],function(t){var a=$o(o.get("handleicon"),{cursor:n_(this._orient),draggable:!0,drift:be(this._ondragmove,this,t),onmousemove:function(t){bb(t.event)},ondragend:be(this._ondragend,this),onmouseover:be(this._showdatainfo,this,!0),onmouseout:be(this._showdatainfo,this,!1)},{x:-1,y:0,width:2,height:2}),r=a.getboundingrect();this._handleheight=hr(o.get("handlesize"),this._size[1]),this._handlewidth=r.width/r.height*this._handleheight,a.setstyle(o.getmodel("handlestyle").getitemstyle());var s=o.get("handlecolor");null!=s&&(a.style.fill=s),n.add(e[t]=a);var l=o.textstylemodel;this.group.add(i[t]=new ei({silent:!0,invisible:!0,style:{x:0,y:0,text:"",textverticalalign:"middle",textalign:"center",textfill:l.gettextcolor(),textfont:l.getfont()},z2:10}))},this)},_resetinterval:function(){var t=this._range=this.datazoommodel.getpercentrange(),e=this._getviewextent();this._handleends=[_e(t[0],[0,100],e,!0),_e(t[1],[0,100],e,!0)]},_updateinterval:function(t,e){var i=this.datazoommodel,n=this._handleends,a=this._getviewextent(),o=i.findrepresentativeaxisproxy().getminmaxspan(),r=[0,100];dn(e,n,a,i.get("zoomlock")?"all":t,null!=o.minspan?_e(o.minspan,r,a,!0):null,null!=o.maxspan?_e(o.maxspan,r,a,!0):null); var s=this._range,l=this._range=we([_e(n[0],a,r,!0),_e(n[1],a,r,!0)]);return!s||s[0]!==l[0]||s[1]!==l[1]},_updateview:function(t){var e=this._displayables,i=this._handleends,n=we(i.slice()),a=this._size;se([0,1],function(t){var n=e.handles[t],o=this._handleheight;n.attr({scale:[o/2,o/2],position:[i[t],a[1]/2-o/2]})},this),e.filler.setshape({x:n[0],y:0,width:n[1]-n[0],height:a[1]}),this._updatedatainfo(t)},_updatedatainfo:function(t){function e(t){var e=xo(n.handles[t].parent,this.group),i=yo(0===t?"right":"left",e),s=this._handlewidth/2+ce,l=uo([c[t]+(0===t?-s:s),this._size[1]/2],e);a[t].setstyle({x:l[0],y:l[1],textverticalalign:o===te?"middle":i,textalign:o===te?i:"center",text:r[t]})}var i=this.datazoommodel,n=this._displayables,a=n.handlelabels,o=this._orient,r=["",""];if(i.get("showdetail")){var s=i.findrepresentativeaxisproxy();if(s){var l=s.getaxismodel().axis,u=this._range,h=t?s.calculatedatawindow({start:u[0],end:u[1]}).valuewindow:s.getdatavaluewindow();r=[this._formatlabel(h[0],l),this._formatlabel(h[1],l)]}}var c=we(this._handleends.slice());e.call(this,0),e.call(this,1)},_formatlabel:function(t,e){var i=this.datazoommodel,n=i.get("labelformatter"),a=i.get("labelprecision");(null==a||"auto"===a)&&(a=e.getpixelprecision());var o=null==t||isnan(t)?"":"category"===e.type||"time"===e.type?e.scale.getlabel(math.round(t)):t.tofixed(math.min(a,20));return w(n)?n(t,o):b(n)?n.replace("{value}",o):o},_showdatainfo:function(t){t=this._dragging||t;var e=this._displayables.handlelabels;e[0].attr("invisible",!t),e[1].attr("invisible",!t)},_ondragmove:function(t,e,i){this._dragging=!0;var n=this._displayables.bargroup.getlocaltransform(),a=uo([e,i],n,!0),o=this._updateinterval(t,a[0]),r=this.datazoommodel.get("realtime");this._updateview(!r),o&&r&&this._dispatchzoomaction()},_ondragend:function(){this._dragging=!1,this._showdatainfo(!1);var t=this.datazoommodel.get("realtime");!t&&this._dispatchzoomaction()},_onclickpanelclick:function(t){var e=this._size,i=this._displayables.bargroup.transformcoordtolocal(t.offsetx,t.offsety);if(!(i[0]<0||i[0]>e[0]||i[1]<0||i[1]>e[1])){var n=this._handleends,a=(n[0]+n[1])/2,o=this._updateinterval("all",i[0]-a);this._updateview(),o&&this._dispatchzoomaction()}},_dispatchzoomaction:function(){var t=this._range;this.api.dispatchaction({type:"datazoom",from:this.uid,datazoomid:this.datazoommodel.id,start:t[0],end:t[1]})},_findcoordrect:function(){var t;if(se(this.gettargetcoordinfo(),function(e){if(!t&&e.length){var i=e[0].model.coordinatesystem;t=i.getrect&&i.getrect()}}),!t){var e=this.api.getwidth(),i=this.api.getheight();t={x:.2*e,y:.2*i,width:.6*e,height:.6*i}}return t}});fu({gettargetseries:function(t){var e=b();return t.eachcomponent("datazoom",function(t){t.eachtargetaxis(function(t,i,n){var a=n.getaxisproxy(t.name,i);f(a.gettargetseriesmodels(),function(t){e.set(t.uid,t)})})}),e},modifyoutputend:!0,overallreset:function(t,e){t.eachcomponent("datazoom",function(t){t.eachtargetaxis(function(t,i,n){n.getaxisproxy(t.name,i).reset(n,e)}),t.eachtargetaxis(function(t,i,n){n.getaxisproxy(t.name,i).filterdata(n,e)})}),t.eachcomponent("datazoom",function(t){var e=t.findrepresentativeaxisproxy(),i=e.getdatapercentwindow(),n=e.getdatavaluewindow();t.setcalculatedrange({start:i[0],end:i[1],startvalue:n[0],endvalue:n[1]})})}}),gu("datazoom",function(t,e){var i=a_(y(e.eachcomponent,e,"datazoom"),ce,function(t,e){return t.get(e.axisindex)}),n=[];e.eachcomponent({maintype:"datazoom",query:t},function(t){n.push.apply(n,i(t).nodes)}),f(n,function(e){e.setrawrange({start:t.start,end:t.end,startvalue:t.startvalue,endvalue:t.endvalue})})}),ve.extend({type:"datazoom.inside",defaultoption:{disabled:!1,zoomlock:!1,zoomonmousewheel:!0,moveonmousemove:!0,moveonmousewheel:!1,preventdefaultmousemove:!0}});var pe="\x00_ec_datazoom_roams",oe=y,ne=ye.extend({type:"datazoom.inside",init:function(){this._range},render:function(t,e,i){ne.superapply(this,"render",arguments),this._range=t.getpercentrange(),f(this.gettargetcoordinfo(),function(e,n){var a=p(e,function(t){return e_(t.model)});f(e,function(e){var o=e.model,r={};f(["pan","zoom","scrollmove"],function(t){r[t]=oe(ze[t],this,e,n)},this),z_(i,{coordid:e_(o),allcoordids:a,containspoint:function(t,e,i){return o.coordinatesystem.containpoint([e,i])},datazoomid:t.id,datazoommodel:t,getrange:r})},this)},this)},dispose:function(){r_(this.api,this.datazoommodel.id),ne.superapply(this,"dispose",arguments),this._range=null}}),ze={zoom:function(t,e,i,n){var a=this._range,o=a.slice(),r=t.axismodels[0];if(r){var s=re[e](null,[n.originx,n.originy],r,i,t),l=(s.signal>0?s.pixelstart+s.pixellength-s.pixel:s.pixel-s.pixelstart)/s.pixellength*(o[1]-o[0])+o[0],u=math.max(1/n.scale,0);o[0]=(o[0]-l)*u+l,o[1]=(o[1]-l)*u+l;var h=this.datazoommodel.findrepresentativeaxisproxy().getminmaxspan();return dn(0,o,[0,100],0,h.minspan,h.maxspan),this._range=o,a[0]!==o[0]||a[1]!==o[1]?o:void 0}},pan:h_(function(t,e,i,n,a,o){var r=re[n]([o.oldx,o.oldy],[o.newx,o.newy],e,a,i);return r.signal*(t[1]-t[0])*r.pixel/r.pixellength}),scrollmove:h_(function(t,e,i,n,a,o){var r=re[n]([0,0],[o.scrolldelta,o.scrolldelta],e,a,i);return r.signal*(t[1]-t[0])*o.scrolldelta})},re={grid:function(t,e,i,n,a){var o=i.axis,r={},s=a.model.coordinatesystem.getrect();return t=t||[0,0],"x"===o.dim?(r.pixel=e[0]-t[0],r.pixellength=s.width,r.pixelstart=s.x,r.signal=o.inverse?1:-1):(r.pixel=e[1]-t[1],r.pixellength=s.height,r.pixelstart=s.y,r.signal=o.inverse?-1:1),r},polar:function(t,e,i,n,a){var o=i.axis,r={},s=a.model.coordinatesystem,l=s.getradiusaxis().getextent(),u=s.getangleaxis().getextent();return t=t?s.pointtocoord(t):[0,0],e=s.pointtocoord(e),"radiusaxis"===i.maintype?(r.pixel=e[0]-t[0],r.pixellength=l[1]-l[0],r.pixelstart=l[0],r.signal=o.inverse?1:-1):(r.pixel=e[1]-t[1],r.pixellength=u[1]-u[0],r.pixelstart=u[0],r.signal=o.inverse?-1:1),r},singleaxis:function(t,e,i,n,a){var o=i.axis,r=a.model.coordinatesystem.getrect(),s={};return t=t||[0,0],"horizontal"===o.orient?(s.pixel=e[0]-t[0],s.pixellength=r.width,s.pixelstart=r.x,s.signal=o.inverse?1:-1):(s.pixel=e[1]-t[1],s.pixellength=r.height,s.pixelstart=r.y,s.signal=o.inverse?-1:1),s}},ee=["rect","polygon","keep","clear"],be=function(t,e){var i=t&&t.brush;if(_(i)||(i=i?[i]:[]),i.length){var n=[];f(i,function(t){var e=t.hasownproperty("toolbox")?t.toolbox:[];e instanceof array&&(n=n.concat(e))});var a=t&&t.toolbox;_(a)&&(a=a[0]),a||(a={feature:{}},t.toolbox=[a]);var o=a.feature||(a.feature={}),r=o.brush||(o.brush={}),s=r.type||(r.type=[]);s.push.apply(s,n),z_(s),e&&!s.length&&s.push.apply(s,ee)}},ve=f,ge={linex:k_(0),liney:k_(1),rect:{point:function(t,e,i){return t&&i.boundingrect.contain(t[0],t[1])},rect:function(t,e,i){return t&&i.boundingrect.intersect(t)}},polygon:{point:function(t,e,i){return t&&i.boundingrect.contain(t[0],t[1])&&wh(i.range,t[0],t[1])},rect:function(t,e,i){var n=i.range;if(!t||n.length<=1)return!1;var a=t.x,o=t.y,r=t.width,s=t.height,l=n[0];return wh(n,a,o)||wh(n,a+r,o)||wh(n,a,o+s)||wh(n,a+r,o+s)||wi.create(t).contain(l[0],l[1])||jo(a,o,a+r,o,n)||jo(a,o,a,o+s,n)||jo(a+r,o,a+r,o+s,n)||jo(a,o+s,a+r,o+s,n)?!0:void 0}}},fe=f,we=u,he=x,ze=["datatopoint","pointtodata"],xe=["grid","xaxis","yaxis","geo","graph","polar","radiusaxis","angleaxis","bmap"],ue=j_.prototype;ue.setoutputranges=function(t,e){this.matchoutputranges(t,e,function(t,e,i){if((t.coordranges||(t.coordranges=[])).push(e),!t.coordrange){t.coordrange=e;var n=ke[t.brushtype](0,i,e);t.__rangeoffset={offset:$e[t.brushtype](n.values,t.range,[1,1]),xyminmax:n.xyminmax}}})},ue.matchoutputranges=function(t,e,i){fe(t,function(t){var n=this.findtargetinfo(t,e);n&&n!==!0&&f(n.coordsyses,function(n){var a=ke[t.brushtype](1,n,t.range);i(t,a.values,n,e)})},this)},ue.setinputranges=function(t,e){fe(t,function(t){var i=this.findtargetinfo(t,e);if(t.range=t.range||[],i&&i!==!0){t.panelid=i.panelid;var n=ke[t.brushtype](0,i.coordsys,t.coordrange),a=t.__rangeoffset;t.range=a?$e[t.brushtype](n.values,a.offset,nw(n.xyminmax,a.xyminmax)):n.values}},this)},ue.makepanelopts=function(t,e){return p(this._targetinfolist,function(i){var n=i.getpanelrect();return{panelid:i.panelid,defaultbrushtype:e&&e(i),clippath:vm(n),istargetbycursor:fm(n,t,i.coordsysmodel),getlinearbrushotherextent:gm(n)}})},ue.controlseries=function(t,e,i){var n=this.findtargetinfo(t,i);return n===!0||n&&we(n.coordsyses,e.coordinatesystem)>=0},ue.findtargetinfo=function(t,e){for(var i=this._targetinfolist,n=tw(e,t),a=0;a=0||we(n,t.getaxis("y").model)>=0)&&o.push(t)}),e.push({panelid:"grid--"+t.id,gridmodel:t,coordsysmodel:t,coordsys:o[0],coordsyses:o,getpanelrect:qe.grid,xaxisdeclared:r[t.id],yaxisdeclared:s[t.id]})}))},geo:function(t,e){fe(t.geomodels,function(t){var i=t.coordinatesystem;e.push({panelid:"geo--"+t.id,geomodel:t,coordsysmodel:t,coordsys:i,coordsyses:[i],getpanelrect:qe.geo})})}},je=[function(t,e){var i=t.xaxismodel,n=t.yaxismodel,a=t.gridmodel;return!a&&i&&(a=i.axis.grid.model),!a&&n&&(a=n.axis.grid.model),a&&a===e.gridmodel},function(t,e){var i=t.geomodel;return i&&i===e.geomodel}],qe={grid:function(){return this.coordsys.grid.getrect().clone()},geo:function(){var t=this.coordsys,e=t.getboundingrect().clone();return e.applytransform(xo(t)),e}},ke={linex:he(ew,0),liney:he(ew,1),rect:function(t,e,i){var n=e[ze[t]]([i[0][0],i[1][0]]),a=e[ze[t]]([i[0][1],i[1][1]]),o=[q_([n[0],a[0]]),q_([n[1],a[1]])];return{values:o,xyminmax:o}},polygon:function(t,e,i){var n=[[1/0,-1/0],[1/0,-1/0]],a=p(i,function(i){var a=e[ze[t]](i);return n[0][0]=math.min(n[0][0],a[0]),n[1][0]=math.min(n[1][0],a[1]),n[0][1]=math.max(n[0][1],a[0]),n[1][1]=math.max(n[1][1],a[1]),a});return{values:a,xyminmax:n}}},$e={linex:he(iw,0),liney:he(iw,1),rect:function(t,e,i){return[[t[0][0]-i[0]*e[0][0],t[0][1]-i[0]*e[0][1]],[t[1][0]-i[1]*e[1][0],t[1][1]-i[1]*e[1][1]]]},polygon:function(t,e,i){return p(t,function(t,n){return[t[0]-i[0]*e[n][0],t[1]-i[1]*e[n][1]]})}},je=["inbrush","outofbrush"],qe="__ecbrushselect",tb="__ecinbrushselectevent",eb=rd.visual.brush;yu(eb,function(t,e,i){t.eachcomponent({maintype:"brush"},function(e){i&&"takeglobalcursor"===i.type&&e.setbrushoption("brush"===i.key?i.brushoption:{brushtype:!1});var n=e.brushtargetmanager=new j_(e.option,t);n.setinputranges(e.areas,t)})}),xu(eb,function(t,e,i){var a,o,r=[];t.eachcomponent({maintype:"brush"},function(e,i){function l(t){return"all"===m||v[t]}function u(t){return!!t.length}function h(t,e){var i=t.coordinatesystem;w|=i.hasaxisbrushed(),l(e)&&i.eachactivestate(t.getdata(),function(t,e){"active"===t&&(y[e]=1)})}function c(i,n,a){var o=lw(i);if(o&&!uw(e,n)&&(f(b,function(n){o[n.brushtype]&&e.brushtargetmanager.controlseries(n,i,t)&&a.push(n),w|=u(a)}),l(n)&&u(a))){var r=i.getdata();r.each(function(t){sw(o,a,r,t)&&(y[t]=1)})}}var d={brushid:e.id,brushindex:i,brushname:e.name,areas:n(e.areas),selected:[]};r.push(d);var g=e.option,m=g.brushlink,v=[],y=[],x=[],w=0;i||(a=g.throttletype,o=g.throttledelay);var b=p(e.areas,function(t){return hw(s({boundingrect:ib[t.brushtype](t)},t))}),s=u_(e.option,je,function(t){t.mappingmethod="fixed"});_(m)&&f(m,function(t){v[t]=1}),t.eachseries(function(t,e){var i=x[e]=[];"parallel"===t.subtype?h(t,e,i):c(t,e,i)}),t.eachseries(function(t,e){var i={seriesid:t.id,seriesindex:e,seriesname:t.name,dataindex:[]};d.selected.push(i);var n=lw(t),a=x[e],o=t.getdata(),r=l(e)?function(t){return y[t]?(i.dataindex.push(o.getrawindex(t)),"inbrush"):"outofbrush"}:function(t){return sw(n,a,o,t)?(i.dataindex.push(o.getrawindex(t)),"inbrush"):"outofbrush"};(l(e)?w:u(a))&&j_(je,s,o,r)})}),ow(e,a,o,r,i)});{var ib={linex:g,liney:g,rect:function(t){return cw(t.range)},polygon:function(t){for(var e,i=t.range,n=0,a=i.length;a>n;n++){e=e||[[1/0,-1/0],[1/0,-1/0]];var o=i[n];o[0]e[0][1]&&(e[0][1]=o[0]),o[1]e[1][1]&&(e[1][1]=o[1])}return e&&cw(e)}},nb=["#ddd"];bu({type:"brush",dependencies:["geo","grid","xaxis","yaxis","parallel","series"],defaultoption:{toolbox:null,brushlink:null,seriesindex:"all",geoindex:null,xaxisindex:null,yaxisindex:null,brushtype:"rect",brushmode:"single",transformable:!0,brushstyle:{borderwidth:1,color:"rgba(120,140,180,0.3)",bordercolor:"rgba(120,140,180,0.8)"},throttletype:"fixrate",throttledelay:0,removeonclick:!0,z:1e4},areas:[],brushtype:null,brushoption:{},coordinfolist:[],optionupdated:function(t,e){var i=this.option;!e&&y_(i,t,["inbrush","outofbrush"]);var n=i.inbrush=i.inbrush||{};i.outofbrush=i.outofbrush||{color:nb},n.hasownproperty("liftz")||(n.liftz=5)},setareas:function(t){t&&(this.areas=p(t,function(t){return dw(this.option,t)},this))},setbrushoption:function(t){this.brushoption=dw(this.option,t),this.brushtype=this.brushoption.brushtype}})}su({type:"brush",init:function(t,e){this.ecmodel=t,this.api=e,this.model,(this._brushcontroller=new am(e.getzr())).on("brush",y(this._onbrush,this)).mount()},render:function(t){return this.model=t,fw.apply(this,arguments)},updatetransform:fw,updateview:fw,dispose:function(){this._brushcontroller.dispose()},_onbrush:function(t,e){var i=this.model.id;this.model.brushtargetmanager.setoutputranges(t,this.ecmodel),(!e.isend||e.removeonclick)&&this.api.dispatchaction({type:"brush",brushid:i,areas:n(t),$from:i})}}),gu({type:"brush",event:"brush"},function(t,e){e.eachcomponent({maintype:"brush",query:t},function(e){e.setareas(t.areas)})}),gu({type:"brushselect",event:"brushselected",update:"none"},function(){});var ab={},ob=zt.toolbox.brush;mw.defaultoption={show:!0,type:["rect","polygon","linex","liney","keep","clear"],icon:{rect:"m7.3,34.7 m0.4,10v-0.2h9.8 m89.6,10v-0.2h-9.8 m0.4,60v10.2h9.8 m89.6,60v10.2h-9.8 m12.3,22.4v10.5h13.1 m33.6,10.5h7.8 m49.1,10.5h7.8 m77.5,22.4v10.5h-13 m12.3,31.1v8.2 m77.7,31.1v8.2 m12.3,47.6v11.9h13.1 m33.6,59.5h7.6 m49.1,59.5 h7.7 m77.5,47.6v11.9h-13",polygon:"m55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1s53.5,34.9,55.2,34.9z m50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 c47.3,52.4,48.7,51,50.4,51z m55.6,37.1l1.5-7.8 m60.1,13.5l1.6-8.7l-7.8,4 m59,19l-1,5.3 m24,16.1l6.4,4.9l6.4-3.3 m48.5,11.6 l-5.9,3.1 m19.1,12.8l9.7,5.1l1.1,7.7 m13.4,29.8l1,7.3l6.6,1.6 m11.6,18.4l1,6.1 m32.8,41.9 m26.6,40.4 m27.3,40.2l6.1,1.6 m49.9,52.1l-5.6-7.6l-4.9-1.2",linex:"m15.2,30 m19.7,15.6v1.9h29 m34.8,1.9h40.4 m55.3,15.6v1.9h45.9 m19.7,44.4v58.1h29 m34.8,58.1h40.4 m55.3,44.4 v58.1h45.9 m12.5,20.3l-9.4,9.6l9.6,9.8 m3.1,29.9h16.5 m62.5,20.3l9.4,9.6l62.3,39.7 m71.9,29.9h55.4",liney:"m38.8,7.7 m52.7,12h13.2v9 m65.9,26.6v32 m52.7,46.3h13.2v-9 m24.9,12h11.8v9 m11.8,26.6v32 m24.9,46.3h11.8v-9 m48.2,5.1l-9.3-9l-9.4,9.2 m38.9-3.9v12 m48.2,53.3l-9.3,9l-9.4-9.2 m38.9,62.3v46.4",keep:"m4,10.5v1h10.3 m20.7,1h6.1 m33,1h6.1 m55.4,10.5v1h45.2 m4,17.3v6.6 m55.6,17.3v6.6 m4,30.5v40h10.3 m20.7,40 h6.1 m33,40h6.1 m55.4,30.5v40h45.2 m21,18.9h62.9v48.6h21v18.9z",clear:"m22,14.7l30.9,31 m52.9,14.7l22,45.7 m4.7,16.8v4.2h13.1 m26,4.2h7.8 m41.6,4.2h7.8 m70.3,16.8v4.2h57.2 m4.7,25.9v8.6 m70.3,25.9v8.6 m4.7,43.2v12.6h13.1 m26,55.8h7.8 m41.6,55.8h7.8 m70.3,43.2v12.6h57.2"},title:n(ob.title)};var rb=mw.prototype;rb.render=rb.updateview=function(t,e){var i,n,a;e.eachcomponent({maintype:"brush"},function(t){i=t.brushtype,n=t.brushoption.brushmode||"single",a|=t.areas.length}),this._brushtype=i,this._brushmode=n,f(t.get("type",!0),function(e){t.seticonstatus(e,("keep"===e?"multiple"===n:"clear"===e?a:e===i)?"emphasis":"normal")})},rb.geticons=function(){var t=this.model,e=t.get("icon",!0),i={};return f(t.get("type",!0),function(t){e[t]&&(i[t]=e[t])}),i},rb.onclick=function(t,e,i){var n=this._brushtype,a=this._brushmode;"clear"===i?(e.dispatchaction({type:"axisareaselect",intervals:[]}),e.dispatchaction({type:"brush",command:"clear",areas:[]})):e.dispatchaction({type:"takeglobalcursor",key:"brush",brushoption:{brushtype:"keep"===i?n:n===i?!1:i,brushmode:"keep"===i?"multiple"===a?"single":"multiple":a}})},pw("brush",mw),du(be);var sb=f,lb=function(t){var e=t&&t.visualmap;_(e)||(e=e?[e]:[]),sb(e,function(t){if(t){vw(t,"splitlist")&&!vw(t,"pieces")&&(t.pieces=t.splitlist,delete t.splitlist);var e=t.pieces;e&&_(e)&&sb(e,function(t){s(t)&&(vw(t,"start")&&!vw(t,"min")&&(t.min=t.start),vw(t,"end")&&!vw(t,"max")&&(t.max=t.end))})}})};xa.registersubtypedefaulter("visualmap",function(t){return t.categories||(t.pieces?t.pieces.length>0:t.splitnumber>0)&&!t.calculable?"piecewise":"continuous"});var ub=rd.visual.component;xu(ub,{createonallseries:!0,reset:function(t,e){var i=[];return e.eachcomponent("visualmap",function(e){var n=t.pipelinecontext;!e.istargetseries(t)||n&&n.large||i.push(q_(e.statelist,e.targetvisuals,y(e.getvaluestate,e),e.getdatadimension(t.getdata())))}),i}}),xu(ub,{createonallseries:!0,reset:function(t,e){var i=t.getdata(),n=[];e.eachcomponent("visualmap",function(e){if(e.istargetseries(t)){var a=e.getvisualmeta(y(yw,null,t,e))||{stops:[],outercolors:[]},o=e.getdatadimension(i),r=i.getdimensioninfo(o);null!=r&&(a.dimension=r.index,n.push(a))}}),t.getdata().setvisual("visualmeta",n)}});var hb={get:function(t,e,i){var a=n((cb[t]||{})[e]);return i&&_(a)?a[a.length-1]:a}},cb={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},colorhue:{active:[0,360],inactive:[0,0]},colorsaturation:{active:[.3,1],inactive:[0,0]},colorlightness:{active:[.9,.5],inactive:[0,0]},coloralpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundrect","diamond"],inactive:["none"]},symbolsize:{active:[10,50],inactive:[0,0]}},db=kp.mapvisual,fb=kp.eachvisual,pb=_,gb=f,mb=dr,vb=ur,yb=g,xb=bu({type:"visualmap",dependencies:["series"],statelist:["inrange","outofrange"],replacableoptionkeys:["inrange","outofrange","target","controller","color"],databound:[-1/0,1/0],layoutmode:{type:"box",ignoresize:!0},defaultoption:{show:!0,zlevel:0,z:4,seriesindex:"all",min:0,max:200,dimension:null,inrange:null,outofrange:null,left:0,right:null,top:null,bottom:0,itemwidth:null,itemheight:null,inverse:!1,orient:"vertical",backgroundcolor:"rgba(0,0,0,0)",bordercolor:"#ccc",contentcolor:"#5793f3",inactivecolor:"#aaa",borderwidth:0,padding:5,textgap:10,precision:0,color:null,formatter:null,text:null,textstyle:{color:"#333"}},init:function(t,e,i){this._dataextent,this.targetvisuals={},this.controllervisuals={},this.textstylemodel,this.itemsize,this.mergedefaultandtheme(t,i)},optionupdated:function(t,e){var i=this.option;hb.canvassupported||(i.realtime=!1),!e&&y_(i,t,this.replacableoptionkeys),this.textstylemodel=this.getmodel("textstyle"),this.resetitemsize(),this.completevisualoption()},resetvisual:function(t){var e=this.statelist;t=y(t,this),this.controllervisuals=u_(this.option.controller,e,t),this.targetvisuals=u_(this.option.target,e,t)},gettargetseriesindices:function(){var t=this.option.seriesindex,e=[];return null==t||"all"===t?this.ecmodel.eachseries(function(t,i){e.push(i)}):e=gn(t),e},eachtargetseries:function(t,e){f(this.gettargetseriesindices(),function(i){t.call(e,this.ecmodel.getseriesbyindex(i))},this)},istargetseries:function(t){var e=!1;return this.eachtargetseries(function(i){i===t&&(e=!0)}),e},formatvaluetext:function(t,e,i){function n(t){return t===l[0]?"min":t===l[1]?"max":(+t).tofixed(math.min(s,20))}var a,o,r=this.option,s=r.precision,l=this.databound,u=r.formatter;return i=i||["<",">"],_(t)&&(t=t.slice(),a=!0),o=e?t:a?[n(t[0]),n(t[1])]:n(t),b(u)?u.replace("{value}",a?o[0]:o).replace("{value2}",a?o[1]:o):w(u)?a?u(t[0],t[1]):u(t):a?t[0]===l[0]?i[0]+" "+o[1]:t[1]===l[1]?i[1]+" "+o[0]:o[0]+" - "+o[1]:o},resetextent:function(){var t=this.option,e=mb([t.min,t.max]);this._dataextent=e},getdatadimension:function(t){var e=this.option.dimension,i=t.dimensions;if(null!=e||i.length){if(null!=e)return t.getdimension(e);for(var n=t.dimensions,a=n.length-1;a>=0;a--){var o=n[a],r=t.getdimensioninfo(o);if(!r.iscalculationcoord)return o}}},getextent:function(){return this._dataextent.slice()},completevisualoption:function(){function t(t){pb(r.color)&&!t.inrange&&(t.inrange={color:r.color.slice().reverse()}),t.inrange=t.inrange||{color:o.get("gradientcolor")},gb(this.statelist,function(e){var i=t[e];if(b(i)){var n=hb.get(i,"active",h);n?(t[e]={},t[e][i]=n):delete t[e]}},this)}function e(t,e,i){var n=t[e],a=t[i];n&&!a&&(a=t[i]={},gb(n,function(t,e){if(kp.isvalidtype(e)){var i=hb.get(e,"inactive",h);null!=i&&(a[e]=i,"color"!==e||a.hasownproperty("opacity")||a.hasownproperty("coloralpha")||(a.opacity=[0,0]))}}))}function i(t){var e=(t.inrange||{}).symbol||(t.outofrange||{}).symbol,i=(t.inrange||{}).symbolsize||(t.outofrange||{}).symbolsize,a=this.get("inactivecolor");gb(this.statelist,function(o){var r=this.itemsize,s=t[o];s||(s=t[o]={color:h?a:[a]}),null==s.symbol&&(s.symbol=e&&n(e)||(h?"roundrect":["roundrect"])),null==s.symbolsize&&(s.symbolsize=i&&n(i)||(h?r[0]:[r[0],r[0]])),s.symbol=db(s.symbol,function(t){return"none"===t||"square"===t?"roundrect":t});var l=s.symbolsize;if(null!=l){var u=-1/0;fb(l,function(t){t>u&&(u=t)}),s.symbolsize=db(l,function(t){return vb(t,[0,u],[0,r[0]],!0)})}},this)}var o=this.ecmodel,r=this.option,s={inrange:r.inrange,outofrange:r.outofrange},l=r.target||(r.target={}),u=r.controller||(r.controller={});a(l,s),a(u,s);var h=this.iscategory();t.call(this,l),t.call(this,u),e.call(this,l,"inrange","outofrange"),i.call(this,u)},resetitemsize:function(){this.itemsize=[parsefloat(this.get("itemwidth")),parsefloat(this.get("itemheight"))]},iscategory:function(){return!!this.option.categories},setselected:yb,getvaluestate:yb,getvisualmeta:yb}),_b=[20,140],wb=xb.extend({type:"visualmap.continuous",defaultoption:{align:"auto",calculable:!1,range:null,realtime:!0,itemheight:null,itemwidth:null,hoverlink:!0,hoverlinkdatasize:null,hoverlinkonhandle:null},optionupdated:function(){wb.superapply(this,"optionupdated",arguments),this.resetextent(),this.resetvisual(function(t){t.mappingmethod="linear",t.dataextent=this.getextent()}),this._resetrange()},resetitemsize:function(){wb.superapply(this,"resetitemsize",arguments);var t=this.itemsize;"horizontal"===this._orient&&t.reverse(),(null==t[0]||isnan(t[0]))&&(t[0]=_b[0]),(null==t[1]||isnan(t[1]))&&(t[1]=_b[1])},_resetrange:function(){var t=this.getextent(),e=this.option.range;!e||e.auto?(t.auto=1,this.option.range=t):_(e)&&(e[0]>e[1]&&e.reverse(),e[0]=math.max(e[0],t[0]),e[1]=math.min(e[1],t[1]))},completevisualoption:function(){xb.prototype.completevisualoption.apply(this,arguments),f(this.statelist,function(t){var e=this.option.controller[t].symbolsize;e&&e[0]!==e[1]&&(e[0]=0)},this)},setselected:function(t){this.option.range=t.slice(),this._resetrange()},getselected:function(){var t=this.getextent(),e=dr((this.get("range")||[]).slice());return e[0]>t[1]&&(e[0]=t[1]),e[1]>t[1]&&(e[1]=t[1]),e[0]=i[1]||t<=e[1])?"inrange":"outofrange"},findtargetdataindices:function(t){var e=[];return this.eachtargetseries(function(i){var n=[],a=i.getdata();a.each(this.getdatadimension(a),function(e,i){t[0]<=e&&e<=t[1]&&n.push(i)},this),e.push({seriesid:i.id,dataindex:n})},this),e},getvisualmeta:function(t){function e(e,i){a.push({value:e,color:t(e,i)})}for(var i=xw(this,"outofrange",this.getextent()),n=xw(this,"inrange",this.option.range.slice()),a=[],o=0,r=0,s=n.length,l=i.length;l>r&&(!n.length||i[r]<=n[0]);r++)i[r]o;o++,u=0)u&&a.length&&e(n[o],"outofrange"),e(n[o],"inrange");for(var u=1;l>r;r++)(!n.length||n[n.length-1]o;o++){var r=t[0]+a*o;if(r>t[1])break;n.push({color:this.getcontrollervisual(r,"color",e),offset:o/i})}return n.push({color:this.getcontrollervisual(t[1],"color",e),offset:1}),n},_createbarpoints:function(t,e){var i=this.visualmapmodel.itemsize;return[[i[0]-e[0],t[0]],[i[0],t[0]],[i[0],t[1]],[i[0]-e[1],t[1]]]},_createbargroup:function(t){var e=this._orient,i=this.visualmapmodel.get("inverse");return new ss("horizontal"!==e||i?"horizontal"===e&&i?{scale:"bottom"===t?[-1,1]:[1,1],rotation:-math.pi/2}:"vertical"!==e||i?{scale:"left"===t?[1,1]:[-1,1]}:{scale:"left"===t?[1,-1]:[-1,-1]}:{scale:"bottom"===t?[1,1]:[-1,1],rotation:math.pi/2})},_updatehandle:function(t,e){if(this._usehandle){var i=this._shapes,n=this.visualmapmodel,a=i.handlethumbs,o=i.handlelabels;mb([0,1],function(r){var s=a[r];s.setstyle("fill",e.handlescolor[r]),s.position[1]=t[r];var l=uo(i.handlelabelpoints[r],xo(s,this.group));o[r].setstyle({x:l[0],y:l[1],text:n.formatvaluetext(this._datainterval[r]),textverticalalign:"middle",textalign:this._applytransform("horizontal"===this._orient?0===r?"bottom":"top":"left",i.bargroup)})},this)}},_showindicator:function(t,e,i,n){var a=this.visualmapmodel,o=a.getextent(),r=a.itemsize,s=[0,r[1]],l=sb(t,o,s,!0),u=this._shapes,h=u.indicator;if(h){h.position[1]=l,h.attr("invisible",!1),h.setshape("points",mw(!!i,n,l,r[1]));var c={convertopacitytoalpha:!0},d=this.getcontrollervisual(t,"color",c);h.setstyle("fill",d);var f=uo(u.indicatorlabelpoint,xo(h,this.group)),p=u.indicatorlabel;p.attr("invisible",!1);var g=this._applytransform("left",u.bargroup),m=this._orient;p.setstyle({text:(i?i:"")+a.formatvaluetext(e),textverticalalign:"horizontal"===m?g:"middle",textalign:"horizontal"===m?"center":g,x:f[0],y:f[1]})}},_enablehoverlinktoseries:function(){var t=this;this._shapes.bargroup.on("mousemove",function(e){if(t._hovering=!0,!t._dragging){var i=t.visualmapmodel.itemsize,n=t._applytransform([e.offsetx,e.offsety],t._shapes.bargroup,!0,!0);n[1]=ib(ab(0,n[1]),i[1]),t._dohoverlinktoseries(n[1],0<=n[0]&&n[0]<=i[0]) }}).on("mouseout",function(){t._hovering=!1,!t._dragging&&t._clearhoverlinktoseries()})},_enablehoverlinkfromseries:function(){var t=this.api.getzr();this.visualmapmodel.option.hoverlink?(t.on("mouseover",this._hoverlinkfromseriesmouseover,this),t.on("mouseout",this._hideindicator,this)):this._clearhoverlinkfromseries()},_dohoverlinktoseries:function(t,e){var i=this.visualmapmodel,n=i.itemsize;if(i.option.hoverlink){var a=[0,n[1]],o=i.getextent();t=ib(ab(a[0],t),a[1]);var r=iw(i,o,a),s=[t-r,t+r],l=sb(t,a,o,!0),u=[sb(s[0],a,o,!0),sb(s[1],a,o,!0)];s[0]a[1]&&(u[1]=1/0),e&&(u[0]===-1/0?this._showindicator(l,u[1],"< ",r):1/0===u[1]?this._showindicator(l,u[0],"> ",r):this._showindicator(l,l,"≈ ",r));var h=this._hoverlinkdataindices,c=[];(e||aw(i))&&(c=this._hoverlinkdataindices=i.findtargetdataindices(u));var d=jn(h,c);this._dispatchhighdown("downplay",ww(d[0],i)),this._dispatchhighdown("highlight",ww(d[1],i))}},_hoverlinkfromseriesmouseover:function(t){var e=t.target,i=this.visualmapmodel;if(e&&null!=e.dataindex){var n=this.ecmodel.getseriesbyindex(e.seriesindex);if(i.istargetseries(n)){var a=n.getdata(e.datatype),o=a.get(i.getdatadimension(a),e.dataindex,!0);isnan(o)||this._showindicator(o,o)}}},_hideindicator:function(){var t=this._shapes;t.indicator&&t.indicator.attr("invisible",!0),t.indicatorlabel&&t.indicatorlabel.attr("invisible",!0)},_clearhoverlinktoseries:function(){this._hideindicator();var t=this._hoverlinkdataindices;this._dispatchhighdown("downplay",ww(t,this.visualmapmodel)),t.length=0},_clearhoverlinkfromseries:function(){this._hideindicator();var t=this.api.getzr();t.off("mouseover",this._hoverlinkfromseriesmouseover),t.off("mouseout",this._hideindicator)},_applytransform:function(t,e,i,n){var a=xo(e,n?null:this.group);return _a[_(t)?"applytransform":"transformdirection"](t,a,i)},_dispatchhighdown:function(t,e){e&&e.length&&this.api.dispatchaction({type:t,batch:e})},dispose:function(){this._clearhoverlinkfromseries(),this._clearhoverlinktoseries()},remove:function(){this._clearhoverlinkfromseries(),this._clearhoverlinktoseries()}}),lb={type:"selectdatarange",event:"datarangeselected",update:"update"};gu(lb,function(t,e){e.eachcomponent({maintype:"visualmap",query:t},function(e){e.setselected(t.selected)})}),du(lb);{var kb=xb.extend({type:"visualmap.piecewise",defaultoption:{selected:null,minopen:!1,maxopen:!1,align:"auto",itemwidth:20,itemheight:14,itemsymbol:"roundrect",piecelist:null,categories:null,splitnumber:5,selectedmode:"multiple",itemgap:10,hoverlink:!0,showlabel:null},optionupdated:function(t,e){kb.superapply(this,"optionupdated",arguments),this._piecelist=[],this.resetextent();var i=this._mode=this._determinemode();pb[this._mode].call(this),this._resetselected(t,e);var a=this.option.categories;this.resetvisual(function(t,e){"categories"===i?(t.mappingmethod="category",t.categories=n(a)):(t.dataextent=this.getextent(),t.mappingmethod="piecewise",t.piecelist=p(this._piecelist,function(t){var t=n(t);return"inrange"!==e&&(t.visual=null),t}))})},completevisualoption:function(){function t(t,e,i){return t&&t[e]&&(s(t[e])?t[e].hasownproperty(i):t[e]===i)}var e=this.option,i={},n=kp.listvisualtypes(),a=this.iscategory();f(e.pieces,function(t){f(n,function(e){t.hasownproperty(e)&&(i[e]=1)})}),f(i,function(i,n){var o=0;f(this.statelist,function(i){o|=t(e,i,n)||t(e.target,i,n)},this),!o&&f(this.statelist,function(t){(e[t]||(e[t]={}))[n]=hb.get(n,"inrange"===t?"active":"inactive",a)})},this),xb.prototype.completevisualoption.apply(this,arguments)},_resetselected:function(t,e){var i=this.option,n=this._piecelist,a=(e?i:t).selected||{};if(i.selected=a,f(n,function(t){var e=this.getselectedmapkey(t);a.hasownproperty(e)||(a[e]=!0)},this),"single"===i.selectedmode){var o=!1;f(n,function(t){var e=this.getselectedmapkey(t);a[e]&&(o?a[e]=!1:o=!0)},this)}},getselectedmapkey:function(t){return"categories"===this._mode?t.value+"":t.index+""},getpiecelist:function(){return this._piecelist},_determinemode:function(){var t=this.option;return t.pieces&&t.pieces.length>0?"pieces":this.option.categories?"categories":"splitnumber"},setselected:function(t){this.option.selected=n(t)},getvaluestate:function(t){var e=kp.findpieceindex(t,this._piecelist);return null!=e&&this.option.selected[this.getselectedmapkey(this._piecelist[e])]?"inrange":"outofrange"},findtargetdataindices:function(t){var e=[];return this.eachtargetseries(function(i){var n=[],a=i.getdata();a.each(this.getdatadimension(a),function(e,i){var a=kp.findpieceindex(e,this._piecelist);a===t&&n.push(i)},this),e.push({seriesid:i.id,dataindex:n})},this),e},getrepresentvalue:function(t){var e;if(this.iscategory())e=t.value;else if(null!=t.value)e=t.value;else{var i=t.interval||[];e=i[0]===-1/0&&1/0===i[1]?0:(i[0]+i[1])/2}return e},getvisualmeta:function(t){function e(e,o){var r=a.getrepresentvalue({interval:e});o||(o=a.getvaluestate(r));var s=t(r,o);e[0]===-1/0?n[0]=s:1/0===e[1]?n[1]=s:i.push({value:e[0],color:s},{value:e[1],color:s})}if(!this.iscategory()){var i=[],n=[],a=this,o=this._piecelist.slice();if(o.length){var r=o[0].interval[0];r!==-1/0&&o.unshift({interval:[-1/0,r]}),r=o[o.length-1].interval[1],1/0!==r&&o.push({interval:[r,1/0]})}else o.push({interval:[-1/0,1/0]});var s=-1/0;return f(o,function(t){var i=t.interval;i&&(i[0]>s&&e([s,i[0]],"outofrange"),e(i.slice()),s=i[1])},this),{stops:i,outercolors:n}}}}),pb={splitnumber:function(){var t=this.option,e=this._piecelist,i=math.min(t.precision,20),n=this.getextent(),a=t.splitnumber;a=math.max(parseint(a,10),1),t.splitnumber=a;for(var o=(n[1]-n[0])/a;+o.tofixed(i)!==o&&5>i;)i++;t.precision=i,o=+o.tofixed(i);var r=0;t.minopen&&e.push({index:r++,interval:[-1/0,n[0]],close:[0,0]});for(var s=n[0],l=r+a;l>r;s+=o){var u=r===a-1?n[1]:s+o;e.push({index:r++,interval:[s,u],close:[1,1]})}t.maxopen&&e.push({index:r++,interval:[n[1],1/0],close:[0,0]}),mr(e),f(e,function(t){t.text=this.formatvaluetext(t.interval)},this)},categories:function(){var t=this.option;f(t.categories,function(t){this._piecelist.push({text:this.formatvaluetext(t,!0),value:t})},this),dw(t,this._piecelist)},pieces:function(){var t=this.option,e=this._piecelist;f(t.pieces,function(t,i){s(t)||(t={value:t});var n={text:"",index:i};if(null!=t.label&&(n.text=t.label),t.hasownproperty("value")){var a=n.value=t.value;n.interval=[a,a],n.close=[1,1]}else{for(var o=n.interval=[],r=n.close=[0,0],s=[1,0,1],l=[-1/0,1/0],u=[],h=0;2>h;h++){for(var c=[["gte","gt","min"],["lte","lt","max"]][h],d=0;3>d&&null==o[h];d++)o[h]=t[c[d]],r[h]=s[d],u[h]=2===d;null==o[h]&&(o[h]=l[h])}u[0]&&1/0===o[1]&&(r[0]=0),u[1]&&o[0]===-1/0&&(r[1]=0),o[0]===o[1]&&r[0]&&r[1]&&(n.value=o[0])}n.visual=kp.retrievevisuals(t),e.push(n)},this),dw(t,e),mr(e),f(e,function(t){var e=t.close,i=[["<","≤"][e[1]],[">","≥"][e[0]]];t.text=t.text||this.formatvaluetext(null!=t.value?t.value:t.interval,!1,i)},this)}};bb.extend({type:"visualmap.piecewise",dorender:function(){function t(t){var a=t.piece,u=new ss;u.onclick=y(this._onitemclick,this,a),this._enablehoverlink(u,t.indexinmodelpiecelist);var h=i.getrepresentvalue(a);if(this._createitemsymbol(u,h,[0,0,l[0],l[1]]),c){var d=this.visualmapmodel.getvaluestate(h);u.add(new ei({style:{x:"right"===s?-n:l[0]+n,y:l[1]/2,text:a.text,textverticalalign:"middle",textalign:s,textfont:o,textfill:r,opacity:"outofrange"===d?.5:1}}))}e.add(u)}var e=this.group;e.removeall();var i=this.visualmapmodel,n=i.get("textgap"),a=i.textstylemodel,o=a.getfont(),r=a.gettextcolor(),s=this._getitemalign(),l=i.itemsize,u=this._getviewdata(),h=u.endstext,c=d(i.get("showlabel",!0),!h);h&&this._renderendstext(e,h[0],l,c,s),f(u.viewpiecelist,t,this),h&&this._renderendstext(e,h[1],l,c,s),wa(i.get("orient"),e,i.get("itemgap")),this.renderbackground(e),this.positiongroup(e)},_enablehoverlink:function(t,e){function i(t){var i=this.visualmapmodel;i.option.hoverlink&&this.api.dispatchaction({type:t,batch:ww(i.findtargetdataindices(e),i)})}t.on("mouseover",y(i,this,"highlight")).on("mouseout",y(i,this,"downplay"))},_getitemalign:function(){var t=this.visualmapmodel,e=t.option;if("vertical"===e.orient)return _w(t,this.api,t.itemsize);var i=e.align;return i&&"auto"!==i||(i="left"),i},_renderendstext:function(t,e,i,n,a){if(e){var o=new ss,r=this.visualmapmodel.textstylemodel;o.add(new ei({style:{x:n?"right"===a?i[0]:0:i[0]/2,y:i[1]/2,textverticalalign:"middle",textalign:n?a:"center",text:e,textfont:r.getfont(),textfill:r.gettextcolor()}})),t.add(o)}},_getviewdata:function(){var t=this.visualmapmodel,e=p(t.getpiecelist(),function(t,e){return{piece:t,indexinmodelpiecelist:e}}),i=t.get("text"),n=t.get("orient"),a=t.get("inverse");return("horizontal"===n?a:!a)?e.reverse():i&&(i=i.slice().reverse()),{viewpiecelist:e,endstext:i}},_createitemsymbol:function(t,e,i){t.add(eh(this.getcontrollervisual(e,"symbol"),i[0],i[1],i[2],i[3],this.getcontrollervisual(e,"color")))},_onitemclick:function(t){var e=this.visualmapmodel,i=e.option,a=n(i.selected),o=e.getselectedmapkey(t);"single"===i.selectedmode?(a[o]=!0,f(a,function(t,e){a[e]=e===o})):a[o]=!a[o],this.api.dispatchaction({type:"selectdatarange",from:this.uid,visualmapid:this.visualmapmodel.id,selected:a})}})}du(lb);var ob=bu({type:"toolbox",layoutmode:{type:"box",ignoresize:!0},optionupdated:function(){ob.superapply(this,"optionupdated",arguments),f(this.option.feature,function(t,e){var i=gw(e);i&&a(t,i.defaultoption)})},defaultoption:{show:!0,z:6,zlevel:0,orient:"horizontal",left:"right",top:"top",backgroundcolor:"transparent",bordercolor:"#ccc",borderradius:0,borderwidth:0,padding:5,itemsize:15,itemgap:8,showtitle:!0,iconstyle:{bordercolor:"#666",color:"none"},emphasis:{iconstyle:{bordercolor:"#3e98c5"}},tooltip:{show:!1}}});su({type:"toolbox",render:function(t,e,i,n){function a(a,r){var s,l=c[a],d=c[r],f=u[l],p=new ir(f,t,t.ecmodel);if(l&&!d){if(cw(l))s={model:p,onclick:p.option.onclick,featurename:l};else{var g=gw(l);if(!g)return;s=new g(p,e,i)}h[l]=s}else{if(s=h[d],!s)return;s.model=p,s.ecmodel=e,s.api=i}return!l&&d?void(s.dispose&&s.dispose(e,i)):!p.get("show")||s.unusable?void(s.remove&&s.remove(e,i)):(o(p,s,l),p.seticonstatus=function(t,e){var i=this.option,n=this.iconpaths;i.iconstatus=i.iconstatus||{},i.iconstatus[t]=e,n[t]&&n[t].trigger(e)},void(s.render&&s.render(p,e,i,n)))}function o(n,a,o){var u=n.getmodel("iconstyle"),h=n.getmodel("emphasis.iconstyle"),c=a.geticons?a.geticons():n.get("icon"),d=n.get("title")||{};if("string"==typeof c){var p=c,g=d;c={},d={},c[o]=p,d[o]=g}var m=n.iconpaths={};f(c,function(o,c){var f=$o(o,{},{x:-l/2,y:-l/2,width:l,height:l});f.setstyle(u.getitemstyle()),f.hoverstyle=h.getitemstyle();var p=t.getmodel("tooltip");p&&p.get("show")&&f.attr("tooltip",r({content:d[c],formatter:p.get("formatter",!0)||function(){return d[c]},formatterparams:{componenttype:"toolbox",name:c,title:d[c],$vars:["name","title"]},position:p.get("position",!0)||"bottom"},p.option)),to(f),t.get("showtitle")&&(f.__title=d[c],f.on("mouseover",function(){var t=h.getitemstyle();f.setstyle({text:d[c],textposition:h.get("textposition")||"bottom",textfill:h.get("textfill")||t.fill||t.stroke||"#000",textalign:h.get("textalign")||"center",textbackgroundcolor:h.get("textbackgroundcolor"),textborderradius:h.get("textborderradius"),textpadding:h.get("textpadding")})}).on("mouseout",function(){f.setstyle({textfill:null,textbackgroundcolor:null})})),f.trigger(n.get("iconstatus."+c)||"normal"),s.add(f),f.on("click",y(a.onclick,a,e,i,c)),m[c]=f})}var s=this.group;if(s.removeall(),t.get("show")){var l=+t.get("itemsize"),u=t.get("feature")||{},h=this._features||(this._features={}),c=[];f(u,function(t,e){c.push(e)}),new lu(this._featurenames||[],c).add(a).update(a).remove(x(a,null)).execute(),this._featurenames=c,kx(s,t,i),s.add(px(s.getboundingrect(),t)),s.eachchild(function(t){var e=t.__title,n=t.hoverstyle;if(n&&e){var a=gi(e,en(n)),o=t.position[0]+s.position[0],r=t.position[1]+s.position[1]+l,u=!1;r+a.height>i.getheight()&&(n.textposition="top",u=!0);var h=u?-5-a.height:l+8;o+a.width/2>i.getwidth()?(n.textposition=["100%",h],n.textalign="right"):o-a.width/2<0&&(n.textposition=[0,h],n.textalign="left")}})}},updateview:function(t,e,i,n){f(this._features,function(t){t.updateview&&t.updateview(t.model,e,i,n)})},remove:function(t,e){f(this._features,function(i){i.remove&&i.remove(t,e)}),this.group.removeall()},dispose:function(t,e){f(this._features,function(i){i.dispose&&i.dispose(t,e)})}});var nb=zt.toolbox.saveasimage;lw.defaultoption={show:!0,icon:"m4.7,22.9l29.3,45.5l54.7,23.4m4.6,43.6l4.6,58l53.8,58l53.8,43.6m29.2,45.1l29.2,0",title:nb.title,type:"png",connectedbackgroundcolor:"#fff",name:"",excludecomponents:["toolbox"],pixelratio:1,lang:nb.lang.slice()},lw.prototype.unusable=!hb.canvassupported;var zb=lw.prototype;zb.onclick=function(t,e){var i=this.model,n=i.get("name")||t.get("title.0.text")||"echarts",a=i.get("type",!0)||"png",o=e.getconnecteddataurl({type:a,backgroundcolor:i.get("backgroundcolor",!0)||t.get("backgroundcolor")||"#fff",connectedbackgroundcolor:i.get("connectedbackgroundcolor"),excludecomponents:i.get("excludecomponents"),pixelratio:i.get("pixelratio")});if("function"!=typeof mouseevent||hb.browser.ie||hb.browser.edge)if(window.navigator.mssaveoropenblob){for(var r=atob(o.split(",")[1]),s=r.length,l=new uint8array(s);s--;)l[s]=r.charcodeat(s);var u=new blob([l]);window.navigator.mssaveoropenblob(u,n+"."+a)}else{var h=i.get("lang"),c='',d=window.open();d.document.write(c)}else{var f=document.createelement("a");f.download=n+"."+a,f.target="_blank",f.href=o;var p=new mouseevent("click",{view:window,bubbles:!0,cancelable:!1});f.dispatchevent(p)}},pw("saveasimage",lw);var rb=zt.toolbox.magictype;kw.defaultoption={show:!0,type:[],icon:{line:"m4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9m4.1,58h51.4",bar:"m6.7,22.9h10v48h-10v22.9zm24.9,13h10v35h-10v13zm43.2,2h10v46h-10v2zm3.1,58h53.7",stack:"m8.2,38.4l-8.4,4.1l30.6,15.3l60,42.5l-8.1-4.1l-21.5,11l8.2,38.4z m51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9l8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2l51.9,30z m51.9,21.7l-8.1,4.2l35.7,30l-5.3,2.8l24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2l8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1l51.9,21.7zm30.4,2.2l-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1l30.4,2.2z",tiled:"m2.3,2.2h22.8v25h2.3v2.2z m35,2.2h22.8v25h35v2.2zm2.3,35h22.8v22.8h2.3v35z m35,35h22.8v22.8h35v35z"},title:n(rb.title),option:{},seriesindex:{}};var eb=kw.prototype;eb.geticons=function(){var t=this.model,e=t.get("icon"),i={};return f(t.get("type"),function(t){e[t]&&(i[t]=e[t])}),i};var bb={line:function(t,e,i,n){return"bar"===t?a({id:e,type:"line",data:i.get("data"),stack:i.get("stack"),markpoint:i.get("markpoint"),markline:i.get("markline")},n.get("option.line")||{},!0):void 0},bar:function(t,e,i,n){return"line"===t?a({id:e,type:"bar",data:i.get("data"),stack:i.get("stack"),markpoint:i.get("markpoint"),markline:i.get("markline")},n.get("option.bar")||{},!0):void 0},stack:function(t,e,i,n){return"line"===t||"bar"===t?a({id:e,stack:"__ec_magictype_stack__"},n.get("option.stack")||{},!0):void 0},tiled:function(t,e,i,n){return"line"===t||"bar"===t?a({id:e,stack:""},n.get("option.tiled")||{},!0):void 0}},vb=[["line","bar"],["stack","tiled"]];eb.onclick=function(t,e,i){var n=this.model,a=n.get("seriesindex."+i);if(bb[i]){var o={series:[]},r=function(e){var a=e.subtype,r=e.id,l=bb[i](a,r,e,n);l&&(s(l,e.option),o.series.push(l));var u=e.coordinatesystem;if(u&&"cartesian2d"===u.type&&("line"===i||"bar"===i)){var h=u.getaxesbyscale("ordinal")[0];if(h){var c=h.dim,d=c+"axis",f=t.querycomponents({maintype:d,index:e.get(name+"index"),id:e.get(name+"id")})[0],p=f.componentindex;o[d]=o[d]||[];for(var g=0;p>=g;g++)o[d][p]=o[d][p]||{};o[d][p].boundarygap="bar"===i}}};f(vb,function(t){u(t,i)>=0&&f(t,function(t){n.seticonstatus(t,"normal")})}),n.seticonstatus(i,"emphasis"),t.eachcomponent({maintype:"series",query:null==a?null:{seriesindex:a}},r),e.dispatchaction({type:"changemagictype",currenttype:i,newoption:o})}},gu({type:"changemagictype",event:"magictypechanged",update:"prepareandupdate"},function(t,e){e.mergeoption(t.newoption)}),pw("magictype",kw);var gb=zt.toolbox.dataview,fb=new array(60).join("-"),wb=" ",hb=new regexp("["+wb+"]+","g");fw.defaultoption={show:!0,readonly:!1,optiontocontent:null,contenttooption:null,icon:"m17.5,17.3h33 m17.5,17.3h33 m45.4,29.5h-28 m11.5,2v56h51v14.8l38.4,2h11.5z m38.4,2.2v12.7h51 m45.4,41.7h-28",title:n(gb.title),lang:n(gb.lang),backgroundcolor:"#fff",textcolor:"#000",textareacolor:"#fff",textareabordercolor:"#333",buttoncolor:"#c23531",buttontextcolor:"#fff"},fw.prototype.onclick=function(t,e){function i(){n.removechild(o),x._dom=null}var n=e.getdom(),a=this.model;this._dom&&n.removechild(this._dom);var o=document.createelement("div");o.style.csstext="position:absolute;left:5px;top:5px;bottom:5px;right:5px;",o.style.backgroundcolor=a.get("backgroundcolor")||"#fff";var r=document.createelement("h4"),s=a.get("lang")||[];r.innerhtml=s[0]||a.get("title"),r.style.csstext="margin: 10px 20px;",r.style.color=a.get("textcolor");var l=document.createelement("div"),u=document.createelement("textarea");l.style.csstext="display:block;width:100%;overflow:auto;";var h=a.get("optiontocontent"),c=a.get("contenttooption"),d=zw(t);if("function"==typeof h){var f=h(e.getoption());"string"==typeof f?l.innerhtml=f:a(f)&&l.appendchild(f)}else l.appendchild(u),u.readonly=a.get("readonly"),u.style.csstext="width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;",u.style.color=a.get("textcolor"),u.style.bordercolor=a.get("textareabordercolor"),u.style.backgroundcolor=a.get("textareacolor"),u.value=d.value;var p=d.meta,g=document.createelement("div");g.style.csstext="position:absolute;bottom:0;left:0;right:0;";var m="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",v=document.createelement("div"),y=document.createelement("div");m+=";background-color:"+a.get("buttoncolor"),m+=";color:"+a.get("buttontextcolor");var x=this;xe(v,"click",i),xe(y,"click",function(){var t;try{t="function"==typeof c?c(l,e.getoption()):gw(u.value,p)}catch(n){throw i(),new error("data view format error "+n)}t&&e.dispatchaction({type:"changedataview",newoption:t}),i()}),v.innerhtml=s[1],y.innerhtml=s[2],y.style.csstext=m,v.style.csstext=m,!a.get("readonly")&&g.appendchild(y),g.appendchild(v),o.appendchild(r),o.appendchild(l),o.appendchild(g),l.style.height=n.clientheight-80+"px",n.appendchild(o),this._dom=o},fw.prototype.remove=function(t,e){this._dom&&e.getdom().removechild(this._dom)},fw.prototype.dispose=function(t,e){this.remove(t,e)},pw("dataview",fw),gu({type:"changedataview",event:"dataviewchanged",update:"prepareandupdate"},function(t,e){var i=[];f(t.newoption.series,function(t){var n=e.getseriesbyname(t.name)[0];if(n){var a=n.get("data");i.push({name:t.name,data:ww(t.data,a)})}else i.push(r({type:"scatter"},t))}),e.mergeoption(s({series:i},t.newoption))});var zb=f,xb="\x00_ec_hist_store";ve.extend({type:"datazoom.select"}),ye.extend({type:"datazoom.select"});var ub=zt.toolbox.datazoom,yb=f,jb="\x00_ec_\x00toolbox-datazoom_";jw.defaultoption={show:!0,filtermode:"filter",icon:{zoom:"m0,13.5h26.9 m13.5,26.9v0 m32.1,13.5h58v58h13.5 v32.1",back:"m22,1.4l9.9,13.5l12.3,12.3 m10.3,13.5h54.9v44.6 h10.3v-26"},title:n(ub.title)};var qb=jw.prototype;qb.render=function(t,e,i,n){this.model=t,this.ecmodel=e,this.api=i,$w(t,e,this,n,i),kw(t,e)},qb.onclick=function(t,e,i){kb[i].call(this)},qb.remove=function(){this._brushcontroller.unmount()},qb.dispose=function(){this._brushcontroller.dispose()};var kb={zoom:function(){var t=!this._iszoomactive;this.api.dispatchaction({type:"takeglobalcursor",key:"datazoomselect",datazoomselectactive:t})},back:function(){this._dispatchzoomaction(zw(this.ecmodel))}};qb._onbrush=function(t,e){function i(t,e,i){var r=e.getaxis(t),s=r.model,l=n(t,s,o),u=l.findrepresentativeaxisproxy(s).getminmaxspan();(null!=u.minvaluespan||null!=u.maxvaluespan)&&(i=dn(0,i.slice(),r.scale.getextent(),0,u.minvaluespan,u.maxvaluespan)),l&&(a[l.id]={datazoomid:l.id,startvalue:i[0],endvalue:i[1]})}function n(t,e,i){var n;return i.eachcomponent({maintype:"datazoom",subtype:"select"},function(i){var a=i.getaxismodel(t,e.componentindex);a&&(n=i)}),n}if(e.isend&&t.length){var a={},o=this.ecmodel;this._brushcontroller.updatecovers([]);var r=new j_(qw(this.model.option),o,{include:["grid"]});r.matchoutputranges(t,o,function(t,e,n){if("cartesian2d"===n.type){var a=t.brushtype;"rect"===a?(i("x",n,e[0]),i("y",n,e[1])):i({linex:"x",liney:"y"}[a],n,e)}}),hw(o,a),this._dispatchzoomaction(a)}},qb._dispatchzoomaction=function(t){var e=[];yb(t,function(t){e.push(n(t))}),e.length&&this.api.dispatchaction({type:"datazoom",from:this.uid,batch:e})},pw("datazoom",jw),du(function(t){function e(t,e){if(e){var a=t+"index",o=e[a];null==o||"all"===o||_(o)||(o=o===!1||"none"===o?[]:[o]),i(t,function(i,r){if(null==o||"all"===o||-1!==u(o,r)){var s={type:"select",$fromtoolbox:!0,filtermode:e.filtermode||"filter",id:jb+t+r};s[a]=r,n.push(s)}})}}function i(e,i){var n=t[e];_(n)||(n=n?[n]:[]),yb(n,i)}if(t){var n=t.datazoom||(t.datazoom=[]);_(n)||(t.datazoom=n=[n]);var a=t.toolbox;if(a&&(_(a)&&(a=a[0]),a&&a.feature)){var o=a.feature.datazoom;e("xaxis",o),e("yaxis",o)}}});var $b=zt.toolbox.restore;jw.defaultoption={show:!0,icon:"m3.8,33.4 m47,18.9h9.8v8.7 m56.3,20.1 c52.1,9,40.5,0.6,26.8,2.1c12.6,3.7,1.6,16.2,2.1,30.6 m13,41.1h3.1v10.2 m3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:$b.title};var jb=jw.prototype;jb.onclick=function(t,e){xw(t),e.dispatchaction({type:"restore",from:this.uid})},pw("restore",jw),gu({type:"restore",event:"restore",update:"prepareandupdate"},function(t,e){e.resetoption("recreate")});var qb={path:null,compoundpath:null,group:ss,image:sn,text:ei};du(function(t){var e=t.graphic;_(e)?t.graphic=e[0]&&e[0].elements?[t.graphic[0]]:[{elements:e}]:e&&!e.elements&&(t.graphic=[{elements:[e]}])});var tv=bu({type:"graphic",defaultoption:{elements:[],parentid:null},_eloptionstoupdate:null,mergeoption:function(){var t=this.option.elements;this.option.elements=null,tv.superapply(this,"mergeoption",arguments),this.option.elements=t},optionupdated:function(t,e){var i=this.option,n=(e?i:t).elements,a=i.elements=e?[]:i.elements,o=[];this._flatten(n,o);var r=zn(a,o);xn(r);var s=this._eloptionstoupdate=[];f(r,function(t,e){var i=t.option;i&&(s.push(i),nb(t,i),ab(a,e,i),ob(a[e],i))},this);for(var l=a.length-1;l>=0;l--)null==a[l]?a.splice(l,1):delete a[l].$action},_flatten:function(t,e,i){f(t,function(t){if(t){i&&(t.parentoption=i),e.push(t);var n=t.children;"group"===t.type&&n&&this._flatten(n,e,t),delete t.children}},this)},useeloptionstoupdate:function(){var t=this._eloptionstoupdate;return this._eloptionstoupdate=null,t}});su({type:"graphic",init:function(){this._elmap=b(),this._lastgraphicmodel},render:function(t,e,i){t!==this._lastgraphicmodel&&this._clear(),this._lastgraphicmodel=t,this._updateelements(t),this._relocate(t,i)},_updateelements:function(t){var e=t.useeloptionstoupdate();if(e){var i=this._elmap,n=this.group;f(e,function(e){var a=e.$action,o=e.id,r=i.get(o),s=e.parentid,l=null!=s?i.get(s):n,u=e.style;"text"===e.type&&u&&(e.hv&&e.hv[1]&&(u.textverticalalign=u.textbaseline=null),!u.hasownproperty("textfill")&&u.fill&&(u.textfill=u.fill),!u.hasownproperty("textstroke")&&u.stroke&&(u.textstroke=u.stroke));var h=eb(e);a&&"merge"!==a?"replace"===a?(tb(r,i),qw(o,l,h,i)):"remove"===a&&tb(r,i):r?r.attr(h):qw(o,l,h,i);var c=i.get(o);c&&(c.__ecgraphicwidthoption=e.width,c.__ecgraphicheightoption=e.height,rb(c,t,e))})}},_relocate:function(t,e){for(var i=t.option.elements,n=this.group,a=this._elmap,o=e.getwidth(),r=e.getheight(),s=0;s=0;s--){var l=i[s],u=a.get(l.id);if(u){var h=u.parent,d=h===n?{width:o,height:r}:{width:h.__ecgraphicwidth,height:h.__ecgraphicheight};gr(u,l,d,null,{hv:l.hv,boundingmode:l.bounding})}}},_clear:function(){var t=this._elmap;t.each(function(e){tb(e,t)}),this._elmap=b()},dispose:function(){this._clear()}}),t.version=bd,t.dependencies=sd,t.priority=rd,t.init=ou,t.connect=ru,t.disconnect=su,t.disconnect=ic,t.dispose=lu,t.getinstancebydom=uu,t.getinstancebyid=hu,t.registertheme=cu,t.registerpreprocessor=du,t.registerprocessor=fu,t.registerpostupdate=pu,t.registeraction=gu,t.registercoordinatesystem=mu,t.getcoordinatesystemdimensions=vu,t.registerlayout=yu,t.registervisual=xu,t.registerloading=wu,t.extendcomponentmodel=bu,t.extendcomponentview=su,t.extendseriesmodel=mu,t.extendchartview=iu,t.setcanvascreator=au,t.registermap=tu,t.getmap=du,t.datatool=nc,t.zrender=_m,t.number=ka,t.format=ba,t.throttle=sl,t.helper=al,t.matrix=xb,t.vector=lb,t.color=hs,t.parsegeojson=rl,t.parsegeojson=hl,t.util=cl,t.graphic=dl,t.list=gc,t.model=ir,t.axis=ul,t.env=hb});