/* * 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){function i(){this.constructor=t}e(t,n),t.prototype=null===n?object.create(n):(i.prototype=n.prototype,new i)}var i=function(){return(i=object.assign||function(t){for(var e,n=1,i=arguments.length;n18);a&&(n.wechat=!0);e.canvassupported=!!document.createelement("canvas").getcontext,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,a);var s={"[object function]":!0,"[object regexp]":!0,"[object date]":!0,"[object error]":!0,"[object canvasgradient]":!0,"[object canvaspattern]":!0,"[object image]":!0,"[object canvas]":!0},l={"[object int8array]":!0,"[object uint8array]":!0,"[object uint8clampedarray]":!0,"[object int16array]":!0,"[object uint16array]":!0,"[object int32array]":!0,"[object uint32array]":!0,"[object float32array]":!0,"[object float64array]":!0},u=object.prototype.tostring,h=array.prototype,c=h.foreach,p=h.filter,d=h.slice,f=h.map,g=function(){}.constructor,y=g?g.prototype:null,v={};function m(t,e){v[t]=e}var _=2311;function x(){return _++}function b(){for(var t=[],e=0;e>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,o),o,r);if(s)return s(t,n,i),!0}return!1}function yt(t){return"canvas"===t.nodename.touppercase()}var zt="undefined"!=typeof window&&!!window.addeventlistener,jt=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,qt=[];function kt(t,e,n,i){return n=n||{},i||!a.canvassupported?$t(t,e,n):a.browser.firefox&&null!=e.layerx&&e.layerx!==e.offsetx?(n.zrx=e.layerx,n.zry=e.layery):null!=e.offsetx?(n.zrx=e.offsetx,n.zry=e.offsety):$t(t,e,n),n}function $t(t,e,n){if(a.domsupported&&t.getboundingclientrect){var i=e.clientx,r=e.clienty;if(yt(t)){var o=t.getboundingclientrect();return n.zrx=i-o.left,void(n.zry=r-o.top)}if(xt(qt,t,i,r))return n.zrx=qt[0],void(n.zry=qt[1])}n.zrx=n.zry=0}function jt(t){return t||window.event}function qt(t,e,n){if(null!=(e=jt(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&&kt(t,r,e,n)}else{kt(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&&jt.test(e.type)&&(e.which=1&a?1:2&a?3:4&a?2:0),e}function te(t,e,n,i){zt?t.addeventlistener(e,n,i):t.attachevent("on"+e,n)}var ee=zt?function(t){t.preventdefault(),t.stoppropagation(),t.cancelbubble=!0}:function(t){t.returnvalue=!1,t.cancelbubble=!0};function ne(t){return 2===t.which||3===t.which}var ie=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=re(r)/re(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}}}}},ae="silent";function se(){ee(this.event)}var le=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}(ft),ue=function(t,e){this.x=t,this.y=e},he=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],ce=function(t){function e(e,n,i,r){var o=t.call(this)||this;return o._hovered=new ue(0,0),o.storage=e,o.painter=n,o.painterroot=r,i=i||new le,o.proxy=null,o.sethandlerproxy(i),o._draggingmgr=new bt(o),o}return n(e,t),e.prototype.sethandlerproxy=function(t){this.proxy&&this.proxy.dispose(),t&&(p(he,(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=de(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 ue(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 ue(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:se}}(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 ue(t,e),o=i.length-1;o>=0;o--){var a=void 0;if(i[o]!==n&&!i[o].ignore&&(a=pe(i[o],t,e))&&(!r.toptarget&&(r.toptarget=i[o]),a!==ae)){r.target=i[o];break}}return r},e.prototype.processgesture=function(t,e){this._gesturemgr||(this._gesturemgr=new ie);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 ue;o.target=i.target,this.dispatchtoelement(o,r,i.event)}},e}(ft);function pe(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||ae}return!1}function de(t,e,n){var i=t.painter;return e<0||e>i.getwidth()||n<0||n>i.getheight()}p(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],(function(t){ce.prototype[t]=function(e){var n,i,r=e.zrx,o=e.zry,a=de(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||lt(this._downpoint,[e.zrx,e.zry])>4)return;this._downpoint=null}this.dispatchtoelement(n,t,e)}}));function fe(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 ge(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 ye(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 ve(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=ve(t[h],t,l,u,0,e);l+=p,0!==(u-=p)&&0!==(c=ye(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-ye(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=fe(t,n,i,e))s&&(l=s),ge(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 xe=!1;function be(){xe||(xe=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function we(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}var se=function(){function t(){this._roots=[],this._displaylist=[],this._displaylistlen=0,this.displayablesortfunc=we}return t.prototype.traverse=function(t,e){for(var n=0;n0&&(u.__clippaths=[]),isnan(u.z)&&(be(),u.z=0),isnan(u.z2)&&(be(),u.z2=0),isnan(u.zlevel)&&(be(),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}(),me="undefined"!=typeof window&&(window.requestanimationframe&&window.requestanimationframe.bind(window)||window.msrequestanimationframe&&window.msrequestanimationframe.bind(window)||window.mozrequestanimationframe||window.webkitrequestanimationframe)||function(t){return settimeout(t,16)},ie={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-ie.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*ie.bouncein(2*t):.5*ie.bounceout(2*t-1)+.5}},te=function(){function t(t){this._initialized=!1,this._starttime=0,this._pausedtime=0,this._paused=!1,this._life=t.life||1e3,this._delay=t.delay||0,this.loop=null!=t.loop&&t.loop,this.gap=t.gap||0,this.easing=t.easing||"linear",this.onframe=t.onframe,this.ondestroy=t.ondestroy,this.onrestart=t.onrestart}return t.prototype.step=function(t,e){if(this._initialized||(this._starttime=t+this._delay,this._initialized=!0),!this._paused){var n=(t-this._starttime-this._pausedtime)/this._life;n<0&&(n=0),n=math.min(n,1);var i=this.easing,r="string"==typeof i?ie[i]:i,o="function"==typeof r?r(n):n;if(this.onframe&&this.onframe(o),1===n){if(!this.loop)return!0;this._restart(t),this.onrestart&&this.onrestart()}return!1}this._pausedtime+=e},t.prototype._restart=function(t){var e=(t-this._starttime-this._pausedtime)%this._life;this._starttime=t-e+this.gap,this._pausedtime=0},t.prototype.pause=function(){this._paused=!0},t.prototype.resume=function(){this._paused=!1},t}(),ce=function(t){this.value=t},de=function(){function t(){this._len=0}return t.prototype.insert=function(t){var e=new ce(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}(),ae=function(){function t(t){this._list=new de,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 ce(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}(),le={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 ke(t){return(t=math.round(t))<0?0:t>255?255:t}function pe(t){return t<0?0:t>1?1:t}function oe(t){var e=t;return e.length&&"%"===e.charat(e.length-1)?ke(parsefloat(e)/100*255):ke(parseint(e,10))}function re(t){var e=t;return e.length&&"%"===e.charat(e.length-1)?pe(parsefloat(e)/100):pe(parsefloat(e))}function ne(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 ze(t,e,n){return t+(e-t)*n}function ee(t,e,n,i,r){return t[0]=e,t[1]=n,t[2]=i,t[3]=r,t}function ve(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var be=new ae(20),fe=null;function ge(t,e){fe&&ve(fe,e),fe=be.put(t,fe||e.slice())}function he(t,e){if(t){e=e||[];var n=be.get(t);if(n)return ve(e,n);var i=(t+="").replace(/ /g,"").tolowercase();if(i in le)return ve(e,le[i]),ge(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?(ee(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),ge(t,e),e):void ee(e,0,0,0,1):7===o||9===o?(r=parseint(i.slice(1,7),16))>=0&&r<=16777215?(ee(e,(16711680&r)>>16,(65280&r)>>8,255&r,9===o?parseint(i.slice(7),16)/255:1),ge(t,e),e):void ee(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?ee(e,+u[0],+u[1],+u[2],1):ee(e,0,0,0,1);h=re(u.pop());case"rgb":return 3!==u.length?void ee(e,0,0,0,1):(ee(e,oe(u[0]),oe(u[1]),oe(u[2]),h),ge(t,e),e);case"hsla":return 4!==u.length?void ee(e,0,0,0,1):(u[3]=re(u[3]),we(u,e),ge(t,e),e);case"hsl":return 3!==u.length?void ee(e,0,0,0,1):(we(u,e),ge(t,e),e);default:return}}ee(e,0,0,0,1)}}function we(t,e){var n=(parsefloat(t[0])%360+360)%360/360,i=re(t[1]),r=re(t[2]),o=r<=.5?r*(i+1):r+i-r*i,a=2*r-o;return ee(e=e||[],ke(255*ne(a,o,n+1/3)),ke(255*ne(a,o,n)),ke(255*ne(a,o,n-1/3)),1),4===t.length&&(e[3]=t[3]),e}function ue(t,e){var n=he(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 je(n,4===n.length?"rgba":"rgb")}}function xe(t){var e=he(t);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).tostring(16).slice(1)}function ye(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]=ke(ze(a[0],s[0],l)),n[1]=ke(ze(a[1],s[1],l)),n[2]=ke(ze(a[2],s[2],l)),n[3]=pe(ze(a[3],s[3],l)),n}}var ze=ye;function je(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=he(e[r]),s=he(e[o]),l=i-r,u=je([ke(ze(a[0],s[0],l)),ke(ze(a[1],s[1],l)),ke(ze(a[2],s[2],l)),pe(ze(a[3],s[3],l))],"rgba");return n?{color:u,leftindex:r,rightindex:o,value:i}:u}}var qe=je;function ke(t,e,n,i){var r=he(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]=re(n)),null!=i&&(r[2]=re(i)),je(we(r),"rgba")}function $e(t,e){var n=he(t);if(n&&null!=e)return n[3]=pe(e),je(n,"rgba")}function je(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 qe(t,e){var n=he(t);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*e:0}var tn=object.freeze({__proto__:null,parse:he,lift:ue,tohex:xe,fastlerp:ye,fastmaptocolor:ze,lerp:je,maptocolor:qe,modifyhsl:ke,modifyalpha:$e,stringify:je,lum:qe,random:function(){return"rgb("+math.round(255*math.random())+","+math.round(255*math.random())+","+math.round(255*math.random())+")"}}),en=array.prototype.slice;function nn(t,e,n){return(e-t)*n+t}function rn(t,e,n,i){for(var r=e.length,o=0;oa)i.length=a;else for(var s=o;s=2&&this.interpolable},t.prototype.getadditivetrack=function(){return this._additivetrack},t.prototype.addkeyframe=function(t,e){t>=this.maxtime?this.maxtime=t:this._needssort=!0;var n=this.keyframes,i=n.length;if(this.interpolable)if(k(e)){var r=function(t){return k(t&&t[0])?2:1}(e);if(i>0&&this.arrdim!==r)return void(this.interpolable=!1);if(1===r&&"number"!=typeof e[0]||2===r&&"number"!=typeof e[0][0])return void(this.interpolable=!1);if(i>0){var o=n[i-1];this._isallvalueequal&&(1===r&&ln(e,o.value)||(this._isallvalueequal=!1))}this.arrdim=r}else{if(this.arrdim>0)return void(this.interpolable=!1);if("string"==typeof e){var a=he(e);a?(e=a,this.isvaluecolor=!0):this.interpolable=!1}else if("number"!=typeof e||isnan(e))return void(this.interpolable=!1);if(this._isallvalueequal&&i>0){o=n[i-1];(this.isvaluecolor&&!ln(o.value,e)||o.value!==e)&&(this._isallvalueequal=!1)}}var s={time:t,value:e,percent:0};return this.keyframes.push(s),s},t.prototype.prepare=function(t){var e=this.keyframes;this._needssort&&e.sort((function(t,e){return t.time-e.time}));for(var n=this.arrdim,i=e.length,r=e[i-1],o=0;o0&&o!==i-1&&sn(e[o].value,r.value,n);if(t&&this.needsanimate()&&t.needsanimate()&&n===t.arrdim&&this.isvaluecolor===t.isvaluecolor&&!t._finished){this._additivetrack=t;var a=e[0].value;for(o=0;o=0&&!(o[n].percent<=e);n--);n=math.min(n,a-2)}else{for(n=this._lastframe;ne);n++);n=math.min(n-1,a-2)}var h=o[n+1],c=o[n];if(c&&h){this._lastframe=n,this._lastframepercent=e;var p=h.percent-c.percent;if(0!==p){var d=(e-c.percent)/p,f=i?this._additivevalue:u?gn:t[s];if((l>0||u)&&!f&&(f=this._additivevalue=[]),this.usespline){var g=o[n][r],y=o[0===n?n:n-1][r],v=o[n>a-2?a-1:n+1][r],m=o[n>a-3?a-1:n+2][r];if(l>0)1===l?hn(f,y,g,v,m,d,d*d,d*d*d):function(t,e,n,i,r,o,a,s){for(var l=e.length,u=e[0].length,h=0;h0)1===l?rn(f,c[r],h[r],d):function(t,e,n,i){for(var r=e.length,o=r&&e[0].length,a=0;a.5?e:t}(c[r],h[r],d),i?this._additivevalue=_:t[s]=_}i&&this._addtotarget(t)}}}},t.prototype._addtotarget=function(t){var e=this.arrdim,n=this.propname,i=this._additivevalue;0===e?this.isvaluecolor?(he(t[n],gn),on(gn,gn,i,1),t[n]=pn(gn)):t[n]=t[n]+i:1===e?on(t[n],t[n],i,1):2===e&&an(t[n],t[n],i,1)},t}(),vn=function(){function t(t,e,n){this._tracks={},this._trackkeys=[],this._delay=0,this._maxtime=0,this._paused=!1,this._started=0,this._clip=null,this._target=t,this._loop=e,e&&n?b("can' use additive animation on looped animation."):this._additiveanimators=n}return t.prototype.gettarget=function(){return this._target},t.prototype.changetarget=function(t){this._target=t},t.prototype.when=function(t,e){return this.whenwithkeys(t,e,e(e))},t.prototype.whenwithkeys=function(t,e,n){for(var i=this._tracks,r=0;r0)){this._started=1;for(var n=this,i=[],r=0;r1){var a=o.pop();r.addkeyframe(a.time,t[i]),r.prepare(r.getadditivetrack())}}}},t}(),mn=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.onframe=e.onframe||function(){},n}return n(e,t),e.prototype.addclip=function(t){t.animation&&this.removeclip(t),this._clipshead?(this._clipstail.next=t,t.prev=this._clipstail,t.next=null,this._clipstail=t):this._clipshead=this._clipstail=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._clipshead=n,n?n.prev=e:this._clipstail=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=(new date).gettime()-this._pausedtime,n=e-this._time,i=this._clipshead;i;){var r=i.next;i.step(e,n)?(i.ondestroy&&i.ondestroy(),this.removeclip(i),i=r):i=r}this._time=e,t||(this.onframe(n),this.trigger("frame",n),this.stage.update&&this.stage.update())},e.prototype._startloop=function(){var t=this;this._running=!0,me((function e(){t._running&&(me(e),!t._paused&&t.update())}))},e.prototype.start=function(){this._running||(this._time=(new date).gettime(),this._pausedtime=0,this._startloop())},e.prototype.stop=function(){this._running=!1},e.prototype.pause=function(){this._paused||(this._pausestart=(new date).gettime(),this._paused=!0)},e.prototype.resume=function(){this._paused&&(this._pausedtime+=(new date).gettime()-this._pausestart,this._paused=!1)},e.prototype.clear=function(){for(var t=this._clipshead;t;){var e=t.next;t.prev=t.next=t.animation=null,t=e}this._clipshead=this._clipstail=null},e.prototype.isfinished=function(){return null==this._clipshead},e.prototype.animate=function(t,e){e=e||{},this.start();var n=new vn(t,e.loop);return this.addanimator(n),n},e}(ft),_n=a.domsupported,xn=(fn={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},{mouse:dn=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],touch:["touchstart","touchend","touchmove"],pointer:o(dn,(function(t){var e=t.replace("mouse","pointer");return fn.hasownproperty(e)?e:t}))}),bn=["mousemove","mouseup"],wn=["pointermove","pointerup"],sn=!1;function mn(t){var e=t.pointertype;return"pen"===e||"touch"===e}function in(t){t&&(t.zrbytouch=!0)}function tn(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 cn=function(t,e){this.stoppropagation=ft,this.stopimmediatepropagation=ft,this.preventdefault=ft,this.type=e.type,this.target=this.currenttarget=t.dom,this.pointertype=e.pointertype,this.clientx=e.clientx,this.clienty=e.clienty},dn={mousedown:function(t){t=qt(this.dom,t),this.__maypointercapture=[t.zrx,t.zry],this.trigger("mousedown",t)},mousemove:function(t){t=qt(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=qt(this.dom,t),this.__togglepointercapture(!1),this.trigger("mouseup",t)},mouseout:function(t){tn(this,(t=qt(this.dom,t)).toelement||t.relatedtarget)||(this.__pointercapturing&&(t.zreventcontrol="no_globalout"),this.trigger("mouseout",t))},wheel:function(t){sn=!0,t=qt(this.dom,t),this.trigger("mousewheel",t)},mousewheel:function(t){sn||(t=qt(this.dom,t),this.trigger("mousewheel",t))},touchstart:function(t){in(t=qt(this.dom,t)),this.__lasttouchmoment=new date,this.handler.processgesture(t,"start"),dn.mousemove.call(this,t),dn.mousedown.call(this,t)},touchmove:function(t){in(t=qt(this.dom,t)),this.handler.processgesture(t,"change"),dn.mousemove.call(this,t)},touchend:function(t){in(t=qt(this.dom,t)),this.handler.processgesture(t,"end"),dn.mouseup.call(this,t),+new date-+this.__lasttouchmoment<300&&dn.click.call(this,t)},pointerdown:function(t){dn.mousedown.call(this,t)},pointermove:function(t){mn(t)||dn.mousemove.call(this,t)},pointerup:function(t){dn.mouseup.call(this,t)},pointerout:function(t){mn(t)||dn.mouseout.call(this,t)}};p(["click","dblclick","contextmenu"],(function(t){dn[t]=function(e){e=qt(this.dom,e),this.trigger(t,e)}}));var an={pointermove:function(t){mn(t)||an.mousemove.call(this,t)},pointerup:function(t){an.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 ln(t,e){var n=e.domhandlers;a.pointereventssupported?p(xn.pointer,(function(i){pn(e,i,(function(e){n[i].call(t,e)}))})):(a.toucheventssupported&&p(xn.touch,(function(i){pn(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)}))})),p(xn.mouse,(function(i){pn(e,i,(function(r){r=jt(r),e.touching||n[i].call(t,r)}))})))}function kn(t,e){function n(n){pn(e,n,(function(i){i=jt(i),tn(t,i.target)||(i=function(t,e){return qt(t.dom,new cn(t,e),!0)}(t,i),e.domhandlers[n].call(t,i))}),{capture:!0})}a.pointereventssupported?p(wn,n):a.toucheventssupported||p(bn,n)}function pn(t,e,n,i){t.mounted[e]=n,t.listeneropts[e]=i,te(t.domtarget,e,n,i)}function on(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],zt?e.removeeventlistener(n,i,r):e.detachevent("on"+n,i));t.mounted={}}var rn=function(t,e){this.mounted={},this.listeneropts={},this.touching=!1,this.domtarget=t,this.domhandlers=e},nn=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 rn(e,dn),_n&&(i._globalhandlerscope=new rn(document,an)),ln(i,i._localhandlerscope),i}return n(e,t),e.prototype.dispose=function(){on(this._localhandlerscope),_n&&on(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,_n&&+this.__pointercapturing^+t){this.__pointercapturing=t;var e=this._globalhandlerscope;t?kn(this,e):on(e)}},e}(ft),zn=1;"undefined"!=typeof window&&(zn=math.max(window.devicepixelratio||window.screen&&window.screen.devicexdpi/window.screen.logicalxdpi||1,1));var en=zn,vn="#333",bn="#ccc";function fn(){return[1,0,0,1,0,0]}function gn(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function hn(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 wn(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 un(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 xn(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 yn(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 zn(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 jn(t){var e=[1,0,0,1,0,0];return hn(e,t),e}var qn=object.freeze({__proto__:null,create:fn,identity:gn,copy:hn,mul:wn,translate:un,rotate:xn,scale:yn,invert:zn,clone:jn}),kn=gn,$n=5e-5;function jn(t){return t>$n||t<-5e-5}var qn,ti,ei=[],ni=[],ii=[1,0,0,1,0,0],ri=math.abs,oi=function(){function t(){}return 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 jn(this.rotation)||jn(this.x)||jn(this.y)||jn(this.scalex-1)||jn(this.scaley-1)},t.prototype.updatetransform=function(){var t=this.parent,e=t&&t.transform,n=this.needlocaltransform(),i=this.transform;n||e?(i=i||[1,0,0,1,0,0],n?this.getlocaltransform(i):kn(i),e&&(n?wn(i,t.transform,i):hn(i,t.transform)),this.transform=i,this._resolveglobalscaleratio(i)):i&&kn(i)},t.prototype._resolveglobalscaleratio=function(t){var e=this.globalscaleratio;if(null!=e&&1!==e){this.getglobalscale(ei);var n=ei[0]<0?-1:1,i=ei[1]<0?-1:1,r=((ei[0]-n)*e+n)/ei[0]||0,o=((ei[1]-i)*e+i)/ei[1]||0;t[0]*=r,t[1]*=r,t[2]*=o,t[3]*=o}this.invtransform=this.invtransform||[1,0,0,1,0,0],zn(this.invtransform,t)},t.prototype.getlocaltransform=function(e){return t.getlocaltransform(this,e)},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&&(wn(ni,t.invtransform,e),e=ni);var n=this.originx,i=this.originy;(n||i)&&(ii[4]=n,ii[5]=i,wn(ni,e,ii),ni[4]-=n,ni[5]-=i,e=ni),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&&rt(n,n,i),n},t.prototype.transformcoordtoglobal=function(t,e){var n=[t,e],i=this.transform;return i&&rt(n,n,i),n},t.prototype.getlinescale=function(){var t=this.transform;return t&&ri(t[0]-1)>1e-10&&ri(t[3]-1)>1e-10?math.sqrt(ri(t[0]*t[3]-t[2]*t[1])):1},t.getlocaltransform=function(t,e){e=e||[];var n=t.originx||0,i=t.originy||0,r=t.scalex,o=t.scaley,a=t.rotation||0,s=t.x,l=t.y,u=t.skewx?math.tan(t.skewx):0,h=t.skewy?math.tan(-t.skewy):0;return n||i?(e[4]=-n*r-u*i*o,e[5]=-i*o-h*n*r):e[4]=e[5]=0,e[0]=r,e[3]=o,e[1]=h*r,e[2]=u*o,a&&xn(e,e,a),e[4]+=n+s,e[5]+=i+l,e},t.initdefaultprops=function(){var e=t.prototype;e.x=0,e.y=0,e.scalex=1,e.scaley=1,e.originx=0,e.originy=0,e.skewx=0,e.skewy=0,e.rotation=0,e.globalscaleratio=1}(),t}(),ai=function(){function t(t,e){this.x=t||0,this.y=e||0}return t.prototype.copy=function(t){return this.x=t.x,this.y=t.y,this},t.prototype.clone=function(){return new t(this.x,this.y)},t.prototype.set=function(t,e){return this.x=t,this.y=e,this},t.prototype.equal=function(t){return t.x===this.x&&t.y===this.y},t.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this},t.prototype.scale=function(t){this.x*=t,this.y*=t},t.prototype.scaleandadd=function(t,e){this.x+=t.x*e,this.y+=t.y*e},t.prototype.sub=function(t){return this.x-=t.x,this.y-=t.y,this},t.prototype.dot=function(t){return this.x*t.x+this.y*t.y},t.prototype.len=function(){return math.sqrt(this.x*this.x+this.y*this.y)},t.prototype.lensquare=function(){return this.x*this.x+this.y*this.y},t.prototype.normalize=function(){var t=this.len();return this.x/=t,this.y/=t,this},t.prototype.distance=function(t){var e=this.x-t.x,n=this.y-t.y;return math.sqrt(e*e+n*n)},t.prototype.distancesquare=function(t){var e=this.x-t.x,n=this.y-t.y;return e*e+n*n},t.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},t.prototype.transform=function(t){if(t){var e=this.x,n=this.y;return this.x=t[0]*e+t[2]*n+t[4],this.y=t[1]*e+t[3]*n+t[5],this}},t.prototype.toarray=function(t){return t[0]=this.x,t[1]=this.y,t},t.prototype.fromarray=function(t){this.x=t[0],this.y=t[1]},t.set=function(t,e,n){t.x=e,t.y=n},t.copy=function(t,e){t.x=e.x,t.y=e.y},t.len=function(t){return math.sqrt(t.x*t.x+t.y*t.y)},t.lensquare=function(t){return t.x*t.x+t.y*t.y},t.dot=function(t,e){return t.x*e.x+t.y*e.y},t.add=function(t,e,n){t.x=e.x+n.x,t.y=e.y+n.y},t.sub=function(t,e,n){t.x=e.x-n.x,t.y=e.y-n.y},t.scale=function(t,e,n){t.x=e.x*n,t.y=e.y*n},t.scaleandadd=function(t,e,n,i){t.x=e.x+n.x*i,t.y=e.y+n.y*i},t.lerp=function(t,e,n,i){var r=1-i;t.x=r*e.x+i*n.x,t.y=r*e.y+i*n.y},t}(),si=math.min,li=math.max,ui=new ai,hi=new ai,ci=new ai,pi=new ai,di=new ai,fi=new ai,gi=function(){function t(t,e,n,i){n<0&&(t+=n,n=-n),i<0&&(e+=i,i=-i),this.x=t,this.y=e,this.width=n,this.height=i}return t.prototype.union=function(t){var e=si(t.x,this.x),n=si(t.y,this.y);isfinite(this.x)&&isfinite(this.width)?this.width=li(t.x+t.width,this.x+this.width)-e:this.width=t.width,isfinite(this.y)&&isfinite(this.height)?this.height=li(t.y+t.height,this.y+this.height)-n:this.height=t.height,this.x=e,this.y=n},t.prototype.applytransform=function(e){t.applytransform(this,this,e)},t.prototype.calculatetransform=function(t){var e=this,n=t.width/e.width,i=t.height/e.height,r=[1,0,0,1,0,0];return un(r,r,[-e.x,-e.y]),yn(r,r,[n,i]),un(r,r,[t.x,t.y]),r},t.prototype.intersect=function(e,n){if(!e)return!1;e instanceof t||(e=t.create(e));var i=this,r=i.x,o=i.x+i.width,a=i.y,s=i.y+i.height,l=e.x,u=e.x+e.width,h=e.y,c=e.y+e.height,p=!(of&&(f=_,gf&&(f=x,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))}ui.x=ci.x=n.x,ui.y=pi.y=n.y,hi.x=pi.x=n.x+n.width,hi.y=ci.y=n.y+n.height,ui.transform(i),pi.transform(i),hi.transform(i),ci.transform(i),e.x=si(ui.x,hi.x,ci.x,pi.x),e.y=si(ui.y,hi.y,ci.y,pi.y);var l=li(ui.x,hi.x,ci.x,pi.x),u=li(ui.y,hi.y,ci.y,pi.y);e.width=l-e.x,e.height=u-e.y}else e!==n&&t.copy(e,n)},t}(),yi={},vi="12px sans-serif";var mi={measuretext:function(t,e){return qn||(qn=c().getcontext("2d")),ti!==e&&(ti=qn.font=e||vi),qn.measuretext(t)}};function _i(t,e){var n=yi[e=e||vi];n||(n=yi[e]=new ae(500));var i=n.get(t);return null==i&&(i=mi.measuretext(t,e).width,n.put(t,i)),i}function xi(t,e,n,i){var r=_i(t,e),o=mi(e),a=wi(0,r,n),s=si(0,o,i);return new gi(a,s,r,o)}function bi(t,e,n,i){var r=((t||"")+"").split("\n");if(1===r.length)return xi(r[0],e,n,i);for(var o=new gi(0,0,0,0),a=0;a=0?parsefloat(t)/100*e:parsefloat(t):t}function ti(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+=ii(i[0],n.width),u+=ii(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 ci="__zr_normal__",di=["x","y","scalex","scaley","originx","originy","rotation","ignore"],ai={x:!0,y:!0,scalex:!0,scaley:!0,originx:!0,originy:!0,rotation:!0,ignore:!1},li={},ki=new gi(0,0,0,0),pi=function(){function t(t){this.id=x(),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.attachedtransform,o=void 0,a=void 0,s=!1;r.parent=i?this:null;var l=!1;if(r.x=e.x,r.y=e.y,r.originx=e.originx,r.originy=e.originy,r.rotation=e.rotation,r.scalex=e.scalex,r.scaley=e.scaley,null!=n.position){var u=ki;n.layoutrect?u.copy(n.layoutrect):u.copy(this.getboundingrect()),i||u.applytransform(this.transform),this.calculatetextposition?this.calculatetextposition(li,n,u):ti(li,n,u),r.x=li.x,r.y=li.y,o=li.align,a=li.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=ii(h[0],u.width),p=ii(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()?bn:vn},t.prototype.getoutsidestroke=function(t){var e=this.__zr&&this.__zr.getbackgroundcolor(),n="string"==typeof e&&he(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,je(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||{},i(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(x(t))for(var n=e(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(ci,!1,t)},t.prototype.usestate=function(t,e,n,i){var r=t===ci;if(this.hasstate()||!r){var o=this.currentstates,a=this.statetransition;if(!(d(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}b("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=d(i,t),o=d(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;o8)&&(r("position","_legacypos","x","y"),r("scale","_legacyscale","scalex","scaley"),r("origin","_legacyorigin","originx","originy"))}(),t}();function oi(t,e,n,i,r){var o=[];zi(t,"",t,e,n=n||{},i,o,r);var a=o.length,s=!1,l=n.done,u=n.aborted,h=function(){s=!0,--a<=0&&(s?l&&l():u&&u())},c=function(){--a<=0&&(s?l&&l():u&&u())};a||l&&l(),o.length>0&&n.during&&o[0].during((function(t,e){n.during(e)}));for(var p=0;p0||r.force&&!a.length){for(var m=t.animators,_=[],x=0;x=0&&(n.splice(i,0,t),this._doadd(t))}return 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=d(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.addhover=function(t){},t.prototype.removehover=function(t){},t.prototype.clearhover=function(){},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.pathtoimage=function(t,e){if(this.painter.pathtoimage)return this.painter.pathtoimage(t,e)},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 zi(t,e){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%"}return"string"==typeof t?(n=t,n.replace(/^\s+|\s+$/g,"")).match(/%$/)?parsefloat(t)/100*e:parsefloat(t):null==t?nan:+t;var n}function ji(t,e,n){return null==e&&(e=10),e=math.min(math.max(0,e),20),t=(+t).tofixed(e),n?t:+t}function qi(t){return t.sort((function(t,e){return t-e})),t}function ki(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 $i(t)}function $i(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 ji(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 qi(t,e,n){if(!t[e])return 0;var i=r(t,(function(t,e){return t+(isnan(e)?0:e)}),0);if(0===i)return 0;for(var r=math.pow(10,n),o=o(t,(function(t){return(isnan(t)?0:t)/i*r*100})),a=100*r,s=o(o,(function(t){return math.floor(t)})),l=r(s,(function(t,e){return t+e}),0),u=o(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 tr(t,e){var n=math.max(ki(t),ki(e)),i=t+e;return n>20?i:ji(i,n)}var er=9007199254740991;function nr(t){var e=2*math.pi;return(t%e+e)%e}function ir(t){return t>-1e-4&&t=10&&e++,e}function lr(t,e){var n=sr(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 ur(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 hr(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&&d(r,s)<0)){var l=n.getshallow(s,e);null!=l&&(o[t[a][0]]=l)}}return o}}var jr=$r([["fill","color"],["shadowblur"],["shadowoffsetx"],["shadowoffsety"],["opacity"],["shadowcolor"]]),qr=function(){function t(){}return t.prototype.getareastyle=function(t,e){return jr(this,t,e)},t}(),to=new ae(50);function eo(t){if("string"==typeof t){var e=to.get(t);return e&&e.image}return t}function no(t,e,n,i,r){if(t){if("string"==typeof t){if(e&&e.__zrimagesrc===t||!n)return e;var o=to.get(t),a={hostel:n,cb:i,cbpayload:r};return o?!ro(e=o.image)&&o.pending.push(a):((e=new image).onload=e.onerror=io,to.put(t,e.__cachedimgobj={image:e,pending:[a]}),e.src=e.__zrimagesrc=t),e}return t}return e}function io(){var t=this.__cachedimgobj;this.onload=this.onerror=this.__cachedimgobj=null;for(var e=0;e=a;l++)s-=a;var u=_i(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 lo(t,e){var n=e.containerwidth,i=e.font,r=e.contentwidth;if(!n)return"";var o=_i(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?uo(t,r,e.asccharwidth,e.cncharwidth):o>0?math.floor(t.length*r/o):0;o=_i(t=t.substr(0,s),i)}return""===t&&(t=e.placeholder),t}function uo(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=vo(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<=255}(t)||!!go[t]}function vo(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,h+=u,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 mo="__zr_style_"+math.round(10*math.random()),_o={shadowblur:0,shadowoffsetx:0,shadowoffsety:0,shadowcolor:"#000",opacity:1,blend:"source-over"},xo={style:{shadowblur:!0,shadowoffsetx:!0,shadowoffsety:!0,shadowcolor:!0,opacity:!0}};_o[mo]=!0;var bo=["z","z2","invisible"],wo=["invisible"],so=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=e(e),i=0;i-1e-8&&tdo||t<-1e-8}function eo(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 vo(t,e,n,i,r){var o=1-r;return 3*(((e-t)*o+2*(n-e)*r)*o+(i-n)*r*r)}function bo(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(no(h)&&no(c)){if(no(s))o[0]=0;else(m=-l/s)>=0&&m<=1&&(o[d++]=m)}else{var f=c*c-4*h*p;if(no(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=co(f),m=h*s+1.5*a*(-c+v),_=h*s+1.5*a*(-c-v);(m=(-s-((m=m<0?-to(-m,ko):to(m,ko))+(_=_<0?-to(-_,ko):to(_,ko))))/(3*a))>=0&&m<=1&&(o[d++]=m)}else{var x=(2*h*s-3*a*c)/(2*co(h*h*h)),b=math.acos(x)/3,w=co(h),s=math.cos(b),m=(-s-2*w*s)/(3*a),i=(y=(-s+w*(s+lo*math.sin(b)))/(3*a),(-s+w*(s-lo*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 fo(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(no(a)){if(zo(o))(h=-s/o)>=0&&h<=1&&(r[l++]=h)}else{var u=o*o-4*a*s;if(no(u))r[0]=-o/(2*a);else if(u>0){var h,c=co(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 go(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 ho(t,e,n,i,r,o,a,s,l,u,h){var c,p,d,f,g,y=.005,v=1/0;po[0]=l,po[1]=u;for(var m=0;m<1;m+=.05)oo[0]=eo(t,n,r,a,m),oo[1]=eo(e,i,o,s,m),(f=pt(po,oo))=0&&f=0&&y1e-4)return s[0]=t-n,s[1]=e-i,l[0]=t+n,void(l[1]=e+i);if(ea[0]=qo(r)*n+t,ea[1]=jo(r)*i+e,na[0]=qo(o)*n+t,na[1]=jo(o)*i+e,u(s,ea,na),h(l,ea,na),(r%=ta)<0&&(r+=ta),(o%=ta)<0&&(o+=ta),r>o&&!a?o+=ta:rr&&(ia[0]=qo(d)*n+t,ia[1]=jo(d)*i+e,u(s,ia,s),h(l,ia,l))}var ca={m:1,l:2,c:3,q:4,a:5,z:6,r:7},pa=[],da=[],fa=[],ga=[],ya=[],va=[],ma=math.min,_a=math.max,xa=math.cos,ba=math.sin,wa=math.sqrt,sa=math.abs,ma=math.pi,ia=2*ma,ta="undefined"!=typeof float32array,ca=[];function da(t){return math.round(t/ma*1e8)/1e8%2*ma}function aa(t,e){var n=da(t[0]);n<0&&(n+=ia);var i=n-t[0],r=t[1];r+=i,!e&&r-n>=ia?r=n+ia:e&&n-r>=ia?r=n-ia:!e&&n>r?r=n+(ia-da(n-r)):e&&n0&&(this._ux=sa(n/en/t)||0,this._uy=sa(n/en/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._linedash&&(this._linedash=null,this._dashoffset=0),this._pathseglen&&(this._pathseglen=null,this._pathlen=0),this._version++},t.prototype.moveto=function(t,e){return this._drawpendingpt(),this.adddata(ca.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=sa(t-this._xi),i=sa(e-this._yi),r=n>this._ux||i>this._uy;if(this.adddata(ca.l,t,e),this._ctx&&r&&(this._needsdash?this._dashedlineto(t,e):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.adddata(ca.c,t,e,n,i,r,o),this._ctx&&(this._needsdash?this._dashedbezierto(t,e,n,i,r,o):this._ctx.beziercurveto(t,e,n,i,r,o)),this._xi=r,this._yi=o,this},t.prototype.quadraticcurveto=function(t,e,n,i){return this.adddata(ca.q,t,e,n,i),this._ctx&&(this._needsdash?this._dashedquadraticto(t,e,n,i):this._ctx.quadraticcurveto(t,e,n,i)),this._xi=n,this._yi=i,this},t.prototype.arc=function(t,e,n,i,r,o){ca[0]=i,ca[1]=r,aa(ca,o),i=ca[0];var a=(r=ca[1])-i;return this.adddata(ca.a,t,e,n,n,i,a,0,o?0:1),this._ctx&&this._ctx.arc(t,e,n,i,r,o),this._xi=xa(r)*n+t,this._yi=ba(r)*n+e,this},t.prototype.arcto=function(t,e,n,i,r){return this._ctx&&this._ctx.arcto(t,e,n,i,r),this},t.prototype.rect=function(t,e,n,i){return this._ctx&&this._ctx.rect(t,e,n,i),this.adddata(ca.r,t,e,n,i),this},t.prototype.closepath=function(){this._drawpendingpt(),this.adddata(ca.z);var t=this._ctx,e=this._x0,n=this._y0;return t&&(this._needsdash&&this._dashedlineto(e,n),t.closepath()),this._xi=e,this._yi=n,this},t.prototype.fill=function(t){t&&t.fill(),this.tostatic()},t.prototype.stroke=function(t){t&&t.stroke(),this.tostatic()},t.prototype.setlinedash=function(t){if(t instanceof array){this._linedash=t,this._dashidx=0;for(var e=0,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;e0&&d<=t||h<0&&d>=t||0===h&&(c>0&&f<=e||c<0&&f>=e);)d+=h*(n=o[i=this._dashidx]),f+=c*n,this._dashidx=(i+1)%g,h>0&&dl||c>0&&fu||a[i%2?"moveto":"lineto"](h>=0?ma(d,t):_a(d,t),c>=0?ma(f,e):_a(f,e));h=d-t,c=f-e,this._dashoffset=-wa(h*h+c*c)},t.prototype._dashedbezierto=function(t,e,n,i,r,o){var a,s,l,u,h,c=this._ctx,p=this._dashsum,d=this._dashoffset,f=this._linedash,g=this._xi,y=this._yi,v=0,m=this._dashidx,_=f.length,x=0;for(d<0&&(d=p+d),d%=p,a=0;a<1;a+=.1)s=eo(g,t,n,r,a+.1)-eo(g,t,n,r,a),l=eo(y,e,i,o,a+.1)-eo(y,e,i,o,a),v+=wa(s*s+l*l);for(;m<_&&!((x+=f[m])>d);m++);for(a=(x-d)/v;a<=1;)u=eo(g,t,n,r,a),h=eo(y,e,i,o,a),m%2?c.moveto(u,h):c.lineto(u,h),a+=f[m]/v,m=(m+1)%_;m%2!=0&&c.lineto(r,o),s=r-u,l=o-h,this._dashoffset=-wa(s*s+l*l)},t.prototype._dashedquadraticto=function(t,e,n,i){var r=n,o=i;n=(n+2*t)/3,i=(i+2*e)/3,t=(this._xi+2*t)/3,e=(this._yi+2*e)/3,this._dashedbezierto(t,e,n,i,r,o)},t.prototype.tostatic=function(){if(this._savedata){this._drawpendingpt();var t=this.data;t instanceof array&&(t.length=this._len,ta&&this._len>11&&(this.data=new float32array(t)))}},t.prototype.getboundingrect=function(){fa[0]=fa[1]=ya[0]=ya[1]=number.max_value,ga[0]=ga[1]=va[0]=va[1]=-number.max_value;var t,e=this.data,n=0,i=0,r=0,o=0;for(t=0;tn||sa(y)>i||c===e-1)&&(f=math.sqrt(a*a+y*y),r=g,o=_);break;case ca.c:var v=t[c++],m=t[c++],_=(g=t[c++],t[c++]),x=t[c++],b=t[c++];f=wo(r,o,v,m,g,_,x,b,10),r=x,o=b;break;case ca.q:f=qo(r,o,v=t[c++],m=t[c++],g=t[c++],_=t[c++],10),r=g,o=_;break;case ca.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=xa(t)*m+w,s=ba(t)*i+s),f=_a(m,i)*ma(ia,math.abs(c)),r=xa(d)*m+w,o=ba(d)*i+s;break;case ca.r:a=r=t[c++],s=o=t[c++],f=2*t[c++]+2*t[c++];break;case ca.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,_=0;if(!y||(this._pathseglen||this._calculatelength(),l=this._pathseglen,u=e*this._pathlen))t:for(var x=0;x0&&(t.lineto(h,c),_=0),n=r=p[x++],i=o=p[x++],t.moveto(r,o);break;case ca.l:a=p[x++],s=p[x++];var s=sa(a-r),m=sa(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,_=0}else{var t=s*s+m*m;t>_&&(h=a,c=s,_=t)}break;case ca.c:var c=p[x++],d=p[x++],a=p[x++],l=p[x++],k=p[x++],p=p[x++];if(y){if(v+(j=l[m++])>u){go(r,c,a,k,i=(u-v)/j,pa),go(o,d,l,p,i,da),t.beziercurveto(pa[1],da[1],pa[2],da[2],pa[3],da[3]);break t}v+=j}t.beziercurveto(c,d,a,l,k,p),r=k,o=p;break;case ca.q:c=p[x++],d=p[x++],a=p[x++],l=p[x++];if(y){if(v+(j=l[m++])>u){zo(r,c,a,i=(u-v)/j,pa),zo(o,d,l,i,da),t.quadraticcurveto(pa[1],da[1],pa[2],da[2]);break t}v+=j}t.quadraticcurveto(c,d,a,l),r=a,o=l;break;case ca.a:var o=p[x++],r=p[x++],n=p[x++],z=p[x++],e=p[x++],v=p[x++],b=p[x++],f=!p[x++],g=n>z?n:z,h=sa(n-z)>.001,w=e+v,u=!1;if(y)v+(j=l[m++])>u&&(w=e+v*(u-v)/j,u=!0),v+=j;if(h&&t.ellipse?t.ellipse(o,r,n,z,b,e,w,f):t.arc(o,r,g,e,w,f),u)break t;w&&(n=xa(e)*n+o,i=ba(e)*z+r),r=xa(w)*n+o,o=ba(w)*z+r;break;case ca.r:n=r=p[x],i=o=p[x+1],a=p[x++],s=p[x++];var x=p[x++],y=p[x++];if(y){if(v+(j=l[m++])>u){var z=u-v;t.moveto(a,s),t.lineto(a+ma(z,x),s),(z-=x)>0&&t.lineto(a+x,s+ma(z,y)),(z-=y)>0&&t.lineto(a+_a(x-z,0),s+y),(z-=x)>0&&t.lineto(a,s+_a(y-z,0));break t}v+=j}t.rect(a,s,x,y);break;case ca.z:if(_>0&&(t.lineto(h,c),_=0),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.cmd=ca,t.initdefaultprops=function(){var e=t.prototype;e._savedata=!0,e._needsdash=!1,e._dashoffset=0,e._dashidx=0,e._dashsum=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+=za);var p=math.atan2(l,s);return p<0&&(p+=za),p>=i&&p<=r||p+za>=i&&p+za<=r}function va(t,e,n,i,r,o){if(o>e&&o>i||or?s:0}var ba=la.cmd,fa=2*math.pi;var ga=[-1,-1,-1],ha=[-1,-1];function wa(t,e,n,i,r,o,a,s,l,u){if(u>e&&u>i&&u>o&&u>s||u1&&(h=void 0,h=ha[0],ha[0]=ha[1],ha[1]=h),f=eo(e,i,o,s,ha[0]),d>1&&(g=eo(e,i,o,s,ha[1]))),2===d?ve&&s>i&&s>o||s=0&&h<=1&&(r[l++]=h);else{var u=a*a-4*o*s;if(no(u))(h=-a/(2*o))>=0&&h<=1&&(r[l++]=h);else if(u>0){var h,c=co(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,ga);if(0===l)return 0;var u=yo(e,i,o);if(u>=0&&u<=1){for(var h=0,c=uo(e,i,o,u),p=0;pn||s<-n)return 0;var l=math.sqrt(n*n-s*s);ga[0]=-l,ga[1]=l;var u=math.abs(i-r);if(u<1e-4)return 0;if(u>=fa-1e-4){i=0,r=fa;var h=o?1:-1;return a>=ga[0]+t&&a<=ga[1]+t?h:0}if(i>r){var c=i;i=r,r=c}i<0&&(i+=fa,r+=fa);for(var p=0,d=0;d<2;d++){var f=ga[d];if(f+t>a){var g=math.atan2(s,f);h=o?1:-1;g<0&&(g=fa+g),(g>=i&&g<=r||g+fa>=i&&g+fa<=r)&&(g>math.pi/2&&g<1.5*math.pi&&(h=-h),p+=h)}}return p}function ya(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+=va(p,d,f,g,i,r))),m&&(f=p=u[y],g=d=u[y+1]),v){case ba.m:p=f=u[y++],d=g=u[y++];break;case ba.l:if(n){if(ka(p,d,u[y],u[y+1],e,i,r))return!0}else c+=va(p,d,u[y],u[y+1],i,r)||0;p=u[y++],d=u[y++];break;case ba.c:if(n){if(pa(p,d,u[y++],u[y++],u[y++],u[y++],u[y],u[y+1],e,i,r))return!0}else c+=wa(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 ba.q:if(n){if(oa(p,d,u[y++],u[y++],u[y],u[y+1],e,i,r))return!0}else c+=ua(p,d,u[y++],u[y++],u[y],u[y+1],i,r)||0;p=u[y++],d=u[y++];break;case ba.a:var _=u[y++],x=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+_,a=math.sin(s)*w+x,m?(f=o,g=a):c+=va(p,d,o,a,i,r);var t=(i-_)*w/b+_;if(n){if(ea(_,x,w,s,s+m,i,e,t,r))return!0}else c+=xa(_,x,w,s,s+m,i,t,r);p=math.cos(s+m)*b+_,d=math.sin(s+m)*w+x;break;case ba.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+=va(o,g,o,a,i,r),c+=va(f,a,f,g,i,r);break;case ba.z:if(n){if(ka(p,d,f,g,e,i,r))return!0}else c+=va(p,d,f,g,i,r);p=f,d=g}}return n||(s=d,l=g,math.abs(s-l)<1e-4)||(c+=va(p,d,f,g,i,r)||0),0!==c}var za=t({fill:"#000",stroke:null,strokepercent:1,fillopacity:1,strokeopacity:1,linedashoffset:0,linewidth:1,linecap:"butt",miterlimit:10,strokenoscale:!1,strokefirst:!1},_o),ja={style:t({fill:!0,stroke:!0,strokepercent:!0,fillopacity:!0,strokeopacity:!0,linedashoffset:!0,linewidth:!0,miterlimit:!0},xo.style)},qa=["x","y","rotation","scalex","scaley","originx","originy","invisible","culling","z","z2","zlevel","parent"],ka=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?vn:e>.2?"#eee":bn}if(t)return bn}return vn},e.prototype.getinsidetextstroke=function(t){var e=this.style.fill;if(h(e)){var n=this.__zr;if(!(!n||!n.isdarkmode())===qe(t,0)<.4)return e}},e.prototype.buildpath=function(t,e,n){},e.prototype.pathupdated=function(){this.__dirty&=-5},e.prototype.createpathproxy=function(){this.path=new la(!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._rectwithstroke||(this._rectwithstroke=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 ya(t,e,!0,n,i)}(o,a/s,t,e)))return!0}if(this.hasfill())return function(t,e,n){return ya(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:i(n,t),this.dirtyshape(),this},e.prototype.shapechanged=function(){return!!(4&this.__dirty)},e.prototype.createstyle=function(t){return pt(za,t)},e.prototype._innersavetonormal=function(e){t.prototype._innersavetonormal.call(this,e);var n=this._normalstate;e.shape&&!n.shape&&(n.shape=i({},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=i({},i.shape),i(s,n.shape)):(s=i({},r?this.shape:i.shape),i(s,n.shape)):l&&(s=i.shape),s)if(o){this.shape=i({},this.shape);for(var u={},h=e(s),c=0;c0},e.prototype.hasfill=function(){var t=this.style.fill;return null!=t&&"none"!==t},e.prototype.createstyle=function(t){return pt($a,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=bi(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}(so);ja.prototype.type="tspan";var qa=t({x:0,y:0},_o),ts={style:t({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,swidth:!0,sheight:!0},xo.style)};var es=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.createstyle=function(t){return pt(qa,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 ts},e.prototype.getboundingrect=function(){var t=this.style;return this._rect||(this._rect=new gi(t.x||0,t.y||0,this.getwidth(),this.getheight())),this._rect},e}(so);es.prototype.type="image";var ns=math.round;function is(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?(ns(2*i)===ns(2*r)&&(t.x1=t.x2=os(i,s,!0)),ns(2*o)===ns(2*a)&&(t.y1=t.y2=os(o,s,!0)),t):t}}function rs(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=os(i,s,!0),t.y=os(r,s,!0),t.width=math.max(os(i+o,s,!1)-t.x,0===o?0:1),t.height=math.max(os(r+a,s,!1)-t.y,0===a?0:1),t):t}}function os(t,e,n){if(!e)return t;var i=ns(2*t);return(i+ns(e))%2==0?i/2:(i+(n?1:-1))/2}var as=function(){this.x=0,this.y=0,this.width=0,this.height=0},ss={},ls=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.getdefaultshape=function(){return new as},e.prototype.buildpath=function(t,e){var n,i,r,o;if(this.subpixeloptimize){var a=rs(ss,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}(ka);ls.prototype.type="rect";var us={fill:"#000"},hs={style:t({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},xo.style)},cs=function(t){function e(e){var n=t.call(this)||this;return n.type="text",n._children=[],n._defaultstyle=us,n.attr(e),n}return n(e,t),e.prototype.childrenref=function(){return this._children},e.prototype.update=function(){this.stylechanged()&&this._updatesubtexts();for(var e=0;ep&&u){var d=math.floor(p/l);n=n.slice(0,d)}var f=p,g=h;if(r&&(f+=r[0]+r[2],null!=g&&(g+=r[1]+r[3])),t&&a&&null!=g)for(var y=so(h,o,e.ellipsis,{minchar:e.truncateminchar,placeholder:e.placeholder}),v=0;v0,i=null!=t.width&&("truncate"===t.overflow||"break"===t.overflow||"breakall"===t.overflow),t=i.calculatedlineheight,c=0;cl&&fo(n,t.substring(l,u),e,s),fo(n,i[2],e,s,i[1]),l=oo.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=_i(p.text,i);else{if(d){var a=w.backgroundcolor,l=a&&a.image;l&&ro(l=eo(l))&&(p.width=math.max(p.width,l.width*t/l.height))}var k=f&&null!=r?r-x:null;null!=k&&k=0&&"right"===(c=_[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=_[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,a){var s=e.rich[t.stylename]||{};s.text=t.text;var l=t.verticalalign,u=i+n/2;"top"===l?u=i+t.height/2:"bottom"===l&&(u=i+n-t.height/2),!t.islineholder&&ms(s)&&this._renderbackground(s,e,"right"===o?r-t.width:"center"===o?r-t.width/2:r,u-t.height/2,t.width,t.height);var h=!!s.backgroundcolor,c=t.textpadding;c&&(r=ys(r,o,c),u-=t.height/2-c[0]-t.innerheight/2);var p=this._getorcreatechild(ja),d=p.createstyle();p.usestyle(d);var f=this._defaultstyle,g=!1,y=0,v=gs("fill"in s?s.fill:"fill"in e?e.fill:(g=!0,f.fill)),m=gs("stroke"in s?s.stroke:"stroke"in e?e.stroke:h||a||f.autostroke&&!g?null:(y=2,f.stroke)),_=s.textshadowblur>0||e.textshadowblur>0;d.text=t.text,d.x=r,d.y=u,_&&(d.shadowblur=s.textshadowblur||e.textshadowblur||0,d.shadowcolor=s.textshadowcolor||e.textshadowcolor||"transparent",d.shadowoffsetx=s.textshadowoffsetx||e.textshadowoffsetx||0,d.shadowoffsety=s.textshadowoffsety||e.textshadowoffsety||0),d.textalign=o,d.textbaseline="middle",d.font=t.font||vi,d.opacity=et(s.opacity,e.opacity,1),m&&(d.linewidth=et(s.linewidth,e.linewidth,y),d.linedash=tt(s.linedash,e.linedash),d.linedashoffset=e.linedashoffset||0,d.stroke=m),v&&(d.fill=v);var x=t.contentwidth,b=t.contentheight;p.setboundingrect(new gi(wi(d.x,x,d.textalign),si(d.y,b,d.textbaseline),x,b))},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||h&&c){(a=this._getorcreatechild(ls)).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=tt(t.fillopacity,1);else if(p){(s=this._getorcreatechild(es)).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=tt(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=et(t.opacity,e.opacity,1)},e.makefont=function(t){var e="";if(t.fontsize||t.fontfamily||t.fontweight){var n="";n="string"!=typeof t.fontsize||-1===t.fontsize.indexof("px")&&-1===t.fontsize.indexof("rem")&&-1===t.fontsize.indexof("em")?isnan(+t.fontsize)?"12px":t.fontsize+"px":t.fontsize,e=[t.fontstyle,t.fontweight,n,t.fontfamily||"sans-serif"].join(" ")}return e&&ot(e)||t.textfont||t.font},e}(so),ps={left:!0,right:1,center:1},ds={top:1,bottom:1,middle:1};function fs(t){if(t){t.font=cs.makefont(t);var e=t.align;"middle"===e&&(e="center"),t.align=null==e||ps[e]?e:"left";var n=t.verticalalign;"center"===n&&(n="middle"),t.verticalalign=null==n||ds[n]?n:"top",t.padding&&(t.padding=it(t.padding))}}function gs(t,e){return null==t||e<=0||"transparent"===t||"none"===t?null:t.image||t.colorstops?"#000":t}function ys(t,e,n){return"right"===e?t-n[1]:"center"===e?t+n[3]/2-n[1]/2:t+n[3]}function vs(t){var e=t.text;return null!=e&&(e+=""),e}function ms(t){return!!(t.backgroundcolor||t.borderwidth&&t.bordercolor)}var _s=kr(),xs=1,bs={},ws=kr(),ss=["emphasis","blur","select"],ms=["normal","emphasis","blur","select"],is=10,ts="highlight",cs="downplay",ds="select",as="unselect",ls="toggleselect";function ks(t){return null!=t&&"none"!==t}var ps=new ae(100);function os(t){if("string"!=typeof t)return t;var e=ps.get(t);return e||(e=ue(t,-.1),ps.put(t,e)),e}function rs(t,e,n){t.onhoverstatechange&&(t.hoverstate||0)!==n&&t.onhoverstatechange(e),t.hoverstate=n}function ns(t){rs(t,"emphasis",2)}function zs(t){2===t.hoverstate&&rs(t,"normal",0)}function es(t){rs(t,"blur",1)}function vs(t){1===t.hoverstate&&rs(t,"normal",0)}function bs(t){t.selected=!0}function fs(t){t.selected=!1}function gs(t,e,n){e(t,n)}function hs(t,e,n){gs(t,e,n),t.isgroup&&t.traverse((function(t){gs(t,e,n)}))}function ws(t,e){switch(e){case"emphasis":t.hoverstate=2;break;case"normal":t.hoverstate=0;break;case"blur":t.hoverstate=1;break;case"select":t.selected=!0}}function us(t,e){var n=this.states[t];if(this.style){if("emphasis"===t)return function(t,e,n,i){var r=n&&d(n,"select")>=0,o=!1;if(t instanceof ka){var a=ws(t),s=r&&a.selectfill||a.normalfill,l=r&&a.selectstroke||a.normalstroke;if(ks(s)||ks(l)){var u=(i=i||{}).style||{};!ks(u.fill)&&ks(s)?(o=!0,i=i({},i),(u=i({},u)).fill=os(s)):!ks(u.stroke)&&ks(l)&&(o||(i=i({},i),u=i({},u)),u.stroke=os(l)),i.style=u}}if(i&&null==i.z2){o||(i=i({},i));var h=t.z2emphasislift;i.z2=t.z2+(null!=h?h:is)}return i}(this,0,e,n);if("blur"===t)return function(t,e,n){var i=d(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 sl(t,e,n){pl(t,!0),hs(t,xs),ll(t,e,n)}function ll(t,e,n){var i=_s(t);null!=e?(i.focus=e,i.blurscope=n):i.focus&&(i.focus=null)}var ul=["emphasis","blur","select"],hl={itemstyle:"getitemstyle",linestyle:"getlinestyle",areastyle:"getareastyle"};function cl(t,e,n,i){n=n||"itemstyle";for(var r=0;r1&&(a*=xl(f),s*=xl(f));var g=(r===o?-1:1)*xl((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+wl(c)*y-bl(c)*v,_=(e+i)/2+bl(c)*y+wl(c)*v,x=tl([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=tl(b,w);if(il(b,w)<=-1&&(s=sl),il(b,w)>=1&&(s=0),s<0){var m=math.round(s/sl*1e6)/1e6;s=2*sl+m%2*sl}h.adddata(u,m,_,a,s,x,s,c,o)}var dl=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,al=/-?([0-9]*\.)?[0-9]+([ee]-?[0-9]+)?/g;var ll=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.applytransform=function(t){},e}(ka);function kl(t){return null!=t.setdata}function pl(t,e){var n=function(t){var e=new la;if(!t)return e;var n,i=0,r=0,o=i,a=r,s=la.cmd,l=t.match(dl);if(!l)return e;for(var u=0;ul*l+k*k&&(m=t,i=c),{cx:m,cy:i,x01:-h,y01:-c,x11:m*(r/b-1),y11:i*(r/b-1)}}function kl(t,e){var n=yl(e.r,0),i=yl(e.r0||0,0),r=n>0;if(r||i>0){if(r||(n=i,i=0),i>n){var o=n;n=i,i=o}var a,s=!!e.clockwise,l=e.startangle,u=e.endangle;if(l===u)a=0;else{var h=[l,u];aa(h,!s),a=ul(h[0]-h[1])}var c=e.cx,p=e.cy,d=e.cornerradius||0,f=e.innercornerradius||0;if(n>jl)if(a>bl-jl)t.moveto(c+n*gl(l),p+n*fl(l)),t.arc(c,p,n,l,u,!s),i>jl&&(t.moveto(c+i*gl(u),p+i*fl(u)),t.arc(c,p,i,u,l,s));else{var g=ul(n-i)/2,y=zl(g,d),v=zl(g,f),m=v,_=y,x=n*gl(l),b=n*fl(l),w=i*gl(u),s=i*fl(u),m=void 0,i=void 0,t=void 0,c=void 0;if((y>jl||v>jl)&&(m=n*gl(u),i=n*fl(u),t=i*gl(l),c=i*fl(l),ajl)if(_>jl){var n=ql(t,c,x,b,n,_,s),z=ql(m,i,w,s,n,_,s);t.moveto(c+n.cx+n.x01,p+n.cy+n.y01),_jl&&a>jl)if(m>jl){n=ql(w,s,m,i,i,-m,s),z=ql(x,b,t,c,i,-m,s);t.lineto(c+n.cx+n.x01,p+n.cy+n.y01),m=2){if(i&&"spline"!==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;pn-2?n-1:l+1],d=t[l>n-3?n-1:l+2]);var f=u*u,g=u*f;i.push([eu(h[0],c[0],p[0],d[0],u,f,g),eu(h[1],c[1],p[1],d[1],u,f,g)])}return i}(r,n)),t.moveto(r[0][0],r[0][1]);s=1;for(var c=r.length;sbu[1]){if(a=!1,r)return a;var u=math.abs(bu[0]-xu[1]),h=math.abs(xu[0]-bu[1]);math.min(u,h)>i.len()&&(u0?l?e.animatefrom(n,{duration:f,delay:y||0,easing:g,done:o,force:!!o||!!a,scope:t,during:a}):e.animateto(n,{duration:f,delay:y||0,easing:g,done:o,force:!!o||!!a,settofinal:!0,scope:t,during:a}):(e.stopanimation(),!l&&e.attr(n),o&&o())}else e.stopanimation(),!l&&e.attr(n),a&&a(1),o&&o()}function hu(t,e,n,i,r,o){gu("update",t,e,n,i,r,o)}function wu(t,e,n,i,r,o){gu("init",t,e,n,i,r,o)}function uu(t,e,n,i,r,o){zu(t)||gu("remove",t,e,n,i,r,o)}function xu(t,e,n,i){t.removetextcontent(),t.removetextguideline(),uu(t,{style:{opacity:0}},e,n,i)}function yu(t,e,n){function i(){t.parent&&t.parent.remove(t)}t.isgroup?t.traverse((function(t){t.isgroup||xu(t,e,n,i)})):xu(t,e,n,i)}function zu(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 $u(t){return!t.isgroup}function ju(t,e,n){if(t&&e){var i,r=(i={},t.traverse((function(t){$u(t)&&t.anid&&(i[t.anid]=t)})),i);e.traverse((function(t){if($u(t)&&t.anid){var e=r[t.anid];if(e){var i=o(t);t.attr(o(e)),hu(t,i,n,_s(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=i({},t.shape)),e}}function qu(t,e){return o(t,(function(t){var n=t[0];n=cu(n,e.x),n=du(n,e.x+e.width);var i=t[1];return i=cu(i,e.y),[n,i=du(i,e.y+e.height)]}))}function th(t,e){var n=cu(t.x,e.x),i=du(t.x+t.width,e.x+e.width),r=cu(t.y,e.y),o=du(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 eh(t,e,n){var i=i({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),t(r,n),new es(i)):nu(t.replace("path://",""),i,n,"center")}function nh(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=rh(f,g,u,h)/d;if(y<0||y>1)return!1;var v=rh(f,g,c,p)/d;return!(v<0||v>1)}function rh(t,e,n,i){return t*i-n*e}function oh(t){var e=t.itemtooltipoption,n=t.componentmodel,i=t.itemname,r=h(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&&p(e(l),(function(t){dt(s,t)||(s[t]=l[t],s.$vars.push(t))}));var u=_s(t.el);u.componentmaintype=o,u.componentindex=a,u.tooltipconfig={name:i,option:t({content:i,formatterparams:s},r)}}ou("circle",nl),ou("ellipse",el),ou("sector",jl),ou("ring",tu),ou("polygon",ru),ou("polyline",au),ou("rect",ls),ou("line",uu),ou("beziercurve",du),ou("arc",gu);var ah=object.freeze({__proto__:null,extendshape:lu,extendpath:pu,registershape:ou,getshapeclass:ru,makepath:nu,makeimage:zu,mergepath:vu,resizepath:bu,subpixeloptimizeline:function(t){return is(t.shape,t.shape,t.style),t},subpixeloptimizerect:function(t){return rs(t.shape,t.shape,t.style),t},subpixeloptimize:fu,updateprops:hu,initprops:wu,removeelement:uu,removeelementwithfadeout:yu,iselementremoved:zu,gettransform:ju,applytransform:qu,transformdirection:ku,grouptransition:ju,clippointsbyrect:qu,cliprectbyrect:th,createicon:eh,linepolygonintersect:nh,linelineintersect:ih,settooltipconfig:oh,group:ei,image:es,text:cs,circle:nl,ellipse:el,sector:jl,ring:tu,polygon:ru,polyline:au,rect:ls,line:uu,beziercurve:du,arc:gu,incrementaldisplayable:tu,compoundpath:yu,lineargradient:mu,radialgradient:_u,boundingrect:gi,orientedboundingrect:mu,point:ai,path:ka}),sh={};function lh(t,e){for(var n=0;n-1?eh:bh;function wh(t,e){t=t.touppercase(),gh[t]=new oh(e),fh[t]=e}wh(vh,{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:". "}}}}),wh(eh,{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 uh=1e3,xh=6e4,yh=36e5,zh=864e5,jh=31536e6,qh={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}"},kh="{yyyy}-{mm}-{dd}",$h={year:"{yyyy}",month:"{yyyy}-{mm}",day:kh,hour:"{yyyy}-{mm}-{dd} "+qh.hour,minute:"{yyyy}-{mm}-{dd} "+qh.minute,second:"{yyyy}-{mm}-{dd} "+qh.second,millisecond:qh.none},jh=["year","month","day","hour","minute","second","millisecond"],qh=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function tc(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 nc(t){return t===ec(t)}function ic(t,e,n,i){var r=or(t),o=r[ac(n)](),a=r[sc(n)]()+1,s=math.floor((a-1)/4)+1,l=r[lc(n)](),u=r["get"+(n?"utc":"")+"day"](),h=r[uc(n)](),c=(h-1)%12+1,p=r[hc(n)](),d=r[cc(n)](),f=r[pc(n)](),g=(i instanceof oh?i:function(t){return gh[t]}(i||hh)||gh.en).getmodel("time"),y=g.get("month"),v=g.get("monthabbr"),m=g.get("dayofweek"),_=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,tc(a,2)).replace(/{m}/g,a+"").replace(/{dd}/g,tc(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,m[u]).replace(/{ee}/g,_[u]).replace(/{e}/g,u+"").replace(/{hh}/g,tc(h,2)).replace(/{h}/g,h+"").replace(/{hh}/g,tc(c+"",2)).replace(/{h}/g,c+"").replace(/{mm}/g,tc(p,2)).replace(/{m}/g,p+"").replace(/{ss}/g,tc(d,2)).replace(/{s}/g,d+"").replace(/{sss}/g,tc(f,3)).replace(/{s}/g,f+"")}function rc(t,e){var n=or(t),i=n[sc(e)]()+1,r=n[lc(e)](),o=n[uc(e)](),a=n[hc(e)](),s=n[cc(e)](),l=0===n[pc(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 oc(t,e,n){var i="number"==typeof t?or(t):t;switch(e=e||rc(t,n)){case"year":return i[ac(n)]();case"half-year":return i[sc(n)]()>=6?1:0;case"quarter":return math.floor((i[sc(n)]()+1)/4);case"month":return i[sc(n)]();case"day":return i[lc(n)]();case"half-day":return i[uc(n)]()/24;case"hour":return i[uc(n)]();case"minute":return i[hc(n)]();case"second":return i[cc(n)]();case"millisecond":return i[pc(n)]()}}function ac(t){return t?"getutcfullyear":"getfullyear"}function sc(t){return t?"getutcmonth":"getmonth"}function lc(t){return t?"getutcdate":"getdate"}function uc(t){return t?"getutchours":"gethours"}function hc(t){return t?"getutcminutes":"getminutes"}function cc(t){return t?"getutcseconds":"getseconds"}function pc(t){return t?"getutcseconds":"getseconds"}function dc(t){return t?"setutcfullyear":"setfullyear"}function fc(t){return t?"setutcmonth":"setmonth"}function gc(t){return t?"setutcdate":"setdate"}function yc(t){return t?"setutchours":"sethours"}function vc(t){return t?"setutcminutes":"setminutes"}function mc(t){return t?"setutcseconds":"setseconds"}function _c(t){return t?"setutcseconds":"setseconds"}function xc(t){if(!pr(t))return h(t)?t:"-";var e=(t+"").split(".");return e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(e.length>1?"."+e[1]:"")}function bc(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 wc=it,sc=/([&<>"'])/g,mc={"&":"&","<":"<",">":">",'"':""","'":"'"};function ic(t){return null==t?"":(t+"").replace(sc,(function(t,e){return mc[e]}))}function tc(t,e,n){function i(t){return t&&ot(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?or(t):t;if(!isnan(+s))return ic(s,"{yyyy}-{mm}-{dd} {hh}:{mm}:{ss}",n);if(a)return"-"}if("ordinal"===e)return w(t)?i(t):u(t)&&r(t)?t+"":"-";var l=cr(t);return r(l)?xc(l):w(t)?i(t):"-"}var cc=["a","b","c","d","e","f","g"],dc=function(t,e){return"{"+t+(null==e?"":e)+"}"};function ac(t,e,n){f(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 kc(t,e){return e=e||"transparent",h(t)?t:x(t)&&t.colorstops&&(t.colorstops[0]||{}).color||e}function pc(t,e){if("_blank"===e||"blank"===e){var n=window.open();n.opener=null,n.location.href=t}else window.open(t,e)}var oc=p,rc=["left","right","top","bottom","width","height"],nc=[["width","left","right"],["height","top","bottom"]];function zc(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 ec=zc;b(zc,"vertical"),b(zc,"horizontal");function vc(t,e,n){n=wc(n||0);var i=e.width,r=e.height,o=zi(t.left,i),a=zi(t.top,r),s=zi(t.right,i),l=zi(t.bottom,r),u=zi(t.width,i),h=zi(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 gi(o+n[3],a+n[0],u,h);return f.margin=n,f}function bc(t,e,n,i,r){var o=!r||!r.hv||r.hv[0],a=!r||!r.hv||r.hv[1],s=r&&r.boundingmode||"all";if(o||a){var l;if("raw"===s)l="group"===t.type?new gi(0,0,+e.width||0,+e.height||0):t.getboundingrect();else if(l=t.getboundingrect(),t.needlocaltransform()){var u=t.getlocaltransform();(l=l.clone()).applytransform(u)}var h=vc(t({width:l.width,height:l.height},e),n,i),c=o?h.x-l.x:0,p=a?h.y-l.y:0;"raw"===s?(t.x=c,t.y=p):(t.x+=c,t.y+=p),t.markredraw()}}function fc(t){var e=t.layoutmode||t.constructor.layoutmode;return x(e)?e:e?{type:e}:null}function gc(t,e,n){var i=n&&n.ignoresize;!f(i)&&(i=[i,i]);var r=a(nc[0],0),o=a(nc[1],1);function a(n,r){var o={},a=0,u={},h=0;if(oc(n,(function(e){u[e]=t[e]})),oc(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=s(o,n[a],!0);e.defaultoption=o}return e.defaultoption},e.prototype.getreferringcomponents=function(t,e){var n=t+"index",i=t+"id";return er(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.protoinitialize=function(){var t=e.prototype;t.type="component",t.id="",t.name="",t.maintype="",t.subtype="",t.componentindex=0}(),e}(oh);yr(xc,oh),kr(xc),function(t){var e={};t.registersubtypedefaulter=function(t,n){var i=wr(t);e[i.main]=n},t.determinesubtype=function(n,i){var r=i.type;if(!r){var o=wr(n).main;t.hassubtypes(n)&&e[o]&&(r=e[o](i))}return r}}(xc),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 p(t,(function(o){var a=n(i,o),s=function(t,e){var n=[];return p(t,(function(t){d(e,t)>=0&&n.push(t)})),n}(a.originaldeps=e(o),t);a.entrycount=s.length,0===a.entrycount&&r.push(o),p(s,(function(t){d(a.predecessor,t)<0&&a.predecessor.push(t);var e=n(i,t);d(e.successor,t)<0&&e.successor.push(o)}))})),{graph:i,noentrylist:r}}(i),s=a.graph,l=a.noentrylist,u={};for(p(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]),p(c.successor,p?f:d)}p(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)}}}(xc,(function(t){var e=[];p(xc.getclassesbymaintype(t),(function(t){e=e.concat(t.dependencies||t.prototype.dependencies||[])})),e=o(e,(function(t){return wr(t).main})),"dataset"!==t&&d(e,"dataset")<=0&&e.unshift("dataset");return e}));var yc="";"undefined"!=typeof navigator&&(yc=navigator.platform||"");var zc="rgba(0, 0, 0, 0.2)",jc={darkmode:"auto",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientcolor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:zc,dasharrayx:[1,0],dasharrayy:[2,5],symbolsize:1,rotation:math.pi/6},{color:zc,symbol:"circle",dasharrayx:[[8,8],[0,8,8,0]],dasharrayy:[6,0],symbolsize:.8},{color:zc,dasharrayx:[1,0],dasharrayy:[4,3],rotation:-math.pi/4},{color:zc,dasharrayx:[[6,6],[0,6,6,0]],dasharrayy:[6,0]},{color:zc,dasharrayx:[[1,0],[1,6]],dasharrayy:[1,0,6,0],rotation:math.pi/4},{color:zc,symbol:"triangle",dasharrayx:[[9,9],[0,9,9,0]],dasharrayy:[7,2],symbolsize:.75}]}},textstyle:{fontfamily:yc.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},qc=ht(["tooltip","label","itemname","itemid","seriesname"]),kc="original",$c="arrayrows",jc="objectrows",qc="keyedcolumns",tp="typedarray",ep="unknown",np="column",ip="row",rp=1,op=2,ap=3,sp=kr();function lp(t,e,n){var i={},r=hp(e);if(!r||!t)return i;var o,a,s=[],l=[],u=e.ecmodel,h=sp(u).datasetmap,c=r.uid+"_"+n.serieslayoutby;p(t=t.slice(),(function(e,n){var r=x(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 wp=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 oh(i),this._locale=new oh(r),this._optionmanager=o},e.prototype.setoption=function(t,e,n){var i=ip(e);this._optionmanager.setoption(t,n,i),this._resetoption(null,i)},e.prototype.resetoption=function(t,e){return this._resetoption(t,ip(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)):yp(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&&p(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=ht(),s=e&&e.replacemergemaintypemap;sp(this).datasetmap=ht(),p(t,(function(t,e){null!=t&&(xc.hasclass(e)?e&&(o.push(e),a.set(e,!0)):n[e]=null==n[e]?w(t):s(n[e],t,!0))})),s&&s.each((function(t,e){xc.hasclass(e)&&!a.get(e)&&(o.push(e),a.set(e,!0))})),xc.topologicaltravel(o,xc.getallclassmaintypes(),(function(e){var o=function(t,e,n){var i=dp.get(e);if(!i)return n;var r=i(t);return r?n.concat(r):n}(this,e,xr(t[e])),a=i.get(e),l=a?s&&s.get(e)?"replacemerge":"normalmerge":"replaceall",u=mr(a,o,l);(function(t,e,n){p(t,(function(t){var i=t.newoption;x(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,xc),n[e]=null,i.set(e,null),r.set(e,0);var h=[],c=[],p=0;p(u,(function(t,n){var i=t.existing,r=t.newoption;if(r){var o="series"===e,a=xc.getclass(e,t.keyinfo.subtype,!o);if(!a)return;if(i&&i.constructor===a)i.name=t.keyinfo.name,i.mergeoption(r,this),i.optionupdated(r,!1);else{var s=i({componentindex:n},t.keyinfo);i(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?(h.push(i.option),c.push(i),p++):(h.push(void 0),c.push(void 0))}),this),n[e]=h,i.set(e,c),r.set(e,p),"series"===e&&fp(this)}),this),this._seriesindices||fp(this)},e.prototype.getoption=function(){var t=w(this.option);return p(t,(function(e,n){if(xc.hasclass(n)){for(var i=xr(e),r=i.length,o=!1,a=r-1;a>=0;a--)i[a]&&!ar(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.getlocale=function(t){return this.getlocalemodel().get(t)},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 op=p,rp=x,np=["areastyle","linestyle","nodestyle","linkstyle","chordstyle","label","labelline"];function zp(t){var e=t&&t.itemstyle;if(e)for(var n=0,i=np.length;n=0;f--){var g=t[f];if(s||(c=g.data.rawindexof(g.stackedbydimension,h)),c>=0){var y=g.data.getbyrawindex(g.stackresultdimension,c);if(p>=0&&y>0||p<=0&&y<0){p=tr(p,y),d=y;break}}}return i[0]=p,i[1]=d,i}));a.hostmodel.setdata(l),e.data=l}))}var td,ed,nd,id,rd,od=function(t){this.data=t.data||(t.sourceformat===qc?{}:[]),this.sourceformat=t.sourceformat||ep,this.serieslayoutby=t.serieslayoutby||np,this.startindex=t.startindex||0,this.dimensionsdefine=t.dimensionsdefine,this.dimensionsdetectedcount=t.dimensionsdetectedcount,this.encodedefine=t.encodedefine,this.metarawoption=t.metarawoption};function ad(t){return t instanceof od}function sd(t,e,n,i){n=n||hd(t);var r=e.serieslayoutby,o=function(t,e,n,i,r){var o,a;if(!t)return{dimensionsdefine:cd(r),startindex:a,dimensionsdetectedcount:o};if(e===$c){var s=t;"auto"===i||null==i?pd((function(t){null!=t&&"-"!==t&&(h(t)?null==a&&(a=1):a=0)}),n,s,10):a=u(i)?i:i?1:0,r||1!==a||(r=[],pd((function(t,e){r[e]=null!=t?t+"":""}),n,s,1/0)),o=r?r.length:n===ip?s.length:s[0]?s[0].length:null}else if(e===jc)r||(r=function(t){var e,n=0;for(;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=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}},nd=function(){function t(t,e){if("number"!=typeof e){var n="";0,vr(n)}this._opfn=rd[t],this._rvalfloat=cr(e)}return t.prototype.evaluate=function(t){return"number"==typeof t?this._opfn(t,this._rvalfloat):this._opfn(cr(t),this._rvalfloat)},t}(),zd=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=typeof t,i=typeof e,r="number"===n?t:cr(t),o="number"===i?e:cr(e),a=isnan(r),s=isnan(o);if(a&&(r=this._incomparable),s&&(o=this._incomparable),a&&s){var l="string"===n,u="string"===i;l&&(r=u?t:0),u&&(o=l?e:0)}return ro?-this._resultlt:0},t}(),ed=function(){function t(t,e){this._rval=e,this._iseq=t,this._rvaltypeof=typeof e,this._rvalfloat=cr(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=cr(t)===this._rvalfloat)}return this._iseq?e:!e},t}();function vd(t,e){return"eq"===t||"ne"===t?new ed("eq"===t,e):dt(rd,t)?new nd(t,e):null}var bd=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 kd(t,e)},t}();function fd(t){var e=t.sourceformat;if(!yd(e)){var n="";0,vr(n)}return t.data}function gd(t){var e=t.sourceformat,n=t.data;if(!yd(e)){var i="";0,vr(i)}if(e===$c){for(var r=[],o=0,a=n.length;o9e10&&(this._versionsignbase=0)},t.prototype._getversionsign=function(){return this._sourcehost.uid+"_"+this._versionsignbase},t.prototype.preparesource=function(){this._isdirty()&&this._createsource()},t.prototype._createsource=function(){this._setlocalsource([],[]);var t,e,n=this._sourcehost,i=this._getupstreamsourcemanagers(),r=!!i.length;if(qd(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=z(a=o.get("data",!0))?tp:kc,e=[];var h=this._getsourcemetarawoption(),c=l?l.metarawoption:null;t=[sd(a,{serieslayoutby:tt(h.serieslayoutby,c?c.serieslayoutby:null),sourceheader:tt(h.sourceheader,c?c.sourceheader:null),dimensions:tt(h.dimensions,c?c.dimensions:null)},s,o.get("encode",!0))]}else{var p=n;if(r){var d=this._applytransform(i);t=d.sourcelist,e=d.upstreamsignlist}else{t=[sd(p.get("source",!0),this._getsourcemetarawoption(),null,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&&kd(o)}var a,s=[],l=[];return p(t,(function(t){t.preparesource();var e=t.getsource(r||0),n="";null==r||e||kd(n),s.push(e),l.push(t._getversionsign())})),i?e=function(t,e,n){var i=xr(t),r=i.length,o="";r||vr(o);for(var a=0,s=r;a1||e>0&&!t.noheader,i=0;p(t.blocks,(function(t){ef(t).planlayout(t);var e=t.__gaplevelbetweensubblocks;e>=i&&(i=e+(!n||e&&("section"!==t.type||t.noheader)?0:1))})),t.__gaplevelbetweensubblocks=i},build:function(t,e,n,i){var r=e.noheader,o=of(e),a=function(t,e,n,i){var r=[],o=e.blocks||[];rt(!o||f(o)),o=o||[];var a=t.ordermode;if(e.sortblocks&&a){o=o.slice();var s={valueasc:"asc",valuedesc:"desc"};if(dt(s,a)){var l=new zd(s[a],null);o.sort((function(t,e){return l.evaluate(t.sortparam,e.sortparam)}))}else"seriesdesc"===a&&o.reverse()}var u=of(e);if(p(o,(function(e,n){var o=ef(e).build(t,e,n>0?u.html:0,i);null!=o&&r.push(o)})),!r.length)return;return"richtext"===t.rendermode?r.join(u.richtext):af(r.join(""),n)}(t,e,r?n:o.html,i);if(r)return a;var s=tc(e.header,"ordinal",t.useutc),l=$d(i,t.rendermode).namestyle;return"richtext"===t.rendermode?sf(t,s,l)+o.richtext+a:af('
'+ic(s)+"
"+a,n)}},namevalue:{planlayout:function(t){t.__gaplevelbetweensubblocks=0},build:function(t,e,n,i){var r=t.rendermode,o=e.noname,a=e.novalue,s=!e.markertype,l=e.name,u=e.value,h=t.useutc;if(!o||!a){var c=s?"":t.markupstylecreator.maketooltipmarker(e.markertype,e.markercolor||"#333",r),p=o?"":tc(l,"ordinal",h),d=e.valuetype,f=a?[]:f(u)?o(u,(function(t,e){return tc(t,f(d)?d[e]:d,h)})):[tc(u,f(d)?d[0]:d,h)],g=!s||!o,y=!s&&o,v=$d(i,r),m=v.namestyle,_=v.valuestyle;return"richtext"===r?(s?"":c)+(o?"":sf(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(e.join(" "),o)}(t,f,g,y,_)):af((s?"":c)+(o?"":function(t,e,n){return''+ic(t)+""}(p,!s,m))+(a?"":function(t,e,n,i){var r=n?"10px":"20px";return''+o(t,(function(t){return ic(t)})).join("  ")+""}(f,g,y,_)),n)}}}};function rf(t,e,n,i,r,o){if(t){var a=ef(t);a.planlayout(t);var s={useutc:r,rendermode:n,ordermode:i,markupstylecreator:e};return a.build(s,t,0,o)}}function of(t){var e=t.__gaplevelbetweensubblocks;return{html:jd[e],richtext:qd[e]}}function af(t,e){return'
'+t+'
'}function sf(t,e,n){return t.markupstylecreator.wraprichtextstyle(e,n)}function lf(t,e){return kc(t.getdata().getitemvisual(e,"style")[t.visualdrawtype])}function uf(t,e){var n=t.get("padding");return null!=n?n:"richtext"===e?[8,10]:10}var hf=function(){function t(){this.richtextstyles={},this._nextstylenameid=dr()}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=lc({color:e,type:t,rendermode:n,markerid:i});return h(r)?r:(this.richtextstyles[i]=r.style,r.content)},t.prototype.wraprichtextstyle=function(t,e){var n={};f(e)?p(e,(function(t){return i(n,t)})):i(n,e);var i=this._generatestylename();return this.richtextstyles[i]=n,"{"+i+"|"+t+"}"},t}();function cf(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=f(c),d=lf(o,a);if(h>1||p&&!h){var f=function(t,e,n,i,r){var o=e.getdata(),a=r(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(tf("namevalue",{markertype:"subitem",markercolor:r,name:n.displayname,value:t,valuetype:n.type})):(s.push(t),l.push(n.type)))}return i.length?p(i,(function(t){h(md(o,n,t),t)})):p(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=md(l,a,u[0]),n=g.type}else r=e=p?c[0]:c;var y=dr(o),v=y&&o.name||"",m=l.getname(a),_=s?v:m;return tf("section",{header:v,noheader:s||!y,sortparam:r,blocks:[tf("namevalue",{markertype:"item",markercolor:d,name:_,noname:!ot(_),value:e,valuetype:n})].concat(i||[])})}var pf=kr();function df(t,e){return t.getname(e)||t.getid(e)}var ff=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=dd({count:yf,reset:vf}),this.datatask.context={model:this},this.mergedefaultandtheme(t,n),(pf(this).sourcemanager=new zd(this)).preparesource();var i=this.getinitialdata(t,n);_f(i,this),this.datatask.context.data=i,pf(this).databeforeprocessed=i,gf(this),this._initselectedmapfromdata(i)},e.prototype.mergedefaultandtheme=function(t,e){var n=fc(this),i=n?hc(t):{},r=this.subtype;xc.hasclass(r)&&(r+="series"),s(t,e.gettheme().get(this.subtype)),s(t,this.getdefaultoption()),br(t,"label",["show"]),this.filldatatextstyle(t.data),n&&gc(t,i,n)},e.prototype.mergeoption=function(t,e){t=s(this.option,t,!0),this.filldatatextstyle(t.data);var n=fc(this);n&&gc(this.option,t,n);var i=pf(this).sourcemanager;i.dirty(),i.preparesource();var r=this.getinitialdata(t,e);_f(r,this),this.datatask.dirty(),this.datatask.context.data=r,pf(this).databeforeprocessed=r,gf(this),this._initselectedmapfromdata(r)},e.prototype.filldatatextstyle=function(t){if(t&&!z(t))for(var e=["show"],n=0;nthis.getshallow("animationthreshold")&&(t=!1),!!t},e.prototype.restoredata=function(){this.datatask.dirty()},e.prototype.getcolorfrompalette=function(t,e,n){var i=this.ecmodel,r=_p.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)for(var i=this.getdata(e),r=0;r=0&&n.push(r)}return n},e.prototype.isselected=function(t,e){var n=this.option.selectedmap;return n&&n[df(this.getdata(e),t)]||!1},e.prototype._innerselect=function(t,e){var n,i,r=this.option.selectedmode,o=e.length;if(r&&o)if("multiple"===r)for(var a=this.option.selectedmap||(this.option.selectedmap={}),s=0;s0&&this._innerselect(t,e)}},e.registerclass=function(t){return xc.registerclass(t)},e.protoinitialize=function(){var t=e.prototype;t.type="series.__base__",t.seriesindex=0,t.usecolorpaletteondata=!1,t.ignorestyleondata=!1,t.hassymbolvisual=!1,t.defaultsymbol="circle",t.visualstyleaccesspath="itemstyle",t.visualdrawtype="fill"}(),e}(xc);function gf(t){var e=t.name;dr(t)||(t.name=function(t){var e=t.getrawdata(),n=e.mapdimensionsall("seriesname"),i=[];return p(n,(function(t){var n=e.getdimensioninfo(t);n.displayname&&i.push(n.displayname)})),i.join(" ")}(t)||e)}function yf(t){return t.model.getrawdata().count()}function vf(t){var e=t.model;return e.setdata(e.getrawdata().cloneshallow()),mf}function mf(t,e){e.outputdata&&t.end>e.outputdata.count()&&e.model.getrawdata().cloneshallow(e.outputdata)}function _f(t,e){p(r(t.changable_methods,t.downsample_methods),(function(n){t.wrapmethod(n,b(xf,e))}))}function xf(t,e){var n=bf(t);return n&&n.setoutputend((e||this).count()),e}function bf(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}}l(ff,td),l(ff,_p),yr(ff,xc);var wf=function(){function t(){this.group=new ei,this.uid=nh("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.blurseries=function(t,e){},t}();function sf(){var t=kr();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"}}ur(wf),kr(wf);var mf=kr(),if=sf(),tf=function(){function t(){this.group=new ei,this.uid=nh("viewchart"),this.rendertask=dd({plan:af,reset:lf}),this.rendertask.context={view:this}}return t.prototype.init=function(t,e){},t.prototype.render=function(t,e,n,i){},t.prototype.highlight=function(t,e,n,i){df(t.getdata(),i,"emphasis")},t.prototype.downplay=function(t,e,n,i){df(t.getdata(),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.markupdatemethod=function(t,e){mf(t).updatemethod=e},t.protoinitialize=void(t.prototype.type="chart"),t}();function cf(t,e,n){t&&("emphasis"===e?js:qs)(t,n)}function df(t,e,n){var i=lr(t,e),r=e&&null!=e.highlightkey?function(t){var e=bs[t];return null==e&&xs<=32&&(e=bs[t]=xs++),e}(e.highlightkey):null;null!=i?p(xr(i),(function(e){cf(t.getitemgraphicel(e),n,r)})):t.eachitemgraphicel((function(t){cf(t,n,r)}))}function af(t){return if(t.model)}function lf(t){var e=t.model,n=t.ecmodel,i=t.api,r=t.payload,o=e.pipelinecontext.progressiverender,a=t.view,s=r&&mf(r).updatemethod,l=o?"incrementalpreparerender":s&&a[s]?s:"render";return"render"!==l&&a[l](e,n,i,r),kf[l]}ur(tf),kr(tf);var kf={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)}}},pf="\0__throttleoriginmethod",of="\0__throttlerate",rf="\0__throttletype";function nf(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 zf(t,e,n,i){var r=t[e];if(r){var o=r[pf]||r,a=r[rf];if(r[of]!==n||a!==i){if(null==n||!i)return t[e]=o;(r=t[e]=nf(o,n,"debounce"===i))[pf]=o,r[rf]=i,r[of]=n}return r}}var ef=kr(),vf={itemstyle:$r(lh,!0),linestyle:$r(ch,!0)},bf={linestyle:"stroke",itemstyle:"fill"};function ff(t,e){var n=t.visualstylemapper||vf[e];return n||(console.warn("unkown style type '"+e+"'."),vf.itemstyle)}function gf(t,e){var n=t.visualdrawtype||bf[e];return n||(console.warn("unkown style type '"+e+"'."),"fill")}var hf={createonallseries:!0,performrawseries:!0,reset:function(t,e){var n=t.getdata(),i=t.visualstyleaccesspath||"itemstyle",r=t.getmodel(i),o=ff(t,i)(r),a=r.getshallow("decal");a&&(n.setvisual("decal",a),a.dirty=!0);var s=gf(t,i),l=o[s],u=g(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||"function"==typeof o.fill?c:o.fill,o.stroke="auto"===o.stroke||"function"==typeof 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=i({},o);r[s]=u(i),e.setitemvisual(n,"style",r)}}}},wf=new oh,uf={createonallseries:!0,performrawseries:!0,reset:function(t,e){if(!t.ignorestyleondata&&!e.isseriesfiltered(t)){var n=t.getdata(),i=t.visualstyleaccesspath||"itemstyle",r=ff(t,i),o=n.getvisual("drawtype");return{dataeach:n.hasitemoption?function(t,e){var n=t.getrawdataitem(e);if(n&&n[i]){wf.option=n[i];var a=r(wf);i(t.ensureuniqueitemvisual(e,"style"),a),wf.option.decal&&(t.setitemvisual(e,"decal",wf.option.decal),wf.option.decal.dirty=!0),o in a&&t.setitemvisual(e,"colorfrompalette",!1)}}:null}}}},xf={performrawseries:!0,overallreset:function(t){var e=ht();t.eachseries((function(t){if(t.usecolorpaletteondata){var n=e.get(t.type);n||(n={},e.set(t.type,n)),ef(t).scope=n}})),t.eachseries((function(e){if(e.usecolorpaletteondata&&!t.isseriesfiltered(e)){var n=e.getrawdata(),i={},r=e.getdata(),o=ef(e).scope,a=e.visualstyleaccesspath||"itemstyle",s=gf(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)}}))}}))}},yf=math.pi;var zf=function(){function t(t,e,n,i){this._stagetaskmap=ht(),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=ht();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;p(this._allhandlers,(function(i){var r=t.get(i.uid)||t.set(i.uid,{}),o="";rt(!(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))}p(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=ht(),s=t.seriestype,l=t.gettargetseries;function u(e){var s=e.uid,l=a.set(s,o&&o.get(s)||dd({plan:jf,reset:qf,count:ng}));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||dd({reset:jf});o.context={ecmodel:n,api:i,overallreset:t.overallreset,scheduler:r};var a=o.agentstubmap,s=o.agentstubmap=ht(),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,dd({reset:qf,ondirty:$f})));n.context={model:t,overallprogress:h},n.agent=o,n.__block=h,r._pipe(t,n)}rt(!t.createonallseries,p),l?n.eachrawseriesbytype(l,d):u?u(n,i).each(d):(h=!1,p(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 g(t)&&(t={overallreset:t,seriestype:ig(t)}),t.uid=nh("stagehandler"),e&&(t.visualtype=e),t},t}();function jf(t){t.overallreset(t.ecmodel,t.api,t.payload)}function qf(t){return t.overallprogress&&kf}function kf(){this.agent.dirty(),this.getdownstream().dirty()}function $f(){this.agent&&this.agent.dirty()}function jf(t){return t.plan?t.plan(t.model,t.ecmodel,t.api,t.payload):null}function qf(t){t.useclearvisual&&t.data.clearallvisual();var e=t.resetdefines=xr(t.reset(t.model,t.ecmodel,t.api,t.payload));return e.length>1?o(e,(function(t,e){return eg(e)})):tg}var tg=eg(0);function eg(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}(),yg={createonallseries:!0,performrawseries:!0,reset:function(t,e){var n=t.getdata();if(t.legendicon&&n.setvisual("legendicon",t.legendicon),t.hassymbolvisual){var i=t.get("symbol"),r=t.get("symbolsize"),o=t.get("symbolkeepaspect"),a=t.get("symbolrotate"),s=t.get("symboloffset"),l=g(i),u=g(r),h=g(a),c=g(s),p=l||u||h||c,d=!l&&i?i:t.defaultsymbol,f=u?null:r,g=h?null:a,y=c?null:s;if(n.setvisual({legendicon:t.legendicon||d,symbol:d,symbolsize:f,symbolkeepaspect:o,symbolrotate:g,symboloffset:y}),!e.isseriesfiltered(t))return{dataeach:p?function(e,n){var o=t.getrawvalue(n),p=t.getdataparams(n);l&&e.setitemvisual(n,"symbol",i(o,p)),u&&e.setitemvisual(n,"symbolsize",r(o,p)),h&&e.setitemvisual(n,"symbolrotate",a(o,p)),c&&e.setitemvisual(n,"symboloffset",s(o,p))}:null}}}};function vg(t,e,n){switch(n){case"color":return t.getitemvisual(e,"style")[t.getvisual("drawtype")];case"opacity":return t.getitemvisual(e,"style").opacity;case"symbol":case"symbolsize":case"liftz":return t.getitemvisual(e,n);default:0}}function mg(t,e){switch(e){case"color":return t.getvisual("style")[t.getvisual("drawtype")];case"opacity":return t.getvisual("style").opacity;case"symbol":case"symbolsize":case"liftz":return t.getvisual(e);default:0}}function _g(t,e,n,i){switch(n){case"color":t.ensureuniqueitemvisual(e,"style")[t.getvisual("drawtype")]=i,t.setitemvisual(e,"colorfrompalette",!1);break;case"opacity":t.ensureuniqueitemvisual(e,"style").opacity=i;break;case"symbol":case"symbolsize":case"liftz":t.setitemvisual(e,n,i);break;default:0}}var xg=2*math.pi,bg=la.cmd,wg=["top","right","bottom","left"];function sg(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 mg(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)%xg<1e-4)return l[0]=h,l[1]=c,u-n;if(o){var p=i;i=na(r),r=na(p)}else i=na(i),r=na(r);i>r&&(r+=xg);var d=math.atan2(s,a);if(d<0&&(d+=xg),d>=i&&d<=r||d+xg>=i&&d+xg<=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),_=(y-a)*(y-a)+(v-s)*(v-s);return m<_?(l[0]=f,l[1]=g,math.sqrt(m)):(l[0]=y,l[1]=v,math.sqrt(_))}function ig(t,e,n,i,r,o,a,s){var l=r-t,u=o-e,h=n-t,c=i-e,p=math.sqrt(h*h+c*c),d=(l*(h/=p)+u*(c/=p))/p;s&&(d=math.min(math.max(d,0),1)),d*=p;var f=a[0]=t+d*h,g=a[1]=e+d*c;return math.sqrt((f-r)*(f-r)+(g-o)*(g-o))}function tg(t,e,n,i,r,o,a){n<0&&(t+=n,n=-n),i<0&&(e+=i,i=-i);var s=t+n,l=e+i,u=a[0]=math.min(math.max(r,t),s),h=a[1]=math.min(math.max(o,e),l);return math.sqrt((u-r)*(u-r)+(h-o)*(h-o))}var cg=[];function dg(t,e,n){var i=tg(e.x,e.y,e.width,e.height,t.x,t.y,cg);return n.set(cg[0],cg[1]),i}function ag(t,e,n){for(var i,r,o=0,a=0,s=0,l=0,u=1/0,h=e.data,c=t.x,p=t.y,d=0;d0){e=e/180*math.pi,lg.fromarray(t[0]),kg.fromarray(t[1]),pg.fromarray(t[2]),ai.sub(og,lg,kg),ai.sub(rg,pg,kg);var n=og.len(),i=rg.len();if(!(n<.001||i<.001)){og.scale(1/n),rg.scale(1/i);var r=og.dot(rg);if(math.cos(e)1&&ai.copy(eg,pg),eg.toarray(t[1])}}}}function bg(t,e,n){if(n<=180&&n>0){n=n/180*math.pi,lg.fromarray(t[0]),kg.fromarray(t[1]),pg.fromarray(t[2]),ai.sub(og,kg,lg),ai.sub(rg,pg,kg);var i=og.len(),r=rg.len();if(!(i<.001||r<.001))if(og.scale(1/i),rg.scale(1/r),og.dot(e)=a)ai.copy(eg,pg);else{eg.scaleandadd(rg,o/math.tan(math.pi/2-s));var l=pg.x!==kg.x?(eg.x-kg.x)/(pg.x-kg.x):(eg.y-kg.y)/(pg.y-kg.y);if(isnan(l))return;l<0?ai.copy(eg,kg):l>1&&ai.copy(eg,pg)}eg.toarray(t[1])}}}function fg(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 gg(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=lt(i[0],i[1]),o=lt(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=ot([],i[1],i[0],a/r),l=ot([],i[1],i[2],a/o),u=ot([],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&&x(-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(),_(f,g,1),_(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 _(t,e,n){if(t<0){var i=math.min(e,-t);if(i>0){x(i*n,0,a);var r=i+t;r<0&&b(-r*n,1)}else b(-t*n,1)}}function x(n,i,r){0!==n&&(u=!0);for(var o=i;o0)for(l=0;l0;l--){x(-(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?x(n,0,i+1):x(-n,a-i-1,a),(t-=n)<=0)return}}function xg(t,e,n,i){return ug(t,"y","height",e,n,i)}function yg(t){if(t){for(var e=[],n=0;n=0&&n.attr(d.oldlayoutselect),d(u,"emphasis")>=0&&n.attr(d.oldlayoutemphasis)),hu(n,s,e,a)}else if(n.attr(s),!_h(n).valueanimation){var h=tt(n.style.opacity,1);n.style.opacity=0,wu(n,{style:{opacity:h}},e,a)}if(d.oldlayout=s,n.states.select){var c=d.oldlayoutselect={};jg(c,s,qg),jg(c,n.states.select,qg)}if(n.states.emphasis){var p=d.oldlayoutemphasis={};jg(p,s,qg),jg(p,n.states.emphasis,qg)}bh(n,a,l,e,e)}if(i&&!i.ignore&&!i.invisible){r=(d=$g(i)).oldlayout;var d,f={points:i.shape.points};r?(i.attr({shape:r}),hu(i,{shape:f},e)):(i.setshape(f),i.style.strokepercent=0,wu(i,{style:{strokepercent:1}},e)),d.oldlayout=f}},t}();function ey(t,e){function n(e,n){var i=[];return e.eachcomponent({maintype:"series",subtype:t,query:n},(function(t){i.push(t.seriesindex)})),i}p([[t+"toggleselect","toggleselect"],[t+"select","select"],[t+"unselect","unselect"]],(function(t){e(t[0],(function(e,i,r){e=i({},e),r.dispatchaction(i(e,{type:t[1],seriesindex:n(i,e)}))}))}))}function ny(t,e,n,i,r){var o=t+e;n.issilent(o)||i.eachcomponent({maintype:"series",subtype:"pie"},(function(t){for(var e=t.seriesindex,i=r.selected,a=0;a0?(e=e||1,"dashed"===t?[4*e,2*e]:"dotted"===t?[e]:u(t)?[t]:f(t)?t:null):null}var my=new la(!0);function _y(t){var e=t.stroke;return!(null==e||"none"===e||!(t.linewidth>0))}function xy(t){var e=t.fill;return null!=e&&"none"!==e}function by(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 wy(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 sy(t,e,n){var i=no(e.image,e.__image,n);if(ro(i)){var r=t.createpattern(i,e.repeat||"repeat");if("function"==typeof dommatrix&&r.settransform){var o=new dommatrix;o.rotateself(0,0,(e.rotation||0)/math.pi*180),o.scaleself(e.scalex||1,e.scaley||1),o.translateself(e.x||0,e.y||0),r.settransform(o)}return r}}var my=["shadowblur","shadowoffsetx","shadowoffsety"],iy=[["linecap","butt"],["linejoin","miter"],["miterlimit",10]];function ty(t,e,n,i,r){var o=!1;if(!i&&e===(n=n||{}))return!1;if(i||e.opacity!==n.opacity){o||(ay(t,r),o=!0);var a=math.max(math.min(e.opacity,1),0);t.globalalpha=isnan(a)?_o.opacity:a}(i||e.blend!==n.blend)&&(o||(ay(t,r),o=!0),t.globalcompositeoperation=e.blend||_o.blend);for(var s=0;s0&&vy(n.linedash,n.linewidth),w=n.linedashoffset,s=!!t.setlinedash,m=e.getglobalscale();if(u.setscale(m[0],m[1],e.segmentignorethreshold),b){var i=n.strokenoscale&&e.getlinescale?e.getlinescale():1;i&&1!==i&&(b=o(b,(function(t){return t/i})),w/=i)}var t=!0;(l||4&e.__dirty||b&&!s&&r)&&(u.setdpr(t.dpr),s?u.setcontext(null):(u.setcontext(t),t=!1),u.reset(),b&&!s&&(u.setlinedash(b),u.setlinedashoffset(w)),e.buildpath(u,e.shape,i),u.tostatic(),e.pathupdated()),t&&u.rebuildpath(t,s?a:1),b&&s&&(t.setlinedash(b),t.linedashoffset=w),i||(n.strokefirst?(r&&wy(t,n),o&&by(t,n)):(o&&by(t,n),r&&wy(t,n))),b&&s&&t.setlinedash([])}(t,e,d,p),p&&(n.batchfill=d.fill||"",n.batchstroke=d.stroke||"")):e instanceof ja?(3!==n.lastdrawtype&&(l=!0,n.lastdrawtype=3),cy(t,e,u,l,n),function(t,e,n){var i=n.text;if(null!=i&&(i+=""),i){t.font=n.font||vi,t.textalign=n.textalign,t.textbaseline=n.textbaseline;var r=void 0;if(t.setlinedash){var o=n.linedash&&n.linewidth>0&&vy(n.linedash,n.linewidth),a=n.linedashoffset;if(o){var s=n.strokenoscale&&e.getlinescale?e.getlinescale():1;s&&1!==s&&(o=o(o,(function(t){return t/s})),a/=s),t.setlinedash(o),t.linedashoffset=a,r=!0}}n.strokefirst?(_y(n)&&t.stroketext(i,n.x,n.y),xy(n)&&t.filltext(i,n.x,n.y)):(xy(n)&&t.filltext(i,n.x,n.y),_y(n)&&t.stroketext(i,n.x,n.y)),r&&t.setlinedash([])}}(t,e,d)):e instanceof es?(2!==n.lastdrawtype&&(l=!0,n.lastdrawtype=2),function(t,e,n,i,r){ty(t,ly(e,r.inhover),n&&ly(n,r.inhover),i,r)}(t,e,u,l,n),function(t,e,n){var i=e.__image=no(n.image,e.__image,e,e.onload);if(i&&ro(i)){var r=n.x||0,o=n.y||0,a=e.getwidth(),s=e.getheight(),l=i.width/i.height;if(null==a&&null!=s?a=s*l:null==s&&null!=a?s=a/l:null==a&&null==s&&(a=i.width,s=i.height),n.swidth&&n.sheight){var u=n.sx||0,h=n.sy||0;t.drawimage(i,u,h,n.swidth,n.sheight,r,o,a,s)}else if(n.sx&&n.sy){var c=a-(u=n.sx),p=s-(h=n.sy);t.drawimage(i,u,h,c,p,r,o,a,s)}else t.drawimage(i,r,o,a,s)}}(t,e,d)):e instanceof tu&&(4!==n.lastdrawtype&&(l=!0,n.lastdrawtype=4),function(t,e,n){var i=e.getdisplayables(),r=e.gettemporaldisplayables();t.save();var o,a,s={prevelclippaths:null,prevel:null,allclipped:!1,viewwidth:n.viewwidth,viewheight:n.viewheight,inhover:n.inhover};for(o=e.getcursor(),a=i.length;o=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=sv(l,{x:0,y:0,width:a,height:s}),!e.ignoreviewbox)){var p=i;(i=new ei).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 ls({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=oy[s];if(u&&dt(oy,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=zy[s];if(p&&dt(zy,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 ja({style:{text:t.textcontent},silent:!0,x:this._textx||0,y:this._texty||0});ky(e,n),jy(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(oy={g:function(t,e){var n=new ei;return ky(e,n),jy(t,n,this._defsusepending,!1,!1),n},rect:function(t,e){var n=new ls;return ky(e,n),jy(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 nl;return ky(e,n),jy(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 uu;return ky(e,n),jy(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 el;return ky(e,n),jy(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=$y(i));var r=new ru({shape:{points:n||[]},silent:!0});return ky(e,r),jy(t,r,this._defsusepending,!1,!1),r},polyline:function(t,e){var n,i=t.getattribute("points");i&&(n=$y(i));var r=new au({shape:{points:n||[]},silent:!0});return ky(e,r),jy(t,r,this._defsusepending,!1,!1),r},image:function(t,e){var n=new es;return ky(e,n),jy(t,n,this._defsusepending,!1,!1),n.setstyle({image:t.getattribute("xlink: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 ei;return ky(e,a),jy(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 ei;return ky(e,a),jy(t,a,this._defsusepending,!1,!0),this._textx+=parsefloat(r),this._texty+=parsefloat(o),a},path:function(t,e){var n=ol(t.getattribute("d")||"");return ky(e,n),jy(t,n,this._defsusepending,!1,!1),n.silent=!0,n}}),t}(),zy={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 mu(e,n,i,r);return jy(t,o),qy(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 _u(e,n,i);return jy(t,r),qy(t,r),r}};function jy(t,e){"userspaceonuse"===t.getattribute("gradientunits")&&(e.global=!0)}function qy(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={};av(n,o,o);var a=o.stopcolor||n.getattribute("stop-color")||"#000000";e.colorstops.push({offset:r,color:a})}n=n.nextsibling}}function ky(t,e){t&&t.__inheritedstyle&&(e.__inheritedstyle||(e.__inheritedstyle={}),t(e.__inheritedstyle,t.__inheritedstyle))}function $y(t){for(var e=nv(t),n=[],i=0;i0;o-=2){var a=i[o],s=i[o-1],l=nv(a);switch(r=r||[1,0,0,1,0,0],s){case"translate":un(r,r,[parsefloat(l[0]),parsefloat(l[1]||"0")]);break;case"scale":yn(r,r,[parsefloat(l[0]),parsefloat(l[1]||l[0])]);break;case"rotate":xn(r,r,-parsefloat(l[0])*rv);break;case"skewx":wn(r,[1,0,math.tan(parsefloat(l[0])*rv),1,0,0],r);break;case"skewy":wn(r,[1,math.tan(parsefloat(l[0])*rv),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),av(t,a,s),i||function(t,e,n){for(var i=0;i>1^-(1&s),l=l>>1^-(1&l),r=s+=r,o=l+=o,i.push([s/n,l/n])}return i}function vv(t,e){return o(n((t=function(t){if(!t.utf8encoding)return t;var e=t,n=e.utf8scale;null==n&&(n=1024);for(var i=e.features,r=0;r0})),(function(t){var n=t.properties,i=t.geometry,r=[];if("polygon"===i.type){var o=i.coordinates;r.push({type:"polygon",exterior:o[0],interiors:o.slice(1)})}"multipolygon"===i.type&&p(o=i.coordinates,(function(t){t[0]&&r.push({type:"polygon",exterior:t[0],interiors:t.slice(1)})}));var a=new pv(n[e||"name"],r,n.cp);return a.properties=n,a}))}for(var mv=[126,25],_v="南海诸岛",xv=[[[0,3.5],[7,11.2],[15,11.9],[30,7],[42,.7],[52,.7],[56,7.7],[59,.7],[64,.7],[64,0],[5,0],[0,3.5]],[[13,16.1],[19,14.7],[16,21.7],[11,23.1],[13,16.1]],[[12,32.2],[14,38.5],[15,38.5],[13,32.2],[12,32.2]],[[16,47.6],[12,53.2],[13,53.2],[18,47.6],[16,47.6]],[[6,64.4],[8,70],[9,70],[8,64.4],[6,64.4]],[[23,82.6],[29,79.8],[30,79.8],[25,82.6],[23,82.6]],[[37,70.7],[43,62.3],[44,62.3],[39,70.7],[37,70.7]],[[48,51.1],[51,45.5],[53,45.5],[50,51.1],[48,51.1]],[[51,35],[51,28.7],[53,28.7],[53,35],[51,35]],[[52,22.4],[55,17.5],[56,17.5],[53,22.4],[52,22.4]],[[58,12.6],[62,7],[63,7],[60,12.6],[58,12.6]],[[0,3.5],[0,93.1],[64,93.1],[64,0],[63,0],[63,92.4],[1,92.4],[1,3.5],[0,3.5]]],bv=0;bv0&&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.setoption=function(t,e,n){if(this._disposed)_m(this.id);else{var i,r,o;if(zv(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 kp(this._api),s=this._theme,l=this._model=new wp;l.scheduler=this._scheduler,l.init(null,null,null,s,this._locale,a)}this._model.setoption(t,{replacemerge:r},sm),cm(this,o),n?(this.__optionupdated={silent:i},this.__flaginmainprocess=!1,this.getzr().wakeup()):(zv(this),kv.update.call(this),this._zr.flush(),this.__optionupdated=!1,this.__flaginmainprocess=!1,tm.call(this,i),em.call(this,i))}},e.prototype.settheme=function(){console.error("echarts#settheme() is deprecated in echarts 3.0")},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||vv&&window.devicepixelratio||1},e.prototype.getrenderedcanvas=function(t){if(a.canvassupported)return t=t||{},this._zr.painter.getrenderedcanvas({backgroundcolor:t.backgroundcolor||this._model.get("backgroundcolor"),pixelratio:t.pixelratio||this.getdevicepixelratio()})},e.prototype.getsvgdataurl=function(){if(a.svgsupported){var t=this._zr;return p(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;rv(e,(function(t){n.eachcomponent({maintype:t},(function(t){var e=r._componentsmap[t.__viewid];e.group.ignore||(i.push(e),e.group.ignore=!0)}))}));var o="svg"===this._zr.painter.gettype()?this.getsvgdataurl():this.getrenderedcanvas(t).todataurl("image/"+(t&&t.type||"png"));return rv(i,(function(t){t.group.ignore=!1})),o}_m(this.id)},e.prototype.getconnecteddataurl=function(t){if(this._disposed)_m(this.id);else if(a.canvassupported){var e="svg"===t.type,n=this.group,i=math.min,r=math.max,o=1/0;if(lm[n]){var s=o,l=o,u=-1/0,h=-1/0,c=[],p=t&&t.pixelratio||this.getdevicepixelratio();p(am,(function(o,a){if(o.group===n){var p=e?o.getzr().painter.getsvgdom().innerhtml:o.getrenderedcanvas(w(t)),d=o.getdom().getboundingclientrect();s=i(d.left,s),l=i(d.top,l),u=r(d.right,u),h=r(d.bottom,h),c.push({dom:p,left:d.left,top:d.top})}}));var d=(u*=p)-(s*=p),f=(h*=p)-(l*=p),g=c(),y=hi(g,{renderer:e?"svg":"canvas"});if(y.resize({width:d,height:f}),e){var v="";return rv(c,(function(t){var e=t.left-s,n=t.top-l;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 ls({shape:{x:0,y:0,width:d,height:f},style:{fill:t.connectedbackgroundcolor}})),rv(c,(function(t){var e=new es({style:{x:t.left*p-s,y:t.top*p-l,image:t.dom}});y.add(e)})),y.refreshimmediately(),g.todataurl("image/"+(t&&t.type||"png"))}return this.getdataurl(t)}},e.prototype.converttopixel=function(t,e){return $v(this,"converttopixel",t,e)},e.prototype.convertfrompixel=function(t,e){return $v(this,"convertfrompixel",t,e)},e.prototype.containpixel=function(t,e){var n;if(!this._disposed)return p(or(this._model,t),(function(t,i){i.indexof("models")>=0&&p(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;_m(this.id)},e.prototype.getvisual=function(t,e){var n=or(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?vg(r,o,e):mg(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;rv(mm,(function(t){var e=function(e){var n,r=i.getmodel(),o=e.target,a="globalout"===t;if(a?n={}:o&&iy(o,(function(t){var e=_s(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=i({},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)})),rv(bm,(function(t,e){i._messagecenter.on(e,(function(t){this.trigger(e,t)}),i)})),rv(["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?(ny("map","selectchanged",e,i,t),ny("pie","selectchanged",e,i,t)):"select"===t.fromaction?(ny("map","selected",e,i,t),ny("pie","selected",e,i,t)):"unselect"===t.fromaction&&(ny("map","unselected",e,i,t),ny("pie","unselected",e,i,t))}))},e.prototype.isdisposed=function(){return this._disposed},e.prototype.clear=function(){this._disposed?_m(this.id):this.setoption({series:[]},!0)},e.prototype.dispose=function(){if(this._disposed)_m(this.id);else{this._disposed=!0,vr(this.getdom(),om,"");var t=this._api,e=this._model;rv(this._componentsviews,(function(n){n.dispose(e,t)})),rv(this._chartsviews,(function(n){n.dispose(e,t)})),this._zr.dispose(),delete am[this.id]}},e.prototype.resize=function(t){if(this._disposed)_m(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.__optionupdated&&(null==i&&(i=this.__optionupdated.silent),n=!0,this.__optionupdated=!1),this.__flaginmainprocess=!0,n&&zv(this),kv.update.call(this,{type:"resize",animation:i({duration:0},t&&t.animation)}),this.__flaginmainprocess=!1,tm.call(this,i),em.call(this,i)}}},e.prototype.showloading=function(t,e){if(this._disposed)_m(this.id);else if(zv(t)&&(e=t,t=""),t=t||"default",this.hideloading(),dm[t]){var n=dm[t](this._api,e),i=this._zr;this._loadingfx=n,i.add(n)}},e.prototype.hideloading=function(){this._disposed?_m(this.id):(this._loadingfx&&this._zr.remove(this._loadingfx),this._loadingfx=null)},e.prototype.makeactionfromevent=function(t){var e=i({},t);return e.type=bm[t.type],e},e.prototype.dispatchaction=function(t,e){if(this._disposed)_m(this.id);else if(zv(e)||(e={silent:!!e}),xm[t.type]&&this._model)if(this.__flaginmainprocess)this._pendingactions.push(t);else{var n=e.silent;qv.call(this,t,n);var i=e.flush;i?this._zr.flush():!1!==i&&a.browser.wechat&&this._throttledzrflush(),tm.call(this,n),em.call(this,n)}},e.prototype.updatelabellayout=function(){var t=this._labelmanager;t.updatelayoutconfig(this._api),t.layout(this._api),t.processlabelsoverall()},e.prototype.appenddata=function(t){if(this._disposed)_m(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){for(var e=[],n=t.currentstates,i=0;i0?{duration:o,delay:i.get("delay"),easing:i.get("easing")}:null;n.group.traverse((function(e){if(e.states&&e.states.emphasis){if(zu(e))return;if(e instanceof ka&&function(t){var e=ws(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}(e),e.__dirty){var n=e.prevstates;n&&e.usestates(n)}if(r){e.statetransition=a;var i=e.gettextcontent(),o=e.gettextguideline();i&&(i.statetransition=a),o&&(o.statetransition=a)}e.__dirty&&t(e)}}))}zv=function(t){var e=t._scheduler;e.restorepipelines(t._model),e.preparestagetasks(),jv(t,!0),jv(t,!1),e.plan()},jv=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")&&!a.node&&!a.worker&&e.eachseries((function(e){if(!e.preventusinghoverlayer){var n=t._chartsmap[e.__viewid];n.__alive&&n.group.traverse((function(t){t.states.emphasis&&(t.states.emphasis.hoverlayer=!0)}))}}))}(t,n)},lm=function(t,e){rv(im,(function(n){n(t,e)}))},pm=function(t){t.__needsupdatestatus=!0,t.getzr().wakeup()},dm=function(e){e.__needsupdatestatus&&(e.getzr().storage.traverse((function(e){zu(e)||t(e)})),e.__needsupdatestatus=!1)},um=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){js(e,n),pm(t)},i.prototype.leaveemphasis=function(e,n){qs(e,n),pm(t)},i.prototype.enterblur=function(e){ks(e),pm(t)},i.prototype.leaveblur=function(e){$s(e),pm(t)},i.prototype.enterselect=function(e){js(e),pm(t)},i.prototype.leaveselect=function(e){qs(e),pm(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}(cp))(t)},hm=function(t){function e(t,e){for(var n=0;n=0)){ym.push(n);var o=zf.wrapstagehandler(n,r);o.__prio=e,o.__raw=n,t.push(o)}}function jm(t,e){dm[t]=e}function qm(t,e,n){av(t,e,n)}var km=function(t){var e=(t=w(t)).type,n="";e||vr(n);var i=e.split(":");2!==i.length&&vr(n);var r=!1;"echarts"===i[0]&&(e=i[1],r=!0),t.__isbuiltin=r,ud.set(e,t)};xm(bv,hf),xm(fv,uf),xm(fv,xf),xm(bv,yg),xm(fv,{createonallseries:!0,performrawseries:!0,reset:function(t,e){if(t.hassymbolvisual&&!e.isseriesfiltered(t))return{dataeach:t.getdata().hasitemoption?function(t,e){var n=t.getitemmodel(e),i=n.getshallow("symbol",!0),r=n.getshallow("symbolsize",!0),o=n.getshallow("symbolrotate",!0),a=n.getshallow("symboloffset",!0),s=n.getshallow("symbolkeepaspect",!0);null!=i&&t.setitemvisual(e,"symbol",i),null!=r&&t.setitemvisual(e,"symbolsize",r),null!=o&&t.setitemvisual(e,"symbolrotate",o),null!=a&&t.setitemvisual(e,"symboloffset",a),null!=s&&t.setitemvisual(e,"symbolkeepaspect",s)}:null}}}),xm(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=ey(n,e))}));var r=i.getvisual("decal");if(r)i.getvisual("style").decal=ey(r,e)}}))})),vm(jp),bm(900,(function(t){var e=ht();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(qp)})),jm("default",(function(t,e){t(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 ei,i=new ls({style:{fill:e.maskcolor},zlevel:e.zlevel,z:1e4});n.add(i);var r,o=new cs({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 ls({style:{fill:"none"},textcontent:o,textconfig:{position:"right",distance:10},zlevel:e.zlevel,z:10001});return n.add(a),e.showspinner&&((r=new gu({shape:{startangle:-yf/2,endangle:-yf/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*yf/2}).start("circularinout"),r.animateshape(!0).when(1e3,{startangle:3*yf/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})),hm({type:ts,event:ts,update:ts},ft),hm({type:cs,event:cs,update:cs},ft),hm({type:ds,event:ds,update:ds},ft),hm({type:as,event:as,update:as},ft),hm({type:ls,event:ls,update:ls},ft),em("light",ug),em("dark",fg);var $m=[],jm={registerpreprocessor:vm,registerprocessor:bm,registerpostinit:fm,registerpostupdate:gm,registeraction:hm,registercoordinatesystem:wm,registerlayout:um,registervisual:xm,registertransform:km,registerloading:jm,registermap:qm,priority:gv,componentmodel:xc,componentview:wf,seriesmodel:ff,chartview:tf,registercomponentmodel:function(t){xc.registerclass(t)},registercomponentview:function(t){wf.registerclass(t)},registerseriesmodel:function(t){ff.registerclass(t)},registerchartview:function(t){tf.registerclass(t)},registersubtypedefaulter:function(t,e){xc.registersubtypedefaulter(t,e)},registerpainter:function(t,e){wi(t,e)}};function qm(t){f(t)?p(t,(function(t){qm(t)})):d($m,t)>=0||($m.push(t),g(t)&&(t={install:t}),t.install(jm))}function t_(t){return null==t?0:t.length||1}function e_(t){return t}var n_=function(){function t(t,e,n,i,r,o){this._old=t,this._new=e,this._oldkeygetter=n||e_,this._newkeygetter=i||e_,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.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)for(var p=0;p1)for(var a=0;av[1]&&(v[1]=y)}e&&(this._namelist[d]=e[f],this._dontmakeidfromname||d_(this,d))}this._rawcount=this._count=s,this._extent={},a_(this)},t.prototype._initdatafromprovider=function(t,e,n){if(!(t>=e)){for(var i=this._rawdata,r=this._storage,o=this.dimensions,a=o.length,s=this._dimensioninfos,l=this._namelist,u=this._idlist,h=this._rawextent,c=i.getsource().sourceformat===kc,p=0;pb[1]&&(b[1]=x)}if(c&&!i.pure&&y){var w=y.name;null==l[v]&&null!=w&&(l[v]=cr(w,null));var s=y.id;null==u[v]&&null!=s&&(u[v]=cr(s,null))}this._dontmakeidfromname||d_(this,v)}!i.persistent&&i.clean&&i.clean(),this._rawcount=this._count=e,this._extent={},a_(this)}},t.prototype.count=function(){return this._count},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=0&&e=0&&e=0&&ea&&(a=l)}return i=[o,a],this._extent[t]=i,i},t.prototype.getapproximateextent=function(t){return t=this.getdimension(t),this._approximateextent[t]||this.getdataextent(t)},t.prototype.setapproximateextent=function(t,e){e=this.getdimension(e),this._approximateextent[e]=t.slice()},t.prototype.getcalculationinfo=function(t){return this._calculationinfo[t]},t.prototype.setcalculationinfo=function(t,e){b_(t)?i(this._calculationinfo,t):this._calculationinfo[t]=e},t.prototype.getsum=function(t){var e=0;if(this._storage[t])for(var n=0,i=this.count();n=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._storage[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.getrawdataitem=function(t){if(this._rawdata.persistent)return this._rawdata.getitem(this.getrawindex(t));for(var e=[],n=0;n=c&&b<=p||isnan(b))&&(s[l++]=g),g++}f=!0}else if(2===o){y=d[h[0]];var m=d[h[1]],_=t[i[1]][0],x=t[i[1]][1];for(v=0;v=c&&b<=p||isnan(b))&&(w>=_&&w<=x||isnan(w))&&(s[l++]=g),g++}f=!0}}if(!f)if(1===o)for(v=0;v=c&&b<=p||isnan(b))&&(s[l++]=s)}else for(v=0;vt[t][1])&&(m=!1)}m&&(s[l++]=this.getrawindex(v))}return lx[1]&&(x[1]=_)}}}return a},t.prototype.downsample=function(t,e,n,i){for(var r=g_(this,[t]),o=r._storage,a=[],s=x_(1/e),l=o[t],u=this.count(),h=r._rawextent[t],c=new(s_(this))(u),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.getrawindex=h_,r},t.prototype.lttbdownsample=function(t,e){var n,i,r,o=g_(this,[]),a=o._storage[t],s=this.count(),l=new(s_(this))(s),u=0,h=x_(1/e),c=this.getrawindex(0);l[u++]=c;for(var p=1;pn&&(n=i,r=s)}l[u++]=r,c=r}return l[u++]=this.getrawindex(s-1),o._count=u,o._indices=l,o.getrawindex=h_,o},t.prototype.getitemmodel=function(t){var e=this.hostmodel,n=this.getrawdataitem(t);return new oh(n,e,e&&e.ecmodel)},t.prototype.diff=function(t){var e=this;return new n_(t?t.getindices():[],this.getindices(),(function(e){return c_(t,e)}),(function(t){return c_(e,t)}))},t.prototype.getvisual=function(t){var e=this._visual;return e&&e[t]},t.prototype.setvisual=function(t,e){this._visual=this._visual||{},b_(t)?i(this._visual,t):this._visual[t]=e},t.prototype.getitemvisual=function(t,e){var n=this._itemvisuals[t],i=n&&n[e];return null==i?this.getvisual(e):i},t.prototype.hasitemvisual=function(){return this._itemvisuals.length>0},t.prototype.ensureuniqueitemvisual=function(t,e){var n=this._itemvisuals,i=n[t];i||(i=n[t]={});var r=i[e];return null==r&&(f(r=this.getvisual(e))?r=r.slice():b_(r)&&(r=i({},r)),i[e]=r),r},t.prototype.setitemvisual=function(t,e,n){var i=this._itemvisuals[t]||{};this._itemvisuals[t]=i,b_(e)?i(i,e):i[e]=n},t.prototype.clearallvisual=function(){this._visual={},this._itemvisuals=[]},t.prototype.setlayout=function(t,e){if(b_(t))for(var n in t)t.hasownproperty(n)&&this.setlayout(n,t[n]);else 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?i(this._itemlayouts[t]||{},e):e},t.prototype.clearitemlayouts=function(){this._itemlayouts.length=0},t.prototype.setitemgraphicel=function(t,e){var n=this.hostmodel;if(e){var i=_s(e);i.dataindex=t,i.datatype=this.datatype,i.seriesindex=n&&n.seriesindex,"group"===e.type&&e.traverse(v_,e)}this._graphicels[t]=e},t.prototype.getitemgraphicel=function(t){return this._graphicels[t]},t.prototype.eachitemgraphicel=function(t,e){p(this._graphicels,(function(n,i){n&&t&&t.call(e,n,i)}))},t.prototype.cloneshallow=function(e){e||(e=new t(w_(this.dimensions,this.getdimensioninfo,this),this.hostmodel));if(e._storage=this._storage,e._storagearr=this._storagearr,m_(e,this),this._indices){var n=this._indices.constructor;if(n===array){var i=this._indices.length;e._indices=new n(i);for(var r=0;r65535?i_:c_},l_=function(t,e,n,i){var r=m_[e.type],o=e.name;if(i){var a=t[o],s=a&&a.length;if(s!==n){for(var l=new r(n),u=0;u=0?this._indices[t]:-1},c_=function(t,e){var n=t._idlist[e];return null==n&&null!=t._iddimidx&&(n=p_(t,t._iddimidx,t._idordinalmeta,e)),null==n&&(n="e\0\0"+e),n},f_=function(t){return f(t)||(t=null!=t?[t]:[]),t},function(t,e){for(var n=0;n=0?(s[c]=(o=l[c],a=void 0,(a=o.constructor)===array?o.slice():new a(o)),r._rawextent[c]=y_(),r._extent[c]=null):s[c]=l[c],u.push(s[c]))}return r},y_=function(){return[1/0,-1/0]},v_=function(t){var e=_s(t),n=_s(this);e.seriesindex=n.seriesindex,e.dataindex=n.dataindex,e.datatype=n.datatype},m_=function(t,e){p(d_.concat(e.__wrappedmethods||[]),(function(n){e.hasownproperty(n)&&(t[n]=e[n])})),t.__wrappedmethods=e.__wrappedmethods,p(a_,(function(n){t[n]=w(e[n])})),t._calculationinfo=i({},e._calculationinfo)},d_=function(t,e){var n=t._namelist,i=t._idlist,r=t._namedimidx,o=t._iddimidx,a=n[e],s=i[e];if(null==a&&null!=r&&(n[e]=a=p_(t,r,t._nameordinalmeta,e)),null==s&&null!=o&&(i[e]=s=p_(t,o,t._idordinalmeta,e)),null==s&&null!=a){var l=t._namerepeatcount,u=l[a]=(l[a]||0)+1;s=a,u>1&&(s+="__ec__"+u),i[e]=s}}}(),t}();function k_(t,e,n){ad(e)||(e=ld(e)),n=n||{},t=(t||[]).slice();for(var i=(n.dimsdef||[]).slice(),r=ht(),o=ht(),a=[],s=function(t,e,n,i){var r=math.max(t.dimensionsdetectedcount||1,e.length,n.length,i||0);return p(e,(function(t){var e;x(t)&&(e=t.dimsdef)&&(r=math.max(r,e.length))})),r}(e,t,i,n.dimcount),l=0;le[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}();kr(g_);var h_=function(){function t(t){this.categories=t.categories||[],this._needcollect=t.needcollect,this._deduplication=t.deduplication}return t.createbyaxismodel=function(e){var n=e.option,i=n.data,r=i&&o(i,w_);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("string"!=typeof 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=ht(this.categories))},t}();function w_(t){return x(t)&&null!=t.value?t.value:t+""}var u_=ji;function x_(t,e,n,i){var r={},o=t[1]-t[0],a=r.interval=lr(o/e,!0);null!=n&&ai&&(a=r.interval=i);var s=r.intervalprecision=y_(a);return function(t,e){!isfinite(t[0])&&(t[0]=e[0]),!isfinite(t[1])&&(t[1]=e[1]),z_(t,0,e),z_(t,1,e),t[0]>t[1]&&(t[0]=t[1])}(r.nicetickextent=[u_(math.ceil(t[0]/a)*a,s),u_(math.floor(t[1]/a)*a,s)],t),r}function y_(t){return ki(t)+2}function z_(t,e,n){t[e]=math.max(math.min(t[e],n[1]),n[0])}function j_(t,e){return t>=e[0]&&t<=e[1]}function q_(t,e){return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])}function k_(t,e){return t*(e[1]-e[0])+e[0]}var $_=function(t){function e(e){var n=t.call(this,e)||this;n.type="ordinal";var i=n.getsetting("ordinalmeta");return i||(i=new h_({})),f(i)&&(i=new h_({categories:o(i,(function(t){return x(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"string"==typeof t?this._ordinalmeta.getordinal(t):math.round(t)},e.prototype.contain=function(t){return j_(t=this.parse(t),this._extent)&&null!=this._ordinalmeta.categories[t]},e.prototype.normalize=function(t){return q_(t=this._getticknumber(this.parse(t)),this._extent)},e.prototype.scale=function(t){return t=math.round(k_(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.niceticks=function(){},e.prototype.niceextent=function(){},e.type="ordinal",e}(g_);g_.registerclass($_);var j_=ji,q_=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 j_(t,this._extent)},e.prototype.normalize=function(t){return q_(t,this._extent)},e.prototype.scale=function(t){return k_(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=y_(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:j_(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 p(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=zi(t.get("barwidth"),i),d=zi(t.get("barmaxwidth"),i),f=zi(t.get("barminwidth")||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:ix(r),stackid:nx(t)})})),ax(n)}function ax(t){var e={};p(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 p(e,(function(t,e){n[e]={};var i=t.stacks,r=t.bandwidth,o=t.categorygap;if(null==o){var a=e(i).length;o=math.max(35-4*a,15)+"%"}var s=zi(o,r),l=zi(t.gap,1),u=t.remainedwidth,h=t.autowidthcount,c=(u-s)/(h+(h-1)*l);c=math.max(c,0),p(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;p(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;p(i,(function(t,i){n[e][i]=n[e][i]||{bandwidth:r,offset:f,width:t.width},f+=t.width*(1+l)}))})),n}function sx(t,e,n){if(t&&e){var i=t[ix(e)];return null!=i&&null!=n?i[nx(n)]:i}}function lx(t,e){var n=rx(t,e),i=ox(n),r={};p(n,(function(t){var e=t.getdata(),n=t.coordinatesystem,o=n.getbaseaxis(),a=nx(t),s=i[ix(o)][a],l=s.offset,u=s.width,h=n.getotheraxis(o),c=t.get("barminheight")||0;r[a]=r[a]||[],e.setlayout({bandwidth:s.bandwidth,offset:l,size:u});for(var p=e.mapdimension(h.dim),d=e.mapdimension(o.dim),f=v_(e,p),g=h.ishorizontal(),y=px(o,h),v=0,m=e.count();v=0?"p":"n",w=y;f&&(r[a][x]||(r[a][x]={p:y,n:y}),w=r[a][x][b]);var s,m=void 0,i=void 0,t=void 0,c=void 0;if(g)m=w,i=(s=n.datatopoint([_,x]))[1]+l,t=s[0]-y,c=u,math.abs(t).5||(h=.5),{progress:function(t,e){for(var c,p=t.count,d=new ex(2*p),f=new ex(2*p),g=new ex(p),y=[],v=[],m=0,_=0;null!=(c=t.next());)v[u]=e.get(a,c),v[1-u]=e.get(s,c),y=n.datatopoint(v,null),f[m]=l?i.x+i.width:y[0],d[m++]=y[0],f[m]=l?y[1]:i.y+i.height,d[m++]=y[1],g[_++]=c;e.setlayout({largepoints:d,largedataindices:g,largebackgroundpoints:f,barwidth:h,valueaxisstart:px(r,o),backgroundstart:l?i.x:i.y,valueaxishorizontal:l})}}}}};function hx(t){return t.coordinatesystem&&"cartesian2d"===t.coordinatesystem.type}function cx(t){return t.pipelinecontext&&t.pipelinecontext.large}function px(t,e,n){return e.toglobalcoord(e.datatocoord("log"===e.type?1:0))}var dx=function(t){function e(e){var n=t.call(this,e)||this;return n.type="time",n}return n(e,t),e.prototype.getlabel=function(t){var e=this.getsetting("useutc");return ic(t.value,$h[function(t){switch(t){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}(ec(this._minlevelunit))]||$h.second,e,this.getsetting("locale"))},e.prototype.getformattedlabel=function(t,e,n){var i=this.getsetting("useutc");return function(t,e,n,i,r){var o=null;if("string"==typeof n)o=n;else if("function"==typeof n)o=n(t.value,e,{level:t.level});else{var a=i({},qh);if(t.level>0)for(var s=0;s=0;--s)if(l[u]){o=l[u];break}o=o||a.none}if(f(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 ic(new date(t.value),o,r,i)}(t,e,n,this.getsetting("locale"),i)},e.prototype.getticks=function(t){var e=this._interval,n=this._extent,i=[];if(!e)return i;i.push({value:n[0],level:0});var r=this.getsetting("useutc"),o=function(t,e,n,i){var r=1e4,o=qh,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 _=n(o(u,(function(t){return n(t,(function(t){return t.value>=i[0]&&t.value<=i[1]&&!t.notadd}))})),(function(t){return t.length>0})),x=[],b=_.length-1;for(d=0;d<_.length;++d)for(var w=_[d],s=0;sn&&(this._approxinterval=n);var o=fx.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 yx(t){return(t/=2592e6)>6?6:t>3?3:t>2?2:1}function vx(t){return(t/=yh)>12?12:t>6?6:t>3.5?4:t>2?2:1}function mx(t,e){return(t/=e?xh:uh)>30?30:t>20?20:t>15?15:t>10?10:t>5?5:t>2?2:1}function _x(t){return lr(t,!0)}function xx(t,e,n){var i=new date(t);switch(ec(e)){case"year":case"month":i[fc(n)](0);case"day":i[gc(n)](1);case"hour":i[yc(n)](0);case"minute":i[vc(n)](0);case"second":i[mc(n)](0),i[_c(n)](0)}return i.gettime()}g_.registerclass(dx);var bx=g_.prototype,sx=q_.prototype,mx=ji,ix=math.floor,tx=math.ceil,cx=math.pow,dx=math.log,ax=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="log",e.base=10,e._originalscale=new q_,e._interval=0,e}return n(e,t),e.prototype.getticks=function(t){var e=this._originalscale,n=this._extent,i=e.getextent();return o(sx.getticks.call(this,t),(function(t){var e=t.value,r=ji(cx(this.base,e));return r=e===n[0]&&this._fixmin?kx(r,i[0]):r,{value:r=e===n[1]&&this._fixmax?kx(r,i[1]):r}}),this)},e.prototype.setextent=function(t,e){var n=this.base;t=dx(t)/dx(n),e=dx(e)/dx(n),sx.setextent.call(this,t,e)},e.prototype.getextent=function(){var t=this.base,e=bx.getextent.call(this);e[0]=cx(t,e[0]),e[1]=cx(t,e[1]);var n=this._originalscale.getextent();return this._fixmin&&(e[0]=kx(e[0],n[0])),this._fixmax&&(e[1]=kx(e[1],n[1])),e},e.prototype.unionextent=function(t){this._originalscale.unionextent(t);var e=this.base;t[0]=dx(t[0])/dx(e),t[1]=dx(t[1])/dx(e),bx.unionextent.call(this,t)},e.prototype.unionextentfromdata=function(t,e){this.unionextent(t.getapproximateextent(e))},e.prototype.niceticks=function(t){t=t||10;var e=this._extent,n=e[1]-e[0];if(!(n===1/0||n<=0)){var i=ar(n);for(t/n*i<=.5&&(i*=10);!isnan(i)&&math.abs(i)<1&&math.abs(i)>0;)i*=10;var r=[ji(tx(e[0]/i)*i),ji(ix(e[1]/i)*i)];this._interval=i,this._niceextent=r}},e.prototype.niceextent=function(t){sx.niceextent.call(this,t),this._fixmin=t.fixmin,this._fixmax=t.fixmax},e.prototype.parse=function(t){return t},e.prototype.contain=function(t){return j_(t=dx(t)/dx(this.base),this._extent)},e.prototype.normalize=function(t){return q_(t=dx(t)/dx(this.base),this._extent)},e.prototype.scale=function(t){return t=k_(t,this._extent),cx(this.base,t)},e.type="log",e}(g_),lx=ax.prototype;function kx(t,e){return mx(t,ki(e))}lx.getminorticks=sx.getminorticks,lx.getlabel=sx.getlabel,g_.registerclass(ax);var px=function(){function t(t,e,n){this._prepareparams(t,e,n)}return t.prototype._prepareparams=function(t,e,n){n[1]s&&(a=nan,s=nan);var h=j(a)||j(s)||t&&!i;this._needcrosszero&&(a>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[rx[t]]=e},t.prototype.setdeterminedminmax=function(t,e){var n=ox[t];this[n]=e},t.prototype.freeze=function(){this.frozen=!0},t}(),ox={min:"_determinedmin",max:"_determinedmax"},rx={min:"_datamin",max:"_datamax"};function nx(t,e,n){var i=t.rawextentinfo;return i||(i=new px(t,e,n),t.rawextentinfo=i,i)}function zx(t,e){return null==e?null:j(e)?nan:t.parse(e)}function ex(t,e){var n=t.type,i=nx(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=rx("bar",a),l=!1;if(p(s,(function(t){l=l||t.getbaseaxis()===e.axis})),l){var u=ox(s),h=function(t,e,n,i){var r=n.axis.getextent(),o=r[1]-r[0],a=sx(i,n.axis);if(void 0===a)return{min:t,max:e};var s=1/0;p(a,(function(t){s=math.min(t.offset,s)}));var l=-1/0;p(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 vx(t,e){var n=ex(t,e),i=n.extent,r=e.get("splitnumber");t instanceof ax&&(t.base=e.get("logbase"));var o=t.type;t.setextent(i[0],i[1]),t.niceextent({splitnumber:r,fixmin:n.fixmin,fixmax:n.fixmax,mininterval:"interval"===o||"time"===o?e.get("mininterval"):null,maxinterval:"interval"===o||"time"===o?e.get("maxinterval"):null});var a=e.get("interval");null!=a&&t.setinterval&&t.setinterval(a)}function bx(t,e){if(e=e||t.get("type"))switch(e){case"category":return new $_({ordinalmeta:t.getordinalmeta?t.getordinalmeta():t.getcategories(),extent:[1/0,-1/0]});case"time":return new dx({locale:t.ecmodel.getlocalemodel(),useutc:t.ecmodel.get("useutc")});default:return new(g_.getclass(e)||q_)}}function fx(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)}):"string"==typeof i?function(e){return function(n){var i=t.scale.getlabel(n);return e.replace("{value}",null!=i?i:"")}}(i):"function"==typeof i?(e=i,function(n,i){return null!=r&&(i=n.value-r),e(gx(t,n),i,null!=n.level?{level:n.level}:null)}):function(e){return t.scale.getlabel(e)}}function gx(t,e){return"category"===t.type?t.scale.getlabel(e):e.value}function hx(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 gi(t.x,t.y,o,a)}function wx(t){var e=t.get("interval");return null==e?"auto":e}function ux(t){return"category"===t.type&&0===wx(t.getlabelmodel())}function xx(t,e){var n={};return p(t.mapdimensionsall(e),(function(e){n[b_(t,e)]=!0})),e(n)}var yx=function(){function t(){}return t.prototype.getneedcrosszero=function(){return!this.option.scale},t.prototype.getcoordsysmodel=function(){},t}();var zx={isdimensionstacked:v_,enabledatastack:e_,getstackeddimension:b_};var jx=object.freeze({__proto__:null,createlist:function(t){return f_(t.getsource(),t)},getlayoutrect:vc,datastack:zx,createscale:function(t,e){var n=e;e instanceof oh||(n=new oh(e));var i=bx(n);return i.setextent(t[0],t[1]),vx(i,n),i},mixinaxismodelcommonmethods:function(t){l(t,yx)},getecdata:_s,createtextstyle:function(t,e){return ph(t,null,null,"normal"!==(e=e||{}).state)},createdimensions:o_,createsymbol:fy,enablehoveremphasis:sl}),qx=object.freeze({__proto__:null,linearmap:yi,round:ji,asc:qi,getprecision:ki,getprecisionsafe:$i,getpixelprecision:ji,getpercentwithprecision:qi,max_safe_integer:er,remradian:nr,isradianaroundzero:ir,parsedate:or,quantity:ar,quantityexponent:sr,nice:lr,quantile:ur,reformintervals:hr,isnumeric:pr,numerictonumber:cr}),kx=object.freeze({__proto__:null,parse:or,format:ic}),$x=object.freeze({__proto__:null,extendshape:lu,extendpath:pu,makepath:nu,makeimage:zu,mergepath:vu,resizepath:bu,createicon:eh,updateprops:hu,initprops:wu,gettransform:ju,clippointsbyrect:qu,cliprectbyrect:th,registershape:ou,getshapeclass:ru,group:ei,image:es,text:cs,circle:nl,ellipse:el,sector:jl,ring:tu,polygon:ru,polyline:au,rect:ls,line:uu,beziercurve:du,arc:gu,incrementaldisplayable:tu,compoundpath:yu,lineargradient:mu,radialgradient:_u,boundingrect:gi}),jx=object.freeze({__proto__:null,addcommas:xc,tocamelcase:bc,normalizecssarray:wc,encodehtml:ic,formattpl:ac,gettooltipmarker:lc,formattime:function(t,e,n){"week"!==t&&"month"!==t&&"quarter"!==t&&"half-year"!==t&&"year"!==t||(t="mm-dd\nyyyy");var i=or(e),r=n?"utc":"",o=i["get"+r+"fullyear"](),a=i["get"+r+"month"]()+1,s=i["get"+r+"date"](),l=i["get"+r+"hours"](),u=i["get"+r+"minutes"](),h=i["get"+r+"seconds"](),c=i["get"+r+"milliseconds"]();return t=t.replace("mm",tc(a,2)).replace("m",a).replace("yyyy",o).replace("yy",o%100+"").replace("dd",tc(s,2)).replace("d",s).replace("hh",tc(l,2)).replace("h",l).replace("mm",tc(u,2)).replace("m",u).replace("ss",tc(h,2)).replace("s",h).replace("sss",tc(c,3))},capitalfirst:function(t){return t?t.charat(0).touppercase()+t.substr(1):t},truncatetext:ao,gettextrect:function(t,e,n,i,r,o,a,s){return yr(),new cs({style:{text:t,font:e,align:n,verticalalign:i,padding:r,rich:o,overflow:a?"truncate":null,lineheight:s}}).getboundingrect()}}),qx=object.freeze({__proto__:null,map:o,each:p,indexof:d,inherits:a,reduce:r,filter:n,bind:v,curry:b,isarray:f,isstring:h,isobject:x,isfunction:g,extend:i,defaults:t,clone:w,merge:s}),tb=kr();function eb(t){return"category"===t.type?function(t){var e=t.getlabelmodel(),n=ib(t,e);return!e.get("show")||t.scale.isblank()?{labels:[],labelcategoryinterval:n.labelcategoryinterval}:n}(t):function(t){var e=t.scale.getticks(),n=fx(t);return{labels:o(e,(function(e,i){return{formattedlabel:n(e,i),rawlabel:t.scale.getlabel(e),tickvalue:e.value}}))}}(t)}function nb(t,e){return"category"===t.type?function(t,e){var n,i,r=rb(t,"ticks"),o=wx(e),a=ob(r,o);if(a)return a;e.get("show")&&!t.scale.isblank()||(n=[]);if(g(o))n=lb(t,o,!0);else if("auto"===o){var s=ib(t,t.getlabelmodel());i=s.labelcategoryinterval,n=o(s.labels,(function(t){return t.tickvalue}))}else n=sb(t,i=o,!0);return ab(r,o,{ticks:n,tickcategoryinterval:i})}(t,e):{ticks:o(t.scale.getticks(),(function(t){return t.value}))}}function ib(t,e){var n,i,r=rb(t,"labels"),o=wx(e),a=ob(r,o);return a||(g(o)?n=lb(t,o):(i="auto"===o?function(t){var e=tb(t).autointerval;return null!=e?e:tb(t).autointerval=t.calculatecategoryinterval()}(t):o,n=sb(t,i)),ab(r,o,{labels:n,labelcategoryinterval:i}))}function rb(t,e){return tb(t)[e]||(tb(t)[e]=[])}function ob(t,e){for(var n=0;n1&&h/l>2&&(u=math.round(math.ceil(u/l)*l));var c=ux(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 lb(t,e,n){var i=t.scale,r=fx(t),o=[];return p(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 ub=[0,1],hb=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 ji(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&&cb(n=n.slice(),i.count()),yi(t,ub,n,e)},t.prototype.coordtodata=function(t,e){var n=this._extent,i=this.scale;this.onband&&"ordinal"===i.type&&cb(n=n.slice(),i.count());var r=yi(t,n,ub,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=o(nb(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;p(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=ji(t),e=ji(e),h?t>e:t0&&t<100||(t=5),o(this.scale.getminorticks(t),(function(t){return o(t,(function(t){return{coord:this.datatocoord(t),tickvalue:t}}),this)}),this)},t.prototype.getviewlabels=function(){return eb(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=fx(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=bi(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 _=math.max(0,math.floor(math.min(v,m))),x=tb(t.model),b=t.getextent(),w=x.lastautointerval,s=x.lasttickcount;return null!=w&&null!=s&&math.abs(w-_)<=1&&math.abs(s-a)<=1&&w>_&&x.axisextent0===b[0]&&x.axisextent1===b[1]?_=w:(x.lasttickcount=a,x.lastautointerval=_,x.axisextent0=b[0],x.axisextent1=b[1]),_}(this)},t}();function cb(t,e){var n=(t[1]-t[0])/e/2;t[0]+=n,t[1]-=n}function pb(t){return document.createelementns("http://www.w3.org/2000/svg",t)}function db(t,e,n,i,r){for(var o=e.length,a=n.length,s=t.newpos,l=s-i,u=0;s+1=i&&l+1>=r){for(var u=[],h=0;h=i&&c+1>=r)return gb(l.components);s[a]=l}else s[a]=void 0}var f;o++}for(;o<=a;){var p=c();if(p)return p}}(t,e,n)}var vb="none",mb=math.round,_b=math.sin,xb=math.cos,bb=math.pi,wb=2*math.pi,sb=180/bb,mb=1e-4;function ib(t){return mb(1e3*t)/1e3}function tb(t){return mb(1e4*t)/1e4}function cb(t){return t-1e-4}function db(t,e){e&&ab(t,"transform","matrix("+ib(e[0])+","+ib(e[1])+","+ib(e[2])+","+ib(e[3])+","+tb(e[4])+","+tb(e[5])+")")}function ab(t,e,n){(!n||"linear"!==n.type&&"radial"!==n.type)&&t.setattribute(e,n)}function lb(t,e,n){var i=null==e.opacity?1:e.opacity;if(n instanceof es)t.style.opacity=i+"";else{if(function(t){var e=t.fill;return null!=e&&e!==vb}(e)){var r=e.fill;ab(t,"fill",r="transparent"===r?vb:r),ab(t,"fill-opacity",(null!=e.fillopacity?e.fillopacity*i:i)+"")}else ab(t,"fill",vb);if(function(t){var e=t.stroke;return null!=e&&e!==vb}(e)){var o=e.stroke;ab(t,"stroke",o="transparent"===o?vb:o);var a=e.linewidth,s=e.strokenoscale?n.getlinescale():1;ab(t,"stroke-width",(s?a/s:0)+""),ab(t,"paint-order",e.strokefirst?"stroke":"fill"),ab(t,"stroke-opacity",(null!=e.strokeopacity?e.strokeopacity*i:i)+"");var l=e.linedash&&a>0&&vy(e.linedash,a);if(l){var u=e.linedashoffset;s&&1!==s&&(l=o(l,(function(t){return t/s})),u&&(u=mb(u/=s))),ab(t,"stroke-dasharray",l.join(",")),ab(t,"stroke-dashoffset",(u||0)+"")}else ab(t,"stroke-dasharray","");e.linecap&&ab(t,"stroke-linecap",e.linecap),e.linejoin&&ab(t,"stroke-linejoin",e.linejoin),e.miterlimit&&ab(t,"stroke-miterlimit",e.miterlimit+"")}else ab(t,"stroke",vb)}}var kb=function(){function t(){}return t.prototype.reset=function(){this._d=[],this._str=""},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=0===this._d.length,u=a-o,h=!s,c=math.abs(u),p=cb(c-wb)||(h?u>=wb:-u>=wb),d=u>0?u%wb:u%wb+wb,f=!1;f=!!p||!cb(c)&&d>=bb==!!h;var g=tb(t+n*xb(o)),y=tb(e+i*_b(o));p&&(u=h?wb-1e-4:1e-4-wb,f=!0,l&&this._d.push("m",g,y));var v=tb(t+n*xb(o+u)),m=tb(e+i*_b(o+u));if(isnan(g)||isnan(y)||isnan(n)||isnan(i)||isnan(r)||isnan(sb)||isnan(v)||isnan(m))return"";this._d.push("a",tb(n),tb(i),mb(r*sb),+f,+h,v,m)},t.prototype.rect=function(t,e,n,i){this._add("m",t,e),this._add("l",t+n,e),this._add("l",t+n,e+i),this._add("l",t,e+i),this._add("l",t,e)},t.prototype.closepath=function(){this._d.length>0&&this._add("z")},t.prototype._add=function(t,e,n,i,r,o,a,s,l){this._d.push(t);for(var u=1;u=0;--n)if(e[n]===t)return!0;return!1}),i}return null}return n[0]},t.prototype.doupdate=function(t,e){if(t){var n=this.getdefs(!1);if(t[this._domname]&&n.contains(t[this._domname]))"function"==typeof e&&e(t);else{var i=this.add(t);i&&(t[this._domname]=i)}}},t.prototype.add=function(t){return null},t.prototype.adddom=function(t){var e=this.getdefs(!0);t.parentnode!==e&&e.appendchild(t)},t.prototype.removedom=function(t){var e=this.getdefs(!1);e&&t[this._domname]&&(e.removechild(t[this._domname]),t[this._domname]=null)},t.prototype.getdoms=function(){var t=this.getdefs(!1);if(!t)return[];var e=[];return p(this._tagnames,(function(n){for(var i=t.getelementsbytagname(n),r=0;r-1){var s=he(a)[3],l=xe(a);o.setattribute("stop-color","#"+l),o.setattribute("stop-opacity",s+"")}else o.setattribute("stop-color",n[i].color);e.appendchild(o)}t.__dom=e},e.prototype.markused=function(e){if(e.style){var n=e.style.fill;n&&n.__dom&&t.prototype.markdomused.call(this,n.__dom),(n=e.style.stroke)&&n.__dom&&t.prototype.markdomused.call(this,n.__dom)}},e}(zb);function gb(t){return t&&(!!t.image||!!t.svgelement)}var hb=new oy,wb=function(t){function e(e,n){return t.call(this,e,n,["pattern"],"__pattern_in_use__")||this}return n(e,t),e.prototype.addwithoutupdate=function(t,e){if(e&&e.style){var n=this;p(["fill","stroke"],(function(i){var r=e.style[i];if(gb(r)){var o=n.getdefs(!0),a=hb.get(r);a?o.contains(a)||n.adddom(a):a=n.add(r),n.markused(e);var s=a.getattribute("id");t.setattribute(i,"url(#"+s+")")}}))}},e.prototype.add=function(t){if(gb(t)){var e=this.createelement("pattern");return t.id=null==t.id?this.nextid++:t.id,e.setattribute("id","zr"+this._zrid+"-pattern-"+t.id),e.setattribute("x","0"),e.setattribute("y","0"),e.setattribute("patternunits","userspaceonuse"),this.updatedom(t,e),this.adddom(e),e}},e.prototype.update=function(t){if(gb(t)){var e=this;this.doupdate(t,(function(){var n=hb.get(t);e.updatedom(t,n)}))}},e.prototype.updatedom=function(t,e){var n=t.svgelement;if(n instanceof svgelement)n.parentnode!==e&&(e.innerhtml="",e.appendchild(n),e.setattribute("width",t.svgwidth+""),e.setattribute("height",t.svgheight+""));else{var i=void 0,r=e.getelementsbytagname("image");if(r.length){if(!t.image)return void e.removechild(r[0]);i=r[0]}else t.image&&(i=this.createelement("image"));if(i){var o=void 0,a=t.image;if("string"==typeof a?o=a:a instanceof htmlimageelement?o=a.src:a instanceof htmlcanvaselement&&(o=a.todataurl()),o){i.setattribute("href",o),i.setattribute("x","0"),i.setattribute("y","0");var s=no(o,i,{dirty:function(){}},(function(t){e.setattribute("width",t.width+""),e.setattribute("height",t.height+"")}));s&&s.width&&s.height&&(e.setattribute("width",s.width+""),e.setattribute("height",s.height+"")),e.appendchild(i)}}}var l="translate("+(t.x||0)+", "+(t.y||0)+") rotate("+(t.rotation||0)/math.pi*180+") scale("+(t.scalex||1)+", "+(t.scaley||1)+")";e.setattribute("patterntransform",l),hb.set(t,e)},e.prototype.markused=function(e){e.style&&(gb(e.style.fill)&&t.prototype.markdomused.call(this,hb.get(e.style.fill)),gb(e.style.stroke)&&t.prototype.markdomused.call(this,hb.get(e.style.stroke)))},e}(zb);function ub(t){var e=t.__clippaths;return e&&e.length>0}var xb=function(t){function e(e,n){var i=t.call(this,e,n,"clippath","__clippath_in_use__")||this;return i._refgroups={},i._keyduplicatecount={},i}return n(e,t),e.prototype.markallunused=function(){for(var e in t.prototype.markallunused.call(this),this._refgroups)this.markdomunused(this._refgroups[e]);this._keyduplicatecount={}},e.prototype._getclippathgroup=function(t,e){if(ub(t)){var n=t.__clippaths,i=this._keyduplicatecount,r=function(t){var e=[];if(t)for(var n=0;n0){var n=this.getdefs(!0),i=e[0],r=void 0,o=void 0;i._dom?(o=i._dom.getattribute("id"),r=i._dom,n.contains(r)||n.appendchild(r)):(o="zr"+this._zrid+"-clip-"+this.nextid,++this.nextid,(r=this.createelement("clippath")).setattribute("id",o),n.appendchild(r),i._dom=r),this.getsvgproxy(i).brush(i);var a=this.getsvgelement(i);r.innerhtml="",r.appendchild(a),t.setattribute("clip-path","url(#"+o+")"),e.length>1&&this.updatedom(r,e.slice(1))}else t&&t.setattribute("clip-path","none")},e.prototype.markused=function(e){var n=this;e.__clippaths&&p(e.__clippaths,(function(e){e._dom&&t.prototype.markdomused.call(n,e._dom)}))},e.prototype.removeunused=function(){t.prototype.removeunused.call(this);var e={};for(var n in this._refgroups){var i=this._refgroups[n];this.isdomunused(i)?i.parentnode&&i.parentnode.removechild(i):e[n]=i}this._refgroups=e},e}(zb),yb=function(t){function e(e,n){var i=t.call(this,e,n,["filter"],"__filter_in_use__","_shadowdom")||this;return i._shadowdommap={},i._shadowdompool=[],i}return n(e,t),e.prototype._getfrompool=function(){var t=this._shadowdompool.pop();if(!t){(t=this.createelement("filter")).setattribute("id","zr"+this._zrid+"-shadow-"+this.nextid++);var e=this.createelement("fedropshadow");t.appendchild(e),this.adddom(t)}return t},e.prototype.update=function(t,e){if(function(t){return t&&(t.shadowblur||t.shadowoffsetx||t.shadowoffsety)}(e.style)){var n=function(t){var e=t.style,n=t.getglobalscale();return[e.shadowcolor,(e.shadowblur||0).tofixed(2),(e.shadowoffsetx||0).tofixed(2),(e.shadowoffsety||0).tofixed(2),n[0],n[1]].join(",")}(e),i=e._shadowdom=this._shadowdommap[n];i||(i=this._getfrompool(),this._shadowdommap[n]=i),this.updatedom(t,e,i)}else this.remove(t,e)},e.prototype.remove=function(t,e){null!=e._shadowdom&&(e._shadowdom=null,t.style.filter="")},e.prototype.updatedom=function(t,e,n){var i=n.children[0],r=e.style,o=e.getglobalscale(),a=o[0],s=o[1];if(a&&s){var l=r.shadowoffsetx||0,u=r.shadowoffsety||0,h=r.shadowblur,c=r.shadowcolor;i.setattribute("dx",l/a+""),i.setattribute("dy",u/s+""),i.setattribute("flood-color",c);var p=h/2/a+" "+h/2/s;i.setattribute("stddeviation",p),n.setattribute("x","-100%"),n.setattribute("y","-100%"),n.setattribute("width","300%"),n.setattribute("height","300%"),e._shadowdom=n;var d=n.getattribute("id");t.style.filter="url(#"+d+")"}},e.prototype.removeunused=function(){if(this.getdefs(!1)){var t=this._shadowdompool;for(var e in this._shadowdommap){var n=this._shadowdommap[e];t.push(n)}this._shadowdommap={}}},e}(zb);function zb(t){return parseint(t,10)}function jb(t){return t instanceof ka?pb:t instanceof es?ob:t instanceof ja?nb:pb}function qb(t,e){return e&&t&&e.parentnode!==t}function kb(t,e,n){if(qb(t,e)&&n){var i=n.nextsibling;i?t.insertbefore(e,i):t.appendchild(e)}}function $b(t,e){if(qb(t,e)){var n=t.firstchild;n?t.insertbefore(e,n):t.appendchild(e)}}function jb(t,e){e&&t&&e.parentnode===t&&t.removechild(e)}function qb(t){return t.__svgel}var tw=function(){function t(t,e,n,i){this.type="svg",this.refreshhover=ew("refreshhover"),this.pathtoimage=ew("pathtoimage"),this.configlayer=ew("configlayer"),this.root=t,this.storage=e,this._opts=n=i({},n||{});var r=pb("svg");r.setattributens("http://www.w3.org/2000/xmlns/","xmlns","http://www.w3.org/2000/svg"),r.setattributens("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"),r.setattribute("version","1.1"),r.setattribute("baseprofile","full"),r.style.csstext="user-select:none;position:absolute;left:0;top:0;";var o=pb("g");r.appendchild(o);var a=pb("g");r.appendchild(a),this._gradientmanager=new fb(i,a),this._patternmanager=new wb(i,a),this._clippathmanager=new xb(i,a),this._shadowmanager=new yb(i,a);var s=document.createelement("div");s.style.csstext="overflow:hidden;position:relative",this._svgdom=r,this._svgroot=a,this._backgroundroot=o,this._viewport=s,t.appendchild(s),s.appendchild(r),this.resize(n.width,n.height),this._visiblelist=[]}return t.prototype.gettype=function(){return"svg"},t.prototype.getviewportroot=function(){return this._viewport},t.prototype.getsvgdom=function(){return this._svgdom},t.prototype.getsvgroot=function(){return this._svgroot},t.prototype.getviewportrootoffset=function(){var t=this.getviewportroot();if(t)return{offsetleft:t.offsetleft||0,offsettop:t.offsettop||0}},t.prototype.refresh=function(){var t=this.storage.getdisplaylist(!0);this._paintlist(t)},t.prototype.setbackgroundcolor=function(t){this._backgroundroot&&this._backgroundnode&&this._backgroundroot.removechild(this._backgroundnode);var e=pb("rect");e.setattribute("width",this.getwidth()),e.setattribute("height",this.getheight()),e.setattribute("x",0),e.setattribute("y",0),e.setattribute("id",0),e.style.fill=t,this._backgroundroot.appendchild(e),this._backgroundnode=e},t.prototype.createsvgelement=function(t){return pb(t)},t.prototype.paintone=function(t){var e=jb(t);return e&&e.brush(t),qb(t)},t.prototype._paintlist=function(t){var e=this._gradientmanager,n=this._patternmanager,i=this._clippathmanager,r=this._shadowmanager;e.markallunused(),n.markallunused(),i.markallunused(),r.markallunused();for(var o=this._svgroot,a=this._visiblelist,s=t.length,l=[],u=0;u\n\r<"))},t}();function ew(t){return function(){b('in svg mode painter not support method "'+t+'"')}}function nw(){return!1}function iw(t,e,n){var i=c(),r=e.getwidth(),o=e.getheight(),a=i.style;return a&&(a.position="absolute",a.left="0",a.top="0",a.width=r+"px",a.height=o+"px",i.setattribute("data-zr-dom-id",t)),i.width=r*n,i.height=o*n,i}var rw=function(t){function e(e,n,i){var r,o=t.call(this)||this;o.motionblur=!1,o.lastframealpha=.7,o.dpr=1,o.virtual=!1,o.config={},o.incremental=!1,o.zlevel=0,o.maxrepaintrectcount=5,o.__dirty=!0,o.__firsttimepaint=!0,o.__used=!1,o.__drawindex=0,o.__startindex=0,o.__endindex=0,o.__prevstartindex=null,o.__prevendindex=null,i=i||en,"string"==typeof e?r=iw(e,n,i):x(e)&&(e=(r=e).id),o.id=e,o.dom=r;var a=r.style;return a&&(r.onselectstart=nw,a.webkituserselect="none",a.userselect="none",a.webkittaphighlightcolor="rgba(0,0,0,0)",a["-webkit-touch-callout"]="none",a.padding="0",a.margin="0",a.borderwidth="0"),o.domback=null,o.ctxback=null,o.painter=n,o.config=null,o.dpr=i,o}return n(e,t),e.prototype.getelementcount=function(){return this.__endindex-this.__startindex},e.prototype.afterbrush=function(){this.__prevstartindex=this.__startindex,this.__prevendindex=this.__endindex},e.prototype.initcontext=function(){this.ctx=this.dom.getcontext("2d"),this.ctx.dpr=this.dpr},e.prototype.setunpainted=function(){this.__firsttimepaint=!0},e.prototype.createbackbuffer=function(){var t=this.dpr;this.domback=iw("back-"+this.id,this.painter,t),this.ctxback=this.domback.getcontext("2d"),1!==t&&this.ctxback.scale(t,t)},e.prototype.createrepaintrects=function(t,e,n,i){if(this.__firsttimepaint)return this.__firsttimepaint=!1,null;var r,o=[],a=this.maxrepaintrectcount,s=!1,l=new gi(0,0,0,0);function u(t){if(t.isfinite()&&!t.iszero())if(0===o.length){(e=new gi(0,0,0,0)).copy(t),o.push(e)}else{for(var e,n=!1,i=1/0,r=0,u=0;u=a)}}for(var h=this.__startindex;h15)break}n.prevelclippaths&&u.restore()};if(p)if(0===p.length)s=l.__endindex;else for(var x=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}else b("layer of zlevel "+t+" is not valid")},t.prototype.eachlayer=function(t,e){for(var n=this._zlevellist,i=0;i0?sw:0),this._needsmanuallycompositing),u.__builtin__||b("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,p(this._layers,(function(t){t.setunpainted()}))},t.prototype.configlayer=function(t,e){if(e){var n=this._layerconfig;n[t]?s(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={zlevel:0,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,linestyle:{width:"bolder"}},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},e}(ff);function cw(t,e){var n=t.mapdimensionsall("defaultedlabel"),i=n.length;if(1===i){var r=md(t,e,n[0]);return null!=r?r+"":null}if(i){for(var o=[],a=0;a0?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=o(t.dimensions,(function(t){return e.mapdimension(t)})),p=!1,d=e.getcalculationinfo("stackresultdimension");return v_(e,c[0])&&(p=!0,c[0]=d),v_(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 xw(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 bw="undefined"!=typeof float32array,ww=bw?float32array:array;function sw(t){return f(t)?bw?new float32array(t):t:new ww(t)}var mw=math.min,iw=math.max;function tw(t,e){return isnan(t)||isnan(e)}function cw(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(tw(v,m)){if(l){g+=o;continue}break}if(g===n)t[o>0?"moveto":"lineto"](v,m),c=v,p=m;else{var _=v-u,x=m-h;if(_*_+x*x<.5){g+=o;continue}if(a>0){var b=g+o,w=e[2*b],s=e[2*b+1],m=y+1;if(l)for(;tw(w,s)&&m=i||tw(w,s))d=v,f=m;else{t=w-u,c=s-h;var l=v-u,k=w-v,p=m-h,o=s-m,r=void 0,n=void 0;"x"===s?(r=math.abs(l),n=math.abs(k),d=v-r*a,f=m,d=v+r*a,a=m):"y"===s?(r=math.abs(p),n=math.abs(o),d=v,f=m-r*a,d=v,a=m+r*a):(r=math.sqrt(l*l+p*p),d=v-t*a*(1-(i=(n=math.sqrt(k*k+o*o))/(n+r))),f=m-c*a*(1-i),a=m+c*a*i,d=mw(d=v+t*a*i,iw(w,v)),a=mw(a,iw(s,m)),d=iw(d,mw(w,v)),f=m-(c=(a=iw(a,mw(s,m)))-m)*r/n,d=mw(d=v-(t=d-v)*r/n,iw(u,v)),f=mw(f,iw(h,m)),d=v+(t=v-(d=iw(d,mw(u,v))))*n/r,a=m+(c=m-(f=iw(f,mw(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 dw=function(){this.smooth=0,this.smoothconstraint=!0},aw=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 dw},e.prototype.buildpath=function(t,e){var n=e.points,i=0,r=n.length/2;if(e.connectnulls){for(;r>0&&tw(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?bo(n,u,c,d,t,s):bo(i,h,p,f,t,s);if(v>0)for(var m=0;m=0){y=a?eo(i,h,p,f,_):eo(n,u,c,d,_);return a?[t,y]:[y,t]}}n=d,i=f}}},e}(ka),lw=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e}(dw),kw=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 lw},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&&tw(n[2*o-2],n[2*o-1]);o--);for(;ri)return!1;return!0}(o,e))){var a=e.mapdimension(o.dim),s={};return p(o.getviewlabels(),(function(t){var e=o.scale.getrawordinalnumber(t.tickvalue);s[e]=1})),function(t){return!s.hasownproperty(e.get(a,t))}}}}function hw(t,e){return[t[2*e],t[2*e+1]]}function ww(t,e,n,i){if(nw(e,"cartesian2d")){var r=i.getmodel("endlabel"),o=r.get("show"),a=r.get("valueanimation"),s=i.getdata(),l={lastframeindex:0},u=o?function(n,i){t._endlabelonduring(n,i,s,l,a,r,e)}:null,h=e.getbaseaxis().ishorizontal(),c=pw(e,n,i,(function(){var e=t._endlabel;e&&n&&null!=l.originalx&&e.attr({x:l.originalx,y:l.originaly})}),u);if(!i.get("clip",!0)){var p=c.shape,d=math.max(p.width,p.height);h?(p.y-=d,p.height+=2*d):(p.x-=d,p.width+=2*d)}return u&&u(1,c),c}return ow(e,n,i)}var uw=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.init=function(){var t=new ei,e=new mw;this.group.add(e.group),this._symboldraw=e,this._linegroup=t},e.prototype.render=function(t,e,n){var i=this,r=t.coordinatesystem,o=this.group,a=t.getdata(),s=t.getmodel("linestyle"),l=t.getmodel("areastyle"),u=a.getlayout("points")||[],h="polar"===r.type,c=this._coordsys,p=this._symboldraw,d=this._polyline,f=this._polygon,g=this._linegroup,y=t.get("animation"),v=!l.isempty(),m=l.get("origin"),_=_w(r,a,m),x=v&&function(t,e,n){if(!n.valuedim)return[];for(var i=e.count(),r=sw(2*i),o=0;o=0;o--){var a=n[o].dimension,s=t.dimensions[a],l=t.getdimensioninfo(s);if("x"===(i=l&&l.coorddim)||"y"===i){r=n[o];break}}if(r){var u=e.getaxis(i),h=o(r.stops,(function(t){return{offset:0,coord:u.toglobalcoord(u.datatocoord(t.value,!0)),color:t.color}})),c=h.length,p=r.outercolors.slice();c&&h[0].coord>h[c-1].coord&&(h.reverse(),p.reverse());var d=h[0].coord-10,f=h[c-1].coord+10,g=f-d;if(g<.001)return"transparent";p(h,(function(t){t.offset=(t.coord-d)/g})),h.push({offset:c?h[c-1].offset:.5,color:p[1]||"transparent"}),h.unshift({offset:c?h[0].offset:.5,color:p[0]||"transparent"});var y=new mu(0,0,0,0,h,!0);return y[i]=d,y[i+"2"]=f,y}}}(a,r)||a.getvisual("style")[a.getvisual("drawtype")];d&&c.type===r.type&&i===this._step?(v&&!f?f=this._newpolygon(u,x):f&&!v&&(g.remove(f),f=this._polygon=null),h||this._initorupdateendlabel(t,r,kc(c)),g.setclippath(ww(this,r,!1,t)),b&&p.updatedata(a,{isignore:w,clipshape:m,disableanimation:!0,getsymbolpoint:function(t){return[u[2*t],u[2*t+1]]}}),zw(this._stackedonpoints,x)&&zw(this._points,u)||(y?this._doupdateanimation(a,x,r,n,i,m):(i&&(u=fw(u,r,i),x&&(x=fw(x,r,i))),d.setshape({points:u}),f&&f.setshape({points:u,stackedonpoints:x})))):(b&&p.updatedata(a,{isignore:w,clipshape:m,disableanimation:!0,getsymbolpoint:function(t){return[u[2*t],u[2*t+1]]}}),y&&this._initsymbollabelanimation(a,r,m),i&&(u=fw(u,r,i),x&&(x=fw(x,r,i))),d=this._newpolyline(u),v&&(f=this._newpolygon(u,x)),h||this._initorupdateendlabel(t,r,kc(c)),g.setclippath(ww(this,r,!0,t)));var d=t.get(["emphasis","focus"]),a=t.get(["emphasis","blurscope"]);(d.usestyle(t(s.getlinestyle(),{fill:"none",stroke:c,linejoin:"bevel"})),cl(d,t,"linestyle"),d.style.linewidth>0&&"bolder"===t.get(["emphasis","linestyle","width"]))&&(d.getstate("emphasis").style.linewidth=+d.style.linewidth+1);_s(d).seriesindex=t.seriesindex,sl(d,d,a);var l=bw(t.get("smooth")),k=t.get("smoothmonotone"),r=t.get("connectnulls");if(d.setshape({smooth:l,smoothmonotone:k,connectnulls:r}),f){var n=a.getcalculationinfo("stackedonseries"),z=0;f.usestyle(t(l.getareastyle(),{fill:c,opacity:.7,linejoin:"bevel",decal:a.getvisual("style").decal})),n&&(z=bw(n.get("smooth"))),f.setshape({smooth:l,stackedonsmooth:z,smoothmonotone:k,connectnulls:r}),cl(f,t,"areastyle"),_s(f).seriesindex=t.seriesindex,sl(f,d,a)}var e=function(t){i._changepolystate(t)};a.eachitemgraphicel((function(t){t&&(t.onhoverstatechange=e)})),this._polyline.onhoverstatechange=e,this._data=a,this._coordsys=r,this._stackedonpoints=x,this._points=u,this._step=i,this._valueorigin=m},e.prototype.dispose=function(){},e.prototype.highlight=function(t,e,n,i){var r=t.getdata(),o=lr(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 dw(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 tf.prototype.highlight.call(this,t,e,n,i)},e.prototype.downplay=function(t,e,n,i){var r=t.getdata(),o=lr(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 tf.prototype.downplay.call(this,t,e,n,i)},e.prototype._changepolystate=function(t){var e=this._polygon;ws(this._polyline,t),e&&ws(e,t)},e.prototype._newpolyline=function(t){var e=this._polyline;return e&&this._linegroup.remove(e),e=new aw({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 kw({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");"function"==typeof l&&(l=l(null));var u=s.get("animationdelay")||0,h="function"==typeof 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 _="function"==typeof u?u(o):l*m+h,x=s.getsymbolpath(),b=x.gettextcontent();s.attr({scalex:0,scaley:0}),s.animateto({scalex:1,scaley:1},{duration:200,delay:_}),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(i.get("show")){var r=t.getdata(),o=this._polyline,a=this._endlabel;a||((a=this._endlabel=new cs({z2:200})).ignoreclip=!0,o.settextcontent(this._endlabel),o.disablelabelanimation=!0);var s=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}(r.getlayout("points"));s>=0&&(hh(o,ch(t,"endlabel"),{inheritcolor:n,labelfetcher:t,labeldataindex:s,defaulttext:function(t,e,n){return null!=n?pw(r,n):cw(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,_=(g?d:0)*(y?-1:1),x=(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=hw(u,s[0]);s.attr({x:t[0]+_,y:t[1]+x}),r&&(i=h.getrawvalue(s[0]))}else{(t=l.getpointon(m,b))&&s.attr({x:t[0]+_,y:t[1]+x});var c=h.getrawvalue(s[0]),d=h.getrawvalue(s[1]);r&&(i=fr(n,p,c,d,w.t))}i.lastframeindex=s[0]}else{var a=1===t||i.lastframeindex>0?s[0]:0;t=hw(u,a);r&&(i=h.getrawvalue(a)),s.attr({x:t[0]+_,y:t[1]+x})}r&&_h(s).setlabeltext(i)}},e.prototype._doupdateanimation=function(t,e,n,i,r,o){var a=this._polyline,s=this._polygon,l=t.hostmodel,u=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=_w(r,e,a),v=t.getlayout("points")||[],m=e.getlayout("points")||[],_=0;_3e3||s&&vw(c,d)>3e3)return a.setshape({points:p}),void(s&&s.setshape({points:p,stackedonpoints:d}));a.shape.__points=u.current,a.shape.points=h;var f={shape:{points:p}};u.current!==h&&(f.shape.__points=u.next),a.stopanimation(),hu(a,f,l),s&&(s.setshape({points:h,stackedonpoints:c}),s.stopanimation(),hu(s,{shape:{stackedonpoints:d}},l),a.shape.points!==s.shape.points&&(s.shape.points=a.shape.points));for(var g=[],y=u.status,v=0;ve&&(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(p>1){"lttb"===r&&t.setdata(i.lttbdownsample(i.mapdimension(l.dim),1/p));var d=void 0;"string"==typeof r?d=yw[r]:"function"==typeof r&&(d=r),d&&t.setdata(i.downsample(i.mapdimension(l.dim),1/p,d,zw))}}}}}var qw=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 f_(this.getsource(),this,{useencodedefaulter:!0})},e.prototype.getmarkerposition=function(t){var e=this.coordinatesystem;if(e){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={zlevel:0,z:2,coordinatesystem:"cartesian2d",legendhoverlink:!0,barminheight:0,barminangle:0,large:!1,largethreshold:400,progressive:3e3,progressivechunkmode:"mod"},e}(ff);ff.registerclass(qw);var kw=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 f_(this.getsource(),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=zh(qw.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}(qw),$w=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startangle=0,this.endangle=2*math.pi,this.clockwise=!0},jw=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 $w},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=math.cos(l),p=math.sin(l),d=math.cos(u),f=math.sin(u);(h?u-l<2*math.pi:l-u<2*math.pi)&&(t.moveto(c*r+n,p*r+i),t.arc(c*s+n,p*s+i,a,-math.pi+l,l,!h)),t.arc(n,i,o,l,u,!h),t.moveto(d*o+n,f*o+i),t.arc(d*s+n,f*s+i,a,u-2*math.pi,u-math.pi,!h),0!==r&&(t.arc(n,i,r,u,l,h),t.moveto(c*r+n,f*r+i)),t.closepath()},e}(ka),qw=[0,0],ts=math.max,es=math.min;var ns=function(t){function e(){var n=t.call(this)||this;return n.type=e.type,n._isfirstframe=!0,n}return n(e,t),e.prototype.render=function(t,e,n,i){this._model=t,this._removeonrenderedlistener(n),this._updatedrawmode(t);var r=t.get("coordinatesystem");("cartesian2d"===r||"polar"===r)&&(this._islargedraw?this._renderlarge(t,e,n):this._rendernormal(t,e,n,i))},e.prototype.incrementalpreparerender=function(t){this._clear(),this._updatedrawmode(t),this._updatelargeclip(t)},e.prototype.incrementalrender=function(t,e){this._incrementalrenderlarge(t,e)},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,e,n,i){var r,o=this.group,a=t.getdata(),s=this._data,l=t.coordinatesystem,u=l.getbaseaxis();"cartesian2d"===l.type?r=u.ishorizontal():"polar"===l.type&&(r="angle"===u.dim);var h=t.isanimationenabled()?t:null,c=function(t,e){var n=t.get("realtimesort",!0),i=e.getbaseaxis();0;if(n&&"category"===i.type&&"cartesian2d"===e.type)return{baseaxis:i,otheraxis:e.getotheraxis(i)}}(t,l);c&&this._enablerealtimesort(c,a,n);var p=t.get("clip",!0)||c,d=function(t,e){var n=t.getarea&&t.getarea();if(nw(t,"cartesian2d")){var i=t.getbaseaxis();if("category"!==i.type||!i.onband){var r=e.getlayout("bandwidth");i.ishorizontal()?(n.x-=r,n.width+=2*r):(n.y-=r,n.height+=2*r)}}return n}(l,a);o.removeclippath();var f=t.get("roundcap",!0),g=t.get("showbackground",!0),y=t.getmodel("backgroundstyle"),v=y.get("borderradius")||0,m=[],_=this._backgroundels,x=i&&i.isinitsort,b=i&&"changeaxisorder"===i.type;function w(t){var e=as[l.type](a,t),n=function(t,e,n){return new("polar"===t.type?jl:ls)({shape:ps(e,n,t),silent:!0,z2:0})}(l,r,e);return n.usestyle(y.getitemstyle()),"cartesian2d"===l.type&&n.setshape("r",v),m[t]=n,n}a.diff(s).add((function(e){var n=a.getitemmodel(e),i=as[l.type](a,e,n);if(g&&w(e),a.hasvalue(e)){var s=!1;p&&(s=is[l.type](d,i));var y=rs[l.type](t,a,e,i,r,h,u.model,!1,f);ss(y,a,e,n,i,t,r,"polar"===l.type),x?y.attr({shape:i}):c?os(c,h,y,i,e,r,!1,!1):wu(y,{shape:i},t,e),a.setitemgraphicel(e,y),o.add(y),y.ignore=s}})).update((function(e,n){var i=a.getitemmodel(e),s=as[l.type](a,e,i);if(g){var m=void 0;0===_.length?m=w(n):((m=_[n]).usestyle(y.getitemstyle()),"cartesian2d"===l.type&&m.setshape("r",v),m[e]=m);var i=as[l.type](a,e);hu(m,{shape:ps(r,i,l)},h,e)}var t=s.getitemgraphicel(n);if(!a.hasvalue(e))return o.remove(t),void(t=null);var c=!1;p&&(c=is[l.type](d,s))&&o.remove(t),t||(t=rs[l.type](t,a,e,s,r,h,u.model,!!t,f)),b||ss(t,a,e,i,s,t,r,"polar"===l.type),x?t.attr({shape:s}):c?os(c,h,t,s,e,r,!0,b):hu(t,{shape:s},t,e,null),a.setitemgraphicel(e,t),t.ignore=c,o.add(t)})).remove((function(e){var n=s.getitemgraphicel(e);n&&yu(n,t,e)})).execute();var s=this._backgroundgroup||(this._backgroundgroup=new ei);s.removeall();for(var m=0;mo)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,animation:{duration:0}})},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){yu(e,t,_s(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}(tf),is={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=ts(e.x,t.x),s=es(e.x+e.width,r),l=ts(e.y,t.y),u=es(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=es(e.r,t.r),o=ts(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}},rs={cartesian2d:function(t,e,n,i,r,o,a,s,l){var u=new ls({shape:i({},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=i.startangle0?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}}};function ss(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");if(u&&t.attr("cursor",u),!s){var h=a?r.height>0?"bottom":"top":r.width>0?"left":"right",c=ch(i);hh(t,c,{labelfetcher:o,labeldataindex:n,defaulttext:cw(o.getdata(),n),inheritcolor:l.fill,defaultopacity:l.opacity,defaultoutsideposition:h}),xh(t.gettextcontent(),c,o.getrawvalue(n),(function(t){return pw(e,t)}))}var p=i.getmodel(["emphasis"]);sl(t,p.get("focus"),p.get("blurscope")),cl(t,i),function(t){return null!=t.startangle&&null!=t.endangle&&t.startangle===t.endangle}(r)&&(t.style.fill="none",t.style.stroke="none",p(t.states,(function(t){t.style&&(t.style.fill=t.style.stroke="none")})))}var ls=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 ls},e.prototype.buildpath=function(t,e){for(var n=e.points,i=this.__startpoint,r=this.__basedimidx,o=0;o=c&&y<=p&&(l<=v?h>=l&&h<=v:h>=v&&h<=l))return a[d]}return-1}(this,t.offsetx,t.offsety);_s(this).dataindex=e>=0?e:null}),30,!1);function ps(t,e,n){if(nw(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 ds=2*math.pi,fs=math.pi/180;function gs(t,e,n){e.eachseriesbytype(t,(function(t){var e=t.getdata(),i=e.mapdimension("value"),r=function(t,e){return vc(t.getboxlayoutparams(),{width:e.getwidth(),height:e.getheight()})}(t,n),o=t.get("center"),a=t.get("radius");f(a)||(a=[0,a]),f(o)||(o=[o,o]);var s=zi(r.width,n.getwidth()),l=zi(r.height,n.getheight()),u=math.min(s,l),h=zi(o[0],s)+r.x,c=zi(o[1],l)+r.y,p=zi(a[0],u/2),d=zi(a[1],u/2),f=-t.get("startangle")*fs,g=t.get("minangle")*fs,y=0;e.each(i,(function(t){!isnan(t)&&y++}));var v=e.getsum(i),m=math.pi/(v||y)*2,_=t.get("clockwise"),x=t.get("rosetype"),b=t.get("stillshowzerosum"),w=e.getdataextent(i);w[0]=0;var s=ds,m=0,i=f,t=_?1:-1;if(e.setlayout({viewrect:r,r:d}),e.each(i,(function(t,n){var i;if(isnan(t))e.setitemlayout(n,{angle:nan,startangle:nan,endangle:nan,clockwise:_,cx:h,cy:c,r0:p,r:x?nan:d});else{(i="area"!==x?0===v&&b?m:t*m:ds/y)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)0?"right":"left":l>0?"left":"right"}var f=y.get("rotate");if(o="number"==typeof f?f*(math.pi/180):f?l<0?-a+math.pi:-a:0,o=!!o,p.x=i,p.y=t,p.rotation=o,p.setstyle({verticalalign:"middle"}),r){p.setstyle({align:d});var g=p.states.select;g&&(g.x+=p.x,g.y+=p.y)}else{var h=p.getboundingrect().clone();h.applytransform(p.getcomputedtransform());var w=(p.style.margin||0)+2.1;h.y-=w/2,h.height+=w,r.push({label:p,labelline:f,position:v,len:s,len2:m,minturnangle:w.get("minturnangle"),maxsurfaceangle:w.get("maxsurfaceangle"),surfacenormal:new ai(l,k),linepoints:c,textalign:d,labeldistance:m,labelalignto:_,edgedistance:x,bleedmargin:b,rect:h})}s.settextconfig({inside:r})}})),!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}(tf);function ms(t,e,n){e=f(e)&&{coorddimensions:e}||i({},e);var i=t.getsource(),r=o_(i,e),o=new l_(r,t);return o.initdata(i,n),o}var is=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}(),ts=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.usecolorpaletteondata=!0,e}return n(e,t),e.prototype.init=function(e){t.prototype.init.apply(this,arguments),this.legendvisualprovider=new is(v(this.getdata,this),v(this.getrawdata,this)),this._defaultlabelline(e)},e.prototype.mergeoption=function(){t.prototype.mergeoption.apply(this,arguments)},e.prototype.getinitialdata=function(){return ms(this,{coorddimensions:["value"],encodedefaulter:b(up,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=qi(r,e,n.hostmodel.get("percentprecision")),i.$vars.push("percent"),i},e.prototype._defaultlabelline=function(t){br(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={zlevel:0,z:2,legendhoverlink:!0,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},labellayout:{hideoverlap:!0},emphasis:{scale:!0,scalesize:5},avoidlabeloverlap:!0,animationtype:"expansion",animationduration:1e3,animationtypeupdate:"transition",animationeasingupdate:"cubicinout",animationdurationupdate:500,animationeasing:"cubicinout"},e}(ff);var cs=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 f_(this.getsource(),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.type="series.scatter",e.dependencies=["grid","polar","geo","singleaxis","calendar"],e.defaultoption={coordinatesystem:"cartesian2d",zlevel:0,z:2,legendhoverlink:!0,symbolsize:10,large:!1,largethreshold:2e3,itemstyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemstyle:{bordercolor:"#212121"}}},e}(ff),ds=function(){},as=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.getdefaultshape=function(){return new ds},e.prototype.buildpath=function(t,e){var n=e.points,i=e.size,r=this.symbolproxy,o=r.shape,a=t.getcontext?t.getcontext():t;if(a&&i[0]<4)this._ctx=a;else{this._ctx=null;for(var s=0;s=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}(ka),ls=function(){function t(){this.group=new ei}return t.prototype.ispersistent=function(){return!this._incremental},t.prototype.updatedata=function(t,e){this.group.removeall();var n=new as({recthover:!0,cursor:"default"});n.setshape({points:t.getlayout("points")}),this._setcommon(n,t,!1,e),this.group.add(n),this._incremental=null},t.prototype.updatelayout=function(t){if(!this._incremental){var e=t.getlayout("points");this.group.eachchild((function(t){if(null!=t.startindex){var n=2*(t.endindex-t.startindex),i=4*t.startindex*2;e=new float32array(e.buffer,i,n)}t.setshape("points",e)}))}},t.prototype.incrementalprepareupdate=function(t){this.group.removeall(),this._clearincremental(),t.count()>2e6?(this._incremental||(this._incremental=new tu({silent:!0})),this.group.add(this._incremental)):this._incremental=null},t.prototype.incrementalupdate=function(t,e,n){var i;this._incremental?(i=new as,this._incremental.adddisplayable(i,!0)):((i=new as({recthover:!0,cursor:"default",startindex:t.start,endindex:t.end})).incremental=!0,this.group.add(i)),i.setshape({points:e.getlayout("points")}),this._setcommon(i,e,!!this._incremental,n)},t.prototype._setcommon=function(t,e,n,i){var r=e.hostmodel;i=i||{};var o=e.getvisual("symbolsize");t.setshape("size",o instanceof array?o:[o,o]),t.softclipshape=i.clipshape||null,t.symbolproxy=fy(e.getvisual("symbol"),0,0,0,0),t.setcolor=t.symbolproxy.setcolor;var a=t.shape.size[0]<4;t.usestyle(r.getmodel("itemstyle").getitemstyle(a?["color","shadowblur","shadowcolor"]:["color"]));var s=e.getvisual("style"),l=s&&s.fill;if(l&&t.setcolor(l),!n){var u=_s(t);u.seriesindex=r.seriesindex,t.on("mousemove",(function(e){u.dataindex=null;var n=t.finddataindex(e.offsetx,e.offsety);n>=0&&(u.dataindex=n+(t.startindex||0))}))}},t.prototype.remove=function(){this._clearincremental(),this._incremental=null,this.group.removeall()},t.prototype._clearincremental=function(){var t=this._incremental;t&&t.cleardisplaybles()},t}(),ks=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||!this._symboldraw.ispersistent())return{update:!0};var r=xw("").reset(t,e,n);r.progress&&r.progress({start:0,end:i.count(),count:i.count()},i),this._symboldraw.updatelayout(i)},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 ls:new mw,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}(tf),ps=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,zlevel:0,z:0,left:"10%",top:60,right:"10%",bottom:70,containlabel:!1,backgroundcolor:"rgba(0,0,0,0)",borderwidth:1,bordercolor:"#ccc"},e}(xc),os=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.getcoordsysmodel=function(){return this.getreferringcomponents("grid",nr).models[0]},e.type="cartesian2daxis",e}(xc);l(os,yx);var rs={show:!0,zlevel:0,z:0,inverse:!1,name:"",namelocation:"end",namerotate:null,nametruncate:{maxwidth:null,ellipsis:"...",placeholder:"."},nametextstyle:{},namegap:15,silent:!1,triggerevent:!1,tooltip:{show:!1},axispointer:{},axisline:{show:!0,onzero:!0,onzeroaxisindex:null,linestyle:{color:"#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)"]}}},ns=s({boundarygap:!0,deduplication:null,splitline:{show:!1},axistick:{alignwithlabel:!1,interval:"auto"},axislabel:{interval:"auto"}},rs),zs=s({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}}},rs),es={category:ns,value:zs,time:s({scale:!0,splitnumber:6,axislabel:{showminlabel:!1,showmaxlabel:!1,rich:{primary:{fontweight:"bold"}}},splitline:{show:!1}},zs),log:t({scale:!0,logbase:10},zs)},vs={value:1,category:1,time:1,log:1};function bs(t,e,i,r){p(vs,(function(o,a){var s=s(s({},es[a],!0),r,!0),l=function(t){function i(){for(var n=[],i=0;ie[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}(hb);function ys(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),q(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 zs(t){return"cartesian2d"===t.get("coordinatesystem")}function js(t){var e={xaxismodel:null,yaxismodel:null};return p(e,(function(n,i){var r=i.replace(/model$/,""),o=t.getreferringcomponents(r,nr).models[0];e[i]=o})),e}var qs=function(){function t(t,e,n){this.type="grid",this._coordsmap={},this._coordslist=[],this._axesmap={},this._axeslist=[],this.axispointerenabled=!0,this.dimensions=hs,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;this._updatescale(t,this.model),p(n.x,(function(t){vx(t.scale,t.model)})),p(n.y,(function(t){vx(t.scale,t.model)}));var i={};p(n.x,(function(t){$s(n,"y",t,i)})),p(n.y,(function(t){$s(n,"x",t,i)})),this.resize(this.model,e)},t.prototype.resize=function(t,e,n){var i=t.getboxlayoutparams(),r=!n&&t.get("containlabel"),o=vc(i,{width:e.getwidth(),height:e.getheight()});this._rect=o;var a=this._axeslist;function s(){p(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&&(p(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 $_?n.count():(i=n.getticks()).length;var a,s=t.getlabelmodel(),l=fx(t),u=1;r>40&&(u=math.ceil(r/40));for(var h=0;h0&&i>0||n<0&&i<0)}(t)}var qs=math.pi,tm=function(){function t(t,e){this.group=new ei,this.opt=e,this.axismodel=t,t(e,{labeloffset:0,namedirection:1,tickdirection:1,labeldirection:1,silent:!0,handleautoshown:function(){return!0}});var n=new ei({x:e.position[0],y:e.position[1],rotation:e.rotation});n.updatetransform(),this._transformgroup=n}return t.prototype.hasbuilder=function(t){return!!em[t]},t.prototype.add=function(t){em[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=nr(e-t);return ir(o)?(r=n>0?"top":"bottom",i="center"):ir(o-qs)?(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}(),em={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&&(rt(s,s,a),rt(l,l,a));var u=i({linecap:"round"},e.getmodel(["axisline","linestyle"]).getlinestyle()),h=new uu({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"]),p=e.get(["axisline","symbolsize"]),d=e.get(["axisline","symboloffset"])||0;if("number"==typeof d&&(d=[d,d]),null!=c){"string"==typeof c&&(c=[c,c]),"string"!=typeof p&&"number"!=typeof p||(p=[p,p]);var f=p[0],g=p[1];p([{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=fy(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=om(r.gettickscoords(),e.transform,l,t(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,rm(s)?t.labeloffset+l*h:0],f=e.get("namerotate");null!=f&&(f=f*qs/180),rm(s)?o=tm.innertextlayout(t.rotation,null!=f?f:t.rotation,l):(o=function(t,e,n,i){var r,o,a=nr(n-t),s=i[0]>i[1],l="start"===e&&!s||"start"!==e&&s;ir(a-qs/2)?(o=l?"bottom":"top",r="center"):ir(a-1.5*qs)?(o=l?"top":"bottom",r="center"):(o="middle",r=a<1.5*qs&&a>qs/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=q(t.nametruncatemaxwidth,y.maxwidth,a),_=new cs({x:d[0],y:d[1],rotation:o.rotation,silent:tm.islabelsilent(e),style:ph(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(oh({el:_,componentmodel:e,itemname:r}),_.__fulltext=r,_.anid="name",e.get("triggerevent")){var x=tm.makeaxiseventdatabase(e);x.targettype="axisname",x.name=r,_s(_).eventdata=x}i.add(_),_.updatetransform(),n.add(_),_.decomposetransform()}}};function nm(t){t&&(t.ignore=!0)}function im(t,e){var n=t&&t.getboundingrect().clone(),i=e&&e.getboundingrect().clone();if(n&&i){var r=gn([]);return xn(r,r,-t.rotation),n.applytransform(wn([],r,t.getlocaltransform())),i.applytransform(wn([],r,e.getlocaltransform())),n.intersect(i)}}function rm(t){return"middle"===t||"center"===t}function om(t,e,n,i,r){for(var o=[],a=[],s=[],l=0;l=0||t===e}function lm(t){var e=um(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=hm(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=t({color:c.color},a));var d=s(w(c),{boundarygap:t,splitnumber:e,scale:n,axisline:i,axistick:r,axislabel:o,name:c.text,namelocation:"end",namegap:u,nametextstyle:p,triggerevent:h},!1);if(s||(d.name=""),"string"==typeof l){var f=d.name;d.name=l.replace("{value}",null!=f?f:"")}else"function"==typeof l&&(d.name=l(d.name,d));var g=new oh(d,null,this.ecmodel);return l(g,yx.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={zlevel:0,z:0,center:["50%","50%"],radius:"75%",startangle:90,axisname:{show:!0},boundarygap:[0,0],splitnumber:5,axisnamegap:15,scale:!1,shape:"polygon",axisline:s({linestyle:{color:"#bbb"}},pm.axisline),axislabel:om(pm.axislabel,!1),axistick:om(pm.axistick,!1),splitline:om(pm.splitline,!0),splitarea:om(pm.splitarea,!0),indicator:[]},e}(xc),nm=["axisline","axisticklabel","axisname"],zm=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;p(o(e.getindicatoraxes(),(function(t){return new tm(t.model,{position:[e.cx,e.cy],rotation:t.angle,labeldirection:-1,tickdirection:-1,namedirection:1})})),(function(t){p(nm,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=f(h)?h:[h],d=f(c)?c:[c],f=[],g=[];if("circle"===i)for(var y=n[0].gettickscoords(),v=e.cx,m=e.cy,_=0;_n[0]&&isfinite(c)&&isfinite(n[0]))}else{a.getticks().length-1>r&&(u=o(u));c=ji((h=math.ceil(n[1]/u)*u)-u*r);a.setextent(c,h),a.setinterval(u)}}))},t.prototype.converttopixel=function(t,e,n){return console.warn("not implemented."),null},t.prototype.convertfrompixel=function(t,e,n){return console.warn("not implemented."),null},t.prototype.containpoint=function(t){return console.warn("not implemented."),!1},t.create=function(e,n){var i=[];return e.eachcomponent("radar",(function(r){var o=new t(r,e,n);i.push(o),r.coordinatesystem=o})),e.eachseriesbytype("radar",(function(t){"radar"===t.get("coordinatesystem")&&(t.coordinatesystem=i[t.get("radarindex")||0])})),i},t.dimensions=[],t}();function bm(t){t.registercoordinatesystem("radar",vm),t.registercomponentmodel(rm),t.registercomponentview(zm),t.registervisual({seriestype:"radar",reset:function(t){var e=t.getdata();e.each((function(t){e.setitemvisual(t,"legendicon","roundrect")})),e.setvisual("legendicon","roundrect")}})}var fm="\0_ec_interaction_mutex";function gm(t,e){return!!hm(t)[e]}function hm(t){return t[fm]||(t[fm]={})}hm({type:"takeglobalcursor",event:"globalcursortaken",update:"update"},(function(){}));var wm=function(t){function e(e){var n=t.call(this)||this;n._zr=e;var i=v(n._mousedownhandler,n),r=v(n._mousemovehandler,n),o=v(n._mouseuphandler,n),a=v(n._mousewheelhandler,n),s=v(n._pinchhandler,n);return n.enable=function(t,n){this.disable(),this._opt=t(w(n)||{},{zoomonmousewheel:!0,moveonmousemove:!0,moveonmousewheel:!1,preventdefaultmousemove:!0}),null==t&&(t=!0),!0!==t&&"move"!==t&&"pan"!==t||(e.on("mousedown",i),e.on("mousemove",r),e.on("mouseup",o)),!0!==t&&"scale"!==t&&"zoom"!==t||(e.on("mousewheel",a),e.on("pinch",s))},n.disable=function(){e.off("mousedown",i),e.off("mousemove",r),e.off("mouseup",o),e.off("mousewheel",a),e.off("pinch",s)},n}return n(e,t),e.prototype.isdragging=function(){return this._dragging},e.prototype.ispinching=function(){return this._pinching},e.prototype.setpointerchecker=function(t){this.pointerchecker=t},e.prototype.dispose=function(){this.disable()},e.prototype._mousedownhandler=function(t){if(!(ne(t)||t.target&&t.target.draggable)){var e=t.offsetx,n=t.offsety;this.pointerchecker&&this.pointerchecker(t,e,n)&&(this._x=e,this._y=n,this._dragging=!0)}},e.prototype._mousemovehandler=function(t){if(this._dragging&&ym("moveonmousemove",t,this._opt)&&"pinch"!==t.gestureevent&&!gm(this._zr,"globalpan")){var e=t.offsetx,n=t.offsety,i=this._x,r=this._y,o=e-i,a=n-r;this._x=e,this._y=n,this._opt.preventdefaultmousemove&&ee(t.event),xm(this,"pan","moveonmousemove",t,{dx:o,dy:a,oldx:i,oldy:r,newx:e,newy:n,isavailablebehavior:null})}},e.prototype._mouseuphandler=function(t){ne(t)||(this._dragging=!1)},e.prototype._mousewheelhandler=function(t){var e=ym("zoomonmousewheel",t,this._opt),n=ym("moveonmousewheel",t,this._opt),i=t.wheeldelta,r=math.abs(i),o=t.offsetx,a=t.offsety;if(0!==i&&(e||n)){if(e){var s=r>3?1.4:r>1?1.2:1.1;um(this,"zoom","zoomonmousewheel",t,{scale:i>0?s:1/s,originx:o,originy:a,isavailablebehavior:null})}if(n){var l=math.abs(i);um(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){gm(this._zr,"globalpan")||um(this,"zoom",null,t,{scale:t.pinchscale>1?1.1:1/1.1,originx:t.pinchx,originy:t.pinchy,isavailablebehavior:null})},e}(ft);function um(t,e,n,i,r){t.pointerchecker&&t.pointerchecker(i,r.originx,r.originy)&&(ee(i.event),xm(t,e,n,i,r))}function xm(t,e,n,i,r){r.isavailablebehavior=v(ym,null,n,i),t.trigger(e,r)}function ym(t,e,n){var i=n[t];return!t||i&&(!h(i)||e.event[i+"key"])}function zm(t,e,n){var i=t.target;i.x+=e,i.y+=n,i.dirty()}function jm(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 qm={axispointer:1,tooltip:1,brush:1};function km(t,e,n){var i=e.getcomponentbyelement(t.toptarget),r=i&&i.coordinatesystem;return i&&i!==n&&!qm.hasownproperty(i.maintype)&&r&&r.model!==n}var $m=["rect","circle","line","ellipse","polygon","polyline","path"],jm=ht($m),qm=ht($m.concat(["g"])),ti=ht($m.concat(["g"])),ei=kr();function ni(t){var e=t.getitemstyle(),n=t.get("areacolor");return null!=n&&(e.fill=n),e}var ii=function(){function t(t){var e=new ei;this.uid=nh("ec_map_draw"),this._controller=new wm(t.getzr()),this._controllerhost={target:e},this.group=e,e.add(this._regionsgroup=new ei),e.add(this._svggroup=new ei)}return t.prototype.draw=function(t,e,n,i,r){var o="geo"===t.maintype,a=t.getdata&&t.getdata();o&&e.eachcomponent({maintype:"series",subtype:"map"},(function(e){a||e.gethostgeomodel()!==t||(a=e.getdata())}));var s=t.coordinatesystem,l=this._regionsgroup,u=this.group,h=s.gettransforminfo(),c=h.raw,p=h.roam;!l.childat(0)||r?(u.x=p.x,u.y=p.y,u.scalex=p.scalex,u.scaley=p.scaley,u.dirty()):hu(u,p,t);var d=a&&a.getvisual("visualmeta")&&a.getvisual("visualmeta").length>0,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=ht(),n=ht(),i=this._regionsgroup,r=t.transforminforaw,o=t.maporgeomodel,a=t.data,s=function(t){return[t[0]*r.scalex+r.x,t[1]*r.scaley+r.y]};i.removeall(),p(t.geo.regions,(function(r){var l=r.name,u=e.get(l),h=n.get(l)||{},c=h.dataidx,p=h.regionmodel;u||(u=e.set(l,new ei),i.add(u),c=a?a.indexofname(l):null,p=t.isgeo?o.getregionmodel(l):a?a.getitemmodel(c):null,n.set(l,{dataidx:c,regionmodel:p}));var d=new yu({segmentignorethreshold:1,shape:{paths:[]}});u.add(d),p(r.geometries,(function(t){if("polygon"===t.type){for(var e=[],n=0;n=0)&&(p=r);var d=a?{normal:{align:"center",verticalalign:"middle"}}:null;hh(e,ch(i),{labelfetcher:p,labeldataindex:c,defaulttext:n},d);var f=e.gettextcontent();if(f&&(ei(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 ai(t,e,n,i,r,o){t.data?t.data.setitemgraphicel(o,e):_s(e).eventdata={componenttype:"geo",componentindex:r.componentindex,geoindex:r.componentindex,name:n,region:i&&i.option||{}}}function si(t,e,n,i,r){t.data||oh({el:e,componentmodel:r,itemname:n,itemtooltipoption:i.get("tooltip")})}function li(t,e,n,i,r){e.highdownsilentontouch=!!r.get("selectedmode");var o=i.getmodel("emphasis"),a=o.get("focus");return sl(e,a,o.get("blurscope")),t.isgeo&&function(t,e,n){var i=_s(t);i.componentmaintype=e.maintype,i.componentindex=e.componentindex,i.componenthighdownname=n}(e,r,n),a}var ui=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){if(!i||"maptoggleselect"!==i.type||i.from!==this.uid){var r=this.group;if(r.removeall(),!t.gethostgeomodel()){if(this._mapdraw&&i&&"georoam"===i.type&&this._mapdraw.resetforlabellayout(),i&&"georoam"===i.type&&"series"===i.componenttype&&i.seriesid===t.id)(o=this._mapdraw)&&r.add(o.group);else if(t.needsdrawmap){var o=this._mapdraw||new ii(n);r.add(o.group),o.draw(t,e,n,this,i),this._mapdraw=o}else this._mapdraw&&this._mapdraw.remove(),this._mapdraw=null;t.get("showlegendsymbol")&&e.getcomponent("legend")&&this._rendersymbols(t,e,n)}}},e.prototype.remove=function(){this._mapdraw&&this._mapdraw.remove(),this._mapdraw=null,this.group.removeall()},e.prototype.dispose=function(){this._mapdraw&&this._mapdraw.remove(),this._mapdraw=null},e.prototype._rendersymbols=function(t,e,n){var i=t.originaldata,r=this.group;i.each(i.mapdimension("value"),(function(e,n){if(!isnan(e)){var o=i.getitemlayout(n);if(o&&o.point){var a=o.point,s=o.offset,l=new nl({style:{fill:t.getdata().getvisual("style").fill},shape:{cx:a[0]+9*s,cy:a[1],r:3},silent:!0,z2:8+(s?0:11)});if(!s){var u=t.mainseries.getdata(),h=i.getname(n),c=u.indexofname(h),p=i.getitemmodel(n),d=p.getmodel("label"),f=u.getitemgraphicel(c);hh(l,ch(p),{labelfetcher:{getformattedlabel:function(e,n){return t.getformattedlabel(c,n)}}}),l.disablelabelanimation=!0,d.get("position")||l.settextconfig({position:"bottom"}),f.onhoverstatechange=function(t){ws(l,t)}}r.add(l)}}}))},e.type="map",e}(tf),hi=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.needsdrawmap=!1,n.seriesgroup=[],n.gettooltipposition=function(t){if(null!=t){var e=this.getdata().getname(t),n=this.coordinatesystem,i=n.getregion(e);return i&&n.datatopoint(i.getcenter())}},n}return n(e,t),e.prototype.getinitialdata=function(t){for(var e=ms(this,{coorddimensions:["value"],encodedefaulter:b(up,this)}),n=ht(),i=[],r=0,o=e.count();r-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={zlevel:0,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}(ff);function ci(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)})),p(e,(function(t,e){for(var n,i,r,o=(n=o(t,(function(t){return t.getdata()})),i=t[0].get("mapvaluecalculation"),r={},p(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?(s.width=a,s.height=a/d):(s.height=a,s.width=a*d),s.y=o[1]-s.height/2,s.x=o[0]-s.width/2;else{var g=t.getboxlayoutparams();g.aspect=d,s=vc(g,{width:c,height:p})}this.setviewrect(s.x,s.y,s.width,s.height),this.setcenter(t.get("center")),this.setzoom(t.get("zoom"))}l(vi,fi);var xi=new(function(){function t(){this.dimensions=vi.prototype.dimensions}return t.prototype.create=function(t,e){var n=[];t.eachcomponent("geo",(function(t,i){var r=t.get("map"),o=new vi(r+i,r,{namemap:t.get("namemap"),nameproperty:t.get("nameproperty"),aspectscale:t.get("aspectscale")});o.zoomlimit=t.get("scalelimit"),n.push(o),t.coordinatesystem=o,o.model=t,o.resize=_i,o.resize(t,e)})),t.eachseries((function(t){if("geo"===t.get("coordinatesystem")){var e=t.get("geoindex")||0;t.coordinatesystem=n[e]}}));var i={};return t.eachseriesbytype("map",(function(t){if(!t.gethostgeomodel()){var e=t.getmaptype();i[e]=i[e]||[],i[e].push(t)}})),p(i,(function(t,i){var r=o(t,(function(t){return t.get("namemap")})),o=new vi(i,i,{namemap:m(r),nameproperty:t[0].get("nameproperty"),aspectscale:t[0].get("aspectscale")});o.zoomlimit=q.apply(null,o(t,(function(t){return t.get("scalelimit")}))),n.push(o),o.resize=_i,o.resize(t[0],e),p(t,(function(t){t.coordinatesystem=o,function(t,e){p(e.get("geocoord"),(function(e,n){t.addgeocoord(n,e)}))}(o,t)}))})),n},t.prototype.getfilledregions=function(t,e,n,i){for(var r=(t||[]).slice(),o=ht(),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=ai(s),o=li(o),s&&o;){r=ai(r),a=li(a),r.hiernode.ancestor=t;var p=s.hiernode.prelim+c-o.hiernode.prelim-u+i(s,o);p>0&&(pi(ki(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&&!ai(r)&&(r.hiernode.thread=s,r.hiernode.modifier+=c-l),o&&!li(a)&&(a.hiernode.thread=o,a.hiernode.modifier+=u-h,n=t)}return n}(t,r,t.parentnode.hiernode.defaultancestor||i[0],e)}function ti(t){var e=t.hiernode.prelim+t.parentnode.hiernode.modifier;t.setlayout({x:e},!0),t.hiernode.modifier+=t.parentnode.hiernode.modifier}function ci(t){return arguments.length?t:oi}function di(t,e){return t-=math.pi/2,{x:e*math.cos(t),y:e*math.sin(t)}}function ai(t){var e=t.children;return e.length&&t.isexpand?e[e.length-1]:t.hiernode.thread}function li(t){var e=t.children;return e.length&&t.isexpand?e[0]:t.hiernode.thread}function ki(t,e,n){return t.hiernode.ancestor.parentnode===e.parentnode?t.hiernode.ancestor:n}function pi(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 oi(t,e){return t.parentnode===e.parentnode?1:2}var ri=function(){this.parentpoint=[],this.childpoints=[]},ni=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 ri},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=zi(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)||(x-=math.pi);var s=b?"left":"right",m=s.getmodel("label"),i=m.get("rotate"),c=i*(math.pi/180),d=y.gettextcontent();d&&(y.settextconfig({position:m.get("position")||s,rotation:null==i?-x:c,origin:"center"}),d.setstyle("verticalalign","middle"))}var a=s.get(["emphasis","focus"]),l="ancestor"===a?a.getancestorsindices():"descendant"===a?a.getdescendantindices():null;l&&(_s(n).focus=l),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 du({shape:fi(h,c,p,r,r)})),hu(g,{shape:fi(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.isancestorof=function(t){for(var e=t.parentnode;e;){if(e===this)return!0;e=e.parentnode}return!1},t.prototype.isdescendantof=function(t){return t!==this&&t.isancestorof(this)},t}(),$i=function(){function t(t){this.type="tree",this._nodes=[],this.hostmodel=t}return t.prototype.eachnode=function(t,e,n){this.root.eachnode(t,e,n)},t.prototype.getnodebydataindex=function(t){var e=this.data.getrawindex(t);return this._nodes[e]},t.prototype.getnodebyid=function(t){return this.root.getnodebyid(t)},t.prototype.update=function(){for(var t=this.data,e=this._nodes,n=0,i=e.length;n=0){var i=n.getdata().tree.root,r=t.targetnode;if("string"==typeof 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 qi(t){for(var e=[];t;)(t=t.parentnode)&&e.push(t);return e.reverse()}function tt(t,e){return d(qi(t),e)>=0}function et(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 nt=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 oh(n,this,this.ecmodel),r=$i.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 tf("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=et(i,this),n},e.type="series.tree",e.layoutmode="box",e.defaultoption={zlevel:0,z:2,coordinatesystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeshape:"curve",edgeforkposition:"50%",roam:!1,nodescaleratio:.4,center:null,zoom:1,orient:"lr",symbol:"emptycircle",symbolsize:7,expandandcollapse:!0,initialtreedepth:2,linestyle:{color:"#ccc",width:1.5,curveness:.5},itemstyle:{color:"lightsteelblue",borderwidth:1.5},label:{show:!0},animationeasing:"linear",animationduration:700,animationdurationupdate:500},e}(ff);function it(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 rt(t,e){t.eachseriesbytype("tree",(function(t){!function(t,e){var n=function(t,e){return vc(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=ci((function(t,e){return(t.parentnode===e.parentnode?1:2)/t.depth}))):(r=n.width,o=n.height,a=ci());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),it(l,(function(t){y=(t.getlayout().x+d)*f,v=(t.depth-1)*g;var e=di(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),it(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),it(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 ot(t){t.eachseriesbytype("tree",(function(t){var e=t.getdata();e.tree.eachnode((function(t){var n=t.getmodel().getmodel("itemstyle").getitemstyle();i(e.ensureuniqueitemvisual(t.dataindex,"style"),n)}))}))}var at=function(){},st=["treemapzoomtonode","treemaprender","treemapmove"];function lt(t){var e=t.getdata().tree,n={};e.eachnode((function(e){for(var i=e;i&&i.depth>1;)i=i.parentnode;var r=xp(t.ecmodel,i.name||i.dataindex+"",n);e.setvisual("decal",r)}))}var ut=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};ht(n);var i=t.levels||[],r=this.designatedvisualitemstyle={},o=new oh({itemstyle:r},this,e),a=o((i=t.levels=function(t,e){var n,i,r=xr(e.get("color")),o=xr(e.get(["aria","decal","decals"]));if(!r)return;p(t=t||[],(function(t){var e=new oh(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 oh(t,o,e)}),this),s=$i.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 tf("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.treepathinfo=et(i,this),n},e.prototype.setlayoutinfo=function(t){this.layoutinfo=this.layoutinfo||{},i(this.layoutinfo,t)},e.prototype.mapidtoindex=function(t){var e=this._idindexmap;e||(e=this._idindexmap=ht(),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(){lt(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%"],ellipsis:!0,verticalalign:"middle"}},visualdimension:0,visualmin:null,visualmax:null,color:[],coloralpha:null,colorsaturation:null,colormappingby:"index",visiblemin:10,childrenvisiblemin:null,levels:[]},e}(ff);function ht(t){var e=0;p(t.children,(function(t){ht(t);var n=t.value;f(n)&&(n=n[0]),e+=n}));var n=t.value;f(n)&&(n=n[0]),(null==n||isnan(n))&&(n=e),n<0&&(n=0),f(t.value)?t.value[0]=n:t.value=n}var ct=function(){function t(t){this.group=new ei,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),bc(o,l.pos,l.box)}},t.prototype._prepare=function(t,e,n){for(var i=t;i;i=i.parentnode){var r=cr(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=zi(o.left,l),c=zi(o.top,u),p=zi(o.right,l),d=zi(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=wc(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,_=e.renderlist,x=_.length-1;x>=0;x--){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 ru({shape:{points:pt(f,0,s,y,x===_.length-1,0===x)},style:t(n.getitemstyle(),{linejoin:"bevel"}),textcontent:new cs({style:{text:m,fill:i.gettextcolor(),font:i.getfont()}}),textconfig:{position:"inside"},z2:1e5,onclick:b(r,w)});i.disablelabelanimation=!0,this.group.add(i),dt(i,t,w),f+=s+8}},t.prototype.remove=function(){this.group.removeall()},t}();function pt(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 dt(t,e,n){_s(t).eventdata={componenttype:"series",componentsubtype:"treemap",componentindex:e.componentindex,seriesindex:e.componentindex,seriesname:e.name,seriestype:"treemap",selftype:"breadcrumb",nodedata:{dataindex:n&&n.dataindex,name:n&&n.name},treepathinfo:n&&et(n,e)}}var ft=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 gi(r.x,r.y,r.width,r.height),a=this.seriesmodel.layoutinfo,s=[1,0,0,1,0,0];un(s,s,[-(e-=a.x),-(n-=a.y)]),yn(s,s,[t.scale,t.scale]),un(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&&pc(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 ct(this.group))).render(t,e,n.node,(function(e){"animating"!==i._state&&(tt(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}(tf);var st=p,mt=x,it=-1,tt=function(){function t(e){var n=e.mappingmethod,i=e.type,r=this.option=w(e);this.type=i,this.mappingmethod=n,this._normalizedata=zt[n];var o=t.visualhandlers[i];this.applyvisual=o.applyvisual,this.getcolormapper=o.getcolormapper,this._normalizedtovisual=o._normalizedtovisual[n],"piecewise"===n?(ct(r),function(t){var e=t.piecelist;t.hasspecialvisual=!1,p(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(st(e,(function(t,e){n[t]=e})),!f(i)){var r=[];x(i)?st(i,(function(t,e){var i=n[e];r[null!=i?i:it]=t})):r[-1]=i,i=nt(t,r)}for(var o=e.length-1;o>=0;o--)null==i[o]&&(delete n[e[o]],e.pop())}(r):ct(r,!0):(rt("linear"!==n||r.dataextent),ct(r))}return t.prototype.mapvaluetovisual=function(t){var e=this._normalizedata(t);return this._normalizedtovisual(e,t)},t.prototype.getnormalizer=function(){return v(this._normalizedata,this)},t.listvisualtypes=function(){return e(t.visualhandlers)},t.isvalidtype=function(e){return t.visualhandlers.hasownproperty(e)},t.eachvisual=function(t,e,n){x(t)?p(t,e,n):e.call(n,t)},t.mapvisual=function(e,n,i){var r,o=f(e)?[]:x(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&&st(t.visualhandlers,(function(t,r){e.hasownproperty(r)&&(i[r]=e[r],n=!0)})),n?i:null},t.preparevisualtypes=function(t){if(f(t))t=t.slice();else{if(!mt(t))return[];var e=[];st(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 tt(c);return vt(p).drcolormappingby=h,p}(0,r,o,0,u,d);p(d,(function(t,e){if(t.depth>=n.length||t===n[t.depth]){var o=function(t,e,n,i,r,o){var a=i({},e);if(r){var s=r.type,l="color"===s&&vt(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);ft(t,o,n,i)}}))}else s=gt(u),h.fill=s}}function gt(t){var e=ht(t,"color");if(e){var n=ht(t,"coloralpha"),i=ht(t,"colorsaturation");return i&&(e=ke(e,null,null,i)),n&&(e=$e(e,n)),e}}function ht(t,e){var n=t[e];if(null!=n&&"none"!==n)return n}function wt(t,e){var n=t.get(e);return f(n)&&n.length?{name:e,range:n}:null}var ut=math.max,xt=math.min,yt=q,zt=p,jt=["itemstyle","borderwidth"],qt=["itemstyle","gapwidth"],kt=["upperlabel","show"],$t=["upperlabel","height"],jt={seriestype:"treemap",reset:function(t,e,n,i){var r=n.getwidth(),o=n.getheight(),a=t.option,s=vc(t.getboxlayoutparams(),{width:n.getwidth(),height:n.getheight()}),l=a.size||[],u=zi(yt(s.width,l[0]),r),h=zi(yt(s.height,l[1]),o),c=i&&i.type,p=ji(i,["treemapzoomtonode","treemaproottonode"],t),d="treemaprender"===c||"treemapmove"===c?i.rootrect:null,f=t.getviewroot(),g=qi(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;per&&(u=er),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?ut(u*i/l,l/(u*r)):1/0}function ec(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 x=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*x+l[0],i.y=l[1]+w,c=v[0]<0?"right":"left",i.originx=-f*x,i.originy=-w;break;case"insidemiddletop":case"insidemiddle":case"insidemiddlebottom":case"middle":i.x=_[0],i.y=_[1]+w,c="center",i.originy=-w;break;case"insideendtop":case"insideend":case"insideendbottom":i.x=-f*x+u[0],i.y=u[1]+w,c=v[0]>=0?"right":"left",i.originx=f*x,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}(ei),vc=function(){function t(t){this.group=new ei,this._linector=t||ec}return t.prototype.ispersistent=function(){return!0},t.prototype.updatedata=function(t){var e=this,n=this,i=n.group,r=n._linedata;n._linedata=t,r||i.removeall();var o=bc(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=bc(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)}for(var i=t.start;i=0?i+=u:i-=u:f>=0?i-=u:i+=u}return i}function qc(t,e){var n=[],i=zo,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(vt(r[0],c[0]),vt(r[1],c[2]),vt(r[2],c[1]),u&&"none"!==u){var p=_c(t.node1),d=jc(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=_c(t.node2),d=jc(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]}vt(l[0],r[0]),vt(l[1],r[2]),vt(l[2],r[1])}else{if(vt(o[0],c[0]),vt(o[1],c[1]),wt(a,o[1],o[0]),dt(a,a),u&&"none"!==u){p=_c(t.node1);bt(o[0],o[0],a,p*e)}if(h&&"none"!==h){p=_c(t.node2);bt(o[1],o[1],a,-p*e)}vt(l[0],o[0]),vt(l[1],o[1])}}))}function kc(t){return"view"===t.type}var $c=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 mw,i=new vc,r=this.group;this._controller=new wm(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(kc(r)){var l={x:r.x,y:r.y,scalex:r.scalex,scaley:r.scaley};this._firstrender?s.attr(l):hu(s,l,t)}qc(t.getgraph(),mc(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();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),"adjacency"===r.get(["emphasis","focus"])&&(_s(n).focus=t.getadjacentdataindices())})),u.graph.eachedge((function(t){var e=t.getgraphicel();"adjacency"===t.getmodel().get(["emphasis","focus"])&&(_s(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 td||(e=this._nodesmap[jc(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 id(t,e,n,i,r){for(var o=new qc(i),a=0;a "+p)),u++)}var d,f=n.get("coordinatesystem");if("cartesian2d"===f||"polar"===f)d=f_(t,n);else{var g=ap.get(f),y=g&&g.dimensions||[];d(y,"value")<0&&y.concat(["value"]);var v=o_(t,{coorddimensions:y});(d=new l_(v,n)).initdata(t)}var m=new l_(["value"],n);return m.initdata(l,s),r&&r(d,m),hi({maindata:d,struct:o,structattr:"graph",datas:{node:d,edge:m},datasattr:{node:"data",edge:"edgedata"}}),o.update(),o}l(td,nd("hostgraph","data")),l(ed,nd("hostgraph","edgedata"));var rd=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 is(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),br(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){uc(n=this)&&(n.__curvenesslist=[],n.__edgemap={},hc(n));var a=id(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=oh.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 p(a.edges,(function(t){!function(t,e,n,i){if(uc(n)){var r=cc(t,e,n),o=n.__edgemap,a=o[pc(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),tf("namevalue",{name:l.join(" > "),value:r.value,novalue:null==r.value})}return cf({series:this,dataindex:t,multipleseries:e})},e.prototype._updatecategoriesdata=function(){var t=o(this.option.categories||[],(function(t){return null!=t.value?t:i({value:0},t)})),e=new l_(["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={zlevel:0,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}(ff),od={type:"graphroam",event:"graphroam",update:"none"};var ad=function(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0},sd=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 ad},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}(ka);function ld(t,e){var n=null==t?"":t+"";return e&&("string"==typeof e?n=e.replace("{value}",n):"function"==typeof e&&(n=e(t))),n}var ud=2*math.pi,hd=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:zi(n[0],e.getwidth()),cy:zi(n[1],e.getheight()),r:zi(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){for(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")?jw:jl,c=u.get("show"),p=u.getmodel("linestyle"),d=p.get("width"),f=(l-s)%ud||l===s?(l-s)%ud:ud,g=s,y=0;c&&y=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")&&l!==x){p=(p=m.get("distance"))?p+l:l;for(var n=0;n<=b;n++){u=math.cos(m),h=math.sin(m);var z=new uu({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&&z.setstyle({stroke:i((l+n/b)/x)}),c.add(z),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"),_=+t.get("max"),x=[m,_],b=[o,a];function w(e,n){var i,o=y.getitemmodel(e).getmodel("pointer"),a=zi(o.get("width"),r.r),s=zi(o.get("length"),r.r),l=t.get(["pointer","icon"]),u=o.get("offsetcenter"),h=zi(u[0],r.r),c=zi(u[1],r.r),p=o.get("keepaspect");return(i=l?fy(l,h-a/2,c-s,a,s,null,p):new sd({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")?jw:jl,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=_-y.get(v,t)%_),c}(g||d)&&(y.diff(h).add((function(e){if(d){var n=w(e,o);wu(n,{rotation:-(yi(y.get(v,e),x,b,!0)+math.pi/2)},t),u.add(n),y.setitemgraphicel(e,n)}if(g){var i=s(e,o),r=f.get("clip");wu(i,{shape:{endangle:yi(y.get(v,e),x,b,r)}},t),u.add(i),p[e]=i}})).update((function(e,n){if(d){var i=h.getitemgraphicel(n),r=i?i.rotation:o,a=w(e,r);a.rotation=r,hu(a,{rotation:-(yi(y.get(v,e),x,b,!0)+math.pi/2)},t),u.add(a),y.setitemgraphicel(e,a)}if(g){var s=c[n],l=s(e,s?s.shape.endangle:o),m=f.get("clip");hu(l,{shape:{endangle:yi(y.get(v,e),x,b,m)}},t),u.add(l),p[e]=l}})).execute(),y.each((function(t){var e=y.getitemmodel(t),n=e.getmodel("emphasis");if(d){var r=y.getitemgraphicel(t),o=y.getitemvisual(t,"style"),a=o.fill;if(r instanceof es){var s=r.style;r.usestyle(i({image:s.image,x:s.x,y:s.y,width:s.width,height:s.height},o))}else r.usestyle(o),"pointer"!==r.type&&r.setcolor(a);r.setstyle(e.getmodel(["pointer","itemstyle"]).getitemstyle()),"auto"===r.style.fill&&r.setstyle("fill",i(yi(y.get(v,t),x,[0,1],!0))),r.z2emphasislift=0,cl(r,e),sl(r,n.get("focus"),n.get("blurscope"))}if(g){var l=p[t];l.usestyle(y.getitemvisual(t,"style")),l.setstyle(e.getmodel(["progress","itemstyle"]).getitemstyle()),l.z2emphasislift=0,cl(l,e),sl(l,n.get("focus"),n.get("blurscope"))}})),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=fy(r,e.cx-i/2+zi(o[0],e.r),e.cy-i/2+zi(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 ei,c=[],p=[],d=t.isanimationenabled();a.diff(this._data).add((function(t){c[t]=new cs({silent:!0}),p[t]=new cs({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),f=new ei,g=i(yi(o,[l,u],[0,1],!0)),y=n.getmodel("title");if(y.get("show")){var v=y.get("offsetcenter"),m=r.cx+zi(v[0],r.r),_=r.cy+zi(v[1],r.r);(c=c[e]).attr({style:ph(y,{x:m,y:_,text:a.getname(e),align:"center",verticalalign:"middle"},{inheritcolor:g})}),f.add(c)}var x=n.getmodel("detail");if(x.get("show")){var b=x.get("offsetcenter"),w=r.cx+zi(b[0],r.r),s=r.cy+zi(b[1],r.r),m=zi(x.get("width"),r.r),i=zi(x.get("height"),r.r),t=t.get(["progress","show"])?a.getitemvisual(e,"style").fill:g,c=p[e],d=x.get("formatter");c.attr({style:ph(x,{x:w,y:s,text:ld(o,d),width:isnan(m)?null:m,height:isnan(i)?null:i,align:"center",verticalalign:"middle"},{inheritcolor:t})}),xh(c,{normal:x},o,(function(t){return ld(t,d)})),d&&bh(c,e,a,t,{getformattedlabel:function(t,e,n,i,r,a){return ld(a?a.interpolatedvalue:o,d)}}),f.add(c)}h.add(f)})),this.group.add(h),this._titleels=c,this._detailels=p},e.type="gauge",e}(tf),cd=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.visualstyleaccesspath="itemstyle",n.usecolorpaletteondata=!0,n}return n(e,t),e.prototype.getinitialdata=function(t,e){return ms(this,["value"])},e.type="series.gauge",e.defaultoption={zlevel:0,z:2,center:["50%","50%"],legendhoverlink:!0,radius:"75%",startangle:225,endangle:-45,clockwise:!0,min:0,max:100,splitnumber:10,axisline:{show:!0,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,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}(ff);var pd=["itemstyle","opacity"],dd=function(t){function e(e,n){var i=t.call(this)||this,r=i,o=new au,a=new cs;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(pd);l=null==l?1:l,i.usestyle(t.getitemvisual(e,"style")),i.style.linejoin="round",n?(i.setshape({points:a.points}),i.style.opacity=0,wu(i,{style:{opacity:l}},r,e)):hu(i,{style:{opacity:l},shape:{points:a.points}},r,e),cl(i,o),this._updatelabel(t,e),sl(this,s.get("focus"),s.get("blurscope"))},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,ch(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 ai(h[0][0],h[0][1]):null},hu(r,{style:{x:s.x,y:s.y}},o,e),r.attr({rotation:s.rotation,originx:s.x,originy:s.y,z2:10}),hg(n,wg(a),{stroke:u})},e}(ru),fd=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 dd(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){yu(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}(tf),gd=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.usecolorpaletteondata=!0,n}return n(e,t),e.prototype.init=function(e){t.prototype.init.apply(this,arguments),this.legendvisualprovider=new is(v(this.getdata,this),v(this.getrawdata,this)),this._defaultlabelline(e)},e.prototype.getinitialdata=function(t,e){return ms(this,{coorddimensions:["value"],encodedefaulter:b(up,this)})},e.prototype._defaultlabelline=function(t){br(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={zlevel:0,z:2,legendhoverlink:!0,left:80,top:60,right:80,bottom:60,minsize:"0%",maxsize:"100%",sort:"descending",orient:"vertical",gap:0,funnelalign:"center",label:{show:!0,position:"outer"},labelline:{show:!0,length:20,linestyle:{width:1}},itemstyle:{bordercolor:"#fff",borderwidth:1},emphasis:{label:{show:!0}},select:{itemstyle:{bordercolor:"#212121"}}},e}(ff);function yd(t,e){t.eachseriesbytype("funnel",(function(t){var n=t.getdata(),i=n.mapdimension("value"),r=t.get("sort"),o=function(t,e){return vc(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&&ad(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 ad(t,e){var n=t._model;return n.get("axisexpandable")&&n.get("axisexpandtriggeron")===e}var ld=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&&s(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){p(["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=[];p(n(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={zlevel:0,z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisexpandable:!1,axisexpandcenter:null,axisexpandcount:0,axisexpandwidth:50,axisexpandrate:17,axisexpanddebounce:50,axisexpandslidetriggerarea:[-.15,.05,.4],axisexpandtriggeron:"click",parallelaxisdefault:null},e}(xc),kd=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}(hb);function pd(t,e,n,i,r,o){t=t||0;var a=n[1]-n[0];if(null!=r&&(r=rd(r,[0,a])),null!=o&&(o=math.max(o,null!=r?r:0)),"all"===i){var s=math.abs(e[1]-e[0]);s=rd(s,[0,a]),r=o=rd(s,[r,o]),i=0}e[0]=rd(e[0],n),e[1]=rd(e[1],n);var l=od(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]=rd(e[i],c),u=od(e,i),null!=r&&(u.sign!==l.sign||u.spano&&(e[1-i]=e[i]+u.sign*o),e}function od(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 rd(t,e){return math.min(null!=e[1]?e[1]:1/0,math.max(null!=e[0]?e[0]:-1/0,t))}var nd=p,zd=math.min,ed=math.max,vd=math.floor,bd=math.ceil,fd=ji,gd=math.pi,hd=function(){function t(t,e,n){this.type="parallel",this._axesmap=ht(),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;nd(i,(function(t,n){var i=r[n],o=e.getcomponent("parallelaxis",i),a=this._axesmap.set(t,new kd(t,bx(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();nd(this.dimensions,(function(t){var e=this._axesmap.get(t);e.scale.unionextentfromdata(i,i.mapdimension(t)),vx(e.scale,e.model)}),this)}}),this)},t.prototype.resize=function(t,e){this._rect=vc(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=wd(e.get("axisexpandwidth"),l),c=wd(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=wd(d[1]-d[0],l),d[1]=d[0]+t):(t=wd(h*(c-1),l),(d=[h*(e.get("axisexpandcenter")||vd(u/2))-t/2])[1]=d[0]+t);var f=(s-t)/(u-c);f<3&&(f=0);var g=[vd(fd(d[0]/h,1))+1,bd(fd(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])})),nd(n,(function(e,n){var o=(i.axisexpandable?xd:ud)(n,i),a={horizontal:{x:o.position,y:i.axislength},vertical:{x:0,y:o.position}},s={horizontal:gd/2,vertical:0},l=[a[r].x+t.x,a[r].y+t.y],u=s[r],h=[1,0,0,1,0,0];xn(h,h,u),un(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=[];p(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)?pd(a,i,o,"all"):l="none";else{var p=i[1]-i[0];(i=[ed(0,o[1]*s/p-p/2)])[1]=zd(o[1],i[0]+p),i[0]=i[1]-p}return{axisexpandwindow:i,behavior:l}},t}();function wd(t,e){return zd(ed(t,e[0]),e[1])}function ud(t,e){var n=e.layoutlength/(e.axiscount-1);return{position:n*t,axisnameavailablewidth:n,axislabelshow:!0}}function xd(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--)qi(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&&pa(t);var l=w(s);l.brushtype=aa(l.brushtype,a),l.panelid=a===jd?null:a.panelid,o=t._creatingcover=ra(t,l),t._covers.push(o)}if(o){var u=pa[aa(t._brushtype,a)];o.__brushoption.range=u.getcreatingrange(ia(t,o,t._track)),i&&(oa(t,o),u.updatecommon(t,o)),aa(t,o),r={isend:i}}}else i&&"single"===s.brushmode&&s.removeonclick&&ha(t,e,n)&&pa(t)&&(r={isend:i,removeonclick:!0});return r}function aa(t,e){return"auto"===t?e.defaultbrushtype:t}var la={mousedown:function(t){if(this._dragging)ka(this,t);else if(!t.target||!t.target.draggable){ta(t);var e=this.group.transformcoordtolocal(t.offsetx,t.offsety);this._creatingcover=null,(this._creatingpanel=ha(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=ha(t,e,n);if(!t._dragging)for(var a=0;a=0&&(o[r[a].depth]=new oh(r[a],this,e));if(i&&n)return id(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[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 tf("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 tf("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={zlevel:0,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}(ff);function za(t,e){t.eachseriesbytype("sankey",(function(t){var n=t.get("nodewidth"),i=t.get("nodegap"),r=function(t,e){return vc(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){p(t,(function(t){var e=il(t.outedges,nl),n=il(t.inedges,nl),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--)ka(s,l*=.99,a),qa(s,r,n,i,a),rl(s,l,a),qa(s,r,n,i,a)}(t,e,o,r,i,a,s),function(t,e){var n="vertical"===e?"x":"y";p(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]}))})),p(t,(function(t){var e=0,n=0;p(t.outedges,(function(t){t.setlayout({sy:e},!0),e+=t.getlayout().dy})),p(t.inedges,(function(t){t.setlayout({ty:n},!0),n+=t.getlayout().dy}))}))}(t,s)}(l,u,n,i,o,a,0!==n(l,(function(t){return 0===t.getlayout().value})).length?0:t.get("layoutiterations"),t.get("orient"),t.get("nodealign"))}))}function ja(t){var e=t.hostgraph.data.getrawdataitem(t.dataindex);return null!=e.depth&&e.depth>=0}function qa(t,e,n,i,r){var o="vertical"===r?"x":"y";p(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 ka(t,e,n){p(t.slice().reverse(),(function(t){p(t,(function(t){if(t.outedges.length){var i=il(t.outedges,$a,n)/il(t.outedges,nl);if(isnan(i)){var r=t.outedges.length;i=r?il(t.outedges,ja,n)/r:0}if("vertical"===n){var o=t.getlayout().x+(i-el(t,n))*e;t.setlayout({x:o},!0)}else{var a=t.getlayout().y+(i-el(t,n))*e;t.setlayout({y:a},!0)}}}))}))}function $a(t,e){return el(t.node2,e)*t.getvalue()}function ja(t,e){return el(t.node2,e)}function qa(t,e){return el(t.node1,e)*t.getvalue()}function tl(t,e){return el(t.node1,e)}function el(t,e){return"vertical"===e?t.getlayout().x+t.getlayout().dx/2:t.getlayout().y+t.getlayout().dy/2}function nl(t){return t.getvalue()}function il(t,e,n){for(var i=0,r=t.length,o=-1;++oi&&(i=e)})),p(e,(function(e){var r=new tt({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 al=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=[];p(g,(function(t,e){var n;f(t)?(n=t.slice(),t.unshift(e)):f(t.value)?(n=t.value.slice(),t.value.unshift(e)):n=t,y.push(n)})),t.data=y}var v=this.defaultvaluedimensions,m=[{name:h,type:r_(d),ordinalmeta:n,otherdims:{tooltip:!1,itemname:0},dimsdef:["base"]},{name:c,type:r_(f),dimsdef:v.slice()}];return ms(this,{coorddimensions:m,dimensionscount:v.length+1,encodedefaulter:b(lp,m,this)})},t.prototype.getbaseaxis=function(){var t=this._baseaxisdim;return this.ecmodel.getcomponent(t+"axis",this.get(t+"axisindex")).axis},t}(),sl=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={zlevel:0,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}(ff);l(sl,al,!0);var ll=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=cl(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?pl(s,n,i,t):n=cl(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}(tf),ul=function(){},hl=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 ul},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 x=[v,_];i.push(x)}}}return{boxdata:n,outliers:i}}(e.getrawdata(),t.config);return[{dimensions:["itemname","low","q1","q2","q3","high"],data:i.boxdata},{data:i.outliers}]}};var ml=["color","bordercolor"],_l=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._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._islargedraw?this._incrementalrenderlarge(t,e):this._incrementalrendernormal(t,e)},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&&sl(s,a))return;var l=wl(a,n,!0);wu(l,{shape:{points:a.ends}},t,n),ml(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&&sl(s,h)?i.remove(u):(u?hu(u,{shape:{points:h.ends}},t,a):u=wl(h),ml(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(),dl(t,this.group);var e=t.get("clip",!0)?rw(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=wl(i.getitemlayout(n));ml(o,i,n,r),o.incremental=!0,this.group.add(o)}},e.prototype._incrementalrenderlarge=function(t,e){dl(e,this.group,!0)},e.prototype.remove=function(t){this._clear()},e.prototype._clear=function(){this.group.removeall(),this._data=null},e.type="candlestick",e}(tf),xl=function(){},bl=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 xl},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}(ka);function wl(t,e,n){var i=t.ends;return new bl({shape:{points:n?il(i,t):i},z2:100})}function sl(t,e){for(var n=!0,i=0;i0?"bordercolor":"bordercolor0"])||n.get(["itemstyle",t>0?"color":"color0"]),o=n.getmodel("itemstyle").getitemstyle(ml);e.usestyle(o),e.style.fill=null,e.style.stroke=r}var ll=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={zlevel:0,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}(ff);function kl(t){t&&f(t.series)&&p(t.series,(function(t){x(t)&&"k"===t.type&&(t.type="candlestick")}))}l(ll,al,!0);var pl=["itemstyle","bordercolor"],ol=["itemstyle","bordercolor0"],rl=["itemstyle","color"],nl=["itemstyle","color0"],zl={seriestype:"candlestick",plan:sf(),performrawseries:!0,reset:function(t,e){function n(t,e){return e.get(t>0?rl:nl)}function i(t,e){return e.get(t>0?pl:ol)}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,i(e.ensureuniqueitemvisual(r,"style"),s)}}}}},el="undefined"!=typeof float32array?float32array:array,vl={seriestype:"candlestick",plan:sf(),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=zi(tt(t.get("barmaxwidth"),r),r),a=zi(tt(t.get("barminwidth"),1),r),s=t.get("barwidth");return null!=s?zi(s,r):math.max(math.min(r/2,o),a)}(t,n),r=["x","y"],o=n.mapdimension(r[0]),a=n.mapdimensionsall(r[1]),s=a[0],l=a[1],u=a[2],h=a[3];if(n.setlayout({candlewidth:i,issimplebox:i<=1.3}),!(null==o||a.length<4))return{progress:t.pipelinecontext.large?function(t,n){var i,r,a=new el(4*t.count),c=0,p=[],d=[];for(;null!=(r=t.next());){var f=n.get(o,r),g=n.get(s,r),y=n.get(l,r),v=n.get(u,r),m=n.get(h,r);isnan(f)||isnan(v)||isnan(m)?(a[c++]=nan,c+=3):(a[c++]=bl(n,r,g,y,l),p[0]=f,p[1]=v,i=e.datatopoint(p,null,d),a[c++]=i?i[0]:nan,a[c++]=i?i[1]:nan,p[1]=m,i=e.datatopoint(p,null,d),a[c++]=i?i[1]:nan)}n.setlayout("largepoints",a)}:function(t,n){var r;for(;null!=(r=t.next());){var a=n.get(o,r),c=n.get(s,r),p=n.get(l,r),d=n.get(u,r),f=n.get(h,r),g=math.min(c,p),y=math.max(c,p),v=w(g,a),m=w(y,a),_=w(d,a),x=w(f,a),b=[];s(b,m,0),s(b,v,1),b.push(i(x),i(m),i(_),i(v)),n.setitemlayout(r,{sign:bl(n,r,c,p,l),initbaseline:c>p?m[1]:v[1],ends:b,brushrect:m(d,f,a)})}function w(t,n){var i=[];return i[0]=n,i[1]=t,isnan(n)||isnan(t)?[nan,nan]:e.datatopoint(i)}function s(t,e,n){var r=e.slice(),o=e.slice();r[0]=fu(r[0]+i/2,1,!1),o[0]=fu(o[0]-i/2,1,!0),n?t.push(r,o):t.push(o,r)}function m(t,e,n){var r=w(t,n),o=w(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 i(t){return t[0]=fu(t[0],1),t}}}}};function bl(t,e,n,i,r){return n>i?-1:n0?t.get(r,e-1)<=i?1:-1:1}function fl(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 gl=function(t){function e(e,n){var i=t.call(this)||this,r=new dw(e,n),o=new ei;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=this.childat(1),r=0;r<3;r++){var o=fy(e,-1,-1,2,2,n);o.attr({style:{strokenoscale:!0},z2:99,silent:!0,scalex:.5,scaley:.5});var a=-r/3*t.period+t.effectoffset;o.animate("",!0).when(t.period,{scalex:t.ripplescale/2,scaley:t.ripplescale/2}).delay(a).start(),o.animatestyle(!0).when(t.period,{opacity:0}).delay(a).start(),i.add(o)}fl(i,t)},e.prototype.updateeffectanimation=function(t){for(var e=this._effectcfg,n=this.childat(1),i=["symboltype","period","ripplescale"],r=0;r0&&(a=this._getlinelength(i)/l*1e3),(a!==this._period||s!==this._loop)&&(i.stopanimation(),a>0)){var h=void 0;h="function"==typeof u?u(n):u,i.__t>0&&(h=-a*i.__t),i.__t=0;var c=i.animate("",s).when(a,{__t:1}).delay(h).during((function(){r._updatesymbolposition(i)}));s||c.done((function(){r.remove(i)})),c.start()}this._period=a,this._loop=s}},e.prototype._getlinelength=function(t){return lt(t.__p1,t.__cp1)+lt(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=uo,l=xo;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}(ul),zl=function(){this.polyline=!1,this.curveness=0,this.segs=[]},jl=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 zl},e.prototype.buildpath=function(t,e){var n=e.segs,i=e.curveness;if(e.polyline)for(var r=0;r0){t.moveto(n[r++],n[r++]);for(var a=1;a0){var c=(s+u)/2-(l-h)*i,p=(l+h)/2-(u-s)*i;t.quadraticcurveto(c,p,u,h)}else t.lineto(u,h)}},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(oa(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}(ka),ql=function(){function t(){this.group=new ei}return t.prototype.ispersistent=function(){return!this._incremental},t.prototype.updatedata=function(t){this.group.removeall();var e=new jl({recthover:!0,cursor:"default"});e.setshape({segs:t.getlayout("linespoints")}),this._setcommon(e,t),this.group.add(e),this._incremental=null},t.prototype.incrementalprepareupdate=function(t){this.group.removeall(),this._clearincremental(),t.count()>5e5?(this._incremental||(this._incremental=new tu({silent:!0})),this.group.add(this._incremental)):this._incremental=null},t.prototype.incrementalupdate=function(t,e){var n=new jl;n.setshape({segs:e.getlayout("linespoints")}),this._setcommon(n,e,!!this._incremental),this._incremental?this._incremental.adddisplayable(n,!0):(n.recthover=!0,n.cursor="default",n.__startindex=t.start,this.group.add(n))},t.prototype.remove=function(){this._clearincremental(),this._incremental=null,this.group.removeall()},t.prototype._setcommon=function(t,e,n){var i=e.hostmodel;t.setshape({polyline:i.get("polyline"),curveness:i.get(["linestyle","curveness"])}),t.usestyle(i.getmodel("linestyle").getlinestyle()),t.style.strokenoscale=!0;var r=e.getvisual("style");if(r&&r.stroke&&t.setstyle("stroke",r.stroke),t.setstyle("fill",null),!n){var o=_s(t);o.seriesindex=i.seriesindex,t.on("mousemove",(function(e){o.dataindex=null;var n=t.finddataindex(e.offsetx,e.offsety);n>0&&(o.dataindex=n+t.__startindex)}))}},t.prototype._clearincremental=function(){var t=this._incremental;t&&t.cleardisplaybles()},t}(),kl={seriestype:"lines",plan:sf(),reset:function(t){var e=t.coordinatesystem,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;h ")})},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.type="series.lines",e.dependencies=["grid","polar","geo","calendar"],e.defaultoption={coordinatesystem:"geo",zlevel:0,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}(ff);function nk(t){return t instanceof array||(t=[t,t]),t}var ik={seriestype:"lines",reset:function(t){var e=nk(t.get("symbol")),n=nk(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=nk(n.getshallow("symbol",!0)),r=nk(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 rk=function(){function t(){this.blursize=30,this.pointsize=20,this.maxopacity=1,this.minopacity=0,this._gradientpixels={inrange:null,outofrange:null};var t=c();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 x+=4}return c.putimagedata(m,0,0),h},t.prototype._getbrush=function(){var t=this._brushcanvas||(this._brushcanvas=c()),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 ok(t){var e=t.dimensions;return"lng"===e[0]&&"lat"===e[1]}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.render=function(t,e,n){var i;e.eachcomponent("visualmap",(function(e){e.eachtargetseries((function(n){n===t&&(i=e)}))})),this.group.removeall(),this._incrementaldisplayable=null;var r=t.coordinatesystem;"cartesian2d"===r.type||"calendar"===r.type?this._renderoncartesianandcalendar(t,n,0,t.getdata().count()):ok(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&&(ok(r)?this.render(e,n,i):this._renderoncartesianandcalendar(e,i,t.start,t.end,!0))},e.prototype._renderoncartesianandcalendar=function(t,e,n,i,r){var o,a,s,l,u=t.coordinatesystem;if(nw(u,"cartesian2d")){var h=u.getaxis("x"),c=u.getaxis("y");0,o=h.getbandwidth(),a=c.getbandwidth(),s=h.scale.getextent(),l=c.scale.getextent()}for(var p=this.group,d=t.getdata(),f=t.getmodel(["emphasis","itemstyle"]).getitemstyle(),g=t.getmodel(["blur","itemstyle"]).getitemstyle(),y=t.getmodel(["select","itemstyle"]).getitemstyle(),v=ch(t),m=t.get(["emphasis","focus"]),_=t.get(["emphasis","blurscope"]),x=nw(u,"cartesian2d")?[d.mapdimension("x"),d.mapdimension("y"),d.mapdimension("value")]:[d.mapdimension("time"),d.mapdimension("value")],b=n;bs[1]||il[1])continue;var t=u.datatopoint([m,i]);w=new ls({shape:{x:math.floor(math.round(t[0])-o/2),y:math.floor(math.round(t[1])-a/2),width:math.ceil(o),height:math.ceil(a)},style:s})}else{if(isnan(d.get(x[1],b)))continue;w=new ls({z2:1,shape:u.datatorect([d.get(x[0],b)]).contentshape,style:s})}var c=d.getitemmodel(b);if(d.hasitemoption){var d=c.getmodel("emphasis");f=d.getmodel("itemstyle").getitemstyle(),g=c.getmodel(["blur","itemstyle"]).getitemstyle(),y=c.getmodel(["select","itemstyle"]).getitemstyle(),m=d.get("focus"),_=d.get("blurscope"),v=ch(c)}var a=t.getrawvalue(b),l="-";a&&null!=a[2]&&(l=a[2]+""),hh(w,v,{labelfetcher:t,labeldataindex:b,defaultopacity:s.opacity,defaulttext:l}),w.ensurestate("emphasis").style=f,w.ensurestate("blur").style=g,w.ensurestate("select").style=y,sl(w,m,_),w.incremental=r,r&&(w.states.emphasis.hoverlayer=!0),p.add(w),d.setitemgraphicel(b,w)}},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 rk;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(),_="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=o(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:o<0?-1:0}(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=f(f)?f.slice():null==f?["100%","100%"]:[f,f];h[p.index]=zi(h[p.index],d),h[c.index]=zi(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(lk)||0;o&&(hk.attr({scalex:e[0],scaley:e[1],rotation:n}),hk.updatetransform(),o/=hk.getlinescale(),o*=e[i.valuedim.index]);r.valuelinewidth=o}(n,c.symbolscale,l,i,c);var p=c.symbolsize,d=n.get("symboloffset");return f(d)&&(d=[zi(d[0],p[0]),zi(d[1],p[1])]),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=q(t.get("symbolmargin"),"15%")+"",_=!1;m.lastindexof("!")===m.length-1&&(_=!0,m=m.slice(0,m.length-1));var x=zi(m,e[d.index]),b=math.max(g+2*x,0),w=_?0:2*x,s=pr(i),m=s?i:dk((v+w)/b);b=g+2*(x=(v-m*g)/2/(_?m:m-1)),w=_?0:2*x,s||"fixed"===i||(m=u?dk((math.abs(u)+w)/b):0),y=m*b-w,c.repeattimes=m,c.symbolmargin=x}var t=f*(y/2),c=c.pathposition=[];c[p.index]=n[p.wh]/2,c[d.index]="start"===a?t:"end"===a?l-t:l/2,o&&(c[0]+=o[0],c[1]+=o[1]);var d=c.bundleposition=[];d[p.index]=n[p.xy],d[d.index]=n[d.xy];var a=c.barrectshape=i({},n);a[d.wh]=f*math.max(math.abs(n[d.wh]),math.abs(c[d.index]+t)),a[p.wh]=n[p.wh];var l=c.clipshape={};l[p.xy]=-n[p.xy],l[p.wh]=h.ecsize[p.wh],l[d.xy]=0,l[d.wh]=n[d.wh]}(n,p,r,o,0,d,s,c.valuelinewidth,c.boundinglength,c.repeatcutlength,i,c),c}function dk(t,e){return t.toglobalcoord(t.datatocoord(t.scale.parse(e)))}function fk(t){var e=t.symbolpatternsize,n=fy(t.symboltype,-e/2,-e/2,e,e);return n.attr({culling:!0}),"image"!==n.type&&n.setstyle({strokenoscale:!0}),n}function gk(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(ik(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 yk(t,e,n,i){var r=t.__pictorialbundle,o=t.__pictorialmainpath;o?tk(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=fk(n),r.add(o),tk(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 vk(t,e,n){var i=i({},e.barrectshape),r=t.__pictorialbarrect;r?tk(r,null,{shape:i},e,n):(r=t.__pictorialbarrect=new ls({z2:2,shape:i,silent:!0,style:{stroke:"transparent",fill:"transparent",linewidth:0}}),t.add(r))}function mk(t,e,n,i){if(n.symbolclip){var r=t.__pictorialclippath,o=i({},n.clipshape),a=e.valuedim,s=n.animationmodel,l=n.dataindex;if(r)hu(r,{shape:o},s,l);else{o[a.wh]=0,r=new ls({shape:o}),t.__pictorialbundle.setclippath(r),t.__pictorialclippath=r;var u={};u[a.wh]=n.clipshape[a.wh],ah[i?"updateprops":"initprops"](r,{shape:u},s,l)}}}function _k(t,e){var n=t.getitemmodel(e);return n.getanimationdelayparams=xk,n.isanimationenabled=bk,n}function xk(t){return{index:t.__pictorialanimationindex,count:t.__pictorialrepeattimes}}function bk(){return this.parentmodel.isanimationenabled()&&!!this.getshallow("animation")}function wk(t,e,n,i){var r=new ei,o=new ei;return r.add(o),r.__pictorialbundle=o,o.x=n.bundleposition[0],o.y=n.bundleposition[1],n.symbolrepeat?gk(r,e,n):yk(r,0,n),vk(r,n,i),mk(r,e,n,i),r.__pictorialshapestr=mk(t,n),r.__pictorialsymbolmeta=n,r}function sk(t,e,n,i){var r=i.__pictorialbarrect;r&&r.removetextcontent();var o=[];ik(i,(function(t){o.push(t)})),i.__pictorialmainpath&&o.push(i.__pictorialmainpath),i.__pictorialclippath&&(n=null),p(o,(function(t){uu(t,{scalex:0,scaley:0},n,e,(function(){i.parent&&i.parent.remove(i)}))})),t.setitemgraphicel(e,null)}function mk(t,e){return[t.getitemvisual(e.dataindex,"symbol")||"none",!!e.symbolrepeat,!!e.symbolclip].join(":")}function ik(t,e,n){p(t.__pictorialbundle.children(),(function(i){i!==t.__pictorialbarrect&&e.call(n,i)}))}function tk(t,e,n,i,r,o){e&&t.attr(e),i.symbolclip&&!r?n&&t.attr(n):n&&ah[r?"updateprops":"initprops"](t,n,i.animationmodel,i.dataindex,o)}function ck(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");ik(t,(function(t){if(t instanceof es){var e=t.style;t.usestyle(i({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,ch(r),{labelfetcher:e.seriesmodel,labeldataindex:i,defaulttext:cw(e.seriesmodel.getdata(),i),inheritcolor:n.style.fill,defaultopacity:n.style.opacity,defaultoutsideposition:d}),sl(t,h,c)}function dk(t){var e=math.round(t);return math.abs(t-e)<1e-4?e:math.ceil(t)}var ak=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=zh(qw.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}(qw);var lk=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 n_(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"):w&&"center"!==w?"left"===w?(v=r.r0+b,a>math.pi/2&&(w="right")):"right"===w&&(v=r.r-b,a>math.pi/2&&(w="left")):(v=(r.r+r.r0)/2,w="center"),d.style.align=w,d.style.verticalalign=f(o,"verticalalign")||"middle",d.x=v*s+r.cx,d.y=v*l+r.cy;var s=f(o,"rotate"),m=0;"radial"===s?(m=-a)<-math.pi/2&&(m+=math.pi):"tangential"===s?(m=math.pi/2-a)>math.pi/2?m-=math.pi:m<-math.pi/2&&(m+=math.pi):"number"==typeof s&&(m=s*math.pi/180),d.rotation=m})),h.dirtystyle()},e}(jl),nk="sunburstroottonode",zk="sunbursthighlight";var ek=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 rk(i,t,e,n);l.add(s),o.setitemgraphicel(i.dataindex,s)}}(null==s?null:i[s],null==h?null:r[h])}new n_(r,i,s,s).add(h).update(h).remove(b(h,null)).execute()}(h,c),function(i,o){o.depth>0?(r.virtualpiece?r.virtualpiece.updatedata(!1,i,t,e,n):(r.virtualpiece=new rk(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)pc(a,o.get("target",!0)||"_blank")}n=!0}}))}))},e.prototype._roottonode=function(t){t!==this.seriesmodel.getviewroot()&&this.api.dispatchaction({type:nk,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}(tf),vk=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};bk(n);var i=o(t.levels||[],(function(t){return new oh(t,this,e)}),this),r=$i.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=et(i,this),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(){lt(this)},e.type="series.sunburst",e.defaultoption={zlevel:0,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:[],levels:[],sort:"desc"},e}(ff);function bk(t){var e=0;p(t.children,(function(t){bk(t);var n=t.value;f(n)&&(n=n[0]),e+=n}));var n=t.value;f(n)&&(n=n[0]),(null==n||isnan(n))&&(n=e),n<0&&(n=0),f(t.value)?t.value[0]=n:t.value=n}var fk=math.pi/180;function gk(t,e,n){e.eachseriesbytype(t,(function(t){var e=t.get("center"),i=t.get("radius");f(i)||(i=[0,i]),f(e)||(e=[e,e]);var r=n.getwidth(),o=n.getheight(),a=math.min(r,o),s=zi(e[0],r),l=zi(e[1],o),u=zi(i[0],a/2),h=zi(i[1],a/2),c=-t.get("startangle")*fk,p=t.get("minangle")*fk,d=t.getdata().tree.root,f=t.getviewroot(),g=f.depth,y=t.get("sort");null!=y&&hk(f,y);var v=0;p(f.children,(function(t){!isnan(t.getvalue())&&v++}));var m=f.getvalue(),_=math.pi/(m||v)*2,x=f.depth>0,b=f.height-(x?-1:1),w=(h-u)/(b||1),s=t.get("clockwise"),m=t.get("stillshowzerosum"),i=s?1:-1,t=function(t,e){if(t){var n=e;if(t!==d){var i=t.getvalue(),r=0===m&&m?_:i*_;r1;)r=r.parentnode;var o=n.getcolorfrompalette(r.name||r.dataindex+"",e);return t.depth>1&&"string"==typeof o&&(o=ue(o,(t.depth-1)/(i-1)*.5)),o}(r,t,i.root.height)),i(n.ensureuniqueitemvisual(r.dataindex,"style"),o)}))}))}function uk(t,e){return e=e||[0,0],o(["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 xk(t,e){return e=e||[0,0],o([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 yk(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 zk(t,e){return e=e||[0,0],o(["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 jk(t,e,n,i){return t&&(t.legacy||!1!==t.legacy&&!n&&!i&&"tspan"!==e&&("text"===e||dt(t,"text")))}function qk(t,e,n){var i,r,o,a=t;if("text"===e)o=a;else{o={},dt(a,"text")&&(o.text=a.text),dt(a,"rich")&&(o.rich=a.rich),dt(a,"textfill")&&(o.fill=a.textfill),dt(a,"textstroke")&&(o.stroke=a.textstroke),r={type:"text",style:o,silent:!0},i={};var s=dt(a,"textposition");n?i.position=s?a.textposition:"inside":s&&(i.position=a.textposition),dt(a,"textposition")&&(i.position=a.textposition),dt(a,"textoffset")&&(i.offset=a.textoffset),dt(a,"textrotation")&&(i.rotation=a.textrotation),dt(a,"textdistance")&&(i.distance=a.textdistance)}return kk(o,t),p(o.rich,(function(t){kk(t,t)})),{textconfig:i,textcontent:r}}function kk(t,e){e&&(e.font=e.textfont||e.font,dt(e,"textstrokewidth")&&(t.linewidth=e.textstrokewidth),dt(e,"textalign")&&(t.align=e.textalign),dt(e,"textverticalalign")&&(t.verticalalign=e.textverticalalign),dt(e,"textlineheight")&&(t.lineheight=e.textlineheight),dt(e,"textwidth")&&(t.width=e.textwidth),dt(e,"textheight")&&(t.height=e.textheight),dt(e,"textbackgroundcolor")&&(t.backgroundcolor=e.textbackgroundcolor),dt(e,"textpadding")&&(t.padding=e.textpadding),dt(e,"textbordercolor")&&(t.bordercolor=e.textbordercolor),dt(e,"textborderwidth")&&(t.borderwidth=e.textborderwidth),dt(e,"textborderradius")&&(t.borderradius=e.textborderradius),dt(e,"textboxshadowcolor")&&(t.shadowcolor=e.textboxshadowcolor),dt(e,"textboxshadowblur")&&(t.shadowblur=e.textboxshadowblur),dt(e,"textboxshadowoffsetx")&&(t.shadowoffsetx=e.textboxshadowoffsetx),dt(e,"textboxshadowoffsety")&&(t.shadowoffsety=e.textboxshadowoffsety))}function $k(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";jk(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,p(e.rich,(function(t){jk(t,t)})),i}function jk(t,e){e&&(dt(e,"fill")&&(t.textfill=e.fill),dt(e,"stroke")&&(t.textstroke=e.fill),dt(e,"linewidth")&&(t.textstrokewidth=e.linewidth),dt(e,"font")&&(t.font=e.font),dt(e,"fontstyle")&&(t.fontstyle=e.fontstyle),dt(e,"fontweight")&&(t.fontweight=e.fontweight),dt(e,"fontsize")&&(t.fontsize=e.fontsize),dt(e,"fontfamily")&&(t.fontfamily=e.fontfamily),dt(e,"align")&&(t.textalign=e.align),dt(e,"verticalalign")&&(t.textverticalalign=e.verticalalign),dt(e,"lineheight")&&(t.textlineheight=e.lineheight),dt(e,"width")&&(t.textwidth=e.width),dt(e,"height")&&(t.textheight=e.height),dt(e,"backgroundcolor")&&(t.textbackgroundcolor=e.backgroundcolor),dt(e,"padding")&&(t.textpadding=e.padding),dt(e,"bordercolor")&&(t.textbordercolor=e.bordercolor),dt(e,"borderwidth")&&(t.textborderwidth=e.borderwidth),dt(e,"borderradius")&&(t.textborderradius=e.borderradius),dt(e,"shadowcolor")&&(t.textboxshadowcolor=e.shadowcolor),dt(e,"shadowblur")&&(t.textboxshadowblur=e.shadowblur),dt(e,"shadowoffsetx")&&(t.textboxshadowoffsetx=e.shadowoffsetx),dt(e,"shadowoffsety")&&(t.textboxshadowoffsety=e.shadowoffsety),dt(e,"textshadowcolor")&&(t.textshadowcolor=e.textshadowcolor),dt(e,"textshadowblur")&&(t.textshadowblur=e.textshadowblur),dt(e,"textshadowoffsetx")&&(t.textshadowoffsetx=e.textshadowoffsetx),dt(e,"textshadowoffsety")&&(t.textshadowoffsety=e.textshadowoffsety))}var qk=la.cmd,tp=2*math.pi,ep=["x","y"],np=["width","height"],ip=[];function rp(t,e){return math.abs(t-e)<1e-5}function op(t){var e,n,i,r,o,a=t.data,s=t.len(),l=[],u=0,h=0,c=0,p=0;function d(t,n){e&&e.length>2&&l.push(e),e=[t,n]}function f(t,n,i,r){rp(t,i)&&rp(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 ap(t,e){var n=t.length,i=e.length;if(n===i)return[t,e];for(var r=n0)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(_=0;_c.width?1:0,r=np[i],o=ep[i],a=c[r]/e,s=c[o],l=0;li[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:v(zk,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)}}}}},bp=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 f_(this.getsource(),this)},e.prototype.getdataparams=function(e,n,i){var r=t.prototype.getdataparams.call(this,e,n);return i&&(r.info=mp(i).info),r},e.type="series.custom",e.dependencies=["grid","polar","geo","singleaxis","calendar"],e.defaultoption={coordinatesystem:"cartesian2d",zlevel:0,z:2,legendhoverlink:!0,clip:!1},e}(ff),fp=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._data,o=t.getdata(),a=this.group,s=ao(t,o,e,n);r||a.removeall();var l=t.__transienttransitionopt;if(!l||null!=l.from&&null!=l.to){var u=new bo(t,l),h=l?"multiple":"onetoone";new n_(r?r.getindices():[],o.getindices(),gp(r,h,l&&l.from),gp(o,h,l&&l.to),null,h).add((function(e){lo(n,null,e,s(e,i),t,a,o,null)})).remove((function(e){vo(r.getitemgraphicel(e),t,a)})).update((function(e,l){u.reset("onetoone");var h=r.getitemgraphicel(l);u.findandaddfrom(h),u.hasfrom()&&(xo(h,a),h=null),lo(n,h,e,s(e,i),t,a,o,u),u.applymorphing()})).updatemanytoone((function(e,l){u.reset("manytoone");for(var h=0;h=0){!s&&(s=r[t]={});var f=e(l);for(c=0;c=0){var d=t.getanimationstyleprops(),f=d?d.style:null;if(f){!a&&(a=r.style={});var g=e(i);for(h=0;h=p;d--)vo(e.childat(d),r,e)}(t,e,n,i,r,s),l>=0?o.replaceat(e,l):o.add(e),e}function ho(t,e){var n,i=mp(t),r=e.type,o=e.shape,a=e.style;return null!=r&&r!==i.customgraphictype||"path"===r&&((n=o)&&(dt(n,"pathdata")||dt(n,"d")))&&mo(o)!==i.custompathdata||"image"===r&&dt(a,"image")&&a.image!==i.customimagepath}function co(t,e,n){var i=e?po(t,e):t,r=e?do(t,i,dp):t.style,o=t.type,a=i?i.textconfig:null,s=t.textcontent,l=s?e?po(s,e):s:null;if(r&&(n.islegacy||jk(r,o,!!a,!!l))){n.islegacy=!0;var u=qk(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 po(t,e){return e?t?t[e]:null:t}function do(t,e,n){var i=e&&e.style;return null==i&&n===dp&&t&&(i=t.styleemphasis),i}function fo(t,e){var n=t&&t.name;return null!=n?n:"e\0\0"+e}function go(t,e){var n=this.context,i=null!=t?n.newchildren[t]:null,r=null!=e?n.oldchildren[e]:null;uo(n.api,r,n.dataindex,i,n.seriesmodel,n.group,0,n.morphpreparation)}function yo(t){var e=this.context;vo(e.oldchildren[t],e.seriesmodel,e.group)}function vo(t,e,n){if(t){var i=mp(t).leavetoprops;i?hu(t,i,e,{cb:function(){n.remove(t)}}):n.remove(t)}}function mo(t){return t&&(t.pathdata||t.d)}function _o(t){return t&&t instanceof ka}function xo(t,e){t&&e.remove(t)}var bo=function(){function t(t,e){this._fromlist=[],this._tolist=[],this._toeloptionlist=[],this._allpropsfinallist=[],this._todataindices=[],this._morphconfiglist=[],this._seriesmodel=t,this._transopt=e}return t.prototype.hasfrom=function(){return!!this._fromlist.length},t.prototype.findandaddfrom=function(t){if(t&&(mp(t).canmorph&&this._fromlist.push(t),t.isgroup))for(var e=t.childrenref(),n=0;n=n?i-a:o;this._manytooneforsingleto(r,a>=i?null:a,s)}else if("onetomany"===t)for(var l=math.max(1,math.floor(n/i)),u=0,h=0;u=n?n-u:l;this._onetomanyforsinglefrom(u,c,h>=i?null:h)}},t.prototype._onetooneforsingleto=function(t,e){var n,i=this._tolist[t],r=this._toeloptionlist[t],o=this._todataindices[t],a=this._allpropsfinallist[t],s=this._fromlist[e],l=this._getorcreatemorphconfig(o),u=l.duration;if(s&&gp(s)){if(up(i,a,r.style),u){var h=yp([s],i,l,wo);this._processresultindividuals(h,t,null)}}else{var c=u&&s&&(s!==i||(fp(n=s)||gp(n)))?s:null,p={};yp("shape",i,c,r,p,!1),yp("extra",i,c,r,p,!1),jp(i,c,r,p,!1),qp(i,c,r,r.style,p,!1),up(i,a,r.style),c&&cp(c,i,l),xp(i,o,r,this._seriesmodel,p,!1)}},t.prototype._manytooneforsingleto=function(t,e,n){var i=this._tolist[t],r=this._toeloptionlist[t];up(i,this._allpropsfinallist[t],r.style);var o=this._getorcreatemorphconfig(this._todataindices[t]);if(o.duration&&null!=e){for(var a=[],s=e;sa)return!0;if(o){var s=um(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=so(t).pointerel=new ah[r.type](mo(e.pointer));t.add(o)}},t.prototype.createlabelel=function(t,e,n,i){if(e.label){var r=so(t).labelel=new cs(mo(e.label));t.add(r),ao(r,i)}},t.prototype.updatepointerel=function(t,e,n){var i=so(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=so(t).labelel;r&&(r.setstyle(e.label.style),n(r,{x:e.label.x,y:e.label.y}),ao(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=eh(o.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){ee(t.event)},onmousedown:io(this._onhandledragmove,this,0,0),drift:io(this._onhandledragmove,this),ondragend:io(this._onhandledragend,this)}),i.add(r)),ko(r,n,!1),r.setstyle(o.getitemstyle(null,["color","bordercolor","borderwidth","opacity","shadowcolor","shadowblur","shadowoffsetx","shadowoffsety"]));var s=o.get("size");f(s)||(s=[s,s]),r.scalex=s[0]/2,r.scaley=s[1]/2,zf(this,"_dodispatchaxispointer",o.get("throttle")||0,"fixrate"),this._movehandletovalue(t,e)}},t.prototype._movehandletovalue=function(t,e){co(this._axispointermodel,!e&&this._moveanimation,this._handle,lo(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(lo(n),[t,e],this._axismodel,this._axispointermodel);this._payloadinfo=i,n.stopanimation(),n.attr(lo(i)),so(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)},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 co(t,e,n,i){do(so(n).lastprop,i)||(so(n).lastprop=i,e?hu(n,i,t):(n.stopanimation(),n.attr(i)))}function do(t,e){if(x(t)&&x(e)){var n=!0;return p(e,(function(e,i){n=n&&do(t[i],e)})),!!n}return t===e}function ao(t,e){t[e.get(["label","show"])?"show":"hide"]()}function lo(t){return{x:t.x||0,y:t.y||0,rotation:t.rotation||0}}function ko(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 po(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 oo(t,e,n,i,r){var o=ro(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=wc(a.get("padding")||0),l=a.getfont(),u=bi(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:ph(a,{text:o,font:l,fill:a.gettextcolor(),padding:s,backgroundcolor:g}),z2:10}}function ro(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:gx(e,{value:t}),axisdimension:e.dim,axisindex:e.index,seriesdata:[]};p(i,(function(t){var e=n.getseriesbyindex(t.seriesindex),i=t.dataindexinside,r=e&&e.getdataparams(i);r&&s.seriesdata.push(r)})),h(a)?o=a.replace("{value}",o):g(a)&&(o=a(s))}return o}function no(t,e,n){var i=[1,0,0,1,0,0];return xn(i,i,n.rotation),un(i,i,n.position),qu([t.datatocoord(e),(n.labeloffset||0)+(n.labeldirection||1)*(n.labelmargin||0)],i)}function zo(t,e,n,i,r,o){var a=tm.innertextlayout(n.rotation,0,n.labeldirection);n.labelmargin=r.get(["label","margin"]),oo(e,i,r,o,{position:no(i.axis,t,n),align:a.textalign,verticalalign:a.textverticalalign})}function eo(t,e,n){return{x1:t[n=n||0],y1:t[1-n],x2:e[n],y2:e[1-n]}}function vo(t,e,n){return{x:t[n=n||0],y:t[1-n],width:e[n],height:e[1-n]}}function bo(t,e,n,i,r,o){return{cx:t,cy:e,r0:n,r:i,startangle:r,endangle:o,clockwise:!0}}var fo=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=go(a,o).getotheraxis(o).getglobalextent(),u=o.toglobalcoord(o.datatocoord(e,!0));if(s&&"none"!==s){var h=po(i),c=ho[s](o,u,l);c.style=h,t.graphickey=c.type,t.pointer=c}zo(e,t,ys(a.model,n),n,i,r)},e.prototype.gethandletransform=function(t,e,n){var i=ys(e.axis.grid.model,e,{labelinside:!1});i.labelmargin=n.get(["handle","margin"]);var r=no(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=go(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}(to);function go(t,e){var n={};return n[e.dim+"axisindex"]=e.index,t.getcartesian(n)}var ho={line:function(t,e,n){return{type:"line",subpixeloptimize:!0,shape:eo([e,n[0]],[e,n[1]],wo(t))}},shadow:function(t,e,n){var i=math.max(1,t.getbandwidth()),r=n[1]-n[0];return{type:"rect",shape:vo([e-i/2,n[0]],[i,r],wo(t))}}};function wo(t){return"x"===t.dim?0:1}var uo=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",zlevel:0,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}(xc),xo=kr(),yo=p;function zo(t,e,n){if(!a.node){var i=e.getzr();xo(i).records||(xo(i).records={}),function(t,e){if(xo(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);yo(xo(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)}))}xo(t).initialized=!0,n("click",b(qo,"click")),n("mousemove",b(qo,"mousemove")),n("globalout",jo)}(i,e),(xo(i).records[t]||(xo(i).records[t]={})).handler=n}}function jo(t,e,n){t.handler("leave",null,n)}function qo(t,e,n,i){e.handler(t,n,i)}function ko(t,e){if(!a.node){var n=e.getzr();(xo(n).records||{})[t]&&(xo(n).records[t]=null)}}var $o=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";zo("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){ko("axispointer",e)},e.prototype.dispose=function(t,e){ko("axispointer",e)},e.type="axispointer",e}(wf);function jo(t,e){var n,i=[],r=t.seriesindex;if(null==r||!(n=e.getseriesbyindex(r)))return{point:[]};var o=n.getdata(),a=lr(o,t);if(null==a||a<0||f(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(o(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 qo=kr();function tr(t,e,n){var i=t.currtrigger,r=[t.x,t.y],o=t,a=t.dispatchaction||v(n.dispatchaction,n),s=e.getcomponent("axispointer").coordsysaxesinfo;if(s){or(r)&&(r=jo({seriesindex:o.seriesindex,dataindex:o.dataindex},e).point);var l=or(r),u=o.axesinfo,h=s.axesinfo,c="leave"===i||or(r),p={},d={},f={list:[],map:{}},g={showpointer:b(nr,d),showtooltip:b(ir,f)};p(s.coordsysmap,(function(t,e){var n=l||t.containpoint(r);p(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&&er(t,a,g,!1,p)}}))}));var y={};return p(h,(function(t,e){var n=t.linkgroup;n&&!d[e]&&p(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,rr(e),rr(t)))),y[t.key]=o}}))})),p(y,(function(t,e){er(h[e],t,g,!0,p)})),function(t,e,n){var i=n.axesinfo=[];p(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(or(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=qo(i)[r]||{},a=qo(i)[r]={};p(t,(function(t,e){var n=t.axispointermodel.option;"show"===n.status&&p(n.seriesdataindices,(function(t){var e=t.seriesindex+" | "+t.dataindex;a[e]=t}))}));var s=[],l=[];p(o,(function(t,e){!a[e]&&l.push(t)})),p(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 er(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 p(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),p(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&&i(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 nr(t,e,n,i){t[e.key]={value:n,payloadbatch:i}}function ir(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=cm(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 rr(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 or(t){return!t||null==t[0]||isnan(t[0])||null==t[1]||isnan(t[1])}function ar(t){dm.registeraxispointerclass("cartesianaxispointer",fo),t.registercomponentmodel(uo),t.registercomponentview($o),t.registerpreprocessor((function(t){if(t){(!t.axispointer||0===t.axispointer.length)&&(t.axispointer={});var e=t.axispointer.link;e&&!f(e)&&(t.axispointer.link=[e])}})),t.registerprocessor(t.priority.processor.statistic,(function(t,e){t.getcomponent("axispointer").coordsysaxesinfo=am(t,e)})),t.registeraction({type:"updateaxispointer",event:"updateaxispointer",update:":updateaxispointer"},tr)}var sr=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=po(i),c=lr[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];xn(p,p,s),un(p,p,[i.cx,i.cy]),l=qu([a,-r],p);var d=e.getmodel("axislabel").get("rotate")||0,f=tm.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"]));oo(t,n,i,r,p)},e}(to);var lr={line:function(t,e,n,i){return"angle"===t.dim?{type:"line",shape:eo(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:bo(e.cx,e.cy,i[0],i[1],(-n-r/2)*o,(r/2-n)*o)}:{type:"sector",shape:bo(e.cx,e.cy,n-r/2,n+r/2,0,2*math.pi)}}},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.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={zlevel:0,z:0,center:["50%","50%"],radius:"80%"},e}(xc),hr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.getcoordsysmodel=function(){return this.getreferringcomponents("polar",nr).models[0]},e.type="polaraxis",e}(xc);l(hr,yx);var cr=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}(hr),pr=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}(hr),dr=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}(hb);dr.prototype.datatoradius=hb.prototype.datatocoord,dr.prototype.radiustodata=hb.prototype.coordtodata;var fr=kr(),gr=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=bi(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=fr(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}(hb);gr.prototype.datatoangle=hb.prototype.datatocoord,gr.prototype.angletodata=hb.prototype.coordtodata;var yr=function(){function t(t){this.dimensions=["radius","angle"],this.type="polar",this.cx=0,this.cy=0,this._radiusaxis=new dr,this._angleaxis=new gr,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,o=this.r,a=this.r0;return r<=o*o&&r>=a*a}}},t.prototype.converttopixel=function(t,e,n){return vr(e)===this?this.datatopoint(n):null},t.prototype.convertfrompixel=function(t,e,n){return vr(e)===this?this.pointtodata(n):null},t}();function vr(t){var e=t.seriesmodel,n=t.polarmodel;return n&&n.coordinatesystem||e&&e.coordinatesystem}function mr(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();p(xx(e,"radius"),(function(t){r.scale.unionextentfromdata(e,t)})),p(xx(e,"angle"),(function(t){i.scale.unionextentfromdata(e,t)}))}})),vx(i.scale,i.model),vx(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 _r(t,e){if(t.type=e.get("type"),t.scale=bx(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 xr={dimensions:yr.prototype.dimensions,create:function(t,e){var n=[];return t.eachcomponent("polar",(function(t,i){var r=new yr(i+"");r.update=mr;var o=r.getradiusaxis(),a=r.getangleaxis(),s=t.findaxismodel("radiusaxis"),l=t.findaxismodel("angleaxis");_r(o,s),_r(a,l),function(t,e,n){var i=e.get("center"),r=n.getwidth(),o=n.getheight();t.cx=zi(i[0],r),t.cy=zi(i[1],o);var a=t.getradiusaxis(),s=math.min(r,o)/2,l=e.get("radius");null==l?l=[0,"100%"]:f(l)||(l=[0,l]);var u=[zi(l[0],s),zi(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",nr).models[0];0,t.coordinatesystem=e.coordinatesystem}})),n}},br=["axisline","axislabel","axistick","minortick","splitline","minorsplitline","splitarea"];function wr(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 sr(t){return t.getradiusaxis().inverse?0:1}function mr(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 ir=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=o(n.getviewlabels(),(function(t){t=w(t);var e=n.scale,i="ordinal"===e.type?e.getrawordinalnumber(t.tickvalue):t.tickvalue;return t.coord=n.datatocoord(i),t}));mr(s),mr(o),p(br,(function(e){!t.get([e,"show"])||n.scale.isblank()&&"axisline"!==e||tr[e](this.group,t,i,o,a,r,s)}),this)}},e.type="angleaxis",e}(dm),tr={axisline:function(t,e,n,i,r,o){var a,s=e.getmodel(["axisline","linestyle"]),l=sr(n),u=l?0:1;(a=0===o[u]?new nl({shape:{cx:n.cx,cy:n.cy,r:o[l]},style:s.getlinestyle(),z2:1,silent:!0}):new tu({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[sr(n)],u=o(i,(function(t){return new uu({shape:wr(n,[l,l+s],t.coord)})}));t.add(vu(u,{style:t(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[sr(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];x(m)&&m.textstyle&&(a=new oh(m.textstyle,l,l.ecmodel))}var _=new cs({silent:tm.islabelsilent(e),style:ph(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(_),h){var x=tm.makeaxiseventdatabase(e);x.targettype="axislabel",x.value=i.rawlabel,_s(_).eventdata=x}}),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=x;m&&(i[s][m]||(i[s][m]={p:x,n:x}),t=i[s][m][i]);var c=void 0,d=void 0,a=void 0,l=void 0;if("radius"===c.dim){var k=c.datatocoord(s)-x,p=o.datatocoord(m);math.abs(k)=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 xr(e)===this?this.datatopoint(n):null},t.prototype.convertfrompixel=function(t,e,n){return xr(e)===this?this.pointtodata(n):null},t}();function xr(t){var e=t.seriesmodel,n=t.singleaxismodel;return n&&n.coordinatesystem||e&&e.coordinatesystem}var yr={create:function(t,e){var n=[];return t.eachcomponent("singleaxis",(function(i,r){var o=new ur(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",nr).models[0];t.coordinatesystem=e&&e.coordinatesystem}})),n},dimensions:ur.prototype.dimensions},zr=["x","y"],jr=["width","height"],qr=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=jr(a,1-$r(o)),l=a.datatopoint(e)[0],u=i.get("type");if(u&&"none"!==u){var h=po(i),c=kr[u](o,l,s);c.style=h,t.graphickey=c.type,t.pointer=c}zo(e,t,er(n),n,i,r)},e.prototype.gethandletransform=function(t,e,n){var i=er(e,{labelinside:!1});i.labelmargin=n.get(["handle","margin"]);var r=no(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=$r(r),s=jr(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=jr(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}(to),kr={line:function(t,e,n){return{type:"line",subpixeloptimize:!0,shape:eo([e,n[0]],[e,n[1]],$r(t))}},shadow:function(t,e,n){var i=t.getbandwidth(),r=n[1]-n[0];return{type:"rect",shape:vo([e-i/2,n[0]],[i,r],$r(t))}}};function $r(t){return t.ishorizontal()?0:1}function jr(t,e){var n=t.getrect();return[n[zr[e]],n[zr[e]]+n[jr[e]]]}var qr=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}(wf);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.init=function(e,n,i){var r=hc(e);t.prototype.init.apply(this,arguments),en(e,r)},e.prototype.mergeoption=function(e){t.prototype.mergeoption.apply(this,arguments),en(this.option,e)},e.prototype.getcellsize=function(){return this.option.cellsize},e.type="calendar",e.defaultoption={zlevel:0,z:2,left:80,top:60,cellsize:20,orient:"horizontal",splitline:{show:!0,linestyle:{color:"#000",width:1,type:"solid"}},itemstyle:{color:"#fff",borderwidth:1,bordercolor:"#ccc"},daylabel:{show:!0,firstday:0,position:"start",margin:"50%",namemap:"en",color:"#000"},monthlabel:{show:!0,position:"start",margin:5,align:"center",namemap:"en",formatter:null,color:"#000"},yearlabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontfamily:"sans-serif",fontweight:"bolder",fontsize:20}},e}(xc);function en(t,e){var n,i=t.cellsize;1===(n=f(i)?i:t.cellsize=[i,i]).length&&(n[1]=n[0]);var r=o([0,1],(function(t){return function(t,e){return null!=t[nc[e][0]]||null!=t[nc[e][1]]&&null!=t[nc[e][2]]}(e,t)&&(n[t]="auto"),null!=n[t]&&"auto"!==n[t]}));gc(t,e,{type:"box",ignoresize:r})}var nn={en:["jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec"],cn:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},in={en:["s","m","t","w","t","f","s"],cn:["日","一","二","三","四","五","六"]},rn=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();this._renderdayrect(t,o,i),this._renderlines(t,o,a,i),this._renderyeartext(t,o,a,i),this._rendermonthtext(t,a,i),this._renderweektext(t,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 ls({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 au({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"string"==typeof t&&t?(n=t,p(e,(function(t,e){n=n.replace("{"+e+"}",i?ic(t):t)})),n):"function"==typeof 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 cs({z2:30,style:ph(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){var i=t.getmodel("monthlabel");if(i.get("show")){var r=i.get("namemap"),o=i.get("margin"),a=i.get("position"),s=i.get("align"),l=[this._tlpoints,this._blpoints];h(r)&&(r=nn[r.touppercase()]||[]);var u="start"===a?0:1,h="horizontal"===e?0:1;o="start"===a?-o:o;for(var c="center"===s,p=0;p=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/on)-math.floor(n[0].time/on)+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 sn(t){var e=t.calendarmodel,n=t.seriesmodel;return e?e.coordinatesystem:n?n.coordinatesystem:null}var ln=kr(),un={path:null,compoundpath:null,group:ei,image:es,text:cs},hn=function(t){var e=t.graphic;f(e)?e[0]&&e[0].elements?t.graphic=[t.graphic[0]]:t.graphic=[{elements:e}]:e&&!e.elements&&(t.graphic=[{elements:[e]}])},cn=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.preventautoz=!0,n}return n(e,t),e.prototype.mergeoption=function(e,n){var i=this.option.elements;this.option.elements=null,t.prototype.mergeoption.call(this,e,n),this.option.elements=i},e.prototype.optionupdated=function(t,e){var n=this.option,i=(e?n:t).elements,r=n.elements=e?[]:n.elements,o=[];this._flatten(i,o,null);var a=mr(r,o,"normalmerge"),s=this._eloptionstoupdate=[];p(a,(function(t,e){var n=t.newoption;n&&(s.push(n),function(t,e){var n=t.existing;if(e.id=t.keyinfo.id,!e.type&&n&&(e.type=n.type),null==e.parentid){var i=e.parentoption;i?e.parentid=i.id:n&&(e.parentid=n.parentid)}e.parentoption=null}(t,n),function(t,e,n){var i=i({},n),r=t[e],o=n.$action||"merge";if("merge"===o){if(r)s(r,i,!0),gc(r,i,{ignoresize:!0}),wc(n,r);else t[e]=i}else"replace"===o?t[e]=i:"remove"===o&&r&&(t[e]=null)}(r,e,n),function(t,e){if(!t)return;if(t.hv=e.hv=[gn(e,["left","right"]),gn(e,["top","bottom"])],"group"===t.type){var n=t,i=e;null==n.width&&(n.width=i.width=0),null==n.height&&(n.height=i.height=0)}}(r[e],n))}),this);for(var l=r.length-1;l>=0;l--)null==r[l]?r.splice(l,1):delete r[l].$action},e.prototype._flatten=function(t,e,n){p(t,(function(t){if(t){n&&(t.parentoption=n),e.push(t);var i=t.children;"group"===t.type&&i&&this._flatten(i,e,t),delete t.children}}),this)},e.prototype.useeloptionstoupdate=function(){var t=this._eloptionstoupdate;return this._eloptionstoupdate=null,t},e.type="graphic",e.defaultoption={elements:[]},e}(xc),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.init=function(){this._elmap=ht()},e.prototype.render=function(t,e,n){t!==this._lastgraphicmodel&&this._clear(),this._lastgraphicmodel=t,this._updateelements(t),this._relocate(t,n)},e.prototype._updateelements=function(t){var e=t.useeloptionstoupdate();if(e){var n=this._elmap,i=this.group;p(e,(function(e){var r=cr(e.id,null),o=null!=r?n.get(r):null,a=cr(e.parentid,null),s=null!=a?n.get(a):i,l=e.type,u=e.style;"text"===l&&u&&e.hv&&e.hv[1]&&(u.textverticalalign=u.textbaseline=u.verticalalign=u.align=null);var h=e.textcontent,c=e.textconfig;if(u&&jk(u,l,!!c,!!h)){var p=qk(u,l,!0);!c&&p.textconfig&&(c=e.textconfig=p.textconfig),!h&&p.textcontent&&(h=p.textcontent)}var d=function(t){return t=i({},t),p(["id","parentid","$action","hv","bounding","textcontent"].concat(rc),(function(e){delete t[e]})),t}(e);var f=e.$action||"merge";"merge"===f?o?o.attr(d):dn(r,s,d,n):"replace"===f?(fn(o,n),dn(r,s,d,n)):"remove"===f&&fn(o,n);var g=n.get(r);if(g&&h)if("merge"===f){var y=g.gettextcontent();y?y.attr(h):g.settextcontent(new cs(h))}else"replace"===f&&g.settextcontent(new cs(h));if(g){var v=ln(g);v.__ecgraphicwidthoption=e.width,v.__ecgraphicheightoption=e.height,function(t,e,n){var i=_s(t).eventdata;t.silent||t.ignore||i||(i=_s(t).eventdata={componenttype:"graphic",componentindex:e.componentindex,name:t.name});i&&(i.info=n.info)}(g,t,e),oh({el:g,componentmodel:t,itemname:g.name,itemtooltipoption:e.tooltip})}}))}},e.prototype._relocate=function(t,e){for(var n=t.option.elements,i=this.group,r=this._elmap,o=e.getwidth(),a=e.getheight(),s=0;s=0;s--){var c,p,d;if(d=null!=(p=cr((c=n[s]).id,null))?r.get(p):null){var f=d.parent;h=ln(f);bc(d,c,f===i?{width:o,height:a}:{width:h.__ecgraphicwidth,height:h.__ecgraphicheight},null,{hv:c.hv,boundingmode:c.bounding})}}},e.prototype._clear=function(){var t=this._elmap;t.each((function(e){fn(e,t)})),this._elmap=ht()},e.prototype.dispose=function(){this._clear()},e.type="graphic",e}(wf);function dn(t,e,n,i){var r=n.type;var o=dt(un,r)?un[r]:ru(r);var a=new o(n);e.add(a),i.set(t,a),ln(a).__ecgraphicid=t}function fn(t,e){var n=t&&t.parent;n&&("group"===t.type&&t.traverse((function(t){fn(t,e)})),e.removekey(ln(t).__ecgraphicid),n.remove(t))}function gn(t,e){var n;return p(e,(function(e){null!=t[e]&&"auto"!==t[e]&&(n=!0)})),n}var yn=["x","y","radius","angle","single"],vn=["cartesian2d","polar","singleaxis"];function mn(t){return t+"axis"}function _n(t,e){var n,i=ht(),r=[],o=ht();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 xn(t){var e=t.ecmodel,n={infolist:[],infomap:ht()};return t.eachtargetaxis((function(t,i){var r=e.getcomponent(mn(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 bn=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}(),wn=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=sn(t);this.settledoption=i,this.mergedefaultandtheme(t,n),this._doinit(i)},e.prototype.mergeoption=function(t){var e=sn(t);s(this.option,t,!0),s(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;p([["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=ht();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 p(yn,(function(n){var i=this.getreferringcomponents(mn(n),zr);if(i.specified){e=!0;var r=new bn;p(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 bn;if(o.add(r.componentindex),t.set(n,o),i=!1,"x"===n||"y"===n){var a=r.getreferringcomponents("grid",nr).models[0];a&&p(e,(function(t){r.componentindex!==t.componentindex&&a===t.getreferringcomponents("grid",nr).models[0]&&o.add(t.componentindex)}))}}}i&&p(yn,(function(e){if(i){var r=n.findcomponents({maintype:mn(e),filter:function(t){return"category"===t.get("type",!0)}});if(r[0]){var o=new bn;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");p([["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(mn(e),n))}),this),t},e.prototype.eachtargetaxis=function(t,e){this._targetaxisinfomap.each((function(n,i){p(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(mn(t),e)},e.prototype.setrawrange=function(t){var e=this.option,n=this.settledoption;p([["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;p(["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=mn(this._dimname),i=e.getreferringcomponents(n,nr).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 w(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=[];cn(["start","end"],(function(l,u){var h=t[l],c=t[l+"value"];"percent"===r[u]?(null==h&&(h=o[u]),c=i.parse(yi(h,o,n))):(e=!0,h=yi(c=null==c?n[u]:i.parse(c),n,o)),s[u]=c,a[u]=h})),dn(s),dn(a);var l=this._minmaxspan;function u(t,e,n,r,o){var a=o?"span":"valuespan";pd(0,t,n,"all",l["min"+a],l["max"+a]);for(var s=0;s<2;s++)e[s]=yi(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];cn(n,(function(t){!function(t,e,n){e&&p(xx(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=nx(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&&cn(i,(function(t){var e=t.getdata(),i=e.mapdimensionsall(n);i.length&&("weakfilter"===r?e.filterself((function(t){for(var n,r,a,s=0;so[1];if(u&&!h&&!c)return!0;u&&(a=!0),h&&(n=!0),c&&(r=!0)}return a&&n&&r})):cn(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)}})),cn(i,(function(t){e.setapproximateextent(o,t)})))}))}},t.prototype._updateminmaxspan=function(){var t=this._minmaxspan={},e=this._datazoommodel,n=this._dataextent;cn(["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=yi(n[0]+o,n,[0,100],!0):null!=r&&(o=yi(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=ji(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 ln={gettargetseries:function(t){function e(e){t.eachcomponent("datazoom",(function(n){n.eachtargetaxis((function(i,r){var o=t.getcomponent(mn(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 an(e,i,o,t),n.push(r.__dzaxisproxy))}));var i=ht();return p(n,(function(t){p(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 kn=!1;function pn(t){kn||(kn=!0,t.registerprocessor(t.priority.processor.filter,ln),function(t){t.registeraction("datazoom",(function(t,e){p(_n(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 on(t){t.registercomponentmodel(mn),t.registercomponentview(tn),pn(t)}var rn=function(){},nn={};function zn(t,e){nn[t]=e}function en(t){return nn[t]}var vn=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;p(this.option.feature,(function(t,n){var i=en(n);i&&(i.getdefaultoption&&(i.defaultoption=i.getdefaultoption(e)),s(t,i.defaultoption))}))},e.type="toolbox",e.layoutmode={type:"box",ignoresize:!0},e.defaultoption={show:!0,z:6,zlevel:0,orient:"horizontal",left:"right",top:"top",backgroundcolor:"transparent",bordercolor:"#ccc",borderradius:0,borderwidth:0,padding:5,itemsize:15,itemgap:8,showtitle:!0,iconstyle:{bordercolor:"#666",color:"none"},emphasis:{iconstyle:{bordercolor:"#3e98c5"}},tooltip:{show:!1,position:"bottom"}},e}(xc);function bn(t,e){var n=wc(e.get("padding")),i=e.getitemstyle(["color","opacity"]);return i.fill=e.get("backgroundcolor"),t=new ls({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 fn=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=t.get("feature")||{},s=this._features||(this._features={}),l=[];p(a,(function(t,e){l.push(e)})),new n_(this._featurenames||[],l).add(u).update(u).remove(b(u,null)).execute(),this._featurenames=l,function(t,e,n){var i=e.getboxlayoutparams(),r=e.get("padding"),o={width:n.getwidth(),height:n.getheight()},a=vc(i,o,r);ec(e.get("orient"),t,e.get("itemgap"),a.width,a.height),bc(t,i,o,r)}(r,t,n),r.add(bn(r.getboundingrect(),t)),r.eachchild((function(t){var e=t.__title,i=t.ensurestate("emphasis"),a=i.textconfig||(i.textconfig={}),s=t.gettextcontent(),l=s&&s.states.emphasis;if(l&&!g(l)&&e){var u=l.style||(l.style={}),h=bi(e,cs.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+8;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 u(u,h){var c,p=l[u],d=l[h],f=a[p],g=new oh(f,t,t.ecmodel);if(i&&null!=i.newtitle&&i.featurename===p&&(f.title=i.newtitle),p&&!d){if(function(t){return 0===t.indexof("my")}(p))c={onclick:g.option.onclick,featurename:p};else{var y=en(p);if(!y)return;c=new y}s[p]=c}else if(!(c=s[d]))return;c.uid=nh("toolbox-feature"),c.model=g,c.ecmodel=e,c.api=n;var v=c instanceof rn;p||!d?!g.get("show")||v&&c.unusable?v&&c.remove&&c.remove(e,n):(!function(i,a,s){var l,u,h=i.getmodel("iconstyle"),c=i.getmodel(["emphasis","iconstyle"]),p=a instanceof rn&&a.geticons?a.geticons():i.get("icon"),d=i.get("title")||{};"string"==typeof p?(l={})[s]=p:l=p;"string"==typeof d?(u={})[s]=d:u=d;var f=i.iconpaths={};p(l,(function(s,l){var p=eh(s,{},{x:-o/2,y:-o/2,width:o,height:o});p.setstyle(h.getitemstyle()),p.ensurestate("emphasis").style=c.getitemstyle();var d=new cs({style:{text:u[l],align:c.get("textalign"),borderradius:c.get("textborderradius"),padding:c.get("textpadding"),fill:null},ignore:!0});p.settextcontent(d),oh({el:p,componentmodel:t,itemname:l,formatterparamsextra:{title:u[l]}}),p.__title=u[l],p.on("mouseover",(function(){var e=c.getitemstyle(),n="vertical"===t.get("orient")?null==t.get("right")?"right":"left":null==t.get("bottom")?"bottom":"top";d.setstyle({fill:c.get("textfill")||e.fill||e.stroke||"#000",backgroundcolor:c.get("textbackgroundcolor")}),p.settextconfig({position:c.get("textposition")||n}),d.ignore=!t.get("showtitle"),js(this)})).on("mouseout",(function(){"emphasis"!==i.get(["iconstatus",l])&&qs(this),d.hide()})),("emphasis"===i.get(["iconstatus",l])?js:qs)(p),r.add(p),p.on("click",v(a.onclick,a,e,n,l)),f[l]=p}))}(g,c,p),g.seticonstatus=function(t,e){var n=this.option,i=this.iconpaths;n.iconstatus=n.iconstatus||{},n.iconstatus[t]=e,i[t]&&("emphasis"===e?js:qs)(i[t])},c instanceof rn&&c.render&&c.render(g,e,n,i)):v&&c.dispose&&c.dispose(e,n)}},e.prototype.updateview=function(t,e,n,i){p(this._features,(function(t){t instanceof rn&&t.updateview&&t.updateview(t.model,e,n,i)}))},e.prototype.remove=function(t,e){p(this._features,(function(n){n instanceof rn&&n.remove&&n.remove(t,e)})),this.group.removeall()},e.prototype.dispose=function(t,e){p(this._features,(function(n){n instanceof rn&&n.dispose&&n.dispose(t,e)}))},e.type="toolbox",e}(wf);var gn=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",r="svg"===e.getzr().painter.gettype(),o=r?"svg":n.get("type",!0)||"png",s=e.getconnecteddataurl({type:o,backgroundcolor:n.get("backgroundcolor",!0)||t.get("backgroundcolor")||"#fff",connectedbackgroundcolor:n.get("connectedbackgroundcolor"),excludecomponents:n.get("excludecomponents"),pixelratio:n.get("pixelratio")});if("function"!=typeof mouseevent||!a.browser.newedge&&(a.browser.ie||a.browser.edge))if(window.navigator.mssaveoropenblob||r){var l=s.split(","),u=l[0].indexof("base64")>-1,h=r?decodeuricomponent(l[1]):l[1];u&&(h=window.atob(h));var c=i+"."+o;if(window.navigator.mssaveoropenblob){for(var p=h.length,d=new uint8array(p);p--;)d[p]=h.charcodeat(p);var f=new blob([d]);window.navigator.mssaveoropenblob(f,c)}else{var g=document.createelement("iframe");document.body.appendchild(g);var y=g.contentwindow,v=y.document;v.open("image/svg+xml","replace"),v.write(h),v.close(),y.focus(),v.execcommand("saveas",!0,c),document.body.removechild(g)}}else{var m=n.get("lang"),_='',x=window.open();x.document.write(_),x.document.title=i}else{var b=document.createelement("a");b.download=i+"."+o,b.target="_blank",b.href=s;var w=new mouseevent("click",{view:document.defaultview,bubbles:!0,cancelable:!1});b.dispatchevent(w)}},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.getlocale(["toolbox","saveasimage","title"]),type:"png",connectedbackgroundcolor:"#fff",name:"",excludecomponents:["toolbox"],lang:t.getlocale(["toolbox","saveasimage","lang"])}},e}(rn);gn.prototype.unusable=!a.canvassupported;var hn="__ec_magictype_stack__",wn=[["line","bar"],["stack"]],un=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 p(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.getlocale(["toolbox","magictype","title"]),option:{},seriesindex:{}}},e.prototype.onclick=function(t,e,n){var i=this.model,r=i.get(["seriesindex",n]);if(xn[n]){var o,a={series:[]};p(wn,(function(t){d(t,n)>=0&&p(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=xn[n](e,r,t,i);o&&(t(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,nr).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=s({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}(rn),xn={line:function(t,e,n,i){if("bar"===t)return s({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 s({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")===hn;if("line"===t||"bar"===t)return i.seticonstatus("stack",r?"normal":"emphasis"),s({id:e,stack:r?"":hn},i.get(["option","stack"])||{},!0)}};hm({type:"changemagictype",event:"magictypechanged",update:"prepareandupdate"},(function(t,e){e.mergeoption(t.newoption)}));var yn=new array(60).join("-"),zn="\t";function jn(t){return t.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}var qn=new regexp("[\t]+","g");function kn(t,e){var n=t.split(new regexp("\n*"+yn+"\n*","g")),i={series:[]};return p(n,(function(t,n){if(function(t){if(t.slice(0,t.indexof("\n")).indexof(zn)>=0)return!0}(t)){var r=function(t){for(var e=t.split(/\n+/g),n=[],i=o(jn(e.shift()).split(qn),(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=hz[t.brushtype](0,n,e);t.__rangeoffset={offset:pz[t.brushtype](i.values,t.range,[1,1]),xyminmax:i.xyminmax}}})),t},t.prototype.matchoutputranges=function(t,e,n){p(t,(function(t){var i=this.findtargetinfo(t,e);i&&!0!==i&&p(i.coordsyses,(function(i){var r=hz[t.brushtype](1,i,t.range,!0);n(t,r.values,i,e)}))}),this)},t.prototype.setinputranges=function(t,e){p(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=hz[t.brushtype](0,s.coordsys,t.coordrange),u=t.__rangeoffset;t.range=u?pz[t.brushtype](l.values,u.offset,(n=l.xyminmax,i=u.xyminmax,r=fz(n),o=fz(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 o(this._targetinfolist,(function(n){var i=n.getpanelrect();return{panelid:n.panelid,defaultbrushtype:e?e(n):null,clippath:ra(i),istargetbycursor:za(i,t,n.coordsysmodel),getlinearbrushotherextent:na(i)}}))},t.prototype.controlseries=function(t,e,n){var i=this.findtargetinfo(t,n);return!0===i||i&&d(i.coordsyses,e.coordinatesystem)>=0},t.prototype.findtargetinfo=function(t,e){for(var n=this._targetinfolist,i=az(e,t),r=0;rt[1]&&t.reverse(),t}function az(t,e){return or(t,e,{includemaintypes:iz})}var sz={grid:function(t,e){var n=t.xaxismodels,i=t.yaxismodels,r=t.gridmodels,o=ht(),a={},s={};(n||i||r)&&(p(n,(function(t){var e=t.axis.grid.model;o.set(e.id,e),a[e.id]=!0})),p(i,(function(t){var e=t.axis.grid.model;o.set(e.id,e),s[e.id]=!0})),p(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=[];p(r.getcartesians(),(function(t,e){(d(n,t.getaxis("x").model)>=0||d(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:uz.grid,xaxisdeclared:a[t.id],yaxisdeclared:s[t.id]})})))},geo:function(t,e){p(t.geomodels,(function(t){var n=t.coordinatesystem;e.push({panelid:"geo--"+t.id,geomodel:t,coordsysmodel:t,coordsys:n,coordsyses:[n],getpanelrect:uz.geo})}))}},lz=[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}],uz={grid:function(){return this.coordsys.master.getrect().clone()},geo:function(){var t=this.coordsys,e=t.getboundingrect().clone();return e.applytransform(ju(t)),e}},hz={linex:b(cz,0),liney:b(cz,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=[oz([r[0],o[0]]),oz([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:o(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 cz(t,e,n,i){var r=n.getaxis(["x","y"][t]),o=oz(o([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 pz={linex:b(dz,0),liney:b(dz,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 o(t,(function(t,i){return[t[0]-n[0]*e[i][0],t[1]-n[1]*e[i][1]]}))}};function dz(t,e,n,i){return[e[0]-i[t]*n[0],e[1]-i[t]*n[1]]}function fz(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[nan,nan]}var gz,yz,vz=p,mz=_r+"toolbox-datazoom_",_z=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 ia(n.getzr()),this._brushcontroller.on("brush",v(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 rz(bz(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 ez(t).length}(e)>1?"emphasis":"normal")}(t,e)},e.prototype.onclick=function(t,e,n){xz[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 rz(bz(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=ez(t);qn(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=pd(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=[];vz(t,(function(t,n){e.push(w(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.getlocale(["toolbox","datazoom","title"]),brushstyle:{borderwidth:0,color:"rgba(210,219,238,0.2)"}}},e}(rn),xz={zoom:function(){var t=!this._iszoomactive;this.api.dispatchaction({type:"takeglobalcursor",key:"datazoomselect",datazoomselectactive:t})},back:function(){this._dispatchzoomaction(function(t){var e=ez(t),n=e[e.length-1];e.length>1&&e.pop();var i={};return qn(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 bz(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}gz="datazoom",yz=function(t){var e=t.getcomponent("toolbox",0),n=["feature","datazoom"];if(e&&null!=e.get(n)){var i=e.getmodel(n),r=[],o=or(t,bz(i));return vz(o.xaxismodels,(function(t){return a(t,"xaxis","xaxisindex")})),vz(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:mz+e+o};a[n]=o,r.push(a)}},rt(null==dp.get(gz)&&yz),dp.set(gz,yz);var wz=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={zlevel:0,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}(xc);function sz(t){var e=t.get("confine");return null!=e?!!e:"richtext"===t.get("rendermode")}function mz(t){if(a.domsupported)for(var e=document.documentelement.style,n=0,i=t.length;n-1?(o+="top:50%",a+="translatey(-50%) rotate("+("left"===r?-225:-45)+"deg)"):(o+="left:50%",a+="translatex(-50%) rotate("+("top"===r?225:45)+"deg)");var s=e+" solid 1px;";return'
'}(n.get("backgroundcolor"),i,r)),h(t))o.innerhtml=t;else if(t){o.innerhtml="",f(t)||(t=[t]);for(var a=0;a=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;if(null!=this._lastx&&null!=this._lasty&&"none"!==t.get("triggeron")){var i=this;cleartimeout(this._refreshupdatetimeout),this._refreshupdatetimeout=settimeout((function(){!n.isdisposed()&&i.manuallyshowtip(t,e,n,{x:i._lastx,y:i._lasty,databycoordsys:i._lastdatabycoordsys})}))}},e.prototype.manuallyshowtip=function(t,e,n,i){if(i.from!==this.uid&&!a.node){var r=xz(i,n);this._ticket="";var o=i.databycoordsys,s=function(t,e,n){var i=rr(t).queryoptionmap,r=i.keys()[0];if(!r||"series"===r)return;var o,a=er(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=_s(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"},r)}else if(i.tooltip&&null!=i.x&&null!=i.y){var u=hz;u.x=i.x,u.y=i.y,u.update(),_s(u).tooltipconfig={name:null,option:i.tooltip},this._tryshow({offsetx:i.x,offsety:i.y,target:u},r)}else if(o)this._tryshow({offsetx:i.x,offsety:i.y,position:i.position,databycoordsys:o,tooltipoption:i.tooltipoption},r);else if(null!=i.seriesindex){if(this._manuallyaxisshowtip(t,e,n,i))return;var h=jo(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"},r)}else null!=i.x&&null!=i.y&&(n.dispatchaction({type:"updateaxispointer",x:i.x,y:i.y}),this._tryshow({offsetx:i.x,offsety:i.y,position:i.position,target:n.getzr().findhover(i.x,i.y).target},r))}},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(xz(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"===uz([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,iy(n,(function(t){return null!=_s(t).dataindex?(r=t,!0):null!=_s(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=v(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=uz([e.tooltipoption],i),a=this._rendermode,s=[],l=tf("section",{blocks:[],noheader:!0}),u=[],h=new hf;fz(t,(function(t){fz(t.databyaxis,(function(t){var e=n.getcomponent(t.axisdim+"axis",t.axisindex),i=t.value;if(e&&null!=i){var r=ro(i,e.axis,n,t.seriesdataindices,t.valuelabelopt),o=tf("section",{header:r,noheader:!ot(r),sortblocks:!0,blocks:[]});l.blocks.push(o),p(t.seriesdataindices,(function(l){var c=n.getseriesbyindex(l.seriesindex),p=l.dataindexinside,d=c.getdataparams(p);d.axisdim=t.axisdim,d.axisindex=t.axisindex,d.axistype=t.axistype,d.axisid=t.axisid,d.axisvalue=gx(e.axis,{value:i}),d.axisvaluelabel=r,d.marker=h.maketooltipmarker("item",kc(d.color),a);var f=cd(c.formattooltip(p,!0,null));f.markupfragment&&o.blocks.push(f.markupfragment),f.markuptext&&u.push(f.markuptext),s.push(d)}))}}))})),l.blocks.reverse(),u.reverse();var c=e.position,p=o.get("order"),d=rf(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)?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=_s(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=uz([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 hf;g.marker=y.maketooltipmarker("item",kc(g.color),c);var v=cd(s.formattooltip(l,!1,u)),m=d.get("order"),_=v.markupfragment?rf(v.markupfragment,y,c,m,i.get("useutc"),d.get("textstyle")):v.markuptext,x="item_"+s.name+"_"+l;this._showormove(d,(function(){this._showtooltipcontent(d,_,g,x,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=_s(e),r=i.tooltipconfig.option||{};if(h(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=uz(o,this._tooltipmodel,s?{position:s}:null),u=l.get("content"),h=math.random()+"",c=new hf;this._showormove(l,(function(){var n=w(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,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&&h(h)){var d=t.ecmodel.get("useutc"),f=f(n)?n[0]:n;c=h,f&&f.axistype&&f.axistype.indexof("time")>=0&&(c=ic(f.axisvalue,c,d)),c=ac(c,n,!0)}else if(g(h)){var g=bz((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)}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||f(e)?{color:i||("html"===this._rendermode?"#fff":"none")}:f(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),g(e)&&(e=e([n,i],o,r.el,p,{viewsize:[s,l],contentsize:u.slice()})),f(e))n=gz(e[0],s),i=gz(e[1],l);else if(x(e)){var d=e;d.width=u[0],d.height=u[1];var f=vc(d,{width:s,height:l});n=f.x,i=f.y,h=null,c=null}else if(h(e)&&a){var g=function(t,e,n){var i=n[0],r=n[1],o=10,a=5,s=0,l=0,u=e.width,h=e.height;switch(t){case"inside":s=e.x+u/2-i/2,l=e.y+h/2-r/2;break;case"top":s=e.x+u/2-i/2,l=e.y-r-o;break;case"bottom":s=e.x+u/2-i/2,l=e.y+h+o;break;case"left":s=e.x-i-o-a,l=e.y+h/2-r/2;break;case"right":s=e.x+u+o+a,l=e.y+h/2-r/2}return[s,l]}(e,p,u);n=g[0],i=g[1]}else{g=function(t,e,n,i,r,o,a){var s=n.getoutersize(),l=s.width,u=s.height;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-=yz(h)?u[0]/2:"right"===h?u[0]:0),c&&(i-=yz(c)?u[1]/2:"bottom"===c?u[1]:0),sz(t)){g=function(t,e,n,i,r){var o=n.getoutersize(),a=o.width,s=o.height;return t=math.min(t+a,i)-a,e=math.min(e+s,r)-s,t=math.max(t,0),e=math.max(e,0),[t,e]}(n,i,r,s,l);n=g[0],i=g[1]}r.moveto(n,i)},e.prototype._updatecontentnotchangedonaxis=function(t){var e=this._lastdatabycoordsys,n=!!e&&e.length===t.length;return n&&fz(e,(function(e,i){var r=e.databyaxis||[],o=(t[i]||{}).databyaxis||[];(n=n&&r.length===o.length)&&fz(r,(function(t,e){var i=o[e]||{},r=t.seriesdataindices||[],a=i.seriesdataindices||[];(n=n&&t.value===i.value&&t.axistype===i.axistype&&t.axisid===i.axisid&&r.length===a.length)&&fz(r,(function(t,e){var i=a[e];n=n&&t.seriesindex===i.seriesindex&&t.dataindex===i.dataindex}))}))})),this._lastdatabycoordsys=t,!!n},e.prototype._hide=function(t){this._lastdatabycoordsys=null,t({type:"hidetip",from:this.uid})},e.prototype.dispose=function(t,e){a.node||(this._tooltipcontent.dispose(),ko("itemtooltip",e))},e.type="tooltip",e}(wf);function uz(t,e,n){var i,r=e.ecmodel;n?(i=new oh(n,r,r),i=new oh(e.option,i,r)):i=e;for(var o=t.length-1;o>=0;o--){var a=t[o];a&&(a instanceof oh&&(a=a.get("tooltip",!0)),h(a)&&(a={formatter:a}),a&&(i=new oh(a,i,r)))}return i}function xz(t,e){return t.dispatchaction||v(e.dispatchaction,e)}function yz(t){return"center"===t||"middle"===t}var zz=["rect","polygon","keep","clear"];function jz(t,e){var n=xr(t?t.brush:[]);if(n.length){var i=[];p(n,(function(t){var e=t.hasownproperty("toolbox")?t.toolbox:[];e instanceof array&&(i=i.concat(e))}));var r=t&&t.toolbox;f(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={};p(t,(function(t){e[t]=1})),t.length=0,p(e,(function(e,n){t.push(n)}))}(s),e&&!s.length&&s.push.apply(s,zz)}}var qz=p;function kz(t){if(t)for(var e in t)if(t.hasownproperty(e))return!0}function $z(t,e,n){var i={};return qz(e,(function(e){var r,o=i[e]=((r=function(){}).prototype.__hidden=r.prototype,new r);qz(t[e],(function(t,i){if(tt.isvalidtype(i)){var r={type:i,visual:t};n&&n(r,e),o[i]=new tt(r),"opacity"===i&&((r=w(r)).type="coloralpha",o.__hidden.__alphaforopacity=new tt(r))}}))})),i}function jz(t,e,n){var i;p(n,(function(t){e.hasownproperty(t)&&kz(e[t])&&(i=!0)})),i&&p(n,(function(n){e.hasownproperty(n)&&kz(e[n])?t[n]=w(e[n]):delete t[n]}))}var qz={linex:te(0),liney:te(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])&&uv(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!!(uv(i,r,o)||uv(i,r+a,o)||uv(i,r,o+s)||uv(i,r+a,o+s)||gi.create(t).contain(l[0],l[1])||nh(r,o,r+a,o,i)||nh(r,o,r,o+s,i)||nh(r+a,o,r+a,o+s,i)||nh(r,o+s,r+a,o+s,i))||void 0}}};function te(t){var e=["x","y"],n=["width","height"];return{point:function(e,n,i){if(e){var r=i.range;return ee(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&&he(e)}};function he(t){return new gi(t[0][0],t[1][0],t[0][1]-t[0][0],t[1][1]-t[1][0])}var ce=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 ia(e.getzr())).on("brush",v(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){oe(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:w(n),$from:e}),t.isend&&this.api.dispatchaction({type:"brushend",brushid:e,areas:w(n),$from:e})},e.type="brush",e}(wf),pe=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&&jz(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=o(t,(function(t){return de(this.option,t)}),this))},e.prototype.setbrushoption=function(t){this.brushoption=de(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}(xc);function de(t,e){return s({brushtype:t.brushtype,brushmode:t.brushmode,transformable:t.transformable,brushstyle:new oh(t.brushstyle).getitemstyle(),removeonclick:t.removeonclick,z:t.z},e,!0)}var fe=["rect","polygon","linex","liney","keep","clear"],ge=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,p(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 p(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:fe.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.getlocale(["toolbox","brush","title"])}},e}(rn);var ye=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={zlevel:0,z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundcolor:"rgba(0,0,0,0)",bordercolor:"#ccc",borderwidth:0,padding:5,itemgap:10,textstyle:{fontsize:18,fontweight:"bold",color:"#464646"},subtextstyle:{fontsize:12,color:"#6e7079"}},e}(xc),ve=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=tt(t.get("textbaseline"),t.get("textverticalalign")),l=new cs({style:ph(r,{text:t.get("text"),fill:r.gettextcolor()},{disablebox:!0}),z2:10}),u=l.getboundingrect(),h=t.get("subtext"),c=new cs({style:ph(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(){pc(p,"_"+t.get("target"))})),d&&c.on("click",(function(){pc(d,"_"+t.get("subtarget"))})),_s(l).eventdata=_s(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=vc(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 _=v.margin,x=t.getitemstyle(["color","opacity"]);x.fill=t.get("backgroundcolor");var b=new ls({shape:{x:g.x-_[3],y:g.y-_[0],width:g.width+_[1]+_[3],height:g.height+_[0]+_[2],r:t.get("borderradius")},style:x,subpixeloptimize:!0,silent:!0});i.add(b)}},e.type="title",e}(wf);var me=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=[],p(n,(function(e,n){var i,o=cr(sr(e),"");x(e)?(i=w(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 l_([{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={zlevel:0,z:4,show:!0,axistype:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlposition:"left",autoplay:!1,rewind:!1,loop:!0,playinterval:2e3,currentindex:0,itemstyle:{},label:{color:"#000"},data:[]},e}(xc),_e=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=zh(me.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}(me);l(_e,td.prototype);var xe=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}(wf),be=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}(hb),we=math.pi,se=kr(),me=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 tf("namevalue",{noname:!0,value:a.scale.getlabel({value:t})})},p(["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 vc(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:we/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*we/180;var _=d.get("position",!0),x=f&&d.get("showplaybtn",!0),b=f&&d.get("showprevbtn",!0),w=f&&d.get("shownextbtn",!0),s=0,m=p;"left"===_||"bottom"===_?(x&&(i=[0,0],s+=v),b&&(r=[s,0],s+=v),w&&(o=[m-g,0],m-=v)):(x&&(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;un(o,o,[-a,-s]),xn(o,o,-we/2),un(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||h(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 $_({ordinalmeta:t.getcategories(),extent:[1/0,-1/0]});case"time":return new dx({locale:t.ecmodel.getlocalemodel(),useutc:t.ecmodel.get("useutc")});default:return new q_}}(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.niceticks();var a=new be("value",r,t.axisextent,i);return a.model=e,a},e.prototype._creategroup=function(t){var e=this[t]=new ei;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 uu({shape:{x1:r[0],y1:0,x2:r[1],y2:0},style:i({linecap:"round"},i.getmodel("linestyle").getlinestyle()),silent:!0,z2:1});e.add(o);var a=this._progressline=new uu({shape:{x1:r[0],x2:this._currentpointer?this._currentpointer.x:r[0],y1:0,y2:0},style:t({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=[],p(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:v(r._changetimeline,r,t.value)},p=ie(s,l,e,c);p.ensurestate("emphasis").style=u.getitemstyle(),p.ensurestate("progress").style=h.getitemstyle(),sl(p);var d=_s(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=[],p(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 cs({x:c,y:0,rotation:t.labelrotation-t.rotation,onclick:v(r._changetimeline,r,a),silent:!1,style:ph(l,{text:i.formattedlabel,align:t.labelalign,verticalalign:t.labelbaseline})});p.ensurestate("emphasis").style=ph(u),p.ensurestate("progress").style=ph(h),e.add(p),sl(p),se(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=ii(tt(i.get(["controlstyle",n+"btnsize"]),r),r),c=function(t,e,n,i){var r=i.style,o=eh(t.get(["controlstyle",e]),i||{},new gi(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),sl(c)}}h(t.nextbtnposition,"next",v(this._changetimeline,this,u?"-":"+")),h(t.prevbtnposition,"prev",v(this._changetimeline,this,u?"+":"-")),h(t.playposition,l?"stop":"play",v(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=v(s._handlepointerdrag,s),t.ondragend=v(s._handlepointerdragend,s),te(t,s._progressline,o,n,i,!0)},onupdate:function(t){te(t,s._progressline,o,n,i)}};this._currentpointer=ie(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=qi(this._axis.getextent().slice());n>i[1]&&(n=i[1]),n=0&&(a[o]=+a[o].tofixed(c)),[a,h]}var ze={min:b(ne,"min"),max:b(ne,"max"),average:b(ne,"average"),median:b(ne,"median")};function ee(t,e){var n=t.getdata(),i=t.coordinatesystem;if(e&&!function(t){return!isnan(parsefloat(t.x))&&!isnan(parsefloat(t.y))}(e)&&!f(e.coord)&&i){var r=i.dimensions,o=ve(e,n,i,t);if((e=w(e)).type&&ze[e.type]&&o.baseaxis&&o.valueaxis){var a=d(r,o.baseaxis.dim),s=d(r,o.valueaxis.dim),l=ze[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++)ze[u[h]]&&(u[h]=ge(n,n.mapdimension(r[h]),u[h]));e.coord=u}}return e}function ve(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(),i=n.dimensions;e=n.getdimension(e);for(var r=0;r=0&&"number"==typeof 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=[ee(t,r[0]),ee(t,r[1]),i({},r[2])];return g[2].type=g[2].type||null,s(g[2],g[0]),s(g[2],g[1]),g};function qe(t){return!isnan(t)&&!isfinite(t)}function ke(t,e,n,i){var r=1-t,o=i.dimensions[t];return qe(e[r])&&qe(n[r])&&e[t]===n[t]&&i.getaxis(o).containdata(e[t])}function $e(t,e){if("cartesian2d"===t.type){var n=e[0].coord,i=e[1].coord;if(n&&i&&(ke(1,n,i,t)||ke(0,n,i,t)))return!0}return be(t,e[0])&&be(t,e[1])}function je(t,e,n,i,r){var o,a=i.coordinatesystem,s=t.getitemmodel(e),l=zi(s.get("x"),r.getwidth()),u=zi(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(nw(a,"cartesian2d")){var d=a.getaxis("x"),f=a.getaxis("y");h=a.dimensions;qe(t.get(h[0],e))?o[0]=d.toglobalcoord(d.getextent()[n?0:1]):qe(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 qe=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=oe.getmarkermodelfromseries(t,"markline");if(e){var i=e.getdata(),r=ze(e).from,o=ze(e).to;r.each((function(e){je(r,e,!0,t,n),je(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 vc);this.group.add(l.group);var u=function(t,e,n){var i;i=t?o(t&&t.dimensions,(function(t){return t({name:t},e.getdata().getdimensioninfo(e.getdata().mapdimension(t))||{})})):[{name:"value",type:"float"}];var r=new l_(i,n),o=new l_(i,n),a=new l_([],n),s=o(n.get("data"),b(je,e,t,n));t&&(s=n(s,b($e,t)));var l=t?fe:function(t){return t.value};return r.initdata(o(s,(function(t){return t[0]})),null,l),o.initdata(o(s,(function(t){return t[1]})),null,l),a.initdata(o(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;ze(e).from=h,ze(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);je(e,n,r,t,i);var s=o.getmodel("itemstyle").getitemstyle();null==s.fill&&(s.fill=mg(a,"color")),e.setitemvisual(n,{symbolkeepaspect:o.get("symbolkeepaspect"),symboloffset:tt(o.get("symboloffset"),y[r?0:1]),symbolrotate:tt(o.get("symbolrotate",!0),g[r?0:1]),symbolsize:tt(o.get("symbolsize"),f[r?0:1]),symbol:tt(o.get("symbol",!0),d[r?0:1]),style:s})}f(d)||(d=[d,d]),f(f)||(f=[f,f]),f(g)||(g=[g,g]),f(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,n){t.traverse((function(t){_s(t).datamodel=e}))})),this.markkeep(l),l.group.silent=e.get("silent")||t.get("silent")},e.type="markline",e}(we);var tv=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={zlevel:0,z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemstyle:{borderwidth:0},emphasis:{label:{show:!0,position:"top"}}},e}(oe),ev=kr(),nv=function(t,e,n,i){var r=ee(t,i[0]),o=ee(t,i[1]),a=r.coord,s=o.coord;a[0]=q(a[0],-1/0),a[1]=q(a[1],-1/0),s[0]=q(s[0],1/0),s[1]=q(s[1],1/0);var l=m([{},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 iv(t){return!isnan(t)&&!isfinite(t)}function rv(t,e,n,i){var r=1-t;return iv(e[r])&&iv(n[r])}function ov(t,e){var n=e.coord[0],i=e.coord[1];return!!(nw(t,"cartesian2d")&&n&&i&&(rv(1,n,i)||rv(0,n,i)))||(be(t,{coord:n,x:e.x0,y:e.y0})||be(t,{coord:i,x:e.x1,y:e.y1}))}function av(t,e,n,i,r){var o,a=i.coordinatesystem,s=t.getitemmodel(e),l=zi(s.get(n[0]),r.getwidth()),u=zi(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(nw(a,"cartesian2d")){var c=a.getaxis("x"),p=a.getaxis("y"),d=t.get(n[0],e),f=t.get(n[1],e);iv(d)?o[0]=c.toglobalcoord(c.getextent()["x0"===n[0]?0:1]):iv(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 sv=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],lv=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=oe.getmarkermodelfromseries(t,"markarea");if(e){var i=e.getdata();i.each((function(e){var r=o(sv,(function(r){return av(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 ei});this.group.add(l.group),this.markkeep(l);var u=function(t,e,n){var i,r,o=["x0","y0","x1","y1"];t?(i=o(t&&t.dimensions,(function(t){var n=e.getdata();return t({name:t},n.getdimensioninfo(n.mapdimension(t))||{})})),r=new l_(o(o,(function(t,e){return{name:t,type:i[e%2].type}})),n)):r=new l_(i=[{name:"value",type:"float"}],n);var a=o(n.get("data"),b(nv,e,t,n));t&&(a=n(a,b(ov,t)));var s=t?function(t,e,n,i){return t.coord[math.floor(i/2)][i%2]}:function(t){return t.value};return r.initdata(a,null,s),r.hasitemoption=!0,r}(r,t,e);e.setdata(u),u.each((function(e){var n=o(sv,(function(n){return av(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))];qi(c),qi(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={zlevel:0,z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundcolor:"rgba(0,0,0,0)",bordercolor:"#ccc",borderradius:0,borderwidth:0,padding:5,itemgap:10,itemwidth:25,itemheight:14,symbolrotate:"inherit",inactivecolor:"#ccc",inactivebordercolor:"#ccc",inactiveborderwidth:"auto",itemstyle:{color:"inherit",opacity:"inherit",decal:"inherit",shadowblur:0,shadowcolor:null,shadowoffsetx:0,shadowoffsety:0,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",shadowblur:0,shadowcolor:null,shadowoffsetx:0,shadowoffsety:0},textstyle:{color:"#333"},selectedmode:!0,selector:!1,selectorlabel:{show:!0,borderradius:10,padding:[3,5,3,5],fontsize:12,fontfamily:" sans-serif",color:"#666",borderwidth:1,bordercolor:"#666"},emphasis:{selectorlabel:{show:!0,color:"#eee",backgroundcolor:"#666"}},selectorposition:"auto",selectoritemgap:7,selectorbuttongap:10,tooltip:{show:!1}},e}(xc),hv=b,cv=p,pv=ei,dv=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 pv),this.group.add(this._selectorgroup=new pv),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=vc(l,u,h),p=this.layoutinner(t,r,c,i,a,s),d=vc(t({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=bn(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=ht(),u=e.get("selectedmode"),h=[];n.eachrawseries((function(t){!t.get("legendhoverlink")&&h.push(t.id)})),cv(e.getdata(),(function(r,o){var a=r.get("name");if(!this.newlinedisabled&&(""===a||"\n"===a)){var c=new pv;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).on("click",hv(fv,a,null,i,h)).on("mouseover",hv(yv,p.name,null,i,h)).on("mouseout",hv(vv,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=he(p.fill);f&&0===f[3]&&(f[3]=.2,p.fill=je(f,"rgba")),this._createitem(n,a,o,r,e,t,{},p,d,u).on("click",hv(fv,null,a,i,h)).on("mouseover",hv(yv,null,a,i,h)).on("mouseout",hv(vv,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();cv(t,(function(t){var i=t.type,r=new cs({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}),sl(r)}))},e.prototype._createitem=function(t,e,n,i,r,o,a,s,l,u){var h=t.visualdrawtype,c=r.get("itemwidth"),p=r.get("itemheight"),d=r.isselected(e),f=i.get("symbolrotate"),g=i.get("icon"),y=function(t,e,n,i,r,o,a){for(var s=e.getmodel("itemstyle"),l=lh.concat([["decal"]]),u={},h=0;h0?2:0:u[p]=y}var d=e.getmodel("linestyle"),f=ch.concat([["inactivecolor"],["inactivewidth"]]),g={};for(h=0;h0?2:0:g[p]=y}if("auto"===u.fill&&(u.fill=r.fill),"auto"===u.stroke&&(u.stroke=r.fill),"auto"===g.stroke&&(g.stroke=r.fill),!a){var v=e.get("inactiveborderwidth"),m=u[t.indexof("empty")>-1?"fill":"stroke"];u.linewidth="auto"===v?r.linewidth>0&&m?2:0:u.linewidth,u.fill=e.get("inactivecolor"),u.stroke=e.get("inactivebordercolor"),g.stroke=n.get("inactivecolor"),g.linewidth=n.get("inactivewidth")}return{itemstyle:u,linestyle:g}}(l=g||l||"roundrect",i,r.getmodel("linestyle"),a,s,h,d),v=new pv,m=i.getmodel("textstyle");if("function"!=typeof t.getlegendicon||g&&"inherit"!==g){var _="inherit"===g&&t.getdata().getvisual("symbol")?"inherit"===f?t.getdata().getvisual("symbolrotate"):f:0;v.add(function(t){var e=t.icon||"roundrect",n=fy(e,0,0,t.itemwidth,t.itemheight,t.itemstyle.fill);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:c,itemheight:p,icon:l,iconrotate:_,itemstyle:y.itemstyle,linestyle:y.linestyle}))}else v.add(t.getlegendicon({itemwidth:c,itemheight:p,icon:l,iconrotate:f,itemstyle:y.itemstyle,linestyle:y.linestyle}));var x="left"===o?c+5:-5,b=o,w=r.get("formatter"),s=e;"string"==typeof w&&w?s=w.replace("{name}",null!=e?e:""):"function"==typeof w&&(s=w(e));var m=i.get("inactivecolor");v.add(new cs({style:ph(m,{text:s,x:x,y:p/2,fill:d?m.gettextcolor():m,align:b,verticalalign:"middle"})}));var i=new ls({shape:v.getboundingrect(),invisible:!0}),t=i.getmodel("tooltip");return t.get("show")&&oh({el:i,componentmodel:r,itemname:e,itemtooltipoption:t.option}),v.add(i),v.eachchild((function(t){t.silent=!0})),i.silent=!u,this.getcontentgroup().add(v),sl(v),v.__legenddataindex=n,v},e.prototype.layoutinner=function(t,e,n,i,r,o){var a=this.getcontentgroup(),s=this.getselectorgroup();ec(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){ec("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}(wf);function fv(t,e,n,i){vv(t,e,n,i),n.dispatchaction({type:"legendtoggleselect",name:null!=t?t:e}),yv(t,e,n,i)}function gv(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=tt(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:0,y:0};_[r]=math.max(n[r]-p[r]-v,0),_[o]=m[o],u.setclippath(new ls({shape:_})),u.__rectsize=_[r]}else h.eachchild((function(t){t.attr({invisible:!0,silent:!0})}));var x=this._getpageinfo(t);return null!=x.pageindex&&hu(l,{x:x.contentposition[0],y:x.contentposition[1]},d?t:null),this._updatepageinfoview(t,x),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;p(["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",h(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=mv[r],a=iv[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&&!_(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]))&&_(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}(dv);function cv(t){qm(xv),t.registercomponentmodel(bv),t.registercomponentview(tv),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 dv=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=zh(wn.defaultoption,{disabled:!1,zoomlock:!1,zoomonmousewheel:!0,moveonmousemove:!0,moveonmousewheel:!1,preventdefaultmousemove:!0}),e}(wn),av=kr();function lv(t,e,n){av(t).coordsysrecordmap.each((function(t){var i=t.datazoominfomap.get(e.uid);i&&(i.getrange=n)}))}function kv(t,e){if(e){t.removekey(e.model.uid);var n=e.controller;n&&n.dispose()}}function pv(t,e){t.dispatchaction({type:"datazoom",animation:{easing:"cubicout",duration:100},batch:e})}function ov(t,e,n,i){return t.coordinatesystem.containpoint([n,i])}function rv(t){t.registerprocessor(t.priority.processor.filter,(function(t,e){var n=av(e),i=n.coordsysrecordmap||(n.coordsysrecordmap=ht());i.each((function(t){t.datazoominfomap=null})),t.eachcomponent({maintype:"datazoom",subtype:"inside"},(function(t){p(xn(t).infolist,(function(n){var r=n.model.uid,o=i.get(r)||i.set(r,function(t,e){var n={model:e,containspoint:b(ov,e),dispatchaction:b(pv,t),datazoominfomap:null,controller:null},i=n.controller=new wm(t.getzr());return p(["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=ht())).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),zf(t,"dispatchaction",e.model.get("throttle",!0),"fixrate")}else kv(i,t)}))}))}var nv=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(),lv(i,e,{pan:v(zv.pan,this),zoom:v(zv.zoom,this),scrollmove:v(zv.scrollmove,this)}))},e.prototype.dispose=function(){this._clear(),t.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){!function(t,e){for(var n=av(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 pd(0,o,[0,100],0,h.minspan,h.maxspan),this.range=o,r[0]!==o[0]||r[1]!==o[1]?o:void 0}},pan:ev((function(t,e,n,i,r,o){var a=vv[i]([o.oldx,o.oldy],[o.newx,o.newy],e,r,n);return a.signal*(t[1]-t[0])*a.pixel/a.pixellength})),scrollmove:ev((function(t,e,n,i,r,o){return vv[i]([0,0],[o.scrolldelta,o.scrolldelta],e,r,n).signal*(t[1]-t[0])*o.scrolldelta}))};function ev(t){return function(e,n,i,r){var o=this.range,a=o.slice(),s=e.axismodels[0];if(s)return pd(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 vv={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 bv(t){pn(t),t.registercomponentmodel(dv),t.registercomponentview(nv),rv(t)}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.type="datazoom.slider",e.layoutmode="box",e.defaultoption=zh(wn.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}(wn),gv=ls,hv="horizontal",wv="vertical",uv=["line","bar","candlestick","scatter"],xv={easing:"cubicout",duration:100},yv=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=v(this._onbrush,this),this._onbrushend=v(this._onbrushend,this)},e.prototype.render=function(e,n,i,r){if(t.prototype.render.apply(this,arguments),zf(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(){var t,e,n;(n=(t=this)[e="_dispatchzoomaction"])&&n[pf]&&(t[e]=n[pf]);var i=this.api.getzr();i.off("mousemove",this._onbrush),i.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 ei;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===hv?{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=hc(t.option);p(["right","top","width","height"],(function(t){"ph"===a[t]&&(a[t]=o[t])}));var s=vc(a,r);this._location={x:s.x,y:s.y},this._size=[s.width,s.height],this._orient===wv&&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!==hv||r?n===hv&&r?{scaley:a?1:-1,scalex:-1}:n!==wv||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 gv({silent:!0,shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:t.get("backgroundcolor")},z2:-40}));var r=new gv({shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:"transparent"},z2:0,onclick:v(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=t.series,i=n.getrawdata(),r=n.getshadowdim?n.getshadowdim():t.otherdim;if(null!=r){var o=i.getdataextent(r),a=.3*(o[1]-o[0]);o=[o[0]-a,o[1]+a];var s,l=[0,e[1]],u=[0,e[0]],h=[[e[0],0],[0,0]],c=[],p=u[1]/(i.count()-1),d=0,f=math.round(i.count()/e[0]);i.each([r],(function(t,e){if(f>0&&e%f)d+=p;else{var n=null==t||isnan(t)||""===t,i=n?0:yi(t,o,l,!0);n&&!s&&e?(h.push([h[h.length-1][0],0]),c.push([c[c.length-1][0],0])):!n&&s&&(h.push([d,0]),c.push([d,0])),h.push([d,i]),c.push([d,i]),d+=p,s=n}}));for(var g=this.datazoommodel,y=0;y<3;y++){var v=m(1===y);this._displayables.slidergroup.add(v),this._displayables.datashadowsegs.push(v)}}}function m(t){var e=g.getmodel(t?"selecteddatabackground":"databackground"),n=new ei,i=new ru({shape:{points:h},segmentignorethreshold:1,style:e.getmodel("areastyle").getareastyle(),silent:!0,z2:-20}),r=new au({shape:{points:c},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){p(t.getaxisproxy(r,o).gettargetseriesmodels(),(function(t){if(!(n||!0!==e&&d(uv,t.get("type"))<0)){var a,s=i.getcomponent(mn(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 gv({silent:u,style:{fill:a.get("fillercolor")},textconfig:{position:"inside"}});r.add(h),r.add(new gv({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)"}})),p([0,1],(function(e){var o=a.get("handleicon");!cy[o]&&o.indexof("path://")<0&&o.indexof("image://")<0&&(o="path://"+o);var s=fy(o,-1,0,2,2,null,!0);s.attr({cursor:zv(this._orient),draggable:!0,drift:v(this._ondragmove,this,e),ondragend:v(this._ondragend,this),onmouseover:v(this._showdatainfo,this,!0),onmouseout:v(this._showdatainfo,this,!1),z2:5});var l=s.getboundingrect(),u=a.get("handlesize");this._handleheight=zi(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(),sl(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 cs({silent:!0,invisible:!0,style:ph(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=zi(a.get("movehandlesize"),o[1]),d=e.movehandle=new ls({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=fy(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 ls({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:zv(this._orient),drift:v(this._ondragmove,this,"all"),ondragstart:v(this._showdatainfo,this,!0),ondragend:v(this._ondragend,this),onmouseover:v(this._showdatainfo,this,!0),onmouseout:v(this._showdatainfo,this,!1)})},e.prototype._resetinterval=function(){var t=this._range=this.datazoommodel.getpercentrange(),e=this._getviewextent();this._handleends=[yi(t[0],[0,100],e,!0),yi(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];pd(e,i,r,n.get("zoomlock")?"all":t,null!=o.minspan?yi(o.minspan,a,r,!0):null,null!=o.maxspan?yi(o.maxspan,a,r,!0):null);var s=this._range,l=this._range=qi([yi(i[0],r,a,!0),yi(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=qi(n.slice()),r=this._size;p([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 ai(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=qi([yi(n.x,i,r,!0),yi(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&&(ee(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 gv({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?xv:null,start:e[0],end:e[1]})},e.prototype._findcoordrect=function(){var t,e=xn(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}(in);function zv(t){return"vertical"===t?"ns-resize":"ew-resize"}function jv(t){t.registercomponentmodel(fv),t.registercomponentview(yv),pn(t)}var qv=function(t,e,n){var i=w((kv[t]||{})[e]);return n&&f(i)?i[i.length-1]:i},kv={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]}},$v=tt.mapvisual,jv=tt.eachvisual,qv=f,tb=p,eb=qi,nb=yi,ib=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;a.canvassupported||(n.realtime=!1),!e&&jz(n,t,this.replacableoptionkeys),this.textstylemodel=this.getmodel("textstyle"),this.resetitemsize(),this.completevisualoption()},e.prototype.resetvisual=function(t){var e=this.statelist;t=v(t,this),this.controllervisuals=$z(this.option.controller,e,t),this.targetvisuals=$z(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=xr(t),e},e.prototype.eachtargetseries=function(t,e){p(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||["<",">"],f(t)&&(t=t.slice(),i=!0);var l=e?t:i?[u(t[0]),u(t[1])]:u(t);return h(s)?s.replace("{value}",i?l[0]:l).replace("{value2}",i?l[1]:l):g(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=eb([t.min,t.max]);this._dataextent=e},e.prototype.getdatadimension=function(t){var e=this.option.dimension,n=t.dimensions;if(null!=e||n.length){if(null!=e)return t.getdimension(e);for(var i=t.dimensions,r=i.length-1;r>=0;r--){var o=i[r];if(!t.getdimensioninfo(o).iscalculationcoord)return o}}},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={});s(i,n),s(r,n);var o=this.iscategory();function a(n){qv(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]={},tb(i,(function(t,e){if(tt.isvalidtype(e)){var n=qv(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";tb(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&&w(e)||(o?r:[r])),null==l.symbolsize&&(l.symbolsize=n&&w(n)||(o?s[0]:[s[0],s[0]])),l.symbol=$v(l.symbol,(function(t){return"none"===t?r:t}));var u=l.symbolsize;if(null!=u){var h=-1/0;jv(u,(function(t){t>h&&(h=t)})),l.symbolsize=$v(u,(function(t){return nb(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,zlevel: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}(xc),rb=[20,140],ob=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]=rb[0]),(null==e[1]||isnan(e[1]))&&(e[1]=rb[1])},e.prototype._resetrange=function(){var t=this.getextent(),e=this.option.range;!e||e.auto?(t.auto=1,this.option.range=t):f(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),p(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=qi((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.getdatadimension(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=ab(this,"outofrange",this.getextent()),n=ab(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 ei("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();pb([0,1],(function(l){var u=r[l];u.setstyle("fill",e.handlescolor[l]),u.y=t[l];var h=cb(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=qu(n.handlelabelpoints[l],ju(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=cb(t,o,s,!0),d=a[0]-c/2,f={x:u.x,y:u.y};u.y=p,u.x=d;var g=qu(l.indicatorlabelpoint,ju(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:d,y:p,style:{fill:h}},x={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(_,b),y.animateto(x,b)}else u.attr(_),y.attr(x);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||vb(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;i0:t.splitnumber>0)&&!t.calculable?"piecewise":"continuous"})),t.registeraction(_b,xb),p(bb,(function(e){t.registervisual(t.priority.visual.component,e)})),t.registerpreprocessor(mb))}function db(t){t.registercomponentmodel(ob),t.registercomponentview(gb),cb(t)}var ab=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=[],lb[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=w(r)):(t.dataextent=this.getextent(),t.mappingmethod="piecewise",t.piecelist=o(this._piecelist,(function(t){return t=w(t),"inrange"!==e&&(t.visual=null),t})))}))},e.prototype.completevisualoption=function(){var e=this.option,n={},i=tt.listvisualtypes(),r=this.iscategory();function o(t,e,n){return t&&t[e]&&t[e].hasownproperty(n)}p(e.pieces,(function(t){p(i,(function(e){t.hasownproperty(e)&&(n[e]=1)}))})),p(n,(function(t,n){var i=!1;p(this.statelist,(function(t){i=i||o(e,t,n)||o(e.target,t,n)}),this),!i&&p(this.statelist,(function(t){(e[t]||(e[t]={}))[n]=qv(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,p(i,(function(t,e){var n=this.getselectedmapkey(t);r.hasownproperty(n)||(r[n]=!0)}),this),"single"===n.selectedmode){var o=!1;p(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=w(t)},e.prototype.getvaluestate=function(t){var e=tt.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.getdatadimension(o),(function(e,i){tt.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 p(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=zh(ib.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}(ib),lb={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 kb(t,e){var n=t.inverse;("vertical"===t.orient?!n:n)&&e.reverse()}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.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=q(e.get("showlabel",!0),!u);u&&this._renderendstext(t,u[0],s,h,a),p(l.viewpiecelist,(function(i){var l=i.piece,u=new ei;u.onclick=v(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 cs({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),ec(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:hb(i.findtargetdataindices(e),i)})}},e.prototype._getitemalign=function(){var t=this.visualmapmodel,e=t.option;if("vertical"===e.orient)return ub(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 ei,a=this.visualmapmodel.textstylemodel;o.add(new cs({style:{x:i?"right"===r?n[0]:0:n[0]/2,y:n[1]/2,verticalalign:"middle",align:i?r:"center",text:e,font:a.getfont(),fill:a.gettextcolor()}})),t.add(o)}},e.prototype._getviewdata=function(){var t=this.visualmapmodel,e=o(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(fy(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=w(n.selected),r=e.getselectedmapkey(t);"single"===n.selectedmode?(i[r]=!0,p(i,(function(t,e){i[e]=e===r}))):i[r]=!i[r],this.api.dispatchaction({type:"selectdatarange",from:this.uid,visualmapid:this.visualmapmodel.id,selected:i})},e.type="visualmap.piecewise",e}(sb);function ob(t){t.registercomponentmodel(ab),t.registercomponentview(pb),cb(t)}var rb={label:{enabled:!0},decal:{show:!1}},nb=kr(),zb={};function eb(t,e){var n=t.getmodel("aria");if(n.get("enabled")){var i=w(rb);s(i.label,t.getlocalemodel().get("aria"),!1),s(n.option,i,!1),function(){if(n.getmodel("decal").get("show")){var e=ht();t.eachseries((function(t){if(t.usecolorpaletteondata){var n=e.get(t.type);n||(n={},e.set(t.type,n)),nb(t).scope=n}})),t.eachrawseries((function(e){if(!t.isseriesfiltered(e))if("function"!=typeof e.enableariadecal){var n=e.getdata();if(e.usecolorpaletteondata){var i=e.getrawdata(),r={},o=nb(e).scope;n.each((function(t){var e=n.getrawindex(t);r[e]=t}));var a=i.count();i.each((function(t){var s=r[t],l=i.getname(t)||t+"",h=xp(e.ecmodel,l,o,a),c=n.getitemvisual(s,"decal");n.setitemvisual(s,"decal",u(c,h))}))}else{var s=xp(e.ecmodel,e.name,zb,t.getseriescount()),l=n.getvisual("decal");n.setvisual("decal",u(l,s))}}else e.enableariadecal();function u(t,e){var n=t?i(i({},e),t):e;return n.dirty=!0,n}}))}}(),function(){var i=t.getlocalemodel().get("aria"),o=n.getmodel("label");if(o.option=t(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:(_=e.subtype,t.getlocalemodel().get(["series","typenames"])[_]||"自定义图")});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=[],p=0;p":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},fb=function(){function t(t){if(null==(this._condval=h(t)?new regexp(t):$(t)?t:null)){var e="";0,vr(e)}}return t.prototype.evaluate=function(t){var e=typeof t;return"string"===e?this._condval.test(t):"number"===e&&this._condval.test(t+"")},t}(),gb=function(){function t(){}return t.prototype.evaluate=function(){return this.value},t}(),hb=function(){function t(){}return t.prototype.evaluate=function(){for(var t=this.children,e=0;e