/* * licensed to the apache software foundation (asf) under one * or more contributor license agreements. see the notice file * distributed with this work for additional information * regarding copyright ownership. the asf licenses this file * to you under the apache license, version 2.0 (the * "license"); you may not use this file except in compliance * with the license. you may obtain a copy of the license at * * http://www.apache.org/licenses/license-2.0 * * unless required by applicable law or agreed to in writing, * software distributed under the license is distributed on an * "as is" basis, without warranties or conditions of any * kind, either express or implied. see the license for the * specific language governing permissions and limitations * under the license. */ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalthis?globalthis:t||self).echarts={})}(this,(function(t){"use strict"; /*! ***************************************************************************** copyright (c) microsoft corporation. permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. the software is provided "as is" and the author disclaims all warranties with regard to this software including all implied warranties of merchantability and fitness. in no event shall the author be liable for any special, direct, indirect, or consequential damages or any damages whatsoever resulting from loss of use, data or profits, whether in an action of contract, negligence or other tortious action, arising out of or in connection with the use or performance of this software. ***************************************************************************** */var e=function(t,n){return(e=object.setprototypeof||{__proto__:[]}instanceof array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)object.prototype.hasownproperty.call(e,n)&&(t[n]=e[n])})(t,n)};function n(t,n){if("function"!=typeof n&&null!==n)throw new typeerror("class extends value "+string(n)+" is not a constructor or null");function i(){this.constructor=t}e(t,n),t.prototype=null===n?object.create(n):(i.prototype=n.prototype,new i)}var i=function(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newedge=!1,this.wechat=!1},r=new function(){this.browser=new i,this.node=!1,this.wxa=!1,this.worker=!1,this.svgsupported=!1,this.toucheventssupported=!1,this.pointereventssupported=!1,this.domsupported=!1,this.transformsupported=!1,this.transform3dsupported=!1,this.hasglobalwindow="undefined"!=typeof window};"object"==typeof wx&&"function"==typeof wx.getsysteminfosync?(r.wxa=!0,r.toucheventssupported=!0):"undefined"==typeof document&&"undefined"!=typeof self?r.worker=!0:"undefined"==typeof navigator?(r.node=!0,r.svgsupported=!0):function(t,e){var n=e.browser,i=t.match(/firefox\/([\d.]+)/),r=t.match(/msie\s([\d.]+)/)||t.match(/trident\/.+?rv:(([\d.]+))/),o=t.match(/edge?\/([\d.]+)/),a=/micromessenger/i.test(t);i&&(n.firefox=!0,n.version=i[1]);r&&(n.ie=!0,n.version=r[1]);o&&(n.edge=!0,n.version=o[1],n.newedge=+o[1].split(".")[0]>18);a&&(n.wechat=!0);e.svgsupported="undefined"!=typeof svgrect,e.toucheventssupported="ontouchstart"in window&&!n.ie&&!n.edge,e.pointereventssupported="onpointerdown"in window&&(n.edge||n.ie&&+n.version>=11),e.domsupported="undefined"!=typeof document;var s=document.documentelement.style;e.transform3dsupported=(n.ie&&"transition"in s||n.edge||"webkitcssmatrix"in window&&"m11"in new webkitcssmatrix||"mozperspective"in s)&&!("otransition"in s),e.transformsupported=e.transform3dsupported||n.ie&&+n.version>=9}(navigator.useragent,r);var o="sans-serif",a="12px sans-serif";var s,l,u=function(t){var e={};if("undefined"==typeof json)return e;for(var n=0;n=0)o=r*t.length;else for(var c=0;c>1)%2;a.style.csstext=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",i[s]+":0",r[l]+":0",i[1-s]+":auto",r[1-l]+":auto",""].join("!important;"),t.appendchild(a),n.push(a)}return n}(e,a),a,o);if(s)return s(t,n,i),!0}return!1}function jt(t){return"canvas"===t.nodename.touppercase()}var qt=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,te=[],ee=r.browser.firefox&&+r.browser.version.split(".")[0]<39;function ne(t,e,n,i){return n=n||{},i?ie(t,e,n):ee&&null!=e.layerx&&e.layerx!==e.offsetx?(n.zrx=e.layerx,n.zry=e.layery):null!=e.offsetx?(n.zrx=e.offsetx,n.zry=e.offsety):ie(t,e,n),n}function ie(t,e,n){if(r.domsupported&&t.getboundingclientrect){var i=e.clientx,o=e.clienty;if(jt(t)){var a=t.getboundingclientrect();return n.zrx=i-a.left,void(n.zry=o-a.top)}if($t(te,t,i,o))return n.zrx=te[0],void(n.zry=te[1])}n.zrx=n.zry=0}function re(t){return t||window.event}function oe(t,e,n){if(null!=(e=re(e)).zrx)return e;var i=e.type;if(i&&i.indexof("touch")>=0){var r="touchend"!==i?e.targettouches[0]:e.changedtouches[0];r&&ne(t,r,e,n)}else{ne(t,e,e,n);var o=function(t){var e=t.wheeldelta;if(e)return e;var n=t.deltax,i=t.deltay;if(null==n||null==i)return e;return 3*(0!==i?math.abs(i):math.abs(n))*(i>0?-1:i<0?1:n>0?-1:1)}(e);e.zrdelta=o?o/120:-(e.detail||0)/3}var a=e.button;return null==e.which&&void 0!==a&&qt.test(e.type)&&(e.which=1&a?1:2&a?3:4&a?2:0),e}function ae(t,e,n,i){t.addeventlistener(e,n,i)}var se=function(t){t.preventdefault(),t.stoppropagation(),t.cancelbubble=!0};function le(t){return 2===t.which||3===t.which}var ue=function(){function t(){this._track=[]}return t.prototype.recognize=function(t,e,n){return this._dotrack(t,e,n),this._recognize(t)},t.prototype.clear=function(){return this._track.length=0,this},t.prototype._dotrack=function(t,e,n){var i=t.touches;if(i){for(var r={points:[],touches:[],target:e,event:t},o=0,a=i.length;o1&&r&&r.length>1){var a=he(r)/he(o);!isfinite(a)&&(a=1),e.pinchscale=a;var s=[((i=r)[0][0]+i[1][0])/2,(i[0][1]+i[1][1])/2];return e.pinchx=s[0],e.pinchy=s[1],{type:"pinch",target:t[0].target,event:e}}}}},pe="silent";function de(){se(this.event)}var fe=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.handler=null,e}return n(e,t),e.prototype.dispose=function(){},e.prototype.setcursor=function(){},e}(xt),ge=function(t,e){this.x=t,this.y=e},ye=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],ve=function(t){function e(e,n,i,r){var o=t.call(this)||this;return o._hovered=new ge(0,0),o.storage=e,o.painter=n,o.painterroot=r,i=i||new fe,o.proxy=null,o.sethandlerproxy(i),o._draggingmgr=new ut(o),o}return n(e,t),e.prototype.sethandlerproxy=function(t){this.proxy&&this.proxy.dispose(),t&&(e(ye,(function(e){t.on&&t.on(e,this[e],this)}),this),t.handler=this),this.proxy=t},e.prototype.mousemove=function(t){var e=t.zrx,n=t.zry,i=xe(this,e,n),r=this._hovered,o=r.target;o&&!o.__zr&&(o=(r=this.findhover(r.x,r.y)).target);var a=this._hovered=i?new ge(e,n):this.findhover(e,n),s=a.target,l=this.proxy;l.setcursor&&l.setcursor(s?s.cursor:"default"),o&&s!==o&&this.dispatchtoelement(r,"mouseout",t),this.dispatchtoelement(a,"mousemove",t),s&&s!==o&&this.dispatchtoelement(a,"mouseover",t)},e.prototype.mouseout=function(t){var e=t.zreventcontrol;"only_globalout"!==e&&this.dispatchtoelement(this._hovered,"mouseout",t),"no_globalout"!==e&&this.trigger("globalout",{type:"globalout",event:t})},e.prototype.resize=function(){this._hovered=new ge(0,0)},e.prototype.dispatch=function(t,e){var n=this[t];n&&n.call(this,e)},e.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},e.prototype.setcursorstyle=function(t){var e=this.proxy;e.setcursor&&e.setcursor(t)},e.prototype.dispatchtoelement=function(t,e,n){var i=(t=t||{}).target;if(!i||!i.silent){for(var r="on"+e,o=function(t,e,n){return{type:t,event:n,target:e.target,toptarget:e.toptarget,cancelbubble:!1,offsetx:n.zrx,offsety:n.zry,gestureevent:n.gestureevent,pinchx:n.pinchx,pinchy:n.pinchy,pinchscale:n.pinchscale,wheeldelta:n.zrdelta,zrbytouch:n.zrbytouch,which:n.which,stop:de}}(e,t,n);i&&(i[r]&&(o.cancelbubble=!!i[r].call(i,o)),i.trigger(e,o),i=i.__hosttarget?i.__hosttarget:i.parent,!o.cancelbubble););o.cancelbubble||(this.trigger(e,o),this.painter&&this.painter.eachotherlayer&&this.painter.eachotherlayer((function(t){"function"==typeof t[r]&&t[r].call(t,o),t.trigger&&t.trigger(e,o)})))}},e.prototype.findhover=function(t,e,n){for(var i=this.storage.getdisplaylist(),r=new ge(t,e),o=i.length-1;o>=0;o--){var a=void 0;if(i[o]!==n&&!i[o].ignore&&(a=me(i[o],t,e))&&(!r.toptarget&&(r.toptarget=i[o]),a!==pe)){r.target=i[o];break}}return r},e.prototype.processgesture=function(t,e){this._gesturemgr||(this._gesturemgr=new ue);var n=this._gesturemgr;"start"===e&&n.clear();var i=n.recognize(t,this.findhover(t.zrx,t.zry,null).target,this.proxy.dom);if("end"===e&&n.clear(),i){var r=i.type;t.gestureevent=r;var o=new ge;o.target=i.target,this.dispatchtoelement(o,r,i.event)}},e}(xt);function me(t,e,n){if(t[t.recthover?"rectcontain":"contain"](e,n)){for(var i=t,r=void 0,o=!1;i;){if(i.ignoreclip&&(o=!0),!o){var a=i.getclippath();if(a&&!a.contain(e,n))return!1;i.silent&&(r=!0)}var s=i.__hosttarget;i=s||i.parent}return!r||pe}return!1}function xe(t,e,n){var i=t.painter;return e<0||e>i.getwidth()||n<0||n>i.getheight()}e(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],(function(t){ve.prototype[t]=function(e){var n,i,r=e.zrx,o=e.zry,a=xe(this,r,o);if("mouseup"===t&&a||(i=(n=this.findhover(r,o)).target),"mousedown"===t)this._downel=i,this._downpoint=[e.zrx,e.zry],this._upel=i;else if("mouseup"===t)this._upel=i;else if("click"===t){if(this._downel!==this._upel||!this._downpoint||et(this._downpoint,[e.zrx,e.zry])>4)return;this._downpoint=null}this.dispatchtoelement(n,t,e)}}));function _e(t,e,n,i){var r=e+1;if(r===n)return 1;if(i(t[r++],t[e])<0){for(;r=0;)r++;return r-e}function be(t,e,n,i,r){for(i===e&&i++;i>>1])<0?l=o:s=o+1;var u=i-s;switch(u){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;u>0;)t[s+u]=t[s+u-1],u--}t[s]=a}}function we(t,e,n,i,r,o){var a=0,s=0,l=1;if(o(t,e[n+r])>0){for(s=i-r;l0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),a+=r,l+=r}else{for(s=r+1;ls&&(l=s);var u=a;a=r-l,l=r-u}for(a++;a>>1);o(t,e[n+h])>0?a=h+1:l=h}return l}function se(t,e,n,i,r,o){var a=0,s=0,l=1;if(o(t,e[n+r])<0){for(s=r+1;ls&&(l=s);var u=a;a=r-l,l=r-u}else{for(s=i-r;l=0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),a+=r,l+=r}for(a++;a>>1);o(t,e[n+h])<0?l=h:a=h+1}return l}function me(t,e){var n,i,r=7,o=0;t.length;var a=[];function s(s){var l=n[s],u=i[s],h=n[s+1],c=i[s+1];i[s]=u+c,s===o-3&&(n[s+1]=n[s+2],i[s+1]=i[s+2]),o--;var p=se(t[h],t,l,u,0,e);l+=p,0!==(u-=p)&&0!==(c=we(t[l+u-1],t,h,c,c-1,e))&&(u<=c?function(n,i,o,s){var l=0;for(l=0;l=7||d>=7);if(f)break;g<0&&(g=0),g+=2}if((r=g)<1&&(r=1),1===i){for(l=0;l=0;l--)t[d+l]=t[p+l];return void(t[c]=a[h])}var f=r;for(;;){var g=0,y=0,v=!1;do{if(e(a[h],t[u])<0){if(t[c--]=t[u--],g++,y=0,0==--i){v=!0;break}}else if(t[c--]=a[h--],y++,g=0,1==--s){v=!0;break}}while((g|y)=0;l--)t[d+l]=t[p+l];if(0===i){v=!0;break}}if(t[c--]=a[h--],1==--s){v=!0;break}if(0!==(y=s-we(t[u],a,0,s,s-1,e))){for(s-=y,d=(c-=y)+1,p=(h-=y)+1,l=0;l=7||y>=7);if(v)break;f<0&&(f=0),f+=2}(r=f)<1&&(r=1);if(1===s){for(d=(c-=i)+1,p=(u-=i)+1,l=i-1;l>=0;l--)t[d+l]=t[p+l];t[c]=a[h]}else{if(0===s)throw new error;for(p=c-(s-1),l=0;l1;){var t=o-2;if(t>=1&&i[t-1]<=i[t]+i[t+1]||t>=2&&i[t-2]<=i[t]+i[t-1])i[t-1]i[t+1])break;s(t)}},forcemergeruns:function(){for(;o>1;){var t=o-2;t>0&&i[t-1]=32;)e|=1&t,t>>=1;return t+e}(r);do{if((o=_e(t,n,i,e))s&&(l=s),be(t,n,n+l,n+o,e),o=l}a.pushrun(n,o),a.mergeruns(),r-=o,n+=o}while(0!==r);a.forcemergeruns()}}}var te=!1;function ce(){te||(te=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function de(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}var ae=function(){function t(){this._roots=[],this._displaylist=[],this._displaylistlen=0,this.displayablesortfunc=de}return t.prototype.traverse=function(t,e){for(var n=0;n0&&(u.__clippaths=[]),isnan(u.z)&&(ce(),u.z=0),isnan(u.z2)&&(ce(),u.z2=0),isnan(u.zlevel)&&(ce(),u.zlevel=0),this._displaylist[this._displaylistlen++]=u}var h=t.getdecalelement&&t.getdecalelement();h&&this._updateandadddisplayable(h,e,n);var c=t.gettextguideline();c&&this._updateandadddisplayable(c,e,n);var p=t.gettextcontent();p&&this._updateandadddisplayable(p,e,n)}},t.prototype.addroot=function(t){t.__zr&&t.__zr.storage===this||this._roots.push(t)},t.prototype.delroot=function(t){if(t instanceof array)for(var e=0,n=t.length;e=0&&this._roots.splice(i,1)}},t.prototype.delallroots=function(){this._roots=[],this._displaylist=[],this._displaylistlen=0},t.prototype.getroots=function(){return this._roots},t.prototype.dispose=function(){this._displaylist=null,this._roots=null},t}(),ke=r.hasglobalwindow&&(window.requestanimationframe&&window.requestanimationframe.bind(window)||window.msrequestanimationframe&&window.msrequestanimationframe.bind(window)||window.mozrequestanimationframe||window.webkitrequestanimationframe)||function(t){return settimeout(t,16)},le={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*(2-math.pow(2,-10*(t-1)))},circularin:function(t){return 1-math.sqrt(1-t*t)},circularout:function(t){return math.sqrt(1- --t*t)},circularinout:function(t){return(t*=2)<1?-.5*(math.sqrt(1-t*t)-1):.5*(math.sqrt(1-(t-=2)*t)+1)},elasticin:function(t){var e,n=.1;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=.1):e=.4*math.asin(1/n)/(2*math.pi),-n*math.pow(2,10*(t-=1))*math.sin((t-e)*(2*math.pi)/.4))},elasticout:function(t){var e,n=.1;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=.1):e=.4*math.asin(1/n)/(2*math.pi),n*math.pow(2,-10*t)*math.sin((t-e)*(2*math.pi)/.4)+1)},elasticinout:function(t){var e,n=.1,i=.4;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=.1):e=i*math.asin(1/n)/(2*math.pi),(t*=2)<1?n*math.pow(2,10*(t-=1))*math.sin((t-e)*(2*math.pi)/i)*-.5:n*math.pow(2,-10*(t-=1))*math.sin((t-e)*(2*math.pi)/i)*.5+1)},backin:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backout:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},backinout:function(t){var e=2.5949095;return(t*=2)<1?t*t*((e+1)*t-e)*.5:.5*((t-=2)*t*((e+1)*t+e)+2)},bouncein:function(t){return 1-le.bounceout(1-t)},bounceout:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bounceinout:function(t){return t<.5?.5*le.bouncein(2*t):.5*le.bounceout(2*t-1)+.5}},pe=math.pow,oe=math.sqrt,re=1e-8,ne=1e-4,ee=oe(3),ze=1/3,ve=wt(),be=wt(),fe=wt();function ge(t){return t>-1e-8&&tre||t<-1e-8}function he(t,e,n,i,r){var o=1-r;return o*o*(o*t+3*r*e)+r*r*(r*i+3*o*n)}function ye(t,e,n,i,r){var o=1-r;return 3*(((e-t)*o+2*(n-e)*r)*o+(i-n)*r*r)}function ue(t,e,n,i,r,o){var a=i+3*(e-n)-t,s=3*(n-2*e+t),l=3*(e-t),u=t-r,h=s*s-3*a*l,c=s*l-9*a*u,p=l*l-3*s*u,d=0;if(ge(h)&&ge(c)){if(ge(s))o[0]=0;else(m=-l/s)>=0&&m<=1&&(o[d++]=m)}else{var f=c*c-4*h*p;if(ge(f)){var g=c/h,y=-g/2;(m=-s/a+g)>=0&&m<=1&&(o[d++]=m),y>=0&&y<=1&&(o[d++]=y)}else if(f>0){var v=oe(f),m=h*s+1.5*a*(-c+v),x=h*s+1.5*a*(-c-v);(m=(-s-((m=m<0?-pe(-m,ze):pe(m,ze))+(x=x<0?-pe(-x,ze):pe(x,ze))))/(3*a))>=0&&m<=1&&(o[d++]=m)}else{var _=(2*h*s-3*a*c)/(2*oe(h*h*h)),b=math.acos(_)/3,w=oe(h),s=math.cos(b),m=(-s-2*w*s)/(3*a),i=(y=(-s+w*(s+ee*math.sin(b)))/(3*a),(-s+w*(s-ee*math.sin(b)))/(3*a));m>=0&&m<=1&&(o[d++]=m),y>=0&&y<=1&&(o[d++]=y),i>=0&&i<=1&&(o[d++]=i)}}return d}function xe(t,e,n,i,r){var o=6*n-12*e+6*t,a=9*e+3*i-3*t-9*n,s=3*e-3*t,l=0;if(ge(a)){if(we(o))(h=-s/o)>=0&&h<=1&&(r[l++]=h)}else{var u=o*o-4*a*s;if(ge(u))r[0]=-o/(2*a);else if(u>0){var h,c=oe(u),p=(-o-c)/(2*a);(h=(-o+c)/(2*a))>=0&&h<=1&&(r[l++]=h),p>=0&&p<=1&&(r[l++]=p)}}return l}function ze(t,e,n,i,r,o){var a=(e-t)*r+t,s=(n-e)*r+e,l=(i-n)*r+n,u=(s-a)*r+a,h=(l-s)*r+s,c=(h-u)*r+u;o[0]=t,o[1]=a,o[2]=u,o[3]=c,o[4]=c,o[5]=h,o[6]=l,o[7]=i}function je(t,e,n,i,r,o,a,s,l,u,h){var c,p,d,f,g,y=.005,v=1/0;ve[0]=l,ve[1]=u;for(var m=0;m<1;m+=.05)be[0]=he(t,n,r,a,m),be[1]=he(e,i,o,s,m),(f=vt(ve,be))=0&&f=0&&y=1?1:ue(0,i,o,1,t,s)&&he(0,r,a,1,s[0])}}}var on=function(){function t(t){this._inited=!1,this._starttime=0,this._pausedtime=0,this._paused=!1,this._life=t.life||1e3,this._delay=t.delay||0,this.loop=t.loop||!1,this.onframe=t.onframe||xt,this.ondestroy=t.ondestroy||xt,this.onrestart=t.onrestart||xt,t.easing&&this.seteasing(t.easing)}return t.prototype.step=function(t,e){if(this._inited||(this._starttime=t+this._delay,this._inited=!0),!this._paused){var n=this._life,i=t-this._starttime-this._pausedtime,r=i/n;r<0&&(r=0),r=math.min(r,1);var o=this.easingfunc,a=o?o(r):r;if(this.onframe(a),1===r){if(!this.loop)return!0;var s=i%n;this._starttime=t-s,this._pausedtime=0,this.onrestart()}return!1}this._pausedtime+=e},t.prototype.pause=function(){this._paused=!0},t.prototype.resume=function(){this._paused=!1},t.prototype.seteasing=function(t){this.easing=t,this.easingfunc=u(t)?t:le[t]||rn(t)},t}(),an=function(t){this.value=t},sn=function(){function t(){this._len=0}return t.prototype.insert=function(t){var e=new an(t);return this.insertentry(e),e},t.prototype.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++},t.prototype.remove=function(t){var e=t.prev,n=t.next;e?e.next=n:this.head=n,n?n.prev=e:this.tail=e,t.next=t.prev=null,this._len--},t.prototype.len=function(){return this._len},t.prototype.clear=function(){this.head=this.tail=null,this._len=0},t}(),ln=function(){function t(t){this._list=new sn,this._maxsize=10,this._map={},this._maxsize=t}return t.prototype.put=function(t,e){var n=this._list,i=this._map,r=null;if(null==i[t]){var o=n.len(),a=this._lastremovedentry;if(o>=this._maxsize&&o>0){var s=n.head;n.remove(s),delete i[s.key],r=s.value,this._lastremovedentry=s}a?a.value=e:a=new an(e),a.key=t,n.insertentry(a),i[t]=a}return r},t.prototype.get=function(t){var e=this._map[t],n=this._list;if(null!=e)return e!==n.tail&&(n.remove(e),n.insertentry(e)),e.value},t.prototype.clear=function(){this._list.clear(),this._map={}},t.prototype.len=function(){return this._list.len()},t}(),un={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]};function hn(t){return(t=math.round(t))<0?0:t>255?255:t}function cn(t){return t<0?0:t>1?1:t}function pn(t){var e=t;return e.length&&"%"===e.charat(e.length-1)?hn(parsefloat(e)/100*255):hn(parseint(e,10))}function dn(t){var e=t;return e.length&&"%"===e.charat(e.length-1)?cn(parsefloat(e)/100):cn(parsefloat(e))}function fn(t,e,n){return n<0?n+=1:n>1&&(n-=1),6*n<1?t+(e-t)*n*6:2*n<1?e:3*n<2?t+(e-t)*(2/3-n)*6:t}function gn(t,e,n){return t+(e-t)*n}function yn(t,e,n,i,r){return t[0]=e,t[1]=n,t[2]=i,t[3]=r,t}function vn(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var mn=new ln(20),xn=null;function _n(t,e){xn&&vn(xn,e),xn=mn.put(t,xn||e.slice())}function bn(t,e){if(t){e=e||[];var n=mn.get(t);if(n)return vn(e,n);var i=(t+="").replace(/ /g,"").tolowercase();if(i in un)return vn(e,un[i]),_n(t,e),e;var r,o=i.length;if("#"===i.charat(0))return 4===o||5===o?(r=parseint(i.slice(1,4),16))>=0&&r<=4095?(yn(e,(3840&r)>>4|(3840&r)>>8,240&r|(240&r)>>4,15&r|(15&r)<<4,5===o?parseint(i.slice(4),16)/15:1),_n(t,e),e):void yn(e,0,0,0,1):7===o||9===o?(r=parseint(i.slice(1,7),16))>=0&&r<=16777215?(yn(e,(16711680&r)>>16,(65280&r)>>8,255&r,9===o?parseint(i.slice(7),16)/255:1),_n(t,e),e):void yn(e,0,0,0,1):void 0;var a=i.indexof("("),s=i.indexof(")");if(-1!==a&&s+1===o){var l=i.substr(0,a),u=i.substr(a+1,s-(a+1)).split(","),h=1;switch(l){case"rgba":if(4!==u.length)return 3===u.length?yn(e,+u[0],+u[1],+u[2],1):yn(e,0,0,0,1);h=dn(u.pop());case"rgb":return 3!==u.length?void yn(e,0,0,0,1):(yn(e,pn(u[0]),pn(u[1]),pn(u[2]),h),_n(t,e),e);case"hsla":return 4!==u.length?void yn(e,0,0,0,1):(u[3]=dn(u[3]),wn(u,e),_n(t,e),e);case"hsl":return 3!==u.length?void yn(e,0,0,0,1):(wn(u,e),_n(t,e),e);default:return}}yn(e,0,0,0,1)}}function wn(t,e){var n=(parsefloat(t[0])%360+360)%360/360,i=dn(t[1]),r=dn(t[2]),o=r<=.5?r*(i+1):r+i-r*i,a=2*r-o;return yn(e=e||[],hn(255*fn(a,o,n+1/3)),hn(255*fn(a,o,n)),hn(255*fn(a,o,n-1/3)),1),4===t.length&&(e[3]=t[3]),e}function sn(t,e){var n=bn(t);if(n){for(var i=0;i<3;i++)n[i]=e<0?n[i]*(1-e)|0:(255-n[i])*e+n[i]|0,n[i]>255?n[i]=255:n[i]<0&&(n[i]=0);return kn(n,4===n.length?"rgba":"rgb")}}function mn(t,e,n){if(e&&e.length&&t>=0&&t<=1){n=n||[];var i=t*(e.length-1),r=math.floor(i),o=math.ceil(i),a=e[r],s=e[o],l=i-r;return n[0]=hn(gn(a[0],s[0],l)),n[1]=hn(gn(a[1],s[1],l)),n[2]=hn(gn(a[2],s[2],l)),n[3]=cn(gn(a[3],s[3],l)),n}}var in=mn;function tn(t,e,n){if(e&&e.length&&t>=0&&t<=1){var i=t*(e.length-1),r=math.floor(i),o=math.ceil(i),a=bn(e[r]),s=bn(e[o]),l=i-r,u=kn([hn(gn(a[0],s[0],l)),hn(gn(a[1],s[1],l)),hn(gn(a[2],s[2],l)),cn(gn(a[3],s[3],l))],"rgba");return n?{color:u,leftindex:r,rightindex:o,value:i}:u}}var cn=tn;function dn(t,e,n,i){var r=bn(t);if(t)return r=function(t){if(t){var e,n,i=t[0]/255,r=t[1]/255,o=t[2]/255,a=math.min(i,r,o),s=math.max(i,r,o),l=s-a,u=(s+a)/2;if(0===l)e=0,n=0;else{n=u<.5?l/(s+a):l/(2-s-a);var h=((s-i)/6+l/2)/l,c=((s-r)/6+l/2)/l,p=((s-o)/6+l/2)/l;i===s?e=p-c:r===s?e=1/3+h-p:o===s&&(e=2/3+c-h),e<0&&(e+=1),e>1&&(e-=1)}var d=[360*e,n,u];return null!=t[3]&&d.push(t[3]),d}}(r),null!=e&&(r[0]=function(t){return(t=math.round(t))<0?0:t>360?360:t}(e)),null!=n&&(r[1]=dn(n)),null!=i&&(r[2]=dn(i)),kn(wn(r),"rgba")}function an(t,e){var n=bn(t);if(n&&null!=e)return n[3]=cn(e),kn(n,"rgba")}function kn(t,e){if(t&&t.length){var n=t[0]+","+t[1]+","+t[2];return"rgba"!==e&&"hsva"!==e&&"hsla"!==e||(n+=","+t[3]),e+"("+n+")"}}function ln(t,e){var n=bn(t);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*e:0}var pn=object.freeze({__proto__:null,parse:bn,lift:sn,tohex:function(t){var e=bn(t);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).tostring(16).slice(1)},fastlerp:mn,fastmaptocolor:in,lerp:tn,maptocolor:cn,modifyhsl:dn,modifyalpha:an,stringify:kn,lum:ln,random:function(){return kn([math.round(255*math.random()),math.round(255*math.random()),math.round(255*math.random())],"rgb")}}),on=math.round;function rn(t){var e;if(t&&"transparent"!==t){if("string"==typeof t&&t.indexof("rgba")>-1){var n=bn(t);n&&(t="rgb("+n[0]+","+n[1]+","+n[2]+")",e=n[3])}}else t="none";return{color:t,opacity:null==e?1:e}}var nn=1e-4;function en(t){return t-1e-4}function zn(t){return on(1e3*t)/1e3}function vn(t){return on(1e4*t)/1e4}var bn={left:"start",right:"end",center:"middle",middle:"middle"};function fn(t){return t&&!!t.image}function gn(t){return"linear"===t.type}function wn(t){return"radial"===t.type}function hn(t){return"url(#"+t+")"}function yn(t){var e=t.getglobalscale(),n=math.max(e[0],e[1]);return math.max(math.ceil(math.log(n)/math.log(10)),1)}function un(t){var e=t.x||0,n=t.y||0,i=(t.rotation||0)*_t,r=rt(t.scalex,1),o=rt(t.scaley,1),a=t.skewx||0,s=t.skewy||0,l=[];return(e||n)&&l.push("translate("+e+"px,"+n+"px)"),i&&l.push("rotate("+i+")"),1===r&&1===o||l.push("scale("+r+","+o+")"),(a||s)&&l.push("skew("+on(a*_t)+"deg, "+on(s*_t)+"deg)"),l.join(" ")}var xn=r.hasglobalwindow&&u(window.btoa)?function(t){return window.btoa(unescape(t))}:"undefined"!=typeof buffer?function(t){return buffer.from(t).tostring("base64")}:function(t){return null},zn=array.prototype.slice;function jn(t,e,n){return(e-t)*n+t}function qn(t,e,n,i){for(var r=e.length,o=0;oi?e:t,o=math.min(n,i),a=r[o-1]||{color:[0,0,0,0],offset:0},s=o;sa)i.length=a;else for(var s=o;s=1},t.prototype.getadditivetrack=function(){return this._additivetrack},t.prototype.addkeyframe=function(t,e,n){this._needssort=!0;var i=this.keyframes,r=i.length,o=!1,a=6,s=e;if(n(e)){var l=function(t){return n(t&&t[0])?2:1}(e);a=l,(1===l&&!j(e[0])||2===l&&!j(e[0][0]))&&(o=!0)}else if(j(e)&&!nt(e))a=0;else if(x(e))if(isnan(+e)){var u=bn(e);u&&(s=u,a=3)}else a=0;else if(q(e)){var h=a({},s);h.colorstops=z(e.colorstops,(function(t){return{offset:t.offset,color:bn(t.color)}})),gn(e)?a=4:wn(e)&&(a=5),s=h}0===r?this.valtype=a:a===this.valtype&&6!==a||(o=!0),this.discrete=this.discrete||o;var c={time:t,value:s,rawvalue:e,percent:0};return n&&(c.easing=n,c.easingfunc=u(n)?n:le[n]||rn(n)),i.push(c),c},t.prototype.prepare=function(t,e){var n=this.keyframes;this._needssort&&n.sort((function(t,e){return t.time-e.time}));for(var i=this.valtype,r=n.length,o=n[r-1],a=this.discrete,s=ii(i),l=ni(i),u=0;u=0&&!(l[n].percent<=e);n--);n=d(n,u-2)}else{for(n=p;ne);n++);n=d(n-1,u-2)}r=l[n+1],i=l[n]}if(i&&r){this._lastfr=n,this._lastfrp=e;var f=r.percent-i.percent,g=0===f?1:d((e-i.percent)/f,1);r.easingfunc&&(g=r.easingfunc(g));var y=o?this._additivevalue:c?ri:t[h];if(!ii(s)&&!c||y||(y=this._additivevalue=[]),this.discrete)t[h]=g<1?i.rawvalue:r.rawvalue;else if(ii(s))1===s?qn(y,i[a],r[a],g):function(t,e,n,i){for(var r=e.length,o=r&&e[0].length,a=0;a0&&s.addkeyframe(0,ti(l),i),this._trackkeys.push(a)}s.addkeyframe(t,ti(e[a]),i)}return this._maxtime=math.max(this._maxtime,t),this},t.prototype.pause=function(){this._clip.pause(),this._paused=!0},t.prototype.resume=function(){this._clip.resume(),this._paused=!1},t.prototype.ispaused=function(){return!!this._paused},t.prototype.duration=function(t){return this._maxtime=t,this._force=!0,this},t.prototype._donecallback=function(){this._settracksfinished(),this._clip=null;var t=this._donecbs;if(t)for(var e=t.length,n=0;n0)){this._started=1;for(var e=this,n=[],i=this._maxtime||0,r=0;r1){var a=o.pop();r.addkeyframe(a.time,t[i]),r.prepare(this._maxtime,r.getadditivetrack())}}}},t}();function si(){return(new date).gettime()}var li,ui,hi=function(t){function e(e){var n=t.call(this)||this;return n._running=!1,n._time=0,n._pausedtime=0,n._pausestart=0,n._paused=!1,e=e||{},n.stage=e.stage||{},n}return n(e,t),e.prototype.addclip=function(t){t.animation&&this.removeclip(t),this._head?(this._tail.next=t,t.prev=this._tail,t.next=null,this._tail=t):this._head=this._tail=t,t.animation=this},e.prototype.addanimator=function(t){t.animation=this;var e=t.getclip();e&&this.addclip(e)},e.prototype.removeclip=function(t){if(t.animation){var e=t.prev,n=t.next;e?e.next=n:this._head=n,n?n.prev=e:this._tail=e,t.next=t.prev=t.animation=null}},e.prototype.removeanimator=function(t){var e=t.getclip();e&&this.removeclip(e),t.animation=null},e.prototype.update=function(t){for(var e=si()-this._pausedtime,n=e-this._time,i=this._head;i;){var r=i.next;i.step(e,n)?(i.ondestroy(),this.removeclip(i),i=r):i=r}this._time=e,t||(this.trigger("frame",n),this.stage.update&&this.stage.update())},e.prototype._startloop=function(){var t=this;this._running=!0,ke((function e(){t._running&&(ke(e),!t._paused&&t.update())}))},e.prototype.start=function(){this._running||(this._time=si(),this._pausedtime=0,this._startloop())},e.prototype.stop=function(){this._running=!1},e.prototype.pause=function(){this._paused||(this._pausestart=si(),this._paused=!0)},e.prototype.resume=function(){this._paused&&(this._pausedtime+=si()-this._pausestart,this._paused=!1)},e.prototype.clear=function(){for(var t=this._head;t;){var e=t.next;t.prev=t.next=t.animation=null,t=e}this._head=this._tail=null},e.prototype.isfinished=function(){return null==this._head},e.prototype.animate=function(t,e){e=e||{},this.start();var n=new ai(t,e.loop);return this.addanimator(n),n},e}(xt),ci=r.domsupported,pi=(ui={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},{mouse:li=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],touch:["touchstart","touchend","touchmove"],pointer:z(li,(function(t){var e=t.replace("mouse","pointer");return ui.hasownproperty(e)?e:t}))}),di=["mousemove","mouseup"],fi=["pointermove","pointerup"],gi=!1;function yi(t){var e=t.pointertype;return"pen"===e||"touch"===e}function vi(t){t&&(t.zrbytouch=!0)}function mi(t,e){for(var n=e,i=!1;n&&9!==n.nodetype&&!(i=n.dombelongtozr||n!==e&&n===t.painterroot);)n=n.parentnode;return i}var xi=function(t,e){this.stoppropagation=xt,this.stopimmediatepropagation=xt,this.preventdefault=xt,this.type=e.type,this.target=this.currenttarget=t.dom,this.pointertype=e.pointertype,this.clientx=e.clientx,this.clienty=e.clienty},_i={mousedown:function(t){t=oe(this.dom,t),this.__maypointercapture=[t.zrx,t.zry],this.trigger("mousedown",t)},mousemove:function(t){t=oe(this.dom,t);var e=this.__maypointercapture;!e||t.zrx===e[0]&&t.zry===e[1]||this.__togglepointercapture(!0),this.trigger("mousemove",t)},mouseup:function(t){t=oe(this.dom,t),this.__togglepointercapture(!1),this.trigger("mouseup",t)},mouseout:function(t){mi(this,(t=oe(this.dom,t)).toelement||t.relatedtarget)||(this.__pointercapturing&&(t.zreventcontrol="no_globalout"),this.trigger("mouseout",t))},wheel:function(t){gi=!0,t=oe(this.dom,t),this.trigger("mousewheel",t)},mousewheel:function(t){gi||(t=oe(this.dom,t),this.trigger("mousewheel",t))},touchstart:function(t){vi(t=oe(this.dom,t)),this.__lasttouchmoment=new date,this.handler.processgesture(t,"start"),_i.mousemove.call(this,t),_i.mousedown.call(this,t)},touchmove:function(t){vi(t=oe(this.dom,t)),this.handler.processgesture(t,"change"),_i.mousemove.call(this,t)},touchend:function(t){vi(t=oe(this.dom,t)),this.handler.processgesture(t,"end"),_i.mouseup.call(this,t),+new date-+this.__lasttouchmoment<300&&_i.click.call(this,t)},pointerdown:function(t){_i.mousedown.call(this,t)},pointermove:function(t){yi(t)||_i.mousemove.call(this,t)},pointerup:function(t){_i.mouseup.call(this,t)},pointerout:function(t){yi(t)||_i.mouseout.call(this,t)}};e(["click","dblclick","contextmenu"],(function(t){_i[t]=function(e){e=oe(this.dom,e),this.trigger(t,e)}}));var bi={pointermove:function(t){yi(t)||bi.mousemove.call(this,t)},pointerup:function(t){bi.mouseup.call(this,t)},mousemove:function(t){this.trigger("mousemove",t)},mouseup:function(t){var e=this.__pointercapturing;this.__togglepointercapture(!1),this.trigger("mouseup",t),e&&(t.zreventcontrol="only_globalout",this.trigger("mouseout",t))}};function wi(t,e){var n=e.domhandlers;r.pointereventssupported?e(pi.pointer,(function(i){mi(e,i,(function(e){n[i].call(t,e)}))})):(r.toucheventssupported&&e(pi.touch,(function(i){mi(e,i,(function(r){n[i].call(t,r),function(t){t.touching=!0,null!=t.touchtimer&&(cleartimeout(t.touchtimer),t.touchtimer=null),t.touchtimer=settimeout((function(){t.touching=!1,t.touchtimer=null}),700)}(e)}))})),e(pi.mouse,(function(i){mi(e,i,(function(r){r=re(r),e.touching||n[i].call(t,r)}))})))}function si(t,e){function n(n){mi(e,n,(function(i){i=re(i),mi(t,i.target)||(i=function(t,e){return oe(t.dom,new xi(t,e),!0)}(t,i),e.domhandlers[n].call(t,i))}),{capture:!0})}r.pointereventssupported?e(fi,n):r.toucheventssupported||e(di,n)}function mi(t,e,n,i){t.mounted[e]=n,t.listeneropts[e]=i,ae(t.domtarget,e,n,i)}function ii(t){var e,n,i,r,o=t.mounted;for(var a in o)o.hasownproperty(a)&&(e=t.domtarget,n=a,i=o[a],r=t.listeneropts[a],e.removeeventlistener(n,i,r));t.mounted={}}var ti=function(t,e){this.mounted={},this.listeneropts={},this.touching=!1,this.domtarget=t,this.domhandlers=e},ci=function(t){function e(e,n){var i=t.call(this)||this;return i.__pointercapturing=!1,i.dom=e,i.painterroot=n,i._localhandlerscope=new ti(e,_i),ci&&(i._globalhandlerscope=new ti(document,bi)),wi(i,i._localhandlerscope),i}return n(e,t),e.prototype.dispose=function(){ii(this._localhandlerscope),ci&&ii(this._globalhandlerscope)},e.prototype.setcursor=function(t){this.dom.style&&(this.dom.style.cursor=t||"default")},e.prototype.__togglepointercapture=function(t){if(this.__maypointercapture=null,ci&&+this.__pointercapturing^+t){this.__pointercapturing=t;var e=this._globalhandlerscope;t?si(this,e):ii(e)}},e}(xt),di=1;r.hasglobalwindow&&(di=math.max(window.devicepixelratio||window.screen&&window.screen.devicexdpi/window.screen.logicalxdpi||1,1));var ai=di,ki="#333",li="#ccc";function pi(){return[1,0,0,1,0,0]}function oi(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function ri(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 ni(t,e,n){var i=e[0]*n[0]+e[2]*n[1],r=e[1]*n[0]+e[3]*n[1],o=e[0]*n[2]+e[2]*n[3],a=e[1]*n[2]+e[3]*n[3],s=e[0]*n[4]+e[2]*n[5]+e[4],l=e[1]*n[4]+e[3]*n[5]+e[5];return t[0]=i,t[1]=r,t[2]=o,t[3]=a,t[4]=s,t[5]=l,t}function ei(t,e,n){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+n[0],t[5]=e[5]+n[1],t}function zi(t,e,n){var i=e[0],r=e[2],o=e[4],a=e[1],s=e[3],l=e[5],u=math.sin(n),h=math.cos(n);return t[0]=i*h+a*u,t[1]=-i*u+a*h,t[2]=r*h+s*u,t[3]=-r*u+h*s,t[4]=h*o+u*l,t[5]=h*l-u*o,t}function vi(t,e,n){var i=n[0],r=n[1];return t[0]=e[0]*i,t[1]=e[1]*r,t[2]=e[2]*i,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*r,t}function bi(t,e){var n=e[0],i=e[2],r=e[4],o=e[1],a=e[3],s=e[5],l=n*a-o*i;return l?(l=1/l,t[0]=a*l,t[1]=-o*l,t[2]=-i*l,t[3]=n*l,t[4]=(i*s-a*r)*l,t[5]=(o*r-n*s)*l,t):null}function fi(t){var e=[1,0,0,1,0,0];return ri(e,t),e}var gi=object.freeze({__proto__:null,create:pi,identity:oi,copy:ri,mul:ni,translate:ei,rotate:zi,scale:vi,invert:bi,clone:fi}),wi=oi,hi=5e-5;function yi(t){return t>hi||t<-5e-5}var ui=[],xi=[],zi=[1,0,0,1,0,0],ji=math.abs,qi=function(){function t(){}return t.prototype.getlocaltransform=function(e){return t.getlocaltransform(this,e)},t.prototype.setposition=function(t){this.x=t[0],this.y=t[1]},t.prototype.setscale=function(t){this.scalex=t[0],this.scaley=t[1]},t.prototype.setskew=function(t){this.skewx=t[0],this.skewy=t[1]},t.prototype.setorigin=function(t){this.originx=t[0],this.originy=t[1]},t.prototype.needlocaltransform=function(){return yi(this.rotation)||yi(this.x)||yi(this.y)||yi(this.scalex-1)||yi(this.scaley-1)||yi(this.skewx)||yi(this.skewy)},t.prototype.updatetransform=function(){var t=this.parent&&this.parent.transform,e=this.needlocaltransform(),n=this.transform;e||t?(n=n||[1,0,0,1,0,0],e?this.getlocaltransform(n):wi(n),t&&(e?ni(n,t,n):ri(n,t)),this.transform=n,this._resolveglobalscaleratio(n)):n&&wi(n)},t.prototype._resolveglobalscaleratio=function(t){var e=this.globalscaleratio;if(null!=e&&1!==e){this.getglobalscale(ui);var n=ui[0]<0?-1:1,i=ui[1]<0?-1:1,r=((ui[0]-n)*e+n)/ui[0]||0,o=((ui[1]-i)*e+i)/ui[1]||0;t[0]*=r,t[1]*=r,t[2]*=o,t[3]*=o}this.invtransform=this.invtransform||[1,0,0,1,0,0],bi(this.invtransform,t)},t.prototype.getcomputedtransform=function(){for(var t=this,e=[];t;)e.push(t),t=t.parent;for(;t=e.pop();)t.updatetransform();return this.transform},t.prototype.setlocaltransform=function(t){if(t){var e=t[0]*t[0]+t[1]*t[1],n=t[2]*t[2]+t[3]*t[3],i=math.atan2(t[1],t[0]),r=math.pi/2+i-math.atan2(t[3],t[2]);n=math.sqrt(n)*math.cos(r),e=math.sqrt(e),this.skewx=r,this.skewy=0,this.rotation=-i,this.x=+t[4],this.y=+t[5],this.scalex=e,this.scaley=n,this.originx=0,this.originy=0}},t.prototype.decomposetransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(ni(xi,t.invtransform,e),e=xi);var n=this.originx,i=this.originy;(n||i)&&(zi[4]=n,zi[5]=i,ni(xi,e,zi),xi[4]-=n,xi[5]-=i,e=xi),this.setlocaltransform(e)}},t.prototype.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)},t.prototype.transformcoordtolocal=function(t,e){var n=[t,e],i=this.invtransform;return i&&ft(n,n,i),n},t.prototype.transformcoordtoglobal=function(t,e){var n=[t,e],i=this.transform;return i&&ft(n,n,i),n},t.prototype.getlinescale=function(){var t=this.transform;return t&&ji(t[0]-1)>1e-10&&ji(t[3]-1)>1e-10?math.sqrt(ji(t[0]*t[3]-t[2]*t[1])):1},t.prototype.copytransform=function(t){$i(this,t)},t.getlocaltransform=function(t,e){e=e||[];var n=t.originx||0,i=t.originy||0,r=t.scalex,o=t.scaley,a=t.anchorx,s=t.anchory,l=t.rotation||0,u=t.x,h=t.y,c=t.skewx?math.tan(t.skewx):0,p=t.skewy?math.tan(-t.skewy):0;if(n||i||a||s){var d=n+a,f=i+s;e[4]=-d*r-c*f*o,e[5]=-f*o-p*d*r}else e[4]=e[5]=0;return e[0]=r,e[3]=o,e[1]=p*r,e[2]=c*o,l&&zi(e,e,l),e[4]+=n+u,e[5]+=i+h,e},t.initdefaultprops=function(){var e=t.prototype;e.scalex=e.scaley=e.globalscaleratio=1,e.x=e.y=e.originx=e.originy=e.skewx=e.skewy=e.rotation=e.anchorx=e.anchory=0}(),t}(),ki=["x","y","originx","originy","anchorx","anchory","rotation","scalex","scaley","skewx","skewy"];function $i(t,e){for(var n=0;nf&&(f=x,gf&&(f=_,v=n.x&&t<=n.x+n.width&&e>=n.y&&e<=n.y+n.height},t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.prototype.copy=function(e){t.copy(this,e)},t.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},t.prototype.isfinite=function(){return isfinite(this.x)&&isfinite(this.y)&&isfinite(this.width)&&isfinite(this.height)},t.prototype.iszero=function(){return 0===this.width||0===this.height},t.create=function(e){return new t(e.x,e.y,e.width,e.height)},t.copy=function(t,e){t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height},t.applytransform=function(e,n,i){if(i){if(i[1]<1e-5&&i[1]>-1e-5&&i[2]<1e-5&&i[2]>-1e-5){var r=i[0],o=i[3],a=i[4],s=i[5];return e.x=n.x*r+a,e.y=n.y*o+s,e.width=n.width*r,e.height=n.height*o,e.width<0&&(e.x+=e.width,e.width=-e.width),void(e.height<0&&(e.y+=e.height,e.height=-e.height))}er.x=ir.x=n.x,er.y=rr.y=n.y,nr.x=rr.x=n.x+n.width,nr.y=ir.y=n.y+n.height,er.transform(i),rr.transform(i),nr.transform(i),ir.transform(i),e.x=qi(er.x,nr.x,ir.x,rr.x),e.y=qi(er.y,nr.y,ir.y,rr.y);var l=tr(er.x,nr.x,ir.x,rr.x),u=tr(er.y,nr.y,ir.y,rr.y);e.width=l-e.x,e.height=u-e.y}else e!==n&&t.copy(e,n)},t}(),lr={};function ur(t,e){var n=lr[e=e||a];n||(n=lr[e]=new ln(500));var i=n.get(t);return null==i&&(i=h.measuretext(t,e).width,n.put(t,i)),i}function hr(t,e,n,i){var r=ur(t,e),o=fr(e),a=pr(0,r,n),s=dr(0,o,i);return new sr(a,s,r,o)}function cr(t,e,n,i){var r=((t||"")+"").split("\n");if(1===r.length)return hr(r[0],e,n,i);for(var o=new sr(0,0,0,0),a=0;a=0?parsefloat(t)/100*e:parsefloat(t):t}function yr(t,e,n){var i=e.position||"inside",r=null!=e.distance?e.distance:5,o=n.height,a=n.width,s=o/2,l=n.x,u=n.y,h="left",c="top";if(i instanceof array)l+=gr(i[0],n.width),u+=gr(i[1],n.height),h=null,c=null;else switch(i){case"left":l-=r,u+=s,h="right",c="middle";break;case"right":l+=r+a,u+=s,c="middle";break;case"top":l+=a/2,u-=r,h="center",c="bottom";break;case"bottom":l+=a/2,u+=o+r,h="center";break;case"inside":l+=a/2,u+=s,h="center",c="middle";break;case"insideleft":l+=r,u+=s,c="middle";break;case"insideright":l+=a-r,u+=s,h="right",c="middle";break;case"insidetop":l+=a/2,u+=r,h="center";break;case"insidebottom":l+=a/2,u+=o-r,h="center",c="bottom";break;case"insidetopleft":l+=r,u+=r;break;case"insidetopright":l+=a-r,u+=r,h="right";break;case"insidebottomleft":l+=r,u+=o-r,c="bottom";break;case"insidebottomright":l+=a-r,u+=o-r,h="right",c="bottom"}return(t=t||{}).x=l,t.y=u,t.align=h,t.verticalalign=c,t}var vr="__zr_normal__",mr=ki.concat(["ignore"]),xr=v(ki,(function(t,e){return t[e]=!0,t}),{ignore:!1}),_r={},br=new sr(0,0,0,0),wr=function(){function t(t){this.id=m(),this.animators=[],this.currentstates=[],this.states={},this._init(t)}return t.prototype._init=function(t){this.attr(t)},t.prototype.drift=function(t,e,n){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.markredraw()},t.prototype.beforeupdate=function(){},t.prototype.afterupdate=function(){},t.prototype.update=function(){this.updatetransform(),this.__dirty&&this.updateinnertext()},t.prototype.updateinnertext=function(t){var e=this._textcontent;if(e&&(!e.ignore||t)){this.textconfig||(this.textconfig={});var n=this.textconfig,i=n.local,r=e.innertransformable,o=void 0,a=void 0,s=!1;r.parent=i?this:null;var l=!1;if(r.copytransform(e),null!=n.position){var u=br;n.layoutrect?u.copy(n.layoutrect):u.copy(this.getboundingrect()),i||u.applytransform(this.transform),this.calculatetextposition?this.calculatetextposition(_r,n,u):yr(_r,n,u),r.x=_r.x,r.y=_r.y,o=_r.align,a=_r.verticalalign;var h=n.origin;if(h&&null!=n.rotation){var c=void 0,p=void 0;"center"===h?(c=.5*u.width,p=.5*u.height):(c=gr(h[0],u.width),p=gr(h[1],u.height)),l=!0,r.originx=-r.x+c+(i?0:u.x),r.originy=-r.y+p+(i?0:u.y)}}null!=n.rotation&&(r.rotation=n.rotation);var d=n.offset;d&&(r.x+=d[0],r.y+=d[1],l||(r.originx=-d[0],r.originy=-d[1]));var f=null==n.inside?"string"==typeof n.position&&n.position.indexof("inside")>=0:n.inside,g=this._innertextdefaultstyle||(this._innertextdefaultstyle={}),y=void 0,v=void 0,m=void 0;f&&this.canbeinsidetext()?(y=n.insidefill,v=n.insidestroke,null!=y&&"auto"!==y||(y=this.getinsidetextfill()),null!=v&&"auto"!==v||(v=this.getinsidetextstroke(y),m=!0)):(y=n.outsidefill,v=n.outsidestroke,null!=y&&"auto"!==y||(y=this.getoutsidefill()),null!=v&&"auto"!==v||(v=this.getoutsidestroke(y),m=!0)),(y=y||"#000")===g.fill&&v===g.stroke&&m===g.autostroke&&o===g.align&&a===g.verticalalign||(s=!0,g.fill=y,g.stroke=v,g.autostroke=m,g.align=o,g.verticalalign=a,e.setdefaulttextstyle(g)),e.__dirty|=1,s&&e.dirtystyle(!0)}},t.prototype.canbeinsidetext=function(){return!0},t.prototype.getinsidetextfill=function(){return"#fff"},t.prototype.getinsidetextstroke=function(t){return"#000"},t.prototype.getoutsidefill=function(){return this.__zr&&this.__zr.isdarkmode()?li:ki},t.prototype.getoutsidestroke=function(t){var e=this.__zr&&this.__zr.getbackgroundcolor(),n="string"==typeof e&&bn(e);n||(n=[255,255,255,1]);for(var i=n[3],r=this.__zr.isdarkmode(),o=0;o<3;o++)n[o]=n[o]*i+(r?0:255)*(1-i);return n[3]=1,kn(n,"rgba")},t.prototype.traverse=function(t,e){},t.prototype.attrkv=function(t,e){"textconfig"===t?this.settextconfig(e):"textcontent"===t?this.settextcontent(e):"clippath"===t?this.setclippath(e):"extra"===t?(this.extra=this.extra||{},a(this.extra,e)):this[t]=e},t.prototype.hide=function(){this.ignore=!0,this.markredraw()},t.prototype.show=function(){this.ignore=!1,this.markredraw()},t.prototype.attr=function(t,e){if("string"==typeof t)this.attrkv(t,e);else if(q(t))for(var n=g(t),i=0;i0},t.prototype.getstate=function(t){return this.states[t]},t.prototype.ensurestate=function(t){var e=this.states;return e[t]||(e[t]={}),e[t]},t.prototype.clearstates=function(t){this.usestate(vr,!1,t)},t.prototype.usestate=function(t,e,n,i){var r=t===vr;if(this.hasstate()||!r){var o=this.currentstates,a=this.statetransition;if(!(p(o,t)>=0)||!e&&1!==o.length){var s;if(this.stateproxy&&!r&&(s=this.stateproxy(t)),s||(s=this.states&&this.states[t]),s||r){r||this.savecurrenttonormalstate(s);var l=!!(s&&s.hoverlayer||i);l&&this._togglehoverlayerflag(!0),this._applystateobj(t,s,this._normalstate,e,!n&&!this.__inhover&&a&&a.duration>0,a);var u=this._textcontent,h=this._textguide;return u&&u.usestate(t,e,n,l),h&&h.usestate(t,e,n,l),r?(this.currentstates=[],this._normalstate={}):e?this.currentstates.push(t):this.currentstates=[t],this._updateanimationtargets(),this.markredraw(),!l&&this.__inhover&&(this._togglehoverlayerflag(!1),this.__dirty&=-2),s}i("state "+t+" not exists.")}}},t.prototype.usestates=function(t,e,n){if(t.length){var i=[],r=this.currentstates,o=t.length,a=o===r.length;if(a)for(var s=0;s0,d);var f=this._textcontent,g=this._textguide;f&&f.usestates(t,e,c),g&&g.usestates(t,e,c),this._updateanimationtargets(),this.currentstates=t.slice(),this.markredraw(),!c&&this.__inhover&&(this._togglehoverlayerflag(!1),this.__dirty&=-2)}else this.clearstates()},t.prototype._updateanimationtargets=function(){for(var t=0;t=0){var n=this.currentstates.slice();n.splice(e,1),this.usestates(n)}},t.prototype.replacestate=function(t,e,n){var i=this.currentstates.slice(),r=p(i,t),o=p(i,e)>=0;r>=0?o?i.splice(r,1):i[r]=e:n&&!o&&i.push(e),this.usestates(i)},t.prototype.togglestate=function(t,e){e?this.usestate(t,!0):this.removestate(t)},t.prototype._mergestates=function(t){for(var e,n={},i=0;i=0&&e.splice(n,1)})),this.animators.push(t),n&&n.animation.addanimator(t),n&&n.wakeup()},t.prototype.updateduringanimation=function(t){this.markredraw()},t.prototype.stopanimation=function(t,e){for(var n=this.animators,i=n.length,r=[],o=0;o0&&n.during&&o[0].during((function(t,e){n.during(e)}));for(var p=0;p0||r.force&&!a.length){var w,s=void 0,m=void 0,i=void 0;if(s){m={},p&&(s={});for(_=0;_=0&&(n.splice(i,0,t),this._doadd(t))}return this},e.prototype.replace=function(t,e){var n=p(this._children,t);return n>=0&&this.replaceat(e,n),this},e.prototype.replaceat=function(t,e){var n=this._children,i=n[e];if(t&&t!==this&&t.parent!==this&&t!==i){n[e]=t,i.parent=null;var r=this.__zr;r&&i.removeselffromzr(r),this._doadd(t)}return this},e.prototype._doadd=function(t){t.parent&&t.parent.remove(t),t.parent=this;var e=this.__zr;e&&e!==t.__zr&&t.addselftozr(e),e&&e.refresh()},e.prototype.remove=function(t){var e=this.__zr,n=this._children,i=p(n,t);return i<0||(n.splice(i,1),t.parent=null,e&&t.removeselffromzr(e),e&&e.refresh()),this},e.prototype.removeall=function(){for(var t=this._children,e=this.__zr,n=0;n0&&(this._stillframeaccum++,this._stillframeaccum>this._sleepafterstill&&this.animation.stop())},t.prototype.setsleepafterstill=function(t){this._sleepafterstill=t},t.prototype.wakeup=function(){this.animation.start(),this._stillframeaccum=0},t.prototype.refreshhover=function(){this._needsrefreshhover=!0},t.prototype.refreshhoverimmediately=function(){this._needsrefreshhover=!1,this.painter.refreshhover&&"canvas"===this.painter.gettype()&&this.painter.refreshhover()},t.prototype.resize=function(t){t=t||{},this.painter.resize(t.width,t.height),this.handler.resize()},t.prototype.clearanimation=function(){this.animation.clear()},t.prototype.getwidth=function(){return this.painter.getwidth()},t.prototype.getheight=function(){return this.painter.getheight()},t.prototype.setcursorstyle=function(t){this.handler.setcursorstyle(t)},t.prototype.findhover=function(t,e){return this.handler.findhover(t,e)},t.prototype.on=function(t,e,n){return this.handler.on(t,e,n),this},t.prototype.off=function(t,e){this.handler.off(t,e)},t.prototype.trigger=function(t,e){this.handler.trigger(t,e)},t.prototype.clear=function(){for(var t=this.storage.getroots(),e=0;e0){if(t<=r)return a;if(t>=o)return s}else{if(t>=r)return a;if(t<=o)return s}else{if(t===r)return a;if(t===o)return s}return(t-r)/l*u+a}function er(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 x(t)?(n=t,n.replace(/^\s+|\s+$/g,"")).match(/%$/)?parsefloat(t)/100*e:parsefloat(t):null==t?nan:+t;var n}function zr(t,e,n){return null==e&&(e=10),e=math.min(math.max(0,e),20),t=(+t).tofixed(e),n?t:+t}function vr(t){return t.sort((function(t,e){return t-e})),t}function br(t){if(t=+t,isnan(t))return 0;if(t>1e-14)for(var e=1,n=0;n<15;n++,e*=10)if(math.round(t*e)/e===t)return n;return fr(t)}function fr(t){var e=t.tostring().tolowercase(),n=e.indexof("e"),i=n>0?+e.slice(n+1):0,r=n>0?n:e.length,o=e.indexof("."),a=o<0?0:r-1-o;return math.max(0,a-i)}function gr(t,e){var n=math.log,i=math.ln10,r=math.floor(n(t[1]-t[0])/i),o=math.round(n(math.abs(e[1]-e[0]))/i),a=math.min(math.max(-r+o,0),20);return isfinite(a)?a:20}function wr(t,e,n){if(!t[e])return 0;var i=v(t,(function(t,e){return t+(isnan(e)?0:e)}),0);if(0===i)return 0;for(var r=math.pow(10,n),o=z(t,(function(t){return(isnan(t)?0:t)/i*r*100})),a=100*r,s=z(o,(function(t){return math.floor(t)})),l=v(s,(function(t,e){return t+e}),0),u=z(o,(function(t,e){return t-s[e]}));lh&&(h=u[p],c=p);++s[c],u[c]=0,++l}return s[e]/r}function hr(t,e){var n=math.max(br(t),br(e)),i=t+e;return n>20?i:zr(i,n)}var yr=9007199254740991;function ur(t){var e=2*math.pi;return(t%e+e)%e}function xr(t){return t>-1e-4&&t=10&&e++,e}function $r(t,e){var n=kr(t),i=math.pow(10,n),r=t/i;return t=(e?r<1.5?1:r<2.5?2:r<4?3:r<7?5:10:r<1?1:r<2?2:r<3?3:r<5?5:10)*i,n>=-20?+t.tofixed(n<0?-n:0):t}function jr(t,e){var n=(t.length-1)*e+1,i=math.floor(n),r=+t[i-1],o=n-i;return o?r+o*(t[i]-r):r}function qr(t){t.sort((function(t,e){return s(t,e,0)?-1:1}));for(var e=-1/0,n=1,i=0;i=0||r&&p(r,s)<0)){var l=n.getshallow(s,e);null!=l&&(o[t[a][0]]=l)}}return o}}var ho=wo([["fill","color"],["shadowblur"],["shadowoffsetx"],["shadowoffsety"],["opacity"],["shadowcolor"]]),yo=function(){function t(){}return t.prototype.getareastyle=function(t,e){return ho(this,t,e)},t}(),uo=new ln(50);function xo(t){if("string"==typeof t){var e=uo.get(t);return e&&e.image}return t}function zo(t,e,n,i,r){if(t){if("string"==typeof t){if(e&&e.__zrimagesrc===t||!n)return e;var o=uo.get(t),a={hostel:n,cb:i,cbpayload:r};return o?!qo(e=o.image)&&o.pending.push(a):((e=h.loadimage(t,jo,jo)).__zrimagesrc=t,uo.put(t,e.__cachedimgobj={image:e,pending:[a]})),e}return t}return e}function jo(){var t=this.__cachedimgobj;this.onload=this.onerror=this.__cachedimgobj=null;for(var e=0;e=a;l++)s-=a;var u=ur(n,e);return u>s&&(n="",u=0),s=t-u,r.ellipsis=n,r.ellipsiswidth=u,r.contentwidth=s,r.containerwidth=t,r}function qo(t,e){var n=e.containerwidth,i=e.font,r=e.contentwidth;if(!n)return"";var o=ur(t,i);if(o<=n)return t;for(var a=0;;a++){if(o<=r||a>=e.maxiterations){t+=e.ellipsis;break}var s=0===a?ta(t,r,e.asccharwidth,e.cncharwidth):o>0?math.floor(t.length*r/o):0;o=ur(t=t.substr(0,s),i)}return""===t&&(t=e.placeholder),t}function ta(t,e,n,i){for(var r=0,o=0,a=t.length;o0&&f+i.accumwidth>i.width&&(o=e.split("\n"),c=!0),i.accumwidth=f}else{var g=sa(e,h,i.width,i.breakall,i.accumwidth);i.accumwidth=g.accumwidth+d,a=g.lineswidths,o=g.lines}}else o=e.split("\n");for(var y=0;y=33&&e<=383}(t)||!!oa[t]}function sa(t,e,n,i,r){for(var o=[],a=[],s="",l="",u=0,h=0,c=0;cn:r+h+d>n)?h?(s||l)&&(f?(s||(s=l,l="",h=u=0),o.push(s),a.push(h-u),l+=p,s="",h=u+=d):(l&&(s+=l,l="",u=0),o.push(s),a.push(h),s=p,h=d)):f?(o.push(l),a.push(u),l=p,u=d):(o.push(p),a.push(d)):(h+=d,f?(l+=p,u+=d):(l&&(s+=l,l="",u=0),s+=p))}else l&&(s+=l,h+=u),o.push(s),a.push(h),s="",l="",u=0,h=0}return o.length||s||(s=t,l="",u=0),l&&(s+=l),s&&(o.push(s),a.push(h)),1===o.length&&(h+=r),{accumwidth:h,lines:o,lineswidths:a}}var la="__zr_style_"+math.round(10*math.random()),ua={shadowblur:0,shadowoffsetx:0,shadowoffsety:0,shadowcolor:"#000",opacity:1,blend:"source-over"},ha={style:{shadowblur:!0,shadowoffsetx:!0,shadowoffsety:!0,shadowcolor:!0,opacity:!0}};ua[la]=!0;var ca=["z","z2","invisible"],pa=["invisible"],da=function(t){function e(e){return t.call(this,e)||this}var i;return n(e,t),e.prototype._init=function(e){for(var n=g(e),i=0;i1e-4)return s[0]=t-n,s[1]=e-i,l[0]=t+n,void(l[1]=e+i);if(ba[0]=xa(r)*n+t,ba[1]=ma(r)*i+e,wa[0]=xa(o)*n+t,wa[1]=ma(o)*i+e,u(s,ba,wa),h(l,ba,wa),(r%=_a)<0&&(r+=_a),(o%=_a)<0&&(o+=_a),r>o&&!a?o+=_a:rr&&(sa[0]=xa(d)*n+t,sa[1]=ma(d)*i+e,u(s,sa,s),h(l,sa,l))}var la={m:1,l:2,c:3,q:4,a:5,z:6,r:7},pa=[],oa=[],ra=[],na=[],ea=[],za=[],va=math.min,ba=math.max,fa=math.cos,ga=math.sin,wa=math.abs,ha=math.pi,ya=2*ha,ua="undefined"!=typeof float32array,xa=[];function za(t){return math.round(t/ha*1e8)/1e8%2*ha}function ja(t,e){var n=za(t[0]);n<0&&(n+=ya);var i=n-t[0],r=t[1];r+=i,!e&&r-n>=ya?r=n+ya:e&&n-r>=ya?r=n-ya:!e&&n>r?r=n+(ya-za(n-r)):e&&n0&&(this._ux=wa(n/ai/t)||0,this._uy=wa(n/ai/e)||0)},t.prototype.setdpr=function(t){this.dpr=t},t.prototype.setcontext=function(t){this._ctx=t},t.prototype.getcontext=function(){return this._ctx},t.prototype.beginpath=function(){return this._ctx&&this._ctx.beginpath(),this.reset(),this},t.prototype.reset=function(){this._savedata&&(this._len=0),this._pathseglen&&(this._pathseglen=null,this._pathlen=0),this._version++},t.prototype.moveto=function(t,e){return this._drawpendingpt(),this.adddata(la.m,t,e),this._ctx&&this._ctx.moveto(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},t.prototype.lineto=function(t,e){var n=wa(t-this._xi),i=wa(e-this._yi),r=n>this._ux||i>this._uy;if(this.adddata(la.l,t,e),this._ctx&&r&&this._ctx.lineto(t,e),r)this._xi=t,this._yi=e,this._pendingptdist=0;else{var o=n*n+i*i;o>this._pendingptdist&&(this._pendingptx=t,this._pendingpty=e,this._pendingptdist=o)}return this},t.prototype.beziercurveto=function(t,e,n,i,r,o){return this._drawpendingpt(),this.adddata(la.c,t,e,n,i,r,o),this._ctx&&this._ctx.beziercurveto(t,e,n,i,r,o),this._xi=r,this._yi=o,this},t.prototype.quadraticcurveto=function(t,e,n,i){return this._drawpendingpt(),this.adddata(la.q,t,e,n,i),this._ctx&&this._ctx.quadraticcurveto(t,e,n,i),this._xi=n,this._yi=i,this},t.prototype.arc=function(t,e,n,i,r,o){this._drawpendingpt(),xa[0]=i,xa[1]=r,ja(xa,o),i=xa[0];var a=(r=xa[1])-i;return this.adddata(la.a,t,e,n,n,i,a,0,o?0:1),this._ctx&&this._ctx.arc(t,e,n,i,r,o),this._xi=fa(r)*n+t,this._yi=ga(r)*n+e,this},t.prototype.arcto=function(t,e,n,i,r){return this._drawpendingpt(),this._ctx&&this._ctx.arcto(t,e,n,i,r),this},t.prototype.rect=function(t,e,n,i){return this._drawpendingpt(),this._ctx&&this._ctx.rect(t,e,n,i),this.adddata(la.r,t,e,n,i),this},t.prototype.closepath=function(){this._drawpendingpt(),this.adddata(la.z);var t=this._ctx,e=this._x0,n=this._y0;return t&&t.closepath(),this._xi=e,this._yi=n,this},t.prototype.fill=function(t){t&&t.fill(),this.tostatic()},t.prototype.stroke=function(t){t&&t.stroke(),this.tostatic()},t.prototype.len=function(){return this._len},t.prototype.setdata=function(t){var e=t.length;this.data&&this.data.length===e||!ua||(this.data=new float32array(e));for(var n=0;nu.length&&(this._expanddata(),u=this.data);for(var h=0;h0&&(this._ctx&&this._ctx.lineto(this._pendingptx,this._pendingpty),this._pendingptdist=0)},t.prototype._expanddata=function(){if(!(this.data instanceof array)){for(var t=[],e=0;e11&&(this.data=new float32array(t)))}},t.prototype.getboundingrect=function(){ra[0]=ra[1]=ea[0]=ea[1]=number.max_value,na[0]=na[1]=za[0]=za[1]=-number.max_value;var t,e=this.data,n=0,i=0,r=0,o=0;for(t=0;tn||wa(y)>i||c===e-1)&&(f=math.sqrt(a*a+y*y),r=g,o=x);break;case la.c:var v=t[c++],m=t[c++],x=(g=t[c++],t[c++]),_=t[c++],b=t[c++];f=qe(r,o,v,m,g,x,_,b,10),r=_,o=b;break;case la.q:f=en(r,o,v=t[c++],m=t[c++],g=t[c++],x=t[c++],10),r=g,o=x;break;case la.a:var w=t[c++],s=t[c++],m=t[c++],i=t[c++],t=t[c++],c=t[c++],d=c+t;c+=1;t[c++];d&&(a=fa(t)*m+w,s=ga(t)*i+s),f=ba(m,i)*va(ya,math.abs(c)),r=fa(d)*m+w,o=ga(d)*i+s;break;case la.r:a=r=t[c++],s=o=t[c++],f=2*t[c++]+2*t[c++];break;case la.z:var a=a-r;y=s-o;f=math.sqrt(a*a+y*y),r=a,o=s}f>=0&&(l[h++]=f,u+=f)}return this._pathlen=u,u},t.prototype.rebuildpath=function(t,e){var n,i,r,o,a,s,l,u,h,c,p=this.data,d=this._ux,f=this._uy,g=this._len,y=e<1,v=0,m=0,x=0;if(!y||(this._pathseglen||this._calculatelength(),l=this._pathseglen,u=e*this._pathlen))t:for(var _=0;_0&&(t.lineto(h,c),x=0),b){case la.m:n=r=p[_++],i=o=p[_++],t.moveto(r,o);break;case la.l:a=p[_++],s=p[_++];var s=wa(a-r),m=wa(s-o);if(s>d||m>f){if(y){if(v+(j=l[m++])>u){var i=(u-v)/j;t.lineto(r*(1-i)+a*i,o*(1-i)+s*i);break t}v+=j}t.lineto(a,s),r=a,o=s,x=0}else{var t=s*s+m*m;t>x&&(h=a,c=s,x=t)}break;case la.c:var c=p[_++],d=p[_++],a=p[_++],k=p[_++],l=p[_++],p=p[_++];if(y){if(v+(j=l[m++])>u){ze(r,c,a,l,i=(u-v)/j,pa),ze(o,d,k,p,i,oa),t.beziercurveto(pa[1],oa[1],pa[2],oa[2],pa[3],oa[3]);break t}v+=j}t.beziercurveto(c,d,a,k,l,p),r=l,o=p;break;case la.q:c=p[_++],d=p[_++],a=p[_++],k=p[_++];if(y){if(v+(j=l[m++])>u){qe(r,c,a,i=(u-v)/j,pa),qe(o,d,k,i,oa),t.quadraticcurveto(pa[1],oa[1],pa[2],oa[2]);break t}v+=j}t.quadraticcurveto(c,d,a,k),r=a,o=k;break;case la.a:var o=p[_++],r=p[_++],n=p[_++],e=p[_++],z=p[_++],v=p[_++],b=p[_++],f=!p[_++],g=n>e?n:e,w=wa(n-e)>.001,h=z+v,y=!1;if(y)v+(j=l[m++])>u&&(h=z+v*(u-v)/j,y=!0),v+=j;if(w&&t.ellipse?t.ellipse(o,r,n,e,b,z,h,f):t.arc(o,r,g,z,h,f),y)break t;w&&(n=fa(z)*n+o,i=ga(z)*e+r),r=fa(h)*n+o,o=ga(h)*e+r;break;case la.r:n=r=p[_],i=o=p[_+1],a=p[_++],s=p[_++];var u=p[_++],x=p[_++];if(y){if(v+(j=l[m++])>u){var z=u-v;t.moveto(a,s),t.lineto(a+va(z,u),s),(z-=u)>0&&t.lineto(a+u,s+va(z,x)),(z-=x)>0&&t.lineto(a+ba(u-z,0),s+x),(z-=u)>0&&t.lineto(a,s+ba(x-z,0));break t}v+=j}t.rect(a,s,u,x);break;case la.z:if(y){var j;if(v+(j=l[m++])>u){i=(u-v)/j;t.lineto(r*(1-i)+n*i,o*(1-i)+i*i);break t}v+=j}t.closepath(),r=n,o=i}}},t.prototype.clone=function(){var e=new t,n=this.data;return e.data=n.slice?n.slice():array.prototype.slice.call(n),e._len=this._len,e},t.cmd=la,t.initdefaultprops=function(){var e=t.prototype;e._savedata=!0,e._ux=0,e._uy=0,e._pendingptdist=0,e._version=0}(),t}();function ka(t,e,n,i,r,o,a){if(0===r)return!1;var s=r,l=0;if(a>e+s&&a>i+s||at+s&&o>n+s||oe+c&&h>i+c&&h>o+c&&h>s+c||ht+c&&u>n+c&&u>r+c&&u>a+c||ue+u&&l>i+u&&l>o+u||lt+u&&s>n+u&&s>r+u||sn||h+ur&&(r+=es);var p=math.atan2(l,s);return p<0&&(p+=es),p>=i&&p<=r||p+es>=i&&p+es<=r}function is(t,e,n,i,r,o){if(o>e&&o>i||or?s:0}var rs=qa.cmd,os=2*math.pi;var as=[-1,-1,-1],ss=[-1,-1];function ls(t,e,n,i,r,o,a,s,l,u){if(u>e&&u>i&&u>o&&u>s||u1&&(h=void 0,h=ss[0],ss[0]=ss[1],ss[1]=h),f=he(e,i,o,s,ss[0]),d>1&&(g=he(e,i,o,s,ss[1]))),2===d?ve&&s>i&&s>o||s=0&&h<=1&&(r[l++]=h);else{var u=a*a-4*o*s;if(ge(u))(h=-a/(2*o))>=0&&h<=1&&(r[l++]=h);else if(u>0){var h,c=oe(u),p=(-a-c)/(2*o);(h=(-a+c)/(2*o))>=0&&h<=1&&(r[l++]=h),p>=0&&p<=1&&(r[l++]=p)}}return l}(e,i,o,s,as);if(0===l)return 0;var u=je(e,i,o);if(u>=0&&u<=1){for(var h=0,c=ke(e,i,o,u),p=0;pn||s<-n)return 0;var l=math.sqrt(n*n-s*s);as[0]=-l,as[1]=l;var u=math.abs(i-r);if(u<1e-4)return 0;if(u>=os-1e-4){i=0,r=os;var h=o?1:-1;return a>=as[0]+t&&a<=as[1]+t?h:0}if(i>r){var c=i;i=r,r=c}i<0&&(i+=os,r+=os);for(var p=0,d=0;d<2;d++){var f=as[d];if(f+t>a){var g=math.atan2(s,f);h=o?1:-1;g<0&&(g=os+g),(g>=i&&g<=r||g+os>=i&&g+os<=r)&&(g>math.pi/2&&g<1.5*math.pi&&(h=-h),p+=h)}}return p}function cs(t,e,n,i,r){for(var o,a,s,l,u=t.data,h=t.len(),c=0,p=0,d=0,f=0,g=0,y=0;y1&&(n||(c+=is(p,d,f,g,i,r))),m&&(f=p=u[y],g=d=u[y+1]),v){case rs.m:p=f=u[y++],d=g=u[y++];break;case rs.l:if(n){if(ka(p,d,u[y],u[y+1],e,i,r))return!0}else c+=is(p,d,u[y],u[y+1],i,r)||0;p=u[y++],d=u[y++];break;case rs.c:if(n){if($a(p,d,u[y++],u[y++],u[y++],u[y++],u[y],u[y+1],e,i,r))return!0}else c+=ls(p,d,u[y++],u[y++],u[y++],u[y++],u[y],u[y+1],i,r)||0;p=u[y++],d=u[y++];break;case rs.q:if(n){if(ja(p,d,u[y++],u[y++],u[y],u[y+1],e,i,r))return!0}else c+=us(p,d,u[y++],u[y++],u[y],u[y+1],i,r)||0;p=u[y++],d=u[y++];break;case rs.a:var x=u[y++],_=u[y++],b=u[y++],w=u[y++],s=u[y++],m=u[y++];y+=1;var i=!!(1-u[y++]);o=math.cos(s)*b+x,a=math.sin(s)*w+_,m?(f=o,g=a):c+=is(p,d,o,a,i,r);var t=(i-x)*w/b+x;if(n){if(ns(x,_,w,s,s+m,i,e,t,r))return!0}else c+=hs(x,_,w,s,s+m,i,t,r);p=math.cos(s+m)*b+x,d=math.sin(s+m)*w+_;break;case rs.r:if(f=p=u[y++],g=d=u[y++],o=f+u[y++],a=g+u[y++],n){if(ka(f,g,o,g,e,i,r)||ka(o,g,o,a,e,i,r)||ka(o,a,f,a,e,i,r)||ka(f,a,f,g,e,i,r))return!0}else c+=is(o,g,o,a,i,r),c+=is(f,a,f,g,i,r);break;case rs.z:if(n){if(ka(p,d,f,g,e,i,r))return!0}else c+=is(p,d,f,g,i,r);p=f,d=g}}return n||(s=d,l=g,math.abs(s-l)<1e-4)||(c+=is(p,d,f,g,i,r)||0),0!==c}var ps=k({fill:"#000",stroke:null,strokepercent:1,fillopacity:1,strokeopacity:1,linedashoffset:0,linewidth:1,linecap:"butt",miterlimit:10,strokenoscale:!1,strokefirst:!1},ua),ds={style:k({fill:!0,stroke:!0,strokepercent:!0,fillopacity:!0,strokeopacity:!0,linedashoffset:!0,linewidth:!0,miterlimit:!0},ha.style)},fs=ki.concat(["invisible","culling","z","z2","zlevel","parent"]),gs=function(t){function e(e){return t.call(this,e)||this}var i;return n(e,t),e.prototype.update=function(){var n=this;t.prototype.update.call(this);var i=this.style;if(i.decal){var r=this._decalel=this._decalel||new e;r.buildpath===e.prototype.buildpath&&(r.buildpath=function(t){n.buildpath(t,n.shape)}),r.silent=!0;var o=r.style;for(var a in i)o[a]!==i[a]&&(o[a]=i[a]);o.fill=i.fill?i.decal:null,o.decal=null,o.shadowcolor=null,i.strokefirst&&(o.stroke=null);for(var s=0;s.5?ki:e>.2?"#eee":li}if(t)return li}return ki},e.prototype.getinsidetextstroke=function(t){var e=this.style.fill;if(x(e)){var n=this.__zr;if(!(!n||!n.isdarkmode())===ln(t,0)<.4)return e}},e.prototype.buildpath=function(t,e,n){},e.prototype.pathupdated=function(){this.__dirty&=-5},e.prototype.getupdatedpathproxy=function(t){return!this.path&&this.createpathproxy(),this.path.beginpath(),this.buildpath(this.path,this.shape,t),this.path},e.prototype.createpathproxy=function(){this.path=new qa(!1)},e.prototype.hasstroke=function(){var t=this.style,e=t.stroke;return!(null==e||"none"===e||!(t.linewidth>0))},e.prototype.hasfill=function(){var t=this.style.fill;return null!=t&&"none"!==t},e.prototype.getboundingrect=function(){var t=this._rect,e=this.style,n=!t;if(n){var i=!1;this.path||(i=!0,this.createpathproxy());var r=this.path;(i||4&this.__dirty)&&(r.beginpath(),this.buildpath(r,this.shape,!1),this.pathupdated()),t=r.getboundingrect()}if(this._rect=t,this.hasstroke()&&this.path&&this.path.len()>0){var o=this._rectstroke||(this._rectstroke=t.clone());if(this.__dirty||n){o.copy(t);var a=e.strokenoscale?this.getlinescale():1,s=e.linewidth;if(!this.hasfill()){var l=this.strokecontainthreshold;s=math.max(s,null==l?4:l)}a>1e-10&&(o.width+=s/a,o.height+=s/a,o.x-=s/a/2,o.y-=s/a/2)}return o}return t},e.prototype.contain=function(t,e){var n=this.transformcoordtolocal(t,e),i=this.getboundingrect(),r=this.style;if(t=n[0],e=n[1],i.contain(t,e)){var o=this.path;if(this.hasstroke()){var a=r.linewidth,s=r.strokenoscale?this.getlinescale():1;if(s>1e-10&&(this.hasfill()||(a=math.max(a,this.strokecontainthreshold)),function(t,e,n,i){return cs(t,e,!0,n,i)}(o,a/s,t,e)))return!0}if(this.hasfill())return function(t,e,n){return cs(t,0,!1,e,n)}(o,t,e)}return!1},e.prototype.dirtyshape=function(){this.__dirty|=4,this._rect&&(this._rect=null),this._decalel&&this._decalel.dirtyshape(),this.markredraw()},e.prototype.dirty=function(){this.dirtystyle(),this.dirtyshape()},e.prototype.animateshape=function(t){return this.animate("shape",t)},e.prototype.updateduringanimation=function(t){"style"===t?this.dirtystyle():"shape"===t?this.dirtyshape():this.markredraw()},e.prototype.attrkv=function(e,n){"shape"===e?this.setshape(n):t.prototype.attrkv.call(this,e,n)},e.prototype.setshape=function(t,e){var n=this.shape;return n||(n=this.shape={}),"string"==typeof t?n[t]=e:a(n,t),this.dirtyshape(),this},e.prototype.shapechanged=function(){return!!(4&this.__dirty)},e.prototype.createstyle=function(t){return yt(ps,t)},e.prototype._innersavetonormal=function(e){t.prototype._innersavetonormal.call(this,e);var n=this._normalstate;e.shape&&!n.shape&&(n.shape=a({},this.shape))},e.prototype._applystateobj=function(e,n,i,r,o,a){t.prototype._applystateobj.call(this,e,n,i,r,o,a);var s,l=!(n&&r);if(n&&n.shape?o?r?s=n.shape:(s=a({},i.shape),a(s,n.shape)):(s=a({},r?this.shape:i.shape),a(s,n.shape)):l&&(s=i.shape),s)if(o){this.shape=a({},this.shape);for(var u={},h=g(s),c=0;c0},e.prototype.hasfill=function(){var t=this.style.fill;return null!=t&&"none"!==t},e.prototype.createstyle=function(t){return yt(ys,t)},e.prototype.setboundingrect=function(t){this._rect=t},e.prototype.getboundingrect=function(){var t=this.style;if(!this._rect){var e=t.text;null!=e?e+="":e="";var n=cr(e,t.font,t.textalign,t.textbaseline);if(n.x+=t.x||0,n.y+=t.y||0,this.hasstroke()){var i=t.linewidth;n.x-=i/2,n.y-=i/2,n.width+=i,n.height+=i}this._rect=n}return this._rect},e.initdefaultprops=void(e.prototype.dirtyrecttolerance=10),e}(da);vs.prototype.type="tspan";var ms=k({x:0,y:0},ua),xs={style:k({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,swidth:!0,sheight:!0},ha.style)};var _s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.createstyle=function(t){return yt(ms,t)},e.prototype._getsize=function(t){var e=this.style,n=e[t];if(null!=n)return n;var i,r=(i=e.image)&&"string"!=typeof i&&i.width&&i.height?e.image:this.__image;if(!r)return 0;var o="width"===t?"height":"width",a=e[o];return null==a?r[t]:r[t]/r[o]*a},e.prototype.getwidth=function(){return this._getsize("width")},e.prototype.getheight=function(){return this._getsize("height")},e.prototype.getanimationstyleprops=function(){return xs},e.prototype.getboundingrect=function(){var t=this.style;return this._rect||(this._rect=new sr(t.x||0,t.y||0,this.getwidth(),this.getheight())),this._rect},e}(da);_s.prototype.type="image";var bs=math.round;function ws(t,e,n){if(e){var i=e.x1,r=e.x2,o=e.y1,a=e.y2;t.x1=i,t.x2=r,t.y1=o,t.y2=a;var s=n&&n.linewidth;return s?(bs(2*i)===bs(2*r)&&(t.x1=t.x2=ms(i,s,!0)),bs(2*o)===bs(2*a)&&(t.y1=t.y2=ms(o,s,!0)),t):t}}function ss(t,e,n){if(e){var i=e.x,r=e.y,o=e.width,a=e.height;t.x=i,t.y=r,t.width=o,t.height=a;var s=n&&n.linewidth;return s?(t.x=ms(i,s,!0),t.y=ms(r,s,!0),t.width=math.max(ms(i+o,s,!1)-t.x,0===o?0:1),t.height=math.max(ms(r+a,s,!1)-t.y,0===a?0:1),t):t}}function ms(t,e,n){if(!e)return t;var i=bs(2*t);return(i+bs(e))%2==0?i/2:(i+(n?1:-1))/2}var is=function(){this.x=0,this.y=0,this.width=0,this.height=0},ts={},cs=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.getdefaultshape=function(){return new is},e.prototype.buildpath=function(t,e){var n,i,r,o;if(this.subpixeloptimize){var a=ss(ts,e,this.style);n=a.x,i=a.y,r=a.width,o=a.height,a.r=e.r,e=a}else n=e.x,i=e.y,r=e.width,o=e.height;e.r?function(t,e){var n,i,r,o,a,s=e.x,l=e.y,u=e.width,h=e.height,c=e.r;u<0&&(s+=u,u=-u),h<0&&(l+=h,h=-h),"number"==typeof c?n=i=r=o=c:c instanceof array?1===c.length?n=i=r=o=c[0]:2===c.length?(n=r=c[0],i=o=c[1]):3===c.length?(n=c[0],i=o=c[1],r=c[2]):(n=c[0],i=c[1],r=c[2],o=c[3]):n=i=r=o=0,n+i>u&&(n*=u/(a=n+i),i*=u/a),r+o>u&&(r*=u/(a=r+o),o*=u/a),i+r>h&&(i*=h/(a=i+r),r*=h/a),n+o>h&&(n*=h/(a=n+o),o*=h/a),t.moveto(s+n,l),t.lineto(s+u-i,l),0!==i&&t.arc(s+u-i,l+i,i,-math.pi/2,0),t.lineto(s+u,l+h-r),0!==r&&t.arc(s+u-r,l+h-r,r,0,math.pi/2),t.lineto(s+o,l+h),0!==o&&t.arc(s+o,l+h-o,o,math.pi/2,math.pi),t.lineto(s,l+n),0!==n&&t.arc(s+n,l+n,n,math.pi,1.5*math.pi)}(t,e):t.rect(n,i,r,o)},e.prototype.iszeroarea=function(){return!this.shape.width||!this.shape.height},e}(gs);cs.prototype.type="rect";var ds={fill:"#000"},as={style:k({fill:!0,stroke:!0,fillopacity:!0,strokeopacity:!0,linewidth:!0,fontsize:!0,lineheight:!0,width:!0,height:!0,textshadowcolor:!0,textshadowblur:!0,textshadowoffsetx:!0,textshadowoffsety:!0,backgroundcolor:!0,padding:!0,bordercolor:!0,borderwidth:!0,borderradius:!0},ha.style)},ks=function(t){function e(e){var n=t.call(this)||this;return n.type="text",n._children=[],n._defaultstyle=ds,n.attr(e),n}return n(e,t),e.prototype.childrenref=function(){return this._children},e.prototype.update=function(){t.prototype.update.call(this),this.stylechanged()&&this._updatesubtexts();for(var e=0;ed&&h){var f=math.floor(d/l);n=n.slice(0,f)}if(t&&a&&null!=c)for(var g=jo(c,o,e.ellipsis,{minchar:e.truncateminchar,placeholder:e.placeholder}),y=0;y0,t=null!=t.width&&("truncate"===t.overflow||"break"===t.overflow||"breakall"===t.overflow),c=i.calculatedlineheight,d=0;dl&&ra(n,t.substring(l,u),e,s),ra(n,i[2],e,s,i[1]),l=ko.lastindex}lo){b>0?(m.tokens=m.tokens.slice(0,b),y(m,_,x),n.lines=n.lines.slice(0,v+1)):n.lines=n.lines.slice(0,v);break t}var c=w.width,d=null==c||"auto"===c;if("string"==typeof c&&"%"===c.charat(c.length-1))p.percentwidth=c,h.push(p),p.contentwidth=ur(p.text,i);else{if(d){var a=w.backgroundcolor,k=a&&a.image;k&&qo(k=xo(k))&&(p.width=math.max(p.width,k.width*t/k.height))}var l=f&&null!=r?r-_:null;null!=l&&l=0&&"right"===(c=x[t]).align;)this._placetoken(c,t,b,f,i,"right",y),w-=c.width,i-=c.width,t--;for(m+=(n-(m-d)-(g-i)-w)/2;s<=t;)c=x[s],this._placetoken(c,t,b,f,m+c.width/2,"center",y),m+=c.width,s++;f+=b}},e.prototype._placetoken=function(t,e,n,i,r,o,s){var l=e.rich[t.stylename]||{};l.text=t.text;var u=t.verticalalign,h=i+n/2;"top"===u?h=i+t.height/2:"bottom"===u&&(h=i+n-t.height/2),!t.islineholder&&ws(l)&&this._renderbackground(l,e,"right"===o?r-t.width:"center"===o?r-t.width/2:r,h-t.height/2,t.width,t.height);var c=!!l.backgroundcolor,p=t.textpadding;p&&(r=fs(r,o,p),h-=t.height/2-p[0]-t.innerheight/2);var d=this._getorcreatechild(vs),f=d.createstyle();d.usestyle(f);var g=this._defaultstyle,y=!1,v=0,m=bs("fill"in l?l.fill:"fill"in e?e.fill:(y=!0,g.fill)),x=vs("stroke"in l?l.stroke:"stroke"in e?e.stroke:c||s||g.autostroke&&!y?null:(v=2,g.stroke)),_=l.textshadowblur>0||e.textshadowblur>0;f.text=t.text,f.x=r,f.y=h,_&&(f.shadowblur=l.textshadowblur||e.textshadowblur||0,f.shadowcolor=l.textshadowcolor||e.textshadowcolor||"transparent",f.shadowoffsetx=l.textshadowoffsetx||e.textshadowoffsetx||0,f.shadowoffsety=l.textshadowoffsety||e.textshadowoffsety||0),f.textalign=o,f.textbaseline="middle",f.font=t.font||a,f.opacity=ot(l.opacity,e.opacity,1),ns(f,l),x&&(f.linewidth=ot(l.linewidth,e.linewidth,v),f.linedash=rt(l.linedash,e.linedash),f.linedashoffset=e.linedashoffset||0,f.stroke=x),m&&(f.fill=m);var b=t.contentwidth,w=t.contentheight;d.setboundingrect(new sr(pr(f.x,b,f.textalign),dr(f.y,w,f.textbaseline),b,w))},e.prototype._renderbackground=function(t,e,n,i,r,o){var a,s,l,u=t.backgroundcolor,h=t.borderwidth,c=t.bordercolor,p=u&&u.image,d=u&&!p,f=t.borderradius,g=this;if(d||t.lineheight||h&&c){(a=this._getorcreatechild(cs)).usestyle(a.createstyle()),a.style.fill=null;var y=a.shape;y.x=n,y.y=i,y.width=r,y.height=o,y.r=f,a.dirtyshape()}if(d)(l=a.style).fill=u||null,l.fillopacity=rt(t.fillopacity,1);else if(p){(s=this._getorcreatechild(_s)).onload=function(){g.dirtystyle()};var v=s.style;v.image=u.image,v.x=n,v.y=i,v.width=r,v.height=o}h&&c&&((l=a.style).linewidth=h,l.stroke=c,l.strokeopacity=rt(t.strokeopacity,1),l.linedash=t.borderdash,l.linedashoffset=t.borderdashoffset||0,a.strokecontainthreshold=0,a.hasfill()&&a.hasstroke()&&(l.strokefirst=!0,l.linewidth*=2));var m=(a||s).style;m.shadowblur=t.shadowblur||0,m.shadowcolor=t.shadowcolor||"transparent",m.shadowoffsetx=t.shadowoffsetx||0,m.shadowoffsety=t.shadowoffsety||0,m.opacity=ot(t.opacity,e.opacity,1)},e.makefont=function(t){var e="";return es(t)&&(e=[t.fontstyle,t.fontweight,rs(t.fontsize),t.fontfamily||"sans-serif"].join(" ")),e&&ut(e)||t.textfont||t.font},e}(da),ls={left:!0,right:1,center:1},ps={top:1,bottom:1,middle:1},os=["fontstyle","fontweight","fontsize","fontfamily"];function rs(t){return"string"!=typeof t||-1===t.indexof("px")&&-1===t.indexof("rem")&&-1===t.indexof("em")?isnan(+t)?"12px":t+"px":t}function ns(t,e){for(var n=0;n=0,o=!1;if(t instanceof gs){var a=zs(t),s=r&&a.selectfill||a.normalfill,l=r&&a.selectstroke||a.normalstroke;if(il(s)||il(l)){var u=(i=i||{}).style||{};"inherit"===u.fill?(o=!0,i=a({},i),(u=a({},u)).fill=s):!il(u.fill)&&il(s)?(o=!0,i=a({},i),(u=a({},u)).fill=ol(s)):!il(u.stroke)&&il(l)&&(o||(i=a({},i),u=a({},u)),u.stroke=ol(l)),i.style=u}}if(i&&null==i.z2){o||(i=a({},i));var h=t.z2emphasislift;i.z2=t.z2+(null!=h?h:$s)}return i}(this,0,e,n);if("blur"===t)return function(t,e,n){var i=p(t.currentstates,e)>=0,r=t.style.opacity,o=i?null:function(t,e,n,i){for(var r=t.style,o={},a=0;a0){var o={dataindex:r,seriesindex:t.seriesindex};null!=i&&(o.datatype=i),e.push(o)}}))})),e}function ol(t,e,n){bl(t,!0),fl(t,vl),nl(t,e,n)}function rl(t,e,n,i){i?function(t){bl(t,!1)}(t):ol(t,e,n)}function nl(t,e,n){var i=hs(t);null!=e?(i.focus=e,i.blurscope=n):i.focus&&(i.focus=null)}var el=["emphasis","blur","select"],zl={itemstyle:"getitemstyle",linestyle:"getlinestyle",areastyle:"getareastyle"};function vl(t,e,n,i){n=n||"itemstyle";for(var r=0;r1&&(a*=jl(f),s*=jl(f));var g=(r===o?-1:1)*jl((a*a*(s*s)-a*a*(d*d)-s*s*(p*p))/(a*a*(d*d)+s*s*(p*p)))||0,y=g*a*d/s,v=g*-s*p/a,m=(t+n)/2+kl(c)*y-ql(c)*v,x=(e+i)/2+ql(c)*y+kl(c)*v,_=tu([1,0],[(p-y)/a,(d-v)/s]),b=[(p-y)/a,(d-v)/s],w=[(-1*p-y)/a,(-1*d-v)/s],s=tu(b,w);if(ql(b,w)<=-1&&(s=$l),ql(b,w)>=1&&(s=0),s<0){var m=math.round(s/$l*1e6)/1e6;s=2*$l+m%2*$l}h.adddata(u,m,x,a,s,_,s,c,o)}var nu=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,iu=/-?([0-9]*\.)?[0-9]+([ee]-?[0-9]+)?/g;var ru=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.applytransform=function(t){},e}(gs);function ou(t){return null!=t.setdata}function au(t,e){var n=function(t){var e=new qa;if(!t)return e;var n,i=0,r=0,o=i,a=r,s=qa.cmd,l=t.match(nu);if(!l)return e;for(var u=0;uk*k+l*l&&(m=t,i=c),{cx:m,cy:i,x0:-h,y0:-c,x1:m*(r/b-1),y1:i*(r/b-1)}}function iu(t,e){var n,i=bu(e.r,0),r=bu(e.r0||0,0),o=i>0;if(o||r>0){if(o||(i=r,r=0),r>i){var a=i;i=r,r=a}var s=e.startangle,l=e.endangle;if(!isnan(s)&&!isnan(l)){var u=e.cx,h=e.cy,c=!!e.clockwise,p=xu(l-s),d=p>fu&&p%fu;if(d>su&&(p=d),i>su)if(p>fu-su)t.moveto(u+i*yu(s),h+i*gu(s)),t.arc(u,h,i,s,l,!c),r>su&&(t.moveto(u+r*yu(l),h+r*gu(l)),t.arc(u,h,r,l,s,c));else{var f=void 0,g=void 0,y=void 0,v=void 0,m=void 0,x=void 0,_=void 0,b=void 0,w=void 0,s=void 0,m=void 0,i=void 0,t=void 0,c=void 0,d=void 0,a=void 0,k=i*yu(s),l=i*gu(s),p=r*yu(l),o=r*gu(l),r=p>su;if(r){var n=e.cornerradius;n&&(f=(n=function(t){var e;if(y(t)){var n=t.length;if(!n)return t;e=1===n?[t[0],t[0],0,0]:2===n?[t[0],t[0],t[1],t[1]]:3===n?t.concat(t[2]):t}else e=[t,t,t,t];return e}(n))[0],g=n[1],y=n[2],v=n[3]);var e=xu(i-r)/2;if(m=wu(e,y),x=wu(e,v),_=wu(e,f),b=wu(e,g),m=w=bu(m,x),i=s=bu(_,b),(w>su||s>su)&&(t=i*yu(l),c=i*gu(l),d=r*yu(s),a=r*gu(s),psu){var u=wu(y,m),x=wu(v,m),z=mu(d,a,k,l,i,u,c),j=mu(t,c,p,o,i,x,c);t.moveto(u+z.cx+z.x0,h+z.cy+z.y0),m0&&t.arc(u+z.cx,h+z.cy,u,mu(z.y0,z.x0),mu(z.y1,z.x1),!c),t.arc(u,h,i,mu(z.cy+z.y1,z.cx+z.x1),mu(j.cy+j.y1,j.cx+j.x1),!c),x>0&&t.arc(u+j.cx,h+j.cy,x,mu(j.y1,j.x1),mu(j.y0,j.x0),!c))}else t.moveto(u+k,h+l),t.arc(u,h,i,s,l,!c);else t.moveto(u+k,h+l);if(r>su&&r)if(i>su){u=wu(f,i),z=mu(p,o,t,c,r,-(x=wu(g,i)),c),j=mu(k,l,d,a,r,-u,c);t.lineto(u+z.cx+z.x0,h+z.cy+z.y0),i0&&t.arc(u+z.cx,h+z.cy,x,mu(z.y0,z.x0),mu(z.y1,z.x1),!c),t.arc(u,h,r,mu(z.cy+z.y1,z.cx+z.x1),mu(j.cy+j.y1,j.cx+j.x1),c),u>0&&t.arc(u+j.cx,h+j.cy,u,mu(j.y1,j.x1),mu(j.y0,j.x0),!c))}else t.lineto(u+p,h+o),t.arc(u,h,r,l,s,c);else t.lineto(u+p,h+o)}else t.moveto(u,h);t.closepath()}}}var tu=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startangle=0,this.endangle=2*math.pi,this.clockwise=!0,this.cornerradius=0},cu=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.getdefaultshape=function(){return new tu},e.prototype.buildpath=function(t,e){iu(t,e)},e.prototype.iszeroarea=function(){return this.shape.startangle===this.shape.endangle||this.shape.r===this.shape.r0},e}(gs);cu.prototype.type="sector";var du=function(){this.cx=0,this.cy=0,this.r=0,this.r0=0},au=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.getdefaultshape=function(){return new du},e.prototype.buildpath=function(t,e){var n=e.cx,i=e.cy,r=2*math.pi;t.moveto(n+e.r,i),t.arc(n,i,e.r,0,r,!1),t.moveto(n+e.r0,i),t.arc(n,i,e.r0,0,r,!0)},e}(gs);function ku(t,e,n){var i=e.smooth,r=e.points;if(r&&r.length>=2){if(i){var o=function(t,e,n,i){var r,o,a,s,l=[],u=[],h=[],c=[];if(i){a=[1/0,1/0],s=[-1/0,-1/0];for(var p=0,d=t.length;pqu[1]){if(a=!1,r)return a;var u=math.abs(qu[0]-ju[1]),h=math.abs(ju[0]-qu[1]);math.min(u,h)>i.len()&&(u0){var c={duration:h.duration,delay:h.delay||0,easing:h.easing,done:o,force:!!o||!!a,settofinal:!u,scope:t,during:a};l?e.animatefrom(n,c):e.animateto(n,c)}else e.stopanimation(),!l&&e.attr(n),a&&a(1),o&&o()}function rh(t,e,n,i,r,o){ih("update",t,e,n,i,r,o)}function oh(t,e,n,i,r,o){ih("enter",t,e,n,i,r,o)}function ah(t){if(!t.__zr)return!0;for(var e=0;emath.abs(o[1])?o[0]>0?"right":"left":o[1]>0?"bottom":"top"}function dh(t){return!t.isgroup}function ah(t,e,n){if(t&&e){var i,r=(i={},t.traverse((function(t){dh(t)&&t.anid&&(i[t.anid]=t)})),i);e.traverse((function(t){if(dh(t)&&t.anid){var e=r[t.anid];if(e){var i=o(t);t.attr(o(e)),rh(t,i,n,hs(t).dataindex)}}}))}function o(t){var e={x:t.x,y:t.y,rotation:t.rotation};return function(t){return null!=t.shape}(t)&&(e.shape=a({},t.shape)),e}}function kh(t,e){return z(t,(function(t){var n=t[0];n=ch(n,e.x),n=ph(n,e.x+e.width);var i=t[1];return i=ch(i,e.y),[n,i=ph(i,e.y+e.height)]}))}function lh(t,e){var n=ch(t.x,e.x),i=ph(t.x+t.width,e.x+e.width),r=ch(t.y,e.y),o=ph(t.y+t.height,e.y+e.height);if(i>=n&&o>=r)return{x:n,y:r,width:i-n,height:o-r}}function ph(t,e,n){var i=a({recthover:!0},e),r=i.style={strokenoscale:!0};if(n=n||{x:-1,y:-1,width:2,height:2},t)return 0===t.indexof("image://")?(r.image=t.slice(8),k(r,n),new _s(i)):xh(t.replace("path://",""),i,n,"center")}function oh(t,e,n,i,r){for(var o=0,a=r[r.length-1];o=-1e-6)return!1;var f=t-r,g=e-o,y=nh(f,g,u,h)/d;if(y<0||y>1)return!1;var v=nh(f,g,c,p)/d;return!(v<0||v>1)}function nh(t,e,n,i){return t*i-n*e}function eh(t){var e=t.itemtooltipoption,n=t.componentmodel,i=t.itemname,r=x(e)?{formatter:e}:e,o=n.maintype,a=n.componentindex,s={componenttype:o,name:i,$vars:["name"]};s[o+"index"]=a;var l=t.formatterparamsextra;l&&e(g(l),(function(t){mt(s,t)||(s[t]=l[t],s.$vars.push(t))}));var u=hs(t.el);u.componentmaintype=o,u.componentindex=a,u.tooltipconfig={name:i,option:k({content:i,formatterparams:s},r)}}function zh(t,e){var n;t.isgroup&&(n=e(t)),n||t.traverse(e)}function vh(t,e){if(t)if(y(t))for(var n=0;n-1?vc:xc;function sc(t,e){t=t.touppercase(),bc[t]=new dc(e),_c[t]=e}function mc(t){return bc[t]}sc(mc,{time:{month:["january","february","march","april","may","june","july","august","september","october","november","december"],monthabbr:["jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec"],dayofweek:["sunday","monday","tuesday","wednesday","thursday","friday","saturday"],dayofweekabbr:["sun","mon","tue","wed","thu","fri","sat"]},legend:{selector:{all:"all",inverse:"inv"}},toolbox:{brush:{title:{rect:"box select",polygon:"lasso select",linex:"horizontally select",liney:"vertically select",keep:"keep selections",clear:"clear selections"}},dataview:{title:"data view",lang:["data view","close","refresh"]},datazoom:{title:{zoom:"zoom",back:"zoom reset"}},magictype:{title:{line:"switch to line chart",bar:"switch to bar chart",stack:"stack",tiled:"tile"}},restore:{title:"restore"},saveasimage:{title:"save as image",lang:["right click to save image"]}},series:{typenames:{pie:"pie chart",bar:"bar chart",line:"line chart",scatter:"scatter plot",effectscatter:"ripple scatter plot",radar:"radar chart",tree:"tree",treemap:"treemap",boxplot:"boxplot",candlestick:"candlestick",k:"k line chart",heatmap:"heat map",map:"map",parallel:"parallel coordinate map",lines:"line graph",graph:"relationship graph",sankey:"sankey diagram",funnel:"funnel chart",gauge:"gauge",pictorialbar:"pictorial bar",themeriver:"theme river map",sunburst:"sunburst"}},aria:{general:{withtitle:'this is a chart about "{title}"',withouttitle:"this is a chart"},series:{single:{prefix:"",withname:" with type {seriestype} named {seriesname}.",withoutname:" with type {seriestype}."},multiple:{prefix:". it consists of {seriescount} series count.",withname:" the {seriesid} series is a {seriestype} representing {seriesname}.",withoutname:" the {seriesid} series is a {seriestype}.",separator:{middle:"",end:""}}},data:{alldata:"the data is as follows: ",partialdata:"the first {displaycnt} items are: ",withname:"the data for {name} is {value}",withoutname:"{value}",separator:{middle:", ",end:". "}}}}),sc(vc,{time:{month:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthabbr:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayofweek:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayofweekabbr:["日","一","二","三","四","五","六"]},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:""}}}});var ic=1e3,tc=6e4,cc=36e5,dc=864e5,ac=31536e6,kc={year:"{yyyy}",month:"{mmm}",day:"{d}",hour:"{hh}:{mm}",minute:"{hh}:{mm}",second:"{hh}:{mm}:{ss}",millisecond:"{hh}:{mm}:{ss} {sss}",none:"{yyyy}-{mm}-{dd} {hh}:{mm}:{ss} {sss}"},lc="{yyyy}-{mm}-{dd}",pc={year:"{yyyy}",month:"{yyyy}-{mm}",day:lc,hour:"{yyyy}-{mm}-{dd} "+kc.hour,minute:"{yyyy}-{mm}-{dd} "+kc.minute,second:"{yyyy}-{mm}-{dd} "+kc.second,millisecond:kc.none},oc=["year","month","day","hour","minute","second","millisecond"],rc=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function nc(t,e){return"0000".substr(0,e-(t+="").length)+t}function ec(t){switch(t){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return t}}function zc(t){return t===ec(t)}function vc(t,e,n,i){var r=jr(t),o=r[gc(n)](),a=r[wc(n)]()+1,s=math.floor((a-1)/3)+1,l=r[hc(n)](),u=r["get"+(n?"utc":"")+"day"](),h=r[yc(n)](),c=(h-1)%12+1,p=r[uc(n)](),d=r[xc(n)](),f=r[zc(n)](),g=(i instanceof dc?i:mc(i||wc)||bc.en).getmodel("time"),y=g.get("month"),v=g.get("monthabbr"),m=g.get("dayofweek"),x=g.get("dayofweekabbr");return(e||"").replace(/{yyyy}/g,o+"").replace(/{yy}/g,o%100+"").replace(/{q}/g,s+"").replace(/{mmmm}/g,y[a-1]).replace(/{mmm}/g,v[a-1]).replace(/{mm}/g,nc(a,2)).replace(/{m}/g,a+"").replace(/{dd}/g,nc(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,m[u]).replace(/{ee}/g,x[u]).replace(/{e}/g,u+"").replace(/{hh}/g,nc(h,2)).replace(/{h}/g,h+"").replace(/{hh}/g,nc(c+"",2)).replace(/{h}/g,c+"").replace(/{mm}/g,nc(p,2)).replace(/{m}/g,p+"").replace(/{ss}/g,nc(d,2)).replace(/{s}/g,d+"").replace(/{sss}/g,nc(f,3)).replace(/{s}/g,f+"")}function bc(t,e){var n=jr(t),i=n[wc(e)]()+1,r=n[hc(e)](),o=n[yc(e)](),a=n[uc(e)](),s=n[xc(e)](),l=0===n[zc(e)](),u=l&&0===s,h=u&&0===a,c=h&&0===o,p=c&&1===r;return p&&1===i?"year":p?"month":c?"day":h?"hour":u?"minute":l?"second":"millisecond"}function fc(t,e,n){var i=j(t)?jr(t):t;switch(e=e||bc(t,n)){case"year":return i[gc(n)]();case"half-year":return i[wc(n)]()>=6?1:0;case"quarter":return math.floor((i[wc(n)]()+1)/4);case"month":return i[wc(n)]();case"day":return i[hc(n)]();case"half-day":return i[yc(n)]()/24;case"hour":return i[yc(n)]();case"minute":return i[uc(n)]();case"second":return i[xc(n)]();case"millisecond":return i[zc(n)]()}}function gc(t){return t?"getutcfullyear":"getfullyear"}function wc(t){return t?"getutcmonth":"getmonth"}function hc(t){return t?"getutcdate":"getdate"}function yc(t){return t?"getutchours":"gethours"}function uc(t){return t?"getutcminutes":"getminutes"}function xc(t){return t?"getutcseconds":"getseconds"}function zc(t){return t?"getutcmilliseconds":"getmilliseconds"}function jc(t){return t?"setutcfullyear":"setfullyear"}function qc(t){return t?"setutcmonth":"setmonth"}function kc(t){return t?"setutcdate":"setdate"}function $c(t){return t?"setutchours":"sethours"}function jc(t){return t?"setutcminutes":"setminutes"}function qc(t){return t?"setutcseconds":"setseconds"}function tp(t){return t?"setutcmilliseconds":"setmilliseconds"}function ep(t){if(!eo(t))return x(t)?t:"-";var e=(t+"").split(".");return e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(e.length>1?"."+e[1]:"")}function np(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}var ip=st,rp=/([&<>"'])/g,op={"&":"&","<":"<",">":">",'"':""","'":"'"};function ap(t){return null==t?"":(t+"").replace(rp,(function(t,e){return op[e]}))}function sp(t,e,n){function i(t){return t&&ut(t)?t:"-"}function r(t){return!(null==t||isnan(t)||!isfinite(t))}var o="time"===e,a=t instanceof date;if(o||a){var s=o?jr(t):t;if(!isnan(+s))return vc(s,"{yyyy}-{mm}-{dd} {hh}:{mm}:{ss}",n);if(a)return"-"}if("ordinal"===e)return z(t)?i(t):j(t)&&r(t)?t+"":"-";var l=to(t);return r(l)?ep(l):z(t)?i(t):"boolean"==typeof t?t+"":"-"}var lp=["a","b","c","d","e","f","g"],up=function(t,e){return"{"+t+(null==e?"":e)+"}"};function hp(t,e,n){y(e)||(e=[e]);var i=e.length;if(!i)return"";for(var r=e[0].$vars||[],o=0;o':'':{rendermode:o,content:"{"+(n.markerid||"markerx")+"|} ",style:"subitem"===r?{width:4,height:4,borderradius:2,backgroundcolor:i}:{width:10,height:10,borderradius:5,backgroundcolor:i}}:""}function pp(t,e){return e=e||"transparent",x(t)?t:q(t)&&t.colorstops&&(t.colorstops[0]||{}).color||e}function dp(t,e){if("_blank"===e||"blank"===e){var n=window.open();n.opener=null,n.location.href=t}else window.open(t,e)}var fp=e,gp=["left","right","top","bottom","width","height"],yp=[["width","left","right"],["height","top","bottom"]];function vp(t,e,n,i,r){var o=0,a=0;null==i&&(i=1/0),null==r&&(r=1/0);var s=0;e.eachchild((function(l,u){var h,c,p=l.getboundingrect(),d=e.childat(u+1),f=d&&d.getboundingrect();if("horizontal"===t){var g=p.width+(f?-f.x+p.x:0);(h=o+g)>i||l.newline?(o=0,h=g,a+=s+n,s=p.height):s=math.max(s,p.height)}else{var y=p.height+(f?-f.y+p.y:0);(c=a+y)>r||l.newline?(o+=s+n,a=0,c=y,s=p.width):s=math.max(s,p.width)}l.newline||(l.x=o,l.y=a,l.markredraw(),"horizontal"===t?o=h+n:a=c+n)}))}var mp=vp;h(vp,"vertical"),h(vp,"horizontal");function xp(t,e,n){n=ip(n||0);var i=e.width,r=e.height,o=er(t.left,i),a=er(t.top,r),s=er(t.right,i),l=er(t.bottom,r),u=er(t.width,i),h=er(t.height,r),c=n[2]+n[0],p=n[1]+n[3],d=t.aspect;switch(isnan(u)&&(u=i-s-p-o),isnan(h)&&(h=r-l-c-a),null!=d&&(isnan(u)&&isnan(h)&&(d>i/r?u=.8*i:h=.8*r),isnan(u)&&(u=d*h),isnan(h)&&(h=u/d)),isnan(o)&&(o=i-s-u-p),isnan(a)&&(a=r-l-h-c),t.left||t.right){case"center":o=i/2-u/2-n[3];break;case"right":o=i-u-p}switch(t.top||t.bottom){case"middle":case"center":a=r/2-h/2-n[0];break;case"bottom":a=r-h-c}o=o||0,a=a||0,isnan(u)&&(u=i-p-o-(s||0)),isnan(h)&&(h=r-c-a-(l||0));var f=new sr(o+n[3],a+n[0],u,h);return f.margin=n,f}function _p(t,e,n,i,r,o){var a,s=!r||!r.hv||r.hv[0],l=!r||!r.hv||r.hv[1],u=r&&r.boundingmode||"all";if((o=o||t).x=t.x,o.y=t.y,!s&&!l)return!1;if("raw"===u)a="group"===t.type?new sr(0,0,+e.width||0,+e.height||0):t.getboundingrect();else if(a=t.getboundingrect(),t.needlocaltransform()){var h=t.getlocaltransform();(a=a.clone()).applytransform(h)}var c=xp(k({width:a.width,height:a.height},e),n,i),p=s?c.x-a.x:0,d=l?c.y-a.y:0;return"raw"===u?(o.x=p,o.y=d):(o.x+=p,o.y+=d),o===t&&t.markredraw(),!0}function bp(t){var e=t.layoutmode||t.constructor.layoutmode;return q(e)?e:e?{type:e}:null}function wp(t,e,n){var i=n&&n.ignoresize;!y(i)&&(i=[i,i]);var r=a(yp[0],0),o=a(yp[1],1);function a(n,r){var o={},a=0,u={},h=0;if(fp(n,(function(e){u[e]=t[e]})),fp(n,(function(t){s(e,t)&&(o[t]=u[t]=e[t]),l(o,t)&&a++,l(u,t)&&h++})),i[r])return l(e,n[1])?u[n[2]]=null:l(e,n[2])&&(u[n[1]]=null),u;if(2!==h&&a){if(a>=2)return o;for(var c=0;c=0;a--)o=c(o,n[a],!0);e.defaultoption=o}return e.defaultoption},e.prototype.getreferringcomponents=function(t,e){var n=t+"index",i=t+"id";return ao(this.ecmodel,t,{index:this.get(n,!0),id:this.get(i,!0)},e)},e.prototype.getboxlayoutparams=function(){var t=this;return{left:t.get("left"),top:t.get("top"),right:t.get("right"),bottom:t.get("bottom"),width:t.get("width"),height:t.get("height")}},e.prototype.getzlevelkey=function(){return""},e.prototype.setzlevel=function(t){this.option.zlevel=t},e.protoinitialize=function(){var t=e.prototype;t.type="component",t.id="",t.name="",t.maintype="",t.subtype="",t.componentindex=0}(),e}(dc);zo(tp,dc),go(tp),function(t){var e={};t.registersubtypedefaulter=function(t,n){var i=no(t);e[i.main]=n},t.determinesubtype=function(n,i){var r=i.type;if(!r){var o=no(n).main;t.hassubtypes(n)&&e[o]&&(r=e[o](i))}return r}}(tp),function(t,e){function n(t,e){return t[e]||(t[e]={predecessor:[],successor:[]}),t[e]}t.topologicaltravel=function(t,i,r,o){if(t.length){var a=function(t){var i={},r=[];return e(t,(function(o){var a=n(i,o),s=function(t,e){var n=[];return e(t,(function(t){p(e,t)>=0&&n.push(t)})),n}(a.originaldeps=e(o),t);a.entrycount=s.length,0===a.entrycount&&r.push(o),e(s,(function(t){p(a.predecessor,t)<0&&a.predecessor.push(t);var e=n(i,t);p(e.successor,t)<0&&e.successor.push(o)}))})),{graph:i,noentrylist:r}}(i),s=a.graph,l=a.noentrylist,u={};for(e(t,(function(t){u[t]=!0}));l.length;){var h=l.pop(),c=s[h],p=!!u[h];p&&(r.call(o,h,c.originaldeps.slice()),delete u[h]),e(c.successor,p?f:d)}e(u,(function(){var t="";throw new error(t)}))}function d(t){s[t].entrycount--,0===s[t].entrycount&&l.push(t)}function f(t){u[t]=!0,d(t)}}}(tp,(function(t){var e=[];e(tp.getclassesbymaintype(t),(function(t){e=e.concat(t.dependencies||t.prototype.dependencies||[])})),e=z(e,(function(t){return no(t).main})),"dataset"!==t&&p(e,"dataset")<=0&&e.unshift("dataset");return e}));var cp="";"undefined"!=typeof navigator&&(cp=navigator.platform||"");var dp="rgba(0, 0, 0, 0.2)",ap={darkmode:"auto",colorby:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientcolor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:dp,dasharrayx:[1,0],dasharrayy:[2,5],symbolsize:1,rotation:math.pi/6},{color:dp,symbol:"circle",dasharrayx:[[8,8],[0,8,8,0]],dasharrayy:[6,0],symbolsize:.8},{color:dp,dasharrayx:[1,0],dasharrayy:[4,3],rotation:-math.pi/4},{color:dp,dasharrayx:[[6,6],[0,6,6,0]],dasharrayy:[6,0]},{color:dp,dasharrayx:[[1,0],[1,6]],dasharrayy:[1,0,6,0],rotation:math.pi/4},{color:dp,symbol:"triangle",dasharrayx:[[9,9],[0,9,9,0]],dasharrayy:[7,2],symbolsize:.75}]}},textstyle:{fontfamily:cp.match(/^win/)?"microsoft yahei":"sans-serif",fontsize:12,fontstyle:"normal",fontweight:"normal"},blendmode:null,stateanimation:{duration:300,easing:"cubicout"},animation:"auto",animationduration:1e3,animationdurationupdate:500,animationeasing:"cubicinout",animationeasingupdate:"cubicinout",animationthreshold:2e3,progressivethreshold:3e3,progressive:400,hoverlayerthreshold:3e3,useutc:!1},kp=ft(["tooltip","label","itemname","itemid","itemgroupid","seriesname"]),lp="original",pp="arrayrows",op="objectrows",rp="keyedcolumns",np="typedarray",ep="unknown",zp="column",vp="row",bp=1,fp=2,gp=3,wp=so();function hp(t,e,n){var i={},r=up(e);if(!r||!t)return i;var o,a,s=[],l=[],u=e.ecmodel,h=wp(u).datasetmap,c=r.uid+"_"+n.serieslayoutby;e(t=t.slice(),(function(e,n){var r=q(e)?e:t[n]={name:e};"ordinal"===r.type&&null==o&&(o=n,a=f(r)),i[r.name]=[]}));var p=h.get(c)||h.set(c,{categorywaydim:a,valuewaydim:0});function d(t,e,n){for(var i=0;ie)return t[i];return t[n-1]}(i,a):n;if((h=h||n)&&h.length){var c=h[l];return r&&(u[r]=c),s.paletteidx=(l+1)%h.length,c}}var id=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.init=function(t,e,n,i,r,o){i=i||{},this.option=null,this._theme=new dc(i),this._locale=new dc(r),this._optionmanager=o},e.prototype.setoption=function(t,e,n){var i=ad(e);this._optionmanager.setoption(t,n,i),this._resetoption(null,i)},e.prototype.resetoption=function(t,e){return this._resetoption(t,ad(e))},e.prototype._resetoption=function(t,e){var n=!1,i=this._optionmanager;if(!t||"recreate"===t){var r=i.mountoption("recreate"===t);0,this.option&&"recreate"!==t?(this.restoredata(),this._mergeoption(r,e)):$p(this,r),n=!0}if("timeline"!==t&&"media"!==t||this.restoredata(),!t||"recreate"===t||"timeline"===t){var o=i.gettimelineoption(this);o&&(n=!0,this._mergeoption(o,e))}if(!t||"recreate"===t||"media"===t){var a=i.getmediaoption(this);a.length&&e(a,(function(t){n=!0,this._mergeoption(t,e)}),this)}return n},e.prototype.mergeoption=function(t){this._mergeoption(t,null)},e.prototype._mergeoption=function(t,e){var n=this.option,i=this._componentsmap,r=this._componentscount,o=[],a=ft(),s=e&&e.replacemergemaintypemap;wp(this).datasetmap=ft(),e(t,(function(t,e){null!=t&&(tp.hasclass(e)?e&&(o.push(e),a.set(e,!0)):n[e]=null==n[e]?t(t):c(n[e],t,!0))})),s&&s.each((function(t,e){tp.hasclass(e)&&!a.get(e)&&(o.push(e),a.set(e,!0))})),tp.topologicaltravel(o,tp.getallclassmaintypes(),(function(e){var o=function(t,e,n){var i=jp.get(e);if(!i)return n;var r=i(t);return r?n.concat(r):n}(this,e,ho(t[e])),a=i.get(e),l=a?s&&s.get(e)?"replacemerge":"normalmerge":"replaceall",u=yo(a,o,l);(function(t,e,n){e(t,(function(t){var i=t.newoption;q(i)&&(t.keyinfo.maintype=e,t.keyinfo.subtype=function(t,e,n,i){return e.type?e.type:n?n.subtype:i.determinesubtype(t,e)}(e,i,t.existing,n))}))})(u,e,tp),n[e]=null,i.set(e,null),r.set(e,0);var h,c=[],p=[],d=0;e(u,(function(t,n){var i=t.existing,r=t.newoption;if(r){var o="series"===e,a=tp.getclass(e,t.keyinfo.subtype,!o);if(!a)return;if("tooltip"===e){if(h)return void 0;h=!0}if(i&&i.constructor===a)i.name=t.keyinfo.name,i.mergeoption(r,this),i.optionupdated(r,!1);else{var s=a({componentindex:n},t.keyinfo);a(i=new a(r,this,this,s),s),t.brandnew&&(i.__requirenewview=!0),i.init(r,this,this),i.optionupdated(null,!0)}}else i&&(i.mergeoption({},this),i.optionupdated({},!1));i?(c.push(i.option),p.push(i),d++):(c.push(void 0),p.push(void 0))}),this),n[e]=c,i.set(e,p),r.set(e,d),"series"===e&&qp(this)}),this),this._seriesindices||qp(this)},e.prototype.getoption=function(){var t=t(this.option);return e(t,(function(e,n){if(tp.hasclass(n)){for(var i=ho(e),r=i.length,o=!1,a=r-1;a>=0;a--)i[a]&&!bo(i[a])?o=!0:(i[a]=null,!o&&r--);i.length=r,t[n]=i}})),delete t["\0_ec_inner"],t},e.prototype.gettheme=function(){return this._theme},e.prototype.getlocalemodel=function(){return this._locale},e.prototype.setupdatepayload=function(t){this._payload=t},e.prototype.getupdatepayload=function(){return this._payload},e.prototype.getcomponent=function(t,e){var n=this._componentsmap.get(t);if(n){var i=n[e||0];if(i)return i;if(null==e)for(var r=0;r=e:"max"===n?t<=e:t===e})(i[a],t,o)||(r=!1)}})),r}var fd=e,gd=q,yd=["areastyle","linestyle","nodestyle","linkstyle","chordstyle","label","labelline"];function vd(t){var e=t&&t.itemstyle;if(e)for(var n=0,i=yd.length;n=0;g--){var y=t[g];if(s||(p=y.data.rawindexof(y.stackedbydimension,c)),p>=0){var v=y.data.getbyrawindex(y.stackresultdimension,p);if("all"===l||"positive"===l&&v>0||"negative"===l&&v<0||"samesign"===l&&d>=0&&v>0||"samesign"===l&&d<=0&&v<0){d=hr(d,v),f=v;break}}}return i[0]=d,i[1]=f,i}))}))}var nd,ed,zd,vd,bd,fd=function(t){this.data=t.data||(t.sourceformat===rp?{}:[]),this.sourceformat=t.sourceformat||ep,this.serieslayoutby=t.serieslayoutby||zp,this.startindex=t.startindex||0,this.dimensionsdetectedcount=t.dimensionsdetectedcount,this.metarawoption=t.metarawoption;var e=this.dimensionsdefine=t.dimensionsdefine;if(e)for(var n=0;nu&&(u=d)}s[0]=l,s[1]=u}},i=function(){return this._data?this._data.length/this._dimsize:0};function r(t){for(var e=0;e=0&&(s=o.interpolatedvalue[l])}return null!=s?s+"":""})):void 0},t.prototype.getrawvalue=function(t,e){return af(this.getdata(e),t)},t.prototype.formattooltip=function(t,e,n){},t}();function uf(t){var e,n;return q(t)?t.type&&(n=t):e=t,{text:e,frag:n}}function hf(t){return new cf(t)}var cf=function(){function t(t){t=t||{},this._reset=t.reset,this._plan=t.plan,this._count=t.count,this._ondirty=t.ondirty,this._dirty=!0}return t.prototype.perform=function(t){var e,n=this._upstream,i=t&&t.skip;if(this._dirty&&n){var r=this.context;r.data=r.outputdata=n.context.outputdata}this.__pipeline&&(this.__pipeline.currenttask=this),this._plan&&!i&&(e=this._plan(this.context));var o,a=h(this._modby),s=this._moddatacount||0,l=h(t&&t.modby),u=t&&t.moddatacount||0;function h(t){return!(t>=1)&&(t=1),t}a===l&&s===u||(e="reset"),(this._dirty||"reset"===e)&&(this._dirty=!1,o=this._doreset(i)),this._modby=l,this._moddatacount=u;var c=t&&t.step;if(this._dueend=n?n._outputdueend:this._count?this._count(this.context):1/0,this._progress){var p=this._dueindex,d=math.min(null!=c?this._dueindex+c:1/0,this._dueend);if(!i&&(o||p1&&i>0?s:a}};return o;function a(){return e=t?null:oe},gte:function(t,e){return t>=e}},vf=function(){function t(t,e){if(!j(e)){var n="";0,ao(n)}this._opfn=yf[t],this._rvalfloat=to(e)}return t.prototype.evaluate=function(t){return j(t)?this._opfn(t,this._rvalfloat):this._opfn(to(t),this._rvalfloat)},t}(),mf=function(){function t(t,e){var n="desc"===t;this._resultlt=n?1:-1,null==e&&(e=n?"min":"max"),this._incomparable="min"===e?-1/0:1/0}return t.prototype.evaluate=function(t,e){var n=j(t)?t:to(t),i=j(e)?e:to(e),r=isnan(n),o=isnan(i);if(r&&(n=this._incomparable),o&&(i=this._incomparable),r&&o){var a=x(t),s=x(e);a&&(n=s?t:0),s&&(i=a?e:0)}return ni?-this._resultlt:0},t}(),xf=function(){function t(t,e){this._rval=e,this._iseq=t,this._rvaltypeof=typeof e,this._rvalfloat=to(e)}return t.prototype.evaluate=function(t){var e=t===this._rval;if(!e){var n=typeof t;n===this._rvaltypeof||"number"!==n&&"number"!==this._rvaltypeof||(e=to(t)===this._rvalfloat)}return this._iseq?e:!e},t}();function _f(t,e){return"eq"===t||"ne"===t?new xf("eq"===t,e):mt(yf,t)?new vf(t,e):null}var bf=function(){function t(){}return t.prototype.getrawdata=function(){throw new error("not supported")},t.prototype.getrawdataitem=function(t){throw new error("not supported")},t.prototype.clonerawdata=function(){},t.prototype.getdimensioninfo=function(t){},t.prototype.clonealldimensioninfo=function(){},t.prototype.count=function(){},t.prototype.retrievevalue=function(t,e){},t.prototype.retrievevaluefromitem=function(t,e){},t.prototype.convertvalue=function(t,e){return df(t,e)},t}();function wf(t){var e=t.sourceformat;if(!df(e)){var n="";0,ao(n)}return t.data}function sf(t){var e=t.sourceformat,n=t.data;if(!df(e)){var i="";0,ao(i)}if(e===pp){for(var r=[],o=0,a=n.length;o65535?lf:pf}function zf(t,e,n,i,r){var o=nf[n||"float"];if(r){var a=t[e],s=a&&a.length;if(s!==i){for(var l=new o(i),u=0;ug[1]&&(g[1]=f)}return this._rawcount=this._count=s,{start:a,end:s}},t.prototype._initdatafromprovider=function(t,e,n){for(var i=this._provider,r=this._chunks,o=this._dimensions,a=o.length,s=this._rawextent,l=z(o,(function(t){return t.property})),u=0;uy[1]&&(y[1]=g)}}!i.persistent&&i.clean&&i.clean(),this._rawcount=this._count=e,this._extent=[]},t.prototype.count=function(){return this._count},t.prototype.get=function(t,e){if(!(e>=0&&e=0&&e=this._rawcount||t<0)return-1;if(!this._indices)return t;var e=this._indices,n=e[t];if(null!=n&&nt))return o;r=o-1}}return-1},t.prototype.indicesofnearest=function(t,e,n){var i=this._chunks[t],r=[];if(!i)return r;null==n&&(n=1/0);for(var o=1/0,a=-1,s=0,l=0,u=this.count();l=0&&a<0)&&(o=c,a=h,s=0),h===a&&(r[s++]=l))}return r.length=s,r},t.prototype.getindices=function(){var t,e=this._indices;if(e){var n=e.constructor,i=this._count;if(n===array){t=new n(i);for(var r=0;r=u&&x<=h||isnan(x))&&(a[s++]=d),d++}p=!0}else if(2===r){f=c[i[0]];var y=c[i[1]],v=t[i[1]][0],m=t[i[1]][1];for(g=0;g=u&&x<=h||isnan(x))&&(_>=v&&_<=m||isnan(_))&&(a[s++]=d),d++}p=!0}}if(!p)if(1===r)for(g=0;g=u&&x<=h||isnan(x))&&(a[s++]=b)}else for(g=0;gt[m][1])&&(w=!1)}w&&(a[s++]=e.getrawindex(g))}return sy[1]&&(y[1]=g)}}}},t.prototype.lttbdownsample=function(t,e){var n,i,r,o=this.clone([t],!0),a=o._chunks[t],s=this.count(),l=0,u=math.floor(1/e),h=this.getrawindex(0),c=new(ef(this._rawcount))(math.min(2*(math.ceil(s/u)+2),s));c[l++]=h;for(var p=1;pn&&(n=i,r=i)}m>0&&m<_-x&&(c[l++]=math.min(s,r),r=math.max(s,r)),c[l++]=r,h=r}return c[l++]=this.getrawindex(s-1),o._count=l,o._indices=c,o.getrawindex=this._getrawidx,o},t.prototype.downsample=function(t,e,n,i){for(var r=this.clone([t],!0),o=r._chunks,a=[],s=math.floor(1/e),l=o[t],u=this.count(),h=r._rawextent[t]=[1/0,-1/0],c=new(ef(this._rawcount))(math.ceil(u/s)),p=0,d=0;du-d&&(s=u-d,a.length=s);for(var f=0;fh[1]&&(h[1]=y),c[p++]=v}return r._count=p,r._indices=c,r._updategetrawidx(),r},t.prototype.each=function(t,e){if(this._count)for(var n=t.length,i=this._chunks,r=0,o=this.count();ra&&(a=l)}return i=[o,a],this._extent[t]=i,i},t.prototype.getrawdataitem=function(t){var e=this.getrawindex(t);if(this._provider.persistent)return this._provider.getitem(e);for(var n=[],i=this._chunks,r=0;r=0?this._indices[t]:-1},t.prototype._updategetrawidx=function(){this.getrawindex=this._indices?this._getrawidx:this._getrawidxidentity},t.internalfield=function(){function t(t,e,n,i){return df(t[i],this._dimensions[i])}af={arrayrows:t,objectrows:function(t,e,n,i){return df(t[e],this._dimensions[i])},keyedcolumns:t,original:function(t,e,n,i){var r=t&&(null==t.value?t:t.value);return df(r instanceof array?r[i]:r,this._dimensions[i])},typedarray:function(t,e,n,i){return t[i]}}}(),t}(),bf=function(){function t(t){this._sourcelist=[],this._storelist=[],this._upstreamsignlist=[],this._versionsignbase=0,this._dirty=!0,this._sourcehost=t}return t.prototype.dirty=function(){this._setlocalsource([],[]),this._storelist=[],this._dirty=!0},t.prototype._setlocalsource=function(t,e){this._sourcelist=t,this._upstreamsignlist=e,this._versionsignbase++,this._versionsignbase>9e10&&(this._versionsignbase=0)},t.prototype._getversionsign=function(){return this._sourcehost.uid+"_"+this._versionsignbase},t.prototype.preparesource=function(){this._isdirty()&&(this._createsource(),this._dirty=!1)},t.prototype._createsource=function(){this._setlocalsource([],[]);var t,e,n=this._sourcehost,i=this._getupstreamsourcemanagers(),r=!!i.length;if(gf(n)){var o=n,a=void 0,s=void 0,l=void 0;if(r){var u=i[0];u.preparesource(),a=(l=u.getsource()).data,s=l.sourceformat,e=[u._getversionsign()]}else s=$(a=o.get("data",!0))?np:lp,e=[];var h=this._getsourcemetarawoption()||{},c=l&&l.metarawoption||{},p=rt(h.serieslayoutby,c.serieslayoutby)||null,d=rt(h.sourceheader,c.sourceheader),f=rt(h.dimensions,c.dimensions);t=p!==c.serieslayoutby||!!d!=!!c.sourceheader||f?[wd(a,{serieslayoutby:p,sourceheader:d,dimensions:f},s)]:[]}else{var g=n;if(r){var y=this._applytransform(i);t=y.sourcelist,e=y.upstreamsignlist}else{t=[wd(g.get("source",!0),this._getsourcemetarawoption(),null)],e=[]}}this._setlocalsource(t,e)},t.prototype._applytransform=function(t){var e,n=this._sourcehost,i=n.get("transform",!0),r=n.get("fromtransformresult",!0);if(null!=r){var o="";1!==t.length&&wf(o)}var a,s=[],l=[];return e(t,(function(t){t.preparesource();var e=t.getsource(r||0),n="";null==r||e||wf(n),s.push(e),l.push(t._getversionsign())})),i?e=function(t,e,n){var i=ho(t),r=i.length,o="";r||ao(o);for(var a=0,s=r;a1||n>0&&!t.noheader;return e(t.blocks,(function(t){var n=qf(t);n>=e&&(e=n+ +(i&&(!n||zf(t)&&!t.noheader)))})),e}return 0}function kf(t,e,n,i){var r,o=e.noheader,a=(r=qf(e),{html:yf[r],richtext:uf[r]}),s=[],l=e.blocks||[];lt(!l||y(l)),l=l||[];var u=t.ordermode;if(e.sortblocks&&u){l=l.slice();var h={valueasc:"asc",valuedesc:"desc"};if(mt(h,u)){var c=new mf(h[u],null);l.sort((function(t,e){return c.evaluate(t.sortparam,e.sortparam)}))}else"seriesdesc"===u&&l.reverse()}e(l,(function(n,r){var o=e.valueformatter,l=jf(n)(o?a(a({},t),{valueformatter:o}):t,n,r>0?a.html:0,i);null!=l&&s.push(l)}));var p="richtext"===t.rendermode?s.join(a.richtext):qf(s.join(""),o?n:a.html);if(o)return p;var d=sp(e.header,"ordinal",t.useutc),f=hf(i,t.rendermode).namestyle;return"richtext"===t.rendermode?tg(t,d,f)+a.richtext+p:qf('
'+ap(d)+"
"+p,n)}function $f(t,e,n,i){var r=t.rendermode,o=e.noname,a=e.novalue,s=!e.markertype,l=e.name,u=t.useutc,h=e.valueformatter||t.valueformatter||function(t){return z(t=y(t)?t:[t],(function(t,e){return sp(t,y(d)?d[e]:d,u)}))};if(!o||!a){var c=s?"":t.markupstylecreator.maketooltipmarker(e.markertype,e.markercolor||"#333",r),p=o?"":sp(l,"ordinal",u),d=e.valuetype,f=a?[]:h(e.value),g=!s||!o,y=!s&&o,v=hf(i,r),m=v.namestyle,x=v.valuestyle;return"richtext"===r?(s?"":c)+(o?"":tg(t,p,m))+(a?"":function(t,e,n,i,r){var o=[r],a=i?10:20;return n&&o.push({padding:[0,0,0,a],align:"right"}),t.markupstylecreator.wraprichtextstyle(y(e)?e.join(" "):e,o)}(t,f,g,y,x)):qf((s?"":c)+(o?"":function(t,e,n){return''+ap(t)+""}(p,!s,m))+(a?"":function(t,e,n,i){var r=n?"10px":"20px",o=e?"float:right;margin-left:"+r:"";return t=y(t)?t:[t],''+z(t,(function(t){return ap(t)})).join("  ")+""}(f,g,y,x)),n)}}function jf(t,e,n,i,r,o){if(t)return jf(t)({useutc:r,rendermode:n,ordermode:i,markupstylecreator:e,valueformatter:t.valueformatter},t,0,o)}function qf(t,e){return'
'+t+'
'}function tg(t,e,n){return t.markupstylecreator.wraprichtextstyle(e,n)}function eg(t,e){return pp(t.getdata().getitemvisual(e,"style")[t.visualdrawtype])}function ng(t,e){var n=t.get("padding");return null!=n?n:"richtext"===e?[8,10]:10}var ig=function(){function t(){this.richtextstyles={},this._nextstylenameid=no()}return t.prototype._generatestylename=function(){return"__ec_auto_"+this._nextstylenameid++},t.prototype.maketooltipmarker=function(t,e,n){var i="richtext"===n?this._generatestylename():null,r=cp({color:e,type:t,rendermode:n,markerid:i});return x(r)?r:(this.richtextstyles[i]=r.style,r.content)},t.prototype.wraprichtextstyle=function(t,e){var n={};y(e)?e(e,(function(t){return a(n,t)})):a(n,e);var i=this._generatestylename();return this.richtextstyles[i]=n,"{"+i+"|"+t+"}"},t}();function rg(t){var e,n,i,r,o=t.series,a=t.dataindex,s=t.multipleseries,l=o.getdata(),u=l.mapdimensionsall("defaultedtooltip"),h=u.length,c=o.getrawvalue(a),p=y(c),d=eg(o,a);if(h>1||p&&!h){var f=function(t,e,n,i,r){var o=e.getdata(),a=v(t,(function(t,e,n){var i=o.getdimensioninfo(n);return t||i&&!1!==i.tooltip&&null!=i.displayname}),!1),s=[],l=[],u=[];function h(t,e){var n=o.getdimensioninfo(e);n&&!1!==n.otherdims.tooltip&&(a?u.push(xf("namevalue",{markertype:"subitem",markercolor:r,name:n.displayname,value:t,valuetype:n.type})):(s.push(t),l.push(n.type)))}return i.length?e(i,(function(t){h(af(o,n,t),t)})):e(t,h),{inlinevalues:s,inlinevaluetypes:l,blocks:u}}(c,o,a,u,d);e=f.inlinevalues,n=f.inlinevaluetypes,i=f.blocks,r=f.inlinevalues[0]}else if(h){var g=l.getdimensioninfo(u[0]);r=e=af(l,a,u[0]),n=g.type}else r=e=p?c[0]:c;var y=_o(o),v=y&&o.name||"",m=l.getname(a),x=s?v:m;return xf("section",{header:v,noheader:s||!y,sortparam:r,blocks:[xf("namevalue",{markertype:"item",markercolor:d,name:x,noname:!ut(x),value:e,valuetype:n})].concat(i||[])})}var og=so();function ag(t,e){return t.getname(e)||t.getid(e)}var sg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._selecteddataindicesmap={},e}return n(e,t),e.prototype.init=function(t,e,n){this.seriesindex=this.componentindex,this.datatask=hf({count:ug,reset:hg}),this.datatask.context={model:this},this.mergedefaultandtheme(t,n),(og(this).sourcemanager=new bf(this)).preparesource();var i=this.getinitialdata(t,n);pg(i,this),this.datatask.context.data=i,og(this).databeforeprocessed=i,lg(this),this._initselectedmapfromdata(i)},e.prototype.mergedefaultandtheme=function(t,e){var n=bp(this),i=n?sp(t):{},r=this.subtype;tp.hasclass(r)&&(r+="series"),c(t,e.gettheme().get(this.subtype)),c(t,this.getdefaultoption()),co(t,"label",["show"]),this.filldatatextstyle(t.data),n&&wp(t,i,n)},e.prototype.mergeoption=function(t,e){t=c(this.option,t,!0),this.filldatatextstyle(t.data);var n=bp(this);n&&wp(this.option,t,n);var i=og(this).sourcemanager;i.dirty(),i.preparesource();var r=this.getinitialdata(t,e);pg(r,this),this.datatask.dirty(),this.datatask.context.data=r,og(this).databeforeprocessed=r,lg(this),this._initselectedmapfromdata(r)},e.prototype.filldatatextstyle=function(t){if(t&&!$(t))for(var e=["show"],n=0;nthis.getshallow("animationthreshold")&&(e=!1),!!e},e.prototype.restoredata=function(){this.datatask.dirty()},e.prototype.getcolorfrompalette=function(t,e,n){var i=this.ecmodel,r=td.prototype.getcolorfrompalette.call(this,t,e,n);return r||(r=i.getcolorfrompalette(t,e,n)),r},e.prototype.coorddimtodatadim=function(t){return this.getrawdata().mapdimensionsall(t)},e.prototype.getprogressive=function(){return this.get("progressive")},e.prototype.getprogressivethreshold=function(){return this.get("progressivethreshold")},e.prototype.select=function(t,e){this._innerselect(this.getdata(e),t)},e.prototype.unselect=function(t,e){var n=this.option.selectedmap;if(n){var i=this.option.selectedmode,r=this.getdata(e);if("series"===i||"all"===n)return this.option.selectedmap={},void(this._selecteddataindicesmap={});for(var o=0;o=0&&n.push(r)}return n},e.prototype.isselected=function(t,e){var n=this.option.selectedmap;if(!n)return!1;var i=this.getdata(e);return("all"===n||n[ag(i,t)])&&!i.getitemmodel(t).get(["select","disabled"])},e.prototype.isuniversaltransitionenabled=function(){if(this.__universaltransitionenabled)return!0;var t=this.option.universaltransition;return!!t&&(!0===t||t&&t.enabled)},e.prototype._innerselect=function(t,e){var n,i,r=this.option,o=r.selectedmode,a=e.length;if(o&&a)if("series"===o)r.selectedmap="all";else if("multiple"===o){q(r.selectedmap)||(r.selectedmap={});for(var s=r.selectedmap,l=0;l0&&this._innerselect(t,e)}},e.registerclass=function(t){return tp.registerclass(t)},e.protoinitialize=function(){var t=e.prototype;t.type="series.__base__",t.seriesindex=0,t.ignorestyleondata=!1,t.hassymbolvisual=!1,t.defaultsymbol="circle",t.visualstyleaccesspath="itemstyle",t.visualdrawtype="fill"}(),e}(tp);function lg(t){var e=t.name;_o(t)||(t.name=function(t){var e=t.getrawdata(),n=e.mapdimensionsall("seriesname"),i=[];return e(n,(function(t){var n=e.getdimensioninfo(t);n.displayname&&i.push(n.displayname)})),i.join(" ")}(t)||e)}function ug(t){return t.model.getrawdata().count()}function hg(t){var e=t.model;return e.setdata(e.getrawdata().cloneshallow()),cg}function cg(t,e){e.outputdata&&t.end>e.outputdata.count()&&e.model.getrawdata().cloneshallow(e.outputdata)}function pg(t,e){e(gt(t.changable_methods,t.downsample_methods),(function(n){t.wrapmethod(n,h(dg,e))}))}function dg(t,e){var n=fg(t);return n&&n.setoutputend((e||this).count()),e}function fg(t){var e=(t.ecmodel||{}).scheduler,n=e&&e.getpipeline(t.uid);if(n){var i=n.currenttask;if(i){var r=i.agentstubmap;r&&(i=r.get(t.uid))}return i}}r(sg,lf),r(sg,td),zo(sg,tp);var gg=function(){function t(){this.group=new cr,this.uid=gc("viewcomponent")}return t.prototype.init=function(t,e){},t.prototype.render=function(t,e,n,i){},t.prototype.dispose=function(t,e){},t.prototype.updateview=function(t,e,n,i){},t.prototype.updatelayout=function(t,e,n,i){},t.prototype.updatevisual=function(t,e,n,i){},t.prototype.toggleblurseries=function(t,e,n){},t.prototype.eachrendered=function(t){var e=this.group;e&&e.traverse(t)},t}();function yg(){var t=so();return function(e){var n=t(e),i=e.pipelinecontext,r=!!n.large,o=!!n.progressiverender,a=n.large=!(!i||!i.large),s=n.progressiverender=!(!i||!i.progressiverender);return!(r===a&&o===s)&&"reset"}}eo(gg),go(gg);var vg=so(),mg=yg(),xg=function(){function t(){this.group=new cr,this.uid=gc("viewchart"),this.rendertask=hf({plan:wg,reset:sg}),this.rendertask.context={view:this}}return t.prototype.init=function(t,e){},t.prototype.render=function(t,e,n,i){0},t.prototype.highlight=function(t,e,n,i){var r=t.getdata(i&&i.datatype);r&&bg(r,i,"emphasis")},t.prototype.downplay=function(t,e,n,i){var r=t.getdata(i&&i.datatype);r&&bg(r,i,"normal")},t.prototype.remove=function(t,e){this.group.removeall()},t.prototype.dispose=function(t,e){},t.prototype.updateview=function(t,e,n,i){this.render(t,e,n,i)},t.prototype.updatelayout=function(t,e,n,i){this.render(t,e,n,i)},t.prototype.updatevisual=function(t,e,n,i){this.render(t,e,n,i)},t.prototype.eachrendered=function(t){vh(this.group,t)},t.markupdatemethod=function(t,e){vg(t).updatemethod=e},t.protoinitialize=void(t.prototype.type="chart"),t}();function _g(t,e,n){t&&fl(t)&&("emphasis"===e?_l:bl)(t,n)}function bg(t,e,n){var i=wo(t,e),r=e&&null!=e.highlightkey?function(t){var e=xs[t];return null==e&&us<=32&&(e=xs[t]=us++),e}(e.highlightkey):null;null!=i?e(ho(i),(function(e){_g(t.getitemgraphicel(e),n,r)})):t.eachitemgraphicel((function(t){_g(t,n,r)}))}function wg(t){return mg(t.model)}function sg(t){var e=t.model,n=t.ecmodel,i=t.api,r=t.payload,o=e.pipelinecontext.progressiverender,a=t.view,s=r&&vg(r).updatemethod,l=o?"incrementalpreparerender":s&&a[s]?s:"render";return"render"!==l&&a[l](e,n,i,r),mg[l]}eo(xg),go(xg);var mg={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)}}},ig="\0__throttleoriginmethod",tg="\0__throttlerate",cg="\0__throttletype";function dg(t,e,n){var i,r,o,a,s,l=0,u=0,h=null;function c(){u=(new date).gettime(),h=null,t.apply(o,a||[])}e=e||0;var p=function(){for(var t=[],p=0;p=0?c():h=settimeout(c,-r),l=i};return p.clear=function(){h&&(cleartimeout(h),h=null)},p.debouncenextcall=function(t){s=t},p}function ag(t,e,n,i){var r=t[e];if(r){var o=r[ig]||r,a=r[cg];if(r[tg]!==n||a!==i){if(null==n||!i)return t[e]=o;(r=t[e]=dg(o,n,"debounce"===i))[ig]=o,r[cg]=i,r[tg]=n}return r}}function kg(t,e){var n=t[e];n&&n[ig]&&(n.clear&&n.clear(),t[e]=n[ig])}var lg=so(),pg={itemstyle:wo(hc,!0),linestyle:wo(sc,!0)},og={linestyle:"stroke",itemstyle:"fill"};function rg(t,e){var n=t.visualstylemapper||pg[e];return n||(console.warn("unkown style type '"+e+"'."),pg.itemstyle)}function ng(t,e){var n=t.visualdrawtype||og[e];return n||(console.warn("unkown style type '"+e+"'."),"fill")}var eg={createonallseries:!0,performrawseries:!0,reset:function(t,e){var n=t.getdata(),i=t.visualstyleaccesspath||"itemstyle",r=t.getmodel(i),o=rg(t,i)(r),a=r.getshallow("decal");a&&(n.setvisual("decal",a),a.dirty=!0);var s=ng(t,i),l=o[s],u=u(l)?l:null,h="auto"===o.fill||"auto"===o.stroke;if(!o[s]||u||h){var c=t.getcolorfrompalette(t.name,null,e.getseriescount());o[s]||(o[s]=c,n.setvisual("colorfrompalette",!0)),o.fill="auto"===o.fill||u(o.fill)?c:o.fill,o.stroke="auto"===o.stroke||u(o.stroke)?c:o.stroke}if(n.setvisual("style",o),n.setvisual("drawtype",s),!e.isseriesfiltered(t)&&u)return n.setvisual("colorfrompalette",!1),{dataeach:function(e,n){var i=t.getdataparams(n),r=a({},o);r[s]=u(i),e.setitemvisual(n,"style",r)}}}},zg=new dc,vg={createonallseries:!0,performrawseries:!0,reset:function(t,e){if(!t.ignorestyleondata&&!e.isseriesfiltered(t)){var n=t.getdata(),i=t.visualstyleaccesspath||"itemstyle",r=rg(t,i),o=n.getvisual("drawtype");return{dataeach:n.hasitemoption?function(t,e){var n=t.getrawdataitem(e);if(n&&n[i]){zg.option=n[i];var a=r(zg);a(t.ensureuniqueitemvisual(e,"style"),a),zg.option.decal&&(t.setitemvisual(e,"decal",zg.option.decal),zg.option.decal.dirty=!0),o in a&&t.setitemvisual(e,"colorfrompalette",!1)}}:null}}}},bg={performrawseries:!0,overallreset:function(t){var e=ft();t.eachseries((function(t){var n=t.getcolorby();if(!t.iscolorbyseries()){var i=t.type+"-"+n,r=e.get(i);r||(r={},e.set(i,r)),lg(t).scope=r}})),t.eachseries((function(e){if(!e.iscolorbyseries()&&!t.isseriesfiltered(e)){var n=e.getrawdata(),i={},r=e.getdata(),o=lg(e).scope,a=e.visualstyleaccesspath||"itemstyle",s=ng(e,a);r.each((function(t){var e=r.getrawindex(t);i[e]=t})),n.each((function(t){var a=i[t];if(r.getitemvisual(a,"colorfrompalette")){var l=r.ensureuniqueitemvisual(a,"style"),u=n.getname(t)||t+"",h=n.count();l[s]=e.getcolorfrompalette(u,o,h)}}))}}))}},fg=math.pi;var gg=function(){function t(t,e,n,i){this._stagetaskmap=ft(),this.ecinstance=t,this.api=e,n=this._dataprocessorhandlers=n.slice(),i=this._visualhandlers=i.slice(),this._allhandlers=n.concat(i)}return t.prototype.restoredata=function(t,e){t.restoredata(e),this._stagetaskmap.each((function(t){var e=t.overalltask;e&&e.dirty()}))},t.prototype.getperformargs=function(t,e){if(t.__pipeline){var n=this._pipelinemap.get(t.__pipeline.id),i=n.context,r=!e&&n.progressiveenabled&&(!i||i.progressiverender)&&t.__idxinpipeline>n.blockindex?n.step:null,o=i&&i.moddatacount;return{step:r,modby:null!=o?math.ceil(o/r):null,moddatacount:o}}},t.prototype.getpipeline=function(t){return this._pipelinemap.get(t)},t.prototype.updatestreammodes=function(t,e){var n=this._pipelinemap.get(t.uid),i=t.getdata().count(),r=n.progressiveenabled&&e.incrementalpreparerender&&i>=n.threshold,o=t.get("large")&&i>=t.get("largethreshold"),a="mod"===t.get("progressivechunkmode")?i:null;t.pipelinecontext=n.context={progressiverender:r,moddatacount:a,large:o}},t.prototype.restorepipelines=function(t){var e=this,n=e._pipelinemap=ft();t.eachseries((function(t){var i=t.getprogressive(),r=t.uid;n.set(r,{id:r,head:null,tail:null,threshold:t.getprogressivethreshold(),progressiveenabled:i&&!(t.preventincremental&&t.preventincremental()),blockindex:-1,step:math.round(i||700),count:0}),e._pipe(t,t.datatask)}))},t.prototype.preparestagetasks=function(){var t=this._stagetaskmap,e=this.api.getmodel(),n=this.api;e(this._allhandlers,(function(i){var r=t.get(i.uid)||t.set(i.uid,{}),o="";lt(!(i.reset&&i.overallreset),o),i.reset&&this._createseriesstagetask(i,r,e,n),i.overallreset&&this._createoverallstagetask(i,r,e,n)}),this)},t.prototype.prepareview=function(t,e,n,i){var r=t.rendertask,o=r.context;o.model=e,o.ecmodel=n,o.api=i,r.__block=!t.incrementalpreparerender,this._pipe(e,r)},t.prototype.performdataprocessortasks=function(t,e){this._performstagetasks(this._dataprocessorhandlers,t,e,{block:!0})},t.prototype.performvisualtasks=function(t,e,n){this._performstagetasks(this._visualhandlers,t,e,n)},t.prototype._performstagetasks=function(t,e,n,i){i=i||{};var r=!1,o=this;function a(t,e){return t.setdirty&&(!t.dirtymap||t.dirtymap.get(e.__pipeline.id))}e(t,(function(t,s){if(!i.visualtype||i.visualtype===t.visualtype){var l=o._stagetaskmap.get(t.uid),u=l.seriestaskmap,h=l.overalltask;if(h){var c,p=h.agentstubmap;p.each((function(t){a(i,t)&&(t.dirty(),c=!0)})),c&&h.dirty(),o.updatepayload(h,n);var d=o.getperformargs(h,i.block);p.each((function(t){t.perform(d)})),h.perform(d)&&(r=!0)}else u&&u.each((function(s,l){a(i,s)&&s.dirty();var u=o.getperformargs(s,i.block);u.skip=!t.performrawseries&&e.isseriesfiltered(s.context.model),o.updatepayload(s,n),s.perform(u)&&(r=!0)}))}})),this.unfinished=r||this.unfinished},t.prototype.performseriestasks=function(t){var e;t.eachseries((function(t){e=t.datatask.perform()||e})),this.unfinished=e||this.unfinished},t.prototype.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)}))},t.prototype.updatepayload=function(t,e){"remain"!==e&&(t.context.payload=e)},t.prototype._createseriesstagetask=function(t,e,n,i){var r=this,o=e.seriestaskmap,a=e.seriestaskmap=ft(),s=t.seriestype,l=t.gettargetseries;function u(e){var s=e.uid,l=a.set(s,o&&o.get(s)||hf({plan:xg,reset:zg,count:kg}));l.context={model:e,ecmodel:n,api:i,useclearvisual:t.isvisual&&!t.islayout,plan:t.plan,reset:t.reset,scheduler:r},r._pipe(e,l)}t.createonallseries?n.eachrawseries(u):s?n.eachrawseriesbytype(s,u):l&&l(n,i).each(u)},t.prototype._createoverallstagetask=function(t,e,n,i){var r=this,o=e.overalltask=e.overalltask||hf({reset:wg});o.context={ecmodel:n,api:i,overallreset:t.overallreset,scheduler:r};var a=o.agentstubmap,s=o.agentstubmap=ft(),l=t.seriestype,u=t.gettargetseries,h=!0,c=!1,p="";function d(t){var e=t.uid,n=s.set(e,a&&a.get(e)||(c=!0,hf({reset:hg,ondirty:ug})));n.context={model:t,overallprogress:h},n.agent=o,n.__block=h,r._pipe(t,n)}lt(!t.createonallseries,p),l?n.eachrawseriesbytype(l,d):u?u(n,i).each(d):(h=!1,e(n.getseries(),d)),c&&o.dirty()},t.prototype._pipe=function(t,e){var n=t.uid,i=this._pipelinemap.get(n);!i.head&&(i.head=e),i.tail&&i.tail.pipe(e),i.tail=e,e.__idxinpipeline=i.count++,e.__pipeline=i},t.wrapstagehandler=function(t,e){return u(t)&&(t={overallreset:t,seriestype:$g(t)}),t.uid=gc("stagehandler"),e&&(t.visualtype=e),t},t}();function wg(t){t.overallreset(t.ecmodel,t.api,t.payload)}function hg(t){return t.overallprogress&&yg}function yg(){this.agent.dirty(),this.getdownstream().dirty()}function ug(){this.agent&&this.agent.dirty()}function xg(t){return t.plan?t.plan(t.model,t.ecmodel,t.api,t.payload):null}function zg(t){t.useclearvisual&&t.data.clearallvisual();var e=t.resetdefines=ho(t.reset(t.model,t.ecmodel,t.api,t.payload));return e.length>1?z(e,(function(t,e){return qg(e)})):jg}var jg=qg(0);function qg(t){return function(e,n){var i=n.data,r=n.resetdefines[t];if(r&&r.dataeach)for(var o=e.start;o0&&h===r.length-u.length){var c=r.slice(0,h);"data"!==c&&(e.maintype=c,e[u.tolowercase()]=t,s=!0)}}a.hasownproperty(r)&&(n[r]=t,s=!0),s||(i[r]=t)}))}return{cptquery:e,dataquery:n,otherquery:i}},t.prototype.filter=function(t,e){var n=this.eventinfo;if(!n)return!0;var i=n.targetel,r=n.packedevent,o=n.model,a=n.view;if(!o||!a)return!0;var s=e.cptquery,l=e.dataquery;return u(s,o,"maintype")&&u(s,o,"subtype")&&u(s,o,"index","componentindex")&&u(s,o,"name")&&u(s,o,"id")&&u(l,r,"name")&&u(l,r,"dataindex")&&u(l,r,"datatype")&&(!a.filterforexposedevent||a.filterforexposedevent(t,e.otherquery,i,r));function u(t,e,n,i){return null==t[n]||e[i||n]===t[n]}},t.prototype.aftertrigger=function(){this.eventinfo=null},t}(),hy=["symbol","symbolsize","symbolrotate","symboloffset"],cy=hy.concat(["symbolkeepaspect"]),py={createonallseries:!0,performrawseries:!0,reset:function(t,e){var n=t.getdata();if(t.legendicon&&n.setvisual("legendicon",t.legendicon),t.hassymbolvisual){for(var i={},r={},o=!1,a=0;a=0&&ry(l)?l:.5,t.createradialgradient(a,s,0,a,s,l)}(t,e,n):function(t,e,n){var i=null==e.x?0:e.x,r=null==e.x2?1:e.x2,o=null==e.y?0:e.y,a=null==e.y2?0:e.y2;return e.global||(i=i*n.width+n.x,r=r*n.width+n.x,o=o*n.height+n.y,a=a*n.height+n.y),i=ry(i)?i:0,r=ry(r)?r:1,o=ry(o)?o:0,a=ry(a)?a:0,t.createlineargradient(i,o,r,a)}(t,e,n),r=e.colorstops,o=0;o0&&(e=i.linedash,n=i.linewidth,e&&"solid"!==e&&n>0?"dashed"===e?[4*n,2*n]:"dotted"===e?[n]:j(e)?[e]:y(e)?e:null:null),o=i.linedashoffset;if(r){var a=i.strokenoscale&&t.getlinescale?t.getlinescale():1;a&&1!==a&&(r=z(r,(function(t){return t/a})),o/=a)}return[r,o]}var by=new qa(!0);function fy(t){var e=t.stroke;return!(null==e||"none"===e||!(t.linewidth>0))}function gy(t){return"string"==typeof t&&"none"!==t}function wy(t){var e=t.fill;return null!=e&&"none"!==e}function hy(t,e){if(null!=e.fillopacity&&1!==e.fillopacity){var n=t.globalalpha;t.globalalpha=e.fillopacity*e.opacity,t.fill(),t.globalalpha=n}else t.fill()}function yy(t,e){if(null!=e.strokeopacity&&1!==e.strokeopacity){var n=t.globalalpha;t.globalalpha=e.strokeopacity*e.opacity,t.stroke(),t.globalalpha=n}else t.stroke()}function uy(t,e,n){var i=zo(e.image,e.__image,n);if(qo(i)){var r=t.createpattern(i,e.repeat||"repeat");if("function"==typeof dommatrix&&r&&r.settransform){var o=new dommatrix;o.translateself(e.x||0,e.y||0),o.rotateself(0,0,(e.rotation||0)*_t),o.scaleself(e.scalex||1,e.scaley||1),r.settransform(o)}return r}}var xy=["shadowblur","shadowoffsetx","shadowoffsety"],zy=[["linecap","butt"],["linejoin","miter"],["miterlimit",10]];function jy(t,e,n,i,r){var o=!1;if(!i&&e===(n=n||{}))return!1;if(i||e.opacity!==n.opacity){$y(t,r),o=!0;var a=math.max(math.min(e.opacity,1),0);t.globalalpha=isnan(a)?ua.opacity:a}(i||e.blend!==n.blend)&&(o||($y(t,r),o=!0),t.globalcompositeoperation=e.blend||ua.blend);for(var s=0;s0&&t.unfinished);t.unfinished||this._zr.flush()}}},e.prototype.getdom=function(){return this._dom},e.prototype.getid=function(){return this.id},e.prototype.getzr=function(){return this._zr},e.prototype.isssr=function(){return this._ssr},e.prototype.setoption=function(t,e,n){if(!this.__flaginmainprocess)if(this._disposed)hv(this.id);else{var i,r,o;if(q(e)&&(n=e.lazyupdate,i=e.silent,r=e.replacemerge,o=e.transition,e=e.notmerge),this.__flaginmainprocess=!0,!this._model||e){var a=new pd(this._api),s=this._theme,l=this._model=new id;l.scheduler=this._scheduler,l.ssr=this._ssr,l.init(null,null,null,s,this._locale,a)}this._model.setoption(t,{replacemerge:r},zv);var u={seriestransition:o,optionchanged:!0};if(n)this.__pendingupdate={silent:i,updateparams:u},this.__flaginmainprocess=!1,this.getzr().wakeup();else{try{_v(this),sv.update.call(this,null,u)}catch(t){throw this.__pendingupdate=null,this.__flaginmainprocess=!1,t}this._ssr||this._zr.flush(),this.__pendingupdate=null,this.__flaginmainprocess=!1,cv.call(this,i),dv.call(this,i)}}},e.prototype.settheme=function(){oo()},e.prototype.getmodel=function(){return this._model},e.prototype.getoption=function(){return this._model&&this._model.getoption()},e.prototype.getwidth=function(){return this._zr.getwidth()},e.prototype.getheight=function(){return this._zr.getheight()},e.prototype.getdevicepixelratio=function(){return this._zr.painter.dpr||cv&&window.devicepixelratio||1},e.prototype.getrenderedcanvas=function(t){return this.rendertocanvas(t)},e.prototype.rendertocanvas=function(t){t=t||{};var e=this._zr.painter;return e.getrenderedcanvas({backgroundcolor:t.backgroundcolor||this._model.get("backgroundcolor"),pixelratio:t.pixelratio||this.getdevicepixelratio()})},e.prototype.rendertosvgstring=function(t){t=t||{};var e=this._zr.painter;return e.rendertostring({useviewbox:t.useviewbox})},e.prototype.getsvgdataurl=function(){if(r.svgsupported){var t=this._zr;return e(t.storage.getdisplaylist(),(function(t){t.stopanimation(null,!0)})),t.painter.todataurl()}},e.prototype.getdataurl=function(t){if(!this._disposed){var e=(t=t||{}).excludecomponents,n=this._model,i=[],r=this;e(e,(function(t){n.eachcomponent({maintype:t},(function(t){var e=r._componentsmap[t.__viewid];e.group.ignore||(i.push(e),e.group.ignore=!0)}))}));var o="svg"===this._zr.painter.gettype()?this.getsvgdataurl():this.rendertocanvas(t).todataurl("image/"+(t&&t.type||"png"));return e(i,(function(t){t.group.ignore=!1})),o}hv(this.id)},e.prototype.getconnecteddataurl=function(t){if(!this._disposed){var e="svg"===t.type,n=this.group,i=math.min,r=math.max,o=1/0;if(jv[n]){var a=o,s=o,l=-1/0,u=-1/0,c=[],p=t&&t.pixelratio||this.getdevicepixelratio();e($v,(function(o,h){if(o.group===n){var p=e?o.getzr().painter.getsvgdom().innerhtml:o.rendertocanvas(t(t)),d=o.getdom().getboundingclientrect();a=i(d.left,a),s=i(d.top,s),l=r(d.right,l),u=r(d.bottom,u),c.push({dom:p,left:d.left,top:d.top})}}));var d=(l*=p)-(a*=p),f=(u*=p)-(s*=p),g=h.createcanvas(),y=lr(g,{renderer:e?"svg":"canvas"});if(y.resize({width:d,height:f}),e){var v="";return e(c,(function(t){var e=t.left-a,n=t.top-s;v+=''+t.dom+""})),y.painter.getsvgroot().innerhtml=v,t.connectedbackgroundcolor&&y.painter.setbackgroundcolor(t.connectedbackgroundcolor),y.refreshimmediately(),y.painter.todataurl()}return t.connectedbackgroundcolor&&y.add(new cs({shape:{x:0,y:0,width:d,height:f},style:{fill:t.connectedbackgroundcolor}})),e(c,(function(t){var e=new _s({style:{x:t.left*p-a,y:t.top*p-s,image:t.dom}});y.add(e)})),y.refreshimmediately(),g.todataurl("image/"+(t&&t.type||"png"))}return this.getdataurl(t)}hv(this.id)},e.prototype.converttopixel=function(t,e){return mv(this,"converttopixel",t,e)},e.prototype.convertfrompixel=function(t,e){return mv(this,"convertfrompixel",t,e)},e.prototype.containpixel=function(t,e){var n;if(!this._disposed)return e(io(this._model,t),(function(t,i){i.indexof("models")>=0&&e(t,(function(t){var r=t.coordinatesystem;if(r&&r.containpoint)n=n||!!r.containpoint(e);else if("seriesmodels"===i){var o=this._chartsmap[t.__viewid];o&&o.containpoint&&(n=n||o.containpoint(e,t))}else 0}),this)}),this),!!n;hv(this.id)},e.prototype.getvisual=function(t,e){var n=io(this._model,t,{defaultmaintype:"series"}),i=n.seriesmodel;var r=i.getdata(),o=n.hasownproperty("dataindexinside")?n.dataindexinside:n.hasownproperty("dataindex")?r.indexofrawindex(n.dataindex):null;return null!=o?fy(r,o,e):gy(r,e)},e.prototype.getviewofcomponentmodel=function(t){return this._componentsmap[t.__viewid]},e.prototype.getviewofseriesmodel=function(t){return this._chartsmap[t.__viewid]},e.prototype._initevents=function(){var t,e,n,i=this;e(wv,(function(t){var e=function(e){var n,r=i.getmodel(),o=e.target,a="globalout"===t;if(a?n={}:o&&xy(o,(function(t){var e=hs(t);if(e&&null!=e.dataindex){var i=e.datamodel||r.getseriesbyindex(e.seriesindex);return n=i&&i.getdataparams(e.dataindex,e.datatype)||{},!0}if(e.eventdata)return n=a({},e.eventdata),!0}),!0),n){var s=n.componenttype,l=n.componentindex;"markline"!==s&&"markpoint"!==s&&"markarea"!==s||(s="series",l=n.seriesindex);var u=s&&null!=l&&r.getcomponent(s,l),h=u&&i["series"===u.maintype?"_chartsmap":"_componentsmap"][u.__viewid];0,n.event=e,n.type=t,i._$eventprocessor.eventinfo={targetel:o,packedevent:n,model:u,view:h},i.trigger(t,n)}};e.zreventfulcallatlast=!0,i._zr.on(t,e,i)})),e(uv,(function(t,e){i._messagecenter.on(e,(function(t){this.trigger(e,t)}),i)})),e(["selectchanged"],(function(t){i._messagecenter.on(t,(function(e){this.trigger(t,e)}),i)})),t=this._messagecenter,e=this,n=this._api,t.on("selectchanged",(function(t){var i=n.getmodel();t.isfromclick?(my("map","selectchanged",e,i,t),my("pie","selectchanged",e,i,t)):"select"===t.fromaction?(my("map","selected",e,i,t),my("pie","selected",e,i,t)):"unselect"===t.fromaction&&(my("map","unselected",e,i,t),my("pie","unselected",e,i,t))}))},e.prototype.isdisposed=function(){return this._disposed},e.prototype.clear=function(){this._disposed?hv(this.id):this.setoption({series:[]},!0)},e.prototype.dispose=function(){if(this._disposed)hv(this.id);else{this._disposed=!0,this.getdom()&&ko(this.getdom(),em,"");var t=this,e=t._api,n=t._model;e(t._componentsviews,(function(t){t.dispose(n,e)})),e(t._chartsviews,(function(t){t.dispose(n,e)})),t._zr.dispose(),t._dom=t._model=t._chartsmap=t._componentsmap=t._chartsviews=t._componentsviews=t._scheduler=t._api=t._zr=t._throttledzrflush=t._theme=t._coordsysmgr=t._messagecenter=null,delete $v[t.id]}},e.prototype.resize=function(t){if(!this.__flaginmainprocess)if(this._disposed)hv(this.id);else{this._zr.resize(t);var e=this._model;if(this._loadingfx&&this._loadingfx.resize(),e){var n=e.resetoption("media"),i=t&&t.silent;this.__pendingupdate&&(null==i&&(i=this.__pendingupdate.silent),n=!0,this.__pendingupdate=null),this.__flaginmainprocess=!0;try{n&&_v(this),sv.update.call(this,{type:"resize",animation:a({duration:0},t&&t.animation)})}catch(t){throw this.__flaginmainprocess=!1,t}this.__flaginmainprocess=!1,cv.call(this,i),dv.call(this,i)}}},e.prototype.showloading=function(t,e){if(this._disposed)hv(this.id);else if(q(t)&&(e=t,t=""),t=t||"default",this.hideloading(),kv[t]){var n=kv[t](this._api,e),i=this._zr;this._loadingfx=n,i.add(n)}},e.prototype.hideloading=function(){this._disposed?hv(this.id):(this._loadingfx&&this._zr.remove(this._loadingfx),this._loadingfx=null)},e.prototype.makeactionfromevent=function(t){var e=a({},t);return e.type=uv[t.type],e},e.prototype.dispatchaction=function(t,e){if(this._disposed)hv(this.id);else if(q(e)||(e={silent:!!e}),yv[t.type]&&this._model)if(this.__flaginmainprocess)this._pendingactions.push(t);else{var n=e.silent;tv.call(this,t,n);var i=e.flush;i?this._zr.flush():!1!==i&&r.browser.wechat&&this._throttledzrflush(),cv.call(this,n),dv.call(this,n)}},e.prototype.updatelabellayout=function(){lv.trigger("series:layoutlabels",this._model,this._api,{updatedseries:[]})},e.prototype.appenddata=function(t){if(this._disposed)hv(this.id);else{var e=t.seriesindex,n=this.getmodel().getseriesbyindex(e);0,n.appenddata(t),this._scheduler.unfinished=!0,this.getzr().wakeup()}},e.internalfield=function(){function t(t){t.clearcolorpalette(),t.eachseries((function(t){t.clearcolorpalette()}))}function e(t){for(var e=[],n=t.currentstates,i=0;i0?{duration:o,delay:i.get("delay"),easing:i.get("easing")}:null;n.eachrendered((function(t){if(t.states&&t.states.emphasis){if(ah(t))return;if(t instanceof gs&&function(t){var e=zs(t);e.normalfill=t.style.fill,e.normalstroke=t.style.stroke;var n=t.states.select||{};e.selectfill=n.style&&n.style.fill||null,e.selectstroke=n.style&&n.style.stroke||null}(t),t.__dirty){var n=t.prevstates;n&&t.usestates(n)}if(r){t.statetransition=a;var i=t.gettextcontent(),o=t.gettextguideline();i&&(i.statetransition=a),o&&(o.statetransition=a)}t.__dirty&&e(t)}}))}_v=function(t){var e=t._scheduler;e.restorepipelines(t._model),e.preparestagetasks(),bv(t,!0),bv(t,!1),e.plan()},bv=function(t,e){for(var n=t._model,i=t._scheduler,r=e?t._componentsviews:t._chartsviews,o=e?t._componentsmap:t._chartsmap,a=t._zr,s=t._api,l=0;le.get("hoverlayerthreshold")&&!r.node&&!r.worker&&e.eachseries((function(e){if(!e.preventusinghoverlayer){var n=t._chartsmap[e.__viewid];n.__alive&&n.eachrendered((function(t){t.states.emphasis&&(t.states.emphasis.hoverlayer=!0)}))}}))}(t,e),lv.trigger("series:afterupdate",e,n,l)},ev=function(t){t.__needsupdatestatus=!0,t.getzr().wakeup()},zv=function(t){t.__needsupdatestatus&&(t.getzr().storage.traverse((function(t){ah(t)||e(t)})),t.__needsupdatestatus=!1)},rv=function(t){return new(function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return n(i,e),i.prototype.getcoordinatesystems=function(){return t._coordsysmgr.getcoordinatesystems()},i.prototype.getcomponentbyelement=function(e){for(;e;){var n=e.__eccomponentinfo;if(null!=n)return t._model.getcomponent(n.maintype,n.index);e=e.parent}},i.prototype.enteremphasis=function(e,n){_l(e,n),ev(t)},i.prototype.leaveemphasis=function(e,n){bl(e,n),ev(t)},i.prototype.enterblur=function(e){wl(e),ev(t)},i.prototype.leaveblur=function(e){sl(e),ev(t)},i.prototype.enterselect=function(e){ml(e),ev(t)},i.prototype.leaveselect=function(e){il(e),ev(t)},i.prototype.getmodel=function(){return t.getmodel()},i.prototype.getviewofcomponentmodel=function(e){return t.getviewofcomponentmodel(e)},i.prototype.getviewofseriesmodel=function(e){return t.getviewofseriesmodel(e)},i}(ld))(t)},nv=function(t){function e(t,e){for(var n=0;n=0)){gm.push(n);var o=gg.wrapstagehandler(n,r);o.__prio=e,o.__raw=n,t.push(o)}}function vm(t,e){kv[t]=e}function mm(t,e,n){var i=hv("registermap");i&&i(t,e,n)}var xm=function(t){var e=(t=t(t)).type,n="";e||ao(n);var i=e.split(":");2!==i.length&&ao(n);var r=!1;"echarts"===i[0]&&(e=i[1],r=!0),t.__isbuiltin=r,tf.set(e,t)};fm(pv,eg),fm(dv,vg),fm(dv,bg),fm(pv,py),fm(dv,dy),fm(7e3,(function(t,e){t.eachrawseries((function(n){if(!t.isseriesfiltered(n)){var i=n.getdata();i.hasitemvisual()&&i.each((function(t){var n=i.getitemvisual(t,"decal");n&&(i.ensureuniqueitemvisual(t,"style").decal=rv(n,e))}));var r=i.getvisual("decal");if(r)i.getvisual("style").decal=rv(r,e)}}))})),am(od),sm(900,(function(t){var e=ft();t.eachseries((function(t){var n=t.get("stack");if(n){var i=e.get(n)||e.set(n,[]),r=t.getdata(),o={stackresultdimension:r.getcalculationinfo("stackresultdimension"),stackedoverdimension:r.getcalculationinfo("stackedoverdimension"),stackeddimension:r.getcalculationinfo("stackeddimension"),stackedbydimension:r.getcalculationinfo("stackedbydimension"),isstackedbyindex:r.getcalculationinfo("isstackedbyindex"),data:r,seriesmodel:t};if(!o.stackeddimension||!o.isstackedbyindex&&!o.stackedbydimension)return;i.length&&r.setcalculationinfo("stackedonseries",i[i.length-1].seriesmodel),i.push(o)}})),e.each(rd)})),vm("default",(function(t,e){k(e=e||{},{text:"loading",textcolor:"#000",fontsize:12,fontweight:"normal",fontstyle:"normal",fontfamily:"sans-serif",maskcolor:"rgba(255, 255, 255, 0.8)",showspinner:!0,color:"#5470c6",spinnerradius:10,linewidth:5,zlevel:0});var n=new cr,i=new cs({style:{fill:e.maskcolor},zlevel:e.zlevel,z:1e4});n.add(i);var r,o=new ks({style:{text:e.text,fill:e.textcolor,fontsize:e.fontsize,fontweight:e.fontweight,fontstyle:e.fontstyle,fontfamily:e.fontfamily},zlevel:e.zlevel,z:10001}),a=new cs({style:{fill:"none"},textcontent:o,textconfig:{position:"right",distance:10},zlevel:e.zlevel,z:10001});return n.add(a),e.showspinner&&((r=new hu({shape:{startangle:-fg/2,endangle:-fg/2+.1,r:e.spinnerradius},style:{stroke:e.color,linecap:"round",linewidth:e.linewidth},zlevel:e.zlevel,z:10001})).animateshape(!0).when(1e3,{endangle:3*fg/2}).start("circularinout"),r.animateshape(!0).when(1e3,{startangle:3*fg/2}).delay(300).start("circularinout"),n.add(r)),n.resize=function(){var n=o.getboundingrect().width,s=e.showspinner?e.spinnerradius:0,l=(t.getwidth()-2*s-(e.showspinner&&n?10:0)-n)/2-(e.showspinner&&n?0:5+n/2)+(e.showspinner?0:n/2)+(n?0:s),u=t.getheight()/2;e.showspinner&&r.setshape({cx:l,cy:u}),a.setshape({x:l-s,y:u-s,width:2*s,height:2*s}),i.setshape({x:0,y:0,width:t.getwidth(),height:t.getheight()})},n.resize(),n})),cm({type:js,event:js,update:js},xt),cm({type:qs,event:qs,update:qs},xt),cm({type:tl,event:tl,update:tl},xt),cm({type:el,event:el,update:el},xt),cm({type:nl,event:nl,update:nl},xt),om("light",iy),om("dark",ly);var _m=[],bm={registerpreprocessor:am,registerprocessor:sm,registerpostinit:lm,registerpostupdate:um,registerupdatelifecycle:hm,registeraction:cm,registercoordinatesystem:pm,registerlayout:dm,registervisual:fm,registertransform:xm,registerloading:vm,registermap:mm,registerimpl:function(t,e){uv[t]=e},priority:fv,componentmodel:tp,componentview:gg,seriesmodel:sg,chartview:xg,registercomponentmodel:function(t){tp.registerclass(t)},registercomponentview:function(t){gg.registerclass(t)},registerseriesmodel:function(t){sg.registerclass(t)},registerchartview:function(t){xg.registerclass(t)},registersubtypedefaulter:function(t,e){tp.registersubtypedefaulter(t,e)},registerpainter:function(t,e){pr(t,e)}};function wm(t){y(t)?e(t,(function(t){wm(t)})):p(_m,t)>=0||(_m.push(t),u(t)&&(t={install:t}),t.install(bm))}function sm(t){return null==t?0:t.length||1}function mm(t){return t}var im=function(){function t(t,e,n,i,r,o){this._old=t,this._new=e,this._oldkeygetter=n||mm,this._newkeygetter=i||mm,this.context=r,this._diffmodemultiple="multiple"===o}return t.prototype.add=function(t){return this._add=t,this},t.prototype.update=function(t){return this._update=t,this},t.prototype.updatemanytoone=function(t){return this._updatemanytoone=t,this},t.prototype.updateonetomany=function(t){return this._updateonetomany=t,this},t.prototype.updatemanytomany=function(t){return this._updatemanytomany=t,this},t.prototype.remove=function(t){return this._remove=t,this},t.prototype.execute=function(){this[this._diffmodemultiple?"_executemultiple":"_executeonetoone"]()},t.prototype._executeonetoone=function(){var t=this._old,e=this._new,n={},i=new array(t.length),r=new array(e.length);this._initindexmap(t,null,i,"_oldkeygetter"),this._initindexmap(e,n,r,"_newkeygetter");for(var o=0;o1){var u=s.shift();1===s.length&&(n[a]=s[0]),this._update&&this._update(u,o)}else 1===l?(n[a]=null,this._update&&this._update(s,o)):this._remove&&this._remove(o)}this._performrestadd(r,n)},t.prototype._executemultiple=function(){var t=this._old,e=this._new,n={},i={},r=[],o=[];this._initindexmap(t,n,r,"_oldkeygetter"),this._initindexmap(e,i,o,"_newkeygetter");for(var a=0;a1&&1===c)this._updatemanytoone&&this._updatemanytoone(u,l),i[s]=null;else if(1===h&&c>1)this._updateonetomany&&this._updateonetomany(u,l),i[s]=null;else if(1===h&&1===c)this._update&&this._update(u,l),i[s]=null;else if(h>1&&c>1)this._updatemanytomany&&this._updatemanytomany(u,l),i[s]=null;else if(h>1)for(var p=0;p1)for(var a=0;a30}var zm,vm,bm,fm,gm,wm,hm,ym=q,um=z,xm="undefined"==typeof int32array?array:int32array,zm=["hasitemoption","_namelist","_idlist","_invertedindicesmap","_dimsummary","useroutput","_rawdata","_dimvaluegetter","_namedimidx","_iddimidx","_namerepeatcount"],jm=["_approximateextent"],qm=function(){function t(t,e){var n;this.type="list",this._dimomitted=!1,this._namelist=[],this._idlist=[],this._visual={},this._layout={},this._itemvisuals=[],this._itemlayouts=[],this._graphicels=[],this._approximateextent={},this._calculationinfo={},this.hasitemoption=!1,this.transferable_methods=["cloneshallow","downsample","lttbdownsample","map"],this.changable_methods=["filterself","selectrange"],this.downsample_methods=["downsample","lttbdownsample"];var i=!1;om(t)?(n=t.dimensions,this._dimomitted=t.isdimensionomitted(),this._schema=t):(i=!0,n=t),n=n||["x","y"];for(var r={},o=[],a={},s=!1,l={},u=0;u=e)){var n=this._store.getprovider();this._updateordinalmeta();var i=this._namelist,r=this._idlist;if(n.getsource().sourceformat===lp&&!n.pure)for(var o=[],a=t;a0},t.prototype.ensureuniqueitemvisual=function(t,e){var n=this._itemvisuals,i=n[t];i||(i=n[t]={});var r=i[e];return null==r&&(y(r=this.getvisual(e))?r=r.slice():ym(r)&&(r=a({},r)),i[e]=r),r},t.prototype.setitemvisual=function(t,e,n){var i=this._itemvisuals[t]||{};this._itemvisuals[t]=i,ym(e)?a(i,e):i[e]=n},t.prototype.clearallvisual=function(){this._visual={},this._itemvisuals=[]},t.prototype.setlayout=function(t,e){ym(t)?a(this._layout,t):this._layout[t]=e},t.prototype.getlayout=function(t){return this._layout[t]},t.prototype.getitemlayout=function(t){return this._itemlayouts[t]},t.prototype.setitemlayout=function(t,e,n){this._itemlayouts[t]=n?a(this._itemlayouts[t]||{},e):e},t.prototype.clearitemlayouts=function(){this._itemlayouts.length=0},t.prototype.setitemgraphicel=function(t,e){var n=this.hostmodel&&this.hostmodel.seriesindex;ys(n,this.datatype,t,e),this._graphicels[t]=e},t.prototype.getitemgraphicel=function(t){return this._graphicels[t]},t.prototype.eachitemgraphicel=function(t,e){e(this._graphicels,(function(n,i){n&&t&&t.call(e,n,i)}))},t.prototype.cloneshallow=function(e){return e||(e=new t(this._schema?this._schema:um(this.dimensions,this._getdiminfo,this),this.hostmodel)),gm(e,this),e._store=this._store,e},t.prototype.wrapmethod=function(t,e){var n=this[t];u(n)&&(this.__wrappedmethods=this.__wrappedmethods||[],this.__wrappedmethods.push(t),this[t]=function(){var t=n.apply(this,arguments);return e.apply(this,[t].concat(at(arguments)))})},t.internalfield=(zm=function(t){var e=t._invertedindicesmap;e(e,(function(n,i){var r=t._diminfos[i],o=r.ordinalmeta,a=t._store;if(o){n=e[i]=new xm(o.categories.length);for(var s=0;s1&&(s+="__ec__"+u),i[e]=s}})),t}();function km(t,e){gd(t)||(t=hd(t));var n=(e=e||{}).coorddimensions||[],i=e.dimensionsdefine||t.dimensionsdefine||[],r=ft(),o=[],a=function(t,e,n,i){var r=math.max(t.dimensionsdetectedcount||1,e.length,n.length,i||0);return e(e,(function(t){var e;q(t)&&(e=t.dimsdef)&&(r=math.max(r,e.length))})),r}(t,n,i,e.dimensionscount),s=e.canomitunuseddimensions&&em(a),l=i===t.dimensionsdefine,u=l?nm(t):rm(i),h=e.encodedefine;!h&&e.encodedefaulter&&(h=e.encodedefaulter(t,a));for(var c=ft(h),p=new of(a),d=0;d0&&(i.name=r+(o-1)),o++,e.set(r,o)}}(o),new pm({source:t,dimensions:o,fulldimensioncount:a,dimensionomitted:s})}function $m(t,e,n){var i=e.data;if(n||i.hasownproperty(t)){for(var r=0;i.hasownproperty(t+r);)r++;t+=r}return e.set(t,!0),t}var jm=function(t){this.coordsysdims=[],this.axismap=ft(),this.categoryaxismap=ft(),this.coordsysname=t};var qm={cartesian2d:function(t,e,n,i){var r=t.getreferringcomponents("xaxis",co).models[0],o=t.getreferringcomponents("yaxis",co).models[0];e.coordsysdims=["x","y"],n.set("x",r),n.set("y",o),tx(r)&&(i.set("x",r),e.firstcategorydimindex=0),tx(o)&&(i.set("y",o),null==e.firstcategorydimindex&&(e.firstcategorydimindex=1))},singleaxis:function(t,e,n,i){var r=t.getreferringcomponents("singleaxis",co).models[0];e.coordsysdims=["single"],n.set("single",r),tx(r)&&(i.set("single",r),e.firstcategorydimindex=0)},polar:function(t,e,n,i){var r=t.getreferringcomponents("polar",co).models[0],o=r.findaxismodel("radiusaxis"),a=r.findaxismodel("angleaxis");e.coordsysdims=["radius","angle"],n.set("radius",o),n.set("angle",a),tx(o)&&(i.set("radius",o),e.firstcategorydimindex=0),tx(a)&&(i.set("angle",a),null==e.firstcategorydimindex&&(e.firstcategorydimindex=1))},geo:function(t,e,n,i){e.coordsysdims=["lng","lat"]},parallel:function(t,e,n,i){var r=t.ecmodel,o=r.getcomponent("parallel",t.get("parallelindex")),a=e.coordsysdims=o.dimensions.slice();e(o.parallelaxisindex,(function(t,o){var s=r.getcomponent("parallelaxis",t),l=a[o];n.set(l,s),tx(s)&&(i.set(l,s),null==e.firstcategorydimindex&&(e.firstcategorydimindex=o))}))}};function tx(t){return"category"===t.get("type")}function ex(t,e,n){var i,r,o,a=(n=n||{}).byindex,s=n.stackedcoorddimension;!function(t){return!om(t.schema)}(e)?(r=e.schema,i=r.dimensions,o=e.store):i=e;var l,u,h,c,p=!(!t||!t.get("stack"));if(e(i,(function(t,e){x(t)&&(i[e]=t={name:t}),p&&!t.isextracoord&&(a||l||!t.ordinalmeta||(l=t),u||"ordinal"===t.type||"time"===t.type||s&&s!==t.coorddim||(u=t))})),!u||a||l||(a=!0),u){h="__\0ecstackresult_"+t.id,c="__\0ecstackedover_"+t.id,l&&(l.createinvertedindices=!0);var d=u.coorddim,f=u.type,g=0;e(i,(function(t){t.coorddim===d&&g++}));var y={name:h,coorddim:d,coorddimindex:g,type:f,isextracoord:!0,iscalculationcoord:!0,storedimindex:i.length},v={name:c,coorddim:c,coorddimindex:g+1,type:f,isextracoord:!0,iscalculationcoord:!0,storedimindex:i.length+1};r?(o&&(y.storedimindex=o.ensurecalculationdimension(c,f),v.storedimindex=o.ensurecalculationdimension(h,f)),r.appendcalculationdimension(y),r.appendcalculationdimension(v)):(i.push(y),i.push(v))}return{stackeddimension:u&&u.name,stackedbydimension:l&&l.name,isstackedbyindex:a,stackedoverdimension:c,stackresultdimension:h}}function nx(t,e){return!!e&&e===t.getcalculationinfo("stackeddimension")}function ix(t,e){return nx(t,e)?t.getcalculationinfo("stackresultdimension"):e}function rx(t,e,n){n=n||{};var i,r=e.getsourcemanager(),o=!1;t?(o=!0,i=hd(t)):o=(i=r.getsource()).sourceformat===lp;var a=function(t){var e=t.get("coordinatesystem"),n=new jm(e),i=qm[e];if(i)return i(t,n,n.axismap,n.categoryaxismap),n}(e),s=function(t,e){var n,i=t.get("coordinatesystem"),r=hd.get(i);return e&&e.coordsysdims&&(n=z(e.coordsysdims,(function(t){var n={name:t},i=e.axismap.get(t);if(i){var r=i.get("type");n.type=dm(r)}return n}))),n||(n=r&&(r.getdimensionsinfo?r.getdimensionsinfo():r.dimensions.slice())||["x","y"]),n}(e,a),l=n.useencodedefaulter,u=u(l)?l:l?h(hp,s,e):null,h=km(i,{coorddimensions:s,generatecoord:n.generatecoord,encodedefine:e.getencode(),encodedefaulter:u,canomitunuseddimensions:!o}),c=function(t,e,n){var i,r;return n&&e(t,(function(t,o){var a=t.coorddim,s=n.categoryaxismap.get(a);s&&(null==i&&(i=o),t.ordinalmeta=s.getordinalmeta(),e&&(t.createinvertedindices=!0)),null!=t.otherdims.itemname&&(r=!0)})),r||null==i||(t[i].otherdims.itemname=0),i}(h.dimensions,n.createinvertedindices,a),p=o?null:r.getshareddatastore(h),d=ex(e,{schema:h,store:p}),f=new qm(h,e);f.setcalculationinfo(d);var g=null!=c&&function(t){if(t.sourceformat===lp){return!y(fo(function(t){var e=0;for(;ee[1]&&(e[1]=t[1])},t.prototype.unionextentfromdata=function(t,e){this.unionextent(t.getapproximateextent(e))},t.prototype.getextent=function(){return this._extent.slice()},t.prototype.setextent=function(t,e){var n=this._extent;isnan(t)||(n[0]=t),isnan(e)||(n[1]=e)},t.prototype.isinextentrange=function(t){return this._extent[0]<=t&&this._extent[1]>=t},t.prototype.isblank=function(){return this._isblank},t.prototype.setblank=function(t){this._isblank=t},t}();go(ox);var ax=0,sx=function(){function t(t){this.categories=t.categories||[],this._needcollect=t.needcollect,this._deduplication=t.deduplication,this.uid=++ax}return t.createbyaxismodel=function(e){var n=e.option,i=n.data,r=i&&z(i,lx);return new t({categories:r,needcollect:!r,deduplication:!1!==n.dedplication})},t.prototype.getordinal=function(t){return this._getorcreatemap().get(t)},t.prototype.parseandcollect=function(t){var e,n=this._needcollect;if(!x(t)&&!n)return t;if(n&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,e;var i=this._getorcreatemap();return null==(e=i.get(t))&&(n?(e=this.categories.length,this.categories[e]=t,i.set(t,e)):e=nan),e},t.prototype._getorcreatemap=function(){return this._map||(this._map=ft(this.categories))},t}();function lx(t){return q(t)&&null!=t.value?t.value:t+""}function ux(t){return"interval"===t.type||"log"===t.type}function hx(t,e,n,i){var r={},o=t[1]-t[0],a=r.interval=$r(o/e,!0);null!=n&&ai&&(a=r.interval=i);var s=r.intervalprecision=px(a);return function(t,e){!isfinite(t[0])&&(t[0]=e[0]),!isfinite(t[1])&&(t[1]=e[1]),dx(t,0,e),dx(t,1,e),t[0]>t[1]&&(t[0]=t[1])}(r.nicetickextent=[zr(math.ceil(t[0]/a)*a,s),zr(math.floor(t[1]/a)*a,s)],t),r}function cx(t){var e=math.pow(10,kr(t)),n=t/e;return n?2===n?n=3:3===n?n=5:n*=2:n=1,zr(n*e)}function px(t){return br(t)+2}function dx(t,e,n){t[e]=math.max(math.min(t[e],n[1]),n[0])}function fx(t,e){return t>=e[0]&&t<=e[1]}function gx(t,e){return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])}function yx(t,e){return t*(e[1]-e[0])+e[0]}var vx=function(t){function e(e){var n=t.call(this,e)||this;n.type="ordinal";var i=n.getsetting("ordinalmeta");return i||(i=new sx({})),y(i)&&(i=new sx({categories:z(i,(function(t){return q(t)?t.value:t}))})),n._ordinalmeta=i,n._extent=n.getsetting("extent")||[0,i.categories.length-1],n}return n(e,t),e.prototype.parse=function(t){return null==t?nan:x(t)?this._ordinalmeta.getordinal(t):math.round(t)},e.prototype.contain=function(t){return fx(t=this.parse(t),this._extent)&&null!=this._ordinalmeta.categories[t]},e.prototype.normalize=function(t){return gx(t=this._getticknumber(this.parse(t)),this._extent)},e.prototype.scale=function(t){return t=math.round(yx(t,this._extent)),this.getrawordinalnumber(t)},e.prototype.getticks=function(){for(var t=[],e=this._extent,n=e[0];n<=e[1];)t.push({value:n}),n++;return t},e.prototype.getminorticks=function(t){},e.prototype.setsortinfo=function(t){if(null!=t){for(var e=t.ordinalnumbers,n=this._ordinalnumbersbytick=[],i=this._ticksbyordinalnumber=[],r=0,o=this._ordinalmeta.categories.length,a=math.min(o,e.length);r=0&&t=0&&t=t},e.prototype.getordinalmeta=function(){return this._ordinalmeta},e.prototype.calcniceticks=function(){},e.prototype.calcniceextent=function(){},e.type="ordinal",e}(ox);ox.registerclass(vx);var mx=zr,xx=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="interval",e._interval=0,e._intervalprecision=2,e}return n(e,t),e.prototype.parse=function(t){return t},e.prototype.contain=function(t){return fx(t,this._extent)},e.prototype.normalize=function(t){return gx(t,this._extent)},e.prototype.scale=function(t){return yx(t,this._extent)},e.prototype.setextent=function(t,e){var n=this._extent;isnan(t)||(n[0]=parsefloat(t)),isnan(e)||(n[1]=parsefloat(e))},e.prototype.unionextent=function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1]),this.setextent(e[0],e[1])},e.prototype.getinterval=function(){return this._interval},e.prototype.setinterval=function(t){this._interval=t,this._niceextent=this._extent.slice(),this._intervalprecision=px(t)},e.prototype.getticks=function(t){var e=this._interval,n=this._extent,i=this._niceextent,r=this._intervalprecision,o=[];if(!e)return o;n[0]1e4)return[];var s=o.length?o[o.length-1].value:i[1];return n[1]>s&&(t?o.push({value:mx(s+e,r)}):o.push({value:n[1]})),o},e.prototype.getminorticks=function(t){for(var e=this.getticks(!0),n=[],i=this.getextent(),r=1;ri[0]&&h0&&(o=null===o?s:math.min(o,s))}n[i]=o}}return n}(t),n=[];return e(t,(function(t){var i,r=t.coordinatesystem.getbaseaxis(),o=r.getextent();if("category"===r.type)i=r.getbandwidth();else if("value"===r.type||"time"===r.type){var a=r.dim+"_"+r.index,s=e[a],l=math.abs(o[1]-o[0]),u=r.scale.getextent(),h=math.abs(u[1]-u[0]);i=s?l/h*s:l}else{var c=t.getdata();i=math.abs(o[1]-o[0])/c.count()}var p=er(t.get("barwidth"),i),d=er(t.get("barmaxwidth"),i),f=er(t.get("barminwidth")||(ox(t)?.5:1),i),g=t.get("bargap"),y=t.get("barcategorygap");n.push({bandwidth:i,barwidth:p,barmaxwidth:d,barminwidth:f,bargap:g,barcategorygap:y,axiskey:tx(r),stackid:ix(t)})})),ax(n)}function ax(t){var e={};e(t,(function(t,n){var i=t.axiskey,r=t.bandwidth,o=e[i]||{bandwidth:r,remainedwidth:r,autowidthcount:0,categorygap:null,gap:"20%",stacks:{}},a=o.stacks;e[i]=o;var s=t.stackid;a[s]||o.autowidthcount++,a[s]=a[s]||{width:0,maxwidth:0};var l=t.barwidth;l&&!a[s].width&&(a[s].width=l,l=math.min(o.remainedwidth,l),o.remainedwidth-=l);var u=t.barmaxwidth;u&&(a[s].maxwidth=u);var h=t.barminwidth;h&&(a[s].minwidth=h);var c=t.bargap;null!=c&&(o.gap=c);var p=t.barcategorygap;null!=p&&(o.categorygap=p)}));var n={};return e(e,(function(t,e){n[e]={};var i=t.stacks,r=t.bandwidth,o=t.categorygap;if(null==o){var a=g(i).length;o=math.max(35-4*a,15)+"%"}var s=er(o,r),l=er(t.gap,1),u=t.remainedwidth,h=t.autowidthcount,c=(u-s)/(h+(h-1)*l);c=math.max(c,0),e(i,(function(t){var e=t.maxwidth,n=t.minwidth;if(t.width){i=t.width;e&&(i=math.min(i,e)),n&&(i=math.max(i,n)),t.width=i,u-=i+l*i,h--}else{var i=c;e&&ei&&(i=n),i!==c&&(t.width=i,u-=i+l*i,h--)}})),c=(u-s)/(h+(h-1)*l),c=math.max(c,0);var p,d=0;e(i,(function(t,e){t.width||(t.width=c),p=t,d+=t.width*(1+l)})),p&&(d-=p.width*l);var f=-d/2;e(i,(function(t,i){n[e][i]=n[e][i]||{bandwidth:r,offset:f,width:t.width},f+=t.width*(1+l)}))})),n}function kx(t,e){var n=cx(t,e),i=dx(n);e(n,(function(t){var e=t.getdata(),n=t.coordinatesystem.getbaseaxis(),r=ix(t),o=i[tx(n)][r],a=o.offset,s=o.width;e.setlayout({bandwidth:o.bandwidth,offset:a,size:s})}))}function lx(t){return{seriestype:t,plan:yg(),reset:function(t){if(px(t)){var e=t.getdata(),n=t.coordinatesystem,i=n.getbaseaxis(),r=n.getotheraxis(i),o=e.getdimensionindex(e.mapdimension(r.dim)),a=e.getdimensionindex(e.mapdimension(i.dim)),s=t.get("showbackground",!0),l=e.mapdimension(r.dim),u=e.getcalculationinfo("stackresultdimension"),h=nx(e,l)&&!!e.getcalculationinfo("stackedonseries"),c=r.ishorizontal(),p=function(t,e){return e.toglobalcoord(e.datatocoord("log"===e.type?1:0))}(0,r),d=ox(t),f=t.get("barminheight")||0,g=u&&e.getdimensionindex(u),y=e.getlayout("size"),v=e.getlayout("offset");return{progress:function(t,e){for(var i,r=t.count,l=d&&sx(3*r),u=d&&s&&sx(3*r),m=d&&sx(r),x=n.master.getrect(),_=c?x.width:x.height,b=e.getstore(),w=0;null!=(i=t.next());){var s=b.get(h?g:o,i),m=b.get(a,i),i=p,t=void 0;h&&(t=+s-b.get(o,i));var c=void 0,d=void 0,a=void 0,k=void 0;if(c){var l=n.datatopoint([s,m]);if(h)i=n.datatopoint([t,m])[0];c=i,d=l[1]+v,a=l[0]-i,k=y,math.abs(a)0)for(var s=0;s=0;--s)if(l[u]){o=l[u];break}o=o||a.none}if(y(o)){var h=null==t.level?0:t.level>=0?t.level:o.length+t.level;o=o[h=math.min(h,o.length-1)]}}return vc(new date(t.value),o,r,i)}(t,e,n,this.getsetting("locale"),i)},e.prototype.getticks=function(){var t=this._interval,e=this._extent,n=[];if(!t)return n;n.push({value:e[0],level:0});var i=this.getsetting("useutc"),r=function(t,e,n,i){var r=1e4,o=rc,a=0;function s(t,e,n,r,o,a,s){for(var l=new date(e),u=e,h=l[r]();u1&&0===u&&o.unshift({value:o[0].value-p})}}for(u=0;u=i[0]&&v<=i[1]&&c++)}var m=(i[1]-i[0])/e;if(c>1.5*m&&p>m/1.5)break;if(u.push(g),c>m||t===o[d])break}h=[]}}0;var x=b(z(u,(function(t){return b(t,(function(t){return t.value>=i[0]&&t.value<=i[1]&&!t.notadd}))})),(function(t){return t.length>0})),_=[],b=x.length-1;for(d=0;dn&&(this._approxinterval=n);var o=nx.length,a=math.min(function(t,e,n,i){for(;n>>1;t[r][1]16?16:t>7.5?7:t>3.5?4:t>1.5?2:1}function zx(t){return(t/=2592e6)>6?6:t>3?3:t>2?2:1}function vx(t){return(t/=cc)>12?12:t>6?6:t>3.5?4:t>2?2:1}function bx(t,e){return(t/=e?tc:ic)>30?30:t>20?20:t>15?15:t>10?10:t>5?5:t>2?2:1}function fx(t){return $r(t,!0)}function gx(t,e,n){var i=new date(t);switch(ec(e)){case"year":case"month":i[qc(n)](0);case"day":i[kc(n)](1);case"hour":i[$c(n)](0);case"minute":i[jc(n)](0);case"second":i[qc(n)](0),i[tp(n)](0)}return i.gettime()}ox.registerclass(rx);var wx=ox.prototype,hx=xx.prototype,yx=zr,ux=math.floor,xx=math.ceil,zx=math.pow,jx=math.log,qx=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="log",e.base=10,e._originalscale=new xx,e._interval=0,e}return n(e,t),e.prototype.getticks=function(t){var e=this._originalscale,n=this._extent,i=e.getextent();return z(hx.getticks.call(this,t),(function(t){var e=t.value,r=zr(zx(this.base,e));return r=e===n[0]&&this._fixmin?$x(r,i[0]):r,{value:r=e===n[1]&&this._fixmax?$x(r,i[1]):r}}),this)},e.prototype.setextent=function(t,e){var n=this.base;t=jx(t)/jx(n),e=jx(e)/jx(n),hx.setextent.call(this,t,e)},e.prototype.getextent=function(){var t=this.base,e=wx.getextent.call(this);e[0]=zx(t,e[0]),e[1]=zx(t,e[1]);var n=this._originalscale.getextent();return this._fixmin&&(e[0]=$x(e[0],n[0])),this._fixmax&&(e[1]=$x(e[1],n[1])),e},e.prototype.unionextent=function(t){this._originalscale.unionextent(t);var e=this.base;t[0]=jx(t[0])/jx(e),t[1]=jx(t[1])/jx(e),wx.unionextent.call(this,t)},e.prototype.unionextentfromdata=function(t,e){this.unionextent(t.getapproximateextent(e))},e.prototype.calcniceticks=function(t){t=t||10;var e=this._extent,n=e[1]-e[0];if(!(n===1/0||n<=0)){var i=qr(n);for(t/n*i<=.5&&(i*=10);!isnan(i)&&math.abs(i)<1&&math.abs(i)>0;)i*=10;var r=[zr(xx(e[0]/i)*i),zr(ux(e[1]/i)*i)];this._interval=i,this._niceextent=r}},e.prototype.calcniceextent=function(t){hx.calcniceextent.call(this,t),this._fixmin=t.fixmin,this._fixmax=t.fixmax},e.prototype.parse=function(t){return t},e.prototype.contain=function(t){return fx(t=jx(t)/jx(this.base),this._extent)},e.prototype.normalize=function(t){return gx(t=jx(t)/jx(this.base),this._extent)},e.prototype.scale=function(t){return t=yx(t,this._extent),zx(this.base,t)},e.type="log",e}(ox),kx=qx.prototype;function $x(t,e){return yx(t,br(e))}kx.getminorticks=hx.getminorticks,kx.getlabel=hx.getlabel,ox.registerclass(qx);var jx=function(){function t(t,e,n){this._prepareparams(t,e,n)}return t.prototype._prepareparams=function(t,e,n){n[1]0&&s>0&&!l&&(a=0),a<0&&s<0&&!u&&(s=0));var c=this._determinedmin,p=this._determinedmax;return null!=c&&(a=c,l=!0),null!=p&&(s=p,u=!0),{min:a,max:s,minfixed:l,maxfixed:u,isblank:h}},t.prototype.modifydataminmax=function(t,e){this[t_[t]]=e},t.prototype.setdeterminedminmax=function(t,e){var n=qx[t];this[n]=e},t.prototype.freeze=function(){this.frozen=!0},t}(),qx={min:"_determinedmin",max:"_determinedmax"},t_={min:"_datamin",max:"_datamax"};function e_(t,e,n){var i=t.rawextentinfo;return i||(i=new jx(t,e,n),t.rawextentinfo=i,i)}function n_(t,e){return null==e?null:nt(e)?nan:t.parse(e)}function i_(t,e){var n=t.type,i=e_(t,e,t.getextent()).calculate();t.setblank(i.isblank);var r=i.min,o=i.max,a=e.ecmodel;if(a&&"time"===n){var s=cx("bar",a),l=!1;if(e(s,(function(t){l=l||t.getbaseaxis()===e.axis})),l){var u=dx(s),h=function(t,e,n,i){var r=n.axis.getextent(),o=r[1]-r[0],a=function(t,e,n){if(t&&e){var i=t[tx(e)];return null!=i&&null!=n?i[ix(n)]:i}}(i,n.axis);if(void 0===a)return{min:t,max:e};var s=1/0;e(a,(function(t){s=math.min(t.offset,s)}));var l=-1/0;e(a,(function(t){l=math.max(t.offset+t.width,l)})),s=math.abs(s),l=math.abs(l);var u=s+l,h=e-t,c=h/(1-(s+l)/o)-h;return{min:t-=c*(s/u),max:e+=c*(l/u)}}(r,o,e,u);r=h.min,o=h.max}}return{extent:[r,o],fixmin:i.minfixed,fixmax:i.maxfixed}}function r_(t,e){var n=e,i=i_(t,n),r=i.extent,o=n.get("splitnumber");t instanceof qx&&(t.base=n.get("logbase"));var a=t.type,s=n.get("interval"),l="interval"===a||"time"===a;t.setextent(r[0],r[1]),t.calcniceextent({splitnumber:o,fixmin:i.fixmin,fixmax:i.fixmax,mininterval:l?n.get("mininterval"):null,maxinterval:l?n.get("maxinterval"):null}),null!=s&&t.setinterval&&t.setinterval(s)}function o_(t,e){if(e=e||t.get("type"))switch(e){case"category":return new vx({ordinalmeta:t.getordinalmeta?t.getordinalmeta():t.getcategories(),extent:[1/0,-1/0]});case"time":return new rx({locale:t.ecmodel.getlocalemodel(),useutc:t.ecmodel.get("useutc")});default:return new(ox.getclass(e)||xx)}}function a_(t){var e,n,i=t.getlabelmodel().get("formatter"),r="category"===t.type?t.scale.getextent()[0]:null;return"time"===t.scale.type?(n=i,function(e,i){return t.scale.getformattedlabel(e,i,n)}):x(i)?function(e){return function(n){var i=t.scale.getlabel(n);return e.replace("{value}",null!=i?i:"")}}(i):u(i)?(e=i,function(n,i){return null!=r&&(i=n.value-r),e(s_(t,n),i,null!=n.level?{level:n.level}:null)}):function(e){return t.scale.getlabel(e)}}function s_(t,e){return"category"===t.type?t.scale.getlabel(e):e.value}function l_(t,e){var n=e*math.pi/180,i=t.width,r=t.height,o=i*math.abs(math.cos(n))+math.abs(r*math.sin(n)),a=i*math.abs(math.sin(n))+math.abs(r*math.cos(n));return new sr(t.x,t.y,o,a)}function u_(t){var e=t.get("interval");return null==e?"auto":e}function h_(t){return"category"===t.type&&0===u_(t.getlabelmodel())}function c_(t,e){var n={};return e(t.mapdimensionsall(e),(function(e){n[ix(t,e)]=!0})),g(n)}var p_=function(){function t(){}return t.prototype.getneedcrosszero=function(){return!this.option.scale},t.prototype.getcoordsysmodel=function(){},t}();var d_={isdimensionstacked:nx,enabledatastack:ex,getstackeddimension:ix};var f_=object.freeze({__proto__:null,createlist:function(t){return rx(null,t)},getlayoutrect:xp,datastack:d_,createscale:function(t,e){var n=e;e instanceof dc||(n=new dc(e));var i=o_(n);return i.setextent(t[0],t[1]),r_(i,n),i},mixinaxismodelcommonmethods:function(t){r(t,p_)},getecdata:hs,createtextstyle:function(t,e){return uh(t,null,null,"normal"!==(e=e||{}).state)},createdimensions:function(t,e){return km(t,e).dimensions},createsymbol:ly,enablehoveremphasis:ol});function g_(t,e){return math.abs(t-e)<1e-8}function y_(t,e,n){var i=0,r=t[0];if(!r)return!1;for(var o=1;on&&(t=r,n=a)}if(t)return function(t){for(var e=0,n=0,i=0,r=t.length,o=t[r-1][0],a=t[r-1][1],s=0;s>1^-(1&s),l=l>>1^-(1&l),r=s+=r,o=l+=o,i.push([s/n,l/n])}return i}function c_(t,e){return z(b((t=function(t){if(!t.utf8encoding)return t;var e=t,n=e.utf8scale;return null==n&&(n=1024),e(e.features,(function(t){var e=t.geometry,i=e.encodeoffsets,r=e.coordinates;if(i)switch(e.type){case"linestring":e.coordinates=t_(r,i,n);break;case"polygon":case"multilinestring":i_(r,i,n);break;case"multipolygon":e(r,(function(t,e){return i_(t,i[e],n)}))}})),e.utf8encoding=!1,e}(t)).features,(function(t){return t.geometry&&t.properties&&t.geometry.coordinates.length>0})),(function(t){var n=t.properties,i=t.geometry,r=[];switch(i.type){case"polygon":var o=i.coordinates;r.push(new b_(o[0],o.slice(1)));break;case"multipolygon":e(i.coordinates,(function(t){t[0]&&r.push(new b_(t[0],t.slice(1)))}));break;case"linestring":r.push(new w_([i.coordinates]));break;case"multilinestring":r.push(new w_(i.coordinates))}var a=new s_(n[e||"name"],r,n.cp);return a.properties=n,a}))}var d_=object.freeze({__proto__:null,linearmap:nr,round:zr,asc:vr,getprecision:br,getprecisionsafe:fr,getpixelprecision:gr,getpercentwithprecision:wr,max_safe_integer:yr,remradian:ur,isradianaroundzero:xr,parsedate:jr,quantity:qr,quantityexponent:kr,nice:$r,quantile:jr,reformintervals:qr,isnumeric:eo,numerictonumber:to}),a_=object.freeze({__proto__:null,parse:jr,format:vc}),k_=object.freeze({__proto__:null,extendshape:fh,extendpath:yh,makepath:xh,makeimage:_h,mergepath:wh,resizepath:sh,createicon:ph,updateprops:rh,initprops:oh,gettransform:ih,clippointsbyrect:kh,cliprectbyrect:lh,registershape:vh,getshapeclass:mh,group:cr,image:_s,text:ks,circle:hu,ellipse:pu,sector:cu,ring:au,polygon:pu,polyline:ru,rect:cs,line:zu,beziercurve:gu,arc:hu,incrementaldisplayable:th,compoundpath:yu,lineargradient:xu,radialgradient:zu,boundingrect:sr}),l_=object.freeze({__proto__:null,addcommas:ep,tocamelcase:np,normalizecssarray:ip,encodehtml:ap,formattpl:hp,gettooltipmarker:cp,formattime:function(t,e,n){"week"!==t&&"month"!==t&&"quarter"!==t&&"half-year"!==t&&"year"!==t||(t="mm-dd\nyyyy");var i=jr(e),r=n?"getutc":"get",o=i[r+"fullyear"](),a=i[r+"month"]()+1,s=i[r+"date"](),l=i[r+"hours"](),u=i[r+"minutes"](),h=i[r+"seconds"](),c=i[r+"milliseconds"]();return t=t.replace("mm",nc(a,2)).replace("m",a).replace("yyyy",o).replace("yy",nc(o%100+"",2)).replace("dd",nc(s,2)).replace("d",s).replace("hh",nc(l,2)).replace("h",l).replace("mm",nc(u,2)).replace("m",u).replace("ss",nc(h,2)).replace("s",h).replace("sss",nc(c,3))},capitalfirst:function(t){return t?t.charat(0).touppercase()+t.substr(1):t},truncatetext:$o,gettextrect:function(t,e,n,i,r,o,a,s){return new ks({style:{text:t,font:e,align:n,verticalalign:i,padding:r,rich:o,overflow:a?"truncate":null,lineheight:s}}).getboundingrect()}}),p_=object.freeze({__proto__:null,map:z,each:e,indexof:p,inherits:o,reduce:v,filter:b,bind:w,curry:h,isarray:y,isstring:x,isobject:q,isfunction:u,extend:a,defaults:k,clone:t,merge:c}),o_=so();function r_(t){return"category"===t.type?function(t){var e=t.getlabelmodel(),n=e_(t,e);return!e.get("show")||t.scale.isblank()?{labels:[],labelcategoryinterval:n.labelcategoryinterval}:n}(t):function(t){var e=t.scale.getticks(),n=a_(t);return{labels:z(e,(function(e,i){return{level:e.level,formattedlabel:n(e,i),rawlabel:t.scale.getlabel(e),tickvalue:e.value}}))}}(t)}function n_(t,e){return"category"===t.type?function(t,e){var n,i,r=z_(t,"ticks"),o=u_(e),a=v_(r,o);if(a)return a;e.get("show")&&!t.scale.isblank()||(n=[]);if(u(o))n=g_(t,o,!0);else if("auto"===o){var s=e_(t,t.getlabelmodel());i=s.labelcategoryinterval,n=z(s.labels,(function(t){return t.tickvalue}))}else n=f_(t,i=o,!0);return b_(r,o,{ticks:n,tickcategoryinterval:i})}(t,e):{ticks:z(t.scale.getticks(),(function(t){return t.value}))}}function e_(t,e){var n,i,r=z_(t,"labels"),o=u_(e),a=v_(r,o);return a||(u(o)?n=g_(t,o):(i="auto"===o?function(t){var e=o_(t).autointerval;return null!=e?e:o_(t).autointerval=t.calculatecategoryinterval()}(t):o,n=f_(t,i)),b_(r,o,{labels:n,labelcategoryinterval:i}))}function z_(t,e){return o_(t)[e]||(o_(t)[e]=[])}function v_(t,e){for(var n=0;n1&&h/l>2&&(u=math.round(math.ceil(u/l)*l));var c=h_(t),p=a.get("showminlabel")||c,d=a.get("showmaxlabel")||c;p&&u!==o[0]&&g(o[0]);for(var f=u;f<=o[1];f+=l)g(f);function g(t){var e={value:t};s.push(n?t:{formattedlabel:i(e),rawlabel:r.getlabel(e),tickvalue:t})}return d&&f-l!==o[1]&&g(o[1]),s}function g_(t,e,n){var i=t.scale,r=a_(t),o=[];return e(i.getticks(),(function(t){var a=i.getlabel(t),s=t.value;e(t.value,a)&&o.push(n?s:{formattedlabel:r(t),rawlabel:a,tickvalue:s})})),o}var w_=[0,1],h_=function(){function t(t,e,n){this.onband=!1,this.inverse=!1,this.dim=t,this.scale=e,this._extent=n||[0,0]}return t.prototype.contain=function(t){var e=this._extent,n=math.min(e[0],e[1]),i=math.max(e[0],e[1]);return t>=n&&t<=i},t.prototype.containdata=function(t){return this.scale.contain(t)},t.prototype.getextent=function(){return this._extent.slice()},t.prototype.getpixelprecision=function(t){return gr(t||this.scale.getextent(),this._extent)},t.prototype.setextent=function(t,e){var n=this._extent;n[0]=t,n[1]=e},t.prototype.datatocoord=function(t,e){var n=this._extent,i=this.scale;return t=i.normalize(t),this.onband&&"ordinal"===i.type&&y_(n=n.slice(),i.count()),nr(t,w_,n,e)},t.prototype.coordtodata=function(t,e){var n=this._extent,i=this.scale;this.onband&&"ordinal"===i.type&&y_(n=n.slice(),i.count());var r=nr(t,n,w_,e);return this.scale.scale(r)},t.prototype.pointtodata=function(t,e){},t.prototype.gettickscoords=function(t){var e=(t=t||{}).tickmodel||this.gettickmodel(),n=z(n_(this,e).ticks,(function(t){return{coord:this.datatocoord("ordinal"===this.scale.type?this.scale.getrawordinalnumber(t):t),tickvalue:t}}),this);return function(t,e,n,i){var r=e.length;if(!t.onband||n||!r)return;var o,a,s=t.getextent();if(1===r)e[0].coord=s[0],o=e[1]={coord:s[0]};else{var l=e[r-1].tickvalue-e[0].tickvalue,u=(e[r-1].coord-e[0].coord)/l;e(e,(function(t){t.coord-=u/2})),a=1+t.scale.getextent()[1]-e[r-1].tickvalue,o={coord:e[r-1].coord+u*a},e.push(o)}var h=s[0]>s[1];c(e[0].coord,s[0])&&(i?e[0].coord=s[0]:e.shift());i&&c(s[0],e[0].coord)&&e.unshift({coord:s[0]});c(s[1],o.coord)&&(i?o.coord=s[1]:e.pop());i&&c(o.coord,s[1])&&e.push({coord:s[1]});function c(t,e){return t=zr(t),e=zr(e),h?t>e:t0&&t<100||(t=5),z(this.scale.getminorticks(t),(function(t){return z(t,(function(t){return{coord:this.datatocoord(t),tickvalue:t}}),this)}),this)},t.prototype.getviewlabels=function(){return r_(this).labels},t.prototype.getlabelmodel=function(){return this.model.getmodel("axislabel")},t.prototype.gettickmodel=function(){return this.model.getmodel("axistick")},t.prototype.getbandwidth=function(){var t=this._extent,e=this.scale.getextent(),n=e[1]-e[0]+(this.onband?1:0);0===n&&(n=1);var i=math.abs(t[1]-t[0]);return math.abs(i)/n},t.prototype.calculatecategoryinterval=function(){return function(t){var e=function(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()}}(t),n=a_(t),i=(e.axisrotate-e.labelrotate)/180*math.pi,r=t.scale,o=r.getextent(),a=r.count();if(o[1]-o[0]<1)return 0;var s=1;a>40&&(s=math.max(1,math.floor(a/40)));for(var l=o[0],u=t.datatocoord(l+1)-t.datatocoord(l),h=math.abs(u*math.cos(i)),c=math.abs(u*math.sin(i)),p=0,d=0;l<=o[1];l+=s){var f,g,y=cr(n({value:l}),e.font,"center","top");f=1.3*y.width,g=1.3*y.height,p=math.max(p,f,7),d=math.max(d,g,7)}var v=p/h,m=d/c;isnan(v)&&(v=1/0),isnan(m)&&(m=1/0);var x=math.max(0,math.floor(math.min(v,m))),_=o_(t.model),b=t.getextent(),w=_.lastautointerval,s=_.lasttickcount;return null!=w&&null!=s&&math.abs(w-x)<=1&&math.abs(s-a)<=1&&w>x&&_.axisextent0===b[0]&&_.axisextent1===b[1]?x=w:(_.lasttickcount=a,_.lastautointerval=x,_.axisextent0=b[0],_.axisextent1=b[1]),x}(this)},t}();function y_(t,e){var n=(t[1]-t[0])/e/2;t[0]+=n,t[1]-=n}var u_=2*math.pi,x_=qa.cmd,z_=["top","right","bottom","left"];function j_(t,e,n,i,r){var o=n.width,a=n.height;switch(t){case"top":i.set(n.x+o/2,n.y-e),r.set(0,-1);break;case"bottom":i.set(n.x+o/2,n.y+a+e),r.set(0,1);break;case"left":i.set(n.x-e,n.y+a/2),r.set(-1,0);break;case"right":i.set(n.x+o+e,n.y+a/2),r.set(1,0)}}function q_(t,e,n,i,r,o,a,s,l){a-=t,s-=e;var u=math.sqrt(a*a+s*s),h=(a/=u)*n+t,c=(s/=u)*n+e;if(math.abs(i-r)%u_<1e-4)return l[0]=h,l[1]=c,u-n;if(o){var p=i;i=ts(r),r=ts(p)}else i=ts(i),r=ts(r);i>r&&(r+=u_);var d=math.atan2(s,a);if(d<0&&(d+=u_),d>=i&&d<=r||d+u_>=i&&d+u_<=r)return l[0]=h,l[1]=c,u-n;var f=n*math.cos(i)+t,g=n*math.sin(i)+e,y=n*math.cos(r)+t,v=n*math.sin(r)+e,m=(f-a)*(f-a)+(g-s)*(g-s),x=(y-a)*(y-a)+(v-s)*(v-s);return m0){e=e/180*math.pi,eb.fromarray(t[0]),nb.fromarray(t[1]),ib.fromarray(t[2]),ji.sub(rb,eb,nb),ji.sub(ob,ib,nb);var n=rb.len(),i=ob.len();if(!(n<.001||i<.001)){rb.scale(1/n),ob.scale(1/i);var r=rb.dot(ob);if(math.cos(e)1&&ji.copy(lb,ib),lb.toarray(t[1])}}}}function hb(t,e,n){if(n<=180&&n>0){n=n/180*math.pi,eb.fromarray(t[0]),nb.fromarray(t[1]),ib.fromarray(t[2]),ji.sub(rb,nb,eb),ji.sub(ob,ib,nb);var i=rb.len(),r=ob.len();if(!(i<.001||r<.001))if(rb.scale(1/i),ob.scale(1/r),rb.dot(e)=a)ji.copy(lb,ib);else{lb.scaleandadd(ob,o/math.tan(math.pi/2-s));var l=ib.x!==nb.x?(lb.x-nb.x)/(ib.x-nb.x):(lb.y-nb.y)/(ib.y-nb.y);if(isnan(l))return;l<0?ji.copy(lb,nb):l>1&&ji.copy(lb,ib)}lb.toarray(t[1])}}}function cb(t,e,n,i){var r="normal"===n,o=r?t:t.ensurestate(n);o.ignore=e;var a=i.get("smooth");a&&!0===a&&(a=.3),o.shape=o.shape||{},a>0&&(o.shape.smooth=a);var s=i.getmodel("linestyle").getlinestyle();r?t.usestyle(s):o.style=s}function pb(t,e){var n=e.smooth,i=e.points;if(i)if(t.moveto(i[0][0],i[0][1]),n>0&&i.length>=3){var r=et(i[0],i[1]),o=et(i[1],i[2]);if(!r||!o)return t.lineto(i[1][0],i[1][1]),void t.lineto(i[2][0],i[2][1]);var a=math.min(r,o)*n,s=bt([],i[1],i[0],a/r),l=bt([],i[1],i[2],a/o),u=bt([],s,l,.5);t.beziercurveto(s[0],s[1],s[0],s[1],u[0],u[1]),t.beziercurveto(l[0],l[1],l[0],l[1],i[2][0],i[2][1])}else for(var h=1;h0&&o&&_(-h/a,0,a);var f,g,y=t[0],v=t[a-1];return m(),f<0&&b(-f,.8),g<0&&b(g,.8),m(),x(f,g,1),x(g,f,-1),m(),f<0&&w(-f),g<0&&w(g),u}function m(){f=y.rect[e]-i,g=r-v.rect[e]-v.rect[n]}function x(t,e,n){if(t<0){var i=math.min(e,-t);if(i>0){_(i*n,0,a);var r=i+t;r<0&&b(-r*n,1)}else b(-t*n,1)}}function _(n,i,r){0!==n&&(u=!0);for(var o=i;o0)for(l=0;l0;l--){_(-(o[l-1]*c),l,a)}}}function w(t){var e=t<0?-1:1;t=math.abs(t);for(var n=math.ceil(t/(a-1)),i=0;i0?_(n,0,i+1):_(-n,a-i-1,a),(t-=n)<=0)return}}function vb(t,e,n,i){return yb(t,"y","height",e,n,i)}function mb(t){var e=[];t.sort((function(t,e){return e.priority-t.priority}));var n=new sr(0,0,0,0);function i(t){if(!t.ignore){var e=t.ensurestate("emphasis");null==e.ignore&&(e.ignore=!1)}t.ignore=!0}for(var r=0;r=0&&n.attr(d.oldlayoutselect),p(u,"emphasis")>=0&&n.attr(d.oldlayoutemphasis)),rh(n,s,e,a)}else if(n.attr(s),!jh(n).valueanimation){var h=rt(n.style.opacity,1);n.style.opacity=0,oh(n,{style:{opacity:h}},e,a)}if(d.oldlayout=s,n.states.select){var c=d.oldlayoutselect={};ib(c,s,tb),ib(c,n.states.select,tb)}if(n.states.emphasis){var p=d.oldlayoutemphasis={};ib(p,s,tb),ib(p,n.states.emphasis,tb)}tc(n,a,l,e,e)}if(i&&!i.ignore&&!i.invisible){r=(d=mb(i)).oldlayout;var d,f={points:i.shape.points};r?(i.attr({shape:r}),rh(i,{shape:f},e)):(i.setshape(f),i.style.strokepercent=0,oh(i,{style:{strokepercent:1}},e)),d.oldlayout=f}},t}(),db=so();var ab=math.sin,kb=math.cos,lb=math.pi,pb=2*math.pi,ob=180/lb,rb=function(){function t(){}return t.prototype.reset=function(t){this._start=!0,this._d=[],this._str="",this._p=math.pow(10,t||4)},t.prototype.moveto=function(t,e){this._add("m",t,e)},t.prototype.lineto=function(t,e){this._add("l",t,e)},t.prototype.beziercurveto=function(t,e,n,i,r,o){this._add("c",t,e,n,i,r,o)},t.prototype.quadraticcurveto=function(t,e,n,i){this._add("q",t,e,n,i)},t.prototype.arc=function(t,e,n,i,r,o){this.ellipse(t,e,n,n,0,i,r,o)},t.prototype.ellipse=function(t,e,n,i,r,o,a,s){var l=a-o,u=!s,h=math.abs(l),c=en(h-pb)||(u?l>=pb:-l>=pb),p=l>0?l%pb:l%pb+pb,d=!1;d=!!c||!en(h)&&p>=lb==!!u;var f=t+n*kb(o),g=e+i*ab(o);this._start&&this._add("m",f,g);var y=math.round(r*ob);if(c){var v=1/this._p,m=(u?1:-1)*(pb-v);this._add("a",n,i,y,1,+u,t+n*kb(o+m),e+i*ab(o+m)),v>.01&&this._add("a",n,i,y,0,+u,f,g)}else{var x=t+n*kb(a),_=e+i*ab(a);this._add("a",n,i,y,+d,+u,x,_)}},t.prototype.rect=function(t,e,n,i){this._add("m",t,e),this._add("l",n,0),this._add("l",0,i),this._add("l",-n,0),this._add("z")},t.prototype.closepath=function(){this._d.length>0&&this._add("z")},t.prototype._add=function(t,e,n,i,r,o,a,s,l){for(var u=[],h=this._p,c=1;c"}(r,e.attrs)+(e.text||"")+(i?""+n+z(i,(function(e){return t(e)})).join(n)+n:"")+("")}(t)}function ub(t){return{zrid:t,shadowcache:{},patterncache:{},gradientcache:{},clippathcache:{},defs:{},cssnodes:{},cssanims:{},cssclassidx:0,cssanimidx:0,shadowidx:0,gradientidx:0,patternidx:0,clippathidx:0}}function xb(t,e,n,i){return hb("svg","root",{width:t,height:e,xmlns:fb,"xmlns:xlink":gb,version:"1.1",baseprofile:"full",viewbox:!!i&&"0 0 "+t+" "+e},n)}var zb={cubicin:"0.32,0,0.67,0",cubicout:"0.33,1,0.68,1",cubicinout:"0.65,0,0.35,1",quadraticin:"0.11,0,0.5,0",quadraticout:"0.5,1,0.89,1",quadraticinout:"0.45,0,0.55,1",quarticin:"0.5,0,0.75,0",quarticout:"0.25,1,0.5,1",quarticinout:"0.76,0,0.24,1",quinticin:"0.64,0,0.78,0",quinticout:"0.22,1,0.36,1",quinticinout:"0.83,0,0.17,1",sinusoidalin:"0.12,0,0.39,0",sinusoidalout:"0.61,1,0.88,1",sinusoidalinout:"0.37,0,0.63,1",exponentialin:"0.7,0,0.84,0",exponentialout:"0.16,1,0.3,1",exponentialinout:"0.87,0,0.13,1",circularin:"0.55,0,1,0.45",circularout:"0,0.55,0.45,1",circularinout:"0.85,0,0.15,1"},jb="transform-origin";function qb(t,e,n){var i=a({},t.shape);a(i,e),t.buildpath(n,i);var r=new rb;return r.reset(yn(t)),n.rebuildpath(r,1),r.generatestr(),r.getstr()}function kb(t,e){var n=e.originx,i=e.originy;(n||i)&&(t[jb]=n+"px "+i+"px")}var $b={fill:"fill",opacity:"opacity",linewidth:"stroke-width",linedashoffset:"stroke-dashoffset"};function jb(t,e){var n=e.zrid+"-ani-"+e.cssanimidx++;return e.cssanims[n]=t,n}function qb(t){return x(t)?zb[t]?"cubic-bezier("+zb[t]+")":rn(t)?t:"":""}function tw(t,e,n,i){var r=t.animators,o=r.length,a=[];if(t instanceof yu){if(y=function(t,e,n){var i,r,o=t.shape.paths,a={};if(e(o,(function(t){var e=ub(n.zrid);e.animation=!0,tw(t,{},e,!0);var o=e.cssanims,s=e.cssnodes,l=g(o),u=l.length;if(u){var h=o[r=l[u-1]];for(var c in h){var p=h[c];a[c]=a[c]||{d:""},a[c].d+=p.d||""}for(var d in s){var f=s[d].animation;f.indexof(r)>=0&&(i=f)}}})),i){e.d=!1;var s=jb(a,n);return i.replace(r,s)}}(t,e,n))a.push(y);else if(!o)return}else if(!o)return;for(var s={},l=0;l0})).length)return jb(h,n)+" "+r[0]+" both"}for(var g in s){var y;(y=f(s[g]))&&a.push(y)}if(a.length){var v=n.zrid+"-cls-"+n.cssclassidx++;n.cssnodes["."+v]={animation:a.join(",")},e.class=v}}var ew=math.round;function nw(t){return t&&x(t.src)}function iw(t){return t&&u(t.todataurl)}function rw(t,e,n,i){bb((function(r,o){var a="fill"===r||"stroke"===r;a&&function(t){return t&&("linear"===t.type||"radial"===t.type)}(o)?function(t,e,n,i){var r,o=t[n],a={gradientunits:o.global?"userspaceonuse":"objectboundingbox"};if(gn(o))r="lineargradient",a.x1=o.x,a.y1=o.y,a.x2=o.x2,a.y2=o.y2;else{if(!wn(o))return void 0;r="radialgradient",a.cx=rt(o.x,.5),a.cy=rt(o.y,.5),a.r=rt(o.r,.5)}for(var s=o.colorstops,l=[],u=0,h=s.length;ul?dw(t,null==n[c+1]?null:n[c+1].elm,n,s,c):aw(t,e,a,l))}(n,i,r):mw(r)?(mw(t.text)&&bw(n,""),dw(n,null,r,0,r.length-1)):mw(i)?aw(n,i,0,i.length-1):mw(t.text)&&bw(n,""):t.text!==e.text&&(mw(i)&&aw(n,i,0,i.length-1),bw(n,e.text)))}var pw=0,ow=function(){function t(t,e,n){if(this.type="svg",this.refreshhover=rw("refreshhover"),this.configlayer=rw("configlayer"),this.storage=e,this._opts=n=a({},n),this.root=t,this._id="zr"+pw++,this._oldvnode=xb(n.width,n.height),t&&!n.ssr){var i=this._viewport=document.createelement("div");i.style.csstext="position:relative;overflow:hidden";var r=this._svgdom=this._oldvnode.elm=wb("svg");kw(null,this._oldvnode),i.appendchild(r),t.appendchild(i)}this.resize(n.width,n.height)}return t.prototype.gettype=function(){return this.type},t.prototype.getviewportroot=function(){return this._viewport},t.prototype.getviewportrootoffset=function(){var t=this.getviewportroot();if(t)return{offsetleft:t.offsetleft||0,offsettop:t.offsettop||0}},t.prototype.getsvgdom=function(){return this._svgdom},t.prototype.refresh=function(){if(this.root){var t=this.rendertovnode({willupdate:!0});t.attrs.style="position:absolute;left:0;top:0;user-select:none",function(t,e){if(tw(t,e))lw(t,e);else{var n=t.elm,i=xw(n);cw(e),null!==i&&(yw(i,e.elm,_w(n)),aw(i,[t],0,0))}}(this._oldvnode,t),this._oldvnode=t}},t.prototype.renderonetovnode=function(t){return dw(t,ub(this._id))},t.prototype.rendertovnode=function(t){t=t||{};var e=this.storage.getdisplaylist(!0),n=this._backgroundcolor,i=this._width,r=this._height,o=ub(this._id);o.animation=t.animation,o.willupdate=t.willupdate,o.compress=t.compress;var a=[];if(n&&"none"!==n){var s=rn(n),l=s.color,u=s.opacity;this._bgvnode=hb("rect","bg",{width:i,height:r,x:"0",y:"0",id:"0",fill:l,"fill-opacity":u}),a.push(this._bgvnode)}else this._bgvnode=null;var h=t.compress?null:this._mainvnode=hb("g","main",{},[]);this._paintlist(e,o,h?h.children:a),h&&a.push(h);var c=z(g(o.defs),(function(t){return o.defs[t]}));if(c.length&&a.push(hb("defs","defs",{},c)),t.animation){var p=function(t,e,n){var i=(n=n||{}).newline?"\n":"",r=" {"+i,o=i+"}",a=z(g(t),(function(e){return e+r+z(g(t[e]),(function(n){return n+":"+t[e][n]+";"})).join(i)+o})).join(i),s=z(g(e),(function(t){return"@keyframes "+t+r+z(g(e[t]),(function(n){return n+r+z(g(e[t][n]),(function(i){var r=e[t][n][i];return"d"===i&&(r='path("'+r+'")'),i+":"+r+";"})).join(i)+o})).join(i)+o})).join(i);return a||s?[""].join(i):""}(o.cssnodes,o.cssanims,{newline:!0});if(p){var d=hb("style","stl",{},[],p);a.push(d)}}return xb(i,r,a,t.useviewbox)},t.prototype.rendertostring=function(t){return t=t||{},yb(this.rendertovnode({animation:rt(t.cssanimation,!0),willupdate:!1,compress:!0,useviewbox:rt(t.useviewbox,!0)}),{newline:!0})},t.prototype.setbackgroundcolor=function(t){this._backgroundcolor=t;var e=this._bgvnode;if(e&&e.elm){var n=rn(t),i=n.color,r=n.opacity;e.elm.setattribute("fill",i),r<1&&e.elm.setattribute("fill-opacity",r)}},t.prototype.getsvgroot=function(){return this._mainvnode&&this._mainvnode.elm},t.prototype._paintlist=function(t,e,n){for(var i,r,o=t.length,a=[],s=0,l=0,u=0;u=0&&(!c||!r||c[f]!==r[f]);f--);for(var g=d-1;g>f;g--)i=a[--s-1];for(var y=f+1;y=a)}}for(var h=this.__startindex;h15)break}n.prevelclippaths&&u.restore()};if(p)if(0===p.length)s=l.__endindex;else for(var _=d.dpr,b=0;b0&&t>i[0]){for(s=0;st);s++);a=n[i[s]]}if(i.splice(s+1,0,t),n[t]=e,!e.virtual)if(a){var l=a.dom;l.nextsibling?o.insertbefore(e.dom,l.nextsibling):o.appendchild(e.dom)}else o.firstchild?o.insertbefore(e.dom,o.firstchild):o.appendchild(e.dom);e.__painter=this}},t.prototype.eachlayer=function(t,e){for(var n=this._zlevellist,i=0;i0?bw:0),this._needsmanuallycompositing),u.__builtin__||i("zlevel "+l+" has been used by unkown layer "+u.id),u!==o&&(u.__used=!0,u.__startindex!==r&&(u.__dirty=!0),u.__startindex=r,u.incremental?u.__drawindex=-1:u.__drawindex=r,e(r),o=u),1&s.__dirty&&!s.__inhover&&(u.__dirty=!0,u.incremental&&u.__drawindex<0&&(u.__drawindex=r))}e(r),this.eachbuiltinlayer((function(t,e){!t.__used&&t.getelementcount()>0&&(t.__dirty=!0,t.__startindex=t.__endindex=t.__drawindex=0),t.__dirty&&t.__drawindex<0&&(t.__drawindex=t.__startindex)}))},t.prototype.clear=function(){return this.eachbuiltinlayer(this._clearlayer),this},t.prototype._clearlayer=function(t){t.clear()},t.prototype.setbackgroundcolor=function(t){this._backgroundcolor=t,e(this._layers,(function(t){t.setunpainted()}))},t.prototype.configlayer=function(t,e){if(e){var n=this._layerconfig;n[t]?c(n[t],e,!0):n[t]=e;for(var i=0;i-1&&(s.style.stroke=s.style.fill,s.style.fill="#fff",s.style.linewidth=2),e},e.type="series.line",e.dependencies=["grid","polar"],e.defaultoption={z:3,coordinatesystem:"cartesian2d",legendhoverlink:!0,clip:!0,label:{position:"top"},endlabel:{show:!1,valueanimation:!0,distance:8},linestyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothmonotone:null,symbol:"emptycircle",symbolsize:4,symbolrotate:null,showsymbol:!0,showallsymbol:"auto",connectnulls:!1,sampling:"none",animationeasing:"linear",progressive:0,hoverlayerthreshold:1/0,universaltransition:{divideshape:"clone"},triggerlineevent:!1},e}(sg);function ww(t,e){var n=t.mapdimensionsall("defaultedlabel"),i=n.length;if(1===i){var r=af(t,e,n[0]);return null!=r?r+"":null}if(i){for(var o=[],a=0;a=0&&i.push(e[o])}return i.join(" ")}var yw=function(t){function e(e,n,i,r){var o=t.call(this)||this;return o.updatedata(e,n,i,r),o}return n(e,t),e.prototype._createsymbol=function(t,e,n,i,r){this.removeall();var o=ly(t,-1,-1,2,2,null,r);o.attr({z2:100,culling:!0,scalex:i[0]/2,scaley:i[1]/2}),o.drift=uw,this._symboltype=t,this.add(o)},e.prototype.stopsymbolanimation=function(t){this.childat(0).stopanimation(null,t)},e.prototype.getsymboltype=function(){return this._symboltype},e.prototype.getsymbolpath=function(){return this.childat(0)},e.prototype.highlight=function(){_l(this.childat(0))},e.prototype.downplay=function(){bl(this.childat(0))},e.prototype.setz=function(t,e){var n=this.childat(0);n.zlevel=t,n.z=e},e.prototype.setdraggable=function(t,e){var n=this.childat(0);n.draggable=t,n.cursor=!e&&t?"move":n.cursor},e.prototype.updatedata=function(t,n,i,r){this.silent=!1;var o=t.getitemvisual(n,"symbol")||"circle",a=t.hostmodel,s=e.getsymbolsize(t,n),l=o!==this._symboltype,u=r&&r.disableanimation;if(l){var h=t.getitemvisual(n,"symbolkeepaspect");this._createsymbol(o,t,n,s,h)}else{(p=this.childat(0)).silent=!1;var c={scalex:s[0]/2,scaley:s[1]/2};u?p.attr(c):rh(p,c,a,n),hh(p)}if(this._updatecommon(t,n,s,i,r),l){var p=this.childat(0);if(!u){c={scalex:this._sizex,scaley:this._sizey,style:{opacity:p.style.opacity}};p.scalex=p.scaley=0,p.style.opacity=0,oh(p,c,a,n)}}u&&this.childat(0).stopanimation("leave")},e.prototype._updatecommon=function(t,e,n,i,r){var o,a,s,l,u,h,c,p,d,f=this.childat(0),g=t.hostmodel;if(i&&(o=i.emphasisitemstyle,a=i.bluritemstyle,s=i.selectitemstyle,l=i.focus,u=i.blurscope,c=i.labelstatesmodels,p=i.hoverscale,d=i.cursorstyle,h=i.emphasisdisabled),!i||t.hasitemoption){var y=i&&i.itemmodel?i.itemmodel:t.getitemmodel(e),v=y.getmodel("emphasis");o=v.getmodel("itemstyle").getitemstyle(),s=y.getmodel(["select","itemstyle"]).getitemstyle(),a=y.getmodel(["blur","itemstyle"]).getitemstyle(),l=v.get("focus"),u=v.get("blurscope"),h=v.get("disabled"),c=yh(y),p=v.getshallow("scale"),d=y.getshallow("cursor")}var m=t.getitemvisual(e,"symbolrotate");f.attr("rotation",(m||0)*math.pi/180||0);var x=oy(t.getitemvisual(e,"symboloffset"),n);x&&(f.x=x[0],f.y=x[1]),d&&f.attr("cursor",d);var _=t.getitemvisual(e,"style"),b=_.fill;if(f instanceof _s){var w=f.style;f.usestyle(a({image:w.image,x:w.x,y:w.y,width:w.width,height:w.height},_))}else f.__isemptybrush?f.usestyle(a({},_)):f.usestyle(_),f.style.decal=null,f.setcolor(b,r&&r.symbolinnercolor),f.style.strokenoscale=!0;var s=t.getitemvisual(e,"liftz"),m=this._z2;null!=s?null==m&&(this._z2=f.z2,f.z2+=s):null!=m&&(f.z2=m,this._z2=null);var i=r&&r.usenamelabel;hh(f,c,{labelfetcher:g,labeldataindex:e,defaulttext:function(e){return i?t.getname(e):ww(t,e)},inheritcolor:b,defaultopacity:_.opacity}),this._sizex=n[0]/2,this._sizey=n[1]/2;var t=f.ensurestate("emphasis");if(t.style=o,f.ensurestate("select").style=s,f.ensurestate("blur").style=a,p){var c=math.max(j(p)?p:1.1,3/this._sizey);t.scalex=this._sizex*c,t.scaley=this._sizey*c}this.setsymbolscale(1),rl(this,l,u,h)},e.prototype.setsymbolscale=function(t){this.scalex=this.scaley=t},e.prototype.fadeout=function(t,e,n){var i=this.childat(0),r=hs(this).dataindex,o=n&&n.animation;if(this.silent=i.silent=!0,n&&n.fadelabel){var a=i.gettextcontent();a&&sh(a,{style:{opacity:0}},e,{dataindex:r,removeopt:o,cb:function(){i.removetextcontent()}})}else i.removetextcontent();sh(i,{style:{opacity:0},scalex:0,scaley:0},e,{dataindex:r,cb:t,removeopt:o})},e.getsymbolsize=function(t,e){return py(t.getitemvisual(e,"symbolsize"))},e}(cr);function uw(t,e){this.parent.drift(t,e)}function xw(t,e,n,i){return e&&!isnan(e[0])&&!isnan(e[1])&&!(i.isignore&&i.isignore(n))&&!(i.clipshape&&!i.clipshape.contain(e[0],e[1]))&&"none"!==t.getitemvisual(n,"symbol")}function zw(t){return null==t||q(t)||(t={isignore:t}),t||{}}function jw(t){var e=t.hostmodel,n=e.getmodel("emphasis");return{emphasisitemstyle:n.getmodel("itemstyle").getitemstyle(),bluritemstyle:e.getmodel(["blur","itemstyle"]).getitemstyle(),selectitemstyle:e.getmodel(["select","itemstyle"]).getitemstyle(),focus:n.get("focus"),blurscope:n.get("blurscope"),emphasisdisabled:n.get("disabled"),hoverscale:n.get("scale"),labelstatesmodels:yh(e),cursorstyle:e.get("cursor")}}var qw=function(){function t(t){this.group=new cr,this._symbolctor=t||yw}return t.prototype.updatedata=function(t,e){this._progressiveels=null,e=zw(e);var n=this.group,i=t.hostmodel,r=this._data,o=this._symbolctor,a=e.disableanimation,s=jw(t),l={disableanimation:a},u=e.getsymbolpoint||function(e){return t.getitemlayout(e)};r||n.removeall(),t.diff(r).add((function(i){var r=u(i);if(xw(t,r,i,e)){var a=new o(t,i,s,l);a.setposition(r),t.setitemgraphicel(i,a),n.add(a)}})).update((function(h,c){var p=r.getitemgraphicel(c),d=u(h);if(xw(t,d,h,e)){var f=t.getitemvisual(h,"symbol")||"circle",g=p&&p.getsymboltype&&p.getsymboltype();if(!p||g&&g!==f)n.remove(p),(p=new o(t,h,s,l)).setposition(d);else{p.updatedata(t,h,s,l);var y={x:d[0],y:d[1]};a?p.attr(y):rh(p,y,i)}n.add(p),t.setitemgraphicel(h,p)}else n.remove(p)})).remove((function(t){var e=r.getitemgraphicel(t);e&&e.fadeout((function(){n.remove(e)}),i)})).execute(),this._getsymbolpoint=u,this._data=t},t.prototype.updatelayout=function(){var t=this,e=this._data;e&&e.eachitemgraphicel((function(e,n){var i=t._getsymbolpoint(n);e.setposition(i),e.markredraw()}))},t.prototype.incrementalprepareupdate=function(t){this._seriesscope=jw(t),this._data=null,this.group.removeall()},t.prototype.incrementalupdate=function(t,e,n){function i(t){t.isgroup||(t.incremental=!0,t.ensurestate("emphasis").hoverlayer=!0)}this._progressiveels=[],n=zw(n);for(var r=t.start;r0?n=i[0]:i[1]<0&&(n=i[1]);return n}(r,n),a=i.dim,s=r.dim,l=e.mapdimension(s),u=e.mapdimension(a),h="x"===s||"radius"===s?1:0,c=z(t.dimensions,(function(t){return e.mapdimension(t)})),p=!1,d=e.getcalculationinfo("stackresultdimension");return nx(e,c[0])&&(p=!0,c[0]=d),nx(e,c[1])&&(p=!0,c[1]=d),{datadimsforpoint:c,valuestart:o,valueaxisdim:s,baseaxisdim:a,stacked:!!p,valuedim:l,basedim:u,basedataoffset:h,stackedoverdimension:e.getcalculationinfo("stackedoverdimension")}}function $w(t,e,n,i){var r=nan;t.stacked&&(r=n.get(n.getcalculationinfo("stackedoverdimension"),i)),isnan(r)&&(r=t.valuestart);var o=t.basedataoffset,a=[];return a[o]=n.get(t.basedim,i),a[1-o]=r,e.datatopoint(a)}var jw=math.min,qw=math.max;function ts(t,e){return isnan(t)||isnan(e)}function es(t,e,n,i,r,o,a,s,l){for(var u,h,c,p,d,f,g=n,y=0;y=r||g<0)break;if(ts(v,m)){if(l){g+=o;continue}break}if(g===n)t[o>0?"moveto":"lineto"](v,m),c=v,p=m;else{var x=v-u,_=m-h;if(x*x+_*_<.5){g+=o;continue}if(a>0){for(var b=g+o,w=e[2*b],s=e[2*b+1];w===v&&s===m&&y=i||ts(w,s))d=v,f=m;else{t=w-u,c=s-h;var k=v-u,l=w-v,p=m-h,o=s-m,r=void 0,n=void 0;if("x"===s){var e=t>0?1:-1;d=v-e*(r=math.abs(k))*a,f=m,d=v+e*(n=math.abs(l))*a,a=m}else if("y"===s){var z=c>0?1:-1;d=v,f=m-z*(r=math.abs(p))*a,d=v,a=m+z*(n=math.abs(o))*a}else r=math.sqrt(k*k+p*p),d=v-t*a*(1-(i=(n=math.sqrt(l*l+o*o))/(n+r))),f=m-c*a*(1-i),a=m+c*a*i,d=jw(d=v+t*a*i,qw(w,v)),a=jw(a,qw(s,m)),d=qw(d,jw(w,v)),f=m-(c=(a=qw(a,jw(s,m)))-m)*r/n,d=jw(d=v-(t=d-v)*r/n,qw(u,v)),f=jw(f,qw(h,m)),d=v+(t=v-(d=qw(d,jw(u,v))))*n/r,a=m+(c=m-(f=qw(f,jw(h,m))))*n/r}t.beziercurveto(c,p,d,f,v,m),c=d,p=a}else t.lineto(v,m)}u=v,h=m,g+=o}return y}var ns=function(){this.smooth=0,this.smoothconstraint=!0},is=function(t){function e(e){var n=t.call(this,e)||this;return n.type="ec-polyline",n}return n(e,t),e.prototype.getdefaultstyle=function(){return{stroke:"#000",fill:null}},e.prototype.getdefaultshape=function(){return new ns},e.prototype.buildpath=function(t,e){var n=e.points,i=0,r=n.length/2;if(e.connectnulls){for(;r>0&&ts(n[2*r-2],n[2*r-1]);r--);for(;i=0){var y=a?(h-i)*g+i:(u-n)*g+n;return a?[t,y]:[y,t]}n=u,i=h;break;case o.c:u=r[l++],h=r[l++],c=r[l++],p=r[l++],d=r[l++],f=r[l++];var v=a?ue(n,u,c,d,t,s):ue(i,h,p,f,t,s);if(v>0)for(var m=0;m=0){y=a?he(i,h,p,f,x):he(n,u,c,d,x);return a?[t,y]:[y,t]}}n=d,i=f}}},e}(gs),rs=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e}(ns),os=function(t){function e(e){var n=t.call(this,e)||this;return n.type="ec-polygon",n}return n(e,t),e.prototype.getdefaultshape=function(){return new rs},e.prototype.buildpath=function(t,e){var n=e.points,i=e.stackedonpoints,r=0,o=n.length/2,a=e.smoothmonotone;if(e.connectnulls){for(;o>0&&ts(n[2*o-2],n[2*o-1]);o--);for(;r=0;a--){var s=t.getdimensioninfo(i[a].dimension);if("x"===(r=s&&s.coorddim)||"y"===r){o=i[a];break}}if(o){var l=e.getaxis(r),u=z(o.stops,(function(t){return{coord:l.toglobalcoord(l.datatocoord(t.value)),color:t.color}})),h=u.length,c=o.outercolors.slice();h&&u[0].coord>u[h-1].coord&&(u.reverse(),c.reverse());var p=function(t,e){var n,i,r=[],o=t.length;function a(t,e,n){var i=t.coord;return{coord:n,color:tn((n-i)/(e.coord-i),[t.color,e.color])}}for(var s=0;se){i?r.push(a(i,l,e)):n&&r.push(a(n,l,0),a(n,l,e));break}n&&(r.push(a(n,l,0)),n=null),r.push(l),i=l}}return r}(u,"x"===r?n.getwidth():n.getheight()),d=p.length;if(!d&&h)return u[0].coord<0?c[1]?c[1]:u[h-1].color:c[0]?c[0]:u[0].color;var f=p[0].coord-10,g=p[d-1].coord+10,y=g-f;if(y<.001)return"transparent";e(p,(function(t){t.offset=(t.coord-f)/y})),p.push({offset:d?p[d-1].offset:.5,color:c[1]||"transparent"}),p.unshift({offset:d?p[0].offset:.5,color:c[0]||"transparent"});var v=new xu(0,0,0,0,p,!0);return v[r]=f,v[r+"2"]=g,v}}}function ys(t,e,n){var i=t.get("showallsymbol"),r="auto"===i;if(!i||r){var o=n.getaxesbyscale("ordinal")[0];if(o&&(!r||!function(t,e){var n=t.getextent(),i=math.abs(n[1]-n[0])/t.scale.count();isnan(i)&&(i=0);for(var r=e.count(),o=math.max(1,math.round(r/5)),a=0;ai)return!1;return!0}(o,e))){var a=e.mapdimension(o.dim),s={};return e(o.getviewlabels(),(function(t){var e=o.scale.getrawordinalnumber(t.tickvalue);s[e]=1})),function(t){return!s.hasownproperty(e.get(a,t))}}}}function vs(t,e){return[t[2*e],t[2*e+1]]}function ms(t){if(t.get(["endlabel","show"]))return!0;for(var e=0;e0&&"bolder"===t.get(["emphasis","linestyle","width"]))&&(d.getstate("emphasis").style.linewidth=+d.style.linewidth+1);hs(d).seriesindex=t.seriesindex,rl(d,l,p,o);var r=ds(t.get("smooth")),n=t.get("smoothmonotone");if(d.setshape({smooth:r,smoothmonotone:n,connectnulls:w}),f){var e=a.getcalculationinfo("stackedonseries"),z=0;f.usestyle(k(l.getareastyle(),{fill:c,opacity:.7,linejoin:"bevel",decal:a.getvisual("style").decal})),e&&(z=ds(e.get("smooth"))),f.setshape({smooth:r,stackedonsmooth:z,smoothmonotone:n,connectnulls:w}),vl(f,t,"areastyle"),hs(f).seriesindex=t.seriesindex,rl(f,l,p,o)}var v=function(t){i._changepolystate(t)};a.eachitemgraphicel((function(t){t&&(t.onhoverstatechange=v)})),this._polyline.onhoverstatechange=v,this._data=a,this._coordsys=r,this._stackedonpoints=_,this._points=u,this._step=t,this._valueorigin=m,t.get("triggerlineevent")&&(this.packeventdata(t,d),f&&this.packeventdata(t,f))},e.prototype.packeventdata=function(t,e){hs(e).eventdata={componenttype:"series",componentsubtype:"line",componentindex:t.componentindex,seriesindex:t.seriesindex,seriesname:t.name,seriestype:"line"}},e.prototype.highlight=function(t,e,n,i){var r=t.getdata(),o=wo(r,i);if(this._changepolystate("emphasis"),!(o instanceof array)&&null!=o&&o>=0){var a=r.getlayout("points"),s=r.getitemgraphicel(o);if(!s){var l=a[2*o],u=a[2*o+1];if(isnan(l)||isnan(u))return;if(this._clipshapeforsymbol&&!this._clipshapeforsymbol.contain(l,u))return;var h=t.get("zlevel"),c=t.get("z");(s=new yw(r,o)).x=l,s.y=u,s.setz(h,c);var p=s.getsymbolpath().gettextcontent();p&&(p.zlevel=h,p.z=c,p.z2=this._polyline.z2+1),s.__temp=!0,r.setitemgraphicel(o,s),s.stopsymbolanimation(!0),this.group.add(s)}s.highlight()}else xg.prototype.highlight.call(this,t,e,n,i)},e.prototype.downplay=function(t,e,n,i){var r=t.getdata(),o=wo(r,i);if(this._changepolystate("normal"),null!=o&&o>=0){var a=r.getitemgraphicel(o);a&&(a.__temp?(r.setitemgraphicel(o,null),this.group.remove(a)):a.downplay())}else xg.prototype.downplay.call(this,t,e,n,i)},e.prototype._changepolystate=function(t){var e=this._polygon;gl(this._polyline,t),e&&gl(e,t)},e.prototype._newpolyline=function(t){var e=this._polyline;return e&&this._linegroup.remove(e),e=new is({shape:{points:t},segmentignorethreshold:2,z2:10}),this._linegroup.add(e),this._polyline=e,e},e.prototype._newpolygon=function(t,e){var n=this._polygon;return n&&this._linegroup.remove(n),n=new os({shape:{points:t,stackedonpoints:e},segmentignorethreshold:2}),this._linegroup.add(n),this._polygon=n,n},e.prototype._initsymbollabelanimation=function(t,e,n){var i,r,o=e.getbaseaxis(),a=o.inverse;"cartesian2d"===e.type?(i=o.ishorizontal(),r=!1):"polar"===e.type&&(i="angle"===o.dim,r=!0);var s=t.hostmodel,l=s.get("animationduration");u(l)&&(l=l(null));var u=s.get("animationdelay")||0,h=u(u)?u(null):u;t.eachitemgraphicel((function(t,o){var s=t;if(s){var c=[t.x,t.y],p=void 0,d=void 0,f=void 0;if(n)if(r){var g=n,y=e.pointtocoord(c);i?(p=g.startangle,d=g.endangle,f=-y[1]/180*math.pi):(p=g.r0,d=g.r,f=y[0])}else{var v=n;i?(p=v.x,d=v.x+v.width,f=t.x):(p=v.y+v.height,d=v.y,f=t.y)}var m=d===p?0:(f-p)/(d-p);a&&(m=1-m);var x=u(u)?u(o):l*m+h,_=s.getsymbolpath(),b=_.gettextcontent();s.attr({scalex:0,scaley:0}),s.animateto({scalex:1,scaley:1},{duration:200,settofinal:!0,delay:x}),b&&b.animatefrom({style:{opacity:0}},{duration:300,delay:x}),_.disablelabelanimation=!0}}))},e.prototype._initorupdateendlabel=function(t,e,n){var i=t.getmodel("endlabel");if(ms(t)){var r=t.getdata(),o=this._polyline,a=r.getlayout("points");if(!a)return o.removetextcontent(),void(this._endlabel=null);var s=this._endlabel;s||((s=this._endlabel=new ks({z2:200})).ignoreclip=!0,o.settextcontent(this._endlabel),o.disablelabelanimation=!0);var l=function(t){for(var e,n,i=t.length/2;i>0&&(e=t[2*i-2],n=t[2*i-1],isnan(e)||isnan(n));i--);return i-1}(a);l>=0&&(hh(o,yh(t,"endlabel"),{inheritcolor:n,labelfetcher:t,labeldataindex:l,defaulttext:function(t,e,n){return null!=n?hw(r,n):ww(r,t)},enabletextsetter:!0},function(t,e){var n=e.getbaseaxis(),i=n.ishorizontal(),r=n.inverse,o=i?r?"right":"left":"center",a=i?"middle":r?"top":"bottom";return{normal:{align:t.get("align")||o,verticalalign:t.get("verticalalign")||a}}}(i,e)),o.textconfig.position=null)}else this._endlabel&&(this._polyline.removetextcontent(),this._endlabel=null)},e.prototype._endlabelonduring=function(t,e,n,i,r,o,a){var s=this._endlabel,l=this._polyline;if(s){t<1&&null==i.originalx&&(i.originalx=s.x,i.originaly=s.y);var u=n.getlayout("points"),h=n.hostmodel,c=h.get("connectnulls"),p=o.get("precision"),d=o.get("distance")||0,f=a.getbaseaxis(),g=f.ishorizontal(),y=f.inverse,v=e.shape,m=y?g?v.x:v.y+v.height:g?v.x+v.width:v.y,x=(g?d:0)*(y?-1:1),_=(g?0:-d)*(y?-1:1),b=g?"x":"y",w=function(t,e,n){for(var i,r,o=t.length/2,a="x"===n?0:1,s=0,l=-1,u=0;u=e||i>=e&&r<=e){l=u;break}s=u,i=r}else i=r;return{range:[s,l],t:(e-i)/(r-i)}}(u,m,b),s=w.range,m=s[1]-s[0],i=void 0;if(m>=1){if(m>1&&!c){var t=vs(u,s[0]);s.attr({x:t[0]+x,y:t[1]+_}),r&&(i=h.getrawvalue(s[0]))}else{(t=l.getpointon(m,b))&&s.attr({x:t[0]+x,y:t[1]+_});var c=h.getrawvalue(s[0]),d=h.getrawvalue(s[1]);r&&(i=po(n,p,c,d,w.t))}i.lastframeindex=s[0]}else{var a=1===t||i.lastframeindex>0?s[0]:0;t=vs(u,a);r&&(i=h.getrawvalue(a)),s.attr({x:t[0]+x,y:t[1]+_})}r&&jh(s).setlabeltext(i)}},e.prototype._doupdateanimation=function(t,e,n,i,r,o,a){var s=this._polyline,l=this._polygon,u=t.hostmodel,h=function(t,e,n,i,r,o,a,s){for(var l=function(t,e){var n=[];return e.diff(t).add((function(t){n.push({cmd:"+",idx:t})})).update((function(t,e){n.push({cmd:"=",idx:e,idx1:t})})).remove((function(t){n.push({cmd:"-",idx:t})})).execute(),n}(t,e),u=[],h=[],c=[],p=[],d=[],f=[],g=[],y=kw(r,e,a),v=t.getlayout("points")||[],m=e.getlayout("points")||[],x=0;x3e3||l&&ps(p,f)>3e3)return s.stopanimation(),s.setshape({points:d}),void(l&&(l.stopanimation(),l.setshape({points:d,stackedonpoints:f})));s.shape.__points=h.current,s.shape.points=c;var g={shape:{points:d}};h.current!==c&&(g.shape.__points=h.next),s.stopanimation(),rh(s,g,u),l&&(l.setshape({points:c,stackedonpoints:p}),l.stopanimation(),rh(l,{shape:{stackedonpoints:f}},u),s.shape.points!==l.shape.points&&(l.shape.points=s.shape.points));for(var y=[],v=h.status,m=0;me&&(e=t[n]);return isfinite(e)?e:nan},min:function(t){for(var e=1/0,n=0;n10&&"cartesian2d"===o.type&&r){var s=o.getbaseaxis(),l=o.getotheraxis(s),u=s.getextent(),h=n.getdevicepixelratio(),c=math.abs(u[1]-u[0])*(h||1),p=math.round(a/c);if(isfinite(p)&&p>1){"lttb"===r&&t.setdata(i.lttbdownsample(i.mapdimension(l.dim),1/p));var d=void 0;x(r)?d=ws[r]:u(r)&&(d=r),d&&t.setdata(i.downsample(i.mapdimension(l.dim),1/p,d,ss))}}}}}var is=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.getinitialdata=function(t,e){return rx(null,this,{useencodedefaulter:!0})},e.prototype.getmarkerposition=function(t){var e=this.coordinatesystem;if(e&&e.clampdata){var n=e.datatopoint(e.clampdata(t)),i=this.getdata(),r=i.getlayout("offset"),o=i.getlayout("size");return n[e.getbaseaxis().ishorizontal()?0:1]+=r+o/2,n}return[nan,nan]},e.type="series.__base_bar__",e.defaultoption={z:2,coordinatesystem:"cartesian2d",legendhoverlink:!0,barminheight:0,barminangle:0,large:!1,largethreshold:400,progressive:3e3,progressivechunkmode:"mod"},e}(sg);sg.registerclass(is);var ts=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.getinitialdata=function(){return rx(null,this,{useencodedefaulter:!0,createinvertedindices:!!this.get("realtimesort",!0)||null})},e.prototype.getprogressive=function(){return!!this.get("large")&&this.get("progressive")},e.prototype.getprogressivethreshold=function(){var t=this.get("progressivethreshold"),e=this.get("largethreshold");return e>t&&(t=e),t},e.prototype.brushselector=function(t,e,n){return n.rect(e.getitemlayout(t))},e.type="series.bar",e.dependencies=["grid","polar"],e.defaultoption=yc(is.defaultoption,{clip:!0,roundcap:!1,showbackground:!1,backgroundstyle:{color:"rgba(180, 180, 180, 0.2)",bordercolor:null,borderwidth:0,bordertype:"solid",borderradius:0,shadowblur:0,shadowcolor:null,shadowoffsetx:0,shadowoffsety:0,opacity:1},select:{itemstyle:{bordercolor:"#212121"}},realtimesort:!1}),e}(is),cs=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startangle=0,this.endangle=2*math.pi,this.clockwise=!0},ds=function(t){function e(e){var n=t.call(this,e)||this;return n.type="sausage",n}return n(e,t),e.prototype.getdefaultshape=function(){return new cs},e.prototype.buildpath=function(t,e){var n=e.cx,i=e.cy,r=math.max(e.r0||0,0),o=math.max(e.r,0),a=.5*(o-r),s=r+a,l=e.startangle,u=e.endangle,h=e.clockwise,c=2*math.pi,p=h?u-lo)return!0;o=u}return!1},e.prototype._isorderdifferentinview=function(t,e){for(var n=e.scale,i=n.getextent(),r=math.max(0,i[0]),o=math.min(i[1],n.getordinalmeta().categories.length-1);r<=o;++r)if(t.ordinalnumbers[r]!==n.getrawordinalnumber(r))return!0},e.prototype._updatesortwithinsamedata=function(t,e,n,i){if(this._isorderchangedwithinsamedata(t,e,n)){var r=this._datasort(t,n,e);this._isorderdifferentinview(r,n)&&(this._removeonrenderedlistener(i),i.dispatchaction({type:"changeaxisorder",componenttype:n.dim+"axis",axisid:n.index,sortinfo:r}))}},e.prototype._dispatchinitsort=function(t,e,n){var i=e.baseaxis,r=this._datasort(t,i,(function(n){return t.get(t.mapdimension(e.otheraxis.dim),n)}));n.dispatchaction({type:"changeaxisorder",componenttype:i.dim+"axis",isinitsort:!0,axisid:i.index,sortinfo:r})},e.prototype.remove=function(t,e){this._clear(this._model),this._removeonrenderedlistener(e)},e.prototype.dispose=function(t,e){this._removeonrenderedlistener(e)},e.prototype._removeonrenderedlistener=function(t){this._onrendered&&(t.getzr().off("rendered",this._onrendered),this._onrendered=null)},e.prototype._clear=function(t){var e=this.group,n=this._data;t&&t.isanimationenabled()&&n&&!this._islargedraw?(this._removebackground(),this._backgroundels=[],n.eachitemgraphicel((function(e){uh(e,t,hs(e).dataindex)}))):e.removeall(),this._data=null,this._isfirstframe=!0},e.prototype._removebackground=function(){this.group.remove(this._backgroundgroup),this._backgroundgroup=null},e.type="bar",e}(xg),rs={cartesian2d:function(t,e){var n=e.width<0?-1:1,i=e.height<0?-1:1;n<0&&(e.x+=e.width,e.width=-e.width),i<0&&(e.y+=e.height,e.height=-e.height);var r=t.x+t.width,o=t.y+t.height,a=ls(e.x,t.x),s=ps(e.x+e.width,r),l=ls(e.y,t.y),u=ps(e.y+e.height,o),h=sr?s:a,e.y=c&&l>o?u:l,e.width=h?0:s-a,e.height=c?0:u-l,n<0&&(e.x+=e.width,e.width=-e.width),i<0&&(e.y+=e.height,e.height=-e.height),h||c},polar:function(t,e){var n=e.r0<=e.r?1:-1;if(n<0){var i=e.r;e.r=e.r0,e.r0=i}var r=ps(e.r,t.r),o=ls(e.r0,t.r0);e.r=r,e.r0=o;var a=r-o<0;if(n<0){i=e.r;e.r=e.r0,e.r0=i}return a}},ns={cartesian2d:function(t,e,n,i,r,o,a,s,l){var u=new cs({shape:a({},i),z2:1});(u.__dataindex=n,u.name="item",o)&&(u.shape[r?"height":"width"]=0);return u},polar:function(t,e,n,i,r,o,a,s,l){var u=!r&&l?ds:cu,h=new u({shape:i,z2:1});h.name="item";var c,p,d=ws(r);if(h.calculatetextposition=(c=d,p=({isroundcap:u===ds}||{}).isroundcap,function(t,e,n){var i=e.position;if(!i||i instanceof array)return yr(t,e,n);var r=c(i),o=null!=e.distance?e.distance:5,a=this.shape,s=a.cx,l=a.cy,u=a.r,h=a.r0,d=(u+h)/2,f=a.startangle,g=a.endangle,y=(f+g)/2,v=p?math.abs(u-h)/2:0,m=math.cos,x=math.sin,_=s+u*m(f),b=l+u*x(f),w="left",s="top";switch(r){case"startarc":_=s+(h-o)*m(y),b=l+(h-o)*x(y),w="center",s="top";break;case"insidestartarc":_=s+(h+o)*m(y),b=l+(h+o)*x(y),w="center",s="bottom";break;case"startangle":_=s+d*m(f)+as(f,o+v,!1),b=l+d*x(f)+ks(f,o+v,!1),w="right",s="middle";break;case"insidestartangle":_=s+d*m(f)+as(f,-o+v,!1),b=l+d*x(f)+ks(f,-o+v,!1),w="left",s="middle";break;case"middle":_=s+d*m(y),b=l+d*x(y),w="center",s="middle";break;case"endarc":_=s+(u+o)*m(y),b=l+(u+o)*x(y),w="center",s="bottom";break;case"insideendarc":_=s+(u-o)*m(y),b=l+(u-o)*x(y),w="center",s="top";break;case"endangle":_=s+d*m(g)+as(g,o+v,!0),b=l+d*x(g)+ks(g,o+v,!0),w="left",s="middle";break;case"insideendangle":_=s+d*m(g)+as(g,-o+v,!0),b=l+d*x(g)+ks(g,-o+v,!0),w="right",s="middle";break;default:return yr(t,e,n)}return(t=t||{}).x=_,t.y=b,t.align=w,t.verticalalign=s,t}),o){var f=r?"r":"endangle",g={};h.shape[f]=r?0:i.startangle,g[f]=i[f],(s?rh:oh)(h,{shape:g},o)}return h}};function es(t,e,n,i,r,o,a,s){var l,u;o?(u={x:i.x,width:i.width},l={y:i.y,height:i.height}):(u={y:i.y,height:i.height},l={x:i.x,width:i.width}),s||(a?rh:oh)(n,{shape:l},e,r,null),(a?rh:oh)(n,{shape:u},e?t.baseaxis.model:null,r)}function zs(t,e){for(var n=0;n0?1:-1,a=i.height>0?1:-1;return{x:i.x+o*r/2,y:i.y+a*r/2,width:i.width-o*r,height:i.height-a*r}},polar:function(t,e,n){var i=t.getitemlayout(e);return{cx:i.cx,cy:i.cy,r0:i.r0,r:i.r,startangle:i.startangle,endangle:i.endangle,clockwise:i.clockwise}}};function ws(t){return function(t){var e=t?"arc":"angle";return function(t){switch(t){case"start":case"insidestart":case"end":case"insideend":return t+e;default:return t}}}(t)}function hs(t,e,n,i,r,o,a,s){var l=e.getitemvisual(n,"style");s||t.setshape("r",i.get(["itemstyle","borderradius"])||0),t.usestyle(l);var u=i.getshallow("cursor");u&&t.attr("cursor",u);var h=s?a?r.r>=r.r0?"endarc":"startarc":r.endangle>=r.startangle?"endangle":"startangle":a?r.height>=0?"bottom":"top":r.width>=0?"right":"left",c=yh(i);hh(t,c,{labelfetcher:o,labeldataindex:n,defaulttext:ww(o.getdata(),n),inheritcolor:l.fill,defaultopacity:l.opacity,defaultoutsideposition:h});var p=t.gettextcontent();if(s&&p){var d=i.get(["label","position"]);t.textconfig.inside="middle"===d||null,function(t,e,n,i){if(j(i))t.settextconfig({rotation:i});else if(y(e))t.settextconfig({rotation:0});else{var r,o=t.shape,a=o.clockwise?o.startangle:o.endangle,s=o.clockwise?o.endangle:o.startangle,l=(a+s)/2,u=n(e);switch(u){case"startarc":case"insidestartarc":case"middle":case"insideendarc":case"endarc":r=l;break;case"startangle":case"insidestartangle":r=a;break;case"endangle":case"insideendangle":r=s;break;default:return void t.settextconfig({rotation:0})}var h=1.5*math.pi-r;"middle"===u&&h>math.pi/2&&h<1.5*math.pi&&(h-=math.pi),t.settextconfig({rotation:h})}}(t,"outside"===d?h:d,ws(a),i.get(["label","rotate"]))}qh(p,c,o.getrawvalue(n),(function(t){return hw(e,t)}));var f=i.getmodel(["emphasis"]);rl(t,f.get("focus"),f.get("blurscope"),f.get("disabled")),vl(t,i),function(t){return null!=t.startangle&&null!=t.endangle&&t.startangle===t.endangle}(r)&&(t.style.fill="none",t.style.stroke="none",e(t.states,(function(t){t.style&&(t.style.fill=t.style.stroke="none")})))}var ys=function(){},us=function(t){function e(e){var n=t.call(this,e)||this;return n.type="largebar",n}return n(e,t),e.prototype.getdefaultshape=function(){return new ys},e.prototype.buildpath=function(t,e){for(var n=e.points,i=this.basedimidx,r=1-this.basedimidx,o=[],a=[],s=this.barwidth,l=0;l=s[0]&&e<=s[0]+l[0]&&n>=s[1]&&n<=s[1]+l[1])return a[h]}return-1}(this,t.offsetx,t.offsety);hs(this).dataindex=e>=0?e:null}),30,!1);function js(t,e,n){if(us(n,"cartesian2d")){var i=e,r=n.getarea();return{x:t?i.x:r.x,y:t?r.y:i.y,width:t?i.width:r.width,height:t?r.height:i.height}}var o=e;return{cx:(r=n.getarea()).cx,cy:r.cy,r0:t?r.r0:o.r0,r:t?r.r:o.r,startangle:t?o.startangle:0,endangle:t?o.endangle:2*math.pi}}var qs=2*math.pi,ks=math.pi/180;function $s(t,e){return xp(t.getboxlayoutparams(),{width:e.getwidth(),height:e.getheight()})}function js(t,e){var n=$s(t,e),i=t.get("center"),r=t.get("radius");y(r)||(r=[0,r]),y(i)||(i=[i,i]);var o=er(n.width,e.getwidth()),a=er(n.height,e.getheight()),s=math.min(o,a);return{cx:er(i[0],o)+n.x,cy:er(i[1],a)+n.y,r0:er(r[0],s/2),r:er(r[1],s/2)}}function qs(t,e,n){e.eachseriesbytype(t,(function(t){var e=t.getdata(),i=e.mapdimension("value"),r=$s(t,n),o=js(t,n),a=o.cx,s=o.cy,l=o.r,u=o.r0,h=-t.get("startangle")*ks,c=t.get("minangle")*ks,p=0;e.each(i,(function(t){!isnan(t)&&p++}));var d=e.getsum(i),f=math.pi/(d||p)*2,g=t.get("clockwise"),y=t.get("rosetype"),v=t.get("stillshowzerosum"),m=e.getdataextent(i);m[0]=0;var x=qs,_=0,b=h,w=g?1:-1;if(e.setlayout({viewrect:r,r:l}),e.each(i,(function(t,n){var i;if(isnan(t))e.setitemlayout(n,{angle:nan,startangle:nan,endangle:nan,clockwise:g,cx:a,cy:s,r0:u,r:y?nan:l});else{(i="area"!==y?0===d&&v?f:t*f:qs/p)n?a:o,h=math.abs(l.label.y-n);if(h>=u.maxy){var c=l.label.x-e-l.len2*r,p=i+l.len,f=math.abs(c)t.unconstrainedwidth?null:d:null;i.setstyle("width",f)}var g=i.getboundingrect();o.width=g.width;var y=(i.style.margin||0)+2.1;o.height=g.height+y,o.y-=(o.height-c)/2}}}function rm(t){return"center"===t.position}function om(t){var e,n,i=t.getdata(),r=[],o=!1,a=(t.get("minshowlabelangle")||0)*em,s=i.getlayout("viewrect"),l=i.getlayout("r"),u=s.width,h=s.x,c=s.y,p=s.height;function d(t){t.ignore=!0}i.each((function(t){var s=i.getitemgraphicel(t),c=s.shape,p=s.gettextcontent(),f=s.gettextguideline(),g=i.getitemmodel(t),y=g.getmodel("label"),v=y.get("position")||g.get(["emphasis","label","position"]),m=y.get("distancetolabelline"),x=y.get("alignto"),_=er(y.get("edgedistance"),u),b=y.get("bleedmargin"),w=g.getmodel("labelline"),s=w.get("length");s=er(s,u);var m=w.get("length2");if(m=er(m,u),math.abs(c.endangle-c.startangle)0?"right":"left":k>0?"left":"right"}var b=math.pi,f=0,g=y.get("rotate");if(j(g))f=g*(b/180);else if("center"===v)f=0;else if("radial"===g||!0===g){f=k<0?-a+b:-a}else if("tangential"===g&&"outside"!==v&&"outer"!==v){var w=math.atan2(k,l);w<0&&(w=2*b+w),l>0&&(w=b+w),f=w-b}if(o=!!f,p.x=i,p.y=t,p.rotation=f,p.setstyle({verticalalign:"middle"}),p){p.setstyle({align:d});var h=p.states.select;h&&(h.x+=p.x,h.y+=p.y)}else{var y=p.getboundingrect().clone();y.applytransform(p.getcomputedtransform());var u=(p.style.margin||0)+2.1;y.y-=u/2,y.height+=u,r.push({label:p,labelline:f,position:v,len:s,len2:m,minturnangle:w.get("minturnangle"),maxsurfaceangle:w.get("maxsurfaceangle"),surfacenormal:new ji(k,l),linepoints:c,textalign:d,labeldistance:m,labelalignto:x,edgedistance:_,bleedmargin:b,rect:y,unconstrainedwidth:y.width,labelstylewidth:p.style.width})}s.settextconfig({inside:p})}})),!o&&t.get("avoidlabeloverlap")&&function(t,e,n,i,r,o,a,s){for(var l=[],u=[],h=number.max_value,c=-number.max_value,p=0;p0){for(var l=o.getitemlayout(0),u=1;isnan(l&&l.startangle)&&u=n.r0}},e.type="pie",e}(xg);function um(t,e,n){e=y(e)&&{coorddimensions:e}||a({encodedefine:t.getencode()},e);var i=t.getsource(),r=km(i,e).dimensions,o=new qm(r,t);return o.initdata(i,n),o}var hm=function(){function t(t,e){this._getdatawithencodedvisual=t,this._getrawdata=e}return t.prototype.getallnames=function(){var t=this._getrawdata();return t.maparray(t.getname)},t.prototype.containname=function(t){return this._getrawdata().indexofname(t)>=0},t.prototype.indexofname=function(t){return this._getdatawithencodedvisual().indexofname(t)},t.prototype.getitemvisual=function(t,e){return this._getdatawithencodedvisual().getitemvisual(t,e)},t}(),cm=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.init=function(e){t.prototype.init.apply(this,arguments),this.legendvisualprovider=new hm(w(this.getdata,this),w(this.getrawdata,this)),this._defaultlabelline(e)},e.prototype.mergeoption=function(){t.prototype.mergeoption.apply(this,arguments)},e.prototype.getinitialdata=function(){return um(this,{coorddimensions:["value"],encodedefaulter:h(yp,this)})},e.prototype.getdataparams=function(e){var n=this.getdata(),i=t.prototype.getdataparams.call(this,e),r=[];return n.each(n.mapdimension("value"),(function(t){r.push(t)})),i.percent=wr(r,e,n.hostmodel.get("percentprecision")),i.$vars.push("percent"),i},e.prototype._defaultlabelline=function(t){co(t,"labelline",["show"]);var e=t.labelline,n=t.emphasis.labelline;e.show=e.show&&t.label.show,n.show=n.show&&t.emphasis.label.show},e.type="series.pie",e.defaultoption={z:2,legendhoverlink:!0,colorby:"data",center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startangle:90,minangle:0,minshowlabelangle:0,selectedoffset:10,percentprecision:2,stillshowzerosum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignto:"none",edgedistance:"25%",bleedmargin:10,distancetolabelline:5},labelline:{show:!0,length:15,length2:15,smooth:!1,minturnangle:90,maxsurfaceangle:90,linestyle:{width:1,type:"solid"}},itemstyle:{borderwidth:1,borderjoin:"round"},showemptycircle:!0,emptycirclestyle:{color:"lightgray",opacity:1},labellayout:{hideoverlap:!0},emphasis:{scale:!0,scalesize:5},avoidlabeloverlap:!0,animationtype:"expansion",animationduration:1e3,animationtypeupdate:"transition",animationeasingupdate:"cubicinout",animationdurationupdate:500,animationeasing:"cubicinout"},e}(sg);var pm=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.hassymbolvisual=!0,n}return n(e,t),e.prototype.getinitialdata=function(t,e){return rx(null,this,{useencodedefaulter:!0})},e.prototype.getprogressive=function(){var t=this.option.progressive;return null==t?this.option.large?5e3:this.get("progressive"):t},e.prototype.getprogressivethreshold=function(){var t=this.option.progressivethreshold;return null==t?this.option.large?1e4:this.get("progressivethreshold"):t},e.prototype.brushselector=function(t,e,n){return n.point(e.getitemlayout(t))},e.prototype.getzlevelkey=function(){return this.getdata().count()>this.getprogressivethreshold()?this.id:""},e.type="series.scatter",e.dependencies=["grid","polar","geo","singleaxis","calendar"],e.defaultoption={coordinatesystem:"cartesian2d",z:2,legendhoverlink:!0,symbolsize:10,large:!1,largethreshold:2e3,itemstyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemstyle:{bordercolor:"#212121"}},universaltransition:{divideshape:"clone"}},e}(sg),dm=function(){},fm=function(t){function e(e){var n=t.call(this,e)||this;return n._off=0,n.hoverdataidx=-1,n}return n(e,t),e.prototype.getdefaultshape=function(){return new dm},e.prototype.reset=function(){this.notclear=!1,this._off=0},e.prototype.buildpath=function(t,e){var n,i=e.points,r=e.size,o=this.symbolproxy,a=o.shape,s=t.getcontext?t.getcontext():t,l=s&&r[0]<4,u=this.softclipshape;if(l)this._ctx=s;else{for(this._ctx=null,n=this._off;n=0;s--){var l=2*s,u=i[l]-o/2,h=i[l+1]-a/2;if(t>=u&&e>=h&&t<=u+o&&e<=h+a)return s}return-1},e.prototype.contain=function(t,e){var n=this.transformcoordtolocal(t,e),i=this.getboundingrect();return t=n[0],e=n[1],i.contain(t,e)?(this.hoverdataidx=this.finddataindex(t,e))>=0:(this.hoverdataidx=-1,!1)},e.prototype.getboundingrect=function(){var t=this._rect;if(!t){for(var e=this.shape,n=e.points,i=e.size,r=i[0],o=i[1],a=1/0,s=1/0,l=-1/0,u=-1/0,h=0;h=0&&(l.dataindex=n+(t.startindex||0))}))},t.prototype.remove=function(){this._clear()},t.prototype._clear=function(){this._newadded=[],this.group.removeall()},t}(),ym=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.render=function(t,e,n){var i=t.getdata();this._updatesymboldraw(i,t).updatedata(i,{clipshape:this._getclipshape(t)}),this._finished=!0},e.prototype.incrementalpreparerender=function(t,e,n){var i=t.getdata();this._updatesymboldraw(i,t).incrementalprepareupdate(i),this._finished=!1},e.prototype.incrementalrender=function(t,e,n){this._symboldraw.incrementalupdate(t,e.getdata(),{clipshape:this._getclipshape(e)}),this._finished=t.end===e.getdata().count()},e.prototype.updatetransform=function(t,e,n){var i=t.getdata();if(this.group.dirty(),!this._finished||i.count()>1e4)return{update:!0};var r=bs("").reset(t,e,n);r.progress&&r.progress({start:0,end:i.count(),count:i.count()},i),this._symboldraw.updatelayout(i)},e.prototype.eachrendered=function(t){this._symboldraw&&this._symboldraw.eachrendered(t)},e.prototype._getclipshape=function(t){var e=t.coordinatesystem,n=e&&e.getarea&&e.getarea();return t.get("clip",!0)?n:null},e.prototype._updatesymboldraw=function(t,e){var n=this._symboldraw,i=e.pipelinecontext.large;return n&&i===this._islargedraw||(n&&n.remove(),n=this._symboldraw=i?new gm:new qw,this._islargedraw=i,this.group.removeall()),this.group.add(n.group),n},e.prototype.remove=function(t,e){this._symboldraw&&this._symboldraw.remove(!0),this._symboldraw=null},e.prototype.dispose=function(){},e.type="scatter",e}(xg),vm=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.type="grid",e.dependencies=["xaxis","yaxis"],e.layoutmode="box",e.defaultoption={show:!1,z:0,left:"10%",top:60,right:"10%",bottom:70,containlabel:!1,backgroundcolor:"rgba(0,0,0,0)",borderwidth:1,bordercolor:"#ccc"},e}(tp),mm=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.getcoordsysmodel=function(){return this.getreferringcomponents("grid",co).models[0]},e.type="cartesian2daxis",e}(tp);r(mm,p_);var xm={show:!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:"#6e7079",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:["#e0e6f1"],width:1,type:"solid"}},splitarea:{show:!1,areastyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},_m=c({boundarygap:!0,deduplication:null,splitline:{show:!1},axistick:{alignwithlabel:!1,interval:"auto"},axislabel:{interval:"auto"}},xm),bm=c({boundarygap:[0,0],axisline:{show:"auto"},axistick:{show:"auto"},splitnumber:5,minortick:{show:!1,splitnumber:5,length:3,linestyle:{}},minorsplitline:{show:!1,linestyle:{color:"#f4f7fd",width:1}}},xm),wm={category:_m,value:bm,time:c({splitnumber:6,axislabel:{showminlabel:!1,showmaxlabel:!1,rich:{primary:{fontweight:"bold"}}},splitline:{show:!1}},bm),log:k({logbase:10},bm)},sm={value:1,category:1,time:1,log:1};function mm(t,e,i,r){e(sm,(function(o,a){var s=c(c({},wm[a],!0),r,!0),l=function(t){function i(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e+"axis."+a,n}return n(i,t),i.prototype.mergedefaultandtheme=function(t,e){var n=bp(this),i=n?sp(t):{};c(t,e.gettheme().get(a+"axis")),c(t,this.getdefaultoption()),t.type=im(t),n&&wp(t,i,n)},i.prototype.optionupdated=function(){"category"===this.option.type&&(this.__ordinalmeta=sx.createbyaxismodel(this))},i.prototype.getcategories=function(t){var e=this.option;if("category"===e.type)return t?e.data:this.__ordinalmeta.categories},i.prototype.getordinalmeta=function(){return this.__ordinalmeta},i.type=e+"axis."+a,i.defaultoption=s,i}(i);t.registercomponentmodel(l)})),t.registersubtypedefaulter(e+"axis",im)}function im(t){return t.type||(t.data?"category":"value")}var tm=function(){function t(t){this.type="cartesian",this._dimlist=[],this._axes={},this.name=t||""}return t.prototype.getaxis=function(t){return this._axes[t]},t.prototype.getaxes=function(){return z(this._dimlist,(function(t){return this._axes[t]}),this)},t.prototype.getaxesbyscale=function(t){return t=t.tolowercase(),b(this.getaxes(),(function(e){return e.scale.type===t}))},t.prototype.addaxis=function(t){var e=t.dim;this._axes[e]=t,this._dimlist.push(e)},t}(),cm=["x","y"];function dm(t){return"interval"===t.type||"time"===t.type}var am=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="cartesian2d",e.dimensions=cm,e}return n(e,t),e.prototype.calcaffinetransform=function(){this._transform=this._invtransform=null;var t=this.getaxis("x").scale,e=this.getaxis("y").scale;if(dm(t)&&dm(e)){var n=t.getextent(),i=e.getextent(),r=this.datatopoint([n[0],i[0]]),o=this.datatopoint([n[1],i[1]]),a=n[1]-n[0],s=i[1]-i[0];if(a&&s){var l=(o[0]-r[0])/a,u=(o[1]-r[1])/s,h=r[0]-n[0]*l,c=r[1]-i[0]*u,p=this._transform=[l,0,0,u,h,c];this._invtransform=bi([],p)}}},e.prototype.getbaseaxis=function(){return this.getaxesbyscale("ordinal")[0]||this.getaxesbyscale("time")[0]||this.getaxis("x")},e.prototype.containpoint=function(t){var e=this.getaxis("x"),n=this.getaxis("y");return e.contain(e.tolocalcoord(t[0]))&&n.contain(n.tolocalcoord(t[1]))},e.prototype.containdata=function(t){return this.getaxis("x").containdata(t[0])&&this.getaxis("y").containdata(t[1])},e.prototype.containzone=function(t,e){var n=this.datatopoint(t),i=this.datatopoint(e),r=this.getarea(),o=new sr(n[0],n[1],i[0]-n[0],i[1]-n[1]);return r.intersect(o)},e.prototype.datatopoint=function(t,e,n){n=n||[];var i=t[0],r=t[1];if(this._transform&&null!=i&&isfinite(i)&&null!=r&&isfinite(r))return ft(n,t,this._transform);var o=this.getaxis("x"),a=this.getaxis("y");return n[0]=o.toglobalcoord(o.datatocoord(i,e)),n[1]=a.toglobalcoord(a.datatocoord(r,e)),n},e.prototype.clampdata=function(t,e){var n=this.getaxis("x").scale,i=this.getaxis("y").scale,r=n.getextent(),o=i.getextent(),a=n.parse(t[0]),s=i.parse(t[1]);return(e=e||[])[0]=math.min(math.max(math.min(r[0],r[1]),a),math.max(r[0],r[1])),e[1]=math.min(math.max(math.min(o[0],o[1]),s),math.max(o[0],o[1])),e},e.prototype.pointtodata=function(t,e){var n=[];if(this._invtransform)return ft(n,t,this._invtransform);var i=this.getaxis("x"),r=this.getaxis("y");return n[0]=i.coordtodata(i.tolocalcoord(t[0]),e),n[1]=r.coordtodata(r.tolocalcoord(t[1]),e),n},e.prototype.getotheraxis=function(t){return this.getaxis("x"===t.dim?"y":"x")},e.prototype.getarea=function(){var t=this.getaxis("x").getglobalextent(),e=this.getaxis("y").getglobalextent(),n=math.min(t[0],t[1]),i=math.min(e[0],e[1]),r=math.max(t[0],t[1])-n,o=math.max(e[0],e[1])-i;return new sr(n,i,r,o)},e}(tm),km=function(t){function e(e,n,i,r,o){var a=t.call(this,e,n,i)||this;return a.index=0,a.type=r||"value",a.position=o||"bottom",a}return n(e,t),e.prototype.ishorizontal=function(){var t=this.position;return"top"===t||"bottom"===t},e.prototype.getglobalextent=function(t){var e=this.getextent();return e[0]=this.toglobalcoord(e[0]),e[1]=this.toglobalcoord(e[1]),t&&e[0]>e[1]&&e.reverse(),e},e.prototype.pointtodata=function(t,e){return this.coordtodata(this.tolocalcoord(t["x"===this.dim?0:1]),e)},e.prototype.setcategorysortinfo=function(t){if("category"!==this.type)return!1;this.model.option.categorysortinfo=t,this.scale.setsortinfo(t)},e}(h_);function lm(t,e,n){n=n||{};var i=t.coordinatesystem,r=e.axis,o={},a=r.getaxesonzeroof()[0],s=r.position,l=a?"onzero":s,u=r.dim,h=i.getrect(),c=[h.x,h.x+h.width,h.y,h.y+h.height],p={left:0,right:1,top:0,bottom:1,onzero:2},d=e.get("offset")||0,f="x"===u?[c[2]-d,c[3]+d]:[c[0]-d,c[1]+d];if(a){var g=a.toglobalcoord(a.datatocoord(0));f[p.onzero]=math.max(math.min(g,f[1]),f[0])}o.position=["y"===u?f[p[l]]:c[0],"x"===u?f[p[l]]:c[3]],o.rotation=math.pi/2*("x"===u?0:1);o.labeldirection=o.tickdirection=o.namedirection={top:-1,bottom:1,left:-1,right:1}[s],o.labeloffset=a?f[p[s]]-f[p.onzero]:0,e.get(["axistick","inside"])&&(o.tickdirection=-o.tickdirection),it(n.labelinside,e.get(["axislabel","inside"]))&&(o.labeldirection=-o.labeldirection);var y=e.get(["axislabel","rotate"]);return o.labelrotate="top"===l?-y:y,o.z2=1,o}function pm(t){return"cartesian2d"===t.get("coordinatesystem")}function om(t){var e={xaxismodel:null,yaxismodel:null};return e(e,(function(n,i){var r=i.replace(/model$/,""),o=t.getreferringcomponents(r,co).models[0];e[i]=o})),e}var rm=math.log;function nm(t,e,n){var i=xx.prototype,r=i.getticks.call(n),o=i.getticks.call(n,!0),a=r.length-1,s=i.getinterval.call(n),l=i_(t,e),u=l.extent,h=l.fixmin,c=l.fixmax;if("log"===t.type){var p=rm(t.base);u=[rm(u[0])/p,rm(u[1])/p]}t.setextent(u[0],u[1]),t.calcniceextent({splitnumber:a,fixmin:h,fixmax:c});var d=i.getextent.call(t);h&&(u[0]=d[0]),c&&(u[1]=d[1]);var f=i.getinterval.call(t),g=u[0],y=u[1];if(h&&c)f=(y-g)/a;else if(h)for(y=u[0]+f*a;yu[0]&&isfinite(g)&&isfinite(u[0]);)f=cx(f),g=u[1]-f*a;else{t.getticks().length-1>a&&(f=cx(f));var v=f*a;(g=zr((y=math.ceil(u[1]/f)*f)-v))<0&&u[0]>=0?(g=0,y=zr(v)):y>0&&u[1]<=0&&(y=0,g=-zr(v))}var m=(r[0].value-o[0].value)/s,x=(r[a].value-o[a].value)/s;i.setextent.call(t,g+f*m,y+f*x),i.setinterval.call(t,f),(m||x)&&i.setniceextent.call(t,g+f,y-f)}var em=function(){function t(t,e,n){this.type="grid",this._coordsmap={},this._coordslist=[],this._axesmap={},this._axeslist=[],this.axispointerenabled=!0,this.dimensions=cm,this._initcartesian(t,e,n),this.model=t}return t.prototype.getrect=function(){return this._rect},t.prototype.update=function(t,e){var n=this._axesmap;function i(t){var e,n=g(t),i=n.length;if(i){for(var r=[],o=i-1;o>=0;o--){var a=t[+n[o]],s=a.model,l=a.scale;ux(l)&&s.get("alignticks")&&null==s.get("interval")?r.push(a):(r_(l,s),ux(l)&&(e=a))}r.length&&(e||r_((e=r.pop()).scale,e.model),e(r,(function(t){nm(t.scale,t.model,e.scale)})))}}this._updatescale(t,this.model),i(n.x),i(n.y);var r={};e(n.x,(function(t){vm(n,"y",t,r)})),e(n.y,(function(t){vm(n,"x",t,r)})),this.resize(this.model,e)},t.prototype.resize=function(t,e,n){var i=t.getboxlayoutparams(),r=!n&&t.get("containlabel"),o=xp(i,{width:e.getwidth(),height:e.getheight()});this._rect=o;var a=this._axeslist;function s(){e(a,(function(t){var e=t.ishorizontal(),n=e?[0,o.width]:[0,o.height],i=t.inverse?1:0;t.setextent(n[i],n[1-i]),function(t,e){var n=t.getextent(),i=n[0]+n[1];t.toglobalcoord="x"===t.dim?function(t){return t+e}:function(t){return i-t+e},t.tolocalcoord="x"===t.dim?function(t){return t-e}:function(t){return i-t+e}}(t,e?o.x:o.y)}))}s(),r&&(e(a,(function(t){if(!t.model.get(["axislabel","inside"])){var e=function(t){var e=t.model,n=t.scale;if(e.get(["axislabel","show"])&&!n.isblank()){var i,r,o=n.getextent();r=n instanceof vx?n.count():(i=n.getticks()).length;var a,s=t.getlabelmodel(),l=a_(t),u=1;r>40&&(u=math.ceil(r/40));for(var h=0;h0&&i>0||n<0&&i<0)}(t)}var fm=math.pi,gm=function(){function t(t,e){this.group=new cr,this.opt=e,this.axismodel=t,k(e,{labeloffset:0,namedirection:1,tickdirection:1,labeldirection:1,silent:!0,handleautoshown:function(){return!0}});var n=new cr({x:e.position[0],y:e.position[1],rotation:e.rotation});n.updatetransform(),this._transformgroup=n}return t.prototype.hasbuilder=function(t){return!!wm[t]},t.prototype.add=function(t){wm[t](this.opt,this.axismodel,this.group,this._transformgroup)},t.prototype.getgroup=function(){return this.group},t.innertextlayout=function(t,e,n){var i,r,o=ur(e-t);return xr(o)?(r=n>0?"top":"bottom",i="center"):xr(o-fm)?(r=n>0?"bottom":"top",i="center"):(r="middle",i=o>0&&o0?"right":"left":n>0?"left":"right"),{rotation:o,textalign:i,textverticalalign:r}},t.makeaxiseventdatabase=function(t){var e={componenttype:t.maintype,componentindex:t.componentindex};return e[t.maintype+"index"]=t.componentindex,e},t.islabelsilent=function(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerevent")||e&&e.show)},t}(),wm={axisline:function(t,e,n,i){var r=e.get(["axisline","show"]);if("auto"===r&&t.handleautoshown&&(r=t.handleautoshown("axisline")),r){var o=e.axis.getextent(),a=i.transform,s=[o[0],0],l=[o[1],0];a&&(ft(s,s,a),ft(l,l,a));var u=a({linecap:"round"},e.getmodel(["axisline","linestyle"]).getlinestyle()),h=new zu({subpixeloptimize:!0,shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:u,strokecontainthreshold:t.strokecontainthreshold||5,silent:!0,z2:1});h.anid="line",n.add(h);var c=e.get(["axisline","symbol"]);if(null!=c){var p=e.get(["axisline","symbolsize"]);x(c)&&(c=[c,c]),(x(p)||j(p))&&(p=[p,p]);var d=oy(e.get(["axisline","symboloffset"])||0,p),f=p[0],g=p[1];e([{rotate:t.rotation+math.pi/2,offset:d[0],r:0},{rotate:t.rotation-math.pi/2,offset:d[1],r:math.sqrt((s[0]-l[0])*(s[0]-l[0])+(s[1]-l[1])*(s[1]-l[1]))}],(function(e,i){if("none"!==c[i]&&null!=c[i]){var r=ly(c[i],-f/2,-g/2,f,g,u.stroke,!0),o=e.r+e.offset;r.attr({rotation:e.rotate,x:s[0]+o*math.cos(t.rotation),y:s[1]-o*math.sin(t.rotation),silent:!0,z2:11}),n.add(r)}}))}}},axisticklabel:function(t,e,n,i){var r=function(t,e,n,i){var r=n.axis,o=n.getmodel("axistick"),a=o.get("show");"auto"===a&&i.handleautoshown&&(a=i.handleautoshown("axistick"));if(!a||r.scale.isblank())return;for(var s=o.getmodel("linestyle"),l=i.tickdirection*o.get("length"),u=xm(r.gettickscoords(),e.transform,l,k(s.getlinestyle(),{stroke:n.get(["axisline","linestyle","color"])}),"ticks"),h=0;hc[1]?-1:1,d=["start"===s?c[0]-p*h:"end"===s?c[1]+p*h:(c[0]+c[1])/2,um(s)?t.labeloffset+l*h:0],f=e.get("namerotate");null!=f&&(f=f*fm/180),um(s)?o=gm.innertextlayout(t.rotation,null!=f?f:t.rotation,l):(o=function(t,e,n,i){var r,o,a=ur(n-t),s=i[0]>i[1],l="start"===e&&!s||"start"!==e&&s;xr(a-fm/2)?(o=l?"bottom":"top",r="center"):xr(a-1.5*fm)?(o=l?"top":"bottom",r="center"):(o="middle",r=a<1.5*fm&&a>fm/2?l?"left":"right":l?"right":"left");return{rotation:a,textalign:r,textverticalalign:o}}(t.rotation,s,f||0,c),null!=(a=t.axisnameavailablewidth)&&(a=math.abs(a/math.sin(o.rotation)),!isfinite(a)&&(a=null)));var g=u.getfont(),y=e.get("nametruncate",!0)||{},v=y.ellipsis,m=it(t.nametruncatemaxwidth,y.maxwidth,a),x=new ks({x:d[0],y:d[1],rotation:o.rotation,silent:gm.islabelsilent(e),style:uh(u,{text:r,font:g,overflow:"truncate",width:m,ellipsis:v,fill:u.gettextcolor()||e.get(["axisline","linestyle","color"]),align:u.get("align")||o.textalign,verticalalign:u.get("verticalalign")||o.textverticalalign}),z2:1});if(eh({el:x,componentmodel:e,itemname:r}),x.__fulltext=r,x.anid="name",e.get("triggerevent")){var _=gm.makeaxiseventdatabase(e);_.targettype="axisname",_.name=r,hs(x).eventdata=_}i.add(x),x.updatetransform(),n.add(x),x.decomposetransform()}}};function hm(t){t&&(t.ignore=!0)}function ym(t,e){var n=t&&t.getboundingrect().clone(),i=e&&e.getboundingrect().clone();if(n&&i){var r=oi([]);return zi(r,r,-t.rotation),n.applytransform(ni([],r,t.getlocaltransform())),i.applytransform(ni([],r,e.getlocaltransform())),n.intersect(i)}}function um(t){return"middle"===t||"center"===t}function xm(t,e,n,i,r){for(var o=[],a=[],s=[],l=0;l=0||t===e}function qm(t){var e=km(t);if(e){var n=e.axispointermodel,i=e.axis.scale,r=n.option,o=n.get("status"),a=n.get("value");null!=a&&(a=i.parse(a));var s=$m(n);null==o&&(r.status=s?"show":"hide");var l=i.getextent().slice();l[0]>l[1]&&l.reverse(),(null==a||a>l[1])&&(a=l[1]),a0&&!c.min?c.min=0:null!=c.min&&c.min<0&&!c.max&&(c.max=0);var p=a;null!=c.color&&(p=k({color:c.color},a));var d=c(t(c),{boundarygap:t,splitnumber:e,scale:n,axisline:i,axistick:r,axislabel:o,name:c.text,showname:s,namelocation:"end",namegap:u,nametextstyle:p,triggerevent:h},!1);if(x(l)){var f=d.name;d.name=l.replace("{value}",null!=f?f:"")}else u(l)&&(d.name=l(d.name,d));var g=new dc(d,null,this.ecmodel);return r(g,p_.prototype),g.maintype="radar",g.componentindex=this.componentindex,g}),this);this._indicatormodels=c},e.prototype.getindicatormodels=function(){return this._indicatormodels},e.type="radar",e.defaultoption={z:0,center:["50%","50%"],radius:"75%",startangle:90,axisname:{show:!0},boundarygap:[0,0],splitnumber:5,axisnamegap:15,scale:!1,shape:"polygon",axisline:c({linestyle:{color:"#bbb"}},xi.axisline),axislabel:_i(xi.axislabel,!1),axistick:_i(xi.axistick,!1),splitline:_i(xi.splitline,!0),splitarea:_i(xi.splitarea,!0),indicator:[]},e}(tp),wi=["axisline","axisticklabel","axisname"],si=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.render=function(t,e,n){this.group.removeall(),this._buildaxes(t),this._buildsplitlineandarea(t)},e.prototype._buildaxes=function(t){var e=t.coordinatesystem;e(z(e.getindicatoraxes(),(function(t){var n=t.model.get("showname")?t.name:"";return new gm(t.model,{axisname:n,position:[e.cx,e.cy],rotation:t.angle,labeldirection:-1,tickdirection:-1,namedirection:1})})),(function(t){e(wi,t.add,t),this.group.add(t.getgroup())}),this)},e.prototype._buildsplitlineandarea=function(t){var e=t.coordinatesystem,n=e.getindicatoraxes();if(n.length){var i=t.get("shape"),r=t.getmodel("splitline"),o=t.getmodel("splitarea"),a=r.getmodel("linestyle"),s=o.getmodel("areastyle"),l=r.get("show"),u=o.get("show"),h=a.get("color"),c=s.get("color"),p=y(h)?h:[h],d=y(c)?c:[c],f=[],g=[];if("circle"===i)for(var y=n[0].gettickscoords(),v=e.cx,m=e.cy,x=0;x3?1.4:r>1?1.2:1.1;li(this,"zoom","zoomonmousewheel",t,{scale:i>0?s:1/s,originx:o,originy:a,isavailablebehavior:null})}if(n){var l=math.abs(i);li(this,"scrollmove","moveonmousewheel",t,{scrolldelta:(i>0?1:-1)*(l>3?.4:l>1?.15:.05),originx:o,originy:a,isavailablebehavior:null})}}},e.prototype._pinchhandler=function(t){di(this._zr,"globalpan")||li(this,"zoom",null,t,{scale:t.pinchscale>1?1.1:1/1.1,originx:t.pinchx,originy:t.pinchy,isavailablebehavior:null})},e}(xt);function li(t,e,n,i,r){t.pointerchecker&&t.pointerchecker(i,r.originx,r.originy)&&(se(i.event),pi(t,e,n,i,r))}function pi(t,e,n,i,r){r.isavailablebehavior=w(oi,null,n,i),t.trigger(e,r)}function oi(t,e,n){var i=n[t];return!t||i&&(!x(i)||e.event[i+"key"])}function ri(t,e,n){var i=t.target;i.x+=e,i.y+=n,i.dirty()}function ni(t,e,n,i){var r=t.target,o=t.zoomlimit,a=t.zoom=t.zoom||1;if(a*=e,o){var s=o.min||0,l=o.max||1/0;a=math.max(math.min(l,a),s)}var u=a/t.zoom;t.zoom=a,r.x-=(n-r.x)*(u-1),r.y-=(i-r.y)*(u-1),r.scalex*=u,r.scaley*=u,r.dirty()}var ei,zi={axispointer:1,tooltip:1,brush:1};function vi(t,e,n){var i=e.getcomponentbyelement(t.toptarget),r=i&&i.coordinatesystem;return i&&i!==n&&!zi.hasownproperty(i.maintype)&&r&&r.model!==n}function bi(t){x(t)&&(t=(new domparser).parsefromstring(t,"text/xml"));var e=t;for(9===e.nodetype&&(e=e.firstchild);"svg"!==e.nodename.tolowercase()||1!==e.nodetype;)e=e.nextsibling;return e}var fi={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-anchor":"textalign",visibility:"visibility",display:"display"},gi=g(fi),wi={"alignment-baseline":"textbaseline","stop-color":"stopcolor"},hi=g(wi),yi=function(){function t(){this._defs={},this._root=null}return t.prototype.parse=function(t,e){e=e||{};var n=bi(t);this._defsusepending=[];var i=new cr;this._root=i;var r=[],o=n.getattribute("viewbox")||"",a=parsefloat(n.getattribute("width")||e.width),s=parsefloat(n.getattribute("height")||e.height);isnan(a)&&(a=null),isnan(s)&&(s=null),ki(n,i,null,!0,!1);for(var l,u,h=n.firstchild;h;)this._parsenode(h,i,r,null,!1,!1),h=h.nextsibling;if(function(t,e){for(var n=0;n=4&&(l={x:parsefloat(c[0]||0),y:parsefloat(c[1]||0),width:parsefloat(c[2]),height:parsefloat(c[3])})}if(l&&null!=a&&null!=s&&(u=ot(l,{x:0,y:0,width:a,height:s}),!e.ignoreviewbox)){var p=i;(i=new cr).add(p),p.scalex=p.scaley=u.scale,p.x=u.x,p.y=u.y}return e.ignorerootclip||null==a||null==s||i.setclippath(new cs({shape:{x:0,y:0,width:a,height:s}})),{root:i,width:a,height:s,viewboxrect:l,viewboxtransform:u,named:r}},t.prototype._parsenode=function(t,e,n,i,r,o){var a,s=t.nodename.tolowercase(),l=i;if("defs"===s&&(r=!0),"text"===s&&(o=!0),"defs"===s||"switch"===s)a=e;else{if(!r){var u=ei[s];if(u&&mt(ei,s)){a=u.call(this,t,e);var h=t.getattribute("name");if(h){var c={name:h,namedfrom:null,svgnodetaglower:s,el:a};n.push(c),"g"===s&&(l=c)}else i&&n.push({name:i.name,namedfrom:i,svgnodetaglower:s,el:a});e.add(a)}}var p=ui[s];if(p&&mt(ui,s)){var d=p.call(this,t),f=t.getattribute("id");f&&(this._defs[f]=d)}}if(a&&a.isgroup)for(var g=t.firstchild;g;)1===g.nodetype?this._parsenode(g,a,n,l,r,o):3===g.nodetype&&o&&this._parsetext(g,a),g=g.nextsibling},t.prototype._parsetext=function(t,e){var n=new vs({style:{text:t.textcontent},silent:!0,x:this._textx||0,y:this._texty||0});ji(e,n),ki(t,n,this._defsusepending,!1,!1),function(t,e){var n=e.__selfstyle;if(n){var i=n.textbaseline,r=i;i&&"auto"!==i?"baseline"===i?r="alphabetic":"before-edge"===i||"text-before-edge"===i?r="top":"after-edge"===i||"text-after-edge"===i?r="bottom":"central"!==i&&"mathematical"!==i||(r="middle"):r="alphabetic",t.style.textbaseline=r}var o=e.__inheritedstyle;if(o){var a=o.textalign,s=a;a&&("middle"===a&&(s="center"),t.style.textalign=s)}}(n,e);var i=n.style,r=i.fontsize;r&&r<9&&(i.fontsize=9,n.scalex*=r/9,n.scaley*=r/9);var o=(i.fontsize||i.fontfamily)&&[i.fontstyle,i.fontweight,(i.fontsize||12)+"px",i.fontfamily||"sans-serif"].join(" ");i.font=o;var a=n.getboundingrect();return this._textx+=a.width,e.add(n),n},t.internalfield=void(ei={g:function(t,e){var n=new cr;return ji(e,n),ki(t,n,this._defsusepending,!1,!1),n},rect:function(t,e){var n=new cs;return ji(e,n),ki(t,n,this._defsusepending,!1,!1),n.setshape({x:parsefloat(t.getattribute("x")||"0"),y:parsefloat(t.getattribute("y")||"0"),width:parsefloat(t.getattribute("width")||"0"),height:parsefloat(t.getattribute("height")||"0")}),n.silent=!0,n},circle:function(t,e){var n=new hu;return ji(e,n),ki(t,n,this._defsusepending,!1,!1),n.setshape({cx:parsefloat(t.getattribute("cx")||"0"),cy:parsefloat(t.getattribute("cy")||"0"),r:parsefloat(t.getattribute("r")||"0")}),n.silent=!0,n},line:function(t,e){var n=new zu;return ji(e,n),ki(t,n,this._defsusepending,!1,!1),n.setshape({x1:parsefloat(t.getattribute("x1")||"0"),y1:parsefloat(t.getattribute("y1")||"0"),x2:parsefloat(t.getattribute("x2")||"0"),y2:parsefloat(t.getattribute("y2")||"0")}),n.silent=!0,n},ellipse:function(t,e){var n=new pu;return ji(e,n),ki(t,n,this._defsusepending,!1,!1),n.setshape({cx:parsefloat(t.getattribute("cx")||"0"),cy:parsefloat(t.getattribute("cy")||"0"),rx:parsefloat(t.getattribute("rx")||"0"),ry:parsefloat(t.getattribute("ry")||"0")}),n.silent=!0,n},polygon:function(t,e){var n,i=t.getattribute("points");i&&(n=qi(i));var r=new pu({shape:{points:n||[]},silent:!0});return ji(e,r),ki(t,r,this._defsusepending,!1,!1),r},polyline:function(t,e){var n,i=t.getattribute("points");i&&(n=qi(i));var r=new ru({shape:{points:n||[]},silent:!0});return ji(e,r),ki(t,r,this._defsusepending,!1,!1),r},image:function(t,e){var n=new _s;return ji(e,n),ki(t,n,this._defsusepending,!1,!1),n.setstyle({image:t.getattribute("xlink:href")||t.getattribute("href"),x:+t.getattribute("x"),y:+t.getattribute("y"),width:+t.getattribute("width"),height:+t.getattribute("height")}),n.silent=!0,n},text:function(t,e){var n=t.getattribute("x")||"0",i=t.getattribute("y")||"0",r=t.getattribute("dx")||"0",o=t.getattribute("dy")||"0";this._textx=parsefloat(n)+parsefloat(r),this._texty=parsefloat(i)+parsefloat(o);var a=new cr;return ji(e,a),ki(t,a,this._defsusepending,!1,!0),a},tspan:function(t,e){var n=t.getattribute("x"),i=t.getattribute("y");null!=n&&(this._textx=parsefloat(n)),null!=i&&(this._texty=parsefloat(i));var r=t.getattribute("dx")||"0",o=t.getattribute("dy")||"0",a=new cr;return ji(e,a),ki(t,a,this._defsusepending,!1,!0),this._textx+=parsefloat(r),this._texty+=parsefloat(o),a},path:function(t,e){var n=su(t.getattribute("d")||"");return ji(e,n),ki(t,n,this._defsusepending,!1,!1),n.silent=!0,n}}),t}(),ui={lineargradient:function(t){var e=parseint(t.getattribute("x1")||"0",10),n=parseint(t.getattribute("y1")||"0",10),i=parseint(t.getattribute("x2")||"10",10),r=parseint(t.getattribute("y2")||"0",10),o=new xu(e,n,i,r);return xi(t,o),zi(t,o),o},radialgradient:function(t){var e=parseint(t.getattribute("cx")||"0",10),n=parseint(t.getattribute("cy")||"0",10),i=parseint(t.getattribute("r")||"0",10),r=new zu(e,n,i);return xi(t,r),zi(t,r),r}};function xi(t,e){"userspaceonuse"===t.getattribute("gradientunits")&&(e.global=!0)}function zi(t,e){for(var n=t.firstchild;n;){if(1===n.nodetype&&"stop"===n.nodename.tolocalelowercase()){var i=n.getattribute("offset"),r=void 0;r=i&&i.indexof("%")>0?parseint(i,10)/100:i?parsefloat(i):0;var o={};rt(n,o,o);var a=o.stopcolor||n.getattribute("stop-color")||"#000000";e.colorstops.push({offset:r,color:a})}n=n.nextsibling}}function ji(t,e){t&&t.__inheritedstyle&&(e.__inheritedstyle||(e.__inheritedstyle={}),k(e.__inheritedstyle,t.__inheritedstyle))}function qi(t){for(var e=tt(t),n=[],i=0;i0;o-=2){var a=i[o],s=i[o-1],l=tt(a);switch(r=r||[1,0,0,1,0,0],s){case"translate":ei(r,r,[parsefloat(l[0]),parsefloat(l[1]||"0")]);break;case"scale":vi(r,r,[parsefloat(l[0]),parsefloat(l[1]||l[0])]);break;case"rotate":zi(r,r,-parsefloat(l[0])*nt);break;case"skewx":ni(r,[1,0,math.tan(parsefloat(l[0])*nt),1,0,0],r);break;case"skewy":ni(r,[1,math.tan(parsefloat(l[0])*nt),0,1,0,0],r);break;case"matrix":r[0]=parsefloat(l[0]),r[1]=parsefloat(l[1]),r[2]=parsefloat(l[2]),r[3]=parsefloat(l[3]),r[4]=parsefloat(l[4]),r[5]=parsefloat(l[5])}}e.setlocaltransform(r)}}(t,e),rt(t,a,s),i||function(t,e,n){for(var i=0;i0,f={api:n,geo:s,maporgeomodel:t,data:a,isvisualencodedbyvisualmap:d,isgeo:o,transforminforaw:c};"geojson"===s.resourcetype?this._buildgeojson(f):"geosvg"===s.resourcetype&&this._buildsvg(f),this._updatecontroller(t,e,n),this._updatemapselecthandler(t,l,n,i)},t.prototype._buildgeojson=function(t){var e=this._regionsgroupbyname=ft(),n=ft(),i=this._regionsgroup,r=t.transforminforaw,o=t.maporgeomodel,a=t.data,s=t.geo.projection,l=s&&s.stream;function u(t,e){return e&&(t=e(t)),t&&[t[0]*r.scalex+r.x,t[1]*r.scaley+r.y]}function h(t){for(var e=[],n=!l&&s&&s.project,i=0;i=0)&&(p=r);var d=a?{normal:{align:"center",verticalalign:"middle"}}:null;hh(e,yh(i),{labelfetcher:p,labeldataindex:c,defaulttext:n},d);var f=e.gettextcontent();if(f&&(tt(f).ignore=f.ignore,e.textconfig&&a)){var g=e.getboundingrect().clone();e.textconfig.layoutrect=g,e.textconfig.position=[(a[0]-g.x)/g.width*100+"%",(a[1]-g.y)/g.height*100+"%"]}e.disablelabelanimation=!0}else e.removetextcontent(),e.removetextconfig(),e.disablelabelanimation=null}function pt(t,e,n,i,r,o){t.data?t.data.setitemgraphicel(o,e):hs(e).eventdata={componenttype:"geo",componentindex:r.componentindex,geoindex:r.componentindex,name:n,region:i&&i.option||{}}}function ot(t,e,n,i,r){t.data||eh({el:e,componentmodel:r,itemname:n,itemtooltipoption:i.get("tooltip")})}function rt(t,e,n,i,r){e.highdownsilentontouch=!!r.get("selectedmode");var o=i.getmodel("emphasis"),a=o.get("focus");return rl(e,a,o.get("blurscope"),o.get("disabled")),t.isgeo&&function(t,e,n){var i=hs(t);i.componentmaintype=e.maintype,i.componentindex=e.componentindex,i.componenthighdownname=n}(e,r,n),a}function nt(t,e,n){var i,r=[];function o(){i=[]}function a(){i.length&&(r.push(i),i=[])}var s=e({polygonstart:o,polygonend:a,linestart:o,lineend:a,point:function(t,e){isfinite(t)&&isfinite(e)&&i.push([t,e])},sphere:function(){}});return!n&&s.polygonstart(),e(t,(function(t){s.linestart();for(var e=0;e-1&&(n.style.stroke=n.style.fill,n.style.fill="#fff",n.style.linewidth=2),n},e.type="series.map",e.dependencies=["geo"],e.layoutmode="box",e.defaultoption={z:2,coordinatesystem:"geo",map:"",left:"center",top:"center",aspectscale:null,showlegendsymbol:!0,boundingcoords:null,center:null,zoom:1,scalelimit:null,selectedmode:!0,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)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemstyle:{color:"rgba(255,215,0,0.8)"}},nameproperty:"name"},e}(sg);function vt(t){var e={};t.eachseriesbytype("map",(function(t){var n=t.gethostgeomodel(),i=n?"o"+n.id:"i"+t.getmaptype();(e[i]=e[i]||[]).push(t)})),e(e,(function(t,e){for(var n,i,r,o=(n=z(t,(function(t){return t.getdata()})),i=t[0].get("mapvaluecalculation"),r={},e(n,(function(t){t.each(t.mapdimension("value"),(function(e,n){var i="ec-"+t.getname(n);r[i]=r[i]||[],isnan(e)||r[i].push(e)}))})),n[0].map(n[0].mapdimension("value"),(function(t,e){for(var o="ec-"+n[0].getname(e),a=0,s=1/0,l=-1/0,u=r[o].length,h=0;h1?(d.width=p,d.height=p/x):(d.height=p,d.width=p*x),d.y=c[1]-d.height/2,d.x=c[0]-d.width/2;else{var b=t.getboxlayoutparams();b.aspect=x,d=xp(b,{width:v,height:m})}this.setviewrect(d.x,d.y,d.width,d.height),this.setcenter(t.get("center"),e),this.setzoom(t.get("zoom"))}r(ut,gt);var jt=new(function(){function t(){this.dimensions=yt}return t.prototype.create=function(t,e){var n=[];function i(t){return{nameproperty:t.get("nameproperty"),aspectscale:t.get("aspectscale"),projection:t.get("projection")}}t.eachcomponent("geo",(function(t,r){var o=t.get("map"),a=new ut(o+r,o,a({namemap:t.get("namemap")},i(t)));a.zoomlimit=t.get("scalelimit"),n.push(a),t.coordinatesystem=a,a.model=t,a.resize=zt,a.resize(t,e)})),t.eachseries((function(t){if("geo"===t.get("coordinatesystem")){var e=t.get("geoindex")||0;t.coordinatesystem=n[e]}}));var r={};return t.eachseriesbytype("map",(function(t){if(!t.gethostgeomodel()){var e=t.getmaptype();r[e]=r[e]||[],r[e].push(t)}})),e(r,(function(t,r){var o=z(t,(function(t){return t.get("namemap")})),a=new ut(r,r,a({namemap:d(o)},i(t[0])));a.zoomlimit=it.apply(null,z(t,(function(t){return t.get("scalelimit")}))),n.push(a),a.resize=zt,a.resize(t[0],e),e(t,(function(t){t.coordinatesystem=a,function(t,e){e(e.get("geocoord"),(function(e,n){t.addgeocoord(n,e)}))}(a,t)}))})),n},t.prototype.getfilledregions=function(t,e,n,i){for(var r=(t||[]).slice(),o=ft(),a=0;a=0;){var o=e[n];o.hiernode.prelim+=i,o.hiernode.modifier+=i,r+=o.hiernode.change,i+=o.hiernode.shift+r}}(t);var o=(n[0].hiernode.prelim+n[n.length-1].hiernode.prelim)/2;r?(t.hiernode.prelim=r.hiernode.prelim+e(t,r),t.hiernode.modifier=t.hiernode.prelim-o):t.hiernode.prelim=o}else r&&(t.hiernode.prelim=r.hiernode.prelim+e(t,r));t.parentnode.hiernode.defaultancestor=function(t,e,n,i){if(e){for(var r=t,o=t,a=o.parentnode.children[0],s=e,l=r.hiernode.modifier,u=o.hiernode.modifier,h=a.hiernode.modifier,c=s.hiernode.modifier;s=oc(s),o=ac(o),s&&o;){r=oc(r),a=ac(a),r.hiernode.ancestor=t;var p=s.hiernode.prelim+c-o.hiernode.prelim-u+i(s,o);p>0&&(lc(sc(s,t,n),t,p),u+=p,l+=p),c+=s.hiernode.modifier,u+=o.hiernode.modifier,l+=r.hiernode.modifier,h+=a.hiernode.modifier}s&&!oc(r)&&(r.hiernode.thread=s,r.hiernode.modifier+=c-l),o&&!ac(a)&&(a.hiernode.thread=o,a.hiernode.modifier+=u-h,n=t)}return n}(t,r,t.parentnode.hiernode.defaultancestor||i[0],e)}function nc(t){var e=t.hiernode.prelim+t.parentnode.hiernode.modifier;t.setlayout({x:e},!0),t.hiernode.modifier+=t.parentnode.hiernode.modifier}function ic(t){return arguments.length?t:uc}function rc(t,e){return t-=math.pi/2,{x:e*math.cos(t),y:e*math.sin(t)}}function oc(t){var e=t.children;return e.length&&t.isexpand?e[e.length-1]:t.hiernode.thread}function ac(t){var e=t.children;return e.length&&t.isexpand?e[0]:t.hiernode.thread}function sc(t,e,n){return t.hiernode.ancestor.parentnode===e.parentnode?t.hiernode.ancestor:n}function lc(t,e,n){var i=n/(e.hiernode.i-t.hiernode.i);e.hiernode.change-=i,e.hiernode.shift+=n,e.hiernode.modifier+=n,e.hiernode.prelim+=n,t.hiernode.change+=i}function uc(t,e){return t.parentnode===e.parentnode?1:2}var hc=function(){this.parentpoint=[],this.childpoints=[]},cc=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.getdefaultstyle=function(){return{stroke:"#000",fill:null}},e.prototype.getdefaultshape=function(){return new hc},e.prototype.buildpath=function(t,e){var n=e.childpoints,i=n.length,r=e.parentpoint,o=n[0],a=n[i-1];if(1===i)return t.moveto(r[0],r[1]),void t.lineto(o[0],o[1]);var s=e.orient,l="tb"===s||"bt"===s?0:1,u=1-l,h=er(e.forkposition,1),c=[];c[l]=r[l],c[u]=r[u]+(a[u]-r[u])*h,t.moveto(r[0],r[1]),t.lineto(c[0],c[1]),t.moveto(o[0],o[1]),c[l]=o[l],t.lineto(c[0],c[1]),c[l]=a[l],t.lineto(c[0],c[1]),t.lineto(a[0],a[1]);for(var p=1;pm.x)||(_-=math.pi);var s=b?"left":"right",m=s.getmodel("label"),i=m.get("rotate"),t=i*(math.pi/180),c=y.gettextcontent();c&&(y.settextconfig({position:m.get("position")||s,rotation:null==i?-_:t,origin:"center"}),c.setstyle("verticalalign","middle"))}var d=s.get(["emphasis","focus"]),a="relative"===d?gt(a.getancestorsindices(),a.getdescendantindices()):"ancestor"===d?a.getancestorsindices():"descendant"===d?a.getdescendantindices():null;a&&(hs(n).focus=a),function(t,e,n,i,r,o,a,s){var l=e.getmodel(),u=t.get("edgeshape"),h=t.get("layout"),c=t.getorient(),p=t.get(["linestyle","curveness"]),d=t.get("edgeforkposition"),f=l.getmodel("linestyle").getlinestyle(),g=i.__edge;if("curve"===u)e.parentnode&&e.parentnode!==n&&(g||(g=i.__edge=new gu({shape:mc(h,c,p,r,r)})),rh(g,{shape:mc(h,c,p,o,a)},t));else if("polyline"===u)if("orthogonal"===h){if(e!==n&&e.children&&0!==e.children.length&&!0===e.isexpand){for(var y=e.children,v=[],m=0;me&&(e=i.height)}this.height=e+1},t.prototype.getnodebyid=function(t){if(this.getid()===t)return this;for(var e=0,n=this.children,i=n.length;e=0&&this.hosttree.data.setitemlayout(this.dataindex,t,e)},t.prototype.getlayout=function(){return this.hosttree.data.getitemlayout(this.dataindex)},t.prototype.getmodel=function(t){if(!(this.dataindex<0))return this.hosttree.data.getitemmodel(this.dataindex).getmodel(t)},t.prototype.getlevelmodel=function(){return(this.hosttree.levelmodels||[])[this.depth]},t.prototype.setvisual=function(t,e){this.dataindex>=0&&this.hosttree.data.setitemvisual(this.dataindex,t,e)},t.prototype.getvisual=function(t){return this.hosttree.data.getitemvisual(this.dataindex,t)},t.prototype.getrawindex=function(){return this.hosttree.data.getrawindex(this.dataindex)},t.prototype.getid=function(){return this.hosttree.data.getid(this.dataindex)},t.prototype.getchildindex=function(){if(this.parentnode){for(var t=this.parentnode.children,e=0;e=0){var i=n.getdata().tree.root,r=t.targetnode;if(x(r)&&(r=i.getnodebyid(r)),r&&i.contains(r))return{node:r};var o=t.targetnodeid;if(null!=o&&(r=i.getnodebyid(o)))return{node:r}}}function lc(t){for(var e=[];t;)(t=t.parentnode)&&e.push(t);return e.reverse()}function pc(t,e){return p(lc(t),e)>=0}function oc(t,e){for(var n=[];t;){var i=t.dataindex;n.push({name:t.name,dataindex:i,value:e.getrawvalue(i)}),t=t.parentnode}return n.reverse(),n}var rc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.hassymbolvisual=!0,e.ignorestyleondata=!0,e}return n(e,t),e.prototype.getinitialdata=function(t){var e={name:t.name,children:t.data},n=t.leaves||{},i=new dc(n,this,this.ecmodel),r=ac.createtree(e,this,(function(t){t.wrapmethod("getitemmodel",(function(t,e){var n=r.getnodebydataindex(e);return n&&n.children.length&&n.isexpand||(t.parentmodel=i),t}))}));var o=0;r.eachnode("preorder",(function(t){t.depth>o&&(o=t.depth)}));var a=t.expandandcollapse&&t.initialtreedepth>=0?t.initialtreedepth:o;return r.root.eachnode("preorder",(function(t){var e=t.hosttree.data.getrawdataitem(t.dataindex);t.isexpand=e&&null!=e.collapsed?!e.collapsed:t.depth<=a})),r.data},e.prototype.getorient=function(){var t=this.get("orient");return"horizontal"===t?t="lr":"vertical"===t&&(t="tb"),t},e.prototype.setzoom=function(t){this.option.zoom=t},e.prototype.setcenter=function(t){this.option.center=t},e.prototype.formattooltip=function(t,e,n){for(var i=this.getdata().tree,r=i.root.children[0],o=i.getnodebydataindex(t),a=o.getvalue(),s=o.name;o&&o!==r;)s=o.parentnode.name+"."+s,o=o.parentnode;return xf("namevalue",{name:s,value:a,novalue:isnan(a)||null==a})},e.prototype.getdataparams=function(e){var n=t.prototype.getdataparams.apply(this,arguments),i=this.getdata().tree.getnodebydataindex(e);return n.treeancestors=oc(i,this),n.collapsed=!i.isexpand,n},e.type="series.tree",e.layoutmode="box",e.defaultoption={z:2,coordinatesystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeshape:"curve",edgeforkposition:"50%",roam:!1,nodescaleratio:.4,center:null,zoom:1,orient:"lr",symbol:"emptycircle",symbolsize:7,expandandcollapse:!0,initialtreedepth:2,linestyle:{color:"#ccc",width:1.5,curveness:.5},itemstyle:{color:"lightsteelblue",borderwidth:1.5},label:{show:!0},animationeasing:"linear",animationduration:700,animationdurationupdate:500},e}(sg);function nc(t,e){for(var n,i=[t];n=i.pop();)if(e(n),n.isexpand){var r=n.children;if(r.length)for(var o=r.length-1;o>=0;o--)i.push(r[o])}}function ec(t,e){t.eachseriesbytype("tree",(function(t){!function(t,e){var n=function(t,e){return xp(t.getboxlayoutparams(),{width:e.getwidth(),height:e.getheight()})}(t,e);t.layoutinfo=n;var i=t.get("layout"),r=0,o=0,a=null;"radial"===i?(r=2*math.pi,o=math.min(n.height,n.width)/2,a=ic((function(t,e){return(t.parentnode===e.parentnode?1:2)/t.depth}))):(r=n.width,o=n.height,a=ic());var s=t.getdata().tree.root,l=s.children[0];if(l){!function(t){var e=t;e.hiernode={defaultancestor:null,ancestor:e,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var n,i,r=[e];n=r.pop();)if(i=n.children,n.isexpand&&i.length)for(var o=i.length-1;o>=0;o--){var a=i[o];a.hiernode={defaultancestor:null,ancestor:a,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},r.push(a)}}(s),function(t,e,n){for(var i,r=[t],o=[];i=r.pop();)if(o.push(i),i.isexpand){var a=i.children;if(a.length)for(var s=0;sh.getlayout().x&&(h=t),t.depth>c.depth&&(c=t)}));var p=u===h?1:a(u,h)/2,d=p-u.getlayout().x,f=0,g=0,y=0,v=0;if("radial"===i)f=r/(h.getlayout().x+p+d),g=o/(c.depth-1||1),nc(l,(function(t){y=(t.getlayout().x+d)*f,v=(t.depth-1)*g;var e=rc(y,v);t.setlayout({x:e.x,y:e.y,rawx:y,rawy:v},!0)}));else{var m=t.getorient();"rl"===m||"lr"===m?(g=o/(h.getlayout().x+p+d),f=r/(c.depth-1||1),nc(l,(function(t){v=(t.getlayout().x+d)*g,y="lr"===m?(t.depth-1)*f:r-(t.depth-1)*f,t.setlayout({x:y,y:v},!0)}))):"tb"!==m&&"bt"!==m||(f=r/(h.getlayout().x+p+d),g=o/(c.depth-1||1),nc(l,(function(t){y=(t.getlayout().x+d)*f,v="tb"===m?(t.depth-1)*g:o-(t.depth-1)*g,t.setlayout({x:y,y:v},!0)})))}}}(t,e)}))}function zc(t){t.eachseriesbytype("tree",(function(t){var e=t.getdata();e.tree.eachnode((function(t){var n=t.getmodel().getmodel("itemstyle").getitemstyle();a(e.ensureuniqueitemvisual(t.dataindex,"style"),n)}))}))}var vc=["treemapzoomtonode","treemaprender","treemapmove"];function bc(t){var e=t.getdata().tree,n={};e.eachnode((function(e){for(var i=e;i&&i.depth>1;)i=i.parentnode;var r=ed(t.ecmodel,i.name||i.dataindex+"",n);e.setvisual("decal",r)}))}var fc=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.preventusinghoverlayer=!0,n}return n(e,t),e.prototype.getinitialdata=function(t,e){var n={name:t.name,children:t.data};gc(n);var i=t.levels||[],r=this.designatedvisualitemstyle={},o=new dc({itemstyle:r},this,e),a=z((i=t.levels=function(t,e){var n,i,r=ho(e.get("color")),o=ho(e.get(["aria","decal","decals"]));if(!r)return;e(t=t||[],(function(t){var e=new dc(t),r=e.get("color"),o=e.get("decal");(e.get(["itemstyle","color"])||r&&"none"!==r)&&(n=!0),(e.get(["itemstyle","decal"])||o&&"none"!==o)&&(i=!0)}));var a=t[0]||(t[0]={});n||(a.color=r.slice());!i&&o&&(a.decal=o.slice());return t}(i,e))||[],(function(t){return new dc(t,o,e)}),this),s=ac.createtree(n,this,(function(t){t.wrapmethod("getitemmodel",(function(t,e){var n=s.getnodebydataindex(e),i=n?a[n.depth]:null;return t.parentmodel=i||o,t}))}));return s.data},e.prototype.optionupdated=function(){this.resetviewroot()},e.prototype.formattooltip=function(t,e,n){var i=this.getdata(),r=this.getrawvalue(t);return xf("namevalue",{name:i.getname(t),value:r})},e.prototype.getdataparams=function(e){var n=t.prototype.getdataparams.apply(this,arguments),i=this.getdata().tree.getnodebydataindex(e);return n.treeancestors=oc(i,this),n.treepathinfo=n.treeancestors,n},e.prototype.setlayoutinfo=function(t){this.layoutinfo=this.layoutinfo||{},a(this.layoutinfo,t)},e.prototype.mapidtoindex=function(t){var e=this._idindexmap;e||(e=this._idindexmap=ft(),this._idindexmapcount=0);var n=e.get(t);return null==n&&e.set(t,n=this._idindexmapcount++),n},e.prototype.getviewroot=function(){return this._viewroot},e.prototype.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)},e.prototype.enableariadecal=function(){bc(this)},e.type="series.treemap",e.layoutmode="box",e.defaultoption={progressive:0,left:"center",top:"middle",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)",textstyle:{color:"#fff"}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",overflow:"truncate"},upperlabel:{show:!1,position:[0,"50%"],height:20,overflow:"truncate",verticalalign:"middle"},itemstyle:{color:null,coloralpha:null,colorsaturation:null,borderwidth:0,gapwidth:0,bordercolor:"#fff",bordercolorsaturation:null},emphasis:{upperlabel:{show:!0,position:[0,"50%"],overflow:"truncate",verticalalign:"middle"}},visualdimension:0,visualmin:null,visualmax:null,color:[],coloralpha:null,colorsaturation:null,colormappingby:"index",visiblemin:10,childrenvisiblemin:null,levels:[]},e}(sg);function gc(t){var e=0;e(t.children,(function(t){gc(t);var n=t.value;y(n)&&(n=n[0]),e+=n}));var n=t.value;y(n)&&(n=n[0]),(null==n||isnan(n))&&(n=e),n<0&&(n=0),y(t.value)?t.value[0]=n:t.value=n}var wc=function(){function t(t){this.group=new cr,t.add(this.group)}return t.prototype.render=function(t,e,n,i){var r=t.getmodel("breadcrumb"),o=this.group;if(o.removeall(),r.get("show")&&n){var a=r.getmodel("itemstyle"),s=a.getmodel("textstyle"),l={pos:{left:r.get("left"),right:r.get("right"),top:r.get("top"),bottom:r.get("bottom")},box:{width:e.getwidth(),height:e.getheight()},emptyitemwidth:r.get("emptyitemwidth"),totalwidth:0,renderlist:[]};this._prepare(n,l,s),this._rendercontent(t,l,a,s,i),_p(o,l.pos,l.box)}},t.prototype._prepare=function(t,e,n){for(var i=t;i;i=i.parentnode){var r=xo(i.getmodel().get("name"),""),o=n.gettextrect(r),a=math.max(o.width+16,e.emptyitemwidth);e.totalwidth+=a+8,e.renderlist.push({node:i,text:r,width:a})}},t.prototype._rendercontent=function(t,e,n,i,r){for(var o,a,s,l,u,h,c,p,d,f=0,g=e.emptyitemwidth,y=t.get(["breadcrumb","height"]),v=(o=e.pos,a=e.box,l=a.width,u=a.height,h=er(o.left,l),c=er(o.top,u),p=er(o.right,l),d=er(o.bottom,u),(isnan(h)||isnan(parsefloat(o.left)))&&(h=0),(isnan(p)||isnan(parsefloat(o.right)))&&(p=l),(isnan(c)||isnan(parsefloat(o.top)))&&(c=0),(isnan(d)||isnan(parsefloat(o.bottom)))&&(d=u),s=ip(s||0),{width:math.max(p-h-s[1]-s[3],0),height:math.max(d-c-s[0]-s[2],0)}),m=e.totalwidth,x=e.renderlist,_=x.length-1;_>=0;_--){var b=x[_],w=b.node,s=b.width,m=b.text;m>v.width&&(m-=s-g,s=g,m=null);var i=new pu({shape:{points:hc(f,0,s,y,_===x.length-1,0===_)},style:k(n.getitemstyle(),{linejoin:"bevel"}),textcontent:new ks({style:{text:m,fill:i.gettextcolor(),font:i.getfont()}}),textconfig:{position:"inside"},z2:1e5,onclick:h(r,w)});i.disablelabelanimation=!0,this.group.add(i),yc(i,t,w),f+=s+8}},t.prototype.remove=function(){this.group.removeall()},t}();function hc(t,e,n,i,r,o){var a=[[r?t:t-5,e],[t+n,e],[t+n,e+i],[r?t:t-5,e+i]];return!o&&a.splice(2,0,[t+n+5,e+i/2]),!r&&a.push([t,e+i/2]),a}function yc(t,e,n){hs(t).eventdata={componenttype:"series",componentsubtype:"treemap",componentindex:e.componentindex,seriesindex:e.seriesindex,seriesname:e.name,seriestype:"treemap",selftype:"breadcrumb",nodedata:{dataindex:n&&n.dataindex,name:n&&n.name},treepathinfo:n&&oc(n,e)}}var uc=function(){function t(){this._storage=[],this._elexistsmap={}}return t.prototype.add=function(t,e,n,i,r){return!this._elexistsmap[t.id]&&(this._elexistsmap[t.id]=!0,this._storage.push({el:t,target:e,duration:n,delay:i,easing:r}),!0)},t.prototype.finished=function(t){return this._finishedcallback=t,this},t.prototype.start=function(){for(var t=this,e=this._storage.length,n=function(){--e<=0&&(t._storage.length=0,t._elexistsmap={},t._finishedcallback&&t._finishedcallback())},i=0,r=this._storage.length;i3||math.abs(t.dy)>3)){var e=this.seriesmodel.getdata().tree.root;if(!e)return;var n=e.getlayout();if(!n)return;this.api.dispatchaction({type:"treemapmove",from:this.uid,seriesid:this.seriesmodel.id,rootrect:{x:n.x+t.dx,y:n.y+t.dy,width:n.width,height:n.height}})}},e.prototype._onzoom=function(t){var e=t.originx,n=t.originy;if("animating"!==this._state){var i=this.seriesmodel.getdata().tree.root;if(!i)return;var r=i.getlayout();if(!r)return;var o=new sr(r.x,r.y,r.width,r.height),a=this.seriesmodel.layoutinfo,s=[1,0,0,1,0,0];ei(s,s,[-(e-=a.x),-(n-=a.y)]),vi(s,s,[t.scale,t.scale]),ei(s,s,[e,n]),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}})}},e.prototype._initevents=function(t){var e=this;t.on("click",(function(t){if("ready"===e._state){var n=e.seriesmodel.get("nodeclick",!0);if(n){var i=e.findtarget(t.offsetx,t.offsety);if(i){var r=i.node;if(r.getlayout().isleafroot)e._roottonode(i);else if("zoomtonode"===n)e._zoomtonode(i);else if("link"===n){var o=r.hosttree.data.getitemmodel(r.dataindex),a=o.get("link",!0),s=o.get("target",!0)||"blank";a&&dp(a,s)}}}}}),this)},e.prototype._renderbreadcrumb=function(t,e,n){var i=this;n||(n=null!=t.get("leafdepth",!0)?{node:t.getviewroot()}:this.findtarget(e.getwidth()/2,e.getheight()/2))||(n={node:t.getdata().tree.root}),(this._breadcrumb||(this._breadcrumb=new wc(this.group))).render(t,e,n.node,(function(e){"animating"!==i._state&&(pc(t.getviewroot(),e)?i._roottonode({node:e}):i._zoomtonode({node:e}))}))},e.prototype.remove=function(){this._clearcontroller(),this._containergroup&&this._containergroup.removeall(),this._storage={nodegroup:[],background:[],content:[]},this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},e.prototype.dispose=function(){this._clearcontroller()},e.prototype._zoomtonode=function(t){this.api.dispatchaction({type:"treemapzoomtonode",from:this.uid,seriesid:this.seriesmodel.id,targetnode:t.node})},e.prototype._roottonode=function(t){this.api.dispatchaction({type:"treemaproottonode",from:this.uid,seriesid:this.seriesmodel.id,targetnode:t.node})},e.prototype.findtarget=function(t,e){var n;return this.seriesmodel.getviewroot().eachnode({attr:"viewchildren",order:"preorder"},(function(i){var r=this._storage.background[i.getrawindex()];if(r){var o=r.transformcoordtolocal(t,e),a=r.shape;if(!(a.x<=o[0]&&o[0]<=a.x+a.width&&a.y<=o[1]&&o[1]<=a.y+a.height))return!1;n={node:i,offsetx:o[0],offsety:o[1]}}}),this),n},e.type="treemap",e}(xg);var td=e,ed=q,nd=-1,id=function(){function t(e){var n=e.mappingmethod,i=e.type,r=this.option=t(e);this.type=i,this.mappingmethod=n,this._normalizedata=dd[n];var o=t.visualhandlers[i];this.applyvisual=o.applyvisual,this.getcolormapper=o.getcolormapper,this._normalizedtovisual=o._normalizedtovisual[n],"piecewise"===n?(rd(r),function(t){var e=t.piecelist;t.hasspecialvisual=!1,e(e,(function(e,n){e.originindex=n,null!=e.visual&&(t.hasspecialvisual=!0)}))}(r)):"category"===n?r.categories?function(t){var e=t.categories,n=t.categorymap={},i=t.visual;if(td(e,(function(t,e){n[t]=e})),!y(i)){var r=[];q(i)?td(i,(function(t,e){var i=n[e];r[null!=i?i:nd]=t})):r[-1]=i,i=pd(t,r)}for(var o=e.length-1;o>=0;o--)null==i[o]&&(delete n[e[o]],e.pop())}(r):rd(r,!0):(lt("linear"!==n||r.dataextent),rd(r))}return t.prototype.mapvaluetovisual=function(t){var e=this._normalizedata(t);return this._normalizedtovisual(e,t)},t.prototype.getnormalizer=function(){return w(this._normalizedata,this)},t.listvisualtypes=function(){return g(t.visualhandlers)},t.isvalidtype=function(e){return t.visualhandlers.hasownproperty(e)},t.eachvisual=function(t,e,n){q(t)?e(t,e,n):e.call(n,t)},t.mapvisual=function(e,n,i){var r,o=y(e)?[]:q(e)?{}:(r=!0,null);return t.eachvisual(e,(function(t,e){var a=n.call(i,t,e);r?o=a:o[e]=a})),o},t.retrievevisuals=function(e){var n,i={};return e&&td(t.visualhandlers,(function(t,r){e.hasownproperty(r)&&(i[r]=e[r],n=!0)})),n?i:null},t.preparevisualtypes=function(t){if(y(t))t=t.slice();else{if(!ed(t))return[];var e=[];td(t,(function(t,n){e.push(n)})),t=e}return t.sort((function(t,e){return"color"===e&&"color"!==t&&0===t.indexof("color")?1:-1})),t},t.dependson=function(t,e){return"color"===e?!(!t||0!==t.indexof(e)):t===e},t.findpieceindex=function(t,e,n){for(var i,r=1/0,o=0,a=e.length;ou[1]&&(u[1]=l);var h=e.get("colormappingby"),c={type:a.name,dataextent:u,visual:a.range};"color"!==c.type||"index"!==h&&"id"!==h?c.mappingmethod="linear":(c.mappingmethod="category",c.loop=!0);var p=new id(c);return gd(p).drcolormappingby=h,p}(0,r,o,0,u,d);e(d,(function(t,e){if(t.depth>=n.length||t===n[t.depth]){var o=function(t,e,n,i,r,o){var a=a({},e);if(r){var s=r.type,l="color"===s&&gd(r).drcolormappingby,u="index"===l?i:"id"===l?o.mapidtoindex(n.getid()):n.getvalue(t.get("visualdimension"));a[s]=r.mapvaluetovisual(u)}return a}(r,u,t,e,f,i);vd(t,o,n,i)}}))}else s=md(u),h.fill=s}}function md(t){var e=xd(t,"color");if(e){var n=xd(t,"coloralpha"),i=xd(t,"colorsaturation");return i&&(e=dn(e,null,null,i)),n&&(e=an(e,n)),e}}function xd(t,e){var n=t[e];if(null!=n&&"none"!==n)return n}function _d(t,e){var n=t.get(e);return y(n)&&n.length?{name:e,range:n}:null}var bd=math.max,wd=math.min,sd=it,md=e,id=["itemstyle","borderwidth"],td=["itemstyle","gapwidth"],cd=["upperlabel","show"],dd=["upperlabel","height"],ad={seriestype:"treemap",reset:function(t,e,n,i){var r=n.getwidth(),o=n.getheight(),a=t.option,s=xp(t.getboxlayoutparams(),{width:n.getwidth(),height:n.getheight()}),l=a.size||[],u=er(sd(s.width,l[0]),r),h=er(sd(s.height,l[1]),o),c=i&&i.type,p=kc(i,["treemapzoomtonode","treemaproottonode"],t),d="treemaprender"===c||"treemapmove"===c?i.rootrect:null,f=t.getviewroot(),g=lc(f);if("treemapmove"!==c){var y="treemapzoomtonode"===c?function(t,e,n,i,r){var o,a=(e||{}).node,s=[i,r];if(!a||a===n)return s;var l=i*r,u=l*t.option.zoomtonoderatio;for(;o=a.parentnode;){for(var h=0,c=o.children,p=0,d=c.length;pyr&&(u=yr),a=o}ua[1]&&(a[1]=e)}))):a=[nan,nan];return{sum:i,dataextent:a}}(e,a,s);if(0===u.sum)return t.viewchildren=[];if(u.sum=function(t,e,n,i,r){if(!i)return n;for(var o=t.get("visiblemin"),a=r.length,s=a,l=a-1;l>=0;l--){var u=r["asc"===i?a-l-1:l].getvalue();u/n*ei&&(i=a));var l=t.area*t.area,u=e*e*n;return l?bd(u*i/l,l/(u*r)):1/0}function pd(t,e,n,i,r){var o=e===n.width?0:1,a=1-o,s=["x","y"],l=["width","height"],u=n[s[o]],h=e?t.area/e:0;(r||h>n[l[a]])&&(h=n[l[a]]);for(var c=0,p=t.length;ci&&(i=e);var o=i%2?i+2:i+3;r=[];for(var a=0;a0&&(m[0]=-m[0],m[1]=-m[1]);var _=v[0]<0?-1:1;if("start"!==i.__position&&"end"!==i.__position){var b=-math.atan2(v[1],v[0]);u[0].8?"left":h[0]<-.8?"right":"center",p=h[1]>.8?"top":h[1]<-.8?"bottom":"middle";break;case"start":i.x=-h[0]*f+l[0],i.y=-h[1]*g+l[1],c=h[0]>.8?"right":h[0]<-.8?"left":"center",p=h[1]>.8?"bottom":h[1]<-.8?"top":"middle";break;case"insidestarttop":case"insidestart":case"insidestartbottom":i.x=f*_+l[0],i.y=l[1]+w,c=v[0]<0?"right":"left",i.originx=-f*_,i.originy=-w;break;case"insidemiddletop":case"insidemiddle":case"insidemiddlebottom":case"middle":i.x=x[0],i.y=x[1]+w,c="center",i.originy=-w;break;case"insideendtop":case"insideend":case"insideendbottom":i.x=-f*_+u[0],i.y=u[1]+w,c=v[0]>=0?"right":"left",i.originx=f*_,i.originy=-w}i.scalex=i.scaley=r,i.setstyle({verticalalign:i.__verticalalign||p,align:i.__align||c})}}}function s(t,e){var n=t.__specifiedrotation;if(null==n){var i=a.tangentat(e);t.attr("rotation",(1===e?-1:1)*math.pi/2-math.atan2(i[1],i[0]))}else t.attr("rotation",n)}},e}(cr),ga=function(){function t(t){this.group=new cr,this._linector=t||fa}return t.prototype.updatedata=function(t){var e=this;this._progressiveels=null;var n=this,i=n.group,r=n._linedata;n._linedata=t,r||i.removeall();var o=ya(t);t.diff(r).add((function(n){e._doadd(t,n,o)})).update((function(n,i){e._doupdate(r,t,i,n,o)})).remove((function(t){i.remove(r.getitemgraphicel(t))})).execute()},t.prototype.updatelayout=function(){var t=this._linedata;t&&t.eachitemgraphicel((function(e,n){e.updatelayout(t,n)}),this)},t.prototype.incrementalprepareupdate=function(t){this._seriesscope=ya(t),this._linedata=null,this.group.removeall()},t.prototype.incrementalupdate=function(t,e){function n(t){t.isgroup||function(t){return t.animators&&t.animators.length>0}(t)||(t.incremental=!0,t.ensurestate("emphasis").hoverlayer=!0)}this._progressiveels=[];for(var i=t.start;i=0?i+=u:i-=u:f>=0?i-=u:i+=u}return i}function ta(t,e){var n=[],i=qe,r=[[],[],[]],o=[[],[]],a=[];e/=2,t.eachedge((function(t,s){var l=t.getlayout(),u=t.getvisual("fromsymbol"),h=t.getvisual("tosymbol");l.__original||(l.__original=[mt(l[0]),mt(l[1])],l[2]&&l.__original.push(mt(l[2])));var c=l.__original;if(null!=l[2]){if(st(r[0],c[0]),st(r[1],c[2]),st(r[2],c[1]),u&&"none"!==u){var p=kd(t.node1),d=ia(r,c[0],p*e);i(r[0][0],r[1][0],r[2][0],d,n),r[0][0]=n[3],r[1][0]=n[4],i(r[0][1],r[1][1],r[2][1],d,n),r[0][1]=n[3],r[1][1]=n[4]}if(h&&"none"!==h){p=kd(t.node2),d=ia(r,c[1],p*e);i(r[0][0],r[1][0],r[2][0],d,n),r[1][0]=n[1],r[2][0]=n[2],i(r[0][1],r[1][1],r[2][1],d,n),r[1][1]=n[1],r[2][1]=n[2]}st(l[0],r[0]),st(l[1],r[2]),st(l[2],r[1])}else{if(st(o[0],c[0]),st(o[1],c[1]),dt(a,o[1],o[0]),rt(a,a),u&&"none"!==u){p=kd(t.node1);ct(o[0],o[0],a,p*e)}if(h&&"none"!==h){p=kd(t.node2);ct(o[1],o[1],a,-p*e)}st(l[0],o[0]),st(l[1],o[1])}}))}function ca(t){return"view"===t.type}var da=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.init=function(t,e){var n=new qw,i=new ga,r=this.group;this._controller=new ki(e.getzr()),this._controllerhost={target:r},r.add(n.group),r.add(i.group),this._symboldraw=n,this._linedraw=i,this._firstrender=!0},e.prototype.render=function(t,e,n){var i=this,r=t.coordinatesystem;this._model=t;var o=this._symboldraw,a=this._linedraw,s=this.group;if(ca(r)){var l={x:r.x,y:r.y,scalex:r.scalex,scaley:r.scaley};this._firstrender?s.attr(l):rh(s,l,t)}ta(t.getgraph(),qd(t));var u=t.getdata();o.updatedata(u);var h=t.getedgedata();a.updatedata(h),this._updatenodeandlinkscale(),this._updatecontroller(t,e,n),cleartimeout(this._layouttimeout);var c=t.forcelayout,p=t.get(["force","layoutanimation"]);c&&this._startforcelayoutiteration(c,p),u.graph.eachnode((function(t){var e=t.dataindex,n=t.getgraphicel(),r=t.getmodel();if(n){n.off("drag").off("dragend");var o=r.get("draggable");o&&n.on("drag",(function(){c&&(c.warmup(),!i._layouting&&i._startforcelayoutiteration(c,p),c.setfixed(e),u.setitemlayout(e,[n.x,n.y]))})).on("dragend",(function(){c&&c.setunfixed(e)})),n.setdraggable(o&&!!c,!!r.get("cursor")),"adjacency"===r.get(["emphasis","focus"])&&(hs(n).focus=t.getadjacentdataindices())}})),u.graph.eachedge((function(t){var e=t.getgraphicel(),n=t.getmodel().get(["emphasis","focus"]);e&&"adjacency"===n&&(hs(e).focus={edge:[t.dataindex],node:[t.node1.dataindex,t.node2.dataindex]})}));var d="circular"===t.get("layout")&&t.get(["circular","rotatelabel"]),f=u.getlayout("cx"),g=u.getlayout("cy");u.eachitemgraphicel((function(t,e){var n=u.getitemmodel(e).get(["label","rotate"])||0,i=t.getsymbolpath();if(d){var r=u.getitemlayout(e),o=math.atan2(r[1]-g,r[0]-f);o<0&&(o=2*math.pi+o);var a=r[0]=0&&t.call(e,n[r],r)},t.prototype.eachedge=function(t,e){for(var n=this.edges,i=n.length,r=0;r=0&&n[r].node1.dataindex>=0&&n[r].node2.dataindex>=0&&t.call(e,n[r],r)},t.prototype.breadthfirsttraverse=function(t,e,n,i){if(e instanceof la||(e=this._nodesmap[aa(e)]),e){for(var r="out"===n?"outedges":"in"===n?"inedges":"edges",o=0;o=0&&n.node2.dataindex>=0}));for(r=0,o=i.length;r=0&&this[t][e].setitemvisual(this.dataindex,n,i)},getvisual:function(n){return this[t][e].getitemvisual(this.dataindex,n)},setlayout:function(n,i){this.dataindex>=0&&this[t][e].setitemlayout(this.dataindex,n,i)},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)}}}function ra(t,e,n,i,r){for(var o=new ka(i),a=0;a "+p)),u++)}var d,f=n.get("coordinatesystem");if("cartesian2d"===f||"polar"===f)d=rx(t,n);else{var g=hd.get(f),y=g&&g.dimensions||[];p(y,"value")<0&&y.concat(["value"]);var v=km(t,{coorddimensions:y,encodedefine:n.getencode()}).dimensions;(d=new qm(v,n)).initdata(t)}var m=new qm(["value"],n);return m.initdata(l,s),r&&r(d,m),_c({maindata:d,struct:o,structattr:"graph",datas:{node:d,edge:m},datasattr:{node:"data",edge:"edgedata"}}),o.update(),o}r(la,oa("hostgraph","data")),r(pa,oa("hostgraph","edgedata"));var na=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.hassymbolvisual=!0,n}return n(e,t),e.prototype.init=function(e){t.prototype.init.apply(this,arguments);var n=this;function i(){return n._categoriesdata}this.legendvisualprovider=new hm(i,i),this.filldatatextstyle(e.edges||e.links),this._updatecategoriesdata()},e.prototype.mergeoption=function(e){t.prototype.mergeoption.apply(this,arguments),this.filldatatextstyle(e.edges||e.links),this._updatecategoriesdata()},e.prototype.mergedefaultandtheme=function(e){t.prototype.mergedefaultandtheme.apply(this,arguments),co(e,"edgelabel",["show"])},e.prototype.getinitialdata=function(t,e){var n,i=t.edges||t.links||[],r=t.data||t.nodes||[],o=this;if(r&&i){fd(n=this)&&(n.__curvenesslist=[],n.__edgemap={},gd(n));var a=ra(r,i,this,!0,(function(t,e){t.wrapmethod("getitemmodel",(function(t){var e=o._categoriesmodels[t.getshallow("category")];return e&&(e.parentmodel=t.parentmodel,t.parentmodel=e),t}));var n=dc.prototype.getmodel;function i(t,e){var i=n.call(this,t,e);return i.resolveparentpath=r,i}function r(t){if(t&&("label"===t[0]||"label"===t[1])){var e=t.slice();return"label"===t[0]?e[0]="edgelabel":"label"===t[1]&&(e[1]="edgelabel"),e}return t}e.wrapmethod("getitemmodel",(function(t){return t.resolveparentpath=r,t.getmodel=i,t}))}));return e(a.edges,(function(t){!function(t,e,n,i){if(fd(n)){var r=wd(t,e,n),o=n.__edgemap,a=o[hd(r)];o[r]&&!a?o[r].isforward=!0:a&&o[r]&&(a.isforward=!0,o[r].isforward=!1),o[r]=o[r]||[],o[r].push(i)}}(t.node1,t.node2,this,t.dataindex)}),this),a.data}},e.prototype.getgraph=function(){return this.getdata().graph},e.prototype.getedgedata=function(){return this.getgraph().edgedata},e.prototype.getcategoriesdata=function(){return this._categoriesdata},e.prototype.formattooltip=function(t,e,n){if("edge"===n){var i=this.getdata(),r=this.getdataparams(t,n),o=i.graph.getedgebyindex(t),a=i.getname(o.node1.dataindex),s=i.getname(o.node2.dataindex),l=[];return null!=a&&l.push(a),null!=s&&l.push(s),xf("namevalue",{name:l.join(" > "),value:r.value,novalue:null==r.value})}return rg({series:this,dataindex:t,multipleseries:e})},e.prototype._updatecategoriesdata=function(){var t=z(this.option.categories||[],(function(t){return null!=t.value?t:a({value:0},t)})),e=new qm(["value"],this);e.initdata(t),this._categoriesdata=e,this._categoriesmodels=e.maparray((function(t){return e.getitemmodel(t)}))},e.prototype.setzoom=function(t){this.option.zoom=t},e.prototype.setcenter=function(t){this.option.center=t},e.prototype.isanimationenabled=function(){return t.prototype.isanimationenabled.call(this)&&!("force"===this.get("layout")&&this.get(["force","layoutanimation"]))},e.type="series.graph",e.dependencies=["grid","polar","geo","singleaxis","calendar"],e.defaultoption={z:2,coordinatesystem:"view",legendhoverlink:!0,layout:null,circular:{rotatelabel:!1},force:{initlayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgelength:30,layoutanimation:!0},left:"center",top:"center",symbol:"circle",symbolsize:10,edgesymbol:["none","none"],edgesymbolsize:10,edgelabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodescaleratio:.6,label:{show:!1,formatter:"{b}"},itemstyle:{},linestyle:{color:"#aaa",width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemstyle:{bordercolor:"#212121"}}},e}(sg),ea={type:"graphroam",event:"graphroam",update:"none"};var za=function(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0},va=function(t){function e(e){var n=t.call(this,e)||this;return n.type="pointer",n}return n(e,t),e.prototype.getdefaultshape=function(){return new za},e.prototype.buildpath=function(t,e){var n=math.cos,i=math.sin,r=e.r,o=e.width,a=e.angle,s=e.x-n(a)*o*(o>=r/3?1:2),l=e.y-i(a)*o*(o>=r/3?1:2);a=e.angle-math.pi/2,t.moveto(s,l),t.lineto(e.x+n(a)*o,e.y+i(a)*o),t.lineto(e.x+n(e.angle)*r,e.y+i(e.angle)*r),t.lineto(e.x-n(a)*o,e.y-i(a)*o),t.lineto(s,l)},e}(gs);function ba(t,e){var n=null==t?"":t+"";return e&&(x(e)?n=e.replace("{value}",n):u(e)&&(n=e(t))),n}var fa=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.render=function(t,e,n){this.group.removeall();var i=t.get(["axisline","linestyle","color"]),r=function(t,e){var n=t.get("center"),i=e.getwidth(),r=e.getheight(),o=math.min(i,r);return{cx:er(n[0],e.getwidth()),cy:er(n[1],e.getheight()),r:er(t.get("radius"),o/2)}}(t,n);this._rendermain(t,e,n,i,r),this._data=t.getdata()},e.prototype.dispose=function(){},e.prototype._rendermain=function(t,e,n,i,r){var o=this.group,a=t.get("clockwise"),s=-t.get("startangle")/180*math.pi,l=-t.get("endangle")/180*math.pi,u=t.getmodel("axisline"),h=u.get("roundcap")?ds:cu,c=u.get("show"),p=u.getmodel("linestyle"),d=p.get("width"),f=[s,l];ja(f,!a);for(var g=(l=f[1])-(s=f[0]),y=s,v=0;c&&v=t&&(0===e?0:i[e-1][0]).8?"bottom":"middle",align:u<-.4?"left":u>.4?"right":"center"},{inheritcolor:r}),silent:!0}))}if(m.get("show")&&k!==_){p=(p=m.get("distance"))?p+l:l;for(var n=0;n<=b;n++){u=math.cos(m),h=math.sin(m);var e=new zu({shape:{x1:u*(f-p)+p,y1:h*(f-p)+d,x2:u*(f-s-p)+p,y2:h*(f-s-p)+d},silent:!0,style:d});"auto"===d.stroke&&e.setstyle({stroke:i((k+n/b)/_)}),c.add(e),m+=t}m-=t}else m+=i}},e.prototype._renderpointer=function(t,e,n,i,r,o,a,s,l){var u=this.group,h=this._data,c=this._progressels,p=[],d=t.get(["pointer","show"]),f=t.getmodel("progress"),g=f.get("show"),y=t.getdata(),v=y.mapdimension("value"),m=+t.get("min"),x=+t.get("max"),_=[m,x],b=[o,a];function w(e,n){var i,o=y.getitemmodel(e).getmodel("pointer"),a=er(o.get("width"),r.r),s=er(o.get("length"),r.r),l=t.get(["pointer","icon"]),u=o.get("offsetcenter"),h=er(u[0],r.r),c=er(u[1],r.r),p=o.get("keepaspect");return(i=l?ly(l,h-a/2,c-s,a,s,null,p):new va({shape:{angle:-math.pi/2,width:a,r:s,x:h,y:c}})).rotation=-(n+math.pi/2),i.x=r.cx,i.y=r.cy,i}function s(t,e){var n=f.get("roundcap")?ds:cu,i=f.get("overlap"),a=i?f.get("width"):l/y.count(),u=i?r.r-a:r.r-(t+1)*a,h=i?r.r:r.r-t*a,c=new n({shape:{startangle:o,endangle:e,cx:r.cx,cy:r.cy,clockwise:s,r0:u,r:h}});return i&&(c.z2=x-y.get(v,t)%x),c}(g||d)&&(y.diff(h).add((function(e){var n=y.get(v,e);if(d){var i=w(e,o);oh(i,{rotation:-((isnan(+n)?b[0]:nr(n,_,b,!0))+math.pi/2)},t),u.add(i),y.setitemgraphicel(e,i)}if(g){var r=s(e,o),a=f.get("clip");oh(r,{shape:{endangle:nr(n,_,b,a)}},t),u.add(r),ys(t.seriesindex,y.datatype,e,r),p[e]=r}})).update((function(e,n){var i=y.get(v,e);if(d){var r=h.getitemgraphicel(n),a=r?r.rotation:o,s=w(e,a);s.rotation=a,rh(s,{rotation:-((isnan(+i)?b[0]:nr(i,_,b,!0))+math.pi/2)},t),u.add(s),y.setitemgraphicel(e,s)}if(g){var l=c[n],m=s(e,l?l.shape.endangle:o),x=f.get("clip");rh(m,{shape:{endangle:nr(i,_,b,x)}},t),u.add(m),ys(t.seriesindex,y.datatype,e,m),p[e]=m}})).execute(),y.each((function(t){var e=y.getitemmodel(t),n=e.getmodel("emphasis"),r=n.get("focus"),o=n.get("blurscope"),a=n.get("disabled");if(d){var s=y.getitemgraphicel(t),l=y.getitemvisual(t,"style"),u=l.fill;if(s instanceof _s){var h=s.style;s.usestyle(a({image:h.image,x:h.x,y:h.y,width:h.width,height:h.height},l))}else s.usestyle(l),"pointer"!==s.type&&s.setcolor(u);s.setstyle(e.getmodel(["pointer","itemstyle"]).getitemstyle()),"auto"===s.style.fill&&s.setstyle("fill",i(nr(y.get(v,t),_,[0,1],!0))),s.z2emphasislift=0,vl(s,e),rl(s,r,o,a)}if(g){var c=p[t];c.usestyle(y.getitemvisual(t,"style")),c.setstyle(e.getmodel(["progress","itemstyle"]).getitemstyle()),c.z2emphasislift=0,vl(c,e),rl(c,r,o,a)}})),this._progressels=p)},e.prototype._renderanchor=function(t,e){var n=t.getmodel("anchor");if(n.get("show")){var i=n.get("size"),r=n.get("icon"),o=n.get("offsetcenter"),a=n.get("keepaspect"),s=ly(r,e.cx-i/2+er(o[0],e.r),e.cy-i/2+er(o[1],e.r),i,i,null,a);s.z2=n.get("showabove")?1:0,s.setstyle(n.getmodel("itemstyle").getitemstyle()),this.group.add(s)}},e.prototype._rendertitleanddetail=function(t,e,n,i,r){var o=this,a=t.getdata(),s=a.mapdimension("value"),l=+t.get("min"),u=+t.get("max"),h=new cr,c=[],p=[],d=t.isanimationenabled(),f=t.get(["pointer","showabove"]);a.diff(this._data).add((function(t){c[t]=new ks({silent:!0}),p[t]=new ks({silent:!0})})).update((function(t,e){c[t]=o._titleels[e],p[t]=o._detailels[e]})).execute(),a.each((function(e){var n=a.getitemmodel(e),o=a.get(s,e),g=new cr,y=i(nr(o,[l,u],[0,1],!0)),v=n.getmodel("title");if(v.get("show")){var m=v.get("offsetcenter"),x=r.cx+er(m[0],r.r),_=r.cy+er(m[1],r.r);(d=c[e]).attr({z2:f?0:2,style:uh(v,{x:x,y:_,text:a.getname(e),align:"center",verticalalign:"middle"},{inheritcolor:y})}),g.add(d)}var b=n.getmodel("detail");if(b.get("show")){var w=b.get("offsetcenter"),s=r.cx+er(w[0],r.r),m=r.cy+er(w[1],r.r),i=er(b.get("width"),r.r),t=er(b.get("height"),r.r),c=t.get(["progress","show"])?a.getitemvisual(e,"style").fill:y,d=p[e],a=b.get("formatter");d.attr({z2:f?0:2,style:uh(b,{x:s,y:m,text:ba(o,a),width:isnan(i)?null:i,height:isnan(t)?null:t,align:"center",verticalalign:"middle"},{inheritcolor:c})}),qh(d,{normal:b},o,(function(t){return ba(t,a)})),d&&tc(d,e,a,t,{getformattedlabel:function(t,e,n,i,r,a){return ba(a?a.interpolatedvalue:o,a)}}),g.add(d)}h.add(g)})),this.group.add(h),this._titleels=c,this._detailels=p},e.type="gauge",e}(xg),ga=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.visualstyleaccesspath="itemstyle",n}return n(e,t),e.prototype.getinitialdata=function(t,e){return um(this,["value"])},e.type="series.gauge",e.defaultoption={z:2,colorby:"data",center:["50%","50%"],legendhoverlink:!0,radius:"75%",startangle:225,endangle:-45,clockwise:!0,min:0,max:100,splitnumber:10,axisline:{show:!0,roundcap:!1,linestyle:{color:[[1,"#e6ebf8"]],width:10}},progress:{show:!1,overlap:!0,width:10,roundcap:!1,clip:!0},splitline:{show:!0,length:10,distance:10,linestyle:{color:"#63677a",width:3,type:"solid"}},axistick:{show:!0,splitnumber:5,length:6,distance:10,linestyle:{color:"#63677a",width:1,type:"solid"}},axislabel:{show:!0,distance:15,color:"#464646",fontsize:12},pointer:{icon:null,offsetcenter:[0,0],show:!0,showabove:!0,length:"60%",width:6,keepaspect:!1},anchor:{show:!1,showabove:!1,size:6,icon:"circle",offsetcenter:[0,0],keepaspect:!1,itemstyle:{color:"#fff",borderwidth:0,bordercolor:"#5470c6"}},title:{show:!0,offsetcenter:[0,"20%"],color:"#464646",fontsize:16,valueanimation:!1},detail:{show:!0,backgroundcolor:"rgba(0,0,0,0)",borderwidth:0,bordercolor:"#ccc",width:100,height:null,padding:[5,10],offsetcenter:[0,"40%"],color:"#464646",fontsize:30,fontweight:"bold",lineheight:30,valueanimation:!1}},e}(sg);var wa=["itemstyle","opacity"],ha=function(t){function e(e,n){var i=t.call(this)||this,r=i,o=new ru,a=new ks;return r.settextcontent(a),i.settextguideline(o),i.updatedata(e,n,!0),i}return n(e,t),e.prototype.updatedata=function(t,e,n){var i=this,r=t.hostmodel,o=t.getitemmodel(e),a=t.getitemlayout(e),s=o.getmodel("emphasis"),l=o.get(wa);l=null==l?1:l,n||hh(i),i.usestyle(t.getitemvisual(e,"style")),i.style.linejoin="round",n?(i.setshape({points:a.points}),i.style.opacity=0,oh(i,{style:{opacity:l}},r,e)):rh(i,{style:{opacity:l},shape:{points:a.points}},r,e),vl(i,o),this._updatelabel(t,e),rl(this,s.get("focus"),s.get("blurscope"),s.get("disabled"))},e.prototype._updatelabel=function(t,e){var n=this,i=this.gettextguideline(),r=n.gettextcontent(),o=t.hostmodel,a=t.getitemmodel(e),s=t.getitemlayout(e).label,l=t.getitemvisual(e,"style"),u=l.fill;hh(r,yh(a),{labelfetcher:t.hostmodel,labeldataindex:e,defaultopacity:l.opacity,defaulttext:t.getname(e)},{normal:{align:s.textalign,verticalalign:s.verticalalign}}),n.settextconfig({local:!0,inside:!!s.inside,insidestroke:u,outsidefill:u});var h=s.linepoints;i.setshape({points:h}),n.textguidelineconfig={anchor:h?new ji(h[0][0],h[0][1]):null},rh(r,{style:{x:s.x,y:s.y}},o,e),r.attr({rotation:s.rotation,originx:s.x,originy:s.y,z2:10}),db(n,fb(a),{stroke:u})},e}(pu),ya=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.ignorelabellineupdate=!0,n}return n(e,t),e.prototype.render=function(t,e,n){var i=t.getdata(),r=this._data,o=this.group;i.diff(r).add((function(t){var e=new ha(i,t);i.setitemgraphicel(t,e),o.add(e)})).update((function(t,e){var n=r.getitemgraphicel(e);n.updatedata(i,t),o.add(n),i.setitemgraphicel(t,n)})).remove((function(e){uh(r.getitemgraphicel(e),t,e)})).execute(),this._data=i},e.prototype.remove=function(){this.group.removeall(),this._data=null},e.prototype.dispose=function(){},e.type="funnel",e}(xg),ua=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.init=function(e){t.prototype.init.apply(this,arguments),this.legendvisualprovider=new hm(w(this.getdata,this),w(this.getrawdata,this)),this._defaultlabelline(e)},e.prototype.getinitialdata=function(t,e){return um(this,{coorddimensions:["value"],encodedefaulter:h(yp,this)})},e.prototype._defaultlabelline=function(t){co(t,"labelline",["show"]);var e=t.labelline,n=t.emphasis.labelline;e.show=e.show&&t.label.show,n.show=n.show&&t.emphasis.label.show},e.prototype.getdataparams=function(e){var n=this.getdata(),i=t.prototype.getdataparams.call(this,e),r=n.mapdimension("value"),o=n.getsum(r);return i.percent=o?+(n.get(r,e)/o*100).tofixed(2):0,i.$vars.push("percent"),i},e.type="series.funnel",e.defaultoption={z:2,legendhoverlink:!0,colorby:"data",left:80,top:60,right:80,bottom:60,minsize:"0%",maxsize:"100%",sort:"descending",orient:"vertical",gap:0,funnelalign:"center",label:{show:!0,position:"outer"},labelline:{show:!0,length:20,linestyle:{width:1}},itemstyle:{bordercolor:"#fff",borderwidth:1},emphasis:{label:{show:!0}},select:{itemstyle:{bordercolor:"#212121"}}},e}(sg);function xa(t,e){t.eachseriesbytype("funnel",(function(t){var n=t.getdata(),i=n.mapdimension("value"),r=t.get("sort"),o=function(t,e){return xp(t.getboxlayoutparams(),{width:e.getwidth(),height:e.getheight()})}(t,e),a=t.get("orient"),s=o.width,l=o.height,u=function(t,e){for(var n=t.mapdimension("value"),i=t.maparray(n,(function(t){return t})),r=[],o="ascending"===e,a=0,s=t.count();a5)return;var i=this._model.coordinatesystem.getslidedaxisexpandwindow([t.offsetx,t.offsety]);"none"!==i.behavior&&this._dispatchexpand({axisexpandwindow:i.axisexpandwindow})}this._mousedownpoint=null},mousemove:function(t){if(!this._mousedownpoint&&ok(this,"mousemove")){var e=this._model,n=e.coordinatesystem.getslidedaxisexpandwindow([t.offsetx,t.offsety]),i=n.behavior;"jump"===i&&this._throttleddispatchexpand.debouncenextcall(e.get("axisexpanddebounce")),this._throttleddispatchexpand("none"===i?null:{axisexpandwindow:n.axisexpandwindow,animation:"jump"===i?null:{duration:0}})}}};function ok(t,e){var n=t._model;return n.get("axisexpandable")&&n.get("axisexpandtriggeron")===e}var ak=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.init=function(){t.prototype.init.apply(this,arguments),this.mergeoption({})},e.prototype.mergeoption=function(t){var e=this.option;t&&c(e,t,!0),this._initdimensions()},e.prototype.contains=function(t,e){var n=t.get("parallelindex");return null!=n&&e.getcomponent("parallel",n)===this},e.prototype.setaxisexpand=function(t){e(["axisexpandable","axisexpandcenter","axisexpandcount","axisexpandwidth","axisexpandwindow"],(function(e){t.hasownproperty(e)&&(this.option[e]=t[e])}),this)},e.prototype._initdimensions=function(){var t=this.dimensions=[],e=this.parallelaxisindex=[];e(b(this.ecmodel.querycomponents({maintype:"parallelaxis"}),(function(t){return(t.get("parallelindex")||0)===this.componentindex}),this),(function(n){t.push("dim"+n.get("dim")),e.push(n.componentindex)}))},e.type="parallel",e.dependencies=["parallelaxis"],e.layoutmode="box",e.defaultoption={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},e}(tp),sk=function(t){function e(e,n,i,r,o){var a=t.call(this,e,n,i)||this;return a.type=r||"value",a.axisindex=o,a}return n(e,t),e.prototype.ishorizontal=function(){return"horizontal"!==this.coordinatesystem.getmodel().get("layout")},e}(h_);function lk(t,e,n,i,r,o){t=t||0;var a=n[1]-n[0];if(null!=r&&(r=hk(r,[0,a])),null!=o&&(o=math.max(o,null!=r?r:0)),"all"===i){var s=math.abs(e[1]-e[0]);s=hk(s,[0,a]),r=o=hk(s,[r,o]),i=0}e[0]=hk(e[0],n),e[1]=hk(e[1],n);var l=uk(e,i);e[i]+=t;var u,h=r||0,c=n.slice();return l.sign<0?c[0]+=h:c[1]-=h,e[i]=hk(e[i],c),u=uk(e,i),null!=r&&(u.sign!==l.sign||u.spano&&(e[1-i]=e[i]+u.sign*o),e}function uk(t,e){var n=t[e]-t[1-e];return{span:math.abs(n),sign:n>0?-1:n<0?1:e?-1:1}}function hk(t,e){return math.min(null!=e[1]?e[1]:1/0,math.max(null!=e[0]?e[0]:-1/0,t))}var ck=e,pk=math.min,dk=math.max,fk=math.floor,gk=math.ceil,yk=zr,vk=math.pi,mk=function(){function t(t,e,n){this.type="parallel",this._axesmap=ft(),this._axeslayout={},this.dimensions=t.dimensions,this._model=t,this._init(t,e,n)}return t.prototype._init=function(t,e,n){var i=t.dimensions,r=t.parallelaxisindex;ck(i,(function(t,n){var i=r[n],o=e.getcomponent("parallelaxis",i),a=this._axesmap.set(t,new sk(t,o_(o),[0,0],o.get("type"),i)),s="category"===a.type;a.onband=s&&o.get("boundarygap"),a.inverse=o.get("inverse"),o.axis=a,a.model=o,a.coordinatesystem=o.coordinatesystem=this}),this)},t.prototype.update=function(t,e){this._updateaxesfromseries(this._model,t)},t.prototype.containpoint=function(t){var e=this._makelayoutinfo(),n=e.axisbase,i=e.layoutbase,r=e.pixeldimindex,o=t[1-r],a=t[r];return o>=n&&o<=n+e.axislength&&a>=i&&a<=i+e.layoutlength},t.prototype.getmodel=function(){return this._model},t.prototype._updateaxesfromseries=function(t,e){e.eachseries((function(n){if(t.contains(n,e)){var i=n.getdata();ck(this.dimensions,(function(t){var e=this._axesmap.get(t);e.scale.unionextentfromdata(i,i.mapdimension(t)),r_(e.scale,e.model)}),this)}}),this)},t.prototype.resize=function(t,e){this._rect=xp(t.getboxlayoutparams(),{width:e.getwidth(),height:e.getheight()}),this._layoutaxes()},t.prototype.getrect=function(){return this._rect},t.prototype._makelayoutinfo=function(){var t,e=this._model,n=this._rect,i=["x","y"],r=["width","height"],o=e.get("layout"),a="horizontal"===o?0:1,s=n[r[a]],l=[0,s],u=this.dimensions.length,h=xk(e.get("axisexpandwidth"),l),c=xk(e.get("axisexpandcount")||0,[0,u]),p=e.get("axisexpandable")&&u>3&&u>c&&c>1&&h>0&&s>0,d=e.get("axisexpandwindow");d?(t=xk(d[1]-d[0],l),d[1]=d[0]+t):(t=xk(h*(c-1),l),(d=[h*(e.get("axisexpandcenter")||fk(u/2))-t/2])[1]=d[0]+t);var f=(s-t)/(u-c);f<3&&(f=0);var g=[fk(yk(d[0]/h,1))+1,gk(yk(d[1]/h,1))-1],y=f/h*d[0];return{layout:o,pixeldimindex:a,layoutbase:n[i[a]],layoutlength:s,axisbase:n[i[1-a]],axislength:n[r[1-a]],axisexpandable:p,axisexpandwidth:h,axiscollapsewidth:f,axisexpandwindow:d,axiscount:u,wininnerindices:g,axisexpandwindow0pos:y}},t.prototype._layoutaxes=function(){var t=this._rect,e=this._axesmap,n=this.dimensions,i=this._makelayoutinfo(),r=i.layout;e.each((function(t){var e=[0,i.axislength],n=t.inverse?1:0;t.setextent(e[n],e[1-n])})),ck(n,(function(e,n){var o=(i.axisexpandable?bk:_k)(n,i),a={horizontal:{x:o.position,y:i.axislength},vertical:{x:0,y:o.position}},s={horizontal:vk/2,vertical:0},l=[a[r].x+t.x,a[r].y+t.y],u=s[r],h=[1,0,0,1,0,0];zi(h,h,u),ei(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)},t.prototype.getaxis=function(t){return this._axesmap.get(t)},t.prototype.datatopoint=function(t,e){return this.axiscoordtopoint(this._axesmap.get(e).datatocoord(t),e)},t.prototype.eachactivestate=function(t,e,n,i){null==n&&(n=0),null==i&&(i=t.count());var r=this._axesmap,o=this.dimensions,a=[],s=[];e(o,(function(e){a.push(t.mapdimension(e)),s.push(r.get(e).model)}));for(var l=this.hasaxisbrushed(),u=n;ur*(1-h[0])?(l="jump",a=s-r*(1-h[2])):(a=s-r*h[1])>=0&&(a=s-r*(1-h[1]))<=0&&(a=0),(a*=e.axisexpandwidth/u)?lk(a,i,o,"all"):l="none";else{var p=i[1]-i[0];(i=[dk(0,o[1]*s/p-p/2)])[1]=pk(o[1],i[0]+p),i[0]=i[1]-p}return{axisexpandwindow:i,behavior:l}},t}();function xk(t,e){return pk(dk(t,e[0]),e[1])}function _k(t,e){var n=e.layoutlength/(e.axiscount-1);return{position:n*t,axisnameavailablewidth:n,axislabelshow:!0}}function bk(t,e){var n,i,r=e.layoutlength,o=e.axisexpandwidth,a=e.axiscount,s=e.axiscollapsewidth,l=e.wininnerindices,u=s,h=!1;return t=0;n--)vr(e[n])},e.prototype.getactivestate=function(t){var e=this.activeintervals;if(!e.length)return"normal";if(null==t||isnan(+t))return"inactive";if(1===e.length){var n=e[0];if(n[0]<=t&&t<=n[1])return"active"}else for(var i=0,r=e.length;i6}(t)||o){if(a&&!o){"single"===s.brushmode&&wk(t);var l=t(s);l.brushtype=ol(l.brushtype,a),l.panelid=a===mk?null:a.panelid,o=t._creatingcover=rk(t,l),t._covers.push(o)}if(o){var u=ll[ol(t._brushtype,a)];o.__brushoption.range=u.getcreatingrange(el(t,o,t._track)),i&&(nk(t,o),u.updatecommon(t,o)),ek(t,o),r={isend:i}}}else i&&"single"===s.brushmode&&s.removeonclick&&fk(t,e,n)&&wk(t)&&(r={isend:i,removeonclick:!0});return r}function ol(t,e){return"auto"===t?e.defaultbrushtype:t}var al={mousedown:function(t){if(this._dragging)sl(this,t);else if(!t.target||!t.target.draggable){nl(t);var e=this.group.transformcoordtolocal(t.offsetx,t.offsety);this._creatingcover=null,(this._creatingpanel=fk(this,t,e))&&(this._dragging=!0,this._track=[e.slice()])}},mousemove:function(t){var e=t.offsetx,n=t.offsety,i=this.group.transformcoordtolocal(e,n);if(function(t,e,n){if(t._brushtype&&!function(t,e,n){var i=t._zr;return e<0||e>i.getwidth()||n<0||n>i.getheight()}(t,e.offsetx,e.offsety)){var i=t._zr,r=t._covers,o=fk(t,e,n);if(!t._dragging)for(var a=0;a=0&&(o[r[a].depth]=new dc(r[a],this,e));if(i&&n)return ra(i,n,this,!0,(function(t,e){t.wrapmethod("getitemmodel",(function(t,e){var n=t.parentmodel,i=n.getdata().getitemlayout(e);if(i){var r=i.depth,o=n.levelmodels[r];o&&(t.parentmodel=o)}return t})),e.wrapmethod("getitemmodel",(function(t,e){var n=t.parentmodel,i=n.getgraph().getedgebyindex(e).node1.getlayout();if(i){var r=i.depth,o=n.levelmodels[r];o&&(t.parentmodel=o)}return t}))})).data},e.prototype.setnodeposition=function(t,e){var n=(this.option.data||this.option.nodes)[t];n.localx=e[0],n.localy=e[1]},e.prototype.getgraph=function(){return this.getdata().graph},e.prototype.getedgedata=function(){return this.getgraph().edgedata},e.prototype.formattooltip=function(t,e,n){function i(t){return isnan(t)||null==t}if("edge"===n){var r=this.getdataparams(t,n),o=r.data,a=r.value;return xf("namevalue",{name:o.source+" -- "+o.target,value:a,novalue:i(a)})}var s=this.getgraph().getnodebyindex(t).getlayout().value,l=this.getdataparams(t,n).data.name;return xf("namevalue",{name:null!=l?l+"":null,value:s,novalue:i(s)})},e.prototype.optionupdated=function(){},e.prototype.getdataparams=function(e,n){var i=t.prototype.getdataparams.call(this,e,n);if(null==i.value&&"node"===n){var r=this.getgraph().getnodebyindex(e).getlayout().value;i.value=r}return i},e.type="series.sankey",e.defaultoption={z:2,coordinatesystem:"view",left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodewidth:20,nodegap:8,draggable:!0,layoutiterations:32,label:{show:!0,position:"right",fontsize:12},levels:[],nodealign:"justify",linestyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},linestyle:{opacity:.5}},select:{itemstyle:{bordercolor:"#212121"}},animationeasing:"linear",animationduration:1e3},e}(sg);function sl(t,e){t.eachseriesbytype("sankey",(function(t){var n=t.get("nodewidth"),i=t.get("nodegap"),r=function(t,e){return xp(t.getboxlayoutparams(),{width:e.getwidth(),height:e.getheight()})}(t,e);t.layoutinfo=r;var o=r.width,a=r.height,s=t.getgraph(),l=s.nodes,u=s.edges;!function(t){e(t,(function(t){var e=ol(t.outedges,pl),n=ol(t.inedges,pl),i=t.getvalue()||0,r=math.max(e,n,i);t.setlayout({value:r},!0)}))}(l),function(t,e,n,i,r,o,a,s,l){(function(t,e,n,i,r,o,a){for(var s=[],l=[],u=[],h=[],c=0,p=0;p=0;v&&y.depth>d&&(d=y.depth),g.setlayout({depth:v?y.depth:c},!0),"vertical"===o?g.setlayout({dy:n},!0):g.setlayout({dx:n},!0);for(var m=0;mc-1?d:c-1;a&&"left"!==a&&function(t,e,n,i){if("right"===e){for(var r=[],o=t,a=0;o.length;){for(var s=0;s0;o--)tl(s,l*=.99,a),il(s,r,n,i,a),rl(s,l,a),il(s,r,n,i,a)}(t,e,o,r,i,a,s),function(t,e){var n="vertical"===e?"x":"y";e(t,(function(t){t.outedges.sort((function(t,e){return t.node2.getlayout()[n]-e.node2.getlayout()[n]})),t.inedges.sort((function(t,e){return t.node1.getlayout()[n]-e.node1.getlayout()[n]}))})),e(t,(function(t){var e=0,n=0;e(t.outedges,(function(t){t.setlayout({sy:e},!0),e+=t.getlayout().dy})),e(t.inedges,(function(t){t.setlayout({ty:n},!0),n+=t.getlayout().dy}))}))}(t,s)}(l,u,n,i,o,a,0!==b(l,(function(t){return 0===t.getlayout().value})).length?0:t.get("layoutiterations"),t.get("orient"),t.get("nodealign"))}))}function ml(t){var e=t.hostgraph.data.getrawdataitem(t.dataindex);return null!=e.depth&&e.depth>=0}function il(t,e,n,i,r){var o="vertical"===r?"x":"y";e(t,(function(t){var a,s,l;t.sort((function(t,e){return t.getlayout()[o]-e.getlayout()[o]}));for(var u=0,h=t.length,c="vertical"===r?"dx":"dy",p=0;p0&&(a=s.getlayout()[o]+l,"vertical"===r?s.setlayout({x:a},!0):s.setlayout({y:a},!0)),u=s.getlayout()[o]+s.getlayout()[c]+e;if((l=u-e-("vertical"===r?i:n))>0){a=s.getlayout()[o]-l,"vertical"===r?s.setlayout({x:a},!0):s.setlayout({y:a},!0),u=a;for(p=h-2;p>=0;--p)(l=(s=t[p]).getlayout()[o]+s.getlayout()[c]+e-u)>0&&(a=s.getlayout()[o]-l,"vertical"===r?s.setlayout({x:a},!0):s.setlayout({y:a},!0)),u=s.getlayout()[o]}}))}function tl(t,e,n){e(t.slice().reverse(),(function(t){e(t,(function(t){if(t.outedges.length){var i=ol(t.outedges,cl,n)/ol(t.outedges,pl);if(isnan(i)){var r=t.outedges.length;i=r?ol(t.outedges,dl,n)/r:0}if("vertical"===n){var o=t.getlayout().x+(i-ll(t,n))*e;t.setlayout({x:o},!0)}else{var a=t.getlayout().y+(i-ll(t,n))*e;t.setlayout({y:a},!0)}}}))}))}function cl(t,e){return ll(t.node2,e)*t.getvalue()}function dl(t,e){return ll(t.node2,e)}function al(t,e){return ll(t.node1,e)*t.getvalue()}function kl(t,e){return ll(t.node1,e)}function ll(t,e){return"vertical"===e?t.getlayout().x+t.getlayout().dx/2:t.getlayout().y+t.getlayout().dy/2}function pl(t){return t.getvalue()}function ol(t,e,n){for(var i=0,r=t.length,o=-1;++oi&&(i=e)})),e(e,(function(e){var r=new id({type:"color",mappingmethod:"linear",dataextent:[n,i],visual:t.get("color")}).mapvaluetovisual(e.getlayout().value),o=e.getmodel().get(["itemstyle","color"]);null!=o?(e.setvisual("color",o),e.setvisual("style",{fill:o})):(e.setvisual("color",r),e.setvisual("style",{fill:r}))}))}}))}var el=function(){function t(){}return t.prototype.getinitialdata=function(t,e){var n,i,r=e.getcomponent("xaxis",this.get("xaxisindex")),o=e.getcomponent("yaxis",this.get("yaxisindex")),a=r.get("type"),s=o.get("type");"category"===a?(t.layout="horizontal",n=r.getordinalmeta(),i=!0):"category"===s?(t.layout="vertical",n=o.getordinalmeta(),i=!0):t.layout=t.layout||"horizontal";var l=["x","y"],u="horizontal"===t.layout?0:1,h=this._baseaxisdim=l[u],c=l[1-u],p=[r,o],d=p[u].get("type"),f=p[1-u].get("type"),g=t.data;if(g&&i){var y=[];e(g,(function(t,e){var n;y(t)?(n=t.slice(),t.unshift(e)):y(t.value)?((n=a({},t)).value=n.value.slice(),t.value.unshift(e)):n=t,y.push(n)})),t.data=y}var v=this.defaultvaluedimensions,m=[{name:h,type:dm(d),ordinalmeta:n,otherdims:{tooltip:!1,itemname:0},dimsdef:["base"]},{name:c,type:dm(f),dimsdef:v.slice()}];return um(this,{coorddimensions:m,dimensionscount:v.length+1,encodedefaulter:h(hp,m,this)})},t.prototype.getbaseaxis=function(){var t=this._baseaxisdim;return this.ecmodel.getcomponent(t+"axis",this.get(t+"axisindex")).axis},t}(),zl=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.defaultvaluedimensions=[{name:"min",defaulttooltip:!0},{name:"q1",defaulttooltip:!0},{name:"median",defaulttooltip:!0},{name:"q3",defaulttooltip:!0},{name:"max",defaulttooltip:!0}],n.visualdrawtype="stroke",n}return n(e,t),e.type="series.boxplot",e.dependencies=["xaxis","yaxis","grid"],e.defaultoption={z:2,coordinatesystem:"cartesian2d",legendhoverlink:!0,layout:null,boxwidth:[7,50],itemstyle:{color:"#fff",borderwidth:1},emphasis:{scale:!0,itemstyle:{borderwidth:2,shadowblur:5,shadowoffsetx:1,shadowoffsety:1,shadowcolor:"rgba(0,0,0,0.2)"}},animationduration:800},e}(sg);r(zl,el,!0);var vl=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.render=function(t,e,n){var i=t.getdata(),r=this.group,o=this._data;this._data||r.removeall();var a="horizontal"===t.get("layout")?1:0;i.diff(o).add((function(t){if(i.hasvalue(t)){var e=gl(i.getitemlayout(t),i,t,a,!0);i.setitemgraphicel(t,e),r.add(e)}})).update((function(t,e){var n=o.getitemgraphicel(e);if(i.hasvalue(t)){var s=i.getitemlayout(t);n?(hh(n),wl(s,n,i,t)):n=gl(s,i,t,a),r.add(n),i.setitemgraphicel(t,n)}else r.remove(n)})).remove((function(t){var e=o.getitemgraphicel(t);e&&r.remove(e)})).execute(),this._data=i},e.prototype.remove=function(t){var e=this.group,n=this._data;this._data=null,n&&n.eachitemgraphicel((function(t){t&&e.remove(t)}))},e.type="boxplot",e}(xg),bl=function(){},fl=function(t){function e(e){var n=t.call(this,e)||this;return n.type="boxplotboxpath",n}return n(e,t),e.prototype.getdefaultshape=function(){return new bl},e.prototype.buildpath=function(t,e){var n=e.points,i=0;for(t.moveto(n[i][0],n[i][1]),i++;i<4;i++)t.lineto(n[i][0],n[i][1]);for(t.closepath();ig){var _=[v,x];i.push(_)}}}return{boxdata:n,outliers:i}}(e.getrawdata(),t.config);return[{dimensions:["itemname","low","q1","q2","q3","high"],data:i.boxdata},{data:i.outliers}]}};var jl=["color","bordercolor"],ql=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.render=function(t,e,n){this.group.removeclippath(),this._progressiveels=null,this._updatedrawmode(t),this._islargedraw?this._renderlarge(t):this._rendernormal(t)},e.prototype.incrementalpreparerender=function(t,e,n){this._clear(),this._updatedrawmode(t)},e.prototype.incrementalrender=function(t,e,n,i){this._progressiveels=[],this._islargedraw?this._incrementalrenderlarge(t,e):this._incrementalrendernormal(t,e)},e.prototype.eachrendered=function(t){vh(this._progressiveels||this.group,t)},e.prototype._updatedrawmode=function(t){var e=t.pipelinecontext.large;null!=this._islargedraw&&e===this._islargedraw||(this._islargedraw=e,this._clear())},e.prototype._rendernormal=function(t){var e=t.getdata(),n=this._data,i=this.group,r=e.getlayout("issimplebox"),o=t.get("clip",!0),a=t.coordinatesystem,s=a.getarea&&a.getarea();this._data||i.removeall(),e.diff(n).add((function(n){if(e.hasvalue(n)){var a=e.getitemlayout(n);if(o&&ql(s,a))return;var l=jl(a,n,!0);oh(l,{shape:{points:a.ends}},t,n),tp(l,e,n,r),i.add(l),e.setitemgraphicel(n,l)}})).update((function(a,l){var u=n.getitemgraphicel(l);if(e.hasvalue(a)){var h=e.getitemlayout(a);o&&ql(s,h)?i.remove(u):(u?(rh(u,{shape:{points:h.ends}},t,a),hh(u)):u=jl(h),tp(u,e,a,r),i.add(u),e.setitemgraphicel(a,u))}else i.remove(u)})).remove((function(t){var e=n.getitemgraphicel(t);e&&i.remove(e)})).execute(),this._data=e},e.prototype._renderlarge=function(t){this._clear(),rp(t,this.group);var e=t.get("clip",!0)?ls(t.coordinatesystem,!1,t):null;e?this.group.setclippath(e):this.group.removeclippath()},e.prototype._incrementalrendernormal=function(t,e){for(var n,i=e.getdata(),r=i.getlayout("issimplebox");null!=(n=t.next());){var o=jl(i.getitemlayout(n));tp(o,i,n,r),o.incremental=!0,this.group.add(o),this._progressiveels.push(o)}},e.prototype._incrementalrenderlarge=function(t,e){rp(e,this.group,this._progressiveels,!0)},e.prototype.remove=function(t){this._clear()},e.prototype._clear=function(){this.group.removeall(),this._data=null},e.type="candlestick",e}(xg),kl=function(){},$l=function(t){function e(e){var n=t.call(this,e)||this;return n.type="normalcandlestickbox",n}return n(e,t),e.prototype.getdefaultshape=function(){return new kl},e.prototype.buildpath=function(t,e){var n=e.points;this.__simplebox?(t.moveto(n[4][0],n[4][1]),t.lineto(n[6][0],n[6][1])):(t.moveto(n[0][0],n[0][1]),t.lineto(n[1][0],n[1][1]),t.lineto(n[2][0],n[2][1]),t.lineto(n[3][0],n[3][1]),t.closepath(),t.moveto(n[4][0],n[4][1]),t.lineto(n[5][0],n[5][1]),t.moveto(n[6][0],n[6][1]),t.lineto(n[7][0],n[7][1]))},e}(gs);function jl(t,e,n){var i=t.ends;return new $l({shape:{points:n?ep(i,t):i},z2:100})}function ql(t,e){for(var n=!0,i=0;i0?"bordercolor":"bordercolor0"])||n.get(["itemstyle",t>0?"color":"color0"]),o=n.getmodel("itemstyle").getitemstyle(jl);e.usestyle(o),e.style.fill=null,e.style.stroke=r}var ap=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.defaultvaluedimensions=[{name:"open",defaulttooltip:!0},{name:"close",defaulttooltip:!0},{name:"lowest",defaulttooltip:!0},{name:"highest",defaulttooltip:!0}],n}return n(e,t),e.prototype.getshadowdim=function(){return"open"},e.prototype.brushselector=function(t,e,n){var i=e.getitemlayout(t);return i&&n.rect(i.brushrect)},e.type="series.candlestick",e.dependencies=["xaxis","yaxis","grid"],e.defaultoption={z:2,coordinatesystem:"cartesian2d",legendhoverlink:!0,layout:null,clip:!0,itemstyle:{color:"#eb5454",color0:"#47b262",bordercolor:"#eb5454",bordercolor0:"#47b262",borderwidth:1},emphasis:{scale:!0,itemstyle:{borderwidth:2}},barmaxwidth:null,barminwidth:null,barwidth:null,large:!0,largethreshold:600,progressive:3e3,progressivethreshold:1e4,progressivechunkmode:"mod",animationeasing:"linear",animationduration:300},e}(sg);function sp(t){t&&y(t.series)&&e(t.series,(function(t){q(t)&&"k"===t.type&&(t.type="candlestick")}))}r(ap,el,!0);var lp=["itemstyle","bordercolor"],up=["itemstyle","bordercolor0"],hp=["itemstyle","color"],cp=["itemstyle","color0"],pp={seriestype:"candlestick",plan:yg(),performrawseries:!0,reset:function(t,e){function n(t,e){return e.get(t>0?hp:cp)}function i(t,e){return e.get(t>0?lp:up)}if(!e.isseriesfiltered(t))return!t.pipelinecontext.large&&{progress:function(t,e){for(var r;null!=(r=t.next());){var o=e.getitemmodel(r),a=e.getitemlayout(r).sign,s=o.getitemstyle();s.fill=n(a,o),s.stroke=i(a,o)||s.fill,a(e.ensureuniqueitemvisual(r,"style"),s)}}}}},dp={seriestype:"candlestick",plan:yg(),reset:function(t){var e=t.coordinatesystem,n=t.getdata(),i=function(t,e){var n,i=t.getbaseaxis(),r="category"===i.type?i.getbandwidth():(n=i.getextent(),math.abs(n[1]-n[0])/e.count()),o=er(rt(t.get("barmaxwidth"),r),r),a=er(rt(t.get("barminwidth"),1),r),s=t.get("barwidth");return null!=s?er(s,r):math.max(math.min(r/2,o),a)}(t,n),r=["x","y"],o=n.getdimensionindex(n.mapdimension(r[0])),a=z(n.mapdimensionsall(r[1]),n.getdimensionindex,n),s=a[0],l=a[1],u=a[2],h=a[3];if(n.setlayout({candlewidth:i,issimplebox:i<=1.3}),!(o<0||a.length<4))return{progress:t.pipelinecontext.large?function(t,n){var i,r,a=sx(4*t.count),c=0,p=[],d=[],f=n.getstore();for(;null!=(r=t.next());){var g=f.get(o,r),y=f.get(s,r),v=f.get(l,r),m=f.get(u,r),x=f.get(h,r);isnan(g)||isnan(m)||isnan(x)?(a[c++]=nan,c+=3):(a[c++]=fp(f,r,y,v,l),p[0]=g,p[1]=m,i=e.datatopoint(p,null,d),a[c++]=i?i[0]:nan,a[c++]=i?i[1]:nan,p[1]=x,i=e.datatopoint(p,null,d),a[c++]=i?i[1]:nan)}n.setlayout("largepoints",a)}:function(t,n){var r,a=n.getstore();for(;null!=(r=t.next());){var c=a.get(o,r),p=a.get(s,r),d=a.get(l,r),f=a.get(u,r),g=a.get(h,r),y=math.min(p,d),v=math.max(p,d),m=s(y,c),x=s(v,c),_=s(f,c),b=s(g,c),w=[];m(w,x,0),m(w,m,1),w.push(t(b),t(x),t(_),t(m)),n.setitemlayout(r,{sign:fp(a,r,p,d,l),initbaseline:p>d?x[1]:m[1],ends:w,brushrect:i(f,g,c)})}function s(t,n){var i=[];return i[0]=n,i[1]=t,isnan(n)||isnan(t)?[nan,nan]:e.datatopoint(i)}function m(t,e,n){var r=e.slice(),o=e.slice();r[0]=mh(r[0]+i/2,1,!1),o[0]=mh(o[0]-i/2,1,!0),n?t.push(r,o):t.push(o,r)}function i(t,e,n){var r=s(t,n),o=s(e,n);return r[0]-=i/2,o[0]-=i/2,{x:r[0],y:r[1],width:i,height:o[1]-r[1]}}function t(t){return t[0]=mh(t[0],1),t}}}}};function fp(t,e,n,i,r){return n>i?-1:n0?t.get(r,e-1)<=i?1:-1:1}function gp(t,e){var n=e.rippleeffectcolor||e.color;t.eachchild((function(t){t.attr({z:e.z,zlevel:e.zlevel,style:{stroke:"stroke"===e.brushtype?n:null,fill:"fill"===e.brushtype?n:null}})}))}var yp=function(t){function e(e,n){var i=t.call(this)||this,r=new yw(e,n),o=new cr;return i.add(r),i.add(o),i.updatedata(e,n),i}return n(e,t),e.prototype.stopeffectanimation=function(){this.childat(1).removeall()},e.prototype.starteffectanimation=function(t){for(var e=t.symboltype,n=t.color,i=t.ripplenumber,r=this.childat(1),o=0;o0&&(o=this._getlinelength(i)/s*1e3),o!==this._period||a!==this._loop){i.stopanimation();var u=void 0;u=u(l)?l(n):l,i.__t>0&&(u=-o*i.__t),this._animatesymbol(i,o,u,a)}this._period=o,this._loop=a}},e.prototype._animatesymbol=function(t,e,n,i){if(e>0){t.__t=0;var r=this,o=t.animate("",i).when(e,{__t:1}).delay(n).during((function(){r._updatesymbolposition(t)}));i||o.done((function(){r.remove(t)})),o.start()}},e.prototype._getlinelength=function(t){return et(t.__p1,t.__cp1)+et(t.__cp1,t.__p2)},e.prototype._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]},e.prototype.updatedata=function(t,e,n){this.childat(0).updatedata(t,e,n),this._updateeffectsymbol(t,e)},e.prototype._updatesymbolposition=function(t){var e=t.__p1,n=t.__p2,i=t.__cp1,r=t.__t,o=[t.x,t.y],a=o.slice(),s=ke,l=$e;o[0]=s(e[0],i[0],n[0],r),o[1]=s(e[1],i[1],n[1],r);var u=l(e[0],i[0],n[0],r),h=l(e[1],i[1],n[1],r);t.rotation=-math.atan2(h,u)-math.pi/2,"line"!==this._symboltype&&"rect"!==this._symboltype&&"roundrect"!==this._symboltype||(void 0!==t.__lastt&&t.__lastt=0&&!(i[o]<=e);o--);o=math.min(o,r-2)}else{for(o=a;oe);o++);o=math.min(o-1,r-2)}var s=(e-i[o])/(i[o+1]-i[o]),l=n[o],u=n[o+1];t.x=l[0]*(1-s)+s*u[0],t.y=l[1]*(1-s)+s*u[1];var h=u[0]-l[0],c=u[1]-l[1];t.rotation=-math.atan2(c,h)-math.pi/2,this._lastframe=o,this._lastframepercent=e,t.ignore=!1}},e}(xp),wp=function(){this.polyline=!1,this.curveness=0,this.segs=[]},sp=function(t){function e(e){var n=t.call(this,e)||this;return n._off=0,n.hoverdataidx=-1,n}return n(e,t),e.prototype.reset=function(){this.notclear=!1,this._off=0},e.prototype.getdefaultstyle=function(){return{stroke:"#000",fill:null}},e.prototype.getdefaultshape=function(){return new wp},e.prototype.buildpath=function(t,e){var n,i=e.segs,r=e.curveness;if(e.polyline)for(n=this._off;n0){t.moveto(i[n++],i[n++]);for(var a=1;a0){var c=(s+u)/2-(l-h)*r,p=(l+h)/2-(u-s)*r;t.quadraticcurveto(c,p,u,h)}else t.lineto(u,h)}this.incremental&&(this._off=n,this.notclear=!0)},e.prototype.finddataindex=function(t,e){var n=this.shape,i=n.segs,r=n.curveness,o=this.style.linewidth;if(n.polyline)for(var a=0,s=0;s0)for(var u=i[s++],h=i[s++],c=1;c0){if(ja(u,h,(u+p)/2-(h-d)*r,(h+d)/2-(p-u)*r,p,d,o,t,e))return a}else if(ka(u,h,p,d,o,t,e))return a;a++}return-1},e.prototype.contain=function(t,e){var n=this.transformcoordtolocal(t,e),i=this.getboundingrect();return t=n[0],e=n[1],i.contain(t,e)?(this.hoverdataidx=this.finddataindex(t,e))>=0:(this.hoverdataidx=-1,!1)},e.prototype.getboundingrect=function(){var t=this._rect;if(!t){for(var e=this.shape.segs,n=1/0,i=1/0,r=-1/0,o=-1/0,a=0;a0&&(o.dataindex=n+t.__startindex)}))},t.prototype._clear=function(){this._newadded=[],this.group.removeall()},t}(),ip={seriestype:"lines",plan:yg(),reset:function(t){var e=t.coordinatesystem;if(e){var n=t.get("polyline"),i=t.pipelinecontext.large;return{progress:function(r,o){var a=[];if(i){var s=void 0,l=r.end-r.start;if(n){for(var u=0,h=r.start;h0&&(l||s.configlayer(o,{motionblur:!0,lastframealpha:math.max(math.min(a/10+.9,1),0)})),r.updatedata(i);var u=t.get("clip",!0)&&ls(t.coordinatesystem,!1,t);u?this.group.setclippath(u):this.group.removeclippath(),this._lastzlevel=o,this._finished=!0},e.prototype.incrementalpreparerender=function(t,e,n){var i=t.getdata();this._updatelinedraw(i,t).incrementalprepareupdate(i),this._clearlayer(n),this._finished=!1},e.prototype.incrementalrender=function(t,e,n){this._linedraw.incrementalupdate(t,e.getdata()),this._finished=t.end===e.getdata().count()},e.prototype.eachrendered=function(t){this._linedraw&&this._linedraw.eachrendered(t)},e.prototype.updatetransform=function(t,e,n){var i=t.getdata(),r=t.pipelinecontext;if(!this._finished||r.large||r.progressiverender)return{update:!0};var o=ip.reset(t,e,n);o.progress&&o.progress({start:0,end:i.count(),count:i.count()},i),this._linedraw.updatelayout(),this._clearlayer(n)},e.prototype._updatelinedraw=function(t,e){var n=this._linedraw,i=this._showeffect(e),r=!!e.get("polyline"),o=e.pipelinecontext.large;return n&&i===this._haseffet&&r===this._ispolyline&&o===this._islargedraw||(n&&n.remove(),n=this._linedraw=o?new mp:new ga(r?i?bp:_p:i?xp:fa),this._haseffet=i,this._ispolyline=r,this._islargedraw=o),this.group.add(n.group),n},e.prototype._showeffect=function(t){return!!t.get(["effect","show"])},e.prototype._clearlayer=function(t){var e=t.getzr();"svg"===e.painter.gettype()||null==this._lastzlevel||e.painter.getlayer(this._lastzlevel).clear(!0)},e.prototype.remove=function(t,e){this._linedraw&&this._linedraw.remove(),this._linedraw=null,this._clearlayer(e)},e.prototype.dispose=function(t,e){this.remove(t,e)},e.type="lines",e}(xg),cp="undefined"==typeof uint32array?array:uint32array,dp="undefined"==typeof float64array?array:float64array;function ap(t){var e=t.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(t.data=z(e,(function(t){var e={coords:[t[0].coord,t[1].coord]};return t[0].name&&(e.fromname=t[0].name),t[1].name&&(e.toname=t[1].name),d([e,t[0],t[1]])})))}var kp=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.visualstyleaccesspath="linestyle",n.visualdrawtype="stroke",n}return n(e,t),e.prototype.init=function(e){e.data=e.data||[],ap(e);var n=this._processflatcoordsarray(e.data);this._flatcoords=n.flatcoords,this._flatcoordsoffset=n.flatcoordsoffset,n.flatcoords&&(e.data=new float32array(n.count)),t.prototype.init.apply(this,arguments)},e.prototype.mergeoption=function(e){if(ap(e),e.data){var n=this._processflatcoordsarray(e.data);this._flatcoords=n.flatcoords,this._flatcoordsoffset=n.flatcoordsoffset,n.flatcoords&&(e.data=new float32array(n.count))}t.prototype.mergeoption.apply(this,arguments)},e.prototype.appenddata=function(t){var e=this._processflatcoordsarray(t.data);e.flatcoords&&(this._flatcoords?(this._flatcoords=gt(this._flatcoords,e.flatcoords),this._flatcoordsoffset=gt(this._flatcoordsoffset,e.flatcoordsoffset)):(this._flatcoords=e.flatcoords,this._flatcoordsoffset=e.flatcoordsoffset),t.data=new float32array(e.count)),this.getrawdata().appenddata(t.data)},e.prototype._getcoordsfromitemmodel=function(t){var e=this.getdata().getitemmodel(t),n=e.option instanceof array?e.option:e.getshallow("coords");return n},e.prototype.getlinecoordscount=function(t){return this._flatcoordsoffset?this._flatcoordsoffset[2*t+1]:this._getcoordsfromitemmodel(t).length},e.prototype.getlinecoords=function(t,e){if(this._flatcoordsoffset){for(var n=this._flatcoordsoffset[2*t],i=this._flatcoordsoffset[2*t+1],r=0;r ")})},e.prototype.preventincremental=function(){return!!this.get(["effect","show"])},e.prototype.getprogressive=function(){var t=this.option.progressive;return null==t?this.option.large?1e4:this.get("progressive"):t},e.prototype.getprogressivethreshold=function(){var t=this.option.progressivethreshold;return null==t?this.option.large?2e4:this.get("progressivethreshold"):t},e.prototype.getzlevelkey=function(){var t=this.getmodel("effect"),e=t.get("traillength");return this.getdata().count()>this.getprogressivethreshold()?this.id:t.get("show")&&e>0?e+"":""},e.type="series.lines",e.dependencies=["grid","polar","geo","calendar"],e.defaultoption={coordinatesystem:"geo",z:2,legendhoverlink:!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}},e}(sg);function lp(t){return t instanceof array||(t=[t,t]),t}var pp={seriestype:"lines",reset:function(t){var e=lp(t.get("symbol")),n=lp(t.get("symbolsize")),i=t.getdata();return i.setvisual("fromsymbol",e&&e[0]),i.setvisual("tosymbol",e&&e[1]),i.setvisual("fromsymbolsize",n&&n[0]),i.setvisual("tosymbolsize",n&&n[1]),{dataeach:i.hasitemoption?function(t,e){var n=t.getitemmodel(e),i=lp(n.getshallow("symbol",!0)),r=lp(n.getshallow("symbolsize",!0));i[0]&&t.setitemvisual(e,"fromsymbol",i[0]),i[1]&&t.setitemvisual(e,"tosymbol",i[1]),r[0]&&t.setitemvisual(e,"fromsymbolsize",r[0]),r[1]&&t.setitemvisual(e,"tosymbolsize",r[1])}:null}}};var op=function(){function t(){this.blursize=30,this.pointsize=20,this.maxopacity=1,this.minopacity=0,this._gradientpixels={inrange:null,outofrange:null};var t=h.createcanvas();this.canvas=t}return t.prototype.update=function(t,e,n,i,r,o){var a=this._getbrush(),s=this._getgradient(r,"inrange"),l=this._getgradient(r,"outofrange"),u=this.pointsize+this.blursize,h=this.canvas,c=h.getcontext("2d"),p=t.length;h.width=e,h.height=n;for(var d=0;d0){var i=o(v)?s:l;v>0&&(v=v*s+w),x[_++]=i[m],x[_++]=i[m+1],x[_++]=i[m+2],x[_++]=i[m+3]*v*256}else _+=4}return c.putimagedata(m,0,0),h},t.prototype._getbrush=function(){var t=this._brushcanvas||(this._brushcanvas=h.createcanvas()),e=this.pointsize+this.blursize,n=2*e;t.width=n,t.height=n;var i=t.getcontext("2d");return i.clearrect(0,0,n,n),i.shadowoffsetx=n,i.shadowblur=this.blursize,i.shadowcolor="#000",i.beginpath(),i.arc(-e,e,this.pointsize,0,2*math.pi,!0),i.closepath(),i.fill(),t},t.prototype._getgradient=function(t,e){for(var n=this._gradientpixels,i=n[e]||(n[e]=new uint8clampedarray(1024)),r=[0,0,0,0],o=0,a=0;a<256;a++)t[e](a/255,!0,r),i[o++]=r[0],i[o++]=r[1],i[o++]=r[2],i[o++]=r[3];return i},t}();function rp(t){var e=t.dimensions;return"lng"===e[0]&&"lat"===e[1]}var np=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.render=function(t,e,n){var i;e.eachcomponent("visualmap",(function(e){e.eachtargetseries((function(n){n===t&&(i=e)}))})),this._progressiveels=null,this.group.removeall();var r=t.coordinatesystem;"cartesian2d"===r.type||"calendar"===r.type?this._renderoncartesianandcalendar(t,n,0,t.getdata().count()):rp(r)&&this._renderongeo(r,t,i,n)},e.prototype.incrementalpreparerender=function(t,e,n){this.group.removeall()},e.prototype.incrementalrender=function(t,e,n,i){var r=e.coordinatesystem;r&&(rp(r)?this.render(e,n,i):(this._progressiveels=[],this._renderoncartesianandcalendar(e,i,t.start,t.end,!0)))},e.prototype.eachrendered=function(t){vh(this._progressiveels||this.group,t)},e.prototype._renderoncartesianandcalendar=function(t,e,n,i,r){var o,a,s,l,u=t.coordinatesystem,h=us(u,"cartesian2d");if(h){var c=u.getaxis("x"),p=u.getaxis("y");0,o=c.getbandwidth()+.5,a=p.getbandwidth()+.5,s=c.scale.getextent(),l=p.scale.getextent()}for(var d=this.group,f=t.getdata(),g=t.getmodel(["emphasis","itemstyle"]).getitemstyle(),y=t.getmodel(["blur","itemstyle"]).getitemstyle(),v=t.getmodel(["select","itemstyle"]).getitemstyle(),m=t.get(["itemstyle","borderradius"]),x=yh(t),_=t.getmodel("emphasis"),b=_.get("focus"),w=_.get("blurscope"),s=_.get("disabled"),m=h?[f.mapdimension("x"),f.mapdimension("y"),f.mapdimension("value")]:[f.mapdimension("time"),f.mapdimension("value")],i=n;is[1]||al[1])continue;var k=u.datatopoint([d,a]);t=new cs({shape:{x:k[0]-o/2,y:k[1]-a/2,width:o,height:a},style:c})}else{if(isnan(f.get(m[1],i)))continue;t=new cs({z2:1,shape:u.datatorect([f.get(m[0],i)]).contentshape,style:c})}if(f.hasitemoption){var l=f.getitemmodel(i),p=l.getmodel("emphasis");g=p.getmodel("itemstyle").getitemstyle(),y=l.getmodel(["blur","itemstyle"]).getitemstyle(),v=l.getmodel(["select","itemstyle"]).getitemstyle(),m=l.get(["itemstyle","borderradius"]),b=p.get("focus"),w=p.get("blurscope"),s=p.get("disabled"),x=yh(l)}t.shape.r=m;var o=t.getrawvalue(i),r="-";o&&null!=o[2]&&(r=o[2]+""),hh(t,x,{labelfetcher:t,labeldataindex:i,defaultopacity:c.opacity,defaulttext:r}),t.ensurestate("emphasis").style=g,t.ensurestate("blur").style=y,t.ensurestate("select").style=v,rl(t,b,w,s),t.incremental=r,r&&(t.states.emphasis.hoverlayer=!0),d.add(t),f.setitemgraphicel(i,t),this._progressiveels&&this._progressiveels.push(t)}},e.prototype._renderongeo=function(t,e,n,i){var r=n.targetvisuals.inrange,o=n.targetvisuals.outofrange,a=e.getdata(),s=this._hmlayer||this._hmlayer||new op;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),p=math.min(l.width+l.x,i.getwidth()),d=math.min(l.height+l.y,i.getheight()),f=p-h,g=d-c,y=[a.mapdimension("lng"),a.mapdimension("lat"),a.mapdimension("value")],v=a.maparray(y,(function(e,n,i){var r=t.datatopoint([e,n]);return r[0]-=h,r[1]-=c,r.push(i),r})),m=n.getextent(),x="visualmap.continuous"===n.type?function(t,e){var n=t[1]-t[0];return e=[(e[0]-t[0])/n,(e[1]-t[0])/n],function(t){return t>=e[0]&&t<=e[1]}}(m,n.option.range):function(t,e,n){var i=t[1]-t[0],r=(e=z(e,(function(e){return{interval:[(e.interval[0]-t[0])/i,(e.interval[1]-t[0])/i]}}))).length,o=0;return function(t){var i;for(i=o;i=0;i--){var a;if((a=e[i].interval)[0]<=t&&t<=a[1]){o=i;break}}return i>=0&&i0?1:-1}(n,o,r,i,c),function(t,e,n,i,r,o,a,s,l,u){var h,c=l.valuedim,p=l.categorydim,d=math.abs(n[p.wh]),f=t.getitemvisual(e,"symbolsize");h=y(f)?f.slice():null==f?["100%","100%"]:[f,f];h[p.index]=er(h[p.index],d),h[c.index]=er(h[c.index],i?d:math.abs(o)),u.symbolsize=h,(u.symbolscale=[h[0]/s,h[1]/s])[c.index]*=(l.ishorizontal?-1:1)*a}(t,e,r,o,0,c.boundinglength,c.pxsign,u,i,c),function(t,e,n,i,r){var o=t.get(zp)||0;o&&(bp.attr({scalex:e[0],scaley:e[1],rotation:n}),bp.updatetransform(),o/=bp.getlinescale(),o*=e[i.valuedim.index]);r.valuelinewidth=o||0}(n,c.symbolscale,l,i,c);var p=c.symbolsize,d=oy(n.get("symboloffset"),p);return function(t,e,n,i,r,o,a,s,l,u,h,c){var p=h.categorydim,d=h.valuedim,f=c.pxsign,g=math.max(e[d.index]+s,0),y=g;if(i){var v=math.abs(l),m=it(t.get("symbolmargin"),"15%")+"",x=!1;m.lastindexof("!")===m.length-1&&(x=!0,m=m.slice(0,m.length-1));var _=er(m,e[d.index]),b=math.max(g+2*_,0),w=x?0:2*_,s=eo(i),m=s?i:io((v+w)/b);b=g+2*(_=(v-m*g)/2/(x?m:math.max(m-1,1))),w=x?0:2*_,s||"fixed"===i||(m=u?io((math.abs(u)+w)/b):0),y=m*b-w,c.repeattimes=m,c.symbolmargin=_}var i=f*(y/2),t=c.pathposition=[];t[p.index]=n[p.wh]/2,t[d.index]="start"===a?i:"end"===a?l-i:l/2,o&&(t[0]+=o[0],t[1]+=o[1]);var c=c.bundleposition=[];c[p.index]=n[p.xy],c[d.index]=n[d.xy];var d=c.barrectshape=a({},n);d[d.wh]=f*math.max(math.abs(n[d.wh]),math.abs(t[d.index]+i)),d[p.wh]=n[p.wh];var k=c.clipshape={};k[p.xy]=-n[p.xy],k[p.wh]=h.ecsize[p.wh],k[d.xy]=0,k[d.wh]=n[d.wh]}(n,p,r,o,0,d,s,c.valuelinewidth,c.boundinglength,c.repeatcutlength,i,c),c}function wp(t,e){return t.toglobalcoord(t.datatocoord(t.scale.parse(e)))}function hp(t){var e=t.symbolpatternsize,n=ly(t.symboltype,-e/2,-e/2,e,e);return n.attr({culling:!0}),"image"!==n.type&&n.setstyle({strokenoscale:!0}),n}function yp(t,e,n,i){var r=t.__pictorialbundle,o=n.symbolsize,a=n.valuelinewidth,s=n.pathposition,l=e.valuedim,u=n.repeattimes||0,h=0,c=o[e.valuedim.index]+a+2*n.symbolmargin;for(to(t,(function(t){t.__pictorialanimationindex=h,t.__pictorialrepeattimes=u,h0:i<0)&&(r=u-1-t),e[l.index]=c*(r-u/2+.5)+s[l.index],{x:e[0],y:e[1],scalex:n.symbolscale[0],scaley:n.symbolscale[1],rotation:n.rotation}}}function up(t,e,n,i){var r=t.__pictorialbundle,o=t.__pictorialmainpath;o?eo(o,null,{x:n.pathposition[0],y:n.pathposition[1],scalex:n.symbolscale[0],scaley:n.symbolscale[1],rotation:n.rotation},n,i):(o=t.__pictorialmainpath=hp(n),r.add(o),eo(o,{x:n.pathposition[0],y:n.pathposition[1],scalex:0,scaley:0,rotation:n.rotation},{scalex:n.symbolscale[0],scaley:n.symbolscale[1]},n,i))}function xp(t,e,n){var i=a({},e.barrectshape),r=t.__pictorialbarrect;r?eo(r,null,{shape:i},e,n):((r=t.__pictorialbarrect=new cs({z2:2,shape:i,silent:!0,style:{stroke:"transparent",fill:"transparent",linewidth:0}})).disablemorphing=!0,t.add(r))}function zp(t,e,n,i){if(n.symbolclip){var r=t.__pictorialclippath,o=a({},n.clipshape),a=e.valuedim,s=n.animationmodel,l=n.dataindex;if(r)rh(r,{shape:o},s,l);else{o[a.wh]=0,r=new cs({shape:o}),t.__pictorialbundle.setclippath(r),t.__pictorialclippath=r;var u={};u[a.wh]=n.clipshape[a.wh],bh[i?"updateprops":"initprops"](r,{shape:u},s,l)}}}function jp(t,e){var n=t.getitemmodel(e);return n.getanimationdelayparams=qp,n.isanimationenabled=kp,n}function qp(t){return{index:t.__pictorialanimationindex,count:t.__pictorialrepeattimes}}function kp(){return this.parentmodel.isanimationenabled()&&!!this.getshallow("animation")}function $p(t,e,n,i){var r=new cr,o=new cr;return r.add(o),r.__pictorialbundle=o,o.x=n.bundleposition[0],o.y=n.bundleposition[1],n.symbolrepeat?yp(r,e,n):up(r,0,n),xp(r,n,i),zp(r,e,n,i),r.__pictorialshapestr=qp(t,n),r.__pictorialsymbolmeta=n,r}function jp(t,e,n,i){var r=i.__pictorialbarrect;r&&r.removetextcontent();var o=[];to(i,(function(t){o.push(t)})),i.__pictorialmainpath&&o.push(i.__pictorialmainpath),i.__pictorialclippath&&(n=null),e(o,(function(t){sh(t,{scalex:0,scaley:0},n,e,(function(){i.parent&&i.parent.remove(i)}))})),t.setitemgraphicel(e,null)}function qp(t,e){return[t.getitemvisual(e.dataindex,"symbol")||"none",!!e.symbolrepeat,!!e.symbolclip].join(":")}function to(t,e,n){e(t.__pictorialbundle.children(),(function(i){i!==t.__pictorialbarrect&&e.call(n,i)}))}function eo(t,e,n,i,r,o){e&&t.attr(e),i.symbolclip&&!r?n&&t.attr(n):n&&bh[r?"updateprops":"initprops"](t,n,i.animationmodel,i.dataindex,o)}function no(t,e,n){var i=n.dataindex,r=n.itemmodel,o=r.getmodel("emphasis"),a=o.getmodel("itemstyle").getitemstyle(),s=r.getmodel(["blur","itemstyle"]).getitemstyle(),l=r.getmodel(["select","itemstyle"]).getitemstyle(),u=r.getshallow("cursor"),h=o.get("focus"),c=o.get("blurscope"),p=o.get("scale");to(t,(function(t){if(t instanceof _s){var e=t.style;t.usestyle(a({image:e.image,x:e.x,y:e.y,width:e.width,height:e.height},n.style))}else t.usestyle(n.style);var i=t.ensurestate("emphasis");i.style=a,p&&(i.scalex=1.1*t.scalex,i.scaley=1.1*t.scaley),t.ensurestate("blur").style=s,t.ensurestate("select").style=l,u&&(t.cursor=u),t.z2=n.z2}));var d=e.valuedim.posdesc[+(n.boundinglength>0)];hh(t.__pictorialbarrect,yh(r),{labelfetcher:e.seriesmodel,labeldataindex:i,defaulttext:ww(e.seriesmodel.getdata(),i),inheritcolor:n.style.fill,defaultopacity:n.style.opacity,defaultoutsideposition:d}),rl(t,h,c,o.get("disabled"))}function io(t){var e=math.round(t);return math.abs(t-e)<1e-4?e:math.ceil(t)}var ro=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.hassymbolvisual=!0,n.defaultsymbol="roundrect",n}return n(e,t),e.prototype.getinitialdata=function(e){return e.stack=null,t.prototype.getinitialdata.apply(this,arguments)},e.type="series.pictorialbar",e.dependencies=["grid"],e.defaultoption=yc(is.defaultoption,{symbol:"circle",symbolsize:null,symbolrotate:null,symbolposition:null,symboloffset:null,symbolmargin:null,symbolrepeat:!1,symbolrepeatdirection:"end",symbolclip:!1,symbolboundingdata:null,symbolpatternsize:400,bargap:"-100%",progressive:0,emphasis:{scale:!1},select:{itemstyle:{bordercolor:"#212121"}}}),e}(is);var oo=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._layers=[],n}return n(e,t),e.prototype.render=function(t,e,n){var i=t.getdata(),r=this,o=this.group,a=t.getlayerseries(),s=i.getlayout("layoutinfo"),l=s.rect,u=s.boundarygap;function h(t){return t.name}o.x=0,o.y=l.y+u[0];var c=new im(this._layersseries||[],a,h,h),p=[];function d(e,n,s){var l=r._layers;if("remove"!==e){for(var u,h,c=[],d=[],f=a[n].indices,g=0;go&&(o=s),i.push(s)}for(var u=0;uo&&(o=c)}return{y0:r,max:o}}(l),h=u.y0,c=n/u.max,p=o.length,d=o[0].indices.length,f=0;fmath.pi/2?"right":"left"):s&&"center"!==s?"left"===s?(m=r.r0+w,a>math.pi/2&&(s="right")):"right"===s&&(m=r.r-w,a>math.pi/2&&(s="left")):(m=o===2*math.pi&&0===r.r0?0:(r.r+r.r0)/2,s="center"),g.style.align=s,g.style.verticalalign=f(p,"verticalalign")||"middle",g.x=m*s+r.cx,g.y=m*l+r.cy;var m=f(p,"rotate"),i=0;"radial"===m?(i=-a)<-math.pi/2&&(i+=math.pi):"tangential"===m?(i=math.pi/2-a)>math.pi/2?i-=math.pi:i<-math.pi/2&&(i+=math.pi):j(m)&&(i=m*math.pi/180),g.rotation=i})),h.dirtystyle()},e}(cu),ho="sunburstroottonode",co="sunbursthighlight";var po=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.render=function(t,e,n,i){var r=this;this.seriesmodel=t,this.api=n,this.ecmodel=e;var o=t.getdata(),a=o.tree.root,s=t.getviewroot(),l=this.group,u=t.get("renderlabelforzerodata"),h=[];s.eachnode((function(t){h.push(t)}));var c=this._oldchildren||[];!function(i,r){if(0===i.length&&0===r.length)return;function s(t){return t.getid()}function h(s,h){!function(i,r){u||!i||i.getvalue()||(i=null);if(i!==a&&r!==a)if(r&&r.piece)i?(r.piece.updatedata(!1,i,t,e,n),o.setitemgraphicel(i.dataindex,r.piece)):function(t){if(!t)return;t.piece&&(l.remove(t.piece),t.piece=null)}(r);else if(i){var s=new uo(i,t,e,n);l.add(s),o.setitemgraphicel(i.dataindex,s)}}(null==s?null:i[s],null==h?null:r[h])}new im(r,i,s,s).add(h).update(h).remove(h(h,null)).execute()}(h,c),function(i,o){o.depth>0?(r.virtualpiece?r.virtualpiece.updatedata(!1,i,t,e,n):(r.virtualpiece=new uo(i,t,e,n),l.add(r.virtualpiece)),o.piece.off("click"),r.virtualpiece.on("click",(function(t){r._roottonode(o.parentnode)}))):r.virtualpiece&&(l.remove(r.virtualpiece),r.virtualpiece=null)}(a,s),this._initevents(),this._oldchildren=h},e.prototype._initevents=function(){var t=this;this.group.off("click"),this.group.on("click",(function(e){var n=!1;t.seriesmodel.getviewroot().eachnode((function(i){if(!n&&i.piece&&i.piece===e.target){var r=i.getmodel().get("nodeclick");if("roottonode"===r)t._roottonode(i);else if("link"===r){var o=i.getmodel(),a=o.get("link");if(a)dp(a,o.get("target",!0)||"_blank")}n=!0}}))}))},e.prototype._roottonode=function(t){t!==this.seriesmodel.getviewroot()&&this.api.dispatchaction({type:ho,from:this.uid,seriesid:this.seriesmodel.id,targetnode:t})},e.prototype.containpoint=function(t,e){var n=e.getdata().getitemlayout(0);if(n){var i=t[0]-n.cx,r=t[1]-n.cy,o=math.sqrt(i*i+r*r);return o<=n.r&&o>=n.r0}},e.type="sunburst",e}(xg),do=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.ignorestyleondata=!0,n}return n(e,t),e.prototype.getinitialdata=function(t,e){var n={name:t.name,children:t.data};fo(n);var i=this._levelmodels=z(t.levels||[],(function(t){return new dc(t,this,e)}),this),r=ac.createtree(n,this,(function(t){t.wrapmethod("getitemmodel",(function(t,e){var n=r.getnodebydataindex(e),o=i[n.depth];return o&&(t.parentmodel=o),t}))}));return r.data},e.prototype.optionupdated=function(){this.resetviewroot()},e.prototype.getdataparams=function(e){var n=t.prototype.getdataparams.apply(this,arguments),i=this.getdata().tree.getnodebydataindex(e);return n.treepathinfo=oc(i,this),n},e.prototype.getlevelmodel=function(t){return this._levelmodels&&this._levelmodels[t.depth]},e.prototype.getviewroot=function(){return this._viewroot},e.prototype.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)},e.prototype.enableariadecal=function(){bc(this)},e.type="series.sunburst",e.defaultoption={z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startangle:90,minangle:0,stillshowzerosum:!0,nodeclick:"roottonode",renderlabelforzerodata:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemstyle:{borderwidth:1,bordercolor:"white",bordertype:"solid",shadowblur:0,shadowcolor:"rgba(0, 0, 0, 0.2)",shadowoffsetx:0,shadowoffsety:0,opacity:1},emphasis:{focus:"descendant"},blur:{itemstyle:{opacity:.2},label:{opacity:.1}},animationtype:"expansion",animationduration:1e3,animationdurationupdate:500,data:[],sort:"desc"},e}(sg);function fo(t){var e=0;e(t.children,(function(t){fo(t);var n=t.value;y(n)&&(n=n[0]),e+=n}));var n=t.value;y(n)&&(n=n[0]),(null==n||isnan(n))&&(n=e),n<0&&(n=0),y(t.value)?t.value[0]=n:t.value=n}var go=math.pi/180;function yo(t,e,n){e.eachseriesbytype(t,(function(t){var e=t.get("center"),i=t.get("radius");y(i)||(i=[0,i]),y(e)||(e=[e,e]);var r=n.getwidth(),o=n.getheight(),a=math.min(r,o),s=er(e[0],r),l=er(e[1],o),u=er(i[0],a/2),h=er(i[1],a/2),c=-t.get("startangle")*go,p=t.get("minangle")*go,d=t.getdata().tree.root,f=t.getviewroot(),g=f.depth,y=t.get("sort");null!=y&&vo(f,y);var v=0;e(f.children,(function(t){!isnan(t.getvalue())&&v++}));var m=f.getvalue(),x=math.pi/(m||v)*2,_=f.depth>0,b=f.height-(_?-1:1),w=(h-u)/(b||1),s=t.get("clockwise"),m=t.get("stillshowzerosum"),i=s?1:-1,t=function(e,n){if(e){var i=n;if(e!==d){var r=e.getvalue(),o=0===m&&m?x:r*x;o1;)r=r.parentnode;var o=n.getcolorfrompalette(r.name||r.dataindex+"",e);return t.depth>1&&x(o)&&(o=sn(o,(t.depth-1)/(i-1)*.5)),o}(r,t,i.root.height)),a(n.ensureuniqueitemvisual(r.dataindex,"style"),o)}))}))}var xo={color:"fill",bordercolor:"stroke"},_o={symbol:1,symbolsize:1,symbolkeepaspect:1,legendicon:1,visualmeta:1,liftz:1,decal:1},bo=so(),wo=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.optionupdated=function(){this.currentzlevel=this.get("zlevel",!0),this.currentz=this.get("z",!0)},e.prototype.getinitialdata=function(t,e){return rx(null,this)},e.prototype.getdataparams=function(e,n,i){var r=t.prototype.getdataparams.call(this,e,n);return i&&(r.info=bo(i).info),r},e.type="series.custom",e.dependencies=["grid","polar","geo","singleaxis","calendar"],e.defaultoption={coordinatesystem:"cartesian2d",z:2,legendhoverlink:!0,clip:!1},e}(sg);function so(t,e){return e=e||[0,0],z(["x","y"],(function(n,i){var r=this.getaxis(n),o=e[i],a=t[i]/2;return"category"===r.type?r.getbandwidth():math.abs(r.datatocoord(o-a)-r.datatocoord(o+a))}),this)}function mo(t,e){return e=e||[0,0],z([0,1],(function(n){var i=e[n],r=t[n]/2,o=[],a=[];return o[n]=i-r,a[n]=i+r,o[1-n]=a[1-n]=e[1-n],math.abs(this.datatopoint(o)[n]-this.datatopoint(a)[n])}),this)}function io(t,e){var n=this.getaxis(),i=e instanceof array?e[0]:e,r=(t instanceof array?t[0]:t)/2;return"category"===n.type?n.getbandwidth():math.abs(n.datatocoord(i-r)-n.datatocoord(i+r))}function to(t,e){return e=e||[0,0],z(["radius","angle"],(function(n,i){var r=this["get"+n+"axis"](),o=e[i],a=t[i]/2,s="category"===r.type?r.getbandwidth():math.abs(r.datatocoord(o-a)-r.datatocoord(o+a));return"angle"===n&&(s=s*math.pi/180),s}),this)}function co(t,e,n,i){return t&&(t.legacy||!1!==t.legacy&&!n&&!i&&"tspan"!==e&&("text"===e||mt(t,"text")))}function do(t,e,n){var i,r,o,a=t;if("text"===e)o=a;else{o={},mt(a,"text")&&(o.text=a.text),mt(a,"rich")&&(o.rich=a.rich),mt(a,"textfill")&&(o.fill=a.textfill),mt(a,"textstroke")&&(o.stroke=a.textstroke),mt(a,"fontfamily")&&(o.fontfamily=a.fontfamily),mt(a,"fontsize")&&(o.fontsize=a.fontsize),mt(a,"fontstyle")&&(o.fontstyle=a.fontstyle),mt(a,"fontweight")&&(o.fontweight=a.fontweight),r={type:"text",style:o,silent:!0},i={};var s=mt(a,"textposition");n?i.position=s?a.textposition:"inside":s&&(i.position=a.textposition),mt(a,"textposition")&&(i.position=a.textposition),mt(a,"textoffset")&&(i.offset=a.textoffset),mt(a,"textrotation")&&(i.rotation=a.textrotation),mt(a,"textdistance")&&(i.distance=a.textdistance)}return ao(o,t),e(o.rich,(function(t){ao(t,t)})),{textconfig:i,textcontent:r}}function ao(t,e){e&&(e.font=e.textfont||e.font,mt(e,"textstrokewidth")&&(t.linewidth=e.textstrokewidth),mt(e,"textalign")&&(t.align=e.textalign),mt(e,"textverticalalign")&&(t.verticalalign=e.textverticalalign),mt(e,"textlineheight")&&(t.lineheight=e.textlineheight),mt(e,"textwidth")&&(t.width=e.textwidth),mt(e,"textheight")&&(t.height=e.textheight),mt(e,"textbackgroundcolor")&&(t.backgroundcolor=e.textbackgroundcolor),mt(e,"textpadding")&&(t.padding=e.textpadding),mt(e,"textbordercolor")&&(t.bordercolor=e.textbordercolor),mt(e,"textborderwidth")&&(t.borderwidth=e.textborderwidth),mt(e,"textborderradius")&&(t.borderradius=e.textborderradius),mt(e,"textboxshadowcolor")&&(t.shadowcolor=e.textboxshadowcolor),mt(e,"textboxshadowblur")&&(t.shadowblur=e.textboxshadowblur),mt(e,"textboxshadowoffsetx")&&(t.shadowoffsetx=e.textboxshadowoffsetx),mt(e,"textboxshadowoffsety")&&(t.shadowoffsety=e.textboxshadowoffsety))}function ko(t,e,n){var i=t;i.textposition=i.textposition||n.position||"inside",null!=n.offset&&(i.textoffset=n.offset),null!=n.rotation&&(i.textrotation=n.rotation),null!=n.distance&&(i.textdistance=n.distance);var r=i.textposition.indexof("inside")>=0,o=t.fill||"#000";lo(i,e);var a=null==i.textfill;return r?a&&(i.textfill=n.insidefill||"#fff",!i.textstroke&&n.insidestroke&&(i.textstroke=n.insidestroke),!i.textstroke&&(i.textstroke=o),null==i.textstrokewidth&&(i.textstrokewidth=2)):(a&&(i.textfill=t.fill||n.outsidefill||"#000"),!i.textstroke&&n.outsidestroke&&(i.textstroke=n.outsidestroke)),i.text=e.text,i.rich=e.rich,e(e.rich,(function(t){lo(t,t)})),i}function lo(t,e){e&&(mt(e,"fill")&&(t.textfill=e.fill),mt(e,"stroke")&&(t.textstroke=e.fill),mt(e,"linewidth")&&(t.textstrokewidth=e.linewidth),mt(e,"font")&&(t.font=e.font),mt(e,"fontstyle")&&(t.fontstyle=e.fontstyle),mt(e,"fontweight")&&(t.fontweight=e.fontweight),mt(e,"fontsize")&&(t.fontsize=e.fontsize),mt(e,"fontfamily")&&(t.fontfamily=e.fontfamily),mt(e,"align")&&(t.textalign=e.align),mt(e,"verticalalign")&&(t.textverticalalign=e.verticalalign),mt(e,"lineheight")&&(t.textlineheight=e.lineheight),mt(e,"width")&&(t.textwidth=e.width),mt(e,"height")&&(t.textheight=e.height),mt(e,"backgroundcolor")&&(t.textbackgroundcolor=e.backgroundcolor),mt(e,"padding")&&(t.textpadding=e.padding),mt(e,"bordercolor")&&(t.textbordercolor=e.bordercolor),mt(e,"borderwidth")&&(t.textborderwidth=e.borderwidth),mt(e,"borderradius")&&(t.textborderradius=e.borderradius),mt(e,"shadowcolor")&&(t.textboxshadowcolor=e.shadowcolor),mt(e,"shadowblur")&&(t.textboxshadowblur=e.shadowblur),mt(e,"shadowoffsetx")&&(t.textboxshadowoffsetx=e.shadowoffsetx),mt(e,"shadowoffsety")&&(t.textboxshadowoffsety=e.shadowoffsety),mt(e,"textshadowcolor")&&(t.textshadowcolor=e.textshadowcolor),mt(e,"textshadowblur")&&(t.textshadowblur=e.textshadowblur),mt(e,"textshadowoffsetx")&&(t.textshadowoffsetx=e.textshadowoffsetx),mt(e,"textshadowoffsety")&&(t.textshadowoffsety=e.textshadowoffsety))}var po={position:["x","y"],scale:["scalex","scaley"],origin:["originx","originy"]},oo=g(po),ro=(v(ki,(function(t,e){return t[e]=1,t}),{}),ki.join(", "),["","style","shape","extra"]),no=so();function eo(t,e,n,i,r){var o=t+"animation",a=nh(t,i,r)||{},s=no(e).userduring;return a.duration>0&&(a.during=s?w(ho,{el:e,userduring:s}):null,a.settofinal=!0,a.scope=t),a(a,n[o]),a}function zo(t,e,n,i){var r=(i=i||{}).dataindex,o=i.isinit,a=i.clearstyle,s=n.isanimationenabled(),l=no(t),u=e.style;l.userduring=e.during;var h={},c={};if(function(t,e,n){for(var i=0;i=0)){var c=t.getanimationstyleprops(),p=c?c.style:null;if(p){!r&&(r=i.style={});var d=g(n);for(u=0;u0&&t.animatefrom(p,d)}else!function(t,e,n,i,r){if(r){var o=eo("update",t,e,i,n);o.duration>0&&t.animatefrom(r,o)}}(t,e,r||0,n,h);vo(t,e),u?t.dirty():t.markredraw()}function vo(t,e){for(var n=no(t).leavetoprops,i=0;i=0){!o&&(o=i[t]={});var p=g(a);for(h=0;hi[1]&&i.reverse(),{coordsys:{type:"polar",cx:t.cx,cy:t.cy,r:i[1],r0:i[0]},api:{coord:function(i){var r=e.datatoradius(i[0]),o=n.datatoangle(i[1]),a=t.coordtopoint([r,o]);return a.push(r,o*math.pi/180),a},size:w(to,t)}}},calendar:function(t){var e=t.getrect(),n=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:n.start,end:n.end,weeks:n.weeks,daycount:n.allday}},api:{coord:function(e,n){return t.datatopoint(e,n)}}}}};function sr(t){return t instanceof gs}function lr(t){return t instanceof da}var ur=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.render=function(t,e,n,i){this._progressiveels=null;var r=this._data,o=t.getdata(),a=this.group,s=fr(t,o,e,n);r||a.removeall(),o.diff(r).add((function(e){yr(n,null,e,s(e,i),t,a,o)})).remove((function(e){var n=r.getitemgraphicel(e);bo(n,bo(n).option,t)})).update((function(e,l){var u=r.getitemgraphicel(l);yr(n,u,e,s(e,i),t,a,o)})).execute();var l=t.get("clip",!0)?ls(t.coordinatesystem,!1,t):null;l?a.setclippath(l):a.removeclippath(),this._data=o},e.prototype.incrementalpreparerender=function(t,e,n){this.group.removeall(),this._data=null},e.prototype.incrementalrender=function(t,e,n,i,r){var o=e.getdata(),a=fr(e,o,n,i),s=this._progressiveels=[];function l(t){t.isgroup||(t.incremental=!0,t.ensurestate("emphasis").hoverlayer=!0)}for(var u=t.start;u=0?e.getstore().get(r,n):void 0}var o=e.get(i.name,n),a=i&&i.ordinalmeta;return a?a.categories[o]:o},styleemphasis:function(n,i){0;null==i&&(i=s);var r=m(i,$o).getitemstyle(),o=x(i,$o),a=uh(o,null,null,!0,!0);a.text=o.getshallow("show")?ot(t.getformattedlabel(i,$o),t.getformattedlabel(i,jo),ww(e,i)):null;var l=xh(o,null,!0);return b(n,r),r=ko(r,a,l),n&&_(r,n),r.legacy=!0,r},visual:function(t,n){if(null==n&&(n=s),mt(xo,t)){var i=e.getitemvisual(n,"style");return i?i[xo[t]]:null}if(mt(_o,t))return e.getitemvisual(n,t)},barlayout:function(t){if("cartesian2d"===o.type){return function(t){var e=[],n=t.axis,i="axis0";if("category"===n.type){for(var r=n.getbandwidth(),o=0;o=c;p--){bo(e.childat(p),bo(e).option,r)}}(t,c,n,i,r),a>=0?o.replaceat(c,a):o.add(c),c}function mr(t,e,n){var i,r=bo(t),o=e.type,a=e.shape,s=e.style;return n.isuniversaltransitionenabled()||null!=o&&o!==r.customgraphictype||"path"===o&&((i=a)&&(mt(i,"pathdata")||mt(i,"d")))&&ir(a)!==r.custompathdata||"image"===o&&mt(s,"image")&&s.image!==r.customimagepath}function xr(t,e,n){var i=e?_r(t,e):t,r=e?br(t,i,$o):t.style,o=t.type,a=i?i.textconfig:null,s=t.textcontent,l=s?e?_r(s,e):s:null;if(r&&(n.islegacy||co(r,o,!!a,!!l))){n.islegacy=!0;var u=do(r,o,!e);!a&&u.textconfig&&(a=u.textconfig),!l&&u.textcontent&&(l=u.textcontent)}if(!e&&l){var h=l;!h.type&&(h.type="text")}var c=e?n[e]:n.normal;c.cfg=a,c.conopt=l}function _r(t,e){return e?t?t[e]:null:t}function br(t,e,n){var i=e&&e.style;return null==i&&n===$o&&t&&(i=t.styleemphasis),i}function wr(t,e){var n=t&&t.name;return null!=n?n:"e\0\0"+e}function sr(t,e){var n=this.context,i=null!=t?n.newchildren[t]:null,r=null!=e?n.oldchildren[e]:null;vr(n.api,r,n.dataindex,i,n.seriesmodel,n.group)}function mr(t){var e=this.context,n=e.oldchildren[t];bo(n,bo(n).option,e.seriesmodel)}function ir(t){return t&&(t.pathdata||t.d)}var tr=so(),cr=t,dr=w,ar=function(){function t(){this._dragging=!1,this.animationthreshold=15}return t.prototype.render=function(t,e,n,i){var r=e.get("value"),o=e.get("status");if(this._axismodel=t,this._axispointermodel=e,this._api=n,i||this._lastvalue!==r||this._laststatus!==o){this._lastvalue=r,this._laststatus=o;var a=this._group,s=this._handle;if(!o||"hide"===o)return a&&a.hide(),void(s&&s.hide());a&&a.show(),s&&s.show();var l={};this.makeeloption(l,r,t,e,n);var u=l.graphickey;u!==this._lastgraphickey&&this.clear(n),this._lastgraphickey=u;var h=this._moveanimation=this.determineanimation(t,e);if(a){var c=h(kr,e,h);this.updatepointerel(a,l,c),this.updatelabelel(a,l,c,e)}else a=this._group=new cr,this.createpointerel(a,l,t,e),this.createlabelel(a,l,t,e),n.getzr().add(a);rr(a,e,!0),this._renderhandle(r)}},t.prototype.remove=function(t){this.clear(t)},t.prototype.dispose=function(t){this.clear(t)},t.prototype.determineanimation=function(t,e){var n=e.get("animation"),i=t.axis,r="category"===i.type,o=e.get("snap");if(!o&&!r)return!1;if("auto"===n||null==n){var a=this.animationthreshold;if(r&&i.getbandwidth()>a)return!0;if(o){var s=km(t).seriesdatacount,l=i.getextent();return math.abs(l[0]-l[1])/s>a}return!1}return!0===n},t.prototype.makeeloption=function(t,e,n,i,r){},t.prototype.createpointerel=function(t,e,n,i){var r=e.pointer;if(r){var o=tr(t).pointerel=new bh[r.type](cr(e.pointer));t.add(o)}},t.prototype.createlabelel=function(t,e,n,i){if(e.label){var r=tr(t).labelel=new ks(cr(e.label));t.add(r),pr(r,i)}},t.prototype.updatepointerel=function(t,e,n){var i=tr(t).pointerel;i&&e.pointer&&(i.setstyle(e.pointer.style),n(i,{shape:e.pointer.shape}))},t.prototype.updatelabelel=function(t,e,n,i){var r=tr(t).labelel;r&&(r.setstyle(e.label.style),n(r,{x:e.label.x,y:e.label.y}),pr(r,i))},t.prototype._renderhandle=function(t){if(!this._dragging&&this.updatehandletransform){var e,n=this._axispointermodel,i=this._api.getzr(),r=this._handle,o=n.getmodel("handle"),a=n.get("status");if(!o.get("show")||!a||"hide"===a)return r&&i.remove(r),void(this._handle=null);this._handle||(e=!0,r=this._handle=ph(o.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){se(t.event)},onmousedown:dr(this._onhandledragmove,this,0,0),drift:dr(this._onhandledragmove,this),ondragend:dr(this._onhandledragend,this)}),i.add(r)),rr(r,n,!1),r.setstyle(o.getitemstyle(null,["color","bordercolor","borderwidth","opacity","shadowcolor","shadowblur","shadowoffsetx","shadowoffsety"]));var s=o.get("size");y(s)||(s=[s,s]),r.scalex=s[0]/2,r.scaley=s[1]/2,ag(this,"_dodispatchaxispointer",o.get("throttle")||0,"fixrate"),this._movehandletovalue(t,e)}},t.prototype._movehandletovalue=function(t,e){kr(this._axispointermodel,!e&&this._moveanimation,this._handle,or(this.gethandletransform(t,this._axismodel,this._axispointermodel)))},t.prototype._onhandledragmove=function(t,e){var n=this._handle;if(n){this._dragging=!0;var i=this.updatehandletransform(or(n),[t,e],this._axismodel,this._axispointermodel);this._payloadinfo=i,n.stopanimation(),n.attr(or(i)),tr(n).lastprop=null,this._dodispatchaxispointer()}},t.prototype._dodispatchaxispointer=function(){if(this._handle){var t=this._payloadinfo,e=this._axismodel;this._api.dispatchaction({type:"updateaxispointer",x:t.cursorpoint[0],y:t.cursorpoint[1],tooltipoption:t.tooltipoption,axesinfo:[{axisdim:e.axis.dim,axisindex:e.componentindex}]})}},t.prototype._onhandledragend=function(){if(this._dragging=!1,this._handle){var t=this._axispointermodel.get("value");this._movehandletovalue(t),this._api.dispatchaction({type:"hidetip"})}},t.prototype.clear=function(t){this._lastvalue=null,this._laststatus=null;var e=t.getzr(),n=this._group,i=this._handle;e&&n&&(this._lastgraphickey=null,n&&e.remove(n),i&&e.remove(i),this._group=null,this._handle=null,this._payloadinfo=null),kg(this,"_dodispatchaxispointer")},t.prototype.doclear=function(){},t.prototype.buildlabel=function(t,e,n){return{x:t[n=n||0],y:t[1-n],width:e[n],height:e[1-n]}},t}();function kr(t,e,n,i){lr(tr(n).lastprop,i)||(tr(n).lastprop=i,e?rh(n,i,t):(n.stopanimation(),n.attr(i)))}function lr(t,e){if(q(t)&&q(e)){var n=!0;return e(e,(function(e,i){n=n&&lr(t[i],e)})),!!n}return t===e}function pr(t,e){t[e.get(["label","show"])?"show":"hide"]()}function or(t){return{x:t.x||0,y:t.y||0,rotation:t.rotation||0}}function rr(t,e,n){var i=e.get("z"),r=e.get("zlevel");t&&t.traverse((function(t){"group"!==t.type&&(null!=i&&(t.z=i),null!=r&&(t.zlevel=r),t.silent=n)}))}function nr(t){var e,n=t.get("type"),i=t.getmodel(n+"style");return"line"===n?(e=i.getlinestyle()).fill=null:"shadow"===n&&((e=i.getareastyle()).stroke=null),e}function er(t,e,n,i,r){var o=zr(n.get("value"),e.axis,e.ecmodel,n.get("seriesdataindices"),{precision:n.get(["label","precision"]),formatter:n.get(["label","formatter"])}),a=n.getmodel("label"),s=ip(a.get("padding")||0),l=a.getfont(),u=cr(o,l),h=r.position,c=u.width+s[1]+s[3],p=u.height+s[0]+s[2],d=r.align;"right"===d&&(h[0]-=c),"center"===d&&(h[0]-=c/2);var f=r.verticalalign;"bottom"===f&&(h[1]-=p),"middle"===f&&(h[1]-=p/2),function(t,e,n,i){var r=i.getwidth(),o=i.getheight();t[0]=math.min(t[0]+e,r)-e,t[1]=math.min(t[1]+n,o)-n,t[0]=math.max(t[0],0),t[1]=math.max(t[1],0)}(h,c,p,i);var g=a.get("backgroundcolor");g&&"auto"!==g||(g=e.get(["axisline","linestyle","color"])),t.label={x:h[0],y:h[1],style:uh(a,{text:o,font:l,fill:a.gettextcolor(),padding:s,backgroundcolor:g}),z2:10}}function zr(t,e,n,i,r){t=e.scale.parse(t);var o=e.scale.getlabel({value:t},{precision:r.precision}),a=r.formatter;if(a){var s={value:s_(e,{value:t}),axisdimension:e.dim,axisindex:e.index,seriesdata:[]};e(i,(function(t){var e=n.getseriesbyindex(t.seriesindex),i=t.dataindexinside,r=e&&e.getdataparams(i);r&&s.seriesdata.push(r)})),x(a)?o=a.replace("{value}",o):u(a)&&(o=a(s))}return o}function vr(t,e,n){var i=[1,0,0,1,0,0];return zi(i,i,n.rotation),ei(i,i,n.position),th([t.datatocoord(e),(n.labeloffset||0)+(n.labeldirection||1)*(n.labelmargin||0)],i)}function br(t,e,n,i,r,o){var a=gm.innertextlayout(n.rotation,0,n.labeldirection);n.labelmargin=r.get(["label","margin"]),er(e,i,r,o,{position:vr(i.axis,t,n),align:a.textalign,verticalalign:a.textverticalalign})}function fr(t,e,n){return{x1:t[n=n||0],y1:t[1-n],x2:e[n],y2:e[1-n]}}function gr(t,e,n){return{x:t[n=n||0],y:t[1-n],width:e[n],height:e[1-n]}}function wr(t,e,n,i,r,o){return{cx:t,cy:e,r0:n,r:i,startangle:r,endangle:o,clockwise:!0}}var hr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.makeeloption=function(t,e,n,i,r){var o=n.axis,a=o.grid,s=i.get("type"),l=yr(a,o).getotheraxis(o).getglobalextent(),u=o.toglobalcoord(o.datatocoord(e,!0));if(s&&"none"!==s){var h=nr(i),c=ur[s](o,u,l);c.style=h,t.graphickey=c.type,t.pointer=c}br(e,t,lm(a.model,n),n,i,r)},e.prototype.gethandletransform=function(t,e,n){var i=lm(e.axis.grid.model,e,{labelinside:!1});i.labelmargin=n.get(["handle","margin"]);var r=vr(e.axis,t,i);return{x:r[0],y:r[1],rotation:i.rotation+(i.labeldirection<0?math.pi:0)}},e.prototype.updatehandletransform=function(t,e,n,i){var r=n.axis,o=r.grid,a=r.getglobalextent(!0),s=yr(o,r).getotheraxis(r).getglobalextent(),l="x"===r.dim?0:1,u=[t.x,t.y];u[l]+=e[l],u[l]=math.min(a[1],u[l]),u[l]=math.max(a[0],u[l]);var h=(s[1]+s[0])/2,c=[h,h];c[l]=u[l];return{x:u[0],y:u[1],rotation:t.rotation,cursorpoint:c,tooltipoption:[{verticalalign:"middle"},{align:"center"}][l]}},e}(ar);function yr(t,e){var n={};return n[e.dim+"axisindex"]=e.index,t.getcartesian(n)}var ur={line:function(t,e,n){return{type:"line",subpixeloptimize:!0,shape:fr([e,n[0]],[e,n[1]],xr(t))}},shadow:function(t,e,n){var i=math.max(1,t.getbandwidth()),r=n[1]-n[0];return{type:"rect",shape:gr([e-i/2,n[0]],[i,r],xr(t))}}};function xr(t){return"x"===t.dim?0:1}var zr=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.type="axispointer",e.defaultoption={show:"auto",z:50,type:"line",snap:!1,triggertooltip:!0,value:null,status:null,link:[],animation:null,animationdurationupdate:200,linestyle:{color:"#b9bec9",width:1,type:"dashed"},shadowstyle:{color:"rgba(210,219,238,0.2)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundcolor:"auto",bordercolor:null,borderwidth:0,borderradius:3},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}},e}(tp),jr=so(),qr=e;function kr(t,e,n){if(!r.node){var i=e.getzr();jr(i).records||(jr(i).records={}),function(t,e){if(jr(t).initialized)return;function n(n,i){t.on(n,(function(n){var r=function(t){var e={showtip:[],hidetip:[]},n=function(i){var r=e[i.type];r?r.push(i):(i.dispatchaction=n,t.dispatchaction(i))};return{dispatchaction:n,pendings:e}}(e);qr(jr(t).records,(function(t){t&&i(t,n,r.dispatchaction)})),function(t,e){var n,i=t.showtip.length,r=t.hidetip.length;i?n=t.showtip[i-1]:r&&(n=t.hidetip[r-1]);n&&(n.dispatchaction=null,e.dispatchaction(n))}(r.pendings,e)}))}jr(t).initialized=!0,n("click",h(jr,"click")),n("mousemove",h(jr,"mousemove")),n("globalout",$r)}(i,e),(jr(i).records[t]||(jr(i).records[t]={})).handler=n}}function $r(t,e,n){t.handler("leave",null,n)}function jr(t,e,n,i){e.handler(t,n,i)}function qr(t,e){if(!r.node){var n=e.getzr();(jr(n).records||{})[t]&&(jr(n).records[t]=null)}}var tn=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.render=function(t,e,n){var i=e.getcomponent("tooltip"),r=t.get("triggeron")||i&&i.get("triggeron")||"mousemove|click";kr("axispointer",n,(function(t,e,n){"none"!==r&&("leave"===t||r.indexof(t)>=0)&&n({type:"updateaxispointer",currtrigger:t,x:e&&e.offsetx,y:e&&e.offsety})}))},e.prototype.remove=function(t,e){qr("axispointer",e)},e.prototype.dispose=function(t,e){qr("axispointer",e)},e.type="axispointer",e}(gg);function en(t,e){var n,i=[],r=t.seriesindex;if(null==r||!(n=e.getseriesbyindex(r)))return{point:[]};var o=n.getdata(),a=wo(o,t);if(null==a||a<0||y(a))return{point:[]};var s=o.getitemgraphicel(a),l=n.coordinatesystem;if(n.gettooltipposition)i=n.gettooltipposition(a)||[];else if(l&&l.datatopoint)if(t.isstacked){var u=l.getbaseaxis(),h=l.getotheraxis(u).dim,c=u.dim,p="x"===h||"radius"===h?1:0,d=o.mapdimension(c),f=[];f[p]=o.get(d,a),f[1-p]=o.get(o.getcalculationinfo("stackresultdimension"),a),i=l.datatopoint(f)||[]}else i=l.datatopoint(o.getvalues(z(l.dimensions,(function(t){return o.mapdimension(t)})),a))||[];else if(s){var g=s.getboundingrect().clone();g.applytransform(s.transform),i=[g.x+g.width/2,g.y+g.height/2]}return{point:i,el:s}}var nn=so();function in(t,e,n){var i=t.currtrigger,r=[t.x,t.y],o=t,a=t.dispatchaction||w(n.dispatchaction,n),s=e.getcomponent("axispointer").coordsysaxesinfo;if(s){ln(r)&&(r=en({seriesindex:o.seriesindex,dataindex:o.dataindex},e).point);var l=ln(r),u=o.axesinfo,h=s.axesinfo,c="leave"===i||ln(r),p={},d={},f={list:[],map:{}},g={showpointer:h(on,d),showtooltip:h(an,f)};e(s.coordsysmap,(function(t,e){var n=l||t.containpoint(r);e(s.coordsysaxesinfo[e],(function(t,e){var i=t.axis,o=function(t,e){for(var n=0;n<(t||[]).length;n++){var i=t[n];if(e.axis.dim===i.axisdim&&e.axis.model.componentindex===i.axisindex)return i}}(u,t);if(!c&&n&&(!u||o)){var a=o&&o.value;null!=a||l||(a=i.pointtodata(r)),null!=a&&rn(t,a,g,!1,p)}}))}));var y={};return e(h,(function(t,e){var n=t.linkgroup;n&&!d[e]&&e(n.axesinfo,(function(e,i){var r=d[i];if(e!==t&&r){var o=r.value;n.mapper&&(o=t.axis.scale.parse(n.mapper(o,sn(e),sn(t)))),y[t.key]=o}}))})),e(y,(function(t,e){rn(h[e],t,g,!0,p)})),function(t,e,n){var i=n.axesinfo=[];e(e,(function(e,n){var r=e.axispointermodel.option,o=t[n];o?(!e.usehandle&&(r.status="show"),r.value=o.value,r.seriesdataindices=(o.payloadbatch||[]).slice()):!e.usehandle&&(r.status="hide"),"show"===r.status&&i.push({axisdim:e.axis.dim,axisindex:e.axis.model.componentindex,value:r.value})}))}(d,h,p),function(t,e,n,i){if(ln(e)||!t.list.length)return void i({type:"hidetip"});var r=((t.list[0].databyaxis[0]||{}).seriesdataindices||[])[0]||{};i({type:"showtip",escapeconnect:!0,x:e[0],y:e[1],tooltipoption:n.tooltipoption,position:n.position,dataindexinside:r.dataindexinside,dataindex:r.dataindex,seriesindex:r.seriesindex,databycoordsys:t.list})}(f,r,t,a),function(t,e,n){var i=n.getzr(),r="axispointerlasthighlights",o=nn(i)[r]||{},a=nn(i)[r]={};e(t,(function(t,e){var n=t.axispointermodel.option;"show"===n.status&&e(n.seriesdataindices,(function(t){var e=t.seriesindex+" | "+t.dataindex;a[e]=t}))}));var s=[],l=[];e(o,(function(t,e){!a[e]&&l.push(t)})),e(a,(function(t,e){!o[e]&&s.push(t)})),l.length&&n.dispatchaction({type:"downplay",escapeconnect:!0,notblur:!0,batch:l}),s.length&&n.dispatchaction({type:"highlight",escapeconnect:!0,notblur:!0,batch:s})}(h,0,n),p}}function rn(t,e,n,i,r){var o=t.axis;if(!o.scale.isblank()&&o.containdata(e))if(t.involveseries){var a=function(t,e){var n=e.axis,i=n.dim,r=t,o=[],a=number.max_value,s=-1;return e(e.seriesmodels,(function(e,l){var u,h,c=e.getdata().mapdimensionsall(i);if(e.getaxistooltipdata){var p=e.getaxistooltipdata(c,t,n);h=p.dataindices,u=p.nestestvalue}else{if(!(h=e.getdata().indicesofnearest(c[0],t,"category"===n.type?.5:null)).length)return;u=e.getdata().get(c[0],h[0])}if(null!=u&&isfinite(u)){var d=t-u,f=math.abs(d);f<=a&&((f=0&&s<0)&&(a=f,s=d,r=u,o.length=0),e(h,(function(t){o.push({seriesindex:e.seriesindex,dataindexinside:t,dataindex:e.getdata().getrawindex(t)})})))}})),{payloadbatch:o,snaptovalue:r}}(e,t),s=a.payloadbatch,l=a.snaptovalue;s[0]&&null==r.seriesindex&&a(r,s[0]),!i&&t.snap&&o.containdata(l)&&null!=l&&(e=l),n.showpointer(t,e,s),n.showtooltip(t,a,l)}else n.showpointer(t,e)}function on(t,e,n,i){t[e.key]={value:n,payloadbatch:i}}function an(t,e,n,i){var r=n.payloadbatch,o=e.axis,a=o.model,s=e.axispointermodel;if(e.triggertooltip&&r.length){var l=e.coordsys.model,u=jm(l),h=t.map[u];h||(h=t.map[u]={coordsysid:l.id,coordsysindex:l.componentindex,coordsystype:l.type,coordsysmaintype:l.maintype,databyaxis:[]},t.list.push(h)),h.databyaxis.push({axisdim:o.dim,axisindex:a.componentindex,axistype:a.type,axisid:a.id,value:i,valuelabelopt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesdataindices:r.slice()})}}function sn(t){var e=t.axis.model,n={},i=n.axisdim=t.axis.dim;return n.axisindex=n[i+"axisindex"]=e.componentindex,n.axisname=n[i+"axisname"]=e.name,n.axisid=n[i+"axisid"]=e.id,n}function ln(t){return!t||null==t[0]||isnan(t[0])||null==t[1]||isnan(t[1])}function un(t){ti.registeraxispointerclass("cartesianaxispointer",hr),t.registercomponentmodel(zr),t.registercomponentview(tn),t.registerpreprocessor((function(t){if(t){(!t.axispointer||0===t.axispointer.length)&&(t.axispointer={});var e=t.axispointer.link;e&&!y(e)&&(t.axispointer.link=[e])}})),t.registerprocessor(t.priority.processor.statistic,(function(t,e){t.getcomponent("axispointer").coordsysaxesinfo=zm(t,e)})),t.registeraction({type:"updateaxispointer",event:"updateaxispointer",update:":updateaxispointer"},in)}var hn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.makeeloption=function(t,e,n,i,r){var o=n.axis;"angle"===o.dim&&(this.animationthreshold=math.pi/18);var a=o.polar,s=a.getotheraxis(o).getextent(),l=o.datatocoord(e),u=i.get("type");if(u&&"none"!==u){var h=nr(i),c=cn[u](o,a,l,s);c.style=h,t.graphickey=c.type,t.pointer=c}var p=function(t,e,n,i,r){var o=e.axis,a=o.datatocoord(t),s=i.getangleaxis().getextent()[0];s=s/180*math.pi;var l,u,h,c=i.getradiusaxis().getextent();if("radius"===o.dim){var p=[1,0,0,1,0,0];zi(p,p,s),ei(p,p,[i.cx,i.cy]),l=th([a,-r],p);var d=e.getmodel("axislabel").get("rotate")||0,f=gm.innertextlayout(s,d*math.pi/180,-1);u=f.textalign,h=f.textverticalalign}else{var g=c[1];l=i.coordtopoint([g+r,a]);var y=i.cx,v=i.cy;u=math.abs(l[0]-y)/g<.3?"center":l[0]>y?"left":"right",h=math.abs(l[1]-v)/g<.3?"middle":l[1]>v?"top":"bottom"}return{position:l,align:u,verticalalign:h}}(e,n,0,a,i.get(["label","margin"]));er(t,n,i,r,p)},e}(ar);var cn={line:function(t,e,n,i){return"angle"===t.dim?{type:"line",shape:fr(e.coordtopoint([i[0],n]),e.coordtopoint([i[1],n]))}:{type:"circle",shape:{cx:e.cx,cy:e.cy,r:n}}},shadow:function(t,e,n,i){var r=math.max(1,t.getbandwidth()),o=math.pi/180;return"angle"===t.dim?{type:"sector",shape:wr(e.cx,e.cy,i[0],i[1],(-n-r/2)*o,(r/2-n)*o)}:{type:"sector",shape:wr(e.cx,e.cy,n-r/2,n+r/2,0,2*math.pi)}}},pn=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.findaxismodel=function(t){var e;return this.ecmodel.eachcomponent(t,(function(t){t.getcoordsysmodel()===this&&(e=t)}),this),e},e.type="polar",e.dependencies=["radiusaxis","angleaxis"],e.defaultoption={z:0,center:["50%","50%"],radius:"80%"},e}(tp),dn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.getcoordsysmodel=function(){return this.getreferringcomponents("polar",co).models[0]},e.type="polaraxis",e}(tp);r(dn,p_);var fn=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.type="angleaxis",e}(dn),gn=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.type="radiusaxis",e}(dn),yn=function(t){function e(e,n){return t.call(this,"radius",e,n)||this}return n(e,t),e.prototype.pointtodata=function(t,e){return this.polar.pointtodata(t,e)["radius"===this.dim?0:1]},e}(h_);yn.prototype.datatoradius=h_.prototype.datatocoord,yn.prototype.radiustodata=h_.prototype.coordtodata;var vn=so(),mn=function(t){function e(e,n){return t.call(this,"angle",e,n||[0,360])||this}return n(e,t),e.prototype.pointtodata=function(t,e){return this.polar.pointtodata(t,e)["radius"===this.dim?0:1]},e.prototype.calculatecategoryinterval=function(){var t=this,e=t.getlabelmodel(),n=t.scale,i=n.getextent(),r=n.count();if(i[1]-i[0]<1)return 0;var o=i[0],a=t.datatocoord(o+1)-t.datatocoord(o),s=math.abs(a),l=cr(null==o?"":o+"",e.getfont(),"center","top"),u=math.max(l.height,7)/s;isnan(u)&&(u=1/0);var h=math.max(0,math.floor(u)),c=vn(t.model),p=c.lastautointerval,d=c.lasttickcount;return null!=p&&null!=d&&math.abs(p-h)<=1&&math.abs(d-r)<=1&&p>h?h=p:(c.lasttickcount=r,c.lastautointerval=h),h},e}(h_);mn.prototype.datatoangle=h_.prototype.datatocoord,mn.prototype.angletodata=h_.prototype.coordtodata;var xn=["radius","angle"],_n=function(){function t(t){this.dimensions=xn,this.type="polar",this.cx=0,this.cy=0,this._radiusaxis=new yn,this._angleaxis=new mn,this.axispointerenabled=!0,this.name=t||"",this._radiusaxis.polar=this._angleaxis.polar=this}return t.prototype.containpoint=function(t){var e=this.pointtocoord(t);return this._radiusaxis.contain(e[0])&&this._angleaxis.contain(e[1])},t.prototype.containdata=function(t){return this._radiusaxis.containdata(t[0])&&this._angleaxis.containdata(t[1])},t.prototype.getaxis=function(t){return this["_"+t+"axis"]},t.prototype.getaxes=function(){return[this._radiusaxis,this._angleaxis]},t.prototype.getaxesbyscale=function(t){var e=[],n=this._angleaxis,i=this._radiusaxis;return n.scale.type===t&&e.push(n),i.scale.type===t&&e.push(i),e},t.prototype.getangleaxis=function(){return this._angleaxis},t.prototype.getradiusaxis=function(){return this._radiusaxis},t.prototype.getotheraxis=function(t){var e=this._angleaxis;return t===e?this._radiusaxis:e},t.prototype.getbaseaxis=function(){return this.getaxesbyscale("ordinal")[0]||this.getaxesbyscale("time")[0]||this.getangleaxis()},t.prototype.gettooltipaxes=function(t){var e=null!=t&&"auto"!==t?this.getaxis(t):this.getbaseaxis();return{baseaxes:[e],otheraxes:[this.getotheraxis(e)]}},t.prototype.datatopoint=function(t,e){return this.coordtopoint([this._radiusaxis.datatoradius(t[0],e),this._angleaxis.datatoangle(t[1],e)])},t.prototype.pointtodata=function(t,e){var n=this.pointtocoord(t);return[this._radiusaxis.radiustodata(n[0],e),this._angleaxis.angletodata(n[1],e)]},t.prototype.pointtocoord=function(t){var e=t[0]-this.cx,n=t[1]-this.cy,i=this.getangleaxis(),r=i.getextent(),o=math.min(r[0],r[1]),a=math.max(r[0],r[1]);i.inverse?o=a-360:a=o+360;var s=math.sqrt(e*e+n*n);e/=s,n/=s;for(var l=math.atan2(-n,e)/math.pi*180,u=la;)l+=360*u;return[s,l]},t.prototype.coordtopoint=function(t){var e=t[0],n=t[1]/180*math.pi;return[math.cos(n)*e+this.cx,-math.sin(n)*e+this.cy]},t.prototype.getarea=function(){var t=this.getangleaxis(),e=this.getradiusaxis().getextent().slice();e[0]>e[1]&&e.reverse();var n=t.getextent(),i=math.pi/180;return{cx:this.cx,cy:this.cy,r0:e[0],r:e[1],startangle:-n[0]*i,endangle:-n[1]*i,clockwise:t.inverse,contain:function(t,e){var n=t-this.cx,i=e-this.cy,r=n*n+i*i-1e-4,o=this.r,a=this.r0;return r<=o*o&&r>=a*a}}},t.prototype.converttopixel=function(t,e,n){return bn(e)===this?this.datatopoint(n):null},t.prototype.convertfrompixel=function(t,e,n){return bn(e)===this?this.pointtodata(n):null},t}();function bn(t){var e=t.seriesmodel,n=t.polarmodel;return n&&n.coordinatesystem||e&&e.coordinatesystem}function wn(t,e){var n=this,i=n.getangleaxis(),r=n.getradiusaxis();if(i.scale.setextent(1/0,-1/0),r.scale.setextent(1/0,-1/0),t.eachseries((function(t){if(t.coordinatesystem===n){var e=t.getdata();e(c_(e,"radius"),(function(t){r.scale.unionextentfromdata(e,t)})),e(c_(e,"angle"),(function(t){i.scale.unionextentfromdata(e,t)}))}})),r_(i.scale,i.model),r_(r.scale,r.model),"category"===i.type&&!i.onband){var o=i.getextent(),a=360/i.scale.count();i.inverse?o[1]+=a:o[1]-=a,i.setextent(o[0],o[1])}}function sn(t,e){if(t.type=e.get("type"),t.scale=o_(e),t.onband=e.get("boundarygap")&&"category"===t.type,t.inverse=e.get("inverse"),function(t){return"angleaxis"===t.maintype}(e)){t.inverse=t.inverse!==e.get("clockwise");var n=e.get("startangle");t.setextent(n,n+(t.inverse?-360:360))}e.axis=t,t.model=e}var mn={dimensions:xn,create:function(t,e){var n=[];return t.eachcomponent("polar",(function(t,i){var r=new _n(i+"");r.update=wn;var o=r.getradiusaxis(),a=r.getangleaxis(),s=t.findaxismodel("radiusaxis"),l=t.findaxismodel("angleaxis");sn(o,s),sn(a,l),function(t,e,n){var i=e.get("center"),r=n.getwidth(),o=n.getheight();t.cx=er(i[0],r),t.cy=er(i[1],o);var a=t.getradiusaxis(),s=math.min(r,o)/2,l=e.get("radius");null==l?l=[0,"100%"]:y(l)||(l=[0,l]);var u=[er(l[0],s),er(l[1],s)];a.inverse?a.setextent(u[1],u[0]):a.setextent(u[0],u[1])}(r,t,e),n.push(r),t.coordinatesystem=r,r.model=t})),t.eachseries((function(t){if("polar"===t.get("coordinatesystem")){var e=t.getreferringcomponents("polar",co).models[0];0,t.coordinatesystem=e.coordinatesystem}})),n}},in=["axisline","axislabel","axistick","minortick","splitline","minorsplitline","splitarea"];function tn(t,e,n){e[1]>e[0]&&(e=e.slice().reverse());var i=t.coordtopoint([e[0],n]),r=t.coordtopoint([e[1],n]);return{x1:i[0],y1:i[1],x2:r[0],y2:r[1]}}function cn(t){return t.getradiusaxis().inverse?0:1}function dn(t){var e=t[0],n=t[t.length-1];e&&n&&math.abs(math.abs(e.coord-n.coord)-360)<1e-4&&t.pop()}var an=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.axispointerclass="polaraxispointer",n}return n(e,t),e.prototype.render=function(t,e){if(this.group.removeall(),t.get("show")){var n=t.axis,i=n.polar,r=i.getradiusaxis().getextent(),o=n.gettickscoords(),a=n.getminortickscoords(),s=z(n.getviewlabels(),(function(t){t=t(t);var e=n.scale,i="ordinal"===e.type?e.getrawordinalnumber(t.tickvalue):t.tickvalue;return t.coord=n.datatocoord(i),t}));dn(s),dn(o),e(in,(function(e){!t.get([e,"show"])||n.scale.isblank()&&"axisline"!==e||kn[e](this.group,t,i,o,a,r,s)}),this)}},e.type="angleaxis",e}(ti),kn={axisline:function(t,e,n,i,r,o){var a,s=e.getmodel(["axisline","linestyle"]),l=cn(n),u=l?0:1;(a=0===o[u]?new hu({shape:{cx:n.cx,cy:n.cy,r:o[l]},style:s.getlinestyle(),z2:1,silent:!0}):new au({shape:{cx:n.cx,cy:n.cy,r:o[l],r0:o[u]},style:s.getlinestyle(),z2:1,silent:!0})).style.fill=null,t.add(a)},axistick:function(t,e,n,i,r,o){var a=e.getmodel("axistick"),s=(a.get("inside")?-1:1)*a.get("length"),l=o[cn(n)],u=z(i,(function(t){return new zu({shape:tn(n,[l,l+s],t.coord)})}));t.add(wh(u,{style:k(a.getmodel("linestyle").getlinestyle(),{stroke:e.get(["axisline","linestyle","color"])})}))},minortick:function(t,e,n,i,r,o){if(r.length){for(var a=e.getmodel("axistick"),s=e.getmodel("minortick"),l=(a.get("inside")?-1:1)*s.get("length"),u=o[cn(n)],h=[],c=0;cf?"left":"right",v=math.abs(d[1]-g)/p<.3?"middle":d[1]>g?"top":"bottom";if(s&&s[c]){var m=s[c];q(m)&&m.textstyle&&(a=new dc(m.textstyle,l,l.ecmodel))}var x=new ks({silent:gm.islabelsilent(e),style:uh(a,{x:d[0],y:d[1],fill:a.gettextcolor()||e.get(["axisline","linestyle","color"]),text:i.formattedlabel,align:y,verticalalign:v})});if(t.add(x),h){var _=gm.makeaxiseventdatabase(e);_.targettype="axislabel",_.value=i.rawlabel,hs(x).eventdata=_}}),this)},splitline:function(t,e,n,i,r,o){var a=e.getmodel("splitline").getmodel("linestyle"),s=a.get("color"),l=0;s=s instanceof array?s:[s];for(var u=[],h=0;h=0?"p":"n",t=_;m&&(i[s][m]||(i[s][m]={p:_,n:_}),t=i[s][m][i]);var c=void 0,d=void 0,a=void 0,k=void 0;if("radius"===c.dim){var l=c.datatocoord(s)-_,p=o.datatocoord(m);math.abs(l)=k})}}}))}var vn={startangle:90,clockwise:!0,splitnumber:12,axislabel:{rotate:0}},bn={splitnumber:5},fn=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.type="polar",e}(gg);function gn(t,e){e=e||{};var n=t.coordinatesystem,i=t.axis,r={},o=i.position,a=i.orient,s=n.getrect(),l=[s.x,s.x+s.width,s.y,s.y+s.height],u={horizontal:{top:l[2],bottom:l[3]},vertical:{left:l[0],right:l[1]}};r.position=["vertical"===a?u.vertical[o]:l[0],"horizontal"===a?u.horizontal[o]:l[3]];r.rotation=math.pi/2*{horizontal:0,vertical:1}[a];r.labeldirection=r.tickdirection=r.namedirection={top:-1,bottom:1,right:1,left:-1}[o],t.get(["axistick","inside"])&&(r.tickdirection=-r.tickdirection),it(e.labelinside,t.get(["axislabel","inside"]))&&(r.labeldirection=-r.labeldirection);var h=e.rotate;return null==h&&(h=t.get(["axislabel","rotate"])),r.labelrotation="top"===o?-h:h,r.z2=1,r}var wn=["axisline","axisticklabel","axisname"],hn=["splitarea","splitline"],yn=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.axispointerclass="singleaxispointer",n}return n(e,t),e.prototype.render=function(e,n,i,r){var o=this.group;o.removeall();var a=this._axisgroup;this._axisgroup=new cr;var s=gn(e),l=new gm(e,s);e(wn,l.add,l),o.add(this._axisgroup),o.add(l.getgroup()),e(hn,(function(t){e.get([t,"show"])&&un[t](this,this.group,this._axisgroup,e)}),this),ah(a,this._axisgroup,e),t.prototype.render.call(this,e,n,i,r)},e.prototype.remove=function(){ii(this)},e.type="singleaxis",e}(ti),un={splitline:function(t,e,n,i){var r=i.axis;if(!r.scale.isblank()){var o=i.getmodel("splitline"),a=o.getmodel("linestyle"),s=a.get("color");s=s instanceof array?s:[s];for(var l=i.coordinatesystem.getrect(),u=r.ishorizontal(),h=[],c=0,p=r.gettickscoords({tickmodel:o}),d=[],f=[],g=0;g=e.y&&t[1]<=e.y+e.height:n.contain(n.tolocalcoord(t[1]))&&t[0]>=e.y&&t[0]<=e.y+e.height},t.prototype.pointtodata=function(t){var e=this.getaxis();return[e.coordtodata(e.tolocalcoord(t["horizontal"===e.orient?0:1]))]},t.prototype.datatopoint=function(t){var e=this.getaxis(),n=this.getrect(),i=[],r="horizontal"===e.orient?0:1;return t instanceof array&&(t=t[0]),i[r]=e.toglobalcoord(e.datatocoord(+t)),i[1-r]=0===r?n.y+n.height/2:n.x+n.width/2,i},t.prototype.converttopixel=function(t,e,n){return kn(e)===this?this.datatopoint(n):null},t.prototype.convertfrompixel=function(t,e,n){return kn(e)===this?this.pointtodata(n):null},t}();function kn(t){var e=t.seriesmodel,n=t.singleaxismodel;return n&&n.coordinatesystem||e&&e.coordinatesystem}var $n={create:function(t,e){var n=[];return t.eachcomponent("singleaxis",(function(i,r){var o=new qn(i,t,e);o.name="single_"+r,o.resize(i,e),i.coordinatesystem=o,n.push(o)})),t.eachseries((function(t){if("singleaxis"===t.get("coordinatesystem")){var e=t.getreferringcomponents("singleaxis",co).models[0];t.coordinatesystem=e&&e.coordinatesystem}})),n},dimensions:jn},jn=["x","y"],qn=["width","height"],te=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.makeeloption=function(t,e,n,i,r){var o=n.axis,a=o.coordinatesystem,s=ie(a,1-ne(o)),l=a.datatopoint(e)[0],u=i.get("type");if(u&&"none"!==u){var h=nr(i),c=ee[u](o,l,s);c.style=h,t.graphickey=c.type,t.pointer=c}br(e,t,gn(n),n,i,r)},e.prototype.gethandletransform=function(t,e,n){var i=gn(e,{labelinside:!1});i.labelmargin=n.get(["handle","margin"]);var r=vr(e.axis,t,i);return{x:r[0],y:r[1],rotation:i.rotation+(i.labeldirection<0?math.pi:0)}},e.prototype.updatehandletransform=function(t,e,n,i){var r=n.axis,o=r.coordinatesystem,a=ne(r),s=ie(o,a),l=[t.x,t.y];l[a]+=e[a],l[a]=math.min(s[1],l[a]),l[a]=math.max(s[0],l[a]);var u=ie(o,1-a),h=(u[1]+u[0])/2,c=[h,h];return c[a]=l[a],{x:l[0],y:l[1],rotation:t.rotation,cursorpoint:c,tooltipoption:{verticalalign:"middle"}}},e}(ar),ee={line:function(t,e,n){return{type:"line",subpixeloptimize:!0,shape:fr([e,n[0]],[e,n[1]],ne(t))}},shadow:function(t,e,n){var i=t.getbandwidth(),r=n[1]-n[0];return{type:"rect",shape:gr([e-i/2,n[0]],[i,r],ne(t))}}};function ne(t){return t.ishorizontal()?0:1}function ie(t,e){var n=t.getrect();return[n[jn[e]],n[jn[e]]+n[qn[e]]]}var re=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.type="single",e}(gg);var oe=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.init=function(e,n,i){var r=sp(e);t.prototype.init.apply(this,arguments),ae(e,r)},e.prototype.mergeoption=function(e){t.prototype.mergeoption.apply(this,arguments),ae(this.option,e)},e.prototype.getcellsize=function(){return this.option.cellsize},e.type="calendar",e.defaultoption={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%",color:"#000"},monthlabel:{show:!0,position:"start",margin:5,align:"center",formatter:null,color:"#000"},yearlabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontfamily:"sans-serif",fontweight:"bolder",fontsize:20}},e}(tp);function ae(t,e){var n,i=t.cellsize;1===(n=y(i)?i:t.cellsize=[i,i]).length&&(n[1]=n[0]);var r=z([0,1],(function(t){return function(t,e){return null!=t[yp[e][0]]||null!=t[yp[e][1]]&&null!=t[yp[e][2]]}(e,t)&&(n[t]="auto"),null!=n[t]&&"auto"!==n[t]}));wp(t,e,{type:"box",ignoresize:r})}var se=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.render=function(t,e,n){var i=this.group;i.removeall();var r=t.coordinatesystem,o=r.getrangeinfo(),a=r.getorient(),s=e.getlocalemodel();this._renderdayrect(t,o,i),this._renderlines(t,o,a,i),this._renderyeartext(t,o,a,i),this._rendermonthtext(t,s,a,i),this._renderweektext(t,s,o,a,i)},e.prototype._renderdayrect=function(t,e,n){for(var i=t.coordinatesystem,r=t.getmodel("itemstyle").getitemstyle(),o=i.getcellwidth(),a=i.getcellheight(),s=e.start.time;s<=e.end.time;s=i.getnextnday(s,1).time){var l=i.datatorect([s],!1).tl,u=new cs({shape:{x:l[0],y:l[1],width:o,height:a},cursor:"default",style:r});n.add(u)}},e.prototype._renderlines=function(t,e,n,i){var r=this,o=t.coordinatesystem,a=t.getmodel(["splitline","linestyle"]).getlinestyle(),s=t.get(["splitline","show"]),l=a.linewidth;this._tlpoints=[],this._blpoints=[],this._firstdayofmonth=[],this._firstdaypoints=[];for(var u=e.start,h=0;u.time<=e.end.time;h++){p(u.formateddate),0===h&&(u=o.getdateinfo(e.start.y+"-"+e.start.m));var c=u.date;c.setmonth(c.getmonth()+1),u=o.getdateinfo(c)}function p(e){r._firstdayofmonth.push(o.getdateinfo(e)),r._firstdaypoints.push(o.datatorect([e],!1).tl);var l=r._getlinepointsofoneweek(t,e,n);r._tlpoints.push(l[0]),r._blpoints.push(l[l.length-1]),s&&r._drawsplitline(l,a,i)}p(o.getnextnday(e.end.time,1).formateddate),s&&this._drawsplitline(r._getedgespoints(r._tlpoints,l,n),a,i),s&&this._drawsplitline(r._getedgespoints(r._blpoints,l,n),a,i)},e.prototype._getedgespoints=function(t,e,n){var i=[t[0].slice(),t[t.length-1].slice()],r="horizontal"===n?0:1;return i[0][r]=i[0][r]-e/2,i[1][r]=i[1][r]+e/2,i},e.prototype._drawsplitline=function(t,e,n){var i=new ru({z2:20,shape:{points:t},style:e});n.add(i)},e.prototype._getlinepointsofoneweek=function(t,e,n){for(var i=t.coordinatesystem,r=i.getdateinfo(e),o=[],a=0;a<7;a++){var s=i.getnextnday(r.time,a),l=i.datatorect([s.time],!1);o[2*s.day]=l.tl,o[2*s.day+1]=l["horizontal"===n?"bl":"tr"]}return o},e.prototype._formatterlabel=function(t,e){return x(t)&&t?(n=t,e(e,(function(t,e){n=n.replace("{"+e+"}",i?ap(t):t)})),n):u(t)?t(e):e.namemap;var n,i},e.prototype._yeartextpositioncontrol=function(t,e,n,i,r){var o=e[0],a=e[1],s=["center","bottom"];"bottom"===i?(a+=r,s=["center","top"]):"left"===i?o-=r:"right"===i?(o+=r,s=["center","top"]):a-=r;var l=0;return"left"!==i&&"right"!==i||(l=math.pi/2),{rotation:l,x:o,y:a,style:{align:s[0],verticalalign:s[1]}}},e.prototype._renderyeartext=function(t,e,n,i){var r=t.getmodel("yearlabel");if(r.get("show")){var o=r.get("margin"),a=r.get("position");a||(a="horizontal"!==n?"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"===n?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]},p=e.start.y;+e.end.y>+e.start.y&&(p=p+"-"+e.end.y);var d=r.get("formatter"),f={start:e.start.y,end:e.end.y,namemap:p},g=this._formatterlabel(d,f),y=new ks({z2:30,style:uh(r,{text:g})});y.attr(this._yeartextpositioncontrol(y,c[a],n,a,o)),i.add(y)}},e.prototype._monthtextpositioncontrol=function(t,e,n,i,r){var o="left",a="top",s=t[0],l=t[1];return"horizontal"===n?(l+=r,e&&(o="center"),"start"===i&&(a="bottom")):(s+=r,e&&(a="middle"),"start"===i&&(o="right")),{x:s,y:l,align:o,verticalalign:a}},e.prototype._rendermonthtext=function(t,e,n,i){var r=t.getmodel("monthlabel");if(r.get("show")){var o=r.get("namemap"),a=r.get("margin"),s=r.get("position"),l=r.get("align"),u=[this._tlpoints,this._blpoints];o&&!x(o)||(o&&(e=mc(o)||e),o=e.get(["time","monthabbr"])||[]);var h="start"===s?0:1,c="horizontal"===n?0:1;a="start"===s?-a:a;for(var p="center"===l,d=0;d=i.start.time&&n.timea.end.time&&t.reverse(),t},t.prototype._getrangeinfo=function(t){var e,n=[this.getdateinfo(t[0]),this.getdateinfo(t[1])];n[0].time>n[1].time&&(e=!0,n.reverse());var i=math.floor(n[1].time/le)-math.floor(n[0].time/le)+1,r=new date(n[0].time),o=r.getdate(),a=n[1].date.getdate();r.setdate(o+i-1);var s=r.getdate();if(s!==a)for(var l=r.gettime()-n[1].time>0?1:-1;(s=r.getdate())!==a&&(r.gettime()-n[1].time)*l>0;)i-=l,r.setdate(s-l);var u=math.floor((i+n[0].day+6)/7),h=e?1-u:u-1;return e&&n.reverse(),{range:[n[0].formateddate,n[1].formateddate],start:n[0],end:n[1],allday:i,weeks:u,nthweek:h,fweek:n[0].day,lweek:n[1].day}},t.prototype._getdatebyweeksandday=function(t,e,n){var i=this._getrangeinfo(n);if(t>i.weeks||0===t&&ei.lweek)return null;var r=7*(t-1)-i.fweek+e,o=new date(i.start.time);return o.setdate(+i.start.d+r),this.getdateinfo(o)},t.create=function(e,n){var i=[];return e.eachcomponent("calendar",(function(r){var o=new t(r,e,n);i.push(o),r.coordinatesystem=o})),e.eachseries((function(t){"calendar"===t.get("coordinatesystem")&&(t.coordinatesystem=i[t.get("calendarindex")||0])})),i},t.dimensions=["time","value"],t}();function he(t){var e=t.calendarmodel,n=t.seriesmodel;return e?e.coordinatesystem:n?n.coordinatesystem:null}function ce(t,e){var n;return e(e,(function(e){null!=t[e]&&"auto"!==t[e]&&(n=!0)})),n}var pe=["transition","enterfrom","leaveto"],de=pe.concat(["enteranimation","updateanimation","leaveanimation"]);function fe(t,e,n){if(n&&(!t[n]&&e[n]&&(t[n]={}),t=t[n],e=e[n]),t&&e)for(var i=n?pe:de,r=0;r=0;l--){var p,d,f;if(f=null!=(d=xo((p=n[l]).id,null))?r.get(d):null){var g=f.parent,y=(c=ve(g),{}),v=_p(f,p,g===i?{width:o,height:a}:{width:c.width,height:c.height},null,{hv:p.hv,boundingmode:p.bounding},y);if(!ve(f).isnew&&v){for(var m=p.transition,x={},_=0;_=0)?x[b]=w:f[b]=w}rh(f,x,t,0)}else f.attr(y)}}},e.prototype._clear=function(){var t=this,e=this._elmap;e.each((function(n){be(n,ve(n).option,e,t._lastgraphicmodel)})),this._elmap=ft()},e.prototype.dispose=function(){this._clear()},e.type="graphic",e}(gg);function xe(t){var e=mt(ye,t)?ye[t]:mh(t);var n=new e({});return ve(n).type=t,n}function _e(t,e,n,i){var r=xe(n);return e.add(r),i.set(t,r),ve(r).id=t,ve(r).isnew=!0,r}function be(t,e,n,i){t&&t.parent&&("group"===t.type&&t.traverse((function(t){be(t,e,n,i)})),bo(t,e,i),n.removekey(ve(t).id))}function we(t,e,n,i){t.isgroup||e([["cursor",da.prototype.cursor],["zlevel",i||0],["z",n||0],["z2",0]],(function(n){var i=n[0];mt(e,i)?t[i]=rt(e[i],n[1]):null==t[i]&&(t[i]=n[1])})),e(g(e),(function(n){if(0===n.indexof("on")){var i=e[n];t[n]=u(i)?i:null}})),mt(e,"draggable")&&(t.draggable=e.draggable),null!=e.name&&(t.name=e.name),null!=e.id&&(t.id=e.id)}var se=["x","y","radius","angle","single"],me=["cartesian2d","polar","singleaxis"];function ie(t){return t+"axis"}function te(t,e){var n,i=ft(),r=[],o=ft();t.eachcomponent({maintype:"datazoom",query:e},(function(t){o.get(t.uid)||s(t)}));do{n=!1,t.eachcomponent("datazoom",a)}while(n);function a(t){!o.get(t.uid)&&function(t){var e=!1;return t.eachtargetaxis((function(t,n){var r=i.get(t);r&&r[n]&&(e=!0)})),e}(t)&&(s(t),n=!0)}function s(t){o.set(t.uid,!0),r.push(t),t.eachtargetaxis((function(t,e){(i.get(t)||i.set(t,[]))[e]=!0}))}return r}function ce(t){var e=t.ecmodel,n={infolist:[],infomap:ft()};return t.eachtargetaxis((function(t,i){var r=e.getcomponent(ie(t),i);if(r){var o=r.getcoordsysmodel();if(o){var a=o.uid,s=n.infomap.get(a);s||(s={model:o,axismodels:[]},n.infolist.push(s),n.infomap.set(a,s)),s.axismodels.push(r)}}})),n}var de=function(){function t(){this.indexlist=[],this.indexmap=[]}return t.prototype.add=function(t){this.indexmap[t]||(this.indexlist.push(t),this.indexmap[t]=!0)},t}(),ae=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._autothrottle=!0,n._notarget=!0,n._rangepropmode=["percent","percent"],n}return n(e,t),e.prototype.init=function(t,e,n){var i=ke(t);this.settledoption=i,this.mergedefaultandtheme(t,n),this._doinit(i)},e.prototype.mergeoption=function(t){var e=ke(t);c(this.option,t,!0),c(this.settledoption,e,!0),this._doinit(e)},e.prototype._doinit=function(t){var e=this.option;this._setdefaultthrottle(t),this._updaterangeuse(t);var n=this.settledoption;e([["start","startvalue"],["end","endvalue"]],(function(t,i){"value"===this._rangepropmode[i]&&(e[t[0]]=n[t[0]]=null)}),this),this._resettarget()},e.prototype._resettarget=function(){var t=this.get("orient",!0),e=this._targetaxisinfomap=ft();this._fillspecifiedtargetaxis(e)?this._orient=t||this._makeautoorientbytargetaxis():(this._orient=t||"horizontal",this._fillautotargetaxisbyorient(e,this._orient)),this._notarget=!0,e.each((function(t){t.indexlist.length&&(this._notarget=!1)}),this)},e.prototype._fillspecifiedtargetaxis=function(t){var e=!1;return e(se,(function(n){var i=this.getreferringcomponents(ie(n),do);if(i.specified){e=!0;var r=new de;e(i.models,(function(t){r.add(t.componentindex)})),t.set(n,r)}}),this),e},e.prototype._fillautotargetaxisbyorient=function(t,e){var n=this.ecmodel,i=!0;if(i){var r="vertical"===e?"y":"x";o(n.findcomponents({maintype:r+"axis"}),r)}i&&o(n.findcomponents({maintype:"singleaxis",filter:function(t){return t.get("orient",!0)===e}}),"single");function o(e,n){var r=e[0];if(r){var o=new de;if(o.add(r.componentindex),t.set(n,o),i=!1,"x"===n||"y"===n){var a=r.getreferringcomponents("grid",co).models[0];a&&e(e,(function(t){r.componentindex!==t.componentindex&&a===t.getreferringcomponents("grid",co).models[0]&&o.add(t.componentindex)}))}}}i&&e(se,(function(e){if(i){var r=n.findcomponents({maintype:ie(e),filter:function(t){return"category"===t.get("type",!0)}});if(r[0]){var o=new de;o.add(r[0].componentindex),t.set(e,o),i=!1}}}),this)},e.prototype._makeautoorientbytargetaxis=function(){var t;return this.eachtargetaxis((function(e){!t&&(t=e)}),this),"y"===t?"vertical":"horizontal"},e.prototype._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}},e.prototype._updaterangeuse=function(t){var e=this._rangepropmode,n=this.get("rangemode");e([["start","startvalue"],["end","endvalue"]],(function(i,r){var o=null!=t[i[0]],a=null!=t[i[1]];o&&!a?e[r]="percent":!o&&a?e[r]="value":n?e[r]=n[r]:o&&(e[r]="percent")}))},e.prototype.notarget=function(){return this._notarget},e.prototype.getfirsttargetaxismodel=function(){var t;return this.eachtargetaxis((function(e,n){null==t&&(t=this.ecmodel.getcomponent(ie(e),n))}),this),t},e.prototype.eachtargetaxis=function(t,e){this._targetaxisinfomap.each((function(n,i){e(n.indexlist,(function(n){t.call(e,i,n)}))}))},e.prototype.getaxisproxy=function(t,e){var n=this.getaxismodel(t,e);if(n)return n.__dzaxisproxy},e.prototype.getaxismodel=function(t,e){var n=this._targetaxisinfomap.get(t);if(n&&n.indexmap[e])return this.ecmodel.getcomponent(ie(t),e)},e.prototype.setrawrange=function(t){var e=this.option,n=this.settledoption;e([["start","startvalue"],["end","endvalue"]],(function(i){null==t[i[0]]&&null==t[i[1]]||(e[i[0]]=n[i[0]]=t[i[0]],e[i[1]]=n[i[1]]=t[i[1]])}),this),this._updaterangeuse(t)},e.prototype.setcalculatedrange=function(t){var e=this.option;e(["start","startvalue","end","endvalue"],(function(n){e[n]=t[n]}))},e.prototype.getpercentrange=function(){var t=this.findrepresentativeaxisproxy();if(t)return t.getdatapercentwindow()},e.prototype.getvaluerange=function(t,e){if(null!=t||null!=e)return this.getaxisproxy(t,e).getdatavaluewindow();var n=this.findrepresentativeaxisproxy();return n?n.getdatavaluewindow():void 0},e.prototype.findrepresentativeaxisproxy=function(t){if(t)return t.__dzaxisproxy;for(var e,n=this._targetaxisinfomap.keys(),i=0;i=0}(e)){var n=ie(this._dimname),i=e.getreferringcomponents(n,co).models[0];i&&this._axisindex===i.componentindex&&t.push(e)}}),this),t},t.prototype.getaxismodel=function(){return this.ecmodel.getcomponent(this._dimname+"axis",this._axisindex)},t.prototype.getminmaxspan=function(){return t(this._minmaxspan)},t.prototype.calculatedatawindow=function(t){var e,n=this._dataextent,i=this.getaxismodel().axis.scale,r=this._datazoommodel.getrangepropmode(),o=[0,100],a=[],s=[];re(["start","end"],(function(l,u){var h=t[l],c=t[l+"value"];"percent"===r[u]?(null==h&&(h=o[u]),c=i.parse(nr(h,o,n))):(e=!0,h=nr(c=null==c?n[u]:i.parse(c),n,o)),s[u]=c,a[u]=h})),ne(s),ne(a);var l=this._minmaxspan;function u(t,e,n,r,o){var a=o?"span":"valuespan";lk(0,t,n,"all",l["min"+a],l["max"+a]);for(var s=0;s<2;s++)e[s]=nr(t[s],n,r,!0),o&&(e[s]=i.parse(e[s]))}return e?u(s,a,n,o,!1):u(a,s,o,n,!0),{valuewindow:s,percentwindow:a}},t.prototype.reset=function(t){if(t===this._datazoommodel){var e=this.gettargetseriesmodels();this._dataextent=function(t,e,n){var i=[1/0,-1/0];re(n,(function(t){!function(t,e,n){e&&e(c_(e,n),(function(n){var i=e.getapproximateextent(n);i[0]t[1]&&(t[1]=i[1])}))}(i,t.getdata(),e)}));var r=t.getaxismodel(),o=e_(r.axis.scale,r,i).calculate();return[o.min,o.max]}(this,this._dimname,e),this._updateminmaxspan();var n=this.calculatedatawindow(t.settledoption);this._valuewindow=n.valuewindow,this._percentwindow=n.percentwindow,this._setaxismodel()}},t.prototype.filterdata=function(t,e){if(t===this._datazoommodel){var n=this._dimname,i=this.gettargetseriesmodels(),r=t.get("filtermode"),o=this._valuewindow;"none"!==r&&re(i,(function(t){var e=t.getdata(),i=e.mapdimensionsall(n);if(i.length){if("weakfilter"===r){var a=e.getstore(),s=z(i,(function(t){return e.getdimensionindex(t)}),e);e.filterself((function(t){for(var e,n,r,l=0;lo[1];if(h&&!c&&!p)return!0;h&&(r=!0),c&&(e=!0),p&&(n=!0)}return r&&e&&n}))}else re(i,(function(n){if("empty"===r)t.setdata(e=e.map(n,(function(t){return function(t){return t>=o[0]&&t<=o[1]}(t)?t:nan})));else{var i={};i[n]=o,e.selectrange(i)}}));re(i,(function(t){e.setapproximateextent(o,t)}))}}))}},t.prototype._updateminmaxspan=function(){var t=this._minmaxspan={},e=this._datazoommodel,n=this._dataextent;re(["min","max"],(function(i){var r=e.get(i+"span"),o=e.get(i+"valuespan");null!=o&&(o=this.getaxismodel().axis.scale.parse(o)),null!=o?r=nr(n[0]+o,n,[0,100],!0):null!=r&&(o=nr(r,[0,100],n,!0)-n[0]),t[i+"span"]=r,t[i+"valuespan"]=o}),this)},t.prototype._setaxismodel=function(){var t=this.getaxismodel(),e=this._percentwindow,n=this._valuewindow;if(e){var i=gr(n,[0,500]);i=math.min(i,20);var r=t.axis.scale.rawextentinfo;0!==e[0]&&r.setdeterminedminmax("min",+n[0].tofixed(i)),100!==e[1]&&r.setdeterminedminmax("max",+n[1].tofixed(i)),r.freeze()}},t}();var ze={gettargetseries:function(t){function e(e){t.eachcomponent("datazoom",(function(n){n.eachtargetaxis((function(i,r){var o=t.getcomponent(ie(i),r);e(i,r,o,n)}))}))}e((function(t,e,n,i){n.__dzaxisproxy=null}));var n=[];e((function(e,i,r,o){r.__dzaxisproxy||(r.__dzaxisproxy=new ee(e,i,o,t),n.push(r.__dzaxisproxy))}));var i=ft();return e(n,(function(t){e(t.gettargetseriesmodels(),(function(t){i.set(t.uid,t)}))})),i},overallreset:function(t,e){t.eachcomponent("datazoom",(function(t){t.eachtargetaxis((function(e,n){t.getaxisproxy(e,n).reset(t)})),t.eachtargetaxis((function(n,i){t.getaxisproxy(n,i).filterdata(t,e)}))})),t.eachcomponent("datazoom",(function(t){var e=t.findrepresentativeaxisproxy();if(e){var n=e.getdatapercentwindow(),i=e.getdatavaluewindow();t.setcalculatedrange({start:n[0],end:n[1],startvalue:i[0],endvalue:i[1]})}}))}};var ve=!1;function be(t){ve||(ve=!0,t.registerprocessor(t.priority.processor.filter,ze),function(t){t.registeraction("datazoom",(function(t,e){e(te(e,t),(function(e){e.setrawrange({start:t.start,end:t.end,startvalue:t.startvalue,endvalue:t.endvalue})}))}))}(t),t.registersubtypedefaulter("datazoom",(function(){return"slider"})))}function fe(t){t.registercomponentmodel(le),t.registercomponentview(oe),be(t)}var ge=function(){},we={};function he(t,e){we[t]=e}function ye(t){return we[t]}var ue=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.optionupdated=function(){t.prototype.optionupdated.apply(this,arguments);var e=this.ecmodel;e(this.option.feature,(function(t,n){var i=ye(n);i&&(i.getdefaultoption&&(i.defaultoption=i.getdefaultoption(e)),c(t,i.defaultoption))}))},e.type="toolbox",e.layoutmode={type:"box",ignoresize:!0},e.defaultoption={show:!0,z:6,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,position:"bottom"}},e}(tp);function xe(t,e){var n=ip(e.get("padding")),i=e.getitemstyle(["color","opacity"]);return i.fill=e.get("backgroundcolor"),t=new cs({shape:{x:t.x-n[3],y:t.y-n[0],width:t.width+n[1]+n[3],height:t.height+n[0]+n[2],r:e.get("borderradius")},style:i,silent:!0,z2:-1})}var ze=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.render=function(t,e,n,i){var r=this.group;if(r.removeall(),t.get("show")){var o=+t.get("itemsize"),a="vertical"===t.get("orient"),s=t.get("feature")||{},l=this._features||(this._features={}),u=[];e(s,(function(t,e){u.push(e)})),new im(this._featurenames||[],u).add(h).update(h).remove(h(h,null)).execute(),this._featurenames=u,function(t,e,n){var i=e.getboxlayoutparams(),r=e.get("padding"),o={width:n.getwidth(),height:n.getheight()},a=xp(i,o,r);mp(e.get("orient"),t,e.get("itemgap"),a.width,a.height),_p(t,i,o,r)}(r,t,n),r.add(xe(r.getboundingrect(),t)),a||r.eachchild((function(t){var e=t.__title,i=t.ensurestate("emphasis"),a=i.textconfig||(i.textconfig={}),s=t.gettextcontent(),l=s&&s.ensurestate("emphasis");if(l&&!u(l)&&e){var u=l.style||(l.style={}),h=cr(e,ks.makefont(u)),c=t.x+r.x,p=!1;t.y+r.y+o+h.height>n.getheight()&&(a.position="top",p=!0);var d=p?-5-h.height:o+10;c+h.width/2>n.getwidth()?(a.position=["100%",d],u.align="right"):c-h.width/2<0&&(a.position=[0,d],u.align="left")}}))}function h(h,c){var p,d=u[h],f=u[c],g=s[d],y=new dc(g,t,t.ecmodel);if(i&&null!=i.newtitle&&i.featurename===d&&(g.title=i.newtitle),d&&!f){if(function(t){return 0===t.indexof("my")}(d))p={onclick:y.option.onclick,featurename:d};else{var v=ye(d);if(!v)return;p=new v}l[d]=p}else if(!(p=l[f]))return;p.uid=gc("toolbox-feature"),p.model=y,p.ecmodel=e,p.api=n;var m=p instanceof ge;d||!f?!y.get("show")||m&&p.unusable?m&&p.remove&&p.remove(e,n):(!function(i,s,l){var u,h,c=i.getmodel("iconstyle"),p=i.getmodel(["emphasis","iconstyle"]),d=s instanceof ge&&s.geticons?s.geticons():i.get("icon"),f=i.get("title")||{};x(d)?(u={})[l]=d:u=d;x(f)?(h={})[l]=f:h=f;var g=i.iconpaths={};e(u,(function(l,u){var d=ph(l,{},{x:-o/2,y:-o/2,width:o,height:o});d.setstyle(c.getitemstyle()),d.ensurestate("emphasis").style=p.getitemstyle();var f=new ks({style:{text:h[u],align:p.get("textalign"),borderradius:p.get("textborderradius"),padding:p.get("textpadding"),fill:null},ignore:!0});d.settextcontent(f),eh({el:d,componentmodel:t,itemname:u,formatterparamsextra:{title:h[u]}}),d.__title=h[u],d.on("mouseover",(function(){var e=p.getitemstyle(),i=a?null==t.get("right")&&"right"!==t.get("left")?"right":"left":null==t.get("bottom")&&"bottom"!==t.get("top")?"bottom":"top";f.setstyle({fill:p.get("textfill")||e.fill||e.stroke||"#000",backgroundcolor:p.get("textbackgroundcolor")}),d.settextconfig({position:p.get("textposition")||i}),f.ignore=!t.get("showtitle"),n.enteremphasis(this)})).on("mouseout",(function(){"emphasis"!==i.get(["iconstatus",u])&&n.leaveemphasis(this),f.hide()})),("emphasis"===i.get(["iconstatus",u])?_l:bl)(d),r.add(d),d.on("click",w(s.onclick,s,e,n,u)),g[u]=d}))}(y,p,d),y.seticonstatus=function(t,e){var n=this.option,i=this.iconpaths;n.iconstatus=n.iconstatus||{},n.iconstatus[t]=e,i[t]&&("emphasis"===e?_l:bl)(i[t])},p instanceof ge&&p.render&&p.render(y,e,n,i)):m&&p.dispose&&p.dispose(e,n)}},e.prototype.updateview=function(t,e,n,i){e(this._features,(function(t){t instanceof ge&&t.updateview&&t.updateview(t.model,e,n,i)}))},e.prototype.remove=function(t,e){e(this._features,(function(n){n instanceof ge&&n.remove&&n.remove(t,e)})),this.group.removeall()},e.prototype.dispose=function(t,e){e(this._features,(function(n){n instanceof ge&&n.dispose&&n.dispose(t,e)}))},e.type="toolbox",e}(gg);var je=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.onclick=function(t,e){var n=this.model,i=n.get("name")||t.get("title.0.text")||"echarts",o="svg"===e.getzr().painter.gettype(),a=o?"svg":n.get("type",!0)||"png",s=e.getconnecteddataurl({type:a,backgroundcolor:n.get("backgroundcolor",!0)||t.get("backgroundcolor")||"#fff",connectedbackgroundcolor:n.get("connectedbackgroundcolor"),excludecomponents:n.get("excludecomponents"),pixelratio:n.get("pixelratio")}),l=r.browser;if(u(mouseevent)&&(l.newedge||!l.ie&&!l.edge)){var u=document.createelement("a");u.download=i+"."+a,u.target="_blank",u.href=s;var h=new mouseevent("click",{view:document.defaultview,bubbles:!0,cancelable:!1});u.dispatchevent(h)}else if(window.navigator.mssaveoropenblob||o){var c=s.split(","),p=c[0].indexof("base64")>-1,d=o?decodeuricomponent(c[1]):c[1];p&&(d=window.atob(d));var f=i+"."+a;if(window.navigator.mssaveoropenblob){for(var g=d.length,y=new uint8array(g);g--;)y[g]=d.charcodeat(g);var v=new blob([y]);window.navigator.mssaveoropenblob(v,f)}else{var m=document.createelement("iframe");document.body.appendchild(m);var x=m.contentwindow,_=x.document;_.open("image/svg+xml","replace"),_.write(d),_.close(),x.focus(),_.execcommand("saveas",!0,f),document.body.removechild(m)}}else{var b=n.get("lang"),w='',s=window.open();s.document.write(w),s.document.title=i}},e.getdefaultoption=function(t){return{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:t.getlocalemodel().get(["toolbox","saveasimage","title"]),type:"png",connectedbackgroundcolor:"#fff",name:"",excludecomponents:["toolbox"],lang:t.getlocalemodel().get(["toolbox","saveasimage","lang"])}},e}(ge),qe="__ec_magictype_stack__",ke=[["line","bar"],["stack"]],$e=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.geticons=function(){var t=this.model,e=t.get("icon"),n={};return e(t.get("type"),(function(t){e[t]&&(n[t]=e[t])})),n},e.getdefaultoption=function(t){return{show:!0,type:[],icon:{line:"m4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9m4.1,58h51.4",bar:"m6.7,22.9h10v48h-10v22.9zm24.9,13h10v35h-10v13zm43.2,2h10v46h-10v2zm3.1,58h53.7",stack:"m8.2,38.4l-8.4,4.1l30.6,15.3l60,42.5l-8.1-4.1l-21.5,11l8.2,38.4z m51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9l8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2l51.9,30z m51.9,21.7l-8.1,4.2l35.7,30l-5.3,2.8l24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2l8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1l51.9,21.7zm30.4,2.2l-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1l30.4,2.2z"},title:t.getlocalemodel().get(["toolbox","magictype","title"]),option:{},seriesindex:{}}},e.prototype.onclick=function(t,e,n){var i=this.model,r=i.get(["seriesindex",n]);if(je[n]){var o,a={series:[]};e(ke,(function(t){p(t,n)>=0&&e(t,(function(t){i.seticonstatus(t,"normal")}))})),i.seticonstatus(n,"emphasis"),t.eachcomponent({maintype:"series",query:null==r?null:{seriesindex:r}},(function(t){var e=t.subtype,r=t.id,o=je[n](e,r,t,i);o&&(k(o,t.option),a.series.push(o));var s=t.coordinatesystem;if(s&&"cartesian2d"===s.type&&("line"===n||"bar"===n)){var l=s.getaxesbyscale("ordinal")[0];if(l){var u=l.dim+"axis",h=t.getreferringcomponents(u,co).models[0].componentindex;a[u]=a[u]||[];for(var c=0;c<=h;c++)a[u][h]=a[u][h]||{};a[u][h].boundarygap="bar"===n}}}));var s=n;"stack"===n&&(o=c({stack:i.option.title.tiled,tiled:i.option.title.stack},i.option.title),"emphasis"!==i.get(["iconstatus",n])&&(s="tiled")),e.dispatchaction({type:"changemagictype",currenttype:s,newoption:a,newtitle:o,featurename:"magictype"})}},e}(ge),je={line:function(t,e,n,i){if("bar"===t)return c({id:e,type:"line",data:n.get("data"),stack:n.get("stack"),markpoint:n.get("markpoint"),markline:n.get("markline")},i.get(["option","line"])||{},!0)},bar:function(t,e,n,i){if("line"===t)return c({id:e,type:"bar",data:n.get("data"),stack:n.get("stack"),markpoint:n.get("markpoint"),markline:n.get("markline")},i.get(["option","bar"])||{},!0)},stack:function(t,e,n,i){var r=n.get("stack")===qe;if("line"===t||"bar"===t)return i.seticonstatus("stack",r?"normal":"emphasis"),c({id:e,stack:r?"":qe},i.get(["option","stack"])||{},!0)}};cm({type:"changemagictype",event:"magictypechanged",update:"prepareandupdate"},(function(t,e){e.mergeoption(t.newoption)}));var qe=new array(60).join("-"),tz="\t";function ez(t){return t.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}var nz=new regexp("[\t]+","g");function iz(t,e){var n=t.split(new regexp("\n*"+qe+"\n*","g")),i={series:[]};return e(n,(function(t,n){if(function(t){if(t.slice(0,t.indexof("\n")).indexof(tz)>=0)return!0}(t)){var r=function(t){for(var e=t.split(/\n+/g),n=[],i=z(ez(e.shift()).split(nz),(function(t){return{name:t,data:[]}})),r=0;r=0)&&t(r,i._targetinfolist)}))}return t.prototype.setoutputranges=function(t,e){return this.matchoutputranges(t,e,(function(t,e,n){if((t.coordranges||(t.coordranges=[])).push(e),!t.coordrange){t.coordrange=e;var i=vz[t.brushtype](0,n,e);t.__rangeoffset={offset:xz[t.brushtype](i.values,t.range,[1,1]),xyminmax:i.xyminmax}}})),t},t.prototype.matchoutputranges=function(t,e,n){e(t,(function(t){var i=this.findtargetinfo(t,e);i&&!0!==i&&e(i.coordsyses,(function(i){var r=vz[t.brushtype](1,i,t.range,!0);n(t,r.values,i,e)}))}),this)},t.prototype.setinputranges=function(t,e){e(t,(function(t){var n,i,r,o,a,s=this.findtargetinfo(t,e);if(t.range=t.range||[],s&&!0!==s){t.panelid=s.panelid;var l=vz[t.brushtype](0,s.coordsys,t.coordrange),u=t.__rangeoffset;t.range=u?xz[t.brushtype](l.values,u.offset,(n=l.xyminmax,i=u.xyminmax,r=bz(n),o=bz(i),a=[r[0]/o[0],r[1]/o[1]],isnan(a[0])&&(a[0]=1),isnan(a[1])&&(a[1]=1),a)):l.values}}),this)},t.prototype.makepanelopts=function(t,e){return z(this._targetinfolist,(function(n){var i=n.getpanelrect();return{panelid:n.panelid,defaultbrushtype:e?e(n):null,clippath:hl(i),istargetbycursor:pl(i,t,n.coordsysmodel),getlinearbrushotherextent:cl(i)}}))},t.prototype.controlseries=function(t,e,n){var i=this.findtargetinfo(t,n);return!0===i||i&&p(i.coordsyses,e.coordinatesystem)>=0},t.prototype.findtargetinfo=function(t,e){for(var n=this._targetinfolist,i=dz(e,t),r=0;rt[1]&&t.reverse(),t}function dz(t,e){return io(t,e,{includemaintypes:hz})}var fz={grid:function(t,e){var n=t.xaxismodels,i=t.yaxismodels,r=t.gridmodels,o=ft(),a={},s={};(n||i||r)&&(e(n,(function(t){var e=t.axis.grid.model;o.set(e.id,e),a[e.id]=!0})),e(i,(function(t){var e=t.axis.grid.model;o.set(e.id,e),s[e.id]=!0})),e(r,(function(t){o.set(t.id,t),a[t.id]=!0,s[t.id]=!0})),o.each((function(t){var r=t.coordinatesystem,o=[];e(r.getcartesians(),(function(t,e){(p(n,t.getaxis("x").model)>=0||p(i,t.getaxis("y").model)>=0)&&o.push(t)})),e.push({panelid:"grid--"+t.id,gridmodel:t,coordsysmodel:t,coordsys:o[0],coordsyses:o,getpanelrect:yz.grid,xaxisdeclared:a[t.id],yaxisdeclared:s[t.id]})})))},geo:function(t,e){e(t.geomodels,(function(t){var n=t.coordinatesystem;e.push({panelid:"geo--"+t.id,geomodel:t,coordsysmodel:t,coordsys:n,coordsyses:[n],getpanelrect:yz.geo})}))}},gz=[function(t,e){var n=t.xaxismodel,i=t.yaxismodel,r=t.gridmodel;return!r&&n&&(r=n.axis.grid.model),!r&&i&&(r=i.axis.grid.model),r&&r===e.gridmodel},function(t,e){var n=t.geomodel;return n&&n===e.geomodel}],yz={grid:function(){return this.coordsys.master.getrect().clone()},geo:function(){var t=this.coordsys,e=t.getboundingrect().clone();return e.applytransform(ih(t)),e}},vz={linex:h(mz,0),liney:h(mz,1),rect:function(t,e,n,i){var r=t?e.pointtodata([n[0][0],n[1][0]],i):e.datatopoint([n[0][0],n[1][0]],i),o=t?e.pointtodata([n[0][1],n[1][1]],i):e.datatopoint([n[0][1],n[1][1]],i),a=[pz([r[0],o[0]]),pz([r[1],o[1]])];return{values:a,xyminmax:a}},polygon:function(t,e,n,i){var r=[[1/0,-1/0],[1/0,-1/0]];return{values:z(n,(function(n){var o=t?e.pointtodata(n,i):e.datatopoint(n,i);return r[0][0]=math.min(r[0][0],o[0]),r[1][0]=math.min(r[1][0],o[1]),r[0][1]=math.max(r[0][1],o[0]),r[1][1]=math.max(r[1][1],o[1]),o})),xyminmax:r}}};function mz(t,e,n,i){var r=n.getaxis(["x","y"][t]),o=pz(z([0,1],(function(t){return e?r.coordtodata(r.tolocalcoord(i[t]),!0):r.toglobalcoord(r.datatocoord(i[t]))}))),a=[];return a[t]=o,a[1-t]=[nan,nan],{values:o,xyminmax:a}}var xz={linex:h(_z,0),liney:h(_z,1),rect:function(t,e,n){return[[t[0][0]-n[0]*e[0][0],t[0][1]-n[0]*e[0][1]],[t[1][0]-n[1]*e[1][0],t[1][1]-n[1]*e[1][1]]]},polygon:function(t,e,n){return z(t,(function(t,i){return[t[0]-n[0]*e[i][0],t[1]-n[1]*e[i][1]]}))}};function _z(t,e,n,i){return[e[0]-i[t]*n[0],e[1]-i[t]*n[1]]}function bz(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[nan,nan]}var wz,sz,mz=e,iz=uo+"toolbox-datazoom_",tz=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.render=function(t,e,n,i){this._brushcontroller||(this._brushcontroller=new ok(n.getzr()),this._brushcontroller.on("brush",w(this._onbrush,this)).mount()),function(t,e,n,i,r){var o=n._iszoomactive;i&&"takeglobalcursor"===i.type&&(o="datazoomselect"===i.key&&i.datazoomselectactive);n._iszoomactive=o,t.seticonstatus("zoom",o?"emphasis":"normal");var a=new cz(dz(t),e,{include:["grid"]}).makepanelopts(r,(function(t){return t.xaxisdeclared&&!t.yaxisdeclared?"linex":!t.xaxisdeclared&&t.yaxisdeclared?"liney":"rect"}));n._brushcontroller.setpanels(a).enablebrush(!(!o||!a.length)&&{brushtype:"auto",brushstyle:t.getmodel("brushstyle").getitemstyle()})}(t,e,this,i,n),function(t,e){t.seticonstatus("back",function(t){return lz(t).length}(e)>1?"emphasis":"normal")}(t,e)},e.prototype.onclick=function(t,e,n){cz[n].call(this)},e.prototype.remove=function(t,e){this._brushcontroller&&this._brushcontroller.unmount()},e.prototype.dispose=function(t,e){this._brushcontroller&&this._brushcontroller.dispose()},e.prototype._onbrush=function(t){var e=t.areas;if(t.isend&&e.length){var n={},i=this.ecmodel;this._brushcontroller.updatecovers([]),new cz(dz(this.model),i,{include:["grid"]}).matchoutputranges(e,i,(function(t,e,n){if("cartesian2d"===n.type){var i=t.brushtype;"rect"===i?(r("x",n,e[0]),r("y",n,e[1])):r({linex:"x",liney:"y"}[i],n,e)}})),function(t,e){var n=lz(t);az(e,(function(e,i){for(var r=n.length-1;r>=0&&!n[r][i];r--);if(r<0){var o=t.querycomponents({maintype:"datazoom",subtype:"select",id:i})[0];if(o){var a=o.getpercentrange();n[0][i]={datazoomid:i,start:a[0],end:a[1]}}}})),n.push(e)}(i,n),this._dispatchzoomaction(n)}function r(t,e,r){var o=e.getaxis(t),a=o.model,s=function(t,e,n){var i;return n.eachcomponent({maintype:"datazoom",subtype:"select"},(function(n){n.getaxismodel(t,e.componentindex)&&(i=n)})),i}(t,a,i),l=s.findrepresentativeaxisproxy(a).getminmaxspan();null==l.minvaluespan&&null==l.maxvaluespan||(r=lk(0,r.slice(),o.scale.getextent(),0,l.minvaluespan,l.maxvaluespan)),s&&(n[s.id]={datazoomid:s.id,startvalue:r[0],endvalue:r[1]})}},e.prototype._dispatchzoomaction=function(t){var e=[];mz(t,(function(t,n){e.push(t(t))})),e.length&&this.api.dispatchaction({type:"datazoom",from:this.uid,batch:e})},e.getdefaultoption=function(t){return{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:t.getlocalemodel().get(["toolbox","datazoom","title"]),brushstyle:{borderwidth:0,color:"rgba(210,219,238,0.2)"}}},e}(ge),cz={zoom:function(){var t=!this._iszoomactive;this.api.dispatchaction({type:"takeglobalcursor",key:"datazoomselect",datazoomselectactive:t})},back:function(){this._dispatchzoomaction(function(t){var e=lz(t),n=e[e.length-1];e.length>1&&e.pop();var i={};return az(n,(function(t,n){for(var r=e.length-1;r>=0;r--)if(t=e[r][n]){i[n]=t;break}})),i}(this.ecmodel))}};function dz(t){var e={xaxisindex:t.get("xaxisindex",!0),yaxisindex:t.get("yaxisindex",!0),xaxisid:t.get("xaxisid",!0),yaxisid:t.get("yaxisid",!0)};return null==e.xaxisindex&&null==e.xaxisid&&(e.xaxisindex="all"),null==e.yaxisindex&&null==e.yaxisid&&(e.yaxisindex="all"),e}wz="datazoom",sz=function(t){var e=t.getcomponent("toolbox",0),n=["feature","datazoom"];if(e&&null!=e.get(n)){var i=e.getmodel(n),r=[],o=io(t,dz(i));return mz(o.xaxismodels,(function(t){return a(t,"xaxis","xaxisindex")})),mz(o.yaxismodels,(function(t){return a(t,"yaxis","yaxisindex")})),r}function a(t,e,n){var o=t.componentindex,a={type:"select",$fromtoolbox:!0,filtermode:i.get("filtermode",!0)||"filter",id:iz+e+o};a[n]=o,r.push(a)}},lt(null==jp.get(wz)&&sz),jp.set(wz,sz);var az=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.type="tooltip",e.dependencies=["axispointer"],e.defaultoption={z:60,show:!0,showcontent:!0,trigger:"item",triggeron:"mousemove|click",alwaysshowcontent:!1,displaymode:"single",rendermode:"auto",confine:null,showdelay:0,hidedelay:100,transitionduration:.4,enterable:!1,backgroundcolor:"#fff",shadowblur:10,shadowcolor:"rgba(0, 0, 0, .2)",shadowoffsetx:1,shadowoffsety:2,borderradius:4,borderwidth:1,padding:null,extracsstext:"",axispointer:{type:"line",axis:"auto",animation:"auto",animationdurationupdate:200,animationeasingupdate:"exponentialout",crossstyle:{color:"#999",width:1,type:"dashed",textstyle:{}}},textstyle:{color:"#666",fontsize:14}},e}(tp);function kz(t){var e=t.get("confine");return null!=e?!!e:"richtext"===t.get("rendermode")}function lz(t){if(r.domsupported)for(var e=document.documentelement.style,n=0,i=t.length;n-1?(u+="top:50%",h+="translatey(-50%) rotate("+(a="left"===s?-225:-45)+"deg)"):(u+="left:50%",h+="translatex(-50%) rotate("+(a="top"===s?225:45)+"deg)");var c=a*math.pi/180,p=l+r,d=p*math.abs(math.cos(c))+p*math.abs(math.sin(c)),f=e+" solid "+r+"px;";return'
'}(n,i,r)),x(t))o.innerhtml=t+a;else if(t){o.innerhtml="",y(t)||(t=[t]);for(var s=0;s=0?this._tryshow(n,i):"leave"===e&&this._hide(i))}),this))},e.prototype._keepshow=function(){var t=this._tooltipmodel,e=this._ecmodel,n=this._api,i=t.get("triggeron");if(null!=this._lastx&&null!=this._lasty&&"none"!==i&&"click"!==i){var r=this;cleartimeout(this._refreshupdatetimeout),this._refreshupdatetimeout=settimeout((function(){!n.isdisposed()&&r.manuallyshowtip(t,e,n,{x:r._lastx,y:r._lasty,databycoordsys:r._lastdatabycoordsys})}))}},e.prototype.manuallyshowtip=function(t,e,n,i){if(i.from!==this.uid&&!r.node&&n.getdom()){var o=jz(i,n);this._ticket="";var a=i.databycoordsys,s=function(t,e,n){var i=to(t).queryoptionmap,r=i.keys()[0];if(!r||"series"===r)return;var o,a=ao(e,r,i.get(r),{usedefault:!1,enableall:!1,enablenone:!1}).models[0];if(!a)return;if(n.getviewofcomponentmodel(a).group.traverse((function(e){var n=hs(e).tooltipconfig;if(n&&n.name===t.name)return o=e,!0})),o)return{componentmaintype:r,componentindex:a.componentindex,el:o}}(i,e,n);if(s){var l=s.el.getboundingrect().clone();l.applytransform(s.el.transform),this._tryshow({offsetx:l.x+l.width/2,offsety:l.y+l.height/2,target:s.el,position:i.position,positiondefault:"bottom"},o)}else if(i.tooltip&&null!=i.x&&null!=i.y){var u=uz;u.x=i.x,u.y=i.y,u.update(),hs(u).tooltipconfig={name:null,option:i.tooltip},this._tryshow({offsetx:i.x,offsety:i.y,target:u},o)}else if(a)this._tryshow({offsetx:i.x,offsety:i.y,position:i.position,databycoordsys:a,tooltipoption:i.tooltipoption},o);else if(null!=i.seriesindex){if(this._manuallyaxisshowtip(t,e,n,i))return;var h=en(i,e),c=h.point[0],p=h.point[1];null!=c&&null!=p&&this._tryshow({offsetx:c,offsety:p,target:h.el,position:i.position,positiondefault:"bottom"},o)}else null!=i.x&&null!=i.y&&(n.dispatchaction({type:"updateaxispointer",x:i.x,y:i.y}),this._tryshow({offsetx:i.x,offsety:i.y,position:i.position,target:n.getzr().findhover(i.x,i.y).target},o))}},e.prototype.manuallyhidetip=function(t,e,n,i){var r=this._tooltipcontent;!this._alwaysshowcontent&&this._tooltipmodel&&r.hidelater(this._tooltipmodel.get("hidedelay")),this._lastx=this._lasty=this._lastdatabycoordsys=null,i.from!==this.uid&&this._hide(jz(i,n))},e.prototype._manuallyaxisshowtip=function(t,e,n,i){var r=i.seriesindex,o=i.dataindex,a=e.getcomponent("axispointer").coordsysaxesinfo;if(null!=r&&null!=o&&null!=a){var s=e.getseriesbyindex(r);if(s)if("axis"===zz([s.getdata().getitemmodel(o),s,(s.coordinatesystem||{}).model],this._tooltipmodel).get("trigger"))return n.dispatchaction({type:"updateaxispointer",seriesindex:r,dataindex:o,position:i.position}),!0}},e.prototype._tryshow=function(t,e){var n=t.target;if(this._tooltipmodel){this._lastx=t.offsetx,this._lasty=t.offsety;var i=t.databycoordsys;if(i&&i.length)this._showaxistooltip(i,t);else if(n){var r,o;this._lastdatabycoordsys=null,xy(n,(function(t){return null!=hs(t).dataindex?(r=t,!0):null!=hs(t).tooltipconfig?(o=t,!0):void 0}),!0),r?this._showseriesitemtooltip(t,r,e):o?this._showcomponentitemtooltip(t,o,e):this._hide(e)}else this._lastdatabycoordsys=null,this._hide(e)}},e.prototype._showormove=function(t,e){var n=t.get("showdelay");e=w(e,this),cleartimeout(this._showtimout),n>0?this._showtimout=settimeout(e,n):e()},e.prototype._showaxistooltip=function(t,e){var n=this._ecmodel,i=this._tooltipmodel,r=[e.offsetx,e.offsety],o=zz([e.tooltipoption],i),a=this._rendermode,s=[],l=xf("section",{blocks:[],noheader:!0}),u=[],h=new ig;e(t,(function(t){e(t.databyaxis,(function(t){var e=n.getcomponent(t.axisdim+"axis",t.axisindex),r=t.value;if(e&&null!=r){var o=zr(r,e.axis,n,t.seriesdataindices,t.valuelabelopt),c=xf("section",{header:o,noheader:!ut(o),sortblocks:!0,blocks:[]});l.blocks.push(c),e(t.seriesdataindices,(function(l){var p=n.getseriesbyindex(l.seriesindex),d=l.dataindexinside,f=p.getdataparams(d);if(!(f.dataindex<0)){f.axisdim=t.axisdim,f.axisindex=t.axisindex,f.axistype=t.axistype,f.axisid=t.axisid,f.axisvalue=s_(e.axis,{value:r}),f.axisvaluelabel=o,f.marker=h.maketooltipmarker("item",pp(f.color),a);var g=uf(p.formattooltip(d,!0,null)),y=g.frag;if(y){var v=zz([p],i).get("valueformatter");c.blocks.push(v?a({valueformatter:v},y):y)}g.text&&u.push(g.text),s.push(f)}}))}}))})),l.blocks.reverse(),u.reverse();var c=e.position,p=o.get("order"),d=jf(l,h,a,p,n.get("useutc"),o.get("textstyle"));d&&u.unshift(d);var f="richtext"===a?"\n\n":"
",g=u.join(f);this._showormove(o,(function(){this._updatecontentnotchangedonaxis(t,s)?this._updateposition(o,c,r[0],r[1],this._tooltipcontent,s):this._showtooltipcontent(o,g,s,math.random()+"",r[0],r[1],c,null,h)}))},e.prototype._showseriesitemtooltip=function(t,e,n){var i=this._ecmodel,r=hs(e),o=r.seriesindex,a=i.getseriesbyindex(o),s=r.datamodel||a,l=r.dataindex,u=r.datatype,h=s.getdata(u),c=this._rendermode,p=t.positiondefault,d=zz([h.getitemmodel(l),s,a&&(a.coordinatesystem||{}).model],this._tooltipmodel,p?{position:p}:null),f=d.get("trigger");if(null==f||"item"===f){var g=s.getdataparams(l,u),y=new ig;g.marker=y.maketooltipmarker("item",pp(g.color),c);var v=uf(s.formattooltip(l,!1,u)),m=d.get("order"),x=d.get("valueformatter"),_=v.frag,b=_?jf(x?a({valueformatter:x},_):_,y,c,m,i.get("useutc"),d.get("textstyle")):v.text,w="item_"+s.name+"_"+l;this._showormove(d,(function(){this._showtooltipcontent(d,b,g,w,t.offsetx,t.offsety,t.position,t.target,y)})),n({type:"showtip",dataindexinside:l,dataindex:h.getrawindex(l),seriesindex:o,from:this.uid})}},e.prototype._showcomponentitemtooltip=function(t,e,n){var i=hs(e),r=i.tooltipconfig.option||{};if(x(r)){r={content:r,formatter:r}}var o=[r],a=this._ecmodel.getcomponent(i.componentmaintype,i.componentindex);a&&o.push(a),o.push({formatter:r.content});var s=t.positiondefault,l=zz(o,this._tooltipmodel,s?{position:s}:null),u=l.get("content"),h=math.random()+"",c=new ig;this._showormove(l,(function(){var n=t(l.get("formatterparams")||{});this._showtooltipcontent(l,u,n,h,t.offsetx,t.offsety,t.position,e,c)})),n({type:"showtip",from:this.uid})},e.prototype._showtooltipcontent=function(t,e,n,i,r,o,a,s,l){if(this._ticket="",t.get("showcontent")&&t.get("show")){var u=this._tooltipcontent;u.setenterable(t.get("enterable"));var h=t.get("formatter");a=a||t.get("position");var c=e,p=this._getnearestpoint([r,o],n,t.get("trigger"),t.get("bordercolor")).color;if(h)if(x(h)){var d=t.ecmodel.get("useutc"),f=y(n)?n[0]:n;c=h,f&&f.axistype&&f.axistype.indexof("time")>=0&&(c=vc(f.axisvalue,c,d)),c=hp(c,n,!0)}else if(u(h)){var g=w((function(e,i){e===this._ticket&&(u.setcontent(i,l,t,p,a),this._updateposition(t,a,r,o,u,n,s))}),this);this._ticket=i,c=h(n,i,g)}else c=h;u.setcontent(c,l,t,p,a),u.show(t,p),this._updateposition(t,a,r,o,u,n,s)}},e.prototype._getnearestpoint=function(t,e,n,i){return"axis"===n||y(e)?{color:i||("html"===this._rendermode?"#fff":"none")}:y(e)?void 0:{color:i||e.color||e.bordercolor}},e.prototype._updateposition=function(t,e,n,i,r,o,a){var s=this._api.getwidth(),l=this._api.getheight();e=e||t.get("position");var u=r.getsize(),h=t.get("align"),c=t.get("verticalalign"),p=a&&a.getboundingrect().clone();if(a&&p.applytransform(a.transform),u(e)&&(e=e([n,i],o,r.el,p,{viewsize:[s,l],contentsize:u.slice()})),y(e))n=er(e[0],s),i=er(e[1],l);else if(q(e)){var d=e;d.width=u[0],d.height=u[1];var f=xp(d,{width:s,height:l});n=f.x,i=f.y,h=null,c=null}else if(x(e)&&a){var g=function(t,e,n,i){var r=n[0],o=n[1],a=math.ceil(math.sqrt2*i)+8,s=0,l=0,u=e.width,h=e.height;switch(t){case"inside":s=e.x+u/2-r/2,l=e.y+h/2-o/2;break;case"top":s=e.x+u/2-r/2,l=e.y-o-a;break;case"bottom":s=e.x+u/2-r/2,l=e.y+h+a;break;case"left":s=e.x-r-a,l=e.y+h/2-o/2;break;case"right":s=e.x+u+a,l=e.y+h/2-o/2}return[s,l]}(e,p,u,t.get("borderwidth"));n=g[0],i=g[1]}else{g=function(t,e,n,i,r,o,a){var s=n.getsize(),l=s[0],u=s[1];null!=o&&(t+l+o+2>i?t-=l+o:t+=o);null!=a&&(e+u+a>r?e-=u+a:e+=a);return[t,e]}(n,i,r,s,l,h?null:20,c?null:20);n=g[0],i=g[1]}if(h&&(n-=qz(h)?u[0]/2:"right"===h?u[0]:0),c&&(i-=qz(c)?u[1]/2:"bottom"===c?u[1]:0),kz(t)){g=function(t,e,n,i,r){var o=n.getsize(),a=o[0],s=o[1];return t=math.min(t+a,i)-a,e=math.min(e+s,r)-s,t=math.max(t,0),e=math.max(e,0),[t,e]}(n,i,r,s,l);n=g[0],i=g[1]}r.moveto(n,i)},e.prototype._updatecontentnotchangedonaxis=function(t,e){var n=this._lastdatabycoordsys,i=this._cbparamslist,r=!!n&&n.length===t.length;return r&&e(n,(function(n,o){var a=n.databyaxis||[],s=(t[o]||{}).databyaxis||[];(r=r&&a.length===s.length)&&e(a,(function(t,n){var o=s[n]||{},a=t.seriesdataindices||[],l=o.seriesdataindices||[];(r=r&&t.value===o.value&&t.axistype===o.axistype&&t.axisid===o.axisid&&a.length===l.length)&&e(a,(function(t,e){var n=l[e];r=r&&t.seriesindex===n.seriesindex&&t.dataindex===n.dataindex})),i&&e(t.seriesdataindices,(function(t){var n=t.seriesindex,o=e[n],a=i[n];o&&a&&a.data!==o.data&&(r=!1)}))}))})),this._lastdatabycoordsys=t,this._cbparamslist=e,!!r},e.prototype._hide=function(t){this._lastdatabycoordsys=null,t({type:"hidetip",from:this.uid})},e.prototype.dispose=function(t,e){!r.node&&e.getdom()&&(kg(this,"_updateposition"),this._tooltipcontent.dispose(),qr("itemtooltip",e))},e.type="tooltip",e}(gg);function zz(t,e,n){var i,r=e.ecmodel;n?(i=new dc(n,r,r),i=new dc(e.option,i,r)):i=e;for(var o=t.length-1;o>=0;o--){var a=t[o];a&&(a instanceof dc&&(a=a.get("tooltip",!0)),x(a)&&(a={formatter:a}),a&&(i=new dc(a,i,r)))}return i}function jz(t,e){return t.dispatchaction||w(e.dispatchaction,e)}function qz(t){return"center"===t||"middle"===t}var kz=["rect","polygon","keep","clear"];function $z(t,e){var n=ho(t?t.brush:[]);if(n.length){var i=[];e(n,(function(t){var e=t.hasownproperty("toolbox")?t.toolbox:[];e instanceof array&&(i=i.concat(e))}));var r=t&&t.toolbox;y(r)&&(r=r[0]),r||(r={feature:{}},t.toolbox=[r]);var o=r.feature||(r.feature={}),a=o.brush||(o.brush={}),s=a.type||(a.type=[]);s.push.apply(s,i),function(t){var e={};e(t,(function(t){e[t]=1})),t.length=0,e(e,(function(e,n){t.push(n)}))}(s),e&&!s.length&&s.push.apply(s,kz)}}var jz=e;function qz(t){if(t)for(var e in t)if(t.hasownproperty(e))return!0}function tv(t,e,n){var i={};return jz(e,(function(e){var r,o=i[e]=((r=function(){}).prototype.__hidden=r.prototype,new r);jz(t[e],(function(t,i){if(id.isvalidtype(i)){var r={type:i,visual:t};n&&n(r,e),o[i]=new id(r),"opacity"===i&&((r=t(r)).type="coloralpha",o.__hidden.__alphaforopacity=new id(r))}}))})),i}function ev(t,e,n){var i;e(n,(function(t){e.hasownproperty(t)&&qz(e[t])&&(i=!0)})),i&&e(n,(function(n){e.hasownproperty(n)&&qz(e[n])?t[n]=t(e[n]):delete t[n]}))}var nv={linex:iv(0),liney:iv(1),rect:{point:function(t,e,n){return t&&n.boundingrect.contain(t[0],t[1])},rect:function(t,e,n){return t&&n.boundingrect.intersect(t)}},polygon:{point:function(t,e,n){return t&&n.boundingrect.contain(t[0],t[1])&&y_(n.range,t[0],t[1])},rect:function(t,e,n){var i=n.range;if(!t||i.length<=1)return!1;var r=t.x,o=t.y,a=t.width,s=t.height,l=i[0];return!!(y_(i,r,o)||y_(i,r+a,o)||y_(i,r,o+s)||y_(i,r+a,o+s)||sr.create(t).contain(l[0],l[1])||oh(r,o,r+a,o,i)||oh(r,o,r,o+s,i)||oh(r+a,o,r+a,o+s,i)||oh(r,o+s,r+a,o+s,i))||void 0}}};function iv(t){var e=["x","y"],n=["width","height"];return{point:function(e,n,i){if(e){var r=i.range;return rv(e[t],r)}},rect:function(i,r,o){if(i){var a=o.range,s=[i[e[t]],i[e[t]]+i[n[t]]];return s[1]e[0][1]&&(e[0][1]=o[0]),o[1]e[1][1]&&(e[1][1]=o[1])}return e&&dv(e)}};function dv(t){return new sr(t[0][0],t[1][0],t[0][1]-t[0][0],t[1][1]-t[1][0])}var fv=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.init=function(t,e){this.ecmodel=t,this.api=e,this.model,(this._brushcontroller=new ok(e.getzr())).on("brush",w(this._onbrush,this)).mount()},e.prototype.render=function(t,e,n,i){this.model=t,this._updatecontroller(t,e,n,i)},e.prototype.updatetransform=function(t,e,n,i){lv(e),this._updatecontroller(t,e,n,i)},e.prototype.updatevisual=function(t,e,n,i){this.updatetransform(t,e,n,i)},e.prototype.updateview=function(t,e,n,i){this._updatecontroller(t,e,n,i)},e.prototype._updatecontroller=function(t,e,n,i){(!i||i.$from!==t.id)&&this._brushcontroller.setpanels(t.brushtargetmanager.makepanelopts(n)).enablebrush(t.brushoption).updatecovers(t.areas.slice())},e.prototype.dispose=function(){this._brushcontroller.dispose()},e.prototype._onbrush=function(t){var e=this.model.id,n=this.model.brushtargetmanager.setoutputranges(t.areas,this.ecmodel);(!t.isend||t.removeonclick)&&this.api.dispatchaction({type:"brush",brushid:e,areas:t(n),$from:e}),t.isend&&this.api.dispatchaction({type:"brushend",brushid:e,areas:t(n),$from:e})},e.type="brush",e}(gg),gv=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.areas=[],n.brushoption={},n}return n(e,t),e.prototype.optionupdated=function(t,e){var n=this.option;!e&&ev(n,t,["inbrush","outofbrush"]);var i=n.inbrush=n.inbrush||{};n.outofbrush=n.outofbrush||{color:"#ddd"},i.hasownproperty("liftz")||(i.liftz=5)},e.prototype.setareas=function(t){t&&(this.areas=z(t,(function(t){return yv(this.option,t)}),this))},e.prototype.setbrushoption=function(t){this.brushoption=yv(this.option,t),this.brushtype=this.brushoption.brushtype},e.type="brush",e.dependencies=["geo","grid","xaxis","yaxis","parallel","series"],e.defaultoption={seriesindex:"all",brushtype:"rect",brushmode:"single",transformable:!0,brushstyle:{borderwidth:1,color:"rgba(210,219,238,0.3)",bordercolor:"#d2dbee"},throttletype:"fixrate",throttledelay:0,removeonclick:!0,z:1e4},e}(tp);function yv(t,e){return c({brushtype:t.brushtype,brushmode:t.brushmode,transformable:t.transformable,brushstyle:new dc(t.brushstyle).getitemstyle(),removeonclick:t.removeonclick,z:t.z},e,!0)}var vv=["rect","polygon","linex","liney","keep","clear"],mv=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.render=function(t,e,n){var i,r,o;e.eachcomponent({maintype:"brush"},(function(t){i=t.brushtype,r=t.brushoption.brushmode||"single",o=o||!!t.areas.length})),this._brushtype=i,this._brushmode=r,e(t.get("type",!0),(function(e){t.seticonstatus(e,("keep"===e?"multiple"===r:"clear"===e?o:e===i)?"emphasis":"normal")}))},e.prototype.updateview=function(t,e,n){this.render(t,e,n)},e.prototype.geticons=function(){var t=this.model,e=t.get("icon",!0),n={};return e(t.get("type",!0),(function(t){e[t]&&(n[t]=e[t])})),n},e.prototype.onclick=function(t,e,n){var i=this._brushtype,r=this._brushmode;"clear"===n?(e.dispatchaction({type:"axisareaselect",intervals:[]}),e.dispatchaction({type:"brush",command:"clear",areas:[]})):e.dispatchaction({type:"takeglobalcursor",key:"brush",brushoption:{brushtype:"keep"===n?i:i!==n&&n,brushmode:"keep"===n?"multiple"===r?"single":"multiple":r}})},e.getdefaultoption=function(t){return{show:!0,type:vv.slice(),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:t.getlocalemodel().get(["toolbox","brush","title"])}},e}(ge);var xv=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.layoutmode={type:"box",ignoresize:!0},n}return n(e,t),e.type="title",e.defaultoption={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:"bold",color:"#464646"},subtextstyle:{fontsize:12,color:"#6e7079"}},e}(tp),_v=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.render=function(t,e,n){if(this.group.removeall(),t.get("show")){var i=this.group,r=t.getmodel("textstyle"),o=t.getmodel("subtextstyle"),a=t.get("textalign"),s=rt(t.get("textbaseline"),t.get("textverticalalign")),l=new ks({style:uh(r,{text:t.get("text"),fill:r.gettextcolor()},{disablebox:!0}),z2:10}),u=l.getboundingrect(),h=t.get("subtext"),c=new ks({style:uh(o,{text:h,fill:o.gettextcolor(),y:u.height+t.get("itemgap"),verticalalign:"top"},{disablebox:!0}),z2:10}),p=t.get("link"),d=t.get("sublink"),f=t.get("triggerevent",!0);l.silent=!p&&!f,c.silent=!d&&!f,p&&l.on("click",(function(){dp(p,"_"+t.get("target"))})),d&&c.on("click",(function(){dp(d,"_"+t.get("subtarget"))})),hs(l).eventdata=hs(c).eventdata=f?{componenttype:"title",componentindex:t.componentindex}:null,i.add(l),h&&i.add(c);var g=i.getboundingrect(),y=t.getboxlayoutparams();y.width=g.width,y.height=g.height;var v=xp(y,{width:n.getwidth(),height:n.getheight()},t.get("padding"));a||("middle"===(a=t.get("left")||t.get("right"))&&(a="center"),"right"===a?v.x+=v.width:"center"===a&&(v.x+=v.width/2)),s||("center"===(s=t.get("top")||t.get("bottom"))&&(s="middle"),"bottom"===s?v.y+=v.height:"middle"===s&&(v.y+=v.height/2),s=s||"top"),i.x=v.x,i.y=v.y,i.markredraw();var m={align:a,verticalalign:s};l.setstyle(m),c.setstyle(m),g=i.getboundingrect();var x=v.margin,_=t.getitemstyle(["color","opacity"]);_.fill=t.get("backgroundcolor");var b=new cs({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});i.add(b)}},e.type="title",e}(gg);var bv=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.layoutmode="box",n}return n(e,t),e.prototype.init=function(t,e,n){this.mergedefaultandtheme(t,n),this._initdata()},e.prototype.mergeoption=function(e){t.prototype.mergeoption.apply(this,arguments),this._initdata()},e.prototype.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),t<0&&(t=0)),this.option.currentindex=t},e.prototype.getcurrentindex=function(){return this.option.currentindex},e.prototype.isindexmax=function(){return this.getcurrentindex()>=this._data.count()-1},e.prototype.setplaystate=function(t){this.option.autoplay=!!t},e.prototype.getplaystate=function(){return!!this.option.autoplay},e.prototype._initdata=function(){var t,e=this.option,n=e.data||[],i=e.axistype,r=this._names=[];"category"===i?(t=[],e(n,(function(e,n){var i,o=xo(fo(e),"");q(e)?(i=t(e)).value=n:i=n,t.push(i),r.push(o)}))):t=n;var o={category:"ordinal",time:"time",value:"number"}[i]||"number";(this._data=new qm([{name:"value",type:o}],this)).initdata(t,r)},e.prototype.getdata=function(){return this._data},e.prototype.getcategories=function(){if("category"===this.get("axistype"))return this._names.slice()},e.type="timeline",e.defaultoption={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:[]},e}(tp),wv=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.type="timeline.slider",e.defaultoption=yc(bv.defaultoption,{backgroundcolor:"rgba(0,0,0,0)",bordercolor:"#ccc",borderwidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolsize:12,linestyle:{show:!0,width:2,color:"#dae1f5"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#a4b1d7"},itemstyle:{color:"#a4b1d7",borderwidth:1},checkpointstyle:{symbol:"circle",symbolsize:15,color:"#316bf3",bordercolor:"#fff",borderwidth:2,shadowblur:2,shadowoffsetx:1,shadowoffsety:1,shadowcolor:"rgba(0, 0, 0, 0.3)",animation:!0,animationduration:300,animationeasing:"quinticinout"},controlstyle:{show:!0,showplaybtn:!0,showprevbtn:!0,shownextbtn:!0,itemsize:24,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:"m2,18.5a1.52,1.52,0,0,1,.92,18a1.49,1.49,0,0,1,0-2.12l7.81,9.36,1,3.11a1.5,1.5,0,1,1,3,.89l8,7.34a1.48,1.48,0,0,1,.49,1.09,1.51,1.51,0,0,1-.46,1.1l3,18.08a1.5,1.5,0,0,1,2,18.5z",previcon:"m10,.5a1.52,1.52,0,0,1,11.08,1a1.49,1.49,0,0,1,0,2.12l4.19,9.64,11,15.89a1.5,1.5,0,1,1-2,2.22l1,10.77a1.48,1.48,0,0,1,.5,9.68,1.51,1.51,0,0,1,1,8.58l9,.92a1.5,1.5,0,0,1,10,.5z",prevbtnsize:18,nextbtnsize:18,color:"#a4b1d7",bordercolor:"#a4b1d7",borderwidth:1},emphasis:{label:{show:!0,color:"#6f778d"},itemstyle:{color:"#316bf3"},controlstyle:{color:"#316bf3",bordercolor:"#316bf3",borderwidth:2}},progress:{linestyle:{color:"#316bf3"},itemstyle:{color:"#316bf3"},label:{color:"#6f778d"}},data:[]}),e}(bv);r(wv,lf.prototype);var sv=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.type="timeline",e}(gg),mv=function(t){function e(e,n,i,r){var o=t.call(this,e,n,i)||this;return o.type=r||"value",o}return n(e,t),e.prototype.getlabelmodel=function(){return this.model.getmodel("label")},e.prototype.ishorizontal=function(){return"horizontal"===this.model.get("orient")},e}(h_),iv=math.pi,tv=so(),cv=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.init=function(t,e){this.api=e},e.prototype.render=function(t,e,n){if(this.model=t,this.api=n,this.ecmodel=e,this.group.removeall(),t.get("show",!0)){var i=this._layout(t,n),r=this._creategroup("_maingroup"),o=this._creategroup("_labelgroup"),a=this._axis=this._createaxis(i,t);t.formattooltip=function(t){return xf("namevalue",{noname:!0,value:a.scale.getlabel({value:t})})},e(["axisline","axistick","control","currentpointer"],(function(e){this["_render"+e](i,r,a,t)}),this),this._renderaxislabel(i,o,a,t),this._position(i,t)}this._doplaystop(),this._updateticksstatus()},e.prototype.remove=function(){this._cleartimer(),this.group.removeall()},e.prototype.dispose=function(){this._cleartimer()},e.prototype._layout=function(t,e){var n,i,r,o,a=t.get(["label","position"]),s=t.get("orient"),l=function(t,e){return xp(t.getboxlayoutparams(),{width:e.getwidth(),height:e.getheight()},t.get("padding"))}(t,e),u={horizontal:"center",vertical:(n=null==a||"auto"===a?"horizontal"===s?l.y+l.height/2=0||"+"===n?"left":"right"},h={horizontal:n>=0||"+"===n?"top":"bottom",vertical:"middle"},c={horizontal:0,vertical:iv/2},p="vertical"===s?l.height:l.width,d=t.getmodel("controlstyle"),f=d.get("show",!0),g=f?d.get("itemsize"):0,y=f?d.get("itemgap"):0,v=g+y,m=t.get(["label","rotate"])||0;m=m*iv/180;var x=d.get("position",!0),_=f&&d.get("showplaybtn",!0),b=f&&d.get("showprevbtn",!0),w=f&&d.get("shownextbtn",!0),s=0,m=p;"left"===x||"bottom"===x?(_&&(i=[0,0],s+=v),b&&(r=[s,0],s+=v),w&&(o=[m-g,0],m-=v)):(_&&(i=[m-g,0],m-=v),b&&(r=[0,0],s+=v),w&&(o=[m-g,0],m-=v));var i=[s,m];return t.get("inverse")&&i.reverse(),{viewrect:l,mainlength:p,orient:s,rotation:c[s],labelrotation:m,labelposopt:n,labelalign:t.get(["label","align"])||u[s],labelbaseline:t.get(["label","verticalalign"])||t.get(["label","baseline"])||h[s],playposition:i,prevbtnposition:r,nextbtnposition:o,axisextent:i,controlsize:g,controlgap:y}},e.prototype._position=function(t,e){var n=this._maingroup,i=this._labelgroup,r=t.viewrect;if("vertical"===t.orient){var o=[1,0,0,1,0,0],a=r.x,s=r.y+r.height;ei(o,o,[-a,-s]),zi(o,o,-iv/2),ei(o,o,[a,s]),(r=r.clone()).applytransform(o)}var l=y(r),u=y(n.getboundingrect()),h=y(i.getboundingrect()),c=[n.x,n.y],p=[i.x,i.y];p[0]=c[0]=l[0][0];var d,f=t.labelposopt;null==f||x(f)?(v(c,u,l,1,d="+"===f?0:1),v(p,h,l,1,1-d)):(v(c,u,l,1,d=f>=0?0:1),p[1]=c[1]+f);function g(t){t.originx=l[0][0]-t.x,t.originy=l[1][0]-t.y}function y(t){return[[t.x,t.x+t.width],[t.y,t.y+t.height]]}function v(t,e,n,i,r){t[i]+=n[i][r]-e[i][r]}n.setposition(c),i.setposition(p),n.rotation=i.rotation=t.rotation,g(n),g(i)},e.prototype._createaxis=function(t,e){var n=e.getdata(),i=e.get("axistype"),r=function(t,e){if(e=e||t.get("type"))switch(e){case"category":return new vx({ordinalmeta:t.getcategories(),extent:[1/0,-1/0]});case"time":return new rx({locale:t.ecmodel.getlocalemodel(),useutc:t.ecmodel.get("useutc")});default:return new xx}}(e,i);r.getticks=function(){return n.maparray(["value"],(function(t){return{value:t}}))};var o=n.getdataextent("value");r.setextent(o[0],o[1]),r.calcniceticks();var a=new mv("value",r,t.axisextent,i);return a.model=e,a},e.prototype._creategroup=function(t){var e=this[t]=new cr;return this.group.add(e),e},e.prototype._renderaxisline=function(t,e,n,i){var r=n.getextent();if(i.get(["linestyle","show"])){var o=new zu({shape:{x1:r[0],y1:0,x2:r[1],y2:0},style:a({linecap:"round"},i.getmodel("linestyle").getlinestyle()),silent:!0,z2:1});e.add(o);var a=this._progressline=new zu({shape:{x1:r[0],x2:this._currentpointer?this._currentpointer.x:r[0],y1:0,y2:0},style:k({linecap:"round",linewidth:o.style.linewidth},i.getmodel(["progress","linestyle"]).getlinestyle()),silent:!0,z2:1});e.add(a)}},e.prototype._renderaxistick=function(t,e,n,i){var r=this,o=i.getdata(),a=n.scale.getticks();this._ticksymbols=[],e(a,(function(t){var a=n.datatocoord(t.value),s=o.getitemmodel(t.value),l=s.getmodel("itemstyle"),u=s.getmodel(["emphasis","itemstyle"]),h=s.getmodel(["progress","itemstyle"]),c={x:a,y:0,onclick:w(r._changetimeline,r,t.value)},p=dv(s,l,e,c);p.ensurestate("emphasis").style=u.getitemstyle(),p.ensurestate("progress").style=h.getitemstyle(),ol(p);var d=hs(p);s.get("tooltip")?(d.dataindex=t.value,d.datamodel=i):d.dataindex=d.datamodel=null,r._ticksymbols.push(p)}))},e.prototype._renderaxislabel=function(t,e,n,i){var r=this;if(n.getlabelmodel().get("show")){var o=i.getdata(),a=n.getviewlabels();this._ticklabels=[],e(a,(function(i){var a=i.tickvalue,s=o.getitemmodel(a),l=s.getmodel("label"),u=s.getmodel(["emphasis","label"]),h=s.getmodel(["progress","label"]),c=n.datatocoord(i.tickvalue),p=new ks({x:c,y:0,rotation:t.labelrotation-t.rotation,onclick:w(r._changetimeline,r,a),silent:!1,style:uh(l,{text:i.formattedlabel,align:t.labelalign,verticalalign:t.labelbaseline})});p.ensurestate("emphasis").style=uh(u),p.ensurestate("progress").style=uh(h),e.add(p),ol(p),tv(p).dataindex=a,r._ticklabels.push(p)}))}},e.prototype._rendercontrol=function(t,e,n,i){var r=t.controlsize,o=t.rotation,a=i.getmodel("controlstyle").getitemstyle(),s=i.getmodel(["emphasis","controlstyle"]).getitemstyle(),l=i.getplaystate(),u=i.get("inverse",!0);function h(t,n,l,u){if(t){var h=gr(rt(i.get(["controlstyle",n+"btnsize"]),r),r),c=function(t,e,n,i){var r=i.style,o=ph(t.get(["controlstyle",e]),i||{},new sr(n[0],n[1],n[2],n[3]));r&&o.setstyle(r);return o}(i,n+"icon",[0,-h/2,h,h],{x:t[0],y:t[1],originx:r/2,originy:0,rotation:u?-o:0,recthover:!0,style:a,onclick:l});c.ensurestate("emphasis").style=s,e.add(c),ol(c)}}h(t.nextbtnposition,"next",w(this._changetimeline,this,u?"-":"+")),h(t.prevbtnposition,"prev",w(this._changetimeline,this,u?"+":"-")),h(t.playposition,l?"stop":"play",w(this._handleplayclick,this,!l),!0)},e.prototype._rendercurrentpointer=function(t,e,n,i){var r=i.getdata(),o=i.getcurrentindex(),a=r.getitemmodel(o).getmodel("checkpointstyle"),s=this,l={oncreate:function(t){t.draggable=!0,t.drift=w(s._handlepointerdrag,s),t.ondragend=w(s._handlepointerdragend,s),av(t,s._progressline,o,n,i,!0)},onupdate:function(t){av(t,s._progressline,o,n,i)}};this._currentpointer=dv(a,a,this._maingroup,{},this._currentpointer,l)},e.prototype._handleplayclick=function(t){this._cleartimer(),this.api.dispatchaction({type:"timelineplaychange",playstate:t,from:this.uid})},e.prototype._handlepointerdrag=function(t,e,n){this._cleartimer(),this._pointerchangetimeline([n.offsetx,n.offsety])},e.prototype._handlepointerdragend=function(t){this._pointerchangetimeline([t.offsetx,t.offsety],!0)},e.prototype._pointerchangetimeline=function(t,e){var n=this._toaxiscoord(t)[0],i=vr(this._axis.getextent().slice());n>i[1]&&(n=i[1]),n=0&&(a[o]=+a[o].tofixed(c)),[a,h]}var fv={min:h(bv,"min"),max:h(bv,"max"),average:h(bv,"average"),median:h(bv,"median")};function gv(t,e){var n=t.getdata(),i=t.coordinatesystem;if(e&&!function(t){return!isnan(parsefloat(t.x))&&!isnan(parsefloat(t.y))}(e)&&!y(e.coord)&&i){var r=i.dimensions,o=wv(e,n,i,t);if((e=t(e)).type&&fv[e.type]&&o.baseaxis&&o.valueaxis){var a=p(r,o.baseaxis.dim),s=p(r,o.valueaxis.dim),l=fv[e.type](n,o.basedatadim,o.valuedatadim,a,s);e.coord=l[0],e.value=l[1]}else{for(var u=[null!=e.xaxis?e.xaxis:e.radiusaxis,null!=e.yaxis?e.yaxis:e.angleaxis],h=0;h<2;h++)fv[u[h]]&&(u[h]=uv(n,n.mapdimension(r[h]),u[h]));e.coord=u}}return e}function wv(t,e,n,i){var r={};return null!=t.valueindex||null!=t.valuedim?(r.valuedatadim=null!=t.valueindex?e.getdimension(t.valueindex):t.valuedim,r.valueaxis=n.getaxis(function(t,e){var n=t.getdata().getdimensioninfo(e);return n&&n.coorddim}(i,r.valuedatadim)),r.baseaxis=n.getotheraxis(r.valueaxis),r.basedatadim=e.mapdimension(r.baseaxis.dim)):(r.baseaxis=i.getbaseaxis(),r.valueaxis=n.getotheraxis(r.baseaxis),r.basedatadim=e.mapdimension(r.baseaxis.dim),r.valuedatadim=e.mapdimension(r.valueaxis.dim)),r}function hv(t,e){return!(t&&t.containdata&&e.coord&&!vv(e))||t.containdata(e.coord)}function yv(t,e){return t?function(t,n,i,r){return df(r<2?t.coord&&t.coord[r]:t.value,e[r])}:function(t,n,i,r){return df(t.value,e[r])}}function uv(t,e,n){if("average"===n){var i=0,r=0;return t.each(e,(function(t,e){isnan(t)||(i+=t,r++)})),i/r}return"median"===n?t.getmedian(e):t.getdataextent(e)["max"===n?1:0]}var xv=so(),zv=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.init=function(){this.markergroupmap=ft()},e.prototype.render=function(t,e,n){var i=this,r=this.markergroupmap;r.each((function(t){xv(t).keep=!1})),e.eachseries((function(t){var r=ev.getmarkermodelfromseries(t,i.type);r&&i.renderseries(t,r,e,n)})),r.each((function(t){!xv(t).keep&&i.group.remove(t.group)}))},e.prototype.markkeep=function(t){xv(t).keep=!0},e.prototype.toggleblurseries=function(t,e){var n=this;e(t,(function(t){var i=ev.getmarkermodelfromseries(t,n.type);i&&i.getdata().eachitemgraphicel((function(t){t&&(e?wl(t):sl(t))}))}))},e.type="marker",e}(gg);function jv(t,e,n){var i=e.coordinatesystem;t.each((function(r){var o,a=t.getitemmodel(r),s=er(a.get("x"),n.getwidth()),l=er(a.get("y"),n.getheight());if(isnan(s)||isnan(l)){if(e.getmarkerposition)o=e.getmarkerposition(t.getvalues(t.dimensions,r));else if(i){var u=t.get(i.dimensions[0],r),h=t.get(i.dimensions[1],r);o=i.datatopoint([u,h])}}else o=[s,l];isnan(s)||(o[0]=s),isnan(l)||(o[1]=l),t.setitemlayout(r,o)}))}var qv=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.updatetransform=function(t,e,n){e.eachseries((function(t){var e=ev.getmarkermodelfromseries(t,"markpoint");e&&(jv(e.getdata(),t,n),this.markergroupmap.get(t.id).updatelayout())}),this)},e.prototype.renderseries=function(t,e,n,i){var r=t.coordinatesystem,o=t.id,a=t.getdata(),s=this.markergroupmap,l=s.get(o)||s.set(o,new qw),u=function(t,e,n){var i;i=t?z(t&&t.dimensions,(function(t){return a(a({},e.getdata().getdimensioninfo(e.getdata().mapdimension(t))||{}),{name:t,ordinalmeta:null})})):[{name:"value",type:"float"}];var r=new qm(i,n),o=z(n.get("data"),h(gv,e));t&&(o=b(o,h(hv,t)));var a=yv(!!t,i);return r.initdata(o,null,a),r}(r,t,e);e.setdata(u),jv(e.getdata(),t,i),u.each((function(t){var n=u.getitemmodel(t),i=n.getshallow("symbol"),r=n.getshallow("symbolsize"),o=n.getshallow("symbolrotate"),s=n.getshallow("symboloffset"),l=n.getshallow("symbolkeepaspect");if(u(i)||u(r)||u(o)||u(s)){var h=e.getrawvalue(t),c=e.getdataparams(t);u(i)&&(i=i(h,c)),u(r)&&(r=r(h,c)),u(o)&&(o=o(h,c)),u(s)&&(s=s(h,c))}var p=n.getmodel("itemstyle").getitemstyle(),d=gy(a,"color");p.fill||(p.fill=d),u.setitemvisual(t,{symbol:i,symbolsize:r,symbolrotate:o,symboloffset:s,symbolkeepaspect:l,style:p})})),l.updatedata(u),this.group.add(l.group),u.eachitemgraphicel((function(t){t.traverse((function(t){hs(t).datamodel=e}))})),this.markkeep(l),l.group.silent=e.get("silent")||t.get("silent")},e.type="markpoint",e}(zv);var kv=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.createmarkermodelfromseries=function(t,n,i){return new e(t,n,i)},e.type="markline",e.defaultoption={z:5,symbol:["circle","arrow"],symbolsize:[8,16],symboloffset:0,precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},linestyle:{type:"dashed"},emphasis:{label:{show:!0},linestyle:{width:3}},animationeasing:"linear"},e}(ev),$v=so(),jv=function(t,e,n,i){var r,o=t.getdata();if(y(i))r=i;else{var a=i.type;if("min"===a||"max"===a||"average"===a||"median"===a||null!=i.xaxis||null!=i.yaxis){var s=void 0,l=void 0;if(null!=i.yaxis||null!=i.xaxis)s=e.getaxis(null!=i.yaxis?"y":"x"),l=it(i.yaxis,i.xaxis);else{var u=wv(i,o,e,t);s=u.valueaxis,l=uv(o,ix(o,u.valuedatadim),a)}var h="x"===s.dim?0:1,c=1-h,p=t(i),d={coord:[]};p.type=null,p.coord=[],p.coord[c]=-1/0,d.coord[c]=1/0;var f=n.get("precision");f>=0&&j(l)&&(l=+l.tofixed(math.min(f,20))),p.coord[h]=d.coord[h]=l,r=[p,d,{type:a,valueindex:i.valueindex,value:l}]}else r=[]}var g=[gv(t,r[0]),gv(t,r[1]),a({},r[2])];return g[2].type=g[2].type||null,c(g[2],g[0]),c(g[2],g[1]),g};function qv(t){return!isnan(t)&&!isfinite(t)}function tb(t,e,n,i){var r=1-t,o=i.dimensions[t];return qv(e[r])&&qv(n[r])&&e[t]===n[t]&&i.getaxis(o).containdata(e[t])}function eb(t,e){if("cartesian2d"===t.type){var n=e[0].coord,i=e[1].coord;if(n&&i&&(tb(1,n,i,t)||tb(0,n,i,t)))return!0}return hv(t,e[0])&&hv(t,e[1])}function nb(t,e,n,i,r){var o,a=i.coordinatesystem,s=t.getitemmodel(e),l=er(s.get("x"),r.getwidth()),u=er(s.get("y"),r.getheight());if(isnan(l)||isnan(u)){if(i.getmarkerposition)o=i.getmarkerposition(t.getvalues(t.dimensions,e));else{var h=a.dimensions,c=t.get(h[0],e),p=t.get(h[1],e);o=a.datatopoint([c,p])}if(us(a,"cartesian2d")){var d=a.getaxis("x"),f=a.getaxis("y");h=a.dimensions;qv(t.get(h[0],e))?o[0]=d.toglobalcoord(d.getextent()[n?0:1]):qv(t.get(h[1],e))&&(o[1]=f.toglobalcoord(f.getextent()[n?0:1]))}isnan(l)||(o[0]=l),isnan(u)||(o[1]=u)}else o=[l,u];t.setitemlayout(e,o)}var ib=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.updatetransform=function(t,e,n){e.eachseries((function(t){var e=ev.getmarkermodelfromseries(t,"markline");if(e){var i=e.getdata(),r=$v(e).from,o=$v(e).to;r.each((function(e){nb(r,e,!0,t,n),nb(o,e,!1,t,n)})),i.each((function(t){i.setitemlayout(t,[r.getitemlayout(t),o.getitemlayout(t)])})),this.markergroupmap.get(t.id).updatelayout()}}),this)},e.prototype.renderseries=function(t,e,n,i){var r=t.coordinatesystem,o=t.id,a=t.getdata(),s=this.markergroupmap,l=s.get(o)||s.set(o,new ga);this.group.add(l.group);var u=function(t,e,n){var i;i=t?z(t&&t.dimensions,(function(t){return a(a({},e.getdata().getdimensioninfo(e.getdata().mapdimension(t))||{}),{name:t,ordinalmeta:null})})):[{name:"value",type:"float"}];var r=new qm(i,n),o=new qm(i,n),a=new qm([],n),s=z(n.get("data"),h(jv,e,t,n));t&&(s=b(s,h(eb,t)));var l=yv(!!t,i);return r.initdata(z(s,(function(t){return t[0]})),null,l),o.initdata(z(s,(function(t){return t[1]})),null,l),a.initdata(z(s,(function(t){return t[2]}))),a.hasitemoption=!0,{from:r,to:o,line:a}}(r,t,e),h=u.from,c=u.to,p=u.line;$v(e).from=h,$v(e).to=c,e.setdata(p);var d=e.get("symbol"),f=e.get("symbolsize"),g=e.get("symbolrotate"),y=e.get("symboloffset");function v(e,n,r){var o=e.getitemmodel(n);nb(e,n,r,t,i);var s=o.getmodel("itemstyle").getitemstyle();null==s.fill&&(s.fill=gy(a,"color")),e.setitemvisual(n,{symbolkeepaspect:o.get("symbolkeepaspect"),symboloffset:rt(o.get("symboloffset",!0),y[r?0:1]),symbolrotate:rt(o.get("symbolrotate",!0),g[r?0:1]),symbolsize:rt(o.get("symbolsize"),f[r?0:1]),symbol:rt(o.get("symbol",!0),d[r?0:1]),style:s})}y(d)||(d=[d,d]),y(f)||(f=[f,f]),y(g)||(g=[g,g]),y(y)||(y=[y,y]),u.from.each((function(t){v(h,t,!0),v(c,t,!1)})),p.each((function(t){var e=p.getitemmodel(t).getmodel("linestyle").getlinestyle();p.setitemlayout(t,[h.getitemlayout(t),c.getitemlayout(t)]),null==e.stroke&&(e.stroke=h.getitemvisual(t,"style").fill),p.setitemvisual(t,{fromsymbolkeepaspect:h.getitemvisual(t,"symbolkeepaspect"),fromsymboloffset:h.getitemvisual(t,"symboloffset"),fromsymbolrotate:h.getitemvisual(t,"symbolrotate"),fromsymbolsize:h.getitemvisual(t,"symbolsize"),fromsymbol:h.getitemvisual(t,"symbol"),tosymbolkeepaspect:c.getitemvisual(t,"symbolkeepaspect"),tosymboloffset:c.getitemvisual(t,"symboloffset"),tosymbolrotate:c.getitemvisual(t,"symbolrotate"),tosymbolsize:c.getitemvisual(t,"symbolsize"),tosymbol:c.getitemvisual(t,"symbol"),style:e})})),l.updatedata(p),u.line.eachitemgraphicel((function(t){hs(t).datamodel=e,t.traverse((function(t){hs(t).datamodel=e}))})),this.markkeep(l),l.group.silent=e.get("silent")||t.get("silent")},e.type="markline",e}(zv);var rb=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.createmarkermodelfromseries=function(t,n,i){return new e(t,n,i)},e.type="markarea",e.defaultoption={z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemstyle:{borderwidth:0},emphasis:{label:{show:!0,position:"top"}}},e}(ev),ob=so(),ab=function(t,e,n,i){var r=gv(t,i[0]),o=gv(t,i[1]),a=r.coord,s=o.coord;a[0]=it(a[0],-1/0),a[1]=it(a[1],-1/0),s[0]=it(s[0],1/0),s[1]=it(s[1],1/0);var l=d([{},r,o]);return l.coord=[r.coord,o.coord],l.x0=r.x,l.y0=r.y,l.x1=o.x,l.y1=o.y,l};function sb(t){return!isnan(t)&&!isfinite(t)}function lb(t,e,n,i){var r=1-t;return sb(e[r])&&sb(n[r])}function ub(t,e){var n=e.coord[0],i=e.coord[1],r={coord:n,x:e.x0,y:e.y0},o={coord:i,x:e.x1,y:e.y1};return us(t,"cartesian2d")?!(!n||!i||!lb(1,n,i)&&!lb(0,n,i))||function(t,e,n){return!(t&&t.containzone&&e.coord&&n.coord&&!vv(e)&&!vv(n))||t.containzone(e.coord,n.coord)}(t,r,o):hv(t,r)||hv(t,o)}function hb(t,e,n,i,r){var o,a=i.coordinatesystem,s=t.getitemmodel(e),l=er(s.get(n[0]),r.getwidth()),u=er(s.get(n[1]),r.getheight());if(isnan(l)||isnan(u)){if(i.getmarkerposition)o=i.getmarkerposition(t.getvalues(n,e));else{var h=[d=t.get(n[0],e),f=t.get(n[1],e)];a.clampdata&&a.clampdata(h,h),o=a.datatopoint(h,!0)}if(us(a,"cartesian2d")){var c=a.getaxis("x"),p=a.getaxis("y"),d=t.get(n[0],e),f=t.get(n[1],e);sb(d)?o[0]=c.toglobalcoord(c.getextent()["x0"===n[0]?0:1]):sb(f)&&(o[1]=p.toglobalcoord(p.getextent()["y0"===n[1]?0:1]))}isnan(l)||(o[0]=l),isnan(u)||(o[1]=u)}else o=[l,u];return o}var cb=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],pb=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.updatetransform=function(t,e,n){e.eachseries((function(t){var e=ev.getmarkermodelfromseries(t,"markarea");if(e){var i=e.getdata();i.each((function(e){var r=z(cb,(function(r){return hb(i,e,r,t,n)}));i.setitemlayout(e,r),i.getitemgraphicel(e).setshape("points",r)}))}}),this)},e.prototype.renderseries=function(t,e,n,i){var r=t.coordinatesystem,o=t.id,a=t.getdata(),s=this.markergroupmap,l=s.get(o)||s.set(o,{group:new cr});this.group.add(l.group),this.markkeep(l);var u=function(t,e,n){var i,r,o=["x0","y0","x1","y1"];if(t){var a=z(t&&t.dimensions,(function(t){var n=e.getdata();return a(a({},n.getdimensioninfo(n.mapdimension(t))||{}),{name:t,ordinalmeta:null})}));r=z(o,(function(t,e){return{name:t,type:a[e%2].type}})),i=new qm(r,n)}else i=new qm(r=[{name:"value",type:"float"}],n);var s=z(n.get("data"),h(ab,e,t,n));t&&(s=b(s,h(ub,t)));var l=t?function(t,e,n,i){return df(t.coord[math.floor(i/2)][i%2],r[i])}:function(t,e,n,i){return df(t.value,r[i])};return i.initdata(s,null,l),i.hasitemoption=!0,i}(r,t,e);e.setdata(u),u.each((function(e){var n=z(cb,(function(n){return hb(u,e,n,t,i)})),o=r.getaxis("x").scale,s=r.getaxis("y").scale,l=o.getextent(),h=s.getextent(),c=[o.parse(u.get("x0",e)),o.parse(u.get("x1",e))],p=[s.parse(u.get("y0",e)),s.parse(u.get("y1",e))];vr(c),vr(p);var d=!!(l[0]>c[1]||l[1]p[1]||h[1]=0},e.prototype.getorient=function(){return"vertical"===this.get("orient")?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},e.type="legend.plain",e.dependencies=["series"],e.defaultoption={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,symbolrotate:"inherit",symbolkeepaspect:!0,inactivecolor:"#ccc",inactivebordercolor:"#ccc",inactiveborderwidth:"auto",itemstyle:{color:"inherit",opacity:"inherit",bordercolor:"inherit",borderwidth:"auto",bordercap:"inherit",borderjoin:"inherit",borderdashoffset:"inherit",bordermiterlimit:"inherit"},linestyle:{width:"auto",color:"inherit",inactivecolor:"#ccc",inactivewidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashoffset:"inherit",miterlimit:"inherit"},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}},e}(tp),fb=h,gb=e,yb=cr,vb=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.newlinedisabled=!1,n}return n(e,t),e.prototype.init=function(){this.group.add(this._contentgroup=new yb),this.group.add(this._selectorgroup=new yb),this._isfirstrender=!0},e.prototype.getcontentgroup=function(){return this._contentgroup},e.prototype.getselectorgroup=function(){return this._selectorgroup},e.prototype.render=function(t,e,n){var i=this._isfirstrender;if(this._isfirstrender=!1,this.resetinner(),t.get("show",!0)){var r=t.get("align"),o=t.get("orient");r&&"auto"!==r||(r="right"===t.get("left")&&"vertical"===o?"right":"left");var a=t.get("selector",!0),s=t.get("selectorposition",!0);!a||s&&"auto"!==s||(s="horizontal"===o?"end":"start"),this.renderinner(r,t,e,n,a,o,s);var l=t.getboxlayoutparams(),u={width:n.getwidth(),height:n.getheight()},h=t.get("padding"),c=xp(l,u,h),p=this.layoutinner(t,r,c,i,a,s),d=xp(k({width:p.width,height:p.height},l),u,h);this.group.x=d.x-p.x,this.group.y=d.y-p.y,this.group.markredraw(),this.group.add(this._backgroundel=xe(p,t))}},e.prototype.resetinner=function(){this.getcontentgroup().removeall(),this._backgroundel&&this.group.remove(this._backgroundel),this.getselectorgroup().removeall()},e.prototype.renderinner=function(t,e,n,i,r,o,a){var s=this.getcontentgroup(),l=ft(),u=e.get("selectedmode"),h=[];n.eachrawseries((function(t){!t.get("legendhoverlink")&&h.push(t.id)})),gb(e.getdata(),(function(r,o){var a=r.get("name");if(!this.newlinedisabled&&(""===a||"\n"===a)){var c=new yb;return c.newline=!0,void s.add(c)}var p=n.getseriesbyname(a)[0];if(!l.get(a)){if(p){var d=p.getdata(),f=d.getvisual("legendlinestyle")||{},g=d.getvisual("legendicon"),y=d.getvisual("style");this._createitem(p,a,o,r,e,t,f,y,g,u,i).on("click",fb(mb,a,null,i,h)).on("mouseover",fb(_b,p.name,null,i,h)).on("mouseout",fb(bb,p.name,null,i,h)),l.set(a,!0)}else n.eachrawseries((function(n){if(!l.get(a)&&n.legendvisualprovider){var s=n.legendvisualprovider;if(!s.containname(a))return;var c=s.indexofname(a),p=s.getitemvisual(c,"style"),d=s.getitemvisual(c,"legendicon"),f=bn(p.fill);f&&0===f[3]&&(f[3]=.2,p=a(a({},p),{fill:kn(f,"rgba")})),this._createitem(n,a,o,r,e,t,{},p,d,u,i).on("click",fb(mb,null,a,i,h)).on("mouseover",fb(_b,null,a,i,h)).on("mouseout",fb(bb,null,a,i,h)),l.set(a,!0)}}),this);0}}),this),r&&this._createselector(r,e,i,o,a)},e.prototype._createselector=function(t,e,n,i,r){var o=this.getselectorgroup();gb(t,(function(t){var i=t.type,r=new ks({style:{x:0,y:0,align:"center",verticalalign:"middle"},onclick:function(){n.dispatchaction({type:"all"===i?"legendallselect":"legendinverseselect"})}});o.add(r),hh(r,{normal:e.getmodel("selectorlabel"),emphasis:e.getmodel(["emphasis","selectorlabel"])},{defaulttext:t.title}),ol(r)}))},e.prototype._createitem=function(t,e,n,i,r,o,a,s,l,u,h){var c=t.visualdrawtype,p=r.get("itemwidth"),d=r.get("itemheight"),f=r.isselected(e),g=i.get("symbolrotate"),y=i.get("symbolkeepaspect"),v=i.get("icon"),m=function(t,e,n,i,r,o,a){function s(t,e){"auto"===t.linewidth&&(t.linewidth=e.linewidth>0?2:0),gb(t,(function(n,i){"inherit"===t[i]&&(t[i]=e[i])}))}var l=e.getmodel("itemstyle"),u=l.getitemstyle(),h=0===t.lastindexof("empty",0)?"fill":"stroke",c=l.getshallow("decal");u.decal=c&&"inherit"!==c?rv(c,a):i.decal,"inherit"===u.fill&&(u.fill=i[r]);"inherit"===u.stroke&&(u.stroke=i[h]);"inherit"===u.opacity&&(u.opacity=("fill"===r?i:n).opacity);s(u,i);var p=e.getmodel("linestyle"),d=p.getlinestyle();if(s(d,n),"auto"===u.fill&&(u.fill=i.fill),"auto"===u.stroke&&(u.stroke=i.fill),"auto"===d.stroke&&(d.stroke=i.fill),!o){var f=e.get("inactiveborderwidth"),g=u[h];u.linewidth="auto"===f?i.linewidth>0&&g?2:0:u.linewidth,u.fill=e.get("inactivecolor"),u.stroke=e.get("inactivebordercolor"),d.stroke=p.get("inactivecolor"),d.linewidth=p.get("inactivewidth")}return{itemstyle:u,linestyle:d}}(l=v||l||"roundrect",i,a,s,c,f,h),x=new yb,_=i.getmodel("textstyle");if(!u(t.getlegendicon)||v&&"inherit"!==v){var b="inherit"===v&&t.getdata().getvisual("symbol")?"inherit"===g?t.getdata().getvisual("symbolrotate"):g:0;x.add(function(t){var e=t.icon||"roundrect",n=ly(e,0,0,t.itemwidth,t.itemheight,t.itemstyle.fill,t.symbolkeepaspect);n.setstyle(t.itemstyle),n.rotation=(t.iconrotate||0)*math.pi/180,n.setorigin([t.itemwidth/2,t.itemheight/2]),e.indexof("empty")>-1&&(n.style.stroke=n.style.fill,n.style.fill="#fff",n.style.linewidth=2);return n}({itemwidth:p,itemheight:d,icon:l,iconrotate:b,itemstyle:m.itemstyle,linestyle:m.linestyle,symbolkeepaspect:y}))}else x.add(t.getlegendicon({itemwidth:p,itemheight:d,icon:l,iconrotate:g,itemstyle:m.itemstyle,linestyle:m.linestyle,symbolkeepaspect:y}));var w="left"===o?p+5:-5,s=o,m=r.get("formatter"),i=e;x(m)&&m?i=m.replace("{name}",null!=e?e:""):u(m)&&(i=m(e));var t=i.get("inactivecolor");x.add(new ks({style:uh(_,{text:i,x:w,y:d/2,fill:f?_.gettextcolor():t,align:s,verticalalign:"middle"})}));var c=new cs({shape:x.getboundingrect(),invisible:!0}),d=i.getmodel("tooltip");return d.get("show")&&eh({el:c,componentmodel:r,itemname:e,itemtooltipoption:d.option}),x.add(c),x.eachchild((function(t){t.silent=!0})),c.silent=!u,this.getcontentgroup().add(x),ol(x),x.__legenddataindex=n,x},e.prototype.layoutinner=function(t,e,n,i,r,o){var a=this.getcontentgroup(),s=this.getselectorgroup();mp(t.get("orient"),a,t.get("itemgap"),n.width,n.height);var l=a.getboundingrect(),u=[-l.x,-l.y];if(s.markredraw(),a.markredraw(),r){mp("horizontal",s,t.get("selectoritemgap",!0));var h=s.getboundingrect(),c=[-h.x,-h.y],p=t.get("selectorbuttongap",!0),d=t.getorient().index,f=0===d?"width":"height",g=0===d?"height":"width",y=0===d?"y":"x";"end"===o?c[d]+=l[f]+p:u[d]+=h[f]+p,c[1-d]+=l[g]/2-h[g]/2,s.x=c[0],s.y=c[1],a.x=u[0],a.y=u[1];var v={x:0,y:0};return v[f]=l[f]+p+h[f],v[g]=math.max(l[g],h[g]),v[y]=math.min(0,h[y]+c[1-d]),v}return a.x=u[0],a.y=u[1],this.group.getboundingrect()},e.prototype.remove=function(){this.getcontentgroup().removeall(),this._isfirstrender=!0},e.type="legend.plain",e}(gg);function mb(t,e,n,i){bb(t,e,n,i),n.dispatchaction({type:"legendtoggleselect",name:null!=t?t:e}),_b(t,e,n,i)}function xb(t){for(var e,n=t.getzr().storage.getdisplaylist(),i=0,r=n.length;in[r],f=[-c.x,-c.y];e||(f[i]=l[s]);var g=[0,0],y=[-p.x,-p.y],v=rt(t.get("pagebuttongap",!0),t.get("itemgap",!0));d&&("end"===t.get("pagebuttonposition",!0)?y[i]+=n[r]-p[r]:g[i]+=p[r]+v);y[1-i]+=c[o]/2-p[o]/2,l.setposition(f),u.setposition(g),h.setposition(y);var m={x:0,y:0};if(m[r]=d?n[r]:c[r],m[o]=math.max(c[o],p[o]),m[a]=math.min(0,p[a]+y[1-i]),u.__rectsize=n[r],d){var x={x:0,y:0};x[r]=math.max(n[r]-p[r]-v,0),x[o]=m[o],u.setclippath(new cs({shape:x})),u.__rectsize=x[r]}else h.eachchild((function(t){t.attr({invisible:!0,silent:!0})}));var _=this._getpageinfo(t);return null!=_.pageindex&&rh(l,{x:_.contentposition[0],y:_.contentposition[1]},d?t:null),this._updatepageinfoview(t,_),m},e.prototype._pagego=function(t,e,n){var i=this._getpageinfo(e)[t];null!=i&&n.dispatchaction({type:"legendscroll",scrolldataindex:i,legendid:e.id})},e.prototype._updatepageinfoview=function(t,e){var n=this._controllergroup;e(["pageprev","pagenext"],(function(i){var r=null!=e[i+"dataindex"],o=n.childofname(i);o&&(o.setstyle("fill",r?t.get("pageiconcolor",!0):t.get("pageiconinactivecolor",!0)),o.cursor=r?"pointer":"default")}));var i=n.childofname("pagetext"),r=t.get("pageformatter"),o=e.pageindex,a=null!=o?o+1:0,s=e.pagecount;i&&r&&i.setstyle("text",x(r)?r.replace("{current}",null==a?"":a+"").replace("{total}",null==s?"":s+""):r({current:a,total:s}))},e.prototype._getpageinfo=function(t){var e=t.get("scrolldataindex",!0),n=this.getcontentgroup(),i=this._containergroup.__rectsize,r=t.getorient().index,o=db[r],a=ab[r],s=this._findtargetitemindex(e),l=n.children(),u=l[s],h=l.length,c=h?1:0,p={contentposition:[n.x,n.y],pagecount:c,pageindex:c-1,pageprevdataindex:null,pagenextdataindex:null};if(!u)return p;var d=m(u);p.contentposition[r]=-d.s;for(var f=s+1,g=d,y=d,v=null;f<=h;++f)(!(v=m(l[f]))&&y.e>g.s+i||v&&!x(v,g.s))&&(g=y.i>g.i?y:v)&&(null==p.pagenextdataindex&&(p.pagenextdataindex=g.i),++p.pagecount),y=v;for(f=s-1,g=d,y=d,v=null;f>=-1;--f)(v=m(l[f]))&&x(y,v.s)||!(g.i=e&&t.s<=e+i}},e.prototype._findtargetitemindex=function(t){return this._showcontroller?(this.getcontentgroup().eachchild((function(i,r){var o=i.__legenddataindex;null==n&&null!=o&&(n=r),o===t&&(e=r)})),null!=e?e:n):0;var e,n},e.type="legend.scroll",e}(vb);function lb(t){wm(mb),t.registercomponentmodel(ib),t.registercomponentview(kb),function(t){t.registeraction("legendscroll","legendscroll",(function(t,e){var n=t.scrolldataindex;null!=n&&e.eachcomponent({maintype:"legend",subtype:"scroll",query:t},(function(t){t.setscrolldataindex(n)}))}))}(t)}var pb=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.type="datazoom.inside",e.defaultoption=yc(ae.defaultoption,{disabled:!1,zoomlock:!1,zoomonmousewheel:!0,moveonmousemove:!0,moveonmousewheel:!1,preventdefaultmousemove:!0}),e}(ae),ob=so();function rb(t,e,n){ob(t).coordsysrecordmap.each((function(t){var i=t.datazoominfomap.get(e.uid);i&&(i.getrange=n)}))}function nb(t,e){if(e){t.removekey(e.model.uid);var n=e.controller;n&&n.dispose()}}function eb(t,e){t.isdisposed()||t.dispatchaction({type:"datazoom",animation:{easing:"cubicout",duration:100},batch:e})}function zb(t,e,n,i){return t.coordinatesystem.containpoint([n,i])}function vb(t){t.registerprocessor(t.priority.processor.filter,(function(t,e){var n=ob(e),i=n.coordsysrecordmap||(n.coordsysrecordmap=ft());i.each((function(t){t.datazoominfomap=null})),t.eachcomponent({maintype:"datazoom",subtype:"inside"},(function(t){e(ce(t).infolist,(function(n){var r=n.model.uid,o=i.get(r)||i.set(r,function(t,e){var n={model:e,containspoint:h(zb,e),dispatchaction:h(eb,t),datazoominfomap:null,controller:null},i=n.controller=new ki(t.getzr());return e(["pan","zoom","scrollmove"],(function(t){i.on(t,(function(e){var i=[];n.datazoominfomap.each((function(r){if(e.isavailablebehavior(r.model.option)){var o=(r.getrange||{})[t],a=o&&o(r.dzrefercoordsysinfo,n.model.maintype,n.controller,e);!r.model.get("disabled",!0)&&a&&i.push({datazoomid:r.model.id,start:a[0],end:a[1]})}})),i.length&&n.dispatchaction(i)}))})),n}(e,n.model));(o.datazoominfomap||(o.datazoominfomap=ft())).set(t.uid,{dzrefercoordsysinfo:n,model:t,getrange:null})}))})),i.each((function(t){var e,n=t.controller,r=t.datazoominfomap;if(r){var o=r.keys()[0];null!=o&&(e=r.get(o))}if(e){var a=function(t){var e,n="type_",i={type_true:2,type_move:1,type_false:0,type_undefined:-1},r=!0;return t.each((function(t){var o=t.model,a=!o.get("disabled",!0)&&(!o.get("zoomlock",!0)||"move");i[n+a]>i[n+e]&&(e=a),r=r&&o.get("preventdefaultmousemove",!0)})),{controltype:e,opt:{zoomonmousewheel:!0,moveonmousemove:!0,moveonmousewheel:!0,preventdefaultmousemove:!!r}}}(r);n.enable(a.controltype,a.opt),n.setpointerchecker(t.containspoint),ag(t,"dispatchaction",e.model.get("throttle",!0),"fixrate")}else nb(i,t)}))}))}var bb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="datazoom.inside",e}return n(e,t),e.prototype.render=function(e,n,i){t.prototype.render.apply(this,arguments),e.notarget()?this._clear():(this.range=e.getpercentrange(),rb(i,e,{pan:w(fb.pan,this),zoom:w(fb.zoom,this),scrollmove:w(fb.scrollmove,this)}))},e.prototype.dispose=function(){this._clear(),t.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){!function(t,e){for(var n=ob(t).coordsysrecordmap,i=n.keys(),r=0;r0?s.pixelstart+s.pixellength-s.pixel:s.pixel-s.pixelstart)/s.pixellength*(o[1]-o[0])+o[0],u=math.max(1/i.scale,0);o[0]=(o[0]-l)*u+l,o[1]=(o[1]-l)*u+l;var h=this.datazoommodel.findrepresentativeaxisproxy().getminmaxspan();return lk(0,o,[0,100],0,h.minspan,h.maxspan),this.range=o,r[0]!==o[0]||r[1]!==o[1]?o:void 0}},pan:gb((function(t,e,n,i,r,o){var a=wb[i]([o.oldx,o.oldy],[o.newx,o.newy],e,r,n);return a.signal*(t[1]-t[0])*a.pixel/a.pixellength})),scrollmove:gb((function(t,e,n,i,r,o){return wb[i]([0,0],[o.scrolldelta,o.scrolldelta],e,r,n).signal*(t[1]-t[0])*o.scrolldelta}))};function gb(t){return function(e,n,i,r){var o=this.range,a=o.slice(),s=e.axismodels[0];if(s)return lk(t(a,s,e,n,i,r),a,[0,100],"all"),this.range=a,o[0]!==a[0]||o[1]!==a[1]?a:void 0}}var wb={grid:function(t,e,n,i,r){var o=n.axis,a={},s=r.model.coordinatesystem.getrect();return t=t||[0,0],"x"===o.dim?(a.pixel=e[0]-t[0],a.pixellength=s.width,a.pixelstart=s.x,a.signal=o.inverse?1:-1):(a.pixel=e[1]-t[1],a.pixellength=s.height,a.pixelstart=s.y,a.signal=o.inverse?-1:1),a},polar:function(t,e,n,i,r){var o=n.axis,a={},s=r.model.coordinatesystem,l=s.getradiusaxis().getextent(),u=s.getangleaxis().getextent();return t=t?s.pointtocoord(t):[0,0],e=s.pointtocoord(e),"radiusaxis"===n.maintype?(a.pixel=e[0]-t[0],a.pixellength=l[1]-l[0],a.pixelstart=l[0],a.signal=o.inverse?1:-1):(a.pixel=e[1]-t[1],a.pixellength=u[1]-u[0],a.pixelstart=u[0],a.signal=o.inverse?-1:1),a},singleaxis:function(t,e,n,i,r){var o=n.axis,a=r.model.coordinatesystem.getrect(),s={};return t=t||[0,0],"horizontal"===o.orient?(s.pixel=e[0]-t[0],s.pixellength=a.width,s.pixelstart=a.x,s.signal=o.inverse?1:-1):(s.pixel=e[1]-t[1],s.pixellength=a.height,s.pixelstart=a.y,s.signal=o.inverse?-1:1),s}};function hb(t){be(t),t.registercomponentmodel(pb),t.registercomponentview(bb),vb(t)}var yb=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.type="datazoom.slider",e.layoutmode="box",e.defaultoption=yc(ae.defaultoption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,bordercolor:"#d2dbee",borderradius:3,backgroundcolor:"rgba(47,69,84,0)",databackground:{linestyle:{color:"#d2dbee",width:.5},areastyle:{color:"#d2dbee",opacity:.2}},selecteddatabackground:{linestyle:{color:"#8fb0f7",width:.5},areastyle:{color:"#8fb0f7",opacity:.2}},fillercolor:"rgba(135,175,274,0.2)",handleicon:"path://m-9.35,34.56v42m0-40v9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21a2,2,0,0,1-11.35,9.5z",handlesize:"100%",handlestyle:{color:"#fff",bordercolor:"#acb8d1"},movehandlesize:7,movehandleicon:"path://m-320.9-50l-320.9-50c18.1,0,27.1,9,27.1,27.1v85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1v-22.9c-348-41-339-50-320.9-50z m-212.3-50l-212.3-50c18.1,0,27.1,9,27.1,27.1v85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1v-22.9c-239.4-41-230.4-50-212.3-50z m-103.7-50l-103.7-50c18.1,0,27.1,9,27.1,27.1v85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1v-22.9c-130.9-41-121.8-50-103.7-50z",movehandlestyle:{color:"#d2dbee",opacity:.7},showdetail:!0,showdatashadow:"auto",realtime:!0,zoomlock:!1,textstyle:{color:"#6e7079"},brushselect:!0,brushstyle:{color:"rgba(135,175,274,0.15)"},emphasis:{handlestyle:{bordercolor:"#8fb0f7"},movehandlestyle:{color:"#8fb0f7"}}}),e}(ae),ub=cs,xb="horizontal",zb="vertical",jb=["line","bar","candlestick","scatter"],qb={easing:"cubicout",duration:100,delay:0},kb=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._displayables={},n}return n(e,t),e.prototype.init=function(t,e){this.api=e,this._onbrush=w(this._onbrush,this),this._onbrushend=w(this._onbrushend,this)},e.prototype.render=function(e,n,i,r){if(t.prototype.render.apply(this,arguments),ag(this,"_dispatchzoomaction",e.get("throttle"),"fixrate"),this._orient=e.getorient(),!1!==e.get("show")){if(e.notarget())return this._clear(),void this.group.removeall();r&&"datazoom"===r.type&&r.from===this.uid||this._buildview(),this._updateview()}else this.group.removeall()},e.prototype.dispose=function(){this._clear(),t.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){kg(this,"_dispatchzoomaction");var t=this.api.getzr();t.off("mousemove",this._onbrush),t.off("mouseup",this._onbrushend)},e.prototype._buildview=function(){var t=this.group;t.removeall(),this._brushing=!1,this._displayables.brushrect=null,this._resetlocation(),this._resetinterval();var e=this._displayables.slidergroup=new cr;this._renderbackground(),this._renderhandle(),this._renderdatashadow(),t.add(e),this._positiongroup()},e.prototype._resetlocation=function(){var t=this.datazoommodel,e=this.api,n=t.get("brushselect")?7:0,i=this._findcoordrect(),r={width:e.getwidth(),height:e.getheight()},o=this._orient===xb?{right:r.width-i.x-i.width,top:r.height-30-7-n,width:i.width,height:30}:{right:7,top:i.y,width:30,height:i.height},a=sp(t.option);e(["right","top","width","height"],(function(t){"ph"===a[t]&&(a[t]=o[t])}));var s=xp(a,r);this._location={x:s.x,y:s.y},this._size=[s.width,s.height],this._orient===zb&&this._size.reverse()},e.prototype._positiongroup=function(){var t=this.group,e=this._location,n=this._orient,i=this.datazoommodel.getfirsttargetaxismodel(),r=i&&i.get("inverse"),o=this._displayables.slidergroup,a=(this._datashadowinfo||{}).otheraxisinverse;o.attr(n!==xb||r?n===xb&&r?{scaley:a?1:-1,scalex:-1}:n!==zb||r?{scaley:a?-1:1,scalex:-1,rotation:math.pi/2}:{scaley:a?-1:1,scalex:1,rotation:math.pi/2}:{scaley:a?1:-1,scalex:1});var s=t.getboundingrect([o]);t.x=e.x-s.x,t.y=e.y-s.y,t.markredraw()},e.prototype._getviewextent=function(){return[0,this._size[0]]},e.prototype._renderbackground=function(){var t=this.datazoommodel,e=this._size,n=this._displayables.slidergroup,i=t.get("brushselect");n.add(new ub({silent:!0,shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:t.get("backgroundcolor")},z2:-40}));var r=new ub({shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:"transparent"},z2:0,onclick:w(this._onclickpanel,this)}),o=this.api.getzr();i?(r.on("mousedown",this._onbrushstart,this),r.cursor="crosshair",o.on("mousemove",this._onbrush),o.on("mouseup",this._onbrushend)):(o.off("mousemove",this._onbrush),o.off("mouseup",this._onbrushend)),n.add(r)},e.prototype._renderdatashadow=function(){var t=this._datashadowinfo=this._preparedatashadowinfo();if(this._displayables.datashadowsegs=[],t){var e=this._size,n=this._shadowsize||[],i=t.series,r=i.getrawdata(),o=i.getshadowdim?i.getshadowdim():t.otherdim;if(null!=o){var a=this._shadowpolygonpts,s=this._shadowpolylinepts;if(r!==this._shadowdata||o!==this._shadowdim||e[0]!==n[0]||e[1]!==n[1]){var l=r.getdataextent(o),u=.3*(l[1]-l[0]);l=[l[0]-u,l[1]+u];var h,c=[0,e[1]],p=[0,e[0]],d=[[e[0],0],[0,0]],f=[],g=p[1]/(r.count()-1),y=0,v=math.round(r.count()/e[0]);r.each([o],(function(t,e){if(v>0&&e%v)y+=g;else{var n=null==t||isnan(t)||""===t,i=n?0:nr(t,l,c,!0);n&&!h&&e?(d.push([d[d.length-1][0],0]),f.push([f[f.length-1][0],0])):!n&&h&&(d.push([y,0]),f.push([y,0])),d.push([y,i]),f.push([y,i]),y+=g,h=n}})),a=this._shadowpolygonpts=d,s=this._shadowpolylinepts=f}this._shadowdata=r,this._shadowdim=o,this._shadowsize=[e[0],e[1]];for(var m=this.datazoommodel,x=0;x<3;x++){var _=b(1===x);this._displayables.slidergroup.add(_),this._displayables.datashadowsegs.push(_)}}}function b(t){var e=m.getmodel(t?"selecteddatabackground":"databackground"),n=new cr,i=new pu({shape:{points:a},segmentignorethreshold:1,style:e.getmodel("areastyle").getareastyle(),silent:!0,z2:-20}),r=new ru({shape:{points:s},segmentignorethreshold:1,style:e.getmodel("linestyle").getlinestyle(),silent:!0,z2:-19});return n.add(i),n.add(r),n}},e.prototype._preparedatashadowinfo=function(){var t=this.datazoommodel,e=t.get("showdatashadow");if(!1!==e){var n,i=this.ecmodel;return t.eachtargetaxis((function(r,o){e(t.getaxisproxy(r,o).gettargetseriesmodels(),(function(t){if(!(n||!0!==e&&p(jb,t.get("type"))<0)){var a,s=i.getcomponent(ie(r),o).axis,l={x:"y",y:"x",radius:"angle",angle:"radius"}[r],u=t.coordinatesystem;null!=l&&u.getotheraxis&&(a=u.getotheraxis(s).inverse),l=t.getdata().mapdimension(l),n={thisaxis:s,series:t,thisdim:r,otherdim:l,otheraxisinverse:a}}}),this)}),this),n}},e.prototype._renderhandle=function(){var t=this.group,e=this._displayables,n=e.handles=[null,null],i=e.handlelabels=[null,null],r=this._displayables.slidergroup,o=this._size,a=this.datazoommodel,s=this.api,l=a.get("borderradius")||0,u=a.get("brushselect"),h=e.filler=new ub({silent:u,style:{fill:a.get("fillercolor")},textconfig:{position:"inside"}});r.add(h),r.add(new ub({silent:!0,subpixeloptimize:!0,shape:{x:0,y:0,width:o[0],height:o[1],r:l},style:{stroke:a.get("databackgroundcolor")||a.get("bordercolor"),linewidth:1,fill:"rgba(0,0,0,0)"}})),e([0,1],(function(e){var o=a.get("handleicon");!dy[o]&&o.indexof("path://")<0&&o.indexof("image://")<0&&(o="path://"+o);var s=ly(o,-1,0,2,2,null,!0);s.attr({cursor:$b(this._orient),draggable:!0,drift:w(this._ondragmove,this,e),ondragend:w(this._ondragend,this),onmouseover:w(this._showdatainfo,this,!0),onmouseout:w(this._showdatainfo,this,!1),z2:5});var l=s.getboundingrect(),u=a.get("handlesize");this._handleheight=er(u,this._size[1]),this._handlewidth=l.width/l.height*this._handleheight,s.setstyle(a.getmodel("handlestyle").getitemstyle()),s.style.strokenoscale=!0,s.recthover=!0,s.ensurestate("emphasis").style=a.getmodel(["emphasis","handlestyle"]).getitemstyle(),ol(s);var h=a.get("handlecolor");null!=h&&(s.style.fill=h),r.add(n[e]=s);var c=a.getmodel("textstyle");t.add(i[e]=new ks({silent:!0,invisible:!0,style:uh(c,{x:0,y:0,text:"",verticalalign:"middle",align:"center",fill:c.gettextcolor(),font:c.getfont()}),z2:10}))}),this);var c=h;if(u){var p=er(a.get("movehandlesize"),o[1]),d=e.movehandle=new cs({style:a.getmodel("movehandlestyle").getitemstyle(),silent:!0,shape:{r:[0,0,2,2],y:o[1]-.5,height:p}}),f=.8*p,g=e.movehandleicon=ly(a.get("movehandleicon"),-f/2,-f/2,f,f,"#fff",!0);g.silent=!0,g.y=o[1]+p/2-.5,d.ensurestate("emphasis").style=a.getmodel(["emphasis","movehandlestyle"]).getitemstyle();var y=math.min(o[1]/2,math.max(p,10));(c=e.movezone=new cs({invisible:!0,shape:{y:o[1]-y,height:p+y}})).on("mouseover",(function(){s.enteremphasis(d)})).on("mouseout",(function(){s.leaveemphasis(d)})),r.add(d),r.add(g),r.add(c)}c.attr({draggable:!0,cursor:$b(this._orient),drift:w(this._ondragmove,this,"all"),ondragstart:w(this._showdatainfo,this,!0),ondragend:w(this._ondragend,this),onmouseover:w(this._showdatainfo,this,!0),onmouseout:w(this._showdatainfo,this,!1)})},e.prototype._resetinterval=function(){var t=this._range=this.datazoommodel.getpercentrange(),e=this._getviewextent();this._handleends=[nr(t[0],[0,100],e,!0),nr(t[1],[0,100],e,!0)]},e.prototype._updateinterval=function(t,e){var n=this.datazoommodel,i=this._handleends,r=this._getviewextent(),o=n.findrepresentativeaxisproxy().getminmaxspan(),a=[0,100];lk(e,i,r,n.get("zoomlock")?"all":t,null!=o.minspan?nr(o.minspan,a,r,!0):null,null!=o.maxspan?nr(o.maxspan,a,r,!0):null);var s=this._range,l=this._range=vr([nr(i[0],r,a,!0),nr(i[1],r,a,!0)]);return!s||s[0]!==l[0]||s[1]!==l[1]},e.prototype._updateview=function(t){var e=this._displayables,n=this._handleends,i=vr(n.slice()),r=this._size;e([0,1],(function(t){var i=e.handles[t],o=this._handleheight;i.attr({scalex:o/2,scaley:o/2,x:n[t]+(t?-1:1),y:r[1]/2-o/2})}),this),e.filler.setshape({x:i[0],y:0,width:i[1]-i[0],height:r[1]});var o={x:i[0],width:i[1]-i[0]};e.movehandle&&(e.movehandle.setshape(o),e.movezone.setshape(o),e.movezone.getboundingrect(),e.movehandleicon&&e.movehandleicon.attr("x",o.x+o.width/2));for(var a=e.datashadowsegs,s=[0,i[0],i[1],r[0]],l=0;le[0]||n[1]<0||n[1]>e[1])){var i=this._handleends,r=(i[0]+i[1])/2,o=this._updateinterval("all",n[0]-r);this._updateview(),o&&this._dispatchzoomaction(!1)}},e.prototype._onbrushstart=function(t){var e=t.offsetx,n=t.offsety;this._brushstart=new ji(e,n),this._brushing=!0,this._brushstarttime=+new date},e.prototype._onbrushend=function(t){if(this._brushing){var e=this._displayables.brushrect;if(this._brushing=!1,e){e.attr("ignore",!0);var n=e.shape;if(!(+new date-this._brushstarttime<200&&math.abs(n.width)<5)){var i=this._getviewextent(),r=[0,100];this._range=vr([nr(n.x,i,r,!0),nr(n.x+n.width,i,r,!0)]),this._handleends=[n.x,n.x+n.width],this._updateview(),this._dispatchzoomaction(!1)}}}},e.prototype._onbrush=function(t){this._brushing&&(se(t.event),this._updatebrushrect(t.offsetx,t.offsety))},e.prototype._updatebrushrect=function(t,e){var n=this._displayables,i=this.datazoommodel,r=n.brushrect;r||(r=n.brushrect=new ub({silent:!0,style:i.getmodel("brushstyle").getitemstyle()}),n.slidergroup.add(r)),r.attr("ignore",!1);var o=this._brushstart,a=this._displayables.slidergroup,s=a.transformcoordtolocal(t,e),l=a.transformcoordtolocal(o.x,o.y),u=this._size;s[0]=math.max(math.min(u[0],s[0]),0),r.setshape({x:l[0],y:0,width:s[0]-l[0],height:u[1]})},e.prototype._dispatchzoomaction=function(t){var e=this._range;this.api.dispatchaction({type:"datazoom",from:this.uid,datazoomid:this.datazoommodel.id,animation:t?qb:null,start:e[0],end:e[1]})},e.prototype._findcoordrect=function(){var t,e=ce(this.datazoommodel).infolist;if(!t&&e.length){var n=e[0].model.coordinatesystem;t=n.getrect&&n.getrect()}if(!t){var i=this.api.getwidth(),r=this.api.getheight();t={x:.2*i,y:.2*r,width:.6*i,height:.6*r}}return t},e.type="datazoom.slider",e}(pe);function $b(t){return"vertical"===t?"ns-resize":"ew-resize"}function jb(t){t.registercomponentmodel(yb),t.registercomponentview(kb),be(t)}var qb=function(t,e,n){var i=t((tf[t]||{})[e]);return n&&y(i)?i[i.length-1]:i},tf={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]}},ef=id.mapvisual,nf=id.eachvisual,if=y,rf=e,of=vr,af=nr,sf=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.statelist=["inrange","outofrange"],n.replacableoptionkeys=["inrange","outofrange","target","controller","color"],n.layoutmode={type:"box",ignoresize:!0},n.databound=[-1/0,1/0],n.targetvisuals={},n.controllervisuals={},n}return n(e,t),e.prototype.init=function(t,e,n){this.mergedefaultandtheme(t,n)},e.prototype.optionupdated=function(t,e){var n=this.option;!e&&ev(n,t,this.replacableoptionkeys),this.textstylemodel=this.getmodel("textstyle"),this.resetitemsize(),this.completevisualoption()},e.prototype.resetvisual=function(t){var e=this.statelist;t=w(t,this),this.controllervisuals=tv(this.option.controller,e,t),this.targetvisuals=tv(this.option.target,e,t)},e.prototype.getitemsymbol=function(){return null},e.prototype.gettargetseriesindices=function(){var t=this.option.seriesindex,e=[];return null==t||"all"===t?this.ecmodel.eachseries((function(t,n){e.push(n)})):e=ho(t),e},e.prototype.eachtargetseries=function(t,e){e(this.gettargetseriesindices(),(function(n){var i=this.ecmodel.getseriesbyindex(n);i&&t.call(e,i)}),this)},e.prototype.istargetseries=function(t){var e=!1;return this.eachtargetseries((function(n){n===t&&(e=!0)})),e},e.prototype.formatvaluetext=function(t,e,n){var i,r=this.option,o=r.precision,a=this.databound,s=r.formatter;n=n||["<",">"],y(t)&&(t=t.slice(),i=!0);var l=e?t:i?[u(t[0]),u(t[1])]:u(t);return x(s)?s.replace("{value}",i?l[0]:l).replace("{value2}",i?l[1]:l):u(s)?i?s(t[0],t[1]):s(t):i?t[0]===a[0]?n[0]+" "+l[1]:t[1]===a[1]?n[1]+" "+l[0]:l[0]+" - "+l[1]:l;function u(t){return t===a[0]?"min":t===a[1]?"max":(+t).tofixed(math.min(o,20))}},e.prototype.resetextent=function(){var t=this.option,e=of([t.min,t.max]);this._dataextent=e},e.prototype.getdatadimensionindex=function(t){var e=this.option.dimension;if(null!=e)return t.getdimensionindex(e);for(var n=t.dimensions,i=n.length-1;i>=0;i--){var r=n[i],o=t.getdimensioninfo(r);if(!o.iscalculationcoord)return o.storedimindex}},e.prototype.getextent=function(){return this._dataextent.slice()},e.prototype.completevisualoption=function(){var t=this.ecmodel,e=this.option,n={inrange:e.inrange,outofrange:e.outofrange},i=e.target||(e.target={}),r=e.controller||(e.controller={});c(i,n),c(r,n);var o=this.iscategory();function a(n){if(e.color)&&!n.inrange&&(n.inrange={color:e.color.slice().reverse()}),n.inrange=n.inrange||{color:t.get("gradientcolor")}}a.call(this,i),a.call(this,r),function(t,e,n){var i=t[e],r=t[n];i&&!r&&(r=t[n]={},rf(i,(function(t,e){if(id.isvalidtype(e)){var n=qb(e,"inactive",o);null!=n&&(r[e]=n,"color"!==e||r.hasownproperty("opacity")||r.hasownproperty("coloralpha")||(r.opacity=[0,0]))}})))}.call(this,i,"inrange","outofrange"),function(t){var e=(t.inrange||{}).symbol||(t.outofrange||{}).symbol,n=(t.inrange||{}).symbolsize||(t.outofrange||{}).symbolsize,i=this.get("inactivecolor"),r=this.getitemsymbol()||"roundrect";rf(this.statelist,(function(a){var s=this.itemsize,l=t[a];l||(l=t[a]={color:o?i:[i]}),null==l.symbol&&(l.symbol=e&&t(e)||(o?r:[r])),null==l.symbolsize&&(l.symbolsize=n&&t(n)||(o?s[0]:[s[0],s[0]])),l.symbol=ef(l.symbol,(function(t){return"none"===t?r:t}));var u=l.symbolsize;if(null!=u){var h=-1/0;nf(u,(function(t){t>h&&(h=t)})),l.symbolsize=ef(u,(function(t){return af(t,[0,h],[0,s[0]],!0)}))}}),this)}.call(this,r)},e.prototype.resetitemsize=function(){this.itemsize=[parsefloat(this.get("itemwidth")),parsefloat(this.get("itemheight"))]},e.prototype.iscategory=function(){return!!this.option.categories},e.prototype.setselected=function(t){},e.prototype.getselected=function(){return null},e.prototype.getvaluestate=function(t){return null},e.prototype.getvisualmeta=function(t){return null},e.type="visualmap",e.dependencies=["series"],e.defaultoption={show:!0,z:4,seriesindex:"all",min:0,max:200,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,textstyle:{color:"#333"}},e}(tp),lf=[20,140],uf=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.optionupdated=function(e,n){t.prototype.optionupdated.apply(this,arguments),this.resetextent(),this.resetvisual((function(t){t.mappingmethod="linear",t.dataextent=this.getextent()})),this._resetrange()},e.prototype.resetitemsize=function(){t.prototype.resetitemsize.apply(this,arguments);var e=this.itemsize;(null==e[0]||isnan(e[0]))&&(e[0]=lf[0]),(null==e[1]||isnan(e[1]))&&(e[1]=lf[1])},e.prototype._resetrange=function(){var t=this.getextent(),e=this.option.range;!e||e.auto?(t.auto=1,this.option.range=t):y(e)&&(e[0]>e[1]&&e.reverse(),e[0]=math.max(e[0],t[0]),e[1]=math.min(e[1],t[1]))},e.prototype.completevisualoption=function(){t.prototype.completevisualoption.apply(this,arguments),e(this.statelist,(function(t){var e=this.option.controller[t].symbolsize;e&&e[0]!==e[1]&&(e[0]=e[1]/3)}),this)},e.prototype.setselected=function(t){this.option.range=t.slice(),this._resetrange()},e.prototype.getselected=function(){var t=this.getextent(),e=vr((this.get("range")||[]).slice());return e[0]>t[1]&&(e[0]=t[1]),e[1]>t[1]&&(e[1]=t[1]),e[0]=n[1]||t<=e[1])?"inrange":"outofrange"},e.prototype.findtargetdataindices=function(t){var e=[];return this.eachtargetseries((function(n){var i=[],r=n.getdata();r.each(this.getdatadimensionindex(r),(function(e,n){t[0]<=e&&e<=t[1]&&i.push(n)}),this),e.push({seriesid:n.id,dataindex:i})}),this),e},e.prototype.getvisualmeta=function(t){var e=hf(this,"outofrange",this.getextent()),n=hf(this,"inrange",this.option.range.slice()),i=[];function r(e,n){i.push({value:e,color:t(e,n)})}for(var o=0,a=0,s=n.length,l=e.length;at[1])break;n.push({color:this.getcontrollervisual(o,"color",e),offset:r/100})}return n.push({color:this.getcontrollervisual(t[1],"color",e),offset:1}),n},e.prototype._createbarpoints=function(t,e){var n=this.visualmapmodel.itemsize;return[[n[0]-e[0],t[0]],[n[0],t[0]],[n[0],t[1]],[n[0]-e[1],t[1]]]},e.prototype._createbargroup=function(t){var e=this._orient,n=this.visualmapmodel.get("inverse");return new cr("horizontal"!==e||n?"horizontal"===e&&n?{scalex:"bottom"===t?-1:1,rotation:-math.pi/2}:"vertical"!==e||n?{scalex:"left"===t?1:-1}:{scalex:"left"===t?1:-1,scaley:-1}:{scalex:"bottom"===t?1:-1,rotation:math.pi/2})},e.prototype._updatehandle=function(t,e){if(this._usehandle){var n=this._shapes,i=this.visualmapmodel,r=n.handlethumbs,o=n.handlelabels,a=i.itemsize,s=i.getextent();yf([0,1],(function(l){var u=r[l];u.setstyle("fill",e.handlescolor[l]),u.y=t[l];var h=gf(t[l],[0,a[1]],s,!0),c=this.getcontrollervisual(h,"symbolsize");u.scalex=u.scaley=c/a[0],u.x=a[0]-c/2;var p=th(n.handlelabelpoints[l],ih(u,this.group));o[l].setstyle({x:p[0],y:p[1],text:i.formatvaluetext(this._datainterval[l]),verticalalign:"middle",align:"vertical"===this._orient?this._applytransform("left",n.maingroup):"center"})}),this)}},e.prototype._showindicator=function(t,e,n,i){var r=this.visualmapmodel,o=r.getextent(),a=r.itemsize,s=[0,a[1]],l=this._shapes,u=l.indicator;if(u){u.attr("invisible",!1);var h=this.getcontrollervisual(t,"color",{convertopacitytoalpha:!0}),c=this.getcontrollervisual(t,"symbolsize"),p=gf(t,o,s,!0),d=a[0]-c/2,f={x:u.x,y:u.y};u.y=p,u.x=d;var g=th(l.indicatorlabelpoint,ih(u,this.group)),y=l.indicatorlabel;y.attr("invisible",!1);var v=this._applytransform("left",l.maingroup),m="horizontal"===this._orient;y.setstyle({text:(n||"")+r.formatvaluetext(e),verticalalign:m?v:"middle",align:m?"center":v});var x={x:d,y:p,style:{fill:h}},_={style:{x:g[0],y:g[1]}};if(r.ecmodel.isanimationenabled()&&!this._firstshowindicator){var b={duration:100,easing:"cubicinout",additive:!0};u.x=f.x,u.y=f.y,u.animateto(x,b),y.animateto(_,b)}else u.attr(x),y.attr(_);this._firstshowindicator=!1;var w=this._shapes.handlelabels;if(w)for(var s=0;sr[1]&&(u[1]=1/0),e&&(u[0]===-1/0?this._showindicator(l,u[1],"< ",a):u[1]===1/0?this._showindicator(l,u[0],"> ",a):this._showindicator(l,l,"≈ ",a));var h=this._hoverlinkdataindices,c=[];(e||bf(n))&&(c=this._hoverlinkdataindices=n.findtargetdataindices(u));var p=function(t,e){var n={},i={};return r(t||[],n),r(e||[],i,n),[o(n),o(i)];function r(t,e,n){for(var i=0,r=t.length;i=0&&(r.dimension=o,i.push(r))}})),t.getdata().setvisual("visualmeta",i)}}];function tf(t,e,n,i){for(var r=e.targetvisuals[i],o=id.preparevisualtypes(r),a={color:gy(t.getdata(),"color")},s=0,l=o.length;s0:t.splitnumber>0)&&!t.calculable?"piecewise":"continuous"})),t.registeraction(sf,mf),e(if,(function(e){t.registervisual(t.priority.visual.component,e)})),t.registerpreprocessor(df))}function pf(t){t.registercomponentmodel(uf),t.registercomponentview(xf),lf(t)}var of=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._piecelist=[],n}return n(e,t),e.prototype.optionupdated=function(e,n){t.prototype.optionupdated.apply(this,arguments),this.resetextent();var i=this._mode=this._determinemode();this._piecelist=[],rf[this._mode].call(this,this._piecelist),this._resetselected(e,n);var r=this.option.categories;this.resetvisual((function(t,e){"categories"===i?(t.mappingmethod="category",t.categories=t(r)):(t.dataextent=this.getextent(),t.mappingmethod="piecewise",t.piecelist=z(this._piecelist,(function(t){return t=t(t),"inrange"!==e&&(t.visual=null),t})))}))},e.prototype.completevisualoption=function(){var e=this.option,n={},i=id.listvisualtypes(),r=this.iscategory();function o(t,e,n){return t&&t[e]&&t[e].hasownproperty(n)}e(e.pieces,(function(t){e(i,(function(e){t.hasownproperty(e)&&(n[e]=1)}))})),e(n,(function(t,n){var i=!1;e(this.statelist,(function(t){i=i||o(e,t,n)||o(e.target,t,n)}),this),!i&&e(this.statelist,(function(t){(e[t]||(e[t]={}))[n]=qb(n,"inrange"===t?"active":"inactive",r)}))}),this),t.prototype.completevisualoption.apply(this,arguments)},e.prototype._resetselected=function(t,e){var n=this.option,i=this._piecelist,r=(e?n:t).selected||{};if(n.selected=r,e(i,(function(t,e){var n=this.getselectedmapkey(t);r.hasownproperty(n)||(r[n]=!0)}),this),"single"===n.selectedmode){var o=!1;e(i,(function(t,e){var n=this.getselectedmapkey(t);r[n]&&(o?r[n]=!1:o=!0)}),this)}},e.prototype.getitemsymbol=function(){return this.get("itemsymbol")},e.prototype.getselectedmapkey=function(t){return"categories"===this._mode?t.value+"":t.index+""},e.prototype.getpiecelist=function(){return this._piecelist},e.prototype._determinemode=function(){var t=this.option;return t.pieces&&t.pieces.length>0?"pieces":this.option.categories?"categories":"splitnumber"},e.prototype.setselected=function(t){this.option.selected=t(t)},e.prototype.getvaluestate=function(t){var e=id.findpieceindex(t,this._piecelist);return null!=e&&this.option.selected[this.getselectedmapkey(this._piecelist[e])]?"inrange":"outofrange"},e.prototype.findtargetdataindices=function(t){var e=[],n=this._piecelist;return this.eachtargetseries((function(i){var r=[],o=i.getdata();o.each(this.getdatadimensionindex(o),(function(e,i){id.findpieceindex(e,n)===t&&r.push(i)}),this),e.push({seriesid:i.id,dataindex:r})}),this),e},e.prototype.getrepresentvalue=function(t){var e;if(this.iscategory())e=t.value;else if(null!=t.value)e=t.value;else{var n=t.interval||[];e=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return e},e.prototype.getvisualmeta=function(t){if(!this.iscategory()){var e=[],n=["",""],i=this,r=this._piecelist.slice();if(r.length){var o=r[0].interval[0];o!==-1/0&&r.unshift({interval:[-1/0,o]}),(o=r[r.length-1].interval[1])!==1/0&&r.push({interval:[o,1/0]})}else r.push({interval:[-1/0,1/0]});var a=-1/0;return e(r,(function(t){var e=t.interval;e&&(e[0]>a&&s([a,e[0]],"outofrange"),s(e.slice()),a=e[1])}),this),{stops:e,outercolors:n}}function s(r,o){var a=i.getrepresentvalue({interval:r});o||(o=i.getvaluestate(a));var s=t(a,o);r[0]===-1/0?n[0]=s:r[1]===1/0?n[1]=s:e.push({value:r[0],color:s},{value:r[1],color:s})}},e.type="visualmap.piecewise",e.defaultoption=yc(sf.defaultoption,{selected:null,minopen:!1,maxopen:!1,align:"auto",itemwidth:20,itemheight:14,itemsymbol:"roundrect",pieces:null,categories:null,splitnumber:5,selectedmode:"multiple",itemgap:10,hoverlink:!0}),e}(sf),rf={splitnumber:function(t){var e=this.option,n=math.min(e.precision,20),i=this.getextent(),r=e.splitnumber;r=math.max(parseint(r,10),1),e.splitnumber=r;for(var o=(i[1]-i[0])/r;+o.tofixed(n)!==o&&n<5;)n++;e.precision=n,o=+o.tofixed(n),e.minopen&&t.push({interval:[-1/0,i[0]],close:[0,0]});for(var a=0,s=i[0];a","≥"][e[0]]];t.text=t.text||this.formatvaluetext(null!=t.value?t.value:t.interval,!1,n)}),this)}};function nf(t,e){var n=t.inverse;("vertical"===t.orient?!n:n)&&e.reverse()}var ef=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.dorender=function(){var t=this.group;t.removeall();var e=this.visualmapmodel,n=e.get("textgap"),i=e.textstylemodel,r=i.getfont(),o=i.gettextcolor(),a=this._getitemalign(),s=e.itemsize,l=this._getviewdata(),u=l.endstext,h=it(e.get("showlabel",!0),!u);u&&this._renderendstext(t,u[0],s,h,a),e(l.viewpiecelist,(function(i){var l=i.piece,u=new cr;u.onclick=w(this._onitemclick,this,l),this._enablehoverlink(u,i.indexinmodelpiecelist);var c=e.getrepresentvalue(l);if(this._createitemsymbol(u,c,[0,0,s[0],s[1]]),h){var p=this.visualmapmodel.getvaluestate(c);u.add(new ks({style:{x:"right"===a?-n:s[0]+n,y:s[1]/2,text:l.text,verticalalign:"middle",align:a,font:r,fill:o,opacity:"outofrange"===p?.5:1}}))}t.add(u)}),this),u&&this._renderendstext(t,u[1],s,h,a),mp(e.get("orient"),t,e.get("itemgap")),this.renderbackground(t),this.positiongroup(t)},e.prototype._enablehoverlink=function(t,e){var n=this;t.on("mouseover",(function(){return i("highlight")})).on("mouseout",(function(){return i("downplay")}));var i=function(t){var i=n.visualmapmodel;i.option.hoverlink&&n.api.dispatchaction({type:t,batch:ff(i.findtargetdataindices(e),i)})}},e.prototype._getitemalign=function(){var t=this.visualmapmodel,e=t.option;if("vertical"===e.orient)return df(t,this.api,t.itemsize);var n=e.align;return n&&"auto"!==n||(n="left"),n},e.prototype._renderendstext=function(t,e,n,i,r){if(e){var o=new cr,a=this.visualmapmodel.textstylemodel;o.add(new ks({style:uh(a,{x:i?"right"===r?n[0]:0:n[0]/2,y:n[1]/2,verticalalign:"middle",align:i?r:"center",text:e})})),t.add(o)}},e.prototype._getviewdata=function(){var t=this.visualmapmodel,e=z(t.getpiecelist(),(function(t,e){return{piece:t,indexinmodelpiecelist:e}})),n=t.get("text"),i=t.get("orient"),r=t.get("inverse");return("horizontal"===i?r:!r)?e.reverse():n&&(n=n.slice().reverse()),{viewpiecelist:e,endstext:n}},e.prototype._createitemsymbol=function(t,e,n){t.add(ly(this.getcontrollervisual(e,"symbol"),n[0],n[1],n[2],n[3],this.getcontrollervisual(e,"color")))},e.prototype._onitemclick=function(t){var e=this.visualmapmodel,n=e.option,i=n.selectedmode;if(i){var r=t(n.selected),o=e.getselectedmapkey(t);"single"===i||!0===i?(r[o]=!0,e(r,(function(t,e){r[e]=e===o}))):r[o]=!r[o],this.api.dispatchaction({type:"selectdatarange",from:this.uid,visualmapid:this.visualmapmodel.id,selected:r})}},e.type="visualmap.piecewise",e}(cf);function zf(t){t.registercomponentmodel(of),t.registercomponentview(ef),lf(t)}var vf={label:{enabled:!0},decal:{show:!1}},bf=so(),ff={};function gf(t,e){var n=t.getmodel("aria");if(n.get("enabled")){var i=t(vf);c(i.label,t.getlocalemodel().get("aria"),!1),c(n.option,i,!1),function(){if(n.getmodel("decal").get("show")){var e=ft();t.eachseries((function(t){if(!t.iscolorbyseries()){var n=e.get(t.type);n||(n={},e.set(t.type,n)),bf(t).scope=n}})),t.eachrawseries((function(e){if(!t.isseriesfiltered(e))if(u(e.enableariadecal))e.enableariadecal();else{var n=e.getdata();if(e.iscolorbyseries()){var i=ed(e.ecmodel,e.name,ff,t.getseriescount()),r=n.getvisual("decal");n.setvisual("decal",u(r,i))}else{var o=e.getrawdata(),a={},s=bf(e).scope;n.each((function(t){var e=n.getrawindex(t);a[e]=t}));var l=o.count();o.each((function(t){var i=a[t],r=o.getname(t)||t+"",h=ed(e.ecmodel,r,s,l),c=n.getitemvisual(i,"decal");n.setitemvisual(i,"decal",u(c,h))}))}}function u(t,e){var n=t?a(a({},e),t):e;return n.dirty=!0,n}}))}}(),function(){var i=t.getlocalemodel().get("aria"),o=n.getmodel("label");if(o.option=k(o.option,i),!o.get("enabled"))return;var a=e.getzr().dom;if(o.get("description"))return void a.setattribute("aria-label",o.get("description"));var s,l=t.getseriescount(),u=o.get(["data","maxcount"])||10,h=o.get(["series","maxcount"])||10,c=math.min(l,h);if(l<1)return;var p=function(){var e=t.get("title");e&&e.length&&(e=e[0]);return e&&e.text}();if(p){var d=o.get(["general","withtitle"]);s=r(d,{title:p})}else s=o.get(["general","withouttitle"]);var f=[],g=l>1?o.get(["series","multiple","prefix"]):o.get(["series","single","prefix"]);s+=r(g,{seriescount:l}),t.eachseries((function(e,n){if(n1?o.get(["series","multiple",a]):o.get(["series","single",a]),{seriesid:e.seriesindex,seriesname:e.get("name"),seriestype:(x=e.subtype,t.getlocalemodel().get(["series","typenames"])[x]||"自定义图")});var s=e.getdata();if(s.count()>u)i+=r(o.get(["data","partialdata"]),{displaycnt:u});else i+=o.get(["data","alldata"]);for(var h=o.get(["data","separator","middle"]),p=o.get(["data","separator","end"]),d=[],g=0;g":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},yf=function(){function t(t){if(null==(this._condval=x(t)?new regexp(t):et(t)?t:null)){var e="";0,ao(e)}}return t.prototype.evaluate=function(t){var e=typeof t;return x(e)?this._condval.test(t):!!j(e)&&this._condval.test(t+"")},t}(),uf=function(){function t(){}return t.prototype.evaluate=function(){return this.value},t}(),xf=function(){function t(){}return t.prototype.evaluate=function(){for(var t=this.children,e=0;e2&&l.push(e),e=[t,n]}function f(t,n,i,r){og(t,i)&&og(n,r)||e.push(t,n,i,r,i,r)}function g(t,n,i,r,o,a){var s=math.abs(n-t),l=4*math.tan(s/4)/3,u=nm:c2&&l.push(e),l}function sg(t,e,n,i,r,o,a,s,l,u){if(og(t,n)&&og(e,i)&&og(r,a)&&og(o,s))l.push(a,s);else{var h=2/u,c=h*h,p=a-t,d=s-e,f=math.sqrt(p*p+d*d);p/=f,d/=f;var g=n-t,y=i-e,v=r-a,m=o-s,x=g*g+y*y,_=v*v+m*m;if(x=0&&_-w*w=0)l.push(a,s);else{var s=[],m=[];ze(t,n,r,a,.5,s),ze(e,i,o,s,.5,m),sg(s[0],m[0],s[1],m[1],s[2],m[2],s[3],m[3],l,u),sg(s[4],m[4],s[5],m[5],s[6],m[6],s[7],m[7],l,u)}}}}function lg(t,e,n){var i=t[e],r=t[1-e],o=math.abs(i/r),a=math.ceil(math.sqrt(o*n)),s=math.floor(n/a);0===s&&(s=1,a=n);for(var l=[],u=0;u0)for(u=0;umath.abs(u),c=lg([l,u],h?0:1,e),p=(h?s:u)/c.length,d=0;d1?null:new ji(d*l+t,d*u+e)}function pg(t,e,n){var i=new ji;ji.sub(i,n,e),i.normalize();var r=new ji;return ji.sub(r,t,e),r.dot(i)}function dg(t,e){var n=t[t.length-1];n&&n[0]===e[0]&&n[1]===e[1]||t.push(e)}function fg(t){var e=t.points,n=[],i=[];ma(e,n,i);var r=new sr(n[0],n[1],i[0]-n[0],i[1]-n[1]),o=r.width,a=r.height,s=r.x,l=r.y,u=new ji,h=new ji;return o>a?(u.x=h.x=s+o/2,u.y=l,h.y=l+a):(u.y=h.y=l+a/2,u.x=s,h.x=s+o),function(t,e,n){for(var i=t.length,r=[],o=0;or,a=lg([i,r],o?0:1,e),s=o?"width":"height",l=o?"height":"width",u=o?"x":"y",h=o?"y":"x",c=t[s]/a.length,p=0;p0)for(var b=i/n,w=-i/2;w<=i/2;w+=b){var s=math.sin(w),m=math.cos(w),i=0;for(x=0;x0;l/=2){var u=0,h=0;(t&l)>0&&(u=1),(e&l)>0&&(h=1),s+=l*l*(3*u^h),0===h&&(1===u&&(t=l-1-t,e=l-1-e),a=t,t=e,e=a)}return s}function lg(t){var e=1/0,n=1/0,i=-1/0,r=-1/0,o=z(t,(function(t){var o=t.getboundingrect(),a=t.getcomputedtransform(),s=o.x+o.width/2+(a?a[4]:0),l=o.y+o.height/2+(a?a[5]:0);return e=math.min(s,e),n=math.min(l,n),i=math.max(s,i),r=math.max(l,r),[s,l]}));return z(o,(function(o,a){return{cp:o,z:kg(o[0],o[1],e,n,i,r),path:t[a]}})).sort((function(t,e){return t.z-e.z})).map((function(t){return t.path}))}function pg(t){return vg(t.path,t.count)}function og(t){return y(t[0])}function rg(t,e){for(var n=[],i=t.length,r=0;r=0;r--)if(!n[r].many.length){var l=n[s].many;if(l.length<=1){if(!s)return n;s=0}o=l.length;var u=math.ceil(o/2);n[r].many=l.slice(u,o),n[s].many=l.slice(0,u),s++}return n}var ng={clone:function(t){for(var e=[],n=1-math.pow(1-t.path.style.opacity,1/t.count),i=0;i0){var s,l,u=i.getmodel("universaltransition").get("delay"),h=object.assign({settofinal:!0},a);og(t)&&(s=t,l=e),og(e)&&(s=e,l=t);for(var c=s?s===t:t.length>e.length,p=s?rg(l,s):rg(c?e:t,[c?t:e]),d=0,f=0;f1e4))for(var i=n.getindices(),r=function(t){for(var e=t.dimensions,n=0;n0&&i.group.traverse((function(t){t instanceof gs&&!t.animators.length&&t.animatefrom({style:{opacity:0}},r)}))}))}function ug(t){var e=t.getmodel("universaltransition").get("serieskey");return e||t.id}function xg(t){return y(t)?t.sort().join(","):t}function zg(t){if(t.hostmodel)return t.hostmodel.getmodel("universaltransition").get("divideshape")}function jg(t,e){for(var n=0;n=0&&r.push({data:e.olddata[n],divide:zg(e.olddata[n]),dim:t.dimension})})),e(ho(t.to),(function(t){var e=jg(n.updatedseries,t);if(e>=0){var i=n.updatedseries[e].getdata();o.push({data:i,divide:zg(i),dim:t.dimension})}})),r.length>0&&o.length>0&&yg(r,o,i)}(t,i,n,e)}));else{var o=function(t,e){var n=ft(),i=ft(),r=ft();return e(t.oldseries,(function(e,n){var o=t.olddata[n],a=ug(e),s=xg(a);i.set(s,o),y(a)&&e(a,(function(t){r.set(t,{data:o,key:s})}))})),e(e.updatedseries,(function(t){if(t.isuniversaltransitionenabled()&&t.isanimationenabled()){var e=t.getdata(),o=ug(t),a=xg(o),s=i.get(a);if(s)n.set(a,{oldseries:[{divide:zg(s),data:s}],newseries:[{divide:zg(e),data:e}]});else if(y(o)){var l=[];e(o,(function(t){var e=i.get(t);e&&l.push({divide:zg(e),data:e})})),l.length&&n.set(a,{oldseries:l,newseries:[{data:e,divide:zg(e)}]})}else{var u=r.get(o);if(u){var h=n.get(u.key);h||(h={oldseries:[{data:u.data,divide:zg(u.data)}],newseries:[]},n.set(u.key,h)),h.newseries.push({data:e,divide:zg(e)})}}}})),n}(i,n);e(o.keys(),(function(t){var n=o.get(t);yg(n.oldseries,n.newseries,e)}))}e(n.updatedseries,(function(t){t.__universaltransitionenabled&&(t.__universaltransitionenabled=!1)}))}for(var a=t.getseries(),s=i.oldseries=[],l=i.olddata=[],u=0;u